summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.cvsignore5
-rw-r--r--COPYING340
-rw-r--r--ChangeLog154
-rw-r--r--DOCUMENTATION/.cvsignore2
-rw-r--r--DOCUMENTATION/AUTHORS71
-rw-r--r--DOCUMENTATION/AUTHORS.es78
-rw-r--r--DOCUMENTATION/BUILD145
-rw-r--r--DOCUMENTATION/BUILD.ru215
-rw-r--r--DOCUMENTATION/CONTRIBUTORS61
-rw-r--r--DOCUMENTATION/CONTRIBUTORS.es82
-rw-r--r--DOCUMENTATION/FAQ613
-rw-r--r--DOCUMENTATION/README101
-rw-r--r--DOCUMENTATION/README.es139
-rw-r--r--DOCUMENTATION/README.fr113
-rw-r--r--DOCUMENTATION/README.it276
-rw-r--r--DOCUMENTATION/README.ru108
-rw-r--r--DOCUMENTATION/TODO232
-rw-r--r--DOCUMENTATION/TRANSLATORS21
-rw-r--r--DOCUMENTATION/ardour.171
-rw-r--r--DOCUMENTATION/ardour.1.es72
-rw-r--r--DOCUMENTATION/ardour.1.fr71
-rw-r--r--DOCUMENTATION/ardour.1.ru84
-rw-r--r--PACKAGER_README15
-rw-r--r--README5
-rw-r--r--ReleaseNotes-0.9betaX294
-rw-r--r--SConstruct663
-rw-r--r--ardour.rc.in136
-rw-r--r--ardour_system.rc94
-rw-r--r--libs/.cvsignore0
-rw-r--r--libs/cassowary/.cvsignore15
-rw-r--r--libs/cassowary/ANNOUNCE37
-rw-r--r--libs/cassowary/AUTHORS12
-rw-r--r--libs/cassowary/COPYING340
-rw-r--r--libs/cassowary/COPYING.LGPL444
-rw-r--r--libs/cassowary/ChangeLog2002
-rw-r--r--libs/cassowary/ClAbstractVariable.cc23
-rw-r--r--libs/cassowary/ClBug0.cc102
-rw-r--r--libs/cassowary/ClBug1.cc21
-rw-r--r--libs/cassowary/ClBug2.cc130
-rw-r--r--libs/cassowary/ClConstraint.cc32
-rw-r--r--libs/cassowary/ClDummyVariable.cc12
-rw-r--r--libs/cassowary/ClFDBinaryOneWayConstraint.cc140
-rw-r--r--libs/cassowary/ClFDConnectorVariable.cc29
-rw-r--r--libs/cassowary/ClFDSolver.cc364
-rw-r--r--libs/cassowary/ClFDVariable.cc27
-rw-r--r--libs/cassowary/ClFloatVariable.cc25
-rw-r--r--libs/cassowary/ClLinearExpression.cc473
-rw-r--r--libs/cassowary/ClReader.l87
-rw-r--r--libs/cassowary/ClReader.y154
-rw-r--r--libs/cassowary/ClSimplexSolver.cc1633
-rw-r--r--libs/cassowary/ClSlackVariable.cc12
-rw-r--r--libs/cassowary/ClSolver.cc59
-rw-r--r--libs/cassowary/ClStrength.cc52
-rw-r--r--libs/cassowary/ClSymbolicWeight.cc149
-rw-r--r--libs/cassowary/ClTableau.cc297
-rw-r--r--libs/cassowary/ClTests.cc884
-rw-r--r--libs/cassowary/ClVariable.cc21
-rw-r--r--libs/cassowary/IMPORTANT26
-rw-r--r--libs/cassowary/INSTALL182
-rw-r--r--libs/cassowary/LICENSE18
-rw-r--r--libs/cassowary/Makefile.am32
-rw-r--r--libs/cassowary/NEWS229
-rw-r--r--libs/cassowary/README241
-rw-r--r--libs/cassowary/THANKS30
-rw-r--r--libs/cassowary/autogen.sh4
-rwxr-xr-xlibs/cassowary/cassowary-config102
-rwxr-xr-xlibs/cassowary/cassowary-config.in102
-rw-r--r--libs/cassowary/cassowary-nofd.spec284
-rw-r--r--libs/cassowary/cassowary-nofd.spec2.in84
-rw-r--r--libs/cassowary/cassowary.spec78
-rw-r--r--libs/cassowary/cassowary.spec.in78
-rw-r--r--libs/cassowary/cassowary/.cvsignore2
-rw-r--r--libs/cassowary/cassowary/Cassowary.h40
-rw-r--r--libs/cassowary/cassowary/Cl.h49
-rw-r--r--libs/cassowary/cassowary/ClAbstractVariable.h161
-rw-r--r--libs/cassowary/cassowary/ClConstraint.h198
-rw-r--r--libs/cassowary/cassowary/ClConstraintHash.h39
-rw-r--r--libs/cassowary/cassowary/ClDummyVariable.h88
-rw-r--r--libs/cassowary/cassowary/ClEditConstraint.h45
-rw-r--r--libs/cassowary/cassowary/ClEditOrStayConstraint.h51
-rw-r--r--libs/cassowary/cassowary/ClErrors.h179
-rw-r--r--libs/cassowary/cassowary/ClFDBinaryOneWayConstraint.h94
-rw-r--r--libs/cassowary/cassowary/ClFDConnectorVariable.h89
-rw-r--r--libs/cassowary/cassowary/ClFDConstraint.h40
-rw-r--r--libs/cassowary/cassowary/ClFDSolver.h120
-rw-r--r--libs/cassowary/cassowary/ClFDVariable.h126
-rw-r--r--libs/cassowary/cassowary/ClFloatVariable.h119
-rw-r--r--libs/cassowary/cassowary/ClLinearConstraint.h61
-rw-r--r--libs/cassowary/cassowary/ClLinearEquation.h74
-rw-r--r--libs/cassowary/cassowary/ClLinearExpression.h298
-rw-r--r--libs/cassowary/cassowary/ClLinearExpression_fwd.h26
-rw-r--r--libs/cassowary/cassowary/ClLinearInequality.h167
-rw-r--r--libs/cassowary/cassowary/ClObjectiveVariable.h63
-rw-r--r--libs/cassowary/cassowary/ClPoint.h74
-rw-r--r--libs/cassowary/cassowary/ClReader.h117
-rw-r--r--libs/cassowary/cassowary/ClSimplexSolver.h588
-rw-r--r--libs/cassowary/cassowary/ClSlackVariable.h75
-rw-r--r--libs/cassowary/cassowary/ClSolver.h167
-rw-r--r--libs/cassowary/cassowary/ClStayConstraint.h43
-rw-r--r--libs/cassowary/cassowary/ClStrength.h91
-rw-r--r--libs/cassowary/cassowary/ClSymbolicWeight.h197
-rw-r--r--libs/cassowary/cassowary/ClTableau.h230
-rw-r--r--libs/cassowary/cassowary/ClTypedefs.h48
-rw-r--r--libs/cassowary/cassowary/ClVariable.h166
-rw-r--r--libs/cassowary/cassowary/Makefile.am36
-rw-r--r--libs/cassowary/cassowary/cl_auto_ptr.h69
-rw-r--r--libs/cassowary/cassowary/config-inline.h1
-rw-r--r--libs/cassowary/cassowary/debug.h48
-rw-r--r--libs/cassowary/cassowary/timer.h176
-rw-r--r--libs/cassowary/configure.ac64
-rw-r--r--libs/glibmm2/.cvsignore11
-rw-r--r--libs/glibmm2/AUTHORS20
-rw-r--r--libs/glibmm2/CHANGES33
-rw-r--r--libs/glibmm2/COPYING515
-rw-r--r--libs/glibmm2/ChangeLog998
-rw-r--r--libs/glibmm2/INSTALL231
-rw-r--r--libs/glibmm2/Makefile.am23
-rw-r--r--libs/glibmm2/NEWS242
-rw-r--r--libs/glibmm2/README31
-rw-r--r--libs/glibmm2/SConscript19
-rwxr-xr-xlibs/glibmm2/autogen.sh18
-rw-r--r--libs/glibmm2/configure.ac149
-rw-r--r--libs/glibmm2/glibmm-2.4.pc.in11
-rw-r--r--libs/glibmm2/glibmm.h72
-rw-r--r--libs/glibmm2/glibmm/.cvsignore2
-rw-r--r--libs/glibmm2/glibmm/Makefile.am96
-rw-r--r--libs/glibmm2/glibmm/arrayhandle.h522
-rw-r--r--libs/glibmm2/glibmm/class.cc116
-rw-r--r--libs/glibmm2/glibmm/class.h76
-rw-r--r--libs/glibmm2/glibmm/containerhandle_shared.h343
-rw-r--r--libs/glibmm2/glibmm/containers.cc33
-rw-r--r--libs/glibmm2/glibmm/containers.h372
-rw-r--r--libs/glibmm2/glibmm/convert.cc323
-rw-r--r--libs/glibmm2/glibmm/convert.h299
-rw-r--r--libs/glibmm2/glibmm/date.cc348
-rw-r--r--libs/glibmm2/glibmm/date.h427
-rw-r--r--libs/glibmm2/glibmm/debug.cc21
-rw-r--r--libs/glibmm2/glibmm/debug.h85
-rw-r--r--libs/glibmm2/glibmm/dispatcher.cc442
-rw-r--r--libs/glibmm2/glibmm/dispatcher.h102
-rw-r--r--libs/glibmm2/glibmm/error.cc187
-rw-r--r--libs/glibmm2/glibmm/error.h77
-rw-r--r--libs/glibmm2/glibmm/exception.cc40
-rw-r--r--libs/glibmm2/glibmm/exception.h42
-rw-r--r--libs/glibmm2/glibmm/exceptionhandler.cc159
-rw-r--r--libs/glibmm2/glibmm/exceptionhandler.h45
-rw-r--r--libs/glibmm2/glibmm/fileutils.cc217
-rw-r--r--libs/glibmm2/glibmm/fileutils.h475
-rw-r--r--libs/glibmm2/glibmm/helperlist.h165
-rw-r--r--libs/glibmm2/glibmm/i18n.h30
-rw-r--r--libs/glibmm2/glibmm/init.cc34
-rw-r--r--libs/glibmm2/glibmm/init.h39
-rw-r--r--libs/glibmm2/glibmm/interface.cc95
-rw-r--r--libs/glibmm2/glibmm/interface.h72
-rw-r--r--libs/glibmm2/glibmm/iochannel.cc687
-rw-r--r--libs/glibmm2/glibmm/iochannel.h695
-rw-r--r--libs/glibmm2/glibmm/listhandle.h406
-rw-r--r--libs/glibmm2/glibmm/main.cc986
-rw-r--r--libs/glibmm2/glibmm/main.h697
-rw-r--r--libs/glibmm2/glibmm/markup.cc350
-rw-r--r--libs/glibmm2/glibmm/markup.h420
-rw-r--r--libs/glibmm2/glibmm/miscutils.cc243
-rw-r--r--libs/glibmm2/glibmm/miscutils.h272
-rw-r--r--libs/glibmm2/glibmm/module.cc93
-rw-r--r--libs/glibmm2/glibmm/module.h221
-rw-r--r--libs/glibmm2/glibmm/object.cc312
-rw-r--r--libs/glibmm2/glibmm/object.h282
-rw-r--r--libs/glibmm2/glibmm/objectbase.cc271
-rw-r--r--libs/glibmm2/glibmm/objectbase.h171
-rw-r--r--libs/glibmm2/glibmm/optioncontext.cc141
-rw-r--r--libs/glibmm2/glibmm/optioncontext.h197
-rw-r--r--libs/glibmm2/glibmm/optionentry.cc149
-rw-r--r--libs/glibmm2/glibmm/optionentry.h108
-rw-r--r--libs/glibmm2/glibmm/optiongroup.cc453
-rw-r--r--libs/glibmm2/glibmm/optiongroup.h141
-rw-r--r--libs/glibmm2/glibmm/pattern.cc66
-rw-r--r--libs/glibmm2/glibmm/pattern.h69
-rw-r--r--libs/glibmm2/glibmm/private/convert_p.h6
-rw-r--r--libs/glibmm2/glibmm/private/date_p.h6
-rw-r--r--libs/glibmm2/glibmm/private/fileutils_p.h6
-rw-r--r--libs/glibmm2/glibmm/private/interface_p.h24
-rw-r--r--libs/glibmm2/glibmm/private/iochannel_p.h6
-rw-r--r--libs/glibmm2/glibmm/private/markup_p.h6
-rw-r--r--libs/glibmm2/glibmm/private/module_p.h6
-rw-r--r--libs/glibmm2/glibmm/private/object_p.h28
-rw-r--r--libs/glibmm2/glibmm/private/optioncontext_p.h6
-rw-r--r--libs/glibmm2/glibmm/private/optionentry_p.h6
-rw-r--r--libs/glibmm2/glibmm/private/optiongroup_p.h6
-rw-r--r--libs/glibmm2/glibmm/private/shell_p.h6
-rw-r--r--libs/glibmm2/glibmm/private/spawn_p.h6
-rw-r--r--libs/glibmm2/glibmm/private/thread_p.h6
-rw-r--r--libs/glibmm2/glibmm/private/unicode_p.h6
-rw-r--r--libs/glibmm2/glibmm/property.cc198
-rw-r--r--libs/glibmm2/glibmm/property.h171
-rw-r--r--libs/glibmm2/glibmm/propertyproxy.cc24
-rw-r--r--libs/glibmm2/glibmm/propertyproxy.h163
-rw-r--r--libs/glibmm2/glibmm/propertyproxy_base.cc151
-rw-r--r--libs/glibmm2/glibmm/propertyproxy_base.h84
-rw-r--r--libs/glibmm2/glibmm/quark.cc66
-rw-r--r--libs/glibmm2/glibmm/quark.h88
-rw-r--r--libs/glibmm2/glibmm/random.cc76
-rw-r--r--libs/glibmm2/glibmm/random.h73
-rw-r--r--libs/glibmm2/glibmm/refptr.h318
-rw-r--r--libs/glibmm2/glibmm/sarray.h108
-rw-r--r--libs/glibmm2/glibmm/shell.cc93
-rw-r--r--libs/glibmm2/glibmm/shell.h123
-rw-r--r--libs/glibmm2/glibmm/signalproxy.cc105
-rw-r--r--libs/glibmm2/glibmm/signalproxy.h394
-rw-r--r--libs/glibmm2/glibmm/signalproxy_connectionnode.cc94
-rw-r--r--libs/glibmm2/glibmm/signalproxy_connectionnode.h70
-rw-r--r--libs/glibmm2/glibmm/slisthandle.h405
-rw-r--r--libs/glibmm2/glibmm/spawn.cc311
-rw-r--r--libs/glibmm2/glibmm/spawn.h203
-rw-r--r--libs/glibmm2/glibmm/streamiochannel.cc188
-rw-r--r--libs/glibmm2/glibmm/streamiochannel.h67
-rw-r--r--libs/glibmm2/glibmm/stringutils.cc117
-rw-r--r--libs/glibmm2/glibmm/stringutils.h184
-rw-r--r--libs/glibmm2/glibmm/thread.cc399
-rw-r--r--libs/glibmm2/glibmm/thread.h1082
-rw-r--r--libs/glibmm2/glibmm/threadpool.cc245
-rw-r--r--libs/glibmm2/glibmm/threadpool.h183
-rw-r--r--libs/glibmm2/glibmm/timer.cc72
-rw-r--r--libs/glibmm2/glibmm/timer.h79
-rw-r--r--libs/glibmm2/glibmm/timeval.cc120
-rw-r--r--libs/glibmm2/glibmm/timeval.h233
-rw-r--r--libs/glibmm2/glibmm/unicode.cc33
-rw-r--r--libs/glibmm2/glibmm/unicode.h311
-rw-r--r--libs/glibmm2/glibmm/ustring.cc1207
-rw-r--r--libs/glibmm2/glibmm/ustring.h997
-rw-r--r--libs/glibmm2/glibmm/utility.cc40
-rw-r--r--libs/glibmm2/glibmm/utility.h119
-rw-r--r--libs/glibmm2/glibmm/value.cc242
-rw-r--r--libs/glibmm2/glibmm/value.h319
-rw-r--r--libs/glibmm2/glibmm/value_basictypes.cc336
-rw-r--r--libs/glibmm2/glibmm/value_basictypes.h271
-rw-r--r--libs/glibmm2/glibmm/value_custom.cc145
-rw-r--r--libs/glibmm2/glibmm/value_custom.h289
-rw-r--r--libs/glibmm2/glibmm/wrap.cc161
-rw-r--r--libs/glibmm2/glibmm/wrap.h118
-rw-r--r--libs/glibmm2/glibmm/wrap_init.cc73
-rw-r--r--libs/glibmm2/glibmm/wrap_init.h38
-rw-r--r--libs/glibmm2/glibmmconfig.h.in85
-rw-r--r--libs/glibmm2/scripts/.cvsignore5
-rw-r--r--libs/glibmm2/scripts/cxx.m4364
-rw-r--r--libs/glibmm2/scripts/cxx_std.m4195
-rw-r--r--libs/glibmm2/scripts/macros.m4134
-rw-r--r--libs/gtkmm2/AUTHORS20
-rw-r--r--libs/gtkmm2/CHANGES88
-rw-r--r--libs/gtkmm2/COPYING515
-rw-r--r--libs/gtkmm2/ChangeLog2390
-rw-r--r--libs/gtkmm2/atk/SConscript10
-rw-r--r--libs/gtkmm2/atk/atkmm.h42
-rw-r--r--libs/gtkmm2/atk/atkmm/action.cc481
-rw-r--r--libs/gtkmm2/atk/atkmm/action.h193
-rw-r--r--libs/gtkmm2/atk/atkmm/component.cc892
-rw-r--r--libs/gtkmm2/atk/atkmm/component.h331
-rw-r--r--libs/gtkmm2/atk/atkmm/document.cc246
-rw-r--r--libs/gtkmm2/atk/atkmm/document.h145
-rw-r--r--libs/gtkmm2/atk/atkmm/editabletext.cc506
-rw-r--r--libs/gtkmm2/atk/atkmm/editabletext.h193
-rw-r--r--libs/gtkmm2/atk/atkmm/hyperlink.cc681
-rw-r--r--libs/gtkmm2/atk/atkmm/hyperlink.h252
-rw-r--r--libs/gtkmm2/atk/atkmm/hypertext.cc396
-rw-r--r--libs/gtkmm2/atk/atkmm/hypertext.h167
-rw-r--r--libs/gtkmm2/atk/atkmm/image.cc349
-rw-r--r--libs/gtkmm2/atk/atkmm/image.h173
-rw-r--r--libs/gtkmm2/atk/atkmm/implementor.cc175
-rw-r--r--libs/gtkmm2/atk/atkmm/implementor.h127
-rw-r--r--libs/gtkmm2/atk/atkmm/init.cc34
-rw-r--r--libs/gtkmm2/atk/atkmm/init.h40
-rw-r--r--libs/gtkmm2/atk/atkmm/noopobject.cc132
-rw-r--r--libs/gtkmm2/atk/atkmm/noopobject.h143
-rw-r--r--libs/gtkmm2/atk/atkmm/object.cc834
-rw-r--r--libs/gtkmm2/atk/atkmm/object.h570
-rw-r--r--libs/gtkmm2/atk/atkmm/objectaccessible.cc165
-rw-r--r--libs/gtkmm2/atk/atkmm/objectaccessible.h145
-rw-r--r--libs/gtkmm2/atk/atkmm/private/action_p.h47
-rw-r--r--libs/gtkmm2/atk/atkmm/private/component_p.h54
-rw-r--r--libs/gtkmm2/atk/atkmm/private/document_p.h43
-rw-r--r--libs/gtkmm2/atk/atkmm/private/editabletext_p.h47
-rw-r--r--libs/gtkmm2/atk/atkmm/private/hyperlink_p.h54
-rw-r--r--libs/gtkmm2/atk/atkmm/private/hypertext_p.h45
-rw-r--r--libs/gtkmm2/atk/atkmm/private/image_p.h45
-rw-r--r--libs/gtkmm2/atk/atkmm/private/implementor_p.h41
-rw-r--r--libs/gtkmm2/atk/atkmm/private/noopobject_p.h44
-rw-r--r--libs/gtkmm2/atk/atkmm/private/object_p.h50
-rw-r--r--libs/gtkmm2/atk/atkmm/private/objectaccessible_p.h44
-rw-r--r--libs/gtkmm2/atk/atkmm/private/relation_p.h44
-rw-r--r--libs/gtkmm2/atk/atkmm/private/relationset_p.h44
-rw-r--r--libs/gtkmm2/atk/atkmm/private/selection_p.h49
-rw-r--r--libs/gtkmm2/atk/atkmm/private/stateset_p.h44
-rw-r--r--libs/gtkmm2/atk/atkmm/private/streamablecontent_p.h44
-rw-r--r--libs/gtkmm2/atk/atkmm/private/table_p.h77
-rw-r--r--libs/gtkmm2/atk/atkmm/private/text_p.h61
-rw-r--r--libs/gtkmm2/atk/atkmm/private/value_p.h44
-rw-r--r--libs/gtkmm2/atk/atkmm/relation.cc177
-rw-r--r--libs/gtkmm2/atk/atkmm/relation.h187
-rw-r--r--libs/gtkmm2/atk/atkmm/relationset.cc181
-rw-r--r--libs/gtkmm2/atk/atkmm/relationset.h171
-rw-r--r--libs/gtkmm2/atk/atkmm/selection.cc596
-rw-r--r--libs/gtkmm2/atk/atkmm/selection.h208
-rw-r--r--libs/gtkmm2/atk/atkmm/stateset.cc200
-rw-r--r--libs/gtkmm2/atk/atkmm/stateset.h247
-rw-r--r--libs/gtkmm2/atk/atkmm/streamablecontent.cc306
-rw-r--r--libs/gtkmm2/atk/atkmm/streamablecontent.h153
-rw-r--r--libs/gtkmm2/atk/atkmm/table.cc2394
-rw-r--r--libs/gtkmm2/atk/atkmm/table.h427
-rw-r--r--libs/gtkmm2/atk/atkmm/text.cc1563
-rw-r--r--libs/gtkmm2/atk/atkmm/text.h687
-rw-r--r--libs/gtkmm2/atk/atkmm/value.cc340
-rw-r--r--libs/gtkmm2/atk/atkmm/value.h157
-rw-r--r--libs/gtkmm2/atk/atkmm/wrap_init.cc91
-rw-r--r--libs/gtkmm2/atk/atkmm/wrap_init.h32
-rw-r--r--libs/gtkmm2/gdk/.DS_Storebin0 -> 6148 bytes
-rw-r--r--libs/gtkmm2/gdk/SConscript10
-rw-r--r--libs/gtkmm2/gdk/gdkmm.h48
-rw-r--r--libs/gtkmm2/gdk/gdkmm/bitmap.cc71
-rw-r--r--libs/gtkmm2/gdk/gdkmm/bitmap.h79
-rw-r--r--libs/gtkmm2/gdk/gdkmm/color.cc297
-rw-r--r--libs/gtkmm2/gdk/gdkmm/color.h274
-rw-r--r--libs/gtkmm2/gdk/gdkmm/colormap.cc209
-rw-r--r--libs/gtkmm2/gdk/gdkmm/colormap.h227
-rw-r--r--libs/gtkmm2/gdk/gdkmm/cursor.cc161
-rw-r--r--libs/gtkmm2/gdk/gdkmm/cursor.h251
-rw-r--r--libs/gtkmm2/gdk/gdkmm/device.cc204
-rw-r--r--libs/gtkmm2/gdk/gdkmm/device.h254
-rw-r--r--libs/gtkmm2/gdk/gdkmm/display.cc596
-rw-r--r--libs/gtkmm2/gdk/gdkmm/display.h635
-rw-r--r--libs/gtkmm2/gdk/gdkmm/displaymanager.cc265
-rw-r--r--libs/gtkmm2/gdk/gdkmm/displaymanager.h186
-rw-r--r--libs/gtkmm2/gdk/gdkmm/dragcontext.cc310
-rw-r--r--libs/gtkmm2/gdk/gdkmm/dragcontext.h369
-rw-r--r--libs/gtkmm2/gdk/gdkmm/drawable.cc369
-rw-r--r--libs/gtkmm2/gdk/gdkmm/drawable.h601
-rw-r--r--libs/gtkmm2/gdk/gdkmm/event.cc223
-rw-r--r--libs/gtkmm2/gdk/gdkmm/event.h398
-rw-r--r--libs/gtkmm2/gdk/gdkmm/gc.cc326
-rw-r--r--libs/gtkmm2/gdk/gdkmm/gc.h617
-rw-r--r--libs/gtkmm2/gdk/gdkmm/general.cc54
-rw-r--r--libs/gtkmm2/gdk/gdkmm/general.h37
-rw-r--r--libs/gtkmm2/gdk/gdkmm/image.cc250
-rw-r--r--libs/gtkmm2/gdk/gdkmm/image.h231
-rw-r--r--libs/gtkmm2/gdk/gdkmm/list.h157
-rw-r--r--libs/gtkmm2/gdk/gdkmm/pixbuf.cc503
-rw-r--r--libs/gtkmm2/gdk/gdkmm/pixbuf.h884
-rw-r--r--libs/gtkmm2/gdk/gdkmm/pixbufanimation.cc172
-rw-r--r--libs/gtkmm2/gdk/gdkmm/pixbufanimation.h194
-rw-r--r--libs/gtkmm2/gdk/gdkmm/pixbufanimationiter.cc123
-rw-r--r--libs/gtkmm2/gdk/gdkmm/pixbufanimationiter.h120
-rw-r--r--libs/gtkmm2/gdk/gdkmm/pixbufformat.cc118
-rw-r--r--libs/gtkmm2/gdk/gdkmm/pixbufformat.h150
-rw-r--r--libs/gtkmm2/gdk/gdkmm/pixbufloader.cc465
-rw-r--r--libs/gtkmm2/gdk/gdkmm/pixbufloader.h269
-rw-r--r--libs/gtkmm2/gdk/gdkmm/pixmap.cc320
-rw-r--r--libs/gtkmm2/gdk/gdkmm/pixmap.h202
-rw-r--r--libs/gtkmm2/gdk/gdkmm/private/bitmap_p.h7
-rw-r--r--libs/gtkmm2/gdk/gdkmm/private/color_p.h6
-rw-r--r--libs/gtkmm2/gdk/gdkmm/private/colormap_p.h44
-rw-r--r--libs/gtkmm2/gdk/gdkmm/private/cursor_p.h7
-rw-r--r--libs/gtkmm2/gdk/gdkmm/private/device_p.h44
-rw-r--r--libs/gtkmm2/gdk/gdkmm/private/display_p.h45
-rw-r--r--libs/gtkmm2/gdk/gdkmm/private/displaymanager_p.h45
-rw-r--r--libs/gtkmm2/gdk/gdkmm/private/dragcontext_p.h44
-rw-r--r--libs/gtkmm2/gdk/gdkmm/private/drawable_p.h44
-rw-r--r--libs/gtkmm2/gdk/gdkmm/private/event_p.h6
-rw-r--r--libs/gtkmm2/gdk/gdkmm/private/gc_p.h44
-rw-r--r--libs/gtkmm2/gdk/gdkmm/private/image_p.h44
-rw-r--r--libs/gtkmm2/gdk/gdkmm/private/pixbuf_p.h44
-rw-r--r--libs/gtkmm2/gdk/gdkmm/private/pixbufanimation_p.h44
-rw-r--r--libs/gtkmm2/gdk/gdkmm/private/pixbufanimationiter_p.h44
-rw-r--r--libs/gtkmm2/gdk/gdkmm/private/pixbufformat_p.h6
-rw-r--r--libs/gtkmm2/gdk/gdkmm/private/pixbufloader_p.h47
-rw-r--r--libs/gtkmm2/gdk/gdkmm/private/pixmap_p.h44
-rw-r--r--libs/gtkmm2/gdk/gdkmm/private/rectangle_p.h6
-rw-r--r--libs/gtkmm2/gdk/gdkmm/private/region_p.h6
-rw-r--r--libs/gtkmm2/gdk/gdkmm/private/rgbcmap_p.h6
-rw-r--r--libs/gtkmm2/gdk/gdkmm/private/screen_p.h45
-rw-r--r--libs/gtkmm2/gdk/gdkmm/private/types_p.h6
-rw-r--r--libs/gtkmm2/gdk/gdkmm/private/visual_p.h44
-rw-r--r--libs/gtkmm2/gdk/gdkmm/private/window_p.h44
-rw-r--r--libs/gtkmm2/gdk/gdkmm/rectangle.cc160
-rw-r--r--libs/gtkmm2/gdk/gdkmm/rectangle.h113
-rw-r--r--libs/gtkmm2/gdk/gdkmm/region.cc226
-rw-r--r--libs/gtkmm2/gdk/gdkmm/region.h234
-rw-r--r--libs/gtkmm2/gdk/gdkmm/rgb.cc43
-rw-r--r--libs/gtkmm2/gdk/gdkmm/rgb.h55
-rw-r--r--libs/gtkmm2/gdk/gdkmm/rgbcmap.cc72
-rw-r--r--libs/gtkmm2/gdk/gdkmm/rgbcmap.h82
-rw-r--r--libs/gtkmm2/gdk/gdkmm/screen.cc416
-rw-r--r--libs/gtkmm2/gdk/gdkmm/screen.h423
-rw-r--r--libs/gtkmm2/gdk/gdkmm/types.cc116
-rw-r--r--libs/gtkmm2/gdk/gdkmm/types.h370
-rw-r--r--libs/gtkmm2/gdk/gdkmm/visual.cc226
-rw-r--r--libs/gtkmm2/gdk/gdkmm/visual.h253
-rw-r--r--libs/gtkmm2/gdk/gdkmm/window.cc769
-rw-r--r--libs/gtkmm2/gdk/gdkmm/window.h1906
-rw-r--r--libs/gtkmm2/gdk/gdkmm/wrap_init.cc135
-rw-r--r--libs/gtkmm2/gdk/gdkmm/wrap_init.h32
-rw-r--r--libs/gtkmm2/gdk/gdkmmconfig.h8
-rw-r--r--libs/gtkmm2/gtk/SConscript10
-rw-r--r--libs/gtkmm2/gtk/gtkmm.h156
-rw-r--r--libs/gtkmm2/gtk/gtkmm/aboutdialog.cc477
-rw-r--r--libs/gtkmm2/gtk/gtkmm/aboutdialog.h591
-rw-r--r--libs/gtkmm2/gtk/gtkmm/accelgroup.cc347
-rw-r--r--libs/gtkmm2/gtk/gtkmm/accelgroup.h249
-rw-r--r--libs/gtkmm2/gtk/gtkmm/accelkey.cc93
-rw-r--r--libs/gtkmm2/gtk/gtkmm/accelkey.h94
-rw-r--r--libs/gtkmm2/gtk/gtkmm/accellabel.cc188
-rw-r--r--libs/gtkmm2/gtk/gtkmm/accellabel.h182
-rw-r--r--libs/gtkmm2/gtk/gtkmm/accelmap.cc70
-rw-r--r--libs/gtkmm2/gtk/gtkmm/accelmap.h129
-rw-r--r--libs/gtkmm2/gtk/gtkmm/action.cc639
-rw-r--r--libs/gtkmm2/gtk/gtkmm/action.h532
-rw-r--r--libs/gtkmm2/gtk/gtkmm/actiongroup.cc419
-rw-r--r--libs/gtkmm2/gtk/gtkmm/actiongroup.h250
-rw-r--r--libs/gtkmm2/gtk/gtkmm/adjustment.cc343
-rw-r--r--libs/gtkmm2/gtk/gtkmm/adjustment.h236
-rw-r--r--libs/gtkmm2/gtk/gtkmm/alignment.cc243
-rw-r--r--libs/gtkmm2/gtk/gtkmm/alignment.h318
-rw-r--r--libs/gtkmm2/gtk/gtkmm/arrow.cc177
-rw-r--r--libs/gtkmm2/gtk/gtkmm/arrow.h177
-rw-r--r--libs/gtkmm2/gtk/gtkmm/aspectframe.cc187
-rw-r--r--libs/gtkmm2/gtk/gtkmm/aspectframe.h242
-rw-r--r--libs/gtkmm2/gtk/gtkmm/base.h53
-rw-r--r--libs/gtkmm2/gtk/gtkmm/bin.cc242
-rw-r--r--libs/gtkmm2/gtk/gtkmm/bin.h211
-rw-r--r--libs/gtkmm2/gtk/gtkmm/box.cc572
-rw-r--r--libs/gtkmm2/gtk/gtkmm/box.h587
-rw-r--r--libs/gtkmm2/gtk/gtkmm/button.cc682
-rw-r--r--libs/gtkmm2/gtk/gtkmm/button.h432
-rw-r--r--libs/gtkmm2/gtk/gtkmm/buttonbox.cc389
-rw-r--r--libs/gtkmm2/gtk/gtkmm/buttonbox.h361
-rw-r--r--libs/gtkmm2/gtk/gtkmm/calendar.cc605
-rw-r--r--libs/gtkmm2/gtk/gtkmm/calendar.h273
-rw-r--r--libs/gtkmm2/gtk/gtkmm/celleditable.cc307
-rw-r--r--libs/gtkmm2/gtk/gtkmm/celleditable.h158
-rw-r--r--libs/gtkmm2/gtk/gtkmm/celllayout.cc519
-rw-r--r--libs/gtkmm2/gtk/gtkmm/celllayout.h226
-rw-r--r--libs/gtkmm2/gtk/gtkmm/cellrenderer.cc638
-rw-r--r--libs/gtkmm2/gtk/gtkmm/cellrenderer.h610
-rw-r--r--libs/gtkmm2/gtk/gtkmm/cellrenderer_generation.cc52
-rw-r--r--libs/gtkmm2/gtk/gtkmm/cellrenderer_generation.h62
-rw-r--r--libs/gtkmm2/gtk/gtkmm/cellrenderercombo.cc170
-rw-r--r--libs/gtkmm2/gtk/gtkmm/cellrenderercombo.h180
-rw-r--r--libs/gtkmm2/gtk/gtkmm/cellrendererpixbuf.cc199
-rw-r--r--libs/gtkmm2/gtk/gtkmm/cellrendererpixbuf.h226
-rw-r--r--libs/gtkmm2/gtk/gtkmm/cellrendererprogress.cc161
-rw-r--r--libs/gtkmm2/gtk/gtkmm/cellrendererprogress.h152
-rw-r--r--libs/gtkmm2/gtk/gtkmm/cellrenderertext.cc624
-rw-r--r--libs/gtkmm2/gtk/gtkmm/cellrenderertext.h769
-rw-r--r--libs/gtkmm2/gtk/gtkmm/cellrenderertoggle.cc273
-rw-r--r--libs/gtkmm2/gtk/gtkmm/cellrenderertoggle.h206
-rw-r--r--libs/gtkmm2/gtk/gtkmm/cellview.cc199
-rw-r--r--libs/gtkmm2/gtk/gtkmm/cellview.h210
-rw-r--r--libs/gtkmm2/gtk/gtkmm/checkbutton.cc186
-rw-r--r--libs/gtkmm2/gtk/gtkmm/checkbutton.h151
-rw-r--r--libs/gtkmm2/gtk/gtkmm/checkmenuitem.cc317
-rw-r--r--libs/gtkmm2/gtk/gtkmm/checkmenuitem.h237
-rw-r--r--libs/gtkmm2/gtk/gtkmm/clipboard.cc584
-rw-r--r--libs/gtkmm2/gtk/gtkmm/clipboard.h489
-rw-r--r--libs/gtkmm2/gtk/gtkmm/colorbutton.cc287
-rw-r--r--libs/gtkmm2/gtk/gtkmm/colorbutton.h277
-rw-r--r--libs/gtkmm2/gtk/gtkmm/colorselection.cc538
-rw-r--r--libs/gtkmm2/gtk/gtkmm/colorselection.h362
-rw-r--r--libs/gtkmm2/gtk/gtkmm/combo.cc993
-rw-r--r--libs/gtkmm2/gtk/gtkmm/combo.h545
-rw-r--r--libs/gtkmm2/gtk/gtkmm/combobox.cc452
-rw-r--r--libs/gtkmm2/gtk/gtkmm/combobox.h492
-rw-r--r--libs/gtkmm2/gtk/gtkmm/comboboxentry.cc176
-rw-r--r--libs/gtkmm2/gtk/gtkmm/comboboxentry.h183
-rw-r--r--libs/gtkmm2/gtk/gtkmm/comboboxentrytext.cc134
-rw-r--r--libs/gtkmm2/gtk/gtkmm/comboboxentrytext.h89
-rw-r--r--libs/gtkmm2/gtk/gtkmm/comboboxtext.cc138
-rw-r--r--libs/gtkmm2/gtk/gtkmm/comboboxtext.h92
-rw-r--r--libs/gtkmm2/gtk/gtkmm/container.cc945
-rw-r--r--libs/gtkmm2/gtk/gtkmm/container.h446
-rw-r--r--libs/gtkmm2/gtk/gtkmm/curve.cc378
-rw-r--r--libs/gtkmm2/gtk/gtkmm/curve.h303
-rw-r--r--libs/gtkmm2/gtk/gtkmm/dialog.cc331
-rw-r--r--libs/gtkmm2/gtk/gtkmm/dialog.h346
-rw-r--r--libs/gtkmm2/gtk/gtkmm/drawingarea.cc129
-rw-r--r--libs/gtkmm2/gtk/gtkmm/drawingarea.h120
-rw-r--r--libs/gtkmm2/gtk/gtkmm/editable.cc770
-rw-r--r--libs/gtkmm2/gtk/gtkmm/editable.h190
-rw-r--r--libs/gtkmm2/gtk/gtkmm/entry.cc598
-rw-r--r--libs/gtkmm2/gtk/gtkmm/entry.h524
-rw-r--r--libs/gtkmm2/gtk/gtkmm/entrycompletion.cc611
-rw-r--r--libs/gtkmm2/gtk/gtkmm/entrycompletion.h323
-rw-r--r--libs/gtkmm2/gtk/gtkmm/enums.cc283
-rw-r--r--libs/gtkmm2/gtk/gtkmm/enums.h1422
-rw-r--r--libs/gtkmm2/gtk/gtkmm/eventbox.cc170
-rw-r--r--libs/gtkmm2/gtk/gtkmm/eventbox.h232
-rw-r--r--libs/gtkmm2/gtk/gtkmm/expander.cc266
-rw-r--r--libs/gtkmm2/gtk/gtkmm/expander.h362
-rw-r--r--libs/gtkmm2/gtk/gtkmm/filechooser.cc581
-rw-r--r--libs/gtkmm2/gtk/gtkmm/filechooser.h935
-rw-r--r--libs/gtkmm2/gtk/gtkmm/filechooserbutton.cc203
-rw-r--r--libs/gtkmm2/gtk/gtkmm/filechooserbutton.h234
-rw-r--r--libs/gtkmm2/gtk/gtkmm/filechooserdialog.cc158
-rw-r--r--libs/gtkmm2/gtk/gtkmm/filechooserdialog.h129
-rw-r--r--libs/gtkmm2/gtk/gtkmm/filechooserwidget.cc150
-rw-r--r--libs/gtkmm2/gtk/gtkmm/filechooserwidget.h140
-rw-r--r--libs/gtkmm2/gtk/gtkmm/filefilter.cc240
-rw-r--r--libs/gtkmm2/gtk/gtkmm/filefilter.h264
-rw-r--r--libs/gtkmm2/gtk/gtkmm/fileselection.cc324
-rw-r--r--libs/gtkmm2/gtk/gtkmm/fileselection.h270
-rw-r--r--libs/gtkmm2/gtk/gtkmm/fixed.cc153
-rw-r--r--libs/gtkmm2/gtk/gtkmm/fixed.h149
-rw-r--r--libs/gtkmm2/gtk/gtkmm/fontbutton.cc324
-rw-r--r--libs/gtkmm2/gtk/gtkmm/fontbutton.h311
-rw-r--r--libs/gtkmm2/gtk/gtkmm/fontselection.cc401
-rw-r--r--libs/gtkmm2/gtk/gtkmm/fontselection.h292
-rw-r--r--libs/gtkmm2/gtk/gtkmm/frame.cc292
-rw-r--r--libs/gtkmm2/gtk/gtkmm/frame.h305
-rw-r--r--libs/gtkmm2/gtk/gtkmm/handlebox.cc419
-rw-r--r--libs/gtkmm2/gtk/gtkmm/handlebox.h220
-rw-r--r--libs/gtkmm2/gtk/gtkmm/iconfactory.cc189
-rw-r--r--libs/gtkmm2/gtk/gtkmm/iconfactory.h160
-rw-r--r--libs/gtkmm2/gtk/gtkmm/iconinfo.cc177
-rw-r--r--libs/gtkmm2/gtk/gtkmm/iconinfo.h227
-rw-r--r--libs/gtkmm2/gtk/gtkmm/iconset.cc146
-rw-r--r--libs/gtkmm2/gtk/gtkmm/iconset.h188
-rw-r--r--libs/gtkmm2/gtk/gtkmm/iconsource.cc208
-rw-r--r--libs/gtkmm2/gtk/gtkmm/iconsource.h288
-rw-r--r--libs/gtkmm2/gtk/gtkmm/icontheme.cc327
-rw-r--r--libs/gtkmm2/gtk/gtkmm/icontheme.h394
-rw-r--r--libs/gtkmm2/gtk/gtkmm/iconview.cc695
-rw-r--r--libs/gtkmm2/gtk/gtkmm/iconview.h596
-rw-r--r--libs/gtkmm2/gtk/gtkmm/image.cc446
-rw-r--r--libs/gtkmm2/gtk/gtkmm/image.h454
-rw-r--r--libs/gtkmm2/gtk/gtkmm/imagemenuitem.cc192
-rw-r--r--libs/gtkmm2/gtk/gtkmm/imagemenuitem.h149
-rw-r--r--libs/gtkmm2/gtk/gtkmm/inputdialog.cc386
-rw-r--r--libs/gtkmm2/gtk/gtkmm/inputdialog.h155
-rw-r--r--libs/gtkmm2/gtk/gtkmm/invisible.cc167
-rw-r--r--libs/gtkmm2/gtk/gtkmm/invisible.h142
-rw-r--r--libs/gtkmm2/gtk/gtkmm/item.cc321
-rw-r--r--libs/gtkmm2/gtk/gtkmm/item.h145
-rw-r--r--libs/gtkmm2/gtk/gtkmm/label.cc603
-rw-r--r--libs/gtkmm2/gtk/gtkmm/label.h742
-rw-r--r--libs/gtkmm2/gtk/gtkmm/layout.cc371
-rw-r--r--libs/gtkmm2/gtk/gtkmm/layout.h300
-rw-r--r--libs/gtkmm2/gtk/gtkmm/liststore.cc264
-rw-r--r--libs/gtkmm2/gtk/gtkmm/liststore.h246
-rw-r--r--libs/gtkmm2/gtk/gtkmm/main.cc538
-rw-r--r--libs/gtkmm2/gtk/gtkmm/main.h284
-rw-r--r--libs/gtkmm2/gtk/gtkmm/menu.cc348
-rw-r--r--libs/gtkmm2/gtk/gtkmm/menu.h304
-rw-r--r--libs/gtkmm2/gtk/gtkmm/menu_elems.cc286
-rw-r--r--libs/gtkmm2/gtk/gtkmm/menu_elems.h266
-rw-r--r--libs/gtkmm2/gtk/gtkmm/menubar.cc147
-rw-r--r--libs/gtkmm2/gtk/gtkmm/menubar.h128
-rw-r--r--libs/gtkmm2/gtk/gtkmm/menuitem.cc552
-rw-r--r--libs/gtkmm2/gtk/gtkmm/menuitem.h233
-rw-r--r--libs/gtkmm2/gtk/gtkmm/menushell.cc492
-rw-r--r--libs/gtkmm2/gtk/gtkmm/menushell.h288
-rw-r--r--libs/gtkmm2/gtk/gtkmm/menutoolbutton.cc247
-rw-r--r--libs/gtkmm2/gtk/gtkmm/menutoolbutton.h196
-rw-r--r--libs/gtkmm2/gtk/gtkmm/messagedialog.cc189
-rw-r--r--libs/gtkmm2/gtk/gtkmm/messagedialog.h228
-rw-r--r--libs/gtkmm2/gtk/gtkmm/misc.cc200
-rw-r--r--libs/gtkmm2/gtk/gtkmm/misc.h212
-rw-r--r--libs/gtkmm2/gtk/gtkmm/notebook.cc910
-rw-r--r--libs/gtkmm2/gtk/gtkmm/notebook.h903
-rw-r--r--libs/gtkmm2/gtk/gtkmm/object.cc407
-rw-r--r--libs/gtkmm2/gtk/gtkmm/object.h168
-rw-r--r--libs/gtkmm2/gtk/gtkmm/optionmenu.cc252
-rw-r--r--libs/gtkmm2/gtk/gtkmm/optionmenu.h153
-rw-r--r--libs/gtkmm2/gtk/gtkmm/paned.cc419
-rw-r--r--libs/gtkmm2/gtk/gtkmm/paned.h417
-rw-r--r--libs/gtkmm2/gtk/gtkmm/plug.cc217
-rw-r--r--libs/gtkmm2/gtk/gtkmm/plug.h132
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/aboutdialog_p.h44
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/accelgroup_p.h45
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/accellabel_p.h44
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/action_p.h49
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/actiongroup_p.h44
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/adjustment_p.h46
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/alignment_p.h44
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/arrow_p.h44
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/aspectframe_p.h44
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/bin_p.h44
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/box_p.h118
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/button_p.h50
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/buttonbox_p.h118
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/calendar_p.h51
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/celleditable_p.h44
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/celllayout_p.h47
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/cellrenderer_p.h50
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/cellrenderercombo_p.h44
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/cellrendererpixbuf_p.h44
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/cellrendererprogress_p.h44
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/cellrenderertext_p.h45
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/cellrenderertoggle_p.h45
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/cellview_p.h44
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/checkbutton_p.h45
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/checkmenuitem_p.h46
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/clipboard_p.h44
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/colorbutton_p.h45
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/colorselection_p.h83
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/combo_p.h124
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/combobox_p.h45
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/comboboxentry_p.h44
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/container_p.h55
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/curve_p.h83
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/dialog_p.h45
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/drawingarea_p.h44
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/editable_p.h51
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/entry_p.h47
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/entrycompletion_p.h46
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/enums_p.h6
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/eventbox_p.h44
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/expander_p.h44
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/filechooser_p.h41
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/filechooserbutton_p.h44
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/filechooserdialog_p.h44
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/filechooserwidget_p.h44
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/filefilter_p.h44
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/fileselection_p.h44
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/fixed_p.h44
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/fontbutton_p.h45
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/fontselection_p.h82
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/frame_p.h45
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/handlebox_p.h46
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/iconfactory_p.h44
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/iconinfo_p.h6
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/iconset_p.h6
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/iconsource_p.h6
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/icontheme_p.h45
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/iconview_p.h47
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/image_p.h44
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/imagemenuitem_p.h44
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/inputdialog_p.h46
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/invisible_p.h44
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/item_p.h47
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/label_p.h46
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/layout_p.h45
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/liststore_p.h44
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/main_p.h6
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/menu_p.h44
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/menubar_p.h44
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/menuitem_p.h48
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/menushell_p.h50
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/menutoolbutton_p.h45
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/messagedialog_p.h44
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/misc_p.h44
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/notebook_p.h45
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/object_p.h44
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/optionmenu_p.h45
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/paned_p.h118
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/plug_p.h45
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/progressbar_p.h45
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/radioaction_p.h45
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/radiobutton_p.h45
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/radiomenuitem_p.h45
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/radiotoolbutton_p.h44
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/range_p.h48
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/rc_p.h44
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/ruler_p.h120
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/scale_p.h120
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/scrollbar_p.h118
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/scrolledwindow_p.h44
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/selectiondata_p.h6
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/separator_p.h118
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/separatormenuitem_p.h44
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/separatortoolitem_p.h44
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/settings_p.h44
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/sizegroup_p.h44
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/socket_p.h46
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/spinbutton_p.h47
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/statusbar_p.h46
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/stockitem_p.h6
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/style_p.h75
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/table_p.h44
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/targetlist_p.h6
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/tearoffmenuitem_p.h44
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/textattributes_p.h6
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/textbuffer_p.h56
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/textchildanchor_p.h44
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/textiter_p.h6
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/textmark_p.h44
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/texttag_p.h46
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/texttagtable_p.h47
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/textview_p.h48
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/toggleaction_p.h45
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/togglebutton_p.h45
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/toggletoolbutton_p.h45
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/toolbar_p.h47
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/toolbutton_p.h45
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/toolitem_p.h46
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/tooltips_p.h44
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/treedragdest_p.h43
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/treedragsource_p.h44
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/treeiter_p.h6
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/treemodel_p.h60
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/treemodelfilter_p.h44
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/treemodelsort_p.h44
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/treepath_p.h6
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/treerowreference_p.h6
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/treeselection_p.h45
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/treesortable_p.h48
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/treestore_p.h44
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/treeview_p.h52
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/treeviewcolumn_p.h45
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/uimanager_p.h46
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/viewport_p.h45
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/widget_p.h107
-rw-r--r--libs/gtkmm2/gtk/gtkmm/private/window_p.h84
-rw-r--r--libs/gtkmm2/gtk/gtkmm/progressbar.cc249
-rw-r--r--libs/gtkmm2/gtk/gtkmm/progressbar.h361
-rw-r--r--libs/gtkmm2/gtk/gtkmm/radioaction.cc274
-rw-r--r--libs/gtkmm2/gtk/gtkmm/radioaction.h169
-rw-r--r--libs/gtkmm2/gtk/gtkmm/radiobutton.cc236
-rw-r--r--libs/gtkmm2/gtk/gtkmm/radiobutton.h151
-rw-r--r--libs/gtkmm2/gtk/gtkmm/radiobuttongroup.cc86
-rw-r--r--libs/gtkmm2/gtk/gtkmm/radiobuttongroup.h80
-rw-r--r--libs/gtkmm2/gtk/gtkmm/radiomenuitem.cc228
-rw-r--r--libs/gtkmm2/gtk/gtkmm/radiomenuitem.h145
-rw-r--r--libs/gtkmm2/gtk/gtkmm/radiotoolbutton.cc183
-rw-r--r--libs/gtkmm2/gtk/gtkmm/radiotoolbutton.h195
-rw-r--r--libs/gtkmm2/gtk/gtkmm/range.cc554
-rw-r--r--libs/gtkmm2/gtk/gtkmm/range.h282
-rw-r--r--libs/gtkmm2/gtk/gtkmm/rc.cc357
-rw-r--r--libs/gtkmm2/gtk/gtkmm/rc.h352
-rw-r--r--libs/gtkmm2/gtk/gtkmm/ruler.cc506
-rw-r--r--libs/gtkmm2/gtk/gtkmm/ruler.h403
-rw-r--r--libs/gtkmm2/gtk/gtkmm/scale.cc640
-rw-r--r--libs/gtkmm2/gtk/gtkmm/scale.h460
-rw-r--r--libs/gtkmm2/gtk/gtkmm/scrollbar.cc341
-rw-r--r--libs/gtkmm2/gtk/gtkmm/scrollbar.h307
-rw-r--r--libs/gtkmm2/gtk/gtkmm/scrolledwindow.cc323
-rw-r--r--libs/gtkmm2/gtk/gtkmm/scrolledwindow.h298
-rw-r--r--libs/gtkmm2/gtk/gtkmm/selectiondata.cc261
-rw-r--r--libs/gtkmm2/gtk/gtkmm/selectiondata.h253
-rw-r--r--libs/gtkmm2/gtk/gtkmm/selectiondata_private.cc40
-rw-r--r--libs/gtkmm2/gtk/gtkmm/selectiondata_private.h49
-rw-r--r--libs/gtkmm2/gtk/gtkmm/separator.cc317
-rw-r--r--libs/gtkmm2/gtk/gtkmm/separator.h286
-rw-r--r--libs/gtkmm2/gtk/gtkmm/separatormenuitem.cc129
-rw-r--r--libs/gtkmm2/gtk/gtkmm/separatormenuitem.h121
-rw-r--r--libs/gtkmm2/gtk/gtkmm/separatortoolitem.cc134
-rw-r--r--libs/gtkmm2/gtk/gtkmm/separatortoolitem.h125
-rw-r--r--libs/gtkmm2/gtk/gtkmm/settings.cc380
-rw-r--r--libs/gtkmm2/gtk/gtkmm/settings.h515
-rw-r--r--libs/gtkmm2/gtk/gtkmm/sizegroup.cc179
-rw-r--r--libs/gtkmm2/gtk/gtkmm/sizegroup.h207
-rw-r--r--libs/gtkmm2/gtk/gtkmm/socket.cc308
-rw-r--r--libs/gtkmm2/gtk/gtkmm/socket.h200
-rw-r--r--libs/gtkmm2/gtk/gtkmm/spinbutton.cc638
-rw-r--r--libs/gtkmm2/gtk/gtkmm/spinbutton.h503
-rw-r--r--libs/gtkmm2/gtk/gtkmm/statusbar.cc338
-rw-r--r--libs/gtkmm2/gtk/gtkmm/statusbar.h163
-rw-r--r--libs/gtkmm2/gtk/gtkmm/stock.cc160
-rw-r--r--libs/gtkmm2/gtk/gtkmm/stock.h166
-rw-r--r--libs/gtkmm2/gtk/gtkmm/stockid.cc80
-rw-r--r--libs/gtkmm2/gtk/gtkmm/stockid.h97
-rw-r--r--libs/gtkmm2/gtk/gtkmm/stockitem.cc166
-rw-r--r--libs/gtkmm2/gtk/gtkmm/stockitem.h103
-rw-r--r--libs/gtkmm2/gtk/gtkmm/style.cc2208
-rw-r--r--libs/gtkmm2/gtk/gtkmm/style.h786
-rw-r--r--libs/gtkmm2/gtk/gtkmm/table.cc406
-rw-r--r--libs/gtkmm2/gtk/gtkmm/table.h379
-rw-r--r--libs/gtkmm2/gtk/gtkmm/targetentry.cc113
-rw-r--r--libs/gtkmm2/gtk/gtkmm/targetentry.h97
-rw-r--r--libs/gtkmm2/gtk/gtkmm/targetlist.cc129
-rw-r--r--libs/gtkmm2/gtk/gtkmm/targetlist.h97
-rw-r--r--libs/gtkmm2/gtk/gtkmm/tearoffmenuitem.cc138
-rw-r--r--libs/gtkmm2/gtk/gtkmm/tearoffmenuitem.h124
-rw-r--r--libs/gtkmm2/gtk/gtkmm/textattributes.cc103
-rw-r--r--libs/gtkmm2/gtk/gtkmm/textattributes.h114
-rw-r--r--libs/gtkmm2/gtk/gtkmm/textbuffer.cc1664
-rw-r--r--libs/gtkmm2/gtk/gtkmm/textbuffer.h844
-rw-r--r--libs/gtkmm2/gtk/gtkmm/textchildanchor.cc151
-rw-r--r--libs/gtkmm2/gtk/gtkmm/textchildanchor.h159
-rw-r--r--libs/gtkmm2/gtk/gtkmm/textiter.cc617
-rw-r--r--libs/gtkmm2/gtk/gtkmm/textiter.h1210
-rw-r--r--libs/gtkmm2/gtk/gtkmm/textmark.cc187
-rw-r--r--libs/gtkmm2/gtk/gtkmm/textmark.h197
-rw-r--r--libs/gtkmm2/gtk/gtkmm/texttag.cc889
-rw-r--r--libs/gtkmm2/gtk/gtkmm/texttag.h1158
-rw-r--r--libs/gtkmm2/gtk/gtkmm/texttagtable.cc466
-rw-r--r--libs/gtkmm2/gtk/gtkmm/texttagtable.h186
-rw-r--r--libs/gtkmm2/gtk/gtkmm/textview.cc920
-rw-r--r--libs/gtkmm2/gtk/gtkmm/textview.h960
-rw-r--r--libs/gtkmm2/gtk/gtkmm/toggleaction.cc257
-rw-r--r--libs/gtkmm2/gtk/gtkmm/toggleaction.h184
-rw-r--r--libs/gtkmm2/gtk/gtkmm/togglebutton.cc267
-rw-r--r--libs/gtkmm2/gtk/gtkmm/togglebutton.h235
-rw-r--r--libs/gtkmm2/gtk/gtkmm/toggletoolbutton.cc226
-rw-r--r--libs/gtkmm2/gtk/gtkmm/toggletoolbutton.h170
-rw-r--r--libs/gtkmm2/gtk/gtkmm/toolbar.cc609
-rw-r--r--libs/gtkmm2/gtk/gtkmm/toolbar.h370
-rw-r--r--libs/gtkmm2/gtk/gtkmm/toolbutton.cc327
-rw-r--r--libs/gtkmm2/gtk/gtkmm/toolbutton.h346
-rw-r--r--libs/gtkmm2/gtk/gtkmm/toolitem.cc517
-rw-r--r--libs/gtkmm2/gtk/gtkmm/toolitem.h442
-rw-r--r--libs/gtkmm2/gtk/gtkmm/tooltips.cc171
-rw-r--r--libs/gtkmm2/gtk/gtkmm/tooltips.h145
-rw-r--r--libs/gtkmm2/gtk/gtkmm/treedragdest.cc244
-rw-r--r--libs/gtkmm2/gtk/gtkmm/treedragdest.h161
-rw-r--r--libs/gtkmm2/gtk/gtkmm/treedragsource.cc309
-rw-r--r--libs/gtkmm2/gtk/gtkmm/treedragsource.h171
-rw-r--r--libs/gtkmm2/gtk/gtkmm/treeiter.cc395
-rw-r--r--libs/gtkmm2/gtk/gtkmm/treeiter.h517
-rw-r--r--libs/gtkmm2/gtk/gtkmm/treemodel.cc1612
-rw-r--r--libs/gtkmm2/gtk/gtkmm/treemodel.h597
-rw-r--r--libs/gtkmm2/gtk/gtkmm/treemodelcolumn.cc68
-rw-r--r--libs/gtkmm2/gtk/gtkmm/treemodelcolumn.h145
-rw-r--r--libs/gtkmm2/gtk/gtkmm/treemodelfilter.cc374
-rw-r--r--libs/gtkmm2/gtk/gtkmm/treemodelfilter.h303
-rw-r--r--libs/gtkmm2/gtk/gtkmm/treemodelsort.cc230
-rw-r--r--libs/gtkmm2/gtk/gtkmm/treemodelsort.h208
-rw-r--r--libs/gtkmm2/gtk/gtkmm/treepath.cc319
-rw-r--r--libs/gtkmm2/gtk/gtkmm/treepath.h402
-rw-r--r--libs/gtkmm2/gtk/gtkmm/treerowreference.cc128
-rw-r--r--libs/gtkmm2/gtk/gtkmm/treerowreference.h138
-rw-r--r--libs/gtkmm2/gtk/gtkmm/treeselection.cc454
-rw-r--r--libs/gtkmm2/gtk/gtkmm/treeselection.h370
-rw-r--r--libs/gtkmm2/gtk/gtkmm/treesortable.cc606
-rw-r--r--libs/gtkmm2/gtk/gtkmm/treesortable.h238
-rw-r--r--libs/gtkmm2/gtk/gtkmm/treestore.cc283
-rw-r--r--libs/gtkmm2/gtk/gtkmm/treestore.h276
-rw-r--r--libs/gtkmm2/gtk/gtkmm/treeview.cc1727
-rw-r--r--libs/gtkmm2/gtk/gtkmm/treeview.h1774
-rw-r--r--libs/gtkmm2/gtk/gtkmm/treeview_private.cc94
-rw-r--r--libs/gtkmm2/gtk/gtkmm/treeview_private.h77
-rw-r--r--libs/gtkmm2/gtk/gtkmm/treeviewcolumn.cc663
-rw-r--r--libs/gtkmm2/gtk/gtkmm/treeviewcolumn.h868
-rw-r--r--libs/gtkmm2/gtk/gtkmm/uimanager.cc581
-rw-r--r--libs/gtkmm2/gtk/gtkmm/uimanager.h505
-rw-r--r--libs/gtkmm2/gtk/gtkmm/viewport.cc297
-rw-r--r--libs/gtkmm2/gtk/gtkmm/viewport.h231
-rw-r--r--libs/gtkmm2/gtk/gtkmm/widget.cc7088
-rw-r--r--libs/gtkmm2/gtk/gtkmm/widget.h2666
-rw-r--r--libs/gtkmm2/gtk/gtkmm/window.cc1242
-rw-r--r--libs/gtkmm2/gtk/gtkmm/window.h1637
-rw-r--r--libs/gtkmm2/gtk/gtkmm/wrap_init.cc740
-rw-r--r--libs/gtkmm2/gtk/gtkmm/wrap_init.h32
-rw-r--r--libs/gtkmm2/gtk/gtkmmconfig.h42
-rw-r--r--libs/gtkmm2/pango/SConscript11
-rw-r--r--libs/gtkmm2/pango/pangomm.h41
-rw-r--r--libs/gtkmm2/pango/pangomm/attributes.cc534
-rw-r--r--libs/gtkmm2/pango/pangomm/attributes.h669
-rw-r--r--libs/gtkmm2/pango/pangomm/attriter.cc180
-rw-r--r--libs/gtkmm2/pango/pangomm/attriter.h147
-rw-r--r--libs/gtkmm2/pango/pangomm/attrlist.cc161
-rw-r--r--libs/gtkmm2/pango/pangomm/attrlist.h182
-rw-r--r--libs/gtkmm2/pango/pangomm/color.cc124
-rw-r--r--libs/gtkmm2/pango/pangomm/color.h138
-rw-r--r--libs/gtkmm2/pango/pangomm/context.cc239
-rw-r--r--libs/gtkmm2/pango/pangomm/context.h349
-rw-r--r--libs/gtkmm2/pango/pangomm/coverage.cc151
-rw-r--r--libs/gtkmm2/pango/pangomm/coverage.h169
-rw-r--r--libs/gtkmm2/pango/pangomm/font.cc169
-rw-r--r--libs/gtkmm2/pango/pangomm/font.h194
-rw-r--r--libs/gtkmm2/pango/pangomm/fontdescription.cc252
-rw-r--r--libs/gtkmm2/pango/pangomm/fontdescription.h529
-rw-r--r--libs/gtkmm2/pango/pangomm/fontface.cc148
-rw-r--r--libs/gtkmm2/pango/pangomm/fontface.h151
-rw-r--r--libs/gtkmm2/pango/pangomm/fontfamily.cc149
-rw-r--r--libs/gtkmm2/pango/pangomm/fontfamily.h171
-rw-r--r--libs/gtkmm2/pango/pangomm/fontmap.cc153
-rw-r--r--libs/gtkmm2/pango/pangomm/fontmap.h153
-rw-r--r--libs/gtkmm2/pango/pangomm/fontmetrics.cc143
-rw-r--r--libs/gtkmm2/pango/pangomm/fontmetrics.h187
-rw-r--r--libs/gtkmm2/pango/pangomm/fontset.cc166
-rw-r--r--libs/gtkmm2/pango/pangomm/fontset.h154
-rw-r--r--libs/gtkmm2/pango/pangomm/glyph.cc145
-rw-r--r--libs/gtkmm2/pango/pangomm/glyph.h222
-rw-r--r--libs/gtkmm2/pango/pangomm/glyphstring.cc186
-rw-r--r--libs/gtkmm2/pango/pangomm/glyphstring.h223
-rw-r--r--libs/gtkmm2/pango/pangomm/init.cc34
-rw-r--r--libs/gtkmm2/pango/pangomm/init.h40
-rw-r--r--libs/gtkmm2/pango/pangomm/item.cc201
-rw-r--r--libs/gtkmm2/pango/pangomm/item.h225
-rw-r--r--libs/gtkmm2/pango/pangomm/language.cc158
-rw-r--r--libs/gtkmm2/pango/pangomm/language.h245
-rw-r--r--libs/gtkmm2/pango/pangomm/layout.cc451
-rw-r--r--libs/gtkmm2/pango/pangomm/layout.h687
-rw-r--r--libs/gtkmm2/pango/pangomm/layoutiter.cc206
-rw-r--r--libs/gtkmm2/pango/pangomm/layoutiter.h235
-rw-r--r--libs/gtkmm2/pango/pangomm/layoutline.cc197
-rw-r--r--libs/gtkmm2/pango/pangomm/layoutline.h222
-rw-r--r--libs/gtkmm2/pango/pangomm/layoutrun.cc79
-rw-r--r--libs/gtkmm2/pango/pangomm/layoutrun.h92
-rw-r--r--libs/gtkmm2/pango/pangomm/private/attributes_p.h6
-rw-r--r--libs/gtkmm2/pango/pangomm/private/attriter_p.h6
-rw-r--r--libs/gtkmm2/pango/pangomm/private/attrlist_p.h6
-rw-r--r--libs/gtkmm2/pango/pangomm/private/color_p.h6
-rw-r--r--libs/gtkmm2/pango/pangomm/private/context_p.h44
-rw-r--r--libs/gtkmm2/pango/pangomm/private/coverage_p.h6
-rw-r--r--libs/gtkmm2/pango/pangomm/private/font_p.h44
-rw-r--r--libs/gtkmm2/pango/pangomm/private/fontdescription_p.h6
-rw-r--r--libs/gtkmm2/pango/pangomm/private/fontface_p.h44
-rw-r--r--libs/gtkmm2/pango/pangomm/private/fontfamily_p.h44
-rw-r--r--libs/gtkmm2/pango/pangomm/private/fontmap_p.h44
-rw-r--r--libs/gtkmm2/pango/pangomm/private/fontmetrics_p.h6
-rw-r--r--libs/gtkmm2/pango/pangomm/private/fontset_p.h44
-rw-r--r--libs/gtkmm2/pango/pangomm/private/glyph_p.h6
-rw-r--r--libs/gtkmm2/pango/pangomm/private/glyphstring_p.h6
-rw-r--r--libs/gtkmm2/pango/pangomm/private/item_p.h6
-rw-r--r--libs/gtkmm2/pango/pangomm/private/language_p.h6
-rw-r--r--libs/gtkmm2/pango/pangomm/private/layout_p.h44
-rw-r--r--libs/gtkmm2/pango/pangomm/private/layoutiter_p.h6
-rw-r--r--libs/gtkmm2/pango/pangomm/private/layoutline_p.h6
-rw-r--r--libs/gtkmm2/pango/pangomm/private/layoutrun_p.h6
-rw-r--r--libs/gtkmm2/pango/pangomm/private/rectangle_p.h6
-rw-r--r--libs/gtkmm2/pango/pangomm/private/renderer_p.h44
-rw-r--r--libs/gtkmm2/pango/pangomm/private/tabarray_p.h6
-rw-r--r--libs/gtkmm2/pango/pangomm/rectangle.cc84
-rw-r--r--libs/gtkmm2/pango/pangomm/rectangle.h163
-rw-r--r--libs/gtkmm2/pango/pangomm/renderer.cc203
-rw-r--r--libs/gtkmm2/pango/pangomm/renderer.h322
-rw-r--r--libs/gtkmm2/pango/pangomm/tabarray.cc181
-rw-r--r--libs/gtkmm2/pango/pangomm/tabarray.h195
-rw-r--r--libs/gtkmm2/pango/pangomm/types.h34
-rw-r--r--libs/gtkmm2/pango/pangomm/wrap_init.cc100
-rw-r--r--libs/gtkmm2/pango/pangomm/wrap_init.h32
-rw-r--r--libs/gtkmm2ext/.cvsignore5
-rw-r--r--libs/gtkmm2ext/AUTHORS2
-rw-r--r--libs/gtkmm2ext/COPYING340
-rw-r--r--libs/gtkmm2ext/ChangeLog0
-rw-r--r--libs/gtkmm2ext/NEWS0
-rw-r--r--libs/gtkmm2ext/README0
-rw-r--r--libs/gtkmm2ext/SConscript74
-rw-r--r--libs/gtkmm2ext/auto_spin.cc262
-rw-r--r--libs/gtkmm2ext/barcontroller.cc497
-rw-r--r--libs/gtkmm2ext/bindable_button.cc155
-rw-r--r--libs/gtkmm2ext/choice.cc97
-rw-r--r--libs/gtkmm2ext/click_box.cc125
-rw-r--r--libs/gtkmm2ext/controller.cc92
-rw-r--r--libs/gtkmm2ext/fastmeter.cc291
-rw-r--r--libs/gtkmm2ext/gettext.h82
-rw-r--r--libs/gtkmm2ext/gtk_ui.cc823
-rw-r--r--libs/gtkmm2ext/gtkmm2ext-config.in232
-rw-r--r--libs/gtkmm2ext/gtkmm2ext/.cvsignore1
-rw-r--r--libs/gtkmm2ext/gtkmm2ext/auto_spin.h71
-rw-r--r--libs/gtkmm2ext/gtkmm2ext/barcontroller.h113
-rw-r--r--libs/gtkmm2ext/gtkmm2ext/bindable_button.h77
-rw-r--r--libs/gtkmm2ext/gtkmm2ext/choice.h44
-rw-r--r--libs/gtkmm2ext/gtkmm2ext/click_box.h61
-rw-r--r--libs/gtkmm2ext/gtkmm2ext/controller.h59
-rw-r--r--libs/gtkmm2ext/gtkmm2ext/doi.h37
-rw-r--r--libs/gtkmm2ext/gtkmm2ext/fastmeter.h85
-rw-r--r--libs/gtkmm2ext/gtkmm2ext/gtk_ui.h219
-rw-r--r--libs/gtkmm2ext/gtkmm2ext/gtkutils.h30
-rw-r--r--libs/gtkmm2ext/gtkmm2ext/hexentry.h59
-rw-r--r--libs/gtkmm2ext/gtkmm2ext/idle_adjustment.h26
-rw-r--r--libs/gtkmm2ext/gtkmm2ext/pix.h87
-rw-r--r--libs/gtkmm2ext/gtkmm2ext/pixscroller.h47
-rw-r--r--libs/gtkmm2ext/gtkmm2ext/popup.h57
-rw-r--r--libs/gtkmm2ext/gtkmm2ext/prompter.h86
-rw-r--r--libs/gtkmm2ext/gtkmm2ext/selector.h103
-rw-r--r--libs/gtkmm2ext/gtkmm2ext/slider_controller.h98
-rw-r--r--libs/gtkmm2ext/gtkmm2ext/stop_signal.h14
-rw-r--r--libs/gtkmm2ext/gtkmm2ext/tearoff.h63
-rw-r--r--libs/gtkmm2ext/gtkmm2ext/textviewer.h58
-rw-r--r--libs/gtkmm2ext/gtkmm2ext/utils.h41
-rw-r--r--libs/gtkmm2ext/gtkutils.cc41
-rw-r--r--libs/gtkmm2ext/hexentry.cc111
-rw-r--r--libs/gtkmm2ext/i18n.h11
-rw-r--r--libs/gtkmm2ext/idle_adjustment.cc54
-rw-r--r--libs/gtkmm2ext/libgtkmm2ext.pc.in11
-rw-r--r--libs/gtkmm2ext/libgtkmm2ext.spec.in68
-rw-r--r--libs/gtkmm2ext/pix.cc231
-rw-r--r--libs/gtkmm2ext/pixscroller.cc248
-rw-r--r--libs/gtkmm2ext/po/el_GR.po79
-rw-r--r--libs/gtkmm2ext/po/es_ES.po78
-rw-r--r--libs/gtkmm2ext/po/pt_BR.po79
-rw-r--r--libs/gtkmm2ext/po/ru_RU.po78
-rw-r--r--libs/gtkmm2ext/popup.cc134
-rw-r--r--libs/gtkmm2ext/prompter.cc118
-rw-r--r--libs/gtkmm2ext/selector.cc238
-rw-r--r--libs/gtkmm2ext/slider_controller.cc183
-rw-r--r--libs/gtkmm2ext/tearoff.cc164
-rw-r--r--libs/gtkmm2ext/textviewer.cc127
-rw-r--r--libs/gtkmm2ext/utils.cc47
-rw-r--r--libs/libgnomecanvasmm/.DS_Storebin0 -> 6148 bytes
-rw-r--r--libs/libgnomecanvasmm/AUTHORS40
-rw-r--r--libs/libgnomecanvasmm/COPYING515
-rw-r--r--libs/libgnomecanvasmm/ChangeLog556
-rw-r--r--libs/libgnomecanvasmm/NEWS54
-rw-r--r--libs/libgnomecanvasmm/README1
-rw-r--r--libs/libgnomecanvasmm/SConscript10
-rw-r--r--libs/libgnomecanvasmm/TODO8
-rw-r--r--libs/libgnomecanvasmm/libgnomecanvasmm.h45
-rw-r--r--libs/libgnomecanvasmm/libgnomecanvasmm/.DS_Storebin0 -> 15364 bytes
-rw-r--r--libs/libgnomecanvasmm/libgnomecanvasmm/affinetrans.cc234
-rw-r--r--libs/libgnomecanvasmm/libgnomecanvasmm/affinetrans.h119
-rw-r--r--libs/libgnomecanvasmm/libgnomecanvasmm/bpath.cc156
-rw-r--r--libs/libgnomecanvasmm/libgnomecanvasmm/bpath.h148
-rw-r--r--libs/libgnomecanvasmm/libgnomecanvasmm/canvas.cc533
-rw-r--r--libs/libgnomecanvasmm/libgnomecanvasmm/canvas.h443
-rw-r--r--libs/libgnomecanvasmm/libgnomecanvasmm/ellipse.cc147
-rw-r--r--libs/libgnomecanvasmm/libgnomecanvasmm/ellipse.h130
-rw-r--r--libs/libgnomecanvasmm/libgnomecanvasmm/group.cc170
-rw-r--r--libs/libgnomecanvasmm/libgnomecanvasmm/group.h164
-rw-r--r--libs/libgnomecanvasmm/libgnomecanvasmm/init.cc37
-rw-r--r--libs/libgnomecanvasmm/libgnomecanvasmm/init.h37
-rw-r--r--libs/libgnomecanvasmm/libgnomecanvasmm/item.cc908
-rw-r--r--libs/libgnomecanvasmm/libgnomecanvasmm/item.h370
-rw-r--r--libs/libgnomecanvasmm/libgnomecanvasmm/line.cc388
-rw-r--r--libs/libgnomecanvasmm/libgnomecanvasmm/line.h461
-rw-r--r--libs/libgnomecanvasmm/libgnomecanvasmm/path-def.cc249
-rw-r--r--libs/libgnomecanvasmm/libgnomecanvasmm/path-def.h284
-rw-r--r--libs/libgnomecanvasmm/libgnomecanvasmm/pixbuf.cc277
-rw-r--r--libs/libgnomecanvasmm/libgnomecanvasmm/pixbuf.h321
-rw-r--r--libs/libgnomecanvasmm/libgnomecanvasmm/point.cc117
-rw-r--r--libs/libgnomecanvasmm/libgnomecanvasmm/point.h74
-rw-r--r--libs/libgnomecanvasmm/libgnomecanvasmm/polygon.cc156
-rw-r--r--libs/libgnomecanvasmm/libgnomecanvasmm/polygon.h144
-rw-r--r--libs/libgnomecanvasmm/libgnomecanvasmm/private/bpath_p.h49
-rw-r--r--libs/libgnomecanvasmm/libgnomecanvasmm/private/canvas_p.h52
-rw-r--r--libs/libgnomecanvasmm/libgnomecanvasmm/private/ellipse_p.h49
-rw-r--r--libs/libgnomecanvasmm/libgnomecanvasmm/private/group_p.h49
-rw-r--r--libs/libgnomecanvasmm/libgnomecanvasmm/private/item_p.h60
-rw-r--r--libs/libgnomecanvasmm/libgnomecanvasmm/private/line_p.h49
-rw-r--r--libs/libgnomecanvasmm/libgnomecanvasmm/private/path-def_p.h6
-rw-r--r--libs/libgnomecanvasmm/libgnomecanvasmm/private/pixbuf_p.h49
-rw-r--r--libs/libgnomecanvasmm/libgnomecanvasmm/private/polygon_p.h49
-rw-r--r--libs/libgnomecanvasmm/libgnomecanvasmm/private/rect-ellipse_p.h49
-rw-r--r--libs/libgnomecanvasmm/libgnomecanvasmm/private/rect_p.h49
-rw-r--r--libs/libgnomecanvasmm/libgnomecanvasmm/private/rich-text_p.h50
-rw-r--r--libs/libgnomecanvasmm/libgnomecanvasmm/private/shape_p.h49
-rw-r--r--libs/libgnomecanvasmm/libgnomecanvasmm/private/text_p.h49
-rw-r--r--libs/libgnomecanvasmm/libgnomecanvasmm/private/widget_p.h49
-rw-r--r--libs/libgnomecanvasmm/libgnomecanvasmm/properties.cc238
-rw-r--r--libs/libgnomecanvasmm/libgnomecanvasmm/properties.h248
-rw-r--r--libs/libgnomecanvasmm/libgnomecanvasmm/rect-ellipse.cc180
-rw-r--r--libs/libgnomecanvasmm/libgnomecanvasmm/rect-ellipse.h196
-rw-r--r--libs/libgnomecanvasmm/libgnomecanvasmm/rect.cc146
-rw-r--r--libs/libgnomecanvasmm/libgnomecanvasmm/rect.h132
-rw-r--r--libs/libgnomecanvasmm/libgnomecanvasmm/rich-text.cc475
-rw-r--r--libs/libgnomecanvasmm/libgnomecanvasmm/rich-text.h472
-rw-r--r--libs/libgnomecanvasmm/libgnomecanvasmm/shape.cc272
-rw-r--r--libs/libgnomecanvasmm/libgnomecanvasmm/shape.h368
-rw-r--r--libs/libgnomecanvasmm/libgnomecanvasmm/text.cc557
-rw-r--r--libs/libgnomecanvasmm/libgnomecanvasmm/text.h788
-rw-r--r--libs/libgnomecanvasmm/libgnomecanvasmm/widget.cc220
-rw-r--r--libs/libgnomecanvasmm/libgnomecanvasmm/widget.h244
-rw-r--r--libs/libgnomecanvasmm/libgnomecanvasmm/wrap_init.cc116
-rw-r--r--libs/libgnomecanvasmm/libgnomecanvasmm/wrap_init.h36
-rw-r--r--libs/libgnomecanvasmm/libgnomecanvasmmconfig.h11
-rw-r--r--libs/midi++2/.cvsignore3
-rw-r--r--libs/midi++2/AUTHORS0
-rw-r--r--libs/midi++2/COPYING340
-rw-r--r--libs/midi++2/ChangeLog9
-rw-r--r--libs/midi++2/NEWS0
-rw-r--r--libs/midi++2/README0
-rw-r--r--libs/midi++2/SConscript48
-rw-r--r--libs/midi++2/alsa_sequencer_midiport.cc156
-rw-r--r--libs/midi++2/coremidi_midiport.cc144
-rw-r--r--libs/midi++2/fd_midiport.cc181
-rw-r--r--libs/midi++2/fifomidi.cc44
-rw-r--r--libs/midi++2/libmidi++.pc.in11
-rw-r--r--libs/midi++2/libmidi++.spec.in71
-rw-r--r--libs/midi++2/midi++/.DS_Storebin0 -> 6148 bytes
-rw-r--r--libs/midi++2/midi++/.cvsignore1
-rw-r--r--libs/midi++2/midi++/alsa_rawmidi.h43
-rw-r--r--libs/midi++2/midi++/alsa_sequencer.h63
-rw-r--r--libs/midi++2/midi++/channel.h161
-rw-r--r--libs/midi++2/midi++/controllable.h92
-rw-r--r--libs/midi++2/midi++/coremidi_midiport.h67
-rw-r--r--libs/midi++2/midi++/factory.h40
-rw-r--r--libs/midi++2/midi++/fd_midiport.h94
-rw-r--r--libs/midi++2/midi++/fifomidi.h47
-rw-r--r--libs/midi++2/midi++/manager.h88
-rw-r--r--libs/midi++2/midi++/mmc.h261
-rw-r--r--libs/midi++2/midi++/nullmidi.h62
-rw-r--r--libs/midi++2/midi++/parser.h189
-rw-r--r--libs/midi++2/midi++/port.h147
-rw-r--r--libs/midi++2/midi++/port_request.h60
-rw-r--r--libs/midi++2/midi++/types.h69
-rw-r--r--libs/midi++2/midi.cc170
-rw-r--r--libs/midi++2/midichannel.cc304
-rw-r--r--libs/midi++2/midicontrollable.cc325
-rw-r--r--libs/midi++2/midifactory.cc95
-rw-r--r--libs/midi++2/midimanager.cc374
-rw-r--r--libs/midi++2/midiparser.cc800
-rw-r--r--libs/midi++2/midiport.cc131
-rw-r--r--libs/midi++2/miditrace.cc64
-rw-r--r--libs/midi++2/mmc.cc577
-rw-r--r--libs/midi++2/mmctest.cc112
-rw-r--r--libs/midi++2/mtc.cc329
-rw-r--r--libs/midi++2/port_request.cc80
-rw-r--r--libs/pbd3/.cvsignore3
-rw-r--r--libs/pbd3/AUTHORS0
-rw-r--r--libs/pbd3/COPYING340
-rw-r--r--libs/pbd3/ChangeLog6
-rw-r--r--libs/pbd3/NEWS0
-rw-r--r--libs/pbd3/README0
-rw-r--r--libs/pbd3/SConscript44
-rw-r--r--libs/pbd3/basename.cc47
-rw-r--r--libs/pbd3/dirname.cc51
-rw-r--r--libs/pbd3/dmalloc.cc102
-rw-r--r--libs/pbd3/ftw.cc220
-rw-r--r--libs/pbd3/libpbd.pc.in11
-rw-r--r--libs/pbd3/libpbd.spec.in70
-rw-r--r--libs/pbd3/mountpoint.cc113
-rw-r--r--libs/pbd3/pathscanner.cc201
-rw-r--r--libs/pbd3/pbd-config.in232
-rw-r--r--libs/pbd3/pbd/.DS_Storebin0 -> 6148 bytes
-rw-r--r--libs/pbd3/pbd/.cvsignore1
-rw-r--r--libs/pbd3/pbd/abstract_ui.h67
-rw-r--r--libs/pbd3/pbd/atomic.h1232
-rw-r--r--libs/pbd3/pbd/basename.h15
-rw-r--r--libs/pbd3/pbd/compose.h393
-rw-r--r--libs/pbd3/pbd/datum.h57
-rw-r--r--libs/pbd3/pbd/dirname.h11
-rw-r--r--libs/pbd3/pbd/ellipsoid.h74
-rw-r--r--libs/pbd3/pbd/error.h30
-rw-r--r--libs/pbd3/pbd/failed_constructor.h11
-rw-r--r--libs/pbd3/pbd/fastlog.h38
-rw-r--r--libs/pbd3/pbd/foreach.h42
-rw-r--r--libs/pbd3/pbd/forkexec.h9
-rw-r--r--libs/pbd3/pbd/ftw.h106
-rw-r--r--libs/pbd3/pbd/irix_platform.h20
-rw-r--r--libs/pbd3/pbd/linux_platform.h41
-rw-r--r--libs/pbd3/pbd/lock_free_fifo.h86
-rw-r--r--libs/pbd3/pbd/lockmonitor.h194
-rw-r--r--libs/pbd3/pbd/mountpoint.h28
-rw-r--r--libs/pbd3/pbd/pathscanner.h66
-rw-r--r--libs/pbd3/pbd/platform.h45
-rw-r--r--libs/pbd3/pbd/platform_factory.h12
-rw-r--r--libs/pbd3/pbd/pool.h74
-rw-r--r--libs/pbd3/pbd/position.h38
-rw-r--r--libs/pbd3/pbd/precision_timer.h61
-rw-r--r--libs/pbd3/pbd/pthread_spinlock.h29
-rw-r--r--libs/pbd3/pbd/pthread_utils.h21
-rw-r--r--libs/pbd3/pbd/rcpointer.h61
-rw-r--r--libs/pbd3/pbd/receiver.h50
-rw-r--r--libs/pbd3/pbd/relation.h35
-rw-r--r--libs/pbd3/pbd/restartable_rw.h7
-rw-r--r--libs/pbd3/pbd/ringbuffer.h283
-rw-r--r--libs/pbd3/pbd/ringbufferNPT.h272
-rw-r--r--libs/pbd3/pbd/rt.h25
-rw-r--r--libs/pbd3/pbd/rtthread.h30
-rw-r--r--libs/pbd3/pbd/scale.h53
-rw-r--r--libs/pbd3/pbd/selectable.h102
-rw-r--r--libs/pbd3/pbd/solaris_platform.h41
-rw-r--r--libs/pbd3/pbd/stl_delete.h89
-rw-r--r--libs/pbd3/pbd/stl_functors.h93
-rw-r--r--libs/pbd3/pbd/strsplit.h9
-rw-r--r--libs/pbd3/pbd/strsub.h25
-rw-r--r--libs/pbd3/pbd/textreceiver.h44
-rw-r--r--libs/pbd3/pbd/thread.h127
-rw-r--r--libs/pbd3/pbd/thrown_error.h39
-rw-r--r--libs/pbd3/pbd/touchable.h89
-rw-r--r--libs/pbd3/pbd/transmitter.h109
-rw-r--r--libs/pbd3/pbd/types.h32
-rw-r--r--libs/pbd3/pbd/undo.h96
-rw-r--r--libs/pbd3/pbd/unescape.h6
-rw-r--r--libs/pbd3/pbd/xml++.h127
-rw-r--r--libs/pbd3/pool.cc135
-rw-r--r--libs/pbd3/pthread_utils.cc133
-rw-r--r--libs/pbd3/receiver.cc58
-rw-r--r--libs/pbd3/strsplit.cc41
-rw-r--r--libs/pbd3/textreceiver.cc66
-rw-r--r--libs/pbd3/transmitter.cc115
-rw-r--r--libs/pbd3/undo.cc144
-rw-r--r--libs/pbd3/unescape.cc137
-rw-r--r--libs/pbd3/xml++.cc416
-rw-r--r--libs/sigc++2/.cvsignore18
-rw-r--r--libs/sigc++2/AUTHORS8
-rw-r--r--libs/sigc++2/COPYING515
-rw-r--r--libs/sigc++2/ChangeLog1249
-rw-r--r--libs/sigc++2/INSTALL229
-rw-r--r--libs/sigc++2/Makefile.am30
-rw-r--r--libs/sigc++2/NEWS232
-rw-r--r--libs/sigc++2/README72
-rw-r--r--libs/sigc++2/SConscript13
-rw-r--r--libs/sigc++2/TODO66
-rwxr-xr-xlibs/sigc++2/autogen.sh18
-rw-r--r--libs/sigc++2/configure.ac64
-rw-r--r--libs/sigc++2/libsigc++-2.0.spec.in91
-rw-r--r--libs/sigc++2/scripts/cxx.m494
-rw-r--r--libs/sigc++2/scripts/libtool.m45767
-rw-r--r--libs/sigc++2/scripts/ltoptions.m4358
-rw-r--r--libs/sigc++2/scripts/ltsugar.m4115
-rw-r--r--libs/sigc++2/scripts/ltversion.m415
-rw-r--r--libs/sigc++2/sigc++-2.0.pc.in10
-rw-r--r--libs/sigc++2/sigc++/.cvsignore3
-rw-r--r--libs/sigc++2/sigc++/Makefile.am96
-rw-r--r--libs/sigc++2/sigc++/adaptors/adaptor_trait.h362
-rw-r--r--libs/sigc++2/sigc++/adaptors/adaptors.h32
-rw-r--r--libs/sigc++2/sigc++/adaptors/bind.h2262
-rw-r--r--libs/sigc++2/sigc++/adaptors/bind_return.h204
-rw-r--r--libs/sigc++2/sigc++/adaptors/compose.h294
-rw-r--r--libs/sigc++2/sigc++/adaptors/deduce_result_type.h121
-rw-r--r--libs/sigc++2/sigc++/adaptors/exception_catch.h319
-rw-r--r--libs/sigc++2/sigc++/adaptors/hide.h1063
-rw-r--r--libs/sigc++2/sigc++/adaptors/lambda/base.h392
-rw-r--r--libs/sigc++2/sigc++/adaptors/lambda/group.h734
-rw-r--r--libs/sigc++2/sigc++/adaptors/lambda/lambda.cc15
-rw-r--r--libs/sigc++2/sigc++/adaptors/lambda/lambda.h28
-rw-r--r--libs/sigc++2/sigc++/adaptors/lambda/operator.h1697
-rw-r--r--libs/sigc++2/sigc++/adaptors/lambda/select.h346
-rw-r--r--libs/sigc++2/sigc++/adaptors/retype.h1247
-rw-r--r--libs/sigc++2/sigc++/adaptors/retype_return.h308
-rw-r--r--libs/sigc++2/sigc++/bind.h65
-rw-r--r--libs/sigc++2/sigc++/bind_return.h34
-rw-r--r--libs/sigc++2/sigc++/class_slot.h568
-rw-r--r--libs/sigc++2/sigc++/compatibility.h42
-rw-r--r--libs/sigc++2/sigc++/connection.cc111
-rw-r--r--libs/sigc++2/sigc++/connection.h154
-rw-r--r--libs/sigc++2/sigc++/functors/functor_trait.h307
-rw-r--r--libs/sigc++2/sigc++/functors/functors.h27
-rw-r--r--libs/sigc++2/sigc++/functors/mem_fun.h5976
-rw-r--r--libs/sigc++2/sigc++/functors/ptr_fun.h542
-rw-r--r--libs/sigc++2/sigc++/functors/slot.cc25
-rw-r--r--libs/sigc++2/sigc++/functors/slot.h1263
-rw-r--r--libs/sigc++2/sigc++/functors/slot_base.cc165
-rw-r--r--libs/sigc++2/sigc++/functors/slot_base.h319
-rw-r--r--libs/sigc++2/sigc++/hide.h105
-rw-r--r--libs/sigc++2/sigc++/method_slot.h387
-rw-r--r--libs/sigc++2/sigc++/object.h35
-rw-r--r--libs/sigc++2/sigc++/object_slot.h536
-rw-r--r--libs/sigc++2/sigc++/reference_wrapper.h118
-rw-r--r--libs/sigc++2/sigc++/retype.h321
-rw-r--r--libs/sigc++2/sigc++/retype_return.h35
-rw-r--r--libs/sigc++2/sigc++/sigc++.h30
-rw-r--r--libs/sigc++2/sigc++/signal.cc25
-rw-r--r--libs/sigc++2/sigc++/signal.h3188
-rw-r--r--libs/sigc++2/sigc++/signal_base.cc151
-rw-r--r--libs/sigc++2/sigc++/signal_base.h261
-rw-r--r--libs/sigc++2/sigc++/slot.h614
-rw-r--r--libs/sigc++2/sigc++/trackable.cc124
-rw-r--r--libs/sigc++2/sigc++/trackable.h148
-rw-r--r--libs/sigc++2/sigc++/type_traits.h121
-rw-r--r--libs/sigc++2/sigc++/visit_each.h128
-rw-r--r--libs/sigc++2/sigc++config.h.in10
-rw-r--r--templates/.cvsignore2
-rw-r--r--templates/16 Tracks.template260
-rw-r--r--templates/2 Track.template92
-rw-r--r--templates/32 Tracks.template356
-rw-r--r--templates/4 Tracks.template116
-rw-r--r--templates/8 Tracks.template164
-rw-r--r--templates/SConscript9
-rw-r--r--tools/.cvsignore3
-rw-r--r--tools/bug_tool/.cvsignore3
-rw-r--r--tools/bug_tool/ClientCookie/.cvsignore3
-rw-r--r--tools/bug_tool/ClientCookie/_ClientCookie.py1833
-rw-r--r--tools/bug_tool/ClientCookie/_Debug.py9
-rw-r--r--tools/bug_tool/ClientCookie/_HeadersUtil.py224
-rw-r--r--tools/bug_tool/ClientCookie/_MSIECookieJar.py377
-rw-r--r--tools/bug_tool/ClientCookie/_MozillaCookieJar.py171
-rw-r--r--tools/bug_tool/ClientCookie/_Util.py459
-rw-r--r--tools/bug_tool/ClientCookie/__init__.py49
-rw-r--r--tools/bug_tool/ClientCookie/_urllib2_support.py713
-rw-r--r--tools/bug_tool/ClientForm.py2699
-rwxr-xr-xtools/bug_tool/ardour_bugs349
-rwxr-xr-xtools/config.guess1409
-rw-r--r--tools/jacktest.c205
1253 files changed, 292928 insertions, 0 deletions
diff --git a/.cvsignore b/.cvsignore
new file mode 100644
index 0000000000..0cc8a576e3
--- /dev/null
+++ b/.cvsignore
@@ -0,0 +1,5 @@
+.sconf_temp
+.sconsign.dblite
+ardour.rc
+config.log
+scache.conf
diff --git a/COPYING b/COPYING
new file mode 100644
index 0000000000..d60c31a97a
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,340 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 0000000000..8f9fd94808
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,154 @@
+2001-10-27 Paul Davis <pbd>
+
+ * gtk_ardour/editor_ops.cc (ensure_selection): fixed selection
+ start not-assigned error in ensure_selection().
+
+2001-10-26 Paul Davis <pbd>
+
+ * gtk_ardour/editor.cc (Editor): use scroll timeut whenever the
+ editor is active, instead of stopping and starting it.
+
+2001-10-23 Paul Davis <pbd>
+
+ * gtk_ardour/mixer_strip.cc (update_diskstream_display):
+ rationalize rec_enable button handling to be equivalent to same
+ code elswhere.
+
+ * gtk_ardour/trackview.cc (record_enable_blink): add rec enable button
+
+ * gtk_ardour/ardour_ui.cc (start_clocking): use SigC::Signals for
+ Clock and Blink updates
+
+ * gtk_ardour/marker.cc (set_position): fixed persistent error in
+ marker location, caused by not taking the shift into account
+ whenever the position was reset.
+
+ * gtk_ardour/editor.cc (initialize_canvas): make the playhead
+ cursor sit above the edit cursor.
+
+2001-10-20 Paul Davis <pbd>
+
+ * gtk_ardour/editor_ops.cc (ensure_selection): make
+ add_location_from_selection work again (now ensure_selection()
+ works again).
+
+ * ardour_ui.rc: added styles for new rulers.
+
+ * gtk_ardour/regionview.cc (move_to): make gain control points be
+ rects
+
+2001-10-19 Paul Davis <pbd>
+
+ * gtk_ardour/regionview.cc (ControlPoint): change colors of gain curves
+
+ * massively split up editor code to try to produce more
+ rapidly-compilable compilation units.
+
+2001-10-17 Paul Davis <pbd>
+
+ * gtk_ardour/editor_mouse.cc (start_grab): clean up start grab
+ code, and make playhead cursor grab stop the transport, restarting
+ it again when done.
+
+ * gtk_ardour/ardour_ui.cc (add_diskstream): try to make recorder
+ window the correct size.
+
+
+2001-10-13 Paul Davis <pbd>
+
+ * gtk_ardour/diskstream_ui.cc (DiskStream_UI): make sure that all
+ input buttons are the same width, regardless of their label contents.
+
+2001-10-05 Paul Davis <pbd>
+
+ * gtk_ardour/editor_mouse.cc (button_release_handler): button2 on
+ a RegionItem always mutes/unmutes/raises/lowers, regardless of
+ mouse mode.
+
+2001-10-04 Paul Davis <pbd>
+
+ * gtk_ardour/editor_mouse.cc (region_drag_motion_callback): edit
+ clock reflect region sync point rather than cursor during drag.
+ (button_release_handler): button press/release on cursors +
+ markers always initiate a grab, regardless of mouse mode.
+
+ * gtk_ardour/editor.cc (track_canvas_allocate): return the edit
+ cursor to a full height line.
+
+ * gtk_ardour/grouped_buttons.cc (GroupedButtons): backpedalled
+ from this being a GTK widget to just a C++ object that manipulates
+ a set of buttons.
+
+ * gtk_ardour/trackview.cc (set_height): put edit controls in their
+ own event window so that we can control color, etc.
+
+ * gtk_ardour/canvas-simplerect.c (gtk_canvas_simplerect_render):
+ don't draw vertical lines at end of box (kludge!)
+
+ * gtk_ardour/editor.cc (add_region_to_region_display): copy
+ Regions before putting them in the Region list. this prevents
+ playlist-edits from altering the state of the "original".
+
+2001-10-03 Paul Davis <pbd>
+
+ * gtk_ardour/editor_ops.cc (split_region): operate only on the
+ uppermost region, not all those stacked at this location.
+
+2001-09-30 Paul Davis <pbd>
+
+ * gtk_ardour/editor_mouse.cc (start_grab): don't raise the grabbed
+ item to the top of the canvas stack. it must already have been
+ visible, so don't do this - it confuses regionview stacking.
+
+2001-09-28 Paul Davis <pbd>
+
+ * gtk_ardour/marker.cc (Marker): center marker shape on the actual
+ location; use frame position rather than canvas position in API.
+
+ * gtk_ardour/streamview.cc (StreamView): add a simplerect to show
+ the edge of the track *and* to help us get canvas events for the
+ track in areas where there is no region.
+
+ * gtk_ardour/editor_ops.cc (soundfile_chosen_for_insert): make
+ insert_sndfile() work again, including a working ensure_cursor()
+
+ * gtk_ardour/marker.cc (Marker): add black outline around marker shapes
+
+2001-09-27 Paul Davis <pbd>
+
+ * gtk_ardour/editor_ops.cc: implement partial support for nudge variations
+
+ * gtk_ardour/editor_mouse.cc (start_selection): add initial
+ support for mouse-based selection.
+
+ * gtk_ardour/editor.cc (Editor): add support for GUI control of
+ edit groups.
+
+ * gtk_ardour/editor_keys.cc (install_keybindings): add KP_{6,4}
+ since we don't get KP_{Right,Left} by default.
+
+ * gtk_ardour/ardour_ui.cc (add_diskstream): put recorder stuff
+ (meters, etc) in a separate window.
+
+ * gtk_ardour/plugin_ui.cc (build_control_ui): fix problem with
+ destructor logic that caused double destruction of
+ ControlUIs. also use Gtk-- functions for PluginUIadjustment.
+
+2001-09-26 Paul Davis <pbd>
+
+ * gtk_ardour/editor_keys.cc (install_keybindings): added some
+ more keybindings for the editor.
+
+2001-09-25 Paul Davis <pbd>
+
+ * gtk_ardour/editor_mouse.cc (region_drag_motion_callback): fixed
+ segv caused by referencing a null drag_info.last_trackview
+ pointer. this occured when the mouse moved into an area where
+ no trackview was, and then back again.
+
+ * gtk_ardour/marker.cc: added initial support for Canvas-based markers
+
+ * gtk_ardour/keyboard_target.cc (translate_key_name):
+ differentiate between Alt and Meta, and Alt(R|L) and Meta(R|L)
+
+
diff --git a/DOCUMENTATION/.cvsignore b/DOCUMENTATION/.cvsignore
new file mode 100644
index 0000000000..3dda72986f
--- /dev/null
+++ b/DOCUMENTATION/.cvsignore
@@ -0,0 +1,2 @@
+Makefile.in
+Makefile
diff --git a/DOCUMENTATION/AUTHORS b/DOCUMENTATION/AUTHORS
new file mode 100644
index 0000000000..32763d5eec
--- /dev/null
+++ b/DOCUMENTATION/AUTHORS
@@ -0,0 +1,71 @@
+Paul Davis (Philadelphia, PA) was and is the primary author of Ardour.
+
+Taybin Rutkin (New York, NY) has contributed lots of code, and was
+particularly responsible for the use of XML in the state persistence
+aspect of the program. He also (re)wrote the soundfile library code to
+use LRDF. In addition he was responsible for the integration of the
+gettext system and the compose() templates that make Ardour's
+internationalization possible. He has consistently made suggestions
+that resulted in significantly more elegant code and design. Taybin
+also set up and oversees the Mantis bug reporting system used by all
+of us, and tends to take on "infrastructure" issues such as the switch
+to SCons as the build system.
+
+Jesse Chappell (Washington, DC) keeps on making major contributions to
+Ardour. It almost seems pointless to list the things he has worked on
+because there is so much of it. They include being able to handle
+multichannel tracks, a major change in the program's design and
+capabilities, and many additions/improvements to the GTK GUI,
+including mouse zoom mode and the route params editor. Jesse was the
+first person to just "walk in" and understand the Ardour codebase.
+
+Marcus Andersson (Karlstad, Sweden) contributed a number of useful
+patches and worked on the dB-related issues in the gain stages and
+metering, other numeric computations, and much useful debugging, bug
+reporting and analysis.
+
+Jeremy Hall (Sterling, VA) contributed several patches and worked
+intensively on ksi_ardour, the keystroke-based-interface to libardour
+designed for sight-impaired and GUI-averse users.
+
+Steve Harris (Southampton, UK) contributed code to handle speed-based
+interpolation, an area I did not want to get my head around, as well
+as dithering, panning, metering and other DSP-centric issues. He also
+wrote the LRDF library used by Ardour's soundfile library code, not to
+mention dozens of LADSPA plugins that make Ardour a genuinely useful
+tool.
+
+Tim Mayberry (Brisbane, Australia) did lots and lots and lots of work
+on mouse-driven editing.
+
+Nick Mainsbridge <beatroot@optushome.com.au> is responsible for many
+improvements to the rulers, and several other tweaks.
+
+Colin Law wrote the code that supports Ardour's integration with
+the CMT Animatics engine. He was also very involved in refactoring the
+GUI code design to support different kinds of tracks, thus laying the
+groundwork for extending ardour's domain to include MIDI and video.
+
+Gerard van Dongen (Rotterdam, Netherlands) has done a set of scattered
+but critical work with a vague focus on the mouse. He has made some
+particularly important fixes to the incredibly hairy code that draws
+automation curves. Gerard also helped out with a workshop on Ardour
+held at the Dutch Electronic Arts Festival, Rotterdam, in November
+2004.
+
+Smaller (but not necessarily minor) patches were received from the
+following people:
+
+ Mark Stewart
+ Sam Chessman (Reston, VA)
+ Jack O'Quin (Austin, TX)
+ Matt Krai
+ Ben Bell
+ Thomas Charbonnel (Lyon, France)
+ Robert Jordens
+ Christopher George
+ Rob Holland
+ Joshua Leachman
+ Sampo Savolainen
+ Per Sigmond
+ \ No newline at end of file
diff --git a/DOCUMENTATION/AUTHORS.es b/DOCUMENTATION/AUTHORS.es
new file mode 100644
index 0000000000..93f16773c1
--- /dev/null
+++ b/DOCUMENTATION/AUTHORS.es
@@ -0,0 +1,78 @@
+Paul Davis (de Philadelphia, PA) fue y es el principal autor de Ardour.
+
+Taybin Rutkin (de New York, NY) ha contribuido grandes cantidades de
+codigo y fue particularmente responsable por el uso de XML en el
+aspecto de persistencia de estado del programa. Tambien escribio y
+reescribio el codigo relativo a la libreria soundfile (archivo de
+sonido) para que use LRDF. Ademas fue responsable por la integracion
+del sistema gettext y los esquemas compose() que hacen posible la
+internacionalizacion de Ardour. Ha hecho constantes sugerencias las
+cuales resultaron en codigo y disenio significativamente mas elegantes.
+Taybin tambien configuro y administra el sistema Mantis de reporte de
+bugs (errores de codigo) usado por todos nosotros.
+
+Jesse Chappell (de Washington, DC) continua haciendo grandes
+contribuciones a Ardour, particularmente en el hecho de que Ardour sea
+capaz de manejar pistas multicanal, un cambio mayor en el disenio del
+programa y capacidades. Tambien hizo muchos agregados y mejoras a la
+interfaz visual de GTK, incluyendo el modo de zoom mediante mouse y el
+editor de parametros de ruteo. Jessie fue la primera persona en "pasar"
+y entender las bases del codigo de Ardour.
+
+Marcus Andersson (de Karlstad, Sweden) contribuyo un numero de patches
+(actualizaciones) utiles y trabajo con los problemas relacionados a "dB"
+en las etapas de gain (volumen) y vumetros, otras computaciones numericas
+y muy util debugging, reporte de bugs y analisis.
+
+Jeremy Hall (de Sterling, VA) contribuyo varios patches y trabajo
+intensamente con ksi_ardour, que es la interfase basada en teclas de la
+libreria libardour diseniada para no videntes y amantes de lineas de
+comando (consolas).
+
+Steve Harris (de Southampton, UK) contribuyo codigo para manejar
+interpolacion basada en velocidad, un area en la cual no me queria meter,
+asi como dithering, balance, vumetros y otros temas relacionados con
+procesamiento de senial. Tambien escribio la libreria LRDF usada por
+el codigo de Ardour de la libreria soundfile, sin mencionar docenas
+de plugins LADSPA que hacen a Ardour una herramienta genuinamente util.
+
+Tim Mayberry (de Brisbane, Australia) hizo mucho, mucho, mucho trabajo
+en cuanto a edicion basada en mouse.
+
+Nick Mainsbridge <beatroot@optushome.com.au> es responsable de muchas
+mejoras a los medidores/lineas/referencias de tiempo.
+
+Colin Law <> escribio el codigo que soporta la integracion de Ardour
+al sistema de Animatics CMT. Tambien se ocupo en el redisenio del codigo
+de la interfase visual para soportar diferentes tipos de pistas.
+
+Mas pequenios (preo no necesariamente menores) patches fueron recividos
+de las siguientes personas:
+
+ Mark Stewart
+ Sam Chessman (Reston, VA)
+ Jack O'Quin (Austin, TX)
+ Matt Krai
+ Ben Bell
+ Gerard vanDongen (Rotterdam, Netherlands)
+ Thomas Charbonnel (Lyon, France)
+ Robert Jordens
+
+
+
+
+
+
+
+
+Nota de Traduccion (Spanish Translation Note)
+---------------------------------------------
+#Nota del tipeo:la letra pronunciada ENIE aparece en este archivo
+#como ni (letra "n" y letra "i") para mayor compatibilidad con todos
+#los visores de texto.
+#Asi mismo no se han aplicado las tildes(acentos).
+#Estos no son errores de tipeo. Si llegara a encontrar algun otro error
+#en cualquiera de los archivos con extension ".es" por favor
+#hagamelo saber a alexkrohn@fastmail.fm
+# Muchas gracias
+# Alex \ No newline at end of file
diff --git a/DOCUMENTATION/BUILD b/DOCUMENTATION/BUILD
new file mode 100644
index 0000000000..010e097e74
--- /dev/null
+++ b/DOCUMENTATION/BUILD
@@ -0,0 +1,145 @@
+ HOW TO BUILD ARDOUR FROM SOURCE
+ -------------------------------
+
+Please: before you do anything else, take a moment to go and join the
+ardour-dev mailing list (members only). It is very important that the
+community of people using, testing and developing this software are on
+the list, and I will NOT deal with questions relating to Ardour's
+compilation or bugs that are not sent to that list. See
+http://ardour.org/ for details on joining the mailing list.
+
+You can also get in touch with developers and users on IRC. Joining
+#ardour at irc.freenode.net. The core developers and several key users
+hang out here on IRC, at pretty much any hour of the night or day.
+
+*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
+
+ Full information on building Ardour can be found at:
+
+ http://ardour.org/building.php
+
+ Information has been left in this file for those who do not have
+ network access but is not guaranteed to be accurate or up to date.
+
+*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
+
+
+COMPILING
+------------
+
+Please ensure that before attempting to compile Ardour, you have
+installed:
+
+* Tools:
+
+ gcc/g++ 3.x or above
+ scons 0.96 or above
+ gettext 0.12.1 or above
+ pkgconfig 0.8.0 or above
+ http://www.freedesktop.org/software/pkgconfig/
+
+ lex and yacc are also required.
+ any verison of bison >= 1.35 should work fine.
+
+* Libraries:
+
+Recommended versions, where applicable, are shown under the general
+requirement.
+
+ JACK 0.99.50 (CVS or snapshot release) (http://jackit.sourceforge.net)
+
+ libxml2 2.5.X (http://xmlsoft.org/)
+
+ libart_lgpl 2.3.X
+
+ - available as part of gnome-libs, which you may already
+ have on your system.
+
+ - also available via download from GNOME source FTP sites.
+ - see ftp://ftp.gnome.org/pub/GNOME/MIRRORS.html
+ and then follow to sources/libart_lgpl
+
+ glib 1.2 (http://www.gtk.org)
+ glib-1.2.8 (included with most distributions)
+
+ GTK+ 1.2 (http://www.gtk.org)
+ gtk+-1.2.8 (included with most distributions)
+
+ libsndfile (http://www.mega-nerd.com/libsndfile/)
+ libsndfile-1.0 or higher
+
+ libsamplerate (http://www.mega-nerd.com/SRC/)
+ libsamplerate 0.0.13 or higher
+
+ the LADSPA SDK (http://www.ladspa.org/)
+ (See below)
+
+ raptor (http://librdf.org/raptor/)
+
+ lrdf (needs raptor) (http://plugin.org.uk/lrdf/)
+ liblrdf 0.4.0 or higher (earlier versions will
+ causes crashes when using plugin presets)
+
+Getting LADSPA
+---------------
+
+The Linux Audio Developers Simple Plugin API (LADSPA) really only
+consists of a header file, which is already included in the Ardour
+source tree.
+
+However, you may want the plugins that come the "full" LADSPA "SDK",
+so go ahead and download the whole package (it's not big) from
+www.ladspa.org.
+
+I would also recommend getting Steve Harris' excellent set of LADSPA
+plugins from http://plugin.org.uk/. They make Ardour into a truly
+useful application. Other LADSPA plugins will be appearing - be sure
+to watch the Linux Audio Development mailing list for announcements.
+
+2A) COMPILING FROM CVS
+---------------------
+
+Checkout the source from Ardour CVS (the `%' here is meant to be your
+shell prompt):
+
+% cd /usr/local/src # just an example, it can be anywhere
+% cvs -d:pserver:anoncvs@ardour.org:/cvsroot/ardour login
+ # you will need to contact
+ # paul at linuxaudiosystems dot com
+ # to get the passphrase. See
+ # http://ardour.org/download.html
+ # for details on why this is.
+% cvs -d:pserver:anoncvs@ardour.org:/cvsroot/ardour -z3 co ardour
+
+2B) COMPILING FROM A TARBALL
+----------------------------
+
+As usual, fetch and unpack the tarball. The directory it creates,
+ardour-<version>, is referred to below as "$AD".
+
+3) HOW TO COMPILE
+-----------------
+
+We use the wonderful scons build system, which is started by just typing:
+
+ scons
+
+in the top level directory of the ardour source tree.
+
+To speed things up, on a uniprocessor system, use "scons -j2", and on
+an SMP system try "scons -j3", which will do a parallel build
+(constructing more than one thing at a time).
+
+If you want to build ardour so that it can be debugged, you may wish
+to use the DEBUG=yes option. Without it, ardour is built with
+extreme optimization turned on and the result cannot be debugged
+effectively.
+
+If you don't want the installation to happen in the "usual place", add
+a PREFIX=/my/preferred/prefix option to scons.
+
+Compilation takes a while. Running with scons -j3 on a dual PII-450,
+the entire build takes about 20 minutes, about the same time with
+scons -j2 on 2.6GHz P4.
+
+Other scons options can be discovered using "scons --help"
diff --git a/DOCUMENTATION/BUILD.ru b/DOCUMENTATION/BUILD.ru
new file mode 100644
index 0000000000..a620209735
--- /dev/null
+++ b/DOCUMENTATION/BUILD.ru
@@ -0,0 +1,215 @@
+ ëáë óïâòáôø ARDOUR éú éóèïäîùè ôåëóôï÷
+ --------------------------------------
+
+ðÏÖÁÌÕÊÓÔÁ ×ÎÉÍÁÎÉÅ: ÐÒÅÖÄÅ ÞÅÍ ÐÒÉÓÔÕÐÉÔØ Ë ÒÁÂÏÔÅ Ó Ardour, ÎÁÊÄÉÔÅ
+×ÒÅÍÑ ÞÔÏÂÙ ÐÏÄÐÉÓÁÔØÓÑ ÎÁ ÓÐÉÓÏË ÒÁÓÓÙÌËÉ ÒÁÚÒÁÂÏÔÞÉËÏ×. üÔÏ ÏÞÅÎØ
+×ÁÖÎÏ, ÐÏÔÏÍÕ ÞÔÏ ÓÏÏÂÝÅÓÔ×Ï ÌÀÄÅÊ, ÉÓÐÏÌØÚÕÀÝÉÈ, ÔÅÓÔÉÒÕÀÝÉÈ É
+ÒÁÚÒÁÂÁÔÙ×ÁÀÝÉÈ Ardour, ÏÂÝÁÀÔÓÑ × ÜÔÏÍ ÓÐÉÓËÅ ÒÁÓÓÙÌËÉ, É Ñ îå âõäõ
+ÏÔ×ÅÞÁÔØ ÎÁ ×ÏÐÒÏÓÙ ÏÔÎÏÓÉÔÅÌØÎÏ ÓÂÏÒËÉ ÉÌÉ ÏÛÉÂÏË × ÒÁÂÏÔÅ Ardour,
+ÅÓÌÉ ÏÎÉ ÎÅ ÂÕÄÕÔ ÚÁÄÁÎÙ × ÜÔÏÍ ÓÐÉÓËÅ. ðÏÄÒÏÂÎÅÅ Ï ÜÔÏÍ ÞÉÔÁÊÔÅ ÎÁ
+ÓÔÒÁÎÉÃÅ http://ardour.sf.net/ ÉÌÉ http://ardour.org/, ÇÄÅ ÕËÁÚÁÎÏ
+ËÁË ÐÏÄÐÉÓÁÔØÓÑ ÎÁ ÓÐÉÓÏË ÒÁÓÓÙÌËÉ.
+
+üÔÏÔ ÄÏËÕÍÅÎÔ ÎÁÐÉÓÁÎ ÄÌÑ ÐÏÌØÚÏ×ÁÔÅÌÅÊ, ÈÏÒÏÛÏ ÚÎÁÀÝÉÈ ÐÒÏÃÅÓÓ ÓÂÏÒËÉ
+ÐÒÏÇÒÁÍÍÎÏÇÏ ÏÂÅÓÐÅÞÅÎÉÑ ÉÚ ÉÓÈÏÄÎÙÈ ÔÅËÓÔÏ× Ó ÉÓÐÏÌØÚÏ×ÁÎÉÅÍ ÐÁËÅÔÏ×
+GNU automake É autoconf. åÓÌÉ ÷Ù ÎÅ ÚÎÁËÏÍÙ Ó ÜÔÉÍ, ÔÏÇÄÁ ×ÏÚÍÏÖÎÏ ×ÁÍ
+ÐÒÉÄ£ÔÓÑ ÐÏÄÏÖÄÁÔØ ÄÏ ÔÅÈ ÐÏÒ, ÐÏËÁ ÎÅ ÐÏÑ×ÑÔÓÑ ÒÅÌÉÚÙ Ardour, ÎÅ ÔÒÅÂÕÀÝÉÅ
+ÓÂÏÒËÉ ÉÚ ÉÓÈÏÄÎÙÈ ÔÅËÓÔÏ× (binary releases).
+
+1) ðòá÷éìøîïå éóðïìøúï÷áîéå GNU AUTOCONF
+----------------------------------------
+
+GNU autoconf ×ÅÓØÍÁ ÍÏÝÎÁÑ ÓÉÓÔÅÍÁ, ÏÄÎÁËÏ Õ ÎÅ£ ÉÍÅÅÔÓÑ ËÁË ÍÉÎÉÍÕÍ
+ÏÄÉÎ ÓÕÝÅÓÔ×ÅÎÎÙÊ ÎÅÄÏÓÔÁÔÏË. ðÏ ÕÍÏÌÞÁÎÉÀ autoconf (aclocal) ×ÅÄ£Ô
+ÐÏÉÓË ÔÒÅÂÕÅÍÙÈ ÆÁÊÌÏ× ÔÏÌØËÏ × ïäîïí ËÁÔÁÌÏÇÅ. üÔÏ ÎÏÒÍÁÌØÎÏ ÒÁÂÏÔÁÅÔ,
+ËÒÏÍÅ ÓÌÕÞÁÅ×, ËÏÇÄÁ × ÓÉÓÔÅÍÅ ÕÓÔÁÎÏ×ÌÅÎÙ ÄÒÕÇÉÅ ÐÁËÅÔÙ, ÒÁÚÍÅÝÁÀÝÉÅ
+Ó×ÏÉ ÆÁÊÌÙ autoconf ÉÌÉ × ËÁÔÁÌÏÇÅ /usr/local/lib/share/aclocal,
+ÉÌÉ /usr/lib/share/aclocal.
+
+÷ ÒÅÚÕÌØÔÁÔÅ, autoconf ÞÁÓÔÏ ÎÅ ÍÏÖÅÔ ÎÁÊÔÉ ÆÁÊÌÙ, ÔÒÅÂÕÅÍÙÅ ÄÌÑ ÓÂÏÒËÉ
+Ardour, Ë ÔÏÍÕ ÖÅ Õ ÍÎÏÇÉÈ ÐÏÌØÚÏ×ÁÔÅÌÅÊ ÏÄÎÏ×ÒÅÍÅÎÎÏ ÉÍÅÀÔÓÑ ËÏÐÉÉ
+ÂÉÂÌÉÏÔÅË, ÕÓÔÁÎÏ×ÌÅÎÎÙÈ ÒÁÚÎÙÍÉ ÓÐÏÓÏÂÁÍÉ: ÉÚ ÉÓÈÏÄÎÙÈ ÔÅËÓÔÏ× (ÆÁÊÌÙ
+autoconf ÏÂÙÞÎÏ ÎÁÈÏÄÑÔÓÑ × ËÁÔÁÌÏÇÅ /usr/local/lib...) É ÉÚ ÓÏÂÒÁÎÎÙÈ
+ÐÁËÅÔÏ× (× ÜÔÏÍ ÓÌÕÞÁÅ ÆÁÊÌÙ ÒÁÓÐÏÌÁÇÁÀÔÓÑ × ËÁÔÁÌÏÇÅ /usr/lib...).
+
+òÅËÏÍÅÎÄÕÅÔÓÑ ÕËÁÚÁÔØ ÒÁÓÐÏÌÏÖÅÎÉÅ ËÁÔÁÌÏÇÏ× autoconf ÐÕÔÅÍ ÏÐÒÅÄÅÌÅÎÉÑ
+× ÐÅÒÅÍÅÎÎÏÊ ACLOCAL_FLAGS ×ÓÅÈ ÐÕÔÅÊ ÐÏÉÓËÁ.
+óÎÁÞÁÌÁ ÎÁÊÄÉÔÅ ×ÓÅ aclocal ÄÉÒÅËÔÏÒÉÉ:
+ $ locate /aclocal/
+É ÐÒÏ×ÅÒØÔÅ (ÎÁÊÄÉÔÅ) ×ÓÅ ËÁÔÁÌÏÇÉ, ÓÏÄÅÒÖÁÝÉÅ ÆÁÊÌÙ Ó ÒÁÓÛÉÒÅÎÉÅÍ ".m4" .
+úÁÔÅÍ ÚÁÄÁÊÔÅ ÐÅÒÅÍÅÎÎÕÀ ÏËÒÕÖÅÎÉÑ ACLOCAL_FLAGS, ËÁË ÕËÁÚÁÎÏ ÎÉÖÅ
+(× ËÁÞÅÓÔ×Å ÐÒÉÍÅÒÁ):
+
+ export ACLOCAL_FLAGS="-I /usr/share/aclocal -I /usr/local/share/aclocal -I /opt/gnome/share/aclocal"
+
+÷Ù ÍÏÖÅÔÅ ÄÏÂÁ×ÉÔØ ÜÔÕ ÓÔÒÏËÕ × ÆÁÊÌÙ .bashrc ÉÌÉ .profile × ×ÁÛÅÍ ÄÏÍÁÛÎÅÍ
+ËÁÔÁÌÏÇÅ, ÏÎÁ ÂÕÄÅÔ ÉÓÐÏÌÎÑÔØÓÑ ËÁÖÄÙÊ ÒÁÚ ÐÒÉ ×ÈÏÄÅ × ÓÉÓÔÅÍÕ.
+
+-----
+çÒÕÂÏÅ É ÍÅÎÅÅ ÄÅÌÉËÁÔÎÏÅ ÒÅÛÅÎÉÅ, ÏÐÉÓÁÎÎÏÅ ÎÉÖÅ, ÐÏÄÒÁÚÕÍÅ×ÁÅÔ ÓÌÉÑÎÉÅ
+×ÓÅÈ ÄÉÒÅËÔÏÒÉÊ aclocal. üÔÏ ÎÅ ÍÏÖÅÔ ÂÙÔØ ÒÅËÏÍÅÎÄÏ×ÁÎÏ, ÈÏÔÑ ÜÔÏÔ
+×ÁÒÉÁÎÔ ÔÁËÖÅ ÒÁÂÏÔÁÅÔ.
+
+ðÏÖÁÌÕÊÓÔÁ, ÐÒÏ×ÅÒØÔÅ ÓÏÄÅÒÖÉÍÏÅ ÏÂÅÉÈ ÄÉÒÅËÔÏÒÉÊ ÐÅÒÅÄ ÔÅÍ ËÁË ÄÅÌÁÔØ
+"ÓÌÉÑÎÉÅ", ÞÔÏÂÙ ÓÌÕÞÁÊÎÏ ÎÅ ÓÔÅÒÅÔØ ËÏÒÒÅËÔÎÕÀ ×ÅÒÓÉÀ ËÏÐÉÊ ÆÁÊÌÏ×
+autoconf:
+
+ * åÓÌÉ Õ ×ÁÓ ÅÓÔØ ÏÂÁ ËÁÔÁÌÏÇÁ:
+
+ cd /usr/lib/share/aclocal
+ cp *.m4 /usr/local/lib/share/aclocal
+ cd ..
+ rm -rf aclocal
+ ln -s /usr/local/lib/share/aclocal .
+
+ * åÓÌÉ ÉÍÅÅÔÓÑ ÔÏÌØËÏ /usr/lib/share/aclocal
+
+ cd /usr/local/lib
+ ln -s /usr/lib/share/aclocal .
+
+÷ ÎÅËÏÔÏÒÙÅ ÄÉÓÔÒÉÂÕÔÉ×ÁÈ linux aclocal ÎÁÈÏÄÉÔÓÑ × ÒÁÚÌÉÞÎÙÈ ÍÅÓÔÁÈ.
+
+
+2. ëïíðéìñãéñ
+-------------
+
+ðÅÒÅÄ ÔÅÍ ËÁË ËÏÍÐÉÌÉÒÏ×ÁÔØ Ardour ÕÂÅÄÉÔÅÓØ, ÞÔÏ Õ ×ÁÓ ÕÓÔÁÎÏ×ÌÅÎÙ
+ÓÌÅÄÕÀÝÉÅ ËÏÍÐÏÎÅÎÔÙ:
+
+* ðÒÏÇÒÁÍÍÙ É ÕÔÉÌÉÔÙ:
+
+ gcc/g++ ×ÅÒÓÉÉ 2.95.3 ÉÌÉ ×ÙÛÅ (gcc/g++ 3.x works also)
+ autoconf 2.52 ÉÌÉ ×ÙÛÅ
+ automake 1.5 ÉÌÉ ×ÙÛÅ
+ libtool 1.4.2 ÉÌÉ ×ÙÛÅ
+ gettext 0.11.5 ÉÌÉ ×ÙÛÅ
+ pkgconfig 0.8.0 ÉÌÉ ×ÙÛÅ
+ http://www.freedesktop.org/software/pkgconfig/
+ ÔÒÅÂÕÀÔÓÑ ÔÁËÖÅ lex É yacc.
+ ÌÀÂÁÑ ×ÅÒÓÉÑ bison >= 1.35 ÄÏÌÖÎÁ ÒÁÂÏÔÁÔØ.
+
+* âÉÂÌÉÏÔÅËÉ:
+
+òÅËÏÍÅÎÄÕÅÍÙÅ ×ÅÒÓÉÉ, ËÏÔÏÒÙÅ ÄÏÌÖÎÙ ÒÁÂÏÔÁÔØ, ÐÏËÁÚÁÎÙ ÎÉÖÅ.
+
+ ALSA 0.9.X (CVS ÉÌÉ ÔÅËÕÝÉÊ ÒÅÌÉÚ) (http://www.alsa-project.org)
+
+ JACK (http://jackit.sourceforge.net)
+
+ libxml2 2.5.X (http://xmlsoft.org/)
+
+ libart_lgpl 2.3.X
+
+ - ÏÂÙÞÎÏ Ñ×ÌÑÅÔÓÑ ÞÁÓÔØÀ gnome-libs, ËÏÔÏÒÙÅ ËÁË ÐÒÁ×ÉÌÏ
+ ÕÖÅ ÕÓÔÁÎÏ×ÌÅÎÙ
+
+ - × ÐÒÏÔÉ×ÎÏÍ ÓÌÕÞÁÅ ×Ù ÍÏÖÅÔÅ ÚÁÇÒÕÚÉÔØ ÂÉÂÌÉÏÔÅËÕ Ó FTP-ÓÁÊÔÁ
+ ÉÓÈÏÄÎÙÈ ÔÅËÓÔÏ× GNOME.
+ - ÓÍ. ftp://ftp.gnome.org/pub/GNOME/MIRRORS.html
+ É ÉÝÉÔÅ × sources/libart_lgpl
+
+ glib 1.2 (http://www.gtk.org)
+ glib-1.2.8 (×ËÌÀÞÅÎÏ × ÂÏÌØÛÉÎÓÔ×Ï ÄÉÓÔÒÉÂÕÔÉ×Ï×)
+
+ GTK+ 1.2 (http://www.gtk.org)
+ gtk+-1.2.8 (×ËÌÀÞÅÎÏ × ÂÏÌØÛÉÎÓÔ×Ï ÄÉÓÔÒÉÂÕÔÉ×Ï×)
+
+ libsndfile (http://www.zip.com.au/~erikd/libsndfile)
+ libsndfile-1.0 ÉÌÉ ×ÙÛÅ
+
+ libsamplerate (http://www.mega-nerd.com/SRC/)
+ libsamplerate 0.0.13 ÉÌÉ ×ÙÛÅ
+
+ the LADSPA SDK (http://www.ladspa.org/)
+ (ÓÍ. ÎÉÖÅ)
+
+ raptor (http://www.redland.opensource.ac.uk/raptor/)
+
+ lrdf (needs raptor) (http://plugin.org.uk/lrdf/)
+ liblrdf 0.4.0 ÉÌÉ ×ÙÛÅ
+
+õÓÔÁÎÏ×ËÁ LADSPA
+----------------
+
+óÅÇÏÄÎÑ ÏÐÉÓÁÎÉÅ ÉÎÔÅÒÆÅÊÓÁ Linux Audio Developers Simple Plugin API
+(LADSPA) ÓÏÄÅÒÖÉÔ ÔÏÌØËÏ ÚÁÇÏÌÏ×ÏÞÎÙÊ ÆÁÊÌ (header file), ËÏÔÏÒÙÊ
+ÕÖÅ ×ËÌÀÞ£Î × ÄÅÒÅ×Ï ÉÓÈÏÄÎÙÈ ÔÅËÓÔÏ× Ardour.
+
+ôÅÍ ÎÅ ÍÅÎÅÅ, ×Ù ÍÏÖÅÔÅ ÚÁÈÏÔÅÔØ ÕÓÔÁÎÏ×ÉÔØ É ÍÏÄÕÌÉ LADSPA plugins,
+ËÏÔÏÒÙÅ ×ÈÏÄÑÔ × ÓÏÓÔÁ× ÐÏÌÎÏÇÏ ÐÁËÅÔÁ LADSPA SDK. åÇÏ ÍÏÖÎÏ ÎÁÊÔÉ É
+ÚÁÇÒÕÚÉÔØ (ÒÁÚÍÅÒ ÐÁËÅÔÁ ÎÅÂÏÌØÛÏÊ) ÐÏ ÁÄÒÅÓÕ www.ladspa.org.
+
+ôÁËÖÅ, Ñ ÒÅËÏÍÅÎÄÕÀ ÚÁÇÒÕÚÉÔØ ÐÒÅËÒÁÓÎÙÊ ÎÁÂÏÒ ÍÏÄÕÌÅÊ (plugins) LADSPA
+ÏÔ Steve Harris Ó ÓÁÊÔÁ http://plugin.org.uk/. üÔÏ ÎÁÍÎÏÇÏ ÐÏ×ÙÓÉÔ
+ÐÏÌÅÚÎÙÅ ×ÏÚÍÏÖÎÏÓÔÉ Ardour. óÏ ×ÒÅÍÅÎÅÍ ÐÏÑ×ÑÔÓÑ É ÄÒÕÇÉÅ ÍÏÄÕÌÉ LADSPA,
+ÞÔÏÂÙ ÂÙÔØ × ËÕÒÓÅ - ÓÌÅÄÉÔÅ ÚÁ ÁÎÏÎÓÁÍÉ × ÓÐÉÓËÅ ÒÁÓÓÙÌËÉ Linux Audio
+Development.
+
+2A) ëÏÍÐÉÌÉÒÏ×ÁÎÉÅ ÉÚ CVS
+-------------------------
+
+úÁÇÒÕÚÉÔÅ ÉÌÉ ÏÂÎÏ×ÉÔÅ ÄÅÒÅ×Ï ÉÓÈÏÄÎÙÈ ÔÅËÓÔÏ× Ardour ÉÚ CVS. (÷ ÐÒÉ×ÅÄ£ÎÎÏÍ
+ÎÉÖÅ ÐÒÉÍÅÒÅ ÓÉÍ×ÏÌ '%' ÏÚÎÁÞÁÅÔ ÐÒÉÇÌÁÛÅÎÉÅ ËÏÍÁÎÄÎÏÊ ÓÔÒÏËÉ):
+
+% cd /usr/local/src # × ËÁÞÅÓÔ×Å ÐÒÉÍÅÒÁ, ×Ù ÍÏÖÅÔÅ ÓÄÅÌÁÔØ ÜÔÏ ÇÄÅ
+ ÐÏÖÅÌÁÅÔÅ
+% cvs -d:pserver:anoncvs@ardour.org:/cvsroot/ardour login
+ # (ÎÁÖÍÉÔÅ Enter/Return ËÏÇÄÁ ÐÏÑ×ÉÔÓÑ ÐÒÉÇÌÁÛÅÎÉÅ
+ Ë ××ÏÄÕ ÐÁÒÏÌÑ)
+% cvs -d:pserver:anoncvs@ardour.org:/cvsroot/ardour -z3 co ardour
+
+2A.1) þåí òáúìéþáàôóñ óðïóïâù óâïòëé éú CVS ?
+---------------------------------------------
+éÔÁË, ×ÁÍ ÎÕÖÎÏ ÒÅÛÉÔØ, Ñ×ÌÑÅÔÅÓØ ÌÉ ×Ù ÒÁÚÒÁÂÏÔÞÉËÏÍ ardour ÉÌÉ
+ÐÏÌØÚÏ×ÁÔÅÌÅÍ. åÓÌÉ ×Ù ÏÔÎÏÓÉÔÅ ÓÅÂÑ Ë ÐÅÒ×ÙÍ ÉÚ ÐÅÒÅÞÉÓÌÅÎÎÙÈ, ÔÏ ×ÏÚÍÏÖÎÏ
+ÕÓËÏÒÉÔØ ÒÁÂÏÔÕ, ÓÏÂÒÁ× ÂÉÂÌÉÏÔÅËÕ libardour ËÁË ÒÁÚÄÅÌÑÅÍÕÀ. üÔÏ ÐÏÚ×ÏÌÉÔ
+ÉÚÂÁ×ÉÔØÓÑ ÏÔ ÐÅÒÅÌÉÎËÏ×ËÉ ÐÏÓÌÅ ËÁÖÄÏÇÏ ×ÎÅÓÅÎÉÑ ÉÚÍÅÎÅÎÉÊ × ÜÔÕ ÂÉÂÌÉÏÔÅËÕ.
+åÓÌÉ ×Ù ÐÒÏÓÔÏ ÐÏÌØÚÏ×ÁÔÅÌØ, ÜÔÏÔ ÛÁÇ ÌÉÛØ ÏÓÌÏÖÎÉÔ ×ÁÍ ÖÉÚÎØ. éÔÁË,
+ÅÓÌÉ ×Ù ÒÁÚÒÁÂÏÔÞÉË, ÔÏÇÄÁ ×ÙÐÏÌÎÉÔÅ ÓÌÅÄÕÀÝÕÀ ËÏÍÁÎÄÕ:
+
+ touch ardour/libs/ardour/BUILD_FOR_DEVELOPMENT
+
+ôÅÐÅÒØ ÂÉÂÌÉÏÔÅËÁ libardour ÂÕÄÅÔ ÓËÏÍÐÉÌÉÒÏ×ÁÎÁ ËÁË ÒÁÚÄÅÌÑÅÍÁÑ (shared).
+ôÁËÖÅ ×Ù ÄÏÌÖÎÙ ÉÓÐÏÌØÚÏ×ÁÔØ ËÌÀÞ --enable-development-build × ËÏÍÁÎÄÅ
+configure.
+
+2A.2) ðïäçïôï÷ëá ë óâïòëå éú éóèïäîùè ôåëóôï÷
+---------------------------------------------
+
+óÏÚÄÁÊÔÅ autoconf/automake ÆÁÊÌÙ:
+
+% cd ardour
+% sh autogen.sh
+
+ôÅÐÅÒØ ÐÅÒÅÈÏÄÉÍ Ë ÐÕÎËÔÕ 3.
+
+2B) óâïòëá éú áòèé÷á éóèïäîùè ôåëóôï÷ (tar.gz)
+----------------------------------------------
+
+÷Ó£ ËÁË ÏÂÙÞÎÏ, ÚÁÇÒÕÚÉÔÅ É ÒÁÓÐÁËÕÊÔÅ ÁÒÈÉ×. æÁÊÌÙ ÉÓÈÏÄÎÙÈ ÔÅËÓÔÏ×
+ÂÕÄÕÔ ÎÁÈÏÄÉÔØÓÑ × ËÁÔÁÌÏÇÅ Ó ÉÍÅÎÅÍ ardour-<ÎÏÍÅÒ ×ÅÒÓÉÉ>.
+
+3) ëáë óëïíðéìéòï÷áôø
+---------------------
+
+ ./configure (Ó ÌÀÂÙÍÉ ÏÐÃÉÑÍÉ ËÏÔÏÒÙÅ ÐÏÖÅÌÁÅÔÅ)
+ make
+ make install
+
+åÓÌÉ ×Ù Ñ×ÌÑÅÔÅÓØ ÒÁÚÒÁÂÏÔÞÉËÏÍ É ÎÁÍÅÒÅ×ÁÅÔÅÓØ ÐÏÒÁÂÏÔÁÔØ ÎÁÄ libardour,
+ÉÓÐÏÌØÚÕÊÔÅ ÏÐÃÉÀ --enable-development-build, ËÏÔÏÒÁÑ ×ËÌÀÞÁÅÔ ÄÉÎÁÍÉÞÅÓËÕÀ
+ÌÉÎËÏ×ËÕ ardour É ÅÇÏ ÂÉÂÌÉÏÔÅË. üÔÏ ÐÏÚ×ÏÌÉÔ ÓÜËÏÎÏÍÉÔØ ×ÒÅÍÑ, ÔÁË ËÁË
+ÐÏÚ×ÏÌÉÔ ÉÚÂÅÖÁÔØ ÍÅÄÌÅÎÎÏÊ ÐÒÏÃÅÄÕÒÙ ÓÔÁÔÉÞÅÓËÏÊ ÌÉÎËÏ×ËÉ ËÁÖÄÙÊ ÒÁÚ, ËÁË
+×Ù ÐÏÍÅÎÑÅÔÅ ÞÔÏ-ÌÉÂÏ × libardour.
+
+åÓÌÉ ×Ù ÈÏÔÉÔÅ ÓËÏÍÐÉÌÉÒÏ×ÁÔØ Ardour ÔÁË, ÞÔÏÂÙ × ÄÁÌØÎÅÊÛÅÍ ÅÇÏ ÍÏÖÎÏ
+ÂÙÌÏ ÚÁÐÕÓÔÉÔØ × ÏÔÌÁÄÞÉËÅ, ÉÓÐÏÌØÚÕÊÔÅ ÏÐÃÉÀ --disable-optimize.
+÷ ÐÒÏÔÉ×ÎÏÍ ÓÌÕÞÁÅ Ardour ÂÕÄÅÔ ÓÏÂÒÁÎ Ó ÍÁËÓÉÍÁÌØÎÏÊ ÏÐÔÉÍÉÚÁÃÉÅÊ,
+ÞÔÏ ÐÏÍÅÛÁÅÔ ÜÆÆÅËÔÉ×ÎÏÊ ÏÔÌÁÄËÅ.
+
+ëÁË ÏÂÙÞÎÏ × ËÏÍÁÎÄÅ ./configure ×Ù ÍÏÖÅÔÅ ÉÓÐÏÌØÚÏ×ÁÔØ ÏÐÃÉÉ --prefix
+É --sysconfdir, ÞÔÏÂÙ ÉÚÍÅÎÉÔØ ÒÁÓÐÏÌÏÖÅÎÉÅ ÆÁÊÌÏ× ÐÒÏÇÒÁÍÍÙ. ïÎÉ ÂÕÄÕÔ
+ÐÏÍÅÝÅÎÙ ÐÏ ÕËÁÚÁÎÎÙÍ ÐÕÔÑÍ ËÏÍÁÎÄÏÊ "make install".
+
+ëÏÍÐÉÌÉÒÏ×ÁÎÉÅ ÉÓÈÏÄÎÙÈ ÔÅËÓÔÏ× ÍÏÖÅÔ ÚÁÎÑÔØ ÎÅËÏÔÏÒÏÅ ×ÒÅÍÑ. ë ÐÒÉÍÅÒÕ,
+Ó ËÌÀÞÏÍ - j3 ÎÁ ÓÉÓÔÅÍÅ dual PII-450 ÚÁÎÉÍÁÅÔ ÏËÏÌÏ 20 ÍÉÎÕÔ.
diff --git a/DOCUMENTATION/CONTRIBUTORS b/DOCUMENTATION/CONTRIBUTORS
new file mode 100644
index 0000000000..6e6fa2697a
--- /dev/null
+++ b/DOCUMENTATION/CONTRIBUTORS
@@ -0,0 +1,61 @@
+In addition to those listed in the AUTHORS file, the following people
+are among those who offered financial support, design insights and
+ideas, encouragement, feedback, bug reports and much more during
+Ardour's pre-release development. They generally suffered from days of
+frustration, and withstood hundreds of CVS revisions without
+complaint.
+
+No thanks or praise is sufficient for their contributions to Ardour.
+
+(in no particular order)
+
+Joe Hartley
+Marek Peteraj
+Ryan Gallagher
+Rob Holland
+Jan Depner
+Bryan Koschmann
+Patrick Shirkey
+Rob Fell
+Ant <avan@uwm.edu>
+Chris Ross
+Joshua Pritikin
+Rohan Drape
+Johan De Groote
+Bob Ham
+
+I would particularly like to recognize:
+
+Frank Carmickle
+ - first financial supporter of Ardour,
+ instigator of ardour/ksi.
+
+Ron Parker (Minneapolis, MN)
+ - first user of Ardour in a commercial studio,
+ financial contributor, major initiator of
+ MTC and MMC functionality.
+
+DuWayne Holsbeck
+ - an early financial and infrastructure sponsor
+
+Havoc Pennington & Owen Taylor
+ - provided much assistance in understanding, diagnosing and
+ cajoling GTK+.
+
+Tom Pincince (Shasta, CA)
+ - provided continuous, excellent design insights and
+ rationalizations, as well as info on the operation of some
+ existing DAW's.
+
+I would also like to thank Jim Hamilton of Rittenhouse Recording,
+Philadelphia, for the partnership, friendship and foresight he showed
+in allowing me to use the studio as the development basis for
+Ardour. I met Jim playing a jazz drumkit at a fundraiser to celebrate
+the 30th anniversary of our children's nursery school. Since then, he
+has continued to open my eyes to both music itself, the process of
+making music, and the life of a working musician. Jim's the best and
+most inventive percussionist I have ever seen, and one of the best
+I've ever heard. He has always believed in the social and philosphical
+implications of Ardour, and his support and interest have been vital
+in Ardour's development. Although as of this writing, Rittenhouse
+Recording is not running Ardour, its only a matter of time!
diff --git a/DOCUMENTATION/CONTRIBUTORS.es b/DOCUMENTATION/CONTRIBUTORS.es
new file mode 100644
index 0000000000..73c49c8469
--- /dev/null
+++ b/DOCUMENTATION/CONTRIBUTORS.es
@@ -0,0 +1,82 @@
+Ademas de aquellos que aparecen mencionados en el archivo AUTHORS.es,
+las siguientes personas estan entre aquellas que ofrecieron soporte
+financiero, observaciones de disenio e ideas, animo, aportes, reportes
+de bugs (errores en codigo) y mucho mas durante el desarrollo del
+pre lanzamiento de Ardour. Generalmente, ellos sufrieron de dias de
+frustracion y soportaron cientas de revisiones de CVS sin quejas.
+
+Ninguna plegaria o agradecimiento posible es suficiente por sus
+contribuciones a Ardour.
+
+(en ningun orden en particular)
+
+Joe Hartley
+Marek Peteraj
+Ryan Gallagher
+Rob Holland
+Jan Depner
+Bryan Koschmann
+Patrick Shirkey
+Rob Fell
+Ant <avan@uwm.edu>
+Chris Ross
+Joshua Pritikin
+Rohan Drape
+Johan De Groote
+Bob Ham
+
+Quisiera destacar particularmente a:
+
+Frank Carmickle
+ - primer brinadador de soporte financiero a Ardour,
+ instigador de ardour/ksi.
+
+Ron Parker (de Minneapolis, MN)
+ - primer usuario de Ardour en un estudio comercial,
+ contribuidor financiero, iniciador mayor de
+ funcionalidad MTC and MMC.
+
+DuWayne Holsbeck
+ - dominio de disenio de sponsors linuxaudiosystems.com ,
+ configuro la base de datos bugzilla y mas.
+
+Havoc Pennington & Owen Taylor
+ - brindaron mucha asistencia en cuanto a comprension,
+ diagnostico y simplificacion de GTK+.
+
+Tom Pincince (de Shasta, CA)
+ - contribuyo continuas y exceles observaciones de disenio y
+ racionalizaciones, asi como informacion acerca de
+ estaciones de trabajo de audio digital existentes.
+
+Tambien quisiera agradecer a Jim Hamilton de Rittenhouse Recording,
+Philadelphia, for el companierismo, amistad y vision que demostro
+al permitirme usar el estudio como base de desarrollo para Ardour.
+Conoci a Jim tocando percusion jazz en un evento de recaudacion de
+fondos para celebrar el 30imo aniversario de la guarderia escolar de
+nuestros hijos. Desde entonces me ha abierto los ojos a ambos, la musica
+misma, el proceso de hacer musica y la vida de un musico trabajando.
+Jim es el mejor y mas inventivo percusionista que haya visto, y uno
+de los mejores que he oido. El siempre ha creido en las implicaciones
+filosoficas y sociales de Ardoury su soporte e interes han sido vitales
+en el desarrollo de Ardour. Es solo cuestion de tiempo hasta que
+Rittenhouse Recording use Ardour.
+
+
+
+
+
+
+
+
+Nota de Traduccion (Spanish Translation Note)
+---------------------------------------------
+#Nota del tipeo:la letra pronunciada ENIE aparece en este archivo
+#como ni (letra "n" y letra "i") para mayor compatibilidad con todos
+#los visores de texto.
+#Asi mismo no se han aplicado las tildes(acentos).
+#Estos no son errores de tipeo. Si llegara a encontrar algun otro error
+#en cualquiera de los archivos con extension ".es" por favor
+#hagamelo saber a alexkrohn@fastmail.fm
+# Muchas gracias
+# Alex \ No newline at end of file
diff --git a/DOCUMENTATION/FAQ b/DOCUMENTATION/FAQ
new file mode 100644
index 0000000000..6ac38e8f2f
--- /dev/null
+++ b/DOCUMENTATION/FAQ
@@ -0,0 +1,613 @@
+The Ardour FAQ
+January 23, 2004
+
+--Problems--
+1.1. Why can't I get configure to run when ...
+1.2. I'm getting syntax errors during build.
+1.3. I get the warning: "Gtk-WARNING **: Unable to locate image file in
+1.4. What's an xrun?
+1.5. The region area overlaps the buttons in the editor.
+1.6. Ardour keeps freezing. Here's the strace...
+1.7. What is "ardev" and why is it a shell script?
+1.8. How do I debug this thing?
+1.9. I want Ardour to run faster.
+
+--Features--
+2.1. Are plugins supported?
+2.2. Are VST plugins supported?
+2.3. Does Ardour run on non-Linux systems?
+2.4. Ardour needs to have this feature now.
+2.5. Why doesn't Ardour support MP3s?
+2.6. Does Ardour support MIDI?
+2.7. What soundfile formats are supported?
+2.8. Can I use multiple cards?
+2.9. How do I save captures across partitions?
+
+--Usability--
+3.1. How do I pan stereo outputs?
+3.2. Where's the patch bay?
+3.3. How do I do stuff?
+
+--Misc--
+4.1. What's the deal with JACK, LAAGA, and Audioengine?
+4.2. Is Ardour internationalized?
+4.3. How do I get support?
+4.4. Well, where's the manual?
+4.5. Why are all these libraries included? I already have ...
+4.6. Why not another frontend to libardour? Why not QT?
+
+--------------------------------------------------------------------------------
+
+--Problems--
+1.1. Why can't I get configure to run when ...
+
+You can only run configure at the top level of the Ardour source
+tree. You don't want to know why this is true. Don't try to work
+around it.
+
+1.2. I'm getting syntax errors during build.
+
+This probably means that you are using an out of date library. Or you
+might be using a very new library that has changed its API. Check the
+version number. If it is lower than what is listed in the BUILD file,
+update your library. If it is higher than what is listed in the BUILD file,
+email the mailing list. Note that you have to be a member of the mailing
+list to send mail to it, which is done to prevent the list from receiving
+much spam.
+
+1.3. I get the warning: "Gtk-WARNING **: Unable to locate image file in
+ pixmap_path: "set-next-button.xpm"
+
+The most common cause of this error is simply that you have not set
+the pixmap pathname correctly. It can be specified in the Ardour
+config file. See the BUILD file.
+
+1.4. What's an xrun?
+
+It's a generic term used to describe a situation where the software
+did not keep up with the hardware, either by feeding it data, or by
+collecting data from it. It generally means that you're having
+trouble with latency. This can be caused by several factors. You
+could have a misconfigured system, you might be trying to do to much,
+or both.
+
+If you're haven't read http://www.linuxdj.com/audio/lad/resourceslatency.php3,
+then your system is probably misconfigured.
+
+If you are running many many tracks, with multiple LADSPA plugins, then it
+is possible that your system just can't keep up with what you want to do.
+Either simplify your music, or upgrade your machine. A dual processor does
+wonders.
+
+You can test your setup with the latencytest tool, available at
+http://www.linuxdj.com .
+
+Jan Depner's HOWTO is loaded with latency tuning tips for Ardour:
+http://myweb.cableone.net/eviltwin69/ALSA_JACK_ARDOUR.html
+
+1.5. The region area overlaps the buttons in the editor.
+
+Make sure that you are using the appropriate font size for your monitor's
+resolution. If you are running at 1024x768 or below, you should use the
+75dpi package, not the 100dpi. This is usually set in /etc/X11/XF86Config.
+
+1.6. Ardour keeps freezing. Here's the strace...
+
+The results from strace aren't very useful. To provide helpful information
+to the developers, run Ardour under gdb. If you don't know how to use
+gdb, this isn't the time to learn. If you do know how to use gdb, read
+section 1.8.
+
+1.7. What is "ardev" and why is it a shell script?
+
+This is only applicable if configure was run with --enable-development-build.
+
+To speed up the process of developing Ardour, we do not statically
+link Ardour and its library, libardour. Instead, we use dynamic
+linking, which allows the developers to avoid the (very) long
+relinking step when they make certain kinds of changes to libardour.
+
+This means that the executable image for Ardour relies on the system
+being able to find libardour whenever you start it. Rather than leave
+this to chance and/or the whims of your system adminstrator (probably
+yourself), we instead use a short shell script to make sure that the
+connection between the two of them can be established.
+
+This has almost zero impact on any aspect of Ardour's operation. The
+only noticeable effect is that it makes debugging slightly more
+difficult. See 1.8 for more on this.
+
+1.8. How do I debug this thing?
+
++-------------------------------------------------------------------------+
+| NOTE: Newer versions of gdb and/or glibc and/or the kernel have broken
+| gdb in a critical way that make it impossible to run ardour. The gdb
+| development group claim to have fixed this, but on many
+| distributions, the version that is provided is still broken.
+|
+| Under such circumstances, you will have to get a core dump from
+| ardour, and then use gdb to analyse the core dump, rather than
+| using gdb as a "live tool".
+|
+| Many distributions set the default core dump size to 0, to prevent
+| core dumps completely. So the first step is to do enter this
+| at your shell prompt (in a terminal window):
+|
+| ulimit -c 9999999999
+|
+| Then run ardour in whatever way causes a crash. after the crash
+| you should find a file called "core" in your working directory.
+| then run:
+|
+| gdb ardour core
+|
+| When the gdb> prompt appears, type
+|
+| backtrace
+|
+| Collect the output, and file it as an attachment to a Mantis
+| bug report at http://ardour.org/mantis
+|
+| Thanks for helping to improve Ardour.
++------------------------------------------------------------------------+
+
+A) How to start gdb ....
+
+A1) IF YOU DID NOT USE --enable-development-build
+
+You can use gdb the usual way:
+
+ % cd /where/you/built/ardour
+ % gdb ardour
+
+
+A2) IF YOU USE --enable-development-build
+
+The first and most basic thing you need to know is how to invoke
+gdb. Because of the dynamic linking between Ardour and its library you
+can't just invoke Ardour and get it to work. Besides, "ardour" itself
+is a shell script (see 1.10 for more on this). So, what you need to do
+is to invoke gdb with LD_LIBRARY_PATH set to point to the place where
+libardour is installed, and use the name of actual executable image.
+
+If you installed in the default location, this command will invoke gdb
+correctly:
+
+ env LD_LIBRARY_PATH=/usr/local/lib/ardour gdb /usr/local/lib/ardour/ardourx
+
+If you used a --prefix argument during the build process so that
+Ardour would be installed somewhere other than under /usr/local, then
+replace /usr/local in the command above with whatever "prefix" you
+used.
+
+You could easily make the above a shell alias or a 1 line shell script
+if you think you'll be debugging Ardour with gdb a lot.
+
+A3) ABOUT LADSPA PLUGINS AND GDB
+
+Moving all your LADSPA plugins out of the way will make gdb very much
+quicker to start. For example, if you normally keep them in
+/usr/local/lib/ladspa, you could do something like:
+
+ mkdir /usr/local/lib/LADSPA
+ mv /usr/local/lib/ladpsa/* /usr/local/lib/LADSPA
+
+gdb doesn't do very well when forced to handle dozens of dynamically
+loaded objects, as typically happens with LADSPA plugins.
+
+It might be easier to redefine LADSPA_PATH to a dummy path.
+
+B) What to do with gdb
+
+When Ardour has crashed or is "stuck", issue the following command
+to gdb (you will need to use Ctrl-C if its "stuck" to get back to the
+gdb command prompt):
+
+ thread apply all bt
+
+collect the output from this, and then go to
+
+ http://ardour.org/mantis
+
+and file a new bug report with the output attached. This will allow
+us to get the most out of your misfortune.
+
+If you compiled ardour from source and want to be even more helpful,
+recompile it after running
+
+ ./configure --disable-optimize
+
+at the top level. This will make the debugging output more useful.
+
+1.9. I want Ardour to run faster.
+
+The --enable-optimize flag is enabled by default which turns
+on compiler features that can make Ardour run up to 50% faster.
+If you downloaded Ardour as a binary package, it should have been
+compiled with that flag already.
+
+--Features--
+2.1. Are plugins supported?
+
+LADSPA plugins are supported. To use them, click the middle mouse
+button in the top box at the top of the mixerstrip you wish to have a
+plugin for. This opens up a window which lists all the plugins. Double
+click on the one you wish to use. In the mixer window, click on the
+plugin to toggle it on and off, option-click to edit its values, or
+shift-click to remove it.
+
+2.2. Are VST plugins supported?
+
+There are several issues here:
+
+1) Generic VST support
+
+ Many people have asked about VST support within Ardour. Work has been
+ done on this, but there are both license issues and technical
+ ones. The licensing issues seem relatively easy to resolve.
+
+ On the technical front, given that the goal is to not require VST
+ developers to build new native Linux versions of their plugins, the
+ most promising approach involves using Wine to support native
+ Windows VST plugins. It is already possible to run most VST plugins as
+ JACK clients and thus use them as inserts with Ardour, but the process
+ of doing so is not what most users would term "convenient".
+
+ However, Wine cannot currently be used within a complex
+ multithreaded application. The Wine development team are working on
+ this, and as a rough guess, I'd expect progress within about 6 months
+ (i.e end of 2003). At that time, it will be possible to use most VST
+ plugins that have their own GUI ("editor") from within Ardour.
+
+ However, initially, this functionality will be available only as
+ part of a for-cost distribution of Ardour.
+
+2) Specific plugins
+
+ a) executable format issues
+
+ Plugins are pieces of executable code. The format used for
+ the files that store this code is different under windows
+ and macos than it is for linux. Some people have managed
+ to find workarounds for this --- there are reports of people
+ running windows-derived buzz plugins under linux, but nobody
+ has looked into trying it with vst plugins.
+
+ Linux also runs on a lot more hardware than windows or MacOS.
+ We assume that when you say linux, you mean "linux on an intel
+ compatible processor", but keep in mind that to most of us,
+ linux means more than that --- it includes the PPC, Sparc, Alpha,
+ ARM, MIPS and many other chip architectures. Of that list,
+ only PPC has any VST plugin support at all.
+
+ This problem would go away if a VST plugin was available as source
+ code, but to my knowledge, only 1 is (freeverb).
+
+ b) OS dependency issues
+
+ Most VST plugin writers do not follow Steinberg's design advice,
+ and write plugins that have operating system dependencies. As
+ a result, even if you could find a way to actually use, say,
+ a windows-format VST plugin on Linux on an Intel machine, the
+ plugin would contain calls to operating system services that
+ don't exist (in the same way) under Linux.
+
+So, the basic answer is "no". I am an active member of the VST-plugins
+mailing list, and I try to encourage people who write free plugins to
+make their source code available so that we can use it under Linux, as
+well as reminding people to try to avoid operating system dependencies
+in their plugins. I think this mostly falls on deaf ears.
+
+2.3. Does Ardour run on non-Linux systems?
+
+Ardour depends on the JACK system to access the sound hardware. Jack
+has (as of this writing) support for Linux, Solaris, and MacOSX. There
+have not been any reports of running Ardour on any platforms besides Linux
+though.
+
+In addition, Ardour has abstracted the JACK dependency, so it can be ported
+to use another sound library. But at the time, it only uses the JACK
+library. The JACK website is http://jackit.sf.net/.
+
+2.4. Ardour needs to have this feature now.
+
+Paul accepts donations through his paypal account. The feature will
+(probably) be added more quickly if you pay him. Contact him first.
+
+2.5. Why doesn't Ardour support MP3s?
+
+Ardour is meant for serious audio work. MP3 is a lossy format
+unsuitable for this. Ardour does export sessions to wav format, which
+is trivial to convert to MP3.
+
+2.6. Does Ardour support MIDI?
+
+Ardour currently supports MIDI in the sense of:
+
+ * functioning as a MIDI Timecode master (it generates MTC)
+ * functioning as a MIDI Timecode slave (experimental; send reports!)
+ * understanding MIDI Machine Control
+ * allowing the user to bind GUI controls (sliders, etc.) to
+ MIDI Continuous Controller and NoteOn/NoteOff messages
+
+It does not offer any facilities for editing or arranging or recording
+or playing MIDI data. There has been talk of integrating Midi
+Mountain, an excellent midi editor. There hasn't been any progress in
+this direction lately, mostly due to other areas that need to be fixed
+up. It's not a trivial affair if the integration is going to proceed
+in a way leaves the result feeling "natural".
+
+2.7. What soundfile formats are supported?
+
+It depends on what version of libsndfile is installed. This link lists the
+latest formats: http://www.mega-nerd.com/libsndfile/#Features
+
+Please note that Ardour requires the 1.x series of libsndfile.
+
+2.8. Can I use multiple cards?
+
+In a word: maybe.
+
+The sync issues that arise even between the same make and model of a card
+aren't worth the effort of fixing. If you want to have more than two
+channels, buy a professional card.
+
+On the other hand, if you already have two professional cards with word-sync,
+you might be able to get them to work. This is several layers removed from
+Ardour; the proper place to ask for help is at http://www.alsa-project.org .
+
+There is more information at http://www.linuxdj.com/audio/quality/#multi
+
+2.9. How do I save captures across partitions?
+
+Ardour lets you specify multiple directories to save captured audio
+in. In the options editor, in the session path box, specify the full
+paths of the directories you wish to use, seperated by colons (:).
+These can be on different partitions or even different disks. Using
+this "software RAID"-like setup can greatly increase your disk
+bandwidth.
+
+--Usability--
+3.1. How do I pan stereo outputs?
+
+Panning works over JACK ports. So even if you have two outputs
+connected to one port, Ardour doesn't consider this to be stereo. You
+need to make sure that you have two ports, and then add one (or more)
+destination to each port.
+
+You need to think of the ports as if they were physical sockets to
+which you can connect as many plugs as you want. A single port means
+mono, even though you can send the signal to many different
+places. Two ports means stereo, even though the right and left signals
+can each go to any number of different places.
+
+3.2. Where's the patch bay?
+
+There is no separate dedicated patch bay. Patch bay functionality
+is integral to the mixer. The mixer can have any number of inputs,
+any number of busses, etc. In other words, it *is* the patchbay.
+
+3.3. How do I do stuff?
+
+Region Dragging (object mode)
+-----------------------------
+
+ click-drag => moves region
+ shift-click-drag => moves region with time position held constant
+ (i.e. across tracks)
+ ctl-click-drag => moves a copy of the region
+ ctl-shift-click-drag => time-constrained movement of a copy of the
+ region
+ snapmod-click-drag => ignores current snap setting
+
+Region Alignment (clicks without motion)
+----------------
+
+ [ all alignment uses:
+
+ 1) current region selection, if it exists
+ 2) else the edit cursor
+ ]
+
+ ctl-click => aligns start of region
+ ctl-shift-click => aligns end of region
+ ctl-alt-click => aligns sync point of region
+
+Marks
+-----
+
+ click in tempo track to create a new tempo mark
+ click in meter track to create a new meter mark
+ click in marker track to create a new marker
+ regular edit op for tempo/meter allows editing
+ regular delete op for all markers (except initial
+ tempo/meter markers)
+ snapmod-click-drag to move a marker while ignoring
+ current snap mode
+
+Editing
+-------
+
+ default is ctl-button3 click
+
+
+Deletion
+--------
+
+ default is shift-button3 click
+
+Context Menu
+------------
+
+ button3 click
+
+Snap Modifier
+-------------
+
+ default is mod3 (typically meta/windows/start key). using
+ ctl or shift or alt will cause problems. you can also
+ use combinations, but again, combinations using ctl and shift
+ will cause problems. mod3 or mod4 are probably your best
+ choices.
+
+Selection (RANGE MODE required)
+---------
+
+ click on a region => make a region selection
+ shift-click on a region => add region to region selection
+ click-drag => make a range selection
+ shift-click-drag => add to range selection
+ ctrl-click-drag => move selection
+
+Separation
+----------
+
+ in range mode:
+
+ a) make a single range selection
+
+ then, to split existing region apart
+
+ b) right click => Selection => Separate region
+
+ OR, to creates a new region without splitting original
+
+ b) switch to object mode
+ c) click on selection and drag
+
+
+solo/mute/rec-enable
+--------------------
+
+ to toggle solo/mute/RE for EVERYTHING:
+
+ ctl-shift-click on a solo/mute/RE button
+
+ to solo/mute/RE mix group (when group is not active)
+
+ ctl-click on solo/mute button
+
+ to toggle solo-safe status (which appears to not work
+ correctly right now)
+
+ shift-click on solo button
+
+ to momentarily engage solo while pressing a mouse button
+
+ use button2 instead of button1
+
+
+gain sliders
+------------
+
+ shift-click to reset to 0dB
+ ctl-click-drag for finer scale
+ ctl-alt-click-drag for even finer scale
+
+panners
+-------
+
+ (stereo): shift-click to reset to center
+
+--Misc--
+4.1. What's the deal with JACK?
+
+JACK is the Jack Audio Connection Kit. There is a basic problem with
+audio+MIDI apps on Linux at this time: they are not able to exchange
+data with each other in situations where low latency is a system goal.
+There are systems (aRts, MidiShare, parts of alsa-lib) that allow data
+sharing, but not when the latencies get down below 20ms.
+
+JACK is an API that solves this problem. Also, and quite importantly,
+JACK drastically simplifies the programming of audio applications.
+Applications that use JACK do not need to know anything about audio
+hardware. They do not interact with it directly in any way
+whatsoever. All they do is provide a few callbacks to the server they
+connect with; the primary callback is responsible for producing and/or
+consuming a specified amount of data whenever it is called. This is a
+'callback' model, and is extremely different from ALSA, OSS, and
+several other audio APIs. It is, however, very similar to Apple's
+CoreAudio, Steinberg's ASIO, the PortAudio library, and most plugin
+APIs. See http://jackit.sf.net/
+
+4.2. Is Ardour internationalized?
+Parts of Ardour are. Work is ongoing to fully internationlize Ardour. If
+you speak a language besides English, feel free to volunteer to help
+translate.
+
+These languages have translations:
+
+gtk-ardour:
+French, German, Italian, Portuguese, Brazilian Portuguese, and Russian
+
+libardour:
+Italian
+
+4.3. How do I get support?
+
+Ardour is a volunteer project. There is no one devoted to providing
+support. However, there is a members only mailing list where someone
+might answer your question. You can join at Ardour's website:
+
+ http://ardour.org/
+
+There is also the IRC #ardour channel on the FreeNode network.
+
+Alternatively, you can pay Paul for specific support. Check with him
+for hourly rates.
+
+4.4. Well, where's the manual?
+
+Currently, the existing documentation is sparse. You might want to check out
+the Protools reference; Ardour is rather similar to it. Also, Paul wants
+users to be able to complete the Mackie HDR tutorial using Ardour; so that
+is another manual to check out. Both are available online from
+<a href=http://digidesign.com/support/documents.html>DigiDesign</a> and <a
+href=http://mackie.com>Mackie</a>.
+
+There is the begining of a manual in Ardour's manual directory. Feel
+free to create your own HOWTOs, tips and tricks sheets, tutorials, or
+whatever you feel like adding.
+
+A couple people have written some documentation to get people started with
+Ardour. It is available at http://www.djcj.org/LAU/ardour/
+
+4.5. Why are all these libraries included? I already have ...
+
+Yes, we know that it's quite likely that you already have gtkmm or
+sigc++ installed on your machine, let alone others. There
+are 2 problems.
+
+Ardour requires either the latest version of these libraries or even a
+version with a patch that has not yet been incorporated into a release
+of the library. Rather than require you to get the library source,
+patch it, recompile and install it, Ardour keeps its own copy, builds
+a static, private version of the library and links against it. That
+way, we don't have to worry about crashes caused by you having the
+wrong version of the library.
+
+The second problem is more general. C++ does not yet have a unified
+"Application Binary Interface", even on a single process
+architecture+OS combination. This is unlikely to ever change (it was
+encouraged by the inventor of C++). This means that libraries compiled
+with one compiler are not always compatible with applications compiled
+with another compiler. By "another compiler", we can mean something as
+subtle as a different version of g++. Worse, because many C++
+libraries feature inlined code, we even need to be sure you compile
+against exactly the same version of the library as other parts of
+Ardour will use. Even worse, there are compile time flags you or
+someone else could give to a C++ compiler that would make the library
+incompatible in subtle ways with code compiled with different flags.
+
+After a year of trying to address these problems "the normal way", the
+Ardour team gave up and decided to include every necessary library
+that is written in C++ and/or has patches required. You may not like
+this very much, but trust us, you would like the alternative even
+less.
+
+4.6. Why not another frontend to libardour? Why not QT?
+
+The GTK+ frontend to libardour is almost 7 times the size of libardour. GUIs
+for these sort of programs are very large and detail orientated. It would be
+a waste of time to try to reimplement Ardour with another widget set. This is
+also why there won't be a native port of Ardour to MacOS X.
diff --git a/DOCUMENTATION/README b/DOCUMENTATION/README
new file mode 100644
index 0000000000..b1e85b4d37
--- /dev/null
+++ b/DOCUMENTATION/README
@@ -0,0 +1,101 @@
+ ARDOUR README
+
+ Paul Davis <paul@linuxaudiosystems.com> June 2003
+
+Welcome to Ardour. This program is still very much under development,
+but has now reached the stage where it will be productive and useful
+to have other people testing it out and perhaps (hopefully!) fixing
+bugs and adding features.
+
+**** SECURITY *******************************************************
+
+To run Ardour with the lowest latencies, it's necessary to use POSIX
+Real-Time Scheduling as well as locking all the memory it uses into
+physical RAM. These requirements can only be met if Ardour is run with
+root priviledges.
+
+On the other hand, things are not so bad. If you don't attempt to
+install it setuid root (which actually won't work anyway), then
+someone needs to have gained root access in order to run it like this.
+If they already have root access, Ardour is the least of your
+problems. So relax. We'll use capabilities once Linux kernels start
+arriving with them enabled, though this won't help too much with
+security, since the relevant capabilities would still allow a wiley
+cracker to do anything at all.
+
+Alternatively, you can choose to run Ardour without RT scheduling, and
+then there's no concern at all. It just won't be useful in low latency
+situations, which are desirable in most studio environments. Note that
+this is not so important if you have audio hardware that is capable of
+doing "hardware monitoring" - in this case, a lack of low latency will
+simply make response to Ardour's UI controls a little sluggish, but
+monitoring during capture will be excellent.
+
+**** HARDWARE COMPATIBILITY *****************************************
+
+Ardour uses JACK for all its audio I/O, thus providing seamless
+connections to both audio hardware and other applications. Its really
+not the right place to discuss JACK, but in case you are wondering:
+
+Although JACK uses the ALSA 0.9.0 API, it exercises this API in a way
+that no other application to date has done, and it also tries to use
+certain hardware features that again, no other existing applications
+use. As a result, although complete portability to all ALSA supported
+h/w is an eventual and very achievable goal, there may be issues
+surrounding h/w compatibility. Please remember that my primary goal
+with JACK is to build a professional audio system, and with Ardour, a
+professional digital audio workstation. If they happen to be useful
+for people with 2/4 channel cards, then great, but it's not my own
+primary focus.
+
+One other important issue is that your audio interface must support
+full duplex i/o with the same sample format for both capture and
+playback. This means, for example, that the SoundBlaster AWE cannot
+be used with JACK in full duplex mode - it only supports full duplex
+i/o if one of the two directions (capture or playback) is 8 bit and
+the other is 16. Very few cards have this kind of limitation, and if
+they do, they typically are not suitable for use with applications
+like JACK or Ardour for other reasons.
+
+To date, JACK has been run with:
+
+ RME Hammerfall (Digi9652) (26 channels in, 26 channels out)
+ RME Hammerfall DSP (hdsp) (26 channels in, 26 channels out)
+ RME Hammerfall Light (Digi9636) (18 channels in, 18 channels out)
+ Midiman Delta series (ice1712 chipset) (12 channels in, 10 channels out)
+
+ Various consumer grade audio interfaces, typically with 2 channels
+ in, 2/4 channels out, including:
+
+ Hoontech 4Dwave-NX (Trident chipset)
+ Ensoniq 5880
+ Soundblaster 32
+ Soundblaster 64
+ Creative SBLive64
+
+and many more.
+
+So, basically, it appears to work for just about all ALSA supported
+cards, which is the goal.
+
+**********************************************************************
+
+BUG REPORTING
+-------------
+
+Bugs should be reported to http://ardour.org/mantis/ . They are more
+likely to be remembered and dealt with there. Please check the existing bugs
+to make sure it has not already been reported and/or fixed in CVS.
+
+COMPILING ARDOUR
+----------------
+Please see the file "BUILD".
+
+RUNNING ARDOUR
+--------------
+
+NOTE: You must have a running JACK server before starting Ardour.
+ -----------------------------------------------------------
+
+Typing "ardour" will hopefully have some effect. "ardour --help" lists
+available options.
diff --git a/DOCUMENTATION/README.es b/DOCUMENTATION/README.es
new file mode 100644
index 0000000000..bc29f64608
--- /dev/null
+++ b/DOCUMENTATION/README.es
@@ -0,0 +1,139 @@
+ ARDOUR README.es
+
+ Paul Davis <paul@linuxaudiosystems.com> June 2003
+
+Bienvenido a Ardour. Este programa aun esta bajo desarrollo,
+pero ha llegado a un estado en el cual es productivo y util tener
+a otras personas probandolo y tal vez (con suerte!) arreglando errores
+y agregando nuevas caracteristicas.
+
+**** SEGURIDAD *******************************************************
+
+Para ejecutar Ardour con la mas baja latencia posible, es necesario usar
+POSIX Real-Time Scheduling (tiempo Real) como tambien bloquear toda la
+memoria que usa en la memoria fisica de la RAM. Estos requerimientos solo
+se pueden cumplir si Ardour es ejecutado con privilegios de usuario root.
+
+Por otro lado, esto no es tan malo. Si no planea instalar a Ardour
+usando el comando "setuid root"(lo cual no funcionaria de todas formas),
+entonces alguna persona que use su estacion de trabajo debera tener
+que haber "ganado" privilegios de acceso root para hacerlo funcionar
+de esa forma.Si esa otra persona ya tiene acceso de tipo root, Ardour
+es la menor de sus preocupaciones. Asi que, relajese. Usaremos
+capabilities (privilegios root) una vez que los Kernels de Linux empiecen
+a aparecer con estas ya activadas, aunque esto no ayudara mucho a la
+seguridad, ya que las mencionadas "capabilities" habilitarian a cualquier
+hacker astatuto a hacer lo que quiciera.
+
+Alternativamente, usted puede elegir ejecutar a Ardour sin Scheduling
+de Tiempo Real, lo cual no es tan terrible. Simplemente no va a ser util
+en situaciones que demandan baja latencia, las cuales son deseables en
+la mayoria de los ambientes de estudios.
+Note que esto pierde importancia en el caso que usted disponga de
+hardware de audio capaz de hacer "monitorizacion por hardware". Esto
+hace recaer gran parte del peso de procesamiento sobre el dispositivo
+de audio y no sobre el CPU como es el caso de la "monitorizacion por
+software". En el caso de monitorizacion por hardware, la falta de baja
+latencia hara que los controles de la interfaz visual de Ardour
+reaccionen con menos fluidez, sin embargo la monitorizacion durante la
+captura sera excelente.
+
+**** COMPATIBILIDAD DE HARDWARE *************************************
+
+Ardour usa JACK para todo el manejo de entradas y salidas de audio,
+lo cual provee conecciones directas al hardware de audio y a otras
+aplicaciones compatibles con JACK. Este no es el lugar mas apropiado
+para discutir acerca de JACK, pero en caso de que se estubiera
+preguntando:
+
+Aunque JACK usa la libreria ALSA 0.9.0, JACK la aprovecha de una forma
+que ninguna otra aplicacion lo ha hecho hasta ahora y, tambien intenta
+usar ciertas caracteristicas de hardware que nuevamente, ninguna de las
+actuales aplicaciones usa. Como resultado, aunque una completa
+portabilidad a todo el hardware soportado por ALSA es un objetivo
+eventualmente realizable, puede ser que nazcan problemas relacionados
+con la compatibildad de hardware. Por favor recuerde que mi objetivo
+principal con JCK es el de crear un sistema profesional de audio y, con
+Ardour, una estacion de trabajo de audio digital profesional. Si estos
+terminan siendo utiles para personas con placas de 2/4 canales, muy bien,
+pero ese no es mi foco de interes principal.
+
+Otro punto importante es que su dispositivo de sonido debe soportar
+full duplex de entrada/salida (reproduccion y grabacion simultaneas)
+con el mismo formato para la captura y la reproduccion (no se puede
+usar una frecuencia de muestreo de 44.1 khz para reproducir y una
+de 48khz para grabar, ambas deben ser iguales, lo mismo sucede para
+la resolucion en bits. Esto significa, por ejemplo, que la placa
+SoundBlaster AWE no puede ser usada con JACK en modo full duplex.
+-Esta placa solo soporta fullduplex si una de las dos (grabacion o
+reproduccion) usa 8 bits y la otra 16 bits.
+Este tipo de limitacion existe solo en algunas placas y, de ser asi
+no son adecuadas para el uso en aplicaciones como JACK y ARDOUR por
+otras razones.
+
+Hasta la fecha, JACK fue probado con las siguientes interfaces de audio:
+
+ RME Hammerfall (Digi9652) (26 channels in, 26 channels out)
+ RME Hammerfall DSP (hdsp) (26 channels in, 26 channels out)
+ RME Hammerfall Light (Digi9636) (18 channels in, 18 channels out)
+ Midiman Delta series (ice1712 chipset) (12 channels in, 10 channels out)
+
+ Varios chips de sonido de nivel de consumidor (relativamente baratas),
+ tipicamente con 2 canales de entrada y 2/4 de salida,incluyendo:
+
+ Hoontech 4Dwave-NX (chipset Trident)
+ Ensoniq 5880
+ Soundblaster 32
+ Soundblaster 64
+ Creative SBLive64
+
+y muchas mas.
+
+Asi que, basicamente, parece funcionar con practicamente todas aquellas
+placas que son soportadas por ALSA, lo cual es el objetivo.
+
+**********************************************************************
+
+REPORTES DE ERRORES EN CODIGO (BUGS)
+-------------------------------------
+
+Los bugs deben ser reportados a http://ardour.org/mantis/ . Es mas probable
+que estos sean recordados y analizados alli. Por favor, chequee alli la lista
+de bugs ya reportados para asegurarse que el que usted encontro no haya sido
+reportado aun o haya sido resuelto en CVS.
+
+PARA COMPILAR ARDOUR
+--------------------
+Vea el archivo "BUILD" (por ahora en ingles, espaniol mas adelante).
+
+EJECUTANDO ARDOUR
+-----------------
+
+NOTA: Debe haber ya un server JACK corriendo antes de ejecutar Ardour
+ ---------------------------------------------------------------
+
+* Escribiendo ardour en una consola y presionando ENTER o INTRO deberia iniciar
+ el programa.
+
+* "ardour --help" muestra las opciones disponibles desde la linea de comando
+
+
+
+
+
+
+
+
+
+Nota de Traduccion (Spanish Translation Note)
+---------------------------------------------
+#Nota del tipeo:la letra pronunciada ENIE aparece en este archivo
+#como ni (letra "n" y letra "i") para mayor compatibilidad con todos
+#los visores de texto.
+#Asi mismo no se han aplicado las tildes(acentos).
+#Estos no son errores de tipeo. Si llegara a encontrar algun otro error
+#en cualquiera de los archivos con extension ".es" por favor
+#hagamelo saber a alexkrohn@fastmail.fm
+# Muchas gracias
+# Alex
+
diff --git a/DOCUMENTATION/README.fr b/DOCUMENTATION/README.fr
new file mode 100644
index 0000000000..eba5aafd54
--- /dev/null
+++ b/DOCUMENTATION/README.fr
@@ -0,0 +1,113 @@
+ ARDOUR -- LISEZ-MOI
+
+ Paul Davis <paul@linuxaudiosystems.com> Juin 2003
+
+Bienvenue sur Ardour. Ce programme est encore en cours de développement,
+mais a atteint un état où il peut être utile et productif afin que
+d'autres personnes puissent le tester et peut-être (je l'espère !) corriger
+les bogues et ajouter des fonctionnalités.
+
+**** SÉCURITÉ *******************************************************
+
+Afin d'utiliser Ardour avec un temps de latence le plus bas possible,
+il est nécessaire d'utiliser l'ordonnancement temps réel POSIX ainsi
+que de verrouiller toute la mémoire qu'il utilise en mémoire vive physique.
+Ces pré requis ne peuvent être atteint que lorsque Ardour est lancé
+avec les privilèges du super-utilisateur (root).
+
+D'un autre côté, ce n'est pas si grave que ça. Si vous n'essayez pas
+de l'installer en setuid root (ce qui ne marchera pas de toute façon),
+alors les utilisateurs devront avoir obtenu l'accès root pour pouvoir le
+lancer comme cela. S'ils ont déjà l'accès root, Ardour est bien le dernier
+de vos problèmes. Donc tranquillisez-vous. Nous utiliserons les "capacités"
+(capabilities en anglais, NdT) quand les noyaux Linux arriverons avec
+leur support activé, bien que les capacités en question autoriserons
+toujours un cracker mal intentionné à faire à peu près n'importe quoi.
+
+L'alternative est de lancer Ardour sans ordonnancement temps-réel, dans
+ce cas, il n'y a plus de souci. Ardour ne sera juste plus très utile
+dans des conditions de faible latence, ce qui est désirable dans la
+plupart des environnements de studio. Notez que cela n'est pas si important
+lorsque vous avez du matériel audio qui est capable de faire du
+"monitoring matériel" -- dans ce cas, un temps de latence trop important
+provoquera juste des temps de réponse un peu longs pour l'interface
+utilisateur d'Ardour, mais le monitoring pendant l'enregistrement
+sera excellent.
+
+
+**** COMPATIBILITÉ MATÉRIELLE *****************************************
+
+Ardour utilise JACK pour toutes ses entrés/sorties audio, fournissant
+ainsi des connexions transparentes au matériel audio ainsi qu'à d'autres
+applications. Cela n'est pas du tout l'endroit pour parler de JACK,
+mais dans le cas où vous vous poseriez la question :
+
+Bien que JACK utilise l'API (Application Programming Interface, NdT) ALSA
+0.9.0, il utilise cette API d'une manière que nulle autre application
+ne l'a jamais fait jusqu'à présent, et essaie aussi d'utiliser certaines
+possibilités matérielles qui également n'ont jamais été employées par
+d'autres applications. En conséquence, bien que la portabilité complète de
+tout matériel supporté par ALSA est un objectif très atteignable, il peut
+y avoir des problèmes concernant la compatibilité matérielle. Veuillez
+garder en mémoire que le but principal avec JACK est d'obtenir
+un système audio professionnel, et avec Ardour, d'obtenir une station
+de travail audio-numérique professionnelle. S'ils parviennent à être
+utilisés par des gens avec des cartes audio ayant 2/4 canaux, génial,
+mais ce n'est pas ma priorité.
+
+Un autre problème important est que votre interface audio doit supporter
+l'entrée/sortie en mode full duplex avec le même format d'échantillonage
+pour l'enregistrement que pour la restitution. Cela veut dire, par exemple,
+que la SoundBlaster AWE ne peut être utilisée par JACK en mode full duplex
+-- elle supporte seulement l'entrée/sortie en full duplex si l'une des
+deux directions (enregistrement ou restitution) est en 8 bits et
+ que l'autre est en 16 bits. Très peu de cartes ont cette limitation,
+ et si c'est le cas, elles ne sont de toute façon pas adéquates pour des
+utilisations avec des applications telles que JACK ou Ardour pour d'autres
+raisons.
+
+À ce jour, JACK a été utilisé avec :
+
+ RME Hammerfall (Digi9652) (26 canaux en entrée, 26 canaux en sortie)
+ RME Hammerfall DSP (hdsp) (26 canaux en entrée, 26 canaux en sortie)
+ RME Hammerfall Light (Digi9636) (18 canaux en entrée, 18 canaux en sortie)
+ Midiman Delta series (ice1712 chipset) (12 canaux en entrée, 10 canaux en sortie)
+
+Diverses interface audio grand public, généralement avec deux canaux d'entrée, deux
+canaux de sortie, incluant :
+
+ Hoontech 4Dwave-NX (Trident chipset)
+ Ensoniq 5880
+ Soundblaster 32
+ Soundblaster 64
+ Creative SBLive64
+
+et bien d'autres.
+
+Donc, pour résumer, il semble fonctionner pour toute carte supporté par ALSA, ce qui
+est le but.
+
+**********************************************************************
+
+RAPPORT DE BOGUES
+-----------------
+
+Les bogues doivent être rapportés sur http://ardour.org/mantis/. Ils seront
+certainement plus à même d'être conservés et traités à cet endroit. Veuillez
+consulter les bogues existant afin d'être sûr que le votre n'a pas déjà été
+rapporté et/ou corrigé dans le CVS.
+
+
+COMPILER ARDOUR
+---------------
+Veuillez consulter le fichier "BUILD".
+
+
+LANCER ARDOUR
+-------------
+
+NOTE : Vous devez avoir un serveur JACK lancé avant de lancer Ardour.
+ --------------------------------------------------------------
+
+Taper "ardour" devrait sans doute avoir quelque effet. "ardour --help" liste
+les options disponibles.
diff --git a/DOCUMENTATION/README.it b/DOCUMENTATION/README.it
new file mode 100644
index 0000000000..8a2111fb9c
--- /dev/null
+++ b/DOCUMENTATION/README.it
@@ -0,0 +1,276 @@
+ ARDOUR README.it
+
+ Paul Davis <paul@linuxaudiosystems.com> June 2003
+ Italian Traslation by Vieri Verze <poe@softhome.net> August 2002
+ Update by Filippo Pappalardo <filippo@email.it> December 2003
+
+Benvenuti in Ardour. Sebbene questo programma sia ancora in via di
+sviluppo, e` pronto a rendervi produttivi, permettervi di testarlo
+e (si spera!) risolvere i bug e aggiungere nuove caratteristiche.
+
+**** SICUREZZA *******************************************************
+
+Per eseguire Ardour con la latenza piu` bassa e` necessario usare il
+POSIX Real-Time Scheduling e disporre di tutta la memoria di cui ha
+bisogno sotto forma di RAM fisica. Queste richieste possono essere
+soddisfatte soltanto se Ardour viene eseguito con i privilegi di root.
+
+D'altra parte non tutto il male viene per nuocere. Se non installate
+Ardour con setuid root (che comunque non funziona), gli altri avranno
+bisogno dei privilegi di root per eseguirlo. Se li hanno Ardour e` il
+vostro ultimo problema. Quindi rilassatevi. Implementeremo le
+capabilities non appena il kernel le supportera`, benche` questo non
+aiuti molto la sicurezza, dal momento che un cracker intelligente
+potra` comunque fare di tutto.
+
+In alternativa, potete scegliere di esguire Ardour senza il RT
+scheduling e non avrete nessun problema. Non sara` molto utile nelle
+situazioni in cui e` necessaria una bassa latenza. Praticamente nella
+maggior parte dei casi. Ricordatevi che tutto questo e` irrilevante se
+possedete una scheda audio capace di fare "hardware monitoring".
+In questo caso una latenza piu` alta rendera` un po` lenti i controlli
+della UI di Ardour, mentre il monitoring durante la capture saranno
+eccellenti.
+
+**** COMPATIBILITA` HARDWARE *****************************************
+
+Ardour usa il server audio JACK per tutte le operazioni di I/O. In
+questo modo fornisce un impareggiabile sistema di comunicazione con il
+substrato hardware audio e le altre applicazioni. Non è certamente
+questo il luogo per discutere di JACK, ma se vi state chiedendo:
+
+JACK usa le ALSA 0.9.0 API. La particolarita` e` che le sfrutta in
+un modo completamente nuovo soprattutto per quanto riguarda l' uso
+dell' hardware. Come risultato, benche` il totale supporto delle
+periferiche h/w da parte di ALSA sia un successo facilmente ottenibile,
+potrebbero esserci problemi concernenti la compatiblita` h/w. Bisogna
+tenere presente che il mio scopo principale e` di creare con JACK un
+sistem audio professionale, e con Ardour un sistema professionale di
+HDR. Se puo` essere utile a utenti con schede a 2/4 canali, ben venga,
+ma ricordate che questo non e` l' interesse primo.
+
+Un altro aspetto importante e` che la vostra interfaccia audio deve
+supportare l' I/O in full duplex nello stesso formato sia in registrazione
+che suonando. Significa, per esempio, che una Soundblaster AWE non
+potra` essere usata con JACK in modalita` full duplex, a meno che una
+delle due direzioni (registrazione o playback) e` a 8 bit e l' altra a 16.
+Sono poche le schede che hanno questo tipo di limitazione, e non sono
+generalmente adatte ad essere usate con JACK e Ardour per altri motivi.
+
+Ad oggi, Ardour ha girato con:
+
+ RME Hammerfall (Digi9652) (26 canali in, 26 canali out)
+ RME Hammerfall Light (Digi9636) (18 canali in, 18 canali out)
+ Midiman Delta series (ice1712 chipset) (12 canali in, 10 canali out)
+
+ Diverse interfacce di fascia consumer, solitamente a 2 canali in,
+ 2/4 canali out, incluse:
+
+ Hoontech 4Dwave-NX (Trident chipset)
+ Ensoniq 5880
+ Soundblaster 32
+ Soundblaster 64
+ Creative SBLive64
+
+Al momento sembra funzionare con tutte le schede supportate da ALSA,
+che e` l'obiettivo proposto.
+
+**** SEGNALARE UN BUG ************************************************
+
+I bug vanno segnalati ad http://ardour.org/mantis/ . Dove è
+probabile che vengano presi in considerazione e trattati. Prima di
+segnalare un bug è opportuno accertarsi che non sia gia` stato
+segnalato e/o eliminato in cvs.
+
+**** COMPILAZIONE E INSTALLAZIONE ************************************
+
+1) GNU AUTOCONF RATIONALIZATION
+-------------------------------
+
+GNU autoconf e` un sistema intelligente, ma ha una grande lacuna.
+Di default, autoconf (adesso aclocal) controlla UNA sola directory
+alla ricerca dei file di cui ha bisogno. Sarebbe OK se non venissero
+installati altri pacchetti che qualche volta mettono i loro file di
+autoconf in /usr/local/lib/share/aclocal e altre volte in
+/usr/lib/share/aclocal.
+
+Succede che autoconf non riesce a trovare i file di cui ha bisogno per
+costruire Ardour, dal momento che molta gente ha una moltitudine di
+librerie installate dalla distribuzione (i file di autoconf finiscono
+in /usr/local/lib...) e dai pacchetti pre-costruiti (in questo caso i
+pacchetti finiscono solitamente in /usr/lib...).
+
+Per la vostra tranquillita`, vi raccomando di eseguire i seguenti passi
+da root. Controllate i contenuti di entrambe le direcroty prima di
+eseguire questi comandi in modo da non cancellare accidentalmente la
+corretta versione di un file autoconf:
+
+ * Se avete esntrambe le directory:
+
+ cd /usr/lib/share/aclocal
+ cp *.m4 /usr/local/lib/share/aclocal
+ cd ..
+ rm -rf aclocal
+ ln -s /usr/local/lib/share/aclocal .
+
+ * Se avete solo /usr/lib/share/aclocal
+
+ cd /usr/local/lib
+ ln -s /usr/lib/share/aclocal .
+
+Alcune distribuzioni hanno aclocal in altre directory. YMMV.
+
+2. COMPILARE
+------------
+
+Prima di compilare Ardour, accertatevi di avere installato:
+
+* Strumenti:
+
+ gcc/g++ 2.95.3 o superiore (funziona anche gcc/g++ 3.x)
+ autoconf 2.52 o superiore
+ automake 1.5 o superiore
+ libtool 1.4.2 o superiore
+ gettext 0.11.5 o superiore
+ pkgconfig 0.8.0 o superiore
+ http://www.freedesktop.org/software/pkgconfig/
+
+ sono necessari anche lex e yacc
+ andra` bene qualsiasi versione di bison >= 1.35
+
+* Librerie:
+
+Le versioni raccomandate, quando necessario, sono presenti sotto le
+versioni generiche.
+
+ ALSA 0.9.X (CVS o snapshot release) (http://www.alsa-project.org)
+
+ JACK (http://jackit.sourceforge.net)
+
+ libxml2 2.5.X (http://xmlsoft.org/)
+
+ libart_lgpl 2.3.X
+
+ - available as part of gnome-libs, which you may already
+ have on your system.
+
+ - also available via download from GNOME source FTP sites.
+ - see ftp://ftp.gnome.org/pub/GNOME/MIRRORS.htmland then
+ follow to sources/libart_lgpl
+
+ glib 1.2 (http://www.gtk.org)
+ glib-1.2.8 (inclusa nella maggior parte delle distribuzioni)
+
+ GTK+ 1.2 (http://www.gtk.org)
+ gtk+-1.2.8 (inclusa nella maggior parte delle distribuzioni)
+
+ libsndfile (http://www.zip.com.au/~erikd/libsndfile)
+ libsndfile-0.0-28
+
+ libsamplerate (http://www.mega-nerd.com/SRC/)
+ libsamplerate 0.0.13 o superiore
+
+ the LADSPA SDK (http://www.ladspa.org/)
+ (Guardate sotto)
+
+ raptor (http://www.redland.opensource.ac.uk/raptor/)
+
+ lrdf (richiede raptor) (http://plugin.org.uk/lrdf/)
+ liblrdf 0.3.1 or higher
+
+Ottenere LADSPA
+
+Nota: La Linux Audio Developers Simple Plugin API (LADSPA) consiste
+in realta` di un semplice file header, già incluso nei sorgenti di
+Ardour
+
+Vorrete usare anche i suoi plugins, percui andate oltre e scaricate
+l' intero pacchetto (non e` grande), da www.ladspa.org.
+
+Vi raccomando di scaricare un eccelente set di plugins per LADSPA,
+programmati da Steve Harris. Il link e` http://plugin.org.uk/.
+Trasformeranno Ardour in una appicazione vermante utile. Altri plugins
+di LADSPA sono in programmazione percui tenete d' occhio la Linux
+Audio Development mailing list.
+
+2A) COMPILARE DA CVS
+---------------------
+
+Posizionatevi nel path in cui volete copiare i CVS di Ardour (la '%'
+e` il vostro shell prompt):
+
+% cd /usr/local/src # e` un esempio, potete scegliere un path qualsiasi
+% cvs -d:pserver:anoncvs@ardour.org:/cvsroot/ardour login
+ # (premete enter/return quando vi sara` chiesta
+ la password)
+% cvs -d:pserver:anoncvs@ardour.org:/cvsroot/ardour -z3 co ardour
+
+2A.1) CHE TIPO DI COMPILAZIONE?
+--------------------------------
+
+Il prossimo passo è quello di decidere se si vuole una installazione per
+sviluppatori o per semplici utenti. Se siete sviluppatori, potrebbe essere
+una buona idea compilare libardour come libreria condivisa, cosi` da evitare
+di collegare l'eseguibile ogni volta che cambiate versione di libreria.
+Se siete semplici utenti, questo renderebbe solo la vita più difficile.
+In caso siate sviluppatori dunque eseguite:
+
+ touch ardour/libs/ardour/BUILD_FOR_DEVELOPMENT
+
+Questo fara` si` che libardour sia compilata come libreria condivisa. Dovreste
+conseguentemente passare il parametro --enable-development-build a configure.
+
+2A.2) PREPARARE IL SISTEMA PER LA COMPILAZIONE
+----------------------------------------------
+
+Ora costruite i file autoconf/automake:
+
+% cd ardour
+% sh autogen.sh
+
+Andate al passo 3.
+
+2B) COMPILARE DA UN TARBALL
+---------------------------
+
+Come al solito: prelevate e scompattate il tarball. La directory creata,
+ardour-<versione>, e` chiamata piu` sotto "$AD".
+
+3) COME COMPILARE
+-----------------
+
+ ./configure (con tutte i parametri che vorrete passare)
+ make
+ make install
+
+Se siete uno sviluppatore che intende lavorare su libardour, potreste
+voler usare il parametro --enable-development-build, che colleghera`
+dinamicamente l'eseguibile a libardour, risparmiando molto tempo
+nell'evitare un collegamento statico da effettuare ogni volta che si
+operano cambiamenti su libardour.
+
+Se volete compilare ardour in modo che possiate farne il `debugging`,
+dovreste usare anche il parametro --disable-optimize. Senza questo
+Ardour viene compilato con ottimizzazioni estreme ed il risultato non
+può essere oggetto di `debugging` in modo efficace.
+
+Come tutti gli script di configurazione, se non volete che
+l' installazione avvenga ne "solito posto", aggiungete un --prefix al
+comando ./configure. Potreste anche considerare di aggiungere un
+parametro --sysconfdir, dal momento che `make install` tenterà di
+installare tutti i file di configurazione in un percorso che tiene
+conti di questo parametro.
+
+La compilazione ci mette un po`. Eseguendo make -j3 su un dual PII-450
+l'intero processo impiega circa 10-15 minuti.
+
+4. ESEGUIRE ARDOUR
+------------------
+
+NOTA: Dovete prima di tutto eseguire il server JACK.
+ ----------------------------------------------
+
+
+Se avete eseguito "make install", allora potete digitare "ardour" e
+qualcosa succedera`. Col comando "ardour --help" otterrete una
+lista delle possibili opzioni.
diff --git a/DOCUMENTATION/README.ru b/DOCUMENTATION/README.ru
new file mode 100644
index 0000000000..fe5697535e
--- /dev/null
+++ b/DOCUMENTATION/README.ru
@@ -0,0 +1,108 @@
+ ARDOUR README.ru
+
+ Paul Davis <paul@linuxaudiosystems.com> June 2003
+ Russian translation by Igor Blinov <pitstop@nm.ru> November 2003
+
+÷ÁÓ ÐÒÉ×ÅÔÓÔ×ÕÅÔ Ardour. üÔÁ ÐÒÏÇÒÁÍÍÁ ÎÁÈÏÄÉÔÓÑ × ÓÔÁÄÉÉ ÒÁÚÒÁÂÏÔËÉ,
+ÎÏ ÕÖÅ ÍÏÖÅÔ ÉÓÐÏÌØÚÏ×ÁÔØÓÑ ÎÁ ÐÒÁËÔÉËÅ, Ë ÔÏÍÕ ÖÅ ÐÏÌÅÚÎÏ ËÏÇÄÁ
+ÄÒÕÇÉÅ ÌÀÄÉ ÔÅÓÔÉÒÕÀÔ Å£, ÅÓÌÉ ÓÌÕÞÁÅÔÓÑ (ÐÏÞÔÉ Õ×ÅÒÅÎ!) ÉÓÐÒÁ×ÌÑÀÔ
+ÏÛÉÂËÉ É ÒÁÓÛÉÒÑÀÔ ÆÕÎËÃÉÏÎÁÌØÎÙÅ ×ÏÚÍÏÖÎÏÓÔÉ.
+
+**** âåúïðáóîïóôø ***************************************************
+
+òÁÂÏÔÁ Ardour ÔÒÅÂÕÅÔ ÍÉÎÉÍÁÌØÎÏÅ ×ÒÅÍÑ ÒÅÁËÃÉÉ ÎÁ ÓÏÂÙÔÉÑ (low latency),
+ÞÔÏ ÔÒÅÂÕÅÔ ÉÓÐÏÌØÚÏ×ÁÎÉÑ POSIX-ÐÏÄÓÉÓÔÅÍÙ ÒÅÁÌØÎÏÇÏ ×ÒÅÍÅÎÉ (POSIX
+Real-Time Scheduling) É ×ÄÏÂÁ×ÏË ÂÌÏËÉÒÕÅÔ ×ÓÀ ÉÓÐÏÌØÚÕÅÍÕÀ ÐÁÍÑÔØ
+× ïúõ (RAM). üÔÉ ÔÒÅÂÏ×ÁÎÉÑ ×ÙÐÏÌÎÉÍÙ, ÔÏÌØËÏ ÅÓÌÉ Ardour ÚÁÐÕÝÅÎ Ó
+ÐÒÉ×ÉÌÅÇÉÑÍÉ ÐÏÌØÚÏ×ÁÔÅÌÑ root.
+
+ó ÄÒÕÇÏÊ ÓÔÏÒÏÎÙ ×Ó£ ÎÅ ÔÁË ÕÖ É ÐÌÏÈÏ. åÓÌÉ ×Ù ÎÅ ÍÏÖÅÔÅ ÕÓÔÁÎÏ×ÉÔØ
+ÆÌÁÇ setuid root (ËÏÔÏÒÙÊ ÐÏÍÏÇÁÅÔ ÎÅ ×Ï ×ÓÅÈ ÓÌÕÞÁÑÈ), ÔÏÇÄÁ
+ÎÅÏÂÈÏÄÉÍÏ ÐÏ×ÙÓÉÔØ Ó×ÏÉ ÐÒÉ×ÉÌÅÇÉÉ ÄÏ root ÄÌÑ ÔÏÇÏ, ÞÔÏÂÙ Ó ÜÔÉÍÉ
+ÐÒÁ×ÁÍÉ ÚÁÐÕÓÔÉÔØ Ardour. åÓÌÉ ×Ù ÕÖÅ ÉÍÅÅÔÅ ÄÏÓÔÕÐ ËÁË ÐÏÌØÚÏ×ÁÔÅÌØ
+root, × ÔÁËÏÍ ÓÌÕÞÁÅ ÚÁÐÕÓË Ardour ÂÕÄÅÔ ÎÁÉÍÅÎØÛÅÊ ÐÒÏÂÌÅÍÏÊ. éÔÁË.
+÷ ÒÁÂÏÔÅ ÉÓÐÏÌØÚÕÀÔÓÑ ÎÅËÏÔÏÒÙÅ ×ÏÚÍÏÖÎÏÓÔÉ ÑÄÒÁ linux, ËÏÔÏÒÙÅ ÎÅ
+ÓÐÏÓÏÂÓÔ×ÕÅÔ ÂÅÚÏÐÁÓÎÏÓÔÉ, ÔÁË ËÁË ÏÎÉ ÍÏÇÕÔ ÐÏÍÏÞØ ÚÌÏÕÍÙÛÌÅÎÎÉËÕ
+× ÅÇÏ ÐÌÁÎÁÈ.
+
+÷ ÄÒÕÇÏÍ ×ÁÒÉÁÎÔÅ ×Ù ÍÏÖÅÔÅ ÚÁÐÕÓÔÉÔØ Ardour ÂÅÚ ÐÒÉÏÒÉÔÅÔÁ ÒÅÁÌØÎÏÇÏ
+×ÒÅÍÅÎÉ É ÚÁÂÙÔØ ÐÒÏ ÓËÁÚÁÎÎÏÅ ×ÙÛÅ. ïÄÎÁËÏ, ÜÔÏ ÎÅÕÄÏÂÎÏ ÄÌÑ ÓÉÔÕÁÃÉÊ,
+× ËÏÔÏÒÙÈ ÔÒÅÂÕÅÔÓÑ ÍÁÌÏÅ ×ÒÅÍÑ ÚÁÄÅÒÖËÉ ÓÉÇÎÁÌÁ, ÞÔÏ ÖÅÌÁÔÅÌØÎÏ × ÏÂÙÞÎÏÊ
+ÓÔÕÄÉÊÎÏÊ ÒÁÂÏÔÅ. úÁÍÅÞÕ, ÞÔÏ ÜÔÏ ÎÅ ÔÁË ×ÁÖÎÏ, ÅÓÌÉ ×ÁÛÅ ÁÐÐÁÒÁÔÎÏÅ
+ÏÂÅÓÐÅÞÅÎÉÅ ÐÏÄÄÅÒÖÉ×ÁÅÔ ÆÕÎËÃÉÀ "hardware monitoring" - × ÜÔÏÍ ÓÌÕÞÁÅ
+×ÏÚÒÏÓÛÁÑ ÚÁÄÅÒÖËÁ ÓÉÇÎÁÌÁ Õ×ÅÌÉÞÉ×ÁÅÔ ×ÒÅÍÑ ÒÅÁËÃÉÉ ÐÒÉ ×ÏÚÄÅÊÓÔ×ÉÉ
+ÎÁ ÕÐÒÁ×ÌÑÀÝÉÅ ÜÌÅÍÅÎÔÙ ÇÒÁÆÉÞÅÓËÏÇÏ ÉÎÔÅÒÆÅÊÓÁ Ardour, ÚÁÔÏ ËÏÎÔÒÏÌØ
+(ÍÏÎÉÔÏÒÉÎÇ) ÓÉÇÎÁÌÁ × ÐÒÏÃÅÓÓÅ ÚÁÐÉÓÉ ÂÕÄÅÔ ÚÁÍÅÞÁÔÅÌØÎÙÍ.
+
+**** ôòåâï÷áîéñ ë áððáòáôõòå ****************************************
+
+Ardour × Ó×ÏÅÊ ÒÁÂÏÔÅ ÄÌÑ ××ÏÄÁ/×Ù×ÏÄÁ ÁÕÄÉÏÄÁÎÎÙÈ ÉÓÐÏÌØÚÕÅÔ JACK,
+ËÏÔÏÒÙÊ ÏÂÅÓÐÅÞÉ×ÁÅÔ ÉÄÅÁÌØÎÏÅ ÐÏÄËÌÀÞÅÎÉÅ ÐÒÉÌÏÖÅÎÉÊ Ë ÒÅÓÕÒÓÁÍ
+ÁÐÐÁÒÁÔÕÒÙ ÄÌÑ ÒÁÂÏÔÙ ÓÏ Ú×ÕËÏÍ. íÙ ÎÅ ÂÕÄÅÍ ÚÄÅÓØ ÏÂÓÕÖÄÁÔØ JACK,
+ÎÏ ÓËÁÚÁÎÎÏÅ ÎÉÖÅ ÐÏÚ×ÏÌÉÔ ÉÚÂÅÖÁÔØ ÎÅÄÏÒÁÚÕÍÅÎÉÊ:
+
+îÅÓÍÏÔÒÑ ÎÁ ÔÏ, ÞÔÏ JACK ÒÁÂÏÔÁÅÔ ÞÅÒÅÚ ALSA 0.9.0 API, ÏÎ ÉÓÐÏÌØÚÕÅÔ
+ÅÇÏ ÔÁËÉÍ ÏÂÒÁÚÏÍ, ÞÔÏ ÄÒÕÇÉÅ ÐÒÉÌÏÖÅÎÉÑ × ÜÔÏÔ ÍÏÍÅÎÔ ÎÅ ÍÏÇÕÔ
+ÒÁÂÏÔÁÔØ Ó ÎÉÍ, Ë ÔÏÍÕ ÖÅ ÚÁÄÅÊÓÔ×ÕÀÔÓÑ ÎÅËÏÔÏÒÙÅ ÏÓÏÂÅÎÎÏÓÔÉ
+ÁÐÐÁÒÁÔÕÒÙ, ÎÅÉÓÐÏÌØÚÕÅÍÙÅ ÄÒÕÇÉÍÉ ÐÒÉÌÏÖÅÎÉÑÍÉ. ðÏÌÎÁÑ ÓÏ×ÍÅÓÔÉÍÏÓÔØ
+ÓÏ ×ÓÅÍÉ Ú×ÕËÏ×ÙÍÉ ËÁÒÔÁÍÉ, ÐÏÄÄÅÒÖÉ×ÁÅÍÙÍÉ ALSA, Ñ×ÌÑÅÔÓÑ ÄÏÓÔÉÖÉÍÏÊ
+É ÏÞÅÎØ ÖÅÌÁÔÅÌØÎÏÊ ÃÅÌØÀ. óÌÅÄÓÔ×ÉÅÍ ÜÔÏÇÏ ÍÏÖÅÔ Ñ×ÉÔØÓÑ ÐÏÄÄÅÒÖËÁ
+ÏÂÏÒÕÄÏ×ÁÎÉÑ Ó ×ÏÚÍÏÖÎÏÓÔÑÍÉ ÏËÒÕÖÁÀÝÅÇÏ Ú×ÕËÁ (surround sound).
+ïÄÎÁËÏ, ÍÏÑ ÏÓÎÏ×ÎÁÑ ÃÅÌØ - ÜÔÏ ÐÏÓÔÒÏÅÎÉÅ ÎÁ ÏÓÎÏ×Å JACK
+ÐÒÏÆÅÓÓÉÏÎÁÌØÎÏÇÏ Ú×ÕËÏ×ÏÇÏ ÓÅÒ×ÅÒÁ Ó Ardour × ËÁÞÅÓÔ×Å ÎÅ ÍÅÎÅÅ
+ÐÒÏÆÅÓÓÉÏÎÁÌØÎÏÊ Ú×ÕËÏÚÁÐÉÓÙ×ÁÀÝÅÊ ÓÉÓÔÅÍÙ (HDR). åÓÌÉ ÜÔÏ ÏËÁÖÅÔÓÑ
+ÐÏÌÅÚÎÙÍ ÄÌÑ ×ÌÁÄÅÌØÃÅ× ÏÂÙÞÎÙÈ 2/4 ËÁÎÁÌØÎÙÈ Ú×ÕËÏ×ÙÈ ËÁÒÔ, ÔÏ ÜÔÏ
+×ÅÌÉËÏÌÅÐÎÏ, ÎÏ Ñ ÎÅ ÚÁÏÓÔÒÑÀ ×ÎÉÍÁÎÉÅ ÎÁ ÜÔÏÍ.
+
+óÌÅÄÕÀÝÉÍ ×ÁÖÎÙÍ ÍÏÍÅÎÔÏÍ Ñ×ÌÑÅÔÓÑ ÔÏ, ÞÔÏ ×ÁÛÁ Ú×ÕËÏ×ÁÑ ËÁÒÔÁ ÄÏÌÖÎÁ
+ÐÏÄÄÅÒÖÉ×ÁÔØ ÐÏÌÎÏÄÕÐÌÅËÓÎÙÊ ÒÅÖÉÍ ÒÁÂÏÔÙ, ÐÒÉÞ£Í ÏÄÎÏ×ÒÅÍÅÎÎÏ × ÏÄÎÏÍ
+ÆÏÒÍÁÔÅ ÁÕÄÉÏÄÁÎÎÙÈ, ËÁË ÎÁ ××ÏÄ, ÔÁË É ÎÁ ×Ù×ÏÄ. ôÁË, Ë ÐÒÉÍÅÒÕ, ËÁÒÔÁ
+SoundBlaster AWE ÎÅ ÍÏÖÅÔ ÉÓÐÏÌØÚÏ×ÁÔØÓÑ Ó JACK × ÐÏÌÎÏÄÕÐÌÅËÓÎÏÍ
+ÒÅÖÉÍÅ - ÅÀ ÐÏÄÄÅÒÖÉ×ÁÅÔÓÑ ÔÏÌØËÏ ÔÁËÏÊ ÐÏÌÎÏÄÕÐÌÅËÓÎÙÊ ÒÅÖÉÍ, × ËÏÔÏÒÏÍ
+ÏÄÎÏ ÉÚ Ä×ÕÈ ÎÁÐÒÁ×ÌÅÎÉÊ (ÚÁÐÉÓØ ÉÌÉ ×ÏÓÐÒÏÉÚ×ÅÄÅÎÉÅ ÓÉÇÎÁÌÁ) ÒÁÂÏÔÁÅÔ
+× ÆÏÒÍÁÔÅ 8 ÂÉÔ ÄÁÎÎÙÈ, Á ÄÒÕÇÏÅ × ÆÏÒÍÁÔÅ 16 ÂÉÔ. ïÞÅÎØ ÎÅÍÎÏÇÉÅ ËÁÒÔÙ
+ÉÍÅÀÔ ÜÔÏ ÏÇÒÁÎÉÞÅÎÉÅ, É × ÜÔÏÍ ÓÌÕÞÁÅ ÏÎÉ ÏÂÙÞÎÏ ÎÅ ÐÏÄÈÏÄÑÔ ÄÌÑ ÒÁÂÏÔÙ
+Ó ÔÁËÉÍÉ ÐÒÉÌÏÖÅÎÉÑÍÉ ËÁË JACK ÉÌÉ Ardour.
+
+îÁ ÓÅÇÏÄÎÑÛÎÉÊ ÄÅÎØ, JACK ÒÁÂÏÔÁÅÔ ÓÏ ÓÌÅÄÕÀÝÉÍÉ Ú×ÕËÏ×ÙÍÉ ËÁÒÔÁÍÉ:
+
+ RME Hammerfall (Digi9652) (26 ×ÈÏÄÏ×, 26 ×ÙÈÏÄÏ×)
+ RME Hammerfall Light (Digi9636) (18 ×ÈÏÄÏ×, 18 ×ÙÈÏÄÏ×)
+ Midiman Delta series (ice1712 chipset) (12 ×ÈÏÄÏ×, 10 ×ÙÈÏÄÏ×)
+
+ ÛÉÒÏËÏ ÒÁÓÐÒÏÓÔÒÁΣÎÎÙÅ Ú×ÕËÏ×ÙÅ ËÁÒÔÙ, ÏÂÙÞÎÏ 2 ×ÈÏÄÎÙÈ ËÁÎÁÌÁ,
+ 2/4 ×ÙÈÏÄÎÙÈ ËÁÎÁÌÁ, ×ËÌÀÞÁÑ:
+
+ Hoontech 4Dwave-NX (Trident chipset)
+ Ensoniq 5880
+ Soundblaster 32
+ Soundblaster 64
+ Creative SBLive64
+
+É ÍÎÏÇÉÅ ÄÒÕÇÉÅ.
+
+÷ÐÏÓÌÅÄÓÔ×ÉÉ ÏÎ ÂÕÄÅÔ ÒÁÂÏÔÁÔØ ÓÏ ×ÓÅÍÉ Ú×ÕËÏ×ÙÍÉ ËÁÒÔÁÍÉ, ÐÏÄÄÅÒÖÉ×ÁÅÍÙÍÉ
+ALSA. üÔÏ ÏÄÎÏ ÉÚ ÎÁÐÒÁ×ÌÅÎÉÊ ÒÁÚÒÁÂÏÔËÉ.
+
+**********************************************************************
+
+óïïâýåîéñ ïâ ïûéâëáè
+--------------------
+
+þÔÏÂÙ ÓÏÏÂÝÉÔØ Ï ÏÂÎÁÒÕÖÅÎÙÈ ×ÁÍÉ ÏÛÉÂËÁÈ × ÒÁÂÏÔÅ ÐÒÏÇÒÁÍÍÙ ×ÏÓÐÏÌØÚÕÊÔÅÓØ
+ÓÓÙÌËÏÊ http://ardour.org/mantis/ . ÷ÏÚÍÏÖÎÏ Ï ÎÉÈ ÂÙÌÏ ÓÏÏÂÝÅÎÏ ÒÁÎÅÅ.
+ðÏÖÁÌÕÊÓÔÁ, ÐÒÏ×ÅÒØÔÅ ÓÕÝÅÓÔ×ÕÀÝÉÅ ÓÏÏÂÝÅÎÉÑ, ÞÔÏÂÙ ÕÂÅÄÉÔØÓÑ × ÔÏÍ, ÞÔÏ
+Ï ÏÂÎÁÒÕÖÅÎÎÏÊ ×ÁÍÉ ÏÛÉÂËÅ ÕÖÅ ÎÅ ÓÏÏÂÝÁÌÏÓØ É/ÉÌÉ ÏÎÁ ÎÅ ÉÓÐÒÁ×ÌÅÎÁ × CVS.
+
+óâïòëá ARDOUR
+-------------
+ðÏÄÒÏÂÎÏÅ ÏÐÉÓÁÎÉÅ × ÆÁÊÌÅ "BUILD".
+
+úáðõóë ARDOUR
+-------------
+
+úáíåþáîéå: ÷Ù ÄÏÌÖÎÙ ÚÁÐÕÓÔÉÔØ JACK ÓÅÒ×ÅÒ ÐÒÅÖÄÅ, ÞÅÍ ÏÔËÒÏÅÔÅ Ardour.
+ ------------------------------------------------------------
+åÓÌÉ ×Ù ×ÙÐÏÌÎÉÌÉ ËÏÍÁÎÄÕ "make install", ÔÏÇÄÁ ÎÁÂÒÁ× ÎÁ ËÌÁ×ÉÁÔÕÒÅ
+"ardour" ÐÏÌÕÞÉÔÅ ÖÅÌÁÅÍÙÊ ÒÅÚÕÌØÔÁÔ. "ardour --help" ×Ù×ÏÄÉÔ ÓÐÉÓÏË
+ÄÏÓÔÕÐÎÙÈ ËÌÀÞÅÊ ÐÒÏÇÒÁÍÍÙ.
diff --git a/DOCUMENTATION/TODO b/DOCUMENTATION/TODO
new file mode 100644
index 0000000000..6fbbdb9d98
--- /dev/null
+++ b/DOCUMENTATION/TODO
@@ -0,0 +1,232 @@
+ARDOUR TO-DO: $Id$
+----------------------------------------------------------------------
+
+ITEMS REQUIRED FOR 1.0
+----------------------
+
+* Automation
+ - must be able to apply a fade to a selected range
+* Drag handles for region/xfade curves
+
+* ensure I/O port is selected in connection dialog
+* add a small buffer near the left edge of the editor canvas to
+ make mouse operations near that edge easier to get right
+* context menus everywhere
+ - edit groups
+ - mix groups
+ - track lists
+ - region list
+ - click button
+
+ (miscellany)
+
+* propagate name changes to equivalent regions in region list
+* destroy region removes equivalent regions from region list
+* fix edit group visibility toggle
+
+META ITEMS
+----------
+
+* there must be a manual
+
+POST 1.0 WORK
+-------------
+* make region state of a playlist be position,length,layer, and save
+ that for BoundsChange or Layer change.
+* automation modes (from protools):
+ - relative trim
+ - etc.
+* 2-step file expunge
+* allow sends/inserts and perhaps plugins to be named
+* popup a big panner
+* mix groups (adding new kinds of relationships to the groups, as per
+ old ideas from tom pincince)
+* add meter range control
+* change meter tap point
+* cassowary-based constraints for edit groups
+* serializing the edit history (i have a plan for this now)
+* gtk2 port
+* like, totally rock, dude.
+* make rulers reorderable
+* set of useful click sounds
+* use snapshot mechanism to provide persistent undo/redo
+ - needs better integration of automation state
+ into session state.
+* duplicate-with-gap
+* panner multichannel backend code
+* select new port display when its created
+* copy/paste io configurations
+* Better temporal navigation
+* new region via plugin.
+* digital input trim.
+* possibly allow metering max-level adjustment at run-time
+* use multi-loop-take ala Samplitude/PT
+* song mode autonames for locate points
+ intro, verse1, verse N, chorus, bridge, outro/tag
+* different clock display modes:
+ elapsed
+ remaining
+ time since location start
+ time till location end
+* handle missing audio sources when loading
+* option/action to snap selection to zero crossings
+* pitch shift?
+
+- Some global solo routing buttons and a sine/noise generator to
+ test all the connections. Possibly a talkback input and
+ control. Pretty much like the equivalent strip on a analog
+ console.
+
+WAITING FOR GTK+/gtkmm 2.0:
+---------------------------
+general gtkmmext::ui solution to delete_event in recursive Gtk::Main::run()
+float<->ulong conversion in a GtkAdjustment (GTK2 uses doubles)
+ * fix the problems caused by range (float) limits on Locations.
+figure out how to get frames/timebars to extend to max_frames.
+
+UNDO ITEMS
+----------
+track height?
+capture?
+I/O connection state, etc.
+
+BUGS
+----
+
+initial Tempo marker can be dragged
+duplicate region names can be created automatically
+
+THREAD QUESTIONS
+----------------
+ - which thread should:
+ - change playlists on a diskstream?
+ - change diskstreams on a track? (we don't support that in the UI)
+
+ - can we reliably construct a copy of the RT state, instead of
+ using locks everywhere?
+
+NOTES FROM THE MAILING LISTS
+----------------------------
+
+-- gerard --
+
+Region gain has some bugs. They dissappear when trimming. Don't always
+playback correctly.
+
+I had some strange things with a chunk where the last region seemed to use
+the audio file as a peakfile. It played back correctly, but it showed up
+frames_per_peak too large.
+
+-- gerard2 ---
+
+Automation.
+I see that automation editing is in the TODO. How about the whole deal:
+Changing it during aplay. relative or absolute, latch (is that the word) or
+momentary override etc
+Is this for >1.0 ? It is not that important for me but maybe for some
+folks...
+
+Better metering configurability. Post/pre etc.
+
+Gui interface consistency.
+
+more keyboard shortcuts for f.i. (are they hard to add?):
+ -arrow keys to move selection from region to region
+ -seperate region. This one can be the same for split region, if there is
+ a range selected seperate, if not split.
+
+
+Should playhead also snap to grid?
+
+Adding/removing snapshots through snapshot pane.
+
+I would prefer to move the pre and post roll adjustments to the options
+menu, and have a start/end/duration of selection clocks.
+
+A way to deal with misbehaving plugins. They shouldn't be able to freeze
+ardour.
+
+What is the current (and planned) edit-group functionality? It doesn't seem
+to much.
+
+-----
+
+make use of transients a run-time option
+panning for export
+
+mute automation event
+
+region length/end editor clocks don't modify position
+
+should we allow N-channels regions to be inserted into non-N-channel routes?
+
+auto-crossfades are unreliable/hard to predict/confusing
+reset declick curves when doing a region copy (only if auto-crossfading?)
+
+audio clock editing
+ - make drag work again
+ - use tick field
+
+post fader plug/inserts get into a very inconsistent state wrt active/not active
+mixer strip widths are not persistent across state save/restore
+automation-read updates in mixer-strip in editor
+don't initiate MIDI binding if there is no MMC control
+export to audiofile
+ - exports tracks not marked for export (?)
+ - contains clicks/pops even with no SRC/dither (FIXED?)
+
+timefx region length error (check back with audacity crew)
+send gain control is clicky.
+some regionview names don't seem sensitive to canvas events
+splice mode needs to work correctly all the time, at the right times
+removing a port then adding a new one can cause duplicate names
+plugin automation buttons don't update from a plugin signal
+how to handle multichannel selections
+apparently selected location on startup of locations window, or
+ when creating new location from selection is *not* selected
+source/region naming/region list display
+
+LONG TERM CHECKING
+------------------
+RT-ness of all RT-thread STL usage
+
+GUI DETAILS
+-----------
+Use mouse wheel events (button4/5)
+Remove regions from region list
+Some location window ops need dbl click, some don't
+
+
+CHROME
+------
+make prompters look nicer still.
+make ladspa plugin selector look nicer
+don't popup "no group" when there are no groups (mixer strip).
+fix bug in Gtkmmext with wrapping on Gtkmmext::ClickBox
+make region editors look nicer
+region editor audition button doesn't pop up after audition is finished
+allow same color for all streamviews
+
+AUDIO STREAM
+------------
+
+[ These are JACK TODO's ]
+
+* need to ensure that cards like the Hammerfall are really set
+ to the correct sample rate when connected to an external
+ clock source.
+* ::connect_to_session() should indicate a problem if the
+ sample rate is wrong ....
+
+MIDI Machine Control
+-----------------------
+
+* handle stupid Mackie TC buttons
+* send MMC rec-enable messages
+* allow control (MMC/Local) selection to work
+* make sure that MMC ID works
+
+EDITOR, etc.
+------------
+
+* "use location to define selection"
diff --git a/DOCUMENTATION/TRANSLATORS b/DOCUMENTATION/TRANSLATORS
new file mode 100644
index 0000000000..5d54a48ecb
--- /dev/null
+++ b/DOCUMENTATION/TRANSLATORS
@@ -0,0 +1,21 @@
+If you would like to see Ardour in your native langauge, please contact
+the Ardour development mailing list. It's members only, but can be joined
+at http://ardour.org.
+
+Many thanks to these translators for making Ardour available in other
+languages:
+
+French: Alain Fréhel <alain.frehel@free.fr>
+
+German: Karsten Petersen <kapet@kapet.de>
+
+Italian: Filippo Pappalardo <filippo@email.it>
+
+Portuguese: Rui Nuno Capela <rncbc@rncbc.org>
+
+Brazilian Portuguese: Alexander da Franca Fernandes <alexander@nautae.eti.br>
+ Chris Ross <chris@tebibyte.org>
+
+Russian: Igor Blinov <pitstop@nm.ru>
+
+Spanish: Alex Krohn <alexkrohn@fastmail.fm>
diff --git a/DOCUMENTATION/ardour.1 b/DOCUMENTATION/ardour.1
new file mode 100644
index 0000000000..52b9b1c3c4
--- /dev/null
+++ b/DOCUMENTATION/ardour.1
@@ -0,0 +1,71 @@
+.TH ARDOUR 1 2002-12-29
+.SH NAME
+ardour \- a digital audio workstation
+.SH SYNOPSIS
+ardour
+.B \-b
+.RB [ \-U
+.IR file ]
+.RI [ session ]
+.br
+ardour
+.B \-\-help
+.SH DESCRIPTION
+Ardour is a multichannel hard disk recorder (HDR) and digital audio
+workstation (DAW).
+It is capable of simultaneous recording 24 or more channels of 32 bit audio at
+48kHz.
+Ardour is intended to function as a "professional" HDR system, replacing
+dedicated hardware solutions such as the Mackie HDR, the Tascam 2424 and more
+traditional tape systems like the Alesis ADAT series.
+It is also intended to provide the same or better functionality as software
+systems such as ProTools, Samplitude, Logic Audio, Nuendo and Cubase VST (we
+acknowledge these and all other names as trademarks of their respective
+owners).
+It supports MIDI Machine Control, and so can be controlled from any MMC
+controller, such as the Mackie Digital 8 Bus mixer and many other modern
+digital mixers.
+.SH OPTIONS
+.TP
+.B \-b
+Print all possible keyboard binding names.
+.TP
+.B \-U
+Specify the path to the GTK RC file to use.
+The provided one is called
+.B ardour_ui.rc
+and lives in the top level Ardour source directory.
+This file controls all color and font use within Ardour.
+Ardour will run without it, but its appearance is, uhm, ugly.
+.TP
+.B \-\-help
+Displays the help message.
+.SH FILES
+.TP
+.B ardour.rc
+Defaults and startup settings for Ardour.
+.TP
+.B ardour_ui.rc
+Definitions for the Ardour interface.
+.SH ENVIRONMENT
+.TP
+.B ARDOUR_RC
+Path to ardour.rc.
+.TP
+.B ARDOUR_SYSTEM_RC
+Path to the ardour_system.rc
+.TP
+.B LADSPA_PATH
+Path to LADSPA plugins.
+.SH BUGS
+Yes.
+.SH AUTHOR
+Paul Davis.
+Do
+.I not
+contact him directly.
+Instead,
+contact him at <ardour-dev@lists.ardour.org>.
+You can subscribe here:
+.br
+http://lists.ardour.org/listinfo.cgi/ardour-dev-ardour.org
diff --git a/DOCUMENTATION/ardour.1.es b/DOCUMENTATION/ardour.1.es
new file mode 100644
index 0000000000..d58a037df4
--- /dev/null
+++ b/DOCUMENTATION/ardour.1.es
@@ -0,0 +1,72 @@
+.TH ARDOUR 1 2002-12-29
+.SH NOMBRE
+ardour \- una estación de trabajo de audio digital
+.SH SINOPSIS
+ardour
+.B \-b
+.RB [ \-U
+.IR archivo ]
+.RI [ sesión ]
+.br
+ardour
+.B \-\-help
+.SH DESCRIPCIÓN
+Ardour graba multiples canales simultáneos a disco rigido (HDR) y es una
+estación de trabajo de audio digital (DAW).
+Es capaz de grabar 24 o mas canales simultáneamente con calidad de audio
+de 32 bit y a 48khz.
+La inteción de Ardour es funcionar como un sistema HDR "profesional",
+reemplazando soluciones de hardware dedicado como la Mackie HDR, el
+Tascam 2424 y otros sistemas tradicionales que emplean cinta como la
+linea de ADATs de Alesis.
+Tambien se busca igualar o mejorar la funcionalidad de sistemas
+basados en software como ProTools, Samplitude, Logic Audio,
+Nuendo y Cubase VST (reconocemos a estos y a todos los nombres ya
+mencionados, como marcas registradas de sus respectivos dueños).
+Ardour soporta Control de Maquina MIDI, por lo que puede ser controlado
+desde cualquier controladora MMC, como la "Mackie Digital 8 Bus Mixer"
+y otros mixers digitales modernos.
+.SH OPCIONES
+.TP
+.B \-b
+Muestra todos los comandos asignables a teclas del teclado.
+.TP
+.B \-U
+Especifica el archivo de interface visual.
+El que viene provisto por Ardour se llama
+.B ardour_ui.rc
+y se lo puede encontrar en el primer nivel de la carpeta del código de Ardour.
+Este archivo controla todos los colores y fuentes usados por Ardour.
+Ardour funcionará sin este, pero se verá, uhm, feo.
+.TP
+.B \-\-help
+Muestra el mensaje de ayuda.
+.SH ARCHIVOS
+.TP
+.B ardour.rc
+Configuraciones preestablecidas y de inicio de Ardour.
+.TP
+.B ardour_ui.rc
+Configuraciones de la interface visual de Ardour.
+.SH VARIABLES
+.TP
+.B ARDOUR_RC
+Ubicación del archivo ardour.rc.
+.TP
+.B ARDOUR_SYSTEM_RC
+Ubicación del archivo ardour_system.rc.
+.TP
+.B LADSPA_PATH
+Ubicación de plugins LADSPA.
+.SH BUGS (Errores en el codigo)
+Si.
+.SH AUTOR
+Paul Davis.
+.I No
+intente
+contactarlo directamente.
+En cambio,
+mande un email a <ardour-dev@lists.ardour.org>.
+Usted puede suscribirse a:
+.br
+http://lists.ardour.org/listinfo.cgi/ardour-dev-ardour.org
diff --git a/DOCUMENTATION/ardour.1.fr b/DOCUMENTATION/ardour.1.fr
new file mode 100644
index 0000000000..368cb81919
--- /dev/null
+++ b/DOCUMENTATION/ardour.1.fr
@@ -0,0 +1,71 @@
+.TH ARDOUR 1 2002-12-29
+.SH NOM
+ardour \- une station de travail audio-numérique
+.SH SYNOPSIS
+ardour
+.B \-b
+.RB [ \-U
+.IR fichier ]
+.RI [ session ]
+.br
+ardour
+.B \-\-help
+.SH DESCRIPTION
+Ardour est un enregistreur sur disque dur multi-canaux (HDR) et une station de
+travail audio-numérique (DAW).
+Il est capable d'enregistrer simultanément 24 ou plus canaux audio 32 bits à
+48 kHz.
+Ardour a pour vocation de fonctionner comme un enregistreur sur disque dur
+"professionnel", en remplacement de solutions matérielles dédiées comme le
+Mackie HDR, le Tascam 2424 et les plus traditionnels système à bande tels que
+la série Alesis ADAT.
+Il est aussi conçu pour procurer les mêmes ou de meilleures fonctionnalités
+que des systèmes logiciels comme ProTools, Samplitude, Logic Audio, Nuendo et
+Cubase VST (nous reconnaissons ces marques comme marques déposées appartenant
+à leurs propriétaires respectifs).
+Il supporte MIDI Machine Control, et peut ainsi être contrôlé depuis
+n'importe quel contrôleur MMC, comme le Mackie Digital 8 Bus mixer et de nombreux autres mélangeurs audio-numériques modernes.
+.SH OPTIONS
+.TP
+.B \-b
+Affiche tous les noms des codes clavier possibles.
+.TP
+.B \-U
+Indiquer le chemin vers le fichier GTK RC à utiliser.
+Le fichier fourni s'appelle
+.B ardour_ui.rc
+et se trouve dans la racine du répertoire du code source d'Ardour.
+Ce fichier gère l'utilisation de toutes les couleurs et polices de caractère
+dans Ardour.
+Ardour fonctionnera sans, mais son aspect sera, disons, affreux.
+.TP
+.B \-\-help
+Affiche le message d'aide.
+.SH FICHIERS
+.TP
+.B ardour.rc
+Paramètre par défaut et de démarrage d'Ardour.
+.TP
+.B ardour_ui.rc
+Définitions pour l'interface d'Ardour.
+.SH ENVIRONNEMENT
+.TP
+.B ARDOUR_RC
+Chemin vers ardour.rc.
+.TP
+.B ARDOUR_SYSTEM_RC
+Chemin vers ardour_system.rc
+.TP
+.B LADSPA_PATH
+Chemin vers les greffons LADSPA.
+.SH BOGUES
+Oui.
+.SH AUTEUR
+Paul Davis.
+Ne
+.I pas
+le contacter directement.
+Contactez-le plutôt à <ardour-dev@lists.ardour.org>.
+Vous pouvez vous inscrire ici :
+.br
+http://lists.ardour.org/listinfo.cgi/ardour-dev-ardour.org
diff --git a/DOCUMENTATION/ardour.1.ru b/DOCUMENTATION/ardour.1.ru
new file mode 100644
index 0000000000..06ab1146f5
--- /dev/null
+++ b/DOCUMENTATION/ardour.1.ru
@@ -0,0 +1,84 @@
+.TH "ARDOUR" "1" "2004-05-10" "" ""
+.SH "éíñ"
+ardour \- ÒÁÂÏÞÁÑ ÓÔÁÎÃÉÑ ÄÌÑ ÃÉÆÒÏ×ÏÊ ÏÂÒÁÂÏÔËÉ Ú×ÕËÁ
+.SH "ïâúïò"
+ardour
+.B \-b
+.RB [ \-U
+.I R ÆÁÊÌ ]
+.RI [ ÓÅÓÓÉÑ ]
+.br
+ardour
+.B \-\-help
+.SH "ïðéóáîéå"
+Ardour \- ÜÔÏ ÐÒÏÇÒÁÍÍÁ ÄÌÑ ÍÎÏÇÏËÁÎÁÌØÎÏÊ ÚÁÐÉÓÉ ÎÁ Ö£ÓÔËÉÊ ÄÉÓË
+(hard disk recorder \- HDR) É ÏÄÎÏ×ÒÅÍÅÎÎÏ ÒÅÄÁËÔÏÒ ÄÌÑ ÃÉÆÒÏ×ÏÊ ÏÂÒÁÂÏÔËÉ Ú×ÕËÁ
+(digital audio workstation \- DAW).
+.br
+ïÎ ÓÐÏÓÏÂÅÎ ÚÁÐÉÓÙ×ÁÔØ ÏÄÎÏ×ÒÅÍÅÎÎÏ ÄÏ 24 ÉÌÉ ÂÏÌÅÅ ËÁÎÁÌÏ× 32\-ÂÉÔÎÙÈ
+ÁÕÄÉÏÄÁÎÎÙÈ Ó ÞÁÓÔÏÔÏÊ ÄÉÓËÒÅÔÉÚÁÃÉÉ 48 ËçÃ.
+Ardour ÎÁÃÅÌÅÎ ÒÁÂÏÔÁÔØ ËÁË "ÐÒÏÆÅÓÓÉÏÎÁÌØÎÁÑ" HDR\-ÓÉÓÔÅÍÁ, ÓÐÏÓÏÂÎÁÑ
+ÚÁÍÅÎÉÔØ ÔÁËÉÅ ÁÐÐÁÒÁÔÎÙÅ ÒÅÛÅÎÉÑ ËÁË Mackie HDR, Tascam 2424 É ÍÎÏÇÉÅ
+ÔÒÁÄÉÃÉÏÎÎÙÅ ÓÉÓÔÅÍÙ ÚÁÐÉÓÉ ÎÁ ÍÁÇÎÉÔÎÕÀ ÌÅÎÔÕ, ÎÁÐÒÉÍÅÒ ÓÅÒÉÀ Alesis ADAT.
+ôÁËÖÅ ÐÒÅÓÌÅÄÕÅÔÓÑ ÃÅÌØ ÏÂÅÓÐÅÞÉÔØ ÆÕÎËÃÉÏÎÁÌØÎÏÓÔØ ÁÎÁÌÏÇÉÞÎÕÀ ÉÌÉ ÄÁÖÅ ÂÏÌØÛÕÀ
+ÐÏ ÓÒÁ×ÎÅÎÉÀ Ó ÔÁËÉÍÉ ÐÒÏÇÒÁÍÍÎÙÍÉ ÐÒÏÄÕËÔÁÍÉ ËÁË ProTools, Samplitude, Logic Audio,
+Nuendo and Cubase VST (ÍÙ ÐÒÉÚÎÁ£Í, ÞÔÏ ÜÔÉ É ÄÒÕÇÉÅ ÎÁÉÍÅÎÏ×ÁÎÉÑ Ñ×ÌÑÀÔÓÑ
+ÔÏÒÇÏ×ÙÍÉ ÍÁÒËÁÍÉ, ËÏÔÏÒÙÅ ÐÒÉÎÁÄÌÅÖÁÔ ÓÏÏÔ×ÅÔÓÔ×ÕÀÝÉÍ ÏÂÌÁÄÁÔÅÌÑÍ).
+.br
+éÍÅÅÔÓÑ ÐÏÄÄÅÒÖËÁ MIDI Machine Control (MMC), × ÔÏÍ ÞÉÓÌÅ ×ÏÚÍÏÖÎÏ É
+ÕÐÒÁ×ÌÅÎÉÅ ÏÔ ÌÀÂÏÇÏ MMC\-ËÏÎÔÒÏÌÌÅÒÁ, ÎÁÐÒÉÍÅÒ, ÔÁËÏÇÏ ËÁË ÍÉËÛÅÒ Mackie Digital
+8 Bus ÉÌÉ ÌÀÂÏÇÏ ÄÒÕÇÏÇÏ ÓÏ×ÒÅÍÅÎÎÏÇÏ ÍÉËÛÅÒÁ.
+.SH "ëìàþé ëïíáîäîïê óôòïëé"
+.TP
+.B \-b, \-\-bindings
+÷Ù×ÅÓÔÉ ÓÐÉÓÏË ÄÏÓÔÕÐÎÙÈ "ÇÏÒÑÞÉÈ" ËÌÁ×ÉÛ.
+.TP
+.B \-n, \-\-no\-splash
+îÅ ×Ù×ÏÄÉÔØ ÚÁÓÔÁ×ËÕ.
+.TP
+.B \-U, \-\-ui\-rcfile ÐÕÔØ
+õËÁÚÁÔØ ÐÕÔØ Ë ÆÁÊÌÕ ÏÐÉÓÁÎÉÑ ÇÒÁÆÉÞÅÓËÏÇÏ ÉÎÔÅÒÆÅÊÓÁ (GTK RC).
+÷ Î£Í ÏÐÒÅÄÅÌÅÎÙ ×ÓÅ ÛÒÉÆÔÙ É Ã×ÅÔÁ ÜÌÅÍÅÎÔÏ× ÉÎÔÅÒÆÅÊÓÁ Ardour.
+æÁÊÌ ÄÏÌÖÅÎ ÉÍÅÎÏ×ÁÔØÓÑ ËÁË
+.B ardour_ui.rc
+, ÅÇÏ ÛÁÂÌÏÎ ÎÁÈÏÄÉÔÓÑ × ËÏÒÎÅ×ÏÍ ËÁÔÁÌÏÇÅ ÉÓÈÏÄÎÙÈ ÔÅËÓÔÏ× Ardour.
+Ardour ÍÏÖÎÏ ÚÁÐÕÓÔÉÔØ É ÂÅÚ ÎÅÇÏ, ÎÏ ×ÎÅÛÎÉÊ ×ÉÄ ÉÎÔÅÒÆÅÊÓÁ ÂÕÄÅÔ ÂÅÚÏÂÒÁÚÎÙÍ.
+.TP
+.B \-c, \-\-jack\-client\-name ÉÍÑ
+éÓÐÏÌØÚÏ×ÁÔØ ÄÒÕÇÏÅ ÉÍÑ jack\-ËÌÉÅÎÔÁ, ardour ÐÏ ÕÍÏÌÞÁÎÉÀ.
+.TP
+.B \-v, \-\-version
+éÎÆÏÒÍÁÃÉÑ Ï ×ÅÒÓÉÉ ÐÒÏÇÒÁÍÍÙ.
+.TP
+.B \-h, \-\-help
+ðÏËÁÚÁÔØ ÓÐÒÁ×ËÕ.
+.SH "æáêìù"
+.TP
+.B ardour.rc
+îÁÓÔÒÏÊËÉ ÐÏ ÕÍÏÌÞÁÎÉÀ É ÕÓÔÁÎÏ×ËÉ "ÇÏÒÑÞÉÈ" ËÌÁ×ÉÛ ÄÌÑ Ardour.
+.TP
+.B ardour_ui.rc
+ïÐÉÓÁÎÉÅ ÐÏÌØÚÏ×ÁÔÅÌØÓËÏÇÏ ÉÎÔÅÒÆÅÊÓÁ Ardour.
+.SH "ïëòõöåîéå"
+.TP
+.B ARDOUR_RC
+ðÕÔØ Ë ÆÁÊÌÕ ardour.rc.
+.TP
+.B ARDOUR_SYSTEM_RC
+ðÕÔØ Ë ÆÁÊÌÕ ardour_system.rc
+.TP
+.B LADSPA_PATH
+ðÕÔØ Ë ÍÏÄÕÌÑÍ (ÐÌÁÇÉÎÁÍ) LADSPA.
+.SH "ïûéâëé ÷ ðòïçòáííå"
+äÁ, ÉÍÅÀÔÓÑ.
+.SH "á÷ôïò"
+Paul Davis (ðÏÌ äÜ×ÉÓ).
+ðÏÖÁÌÕÊÓÔÁ,
+.I ÎÅ ÏÂÒÁÝÁÊÔÅÓØ
+Ë ÎÅÍÕ ÎÁÐÒÑÍÕÀ.
+ó×ÑÚÁÔØÓÑ Ó ÎÉÍ É ÄÒÕÇÉÍÉ ÒÁÚÒÁÂÏÔÞÉËÁÍÉ ÍÏÖÎÏ ÏÔÐÒÁ×É× ÓÏÏÂÝÅÎÉÅ × ÓÐÉÓÏË ÒÁÓÓÙÌËÉ,
+<ardour-dev@lists.ardour.org>.
+.br
+÷Ù ÍÏÖÅÔÅ ÐÏÄÐÉÓÁÔØÓÑ ÎÁ ÎÅÇÏ ÐÏ ÁÄÒÅÓÕ:
+.br
+http://lists.ardour.org/listinfo.cgi/ardour-dev-ardour.org
diff --git a/PACKAGER_README b/PACKAGER_README
new file mode 100644
index 0000000000..36017496be
--- /dev/null
+++ b/PACKAGER_README
@@ -0,0 +1,15 @@
+(1) VST SUPPORT
+
+You may not distribute binaries of Ardour with VST support. Doing so
+is a violation of the license agreement for the Steinberg VST SDK. If
+you are found to be distributing such binaries, you risk both
+prosecution by Steinberg and public humiliation by me.
+
+This is not my choice, and as soon as Steinberg change their
+licensing, which they have indicated they will do, this policy (and
+file) will be removed.
+
+(2) STANDARD TEMPLATES
+
+The templates in ./templates are intended for installation in
+$prefix/share/ardour/templates.
diff --git a/README b/README
new file mode 100644
index 0000000000..62de1c1ae3
--- /dev/null
+++ b/README
@@ -0,0 +1,5 @@
+Please see the DOCUMENTATION directory.
+
+If you plan to compile ardour from scratch, BUILD is required reading.
+
+
diff --git a/ReleaseNotes-0.9betaX b/ReleaseNotes-0.9betaX
new file mode 100644
index 0000000000..358c1317c4
--- /dev/null
+++ b/ReleaseNotes-0.9betaX
@@ -0,0 +1,294 @@
+
+ RELEASE NOTES
+ ***************
+
+>>>> 0.9beta13
+
+beta13 is mostly bug fixes and a few new features over beta12.
+
+>>> 0.9beta12
+
+Welcome to the 0.9beta12 release of Ardour. We are now moving ever
+closer to a 1.0 release. This release includes an incredible number of
+changes and improvements since beta11. We expect some instabilities
+compared to beta11 to remain - please test, collect debug traces,
+etc. etc.
+
+ +++++ FIRST IMPORTANT NOTICE +++++
+
+Although beta12 will load sessions created by earlier versions of
+Ardour, if it is allowed to save a session at any time, that session
+will immediately be INCOMPATIBLE WITH ALL PRIOR VERSIONS OF ARDOUR.
+
+If you have important sessions, you are advised to back up the session
+state files (generally called <session-name>/<session-name>.ardour).
+
+I repeat: if you care about being able to use prior versions of Ardour
+on your existing sessions, you MUST BACKUP YOUR SESSION STATE FILES.
+
+Please rest assured that after 1.0 appears, no incompatibility,
+forward or backwards, will be tolerated in any future version.
+
+ +++++ SECOND IMPORTANT NOTICE +++++
+
+Why the change in the session files? At some point as work on beta12
+was in progress, we realized that Ardour's panning model was
+fundamentally broken. Not just the mathematics of the pan law, but the
+actual software architecture of panning. Fixing this has required a
+massive set of changes to Ardour's basic data flow and a lot of subtle
+and not-so-subtle changes to a lot of code. On the plus side, we now
+have a completely modular panning architecture that will make it
+trivial, mostly, to use plugins for panning in the future.
+
+ ++++++ THIRD IMPORTANT NOTICE ++++++
+
+ardour/ksi is no longer built by default. The changes to libardour are
+massive and widespread, and I do not have the resources to spend time
+getting ardour/ksi to catch up with them. I will reenable default
+building if and when ardour/ksi compiles again. I wish I could spend
+time on this, but the work is just too much at a time when I
+desperately need to get Ardour to a reasonable 1.0 release.
+
+ +++++ FOURTH IMPORTANT NOTICE +++++
+
+This version of ardour will NOT compile with gcc 2.95. we are now
+using the standard C++ class "stringstream", which has no support in
+gcc2.95. i will accept patches that attempt to use the gcc class
+"strstream", but i am not willing to spend time on this myself.
+
+
+ Changes since 0.9beta11
+ ------------------------
+
+A) PANNING
+
+ * panning control is per-stream
+ code is now supporting the notion of the "number of active
+ streams" within various parts of a signal processing
+ "route". this is different and orthogonal from the number of
+ inputs and outputs the route has. if you put a 1in/2out
+ plugin into a 1in/1out route (which arguably should not be
+ possible), then before the plugin there is 1 active stream,
+ and afterwards there are 2.
+
+ * panner linkage
+ - panners for all streams/channels can be moved
+ together or in opposing motion.
+
+ * new "bar controllers" for controlling panning to
+ a stereo output, 1 per data stream
+ * dbl-click on the bar controller to get numerical
+ entry, then Return or Tab to get back
+ to graphics.
+
+B) AUTOMATION
+ ----------
+
+ * gain and pan automation now totally separated
+ - you can playback pan automation while
+ doing touch automation on gain.
+ * if playing automation, and playhead goes past
+ the last control point, value remains
+ at that level.
+ * one button for gain automation state and one for
+ pan automation state per mixer strip
+ * ignore the automation mode for now
+ * touch automation for panning now works.
+ * hide all automation control points, display them
+ only as mouse pointer moves through them
+ * automation values reflected after transport stop
+ or locate if automation is not off, or when
+ automation is turned on.
+
+C) PLUGIN GUIs
+ -----------
+ * use bar controllers (see Panning above) instead of sliders
+
+D) OTHER MAJOR FUNCTIONALITY
+ -------------------
+
+ * initial support for win32/x86 VST plugins as native objects
+ in Ardour
+
+ * Added exclusive solo operation (ctrl-alt click on solo button)
+ which sets that track to be the only soloed track. it has a
+ momentary counterpart (ctrl-alt middle-click) which temporarily
+ exclusively solos the track while the mouse button is pressed.
+ BTW, middle-clicking mute buttons is momentary mute as well.
+
+ * Added seamless looping. this can be enabled in the options editor
+ (misc tab). why is this an option you ask? well, our current
+ looping scheme simply does a transport reposition at the end of the
+ loop, and while completely sample accurate, there can be a time gap
+ between the end of the loop and the beginning. This happens due to
+ the slow-sync jack transport system, to allow all clients to
+ reposition in sync (including ardour). However, if you need truly
+ seamless looping with no gap, you can enable this option which will do
+ it within ardour only -- you must disable ardour as the jack
+ transport/time master for it to work. In the near future, the Jack
+ transport system may acquire a notion of looping, and at that time,
+ seamless may be used at any time.
+
+ Note that for full compatibility with other transport aware apps, the
+ normal (non-seamless) looping with ardour as jack transport master is
+ required and is still quite usable, so don't be discouraged from using it.
+
+ * drag-n-drop from a file manager implemented for
+ placing audio files into audio tracks
+
+ * LADSPA Presets are now saved in RDF format in
+ ~/.ladspa/rdf/ardour-presets.n3. Ardour will also
+ read any other RDF files saved in that location.
+
+ * region list redesigned
+
+ * mouse wheel events now scroll canvas, not change mouse mode
+
+ * always store to current snapshot file, do not make read-only
+ anymore (might cause problems on older sessions with
+ snapshots if editing the snapshot)
+
+ * mouse shuttle mode (the return of "scrub")
+ a new widget replaces the ffwd/rev buttons to provide
+ continuous speed control in forward and reverse directions.
+
+ * Added option to update actively recording regions with waveforms.
+ Much cooler than just the pink boxes, eh? On by default, you
+ can turn it back to the plain pink boxes from the display tab
+ of the options window.
+
+B) MINOR IMPROVEMENTS + BUG FIXES
+ ------------------------------
+
+ * correct handling of JACK transport API when transport master
+ * improved handling of SMPTE timecode
+ - SMPTE frames-per-second can be edited from the options editor
+ - SMPTE offset (what absolute time with respect to audio frame
+ zero is SMPTE 0:0:0:0) can be edited from the options
+ editor
+ - correct drop frame calculations
+ * fix for "Destroy Last Capture" bug, plus a correction for
+ a thinko that caused a segv if DLC done twice between
+ captures.
+ * recent session dialog doesn't have "subtrees" for sessions
+ with just a single state (snapshot)
+ * xfade editor changes
+ - "shade under line"
+ - fix left offset of wave display
+ * buttons/arrows on editor vertical scrollbar now work
+ * template selector hidden in new session dialog if the user
+ has no templates
+ * fix problem with exporting caused by JACK transport fixes
+ * MMC buttton relabelled "External MIDI Control", and moved
+ to MIDI tab of Options editor, along with "Send MMC"
+ * Better implemented the momentary mute and solo operations so that
+ the previous state is restored on mouse-release.
+ * added "lock", "unlock", "normalize", "reverse" to region context
+ menu
+ * add new operation to return captured regions to their "captured"
+ location (does not work for embedded/imported regions). the
+ operation is in the region context menu as "Original position".
+ * fixes for region naming when handling external audio files
+ * redesign new session dialog to use a tabbed notebook
+ * make sure option editor's "follow playhead" button is in-sync
+ with follow playhead setting
+ * fix long-standing bug with MIDI request pool running out of
+ memory.
+ * fix export of 100% zeroes in 32 bit integer sample files
+ * added MMC command when in master MMC mode for transport
+ startup (Deferred Play)
+ * correct design flaw in creating regions from session file.
+ (fixes some odd behaviour when undoing close to
+ start of working on a session, because regions did
+ not have the correct history set up)
+ * limited shuttle speed when mouse departs the control box.
+ * keep JACK shutdown/kick message on top of editor window
+ * use "e" and "p" to position edit/playhead wherever mouse is
+ * fixes for transport button madness
+ * fix for autoloop indicator region visibility
+ * made the horizontal scrollbar be a standard one
+ * included new fader pixmaps from ryan (precursor to new theme)
+ * ExportDialog saves Track information. It doesn't restore it yet though.
+ * LRDF enumerations are displayed in a combo box in the PluginUI.
+ * Updated gtk-ardour Russian translation and added new libardour Russian translation.
+ * Recent Sessions dialog doesn't display sessions that have been deleted.
+ * Trying to sample a file in the AudioLibrary that has been moved or deleted won't crash.
+ * fix catastrophic, stupid, unbelievable and just plain ridiculous
+ bug in editor constructor that left edit_cursor and
+ playhead_cursor with random values when Editor::set_state()
+ was called.
+ * move "optimization flags" setting into a global autoconf file,
+ and call AM_OPT_FLAGS from most configure scripts
+ * increase size of UI request pool
+ * increase size of UI request ringbuffer
+ * finally get all tracks connected to ins+outs
+ when using "auto-connect" options.
+ (previously only the first N tracks
+ would be connected, where N was the
+ number of physical i/o's on
+ your audio interface)
+ * prevent GTK from loading its default
+ RC files at all costs.
+ * fix gcc 3.3 "bug" in libsoundtouch
+ * start to use the new BarController widget in plugin GUIs
+ * fixed the declick on transport stop. yes, it probably never
+ worked, which is why you heard clicks on stopping. this also
+ fixes the problem where plugins are interrupted briefly on stop...
+ now reverb tails are undisturbed on transport stop.
+ * Audition port names are looked up at runtime.
+ * Library UI uses the new jftw in libpbd.
+ * The plugin selector is now sortable by clicking on the different column
+ titles.
+ * "stop at session end" option is now saved
+ * "splash/about window" design changes - unfinished, and wow is it
+ ugly. but its also more flexible, and i'll finish it RSN.
+ * several dialog windows forced to float over the editor
+ * "wait for loading" message removed
+ * when adding multiple tracks, GUI runs between each track
+ (causes ugly flashing of mixer window, however)
+ * Select context menu now contains
+ "Select all in track"
+ "Select all"
+ "Invert in track"
+ "Invert all"
+ (invert is known not to work on automation tracks)
+ * incorrect handling of stereo streams through routes fixed.
+ * check for adequate version of JACK
+ * fix recursive call to DiskStream::set_name() that caused a crash
+ when renaming a track
+ * fix PortInsert to do a pure wire-level copy - no gain, no pan
+ * count cycles for plugins
+ * make sends meter correctly
+ * clean up (longstanding) late initialization of several variables
+ (thanks valgrind!)
+ * convert error log to popup messages, mostly
+ * run Gtk::Main event loop while embedding/linking an external file
+ (and use the "watch/wait" cursor too)
+ * add a half-working detent for panner bar controllers
+ * try to improve operation of gain/pan automation buttons
+ * Added spanish translation. Thank you Alex Krohn.
+ * change pan line colors
+ * fix display of slide/splice mode
+ * clicks on track canvas views do not select track
+ * pack IO CLists in IOSelector in a scrolled window (needs theme name)
+ * select next IO port after making connection to current one
+ (speeds and smooths UI interaction when doing IO setup)
+ * Added spanish translation of ardour.1.
+ * test plugin configuration and display a dialog if its incorrect
+ (even when loading ... work in progress)
+ * Added russian translation of man page.
+ * Added valgrind shortcut for ardour into gtk_ardour. (arval).
+ * correct problem with lack of playback in rec-enabled
+ tracks when not using s/w monitoring
+ * apply gain to s/w monitored rec-enabled tracks
+ * fix nasty thread synchronization bug related to
+ allocation+use of session-wide pan automation
+ buffers
+ * provide (not very good) warning if rec-enable attempt
+ made on a track with no input connections
+ * more tooltips
+ * pan muting via context menu
+ * fix potential segfault in ::~Session caused by
+ double delete of playlists
+ * MIDI control for panning added back (untested)
+
diff --git a/SConstruct b/SConstruct
new file mode 100644
index 0000000000..a06f6fad02
--- /dev/null
+++ b/SConstruct
@@ -0,0 +1,663 @@
+import os
+import sys
+import re
+import shutil
+import glob
+import errno
+import time
+import SCons.Node.FS
+
+SConsignFile()
+EnsureSConsVersion(0, 96)
+
+version = '1.9beta1'
+
+subst_dict = { }
+
+#
+# Command-line options
+#
+
+opts = Options('scache.conf')
+opts.AddOptions(
+ BoolOption('ALTIVEC', 'Compile using Altivec instructions', 0),
+ ('ARCH', 'Set architecture-specific compilation flags by hand (all flags as 1 argument)',''),
+ BoolOption('DEBIAN', 'Debian build options (no internal versions of 3rd party libraries)', 0),
+ BoolOption('DEBUG', 'Set to build with debugging information and no optimizations', 0),
+ PathOption('DESTDIR', 'Set the intermediate install "prefix"', '/'),
+ BoolOption('DEVBUILD', 'Use shared libardour (developers only)', 0),
+ BoolOption('NLS', 'Set to turn on i18n support', 1),
+ BoolOption('NOARCH', 'Do not use architecture-specific compilation flags', 0),
+ PathOption('PREFIX', 'Set the install "prefix"', '/usr/local'),
+ BoolOption('VST', 'Compile with support for VST', 0),
+ BoolOption('VERSIONED', 'Add version information to ardour/gtk executable name inside the build directory', 0)
+ )
+
+
+#----------------------------------------------------------------------
+# a handy helper that provides a way to merge compile/link information
+# from multiple different "environments"
+#----------------------------------------------------------------------
+#
+class LibraryInfo(Environment):
+ def __init__(self,*args,**kw):
+ Environment.__init__ (self,*args,**kw)
+
+ def Merge (self,others):
+ for other in others:
+ self.Append (LIBS = other.get ('LIBS',[]))
+ self.Append (LIBPATH = other.get ('LIBPATH', []))
+ self.Append (CPPPATH = other.get('CPPPATH', []))
+ self.Append (LINKFLAGS = other.get('LINKFLAGS', []))
+
+
+env = LibraryInfo (options = opts,
+ CPPPATH = [ '.' ],
+ VERSION = version,
+ TARBALL='ardour-' + version + '.tar.bz2',
+ DISTFILES = [ ],
+ DISTTREE = '#ardour-' + version,
+ DISTCHECKDIR = '#ardour-' + version + '/check'
+ )
+
+
+#----------------------------------------------------------------------
+# Builders
+#----------------------------------------------------------------------
+
+# Handy subst-in-file builder
+#
+
+def do_subst_in_file(targetfile, sourcefile, dict):
+ """Replace all instances of the keys of dict with their values.
+ For example, if dict is {'%VERSION%': '1.2345', '%BASE%': 'MyProg'},
+ then all instances of %VERSION% in the file will be replaced with 1.2345 etc.
+ """
+ try:
+ f = open(sourcefile, 'rb')
+ contents = f.read()
+ f.close()
+ except:
+ raise SCons.Errors.UserError, "Can't read source file %s"%sourcefile
+ for (k,v) in dict.items():
+ contents = re.sub(k, v, contents)
+ try:
+ f = open(targetfile, 'wb')
+ f.write(contents)
+ f.close()
+ except:
+ raise SCons.Errors.UserError, "Can't write target file %s"%targetfile
+ return 0 # success
+
+def subst_in_file(target, source, env):
+ if not env.has_key('SUBST_DICT'):
+ raise SCons.Errors.UserError, "SubstInFile requires SUBST_DICT to be set."
+ d = dict(env['SUBST_DICT']) # copy it
+ for (k,v) in d.items():
+ if callable(v):
+ d[k] = env.subst(v())
+ elif SCons.Util.is_String(v):
+ d[k]=env.subst(v)
+ else:
+ raise SCons.Errors.UserError, "SubstInFile: key %s: %s must be a string or callable"%(k, repr(v))
+ for (t,s) in zip(target, source):
+ return do_subst_in_file(str(t), str(s), d)
+
+def subst_in_file_string(target, source, env):
+ """This is what gets printed on the console."""
+ return '\n'.join(['Substituting vars from %s into %s'%(str(s), str(t))
+ for (t,s) in zip(target, source)])
+
+def subst_emitter(target, source, env):
+ """Add dependency from substituted SUBST_DICT to target.
+ Returns original target, source tuple unchanged.
+ """
+ d = env['SUBST_DICT'].copy() # copy it
+ for (k,v) in d.items():
+ if callable(v):
+ d[k] = env.subst(v())
+ elif SCons.Util.is_String(v):
+ d[k]=env.subst(v)
+ Depends(target, SCons.Node.Python.Value(d))
+ # Depends(target, source) # this doesn't help the install-sapphire-linux.sh problem
+ return target, source
+
+subst_action = Action (subst_in_file, subst_in_file_string)
+env['BUILDERS']['SubstInFile'] = Builder(action=subst_action, emitter=subst_emitter)
+
+#
+# internationalization
+#
+
+# po_helper
+#
+# this is not a builder. we can't list the .po files as a target,
+# because then scons -c will remove them (even Precious doesn't alter
+# this). this function is called whenever a .mo file is being
+# built, and will conditionally update the .po file if necessary.
+#
+
+def po_helper(po,pot):
+ args = [ 'msgmerge',
+ '--update',
+ po,
+ pot,
+ ]
+ print 'Updating ' + po
+ return os.spawnvp (os.P_WAIT, 'msgmerge', args)
+
+# mo_builder: builder function for (binary) message catalogs (.mo)
+#
+# first source: .po file
+# second source: .pot file
+#
+
+def mo_builder(target,source,env):
+ po_helper (source[0].get_path(), source[1].get_path())
+ args = [ 'msgfmt',
+ '-c',
+ '-o',
+ target[0].get_path(),
+ source[0].get_path()
+ ]
+ return os.spawnvp (os.P_WAIT, 'msgfmt', args)
+
+mo_bld = Builder (action = mo_builder)
+env.Append(BUILDERS = {'MoBuild' : mo_bld})
+
+# pot_builder: builder function for message templates (.pot)
+#
+# source: list of C/C++ etc. files to extract messages from
+#
+
+def pot_builder(target,source,env):
+ args = [ 'xgettext',
+ '--keyword=_',
+ '--keyword=N_',
+ '--from-code=UTF-8',
+ '-o', target[0].get_path(),
+ "--default-domain=" + env['PACKAGE'],
+ '--copyright-holder="Paul Davis"' ]
+ args += [ src.get_path() for src in source ]
+
+ return os.spawnvp (os.P_WAIT, 'xgettext', args)
+
+pot_bld = Builder (action = pot_builder)
+env.Append(BUILDERS = {'PotBuild' : pot_bld})
+
+#
+# utility function, not a builder
+#
+
+def i18n (buildenv, sources, installenv):
+ domain = buildenv['PACKAGE']
+ potfile = buildenv['POTFILE']
+
+ installenv.Alias ('potupdate', buildenv.PotBuild (potfile, sources))
+
+ p_oze = [ os.path.basename (po) for po in glob.glob ('po/*.po') ]
+ languages = [ po.replace ('.po', '') for po in p_oze ]
+ m_oze = [ po.replace (".po", ".mo") for po in p_oze ]
+
+ for mo in m_oze[:]:
+ po = 'po/' + mo.replace (".mo", ".po")
+ installenv.Alias ('install', buildenv.MoBuild (mo, [ po, potfile ]))
+
+ for lang in languages[:]:
+ modir = (os.path.join (install_prefix, 'share/locale/' + lang + '/LC_MESSAGES/'))
+ moname = domain + '.mo'
+ installenv.Alias('install', installenv.InstallAs (os.path.join (modir, moname), lang + '.mo'))
+
+#
+# A generic builder for version.cc files
+#
+# note: requires that DOMAIN, MAJOR, MINOR, MICRO are set in the construction environment
+# note: assumes one source files, the header that declares the version variables
+#
+def version_builder (target, source, env):
+ text = "int " + env['DOMAIN'] + "_major_version = " + str (env['MAJOR']) + ";\n"
+ text += "int " + env['DOMAIN'] + "_minor_version = " + str (env['MINOR']) + ";\n"
+ text += "int " + env['DOMAIN'] + "_micro_version = " + str (env['MICRO']) + ";\n"
+
+ try:
+ o = file (target[0].get_path(), 'w')
+ o.write (text)
+ o.close ();
+ except IOError:
+ print "Could not open", target[0].get_path(), " for writing\n"
+ sys.exit (-1)
+
+ text = "#ifndef __" + env['DOMAIN'] + "_version_h__\n";
+ text += "#define __" + env['DOMAIN'] + "_version_h__\n";
+ text += "extern int " + env['DOMAIN'] + "_major_version;\n"
+ text += "extern int " + env['DOMAIN'] + "_minor_version;\n"
+ text += "extern int " + env['DOMAIN'] + "_micro_version;\n"
+ text += "#endif /* __" + env['DOMAIN'] + "_version_h__ */\n";
+
+ try:
+ o = file (target[1].get_path(), 'w')
+ o.write (text)
+ o.close ();
+ except IOError:
+ print "Could not open", target[1].get_path(), " for writing\n"
+ sys.exit (-1)
+
+ return None
+
+version_bld = Builder (action = version_builder)
+env.Append (BUILDERS = {'VersionBuild' : version_bld})
+
+#
+# a builder that makes a hard link from the 'source' executable to a name with
+# a "build ID" based on the most recent CVS activity that might be reasonably
+# related to version activity. this relies on the idea that the SConscript
+# file that builds the executable is updated with new version info and committed
+# to the source code repository whenever things change.
+#
+
+def versioned_builder(target,source,env):
+ # build ID is composed of a representation of the date of the last CVS transaction
+ # for this (SConscript) file
+
+ try:
+ o = file (source[0].get_dir().get_path() + '/CVS/Entries', "r")
+ except IOError:
+ print "Could not CVS/Entries for reading"
+ return -1
+
+ last_date = ""
+ lines = o.readlines()
+ for line in lines:
+ if line[0:12] == '/SConscript/':
+ parts = line.split ("/")
+ last_date = parts[3]
+ break
+ o.close ()
+
+ if last_date == "":
+ print "No SConscript CVS update info found - versioned executable cannot be built"
+ return -1
+
+ tag = time.strftime ('%Y%M%d%H%m', time.strptime (last_date));
+ print "The current build ID is " + tag
+
+ tagged_executable = source[0].get_path() + '-' + tag
+
+ if os.path.exists (tagged_executable):
+ print "Replacing existing executable with the same build tag."
+ os.unlink (tagged_executable)
+
+ return os.link (source[0].get_path(), tagged_executable)
+
+verbuild = Builder (action = versioned_builder)
+env.Append (BUILDERS = {'VersionedExecutable' : verbuild})
+
+#
+# source tar file builder
+#
+
+def distcopy (target, source, env):
+ treedir = str (target[0])
+
+ try:
+ os.mkdir (treedir)
+ except OSError, (errnum, strerror):
+ if errnum != errno.EEXIST:
+ print 'mkdir ', treedir, ':', strerror
+
+ cmd = 'tar cf - '
+ #
+ # we don't know what characters might be in the file names
+ # so quote them all before passing them to the shell
+ #
+ all_files = ([ str(s) for s in source ])
+ cmd += " ".join ([ "'%s'" % quoted for quoted in all_files])
+ cmd += ' | (cd ' + treedir + ' && tar xf -)'
+ p = os.popen (cmd)
+ return p.close ();
+
+def tarballer (target, source, env):
+ cmd = 'tar -jcf ' + str (target[0]) + ' ' + str(source[0]) + " --exclude '*~'"
+ print 'running ', cmd, ' ... '
+ p = os.popen (cmd)
+ return p.close ()
+
+dist_bld = Builder (action = distcopy,
+ target_factory = SCons.Node.FS.default_fs.Entry,
+ source_factory = SCons.Node.FS.default_fs.Entry,
+ multi = 1)
+
+tarball_bld = Builder (action = tarballer,
+ target_factory = SCons.Node.FS.default_fs.Entry,
+ source_factory = SCons.Node.FS.default_fs.Entry)
+
+env.Append (BUILDERS = {'Distribute' : dist_bld})
+env.Append (BUILDERS = {'Tarball' : tarball_bld})
+
+# ----------------------------------------------------------------------
+# Construction environment setup
+# ----------------------------------------------------------------------
+
+libraries = { }
+
+libraries['core'] = LibraryInfo (CPPPATH = [ '#libs'])
+
+libraries['sndfile'] = LibraryInfo()
+libraries['sndfile'].ParseConfig('pkg-config --cflags --libs sndfile')
+
+libraries['lrdf'] = LibraryInfo()
+libraries['lrdf'].ParseConfig('pkg-config --cflags --libs lrdf')
+
+libraries['raptor'] = LibraryInfo()
+libraries['raptor'].ParseConfig('pkg-config --cflags --libs raptor')
+
+libraries['samplerate'] = LibraryInfo()
+libraries['samplerate'].ParseConfig('pkg-config --cflags --libs samplerate')
+
+libraries['jack'] = LibraryInfo()
+libraries['jack'].ParseConfig('pkg-config --cflags --libs jack')
+
+libraries['xml'] = LibraryInfo()
+libraries['xml'].ParseConfig('pkg-config --cflags --libs libxml-2.0')
+
+libraries['glib2'] = LibraryInfo()
+libraries['glib2'].ParseConfig ('pkg-config --cflags --libs glib-2.0')
+libraries['glib2'].ParseConfig ('pkg-config --cflags --libs gobject-2.0')
+libraries['glib2'].ParseConfig ('pkg-config --cflags --libs gmodule-2.0')
+
+libraries['gtk2'] = LibraryInfo()
+libraries['gtk2'].ParseConfig ('pkg-config --cflags --libs gtk+-2.0')
+
+libraries['pango'] = LibraryInfo()
+libraries['pango'].ParseConfig ('pkg-config --cflags --libs pango')
+
+libraries['libgnomecanvas2'] = LibraryInfo()
+libraries['libgnomecanvas2'].ParseConfig ('pkg-config --cflags --libs libgnomecanvas-2.0')
+
+libraries['ardour2'] = LibraryInfo (LIBS='ardour2', LIBPATH='#libs/ardour2', CPPPATH='#libs/ardour2')
+libraries['midi++2'] = LibraryInfo (LIBS='midi++', LIBPATH='#libs/midi++2', CPPPATH='#libs/midi++2')
+libraries['pbd3'] = LibraryInfo (LIBS='pbd', LIBPATH='#libs/pbd3', CPPPATH='#libs/pbd3')
+libraries['gtkmm2ext'] = LibraryInfo (LIBS='gtkmm2ext', LIBPATH='#libs/gtkmm2ext', CPPPATH='#libs/gtkmm2ext')
+
+libraries['fst'] = LibraryInfo()
+if env['VST']:
+ libraries['fst'].ParseConfig('pkg-config --cflags --libs libfst')
+
+#
+# Audio/MIDI library (needed for MIDI, since audio is all handled via JACK)
+#
+
+conf = Configure(env)
+
+if conf.CheckCHeader('alsa/asoundlib.h'):
+ libraries['sysmidi'] = LibraryInfo (LIBS='asound')
+ env['SYSMIDI'] = 'ALSA Sequencer'
+ subst_dict['%MIDITAG%'] = "seq"
+ subst_dict['%MIDITYPE%'] = "alsa/sequencer"
+elif conf.CheckCHeader('/System/Library/Frameworks/CoreMIDI.framework/Headers/CoreMIDI.h'):
+ # this line is needed because scons can't handle -framework in ParseConfig() yet.
+ libraries['sysmidi'] = LibraryInfo (LINKFLAGS= '-framework CoreMIDI -framework CoreFoundation -framework CoreAudio -framework CoreServices -framework AudioUnit')
+ env['SYSMIDI'] = 'CoreMIDI'
+ subst_dict['%MIDITAG%'] = "coremidi"
+ subst_dict['%MIDITYPE%'] = "coremidi"
+
+env = conf.Finish()
+
+if env['DEBIAN']:
+
+ libraries['soundtouch'] = LibraryInfo(LIBS='SoundTouch')
+
+ coredirs = [
+ 'templates'
+ ]
+
+ subdirs2 = [
+ 'libs/pbd3',
+ 'libs/midi++2',
+ ]
+
+ gtk2_subdirs = [
+ 'libs/gtkmm2ext',
+ ]
+
+else:
+
+ libraries['sigc2'] = LibraryInfo(LIBS='sigc++2',
+ LIBPATH='#libs/sigc++2',
+ CPPPATH='#libs/sigc++2')
+ libraries['glibmm2'] = LibraryInfo(LIBS='glibmm2',
+ LIBPATH='#libs/glibmm2',
+ CPPPATH='#libs/glibmm2')
+ libraries['pangomm'] = LibraryInfo(LIBS='pangomm',
+ LIBPATH='#libs/gtkmm2/pango',
+ CPPPATH='#libs/gtkmm2/pango')
+ libraries['atkmm'] = LibraryInfo(LIBS='atkmm',
+ LIBPATH='#libs/gtkmm2/atk',
+ CPPPATH='#libs/gtkmm2/atk')
+ libraries['gdkmm2'] = LibraryInfo(LIBS='gdkmm2',
+ LIBPATH='#libs/gtkmm2/gdk',
+ CPPPATH='#libs/gtkmm2/gdk')
+ libraries['gtkmm2'] = LibraryInfo(LIBS='gtkmm2',
+ LIBPATH='#libs/gtkmm2/gtk',
+ CPPPATH='#libs/gtkmm2/gtk')
+ libraries['libgnomecanvasmm'] = LibraryInfo(LIBS='libgnomecanvasmm',
+ LIBPATH='#libs/libgnomecanvasmm',
+ CPPPATH='#libs/libgnomecanvasmm')
+ libraries['soundtouch'] = LibraryInfo(LIBS='soundtouch',
+ LIBPATH='#libs/soundtouch',
+ CPPPATH='#libs/soundtouch')
+
+ coredirs = [
+ 'libs/soundtouch',
+ 'templates'
+ ]
+
+ subdirs2 = [
+ 'libs/sigc++2',
+ 'libs/pbd3',
+ 'libs/midi++2',
+ ]
+
+ gtk2_subdirs = [
+ 'libs/glibmm2',
+ 'libs/gtkmm2/pango',
+ 'libs/gtkmm2/atk',
+ 'libs/gtkmm2/gdk',
+ 'libs/gtkmm2/gtk',
+ 'libs/libgnomecanvasmm',
+ 'libs/gtkmm2ext',
+ ]
+
+opts.Save('scache.conf', env)
+Help(opts.GenerateHelpText(env))
+
+if os.environ.has_key('PATH'):
+ env.Append(PATH = os.environ['PATH'])
+if os.environ.has_key('PKG_CONFIG_PATH'):
+ env.Append(PKG_CONFIG_PATH = os.environ['PKG_CONFIG_PATH'])
+
+final_prefix = '$PREFIX'
+install_prefix = '$DESTDIR/$PREFIX'
+
+if env['PREFIX'] == '/usr':
+ final_config_prefix = '/etc'
+else:
+ final_config_prefix = env['PREFIX'] + '/etc'
+
+config_prefix = '$DESTDIR' + final_config_prefix
+
+#
+# Compiler flags and other system-dependent stuff
+#
+
+opt_flags = []
+
+# guess at the platform, used to define compiler flags
+
+config_guess = os.popen("tools/config.guess").read()[:-1]
+
+config_cpu = 0;
+config_arch = 1;
+config_kernel = 2;
+config_os = 3;
+config = config_guess.split ("-")
+
+#
+# on OS X darwinports puts things in /opt/local by default
+#
+if config[config_arch] == 'apple':
+ libraries['core'].Append (LIBPATH = [ '/opt/local/lib' ],
+ CPPPATH = [ '/opt/local/include' ])
+
+if config[config_cpu] == 'powerpc':
+ #
+ # Apple/PowerPC optimization options
+ #
+ # -mcpu=7450 does not reliably work with gcc 3.*
+ #
+ if env['NOARCH'] == 0:
+ if env['ALTIVEC'] == 1:
+ opt_flags.extend ([ "-mcpu=7400", "-maltivec", "-mabi=altivec" ])
+ else:
+ opt_flags.extend([ "-mcpu=750", "-mmultiple" ])
+ opt_flags.extend (["-mhard-float", "-mpowerpc-gfxopt"])
+
+elif re.search ("i[0-9]86", config[config_cpu]) != None :
+
+ if env['NOARCH'] == 0:
+
+ if config[config_kernel] == 'linux' :
+
+ flag_line = os.popen ("cat /proc/cpuinfo | grep '^flags'").read()[:-1]
+ x86_flags = flag_line.split (": ")[1:][0].split (' ')
+
+ if "mmx" in x86_flags:
+ opt_flags.append ("-mmmx")
+ if "sse" in x86_flags:
+ opt_flags.extend (["-msse", "-mfpmath=sse"])
+ if "3dnow" in x86_flags:
+ opt_flags.append ("-m3dnow")
+
+ if config[config_cpu] == "i586":
+ opt_flags.append ("-march=i586")
+ elif config[config_cpu] == "i686":
+ opt_flags.append ("-march=i686")
+
+#
+# ARCH="..." overrides all
+#
+
+if env['ARCH'] != '':
+ opt_flags = env['ARCH'].split()
+
+#
+# prepend boiler plate optimization flags
+#
+
+opt_flags[:0] = [
+ "-O3",
+ "-fomit-frame-pointer",
+ "-ffast-math",
+ "-fstrength-reduce"
+ ]
+
+if env['DEBUG'] == 1:
+ env.Append(CCFLAGS="-g")
+else:
+ env.Append(CCFLAGS=" ".join (opt_flags))
+
+env.Append(CCFLAGS="-Wall")
+
+if env['VST']:
+ env.Append(CCFLAGS="-DVST_SUPPORT")
+
+#
+# everybody needs this
+#
+
+env.Merge ([ libraries['core'] ])
+
+#
+# i18n support
+#
+
+conf = Configure (env)
+
+if env['NLS']:
+ if conf.CheckCHeader('libintl.h') == None:
+ print 'This system is not configured for internationalized applications. An english-only version will be built\n'
+ env['NLS'] = 0
+
+env = conf.Finish()
+
+if env['NLS'] == 1:
+ env.Append(CCFLAGS="-DENABLE_NLS")
+
+Export('env install_prefix final_prefix config_prefix final_config_prefix libraries i18n version')
+
+#
+# the configuration file may be system dependent
+#
+
+conf = env.Configure ()
+
+if conf.CheckCHeader('/System/Library/Frameworks/CoreAudio.framework/Versions/A/Headers/CoreAudio.h'):
+ subst_dict['%JACK_BACKEND%'] = "coreaudio:Built-in Audio:in"
+else:
+ subst_dict['%JACK_BACKEND%'] = "alsa_pcm:playback_"
+
+env = conf.Finish()
+
+rcbuild = env.SubstInFile ('ardour.rc','ardour.rc.in', SUBST_DICT = subst_dict)
+
+env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour'), 'ardour_system.rc'))
+env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour'), 'ardour.rc'))
+
+Default (rcbuild)
+
+# source tarball
+
+Precious (env['DISTTREE'])
+
+#
+# note the special "cleanfirst" source name. this triggers removal
+# of the existing disttree
+#
+
+env.Distribute (env['DISTTREE'],
+ [ 'SConstruct',
+ 'COPYING', 'PACKAGER_README', 'README',
+ 'ardour.rc.in',
+ 'ardour_system.rc',
+ 'tools/config.guess'
+ ] +
+ glob.glob ('DOCUMENTATION/AUTHORS*') +
+ glob.glob ('DOCUMENTATION/CONTRIBUTORS*') +
+ glob.glob ('DOCUMENTATION/TRANSLATORS*') +
+ glob.glob ('DOCUMENTATION/BUILD*') +
+ glob.glob ('DOCUMENTATION/FAQ*') +
+ glob.glob ('DOCUMENTATION/README*')
+ )
+
+srcdist = env.Tarball(env['TARBALL'], env['DISTTREE'])
+env.Alias ('srctar', srcdist)
+#
+# don't leave the distree around
+#
+env.AddPreAction (env['DISTTREE'], Action ('rm -rf ' + str (File (env['DISTTREE']))))
+env.AddPostAction (srcdist, Action ('rm -rf ' + str (File (env['DISTTREE']))))
+
+#
+# the subdirs
+#
+
+for subdir in coredirs:
+ SConscript (subdir + '/SConscript')
+
+for sublistdir in [subdirs2, gtk2_subdirs]:
+ for subdir in sublistdir:
+ SConscript (subdir + '/SConscript')
+
+# cleanup
+env.Clean ('scrub', [ 'scache.conf', '.sconf_temp', '.sconsign.dblite', 'config.log'])
+
diff --git a/ardour.rc.in b/ardour.rc.in
new file mode 100644
index 0000000000..685bf22d86
--- /dev/null
+++ b/ardour.rc.in
@@ -0,0 +1,136 @@
+<?xml version="1.0"?>
+<Ardour>
+ <MIDI-port tag="%MIDITAG%" device="ardour" type="%MIDITYPE%" mode="duplex"/>
+ <Config>
+ <Option name="minimum-disk-io-bytes" value="262144"/>
+ <Option name="track-buffer-seconds" value="5.000000"/>
+ <Option name="mute-affects-pre-fader" value="yes"/>
+ <Option name="mute-affects-post-fader" value="yes"/>
+ <Option name="mute-affects-control-outs" value="yes"/>
+ <Option name="mute-affects-main-outs" value="yes"/>
+ <Option name="solo-latch" value="yes"/>
+ <Option name="mtc-port" value="%MIDITAG%"/>
+ <Option name="mmc-port" value="%MIDITAG%"/>
+ <Option name="midi-port" value="%MIDITAG%"/>
+ <Option name="jack-time-master" value="yes"/>
+ <Option name="trace-midi-input" value="no"/>
+ <Option name="trace-midi-output" value="no"/>
+ <Option name="plugins-stop-with-transport" value="no"/>
+ <Option name="no-sw-monitoring" value="no"/>
+ <Option name="stop-recording-on-xrun" value="no"/>
+ <Option name="stop-at-session-end" value="no"/>
+ <Option name="auto-xfade" value="yes"/>
+ <Option name="no-new-session-dialog" value="yes"/>
+ <Option name="timecode-source-is-synced" value="yes"/>
+ <Option name="auditioner-left-out" value="%JACK_BACKEND%1"/>
+ <Option name="auditioner-right-out" value="%JACK_BACKEND%2"/>
+ <Option name="quieten-at-speed" value="1.000000"/>
+ <Option name="use-vst" value="yes"/>
+ </Config>
+ <Keys>
+ <context name="default">
+ <binding keys="Ctrl-w" action="close-dialog"/>
+ <binding keys="Ctrl-u" action="start-prefix"/>
+ <binding keys="Alt-e" action="toggle-editor-window"/>
+ <binding keys="Alt-m" action="toggle-mixer-window"/>
+ <binding keys="Alt-r" action="toggle-recorder-window"/>
+ <binding keys="Alt-l" action="toggle-locations-window"/>
+ <binding keys="Alt-c" action="toggle-big-clock-window"/>
+ <binding keys="Alt-o" action="toggle-options-window"/>
+ <binding keys=" " action="toggle-playback"/>
+ <binding keys="Ctrl-Shift- " action="toggle-playback-forget-capture"/>
+ <binding keys="Ctrl-n" action="new-session"/>
+ <binding keys="Ctrl-t" action="add-audio-track"/>
+ <binding keys="Ctrl-s" action="save-state"/>
+ <binding keys="Ctrl-q" action="quit"/>
+ <binding keys="Left" action="transport-rewind"/>
+ <binding keys="Shift-Left" action="transport-rewind-fast"/>
+ <binding keys="Ctrl-Left" action="transport-rewind-slow"/>
+ <binding keys="Right" action="transport-forward"/>
+ <binding keys="Shift-Right" action="transport-forward-fast"/>
+ <binding keys="Ctrl-Right" action="transport-forward-slow"/>
+ <binding keys="R" action="transport-record"/>
+ <binding keys="i" action="toggle-punch-in"/>
+ <binding keys="Home" action="transport-goto-start"/>
+ <binding keys="Ctrl-a" action="transport-goto-start"/>
+ <binding keys="End" action="transport-goto-end"/>
+ <binding keys="Ctrl-e" action="transport-goto-end"/>
+ <binding keys="Ctrl-m" action="send-all-midi-feedback"/>
+ </context>
+ <context name="editor">
+ <binding keys="Tab" action="playhead-to-next-region-start"/>
+ <binding keys="Ctrl-Tab" action="playhead-to-next-region-end"/>
+ <binding keys="`" action="playhead-to-previous-region-start"/>
+ <binding keys="Ctrl-`" action="playhead-to-previous-region-end"/>
+ <binding keys="[" action="edit-cursor-to-previous-region-start"/>
+ <binding keys="Ctrl-[" action="edit-cursor-to-previous-region-end"/>
+ <binding keys="]" action="edit-cursor-to-next-region-start"/>
+ <binding keys="Ctrl-]" action="edit-cursor-to-next-region-end"/>
+ <binding keys="'" action="edit-cursor-to-next-region-sync"/>
+ <binding keys=";" action="edit-cursor-to-previous-region-sync"/>
+ <binding keys="Left" action="scroll-backward"/>
+ <binding keys="Right" action="scroll-forward"/>
+ <binding keys="KP_2" action="start-range"/>
+ <binding keys="KP_8" action="finish-range"/>
+ <binding keys="KP_6" action="jump-forward-to-mark"/>
+ <binding keys="KP_Right" action="jump-forward-to-mark"/>
+ <binding keys="KP_4" action="jump-backward-to-mark"/>
+ <binding keys="KP_Left" action="jump-backward-to-mark"/>
+ <binding keys="KP_Enter" action="add-location-from-playhead"/>
+ <binding keys="KP_Add" action="nudge-forward"/>
+ <binding keys="Ctrl-KP_Add" action="nudge-next-forward"/>
+ <binding keys="KP_Subtract" action="nudge-backward"/>
+ <binding keys="Ctrl-KP_Subtract" action="nudge-next-backward"/>
+ <binding keys="=" action="temporal-zoom-out"/>
+ <binding keys="-" action="temporal-zoom-in"/>
+ <binding keys="Page_Up" action="scroll-tracks-up"/>
+ <binding keys="Page_Down" action="scroll-tracks-down"/>
+ <binding keys="a" action="align-regions-sync-relative"/>
+ <binding keys="Meta-a" action="align-regions-sync"/>
+ <binding keys="Meta-Ctrl-a" action="align-regions-end"/>
+ <binding keys="Ctrl-A" action="align-regions-start-relative"/>
+ <binding keys="Ctrl-b" action="brush-at-mouse"/>
+ <binding keys="e" action="set-edit-cursor"/>
+ <binding keys="f" action="toggle-follow-playhead"/>
+ <binding keys="r" action="set-mouse-mode-range"/>
+ <binding keys="g" action="set-mouse-mode-gain"/>
+ <binding keys="l" action="toggle-auto-loop"/>
+ <binding keys="o" action="set-mouse-mode-object"/>
+ <binding keys="p" action="set-playhead"/>
+ <binding keys="t" action="set-mouse-mode-timefx"/>
+ <binding keys="s" action="split-at-mouse"/>
+ <binding keys="Alt-s" action="split-at-edit-cursor"/>
+ <binding keys="z" action="set-mouse-mode-zoom"/>
+ <binding keys="Z" action="zoom-focus-playhead"/>
+ <binding keys="Ctrl-z" action="set-undo"/>
+ <binding keys="Ctrl-r" action="set-redo"/>
+ <binding keys="Ctrl-x" action="editor-cut"/>
+ <binding keys="Ctrl-c" action="editor-copy"/>
+ <binding keys="Ctrl-v" action="editor-paste"/>
+ <binding keys="Up" action="step-tracks-up"/>
+ <binding keys="Down" action="step-tracks-down"/>
+ <binding keys="Shift-Tab" action="extend-range-to-end-of-region"/>
+ <binding keys="Ctrl-Shift-Tab" action="extend-range-to-start-of-region"/>
+ <binding keys="Insert" action="insert-region"/>
+ <binding keys="Delete" action="editor-cut"/>
+ <binding keys="Meta-d" action="duplicate-region"/>
+ <binding keys="Meta-s" action="duplicate-range"/>
+ <binding keys="Alt-r" action="reverse-region"/>
+ <binding keys="Alt-n" action="normalize-region"/>
+ <binding keys="Ctrl-l" action="center-playhead"/>
+ <binding keys="Ctrl-g" action="goto"/>
+ <binding keys="Alt-f" action="playhead-forward"/>
+ <binding keys="Alt-b" action="playhead-backward"/>
+ <binding keys="Return" action="playhead-to-edit"/>
+ <binding keys="Alt-Return" action="edit-to-playhead"/>
+ <binding keys="F1" action="edit-cursor-to-range-start"/>
+ <binding keys="F2" action="edit-cursor-to-range-end"/>
+ <binding keys="F9" action="snap-to-beat"/>
+ <binding keys="F10" action="snap-to-bar"/>
+ <binding keys="." action="audition-at-mouse"/>
+ </context>
+ </Keys>
+ <extra>
+ <Keyboard edit-button="3" edit-modifier="4" delete-button="3" delete-modifier="1" snap-modifier="32"/>
+ </extra>
+</Ardour>
diff --git a/ardour_system.rc b/ardour_system.rc
new file mode 100644
index 0000000000..911eb60181
--- /dev/null
+++ b/ardour_system.rc
@@ -0,0 +1,94 @@
+<?xml version="1.0"?>
+<Ardour>
+ <Config>
+ <Option name="minimum-disk-io-bytes" value="262144"/>
+ <Option name="track-buffer-seconds" value="5.000000"/>
+ <Option name="mute-affects-pre-fader" value="yes"/>
+ <Option name="mute-affects-post-fader" value="yes"/>
+ <Option name="mute-affects-control-outs" value="yes"/>
+ <Option name="mute-affects-main-outs" value="yes"/>
+ <Option name="solo-latch" value="yes"/>
+ <Option name="pixmap-path" value="/usr/share/ardour/pixmaps:/usr/local/share/ardour/pixmaps"/>
+ <Option name="disk-choice-space-threshold" value="57600000"/>
+ <Option name="mtc-port" value="trident"/>
+ <Option name="mmc-port" value="trident"/>
+ <Option name="monitor-inputs" value="no"/>
+ </Config>
+ <Keys>
+ <context name="default">
+ <binding keys="Ctrl-w" action="close-dialog"/>
+ <binding keys="Ctrl-u" action="start-prefix"/>
+ <binding keys="Alt-e" action="toggle-editor-window"/>
+ <binding keys="Alt-m" action="toggle-mixer-window"/>
+ <binding keys="Alt-r" action="toggle-recorder-window"/>
+ <binding keys="Alt-l" action="toggle-locations-window"/>
+ <binding keys="Alt-c" action="toggle-big-clock-window"/>
+ <binding keys="Alt-o" action="toggle-options-window"/>
+ <binding keys=" " action="toggle-playback"/>
+ <binding keys="Ctrl-Shift- " action="toggle-playback-forget-capture"/>
+ <binding keys="Ctrl-n" action="new-session"/>
+ <binding keys="Ctrl-t" action="add-audio-track"/>
+ <binding keys="Ctrl-s" action="save-state"/>
+ <binding keys="Ctrl-q" action="quit"/>
+ <binding keys="Left" action="transport-rewind"/>
+ <binding keys="Right" action="transport-forward"/>
+ <binding keys="r" action="transport-record"/>
+ <binding keys="Home" action="transport-goto-start"/>
+ <binding keys="Ctrl-a" action="transport-goto-start"/>
+ <binding keys="End" action="transport-goto-end"/>
+ <binding keys="Ctrl-e" action="transport-goto-end"/>
+ </context>
+ <context name="editor">
+ <binding keys="Tab" action="playhead-to-next-region-start"/>
+ <binding keys="Ctrl-Tab" action="playhead-to-next-region-end"/>
+ <binding keys="`" action="playhead-to-previous-region-start"/>
+ <binding keys="Ctrl-`" action="playhead-to-previous-region-end"/>
+ <binding keys="[" action="edit-cursor-to-previous-region-start"/>
+ <binding keys="Ctrl-[" action="edit-cursor-to-previous-region-end"/>
+ <binding keys="]" action="edit-cursor-to-next-region-start"/>
+ <binding keys="Ctrl-]" action="edit-cursor-to-next-region-end"/>
+ <binding keys="'" action="edit-cursor-to-next-region-sync"/>
+ <binding keys=";" action="edit-cursor-to-previous-region-sync"/>
+ <binding keys="Left" action="scroll-backward"/>
+ <binding keys="Right" action="scroll-forward"/>
+ <binding keys="KP_6" action="jump-forward-to-mark"/>
+ <binding keys="KP_Right" action="jump-forward-to-mark"/>
+ <binding keys="KP_4" action="jump-backward-to-mark"/>
+ <binding keys="KP_Left" action="jump-backward-to-mark"/>
+ <binding keys="KP_Enter" action="add-location-from-playhead"/>
+ <binding keys="KP_Add" action="nudge-forward"/>
+ <binding keys="Ctrl-KP_Add" action="nudge-next-forward"/>
+ <binding keys="KP_Subtract" action="nudge-backward"/>
+ <binding keys="Ctrl-KP_Subtract" action="nudge-next-backward"/>
+ <binding keys="=" action="temporal-zoom-out"/>
+ <binding keys="-" action="temporal-zoom-in"/>
+ <binding keys="Page_Up" action="scroll-tracks-up"/>
+ <binding keys="Page_Down" action="scroll-tracks-down"/>
+ <binding keys="o" action="set-mouse-mode-object"/>
+ <binding keys="g" action="set-mouse-mode-range"/>
+ <binding keys="G" action="set-mouse-mode-gain"/>
+ <binding keys="t" action="set-mouse-mode-timefx"/>
+ <binding keys="f" action="toggle-follow-playhead"/>
+ <binding keys="z" action="set-mouse-mode-zoom"/>
+ <binding keys="Z" action="zoom-focus-playhead"/>
+ <binding keys="Ctrl-z" action="set-undo"/>
+ <binding keys="Ctrl-r" action="set-redo"/>
+ <binding keys="Ctrl-x" action="editor-cut"/>
+ <binding keys="Ctrl-c" action="editor-copy"/>
+ <binding keys="Ctrl-v" action="editor-paste"/>
+ <binding keys="Insert" action="insert-region"/>
+ <binding keys="Delete" action="editor-cut"/>
+ <binding keys="Meta-d" action="duplicate-region"/>
+ <binding keys="Alt-r" action="reverse-region"/>
+ <binding keys="Alt-n" action="normalize-region"/>
+ <binding keys="Ctrl-l" action="center-playhead"/>
+ <binding keys="Ctrl-g" action="goto"/>
+ <binding keys="Ctrl-f" action="scroll-forward"/>
+ <binding keys="Ctrl-b" action="scroll-backward"/>
+ <binding keys="Alt-f" action="playhead-forward"/>
+ <binding keys="Alt-b" action="playhead-backward"/>
+ <binding keys="Return" action="playhead-to-edit"/>
+ <binding keys="Alt-Return" action="edit-to-playhead"/>
+ </context>
+ </Keys>
+</Ardour>
diff --git a/libs/.cvsignore b/libs/.cvsignore
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/libs/.cvsignore
diff --git a/libs/cassowary/.cvsignore b/libs/cassowary/.cvsignore
new file mode 100644
index 0000000000..7ac7ae08ae
--- /dev/null
+++ b/libs/cassowary/.cvsignore
@@ -0,0 +1,15 @@
+.deps
+ClReader-lex.cc
+ClReader.cc
+ClReader.hh
+ClReader.cc.h
+Makefile
+Makefile.in
+aclocal.m4
+autom4te.cache
+config.h
+config.h.in
+config.log
+config.status
+configure
+stamp-h1
diff --git a/libs/cassowary/ANNOUNCE b/libs/cassowary/ANNOUNCE
new file mode 100644
index 0000000000..e0137fa643
--- /dev/null
+++ b/libs/cassowary/ANNOUNCE
@@ -0,0 +1,37 @@
+Announcing the release of a free (for research use) constraint solver:
+
+Cassowary Constraint Solver for Smalltalk, C++, and Java
+Version 0.60
+
+Web Page: http://www.cs.washington.edu/research/constraints/cassowary
+Distribution: ftp://ftp.cs.washington.edu:/pub/constraints/code/cassowary/
+Contact: cassowary@cs.washington.edu
+
+Greg J. Badros <gjb@cs.washington.edu> and
+Alan Borning <borning@cs.washington.edu>
+University of Washington
+Computer Science and Engineering
+15-December-1999
+
+with Constraint Drawing Applet (CDA) by Michael Noth <noth@cs.washington.edu>
+
+Cassowary is an incremental constraint solving toolkit that efficiently
+solves systems of linear equalities and inequalities. Constraints may
+be either requirements or preferences. Client code specifies the
+constraints to be maintained, and the solver updates the constrained
+variables to have values that satisfy the constraints.
+
+A technical report is included in the distribution that describes the
+algorithm, interface, and implementation of the Cassowary solver.
+Additionally, the distribution contains toy sample applications written
+in Smalltalk, C++, Java, and Python, and a more complex example Java
+applet, the "Constraint Drawing Application".
+
+More information is available on our web page:
+
+http://www.cs.washington.edu/research/constraints/cassowary
+
+See README for more details on getting started using these packages.
+See NEWS for a history of user-visible changes.
+See LICENSE for legalese regarding use of this distribution.
+
diff --git a/libs/cassowary/AUTHORS b/libs/cassowary/AUTHORS
new file mode 100644
index 0000000000..51d8592e6f
--- /dev/null
+++ b/libs/cassowary/AUTHORS
@@ -0,0 +1,12 @@
+Cassowary Constraint Solving Toolkit was
+Implemented by:
+
+Greg J. Badros <gjb@cs.washington.edu> and
+Alan Borning <borning@cs.washington.edu>
+University of Washington
+Computer Science and Engineering
+Seattle, WA 98195-2350
+
+with Constraint Drawing Applet (CDA) by Michael Noth <noth@cs.washington.edu>
+
+Please send bug reports to cassowary@cs.washington.edu
diff --git a/libs/cassowary/COPYING b/libs/cassowary/COPYING
new file mode 100644
index 0000000000..d60c31a97a
--- /dev/null
+++ b/libs/cassowary/COPYING
@@ -0,0 +1,340 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/libs/cassowary/COPYING.LGPL b/libs/cassowary/COPYING.LGPL
new file mode 100644
index 0000000000..5f66256a83
--- /dev/null
+++ b/libs/cassowary/COPYING.LGPL
@@ -0,0 +1,444 @@
+GNU LESSER GENERAL PUBLIC LICENSE
+
+Version 2.1, February 1999
+
+Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Everyone is permitted to copy and distribute verbatim copies
+of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+Preamble
+
+The licenses for most software are designed to take away your freedom to
+share and change it. By contrast, the GNU General Public Licenses are
+intended to guarantee your freedom to share and change free software--to
+make sure the software is free for all its users.
+
+This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the Free
+Software Foundation and other authors who decide to use it. You can use
+it too, but we suggest you first think carefully about whether this
+license or the ordinary General Public License is the better strategy to
+use in any particular case, based on the explanations below.
+
+When we speak of free software, we are referring to freedom of use, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish); that you receive source code or can get it if
+you want it; that you can change the software and use pieces of it in
+new free programs; and that you are informed that you can do these
+things.
+
+To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for you
+if you distribute copies of the library or if you modify it.
+
+For example, if you distribute copies of the library, whether gratis or
+for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide complete
+object files to the recipients, so that they can relink them with the
+library after making changes to the library and recompiling it. And you
+must show them these terms so they know their rights.
+
+We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+To protect each distributor, we want to make it very clear that there is
+no warranty for the free library. Also, if the library is modified by
+someone else and passed on, the recipients should know that what they
+have is not the original version, so that the original author's
+reputation will not be affected by problems that might be introduced by
+others.
+
+Finally, software patents pose a constant threat to the existence of any
+free program. We wish to make sure that a company cannot effectively
+restrict the users of a free program by obtaining a restrictive license
+from a patent holder. Therefore, we insist that any patent license
+obtained for a version of the library must be consistent with the full
+freedom of use specified in this license.
+
+Most GNU software, including some libraries, is covered by the ordinary
+GNU General Public License. This license, the GNU Lesser General Public
+License, applies to certain designated libraries, and is quite different
+from the ordinary General Public License. We use this license for
+certain libraries in order to permit linking those libraries into
+non-free programs.
+
+When a program is linked with a library, whether statically or using a
+shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the entire
+combination fits its criteria of freedom. The Lesser General Public
+License permits more lax criteria for linking other code with the
+library.
+
+We call this license the "Lesser" General Public License because it does
+Less to protect the user's freedom than the ordinary General Public
+License. It also provides other free software developers Less of an
+advantage over competing non-free programs. These disadvantages are the
+reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+For example, on rare occasions, there may be a special need to encourage
+the widest possible use of a certain library, so that it becomes a
+de-facto standard. To achieve this, non-free programs must be allowed to
+use the library. A more frequent case is that a free library does the
+same job as widely used non-free libraries. In this case, there is
+little to gain by limiting the free library to free software only, so we
+use the Lesser General Public License.
+
+In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of free
+software. For example, permission to use the GNU C Library in non-free
+programs enables many more people to use the whole GNU operating system,
+as well as its variant, the GNU/Linux operating system.
+
+Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is linked
+with the Library has the freedom and the wherewithal to run that program
+using a modified version of the Library.
+
+The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or other
+authorized party saying it may be distributed under the terms of this
+Lesser General Public License (also called "this License"). Each
+licensee is addressed as "you".
+
+A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+The "Library", below, refers to any such software library or work which
+has been distributed under these terms. A "work based on the Library"
+means either the Library or any derivative work under copyright law:
+that is to say, a work containing the Library or a portion of it, either
+verbatim or with modifications and/or translated straightforwardly into
+another language. (Hereinafter, translation is included without
+limitation in the term "modification".)
+
+"Source code" for a work means the preferred form of the work for making
+modifications to it. For a library, complete source code means all the
+source code for all modules it contains, plus any associated interface
+definition files, plus the scripts used to control compilation and
+installation of the library.
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of running
+a program using the Library is not restricted, and output from such a
+program is covered only if its contents constitute a work based on the
+Library (independent of the use of the Library in a tool for writing
+it). Whether that is true depends on what the Library does and what the
+program that uses the Library does.
+
+1. You may copy and distribute verbatim copies of the Library's complete
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the notices
+that refer to this License and to the absence of any warranty; and
+distribute a copy of this License along with the Library.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+2. You may modify your copy or copies of the Library or any portion of
+it, thus forming a work based on the Library, and copy and distribute
+such modifications or work under the terms of Section 1 above, provided
+that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library. b) You
+ must cause the files modified to carry prominent notices stating
+ that you changed the files and the date of any change. c) You
+ must cause the whole of the work to be licensed at no charge to
+ all third parties under the terms of this License. d) If a
+ facility in the modified Library refers to a function or a table
+ of data to be supplied by an application program that uses the
+ facility, other than as an argument passed when the facility is
+ invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+ These requirements apply to the modified work as a whole. If
+ identifiable sections of that work are not derived from the
+ Library, and can be reasonably considered independent and
+ separate works in themselves, then this License, and its terms,
+ do not apply to those sections when you distribute them as
+ separate works. But when you distribute the same sections as part
+ of a whole which is a work based on the Library, the distribution
+ of the whole must be on the terms of this License, whose
+ permissions for other licensees extend to the entire whole, and
+ thus to each and every part regardless of who wrote it.
+
+ Thus, it is not the intent of this section to claim rights or
+ contest your rights to work written entirely by you; rather, the
+ intent is to exercise the right to control the distribution of
+ derivative or collective works based on the Library.
+
+ In addition, mere aggregation of another work not based on the
+ Library with the Library (or with a work based on the Library) on
+ a volume of a storage or distribution medium does not bring the
+ other work under the scope of this License.
+
+3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so that
+they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in these
+notices.
+
+Once this change is made in a given copy, it is irreversible for that
+copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+This option is useful when you wish to copy part of the code of the
+Library into a program that is not a library.
+
+4. You may copy and distribute the Library (or a portion or derivative
+of it, under Section 2) in object code or executable form under the
+terms of Sections 1 and 2 above provided that you accompany it with the
+complete corresponding machine-readable source code, which must be
+distributed under the terms of Sections 1 and 2 above on a medium
+customarily used for software interchange.
+
+If distribution of object code is made by offering access to copy from a
+designated place, then offering equivalent access to copy the source
+code from the same place satisfies the requirement to distribute the
+source code, even though third parties are not compelled to copy the
+source along with the object code.
+
+5. A program that contains no derivative of any portion of the Library,
+but is designed to work with the Library by being compiled or linked
+with it, is called a "work that uses the Library". Such a work, in
+isolation, is not a derivative work of the Library, and therefore falls
+outside the scope of this License.
+
+However, linking a "work that uses the Library" with the Library creates
+an executable that is a derivative of the Library (because it contains
+portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License. Section 6
+states terms for distribution of such executables.
+
+When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is
+not. Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+If such an object file uses only numerical parameters, data structure
+layouts and accessors, and small macros and small inline functions (ten
+lines or less in length), then the use of the object file is
+unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section
+6. Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+6. As an exception to the Sections above, you may also combine or link a
+"work that uses the Library" with the Library to produce a work
+containing portions of the Library, and distribute that work under terms
+of your choice, provided that the terms permit modification of the work
+for the customer's own use and reverse engineering for debugging such
+modifications.
+
+You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work during
+execution displays copyright notices, you must include the copyright
+notice for the Library among them, as well as a reference directing the
+user to the copy of this License. Also, you must do one of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in
+ the Library will not necessarily be able to recompile the
+ application to use the modified definitions.) b) Use a suitable
+ shared library mechanism for linking with the Library. A suitable
+ mechanism is one that (1) uses at run time a copy of the library
+ already present on the user's computer system, rather than
+ copying library functions into the executable, and (2) will
+ operate properly with a modified version of the library, if the
+ user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made
+ with. c) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials specified
+ in Subsection 6a, above, for a charge no more than the cost of
+ performing this distribution. d) If distribution of the work is
+ made by offering access to copy from a designated place, offer
+ equivalent access to copy the above specified materials from the
+ same place. e) Verify that the user has already received a copy
+ of these materials or that you have already sent this user a
+ copy.
+
+For an executable, the required form of the "work that uses the Library"
+must include any data and utility programs needed for reproducing the
+executable from it. However, as a special exception, the materials to be
+distributed need not include anything that is normally distributed (in
+either source or binary form) with the major components (compiler,
+kernel, and so on) of the operating system on which the executable runs,
+unless that component itself accompanies the executable.
+
+It may happen that this requirement contradicts the license restrictions
+of other proprietary libraries that do not normally accompany the
+operating system. Such a contradiction means you cannot use both them
+and the Library together in an executable that you distribute.
+
+7. You may place library facilities that are a work based on the Library
+side-by-side in a single library together with other library facilities
+not covered by this License, and distribute such a combined library,
+provided that the separate distribution of the work based on the Library
+and of the other library facilities is otherwise permitted, and provided
+that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above. b) Give prominent notice with the combined
+ library of the fact that part of it is a work based on the
+ Library, and explaining where to find the accompanying uncombined
+ form of the same work.
+
+8. You may not copy, modify, sublicense, link with, or distribute the
+Library except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense, link with, or distribute the
+Library is void, and will automatically terminate your rights under this
+License. However, parties who have received copies, or rights, from you
+under this License will not have their licenses terminated so long as
+such parties remain in full compliance.
+
+9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and all
+its terms and conditions for copying, distributing or modifying the
+Library or works based on it.
+
+10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted
+herein. You are not responsible for enforcing compliance by third
+parties with this License.
+
+11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot distribute
+so as to satisfy simultaneously your obligations under this License and
+any other pertinent obligations, then as a consequence you may not
+distribute the Library at all. For example, if a patent license would
+not permit royalty-free redistribution of the Library by all those who
+receive copies directly or indirectly through you, then the only way you
+could satisfy both it and this License would be to refrain entirely from
+distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply, and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is implemented
+by public license practices. Many people have made generous
+contributions to the wide range of software distributed through that
+system in reliance on consistent application of that system; it is up to
+the author/donor to decide if he or she is willing to distribute
+software through any other system and a licensee cannot impose that
+choice.
+
+This section is intended to make thoroughly clear what is believed to be
+a consequence of the rest of this License.
+
+12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may
+add an explicit geographical distribution limitation excluding those
+countries, so that distribution is permitted only in or among countries
+not thus excluded. In such case, this License incorporates the
+limitation as if written in the body of this License.
+
+13. The Free Software Foundation may publish revised and/or new versions
+of the Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a license
+version number, you may choose any version ever published by the Free
+Software Foundation.
+
+14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free Software
+Foundation; we sometimes make exceptions for this. Our decision will be
+guided by the two goals of preserving the free status of all derivatives
+of our free software and of promoting the sharing and reuse of software
+generally.
+
+NO WARRANTY
+
+15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
+EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
+ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH
+YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
+NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR
+DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL
+DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY
+(INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED
+INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF
+THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR
+OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+END OF TERMS AND CONDITIONS
diff --git a/libs/cassowary/ChangeLog b/libs/cassowary/ChangeLog
new file mode 100644
index 0000000000..be31e0e5a9
--- /dev/null
+++ b/libs/cassowary/ChangeLog
@@ -0,0 +1,2002 @@
+Fri Mar 18 15:41:00 2005 Taybin Rutkin <taybin@earthlink.net>
+ * Removed ClSet.h, ClMap.h.
+ * ClReader.l includes ClReader.cc.h instead of ClReader.hh. The
+ difference between yacc and bison.
+ * Various changes to fix compliation.
+
+Wed Jan 29 21:36:15 2003 Taybin Rutkin <trutkin@physics.clarku.edu>
+ * Updated to work with g++ 3.x compilers.
+ * More direct use of STL.
+ * Removed C wrappers
+
+Sun Mar 12 13:40:44 2000 Greg J. Badros <gjb@cs.washington.edu>
+
+ * guile/cassowary_scm.cc: Give docstrings as arguments
+
+ * guile/cl-snarf.h: Added docstring as an argument to CL_PROC to
+ be like the revised Scwm documentation extraction system.
+
+Sat Feb 12 20:34:55 2000 Greg J. Badros <gjb@cs.washington.edu>
+
+ * Makefile.am: Added GTL.h.patch to EXTRA_DIST
+
+Sat Feb 12 20:31:47 2000 Greg J. Badros <gjb@cs.washington.edu>
+
+ * c++/ClSimplexSolver.cc, c++/ClSimplexSolver.h: Drop
+ ExternalResetStayConstants, make ResetStayConstants() public.
+ Test _fResetStayConstantsAutomatically before doing so in
+ Resolve(). Use _fAutosolve instead of _fOptimizeAutomatically.
+ Drop DisplayObjective (wasn't defined anyway). Drop field
+ _fOptimizeAutomatically (use _fAutosolve from parent, instead).
+
+ * guile/cassowary_scm.hpp, guile/cassowary_scm.cc: Drop extra
+ include of guile/gh.h
+
+ * guile/cassowary_scm.cc: Added `cl-set-auto-solve!',
+ `cl-set-auto-reset-stay-constants!'
+
+Sat Jan 29 17:45:32 2000 Greg J. Badros <gjb@cs.washington.edu>
+
+ * configure.in (CASSOWARY_VERSION): Bump to 0.55.
+
+Sat Jan 29 17:43:05 2000 Greg J. Badros <gjb@cs.washington.edu>
+
+ * c++/ClSimplexSolver.cc (Resolve): Do not comment out
+ "ResetStayConstants()" as Beurivé had done. This was resulting in
+ quirky behaviour whereby the windows were "rubber-banding" back to
+ where they were at the start of an interaction (e.g., if I push a
+ window out of the way to the left with another window, as I move
+ the pushing window back to the right, the other window comes back
+ to the right with the pushing window). Maybe that's desirable
+ behaviour in some instances, but it's not the behaviour we
+ document and sure feels weird to me.
+
+Sat Jan 29 17:38:43 2000 Greg J. Badros <gjb@cs.washington.edu>
+
+ * java/sym.java, java/parser.java, java/Yylex.java: Added -- these
+ are created by JavaCUP which I don't want to be necessary for
+ building.
+
+Mon Jan 24 09:34:20 2000 Greg J. Badros <gjb@cs.washington.edu>
+
+ * c++/ClSymbolicWeight.h: Set SymbolicWeight multiplier to
+ 1000000, not 10000 (A.Beurivé)
+
+ * c++/ClSimplexSolver.h, c++/ClSimplexSolver.cc: Added
+ ChangeStrength, ChangeStrengthAndWeight, ChangeWeight,
+ DisplayObjective, ExternalResetStayConstants fns.
+ (RemoveConstraintInternal) Avoid picking the objective row when
+ removing a constraint. (Optimize) Pick any negative row to avoid
+ unending pivots [I think this is a work-around to avoid having to
+ implement Bland's anti-cycling rule... maybe I should just do
+ that, though]. (A.Beurivé)
+
+Thu Dec 16 11:12:34 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+ * configure.in: Version bumped to 0.54a
+
+Thu Dec 16 11:10:42 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+ * java/Makefile.am: Force prefix ordering in SUBDIRS so that "."
+ dir gets built before the demos subdirectory.
+
+ * smalltalk/Makefile.am: Fix .dat file -- thanks Alan!
+
+Wed Dec 15 19:31:48 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+ * java/README: More notes re: security problems w/ Java 2.
+
+ * java/cda/Makefile.am: Added run target to ease running it.
+
+ * Makefile.am (EXTRA_DIST): Added c++/{config.h.in,stamp-h.in}
+
+ * java/cda/Makefile.am (EXTRA_DIST): Clean up install of .gif
+ files.
+
+ * java/Makefile.am (EXTRA_DIST): Added ClReader.{cup,lex}
+
+ * c++/Makefile.am: Do not make symlink to cassowary; let
+ configure.in do that.
+
+Wed Dec 15 18:13:14 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+ * java/Makefile.am: Put SUBDIRS demo cda back in since they
+ compile now.
+
+ * scripts/recreate-symlinks: Update with links to ../../EDU from
+ demo directories for Java code. Use ln -sf, not just ln -s, to avoid
+ warnings.
+
+ * Makefile.am (EXTRA_DIST): Include scripts/recreate-symlinks
+
+ * configure.in: Run recreate-symlinks script.
+
+Wed Dec 15 18:07:27 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+ * java/cda/Makefile.am: Put Constraint/*, Main/* files into the
+ distribution and build with them.
+
+ * java/demos/*.java: Move everything into the
+ EDU.Washington.grad.gjb.cassowary_demos package.
+
+ * java/cda/classes/run.html, java/demos/quaddemo.htm: Fix nl
+ convention, name class explicitly w/ package in front, w/o
+ trailing .class.
+
+ * java/cda/**: Move everything into the
+ EDU.Washington.grad.noth.cda package.
+
+Wed Dec 15 17:21:08 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+ * java/Makefile.am: Build java parser.
+
+ * java/ClParseTest.java: Added.
+
+ * GTL.h.patch: Added -- need by gcc-2.95 when compiling GTL-0.3.1
+
+ * java/README: Mention java parser.
+
+ * java/ClReader.lex, java/ClReader.cup: Cleanup, guard debug messages.
+
+Tue Dec 14 11:15:01 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+ * configure.in: Fix -fpermissive test to not check "cc" as well as
+ $CC. Eliminate the --enable-permissive flag since it is no longer
+ necessary.
+
+Mon Dec 13 15:56:19 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+ * java/Yylex.java: Added, from Will Portnoy.
+
+ * java/ClReader.cup, java/ClReader.lex: Latest version from Will,
+ cleaned up line breaks, set a tab-width for Emacs.
+
+Mon Dec 13 15:55:59 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+ * c++/Makefile.am: Remove ClReader.cc -- why did I add this
+ before?
+
+Fri Dec 10 13:29:00 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+ * java/ClSimplexSolver.java (addLowerBound, addUpperBound): Fix
+ these two functions to call addConstraint before returning.
+ Thanks Stephen Allain for catching this! Updated exception specs
+ for those methods and for addBounds.
+
+Tue Dec 7 08:42:34 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+ * smalltalk/A991206.dat: New image from Alan. Include correct
+ version of code for "ClSimplexSolver removeConstraint:" to fix bug
+ when deleting constraints with weights other than 1. Also
+ disallow invalid comparisons between symbolic weights and floats.
+ Replace expressions "x clApprox: 0.0" with "x clApproxZero", which
+ works correctly for both symbolic weights and floats.
+
+ * smalltalk/*.st: Added from Alan.
+
+Mon Nov 29 16:23:06 1999 <gjb@cs.washington.edu>
+
+ * configure.in: Bump to version 0.54, added -lGTL to GTL_LIB even
+ when no --with-gtl option is given. No longer create README from
+ README.in. Added --enable-static-library option, off by default.
+
+ * c++/Makefile.am (sources): Added ClReader.cc
+
+ * cassowary.spec.in, cassowary-both.spec.in: No longer need the
+ --enable-guile-build option; it's the default now.
+
+Mon Nov 29 10:52:49 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+ * c++/Makefile.am: Added use of AM_CONDITIONAL
+ CL_BUILD_STATIC_LIBRARY; only buile libcassowary.a if that option
+ was selected.
+
+ * guile/Makefile.am (libconstraints_la_LIBADD): Added @GTL_LIB@ to
+ make the guile library work with the FD-enabled version of the library.
+
+Sat Nov 27 16:11:10 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+ * configure.in: Invert sense of --enable-guile-build and call it
+ --disable-guile-build; build guile wrapper automatically if
+ guile-config works.
+
+Sat Nov 27 15:20:03 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+ * configure.in: Use an AM_CONDITIONAL for CL_BUILD_FD_SOLVER, not
+ an AC_DEFINE. Also, remove duplicate AC_SUBST of GTL_LIB, and fix
+ AM_CONDITIONAL of CL_BUILD_TESTS.
+
+Sat Nov 27 15:19:20 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+ * c++/Makefile.am: Try separating out FD stuff better, and use
+ CL_BUILD_FD_SOLVER AM_CONDITIONAL to control dependence on that
+ code.
+
+ * c++/config.h.in: Drop CL_BUILD_FD_SOLVER; it's now an
+ AM_CONDITIONAL instead of a define.
+
+Wed Nov 24 15:40:27 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+ * c++/ClSimplexSolver.cc: Fix typo in a throw message.
+
+ * c++/ClLinearInequality.h: Throw an editmisuse when a
+ ClLinearInequality is created w/o an inequality operator.
+
+Tue Nov 23 16:54:05 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+ * configure.in: Use guile's pkglibdir, not pkgdatadir, for
+ choosing cassoguiledir.
+
+Tue Nov 16 17:35:54 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+ * java/ClReader.lex, java/ClReader.cup: Added -- code by Will
+ Portnoy for adding a parser to the Java implementation. Untested,
+ and an early version that he emailed me.
+
+Tue Nov 16 17:34:00 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+ * java/ClTestColumns.java, java/ClTests.java: Put in the cassowary
+ package, instead of importing cassowary.*; jikes needed this
+ (discovered during testing of java-ml work).
+
+Sat Nov 13 11:43:48 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+ * java/Timer.java (Timer): Remove return type from Timer()
+ constructor (jikes caught the bug when I used this as a test case
+ for my java-ml work).
+
+Sun Oct 24 13:17:14 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+ * configure.in: Updated version to 0.53, generate
+ smalltalk/Makefile from Makefile.am.
+
+ * NEWS: Updated for 0.53 release.
+
+ * Makefile.am: Added smalltalk directory to SUBDIRS.
+
+Sat Oct 23 14:34:27 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+ * COPYING.GPL: Added
+
+ * LICENSE: Added Scwm exception
+
+
+Sat Oct 23 14:33:48 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+ * c++/Makefile.am: Make cassowary/ directory symlink as needed.
+
+Sun Oct 3 16:50:43 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+ * c++/ClSimplexSolver.cc: Use clvNil some places instead of NULL.
+ This is important for newer, pickier gcc-2.95.x. Thanks Alexandre
+ Duret-Lutz for the patch!
+
+Thu Sep 30 08:17:16 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+ * c++/ClFDSolver.cc: Added missing #include <stdarg.h> -- Thanks
+ Harry Hochheiser for bug report.
+
+Sun Sep 26 13:43:12 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+ * c++/Makefile.am (libcassowary_la_LDFLAGS): Added -version-info
+ flag to make libcassowary.so.0.0.1, instead of .0.0.0
+
+Sun Sep 26 13:15:32 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+ * README, ANNOUNCE: Removed
+
+ * README.in, ANNOUNCE.in: Added
+
+ * configure.in: Create README, ANNOUNCE, bump to 0.52post
+
+Sat Sep 25 16:02:22 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+ * cassowary.spec.in, configure.in: Update to version 0.52.
+
+Fri Sep 24 18:51:42 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+ * configure.in: Remove first of redundant checks for HAVE_SCM_MAKE_SMOB_TYPE_MFPE.
+
+Mon Sep 20 13:36:45 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+ * guile/cassowary_scm.cc: Fix `cl-int-value' to use gh_int2scm
+ instead of gh_double2scm
+
+Sun Sep 19 14:45:59 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+ * c++/ClSimplexSolver.h, c++/ClSimplexSolver.cc: Replace
+ _editVarMap with _editInfoList, a list. Make ClEditInfo class
+ contain the variable since its no longer stored as values in a
+ hash where the key is the variable. Drop the index from
+ ClEditInfo. Rename ClVarToEditInfoMap to ClEditInfoList.
+
+Sun Sep 19 14:44:00 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+ * c++/ClTests.cc (multiedit2): Added this new test to check nested
+ edits that share an existing variable better. This tests the fix
+ for the ScwmButtons auto-orientation seg-fault bug in Scwm.
+
+ * c++/ClBug0.cc: Added comment re: new bug fix.
+
+Sat Sep 18 22:31:54 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+ * configure.in: Added GUILE_LIBS setting.
+
+ * cassowary.spec.in: Use fake_root_for_install to get the
+ cassowary guile library in proper place.
+
+ * autogen.sh: Only create symlink if not already created.
+
+ * acconfig.h, c++/config.h.in: Added HAVE_SCM_MAKE_SMOB_TYPE_MFPE
+
+ * README: Added note re: enable-permissive
+
+ * guile/cassowary_scm.cc: Use new-style (guile-1.3.2 or better)
+ SMOBs conditioning on HAVE_SCM_MAKE_SMOB_TYPE_MFPE.
+
+Wed Sep 8 20:03:25 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+ * cassowary.spec.in: Bump to release 8
+
+ * cassowary-nofd.spec2.in: Bump to release 2.
+
+Wed Sep 8 19:43:53 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+ * c++/Makefile.am: Drop building of config-inline.h -- let
+ configure handle that-- this was causing a double-build
+ (!!!ugh!!!) of Cassowary when building from RPMs, e.g.
+
+ * GTL.spec.in: Use install-strip target.
+
+Tue Sep 7 23:34:49 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+ * configure.in, Makefile.am: use cassowary-nofd.spec2.in
+
+ * cassowary-nofd.spec2.in: Renamed from cassowary-nofd.spec.in,
+ since having two *.spec files in the top level upsets rpm (it cats
+ them together and then gets confused by the double .spec file).
+
+ * cassowary-both.spec.in: Added-- rpm doesn't support two %build
+ tags (one for a subpackage), but if it did, this is what the
+ corresponding .spec file might look like.
+
+Tue Sep 7 23:02:26 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+ * Makefile.am: Added cassowary-nofd.spec to EXTRA_DIST,
+ bin_SCRIPTS = cassowary-config. Added dist-nofd target, and
+ supporting targets.
+
+ * cassowary.spec.in: Bump to 7, provide virtual package, install
+ %{prefix}/bin/* (for cassowary-config script).
+
+ * configure.in: Added CASSOWARY_VERSION variable, create
+ cassowary-config, cassowary-nofd.spec
+
+ * cassowary-config.in, cassowary-nofd.spec.in: Added
+
+Mon Sep 6 21:40:58 1999 <gjb@cs.washington.edu>
+
+ * cassowary.spec.in: Use install-strip target to remove debug
+ symbols and save disk space. Remove %{prefix}/doc/* from the
+ %files list as they are in the %doc listing already.
+
+Mon Sep 6 12:25:14 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+ * cassowary.spec.in: Use --host=alpha-linux on that platform
+ (using an %ifarch). Bump to release 6.
+
+ * GTL.spec.in: Fix the ./configure line for alpha platform (was
+ missing "--" before the "prefix" option). Bump to release 2.
+
+ * c++/ClSymbolicWeight.h, c++/ClSymbolicWeight.cc: Use int, not
+ unsigned, to remove ambiguity in ClSymbolicWeight constructor.
+
+Sat Sep 4 15:17:13 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+ * acconfig.h: Added NO_CC_PERMISSIVE flag.
+
+ * autogen.sh: Added #!/bin/sh - to top.
+
+ * configure.in: Test for g++/gcc -fpermissive flag. Hopefully
+ this will let it get used only where it is accepted. Some better
+ guile tests, too.
+
+ * cassowary.spec.in: Use --enable-permissive flag, bump from
+ release 3 to 5.
+
+Sat Sep 4 14:44:14 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+ * c++/Makefile.am, guile/Makefile.am: Added CPPEXTRAFLAGS to
+ AM_CPPFLAGS.
+
+ * guile/Makefile.am: Guard lib_LIBRARIES with HAVE_GUILE test so
+ that guile stuff is only built when GUILE is desired and we have
+ the libraries installed.
+
+Tue Aug 31 22:16:04 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+ * java/demos/Makefile.am, java/cda/Makefile.am, java/Makefile.am
+ (install-javaJAVA): Do not try to install .class files if no
+ HAVE_JAVA
+
+Tue Aug 31 21:30:24 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+ * cassowary.spec.in: Do not use --disable-java-build, since that
+ still invokes the rule which is not what I want.
+
+ * java/demos/Makefile.am, java/cda/Makefile.am: Added bogus
+ classjava.stamp rule when no HAVE_JAVA to work around getting an
+ error when trying to run javac with no source files.
+
+ * configure.in: Fix some HAVE_JAVA bugs. Still not perfect, but better.
+
+Tue Aug 31 17:07:31 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+ * java/demos/Makefile.am, java/cda/Makefile.am, java/Makefile.am:
+ Added EXTRA_DIST.
+
+Tue Aug 31 16:27:41 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+ * configure.in (HAVA_JAVA): AC_OUTPUT the java/*/Makefiles.
+
+ * cassowary.spec.in: Use --disable-java-build ./configure option.
+ Bump to release 3.
+
+ * Makefile.am: Do not conditionally do directories-- that is
+ really broken with automake/rpm building.
+
+Tue Aug 31 16:20:45 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+ * java/demos/Makefile.am, java/cda/Makefile.am, java/Makefile.am
+ (java_JAVA): Guard with if HAVE_JAVE.
+
+Mon Aug 30 12:03:26 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+ * cassowary.spec.in: Bump to release 2
+
+ * configure.in: Drop the java/* wrappers/* from AC_OUTPUT macro--
+ this breaks java builds but make the Cassowary RPM build more
+ cleanly. I'm going to start making a separate cassowary-java
+ distribution unless I can figure out how to make automake and Java
+ co-exist more happily.
+
+Mon Aug 30 12:00:39 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+ * c++/ClAbstractVariable.h: #include "cl_auto_ptr.h" and use
+ cl_auto_ptr, not auto_ptr.
+
+Mon Aug 30 10:06:50 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+ * c++/cl_auto_ptr.h: Change the conditional inclusion sandwich to
+ CL_AUTO_PTR_H. Added "#define cl_auto_ptr auto_ptr" for MSVC.
+
+Thu Aug 26 22:42:50 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+ * cassowary.spec.in: Require guile 1.3.2, to be safe. Require GTL
+ >= 0.3.1, not gtl >= 0.3.1 (note capitalization)
+
+Thu Aug 26 14:12:42 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+ * c++/ClFDSolver.h, c++/ClCTest.c, c++/ClC.h, c++/ClC.cc,
+ c++/Cassowary.h, c++/ClConstraint.h: Use LONG_MIN, not MINLONG and
+ #include <limits.h> not <values.h> since the latter is deprecated
+ (and does not work in VC++).
+
+ * THANKS: Thank Pengling He for his VC++ bug report re: values.h
+
+Thu Aug 26 14:08:46 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+ * configure.in (GUILE_PKGDATA_DIR): Set cassoguiledir variable,
+ and use ${prefix} prefix of GUILE_PKGDATA_DIR to be sure that rpm
+ building succeeds (was failing because it was trying to write to
+ an absolute location that guile told it to use, instead of using
+ the prefix of $RPM_BUILD_ROOT).
+
+ * c++/Makefile.am: Fix lex/yacc building dependencies.
+
+ * guile/Makefile.am (cassoguile_LTLIBRARIES): Do not set
+ cassoguiledir here-- do it in configure.in instead.
+
+Thu Aug 26 11:02:36 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+ * guile/Makefile.am (EXTRA_DIST), docs/Makefile.am: Added docs to
+ EXTRA_DIST.
+
+ * c++/Makefile.am: Added ClReader.l, ClReader.y to EXTRA_DIST,
+ remove ClReader.cc from sources. Added timer.h to
+ pkginclude_HEADERS.
+
+ * Makefile.am: Update EXTRA_DIST
+
+Thu Aug 26 08:45:08 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+ * configure.in: Write cassowary.spec, GTL.spec. Bump version to
+ 0.51.
+
+ * autogen.sh: Run configure, not config.status
+
+ * VERSION, README, NEWS, ANNOUNCE: Bump to 0.51, add date, notes.
+
+ * Makefile.am: Drop Java, Python to make easier to package. Added
+ EXTRA_DIST to include some doc files and the cassowary.spec file.
+
+Wed Aug 25 22:54:18 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+ * c++/Makefile.am (pkginclude_HEADERS): cl_auto_ptr.h now, not auto_ptr.h
+
+Mon Aug 23 21:26:31 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+ * ltmain.sh, ltconfig, libtool, configure: Removed -- these are
+ autogenerated by autogen.sh
+
+Mon Aug 23 21:23:53 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+ * c++/ClSimplexSolver.cc: Use cl_auto_ptr, not auto_ptr.
+
+ * c++/ClAbstractVariable.h: #include <memory>, not "auto_ptr.h"
+
+ * c++/cl_auto_ptr.h: Added -- renamed from auto_ptr.h since that
+ was causing some difficulties due to the standard C++ auto_ptr template.
+
+Mon Jul 26 10:19:35 1999 Greg Badros <gjb@cs.washington.edu>
+
+ * c++/Makefile.am (libcassowary_la_SOURCES): Remove redundant
+ listing of ClFD* files from this target.
+
+Mon Jul 26 09:41:09 1999 Greg Badros <gjb@cs.washington.edu>
+
+ * c++/Cl.h: Include ClConstraint.h, since cnLT, etc., need to be
+ defined for ClReader.y
+
+Mon Jul 26 09:22:11 1999 Greg Badros <gjb@cs.washington.edu>
+
+ * acconfig.h, configure.in: Use CL_ prefix for BUILD_FD_SOLVER and
+ HAVE_GTL.
+
+Mon Jul 26 09:17:56 1999 Greg Badros <gjb@cs.washington.edu>
+
+ * c++/config.h.in,c++/ClC.h,c++/ClC.cc,c++/Cl.h: Use CL_ prefix on
+ BUILD_FD_SOLVER and HAVE_GTL so that the config-inline.h gets the
+ right definitions.
+
+ * c++/Makefile.am: Expanded out the sources_for_fd_solver since
+ the _OBJECTS make variable doesn't get expanded properly if this
+ step is deferred until later. This breaks builds w/o FD solver,
+ but I have to get Amaya working ASAP.
+
+Mon Jul 19 17:08:03 1999 Greg Badros <gjb@cs.washington.edu>
+
+ * c++/ClSymbolicWeight.h: Increase multiplier to 10000 for
+ AsDouble-- works around the bug in resizing Scwm windows because
+ the medium stay constraints on width and height are too strong for
+ the strong edit constraint.
+
+Sun Jul 11 19:37:39 1999 Greg Badros <gjb@cs.washington.edu>
+
+ * c++/ClLinearExpression.h: Remove "class" from a typedef
+ ClMap<ClVariable,class T>. Thanks Alexandre 'Pollux' Duret-Lutz
+ for testing against a more recent egcs (gcc-2.95) that caught this
+ problem.
+
+ * configure.in: Improve checks for guile so that it uses --prefix
+ and --exec-prefix to --guile-prefix and --guile-exec-prefix
+
+Sat Jul 10 19:21:34 1999 Greg Badros <gjb@cs.washington.edu>
+
+ * autogen.sh: rm libtool stuff just in case.
+
+ * README: Updated version number, notes about building it and
+ needing GTL for fd solver.
+
+ * configure.in: Added --enable-cxx-tests, --enable-fd-solver,
+ --with-gtl; switch --disable-java-build to --enable-java-build
+
+ * acconfig.h, c++/config.h.in: Added HAVE_GTL, BUILD_FD_SOLVER options.
+
+ * c++/Makefile.am: Make only the library and ClTests get built by
+ default (other binary test programs are each big when build -g,
+ and aren't useful to the end user). Use @SOURCES_FOR_FD_SOLVER@
+ to permit a version of the toolkit to be build without the finite
+ domain subsolver.
+
+ * c++/ClC.h, c++/ClC.cc, c++/Cl.h: Add #ifdefs for no fd subsolver.
+
+Fri May 7 17:02:09 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * c++/ClC.cc (CL_ClvLookup): Return NULL if varmap is NULL instead
+ of asserting it is non-NULL
+
+Thu May 6 19:02:38 1999 Greg J Badros <gjb@bowman.cs.monash.edu.au>
+
+ * c++/ClFDTests.cc: Added return type to connect1.
+
+ * c++/ClFDSolver.cc: Return *this where missing.
+
+ * c++/ClFDConnectorVariable.h: Reorder mem vars to match
+ initialization order in ctr.
+
+ * c++/ClC.h, c++/ClC.cc: Added CL_ClvIsFD.
+
+Sun May 2 10:42:00 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * c++/ClReader.l: Permit "_" in identifiers (needed for env
+ variable precondition variables).
+
+ * c++/ClLinearInequality.h: Honour _fStrictInequality flag when
+ testing FIsSatisfied().
+
+ * c++/ClLinearConstraint.h: Added missing "void" return type for
+ ChangeConstant.
+
+Fri Apr 30 09:45:51 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * c++/ClFDConnectorVariable.cc, c++/ClFDConnectorVariable.h:
+ Added -- support connecting the FD solver to the simplex solver
+ via a variable in the FD region that gets its value "copied" to a
+ analogous variable in the Simplex region.
+
+ * Makefile.am: Added ClFDConnectorVariable.[ch] files.
+
+ * c++/ClLinearConstraint.h: Added ChangeConstant()
+
+ * c++/ClFloatVariable.h, c++/ClFDVariable.h,
+ c++/ClFloatVariable.cc, c++/ClFDVariable.cc,
+ c++/ClAbstractVariable.h: Move _pv, SetPv(), Pv() from
+ ClFloatVariable, ClFDVariable, into common parent
+ ClAbstractVariable. Drop ClFloatVariable::SetName().
+
+ * c++/ClFDTests.cc: Added connect1 test to test
+ ClFDConnectorVariable
+
+ * c++/ClFDSolver.cc: Use 1 + value-rhs for errors to ensure that
+ strict inequalities behave reasonably.
+
+Thu Apr 29 19:29:34 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * c++/ClVariable.h: Register variable in the dictionary when
+ initialized from a ClFDVariable*. Added const ClAbstractVariable
+ *operator() const.
+
+ * c++/ClSolver.h, c++/ClSimplexSolver.h: Added _fAutosolve,
+ _pfnChangeClvCallback; added default ctr to initialize. Added
+ SolveNoException(); Moved SetAutosolve(), FIsAutosolving(),
+ SetChangeClvCallback() from ClSimplexSolver up to here.
+
+ * c++/ClSolver.cc: Added PrintTo for list<FDNumber>, operator<<
+ for same.
+
+ * c++/ClSimplexSolver.cc: Test constraint with
+ FIsOkayForSimplexSolver() before trying to add it (avoids adding
+ FD constraints to the simplex solver).
+ s/_fOptimizeAutomatically/_fAutosolve/g
+
+ * c++/ClParseTest.cc: Use FCanConvertCn() before trying to.
+
+ * c++/ClFDVariable.h: Make PlfdnDomain() const and return const.
+
+ * c++/ClFDVariable.cc: PrintOn now displays value (duh!)
+
+ * c++/ClFDTests.cc: Use new ListPushOnto() instead of a bunch of
+ push_back. Added simple2, simple3.
+
+ * c++/ClFDSolver.h, c++/ClFDSolver.cc: Added ChangeClv(),
+ AddConstraintInternal(), RemoveConstraintInternal(),
+ ListPushOnto(), fDebugFDSolve var, more debugging code.
+
+ * c++/ClConstraint.h, c++/ClFDConstraint.h: Added
+ FIsOkayForSimplexSolver() returning false for FDCns, true in the
+ base class.
+
+ * c++/ClFDBinaryOneWayConstraint.h,
+ c++/ClFDBinaryOneWayConstraint.cc: Make ctr take ClConstraint
+ instead of ClLinearConstraint. Added EnsurePreconditionsForCn(),
+ FCanConvertCn(). Throw better exceptions instead of
+ ExCLEditMisue-- use new ExCLTooDifficultSpecial.
+
+ * c++/ClCTest.c: Use CL_ClvPrint instead of coding by hand.
+ Added CL_CldvNew() call.
+
+ * c++/ClC.cc, c++/ClC.h: Added FDN_EOL defn, typedefs for Number,
+ FDNumber, CL_CldvNew(), CL_FDCanConvertCn(), CL_FDCnFromCn(),
+ CL_ClvPrint(). Use CL_Solver for PfnChangeClvCallback, not CL_SimplexSolver.
+
+ * c++/ClAbstractVariable.h: Throw instead of assert(false) in base
+ class IsPivotable(), IsRestricted().
+
+Wed Apr 28 19:38:46 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * c++/ClC.cc: Added CL_FDSolverNew()
+
+Wed Apr 28 19:10:32 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * c++/Makefile.am (INCLUDES): Include @GUILE_INCLUDES@ -- actually
+ done to get cassowary libraries (GJB:FIXME::)
+
+Wed Apr 28 18:49:51 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * c++/Makefile.am: Added ClCTest to the _PROGRAMS, and use
+ -lstdc++ on them
+
+ * c++/ClSolver.h: Expose Resolve() in base-class interface, along
+ with <<, and PrintOn.
+
+ * c++/ClSolver.cc: Added << operator.
+
+ * c++/ClC.h, c++/ClC.cc, c++/ClTest.c: Fixed bugs, use
+ CL_Solver... instead of CL_SimplexSolver... where appropriate.
+
+Wed Apr 28 17:15:47 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * c++/ClSymbolicWeight.h: Make CLevels unsigned, not int, and
+ require all 3 args to the 3 double ctr to remove ambiguity.
+
+ * c++/ClSimplexSolver.h: Check constraint before adding and throw
+ an error if the constraint is no good for the SimplexSolver.
+
+ * c++/ClParseTest.cc: Don't assume a failed add is due to an
+ inconsistent system-- could be wrong kind of constraint was read
+ in.
+
+ * c++/ClLinearInequality.h: Store the strictness of the
+ inequality, since other solvers may be able to use strict ones.
+
+ * c++/ClFDSolver.cc: Fine-tune the exception objects thrown... use
+ the richer hierarchy.
+
+ * c++/ClFDBinaryOneWayConstraint.c,
+ c++/ClFDBinaryOneWayConstraint.h: Added IsStrictInequality(), get
+ the direction of the inequality correct.
+
+ * c++/ClErrors.h: Richer hierarchy of exceptions to cope with
+ solver limitations.
+
+ * c++/ClConstraint.h: Added IsStrictInequality(); have
+ ReadOnlyVars return a const ClVarSet&, not value.
+
+Wed Apr 28 12:20:47 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * c++/Makefile.am: Added ClFDBinaryOneWayConstraint.cc.
+
+ * c++/ClReader.y, c++/ClReader.l: Added tokens GT, LT, and handle
+ them (for >, <, resp).
+
+ * c++/ClParseTest.cc: try converting to a FD constraint, and show
+ what that object is.
+
+ * c++/ClFDBinaryOneWayConstraint.h: Added ctr from a
+ ClLinearConstraint. Added IsInequality().
+
+Wed Apr 28 12:08:16 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * c++/ro-test.in: Added for testing below.
+
+ * c++/ClFDBinaryOneWayConstraint.cc: Added -- so far just a ctr
+ from a ClLinearConstraint object (since the parser hands me a
+ constraint object that is a ClLinearConstraint object).
+
+Tue Apr 27 20:35:23 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * c++/ClSymbolicWeight.h, c++/ClSymbolicWeight.cc: Drop default
+ ctr, and give default arg value to CLevels of 3. Added operator*.
+
+ * c++/ClFDTests.cc: Better test.
+
+ * c++/ClFDSolver.h, c++/ClFDSolver.cc: Use SymbolicWeights for
+ errors, so hierarchy is handled (i.e., strengths on constraints
+ are honoured).
+
+ * c++/ClFDConstraint.h: Added ctr with strength, weight.
+
+ * c++/ClFDBinaryOneWayConstraint.h: Added strength, weight
+ arguments to ctr.
+
+ * c++/ClConstraint.h: Added symbolicWeight() accessor.
+
+Tue Apr 27 15:04:34 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * c++/ClFDSolver.cc (RemoveConstraint): Fix some bugs-- handle nil
+ read-only variable properly, and clean up _mapVarToNode when
+ erasing nodes.
+
+Tue Apr 27 10:40:58 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * c++/ClSolver.cc: Added -- wrote PrintTo, << basic impls, and
+ simple AddConstraint.
+
+ * c++/QocaBench.cc, c++/ClTests.cc, c++/ClSubgraphTest.cc,
+ ClLeakTest.cc, ClC.cc: Use Solve(), not solve()
+
+ * c++/ClVariable.h: Added DesiredValue, PlfdnDomain base-class
+ accessors, handle clvNil in PrintOn.
+
+ * c++/Makefile.am: Added ClSolver.cc, link with -lGTL, added
+ missing and new .cc, .h files.
+
+ * c++/ClTypedefs.h: added ClVarToConstraintSetMap.
+
+ * c++/ClSolver.h: Added AddConstraint{,NoException},
+ RemoveConstraint{,NoException}, Solver here to the abstract
+ interface, also the prototypes for the PrintTo and << on the
+ ClTypedefs.h types.
+
+ * c++/ClSimplexSolver.h, c++/ClSimplexSolver.cc: Solve(), not
+ solve(), move some protos in abstract base class ClSolver.
+
+ * c++/ClLinearInequality.h: Use ClCnRelation, not
+ ClInequalityOperator.
+
+ * c++/ClFDVariable.h, c++/ClFDVariable.cc: More accessors,
+ settors, comment-out non-initial-domain ctr.
+
+ * c++/ClFDTests.cc: Test more.
+
+ * c++/ClFDSolver.h, c++/ClFDSolver.cc: Almost complete, but
+ largely untested implementation.
+
+ * c++/ClFDBinaryOneWayConstraint.h: Added ctrs, setters, getters.
+
+ * c++/ClErrors.h: Fixed throw message for ExCLConstraintNotFound
+ to not refer to the tableau.
+
+ * c++/ClConstraint.h: Added ClCnRelation (was ClInequalityOperator
+ in c++/ClLinearInequality.h) and wrote StrCnRelation for printing
+ it.
+
+ * c++/Cl.h: include ClFDSolver.h
+
+ * c++/Cassowary.h : include values.h, def FDN_NOTSET (FIXME: drop this?)
+
+Sun Apr 25 18:55:26 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * c++/Makefile.am: Added ClFDBinaryOneWayConstraint.h,
+ ClFDConstraint.h to pkginclude_HEADERS.
+
+ * c++/ClSimplexSolver.h, c++/ClSimplexSolver.cc: Added optional
+ strength argument to AddPointStays, AddPointStay fns.
+
+ * c++/ClFDVariable.h: Set _plfdnInitialDomain to avoid a warning
+ for now.
+
+ * c++/ClFDBinaryOneWayConstraint.h: Added return xo to PrintOn.
+
+ * c++/ClConstraint.h: Fix order of initializers.
+
+ * c++/ClC.h, c++/ClC.cc: Document return value for
+ CL_VarMapDelete, and do proper return.
+
+ * configure.in: Added --enable-cflags, --enable-cxxflags,
+ --enable-cppextraflags. Not tested yet.
+
+Sun Apr 25 11:46:28 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * configure.in: Bump version to .50, for FD features.
+
+Sun Apr 25 11:37:52 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * c++/Makefile.am: Comment out the Bug sources/builds, add the FD
+ sources.
+
+ * c++/ClSimplexSolver.h: Inherit from ClSolver, too. Move SetPv,
+ Pv() out into ClSolver base class.
+
+ * c++/ClSimplexSolver.cc, c++/Cl.h: Make szCassowaryVersion a const char *.
+
+ * c++/ClReadery.y, c++/ClReader.l, c++/ClReader.h: Support "?"
+ read-only annotations, and use Constraint::AddROVars() to track
+ the ro vars of a constraint expression.
+
+ * c++/ClParseTest.cc: Show whether the constraint is added
+ successfully or if it is inconsistent.
+
+ * c++/ClLinearConstraint.h: Fix BUG-- super should be
+ ClConstraint, not ClLinearConstraint.
+
+ * c++/ClFDVariable.cc: Use <, > to delimit FD vars, not [, ].
+
+ * c++/ClConstraint.h, c++/ClConstraint.cc: Added AddROVars,
+ FIsReadOnlyVar, ReadOnlyVars.
+
+Thu Apr 22 20:18:31 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * c++/ClVariable.h: Added ClVariable ctr that takes a
+ ClFDVariable*, this ambiguates returning NULL as a ClVariable, so
+ may not be a good idea, but it does make it less confusing than
+ having another overloaded version of ClVariable's ctr. Added
+ IsFloatVariable, IsFDVariable fwding fns.
+
+ * c++/ClSimplexSolver.cc: Disambiguate uses of NULL to be
+ (ClFloatVariable *)NULL.
+
+ * c++/ClFloatVariable.h: Added IsFloatVariable() to return true
+
+ * c++/ClC.h, c++/ClC.cc: Added CL_ClvLookupTrim for removing ws
+ around the var name.
+
+ * c++/ClAbstractVariable.h: Make IsPivotable, IsRestricted both
+ assert false instead of being pure virtual -- they only need to be
+ overridden if we want to permit them to be called. Added
+ IsFloatVariable(), IsFDVariable() both returning false in this
+ base class.
+
+ * c++/Cassowary.h: Added FDNumber typedef to be a long.
+
+ * c++/Makefile.am: Added ClFDVariable.{cc,h}
+
+ * c++/ClFDVariable.cc, c++/ClFDVariable.h: Added, copied from
+ ClFloatVariable and modified slightly.
+
+Tue Apr 20 10:18:32 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * smalltalk/README: Note that smalltalk implementation is now in
+ the public domain.
+
+ * README: Update to version 0.43, note about smalltalk
+ implementation being in public domain.
+
+ * LICENSE: Note about not applying to smalltalk implementation
+
+ * ANNOUNCE: Update date to today.
+
+ * *: Changed copyright to be "Greg J. Badros and Alan Borning"
+ instead of "Alan Borning and Greg J. Badros". Okayed by Alan --
+ to hopefully encourage more people to write me with their
+ questions/problems rather than Alan.
+
+Mon Apr 19 13:45:35 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * cassowary.spec: Added --with-guile-prefix
+
+Mon Apr 19 13:02:46 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * c++/ClReader.l: Be a bit more careful about end of string
+ handling in YY_INPUT-- only return result = 1 if we read a
+ non-null character. Call yy_flush_buffer() before throw-ing an
+ error, so that we start anew the next time we are asked to return
+ tokens for the parser.
+
+ * c++/ClC.h, c++/ClC.cc: Added CL_SimplexSolverAddStay. (Fix typo
+ in .cc)
+
+Fri Apr 16 16:36:24 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * c++/ClTests.cc, c++/ClSimplexSolver.h, c++/ClSimplexSolver.cc, : Use "RemoveConstraintNoException", not
+ "removeConstraintNoException" (fix initial caps.)
+
+ * c++/ClReader.y: Start looking for a constraint, turn on verbose
+ warnings and DEBUG option (still need to set cldebug = 1 in
+ debugger)
+
+ * c++/ClReader.h: In operator() for the lookup proc, Return
+ &clvNil() if _pmapVars is still NULL
+
+ * c++/ClC.h, c++/ClC.cc: Added CL_VariableName(..), CL_VarMapDelete(..),
+ CL_RemoveConstraint(..)
+
+
+Wed Apr 14 16:56:05 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * configure.in: Bump to .43.
+
+ * c++/ClC.cc (CL_VarMapDelete, CL_VariableName): Added new functions.
+
+ * cassowary.spec: Added, for building rpms
+
+ * c++/gdbinit-cassowary: Added a bunch of guile debugging macros.
+
+ * c++/Makefile.am: Added ClC.cc to libcassowary_a_SOURCES
+
+ * c++/ClReader.y: Turn off parser debugging messages by default
+
+ * c++/ClC.h, c++/ClC.cc: Added CL_ConstraintPrint, CL_FIsSatisfied
+ protos
+
+Wed Mar 31 17:23:18 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * wrappers/Makefile.in: Rename PYTHON_HEADERS to PYTHON_HEADER_DIR
+ so it does not get treated specially by automake (?).
+
+ * configure.in: Bump to .42. Added --disable-cpp-build,
+ --disable-java-build, and disable Python/Guile builds
+ automatically if directories cannot be found. Drop the
+ cassowary from c++/cassowary/config.h -- just use c++/config.h
+
+ * autogen.sh: do not fail if config.status is not -x.
+
+ * Makefile.am: Honour the HAVE_foo flags so that not all subdirs
+ have to be built.
+
+Mon Mar 29 21:01:21 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * ltconfig, ltmain.sh: Added -- so libtool isn't broken in
+ distributions.
+
+Mon Mar 29 20:59:17 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * configure.in: Try to undo a bash-ism. Untested on a vendor sh,
+ but still works with bash.
+
+Sat Mar 20 19:19:37 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * Release v0.41.
+
+Sat Mar 20 19:19:13 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * Added config.sub and config.guess to the repo -- they were
+ symlinks before which broke the distribution.
+
+Thu Mar 18 15:20:51 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * Release v0.4.
+
+Thu Mar 18 14:44:39 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * configure.in: Do not let config-inline.h get overwritten if it
+ is unchanged. Add some extra messages to tell status of
+ config-inline.h
+
+Thu Mar 18 12:59:02 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * README, configure.in, wrappers/Makefile.in: Added
+ --with-python-headers configure option.
+
+Thu Mar 18 12:48:55 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * README: Added notes about what to do when a subdir build fails,
+ suggest -k by default.
+
+ * guile/Makefile.am (test): Added this target for easier way to
+ run cltests.scm.
+
+ * guile/README: Updated with notes about how to run cltests.scm.
+
+ * java/Makefile.in: Fix tests build rule.
+
+Thu Mar 18 11:42:49 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * configure.in: Create config-inline.h at end of script.
+
+ * c++/Makefile.am: Do not have rule for building config-inline.h;
+ let configure script do that.
+
+Thu Mar 18 11:05:27 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * c++/*.h: Use #include config-inline.h incantation so that header
+ files don't include config.h (since they may be included by
+ another package that has its own config.h)
+
+ * c++/*.cc: Use #include config.h as these are build-time-only
+ used and can thus rely on the full configure details.
+
+Thu Mar 18 10:57:08 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * guile/cassowary_scm.hpp: Use #include config-inline.h
+ incantation.
+
+ * guile/cassowary_scm.h: Drop including config.h; it's not
+ needed.
+
+ * guile/cassowary_scm.cc: Use cassowary/config.h, not config.h
+
+Thu Mar 18 10:29:40 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * c++/Makefile.am: Install config-inline.h, not config.h, and
+ build config-inline.h by grepping for #define CL_ in config.h.
+ This works around the problem caused by Scwm including Cassowary
+ header files which then included cassowary's config.h and
+ conflicted with Scwm's config.h.
+
+Thu Mar 18 10:11:40 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * c++/test-*.cc: Only #include "Cl.h"
+
+Thu Mar 18 09:50:45 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * wrappers/Makefile.in (clean): use rm -f so we don't get a
+ warning if file is missing.
+
+Thu Mar 18 09:49:35 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * java/Makefile.in: Use JAVA_CLASS_PATH configure variable. Fix
+ install target to echo a message about the install happening
+ during the build.
+
+Wed Mar 17 18:54:16 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * c++/Makefile.am: Use libtool, and added lib_LTLIBRARIES. Put
+ benchmarks, bugs, and test programs all under $libdir/cassowary.
+ Drop cassoincludedir, as that's just pkginclude, and use
+ include_HEADERS for Cl.h and ClC.h, the main top-level includes.
+ Also install config.h.
+
+ * c++/Cassowary.h: #undef PACKAGE, VERSION before #including
+ cassowary/config.h as a cheezy workaround. (Switched from "" to
+ <>, and ../ to cassowary/ also).
+
+Wed Mar 17 18:50:49 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * configure.in: Put config.h in c++/cassowary so cassowary must do
+ #include <cassowary/config.h> so there is no filename conflict
+ with other packages including cassowary header files (e.g.,
+ Scwm). Added AM_PROG_LIBTOOL call. Set GUILE variables outside
+ of the guile-prefix ACE_ARG_PATH macro, and set GUILE_PKGDATA_DIR
+ use guile-config to find out where we should install the .so file.
+
+Wed Mar 17 18:43:08 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * guile/Makefile.am: Updated to build using libtool, and to
+ install header files. Changes name to libconstraints.* so that
+ the guile module name (cassowary constraints) works out, and set
+ it to install in the right place.
+
+Wed Mar 17 18:39:13 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * guile/cltests.scm: Added #! lines, change name of module to
+ (cassowary constraints), remove redundant `use-modules' call.
+
+ * guile/cassowary_scm.hpp: #include
+ cassowary/ClLinearExpression_fwd.h, not ClLinearExpression_fwd.h
+
+ * guile/cassowary_scm.cc: Change name of module to (cassowary
+ constraints). Make the init_cassowary_scm fn static.
+
+Wed Mar 17 07:39:10 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * c++/Cassowary.h, c++/ClSimplexSolver.cc: Switch back to
+ including config.h (now ../config.h) from Cassowary.h, instead of
+ from ClSimplexSolver.cc.
+
+Tue Mar 16 19:56:02 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * acconfig.h: Fix missing comment closer */
+
+ * c++/Makefile.am: Added AM_CPPFLAGS = $(CPPEXTRAFLAGS)
+
+ * configure.in: Use config.h, not c++/config.h, and permit
+ --enable-warnings option to turn on compile-time warnings (uses
+ AM_CPPFLAGS in Makefile.am)
+
+Tue Mar 16 19:26:23 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * configure.in, acconfig.h: Better autoconf support, including
+ several --enable options. Added acconfig.h to support autoheader
+ doing the right thing in making config.h.in.
+
+Tue Mar 16 19:22:50 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * c++/ClSimplexSolver.cc, c++/Cassowary.h: Include "config.h" from
+ here, not from Cassowary.h (still not right-- problem is scwm gets
+ the wrong config.h. Maybe config.h should be in ..?
+
+Tue Mar 16 19:21:06 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * java/README: Added note about common error when CLASSPATH is wrong.
+
+Tue Mar 16 15:51:15 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * c++/Cassowary.h: #include "config.h"
+
+ * c++/ClSimplexSolver.cc: Use VERSION to init szCassowaryVersion.
+
+Tue Mar 16 12:44:33 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * c++/**: Updated function names to always start with an uppercase
+ letter (follows C++ conventions, and brings API of Cassowary and
+ QOCA closer together). Used scripts/convert-ids to do the
+ conversion, along with scripts/ids-to-upper as the list of
+ conversions to do.
+
+Wed Mar 10 15:28:33 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * Release v0.32.
+
+Wed Mar 10 11:36:37 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * **/Makefile: Removed, since these are now generated by
+ autoconf from Makefile.in (which itself is generated by
+ automake from Makefile.am [only for some directories])
+
+ * configure.in:
+
+ * c++/ClBug2.cc: Added to demonstrate a bug that Anthony Beurivé
+ reported.
+
+ * c++/ClSimplexSolver.cc: Fix above-mentioned bug by changing the
+ coefficient of the added in removeConstraintInternal.
+
+ * c++/ClReader.l: Reset the lexer on failed id lookup.
+
+ * c++/ClC.cc, c++/ClC.h: Added VarMap access functionality, make
+ CL_ParseConstraint catch exceptions and return NULL on error
+ parsing.
+
+ * c++/config.h.in, c++/stamp-h.in: Added, for automake/autoconf
+ support.
+
+ * c++/Makefile.am: Improve installation support, updated for
+ ClBug2
+
+ * guile/Makefile.am: Build .x using guile-snarf
+
+ * c++/Makefile.linux: Updated for ClBug2
+
+ * c++/demos/DraggableBox.h: Do not return references to
+ ClVariable-s -- just return by value since they are a handle
+ class.
+
+ * guile/Makefile.am: changed name of library to
+ libcassowaryguile.a from libconstraints.a
+
+ * java/CL.h: Added a String description argument to assert() to
+ permit easier tracking of failures.
+
+ * java/ClSimplexSolver.java: Fix bug that Emmanuel Pietriga
+ reported -- use peek() to get at top element of _stkCedns stack
+ when removing edit variables in removeEditVarsTo(). Added
+ descriptions to assert()s and to throwing of ExCLInternalError.
+ Have the addBounds, addUpperBound, addLowerBound functions
+ propagate out ExCLInternalError-s instead of catching them and
+ printing an error message. Added messages to all assertions.
+
+ * java/ClLinearExpression.java: Added description to throwing of
+ ExCLInternalError.
+
+ * java/ClLinearInequality.java: Added description to throwing of
+ ExCLInternalError.
+
+ * java/ExCLInternalError.java: Require description of the error in
+ constructor.
+
+ * java/QuadDemo.java: Use System.err when printing errors, and
+ print the description of the exception.
+
+ * smalltalk/ClKernel.app: Fix bug with not using the weight of a
+ constraint as the negating coefficient when removing a constraint.
+
+Mon Mar 8 16:40:17 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * Added autoconf and partial automake support. Added numerous
+ Makefile.am's, renamed old Makefiles to Makefile.linux (and copied
+ to Makefile.in when I did not write a Makefile.am). Added
+ configure.in.
+
+ * guile/cassowary_scm.cc: Use ClReader.h, not creader.h (I renamed
+ the file)
+
+Fri Mar 5 16:24:05 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * c++/Makefile, c++/Cl.h: Fix for renaming of creader.* ->
+ ClReader.*; make C libraries as part of lib, shared_lib rules.
+
+ * c++/ClReader.*: Added, renamed from creader.h, creader.y,
+ creader.l
+
+ * c++/ClTableau.h, c++/ClTableau.cc: Added
+ printExternalVariablesTo() fn.
+
+ * c++/ClSimplexSolver.cc: printExternalVariablesTo in
+ printInternalInfo.
+
+ * c++/ClParseTest.cc: DO not include ClReader.h-- Cl.h includes it
+
+ * c++/ClCTest.c: Make more like a browser-related test, use new
+ CL_TableauPrintExternalVariables()
+
+ * c++/ClC.h, ClC.cc: Added CL_Tableau,
+ CL_TableauPrintExternalVariables. Use "ends" to terminate
+ strstreams. Make Strong Stays use medium strength stays. Make
+ CL_ParseConstraint call ClsFromSz instead of parsing the char *
+ itself.
+
+Thu Mar 4 19:08:23 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * c++/ClVariable.h: Add assert(pclv) before dereferencing through
+ ClVariable's pclv member.
+
+ * c++/Makefile: Added DYNLINK = yes/no variable for controlling
+ dynamic linking more easily.
+
+ * c++/ClSimplexSolver.h: Changed PfnChangeClvCallback to take a
+ ClVariable * instead of a ClVariable. This make it easier for the
+ C interface since it has "CLV" as a "ClVariable *" and cannot
+ reason about ClVariable-s because it doesn't see the struct defn.
+
+ * c++/ClC.cc, c++/ClC.h: Added CL_SimplexSolverSetEditedValue,
+ CL_SimplexSolverPrint, CL_SimplexSolverSetChangeClvCallback,
+ CL_VariableSetPv, CL_VariablePv.
+
+ * c++/ClCTest.cc: Test CL_SimplexSolverSetEditedValue, CL_SimplexSolverPrint.
+
+Wed Mar 3 17:37:17 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * c++/ClSimplexSolver.h (UpdateExternalVariables): Added this
+ function to provide a publicly available way to get at setExternalVariables()
+
+ * c++/ClCTest.c, c++/ClC.h, c++/ClC.cc: Added for the beginnings
+ of a rudimentary C interface to the c++ library.
+
+ * c++/Makefile: Updated to build ClCTest, libccassowary.so (the C
+ interface to Cassowary [for Amaya, initially])
+
+Mon Mar 1 Greg J Badros <gjb@cs.washington.edu>
+
+ * Release v0.31
+
+Mon Mar 1 15:11:52 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * c++/ClVariable.h: Added explict copy ctr.
+
+ * c++/ClEditConstraint.h, c++/ClStayConstraint.h: Changed output
+ format so parentheses started by super:: call to ClConstraint.h
+ are closed properly.
+
+ * c++/ClSimplexSolver.h, c++/ClSimplexSolver.cc: Undo removing a
+ pass by reference of ClVariable when used as an output argument.
+ Added printing for ClEditInfo class instancesm,
+ ClVarToEditInfoMap.
+
+Mon Mar 1 13:46:48 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * README: Updated for version 0.31.
+
+ * c++/Makefile: Added QocaBench.o to TEST_OBJS, comment out
+ CL_USE_HASH_MAP_AND_SET by default.
+
+ * c++/ClTestColumns.cc: Allocate constraint objects on heap, not
+ as temporaries on local stack
+
+ * c++/ClStayConstraint.h, c++/ClSimplexSolver.h,
+ c++/ClSimplexSolver.cc, c++/ClPoint.h, c++/ClLinearInequality.h,
+ c++/ClEditOrStayConstraint.h, c++/ClEditConstraint.h: Pass and
+ return ClVariable-s by value, not by reference. (Fixes bug in
+ QocaBench from re-use of a ClVariable object with the underlying
+ pointer different.
+
+ * c++/Cl.h: include creader.h
+
+ * c++/README: Fix spelling of deprecated, URL for WxWindows.
+
+ * c++/test-ClConstraint.cc: Comment out unused variables
+
+Mon Mar 1 12:53:02 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * c++/qdemos/QuadDemoWindow.cc: Allocate constraint objects on
+ heap, not as temporaries on local stack.
+
+Fri Feb 26 09:16:31 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * wrappers/cassowary.i: Use .c_str() off of exception descriptions
+ to get the char * (description() now returns a string)
+
+Fri Feb 26 09:11:17 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * c++/ClConstraint.h: Added FIsInSolver()
+
+ * guile/cassowary_scm.cc: Wrap cl-constraint-is-in-solver?
+
+Thu Feb 25 18:58:55 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * guile/cltests.scm: Added (use-modules..) invocation to get the
+ dynamically-loaded module so that it can be tested outside of
+ scwm. Updated to reflect changed behaviour in cl-add-stay. Added
+ some test code for make-cl-constraint-from-string.
+
+ * guile/cassowary_scm.hpp: Added ScmMakeClConstraint(..) to
+ abstract out setting "answer" for the (now) two ClConstraint ctrs.
+
+ * guile/cassowary_scm.cc: Added make-cl-constraint-from-string for
+ interfacing to the parser. Wrap
+ cl-constraint-change-{strength,weight}!. Make dynamically loadable
+ module! Fix BUG: was returning SCM_UNDEFINED instead of
+ SCM_UNSPECIFIED.
+
+ * guile/Makefile: Build libconstraints.so, and necessary directory
+ structure if neeeded.
+
+
+Thu Feb 25 18:41:34 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * c++/ClSimplexSolver.h, c++/ClSimplexSolver.cc: Make constraints
+ get told when they're added/removed from a solver. This means
+ that constraints are no longer const params to add/remove
+ Constraint functions, and also that removeConstraint needs an
+ internal version that doesn't do the counting (since
+ removeConstraint can get called from addConstraint to clean up
+ after a failed addition).
+
+ * c++/ClSimplexSolver.cc: Clean up uses of ClConstraint &cn --
+ prefer ClConstraint *pcn even internally.
+
+ * c++/ClConstraint.h: Added ChangeStrength(..), ChangeWeight(..)
+ and _times_added memvar along w/ private (for friend
+ ClSimplexSolver) addedTo(..) and removedFrom(..) functions. Only
+ permit strength/weight changing if constraint is in no solvers
+ presently.
+
+ * c++/ClConstraint.cc: Output _times_added memvar in printOn(...)
+
+Thu Feb 25 15:58:27 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * c++/ClErrors.h: Added parse error classes, and have description
+ return a "string" instead of a "char *"
+
+ * c++/creader.y: Use exception ExCLParseErrorMisc in clerror, Use
+ ClVarLookupFunction instead of mapVars and fAutoCreate
+
+ * c++/creader.l: Use ClVarLookupFunction instead of doing it
+ inline with mapVars and fAutoCreate; throw exceptions on errors.
+
+ * c++/creader.h: Added ClVarLookupFunction and ClVarLookupInMap
+ and use them when parsing.
+
+ * c++/Makefile: Added some dependencies for proper building of
+ .l,.y files
+
+ * c++/ClSimplexSolver.cc: Descend VarInVarSet from
+ unary_function<..,..>
+
+ * c++/ClParseTest.cc: Catch parse errors and display the message.
+ Use ClVarLookupInMap class
+
+Thu Feb 25 12:09:48 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * c++/ClSimplexSolver.cc: Simplify removeConstraint to not use
+ references.
+
+ * c++/ClSimplexSolver.h: Updated a comment
+
+ * c++/ClTests.cc: Use addEditVar, beginEdit, and endEdit, instead
+ of building EditConstraints directly.
+
+Tue Feb 23 18:48:21 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * c++/creader.y, c++/creader.h: Remove old crummy lexer. Added
+ fAutoCreate flag to PcnParseConstraint to allow parsing with
+ automatic introduction of newly-referenced variables.
+
+ * c++/creader.l: Fixed bugs in missing tokens "|", "(", ")", and
+ permit "==" as a synonym for "=". Honour the _fAutoCreate flag by
+ introducing variables when needed.
+
+ * c++/ClTests.cc: Display version id string at startup.
+
+ * c++/ClSimplexSolver.cc, c++/Cl.h: Added szCassowaryVersion id
+ string.
+
+ * c++/ClParseTest.cc: Test auto-addition of variable (fAutoCreate
+ = true)
+
+Tue Feb 23 18:12:23 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * c++/Makefile: Build libcassowary.{a,so} by default, not
+ libcassowary-notrace.{a,so}. Remove special rule for building
+ ClParseTest; list creader-lex.o, creader.o in OBJS and have them
+ be a part of the library.
+
+ * c++/ClVariable.h, c++/ClVariable.cc: Rename pmapSzPclv to
+ pmapStrPclv. Make it a map from "const string" not "string".
+ Make setName erase the old mapping, and add the new mapping.
+
+ * c++/ClParseTest.cc: Accept "-" option to mean "rename x to foo"
+ for testing the setName change above.
+
+ * c++/ClFloatVariable.cc: Do not output warning msg in setName --
+ instead, do the right thing in ClVariable.h
+
+Tue Feb 23 08:55:28 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * c++/Makefile: Fix build rules for bison/flex parser so
+ dependencies are correct. Added new targets, all-notests,
+ all-tests, make 'lib' the default target, and all really build
+ everything.
+
+ * c++/creader.h, c++/creader.l, c++/creader.y: Take address of
+ ClVariable-s from the map's values (cannot use ClVariable in the
+ union directly because union members cannot have constructors).
+ #include ClVariable.h instead of fwd decl of ClVariable so that we
+ get the StringToVarMap typedef, too.
+
+Mon Feb 22 16:33:16 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * c++/Makefile: Use CL_LIBRARY, not LIB_FILE, throughout. Use
+ flags for maximum performance.
+
+ * c++/ClVariable.h, c++/ClConstraintHash.h, c++/Cassowary.h:
+ Divide pointer address by CL_PTR_HASH_DIVISOR in hash functions
+
+ * c++/ClTests.cc: Added CL_SHOW_CNS_IN_BENCHMARK guard protecting
+ new displaying of constraints and listing of inconsistent constraints.
+
+Mon Feb 22 12:18:53 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * c++/ClTests.cc (inconsistent3): Drop extra redundant
+ inconsistency for pedagogical reasons. Use simpler pointer-based
+ addConstraint in benchmark test
+
+ * c++/ClSimplexSolver.h: Added addConstraintNoException,
+ removeConstraintNoException taking ClConstraint &'s -- deprecated.
+ Added CL_NO_DEPRECATED guard for turning off availability of
+ deprecated functions.
+
+Mon Feb 22 11:12:35 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * c++/ClSimplexSolver.h: Added deprecated
+ FIsConstraintSatisfied(Constraint &)
+
+ * guile/cassowary_scm.cc: Use ClConstraintToVarMap for return
+ value of ConstraintMap(). Pass Constraint *'s instead of &'s.
+ Use new name printOnVerbose instead of printDebugInfo.
+
+Fri Feb 19 Greg J Badros <gjb@cs.washington.edu>
+
+ * Release v0.3.
+
+Fri Feb 19 18:00:49 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * c++/ClTests.cc: Updated to fix below interface.
+
+ * c++/ClSimplexSolver.cc, c++/ClSimplexSolver.h: make
+ addConstraint, addConstraintNoException, removeConstraint,
+ removeConstraintNoException take ClConstraint *'s instead of
+ ClConstraint &'s. Clarifies the mental model, and simplifies the
+ syntax. Old style is still accepted, but is deprecated.
+
+Fri Feb 19 17:41:45 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * c++/ClFloatVariable.cc, c++/ClFloatVariable.h: Added -- moved
+ here from ClVariable.h, and renamed from class ClVariableRep since
+ they not what ClVariable wraps (ClVariable wraps
+ ClAbstractVariable)
+
+ * c++/ClAbstractVariable.h: Fatten interface to include set_value,
+ change_value, setPv, and Pv.
+
+ * c++/ClVariable.h, c++/ClVariable.cc: Move ClVariableRep into
+ ClFloatVariable.{h,cc}, and use pclv-> for
+ set_value, change_value, SetPv, and Pv since ClAbstractVariable
+ now has a fat interface and we do not need to do the dynamic
+ down-casting.
+
+ * c++/Makefile: Added new files to build rules.
+
+Fri Feb 19 17:08:29 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * c++/debug.h, c++/ClTableau.h: Move operator<< out into ClTableau.h
+
+ * c++/ClVariable.h, c++/ClVariable.cc: Move some inline functions
+ into .cc so that the hash function can go in the .h file (some stl
+ dependency issue, it seems).
+
+ * c++/ClErrors.h, c++/ClTypedefs.h: Move typedef for
+ ClConstraintSet from ClErrors.h into ClTypedefs.h, and have former
+ include the latter.
+
+ * c++/Cassowary.h: #include ClConstraintHash.h
+
+ * c++/ClConstraintHash.h: Added. The hash function needs to
+ appear before any typedef that uses a hash_map or hash_set, so
+ this file is included by Cassowary.h
+
+Fri Feb 19 08:45:24 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * c++/ClSubgraphTest.cc: Fix some bugs just from not testing
+ completely.
+
+ * c++/*: Fix bugs from not-updated-code hidden by #ifdefs. Builds
+ w/ all compile-options except -DCL_USE_HASH_MAP_AND_SET. Drop
+ some gratuitous appearances of ClAbstractVariable
+
+Thu Feb 18 18:53:56 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * c++/ClLinearExpression.cc: Use clvNill when returning a
+ ClVariable instead of NULL
+
+ * c++/ClVariable.h, c++/ClVariable.cc: operators ==, !=, < all should use the
+ contained pointers address, not value. Also define global clvNil,
+ isNil().
+
+ * c++/ClTests.cc: BUGFIX: #if 0 removed from adding stays in
+ simple1 test
+
+ * c++/ClSimplexSolver.h: Use ClVariable-s internally for
+ ClObjectiveVariable-s.
+
+ * c++/ClSimplexSolver.cc: Use ClVariable-s internally for
+ ClObjectiveVariable-s and replace ClAbstractVariable
+ *p{entryVar,exitVar} with ClVariable-s. (Use clvNil and isNil()
+ to test for not yet set).
+
+Thu Feb 18 Greg J Badros <gjb@cs.washington.edu>
+
+ * c++/*: First compilable and almost working version with
+ ClVariable as a handle to ClVariableRep. Major simplifications
+ throughout.
+
+Thu Feb 18 14:22:14 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * c++/Makefile: Split out the options into += lists so they can be
+ flipped independently more easily.
+
+ * c++/ClSimplexSolver.cc, c++/ClSimplexSolver.h: Added output
+ operation for ClConstraintToVarSetMap; use fFoundErrorVar flag to
+ simplify some redundant tests in removeConstraint -- no longer use
+ errorVarsCopy.
+
+ * c++/CLVariable.h: Fix a comment's example.
+
+ * c++/ClTypedefs.h: Use set always for ClTableauVarSet (Steve
+ Wolfman notes that it's faster as a set than as a hash_set).
+
+ * c++/debug.h: Add CtrTracer, DtrTracer fns that do nothing when
+ not CL_TRACE
+
+ * c++/ClConstraint.h: Invoke CtrTracer, DtrTracer in ctr, dtr for
+ finding memory problem
+
+ * c++/ClTests.cc: Fix some long-time bugs in the use of ctrs that
+ build temporary objects whose lifetime was expected to be longer
+ than it was.
+
+ * c++/*: Invert sense of CL_NO_TRACE to CL_TRACE
+
+Wed Feb 17 12:10:28 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * c++/ClTypedefs.h: Added -- factored out useful typedefs from
+ ClSimplexSolver.h, ClTableau.h and put them in this file.
+
+ * c++/ClTableau.h, c++/ClSimplexSolver.h, c++/debug.h: Use
+ ClTypedefs.h. Drop gdb_print (it uses printOn and printTo, now).
+ Renamed printDebugInfo to printOnVerbose (for generalized gdb
+ interface)
+
+ * c++/ClSimplexSolver.cc: Fix two bugs where I was modifying data
+ structures indirectly while iterating over them. Remove a delete
+ that was premature to fix another bug in optimized builds.
+
+ * c++/ClLinearExpression.h, c++/ClConstraint.h,
+ c++/ClAbstractVariable.h: Drop gdb_print().
+
+ * c++/ClSymbolicWeight.h: Use Number instead of double more consistently.
+
+Tue Feb 16 15:04:06 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * c++/Cassowary.h,ClAbstractVariable.h,ClMap.h,ClSet.h,Makefile: Use
+ CL_USE_HASH_MAP_AND_SET, not USE_HASH_MAP_AND_SET.
+
+ * c++/Cl.h: #undef CL_TRACE_VERBOSE ifdef CL_NO_IO
+
+Tue Feb 16 14:55:12 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * java/ClVariable.java: Add setVarMap(..), getVarMap() for
+ maintaining symbol table of ClVariables. Added
+ setAttachedObject(..), getAttachedObject() for hanging something
+ off of a variable.
+
+ * java/ClConstraint.java: Added setAttachedObject(..),
+ getAttachedObject() for hanging something off of a constraint.
+
+ * java/ClTests.java: Added inconsistent3() and multiedit() tests
+
+ * java/ClSimplexSolver.java: Manage multiple (nested) edits
+ properly. Provide access to the _markerVars var through
+ getConstraintMap() accessor. Deprecate resolve(Vector) fn.
+
+Tue Feb 16 14:29:46 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * README: Updated reference to swig web site.
+
+Tue Feb 16 12:45:04 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * java/ClSimplexSolver.java, java/ClEditInfo.java, java/Makefile:
+ Fixed Michael Kaufmann's bug. (See Feb 15 note for C++ version
+ two entries below.)
+
+ * java/*.java: Updated copyright to include 1999.
+
+Tue Feb 16 10:51:01 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * c++/*: Added CL_FIND_LEAK guard and ctr/ctr counters for
+ tracking various variable kinds.
+
+Mon Feb 15 18:38:06 1999 Greg J Badros <gjb@cs.washington.edu>
+
+ * c++/ClAbstractVariable.{cc,h}, ClSlackVariable.{cc,h},
+ ClDummyVariable.{cc,h}: Add counters to ctr/dtr for leakage detection.
+
+ * c++/ClSimplexSolver.{cc,h}: Replace ClConstraintAndIndex with
+ ClEditInfo, and remove ugliness of parallel vectors for edit
+ constraints. Drop _editPlusErrorVars, _editMinusErrorVars,
+ _prevEditConstants, and bundle them all up in the value end of the
+ map attached to _editVarMap. This fixes a bug reported in the
+ Java version by Michael Kaufmann long ago, and generally cleans
+ code up a bit. The resolve(vector<Number>) function is
+ deprecated, and now implemented in terms of the indices stored in
+ the new ClEditInfo class.
+
+ * c++/*: Updated copyright to include 1999.
+
+1999-02-15 Greg J Badros <gjb@cs.washington.edu>
+
+ * c++/ClVariable.{cc,h}, c++/ClAbstractVariable.h: Added
+ SetVarMap(..), VarMap(), and make variables given names get their
+ names mapped to the objects in the var map (for access when
+ parsing constraints as strings). Make setName() virtual so
+ ClVariable can override it.
+
+1999-02-12 Greg J Badros <gjb@cs.washington.edu>
+
+ * c++/creader.{y,h}: New version from Steve Wolfman, slightly
+ updated for cleaner integration. Pass in a map<string,ClVariable
+ *> instead of an array of ClVariable; improve error handling a
+ bit.
+
+ * c++/debug.h: Use ClMap, ClSet
+
+ * c++/{ClMap.h,ClSet.h}: Added, for optionally using hash_map,
+ hash_set instead of map, set.
+
+ * c++/ClSimplexSolver.{cc,h}: Added Steve Wolfman's explanation
+ support (added back map for marker->constraint, _fExplainFailure
+ var + getter & settor). Use ClMap, ClSet. Cleaned up some cerr
+ output, and use DEBUG_FAILURES cpp symbol to guard some output.
+
+ * c++/Cassowary.h: Added operator() for hash<..> to support
+ hashing things used as keys in hash_map/hash_set
+
+ * c++/ClErrors.h: Added ExCLRequiredFailureWithExplanation class
+ for explanation support.
+
+ * c++/{ClLinearExpression.h,ClTableau.h}: Use ClMap, not map. Use
+ ClSet, not set.
+
+ * c++/ClSymbolicWeight.h: Return a symbolic weight even when
+ assert(false) to avoid compiler warning.
+
+1999-02-11 Greg J Badros <gjb@cs.washington.edu>
+
+ * guile/cassowary_scm.cc: Use cl-snarf.h, not scwm-snarf.h. Use
+ CL_PROC to denote primitives, not SCWM_PROC. Use
+ CL_VAR_INIT_PERMANENT macro for variables, and document them (the
+ strength objects only, for now). Fix the default strength of
+ cl-add-editvar to Strong, not Weak, and update docs (was cut&paste
+ error from the cl-add-stay primitive). Thanks Anthony Beurivé for
+ noticing this bug, too!
+
+Sat Jan 30 Greg Badros <gjb@cs.washington.edu>
+
+ * Release v0.23.
+
+Sat Jan 30 13:16:31 1999 Greg Badros <gjb@cs.washington.edu>
+
+ * c++/ClSimplexSolver.cc: Fixed bug in removing a stay
+ constraint. Was editing a vector in place while iterating over
+ it. Now I use remove_if and erase. Thanks to Anthony Beurivé for
+ noticing the bug.
+
+ * c++/ClBug1.cc: Added -- bug report from Anthony Beurivé.
+
+Sat Jan 23 Greg Badros <gjb@cs.washington.edu>
+
+ * Release v0.22.
+
+Sat Jan 23 16:46:27 1999 Greg Badros <gjb@cs.washington.edu>
+
+ * guile/cassowary_scm.cc: Replace iarg uses with literal argument
+ index numbers. Use const_cast to avoid warnings when calling
+ ScmMakeClStrength on clsWeak,clsMedium,clsStrong,clsRequired objects
+
+Sat Jan 23 15:30:16 1999 Greg Badros <gjb@cs.washington.edu>
+
+ * c++/ClSimplexSolver.cc: Added some comments, some explanations
+ when exceptions are thrown, and some minor cleanups, bug-fixes
+
+ * c++/ClTests.cc: Added inconsistent3() test, and run it.
+
+ * c++/ClStrength.h: Added _pv memvar, and setPv(), Pv() -- needed
+ for tracking ClStrengths in guile
+
+ * guile/cassowary_scm.cc: Replace all iarg uses with the literal
+ number. Point ClStrength objects at their scheme-level object
+ using their new _pv field. Protect ClStrength objects properly.
+
+Sat Sep 19 17:08:21 1998 Greg Badros <gjb@cs.washington.edu>
+
+ * c++/Makefile (CPPFLAGS): Added USE_GC, commented out, and added
+ OTHER_LIBS variable for linking with the gc library
+
+Sat Sep 19 17:01:16 1998 Greg Badros <gjb@cs.washington.edu>
+
+ * c++/ClTableau.h: Added AssertValid() for testing integrity of
+ Tableau
+
+ * c++/ClSymbolicWeight.h, c++/ClStrength.h, c++/ClSlackVariable.h,
+ c++/ClLinearExpression.h, c++/ClErrors.h, c++/ClDummyVariable.h,
+ c++/ClConstraint.h, c++/ClAbstractVariable.h: Descend objects
+ from "gc" class conditioned on USE_GC* pp macros
+
+ * c++/Cassowary.h: Conditionally include gc_cpp.h ifdef USE_GC;
+ added NEWVAR and DELVAR macros for outputting debug information at
+ new/delete sites
+
+ * c++/ClSimplexSolver.h: Call AssertValid before solving
+
+ * c++/ClSimplexSolver.cc: Remove memory leak of the artificial
+ objective variable
+
+ * c++/ClLinearExpression.h: Fix gdb_print to have a newline
+
+ * c++/ClLeakTest: Added leakTest2 which more obviously leaks, and
+ use GC_gcollect() to force a collect
+
+Tue Sep 15 16:36:20 1998 Greg Badros <gjb@cs.washington.edu>
+
+ * c++/ClTableau.h, ClTableau.cc: Handle removing vars from _columns more
+ carefully, and add gdb_print(), virtual destructor
+
+ * c++/ClLinearExpression.h, c++/ClConstraint.h,
+ c++/ClAbstractVariable.h: Added gdb_print()
+
+Tue Sep 14 Greg Badros <gjb@cs.washington.edu>
+
+ * Release v0.21.
+
+Wed Sep 9 09:46:35 1998 Greg Badros <gjb@cs.washington.edu>
+
+ * c++/ClLinearExpression.h, c++/ClLinearExpression.cc: added uses
+ of 'typename' keyword as needed by egcs-1.1b's -pedantic (and the
+ C++ FDIS)
+
+Sun Sep 6 13:19:01 1998 Greg Badros <gjb@cs.washington.edu>
+
+ * c++/ClSimplexSolver.h: Added _pv field, and Pv() setPv() getter
+ and setter
+
+ * guile/cassowary_scm.cc: Use solver's _pv field to point
+ ClSimplexSolver back at the scheme object that wraps it
+
+Fri Sep 4 18:52:50 1998 Greg Badros <gjb@cs.washington.edu>
+
+ * guile/cassowary_scm.hpp, guile/cassowary_scm.cc: Added PvFromScm
+ and ScmFromPv to hide the reinterpret casts used to store a scheme
+ object as the void * Pv() attached to a cassowary object. Attach
+ the scheme-level cl-variable to a ClVariable object. Added
+ `clv-attach!' and `clv-attached-object' to manipulate the attached
+ object (often better to use scheme level properties, though)
+
+Fri Sep 4 18:51:30 1998 Greg Badros <gjb@cs.washington.edu>
+
+ * guile/Makefile: Use "perl" from path to run extract docs instead
+ of relying on #! line, and generate the -procedures.txt file as
+ well as the .sgml file
+
+Wed Sep 2 17:08:14 1998 Greg Badros <gjb@cs.washington.edu>
+
+ * guile/cassowary_scm.cc, guile/cassowary_scm.hpp: Added
+ ClStayConstraint wrapper. Make cl-add-stay, cl-add-editvar take a
+ list of variables instead of a varargs last argument and instead
+ add two optional arguments STRENGTH and FACTOR (thus those
+ primitives remain backward compatible as long as only one variable
+ was given).
+
+Wed Sep 2 13:55:37 1998 Greg Badros <gjb@cs.washington.edu>
+
+ * ClSimplexSolver.h: Added weight option to addEditVar and use it
+
+ * ClLinearExpression.h: Added PconstClAbstractVariable, use it;
+ use ClVarToCoeffMap in coefficientFor.
+
+Thu Aug 6 20:56:45 1998 Greg Badros <gjb@cs.washington.edu>
+
+ * Release v0.2.
+
+Thu Aug 6 20:41:40 1998 Greg Badros <gjb@cs.washington.edu>
+
+ * ClTests.cc: Added multiedit() test for testing nested
+ beginEdit-s
+
+ * ClSimplexSolver.h, ClSimplexSolver.cc: Support nested
+ beginEdit-s -- use removeEditVarsTo(n), and rewrite
+ removeAllEditVars in terms of the former; Use FIsSatisfied on
+ constraint and compare with testing internally for
+ FIsConstraintSatisfied() -- untested.
+
+ * ClLinearInequality.h, ClLinearEquation.h, ClConstraint.h: Added
+ virtual FIsSatisfied
+
+ * ClLinearExpression.h, ClLinearExpression.cc: Added evaluate()
+
+ * ClAbstractVariable.h: Return 0 for value(), and make it a
+ virtual function.
+
+Wed Aug 5 16:10:56 1998 Greg Badros <gjb@cs.washington.edu>
+
+ * ClStrength.h: Have ClStrength::symbolicWeight return a const
+ ref, instead of by value, make clsXXX const refs.
+
+ * ClSimplexSolver.cc, ClLinearInequality.cc, ClLinearEquation.cc,
+ ClLinearConstraint.cc: Take ClStrengths by const refs
+
+Tue Aug 4 15:22:08 1998 Greg Badros <gjb@cs.washington.edu>
+
+ * guile/cassowary_scm.cc, cassowary_scm.hpp: Move all inline
+ functions into .hpp file. Added cl-is-constraint-satisfied?
+
+ * ClTableau.h: Added a rowExpression() const memfn, for
+ FIsConstraintSatisfied()
+
+ * ClSimplexSolver.h, ClSimplexSolver.cc: Added (probably broken)
+ FIsConstraintSatisfied(cn) memfn -- needs testing
+
+Sun Aug 2 16:49:34 1998 Greg Badros <gjb@cs.washington.edu>
+
+ * ClSimplexSolver.h: Added ConstraintMap() accessor to
+ _markerVars, for cl-constraint-list guile primitive
+
+ * ClConstraint.h: Added setPv(), Pv(), and _pv field to a
+ constraint, for attaching extra information.
+
+Thu Jul 30 19:15:40 1998 Greg Badros <gjb@cs.washington.edu>
+
+ * ClTests.cc: Added simple2, to test new EditMisuse exception on
+ editing a variable that is nowhere in the solver.
+
+ * ClTableau.h, ClTableau.cc: Be more careful about inserting into
+ _externalParametricVars; add FIsBasicVar to assist that care.
+
+ * ClSimplexSolver.cc, ClSimplexSolver.h: Added pfnCnSatCallback --
+ does nothing for now; throw an ExCLEditMisuse exception if an
+ edit constraint is added on a variable that is not in the tableau
+ (needs at least a stay constraint in the solver); replace some
+ calls to rowExpression with FIsBasicVar when the latter is the
+ intent.
+
+Thu Jul 21 Greg Badros <gjb@cs.washington.edu>
+
+ * ClVariable.h, ClVariable.cc: Added _pv field, settor and gettor.
+
+
+ABOVE CHANGES ONLY IN C++ IMPLEMENTATION AND ITS WRAPPERS
+
+Fri Jul 17 19:24:54 1998 Greg Badros <gjb@cs.washington.edu>
+
+ * ClVariable.h, .java: Added change_value memfn, and make it virtual
+ instead of setValue -- thus subclasses can specialize behaviour
+ when the variable gets set by the solver.
+
+ * ClSimplexSolver.h, .java: Use change_value for setEditedValue if
+ the variable is not in the tableau; call resolve() before
+ removeAllEditVars in endEdit
+
+ * ClSimplexSolver.cc, .java (setExternalVariables): Use change_value
+ instead of set_value when so subclasses can override and notice a
+ changed variable
+
+Thu Jul 16 19:49:45 1998 Greg Badros <gjb@cs.washington.edu>
+
+ * Added setEditedValue(), FContainsVariable(), and addVar() to c++
+ and Java implementations
+
+ * Fixed bug in C++ and Java in solvers lacking stay constraints
+ that was due to not-updating the external parametric variables
+ set.
+
+Fri Jul 10 09:00:15 1998 Greg Badros <gjb@cs.washington.edu>
+
+ * Fixed bug whereby a dummy variable was being pivoted into the
+ basis because pexpr->anyVariable() didn't guarantee the variable
+ it returned was a pivotable variable -- now it's called
+ anyPivotableVariable(), and does the right thing.
+
+ * Fixed bug whereby column mappings that had no rows remained in
+ the list of columns -- now erase the column key when its value is
+ the empty set
+
+ * Fixed bug whereby constraints that threw required failure
+ exceptions remained in the tableau (a removeConstraint on a
+ constraint that failed to be added used to succeed, now it does
+ not)
+
+Monday Jun 29 16:50:00 1998 Greg Badros <gjb@cs.washington.edu>
+
+ * Release Cassowary v0.1 --- see local/POST-ANNOUNCE-TO for
+ list of places where it was announced
+
diff --git a/libs/cassowary/ClAbstractVariable.cc b/libs/cassowary/ClAbstractVariable.cc
new file mode 100644
index 0000000000..b5502d4fbb
--- /dev/null
+++ b/libs/cassowary/ClAbstractVariable.cc
@@ -0,0 +1,23 @@
+// $Id$
+//
+// Cassowary Incremental Constraint Solver
+// Original Smalltalk Implementation by Alan Borning
+// This C++ Implementation by Greg J. Badros, <gjb@cs.washington.edu>
+// http://www.cs.washington.edu/homes/gjb
+// (C) 1998, 1999 Greg J. Badros and Alan Borning
+// See ../LICENSE for legal details regarding this software
+//
+// ClAbstractVariable.cc
+
+#include <cassowary/ClAbstractVariable.h>
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#define CONFIG_H_INCLUDED
+#endif
+
+long ClAbstractVariable::iVariableNumber = 0;
+#ifdef CL_FIND_LEAK
+long ClAbstractVariable::cAbstractVariables = 0;
+#endif
+
diff --git a/libs/cassowary/ClBug0.cc b/libs/cassowary/ClBug0.cc
new file mode 100644
index 0000000000..09ca1826cb
--- /dev/null
+++ b/libs/cassowary/ClBug0.cc
@@ -0,0 +1,102 @@
+// $Id$
+
+#include <cassowary/Cl.h>
+
+/* This bug fixed --02/15/99 gjb
+ Replaced the parallel vectors for edit constraints
+ (the errorPlus..., errorMinus..., prevEditConstants vectors)
+ with a ClEditInfo class that is the Value of the _editVarMap map.
+
+ Later I realized that I need to go to a _editVars list so that
+ multiple edits on the same variable that nest are handled properly.
+ --09/19/99 gjb
+*/
+
+int main()
+{
+ ClSimplexSolver solver;
+
+ ClVariable x("x",7);
+ ClVariable y("y",8);
+ ClVariable z("z",9);
+
+ solver
+ .AddStay(x)
+ .AddStay(y)
+ .AddStay(z);
+
+ try {
+ solver.AddEditVar(x);
+ solver.AddEditVar(y);
+ solver.AddEditVar(z);
+ solver.BeginEdit();
+
+ solver.SuggestValue(x,1);
+ solver.SuggestValue(z,2);
+
+ solver.RemoveEditVar(y);
+
+ solver.SuggestValue(x,3);
+ solver.SuggestValue(z,4);
+
+ solver.EndEdit();
+
+ } catch (ExCLError &e) {
+ cerr << e.description() << endl;
+ }
+
+ cout << x << endl << y << endl << z <<endl;
+
+}
+
+#if 0 /* Message below */
+ From: "Michael Kaufmann" <Michael.Kaufmann@ubs.com>
+ To: <noth@cs.washington.edu>
+ Subject: bugreport
+ Date: Thu, 1 Oct 1998 11:40:55 +0200
+ Message-Id: <000001bded1f$973a2060$230e1fac@itc_mk.sbcs.swissbank.com>
+ Mime-Version: 1.0
+ Content-Type: text/plain;
+ charset="iso-8859-1"
+ Content-Transfer-Encoding: 7bit
+ X-Priority: 3 (Normal)
+ X-Msmail-Priority: Normal
+ X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0
+ Importance: Normal
+ X-Mimeole: Produced By Microsoft MimeOLE V4.72.2106.4
+
+ Dear Mr Noth,
+
+ I am currently working with the Java implementation of Cassowary and found
+ the following bug:
+
+ If I Add several editConstraints, remove some of them again later and
+ perform a 'ClSimplexSolver.SuggestValue()', the indices of
+ 'ClConstraintAndIndex' in the variable 'cai' are sometimes wrong (see
+ ClSimplexSolver.SuggestValue(ClVariable v, double x), the 3rd line). This is
+ because if you remove an element from a 'java.util.Vector', and the element
+ is somewhere in the middle of the Vector, the indices of the Vector change.
+ (see java.util.Vector.removeElementAt(int index):
+
+ public final synchronized void removeElementAt(int index) {
+ if (index >= elementCount) {
+ throw new ArrayIndexOutOfBoundsException(index + " >= " +
+ elementCount);
+ }
+ else if (index < 0) {
+ throw new ArrayIndexOutOfBoundsException(index);
+ }
+ int j = elementCount - index - 1;
+ if (j > 0) {
+ System.arraycopy(elementData, index + 1, elementData, index, j);
+ }
+ elementCount--;
+ elementData[elementCount] = null; /* to let gc do its work */
+ }
+
+
+ My workaround now is, that everytime when I remove an EditVariable from the
+ Solver, I have to remove all the EditVariables and Add then the ones again,
+ that I do not want to remove.
+
+#endif
diff --git a/libs/cassowary/ClBug1.cc b/libs/cassowary/ClBug1.cc
new file mode 100644
index 0000000000..e7543757e3
--- /dev/null
+++ b/libs/cassowary/ClBug1.cc
@@ -0,0 +1,21 @@
+#include <cassowary/Cl.h>
+
+int main()
+{
+ ClVariable *var = new ClVariable();
+ ClSimplexSolver *solver = new ClSimplexSolver();
+ ClStayConstraint *stcn = new ClStayConstraint(*var,ClsWeak(),1.0);
+
+ cout << *solver;
+ solver->AddConstraint(*stcn);
+ cout << *solver;
+ solver->RemoveConstraint(*stcn);
+ cout << *solver;
+}
+/*
+The result is a segmentation fault when the constraint is removed. I
+don't understand why.
+
+Anthony Beurive'" <beurive@labri.u-bordeaux.fr>
+*/
+
diff --git a/libs/cassowary/ClBug2.cc b/libs/cassowary/ClBug2.cc
new file mode 100644
index 0000000000..3a1e424259
--- /dev/null
+++ b/libs/cassowary/ClBug2.cc
@@ -0,0 +1,130 @@
+/* $Id$
+
+From: "Anthony Beurive'" <beurive@labri.u-bordeaux.fr>
+Subject: cassowary
+To: gjb@cs.washington.edu
+Date: Tue, 9 Mar 1999 12:42:24 +0100 (CET)
+
+I believe there's a bug in cassowary. It seems to be related to the
+previous one I encountered a while ago, concerning the removal of
+constraints.
+
+The three following examples may help you to track the bug, I hope.
+
+--------------------------------------------------------------------------------
+#include "Cl.h"
+
+void main()
+{
+ ClSimplexSolver *solver = new ClSimplexSolver();
+ ClVariable *var = new ClVariable();
+ ClStayConstraint *stcn = new ClStayConstraint(*var,ClsWeak(),1.0);
+
+ solver->AddConstraint(*stcn);
+ cout << *solver;
+ solver->RemoveConstraint(*stcn);
+ cout << *solver;
+}
+--------------------------------------------------------------------------------
+This works fine.
+
+
+Now, the factor of the stay constraint is changed.
+--------------------------------------------------------------------------------
+#include "Cl.h"
+
+void main()
+{
+ ClSimplexSolver *solver = new ClSimplexSolver();
+ ClVariable *var = new ClVariable();
+ ClStayConstraint *stcn = new ClStayConstraint(*var,ClsWeak(),2.0);
+
+ solver->AddConstraint(*stcn);
+ cout << *solver;
+ solver->RemoveConstraint(*stcn);
+ cout << *solver;
+}
+--------------------------------------------------------------------------------
+The result is:
+test2: ClSimplexSolver.cc:1199: void ClSimplexSolver::Optimize(class ClVariable): Assertion \
+`pzRow != __null' failed.
+Aborted
+
+
+Now, the solver is created after the variable.
+--------------------------------------------------------------------------------
+#include "Cl.h"
+
+void main()
+{
+ ClVariable *var = new ClVariable();
+ ClSimplexSolver *solver = new ClSimplexSolver();
+ ClStayConstraint *stcn = new ClStayConstraint(*var,ClsWeak(),2.0);
+
+ solver->AddConstraint(*stcn);
+ cout << *solver;
+ solver->RemoveConstraint(*stcn);
+ cout << *solver;
+}
+--------------------------------------------------------------------------------
+This works again.
+
+
+Can you reproduce the same results? Maybe the cause is my c++
+compiler (egcs-2.90.29 980515 (egcs-1.0.3 release)). I don't know.
+
+*/
+
+#include <cassowary/Cl.h>
+
+void foo1()
+{
+ ClSimplexSolver *solver = new ClSimplexSolver();
+ ClVariable *var = new ClVariable();
+ ClStayConstraint *stcn = new ClStayConstraint(*var,ClsWeak(),1.0);
+
+ solver->AddConstraint(*stcn);
+ cout << *solver;
+ solver->RemoveConstraint(*stcn);
+ cout << *solver;
+}
+
+
+void foo2()
+{
+ ClSimplexSolver *solver = new ClSimplexSolver();
+ ClVariable *var = new ClVariable();
+ ClStayConstraint *stcn = new ClStayConstraint(*var,ClsWeak(),2.0);
+
+ solver->AddConstraint(*stcn);
+ cout << *solver;
+ solver->RemoveConstraint(*stcn);
+ cout << *solver;
+}
+
+
+void foo3()
+{
+ ClVariable *var = new ClVariable();
+ ClSimplexSolver *solver = new ClSimplexSolver();
+ ClStayConstraint *stcn = new ClStayConstraint(*var,ClsWeak(),2.0);
+
+ solver->AddConstraint(*stcn);
+ cout << *solver;
+ solver->RemoveConstraint(*stcn);
+ cout << *solver;
+}
+
+
+int main()
+{
+ cerr << "Test1: " << endl;
+ foo1();
+
+ cerr << "\nTest2: " << endl;
+ foo2();
+
+ cerr << "\nTest3: " << endl;
+ foo3();
+
+}
diff --git a/libs/cassowary/ClConstraint.cc b/libs/cassowary/ClConstraint.cc
new file mode 100644
index 0000000000..1bc6be91b3
--- /dev/null
+++ b/libs/cassowary/ClConstraint.cc
@@ -0,0 +1,32 @@
+// $Id$
+//
+// Cassowary Incremental Constraint Solver
+// Original Smalltalk Implementation by Alan Borning
+// This C++ Implementation by Greg J. Badros, <gjb@cs.washington.edu>
+// http://www.cs.washington.edu/homes/gjb
+// (C) 1998, 1999 Greg J. Badros and Alan Borning
+// See ../LICENSE for legal details regarding this software
+//
+// ClConstraint.cc
+
+#include <cassowary/ClConstraint.h>
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#define CONFIG_H_INCLUDED
+#endif
+
+#ifndef CL_NO_IO
+#include <cassowary/ClTableau.h> // for VarSet printing
+
+ostream &
+ClConstraint::PrintOn(ostream &xo) const
+{
+ // Note that the trailing "= 0)" or ">= 0)" is missing, as derived classes will
+ // print the right thing after calling this function
+ xo << strength() << " w{" << weight() << "} ta{"
+ << _times_added << "} RO" << _readOnlyVars << " " << "(" << Expression();
+ return xo;
+}
+
+#endif
diff --git a/libs/cassowary/ClDummyVariable.cc b/libs/cassowary/ClDummyVariable.cc
new file mode 100644
index 0000000000..e1e9b39c0c
--- /dev/null
+++ b/libs/cassowary/ClDummyVariable.cc
@@ -0,0 +1,12 @@
+// $Id$
+
+#include <cassowary/ClDummyVariable.h>
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#define CONFIG_H_INCLUDED
+#endif
+
+#ifdef CL_FIND_LEAK
+long ClDummyVariable::cDummyVariables = 0;
+#endif
diff --git a/libs/cassowary/ClFDBinaryOneWayConstraint.cc b/libs/cassowary/ClFDBinaryOneWayConstraint.cc
new file mode 100644
index 0000000000..e7bf7f1089
--- /dev/null
+++ b/libs/cassowary/ClFDBinaryOneWayConstraint.cc
@@ -0,0 +1,140 @@
+// $Id$
+//
+// Cassowary Incremental Constraint Solver
+// Original Smalltalk Implementation by Alan Borning
+// This C++ Implementation by Greg J. Badros, <gjb@cs.washington.edu>
+// http://www.cs.washington.edu/homes/gjb
+// (C) 1998, 1999 Greg J. Badros and Alan Borning
+// See ../LICENSE for legal details regarding this software
+//
+// ClFDBinaryOneWayConstraint.cc
+
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#define CONFIG_H_INCLUDED
+#endif
+
+#include <cassowary/ClFDBinaryOneWayConstraint.h>
+#include <cassowary/ClLinearConstraint.h>
+#include <cassowary/ClTypedefs.h>
+#include <cassowary/ClLinearExpression.h>
+
+
+void
+ClFDBinaryOneWayConstraint::EnsurePreconditionsForCn(const ClConstraint &cn)
+{
+ ClVarSet setRO = cn.ReadOnlyVars();
+ if (setRO.size() > 1)
+ throw ExCLTooDifficultSpecial("Only 0 or 1 read only variables are allowed");
+ const ClLinearExpression &expr = cn.Expression();
+ const ClVarToNumberMap &terms = expr.Terms();
+ if (terms.size() > 2)
+ throw ExCLTooDifficultSpecial("Cannot have more than 2 variables");
+ if (terms.size() == 0)
+ throw ExCLTooDifficultSpecial("Must have at least 1 variable");
+ if (terms.size() == 2 && setRO.size() == 0)
+ throw ExCLTooDifficultSpecial("Both variables cannot be read-write, one must be read-only");
+ if (terms.size() == 1 && setRO.size() == 1)
+ throw ExCLTooDifficultSpecial("Single read-only variable in LinearConstraint -- must not be read-only.");
+ ClVariable clv = (*terms.begin()).first;
+ /* GJB:FIXME:: iterate over all the variables */
+ if (!clv->IsFDVariable()) {
+ throw ExCLTooDifficultSpecial("FD constraint contains non-FD variables");
+ }
+}
+
+bool
+ClFDBinaryOneWayConstraint::FCanConvertCn(const ClConstraint &cn)
+{
+ try {
+ EnsurePreconditionsForCn(cn);
+ return true;
+ } catch (...) {
+ return false;
+ }
+}
+
+
+ClFDBinaryOneWayConstraint::ClFDBinaryOneWayConstraint(const ClConstraint &cn)
+ :ClFDConstraint(cn.strength(), cn.weight())
+{
+ EnsurePreconditionsForCn(cn);
+ list<FDNumber> l;
+ /* GJB:FIXME:: varargs inteface, with sentinel as first arg? */
+ l.push_back(9);
+ l.push_back(10);
+ l.push_back(12);
+ l.push_back(14);
+ l.push_back(20);
+
+ ClVarSet setRO = cn.ReadOnlyVars();
+
+ ClVariable clvRO = clvNil;
+ ClVariable clvROLinear = clvNil;
+ Number coeffRO = 0;
+
+ ClVariable clvRW = clvNil;
+ Number coeffRW = 0;
+
+ if (setRO.size() == 1) {
+ const ClVariable &clv = *(setRO.begin());
+ if (clv->IsFDVariable())
+ clvRO = clv;
+ else
+ clvRO = new ClFDVariable(clv.Name(),clv.IntValue(),l);
+ clvROLinear = clv;
+ }
+ const ClLinearExpression &expr = cn.Expression();
+ const ClVarToNumberMap &terms = expr.Terms();
+
+ for (ClVarToNumberMap::const_iterator it = terms.begin();
+ it != terms.end();
+ ++it) {
+ ClVariable clv = (*it).first;
+ if (clv == clvROLinear) {
+ coeffRO = (*it).second;
+ } else {
+ if (clv->IsFDVariable())
+ clvRW = clv;
+ else
+ clvRW = new ClFDVariable(clv.Name(),clv.Value(),l);
+ coeffRW = (*it).second;
+ }
+ }
+ assert(!clvRW.IsNil());
+ if (coeffRW == 0) {
+ throw ExCLTooDifficultSpecial("RW variable's coefficient must be non-zero");
+ }
+
+ bool fInequality = cn.IsInequality();
+ bool fStrictInequality = cn.IsStrictInequality();
+ double rhs_constant = expr.Constant();
+
+ // now we have:
+ // coeffRW * clvRW + coeffRO * clvRO <REL> rhs_constant
+ // where <REL> is >= if fInequality, or = if !fInequality
+ //
+ // need:
+ // clvRW <REL> coefficient * clvRO + constant
+ //
+ // so:
+ // coefficient = -coeffRO/coeffRW
+ // constant = rhs_constant/coeffRW
+
+ if (fStrictInequality)
+ _rel = cnGT;
+ else if (fInequality)
+ _rel = cnGEQ;
+ else
+ _rel = cnEQ;
+
+ if (coeffRW < 0)
+ _rel = ReverseInequality(_rel);
+
+ _coefficient = -coeffRO/coeffRW;
+ _constant = -rhs_constant/coeffRW;
+ _vRW = clvRW;
+ _vRO = clvRO;
+ return;
+}
diff --git a/libs/cassowary/ClFDConnectorVariable.cc b/libs/cassowary/ClFDConnectorVariable.cc
new file mode 100644
index 0000000000..e6618eb9d4
--- /dev/null
+++ b/libs/cassowary/ClFDConnectorVariable.cc
@@ -0,0 +1,29 @@
+// $Id$
+//
+// Cassowary Incremental Constraint Solver
+// Original Smalltalk Implementation by Alan Borning
+// This C++ Implementation by Greg J. Badros, <gjb@cs.washington.edu>
+// http://www.cs.washington.edu/homes/gjb
+// (C) 1998, 1999 Greg J. Badros and Alan Borning
+// See ../LICENSE for legal details regarding this software
+//
+// ClFDConnectorVariable.cc
+
+#include <cassowary/ClFDConnectorVariable.h>
+#include <cassowary/ClSolver.h> // for list<FDNumber> printing
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#define CONFIG_H_INCLUDED
+#endif
+
+// Use < > for ClFDConnector-s, instead of [ ]
+#ifndef CL_NO_IO
+ostream &ClFDConnectorVariable::PrintOn(ostream &xo) const
+{
+ xo << "<" << Name() << "=" << Value()
+ << "{" << _clvFloat << "}"
+ << ":" << *PlfdnDomain() << ">";
+ return xo;
+}
+#endif
diff --git a/libs/cassowary/ClFDSolver.cc b/libs/cassowary/ClFDSolver.cc
new file mode 100644
index 0000000000..7f2d199869
--- /dev/null
+++ b/libs/cassowary/ClFDSolver.cc
@@ -0,0 +1,364 @@
+// $Id$
+//
+// Cassowary Incremental Constraint Solver
+// Original Smalltalk Implementation by Alan Borning
+// This C++ Implementation by Greg J. Badros, <gjb@cs.washington.edu>
+// http://www.cs.washington.edu/homes/gjb
+// (C) 1998, 1999 Greg J. Badros and Alan Borning
+// See ../LICENSE for legal details regarding this software
+//
+// ClFDSolver.cc
+
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#define CONFIG_H_INCLUDED
+#endif
+
+#include <cassowary/Cassowary.h>
+#include <cassowary/ClFDSolver.h>
+#include <cassowary/ClFDBinaryOneWayConstraint.h>
+#include <cassowary/ClVariable.h>
+#include <cassowary/debug.h>
+#include <GTL/topsort.h>
+#include <pair.h>
+#include <math.h>
+#include <stdarg.h>
+
+static int fDebugFDSolve;
+
+ClFDSolver &
+ClFDSolver::AddConstraint(ClConstraint *const pcn)
+{
+ AddConstraintInternal(pcn);
+ if (_fAutosolve) Solve();
+ return *this;
+}
+
+ClFDSolver &
+ClFDSolver::RemoveConstraint(ClConstraint *const pcn)
+{
+ RemoveConstraintInternal(pcn);
+ if (_fAutosolve) Solve();
+ return *this;
+}
+
+ClFDSolver &
+ClFDSolver::AddConstraintInternal(ClConstraint *const pcn)
+{
+#ifdef CL_TRACE
+ Tracer TRACER(__FUNCTION__);
+ cerr << "(" << *pcn << ")" << endl;
+#endif
+
+ ClFDBinaryOneWayConstraint *const pcnfd =
+ dynamic_cast<ClFDBinaryOneWayConstraint *const>(pcn);
+ if (!pcnfd) {
+ throw ExCLTooDifficultSpecial("Can only add ClFDBinaryOneWayConstraint-s to ClFDSolvers");
+ }
+ ClVariable rw = pcnfd->ClvRW();
+ ClVariable ro = pcnfd->ClvRO();
+ if (!rw.IsFDVariable()) {
+ throw ExCLTooDifficultSpecial("RW variable must be an FDVariable");
+ }
+ if (!(ro.IsNil() || ro.IsFDVariable())) {
+ throw ExCLTooDifficultSpecial("RO variable must be an FDVariable or clvNil");
+ }
+ // add the constraint to our set of cns
+ _setCns.insert(pcn);
+ // and add the constraint to the cns that affect var rw
+ assert(!rw.IsNil());
+ _mapClvToCns[rw].insert(pcn);
+
+
+ node nRw = GetVarNode(rw);
+ if (!ro.IsNil()) {
+ node nRo = GetVarNode(ro);
+ edge e = G.new_edge(nRo, nRw);
+
+ _mapCnToEdge[pcn] = e;
+
+ if (!G.is_acyclic()) {
+ /* there is a cycle... give up after cleaning up */
+ RemoveConstraint(pcn);
+ throw ExCLCycleNotAllowed();
+ }
+ }
+ return *this;
+}
+
+ClFDSolver &
+ClFDSolver::RemoveConstraintInternal(ClConstraint *const pcn)
+{
+#ifdef CL_TRACE
+ Tracer TRACER(__FUNCTION__);
+ cerr << "(" << *pcn << ")" << endl;
+#endif
+
+ ClFDBinaryOneWayConstraint *const pcnfd =
+ dynamic_cast<ClFDBinaryOneWayConstraint *const>(pcn);
+
+ if (!pcnfd) {
+ throw ExCLInternalError("Could not downcast to a ClFDBinaryOneWayConstraint");
+ }
+
+ ClConstraintSet::iterator itCn = _setCns.find(pcnfd);
+ if (itCn == _setCns.end()) {
+ throw ExCLConstraintNotFound();
+ }
+ _setCns.erase(itCn);
+
+ ClVariable rw = pcnfd->ClvRW();
+ ClVariable ro = pcnfd->ClvRO();
+ ClConstraintSet &_cnsAffectingRW = _mapClvToCns[rw];
+ ClConstraintSet::iterator it = _cnsAffectingRW.find(pcnfd);
+ if (it == _cnsAffectingRW.end()) {
+ throw ExCLInternalError("Cannot find pcnfd");
+ }
+ _cnsAffectingRW.erase(it);
+
+ if (!ro.IsNil()) {
+ edge e = _mapCnToEdge[pcn];
+ G.del_edge(e);
+ _mapCnToEdge.erase(pcn);
+
+ if (_mapVarToNode.find(ro) != _mapVarToNode.end() &&
+ _mapVarToNode[ro].degree() == 0) {
+ G.del_node(_mapVarToNode[ro]);
+ _mapVarToNode.erase(ro);
+ }
+ }
+ if (_mapVarToNode.find(rw) != _mapVarToNode.end() &&
+ _mapVarToNode[rw].degree() == 0) {
+ G.del_node(_mapVarToNode[rw]);
+ _mapVarToNode.erase(rw);
+ }
+ if (_mapClvToCns[rw].size() == 0) {
+ _mapClvToCns.erase(rw);
+ }
+
+ return *this;
+}
+
+ClFDSolver &
+ClFDSolver::Solve()
+{
+ topsort t;
+ t.run(G);
+ topsort::topsort_iterator it = t.top_order_begin();
+ topsort::topsort_iterator end = t.top_order_end();
+ ClSymbolicWeight errorTotal;
+ ResetSetFlagsOnVariables();
+ for (; it != end; ++it) {
+ ClVariable clv = nodeToVar[*it];
+ ClFDVariable *pcldv = dynamic_cast<ClFDVariable*>(clv.get_pclv());
+#ifndef NO_FDSOLVE_DEBUG
+ if (fDebugFDSolve) {
+ if (!clv.IsNil()) cout << "node " << (*it) << " is " << clv << endl;
+ cerr << "Set from: " << endl;
+ for (ClConstraintSet::iterator itCns = _mapClvToCns[clv].begin();
+ itCns != _mapClvToCns[clv].end();
+ ++itCns) {
+ const ClConstraint *pcn = *itCns;
+ cerr << *pcn << endl;
+ }
+ cerr << endl;
+ }
+#endif
+ pair<ClSymbolicWeight,FDNumber> p = ComputeBest(pcldv);
+ ClSymbolicWeight e = p.first;
+ FDNumber v = p.second;
+ if (v == FDN_NOTSET)
+ throw ExCLRequiredFailure();
+ pcldv->ChangeValue(v);
+ pcldv->SetFIsSet(true);
+ errorTotal += e;
+ }
+ return *this;
+}
+
+/* return the best (lowest) incremental error and the value
+ at which that error occurs */
+pair<ClSymbolicWeight,FDNumber>
+ClFDSolver::ComputeBest(ClFDVariable *pcldv)
+{
+ assert(pcldv);
+ // assert(!pcldv->FIsSet()); //GJB:FIXME::
+ ClSymbolicWeight minError = ClsRequired().symbolicWeight();
+ FDNumber bestValue = FDN_NOTSET;
+ // ClVariable clv(pcldv);
+ // for each domain value
+ for (list<FDNumber>::const_iterator itVal= pcldv->PlfdnDomain()->begin();
+ itVal != pcldv->PlfdnDomain()->end();
+ ++itVal) {
+ FDNumber value = *itVal;
+ ClSymbolicWeight error;
+ const ClConstraintSet &setCns = _mapClvToCns[pcldv];
+ // for each constraint affecting *pcldv
+ for (ClConstraintSet::const_iterator itCn = setCns.begin();
+ itCn != setCns.end();
+ ++itCn) {
+ const ClConstraint *pcn = *itCn;
+ ClSymbolicWeight e = ErrorForClvAtValSubjectToCn(pcldv,value,*pcn);
+ error += e;
+ }
+ // now error is the total error for binding clv <- value
+ if (error < minError) {
+ minError = error;
+ bestValue = value;
+ }
+ }
+ // now minError is the lowest error we can get for clv
+ // and it occurs binding clv <- bestValue
+ if (bestValue == FDN_NOTSET)
+ throw ExCLRequiredFailure();
+ return pair<ClSymbolicWeight,FDNumber>(minError,bestValue);
+}
+
+ClSymbolicWeight
+ClFDSolver::ErrorForClvAtValSubjectToCn(ClFDVariable *pcldv,FDNumber value,const ClConstraint &cn)
+{
+ const ClFDBinaryOneWayConstraint *pcnFd = dynamic_cast<const ClFDBinaryOneWayConstraint*>(&cn);
+ if (!pcnFd) throw ExCLInternalError("Not a binary FD constraint.");
+ ClCnRelation rel = pcnFd->Relation();
+ double m = pcnFd->Coefficient();
+ double b = pcnFd->Constant();
+ ClVariable rw = pcnFd->ClvRW();
+ ClVariable ro = pcnFd->ClvRO();
+ assert(rw.get_pclv() == pcldv);
+ double e;
+ double x = ro.IsNil()? 0 : ro.Value();
+ // return the error in satisfying:
+ // value REL m*x + b
+ double rhs = m*x + b;
+ switch (rel) {
+ case cnLEQ:
+ if (value <= rhs) e = 0;
+ else e = 1 + value-rhs;
+ break;
+ case cnLT:
+ if (value < rhs) e = 0;
+ else e = 1 + value-rhs;
+ break;
+ case cnGEQ:
+ if (value >= rhs) e = 0;
+ else e = 1+ rhs-value;
+ break;
+ case cnGT:
+ if (value > rhs) e = 0;
+ else e = 1 + rhs-value;
+ break;
+ case cnEQ:
+ if (value == rhs) e = 0;
+ else e = 1 + fabs(rhs-value);
+ break;
+ case cnNEQ:
+ if (value != rhs) e = 0;
+ else e = 1; /* GJB:FIXME:: what makes sense here? */
+ break;
+ default:
+ e = 0; /* quiet warning */
+ assert(false);
+ }
+
+ ClSymbolicWeight err;
+ if (cn.IsRequired() && e > 0)
+ err = ClsRequired().symbolicWeight();
+ else
+ err = cn.symbolicWeight() * (e*cn._weight);
+#ifndef NO_FDSOLVE_DEBUG
+ if (fDebugFDSolve) {
+ cerr << "Error at " << value << " = " << err << endl;
+ }
+#endif
+ return err;
+}
+
+
+ClFDSolver &
+ClFDSolver::ShowSolve()
+{
+ topsort t;
+ t.run(G);
+ topsort::topsort_iterator it = t.top_order_begin();
+ topsort::topsort_iterator end = t.top_order_end();
+ for (; it != end; ++it) {
+ ClVariable clv = nodeToVar[*it];
+ if (!clv.IsNil()) cout << "Node " << (*it) << " is " << clv << endl;
+ cout << "Set from: " << endl;
+ for (ClConstraintSet::iterator itCns = _mapClvToCns[clv].begin();
+ itCns != _mapClvToCns[clv].end();
+ ++itCns) {
+ const ClConstraint *pcn = *itCns;
+ cout << *pcn << endl;
+ }
+ cout << endl;
+ }
+ return *this;
+}
+
+
+/* Turn all FDVariable FIsSet() flags to false */
+void
+ClFDSolver::ResetSetFlagsOnVariables()
+{
+ for (ClVarToConstraintSetMap::iterator it = _mapClvToCns.begin();
+ it != _mapClvToCns.end();
+ ++it) {
+ ClVariable clv = (*it).first;
+ ClFDVariable *pcldv = dynamic_cast<ClFDVariable*>(clv.get_pclv());
+ assert(pcldv);
+ pcldv->SetFIsSet(false);
+ }
+}
+
+
+ostream &
+ClFDSolver::PrintOn(ostream &xo) const
+{
+ xo << "FDSolver: "
+ << _setCns
+ << "Graph nodes, edges = " << G.number_of_nodes() << ", " << G.number_of_edges()
+ << endl;
+ return xo;
+}
+
+ostream &
+ClFDSolver::PrintInternalInfo(ostream &xo) const
+{ return xo; }
+
+
+ostream &operator<<(ostream &xo, const ClFDSolver &clfds)
+{ return clfds.PrintOn(xo); }
+
+
+//// protected member functions
+
+/* Create node for v in G, if necessary,
+ otherwise return the node we already created. */
+node
+ClFDSolver::GetVarNode(ClVariable v)
+{
+ ClMap<ClVariable,node>::iterator it = _mapVarToNode.find(v);
+ if (it == _mapVarToNode.end()) {
+ node n = G.new_node();
+ _mapVarToNode[v] = n;
+ nodeToVar[n] = v;
+ return n;
+ } else {
+ return (*it).second;
+ }
+}
+
+
+void
+ListPushOnto(list<FDNumber> *pl, ...)
+{
+ va_list ap;
+ va_start(ap, pl);
+ FDNumber n;
+ while ( (n = va_arg(ap, FDNumber)) != FDN_EOL) {
+ pl->push_back(n);
+ }
+ va_end(ap);
+}
diff --git a/libs/cassowary/ClFDVariable.cc b/libs/cassowary/ClFDVariable.cc
new file mode 100644
index 0000000000..5ab9d518b1
--- /dev/null
+++ b/libs/cassowary/ClFDVariable.cc
@@ -0,0 +1,27 @@
+// $Id$
+//
+// Cassowary Incremental Constraint Solver
+// Original Smalltalk Implementation by Alan Borning
+// This C++ Implementation by Greg J. Badros, <gjb@cs.washington.edu>
+// http://www.cs.washington.edu/homes/gjb
+// (C) 1998, 1999 Greg J. Badros and Alan Borning
+// See ../LICENSE for legal details regarding this software
+//
+// ClFDVariable.cc
+
+#include <cassowary/ClFDVariable.h>
+#include <cassowary/ClSolver.h> // for list<FDNumber> printing
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#define CONFIG_H_INCLUDED
+#endif
+
+// Use < > for ClFDVariable-s, instead of [ ]
+#ifndef CL_NO_IO
+ostream &ClFDVariable::PrintOn(ostream &xo) const
+{
+ xo << "<" << Name() << "=" << Value() << ":" << *PlfdnDomain() << ">";
+ return xo;
+}
+#endif
diff --git a/libs/cassowary/ClFloatVariable.cc b/libs/cassowary/ClFloatVariable.cc
new file mode 100644
index 0000000000..a3096e4b08
--- /dev/null
+++ b/libs/cassowary/ClFloatVariable.cc
@@ -0,0 +1,25 @@
+// $Id$
+//
+// Cassowary Incremental Constraint Solver
+// Original Smalltalk Implementation by Alan Borning
+// This C++ Implementation by Greg J. Badros, <gjb@cs.washington.edu>
+// http://www.cs.washington.edu/homes/gjb
+// (C) 1998, 1999 Greg J. Badros and Alan Borning
+// See ../LICENSE for legal details regarding this software
+//
+// ClFloatVariable.cc
+
+#include <cassowary/ClFloatVariable.h>
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#define CONFIG_H_INCLUDED
+#endif
+
+#ifndef CL_NO_IO
+ostream &ClFloatVariable::PrintOn(ostream &xo) const
+{
+ xo << "[" << Name() << ":" << _value << "]";
+ return xo;
+}
+#endif
diff --git a/libs/cassowary/ClLinearExpression.cc b/libs/cassowary/ClLinearExpression.cc
new file mode 100644
index 0000000000..72383ffec1
--- /dev/null
+++ b/libs/cassowary/ClLinearExpression.cc
@@ -0,0 +1,473 @@
+// $Id$
+//
+// Cassowary Incremental Constraint Solver
+// Original Smalltalk Implementation by Alan Borning
+// This C++ Implementation by Greg J. Badros, <gjb@cs.washington.edu>
+// http://www.cs.washington.edu/homes/gjb
+// (C) 1998, 1999 Greg J. Badros and Alan Borning
+// See ../LICENSE for legal details regarding this software
+//
+// ClLinearExpression.cc
+
+using namespace std;
+
+#include <cassowary/ClLinearExpression.h>
+#include <cassowary/ClSymbolicWeight.h> /// needed only to instantiate with T=ClSymbolicWeight
+#include <cassowary/ClVariable.h>
+#include <cassowary/ClTableau.h>
+#include <cassowary/ClErrors.h>
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#define CONFIG_H_INCLUDED
+#endif
+
+template <class T>
+ClGenericLinearExpression<T>::ClGenericLinearExpression(T num) :
+ _constant(num)
+{ }
+
+// Convert from ClVariable to a ClLinearExpression
+// this replaces ClVariable::asLinearExpression
+template <class T>
+ClGenericLinearExpression<T>::ClGenericLinearExpression(ClVariable clv, T value,
+ T Constant) :
+ _constant(Constant)
+{
+ _terms[clv] = value;
+}
+
+template <class T>
+ClGenericLinearExpression<T>::~ClGenericLinearExpression()
+{ }
+
+#ifndef CL_NO_IO
+template <class T>
+ostream &
+ClGenericLinearExpression<T>::PrintOn(ostream &xo) const
+{
+ typename ClVarToCoeffMap::const_iterator i = _terms.begin();
+
+ if (!ClApprox(_constant,0.0) || i == _terms.end())
+ {
+ xo << _constant;
+ }
+ else
+ {
+ if (i == _terms.end())
+ return xo;
+ xo << (*i).second << "*" << (*i).first;
+ ++i;
+ }
+ for ( ; i != _terms.end(); ++i)
+ {
+ xo << " + " << (*i).second << "*" << (*i).first;
+ }
+ return xo;
+}
+#endif
+
+
+
+// Destructively multiply self by x.
+// (private memfn)
+template <class T>
+ClGenericLinearExpression<T> &
+ClGenericLinearExpression<T>::MultiplyMe(T x)
+{
+ _constant *= x;
+
+ typename ClVarToCoeffMap::const_iterator i = _terms.begin();
+ for ( ; i != _terms.end(); ++i)
+ {
+ _terms[(*i).first] = (*i).second * x;
+ }
+ return *this;
+}
+
+// Return a new linear expression formed by multiplying self by x.
+// (Note that this result must be linear.)
+template <class T>
+ClGenericLinearExpression<T>
+ClGenericLinearExpression<T>::Times(Number x) const
+{
+ ClGenericLinearExpression<T> result = *this;
+ return result.MultiplyMe(x);
+}
+
+// Return a new linear expression formed by multiplying self by x.
+// (Note that this result must be linear.)
+// The above function optimizes the specific case of multiplying
+// by a Constant, here is the more general case
+template <class T>
+ClGenericLinearExpression<T>
+ClGenericLinearExpression<T>::Times(const ClGenericLinearExpression<T> &expr) const
+{
+ if (IsConstant())
+ {
+ return expr.Times(_constant);
+ }
+ else if (!expr.IsConstant())
+ {
+ // neither are constants, so we'd introduce non-linearity
+ throw ExCLNonlinearExpression();
+ }
+ return Times(expr._constant);
+}
+
+
+// Return a new linear expression formed by adding x to self.
+template <class T>
+ClGenericLinearExpression<T>
+ClGenericLinearExpression<T>::Plus(const ClGenericLinearExpression<T> &expr) const
+{
+ ClGenericLinearExpression<T> result = *this;
+ result.AddExpression(expr,1.0);
+ return result;
+}
+
+// Return a new linear expression formed by subtracting x from self.
+template <class T>
+ClGenericLinearExpression<T>
+ClGenericLinearExpression<T>::Minus(const ClGenericLinearExpression<T> &expr) const
+{
+ ClGenericLinearExpression<T> result = *this;
+ result.AddExpression(expr,-1.0);
+ return result;
+}
+
+// Return a new linear expression formed by dividing self by x.
+// (Note that this result must be linear.)
+template <class T>
+ClGenericLinearExpression<T>
+ClGenericLinearExpression<T>::Divide(Number x) const
+{
+ if (ClApprox(x,0.0))
+ {
+ throw ExCLNonlinearExpression();
+ }
+ return Times(1.0/x);
+}
+
+// Return a new linear expression formed by dividing self by x.
+// (Note that this result must be linear.)
+template <class T>
+ClGenericLinearExpression<T>
+ClGenericLinearExpression<T>::Divide(const ClGenericLinearExpression<T> &expr) const
+{
+ if (!expr.IsConstant())
+ {
+ throw ExCLNonlinearExpression();
+ }
+ return Divide(expr._constant);
+}
+
+
+// Return a new linear expression (expr/this). Since the result
+// must be linear, this is permissible only if 'this' is a Constant.
+template <class T>
+ClGenericLinearExpression<T>
+ClGenericLinearExpression<T>::DivFrom(const ClGenericLinearExpression<T> &expr) const
+{
+ if (!IsConstant() || ClApprox(_constant,0.0))
+ {
+ throw ExCLNonlinearExpression();
+ }
+ return expr.Divide(_constant);
+}
+
+// Add n*expr to this expression for another expression expr.
+template <class T>
+ClGenericLinearExpression<T> &
+ClGenericLinearExpression<T>::AddExpression(const ClGenericLinearExpression<T> &expr, Number n)
+{
+ IncrementConstant(expr.Constant()*n);
+
+ typename ClVarToCoeffMap::const_iterator i = expr._terms.begin();
+ for ( ; i != expr._terms.end(); ++i)
+ {
+ AddVariable((*i).first, (*i).second * n);
+ }
+ return *this;
+}
+
+// Add n*expr to this expression for another expression expr.
+// Notify the solver if a variable is added or deleted from this
+// expression.
+template <class T>
+ClGenericLinearExpression<T> &
+ClGenericLinearExpression<T>::AddExpression(const ClGenericLinearExpression<T> &expr, Number n,
+ ClVariable subject,
+ ClTableau &solver)
+{
+ IncrementConstant(expr.Constant() * n);
+
+ typename ClVarToCoeffMap::const_iterator i = expr._terms.begin();
+ for ( ; i != expr._terms.end(); ++i)
+ {
+ AddVariable((*i).first, (*i).second * n, subject, solver);
+ }
+ return *this;
+}
+
+// Add a term c*v to this expression. If the expression already
+// contains a term involving v, Add c to the existing coefficient.
+// If the new coefficient is approximately 0, delete v.
+template <class T>
+ClGenericLinearExpression<T> &
+ClGenericLinearExpression<T>::AddVariable(ClVariable v, T c)
+{ // body largely duplicated below
+#ifdef CL_TRACE
+ Tracer TRACER(__FUNCTION__);
+ cerr << "(" << v << ", " << c << ")" << endl;
+#endif
+ typename ClVarToCoeffMap::iterator i = _terms.find(v);
+ if (i != _terms.end())
+ {
+ // expression already contains that variable, so Add to it
+ T new_coefficient = 0;
+ new_coefficient = (*i).second + c;
+ if (ClApprox(new_coefficient,0.0))
+ {
+ // new coefficient is Zero, so erase it
+ _terms.erase(i);
+ }
+ else
+ {
+ (*i).second = new_coefficient;
+ }
+ }
+ else // expression did not contain that variable
+ {
+ if (!ClApprox(c,0.0))
+ {
+ _terms[v] = c;
+ }
+ }
+ return *this;
+}
+
+// Add a term c*v to this expression. If the expression already
+// contains a term involving v, Add c to the existing coefficient.
+// If the new coefficient is approximately 0, delete v. Notify the
+// solver if v appears or disappears from this expression.
+template <class T>
+ClGenericLinearExpression<T> &
+ClGenericLinearExpression<T>::AddVariable(ClVariable v, T c,
+ ClVariable subject,
+ ClTableau &solver)
+{ // body largely duplicated above
+#ifdef CL_TRACE
+ Tracer TRACER(__FUNCTION__);
+ cerr << "(" << v << ", " << c << ", " << subject << ", ...)" << endl;
+#endif
+ typename ClVarToCoeffMap::iterator i = _terms.find(v);
+ if (i != _terms.end())
+ {
+ // expression already contains that variable, so Add to it
+ T new_coefficient = (*i).second + c;
+ if (ClApprox(new_coefficient,0.0))
+ {
+ // new coefficient is Zero, so erase it
+ solver.NoteRemovedVariable((*i).first,subject);
+ _terms.erase(i);
+ }
+ else
+ {
+ (*i).second = new_coefficient;
+ }
+ }
+ else // expression did not contain that variable
+ {
+ if (!ClApprox(c,0.0))
+ {
+ _terms[v] = c;
+ solver.NoteAddedVariable(v,subject);
+ }
+ }
+#ifdef CL_TRACE
+ cerr << "Now *this == " << *this << endl;
+#endif
+ return *this;
+}
+
+// Return a variable in this expression. (It is an error if this
+// expression is Constant -- signal ExCLInternalError in that case).
+template <class T>
+ClVariable
+ClGenericLinearExpression<T>::AnyPivotableVariable() const
+{
+ if (IsConstant())
+ {
+ throw ExCLInternalError("(ExCLInternalError) No pivotable variables in Constant expression");
+ }
+ typename ClVarToCoeffMap::const_iterator i = _terms.begin();
+ for ( ; i != _terms.end(); ++i)
+ {
+ ClVariable v = (*i).first;
+ if (v.IsPivotable())
+ return v;
+ }
+ return clvNil;
+}
+
+// Replace var with a symbolic expression expr that is equal to it.
+// If a variable has been added to this expression that wasn't there
+// before, or if a variable has been dropped from this expression
+// because it now has a coefficient of 0, inform the solver.
+// PRECONDITIONS:
+// var occurs with a non-Zero coefficient in this expression.
+template <class T>
+void
+ClGenericLinearExpression<T>::SubstituteOut(ClVariable var,
+ const ClGenericLinearExpression<T> &expr,
+ ClVariable subject,
+ ClTableau &solver)
+{
+#ifdef CL_TRACE
+ cerr << "* ClGenericLinearExpression::";
+ Tracer TRACER(__FUNCTION__);
+ cerr << "(" << var << ", " << expr << ", " << subject << ", "
+ << solver << ")" << endl;
+ cerr << "*this == " << *this << endl;
+#endif
+
+ typename ClVarToCoeffMap::iterator pv = _terms.find(var);
+
+#ifndef NDEBUG
+ if (pv == _terms.end())
+ {
+#ifndef CL_NO_IO
+ cerr << "SubstituteOut: pv != _terms.end()" << endl;
+ cerr << "(" << var << ", " << expr << ", " << subject << ", "
+ << ")" << endl;
+ cerr << "*this == " << *this << endl;
+#endif
+ throw "SubstituteOut: pv != _terms.end()";
+ }
+#endif
+ assert(pv != _terms.end());
+ // FIXGJB: this got thrown! assert(!ClApprox((*pv).second,0.0));
+
+ T multiplier = (*pv).second;
+ _terms.erase(pv);
+ IncrementConstant(multiplier * expr._constant);
+ typename ClVarToCoeffMap::const_iterator i = expr._terms.begin();
+ for ( ; i != expr._terms.end(); ++i)
+ {
+ ClVariable v = (*i).first;
+ T c = (*i).second;
+ typename ClVarToCoeffMap::iterator poc = _terms.find(v);
+ if (poc != _terms.end())
+ { // if oldCoeff is not nil
+#ifdef CL_TRACE
+ cerr << "Considering (*poc) == " << (*poc).second << "*" << (*poc).first << endl;
+#endif
+ // found it, so new coefficient is old one Plus what is in *i
+ T newCoeff = (*poc).second + (multiplier*c);
+ if (ClApprox(newCoeff,0.0))
+ {
+ solver.NoteRemovedVariable((*poc).first,subject);
+ _terms.erase(poc);
+ }
+ else
+ {
+ (*poc).second = newCoeff;
+ }
+ }
+ else
+ { // did not have that variable already (oldCoeff == nil)
+#ifdef CL_TRACE
+ cerr << "Adding (*i) == " << (*i).second << "*" << (*i).first << endl;
+#endif
+ _terms[v] = multiplier * c;
+ solver.NoteAddedVariable(v,subject);
+ }
+ }
+#ifdef CL_TRACE
+ cerr << "Now (*this) is " << *this << endl;
+#endif
+}
+
+// This linear expression currently represents the equation
+// oldSubject=self. Destructively modify it so that it represents
+// the equation NewSubject=self.
+//
+// Precondition: NewSubject currently has a nonzero coefficient in
+// this expression.
+//
+// NOTES
+// Suppose this expression is c + a*NewSubject + a1*v1 + ... + an*vn.
+//
+// Then the current equation is
+// oldSubject = c + a*NewSubject + a1*v1 + ... + an*vn.
+// The new equation will be
+// NewSubject = -c/a + oldSubject/a - (a1/a)*v1 - ... - (an/a)*vn.
+// Note that the term involving NewSubject has been dropped.
+//
+// Basically, we consider the expression to be an equation with oldSubject
+// equal to the expression, then Resolve the equation for NewSubject,
+// and destructively make the expression what NewSubject is then equal to
+template <class T>
+void
+ClGenericLinearExpression<T>::ChangeSubject(ClVariable old_subject,
+ ClVariable new_subject)
+{
+ _terms[old_subject] = NewSubject(new_subject);
+}
+
+inline double ReciprocalOf(double n)
+{ return 1.0/n; }
+
+// This linear expression currently represents the equation self=0. Destructively modify it so
+// that subject=self represents an equivalent equation.
+//
+// Precondition: subject must be one of the variables in this expression.
+// NOTES
+// Suppose this expression is
+// c + a*subject + a1*v1 + ... + an*vn
+// representing
+// c + a*subject + a1*v1 + ... + an*vn = 0
+// The modified expression will be
+// subject = -c/a - (a1/a)*v1 - ... - (an/a)*vn
+// representing
+// subject = -c/a - (a1/a)*v1 - ... - (an/a)*vn = 0
+//
+// Note that the term involving subject has been dropped.
+//
+// Returns the reciprocal, so that NewSubject can be used by ChangeSubject
+template <class T>
+T
+ClGenericLinearExpression<T>::NewSubject(ClVariable subject)
+{
+#ifdef CL_TRACE
+ Tracer TRACER(__FUNCTION__);
+ cerr << "(" << subject << ")" << endl;
+#endif
+ typename ClVarToCoeffMap::iterator pnewSubject = _terms.find(subject);
+ assert(pnewSubject != _terms.end());
+ // assert(!ClApprox((*pnewSubject).second,0.0));
+ T reciprocal = ReciprocalOf((*pnewSubject).second);
+ _terms.erase(pnewSubject);
+ MultiplyMe(-reciprocal);
+ return reciprocal;
+}
+
+template <class T>
+T
+ClGenericLinearExpression<T>::Evaluate() const
+{
+ T answer = _constant;
+ typename ClVarToCoeffMap::const_iterator i = _terms.begin();
+
+ for ( ; i != _terms.end(); ++i)
+ {
+ ClVariable v = (*i).first;
+ answer += (*i).second * v.Value();
+ }
+ return answer;
+}
+
+
+template class ClGenericLinearExpression<Number>;
+// template class ClGenericLinearExpression<ClSymbolicWeight>;
diff --git a/libs/cassowary/ClReader.l b/libs/cassowary/ClReader.l
new file mode 100644
index 0000000000..77fa13a5a1
--- /dev/null
+++ b/libs/cassowary/ClReader.l
@@ -0,0 +1,87 @@
+/* $Id$
+ Cassowary Incremental Constraint Solver
+ Original Smalltalk Implementation by Alan Borning
+ This C++ Implementation by Greg J. Badros, <gjb@cs.washington.edu>
+ http://www.cs.washington.edu/homes/gjb
+ (C) 1998, 1999 Greg J. Badros and Alan Borning
+ See ../LICENSE for legal details regarding this software
+
+ ClReader.l - Scanner for constraint parsing.
+ By Greg J. Badros
+ */
+
+%{
+/* Get the token numbers that bison created for us
+ (uses the -d option of bison) */
+
+#include <cassowary/ClReader.h>
+#include "ClReader.cc.h"
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#define CONFIG_H_INCLUDED
+#endif
+
+/* global variable for the istream we are reading from;
+ gets set by PcnParseConstraint */
+istream *pxi_lexer;
+
+/* Pass in an extra variable (ClParseData *) to cllex so that
+ it can look up variable names */
+#define YY_DECL int cllex(YYSTYPE *lvalp, void *YYLEX_PARAM)
+
+/* Make lexer reader from the global variable */
+#define YY_INPUT(buf,result,max_size) \
+ do { if (pxi_lexer->get(buf[0]) && buf[0] > 0) result = 1; \
+ else result = YY_NULL; } while (0)
+
+%}
+
+%option noyywrap
+
+DIGIT [0-9]
+ALPHA [A-Za-z]
+ALPHANUM [A-Za-z0-9]
+ID_OK_PUNC [-_\[\]]
+RO_ANNOTATION "?"
+ID {ALPHA}({ALPHANUM}|{ID_OK_PUNC})*({RO_ANNOTATION})?
+NUMID "{"{DIGIT}+"}"
+ws [ \t\n]+
+
+%%
+{ws} /* skip whitespace */
+\n|";" { return 0; }
+">=" { return GEQ; }
+">" { return GT; }
+"<=" { return LEQ; }
+"<" { return LT; }
+"==" { return '='; }
+"="|"-"|"+"|"*"|"/"|"("|")" { return yytext[0]; }
+
+{DIGIT}+("."{DIGIT}*)? |
+"."{DIGIT}+ { lvalp->num = strtod(yytext,0); return NUM; }
+
+{ID} { /* Lookup the variable name */
+ ClParseData *pclpd = ((ClParseData *) YYLEX_PARAM);
+ int cch = strlen(yytext);
+ ClVariable *pclv = NULL;
+ bool fReadOnly = false;
+ if (yytext[cch-1] == '?') {
+ yytext[cch-1] = '\0';
+ fReadOnly = true;
+ }
+ const string str = string(yytext);
+ pclv = pclpd->_lookup_func(str);
+ if (!pclv->IsNil()) {
+ lvalp->pclv = pclv;
+ return fReadOnly?RO_VAR:VAR;
+ } else {
+ pxi_lexer = NULL;
+ yy_flush_buffer(YY_CURRENT_BUFFER);
+ throw ExCLParseErrorBadIdentifier(str);
+ return 0;
+ }
+ }
+
+. { pxi_lexer = NULL; throw ExCLParseErrorMisc("Unrecognized character"); }
+
diff --git a/libs/cassowary/ClReader.y b/libs/cassowary/ClReader.y
new file mode 100644
index 0000000000..f9f0dca43e
--- /dev/null
+++ b/libs/cassowary/ClReader.y
@@ -0,0 +1,154 @@
+/*
+ $Id$
+
+ Cassowary Incremental Constraint Solver
+ Original Smalltalk Implementation by Alan Borning
+ This C++ Implementation by Greg J. Badros, <gjb@cs.washington.edu>
+ http://www.cs.washington.edu/homes/gjb
+ (C) 1998, 1999 Greg J. Badros and Alan Borning
+ See ../LICENSE for legal details regarding this software
+
+ ClReader.y
+ Original implementation contributed by Steve Wolfman
+ Subsequently largely revised by Greg J. Badros
+
+ Supports parsing of read-only variables in constraints via "?" suffix
+ annotations on variables. If a variable is followed by "?" in any of
+ its occurrences in the constraint, that variable is deemed read-only
+ and entered into the constraint object as such. E.g.,
+
+ x = 2*y?
+
+ is a one-way constraint that sets x from y's value.
+
+ x = y + y?
+ and
+ x = y? + y
+
+ are identical one-way constraints with y read-only. One would prefer
+ to have it written like so:
+
+ x = y? + y?
+
+ but it need not be, and no warning or error is raised.
+*/
+
+
+%{
+ /* C Declarations */
+
+#include <cassowary/Cl.h>
+#include <string>
+#include <map>
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#define CONFIG_H_INCLUDED
+#endif
+
+#ifdef USE_CRUMMY_LEXER
+string current; /* Global to help in debugging/error messages */
+#endif
+
+/* Get yyparse, yylex to have an extra argument (type void *) */
+#define YYPARSE_PARAM cl_parse_data
+#define YYLEX_PARAM cl_parse_data
+#ifndef YYERROR_VERBOSE
+#define YYERROR_VERBOSE
+#endif
+#define YYDEBUG 1
+
+%}
+
+
+/* Bison Declarations */
+
+%pure_parser
+
+%union {
+ double num;
+ const ClVariable *pclv;
+ ClLinearExpression *pcle;
+ ClConstraint *pcn;
+}
+
+%{
+int yylex(YYSTYPE *lvalp, void *YYLEX_PARAM);
+void yyerror(const char *sz);
+%}
+
+%start constraint
+
+%token <num> NUM
+%token <pclv> VAR
+%token <pclv> RO_VAR
+
+%token GEQ
+%token GT
+%token LEQ
+%token LT
+
+%type <pcle> expr
+%type <pcn> constraint equation inequality
+
+%left '-' '+'
+%left '*' '/'
+%left NEG
+
+%%
+/* Grammar Rules */
+
+constraint: equation { $$ = $1; ((ClParseData*)YYPARSE_PARAM)->_pcn = $1; }
+ | inequality { $$ = $1; ((ClParseData*)YYPARSE_PARAM)->_pcn = $1; }
+;
+
+equation: expr '=' expr { $$ = new ClLinearEquation(*$1, *$3); }
+;
+
+inequality: expr GEQ expr { $$ = new ClLinearInequality(*$1, cnGEQ, *$3); }
+ | expr LEQ expr { $$ = new ClLinearInequality(*$1, cnLEQ, *$3); }
+ | expr LT expr { $$ = new ClLinearInequality(*$1, cnLT, *$3); }
+ | expr GT expr { $$ = new ClLinearInequality(*$1, cnGT, *$3); }
+;
+
+expr: NUM { $$ = new ClLinearExpression($1); }
+ | VAR { $$ = new ClLinearExpression(*$1); }
+ | RO_VAR { $$ = new ClLinearExpression(*$1);
+ ((ClParseData*)YYPARSE_PARAM)->_readOnlyVarsSoFar.insert(*$1); }
+ | expr '+' expr { $$ = new ClLinearExpression(*$1 + *$3); }
+ | expr '-' expr { $$ = new ClLinearExpression(*$1 - *$3); }
+ | expr '*' expr { $$ = new ClLinearExpression(*$1 * *$3); }
+ | expr '/' expr { $$ = new ClLinearExpression(*$1 / *$3); }
+ | '-' expr %prec NEG { $$ = new ClLinearExpression(-1 * *$2); }
+ | '(' expr ')' { $$ = $2; }
+;
+
+%%
+
+void clerror(const char *sz)
+{
+ throw ExCLParseErrorMisc(sz);
+}
+
+extern istream *pxi_lexer;
+
+// xi is the stream from which to read the constraint.
+// aVars is an array of variables large enough to account for
+// each one that might be mentioned in a constraint
+ClConstraint *PcnParseConstraint(istream &xi, const ClVarLookupFunction &lookup_func,
+ const ClStrength &strength)
+{
+ ClParseData cl_parse_data(xi, lookup_func);
+ pxi_lexer = &xi;
+ if (yyparse(&cl_parse_data) == 0) { // success
+#ifdef DEBUG_PARSER
+ cerr << *cl_parse_data.Pcn() << endl;
+#endif
+ cl_parse_data.Pcn()->ChangeStrength(strength);
+ cl_parse_data.Pcn()->AddROVars(cl_parse_data._readOnlyVarsSoFar);
+ return cl_parse_data.Pcn();
+ }
+ else { // failed
+ return 0;
+ }
+}
diff --git a/libs/cassowary/ClSimplexSolver.cc b/libs/cassowary/ClSimplexSolver.cc
new file mode 100644
index 0000000000..424a5d5aab
--- /dev/null
+++ b/libs/cassowary/ClSimplexSolver.cc
@@ -0,0 +1,1633 @@
+// $Id$
+//
+// Cassowary Incremental Constraint Solver
+// Original Smalltalk Implementation by Alan Borning
+// This C++ Implementation by Greg J. Badros, <gjb@cs.washington.edu>
+// http://www.cs.washington.edu/homes/gjb
+// (C) 1998, 1999 Greg J. Badros and Alan Borning
+// See ../LICENSE for legal details regarding this software
+//
+// ClSimplexSolver.cc
+
+using namespace std;
+
+#include <cassowary/debug.h>
+#include <cassowary/ClSimplexSolver.h>
+#include <cassowary/ClErrors.h>
+#include <cassowary/ClVariable.h>
+#include <cassowary/ClPoint.h>
+#include <cassowary/ClSlackVariable.h>
+#include <cassowary/ClObjectiveVariable.h>
+#include <cassowary/ClDummyVariable.h>
+#include <cassowary/cl_auto_ptr.h>
+
+#include <algorithm>
+#include <float.h>
+#include <sstream>
+#include <queue>
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#define CONFIG_H_INCLUDED
+#endif
+
+const char *szCassowaryVersion = VERSION;
+
+// Need to delete all expressions
+// and all slack and dummy variables
+// See NewExpression -- all allocation is done in there
+ClSimplexSolver::~ClSimplexSolver()
+{
+#ifdef CL_SOLVER_STATS
+ cerr << "_slackCounter == " << _slackCounter
+ << "\n_artificialCounter == " << _artificialCounter
+ << "\n_dummyCounter == " << _dummyCounter << endl;
+ cerr << "stayMinusErrorVars " << _stayMinusErrorVars.size() << ", "
+ << "stayPlusErrorVars " << _stayPlusErrorVars.size() << ", "
+ << "errorVars " << _errorVars.size() << ", "
+ << "markerVars " << _markerVars.size() << endl;
+#endif
+ // Cannot print *this here, since local ClVariable-s may have been
+ // destructed already
+}
+
+// Add the constraint cn to the tableau
+ClSimplexSolver &
+ClSimplexSolver::AddConstraint(ClConstraint *const pcn)
+{
+#ifdef CL_TRACE
+ Tracer TRACER(__FUNCTION__);
+ cerr << "(" << *pcn << ")" << endl;
+#endif
+
+ if (!pcn->FIsOkayForSimplexSolver()) {
+ throw ExCLTooDifficultSpecial("SimplexSolver cannot handle this constraint object");
+ }
+
+ if (pcn->IsStrictInequality()) {
+ // cannot handle strict inequalities
+ throw ExCLStrictInequalityNotAllowed();
+ }
+
+ if (pcn->ReadOnlyVars().size() > 0) {
+ // cannot handle read-only vars
+ throw ExCLReadOnlyNotAllowed();
+ }
+
+ if (pcn->IsEditConstraint())
+ {
+ ClEditConstraint *pcnEdit = dynamic_cast<ClEditConstraint *>(pcn);
+ const ClVariable &v = pcnEdit->variable();
+ if (!v.IsExternal() ||
+ (!FIsBasicVar(v) && !ColumnsHasKey(v)))
+ {
+ // we could try to make this case work,
+ // but it'd be unnecessarily inefficient --
+ // and probably easier for the client application
+ // to deal with
+ throw ExCLEditMisuse("(ExCLEditMisuse) Edit constraint on variable not in tableau.");
+ }
+ ClEditInfo *pcei = PEditInfoFromClv(v);
+ if (pcei)
+ {
+ // we need to only add a partial _editInfoList entry for this
+ // edit constraint since the variable is already being edited.
+ // otherwise a more complete entry is added later in this function
+ _editInfoList.push_back(new ClEditInfo(v, NULL, clvNil, clvNil, 0));
+ return *this;
+ }
+ }
+
+ ClVariable clvEplus, clvEminus;
+ Number prevEConstant;
+ ClLinearExpression *pexpr = NewExpression(pcn, /* output to: */
+ clvEplus,clvEminus,
+ prevEConstant);
+ bool fAddedOkDirectly = false;
+
+ try
+ {
+ // If possible Add expr directly to the appropriate tableau by
+ // choosing a subject for expr (a variable to become basic) from
+ // among the current variables in expr. If this doesn't work use an
+ // artificial variable. After adding expr re-Optimize.
+ fAddedOkDirectly = TryAddingDirectly(*pexpr);
+ }
+ catch (ExCLRequiredFailure &error)
+ {
+#ifdef CL_TRACE
+ cerr << "could not Add directly -- caught ExCLRequiredFailure error" << endl;
+#endif
+ RemoveConstraintInternal(pcn);
+ throw;
+ }
+
+ if (!fAddedOkDirectly)
+ { // could not Add directly
+ ExCLRequiredFailureWithExplanation e;
+ if (!AddWithArtificialVariable(*pexpr, e))
+ {
+#ifdef CL_DEBUG_FAILURES
+ cerr << "Failed solve! Could not Add constraint.\n"
+ << *this << endl;
+#endif
+ RemoveConstraintInternal(pcn);
+ if (FIsExplaining())
+ throw e;
+ else
+ throw ExCLRequiredFailure();
+ }
+ }
+
+ _fNeedsSolving = true;
+
+ if (pcn->IsEditConstraint())
+ {
+ ClEditConstraint *pcnEdit = dynamic_cast<ClEditConstraint *>(pcn);
+ ClVariable clv = pcnEdit->variable();
+ _editInfoList.push_back(new ClEditInfo(clv, pcnEdit, clvEplus, clvEminus,
+ prevEConstant));
+ }
+
+ if (_fAutosolve)
+ {
+ Optimize(_objective);
+ SetExternalVariables();
+ }
+
+ pcn->addedTo(*this);
+ return *this;
+}
+
+// Add weak stays to the x and y parts of each point. These have
+// increasing weights so that the solver will try to satisfy the x
+// and y stays on the same point, rather than the x stay on one and
+// the y stay on another.
+ClSimplexSolver &
+ClSimplexSolver::AddPointStays(const vector<const ClPoint *> &listOfPoints,
+ const ClStrength &strength)
+{
+#ifdef CL_TRACE
+ Tracer TRACER(__FUNCTION__);
+#endif
+
+ vector<const ClPoint *>::const_iterator it = listOfPoints.begin();
+ double weight = 1.0;
+ static const double multiplier = 2.0;
+ for ( ; it != listOfPoints.end(); ++it )
+ {
+ AddPointStay((*it)->X(),(*it)->Y(),strength,weight);
+ weight *= multiplier;
+ }
+ return *this;
+}
+
+ClSimplexSolver &
+ClSimplexSolver::AddPointStay(const ClPoint &clp, const ClStrength &strength, double weight)
+{
+ AddPointStay(clp.X(),clp.Y(),strength,weight);
+ return *this;
+}
+
+
+ClSimplexSolver &
+ClSimplexSolver::RemoveEditVarsTo(unsigned int n)
+{
+ queue<ClVariable> qclv;
+ ClVarSet sclvStillEditing; // Set of edit variables that we need to *not* remove
+#ifdef DEBUG_NESTED_EDITS
+ cerr << __FUNCTION__ << " " << n << endl;
+#endif
+ unsigned int i = 0;
+ for ( ClEditInfoList::const_iterator it = _editInfoList.begin();
+ (it != _editInfoList.end() && _editInfoList.size() != static_cast<unsigned int>(n));
+ ++it, ++i )
+ {
+ const ClEditInfo *pcei = (*it);
+ assert(pcei);
+#ifdef DEBUG_NESTED_EDITS
+ cerr << __FUNCTION__ << "Checking " << pcei->_clv
+ << ", index = " << i << endl;
+#endif
+ if (i >= n)
+ qclv.push(pcei->_clv);
+ else
+ sclvStillEditing.insert(pcei->_clv);
+ }
+ while (!qclv.empty())
+ {
+ ClVariable clv = qclv.front();
+ // only remove the variable if it's not in the set of variable
+ // from a previous nested outer edit
+ // e.g., if I do:
+ // Edit x,y
+ // Edit w,h,x,y
+ // EndEdit
+ // The end edit needs to only get rid of the edits on w,h
+ // not the ones on x,y
+ if (sclvStillEditing.find(clv) == sclvStillEditing.end())
+ {
+#ifdef DEBUG_NESTED_EDITS
+ cerr << __FUNCTION__ << ": Removing " << clv << endl;
+#endif
+ RemoveEditVar(clv);
+ }
+#ifdef DEBUG_NESTED_EDITS
+ else
+ {
+ cerr << __FUNCTION__ << ": Not removing " << clv << endl;
+ }
+#endif
+ qclv.pop();
+ }
+ while (_editInfoList.size() > n) {
+ _editInfoList.pop_back();
+ }
+
+ return *this;
+}
+
+
+/* A predicate used for remove_if */
+class VarInVarSet : public unary_function<ClVariable,bool> {
+public:
+ VarInVarSet(const ClVarSet &clvset) :
+ _set(clvset),
+ _setEnd(clvset.end())
+ { }
+
+ bool operator ()(ClVariable clv) const {
+ return (_set.find(clv) != _setEnd);
+ }
+
+private:
+ const ClVarSet &_set;
+ const ClVarSet::iterator _setEnd;
+};
+
+
+
+// Remove the constraint cn from the tableau
+// Also remove any error variable associated with cn
+ClSimplexSolver &
+ClSimplexSolver::RemoveConstraintInternal(const ClConstraint *const pcn)
+{
+#ifdef CL_TRACE
+ Tracer TRACER(__FUNCTION__);
+ cerr << "(" << *pcn << ")" << endl;
+#endif
+
+ // We are about to remove a constraint. There may be some stay
+ // constraints that were unsatisfied previously -- if we just
+ // removed the constraint these could come into play. Instead,
+ // Reset all of the stays so that things should stay where they are
+ // at the moment.
+ _fNeedsSolving = true;
+
+ ResetStayConstants();
+
+ // remove any error variables from the objective function
+ ClLinearExpression *pzRow = RowExpression(_objective);
+
+#ifdef CL_TRACE
+ cerr << _errorVars << endl << endl;
+#endif
+
+ ClConstraintToVarSetMap::iterator
+ it_eVars = _errorVars.find(pcn);
+ bool fFoundErrorVar = (it_eVars != _errorVars.end());
+
+ if (fFoundErrorVar)
+ {
+ ClVarSet &eVars = (*it_eVars).second;
+ ClVarSet::iterator it = eVars.begin();
+ for ( ; it != eVars.end(); ++it )
+ {
+ const ClLinearExpression *pexpr = RowExpression(*it);
+ if (pexpr == NULL )
+ {
+ pzRow->AddVariable(*it,-pcn->weight() * pcn->strength().symbolicWeight().AsDouble(),
+ _objective,*this);
+ }
+ else
+ { // the error variable was in the basis
+ pzRow->AddExpression(*pexpr,-pcn->weight() * pcn->strength().symbolicWeight().AsDouble(),
+ _objective,*this);
+ }
+ }
+ }
+
+ ClConstraintToVarMap::iterator
+ it_marker = _markerVars.find(pcn);
+ if (it_marker == _markerVars.end())
+ { // could not find the constraint
+ throw ExCLConstraintNotFound();
+ }
+ // try to make the marker variable basic if it isn't already
+ const ClVariable marker = (*it_marker).second;
+ _markerVars.erase(it_marker);
+ _constraintsMarked.erase(marker);
+#ifdef CL_TRACE
+ cerr << "Looking to remove var " << marker << endl;
+#endif
+ if (!FIsBasicVar(marker))
+ { // not in the basis, so need to do some work
+ // first choose which variable to move out of the basis
+ // only consider restricted basic variables
+ ClVarSet &col = _columns[marker];
+ ClVarSet::iterator it_col = col.begin();
+#ifdef CL_TRACE
+ cerr << "Must Pivot -- columns are " << col << endl;
+#endif
+
+ ClVariable exitVar = clvNil;
+ bool fExitVarSet = false;
+ double minRatio = 0.0;
+ for ( ; it_col != col.end(); ++it_col)
+ {
+ const ClVariable &v = *it_col;
+ if (v.IsRestricted() )
+ {
+ const ClLinearExpression *pexpr = RowExpression(v);
+ assert(pexpr != NULL );
+ Number coeff = pexpr->CoefficientFor(marker);
+#ifdef CL_TRACE
+ cerr << "Marker " << marker << "'s coefficient in " << *pexpr << " is "
+ << coeff << endl;
+#endif
+ // only consider negative coefficients
+ if (coeff < 0.0)
+ {
+ Number r = - pexpr->Constant() / coeff;
+ if (!fExitVarSet || r < minRatio)
+ {
+ minRatio = r;
+ exitVar = v;
+ fExitVarSet = true;
+ }
+ }
+ }
+ }
+ // if we didn't set exitvar above, then either the marker
+ // variable has a positive coefficient in all equations, or it
+ // only occurs in equations for unrestricted variables. If it
+ // does occur in an equation for a restricted variable, pick the
+ // equation that gives the smallest ratio. (The row with the
+ // marker variable will become infeasible, but all the other rows
+ // will still be feasible; and we will be dropping the row with
+ // the marker variable. In effect we are removing the
+ // non-negativity restriction on the marker variable.)
+ if (!fExitVarSet)
+ {
+#ifdef CL_TRACE
+ cerr << "exitVar did not get set" << endl;
+#endif
+ it_col = col.begin();
+ for ( ; it_col != col.end(); ++it_col)
+ {
+ ClVariable v = *it_col;
+ if (v.IsRestricted() )
+ {
+ const ClLinearExpression *pexpr = RowExpression(v);
+ assert(pexpr != NULL);
+ Number coeff = pexpr->CoefficientFor(marker);
+ Number r = pexpr->Constant() / coeff;
+ if (!fExitVarSet || r < minRatio)
+ {
+ minRatio = r;
+ exitVar = v;
+ fExitVarSet = true;
+ }
+ }
+ }
+ }
+
+ if (!fExitVarSet)
+ { // exitVar is still nil
+ // If col is empty, then exitVar doesn't occur in any equations,
+ // so just remove it. Otherwise pick an exit var from among the
+ // unrestricted variables whose equation involves the marker var
+ if (col.size() == 0)
+ {
+ RemoveColumn(marker);
+ }
+ else
+ {
+ // A. Beurive' Tue Sep 14 18:26:05 CEST 1999
+ // Don't pick the objective, or it will be removed!
+ it_col = col.begin();
+ for ( ; it_col != col.end(); ++it_col)
+ {
+ ClVariable v = *it_col;
+ if (v != _objective)
+ {
+ exitVar = v;
+ fExitVarSet = true;
+ break;
+ }
+ }
+ assert(fExitVarSet == true);
+ }
+ }
+
+ if (fExitVarSet)
+ {
+ Pivot(marker,exitVar);
+ }
+ }
+
+ if (FIsBasicVar(marker))
+ {
+ ClLinearExpression *pexpr = RemoveRow(marker);
+#ifdef CL_TRACE
+ cerr << "delete@ " << pexpr << endl;
+#endif
+ delete pexpr;
+ }
+
+ // Delete any error variables. If cn is an inequality, it also
+ // contains a slack variable; but we use that as the marker variable
+ // and so it has been deleted when we removed its row.
+ if (fFoundErrorVar)
+ {
+ ClVarSet &eVars = (*it_eVars).second;
+ ClVarSet::iterator it = eVars.begin();
+ for ( ; it != eVars.end(); ++it )
+ {
+ ClVariable v = (*it);
+ if (v != marker)
+ {
+ RemoveColumn(v);
+ }
+ }
+ }
+
+ if (pcn->isStayConstraint())
+ {
+ // iterate over the stay{Plus,Minus}ErrorVars and remove those
+ // variables v in those vectors that are also in set eVars
+ if (fFoundErrorVar)
+ {
+ ClVarSet &eVars = (*it_eVars).second;
+ _stayPlusErrorVars
+ .erase(remove_if(_stayPlusErrorVars.begin(),_stayPlusErrorVars.end(),
+ VarInVarSet(eVars)),
+ _stayPlusErrorVars.end());
+ _stayMinusErrorVars
+ .erase(remove_if(_stayMinusErrorVars.begin(),_stayMinusErrorVars.end(),
+ VarInVarSet(eVars)),
+ _stayMinusErrorVars.end());
+ }
+ }
+ else if (pcn->IsEditConstraint())
+ {
+ const ClEditConstraint *pcnEdit = dynamic_cast<const ClEditConstraint *>(pcn);
+ const ClVariable clv = pcnEdit->variable();
+ ClEditInfo *pcei = PEditInfoFromClv(clv);
+ assert(pcei);
+ ClVariable clvEditMinus = pcei->_clvEditMinus;
+ RemoveColumn(clvEditMinus); // clvEditPlus is a marker var and gets removed later
+ delete pcei;
+ _editInfoList.remove(pcei);
+ }
+
+ if (fFoundErrorVar)
+ {
+ // This code is not needed since the variables are deleted
+ // when they are removed from the row --
+ // leaving it in results in double deletions
+ // delete the constraint's error variables
+ // ClVarSet &evars_set = (*it_eVars).second;
+ // ClVarSet::const_iterator it_set = evars_set.begin();
+ // for ( ; it_set != evars_set.end(); ++it_set)
+ // {
+ // delete *it_set;
+ // }
+ _errorVars.erase((*it_eVars).first);
+ }
+
+ if (_fAutosolve)
+ {
+ Optimize(_objective);
+ SetExternalVariables();
+ }
+
+ return *this;
+}
+
+
+// Re-initialize this solver from the original constraints, thus
+// getting rid of any accumulated numerical problems. (Actually,
+// Alan hasn't observed any such problems yet, but here's the method
+// anyway.)
+void
+ClSimplexSolver::Reset()
+{
+#ifdef CL_TRACE
+ Tracer TRACER(__FUNCTION__);
+ cerr << "()" << endl;
+#endif
+ // FIXGJB -- can postpone writing this for a while
+ // gotta be careful, though, as it's a likely place for
+ // a memory leak to sneak in
+ assert(false);
+}
+
+
+// Re-solve the cuurent collection of constraints, given the new
+// values for the edit variables that have already been
+// suggested (see SuggestValue() method)
+void
+ClSimplexSolver::Resolve()
+{ // CODE DUPLICATED ABOVE
+#ifdef CL_TRACE
+ Tracer TRACER(__FUNCTION__);
+#endif
+ DualOptimize();
+ SetExternalVariables();
+ _infeasibleRows.clear();
+ if (_fResetStayConstantsAutomatically)
+ ResetStayConstants();
+}
+
+ClSimplexSolver &
+ClSimplexSolver::SuggestValue(ClVariable v, Number x)
+{
+#ifdef CL_TRACE
+ Tracer TRACER(__FUNCTION__);
+#endif
+ ClEditInfo *pcei = PEditInfoFromClv(v);
+ if (NULL == pcei)
+ {
+#ifndef CL_NO_IO
+ std::stringstream ss;
+ ss << "SuggestValue for variable " << v << ", but var is not an edit variable" << ends;
+ throw ExCLEditMisuse(ss.str().c_str());
+#else
+ throw ExCLEditMisuse(v.Name().c_str());
+#endif
+ }
+ ClVariable clvEditPlus = pcei->_clvEditPlus;
+ ClVariable clvEditMinus = pcei->_clvEditMinus;
+ Number delta = x - pcei->_prevEditConstant;
+ pcei->_prevEditConstant = x;
+ DeltaEditConstant(delta,clvEditPlus,clvEditMinus);
+ return *this;
+}
+
+// Re-solve the cuurent collection of constraints, given the new
+// values for the edit variables that have already been
+// suggested (see SuggestValue() method)
+// This is not guaranteed to work if you remove an edit constraint
+// from the middle of the edit constraints you added
+// (e.g., edit A, edit B, edit C, remove B -> this will fail!)
+// DEPRECATED
+void
+ClSimplexSolver::Resolve(const vector<Number> &newEditConstants)
+{
+ ClEditInfoList::iterator it = _editInfoList.begin();
+ unsigned int i = 0;
+ for (; i < newEditConstants.size() && it != _editInfoList.end(); ++it, ++i)
+ {
+ ClEditInfo *pcei = (*it);
+ SuggestValue(pcei->_clv,newEditConstants[i]);
+ }
+ Resolve();
+}
+
+
+//// protected
+
+// Add the constraint expr=0 to the inequality tableau using an
+// artificial variable. To do this, create an artificial variable
+// av and Add av=expr to the inequality tableau, then make av be 0.
+// (Raise an exception if we can't attain av=0 -- and prepare explanation)
+bool
+ClSimplexSolver::AddWithArtificialVariable(ClLinearExpression &expr,
+ ExCLRequiredFailureWithExplanation &e)
+{
+#ifdef CL_TRACE
+ Tracer TRACER(__FUNCTION__);
+ cerr << "(" << expr << ")" << endl;
+#endif
+
+ // Allocate the objects on the heap because the objects
+ // will remain in the tableau if we throw an exception,
+ // and that will result in the destructor cleaning up
+ // after us
+ ClSlackVariable *pav = new ClSlackVariable(++_artificialCounter,"a");
+ ClObjectiveVariable *paz = new ClObjectiveVariable("az");
+ ClLinearExpression *pazRow = new ClLinearExpression(expr);
+ // the artificial objective is av, which we know is equal to expr
+ // (which contains only parametric variables)
+
+#ifdef CL_FIND_LEAK
+ cerr << "aC = " << _artificialCounter
+ << "\nDeletes = " << _cArtificialVarsDeleted << endl;
+#endif
+#ifdef CL_TRACE
+ cerr << __FUNCTION__ << " before addRow-s:\n"
+ << (*this) << endl;
+#endif
+
+ // the artificial objective is av, which we know is equal to expr
+ // (which contains only parametric variables)
+
+ // objective is treated as a row in the tableau,
+ // so do the substitution for its value (we are minimizing
+ // the artificial variable)
+ // this row will be removed from the tableau after optimizing
+ addRow(*paz,*pazRow);
+
+ // now Add the normal row to the tableau -- when artifical
+ // variable is minimized to 0 (if possible)
+ // this row remains in the tableau to maintain the constraint
+ // we are trying to Add
+ addRow(*pav,expr);
+
+#ifdef CL_TRACE
+ cerr << __FUNCTION__ << " after addRow-s:\n"
+ << (*this) << endl;
+#endif
+
+ // try to Optimize az to 0
+ // note we are *not* optimizing the real objective, but optimizing
+ // the artificial objective to see if the error in the constraint
+ // we are adding can be set to 0
+ Optimize(*paz);
+
+ // Careful, we want to get the Expression that is in
+ // the tableau, not the one we initialized it with!
+ ClLinearExpression *pazTableauRow = RowExpression(*paz);
+#ifdef CL_TRACE
+ cerr << "pazTableauRow->Constant() == " << pazTableauRow->Constant() << endl;
+#endif
+
+ // Check that we were able to make the objective value 0
+ // If not, the original constraint was not satisfiable
+ if (!ClApprox(pazTableauRow->Constant(),0.0))
+ {
+ BuildExplanation(e, paz, pazTableauRow);
+ // remove the artificial objective row that we just
+ // added temporarily
+ delete RemoveRow(*paz);
+ // and delete the artificial objective variable that we also added above
+ delete paz;
+ return false;
+ }
+
+ // see if av is a basic variable
+ const ClLinearExpression *pe = RowExpression(*pav);
+ if (pe != NULL)
+ {
+ // FIXGJB: do we ever even get here?
+ // Find another variable in this row and Pivot, so that av becomes parametric
+ // If there isn't another variable in the row then
+ // the tableau contains the equation av = 0 -- just delete av's row
+ if (pe->IsConstant())
+ {
+ // FIXGJB: do we ever get here?
+ assert(ClApprox(pe->Constant(),0.0));
+ delete RemoveRow(*pav);
+ // remove the temporary objective function
+ // FIXGJB may need this too: delete RemoveRow(*paz);
+ delete pav;
+#ifdef CL_FIND_LEAK
+ ++_cArtificialVarsDeleted;
+#endif
+ return true;
+ }
+ ClVariable entryVar = pe->AnyPivotableVariable();
+ if (entryVar.IsNil())
+ {
+ BuildExplanation(e, *pav, pe);
+ return false; /* required failure */
+ }
+ Pivot(entryVar, *pav);
+ }
+ // now av should be parametric
+ assert(RowExpression(*pav) == NULL);
+ RemoveColumn(*pav);
+ delete pav;
+#ifdef CL_FIND_LEAK
+ ++_cArtificialVarsDeleted;
+#endif
+ // remove the temporary objective function
+ delete RemoveRow(*paz);
+ delete paz;
+ return true;
+}
+
+
+// Using the given equation (av = cle) build an explanation which
+// implicates all constraints used to construct the equation. That
+// is, everything for which the variables in the equation are markers.
+void ClSimplexSolver::BuildExplanation(ExCLRequiredFailureWithExplanation &e,
+ ClVariable av,
+ const ClLinearExpression *pcle)
+{
+ ClVarToConstraintMap::iterator it_cn;
+ it_cn = _constraintsMarked.find(av);
+ if (it_cn != _constraintsMarked.end())
+ {
+ e.AddConstraint((*it_cn).second);
+ }
+
+ assert(pcle != NULL);
+
+ const ClVarToNumberMap & terms = pcle->Terms();
+ ClVarToNumberMap::const_iterator it_term;
+ for (it_term = terms.begin(); it_term != terms.end(); it_term++)
+ {
+ it_cn = _constraintsMarked.find((*it_term).first);
+ if (it_cn != _constraintsMarked.end())
+ {
+ e.AddConstraint((*it_cn).second);
+ }
+ }
+}
+
+
+
+// We are trying to Add the constraint expr=0 to the appropriate
+// tableau. Try to Add expr directly to the tableaus without
+// creating an artificial variable. Return true if successful and
+// false if not.
+bool
+ClSimplexSolver::TryAddingDirectly(ClLinearExpression &expr)
+{
+#ifdef CL_TRACE
+ Tracer TRACER(__FUNCTION__);
+ cerr << "(" << expr << ")" << endl;
+#endif
+ ClVariable subject = ChooseSubject(expr);
+ if (subject.get_pclv() == NULL )
+ {
+#ifdef CL_TRACE
+ cerr << "- returning false" << endl;
+#endif
+ return false;
+ }
+ expr.NewSubject(subject);
+ if (ColumnsHasKey(subject))
+ {
+ SubstituteOut(subject,expr);
+ }
+ addRow(subject,expr);
+#ifdef CL_TRACE
+ cerr << "- returning true" << endl;
+#endif
+ return true; // successfully added directly
+}
+
+
+// We are trying to Add the constraint expr=0 to the tableaux. Try
+// to choose a subject (a variable to become basic) from among the
+// current variables in expr. If expr contains any unrestricted
+// variables, then we must choose an unrestricted variable as the
+// subject. Also, if the subject is new to the solver we won't have
+// to do any substitutions, so we prefer new variables to ones that
+// are currently noted as parametric. If expr contains only
+// restricted variables, if there is a restricted variable with a
+// negative coefficient that is new to the solver we can make that
+// the subject. Otherwise we can't find a subject, so return nil.
+// (In this last case we have to Add an artificial variable and use
+// that variable as the subject -- this is done outside this method
+// though.)
+//
+// Note: in checking for variables that are new to the solver, we
+// ignore whether a variable occurs in the objective function, since
+// new slack variables are added to the objective function by
+// 'NewExpression:', which is called before this method.
+ClVariable
+ClSimplexSolver::ChooseSubject(ClLinearExpression &expr)
+{
+#ifdef CL_TRACE
+ Tracer TRACER(__FUNCTION__);
+ cerr << "(" << expr << ")" << endl;
+#endif
+ ClVariable subject(clvNil); // the current best subject, if any
+
+ // true iff we have found a subject that is an unrestricted variable
+ bool foundUnrestricted = false;
+
+ // true iff we have found a restricted variable that is new to the
+ // solver (except for being in the obj. function) and that has a
+ // negative coefficient
+ bool foundNewRestricted = false;
+
+ const ClVarToNumberMap &terms = expr.Terms();
+ ClVarToNumberMap::const_iterator it = terms.begin();
+ for ( ; it != terms.end(); ++it )
+ {
+ ClVariable v = (*it).first;
+ Number c = (*it).second;
+
+ if (foundUnrestricted)
+ {
+ // We have already found an unrestricted variable. The only
+ // time we will want to use v instead of the current choice
+ // 'subject' is if v is unrestricted and new to the solver and
+ // 'subject' isn't new. If this is the case just pick v
+ // immediately and return.
+ if (!v.IsRestricted())
+ {
+ if (!ColumnsHasKey(v))
+ return v;
+ }
+ }
+ else
+ { // we haven't found an restricted variable yet
+ if (v.IsRestricted())
+ {
+ // v is restricted. If we have already found a suitable
+ // restricted variable just stick with that. Otherwise, if v
+ // is new to the solver and has a negative coefficient pick
+ // it. Regarding being new to the solver -- if the variable
+ // occurs only in the objective function we regard it as being
+ // new to the solver, since error variables are added to the
+ // objective function when we make the Expression. We also
+ // never pick a dummy variable here.
+ if (!foundNewRestricted && !v.IsDummy() && c < 0.0)
+ {
+ const ClTableauColumnsMap &col = Columns();
+ ClTableauColumnsMap::const_iterator it_col = col.find(v);
+ if (it_col == col.end() ||
+ ( col.size() == 1 && ColumnsHasKey(_objective) ) )
+ {
+ subject = v;
+ foundNewRestricted = true;
+ }
+ }
+ }
+ else
+ {
+ // v is unrestricted.
+ // If v is also new to the solver just pick it now
+ subject = v;
+ foundUnrestricted = true;
+ }
+ }
+ }
+ if (!subject.IsNil())
+ return subject;
+
+ // subject is nil.
+ // Make one last check -- if all of the variables in expr are dummy
+ // variables, then we can pick a dummy variable as the subject
+ Number coeff = 0;
+ it = terms.begin();
+ for ( ; it != terms.end(); ++it )
+ {
+ ClVariable v = (*it).first;
+ Number c = (*it).second;
+ if (!v.IsDummy())
+ return clvNil; // nope, no luck
+ // if v is new to the solver, tentatively make it the subject
+ if (!ColumnsHasKey(v))
+ {
+ subject = v;
+ coeff = c;
+ }
+ }
+
+ // If we get this far, all of the variables in the Expression should
+ // be dummy variables. If the Constant is nonzero we are trying to
+ // Add an unsatisfiable required constraint. (Remember that dummy
+ // variables must take on a value of 0.) Otherwise, if the Constant
+ // is Zero, multiply by -1 if necessary to make the coefficient for
+ // the subject negative."
+ if (!ClApprox(expr.Constant(),0.0))
+ {
+#ifdef CL_DEBUG_FAILURES
+ cerr << "required failure in choose subject:\n"
+ << *this << endl;
+#endif
+ if (FIsExplaining())
+ {
+ ExCLRequiredFailureWithExplanation e;
+ BuildExplanation(e, clvNil, &expr);
+ throw e;
+ }
+ else
+ throw ExCLRequiredFailure();
+ }
+ if (coeff > 0.0)
+ {
+ expr.MultiplyMe(-1);
+ }
+ return subject;
+}
+
+// Each of the non-required edits will be represented by an equation
+// of the form
+// v = c + eplus - eminus
+// where v is the variable with the edit, c is the previous edit
+// value, and eplus and eminus are slack variables that hold the
+// error in satisfying the edit constraint. We are about to change
+// something, and we want to fix the constants in the equations
+// representing the edit constraints. If one of eplus and eminus is
+// basic, the other must occur only in the Expression for that basic
+// error variable. (They can't both be basic.) Fix the Constant in
+// this Expression. Otherwise they are both nonbasic. Find all of
+// the expressions in which they occur, and fix the constants in
+// those. See the UIST paper for details.
+// (This comment was for resetEditConstants(), but that is now
+// gone since it was part of the screwey vector-based interface
+// to resolveing. --02/15/99 gjb)
+void
+ClSimplexSolver::DeltaEditConstant(Number delta,
+ ClVariable plusErrorVar,
+ ClVariable minusErrorVar)
+{
+#ifdef CL_TRACE
+ Tracer TRACER(__FUNCTION__);
+ cerr << "(" << delta << ", " << plusErrorVar << ", " << minusErrorVar << ")" << endl;
+#endif
+ // first check if the plusErrorVar is basic
+ ClLinearExpression *pexprPlus = RowExpression(plusErrorVar);
+ if (pexprPlus != NULL )
+ {
+ pexprPlus->IncrementConstant(delta);
+ // error variables are always restricted
+ // so the row is infeasible if the Constant is negative
+ if (pexprPlus->Constant() < 0.0)
+ {
+ _infeasibleRows.insert(plusErrorVar);
+ }
+ return;
+ }
+ // check if minusErrorVar is basic
+ ClLinearExpression *pexprMinus = RowExpression(minusErrorVar);
+ if (pexprMinus != NULL)
+ {
+ pexprMinus->IncrementConstant(-delta);
+ if (pexprMinus->Constant() < 0.0)
+ {
+ _infeasibleRows.insert(minusErrorVar);
+ }
+ return;
+ }
+ // Neither is basic. So they must both be nonbasic, and will both
+ // occur in exactly the same expressions. Find all the expressions
+ // in which they occur by finding the column for the minusErrorVar
+ // (it doesn't matter whether we look for that one or for
+ // plusErrorVar). Fix the constants in these expressions.
+ ClVarSet &columnVars = _columns[minusErrorVar];
+ ClVarSet::iterator it = columnVars.begin();
+ for (; it != columnVars.end(); ++it)
+ {
+ ClVariable basicVar = *it;
+ ClLinearExpression *pexpr = RowExpression(basicVar);
+ assert(pexpr != NULL );
+ double c = pexpr->CoefficientFor(minusErrorVar);
+ pexpr->IncrementConstant(c*delta);
+ if (basicVar.IsRestricted() && pexpr->Constant() < 0.0)
+ {
+ _infeasibleRows.insert(basicVar);
+ }
+ }
+}
+
+// We have set new values for the constants in the edit constraints.
+// Re-Optimize using the dual simplex algorithm.
+void
+ClSimplexSolver::DualOptimize()
+{
+#ifdef CL_TRACE
+ Tracer TRACER(__FUNCTION__);
+ cerr << "()" << endl;
+#endif
+ const ClLinearExpression *pzRow = RowExpression(_objective);
+ // need to handle infeasible rows
+ while (!_infeasibleRows.empty())
+ {
+ ClVarSet::iterator it_exitVar = _infeasibleRows.begin();
+ ClVariable exitVar = *it_exitVar;
+ _infeasibleRows.erase(it_exitVar);
+ ClVariable entryVar;
+ // exitVar might have become basic after some other pivoting
+ // so allow for the case of its not being there any longer
+ ClLinearExpression *pexpr = RowExpression(exitVar);
+ if (pexpr != NULL )
+ {
+ // make sure the row is still not feasible
+ if (pexpr->Constant() < 0.0)
+ {
+ double ratio = DBL_MAX;
+ double r;
+ ClVarToNumberMap &terms = pexpr->Terms();
+ ClVarToNumberMap::iterator it = terms.begin();
+ for ( ; it != terms.end(); ++it )
+ {
+ ClVariable v = (*it).first;
+ Number c = (*it).second;
+ if (c > 0.0 && v.IsPivotable())
+ {
+ Number zc = pzRow->CoefficientFor(v);
+ r = zc/c; // FIXGJB r:= zc/c or Zero, as ClSymbolicWeight-s
+ if (r < ratio)
+ {
+ entryVar = v;
+ ratio = r;
+ }
+ }
+ }
+ if (ratio == DBL_MAX)
+ {
+ stringstream ss;
+ ss << "ratio == nil (DBL_MAX)" << ends;
+ throw ExCLInternalError(ss.str().c_str());
+ }
+ Pivot(entryVar,exitVar);
+ }
+ }
+ }
+}
+
+// Make a new linear Expression representing the constraint cn,
+// replacing any basic variables with their defining expressions.
+// Normalize if necessary so that the Constant is non-negative. If
+// the constraint is non-required give its error variables an
+// appropriate weight in the objective function.
+ClLinearExpression *
+ClSimplexSolver::NewExpression(const ClConstraint *pcn,
+ /* output to */
+ ClVariable &clvEplus,
+ ClVariable &clvEminus,
+ Number &prevEConstant)
+{
+#ifdef CL_TRACE
+ Tracer TRACER(__FUNCTION__);
+ cerr << "(" << *pcn << ")" << endl;
+ cerr << "cn.IsInequality() == " << pcn->IsInequality() << endl;
+ cerr << "cn.IsRequired() == " << pcn->IsRequired() << endl;
+#endif
+ const ClLinearExpression &cnExpr = pcn->Expression();
+ cl_auto_ptr<ClLinearExpression> pexpr ( new ClLinearExpression(cnExpr.Constant()) );
+ cl_auto_ptr<ClSlackVariable> pslackVar;
+ cl_auto_ptr<ClDummyVariable> pdummyVar;
+ cl_auto_ptr<ClSlackVariable> peminus(0);
+ cl_auto_ptr<ClSlackVariable> peplus(0);
+ const ClVarToNumberMap &cnTerms = cnExpr.Terms();
+ ClVarToNumberMap::const_iterator it = cnTerms.begin();
+ for ( ; it != cnTerms.end(); ++it)
+ {
+ ClVariable v = (*it).first;
+ Number c = (*it).second;
+ const ClLinearExpression *pe = RowExpression(v);
+ if (pe == NULL)
+ {
+ pexpr->AddVariable(v,c);
+ }
+ else
+ {
+ pexpr->AddExpression(*pe,c);
+ }
+ }
+
+ // Add slack and error variables as needed
+ if (pcn->IsInequality())
+ {
+ // cn is an inequality, so Add a slack variable. The original
+ // constraint is expr>=0, so that the resulting equality is
+ // expr-slackVar=0. If cn is also non-required Add a negative
+ // error variable, giving
+ // expr-slackVar = -errorVar, in other words
+ // expr-slackVar+errorVar=0.
+ // Since both of these variables are newly created we can just Add
+ // them to the Expression (they can't be basic).
+ ++_slackCounter;
+ ReinitializeAutoPtr(pslackVar,new ClSlackVariable (_slackCounter, "s"));
+ pexpr->setVariable(*pslackVar,-1);
+ // index the constraint under its slack variable and vice-versa
+ _markerVars[pcn] = pslackVar.get();
+ _constraintsMarked[pslackVar.get()] = pcn;
+
+ if (!pcn->IsRequired())
+ {
+ ++_slackCounter;
+ ReinitializeAutoPtr(peminus,new ClSlackVariable (_slackCounter, "em"));
+ pexpr->setVariable(*peminus,1.0);
+ // Add emnius to the objective function with the appropriate weight
+ ClLinearExpression *pzRow = RowExpression(_objective);
+ // FIXGJB: pzRow->AddVariable(eminus,pcn->strength().symbolicWeight() * pcn->weight());
+ ClSymbolicWeight sw = pcn->strength().symbolicWeight().Times(pcn->weight());
+ pzRow->setVariable(*peminus,sw.AsDouble());
+ _errorVars[pcn].insert(peminus.get());
+ NoteAddedVariable(*peminus,_objective);
+ }
+ }
+ else
+ { // cn is an equality
+ if (pcn->IsRequired())
+ {
+ // Add a dummy variable to the Expression to serve as a marker
+ // for this constraint. The dummy variable is never allowed to
+ // enter the basis when pivoting.
+ ++_dummyCounter;
+ ReinitializeAutoPtr(pdummyVar,new ClDummyVariable (_dummyCounter, "d"));
+ pexpr->setVariable(*pdummyVar,1.0);
+ _markerVars[pcn] = pdummyVar.get();
+ _constraintsMarked[pdummyVar.get()] = pcn;
+#ifdef CL_TRACE
+ cerr << "Adding dummyVar == d" << _dummyCounter << endl;
+#endif
+ }
+ else
+ {
+ // cn is a non-required equality. Add a positive and a negative
+ // error variable, making the resulting constraint
+ // expr = eplus - eminus,
+ // in other words: expr-eplus+eminus=0
+ ++_slackCounter;
+ ReinitializeAutoPtr(peplus,new ClSlackVariable (_slackCounter, "ep"));
+ ReinitializeAutoPtr(peminus,new ClSlackVariable (_slackCounter, "em"));
+
+ pexpr->setVariable(*peplus,-1.0);
+ pexpr->setVariable(*peminus,1.0);
+ // index the constraint under one of the error variables
+ _markerVars[pcn] = peplus.get();
+ _constraintsMarked[peplus.get()] = pcn;
+
+ ClLinearExpression *pzRow = RowExpression(_objective);
+ // FIXGJB: pzRow->AddVariable(eplus,pcn->strength().symbolicWeight() * pcn->weight());
+ ClSymbolicWeight sw = pcn->strength().symbolicWeight().Times(pcn->weight());
+ double swCoeff = sw.AsDouble();
+#ifdef CL_TRACE
+ if (swCoeff == 0)
+ {
+ cerr << "sw == " << sw << endl
+ << "cn == " << *pcn << endl;
+ cerr << "adding " << *peplus << " and " << *peminus
+ << " with swCoeff == " << swCoeff << endl;
+ }
+#endif
+ pzRow->setVariable(*peplus,swCoeff);
+ NoteAddedVariable(*peplus,_objective);
+ // FIXGJB: pzRow->AddVariable(eminus,pcn->strength().symbolicWeight() * pcn->weight());
+ pzRow->setVariable(*peminus,swCoeff);
+ NoteAddedVariable(*peminus,_objective);
+ _errorVars[pcn].insert(peminus.get());
+ _errorVars[pcn].insert(peplus.get());
+ if (pcn->isStayConstraint())
+ {
+ _stayPlusErrorVars.push_back(peplus.get());
+ _stayMinusErrorVars.push_back(peminus.get());
+ }
+ else if (pcn->IsEditConstraint())
+ {
+ clvEplus = peplus.get();
+ clvEminus = peminus.get();
+ prevEConstant = cnExpr.Constant();
+ }
+ }
+ }
+
+ // the Constant in the Expression should be non-negative.
+ // If necessary normalize the Expression by multiplying by -1
+ if (pexpr->Constant() < 0)
+ {
+#ifdef CL_TRACE
+ cerr << "NewExpression's Constant is " << pexpr->Constant() << ", < 0, so flipping" << endl;
+#endif
+ pexpr->MultiplyMe(-1);
+ }
+#ifdef CL_TRACE
+ cerr << "- returning " << *pexpr << endl;
+#endif
+ // Terrible Name -- release() does *not* delete the object,
+ // only makes sure that the destructor won't delete the object
+ // (it releases the cl_auto_ptr from the responsibility of deleting the object)
+ pslackVar.release();
+ pdummyVar.release();
+ peminus.release();
+ peplus.release();
+ return pexpr.release();
+}
+
+// Minimize the value of the objective. (The tableau should already
+// be feasible.)
+void
+ClSimplexSolver::Optimize(ClVariable zVar)
+{
+#ifdef CL_TRACE
+ Tracer TRACER(__FUNCTION__);
+ cerr << "(" << zVar << ")\n"
+ << *this << endl;
+#endif
+ ClLinearExpression *pzRow = RowExpression(zVar);
+ assert(pzRow != NULL);
+ ClVariable entryVar = clvNil;
+ ClVariable exitVar = clvNil;
+ while (true)
+ {
+ Number objectiveCoeff = 0;
+ // Find the most negative coefficient in the objective function
+ // (ignoring the non-pivotable dummy variables). If all
+ // coefficients are positive we're done
+ ClVarToNumberMap &terms = pzRow->Terms();
+ ClVarToNumberMap::iterator it = terms.begin();
+ for (; it != terms.end(); ++it)
+ {
+ ClVariable v = (*it).first;
+ Number c = (*it).second;
+ if (v.IsPivotable() && c < objectiveCoeff)
+ {
+ objectiveCoeff = c;
+ entryVar = v;
+ // A. Beurive' Tue Jul 13 23:03:05 CEST 1999 Why the most
+ // negative? I encountered unending cycles of pivots!
+ break;
+ }
+ }
+ // if all coefficients were positive (or if the objective
+ // function has no pivotable variables)
+ // we are at an optimum
+ if (objectiveCoeff >= -_epsilon)
+ return;
+#ifdef CL_TRACE
+ cerr << "entryVar == " << entryVar << ", "
+ << "objectiveCoeff == " << objectiveCoeff
+ << endl;
+#endif
+
+ // choose which variable to move out of the basis
+ // Only consider pivotable basic variables
+ // (i.e. restricted, non-dummy variables)
+ double minRatio = DBL_MAX;
+ ClVarSet &columnVars = _columns[entryVar];
+ ClVarSet::iterator it_rowvars = columnVars.begin();
+ Number r = 0.0;
+ for (; it_rowvars != columnVars.end(); ++it_rowvars)
+ {
+ ClVariable v = *it_rowvars;
+#ifdef CL_TRACE
+ cerr << "Checking " << v << endl;
+#endif
+ if (v.IsPivotable())
+ {
+ const ClLinearExpression *pexpr = RowExpression(v);
+ Number coeff = pexpr->CoefficientFor(entryVar);
+ // only consider negative coefficients
+ if (coeff < 0.0)
+ {
+ r = - pexpr->Constant() / coeff;
+ if (r < minRatio)
+ {
+#ifdef CL_TRACE
+ cerr << "New minRatio == " << r << endl;
+#endif
+ minRatio = r;
+ exitVar = v;
+ }
+ }
+ }
+ }
+ // If minRatio is still nil at this point, it means that the
+ // objective function is unbounded, i.e. it can become
+ // arbitrarily negative. This should never happen in this
+ // application.
+ if (minRatio == DBL_MAX)
+ {
+ stringstream ss;
+ ss << "objective function is unbounded!" << ends;
+ throw ExCLInternalError(ss.str().c_str());
+ }
+ Pivot(entryVar, exitVar);
+#ifdef CL_TRACE
+ cerr << "After Optimize:\n"
+ << *this << endl;
+#endif
+ }
+}
+
+// Do a Pivot. Move entryVar into the basis (i.e. make it a basic variable),
+// and move exitVar out of the basis (i.e., make it a parametric variable)
+void
+ClSimplexSolver::Pivot(ClVariable entryVar, ClVariable exitVar)
+{
+#ifdef CL_TRACE
+ Tracer TRACER(__FUNCTION__);
+ cerr << "(" << entryVar << ", " << exitVar << ")" << endl;
+#endif
+
+ // the entryVar might be non-pivotable if we're doing a RemoveConstraint --
+ // otherwise it should be a pivotable variable -- enforced at call sites,
+ // hopefully
+
+ // expr is the Expression for the exit variable (about to leave the basis) --
+ // so that the old tableau includes the equation:
+ // exitVar = expr
+ ClLinearExpression *pexpr = RemoveRow(exitVar);
+
+ // Compute an Expression for the entry variable. Since expr has
+ // been deleted from the tableau we can destructively modify it to
+ // build this Expression.
+ pexpr->ChangeSubject(exitVar,entryVar);
+ SubstituteOut(entryVar,*pexpr);
+
+ if (entryVar.IsExternal())
+ {
+ // entry var is no longer a parametric variable since we're moving
+ // it into the basis
+ _externalParametricVars.erase(entryVar);
+ }
+ addRow(entryVar,*pexpr);
+}
+
+
+
+// Each of the non-required stays will be represented by an equation
+// of the form
+// v = c + eplus - eminus
+// where v is the variable with the stay, c is the previous value of
+// v, and eplus and eminus are slack variables that hold the error
+// in satisfying the stay constraint. We are about to change
+// something, and we want to fix the constants in the equations
+// representing the stays. If both eplus and eminus are nonbasic
+// they have value 0 in the current solution, meaning the previous
+// stay was exactly satisfied. In this case nothing needs to be
+// changed. Otherwise one of them is basic, and the other must
+// occur only in the Expression for that basic error variable.
+// Reset the Constant in this Expression to 0.
+void
+ClSimplexSolver::ResetStayConstants()
+{
+#ifdef CL_TRACE
+ Tracer TRACER(__FUNCTION__);
+ cerr << "()" << endl;
+#endif
+ ClVarVector::const_iterator
+ itStayPlusErrorVars = _stayPlusErrorVars.begin();
+ ClVarVector::const_iterator
+ itStayMinusErrorVars = _stayMinusErrorVars.begin();
+
+ for ( ; itStayPlusErrorVars != _stayPlusErrorVars.end();
+ ++itStayPlusErrorVars, ++itStayMinusErrorVars )
+ {
+ ClLinearExpression *pexpr = RowExpression(*itStayPlusErrorVars);
+ if (pexpr == NULL )
+ {
+ pexpr = RowExpression(*itStayMinusErrorVars);
+ }
+ if (pexpr != NULL)
+ {
+ pexpr->Set_constant(0.0);
+ }
+ }
+}
+
+// Set the external variables known to this solver to their appropriate values.
+// Set each external basic variable to its value, and set each
+// external parametric variable to 0. (It isn't clear that we will
+// ever have external parametric variables -- every external
+// variable should either have a stay on it, or have an equation
+// that defines it in terms of other external variables that do have
+// stays. For the moment I'll put this in though.) Variables that
+// are internal to the solver don't actually store values -- their
+// values are just implicit in the tableu -- so we don't need to set
+// them."
+void
+ClSimplexSolver::SetExternalVariables()
+{
+#ifdef CL_TRACE
+ Tracer TRACER(__FUNCTION__);
+ cerr << "()\n"
+ << *this << endl;
+#endif
+
+ // FIXGJB -- oughta check some invariants here
+
+ // Set external parametric variables first
+ // in case I've screwed up
+ ClVarSet::iterator itParVars = _externalParametricVars.begin();
+ for ( ; itParVars != _externalParametricVars.end(); ++itParVars )
+ {
+ ClVariable v = *itParVars;
+#ifndef NDEBUG
+ // defensively skip it if it is basic -- ChangeValue is virtual
+ // so don't want to call it twice; this should never
+ // happen
+ if (FIsBasicVar(v))
+ {
+#ifndef CL_NO_IO
+ // WARNING
+ cerr << __FUNCTION__ << "Error: variable " << v
+ << " in _externalParametricVars is basic" << endl;
+ cerr << "Row is: " << *RowExpression(v) << endl;
+#endif
+ continue;
+ }
+#endif
+ ChangeClv(v,0.0);
+ }
+
+ // Only iterate over the rows w/ external variables
+ ClVarSet::iterator itRowVars = _externalRows.begin();
+ for ( ; itRowVars != _externalRows.end() ; ++itRowVars )
+ {
+ ClVariable v = *itRowVars;
+ ClLinearExpression *pexpr = RowExpression(v);
+ ChangeClv(v,pexpr->Constant());
+ }
+
+ _fNeedsSolving = false;
+ if (_pfnResolveCallback)
+ _pfnResolveCallback(this);
+}
+
+#ifndef CL_NO_IO
+ostream &
+PrintTo(ostream &xo, const ClVarVector &varlist)
+{
+ ClVarVector::const_iterator it = varlist.begin();
+ xo << varlist.size() << ":" << "[ ";
+ if (it != varlist.end())
+ {
+ xo << *it;
+ ++it;
+ }
+ for (; it != varlist.end(); ++it)
+ {
+ xo << ", " << *it;
+ }
+ xo << " ]";
+ return xo;
+}
+
+ostream &operator<<(ostream &xo, const ClVarVector &varlist)
+{ return PrintTo(xo,varlist); }
+
+
+ostream &
+PrintTo(ostream &xo, const ClConstraintToVarSetMap &mapCnToVarSet)
+{
+ ClConstraintToVarSetMap::const_iterator it = mapCnToVarSet.begin();
+ for ( ; it != mapCnToVarSet.end(); ++it) {
+ const ClConstraint *pcn = (*it).first;
+ const ClVarSet &set = (*it).second;
+ xo << "CN: " << pcn << *pcn << ":: " << set << endl;
+ }
+ return xo;
+}
+
+ostream &operator <<(ostream &xo, const ClConstraintToVarSetMap &mapCnToVarSet)
+{ return PrintTo(xo,mapCnToVarSet); }
+
+
+
+ostream &
+ClSimplexSolver::PrintOn(ostream &xo) const
+{
+ ClTableau::PrintOn(xo);
+
+ xo << "_stayPlusErrorVars: "
+ << _stayPlusErrorVars << endl;
+ xo << "_stayMinusErrorVars: "
+ << _stayMinusErrorVars << endl;
+ xo << "_editInfoList:\n"
+ << _editInfoList << endl;
+ return xo;
+}
+
+
+ostream &
+ClSimplexSolver::PrintInternalInfo(ostream &xo) const
+{
+ ClTableau::PrintInternalInfo(xo);
+ xo << "; edvars: " << _editInfoList.size();
+ xo << endl;
+ printExternalVariablesTo(xo);
+ return xo;
+}
+
+ostream &operator<<(ostream &xo, const ClSimplexSolver &clss)
+{
+ return clss.PrintOn(xo);
+}
+
+#endif
+
+bool
+ClSimplexSolver::FIsConstraintSatisfied(const ClConstraint *const pcn) const
+{
+ ClConstraintToVarMap::const_iterator it_marker = _markerVars.find(pcn);
+ if (it_marker == _markerVars.end())
+ { // could not find the constraint
+ throw ExCLConstraintNotFound();
+ }
+
+#ifndef CL_NO_IO
+ bool fCnsays = pcn->FIsSatisfied();
+#endif
+
+ ClConstraintToVarSetMap::const_iterator it_eVars = _errorVars.find(pcn);
+
+ if (it_eVars != _errorVars.end())
+ {
+ const ClVarSet &eVars = (*it_eVars).second;
+ ClVarSet::const_iterator it = eVars.begin();
+ for ( ; it != eVars.end(); ++it )
+ {
+ const ClLinearExpression *pexpr = RowExpression(*it);
+ if (pexpr != NULL && !ClApprox(pexpr->Constant(),0.0))
+ {
+#ifndef CL_NO_IO
+ if (fCnsays)
+ cerr << __FUNCTION__ << ": constraint says satisfiable, but solver does not" << endl;
+#endif
+ return false;
+ }
+ }
+ }
+
+#ifndef CL_NO_IO
+ if (!fCnsays)
+ cerr << __FUNCTION__ << ": solver says satisfiable, but constraint does not" << endl;
+#endif
+ return true;
+}
+
+
+
+#ifndef CL_NO_ID
+
+ostream &PrintTo(ostream &xo, const ClSimplexSolver::ClEditInfoList &listPEditInfo)
+{
+ ClSimplexSolver::ClEditInfoList::const_iterator it = listPEditInfo.begin();
+ for ( ; it != listPEditInfo.end(); ++it) {
+ const ClSimplexSolver::ClEditInfo *pcei = (*it);
+ xo << *pcei << endl;
+ }
+ return xo;
+}
+
+
+ostream &operator<<(ostream &xo, const ClSimplexSolver::ClEditInfoList &listPEditInfo)
+{ return PrintTo(xo,listPEditInfo); }
+
+#endif
+
+// A. Beurive' Tue Jul 6 17:03:32 CEST 1999
+void
+ClSimplexSolver::ChangeStrengthAndWeight(ClConstraint *pcn, const ClStrength &strength, double weight)
+{
+ ClConstraintToVarSetMap::iterator it_eVars = _errorVars.find(pcn);
+ // Only for constraints that already have error variables (i.e. non-required constraints)
+ assert(it_eVars != _errorVars.end());
+
+ ClLinearExpression *pzRow = RowExpression(_objective);
+
+ Number old_coeff = pcn->weight() * pcn->strength().symbolicWeight().AsDouble();
+ pcn->setStrength(strength);
+ pcn->setWeight(weight);
+ Number new_coeff = pcn->weight() * pcn->strength().symbolicWeight().AsDouble();
+
+ if (new_coeff != old_coeff)
+ {
+#ifdef CL_TRACE
+ cerr << "Changing strength and/or weight for constraint: " << endl << *pcn << endl;
+ cerr << "Updating objective row from:" << endl << *pzRow << endl;
+#endif
+ ClVarSet &eVars = (*it_eVars).second;
+ ClVarSet::iterator it = eVars.begin();
+ for ( ; it != eVars.end(); ++it )
+ {
+ const ClLinearExpression *pexpr = RowExpression(*it);
+ if (pexpr == NULL )
+ {
+ pzRow->AddVariable(*it,-old_coeff,_objective,*this);
+ pzRow->AddVariable(*it,new_coeff,_objective,*this);
+ }
+ else
+ {
+ pzRow->AddExpression(*pexpr,-old_coeff,_objective,*this);
+ pzRow->AddExpression(*pexpr,new_coeff,_objective,*this);
+ }
+ }
+#ifdef CL_TRACE
+ cerr << "to: " << endl << *pzRow << endl;
+#endif
+
+ if (_fAutosolve)
+ {
+ Optimize(_objective);
+ SetExternalVariables();
+ }
+ }
+}
+
+// A. Beurive' Tue Jul 6 17:03:42 CEST 1999
+void
+ClSimplexSolver::ChangeStrength(ClConstraint *pcn, const ClStrength &strength)
+{
+ ChangeStrengthAndWeight(pcn,strength,pcn->weight());
+}
+
+// A. Beurive' Tue Jul 6 17:03:42 CEST 1999
+void
+ClSimplexSolver::ChangeWeight(ClConstraint *pcn, double weight)
+{
+ ChangeStrengthAndWeight(pcn,pcn->strength(),weight);
+}
diff --git a/libs/cassowary/ClSlackVariable.cc b/libs/cassowary/ClSlackVariable.cc
new file mode 100644
index 0000000000..eaf0432eb0
--- /dev/null
+++ b/libs/cassowary/ClSlackVariable.cc
@@ -0,0 +1,12 @@
+// $Id$
+
+#include <cassowary/ClSlackVariable.h>
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#define CONFIG_H_INCLUDED
+#endif
+
+#ifdef CL_FIND_LEAK
+long ClSlackVariable::cSlackVariables = 0;
+#endif
diff --git a/libs/cassowary/ClSolver.cc b/libs/cassowary/ClSolver.cc
new file mode 100644
index 0000000000..18b0b7f9cc
--- /dev/null
+++ b/libs/cassowary/ClSolver.cc
@@ -0,0 +1,59 @@
+// $Id$
+
+using namespace std;
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#define CONFIG_H_INCLUDED
+#endif
+
+#include <cassowary/Cassowary.h>
+#include <cassowary/ClSolver.h>
+#include <cassowary/ClConstraint.h>
+#include <cassowary/ClErrors.h>
+#include <cassowary/ClTypedefs.h>
+
+
+ClSolver &
+ClSolver::AddConstraint(ClConstraint *const )
+{
+ return *this;
+}
+
+
+ostream &
+PrintTo(ostream &xo, const ClConstraintSet &setCn)
+{
+ ClConstraintSet::const_iterator it = setCn.begin();
+ for (; it != setCn.end(); ++it) {
+ const ClConstraint *pcn = *it;
+ xo << *pcn << endl;
+ }
+ return xo;
+}
+
+ostream &
+PrintTo(ostream &xo, const list<FDNumber> &listFDN)
+{
+ list<FDNumber>::const_iterator it = listFDN.begin();
+ for (; it != listFDN.end(); ) {
+ FDNumber n = *it;
+ xo << n;
+ ++it;
+ if (it != listFDN.end())
+ xo << ",";
+ }
+ return xo;
+}
+
+
+ostream &operator<<(ostream &xo, const ClConstraintSet &setCn)
+{ return PrintTo(xo,setCn); }
+
+
+ostream &operator<<(ostream &xo, const ClSolver &solver)
+{ return solver.PrintOn(xo); }
+
+ostream &operator<<(ostream &xo, const list<FDNumber> &listFDN)
+{ return PrintTo(xo,listFDN); }
+
diff --git a/libs/cassowary/ClStrength.cc b/libs/cassowary/ClStrength.cc
new file mode 100644
index 0000000000..0629d4afff
--- /dev/null
+++ b/libs/cassowary/ClStrength.cc
@@ -0,0 +1,52 @@
+// $Id$
+//
+// Cassowary Incremental Constraint Solver
+// Original Smalltalk Implementation by Alan Borning
+// This C++ Implementation by Greg J. Badros, <gjb@cs.washington.edu>
+// http://www.cs.washington.edu/homes/gjb
+// (C) 1998, 1999 Greg J. Badros and Alan Borning
+// See ../LICENSE for legal details regarding this software
+//
+// ClStrength.cc
+
+#include <cassowary/ClStrength.h>
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#define CONFIG_H_INCLUDED
+#endif
+
+// Use the singleton pattern for the strength objects
+const ClStrength &ClsRequired()
+{
+ // required is distinct by equality to this static object,
+ // but I still use an especially high symbolic weight, just in case
+ // FIXGJB: hack?
+ static ClStrength required_strength("<Required>", 1000, 1000, 1000);
+ return required_strength;
+}
+
+const ClStrength &ClsStrong()
+{
+ static ClStrength strong_strength("strong", 1.0, 0.0, 0.0);
+ return strong_strength;
+}
+
+const ClStrength &ClsMedium()
+{
+ static ClStrength medium_strength("medium", 0.0, 1.0, 0.0);
+ return medium_strength;
+}
+
+
+const ClStrength &ClsWeak()
+{
+ static ClStrength weak_strength("weak", 0.0, 0.0, 1.0);
+ return weak_strength;
+}
+
+// special case for when nLevels = 3, should assert nLevels() == 3
+ClStrength::ClStrength(const string &Name, double w1, double w2, double w3) :
+ _name(Name), _symbolicWeight(w1, w2, w3)
+{
+}
diff --git a/libs/cassowary/ClSymbolicWeight.cc b/libs/cassowary/ClSymbolicWeight.cc
new file mode 100644
index 0000000000..9dddaa5949
--- /dev/null
+++ b/libs/cassowary/ClSymbolicWeight.cc
@@ -0,0 +1,149 @@
+// $Id$
+//
+// Cassowary Incremental Constraint Solver
+// Original Smalltalk Implementation by Alan Borning
+// This C++ Implementation by Greg J. Badros, <gjb@cs.washington.edu>
+// http://www.cs.washington.edu/homes/gjb
+// (C) 1998, 1999 Greg J. Badros and Alan Borning
+// See ../LICENSE for legal details regarding this software
+//
+// ClSymbolicWeight.cc
+
+#include <cassowary/Cassowary.h>
+#include <cassowary/ClSymbolicWeight.h>
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#define CONFIG_H_INCLUDED
+#endif
+
+// Help g++ out, tell it to instantiate this
+//template vector<double> &vector<double>::operator =(const vector<double> &);
+
+ClSymbolicWeight::ClSymbolicWeight(unsigned int CLevels, double value) :
+ _values(CLevels, value)
+{
+ assert(_values.size() == CLevels);
+}
+
+ClSymbolicWeight::ClSymbolicWeight(double w1, double w2, double w3)
+{
+ _values.push_back(w1);
+ _values.push_back(w2);
+ _values.push_back(w3);
+ assert(_values.size() == 3);
+}
+
+ClSymbolicWeight::ClSymbolicWeight(const vector<double> &weights) :
+ _values(weights)
+{ }
+
+ClSymbolicWeight &
+ClSymbolicWeight::Zero()
+{
+ static ClSymbolicWeight Zero(0.0, 0.0, 0.0);
+ return Zero;
+}
+
+
+ClSymbolicWeight &
+ClSymbolicWeight::negated()
+{
+ vector<double>::iterator it = _values.begin();
+ for (; it != _values.end(); ++it)
+ {
+ *it = -*it;
+ }
+ return *this;
+}
+
+ClSymbolicWeight &
+ClSymbolicWeight::MultiplyMe(Number n)
+{
+ vector<double>::iterator it = _values.begin();
+ for (; it != _values.end(); ++it)
+ {
+ *it *= n;
+ }
+ return *this;
+}
+
+
+ClSymbolicWeight
+ClSymbolicWeight::DivideBy(Number n) const
+{
+ assert(n!=0);
+ ClSymbolicWeight clsw(0);
+ vector<double>::const_iterator i = _values.begin();
+ for (; i != _values.end(); ++i)
+ {
+ clsw.push_back(*i / n);
+ }
+ return clsw;
+}
+
+ClSymbolicWeight &
+ClSymbolicWeight::addtoMe(const ClSymbolicWeight &cl)
+{
+ assert(cl.CLevels() == CLevels());
+
+ vector<double>::iterator i1 = _values.begin();
+ vector<double>::const_iterator i2 = cl._values.begin();
+ for (; i1 != _values.end(); ++i1, ++i2)
+ {
+ *i1 += *i2;
+ }
+ return *this;
+}
+
+ClSymbolicWeight
+ClSymbolicWeight::Subtract(const ClSymbolicWeight &cl) const
+{
+ assert(cl.CLevels() == CLevels());
+
+ ClSymbolicWeight clsw(0);
+ vector<double>::const_iterator i1 = _values.begin();
+ vector<double>::const_iterator i2 = cl._values.begin();
+ for (; i1 != _values.end(); ++i1, ++i2)
+ {
+ clsw.push_back(*i1 - *i2);
+ }
+ return clsw;
+}
+
+
+bool
+ClSymbolicWeight::lessThan(const ClSymbolicWeight &cl) const
+{
+ return _values < cl._values;
+}
+
+bool
+ClSymbolicWeight::lessThanOrEqual(const ClSymbolicWeight &cl) const
+{
+ return _values <= cl._values;
+}
+
+bool
+ClSymbolicWeight::equal(const ClSymbolicWeight &cl) const
+{
+ return _values == cl._values;
+}
+
+bool
+ClSymbolicWeight::greaterThan(const ClSymbolicWeight &cl) const
+{
+ return _values > cl._values;
+}
+
+bool
+ClSymbolicWeight::greaterThanOrEqual(const ClSymbolicWeight &cl) const
+{
+ return _values >= cl._values;
+}
+
+bool
+ClSymbolicWeight::isNegative() const
+{
+ return _values < Zero()._values;
+}
diff --git a/libs/cassowary/ClTableau.cc b/libs/cassowary/ClTableau.cc
new file mode 100644
index 0000000000..85ac841725
--- /dev/null
+++ b/libs/cassowary/ClTableau.cc
@@ -0,0 +1,297 @@
+// $Id$
+//
+// Cassowary Incremental Constraint Solver
+// Original Smalltalk Implementation by Alan Borning
+// This C++ Implementation by Greg J. Badros, <gjb@cs.washington.edu>
+// http://www.cs.washington.edu/homes/gjb
+// (C) 1998, 1999 Greg J. Badros and Alan Borning
+// See ../LICENSE for legal details regarding this software
+//
+// ClTableau.cc
+
+using namespace std;
+
+#include <cassowary/ClTableau.h>
+#include <cassowary/debug.h>
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#define CONFIG_H_INCLUDED
+#endif
+
+
+// delete the linear expressions
+// let ClSimplexSolver worry about deleting the variables
+ClTableau::~ClTableau()
+{
+ ClTableauRowsMap::iterator it = _rows.begin();
+ for (; it != _rows.end(); ++it)
+ {
+ // free the ClLinearExpression that we new-ed
+#ifdef CL_TRACE
+ cerr << "Deleting row delete@ " << ((*it).second) << endl;
+#endif
+ delete (*it).second;
+ }
+}
+
+#ifndef CL_NO_IO
+// Some extra debugging info
+ostream &
+ClTableau::PrintInternalInfo(ostream &xo) const
+{
+ xo << "ncns:" << _rows.size() -1
+ << "; cols:" << _columns.size()
+ << "; infrows:" << _infeasibleRows.size()
+ << "; ebvars:" << _externalRows.size()
+ << "; epvars:" << _externalParametricVars.size();
+ return xo;
+}
+
+
+ostream &
+ClTableau::printExternalVariablesTo(ostream &xo) const
+{
+ xo << "Parametric: ";
+ ClVarSet::iterator itParVars = _externalParametricVars.begin();
+ for ( ; itParVars != _externalParametricVars.end(); ++itParVars ) {
+ ClVariable v = *itParVars;
+ xo << v << " ";
+ }
+ xo << "\nBasic: ";
+ ClVarSet::iterator itRowVars = _externalRows.begin();
+ for ( ; itRowVars != _externalRows.end() ; ++itRowVars ) {
+ ClVariable v = *itRowVars;
+ xo << v << " ";
+ }
+ return xo << endl;
+}
+
+#endif
+
+
+// Add v, update column cross indices
+// v becomes a basic variable
+// expr is now owned by ClTableau class,
+// and ClTableauis responsible for deleting it
+// (also, expr better be allocated on the heap!)
+void
+ClTableau::addRow(ClVariable var, const ClLinearExpression &expr)
+{
+#ifdef CL_TRACE
+ Tracer TRACER(__FUNCTION__);
+ cerr << "(" << var << ", " << expr << ")" << endl;
+#endif
+ _rows[var] = const_cast<ClLinearExpression *>(&expr);
+ ClVarToNumberMap::const_iterator it = expr.Terms().begin();
+ // for each variable in expr, Add var to the set of rows which have that variable
+ // in their Expression
+ for (; it != expr.Terms().end(); ++it)
+ {
+ ClVariable v = (*it).first;
+ _columns[v].insert(var);
+ if (v.IsExternal() && !FIsBasicVar(v))
+ {
+ _externalParametricVars.insert(v);
+ }
+ }
+ if (var.IsExternal())
+ {
+ _externalRows.insert(var);
+ }
+#ifdef CL_TRACE
+ cerr << *this << endl;
+#endif
+}
+
+// Remove var from the tableau -- remove the column cross indices for var
+// and remove var from every Expression in rows in which v occurs
+// Remove the parametric variable var, updating the appropriate column and row entries.
+// (Renamed from Smalltalk implementation's `removeParametricVar')
+ClVariable
+ClTableau::RemoveColumn(ClVariable var)
+{
+#ifdef CL_TRACE
+ Tracer TRACER(__FUNCTION__);
+ cerr << "(" << var << ")" << endl;
+#endif
+ ClTableauColumnsMap::iterator it_var = _columns.find(var);
+ if (it_var == _columns.end())
+ return var; // nothing to do
+
+ ClVarSet &varset = (*it_var).second;
+ // remove the rows with the variables in varset
+ ClVarSet::iterator it = varset.begin();
+ for (; it != varset.end(); ++it)
+ {
+ ClVariable v = (*it);
+ ClVarToNumberMap &Terms = _rows[v]->Terms();
+ Terms.erase(Terms.find(var));
+ }
+ if (var.IsExternal())
+ {
+ _externalRows.erase(var);
+ _externalParametricVars.erase(var);
+ }
+ _columns.erase(it_var);
+ return var;
+}
+
+// Remove the basic variable v from the tableau row v=expr
+// Then update column cross indices
+ClLinearExpression *
+ClTableau::RemoveRow(ClVariable var)
+{
+#ifdef CL_TRACE
+ Tracer TRACER(__FUNCTION__);
+ cerr << "(" << var << ")" << endl;
+#endif
+ ClTableauRowsMap::iterator it = _rows.find(var);
+ assert(it != _rows.end());
+ ClLinearExpression *pexpr = (*it).second;
+ ClVarToNumberMap &Terms = pexpr->Terms();
+ ClVarToNumberMap::iterator it_term = Terms.begin();
+ for (; it_term != Terms.end(); ++it_term)
+ {
+ ClVariable v = (*it_term).first;
+ _columns[v].erase(var);
+ if (_columns[v].size() == 0)
+ {
+ _columns.erase(v);
+ _externalParametricVars.erase(v);
+ }
+ }
+
+ _infeasibleRows.erase(var);
+
+ if (var.IsExternal())
+ {
+ _externalRows.erase(var);
+ _externalParametricVars.erase(var);
+ }
+
+ _rows.erase(it);
+#ifdef CL_TRACE
+ cerr << "- returning " << *pexpr << endl;
+#endif
+ return pexpr;
+}
+
+// Replace all occurrences of oldVar with expr, and update column cross indices
+// oldVar should now be a basic variable
+// Uses the Columns data structure and calls SubstituteOut on each
+// row that has oldVar in it
+// oldVar is leaving the basis, and becoming parametric
+void
+ClTableau::SubstituteOut(ClVariable oldVar, const ClLinearExpression &expr)
+{
+#ifdef CL_TRACE
+ cerr << "* ClTableau::";
+ Tracer TRACER(__FUNCTION__);
+ cerr << "(" << oldVar << ", " << expr << ")" << endl;
+ cerr << (*this) << endl;
+#endif
+
+ ClTableauColumnsMap::iterator it_oldVar = _columns.find(oldVar);
+ if (it_oldVar == _columns.end())
+ return;
+
+ ClVarSet &varset = (*it_oldVar).second;
+ ClVarSet::iterator it = varset.begin();
+ for (; it != varset.end(); ++it)
+ {
+ ClVariable v = (*it);
+ ClLinearExpression *prow = _rows[v];
+ prow->SubstituteOut(oldVar,expr,v,*this);
+ if (v.IsRestricted() && prow->Constant() < 0.0)
+ {
+ _infeasibleRows.insert(v);
+ }
+ }
+ _columns.erase(it_oldVar);
+ if (oldVar.IsExternal())
+ {
+ if (_columns[oldVar].size() > 0)
+ {
+ _externalRows.insert(oldVar);
+ }
+ _externalParametricVars.erase(oldVar);
+ }
+}
+
+
+#ifndef CL_NO_IO
+
+ostream &
+PrintTo(ostream &xo, const ClVarSet & varset)
+{
+ ClVarSet::const_iterator it = varset.begin();
+ xo << "{ ";
+ if (it != varset.end())
+ {
+ xo << *it;
+ ++it;
+ }
+ for (; it != varset.end(); ++it)
+ {
+ xo << ", " << *it;
+ }
+ xo << " }";
+ return xo;
+}
+
+ostream &operator<<(ostream &xo, const ClVarSet & varset)
+{ return PrintTo(xo,varset); }
+
+ostream &
+PrintTo(ostream &xo, const ClTableauColumnsMap & varmap)
+{
+ ClTableauColumnsMap::const_iterator it = varmap.begin();
+ for (; it != varmap.end(); ++it)
+ {
+ xo << (*it).first << " -> " << (*it).second << endl;
+ }
+ return xo;
+}
+
+ostream &operator<<(ostream &xo, const ClTableauColumnsMap & varmap)
+{ return PrintTo(xo,varmap); }
+
+ostream &
+PrintTo(ostream &xo, const ClTableauRowsMap & rows)
+{
+ ClTableauRowsMap::const_iterator it = rows.begin();
+ for (; it != rows.end(); ++it)
+ {
+ ClVariable v = it->first;
+ const ClLinearExpression *pe = it->second;
+ xo << v << " <-=-> ";
+ if (pe) xo << *pe; else xo << "NilExpr";
+ xo << endl;
+ }
+ return xo;
+}
+
+ostream &operator<<(ostream &xo, const ClTableauRowsMap & rows)
+{ return PrintTo(xo,rows); }
+
+ostream &
+ClTableau::PrintOn(ostream &xo) const
+{
+ xo << "Tableau:\n"
+ << _rows << endl;
+ xo << "Columns:\n"
+ << _columns << endl;
+ xo << "Infeasible rows: "
+ << _infeasibleRows << endl;
+ xo << "External basic variables: "
+ << _externalRows << endl;
+ xo << "External parametric variables: "
+ << _externalParametricVars << endl;
+ return xo;
+}
+
+ostream &operator<<(ostream &xo, const ClTableau &clt)
+{ return clt.PrintOn(xo); }
+
+#endif
diff --git a/libs/cassowary/ClTests.cc b/libs/cassowary/ClTests.cc
new file mode 100644
index 0000000000..606d6f3e44
--- /dev/null
+++ b/libs/cassowary/ClTests.cc
@@ -0,0 +1,884 @@
+// $Id$
+//
+// Cassowary Incremental Constraint Solver
+// Original Smalltalk Implementation by Alan Borning
+// This C++ Implementation by Greg J. Badros, <gjb@cs.washington.edu>
+// http://www.cs.washington.edu/homes/gjb
+// (C) 1998, 1999 Greg J. Badros and Alan Borning
+// See ../LICENSE for legal details regarding this software
+//
+// ClTests.cc
+
+#include <cassowary/Cl.h>
+#include <stdlib.h>
+#include <cassowary/timer.h>
+#include <iostream>
+#include <iomanip>
+
+inline
+double UniformRandom()
+{ return double(rand())/RAND_MAX; }
+
+
+bool
+simple1()
+{
+ try
+ {
+ bool fOkResult = true;
+ ClVariable x(167);
+ ClVariable y(2);
+ ClSimplexSolver solver;
+
+ ClLinearEquation eq(x,y+0.0);
+ solver.AddStay(x);
+ solver.AddStay(y);
+ solver.AddConstraint(eq);
+ cout << "x = " << x.Value() << endl
+ << "y = " << y.Value() << endl;
+ fOkResult = (x.Value() == y.Value());
+ return fOkResult;
+ }
+ catch (ExCLError &error)
+ {
+ cerr << "Exception! " << error.description() << endl;
+ return(false);
+ }
+ catch (...)
+ {
+ cerr << "Unknown exception" << endl;
+ return(false);
+ }
+}
+
+
+/* Add an edit variable to an empty solver */
+bool
+simple2()
+{
+ try
+ {
+ ClVariable x(167);
+ ClSimplexSolver solver;
+
+ solver.AddEditVar(x);
+ solver.BeginEdit();
+ solver.SuggestValue(x,100);
+ solver.EndEdit();
+
+ cout << "x = " << x.Value() << endl;
+ }
+ catch (ExCLEditMisuse &error)
+ {
+ cout << "Success: got the exception" << endl;
+ return true;
+ }
+ catch (ExCLError &error)
+ {
+ cerr << "Exception! " << error.description() << endl;
+ return(false);
+ }
+ catch (...)
+ {
+ cerr << "Unknown exception" << endl;
+ return(false);
+ }
+ cerr << "Should have gotten an exception!" << endl;
+ return false;
+}
+
+
+bool
+justStay1()
+{
+ try
+ {
+ bool fOkResult = true;
+ ClVariable x(5);
+ ClVariable y(10);
+ ClSimplexSolver solver;
+
+#if 0
+ solver.AddPointStay(x,y,1);
+#else
+ solver.AddStay(x);
+ solver.AddStay(y);
+#endif
+ fOkResult = fOkResult && ClApprox(x,5);
+ fOkResult = fOkResult && ClApprox(y,10);
+ cout << "x == " << x.Value() << endl;
+ cout << "y == " << y.Value() << endl;
+
+ return(fOkResult);
+ }
+ catch (ExCLError &error)
+ {
+ cerr << "Exception! " << error.description() << endl;
+ return(false);
+ }
+ catch (...)
+ {
+ cerr << "Unknown exception" << endl;
+ return(false);
+ }
+}
+
+
+
+bool
+addDelete1()
+{
+ try
+ {
+ bool fOkResult = true;
+ ClVariable x("x");
+ ClSimplexSolver solver;
+
+ solver.AddConstraint(new ClLinearEquation( x, 100, ClsWeak() ));
+
+ ClLinearInequality c10(x,cnLEQ,10.0);
+ ClLinearInequality c20(x,cnLEQ,20.0);
+ solver
+ .AddConstraint(c10)
+ .AddConstraint(c20);
+
+ fOkResult = fOkResult && ClApprox(x,10.0);
+ cout << "x == " << x.Value() << endl;
+
+ cout << endl << solver << endl;
+
+ solver.RemoveConstraint(c10);
+
+ cout << endl << solver << endl;
+
+ fOkResult = fOkResult && ClApprox(x,20.0);
+ cout << "x == " << x.Value() << endl;
+
+ solver.RemoveConstraint(c20);
+ fOkResult = fOkResult && ClApprox(x,100.0);
+ cout << "x == " << x.Value() << endl;
+
+ ClLinearInequality c10again(x,cnLEQ,10.0);
+
+ solver
+ .AddConstraint(c10)
+ .AddConstraint(c10again);
+
+ fOkResult = fOkResult && ClApprox(x,10.0);
+ cout << "x == " << x.Value() << endl;
+
+ solver.RemoveConstraint(c10);
+ fOkResult = fOkResult && ClApprox(x,10.0);
+ cout << "x == " << x.Value() << endl;
+
+ solver.RemoveConstraint(c10again);
+ fOkResult = fOkResult && ClApprox(x,100.0);
+ cout << "x == " << x.Value() << endl;
+
+ return(fOkResult);
+ }
+ catch (ExCLError &error)
+ {
+ cerr << "Exception! " << error.description() << endl;
+ return(false);
+ }
+ catch (...)
+ {
+ cerr << "Unknown exception" << endl;
+ return(false);
+ }
+}
+
+bool
+addDelete2()
+{
+ try
+ {
+ bool fOkResult = true;
+ ClVariable x("x");
+ ClVariable y("y");
+ ClSimplexSolver solver;
+
+ solver
+ .AddConstraint(new ClLinearEquation(x, 100.0, ClsWeak()))
+ .AddConstraint(new ClLinearEquation(y, 120.0, ClsStrong()));
+
+ ClLinearInequality c10(x,cnLEQ,10.0);
+ ClLinearInequality c20(x,cnLEQ,20.0);
+
+ solver
+ .AddConstraint(c10)
+ .AddConstraint(c20);
+ fOkResult = fOkResult && ClApprox(x,10.0) && ClApprox(y,120.0);
+ cout << "x == " << x.Value() << ", y == " << y.Value() << endl;
+
+ solver.RemoveConstraint(c10);
+ fOkResult = fOkResult && ClApprox(x,20.0) && ClApprox(y,120.0);
+ cout << "x == " << x.Value() << ", y == " << y.Value() << endl;
+
+ ClLinearEquation cxy( 2*x, y);
+ solver.AddConstraint(cxy);
+ fOkResult = fOkResult && ClApprox(x,20.0) && ClApprox(y,40.0);
+ cout << "x == " << x.Value() << ", y == " << y.Value() << endl;
+
+ solver.RemoveConstraint(c20);
+ fOkResult = fOkResult && ClApprox(x,60.0) && ClApprox(y,120.0);
+ cout << "x == " << x.Value() << ", y == " << y.Value() << endl;
+
+ solver.RemoveConstraint(cxy);
+ fOkResult = fOkResult && ClApprox(x,100.0) && ClApprox(y,120.0);
+ cout << "x == " << x.Value() << ", y == " << y.Value() << endl;
+
+
+ return(fOkResult);
+ }
+ catch (ExCLError &error)
+ {
+ cerr << "Exception! " << error.description() << endl;
+ return(false);
+ }
+ catch (...)
+ {
+ cerr << "Unknown exception" << endl;
+ return(false);
+ }
+}
+
+bool
+casso1()
+{
+ try
+ {
+ bool fOkResult = true;
+ ClVariable x("x");
+ ClVariable y("y");
+ ClSimplexSolver solver;
+
+ solver
+ .AddConstraint(new ClLinearInequality(x,cnLEQ,y))
+ .AddConstraint(new ClLinearEquation(y, x+3.0))
+ .AddConstraint(new ClLinearEquation(x,10.0,ClsWeak()))
+ .AddConstraint(new ClLinearEquation(y,10.0,ClsWeak()))
+ ;
+
+ fOkResult = fOkResult &&
+ ( ClApprox(x,10.0) && ClApprox(y,13.0) ||
+ ClApprox(x,7.0) && ClApprox(y,10.0) );
+
+ cout << "x == " << x.Value() << ", y == " << y.Value() << endl;
+
+ return(fOkResult);
+ }
+ catch (ExCLError &error)
+ {
+ cerr << "Exception! " << error.description() << endl;
+ return(false);
+ }
+ catch (...)
+ {
+ cerr << "Unknown exception" << endl;
+ return(false);
+ }
+}
+
+bool
+inconsistent1()
+{
+ ClSimplexSolver solver;
+ ClVariable x("x");
+ ClLinearEquation eq1(x,10.0);
+ ClLinearEquation eq2(x,5.0);
+ try
+ {
+
+ solver.AddConstraint( eq1 );
+ solver.AddConstraint( eq2 );
+
+ // no exception, we failed!
+ return(false);
+ }
+ catch (ExCLRequiredFailure)
+ {
+ // we want this exception to get thrown
+ cout << "Success -- got the exception" << endl;
+ // solver.RemoveConstraint(eq2); this would throw a constraint not found exception
+ // cout << solver << endl;
+ return(true);
+ }
+ catch (ExCLError &error)
+ {
+ cerr << "Exception! " << error.description() << endl;
+ return(false);
+ }
+ catch (...)
+ {
+ cerr << "Unknown exception" << endl;
+ return(false);
+ }
+}
+
+bool
+inconsistent2()
+{
+ try
+ {
+ ClVariable x("x");
+ ClSimplexSolver solver;
+
+ solver
+ .AddConstraint(new ClLinearInequality(x,cnGEQ,10.0))
+ .AddConstraint(new ClLinearInequality(x,cnLEQ, 5.0));
+
+ // no exception, we failed!
+ return(false);
+ }
+ catch (ExCLRequiredFailure &)
+ {
+ // we want this exception to get thrown
+ cout << "Success -- got the exception" << endl;
+ // cout << solver << endl;
+ return(true);
+ }
+ catch (ExCLError &error)
+ {
+ cerr << "Exception! " << error.description() << endl;
+ return(false);
+ }
+ catch (...)
+ {
+ cerr << "Unknown exception" << endl;
+ return(false);
+ }
+}
+
+bool
+inconsistent3()
+{
+ try
+ {
+ ClVariable w("w");
+ ClVariable x("x");
+ ClVariable y("y");
+ ClVariable z("z");
+ ClSimplexSolver solver;
+
+ solver
+ .AddConstraint(new ClLinearInequality(w,cnGEQ,10.0))
+ .AddConstraint(new ClLinearInequality(x,cnGEQ,w))
+ .AddConstraint(new ClLinearInequality(y,cnGEQ,x))
+ .AddConstraint(new ClLinearInequality(z,cnGEQ,y))
+ .AddConstraint(new ClLinearInequality(z,cnLEQ,4.0));
+
+ // no exception, we failed!
+ return(false);
+ }
+ catch (ExCLRequiredFailure &)
+ {
+ // we want this exception to get thrown
+ cout << "Success -- got the exception" << endl;
+ // cout << solver << endl;
+ return(true);
+ }
+ catch (ExCLError &error)
+ {
+ cerr << "Exception! " << error.description() << endl;
+ return(false);
+ }
+ catch (...)
+ {
+ cerr << "Unknown exception" << endl;
+ return(false);
+ }
+}
+
+
+bool
+multiedit()
+{
+ try
+ {
+ bool fOkResult = true;
+
+ ClVariable x("x",0);
+ ClVariable y("y",0);
+ ClVariable w("w",0);
+ ClVariable h("h",0);
+ ClSimplexSolver solver;
+
+ solver
+ .AddStay(x)
+ .AddStay(y)
+ .AddStay(w)
+ .AddStay(h);
+
+ solver
+ .AddEditVar(x)
+ .AddEditVar(y)
+ .BeginEdit();
+
+ solver
+ .SuggestValue(x,10)
+ .SuggestValue(y,20)
+ .Resolve();
+
+ cout << "x = " << x.Value() << "; y = " << y.Value() << endl
+ << "w = " << w.Value() << "; h = " << h.Value() << endl;
+
+ fOkResult = fOkResult &&
+ ClApprox(x,10) && ClApprox(y,20) && ClApprox(w,0) && ClApprox(h,0);
+
+ solver
+ .AddEditVar(w)
+ .AddEditVar(h)
+ .BeginEdit();
+
+ solver
+ .SuggestValue(w,30)
+ .SuggestValue(h,40)
+ .EndEdit();
+
+ cout << "x = " << x.Value() << "; y = " << y.Value() << endl
+ << "w = " << w.Value() << "; h = " << h.Value() << endl;
+
+ fOkResult = fOkResult &&
+ ClApprox(x,10) && ClApprox(y,20) && ClApprox(w,30) && ClApprox(h,40);
+
+ solver
+ .SuggestValue(x,50)
+ .SuggestValue(y,60)
+ .EndEdit();
+
+ cout << "x = " << x.Value() << "; y = " << y.Value() << endl
+ << "w = " << w.Value() << "; h = " << h.Value() << endl;
+
+ fOkResult = fOkResult &&
+ ClApprox(x,50) && ClApprox(y,60) && ClApprox(w,30) && ClApprox(h,40);
+
+ return fOkResult;
+ }
+ catch (ExCLError &error)
+ {
+ cerr << "Exception! " << error.description() << endl;
+ return(false);
+ }
+ catch (...)
+ {
+ cerr << "Unknown exception" << endl;
+ return(false);
+ }
+ cerr << "Should have gotten an exception!" << endl;
+ return false;
+}
+
+
+bool
+multiedit2()
+{
+ try
+ {
+ bool fOkResult = true;
+
+ ClVariable x("x",0);
+ ClVariable y("y",0);
+ ClVariable w("w",0);
+ ClVariable h("h",0);
+ ClSimplexSolver solver;
+
+ solver
+ .AddStay(x)
+ .AddStay(y)
+ .AddStay(w)
+ .AddStay(h);
+
+ solver
+ .AddEditVar(x)
+ .AddEditVar(y)
+ .BeginEdit();
+
+ solver
+ .SuggestValue(x,10)
+ .SuggestValue(y,20)
+ .Resolve();
+
+ cout << "x = " << x.Value() << "; y = " << y.Value() << endl
+ << "w = " << w.Value() << "; h = " << h.Value() << endl;
+
+ fOkResult = fOkResult &&
+ ClApprox(x,10) && ClApprox(y,20) && ClApprox(w,0) && ClApprox(h,0);
+
+ solver
+ .AddEditVar(x)
+ .AddEditVar(y)
+ .AddEditVar(w)
+ .AddEditVar(h)
+ .BeginEdit();
+
+ solver
+ .SuggestValue(w,30)
+ .SuggestValue(h,40)
+ .EndEdit();
+
+ cout << "x = " << x.Value() << "; y = " << y.Value() << endl
+ << "w = " << w.Value() << "; h = " << h.Value() << endl;
+
+ fOkResult = fOkResult &&
+ ClApprox(x,10) && ClApprox(y,20) && ClApprox(w,30) && ClApprox(h,40);
+
+ solver
+ .SuggestValue(x,50)
+ .SuggestValue(y,60)
+ .EndEdit();
+
+ cout << "x = " << x.Value() << "; y = " << y.Value() << endl
+ << "w = " << w.Value() << "; h = " << h.Value() << endl;
+
+ fOkResult = fOkResult &&
+ ClApprox(x,50) && ClApprox(y,60) && ClApprox(w,30) && ClApprox(h,40);
+
+ return fOkResult;
+ }
+ catch (ExCLError &error)
+ {
+ cerr << "Exception! " << error.description() << endl;
+ return(false);
+ }
+ catch (...)
+ {
+ cerr << "Unknown exception" << endl;
+ return(false);
+ }
+ cerr << "Should have gotten an exception!" << endl;
+ return false;
+}
+
+
+// From a bug report from Steve Wolfman on his
+// SAT project using "blackbox"
+bool
+blackboxsat()
+{
+ try
+ {
+ ClSimplexSolver solver;
+
+ ClVariable r1("r1");
+ ClVariable r2("r2");
+ ClVariable r3("r3");
+ ClVariable r4("r4");
+ ClVariable r5("r5");
+ ClVariable r6("r6");
+ ClVariable r7("r7");
+ ClVariable r8("r8");
+
+ ClConstraint *rgpcn[30];
+ for (int i=0; i<int(sizeof(rgpcn)/sizeof(rgpcn[0])); ++i)
+ rgpcn[i] = NULL;
+
+ rgpcn[1] = new ClLinearEquation(r1,60);
+ rgpcn[2] = new ClLinearEquation(r2,30);
+ rgpcn[12] = new ClLinearEquation(r3,2.5);
+ rgpcn[13] = new ClLinearEquation(r6,0);
+ rgpcn[14] = new ClLinearInequality(r5, cnGEQ, 0);
+ rgpcn[15] = new ClLinearInequality(r8, cnLEQ, 2.5);
+ rgpcn[16] = new ClLinearInequality(r7, cnGEQ, r6);
+ rgpcn[17] = new ClLinearInequality(r8, cnGEQ, r7);
+ rgpcn[18] = new ClLinearEquation(r4, r3 - r2/60.0);
+ rgpcn[19] = new ClLinearEquation(r5, r4 - r1/60.0);
+ rgpcn[20] = new ClLinearInequality(r4, cnGEQ, 0);
+ rgpcn[21] = new ClLinearInequality(r5, cnGEQ, 0);
+ rgpcn[22] = new ClLinearEquation(r7, r6 + r2/20.0);
+ rgpcn[23] = new ClLinearEquation(r8, r7 + r1/20.0);
+ rgpcn[24] = new ClLinearEquation(r4, r3 - r2/30.0);
+ rgpcn[25] = new ClLinearEquation(r5, r4 - r1/30.0);
+ rgpcn[26] = new ClLinearInequality(r4, cnGEQ, 0);
+ rgpcn[27] = new ClLinearInequality(r5, cnGEQ, 0);
+ rgpcn[28] = new ClLinearEquation(r7, r6 + r2/60.0);
+ rgpcn[29] = new ClLinearEquation(r8, r7 + r1/60.0);
+
+ while (true)
+ {
+ char szCmd[1000];
+ int i;
+ cin >> szCmd;
+ if (!cin)
+ break;
+ if (szCmd[0] == '#')
+ {
+ cin.getline(szCmd,900);
+ continue;
+ }
+ if (strcasecmp(szCmd,"Add") == 0)
+ {
+ cin >> i;
+ cout << "eq" << i << ": " << solver.AddConstraintNoException(rgpcn[i])
+ << "\t" << *(rgpcn[i]) << endl;
+ cout << r1 << " = " << r1.Value() << endl;
+ }
+ else if (strcasecmp(szCmd,"del") == 0)
+ {
+ cin >> i;
+ cout << "REMeq" << i << ": " << solver.RemoveConstraintNoException(rgpcn[i])
+ << "\t" << *(rgpcn[i]) << endl;
+ cout << r1 << " = " << r1.Value() << endl;
+ }
+ else if (strcasecmp(szCmd,"dump") == 0)
+ {
+ cout << solver << endl;
+ }
+ else if (strcasecmp(szCmd,"val") == 0)
+ {
+ cout << r1 << " = " << r1.Value() << endl;
+ }
+ else if (strcasecmp(szCmd,"solve") == 0)
+ {
+ cout << solver.Solve() << endl;
+ }
+ else if (strcasecmp(szCmd,"autosolve") == 0)
+ {
+ solver.SetAutosolve(true);
+ }
+ else if (strcasecmp(szCmd,"noautosolve") == 0)
+ {
+ solver.SetAutosolve(true);
+ }
+ }
+
+ cout << r1 << " = " << r1.Value() << endl
+ << r2 << " = " << r2.Value() << endl
+ << r3 << " = " << r3.Value() << endl
+ << r4 << " = " << r4.Value() << endl
+ << r5 << " = " << r5.Value() << endl
+ << r6 << " = " << r6.Value() << endl
+ << r7 << " = " << r7.Value() << endl
+ << r8 << " = " << r8.Value() << endl;
+
+ return false;
+ }
+ catch (ExCLError &error)
+ {
+ cerr << "Exception! " << error.description() << endl;
+ return(true);
+ }
+ catch (...)
+ {
+ cerr << "Unknown exception" << endl;
+ return(false);
+ }
+}
+
+typedef ClVariable *PClVariable;
+
+bool
+addDel(const int nCns = 900, const int nVars = 900, const int nResolves = 10000)
+//addDel(int nCns = 300, int nVars = 300, int nResolves = 1000)
+//addDel(int nCns = 30, int nVars = 30, int nResolves = 100)
+{
+ Timer timer;
+ // FIXGJB: from where did .12 come?
+ static const double ineqProb = 0.12;
+ static const int maxVars = 3;
+
+ cout << "starting timing test. nCns = " << nCns
+ << ", nVars = " << nVars << ", nResolves = " << nResolves << endl;
+
+ timer.Start();
+ ClSimplexSolver solver;
+ solver.SetAutosolve(false);
+
+ ClVariable **rgpclv = new PClVariable[nVars];
+ for (int i = 0; i < nVars; i++)
+ {
+ rgpclv[i] = new ClVariable(i,"x");
+ solver.AddStay(*rgpclv[i]);
+ }
+
+ ClConstraint **rgpcns = new PClConstraint[nCns];
+ int nvs = 0;
+ int k;
+ int j;
+ double coeff;
+ for (j = 0; j < nCns; j++)
+ {
+ // number of variables in this constraint
+ nvs = int(UniformRandom()*maxVars) + 1;
+ ClLinearExpression expr = UniformRandom()*20.0 - 10.0;
+ for (k = 0; k < nvs; k++)
+ {
+ coeff = UniformRandom()*10 - 5;
+ expr.AddExpression(*(rgpclv[int(UniformRandom()*nVars)]) * coeff);
+ }
+ if (UniformRandom() < ineqProb)
+ {
+ rgpcns[j] = new ClLinearInequality(expr);
+ }
+ else
+ {
+ rgpcns[j] = new ClLinearEquation(expr);
+ }
+#ifdef CL_SHOW_CNS_IN_BENCHMARK
+ cout << "Cn[" << j << "]: " << *rgpcns[j] << endl;
+#endif
+ }
+
+ cout << "done building data structures" << endl;
+ cout << "time = " << timer.ElapsedTime() << "\n" << endl;
+ timer.Start();
+ int cExceptions = 0;
+#ifdef CL_SHOW_CNS_IN_BENCHMARK
+ cout << "Exceptions on: ";
+#endif
+ for (j = 0; j < nCns; j++)
+ {
+ // Add the constraint -- if it's incompatible, just ignore it
+ try
+ {
+ solver.AddConstraint(rgpcns[j]);
+ }
+ catch (ExCLRequiredFailure &)
+ {
+ cExceptions++;
+ rgpcns[j] = NULL;
+#ifdef CL_SHOW_CNS_IN_BENCHMARK
+ cout << j << " ";
+#endif
+ }
+ }
+#ifdef CL_SHOW_CNS_IN_BENCHMARK
+ cout << "\n" << endl;
+#endif
+ solver.Solve();
+ cout << "done adding constraints [" << cExceptions << " exceptions]" << endl;
+ cout << "time = " << timer.ElapsedTime() << "\n" << endl;
+ cout << "time per cn = " << timer.ElapsedTime()/nCns << "\n" << endl;
+ cout << "time per actual cn = " << timer.ElapsedTime()/(nCns - cExceptions) << "\n" <<endl;
+ timer.Start();
+
+ int e1Index = int(UniformRandom()*nVars);
+ int e2Index = int(UniformRandom()*nVars);
+
+ ClVariable e1 = *(rgpclv[e1Index]);
+ ClVariable e2 = *(rgpclv[e2Index]);
+
+ solver
+ .AddEditVar(e1)
+ .AddEditVar(e2);
+
+ cout << "done creating edit constraints -- about to start resolves" << endl;
+ cout << "time = " << timer.ElapsedTime() << "\n" << endl;
+ timer.Start();
+
+ solver.BeginEdit();
+ // FIXGJB start = Timer.now();
+ for (int m = 0; m < nResolves; ++m)
+ {
+ solver
+ .SuggestValue(e1,e1->Value()*1.001)
+ .SuggestValue(e2,e2->Value()*1.001)
+ .Resolve();
+ }
+ solver.EndEdit();
+ // cout << "run time: " <<
+
+ cout << "done resolves -- now removing constraints" << endl;
+ cout << "time = " << timer.ElapsedTime() << "\n" <<endl;
+ cout << "time per Resolve = " << timer.ElapsedTime()/nResolves << "\n" <<endl;
+
+ timer.Start();
+
+ for (j = 0; j < nCns; j++)
+ {
+ if (rgpcns[j])
+ {
+ solver.RemoveConstraint(rgpcns[j]);
+ }
+ }
+
+ // FIXGJB end = Timer.now();
+ // cout << "Total remove time: "
+ // << "remove time per cn"
+ cout << "done removing constraints and addDel timing test" << endl;
+ cout << "time = " << timer.ElapsedTime() << "\n" <<endl;
+ cout << "time per cn = " << timer.ElapsedTime()/nCns << "\n" <<endl;
+ cout << "time per actual cn = " << timer.ElapsedTime()/(nCns - cExceptions) << "\n" <<endl;
+
+ for (int i = 0; i < nVars; i++)
+ {
+ delete rgpclv[i];
+ }
+
+ for (int j = 0; j < nCns; j++)
+ {
+ delete rgpcns[j];
+ }
+
+ return true;
+}
+
+
+int
+main( int argc, char **argv )
+{
+ try
+ {
+ bool fAllOkResult = true;
+ bool fResult;
+
+ // seed the random number generator for reproducible results
+ srand(123456789);
+
+ cout << "Cassowary version: " << szCassowaryVersion << endl;
+
+#define RUN_TEST(x) \
+ cout << #x << ":" << endl; \
+ fResult = x(); fAllOkResult &= fResult; \
+ if (!fResult) cout << "Failed!" << endl;
+
+ RUN_TEST(simple1);
+ RUN_TEST(simple2);
+ RUN_TEST(justStay1);
+ RUN_TEST(addDelete1);
+ RUN_TEST(addDelete2);
+ RUN_TEST(casso1);
+ RUN_TEST(inconsistent1);
+ RUN_TEST(inconsistent2);
+ RUN_TEST(inconsistent3);
+ RUN_TEST(multiedit);
+ RUN_TEST(multiedit2);
+ // RUN_TEST(blackboxsat);
+
+ int cns = 90, vars = 90, resolves = 100;
+
+ if (argc > 1)
+ cns = atoi(argv[1]);
+
+ if (argc > 2)
+ vars = atoi(argv[2]);
+
+ if (argc > 3)
+ resolves = atoi(argv[3]);
+
+ if (cns > 0)
+ {
+ cout << "addDel" << ":" << endl;
+ fResult = addDel(cns,vars,resolves); fAllOkResult &= fResult;
+ if (!fResult) cout << "Failed!" << endl;
+ }
+
+#undef RUN_TEST
+
+#ifdef CL_FIND_LEAK
+ cout << "ClAbstractVariables: " << ClAbstractVariable::cAbstractVariables
+ << "\nClDummyVariables: " << ClDummyVariable::cDummyVariables
+ << "\nClSlackVariables: " << ClSlackVariable::cSlackVariables
+ << endl;
+#endif
+
+
+ return (fAllOkResult? 0 : 255);
+
+ }
+ catch (...)
+ {
+ cerr << "exception!" << endl;
+ }
+}
diff --git a/libs/cassowary/ClVariable.cc b/libs/cassowary/ClVariable.cc
new file mode 100644
index 0000000000..2a136c1096
--- /dev/null
+++ b/libs/cassowary/ClVariable.cc
@@ -0,0 +1,21 @@
+// $Id$
+//
+// Cassowary Incremental Constraint Solver
+// Original Smalltalk Implementation by Alan Borning
+// This C++ Implementation by Greg J. Badros, <gjb@cs.washington.edu>
+// http://www.cs.washington.edu/homes/gjb
+// (C) 1998, 1999 Greg J. Badros and Alan Borning
+// See ../LICENSE for legal details regarding this software
+//
+// ClVariable.cc
+
+#include <cassowary/ClVariable.h>
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#define CONFIG_H_INCLUDED
+#endif
+
+StringToVarMap *ClVariable::pmapStrPclv = NULL;
+ClVariable clvNil(static_cast<ClAbstractVariable*>(0));
+
diff --git a/libs/cassowary/IMPORTANT b/libs/cassowary/IMPORTANT
new file mode 100644
index 0000000000..1edaabfa01
--- /dev/null
+++ b/libs/cassowary/IMPORTANT
@@ -0,0 +1,26 @@
+Cassowary/C++ needs to be compiled using a modern C++ compiler.
+At one time or another, it has compiled using:
+ o egcs-1.0.1, egcs-1.0.3, egcs-1.1b, gcc-2.8.1, gcc-2.95.2
+ o Visual C++ 5.0
+
+Cassowary/Java was developed using Sun's JDK-1.1.3, ported to Linux
+More recent versions should work fine, and it has been tested
+with JDK-1.2pre2.
+
+The included Makefiles depend upon features of GNU Make. See:
+
+ftp://ftp.gnu.org/pub/gnu/
+
+for a version that you can build.
+
+
+To build the c++/qdemos/QuadDemo application, you'll need TrollTech's Qt
+widget set for X11, available from:
+
+http://www.troll.no/dl/qtfree-dl.html
+
+
+See also the Scwm (Scheme Constraints Window Manager) web page for a use
+of Cassowary in a substantial application:
+
+http://scwm.mit.edu/scwm/
diff --git a/libs/cassowary/INSTALL b/libs/cassowary/INSTALL
new file mode 100644
index 0000000000..b42a17ac46
--- /dev/null
+++ b/libs/cassowary/INSTALL
@@ -0,0 +1,182 @@
+Basic Installation
+==================
+
+ These are generic installation instructions.
+
+ The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation. It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions. Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, a file
+`config.cache' that saves the results of its tests to speed up
+reconfiguring, and a file `config.log' containing compiler output
+(useful mainly for debugging `configure').
+
+ If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release. If at some point `config.cache'
+contains results you don't want to keep, you may remove or edit it.
+
+ The file `configure.in' is used to create `configure' by a program
+called `autoconf'. You only need `configure.in' if you want to change
+it or regenerate `configure' using a newer version of `autoconf'.
+
+The simplest way to compile this package is:
+
+ 1. `cd' to the directory containing the package's source code and type
+ `./configure' to configure the package for your system. If you're
+ using `csh' on an old version of System V, you might need to type
+ `sh ./configure' instead to prevent `csh' from trying to execute
+ `configure' itself.
+
+ Running `configure' takes awhile. While running, it prints some
+ messages telling which features it is checking for.
+
+ 2. Type `make' to compile the package.
+
+ 3. Optionally, type `make check' to run any self-tests that come with
+ the package.
+
+ 4. Type `make install' to install the programs and any data files and
+ documentation.
+
+ 5. You can remove the program binaries and object files from the
+ source code directory by typing `make clean'. To also remove the
+ files that `configure' created (so you can compile the package for
+ a different kind of computer), type `make distclean'. There is
+ also a `make maintainer-clean' target, but that is intended mainly
+ for the package's developers. If you use it, you may have to get
+ all sorts of other programs in order to regenerate files that came
+ with the distribution.
+
+Compilers and Options
+=====================
+
+ Some systems require unusual options for compilation or linking that
+the `configure' script does not know about. You can give `configure'
+initial values for variables by setting them in the environment. Using
+a Bourne-compatible shell, you can do that on the command line like
+this:
+ CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
+
+Or on systems that have the `env' program, you can do it like this:
+ env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
+
+Compiling For Multiple Architectures
+====================================
+
+ You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory. To do this, you must use a version of `make' that
+supports the `VPATH' variable, such as GNU `make'. `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script. `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+ If you have to use a `make' that does not supports the `VPATH'
+variable, you have to compile the package for one architecture at a time
+in the source code directory. After you have installed the package for
+one architecture, use `make distclean' before reconfiguring for another
+architecture.
+
+Installation Names
+==================
+
+ By default, `make install' will install the package's files in
+`/usr/local/bin', `/usr/local/man', etc. You can specify an
+installation prefix other than `/usr/local' by giving `configure' the
+option `--prefix=PATH'.
+
+ You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files. If you
+give `configure' the option `--exec-prefix=PATH', the package will use
+PATH as the prefix for installing programs and libraries.
+Documentation and other data files will still use the regular prefix.
+
+ In addition, if you use an unusual directory layout you can give
+options like `--bindir=PATH' to specify different values for particular
+kinds of files. Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.
+
+ If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+ Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System). The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+ For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Specifying the System Type
+==========================
+
+ There may be some features `configure' can not figure out
+automatically, but needs to determine by the type of host the package
+will run on. Usually `configure' can figure that out, but if it prints
+a message saying it can not guess the host type, give it the
+`--host=TYPE' option. TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name with three fields:
+ CPU-COMPANY-SYSTEM
+
+See the file `config.sub' for the possible values of each field. If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the host type.
+
+ If you are building compiler tools for cross-compiling, you can also
+use the `--target=TYPE' option to select the type of system they will
+produce code for and the `--build=TYPE' option to select the type of
+system on which you are compiling the package.
+
+Sharing Defaults
+================
+
+ If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists. Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Operation Controls
+==================
+
+ `configure' recognizes the following options to control how it
+operates.
+
+`--cache-file=FILE'
+ Use and save the results of the tests in FILE instead of
+ `./config.cache'. Set FILE to `/dev/null' to disable caching, for
+ debugging `configure'.
+
+`--help'
+ Print a summary of the options to `configure', and exit.
+
+`--quiet'
+`--silent'
+`-q'
+ Do not print messages saying which checks are being made. To
+ suppress all normal output, redirect it to `/dev/null' (any error
+ messages will still be shown).
+
+`--srcdir=DIR'
+ Look for the package's source code in directory DIR. Usually
+ `configure' can determine that directory automatically.
+
+`--version'
+ Print the version of Autoconf used to generate the `configure'
+ script, and exit.
+
+`configure' also accepts some other, not widely useful, options.
diff --git a/libs/cassowary/LICENSE b/libs/cassowary/LICENSE
new file mode 100644
index 0000000000..21ecedf70d
--- /dev/null
+++ b/libs/cassowary/LICENSE
@@ -0,0 +1,18 @@
+Cassowary Constraint Solving Toolkit
+Copyright (C) 1998-200 Greg J. Badros
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+See COPYING.LGPL
diff --git a/libs/cassowary/Makefile.am b/libs/cassowary/Makefile.am
new file mode 100644
index 0000000000..fb36aef47c
--- /dev/null
+++ b/libs/cassowary/Makefile.am
@@ -0,0 +1,32 @@
+MAINTAINERCLEANFILES = autom4te.cache Makefile.in aclocal.m4 configure \
+ config.h.in stamp-h.in config.guess mkinstalldirs \
+ missing install-sh config.sub ltconfig \
+ ltmain.sh acinclude.m4 config.log config.status \
+ depcomp ClReader.cc ClReader.hh ClReader-lex.cc
+
+EXTRA_DIST = ClReader.l ClReader.y
+
+SUBDIRS = cassowary
+
+noinst_LIBRARIES = libcassowary.a
+
+libcassowary_a_SOURCES = \
+ ClAbstractVariable.cc \
+ ClConstraint.cc \
+ ClLinearExpression.cc \
+ ClSolver.cc \
+ ClSimplexSolver.cc \
+ ClStrength.cc \
+ ClSymbolicWeight.cc \
+ ClTableau.cc \
+ ClVariable.cc \
+ ClFloatVariable.cc \
+ ClSlackVariable.cc \
+ ClDummyVariable.cc \
+ ClReader-lex.cc
+
+ClReader-lex.cc: ClReader.l cassowary/ClReader.h ClReader.cc
+ $(LEX) -Pcl -o$@ $<
+
+ClReader.cc: ClReader.y cassowary/ClReader.h
+ $(YACC) -d -pcl --output-file $@ $<
diff --git a/libs/cassowary/NEWS b/libs/cassowary/NEWS
new file mode 100644
index 0000000000..0f950dacef
--- /dev/null
+++ b/libs/cassowary/NEWS
@@ -0,0 +1,229 @@
+Cassowary NEWS -- history of user-visible changes. -*- text -*-
+
+Cassowary Constraint Solving Toolkit was
+Implemented by:
+
+Greg J. Badros <gjb@cs.washington.edu> and
+Alan Borning <borning@cs.washington.edu>
+University of Washington
+Computer Science and Engineering
+Seattle, WA 98195-2350
+
+with Constraint Drawing Applet (CDA) by Michael Noth <noth@cs.washington.edu>
+
+12-March-2000: Version 0.60 released.
+* Changed license to LGPL!!!
+* Added SetAutoResetStayConstants(), FIsAutoResetStayConstants(), make ResetStayConstants() public
+
+29-Jan-2000: Version 0.55 released.
+* Some bug fixes
+* Added ClSimplexSolver::{ChangeStrength,ChangeStrengthAndWeight,ChangeWeight,
+ DisplayObjective,ExternalResetStayConstants} fns
+ From A. Beurivé.
+
+16-Dec-1999: Version 0.54a released.
+* Include correct version of OTI Smalltalk .dat file
+ (the source in the *.app files was right, the .dat file was old)
+* Fix java build bug
+
+15-Dec-1999: Version 0.54 released.
+* Bug fixes
+* auto-configuration improvements
+* Support Java 2 (jdk-1.2)
+* Improved ease of building Java demos
+* Build guile wrapper as long as guile-config works, use new --disable-guile-build to force off
+* Alpha-version of Java constraint parser contributed by Will Portnoy
+
+24-October-1999: Version 0.53 released.
+* Bug fixes
+* License exception for linking with Scwm.
+
+25-September-1999: Version 0.52 released.
+* Bug fix for nested edits where a later edit includes an already-being-edited variable
+
+14-September-1999: Version 0.51 released.
+* Minor bug fixes
+* Much better packaging, RPMs, etc. more forced reliance on GTL
+
+26-August-1999: Version 0.51 pre-releases begin
+
+12-July-1999: Version 0.50 released.
+* Made only C++ version build by default, --enable-java-build is needed to turn java on
+* Added restricted finite domain solver
+** needs --with-gtl configure option, and libGTL.{a,so*} to be installed
+* Added ClSolver base class, and use its type for pointers in callbacks
+
+14-Apr-1999: Version 0.43 released.
+* DEBUG_PARSE turned off by default
+* Added cassowary.spec for RPM building
+
+31-Mar-1999: Version 0.42 released.
+* Fixed autoconf bugs (.41 was a buggy release)
+* Added --disable-cpp-build,--disable-java-build, and disable Python/Guile builds
+automatically if directories cannot be found
+
+20-Mar-1999: Version 0.41 released.
+* Fixed bug in autoconf support -- config.sub, config.guess to the
+distribution so configure should actually work (they were symlinks
+before, in error).
+
+18-Mar-1999: Version 0.4 released.
+
+18-Mar-1999: Changes since Cassowary v0.32 (for release v0.4)
+* MUCH improved autoconf/automake support including numerous configure
+options, added libtool support.
+* Renamed many identifiers in the public API; this will break old code
+using Cassowary. See the scripts/convert-ids script for help converting
+your code (beware false positives; i.e., improper or unnecessary
+changes).
+
+
+10-Mar-1999: Changes since Cassowary v0.31 (for release v0.32)
+* Added automake/autoconf support. Old Makefiles are now
+Makefile.linux. This is not yet fully tested or correct, but I need to
+make a release now for the bug fixes. Consider compiling with "make -f
+Makefile.linux all" if you have problems running autoconf and/or
+automake.
+
+* Changes to C++
+** Bug fix for problem Anthony Beurivé noticed regarding removing non-1
+weight stay constraints.
+** Minor bug fix for parser. Also renamed the creader files to ClReader.
+
+* Changes to Java
+** Bug fix for problem Emmanuel Pietriga reported regarding edit
+constraints.
+** Improved debugging support a bit by adding descriptions to
+ExCLInternalError-s and assert()s
+
+* Changes to guile wrapper
+** changed name of library to libcassowaryguile.a from libconstraints.a
+
+
+1-Mar-1999: Changes since Cassowary v0.3 (for release v0.31)
+* Changes to C++
+** Some bug fixes -- pass ClVariable-s around by value instead of const
+& since they are now a handle class.
+** Changed output format for ClEditConstraint, ClStayConstraint instances
+** Use a function-object for controlling lookup/creation of variables in PcnParseConstraint
+** Fix bugs in creader.y parser (did not accept parens or division
+before). Introduced "==" as a a synonym for "="
+** Added szCassowaryVersion id string as a public char *.
+** Added ChangeStrength, ChangeWeight to ClConstraint's public
+interface, and have it valid only when the constraint is not in a solver
+** Added ClConstraint::FIsInSolver()
+
+* Changes to Guile wrapper
+** Fix bugs
+** Wrap parsing functionality, including a lambda for lookup/creation of
+variables
+** Build a dynamically-loadable guile module, update cltests.scm to use it
+
+
+23-Feb-1999: Version 0.3 released.
+
+19-Feb-1999, Changes since Cassowary v0.23 (for release v0.3)
+
+* Changes to Java and C++
+** Bug fix for Michael Kaufmann's report (see ChangeLog for details)
+** resolve(Vector..) procedure is now depracated; preferred interface is
+suggestValue(...) calls followed by resolve() (the one taking no
+arguments).
+** Added ClVariable::SetVarMap(..), ClVariable::VarMap() to permit
+ClVariable ctr to save the mapping between given name and actual object
+in a symbol table (used for parsing ascii expressions in C++ version)
+
+* Changes to just C++ implementation
+** Use ClVariable as a handle class to a ClAbstractVariable-- old
+ClVariable is now a ClFloatVariable. SetChangeClvCallback now takes a
+function that takes a ClVariable handle, not a pointer.
+** Passing ClConstraints's by const & is now deprecated -- pass by
+pointer to the ClConstraint object
+** Added creader.y, creader.l and function PcnParseConstraint(..) for
+creating a constraint from an ASCII string.
+** Added CL_NO_IO compile-time option to C++ version for preventing need
+to link with the stream library (is not complete)
+** Added CL_FIND_LEAK compile-time option for counting ctrs/dtr
+invocations
+** Added CL_USE_HASH_MAP compile-time option to permit using the GNU
+hash_map class instead of the standard STL map (which is a sorted
+associative container whose performance for lookups is logarithmic
+rather than constant time). Still does not work for me --02/16/99 gjb.
+
+* Changes to just Java implementation (updated to match changes to C++
+version for .2)
+** Added {get,set}AttachedObject for ClVariable, ClConstant
+** Permit access to ClSimplexSolver.ConstraintMap()
+** Permit nested beginEdit()s and handle them correctly
+
+* Miscellaneous changes
+** Updated copyright to include 1999
+** Fixed wrappers/Makefile for building Python wrapper
+** Reference Anthony Beurivé's STk wrapper
+** Fix Scwm URL
+
+
+30-Jan-1999, Changes since Cassowary v0.22 (for release v0.23)
+* Bug fix (see ChangeLog for details)
+
+
+23-Jan-1999, Changes since Cassowary v0.21 (for release v0.22)
+* Minor code cleanup, additions of comments.
+
+
+14-Sep-98, Changes since Cassowary v0.2 (for release v0.21)
+
+* Make compile cleanly using egcs-1.1b -- use typename, and drop
+ unused templated instantiation
+
+* Improved guile interface: add a void pointer to the solver objects,
+ and let the guile wrapper use it to keep a pointer to the scheme-level
+ object; also added clv-attach! and clv-attached-object for attaching
+ an object to a cl-variable (somewhat redundant with guile's
+ object properties)
+
+* Wrap ClStayConstraints so they can be managed explicitly
+
+* cl-add-stay, cl-add-editvar now take strength and factor arguments,
+ instead of a list of cl-vars
+
+* Added weight option to addEditVar
+
+
+6-Aug-98, Changes since Cassowary v0.1 (for release v0.2):
+
+* Changes to the distribution for release v0.2
+
+** added guile/scheme wrapper of C++ version
+
+** mention SCWM in README
+
+** mention non-maintenance of Smalltalk implementation unless we have users
+
+* Changes to the C++ and Java implementations
+
+** Fixed several bugs -- dummy variables were wrongly being pivoted into
+ the basis, and constraints that threw required failure exceptions
+ were mistakenly remaining in the tableau (now trying to remove an
+ exception that was not added because of a required-failure exception
+ will correctly throw a ConstraintNotFound exception); more -- see ChangeLog
+
+** Added a virtual change_value function to permit applications to watch
+ for changes made to external variables.
+
+* Changes to only the C++ version (Java version will catch up in 0.3)
+
+** Added new test cases to ClTests, fixed bugs in ClTestColumns
+
+** Added _pv (void *) field hanging off of ClConstraint and ClVariable
+ for associating arbitrary structs with those (needed by SCWM)
+
+** Permit nested beginEdit()s, and do the right thing upon calling
+ endEdit() -- i.e., not all the edit variables are removed, only the
+ nested ones
+
+** Permit access to ClSimplexSolver::ConstraintMap() (used by
+ guile-wrapper to efficiently get at a list of constraints in the
+ solver)
+
+** Added ExCLEditMisuse exception
diff --git a/libs/cassowary/README b/libs/cassowary/README
new file mode 100644
index 0000000000..16ed492b8e
--- /dev/null
+++ b/libs/cassowary/README
@@ -0,0 +1,241 @@
+Cassowary Constraint Solving Toolkit for C++, Java, and Smalltalk
+Version 0.60
+
+Web Page: http://www.cs.washington.edu/research/constraints/cassowary
+Contact: cassowary@cs.washington.edu
+
+Greg J. Badros <gjb@cs.washington.edu> and
+Alan Borning <borning@cs.washington.edu>
+University of Washington
+Computer Science and Engineering
+Seattle, WA 98195-2350
+12-March-2000
+
+with Constraint Drawing Applet (CDA) by Michael Noth <noth@cs.washington.edu>
+
+See ANNOUNCE for a brief description and announcement of this distribution.
+See NEWS for a history of user-visible changes.
+See ChangeLog for a detailed listing of the changes to each source file.
+See LICENSE for legalese regarding use of this distribution.
+
+The Smalltalk implementation is in the public domain -- see smalltalk/README.
+
+Please send bug reports to cassowary@cs.washington.edu
+
+Also, send mail to cassowary@cs.washington.edu if you would like to be
+informed about bug fixes, feature enhancements, etc. Let us know what
+implementation(s) you are using, too.
+
+------------------------------------------------------------------
+
+HOW TO GET STARTED
+
+The Cassowary library uses GNU autoconf to permit easy building on
+various platforms. You should be able to do:
+
+./configure
+make
+
+and everything will work. A more complex, but realistic example is:
+
+./configure --with-prefix=/usr/contrib \
+ --with-guile-prefix=/usr/contrib \
+ --with-python-headers=/usr/include/python1.5 \
+ --enable-java-build \
+ --with-gtl=/usr/contrib \
+ --with-java-class-path=/usr/contrib/share/java/site \
+ --enable-warnings
+make -k
+
+Be sure to give the extra --enable-permissive flag to configure if
+you are building with gcc-2.95 or more recent.
+
+As yet another data point, I build Cassowary with:
+
+./configure --with-guile-exec-prefix=/uns/bin \
+ --with-guile-prefix=/uns/share --prefix=/uns/share \
+ --exec-prefix=/uns --enable-maintainer-mode
+
+See the file "INSTALL" for more details about
+autoconf support and the options that the "configure" takes. You can
+also do "./configure --help" for the list of the options that configure
+accepts.
+
+If the make in any of the subdirectories fails, you can turn on the "-k"
+option to make, or just do make in the subdirectories that you want
+build. E.g., if you do not have the JDK installed, the Java version of
+Cassowary might not compile; if you still want the guile version, just
+"cd guile; make -k".
+
+Be sure that configure detects the validity of using the "-fpermissive"
+flag of more recent g++/egcs compilers to work around some
+const-discrepancies between the const-challenged guile header files and
+Cassowary's more const-correct usage. You should get a message like:
+
+ checking whether gcc understands -fpermissive option... yes
+
+when running configure if you're using, e.g., gcc-2.95 or later.
+
+You need to apply GTL.h.patch to the installed GTL.h header file for
+Cassowary to compile with recent versions of egcs/gcc (e.g., gcc-2.95).
+
+Also, you may need to change libguile/gsubr.h from:
+
+ extern SCM scm_make_gsubr SCM_P ((char *name, int req, int opt,
+ int rst, SCM (*fcn)()));
+ to
+
+ extern SCM scm_make_gsubr SCM_P ((char *name, int req, int opt,
+ int rst, void*));
+
+or patch guile's snarf.h to insert the appropriate case at each call to
+SCM_PROC and SCM_PROC1. (Thanks to Alexandre Duret-Lutz for the above
+information about more recent g++/egcs compilers).
+
+Note that the generated Makefiles depend upon features of GNU Make. See:
+
+ftp://ftp.gnu.org/pub/gnu/
+
+for a version of make that you can build first to then build Cassowary.
+
+Example applications exist in subdirectories of the top-level
+implementation subdirectories (e.g., c++/qdemos contains demos for C++
+that use the Qt Widget toolkit).
+
+Please send mail to cassowary@cs.washington.edu if you are using this
+toolkit so we know how to reach you for bug fixes, updates, etc.
+
+------------------------------------------------------------------
+
+WHAT THE DISTRIBUTION CONTAINS
+
+This distribution contains 3 implementations of the Cassowary constraint
+solving toolkit:
+
+o C++
+o Java
+o Smalltalk
+
+For each implementation language, there is at least one example program;
+for some there are many.
+
+There is a wrapping of the C++ solver in Guile-Scheme -- see the guile/
+subdirectory. Also, Anthony Beurivé has wrapped Cassowary for
+STk/Scheme. His code is available at:
+
+ http://dept-info.labri.u-bordeaux.fr/~beurive/Code
+
+and the STk Scheme system is available at:
+
+ http://kaolin.unice.fr/STk/
+
+There is also a SWIG-generated wrapper of the C++ library making the
+solver available from the Python language.
+
+A technical report describing the solver, its interface, and its
+implementation is in cassowary-tr.ps (pdf version in cassowary-tr.pdf).
+This paper is required reading if you intend to use the solver in your
+own project(s).
+
+See also the Scwm (Scheme Constraints Window Manager) web page:
+
+http://scwm.mit.edu/scwm/
+
+Scwm, also by Greg Badros (and Maciej Stachowiak), is the most
+substantial application using this toolkit that we are aware of.
+
+------------------------------------------------------------------
+
+VARIOUS IMPLEMENTATION NOTES
+
+Cassowary/C++ needs to be compiled using a modern C++ compiler.
+At one time or another, it has compiled using:
+ o egcs-1.0.1
+ o egcs-1.0.3a
+ o egcs-1.1b
+ o egcs-1.1.1
+ o gcc-2.8.1 (needs libstdc++-2.8.x, too)
+ o Visual C++ 5.0 (not tried recently)
+
+In particular, Cassowary will *not* build with gcc-2.7.x.x!
+
+See c++/README for more details about building the C++ version.
+
+The C++ implementation of the toolkit also has an optional finite domain
+subsolver. You need to build and install the GTL -- the Graph Template
+Library -- and use the "--with-gtl=DIR" configure option for the finite
+domain subsolver to be built. GTL is available from:
+
+http://www.fmi.uni-passau.de/Graphlet/GTL/
+
+Cassowary was tested against GTL-0.3.1; it may work with later
+versions, but I have not tried it. You need to apply GTL.h.patch to
+the installed GTL.h header file for Cassowary to compile with recent
+versions of egcs/gcc (e.g., gcc-2.95).
+
+Cassowary/Java was developed using Sun's JDK-1.1.x, ported to Linux
+More recent versions should work fine.
+
+See java/README for more details about building the Java version.
+
+
+Cassowary/Smalltalk was written under OTI Smalltalk-- other versions of
+smalltalk will likely require (possibly significant) changes.
+
+See smalltalk/README for more details about the Smalltalk version.
+
+See guile/README for details about the Guile Scheme wrapper of the C++
+implementation, and for a pointer to SCWM, the Scheme Constraints Window
+Manager which uses Cassowary.
+
+The Python bindings (by Tessa Lau) bindings for the Cassowary library
+are in the wrappers/ subdirectory. SWIG was used in wrapping the
+library. These bindings may no longer work, and are provided only for
+your hacking pleasure (please send back useful patches if you do get the
+code working).
+
+For more information about SWIG, see:
+
+http://www.swig.org/
+
+
+For more information about the Python language, see:
+
+http://www.python.org/
+
+
+For more information about the Guile-Scheme language, see:
+
+http://www.red-bean.com/guile/
+http://www.fsf.org/software/guile/guile.html
+
+
+------------------------------------------------------------------
+
+DEMONSTRATION APPLICATION
+
+A standard demonstration application is included for each implementation
+of the Cassowary solver. The application builds a quadrilateral and
+connects the neighboring midpoints of each of the outer edges to form an
+interior quadrilateral which is provably a parallelogram. The
+constraint solver manages the constraints to keep the outer
+quadrilateral inside the window, keep the midpoints properly positioned,
+and keep the outer quadrilateral from turning "inside out."
+
+The user is able to select points (draggable boxes) and move them around
+within the window (both midpoints and endpoints can be selected, of
+course). The solver updates the figure, and redraws.
+
+
+------------------------------------------------------------------
+
+FUNDING ACKNOWLEDGEMENTS
+
+This work has been funded in part by the National Science Foundation under
+Grants IRI-9302249 and CCR-9402551, by Object Technology International, and
+by a Fulbright Award from the Australian-American Educational
+Foundation.
+
+Additionally, Greg Badros is supported by a National Science Foundation
+Graduate Research Fellowship. Parts of this material are based upon
+work supported under that fellowship.
diff --git a/libs/cassowary/THANKS b/libs/cassowary/THANKS
new file mode 100644
index 0000000000..11918b3d52
--- /dev/null
+++ b/libs/cassowary/THANKS
@@ -0,0 +1,30 @@
+Cassowary Constraint Solving Toolkit was
+Implemented by:
+
+Greg J. Badros <gjb@cs.washington.edu> and
+Alan Borning <borning@cs.washington.edu>
+University of Washington
+Computer Science and Engineering
+Seattle, WA 98195-2350
+
+with Constraint Drawing Applet (CDA) by Michael Noth <noth@cs.washington.edu>
+
+Please send bug reports to cassowary@cs.washington.edu
+
+
+Bug reports, helpful testing, and/or code from:
+
+Spencer Allain
+Anthony Beurivé
+Robert Chassell
+Alexandre 'Pollux' Duret-Lutz
+Michael Kaufmann
+Brian Grant
+Pengling He
+Tessa Lau
+John MacPhail
+Larry Melia
+Michael Noth
+Emmanuel Pietriga
+Will Portnoy
+Steve Wolfman
diff --git a/libs/cassowary/autogen.sh b/libs/cassowary/autogen.sh
new file mode 100644
index 0000000000..4d1bcb29e5
--- /dev/null
+++ b/libs/cassowary/autogen.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+aclocal $ACLOCAL_FLAGS && autoheader && automake --add-missing && autoconf
+
diff --git a/libs/cassowary/cassowary-config b/libs/cassowary/cassowary-config
new file mode 100755
index 0000000000..172237763e
--- /dev/null
+++ b/libs/cassowary/cassowary-config
@@ -0,0 +1,102 @@
+#!/bin/sh
+# Modified from gtk-config
+# --09/07/99 gjb
+
+# gotten from LDADD in c++/Makefile.am
+cassowary_gtllibs=""
+cassowary_libs="-L/usr/local/lib $cassowary_gtllibs"
+cassowary_cflags="-I/usr/local/include "
+
+prefix=/usr/local
+exec_prefix=${prefix}
+exec_prefix_set=no
+
+usage()
+{
+ cat <<EOF
+Usage: cassowary-config [OPTIONS]
+Options:
+ [--prefix[=DIR]]
+ [--exec-prefix[=DIR]]
+ [--version]
+ [--libs]
+ [--gtllibs]
+ [--cflags]
+EOF
+ exit $1
+}
+
+if test $# -eq 0; then
+ usage 1 1>&2
+fi
+
+while test $# -gt 0; do
+ case "$1" in
+ -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) optarg= ;;
+ esac
+
+ case $1 in
+ --prefix=*)
+ prefix=$optarg
+ if test $exec_prefix_set = no ; then
+ exec_prefix=$optarg
+ fi
+ ;;
+ --prefix)
+ echo_prefix=yes
+ ;;
+ --exec-prefix=*)
+ exec_prefix=$optarg
+ exec_prefix_set=yes
+ ;;
+ --exec-prefix)
+ echo_exec_prefix=yes
+ ;;
+ --version)
+ echo 0.60
+ ;;
+ --cflags)
+ echo_cflags=yes
+ ;;
+ --libs)
+ echo_libs=yes
+ ;;
+ --gtllibs)
+ echo_gtllibs=yes
+ ;;
+ *)
+ usage 1 1>&2
+ ;;
+ esac
+ shift
+done
+
+if test "$echo_prefix" = "yes"; then
+ echo $prefix
+fi
+
+if test "$echo_exec_prefix" = "yes"; then
+ echo $exec_prefix
+fi
+
+
+if test "$echo_cflags" = "yes"; then
+ if test ${prefix}/include != /usr/include ; then
+ includes=-I${prefix}/include
+ for i in $cassowary_cflags ; do
+ if test $i = -I${prefix}/include ; then
+ includes=""
+ fi
+ done
+ fi
+ echo $includes $cassowary_cflags
+fi
+
+if test "$echo_libs" = "yes"; then
+ echo -L${exec_prefix}/lib -lcassowary -lstdc++ $cassowary_libs
+fi
+
+if test "$echo_gtllibs" = "yes"; then
+ echo $cassowary_gtllibs
+fi
diff --git a/libs/cassowary/cassowary-config.in b/libs/cassowary/cassowary-config.in
new file mode 100755
index 0000000000..ac1b3ac8ce
--- /dev/null
+++ b/libs/cassowary/cassowary-config.in
@@ -0,0 +1,102 @@
+#!/bin/sh
+# Modified from gtk-config
+# --09/07/99 gjb
+
+# gotten from LDADD in c++/Makefile.am
+cassowary_gtllibs="@GTL_LIB@"
+cassowary_libs="-L@prefix@/lib $cassowary_gtllibs"
+cassowary_cflags="@GUILE_INCLUDES@ @GTL_INCLUDES@"
+
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+exec_prefix_set=no
+
+usage()
+{
+ cat <<EOF
+Usage: cassowary-config [OPTIONS]
+Options:
+ [--prefix[=DIR]]
+ [--exec-prefix[=DIR]]
+ [--version]
+ [--libs]
+ [--gtllibs]
+ [--cflags]
+EOF
+ exit $1
+}
+
+if test $# -eq 0; then
+ usage 1 1>&2
+fi
+
+while test $# -gt 0; do
+ case "$1" in
+ -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) optarg= ;;
+ esac
+
+ case $1 in
+ --prefix=*)
+ prefix=$optarg
+ if test $exec_prefix_set = no ; then
+ exec_prefix=$optarg
+ fi
+ ;;
+ --prefix)
+ echo_prefix=yes
+ ;;
+ --exec-prefix=*)
+ exec_prefix=$optarg
+ exec_prefix_set=yes
+ ;;
+ --exec-prefix)
+ echo_exec_prefix=yes
+ ;;
+ --version)
+ echo @CASSOWARY_VERSION@
+ ;;
+ --cflags)
+ echo_cflags=yes
+ ;;
+ --libs)
+ echo_libs=yes
+ ;;
+ --gtllibs)
+ echo_gtllibs=yes
+ ;;
+ *)
+ usage 1 1>&2
+ ;;
+ esac
+ shift
+done
+
+if test "$echo_prefix" = "yes"; then
+ echo $prefix
+fi
+
+if test "$echo_exec_prefix" = "yes"; then
+ echo $exec_prefix
+fi
+
+
+if test "$echo_cflags" = "yes"; then
+ if test @includedir@ != /usr/include ; then
+ includes=-I@includedir@
+ for i in $cassowary_cflags ; do
+ if test $i = -I@includedir@ ; then
+ includes=""
+ fi
+ done
+ fi
+ echo $includes $cassowary_cflags
+fi
+
+if test "$echo_libs" = "yes"; then
+ echo -L@libdir@ -lcassowary -lstdc++ $cassowary_libs
+fi
+
+if test "$echo_gtllibs" = "yes"; then
+ echo $cassowary_gtllibs
+fi
diff --git a/libs/cassowary/cassowary-nofd.spec2 b/libs/cassowary/cassowary-nofd.spec2
new file mode 100644
index 0000000000..d1abb93c5f
--- /dev/null
+++ b/libs/cassowary/cassowary-nofd.spec2
@@ -0,0 +1,84 @@
+# Note that this is NOT a relocatable package
+%define ver 0.60
+%define rel 2
+%define prefix /usr
+
+Name: cassowary-nofd
+Summary: A Linear Arithmetic Constraint Solving Library.
+Version: %ver
+Release: %rel
+# This source just has a different top-level directory name
+Source: http://www.cs.washington.edu/research/constraints/cassowary/cassowary-nofd-%ver.tar.gz
+Group: Development/Libraries
+BuildRoot: /tmp/cassowary-%ver-build
+Copyright: Copyright (C) 1998,1999 Greg J. Badros
+Packager: Greg J. Badros <gjb@cs.washington.edu>
+URL: http://www.cs.washington.edu/research/constraints/cassowary
+Requires: guile >= 1.3.2
+Provides: cassowary-constraint-solver
+
+%description
+
+Cassowary is an advanced incremental constraint solving toolkit that
+efficiently solves systems of linear equalities and inequalities.
+Constraints may be either requirements or preferences. Client code
+specifies the constraints to be maintained, and the solver updates the
+constrained variables to have values that satisfy the constraints.
+
+This package lacks the finite domain subsolver. The cassowary RPM
+contains that solver as well, but also requires the GTL (Graph
+Template Library) package.
+
+
+%changelog
+* Tue Sep 7 1999 Greg J. Badros <gjb@cs.washington.edu)
+- Added cassowary-nofd package to remove GTL dependence, added provides
+ virtual package "cassowary-constraint-solver" so that both this .spec
+ and cassowary.spec can provide it
+
+* Sat Sep 4 1999 Greg J. Badros <gjb@cs.washington.edu)
+- Use -fpermissive if it is available, fix --enable-warnings
+
+* Wed Aug 25 1999 Greg J. Badros <gjb@cs.washington.edu>
+- Rework spec file.
+
+* Wed Apr 14 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+- Initial release of this package.
+
+%prep
+
+%setup
+
+%build
+ln -sf . ./c++/cassowary
+
+%ifarch alpha
+./configure --host=alpha-linux --prefix=%prefix --enable-guile-build --enable-fsstd --enable-permissive
+%else
+./configure --prefix=%prefix --enable-guile-build --enable-fsstd --enable-permissive
+%endif
+
+make
+
+%install
+make prefix=$RPM_BUILD_ROOT%{prefix} install-strip
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post
+
+%postun
+
+%files
+%defattr(-, root, root)
+
+%{prefix}/bin/*
+%{prefix}/lib/*
+%{prefix}/include/*
+
+%doc ANNOUNCE AUTHORS COPYING IMPORTANT INSTALL LICENSE NEWS README THANKS
+%doc ChangeLog docs/cassowary-tr.pdf docs/cassowary-tr.ps.gz
+%doc guile/cassowary_scm-procedures.txt guile/cassowary_scm-variables.txt
+%doc guile/cassowary_scm.sgml
diff --git a/libs/cassowary/cassowary-nofd.spec2.in b/libs/cassowary/cassowary-nofd.spec2.in
new file mode 100644
index 0000000000..ee951bb446
--- /dev/null
+++ b/libs/cassowary/cassowary-nofd.spec2.in
@@ -0,0 +1,84 @@
+# Note that this is NOT a relocatable package
+%define ver @VERSION@
+%define rel 2
+%define prefix /usr
+
+Name: cassowary-nofd
+Summary: A Linear Arithmetic Constraint Solving Library.
+Version: %ver
+Release: %rel
+# This source just has a different top-level directory name
+Source: http://www.cs.washington.edu/research/constraints/cassowary/cassowary-nofd-%ver.tar.gz
+Group: Development/Libraries
+BuildRoot: /tmp/cassowary-%ver-build
+Copyright: Copyright (C) 1998,1999 Greg J. Badros
+Packager: Greg J. Badros <gjb@cs.washington.edu>
+URL: http://www.cs.washington.edu/research/constraints/cassowary
+Requires: guile >= 1.3.2
+Provides: cassowary-constraint-solver
+
+%description
+
+Cassowary is an advanced incremental constraint solving toolkit that
+efficiently solves systems of linear equalities and inequalities.
+Constraints may be either requirements or preferences. Client code
+specifies the constraints to be maintained, and the solver updates the
+constrained variables to have values that satisfy the constraints.
+
+This package lacks the finite domain subsolver. The cassowary RPM
+contains that solver as well, but also requires the GTL (Graph
+Template Library) package.
+
+
+%changelog
+* Tue Sep 7 1999 Greg J. Badros <gjb@cs.washington.edu)
+- Added cassowary-nofd package to remove GTL dependence, added provides
+ virtual package "cassowary-constraint-solver" so that both this .spec
+ and cassowary.spec can provide it
+
+* Sat Sep 4 1999 Greg J. Badros <gjb@cs.washington.edu)
+- Use -fpermissive if it is available, fix --enable-warnings
+
+* Wed Aug 25 1999 Greg J. Badros <gjb@cs.washington.edu>
+- Rework spec file.
+
+* Wed Apr 14 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+- Initial release of this package.
+
+%prep
+
+%setup
+
+%build
+ln -sf . ./c++/cassowary
+
+%ifarch alpha
+./configure --host=alpha-linux --prefix=%prefix --enable-guile-build --enable-fsstd --enable-permissive
+%else
+./configure --prefix=%prefix --enable-guile-build --enable-fsstd --enable-permissive
+%endif
+
+make
+
+%install
+make prefix=$RPM_BUILD_ROOT%{prefix} install-strip
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post
+
+%postun
+
+%files
+%defattr(-, root, root)
+
+%{prefix}/bin/*
+%{prefix}/lib/*
+%{prefix}/include/*
+
+%doc ANNOUNCE AUTHORS COPYING IMPORTANT INSTALL LICENSE NEWS README THANKS
+%doc ChangeLog docs/cassowary-tr.pdf docs/cassowary-tr.ps.gz
+%doc guile/cassowary_scm-procedures.txt guile/cassowary_scm-variables.txt
+%doc guile/cassowary_scm.sgml
diff --git a/libs/cassowary/cassowary.spec b/libs/cassowary/cassowary.spec
new file mode 100644
index 0000000000..bd30177048
--- /dev/null
+++ b/libs/cassowary/cassowary.spec
@@ -0,0 +1,78 @@
+# Note that this is NOT a relocatable package
+%define ver 0.60
+%define rel 1
+%define prefix /usr
+
+Name: cassowary
+Summary: A Linear Arithmetic Constraint Solving Library.
+Version: %ver
+Release: %rel
+Source: http://www.cs.washington.edu/research/constraints/cassowary/cassowary-%ver.tar.gz
+Group: Development/Libraries
+BuildRoot: /tmp/cassowary-%ver-build
+Copyright: Copyright (C) 1998,1999 Greg J. Badros
+Packager: Greg J. Badros <gjb@cs.washington.edu>
+URL: http://www.cs.washington.edu/research/constraints/cassowary
+Requires: guile >= 1.3.4
+Requires: GTL >= 0.3.1
+Provides: cassowary-constraint-solver
+
+%description
+
+Cassowary is an advanced incremental constraint solving toolkit that
+efficiently solves systems of linear equalities and inequalities.
+Constraints may be either requirements or preferences. Client code
+specifies the constraints to be maintained, and the solver updates the
+constrained variables to have values that satisfy the constraints.
+
+%changelog
+* Tue Sep 7 1999 Greg J. Badros <gjb@cs.washington.edu)
+- added provides virtual package "cassowary-constraint-solver" so that
+ both this .spec and cassowary.spec can provide it
+
+* Sat Sep 4 1999 Greg J. Badros <gjb@cs.washington.edu)
+- Use -fpermissive if it is available, fix --enable-warnings
+
+* Wed Aug 25 1999 Greg J. Badros <gjb@cs.washington.edu>
+- Rework spec file.
+
+* Wed Apr 14 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+- Initial release of this package.
+
+%prep
+
+%setup
+
+%build
+ln -sf . ./c++/cassowary
+
+%ifarch alpha
+fake_root_for_install=$RPM_BUILD_ROOT ./configure --host=alpha-linux --prefix=%prefix --with-gtl=%prefix --enable-fd-solver --enable-fsstd --enable-permissive
+%else
+fake_root_for_install=$RPM_BUILD_ROOT ./configure --prefix=%prefix --with-gtl=%prefix --enable-fd-solver --enable-fsstd --enable-permissive
+%endif
+
+make
+
+%install
+make prefix=$RPM_BUILD_ROOT%{prefix} fake_root_for_install=$RPM_BUILD_ROOT install-strip
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post
+
+%postun
+
+%files
+%defattr(-, root, root)
+
+%{prefix}/bin/*
+%{prefix}/lib/*
+%{prefix}/include/*
+
+%doc ANNOUNCE AUTHORS COPYING IMPORTANT INSTALL LICENSE NEWS README THANKS
+%doc ChangeLog docs/cassowary-tr.pdf docs/cassowary-tr.ps.gz
+%doc guile/cassowary_scm-procedures.txt guile/cassowary_scm-variables.txt
+%doc guile/cassowary_scm.sgml
diff --git a/libs/cassowary/cassowary.spec.in b/libs/cassowary/cassowary.spec.in
new file mode 100644
index 0000000000..2b7c23a8e5
--- /dev/null
+++ b/libs/cassowary/cassowary.spec.in
@@ -0,0 +1,78 @@
+# Note that this is NOT a relocatable package
+%define ver @VERSION@
+%define rel 1
+%define prefix /usr
+
+Name: cassowary
+Summary: A Linear Arithmetic Constraint Solving Library.
+Version: %ver
+Release: %rel
+Source: http://www.cs.washington.edu/research/constraints/cassowary/cassowary-%ver.tar.gz
+Group: Development/Libraries
+BuildRoot: /tmp/cassowary-%ver-build
+Copyright: Copyright (C) 1998,1999 Greg J. Badros
+Packager: Greg J. Badros <gjb@cs.washington.edu>
+URL: http://www.cs.washington.edu/research/constraints/cassowary
+Requires: guile >= 1.3.4
+Requires: GTL >= 0.3.1
+Provides: cassowary-constraint-solver
+
+%description
+
+Cassowary is an advanced incremental constraint solving toolkit that
+efficiently solves systems of linear equalities and inequalities.
+Constraints may be either requirements or preferences. Client code
+specifies the constraints to be maintained, and the solver updates the
+constrained variables to have values that satisfy the constraints.
+
+%changelog
+* Tue Sep 7 1999 Greg J. Badros <gjb@cs.washington.edu)
+- added provides virtual package "cassowary-constraint-solver" so that
+ both this .spec and cassowary.spec can provide it
+
+* Sat Sep 4 1999 Greg J. Badros <gjb@cs.washington.edu)
+- Use -fpermissive if it is available, fix --enable-warnings
+
+* Wed Aug 25 1999 Greg J. Badros <gjb@cs.washington.edu>
+- Rework spec file.
+
+* Wed Apr 14 1999 Greg J. Badros <gjb@cs.washington.edu>
+
+- Initial release of this package.
+
+%prep
+
+%setup
+
+%build
+ln -sf . ./c++/cassowary
+
+%ifarch alpha
+fake_root_for_install=$RPM_BUILD_ROOT ./configure --host=alpha-linux --prefix=%prefix --with-gtl=%prefix --enable-fd-solver --enable-fsstd --enable-permissive
+%else
+fake_root_for_install=$RPM_BUILD_ROOT ./configure --prefix=%prefix --with-gtl=%prefix --enable-fd-solver --enable-fsstd --enable-permissive
+%endif
+
+make
+
+%install
+make prefix=$RPM_BUILD_ROOT%{prefix} fake_root_for_install=$RPM_BUILD_ROOT install-strip
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post
+
+%postun
+
+%files
+%defattr(-, root, root)
+
+%{prefix}/bin/*
+%{prefix}/lib/*
+%{prefix}/include/*
+
+%doc ANNOUNCE AUTHORS COPYING IMPORTANT INSTALL LICENSE NEWS README THANKS
+%doc ChangeLog docs/cassowary-tr.pdf docs/cassowary-tr.ps.gz
+%doc guile/cassowary_scm-procedures.txt guile/cassowary_scm-variables.txt
+%doc guile/cassowary_scm.sgml
diff --git a/libs/cassowary/cassowary/.cvsignore b/libs/cassowary/cassowary/.cvsignore
new file mode 100644
index 0000000000..282522db03
--- /dev/null
+++ b/libs/cassowary/cassowary/.cvsignore
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
diff --git a/libs/cassowary/cassowary/Cassowary.h b/libs/cassowary/cassowary/Cassowary.h
new file mode 100644
index 0000000000..8413f321f9
--- /dev/null
+++ b/libs/cassowary/cassowary/Cassowary.h
@@ -0,0 +1,40 @@
+// $Id$
+//
+// Cassowary Incremental Constraint Solver
+// Original Smalltalk Implementation by Alan Borning
+// This C++ Implementation by Greg J. Badros, <gjb@cs.washington.edu>
+// http://www.cs.washington.edu/homes/gjb
+// (C) 1998, 1999 Greg J. Badros and Alan Borning
+// See ../LICENSE for legal details regarding this software
+//
+// Cassowary.h
+
+#ifndef Cassowary_H
+#define Cassowary_H
+
+#if defined(HAVE_CONFIG_H) && !defined(CONFIG_H_INCLUDED) && !defined(CONFIG_INLINE_H_INCLUDED)
+ #include <cassowary/config-inline.h>
+ #define CONFIG_INLINE_H_INCLUDED
+#endif
+
+#ifndef CL_PTR_HASH_DIVISOR
+ #define CL_PTR_HASH_DIVISOR 4
+#endif
+
+#include "ClConstraintHash.h"
+#include <climits>
+
+#include <string>
+#include <cassert>
+#include <iostream>
+
+typedef double Number;
+
+typedef long FDNumber;
+
+enum { FDN_NOTSET = LONG_MIN };
+
+#define NEWVAR(x) do { cerr << "line " << __LINE__ << ": new " << x << endl; } while (0)
+#define DELVAR(x) do { cerr << "line " << __LINE__ << ": del " << x << endl; } while (0)
+
+#endif // Cassowary_H
diff --git a/libs/cassowary/cassowary/Cl.h b/libs/cassowary/cassowary/Cl.h
new file mode 100644
index 0000000000..6c2604da6f
--- /dev/null
+++ b/libs/cassowary/cassowary/Cl.h
@@ -0,0 +1,49 @@
+// $Id$
+//
+// Cassowary Incremental Constraint Solver
+// Original Smalltalk Implementation by Alan Borning
+// This C++ Implementation by Greg J. Badros, <gjb@cs.washington.edu>
+// http://www.cs.washington.edu/homes/gjb
+// (C) 1998, 1999 Greg J. Badros and Alan Borning
+// See ../LICENSE for legal details regarding this software
+//
+// Cl.h
+// This is the top level include file for external clients
+
+#ifndef CL_H
+#define CL_H
+
+#if defined(HAVE_CONFIG_H) && !defined(CONFIG_H_INCLUDED) && !defined(CONFIG_INLINE_H_INCLUDED)
+#include <cassowary/config-inline.h>
+#define CONFIG_INLINE_H_INCLUDED
+#endif
+
+#ifdef CL_NO_IO
+#undef CL_TRACE
+#undef CL_SOLVER_STATS
+#undef CL_DEBUG_FAILURES
+#undef CL_TRACE_VERBOSE
+#endif
+
+#if defined(HAVE_CONFIG_H) && !defined(CONFIG_H_INCLUDED) && !defined(CONFIG_INLINE_H_INCLUDED)
+#include <cassowary/config-inline.h>
+#define CONFIG_INLINE_H_INCLUDED
+#endif
+
+#include "cassowary/ClVariable.h"
+#include "cassowary/ClSimplexSolver.h"
+#include "cassowary/ClLinearEquation.h"
+#include "cassowary/ClLinearInequality.h"
+#include "cassowary/ClErrors.h"
+#include "cassowary/ClEditConstraint.h"
+#include "cassowary/ClStayConstraint.h"
+#include "cassowary/ClReader.h"
+#include "cassowary/ClConstraint.h"
+#if defined(CL_HAVE_GTL) && defined(CL_BUILD_FD_SOLVER)
+#include "cassowary/ClFDBinaryOneWayConstraint.h"
+#include "cassowary/ClFDSolver.h"
+#endif
+
+extern const char *szCassowaryVersion;
+
+#endif
diff --git a/libs/cassowary/cassowary/ClAbstractVariable.h b/libs/cassowary/cassowary/ClAbstractVariable.h
new file mode 100644
index 0000000000..08ade9ec98
--- /dev/null
+++ b/libs/cassowary/cassowary/ClAbstractVariable.h
@@ -0,0 +1,161 @@
+// $Id$
+//
+// Cassowary Incremental Constraint Solver
+// Original Smalltalk Implementation by Alan Borning
+// This C++ Implementation by Greg J. Badros, <gjb@cs.washington.edu>
+// http://www.cs.washington.edu/homes/gjb
+// (C) 1998, 1999 Greg J. Badros and Alan Borning
+// See ../LICENSE for legal details regarding this software
+//
+// ClAbstractVariable.h
+
+#ifndef ClAbstractVariable_H
+#define ClAbstractVariable_H
+
+#if defined(HAVE_CONFIG_H) && !defined(CONFIG_H_INCLUDED) && !defined(CONFIG_INLINE_H_INCLUDED)
+#include <cassowary/config-inline.h>
+#define CONFIG_INLINE_H_INCLUDED
+#endif
+
+#include <cstdio> /* for sprintf */
+#include "Cassowary.h"
+#include "ClErrors.h"
+#include <memory>
+#include <string>
+#include <iostream>
+#include "cl_auto_ptr.h"
+
+using std::string;
+using std::ostream;
+
+class ClAbstractVariable {
+public:
+ ClAbstractVariable(string Name = "") :
+ _name(Name), _pv(0)
+ {
+ ++iVariableNumber;
+#ifdef CL_FIND_LEAK
+ ++cAbstractVariables;
+#endif
+ if (Name.length() == 0)
+ {
+ char sz[16];
+ sprintf(sz,"v%ld",iVariableNumber);
+ _name = string(sz);
+ }
+ }
+
+ ClAbstractVariable(long varnumber, char *prefix) :
+ _pv(0)
+ {
+ cl_auto_ptr<char> pch (new char[16+strlen(prefix)]);
+ iVariableNumber++;
+#ifdef CL_FIND_LEAK
+ ++cAbstractVariables;
+#endif
+ sprintf(pch.get(),"%s%ld",prefix,varnumber);
+ _name = string(pch.get());
+ }
+
+ virtual ~ClAbstractVariable()
+#ifdef CL_FIND_LEAK
+ { --cAbstractVariables; }
+
+ static long cAbstractVariables;
+#else
+ { }
+#endif
+
+ // Return the Name of the variable
+ string Name() const
+ { return _name; }
+
+ // Set the Name of the variable
+ virtual void SetName(string const &Name)
+ { _name = Name; }
+
+ // Return true iff this variable is a ClFloatVariable
+ virtual bool IsFloatVariable() const
+ { return false; }
+
+ // Return true iff this variable is a ClFDVariable
+ virtual bool IsFDVariable() const
+ { return false; }
+
+ // Return true if this a dummy variable (used as a marker variable
+ // for required equality constraints). Such variables aren't
+ // allowed to enter the basis when pivoting.
+ virtual bool IsDummy() const
+ { return false; }
+
+ // Return true if this a variable known outside the solver.
+ // (We need to give such variables a Value after solving is complete.)
+ virtual bool IsExternal() const
+ { return false; }
+
+ // Return true if we can Pivot on this variable.
+ virtual bool IsPivotable() const
+ { throw ExCLTooDifficultSpecial("Variable not usable inside SimplexSolver"); return false; }
+
+ // Return true if this is a restricted (or slack) variable. Such
+ // variables are constrained to be non-negative and occur only
+ // internally to the simplex solver.
+ virtual bool IsRestricted() const
+ { throw ExCLTooDifficultSpecial("Variable not usable inside SimplexSolver"); return false; }
+
+#ifndef CL_NO_IO
+ // Prints a semi-descriptive representation to the stream, using the
+ // Name if there is one, and otherwise the hash number of this
+ // object.
+ // EXAMPLES
+ // x[10.0] -- w/ Name
+ // x[0.0,100] -- w/ Name, bounds but no Value yet
+ // CV#345(10.0) -- w/o Name
+ virtual ostream &PrintOn(ostream &xo) const = 0;
+
+ friend ostream& operator<<(ostream &xos, const ClAbstractVariable &clv)
+ { clv.PrintOn(xos); return xos; }
+
+#endif // CL_NO_IO
+
+ friend bool operator<(const ClAbstractVariable &cl1, const ClAbstractVariable &cl2)
+ { return &cl1 < &cl2; }
+
+ friend bool operator==(const ClAbstractVariable &cl1, const ClAbstractVariable &cl2)
+ {
+ return &cl1 == &cl2;
+ }
+
+ friend bool operator!=(const ClAbstractVariable &cl1, const ClAbstractVariable &cl2)
+ {
+ return !(cl1 == cl2);
+ }
+
+ virtual Number Value() const { return 0; }
+ virtual int IntValue() const { return 0; }
+
+ virtual void SetValue(Number)
+ { assert(false); }
+
+ virtual void ChangeValue(Number)
+ { assert(false); }
+
+ void SetPv(void *pv)
+ { _pv = pv; }
+
+ void *Pv() const
+ { return _pv; }
+
+private:
+ string _name;
+
+ static long iVariableNumber;
+
+ // C-style extension mechanism so I
+ // don't have to wrap ScwmClVariables separately
+ void *_pv;
+};
+
+typedef ClAbstractVariable *PClAbstractVariable;
+
+#endif
diff --git a/libs/cassowary/cassowary/ClConstraint.h b/libs/cassowary/cassowary/ClConstraint.h
new file mode 100644
index 0000000000..0b670e6c07
--- /dev/null
+++ b/libs/cassowary/cassowary/ClConstraint.h
@@ -0,0 +1,198 @@
+// $Id$
+//
+// Cassowary Incremental Constraint Solver
+// Original Smalltalk Implementation by Alan Borning
+// This C++ Implementation by Greg J. Badros, <gjb@cs.washington.edu>
+// http://www.cs.washington.edu/homes/gjb
+// (C) 1998, 1999 Greg J. Badros and Alan Borning
+// See ../LICENSE for legal details regarding this software
+//
+// ClConstraint.h
+
+#ifndef ClConstraint_H
+#define ClConstraint_H
+
+#if defined(HAVE_CONFIG_H) && !defined(CONFIG_H_INCLUDED) && !defined(CONFIG_INLINE_H_INCLUDED)
+#include <cassowary/config-inline.h>
+#define CONFIG_INLINE_H_INCLUDED
+#endif
+
+#include "debug.h"
+
+#include "Cassowary.h"
+#include "ClLinearExpression.h"
+#include "ClStrength.h"
+#include <string>
+
+using std::string;
+
+class ClSimplexSolver;
+class ClFDSolver;
+class ClBlueSolver;
+
+// enum setup so additive inverse flips the direction of the inequality
+enum ClCnRelation {cnEQ = 0, cnNEQ = 100, cnLEQ = 2, cnGEQ = -2, cnLT = 3, cnGT = -3 };
+
+inline enum ClCnRelation
+ReverseInequality(enum ClCnRelation c)
+{
+ if (c != cnNEQ)
+ c = (enum ClCnRelation) (- int(c));
+ return c;
+}
+
+inline string
+StrCnRelation(enum ClCnRelation rel) {
+ switch (rel) {
+ case cnEQ: return "=";
+ case cnNEQ: return "=/=";
+ case cnLEQ: return "<=";
+ case cnGEQ: return ">=";
+ case cnLT: return "<";
+ case cnGT: return ">";
+ default: assert(false);
+ }
+}
+
+
+
+class ClConstraint {
+public:
+
+ ClConstraint(const ClStrength &strength = ClsRequired(), double weight = 1.0 ) :
+ _strength(strength),
+ _readOnlyVars(),
+ _weight(weight),
+ _pv(0),
+ _times_added(0)
+ {
+ CtrTracer(__FUNCTION__,this);
+ }
+
+ virtual ~ClConstraint()
+ {
+ DtrTracer(__FUNCTION__,this);
+ }
+
+ // Return my linear Expression. (For linear equations, this
+ // constraint represents Expression=0; for linear inequalities it
+ // represents Expression>=0.)
+ virtual ClLinearExpression Expression() const
+ { assert(false); }
+
+ // Returns true if this is an edit constraint
+ virtual bool IsEditConstraint() const
+ { return false; }
+
+ // Return true if this is an inequality constraint and
+ // false if it is an equality constraint. The default is
+ // that it is not.
+ virtual bool IsInequality() const
+ { return false; }
+
+ virtual bool IsStrictInequality() const
+ { return false; }
+
+ virtual bool IsRequired() const
+ { return _strength.IsRequired(); }
+
+ virtual bool isStayConstraint() const
+ { return false; }
+
+ virtual const ClStrength &strength() const
+ { return _strength; }
+
+ virtual double weight() const
+ { return _weight; }
+
+#ifndef CL_NO_IO
+ virtual ostream &PrintOn(ostream &xo) const = 0;
+
+ friend ostream& operator<<(ostream &xos, const ClConstraint &constraint)
+ { constraint.PrintOn(xos); return xos; }
+
+#endif
+
+
+ void SetPv(void *pv)
+ { _pv = pv; }
+
+ void *Pv() const
+ { return _pv; }
+
+ virtual bool FIsSatisfied() const { return false; }
+
+ virtual bool FIsInSolver() const { return _times_added != 0; }
+
+ virtual bool FIsOkayForSimplexSolver() const { return true; }
+
+ void ChangeStrength( const ClStrength &strength)
+ {
+ if (_times_added == 0) {
+ setStrength(strength);
+ } else {
+ throw ExCLTooDifficult();
+ }
+ }
+
+ void ChangeWeight( double weight )
+ {
+ if (_times_added == 0) {
+ setWeight(weight);
+ } else {
+ throw ExCLTooDifficult();
+ }
+ }
+
+ bool FIsReadOnlyVar(ClVariable v) const {
+ return !(_readOnlyVars.find(v) == _readOnlyVars.end());
+ }
+
+ const ClVarSet &ReadOnlyVars() const {
+ return _readOnlyVars;
+ }
+
+ ClConstraint &AddROVars(const ClVarSet &setClv) {
+ for ( ClVarSet::const_iterator it = setClv.begin();
+ it != setClv.end(); ++it) {
+ _readOnlyVars.insert(*it);
+ }
+ return *this;
+ }
+
+ friend class ClSimplexSolver;
+ friend class ClFDSolver;
+ friend class ClBlueSolver;
+private:
+
+ ClSymbolicWeight symbolicWeight() const {
+ return _strength.symbolicWeight();
+ }
+
+ void addedTo(const ClSimplexSolver &)
+ { ++_times_added; }
+
+ void removedFrom(const ClSimplexSolver &)
+ { --_times_added; }
+
+ void setStrength( const ClStrength &strength )
+ { _strength = strength; }
+
+ void setWeight( double weight )
+ { _weight = weight; }
+
+ /// instance variables
+ ClStrength _strength;
+
+ ClVarSet _readOnlyVars;
+
+ double _weight;
+
+ void *_pv;
+
+ int _times_added;
+};
+
+typedef ClConstraint* PClConstraint;
+
+#endif
diff --git a/libs/cassowary/cassowary/ClConstraintHash.h b/libs/cassowary/cassowary/ClConstraintHash.h
new file mode 100644
index 0000000000..9d51fad311
--- /dev/null
+++ b/libs/cassowary/cassowary/ClConstraintHash.h
@@ -0,0 +1,39 @@
+// $Id$
+//
+// Cassowary Incremental Constraint Solver
+// Original Smalltalk Implementation by Alan Borning
+// This C++ Implementation by Greg J. Badros, <gjb@cs.washington.edu>
+// http://www.cs.washington.edu/homes/gjb
+// (C) 1998, 1999 Greg J. Badros and Alan Borning
+// See ../LICENSE for legal details regarding this software
+//
+// ClHash.h
+
+#ifndef CL_HASH_H__
+#define CL_HASH_H__
+
+#if defined(HAVE_CONFIG_H) && !defined(CONFIG_H_INCLUDED) && !defined(CONFIG_INLINE_H_INCLUDED)
+#include <cassowary/config-inline.h>
+#define CONFIG_INLINE_H_INCLUDED
+#endif
+
+#ifdef CL_USE_HASH_MAP_AND_SET
+
+#include <hash_map>
+
+class ClConstraint;
+
+struct hash<const ClConstraint *> {
+ size_t operator()(const ClConstraint * const p) const
+ { return size_t((unsigned long)p/CL_PTR_HASH_DIVISOR); }
+};
+
+struct hash<ClConstraint *> {
+ size_t operator()(ClConstraint * const p) const
+ { return size_t((unsigned long)p/CL_PTR_HASH_DIVISOR); }
+};
+
+#endif // CL_USE_HASH_MAP_AND_SET
+
+
+#endif
diff --git a/libs/cassowary/cassowary/ClDummyVariable.h b/libs/cassowary/cassowary/ClDummyVariable.h
new file mode 100644
index 0000000000..ad959a6d20
--- /dev/null
+++ b/libs/cassowary/cassowary/ClDummyVariable.h
@@ -0,0 +1,88 @@
+// $Id$
+//
+// Cassowary Incremental Constraint Solver
+// Original Smalltalk Implementation by Alan Borning
+// This C++ Implementation by Greg J. Badros, <gjb@cs.washington.edu>
+// http://www.cs.washington.edu/homes/gjb
+// (C) 1998, 1999 Greg J. Badros and Alan Borning
+// See ../LICENSE for legal details regarding this software
+//
+// ClDummyVariable.h
+
+#ifndef ClDummyVariable_H
+#define ClDummyVariable_H
+
+#if defined(HAVE_CONFIG_H) && !defined(CONFIG_H_INCLUDED) && !defined(CONFIG_INLINE_H_INCLUDED)
+#include <cassowary/config-inline.h>
+#define CONFIG_INLINE_H_INCLUDED
+#endif
+
+#include "Cassowary.h"
+#include "ClAbstractVariable.h"
+
+class ClTableau;
+class ClSimplexSolver;
+
+class ClDummyVariable : public ClAbstractVariable {
+
+public:
+
+#ifdef CL_FIND_LEAK
+ ~ClDummyVariable() { --cDummyVariables; };
+
+ static long cDummyVariables;
+
+#endif
+
+protected:
+ friend class ClTableau;
+ friend class ClSimplexSolver;
+
+ ClDummyVariable(string Name = "") :
+ ClAbstractVariable(Name)
+ {
+#ifdef CL_FIND_LEAK
+ ++cDummyVariables;
+#endif
+ }
+
+ ClDummyVariable(long number, char *prefix) :
+ ClAbstractVariable(number,prefix)
+ {
+#ifdef CL_FIND_LEAK
+ ++cDummyVariables;
+#endif
+ }
+
+#ifndef CL_NO_IO
+ virtual ostream &PrintOn(ostream &xo) const
+ {
+ xo << "[" << Name() << ":dummy]";
+ return xo;
+ }
+#endif
+
+ // Return true if this a dummy variable (used as a marker variable
+ // for required equality constraints). Such variables aren't
+ // allowed to enter the basis when pivoting.
+ virtual bool IsDummy() const
+ { return true; }
+
+ // Return true if this a variable known outside the solver.
+ // (We need to give such variables a Value after solving is complete.)
+ virtual bool IsExternal() const
+ { return false; }
+
+ // Return true if we can Pivot on this variable.
+ virtual bool IsPivotable() const
+ { return false; }
+
+ // Return true if this is a restricted (or slack) variable. Such
+ // variables are constrained to be non-negative and occur only
+ // internally to the simplex solver.
+ virtual bool IsRestricted() const
+ { return true; }
+
+};
+
+#endif
diff --git a/libs/cassowary/cassowary/ClEditConstraint.h b/libs/cassowary/cassowary/ClEditConstraint.h
new file mode 100644
index 0000000000..4bd91e2ca2
--- /dev/null
+++ b/libs/cassowary/cassowary/ClEditConstraint.h
@@ -0,0 +1,45 @@
+// $Id$
+//
+// Cassowary Incremental Constraint Solver
+// Original Smalltalk Implementation by Alan Borning
+// This C++ Implementation by Greg J. Badros, <gjb@cs.washington.edu>
+// http://www.cs.washington.edu/homes/gjb
+// (C) 1998, 1999 Greg J. Badros and Alan Borning
+// See ../LICENSE for legal details regarding this software
+//
+// ClEditConstraint.h
+
+#ifndef ClEditConstraint_H
+#define ClEditConstraint_H
+
+#if defined(HAVE_CONFIG_H) && !defined(CONFIG_H_INCLUDED) && !defined(CONFIG_INLINE_H_INCLUDED)
+#include <cassowary/config-inline.h>
+#define CONFIG_INLINE_H_INCLUDED
+#endif
+
+#include "Cassowary.h"
+#include "ClEditOrStayConstraint.h"
+
+class ClEditConstraint : public ClEditOrStayConstraint {
+ typedef ClEditOrStayConstraint super;
+ public:
+
+ ClEditConstraint(const ClVariable var,
+ const ClStrength &strength = ClsStrong(), double weight = 1.0 ) :
+ ClEditOrStayConstraint(var,strength,weight)
+ { }
+
+ // Returns true if this is an edit constraint
+ virtual bool IsEditConstraint() const
+ { return true; }
+
+#ifndef CL_NO_IO
+ virtual ostream &PrintOn(ostream &xo) const
+ { super::PrintOn(xo); return xo << "= edit)"; }
+#endif
+
+ private:
+
+};
+
+#endif
diff --git a/libs/cassowary/cassowary/ClEditOrStayConstraint.h b/libs/cassowary/cassowary/ClEditOrStayConstraint.h
new file mode 100644
index 0000000000..79b6761b69
--- /dev/null
+++ b/libs/cassowary/cassowary/ClEditOrStayConstraint.h
@@ -0,0 +1,51 @@
+// $Id$
+//
+// Cassowary Incremental Constraint Solver
+// Original Smalltalk Implementation by Alan Borning
+// This C++ Implementation by Greg J. Badros, <gjb@cs.washington.edu>
+// http://www.cs.washington.edu/homes/gjb
+// (C) 1998, 1999 Greg J. Badros and Alan Borning
+// See ../LICENSE for legal details regarding this software
+//
+// ClEditOrStayConstraint.h
+
+#ifndef ClEditOrStayConstraint_H
+#define ClEditOrStayConstraint_H
+
+#if defined(HAVE_CONFIG_H) && !defined(CONFIG_H_INCLUDED) && !defined(CONFIG_INLINE_H_INCLUDED)
+#include <cassowary/config-inline.h>
+#define CONFIG_INLINE_H_INCLUDED
+#endif
+
+#include "ClConstraint.h"
+#include "ClLinearExpression.h"
+
+class ClVariable;
+
+class ClEditOrStayConstraint : public ClConstraint {
+ public:
+
+ ClEditOrStayConstraint(const ClVariable var,
+ const ClStrength &strength = ClsRequired(), double weight = 1.0 ) :
+ ClConstraint(strength,weight),
+ _variable(var)
+ { }
+
+ const ClVariable variable() const
+ { return _variable; }
+
+ ClLinearExpression Expression() const
+ { return ClLinearExpression(_variable,-1,_variable.Value()); }
+
+ private:
+
+ void setVariable( const ClVariable v)
+ { _variable = v; }
+
+ /// instance variables
+ ClVariable _variable;
+
+
+};
+
+#endif
diff --git a/libs/cassowary/cassowary/ClErrors.h b/libs/cassowary/cassowary/ClErrors.h
new file mode 100644
index 0000000000..867c578dbc
--- /dev/null
+++ b/libs/cassowary/cassowary/ClErrors.h
@@ -0,0 +1,179 @@
+// $Id$
+//
+// Cassowary Incremental Constraint Solver
+// Original Smalltalk Implementation by Alan Borning
+// This C++ Implementation by Greg J. Badros, <gjb@cs.washington.edu>
+// http://www.cs.washington.edu/homes/gjb
+// (C) 1998, 1999 Greg J. Badros and Alan Borning
+// See ../LICENSE for legal details regarding this software
+//
+// ClErrors.h
+
+#ifndef ClErrors_H
+#define ClErrors_H
+
+#if defined(HAVE_CONFIG_H) && !defined(CONFIG_H_INCLUDED) && !defined(CONFIG_INLINE_H_INCLUDED)
+#include <cassowary/config-inline.h>
+#define CONFIG_INLINE_H_INCLUDED
+#endif
+
+#include "Cassowary.h"
+#include "ClTypedefs.h"
+#include <string>
+#include <exception>
+
+using std::string;
+using std::exception;
+
+class ExCLError : public exception {
+ public:
+ ExCLError() : _msg(0) { }
+ virtual ~ExCLError() throw() {}
+ virtual string description() const
+ { return "(ExCLError) An error has occured in CL"; }
+ protected:
+ char *_msg;
+};
+
+class ExCLInternalError : public ExCLError {
+ public:
+ ExCLInternalError(const char *sz)
+ { _msg = strdup(sz); }
+ virtual string description() const
+ {
+ if (_msg) return _msg;
+ else return "(ExCLInternalError) An internal error has occurred";
+ }
+};
+
+class ExCLBadResolve : public ExCLError {
+ public:
+ ExCLBadResolve(const char *sz)
+ { _msg = strdup(sz); }
+ virtual string description() const
+ {
+ if (_msg) return _msg;
+ else return "(ExCLBadResolve) Number of resolve values did not match number of edit vars";
+ }
+};
+
+class ExCLEditMisuse : public ExCLError {
+ public:
+ ExCLEditMisuse(const char *sz)
+ { _msg = strdup(sz); }
+ virtual string description() const
+ {
+ if (_msg) return _msg;
+ return "(ExCLEditMisuse) Edit protocol usage violation";
+ }
+};
+
+class ExCLTooDifficult : public ExCLError {
+ public:
+ virtual string description() const
+ { return "(ExCLTooDifficult) The constraints are too difficult to solve"; }
+};
+
+class ExCLTooDifficultSpecial : public ExCLTooDifficult {
+ public:
+ ExCLTooDifficultSpecial(const char *sz)
+ { _msg = strdup(sz); }
+ virtual string description() const
+ {
+ if (_msg) return _msg;
+ else return "(ExCLTooDifficultSpecial) Solver requirements are not satisfied";
+ }
+};
+
+class ExCLReadOnlyNotAllowed : public ExCLTooDifficult {
+ public:
+ virtual string description() const
+ { return "(ExCLReadOnlyNotAllowed) The read-only annotation is not permitted by the solver"; }
+};
+
+class ExCLCycleNotAllowed : public ExCLTooDifficult {
+ public:
+ virtual string description() const
+ { return "(ExCLCycleNotAllowed) A cyclic constraint graph is not permitted by the solver"; }
+};
+
+class ExCLStrictInequalityNotAllowed : public ExCLTooDifficult {
+ public:
+ virtual string description() const
+ { return "(ExCLStrictInequalityNotAllowed) The strict inequality is not permitted by the solver"; }
+};
+
+class ExCLRequiredFailure : public ExCLError {
+ public:
+ virtual ~ExCLRequiredFailure() throw() {}
+ virtual string description() const
+ { return "(ExCLRequiredFailure) A required constraint cannot be satisfied"; }
+};
+
+class ExCLNotEnoughStays : public ExCLError {
+ public:
+ virtual string description() const
+ { return "(ExCLNotEnoughStays) There are not enough stays to give specific values to every variable"; }
+};
+
+class ExCLNonlinearExpression : public ExCLError {
+ public:
+ virtual string description() const
+ { return "(ExCLNonlinearExpression) The resulting expression would be nonlinear"; }
+};
+
+class ExCLConstraintNotFound : public ExCLError {
+ public:
+ virtual string description() const
+ { return "(ExCLConstraintNotFound) Tried to remove a constraint that was never added"; }
+};
+
+class ExCLParseError : public ExCLError {
+ public:
+ virtual ~ExCLParseError() throw() {}
+ virtual string description() const
+ { return "(ExCLParseError)"; }
+};
+
+class ExCLParseErrorMisc : public ExCLParseError {
+ public:
+ ExCLParseErrorMisc(const string &s)
+ : _msg("(ExCLParseError) ")
+ { _msg += s; }
+ virtual ~ExCLParseErrorMisc() throw() {}
+ virtual string description() const
+ { return _msg; }
+ private:
+ string _msg;
+};
+
+class ExCLParseErrorBadIdentifier : public ExCLParseError {
+ public:
+ ExCLParseErrorBadIdentifier(const string &id)
+ : _msg("(ExCLParseErrorBadIdentifier) Did not recognize identifier '")
+ {
+ _msg += id;
+ _msg += "'";
+ }
+ virtual ~ExCLParseErrorBadIdentifier() throw() {}
+ virtual string description() const
+ { return _msg; }
+ private:
+ string _msg;
+};
+
+class ExCLRequiredFailureWithExplanation : public ExCLRequiredFailure
+{
+public:
+ virtual ~ExCLRequiredFailureWithExplanation() throw() {}
+ virtual string description() const
+ { return "(ExCLRequiredFailureWithExplanation) A required constraint cannot be satisfied"; }
+ virtual void AddConstraint(const ClConstraint *cnExpl)
+ { _explanation.insert(cnExpl); }
+ virtual const ClConstraintSet & explanation() const
+ { return _explanation; }
+protected:
+ ClConstraintSet _explanation;
+};
+
+#endif // ClErrors_H
diff --git a/libs/cassowary/cassowary/ClFDBinaryOneWayConstraint.h b/libs/cassowary/cassowary/ClFDBinaryOneWayConstraint.h
new file mode 100644
index 0000000000..a779ec1f91
--- /dev/null
+++ b/libs/cassowary/cassowary/ClFDBinaryOneWayConstraint.h
@@ -0,0 +1,94 @@
+// $Id$
+//
+// Cassowary Incremental Constraint Solver
+// Original Smalltalk Implementation by Alan Borning
+// This C++ Implementation by Greg J. Badros, <gjb@cs.washington.edu>
+// http://www.cs.washington.edu/homes/gjb
+// (C) 1998, 1999 Greg J. Badros and Alan Borning
+// See ../LICENSE for legal details regarding this software
+//
+// ClFDBinaryOneWayConstraint.h
+
+#ifndef ClFDBinaryOneWayConstraint_H
+#define ClFDBinaryOneWayConstraint_H
+
+#if defined(HAVE_CONFIG_H) && !defined(CONFIG_H_INCLUDED) && !defined(CONFIG_INLINE_H_INCLUDED)
+#include <cassowary/config-inline.h>
+#define CONFIG_INLINE_H_INCLUDED
+#endif
+
+#include "Cassowary.h"
+#include "ClFDConstraint.h"
+
+class ClLinearConstraint;
+
+// Just a node in the class hierarchy for now
+class ClFDBinaryOneWayConstraint : public ClFDConstraint {
+ private: typedef ClFDConstraint super;
+
+ public:
+
+ ClFDBinaryOneWayConstraint(ClVariable vRW, enum ClCnRelation rel, ClVariable vRO,
+ double coefficient = 1.0, double constant = 0.0,
+ const ClStrength &strength = ClsRequired(),
+ double weight = 1.0)
+ : ClFDConstraint(strength,weight), _vRW(vRW), _rel(rel), _vRO(vRO),
+ _coefficient(coefficient), _constant(constant)
+ { }
+
+ ClFDBinaryOneWayConstraint(ClVariable vRW, enum ClCnRelation rel, double constant,
+ const ClStrength &strength = ClsRequired(),
+ double weight = 1.0)
+ : ClFDConstraint(strength,weight), _vRW(vRW), _rel(rel), _vRO(clvNil),
+ _coefficient(0), _constant(constant)
+ { }
+
+ ClFDBinaryOneWayConstraint(const ClConstraint &cn);
+
+ static void EnsurePreconditionsForCn(const ClConstraint &cn);
+
+ static bool FCanConvertCn(const ClConstraint &cn);
+
+#ifndef CL_NO_IO
+ virtual ostream &PrintOn(ostream &xo) const
+ {
+ xo << "FDCn: " << _vRW << " " << StrCnRelation(_rel) << " ";
+ if (_coefficient != 0) {
+ if (_coefficient != 1) xo << _coefficient << "*";
+ if (_vRO != clvNil) xo << _vRO;
+ }
+ if (_constant != 0) xo << " + " << _constant;
+ return xo;
+ }
+
+ friend ostream& operator<<(ostream &xos, const ClFDBinaryOneWayConstraint &constraint)
+ { return constraint.PrintOn(xos); }
+
+#endif
+
+ ClVariable ClvRW() const
+ { return _vRW; }
+ ClVariable ClvRO() const
+ { return _vRO; }
+ enum ClCnRelation Relation() const
+ { return _rel; }
+ double Coefficient() const
+ { return _coefficient; }
+ double Constant() const
+ { return _constant; }
+
+ bool IsInequality() const
+ { return (_rel != cnEQ && _rel != cnNEQ); }
+
+ bool IsStrictInequality() const
+ { return (_rel == cnGT || _rel == cnLT); }
+
+ protected:
+ ClVariable _vRW;
+ enum ClCnRelation _rel;
+ ClVariable _vRO;
+ double _coefficient;
+ double _constant;
+};
+
+#endif
diff --git a/libs/cassowary/cassowary/ClFDConnectorVariable.h b/libs/cassowary/cassowary/ClFDConnectorVariable.h
new file mode 100644
index 0000000000..4ae38ae42e
--- /dev/null
+++ b/libs/cassowary/cassowary/ClFDConnectorVariable.h
@@ -0,0 +1,89 @@
+// $Id$
+//
+// Cassowary Incremental Constraint Solver
+// Original Smalltalk Implementation by Alan Borning
+// This C++ Implementation by Greg J. Badros, <gjb@cs.washington.edu>
+// http://www.cs.washington.edu/homes/gjb
+// (C) 1998, 1999 Greg J. Badros and Alan Borning
+// See ../LICENSE for legal details regarding this software
+//
+// ClFDConnectorVariable.h
+
+#ifndef ClFDConnectorVariable_H
+#define ClFDConnectorVariable_H
+
+#if defined(HAVE_CONFIG_H) && !defined(CONFIG_H_INCLUDED) && !defined(CONFIG_INLINE_H_INCLUDED)
+#include <cassowary/config-inline.h>
+#define CONFIG_INLINE_H_INCLUDED
+#endif
+
+#include <stdio.h>
+#include <map>
+#include <string>
+#include <list>
+#include "Cassowary.h"
+#include "ClVariable.h"
+#include "ClFDVariable.h"
+#include "ClLinearEquation.h"
+#include "ClSimplexSolver.h"
+
+/* Creates a new variable in the FD region
+ that sets clvFloat in solver (simplex region)
+ when it changes */
+class ClFDConnectorVariable : public ClFDVariable {
+public:
+ typedef ClFDVariable super;
+
+ ClFDConnectorVariable(string name, FDNumber Value, const list<FDNumber> &initial_domain,
+ ClSimplexSolver &solver, ClVariable clvFloat) :
+ ClFDVariable(name,Value,initial_domain),
+ _solver(solver),
+ _clvFloat(clvFloat),
+ _pcnRequiredLink(new ClLinearEquation(clvFloat,Value))
+ { solver.AddConstraint(_pcnRequiredLink); }
+
+#ifndef CL_NO_IO
+ // Prints a semi-descriptive representation to the stream, using the
+ // name if there is one, and otherwise the hash number of this
+ // object.
+ // EXAMPLE
+ // [x:10.0] -- name = "x", Value = 10.0
+ virtual ostream &PrintOn(ostream &xo) const;
+#endif
+
+ // permit overriding in subclasses in case something needs to be
+ // done when the Value is changed by the solver
+ // may be called when the Value hasn't actually changed -- just
+ // means the solver is setting the external variable
+ virtual void ChangeValue(FDNumber Value)
+ {
+ if (_value != Value) {
+ _value = Value;
+ cerr << "Updating " << _clvFloat << " now!" << endl;
+ _solver.RemoveConstraint(_pcnRequiredLink);
+ _pcnRequiredLink->ChangeConstant(_value);
+ _solver.AddConstraint(_pcnRequiredLink);
+ }
+ }
+
+private:
+
+ // similar to SetValue -- see caveat above -- made private for now
+ // since it's probably the wrong thing and is too easy to invoke
+ FDNumber operator=(FDNumber Value)
+ { _value = Value; return Value; }
+
+ // Copy constructor left undefined since we want to
+ // outlaw passing by Value! Will get a link error if you
+ // try to use within ClFDConnectorVariable.c, compile-time error everywhere else
+ ClFDConnectorVariable(const ClFDConnectorVariable &);
+
+ ClSimplexSolver &_solver;
+
+ ClVariable _clvFloat;
+
+ ClLinearEquation *_pcnRequiredLink;
+
+};
+
+#endif
diff --git a/libs/cassowary/cassowary/ClFDConstraint.h b/libs/cassowary/cassowary/ClFDConstraint.h
new file mode 100644
index 0000000000..2cf9776449
--- /dev/null
+++ b/libs/cassowary/cassowary/ClFDConstraint.h
@@ -0,0 +1,40 @@
+// $Id$
+//
+// Cassowary Incremental Constraint Solver
+// Original Smalltalk Implementation by Alan Borning
+// This C++ Implementation by Greg J. Badros, <gjb@cs.washington.edu>
+// http://www.cs.washington.edu/homes/gjb
+// (C) 1998, 1999 Greg J. Badros and Alan Borning
+// See ../LICENSE for legal details regarding this software
+//
+// ClFDConstraint.h
+
+#ifndef ClFDConstraint_H
+#define ClFDConstraint_H
+
+#if defined(HAVE_CONFIG_H) && !defined(CONFIG_H_INCLUDED) && !defined(CONFIG_INLINE_H_INCLUDED)
+#include <cassowary/config-inline.h>
+#define CONFIG_INLINE_H_INCLUDED
+#endif
+
+#include "Cassowary.h"
+#include "ClConstraint.h"
+
+
+// Just a node in the class hierarchy for now
+class ClFDConstraint : public ClConstraint {
+ private: typedef ClConstraint super;
+
+ public:
+ // Constructor
+ ClFDConstraint(const ClStrength &strength = ClsRequired(),
+ double weight = 1.0)
+ : ClConstraint(strength, weight) { }
+
+ virtual bool FIsOkayForSimplexSolver() const { return false; }
+
+ protected:
+
+};
+
+#endif
diff --git a/libs/cassowary/cassowary/ClFDSolver.h b/libs/cassowary/cassowary/ClFDSolver.h
new file mode 100644
index 0000000000..2fbb637764
--- /dev/null
+++ b/libs/cassowary/cassowary/ClFDSolver.h
@@ -0,0 +1,120 @@
+// $Id$
+//
+// Cassowary Incremental Constraint Solver
+// Original Smalltalk Implementation by Alan Borning
+// This C++ Implementation by Greg J. Badros, <gjb@cs.washington.edu>
+// http://www.cs.washington.edu/homes/gjb
+// (C) 1998, 1999 Greg J. Badros and Alan Borning
+// See ../LICENSE for legal details regarding this software
+//
+// ClSolver.h
+
+#ifndef ClFDSolver_H
+#define ClFDSolver_H
+
+#if defined(HAVE_CONFIG_H) && !defined(CONFIG_H_INCLUDED) && !defined(CONFIG_INLINE_H_INCLUDED)
+#include <cassowary/config-inline.h>
+#define CONFIG_INLINE_H_INCLUDED
+#endif
+
+#include "Cassowary.h"
+#include "ClSolver.h"
+#include "ClVariable.h"
+#include "ClErrors.h"
+#include "ClTypedefs.h"
+#include "ClSymbolicWeight.h"
+#include <GTL/graph.h>
+#include <map>
+
+using std::map;
+
+class ClVariable;
+class ClFDBinaryOneWayConstraint;
+
+// ClFDSolver is a concrete class
+// implementing a very restricted (for now --04/23/99 gjb)
+// finite-domain constraint solving algorithm
+class ClFDSolver: public ClSolver {
+ public:
+ ClFDSolver()
+ : _setCns(), _mapClvToCns(), G(), nodeToVar(G)
+ { G.make_directed(); }
+
+ virtual ~ClFDSolver()
+ { }
+
+ virtual ClFDSolver &AddConstraint(ClConstraint *const pcn);
+
+ virtual ClFDSolver &RemoveConstraint(ClConstraint *const pcn);
+
+ virtual ClFDSolver &Solve();
+
+ virtual ClFDSolver &ShowSolve();
+
+ void ChangeClv(ClVariable clv, FDNumber n) {
+ clv.ChangeValue(n);
+ if (_pfnChangeClvCallback) {
+ _pfnChangeClvCallback(&clv,this);
+ }
+ }
+
+
+#ifndef CL_NO_IO
+ ostream &PrintOn(ostream &xo) const;
+
+ ostream &PrintInternalInfo(ostream &xo) const;
+
+ ostream &PrintOnVerbose(ostream &xo) const
+ { PrintOn(xo); PrintInternalInfo(xo); xo << endl; return xo; }
+
+ friend ostream &operator<<(ostream &xo, const ClFDSolver &solver);
+
+#endif
+
+ protected:
+
+ virtual ClFDSolver &AddConstraintInternal(ClConstraint *const pcn);
+
+ virtual ClFDSolver &RemoveConstraintInternal(ClConstraint *const pcn);
+
+ /* Create node for v in G, if necessary,
+ otherwise return the node we already created. */
+ node GetVarNode(ClVariable v);
+
+ /* return the best (lowest) incremental error and the value
+ at which that error occurs */
+ pair<ClSymbolicWeight,FDNumber> ComputeBest(ClFDVariable *pcldv);
+
+ ClSymbolicWeight ErrorForClvAtValSubjectToCn(ClFDVariable *pcldv,
+ FDNumber value,const ClConstraint &cn);
+
+ /* Turn all FDVariable FIsSet() flags to false */
+ void ResetSetFlagsOnVariables();
+
+ /* all the constraints in the solver */
+ ClConstraintSet _setCns;
+
+ /* _mapClvToCns maps variable to the constraints in which
+ it is rw (it omits where it is ro) */
+ ClVarToConstraintSetMap _mapClvToCns;
+
+ /* track what edges correspond to which constraints
+ so we can update the constraint graph when
+ removing a constraint */
+ map<ClConstraint *, edge> _mapCnToEdge;
+
+ /* track what nodes correspond to which variables */
+ map<ClVariable, node> _mapVarToNode;
+
+ /* directed graph that mirrors the structure of
+ the relations of the added constraints */
+ graph G;
+
+ node_map<ClVariable> nodeToVar;
+};
+
+#define FDN_EOL LONG_MIN
+
+void ListPushOnto(list<FDNumber> *pl, ...);
+
+#endif
diff --git a/libs/cassowary/cassowary/ClFDVariable.h b/libs/cassowary/cassowary/ClFDVariable.h
new file mode 100644
index 0000000000..326b339459
--- /dev/null
+++ b/libs/cassowary/cassowary/ClFDVariable.h
@@ -0,0 +1,126 @@
+// $Id$
+//
+// Cassowary Incremental Constraint Solver
+// Original Smalltalk Implementation by Alan Borning
+// This C++ Implementation by Greg J. Badros, <gjb@cs.washington.edu>
+// http://www.cs.washington.edu/homes/gjb
+// (C) 1998, 1999 Greg J. Badros and Alan Borning
+// See ../LICENSE for legal details regarding this software
+//
+// ClFDVariable.h
+
+#ifndef ClFDVariable_H
+#define ClFDVariable_H
+
+#if defined(HAVE_CONFIG_H) && !defined(CONFIG_H_INCLUDED) && !defined(CONFIG_INLINE_H_INCLUDED)
+#include <cassowary/config-inline.h>
+#define CONFIG_INLINE_H_INCLUDED
+#endif
+
+#include <cstdio>
+#include <map>
+#include <string>
+#include <list>
+#include "Cassowary.h"
+#include "ClAbstractVariable.h"
+
+using std::map;
+using std::list;
+using std::string;
+
+class ClFDVariable : public ClAbstractVariable {
+public:
+ typedef ClAbstractVariable super;
+
+#if 0 /* GJB:FIXME:: */
+ ClFDVariable(string name, FDNumber Value) :
+ ClAbstractVariable(name),
+ _value(Value),
+ _fSet(true),
+ _desired_value(Value),
+ _plfdnInitialDomain(0)
+ { }
+#endif
+
+ ClFDVariable(string name, FDNumber Value, const list<FDNumber> &initial_domain) :
+ ClAbstractVariable(name),
+ _value(Value),
+ _fSet(true),
+ _desired_value(Value),
+ _plfdnInitialDomain(new list<FDNumber>())
+ {
+ *_plfdnInitialDomain = initial_domain;
+ }
+
+ virtual bool IsFDVariable() const
+ { return true; }
+
+ // Return true if this a variable known outside the solver.
+ // (We need to give such variables a Value after solving is complete.)
+ virtual bool IsExternal() const
+ { return true; }
+
+#ifndef CL_NO_IO
+ // Prints a semi-descriptive representation to the stream, using the
+ // name if there is one, and otherwise the hash number of this
+ // object.
+ // EXAMPLE
+ // [x:10.0] -- name = "x", Value = 10.0
+ virtual ostream &PrintOn(ostream &xo) const;
+#endif
+
+ // Return the current Value I hold.
+ Number Value() const
+ { return _value; }
+
+ // Round the Value to an integer and return it
+ int IntValue() const
+ { return _value; }
+
+ // change the Value held -- should *not* use this if the variable is
+ // in a solver -- instead use AddEditVar() and SuggestValue() interface
+ void SetValue(FDNumber Value)
+ { _value = Value; }
+
+ // permit overriding in subclasses in case something needs to be
+ // done when the Value is changed by the solver
+ // may be called when the Value hasn't actually changed -- just
+ // means the solver is setting the external variable
+ virtual void ChangeValue(FDNumber Value)
+ { _value = Value; }
+
+ virtual bool FIsSet()
+ { return _fSet; }
+
+ virtual void SetFIsSet(bool f)
+ { _fSet = f; }
+
+ virtual FDNumber DesiredValue() const
+ { return _desired_value; }
+
+ virtual const list<FDNumber> *PlfdnDomain() const
+ { return _plfdnInitialDomain; }
+
+protected:
+
+ // similar to SetValue -- see caveat above -- made private for now
+ // since it's probably the wrong thing and is too easy to invoke
+ FDNumber operator=(FDNumber Value)
+ { _value = Value; return Value; }
+
+ // Copy constructor left undefined since we want to
+ // outlaw passing by Value! Will get a link error if you
+ // try to use within ClFDVariable.c, compile-time error everywhere else
+ ClFDVariable(const ClFDVariable &);
+
+ FDNumber _value;
+
+ // has the _value been set? Used during solves.
+ bool _fSet;
+
+ FDNumber _desired_value;
+
+ list<FDNumber> *_plfdnInitialDomain;
+};
+
+#endif
diff --git a/libs/cassowary/cassowary/ClFloatVariable.h b/libs/cassowary/cassowary/ClFloatVariable.h
new file mode 100644
index 0000000000..4e58036ab7
--- /dev/null
+++ b/libs/cassowary/cassowary/ClFloatVariable.h
@@ -0,0 +1,119 @@
+// $Id$
+//
+// Cassowary Incremental Constraint Solver
+// Original Smalltalk Implementation by Alan Borning
+// This C++ Implementation by Greg J. Badros, <gjb@cs.washington.edu>
+// http://www.cs.washington.edu/homes/gjb
+// (C) 1998, 1999 Greg J. Badros and Alan Borning
+// See ../LICENSE for legal details regarding this software
+//
+// ClFloatVariable.h
+
+#ifndef ClFloatVariable_H
+#define ClFloatVariable_H
+
+#if defined(HAVE_CONFIG_H) && !defined(CONFIG_H_INCLUDED) && !defined(CONFIG_INLINE_H_INCLUDED)
+#include <cassowary/config-inline.h>
+#define CONFIG_INLINE_H_INCLUDED
+#endif
+
+#include <cstdio>
+#include <map>
+#include <string>
+#include "Cassowary.h"
+#include "ClAbstractVariable.h"
+
+using std::map;
+using std::string;
+
+class ClFloatVariable : public ClAbstractVariable {
+public:
+ typedef ClAbstractVariable super;
+
+ ClFloatVariable(string name, Number Value = 0.0) :
+ ClAbstractVariable(name),
+ _value(Value)
+ { }
+
+ ClFloatVariable(Number Value = 0.0) :
+ ClAbstractVariable(""),
+ _value(Value)
+ { }
+
+ ClFloatVariable(long number, char *prefix, Number Value = 0.0) :
+ ClAbstractVariable(number,prefix),
+ _value(Value)
+ { }
+
+ virtual bool IsFloatVariable() const
+ { return true; }
+
+ // Return true if this a dummy variable (used as a marker variable
+ // for required equality constraints). Such variables aren't
+ // allowed to enter the basis when pivoting.
+ virtual bool IsDummy() const
+ { return false; }
+
+ // Return true if this a variable known outside the solver.
+ // (We need to give such variables a Value after solving is complete.)
+ virtual bool IsExternal() const
+ { return true; }
+
+ // Return true if we can Pivot on this variable.
+ virtual bool IsPivotable() const
+ { return false; }
+
+ // Return true if this is a restricted (or slack) variable. Such
+ // variables are constrained to be non-negative and occur only
+ // internally to the simplex solver.
+ virtual bool IsRestricted() const
+ { return false; }
+
+#ifndef CL_NO_IO
+ // Prints a semi-descriptive representation to the stream, using the
+ // name if there is one, and otherwise the hash number of this
+ // object.
+ // EXAMPLE
+ // [x:10.0] -- name = "x", Value = 10.0
+ virtual ostream &PrintOn(ostream &xo) const;
+#endif
+
+ // Return the current Value I hold.
+ Number Value() const
+ { return _value; }
+
+ // Round the Value to an integer and return it
+ int IntValue() const
+ { return int(_value + 0.5); }
+
+ // change the Value held -- should *not* use this if the variable is
+ // in a solver -- instead use AddEditVar() and SuggestValue() interface
+ void SetValue(Number Value)
+ { _value = Value; }
+
+ // permit overriding in subclasses in case something needs to be
+ // done when the Value is changed by the solver
+ // may be called when the Value hasn't actually changed -- just
+ // means the solver is setting the external variable
+ virtual void ChangeValue(Number Value)
+ { _value = Value; }
+
+private:
+
+ // similar to SetValue -- see caveat above -- made private for now
+ // since it's probably the wrong thing and is too easy to invoke
+ Number operator=(Number Value)
+ { _value = Value; return Value; }
+
+ // Copy constructor left undefined since we want to
+ // outlaw passing by Value! Will get a link error if you
+ // try to use within ClFloatVariable.c, compile-time error everywhere else
+ ClFloatVariable(const ClFloatVariable &);
+
+ Number _value;
+
+};
+
+
+
+#endif
diff --git a/libs/cassowary/cassowary/ClLinearConstraint.h b/libs/cassowary/cassowary/ClLinearConstraint.h
new file mode 100644
index 0000000000..d657d1d73e
--- /dev/null
+++ b/libs/cassowary/cassowary/ClLinearConstraint.h
@@ -0,0 +1,61 @@
+// $Id$
+//
+// Cassowary Incremental Constraint Solver
+// Original Smalltalk Implementation by Alan Borning
+// This C++ Implementation by Greg J. Badros, <gjb@cs.washington.edu>
+// http://www.cs.washington.edu/homes/gjb
+// (C) 1998, 1999 Greg J. Badros and Alan Borning
+// See ../LICENSE for legal details regarding this software
+//
+// ClLinearConstraint.h
+
+#ifndef ClLinearConstraint_H
+#define ClLinearConstraint_H
+
+#if defined(HAVE_CONFIG_H) && !defined(CONFIG_H_INCLUDED) && !defined(CONFIG_INLINE_H_INCLUDED)
+#include <cassowary/config-inline.h>
+#define CONFIG_INLINE_H_INCLUDED
+#endif
+
+#include "Cassowary.h"
+#include "ClConstraint.h"
+#include "ClLinearExpression.h"
+
+
+// Add the ClLinearExpression member variable needed for both
+// ClLinearEquation and ClLinearInequality
+class ClLinearConstraint : public ClConstraint {
+ private: typedef ClConstraint super;
+
+ public:
+
+ // Constructor
+ ClLinearConstraint(const ClLinearExpression &cle,
+ const ClStrength &strength = ClsRequired(),
+ double weight = 1.0) :
+ ClConstraint(strength, weight),
+ _expression(cle)
+ { }
+
+ virtual ~ClLinearConstraint() {}
+
+ // Return my linear Expression. (For linear equations, this
+ // constraint represents Expression=0; for linear inequalities it
+ // represents Expression>=0.)
+ ClLinearExpression Expression() const
+ { return _expression; }
+
+ // do not do this if *this is inside a solver
+ void ChangeConstant(Number constant)
+ { _expression.Set_constant(constant); }
+
+ protected:
+
+ ClLinearExpression _expression;
+
+ virtual void setExpression( const ClLinearExpression &expr)
+ { _expression = expr; }
+
+};
+
+#endif
diff --git a/libs/cassowary/cassowary/ClLinearEquation.h b/libs/cassowary/cassowary/ClLinearEquation.h
new file mode 100644
index 0000000000..a02b51d70b
--- /dev/null
+++ b/libs/cassowary/cassowary/ClLinearEquation.h
@@ -0,0 +1,74 @@
+// $Id$
+//
+// Cassowary Incremental Constraint Solver
+// Original Smalltalk Implementation by Alan Borning
+// This C++ Implementation by Greg J. Badros, <gjb@cs.washington.edu>
+// http://www.cs.washington.edu/homes/gjb
+// (C) 1998, 1999 Greg J. Badros and Alan Borning
+// See ../LICENSE for legal details regarding this software
+//
+// ClLinearEquation.h
+
+#ifndef ClLinearEquation_H
+#define ClLinearEquation_H
+
+#if defined(HAVE_CONFIG_H) && !defined(CONFIG_H_INCLUDED) && !defined(CONFIG_INLINE_H_INCLUDED)
+#include <cassowary/config-inline.h>
+#define CONFIG_INLINE_H_INCLUDED
+#endif
+
+#include "Cassowary.h"
+#include "ClLinearConstraint.h"
+#include "ClLinearExpression.h"
+
+class ClStrength;
+class ClVariable;
+
+class ClLinearEquation : public ClLinearConstraint {
+ private: typedef ClLinearConstraint super;
+
+ public:
+ //// Constructors
+
+ // ClLinearEquation(expr,...) is expr == 0
+ ClLinearEquation(const ClLinearExpression &cle,
+ const ClStrength &strength = ClsRequired(),
+ double weight = 1.0) :
+ ClLinearConstraint(cle,strength, weight)
+ { }
+
+ // ClLinearEquation(var,expr,...) is var == expr
+ ClLinearEquation(ClVariable clv,
+ const ClLinearExpression &cle,
+ const ClStrength &strength = ClsRequired(),
+ double weight = 1.0) :
+ ClLinearConstraint(cle,strength,weight)
+ { _expression.AddVariable(clv,-1.0); }
+
+ // ClLinearEquation(expr,var,...) is var == expr
+ ClLinearEquation(const ClLinearExpression &cle,
+ ClVariable clv,
+ const ClStrength &strength = ClsRequired(),
+ double weight = 1.0) :
+ ClLinearConstraint(cle,strength,weight)
+ { _expression.AddVariable(clv,-1.0); }
+
+ // ClLinearEquation(expr,expr,...) is expr == expr
+ ClLinearEquation(const ClLinearExpression &cle1,
+ const ClLinearExpression &cle2,
+ const ClStrength &strength = ClsRequired(),
+ double weight = 1.0) :
+ ClLinearConstraint(cle1,strength,weight)
+ { _expression.AddExpression(cle2,-1.0); }
+
+#ifndef CL_NO_IO
+ virtual ostream &PrintOn(ostream &xo) const
+ { super::PrintOn(xo); xo << " = 0 )"; return xo; }
+#endif
+
+ virtual bool FIsSatisfied() const
+ { return (_expression.Evaluate() == 0); }
+
+};
+
+#endif
diff --git a/libs/cassowary/cassowary/ClLinearExpression.h b/libs/cassowary/cassowary/ClLinearExpression.h
new file mode 100644
index 0000000000..0a1df9c243
--- /dev/null
+++ b/libs/cassowary/cassowary/ClLinearExpression.h
@@ -0,0 +1,298 @@
+// $Id$
+//
+// Cassowary Incremental Constraint Solver
+// Original Smalltalk Implementation by Alan Borning
+// This C++ Implementation by Greg J. Badros, <gjb@cs.washington.edu>
+// http://www.cs.washington.edu/homes/gjb
+// (C) 1998, 1999 Greg J. Badros and Alan Borning
+// See ../LICENSE for legal details regarding this software
+//
+// ClLinearExpression.h
+
+#ifndef ClLinearExpression_H
+#define ClLinearExpression_H
+
+#if defined(HAVE_CONFIG_H) && !defined(CONFIG_H_INCLUDED) && !defined(CONFIG_INLINE_H_INCLUDED)
+#include <cassowary/config-inline.h>
+#define CONFIG_INLINE_H_INCLUDED
+#endif
+
+#include "Cassowary.h"
+#include "debug.h"
+#include "ClVariable.h"
+#include "ClLinearExpression_fwd.h"
+
+class ClSimplexSolver;
+class ClTableau;
+class ClSymbolicWeight;
+
+ClLinearExpression &cleNil();
+
+template <class T>
+class ClGenericLinearExpression {
+ public:
+ typedef std::map<ClVariable,T> ClVarToCoeffMap;
+
+ // convert Number-s into ClLinearExpression-s
+ ClGenericLinearExpression(T num = 0.0);
+
+ // Convert from ClVariable to a ClLinearExpression
+ // this replaces ClVariable::asLinearExpression
+ ClGenericLinearExpression(ClVariable clv, T value = 1.0, T constant = 0.0);
+
+ // copy ctr
+ ClGenericLinearExpression(const ClGenericLinearExpression<T> &expr) :
+ _constant(expr._constant),
+ _terms(expr._terms)
+ { }
+
+ virtual ~ClGenericLinearExpression();
+
+ // Return a new linear expression formed by multiplying self by x.
+ // (Note that this result must be linear.)
+ ClGenericLinearExpression<T> Times(Number x) const;
+
+ // Return a new linear expression formed by multiplying self by x.
+ // (Note that this result must be linear.)
+ ClGenericLinearExpression<T> Times(const ClGenericLinearExpression<T> &expr) const;
+
+ // Return a new linear expression formed by adding x to self.
+ ClGenericLinearExpression<T> Plus(const ClGenericLinearExpression<T> &expr) const;
+
+ // Return a new linear expression formed by subtracting x from self.
+ ClGenericLinearExpression<T> Minus(const ClGenericLinearExpression<T> &expr) const;
+
+ // Return a new linear expression formed by dividing self by x.
+ // (Note that this result must be linear.)
+ ClGenericLinearExpression<T> Divide(Number x) const;
+
+
+
+ // Return a new linear expression formed by multiplying self by x.
+ // (Note that this result must be linear.)
+ ClGenericLinearExpression<T> *P_times(Number x) const
+ { return new ClGenericLinearExpression<T>(Times(x)); }
+
+ // Return a new linear expression formed by adding x to self.
+ ClGenericLinearExpression<T> *P_plus(const ClGenericLinearExpression<T> &expr) const
+ { return new ClGenericLinearExpression<T>(Plus(expr)); }
+
+ // Return a new linear expression formed by subtracting x from self.
+ ClGenericLinearExpression<T> *P_minus(const ClGenericLinearExpression<T> &expr) const
+ { return new ClGenericLinearExpression<T>(Minus(expr)); }
+
+ // Return a new linear expression formed by dividing self by x.
+ // (Note that this result must be linear.)
+ ClGenericLinearExpression<T> *P_divide(Number x) const
+ { return new ClGenericLinearExpression<T>(Divide(x)); }
+
+ // Return a new linear expression formed by dividing self by x.
+ // (Note that this result must be linear.)
+ ClGenericLinearExpression<T> Divide(const ClGenericLinearExpression<T> &expr) const;
+
+ // Return a new linear expression (aNumber/this). Since the result
+ // must be linear, this is permissible only if 'this' is a constant.
+ ClGenericLinearExpression<T> DivFrom(const ClGenericLinearExpression<T> &expr) const;
+
+ // Return a new linear expression (aNumber-this).
+ ClGenericLinearExpression<T> SubtractFrom(const ClGenericLinearExpression<T> &expr) const
+ { return expr.Minus(*this); }
+
+ // Add n*expr to this expression from another expression expr.
+ ClGenericLinearExpression<T> &AddExpression(const ClGenericLinearExpression<T> &expr,
+ Number n = 1.0);
+
+ // Add n*expr to this expression from another expression expr.
+ // Notify the solver if a variable is added or deleted from this
+ // expression.
+ ClGenericLinearExpression<T> &AddExpression(const ClGenericLinearExpression<T> &expr, Number n,
+ ClVariable subject,
+ ClTableau &solver);
+
+ // Add a term c*v to this expression. If the expression already
+ // contains a term involving v, Add c to the existing coefficient.
+ // If the new coefficient is approximately 0, delete v.
+ ClGenericLinearExpression<T> &AddVariable(ClVariable v, T c = 1.0);
+
+ // Add a term c*v to this expression. If the expression already
+ // contains a term involving v, Add c to the existing coefficient.
+ // If the new coefficient is approximately 0, delete v.
+ ClGenericLinearExpression<T> &setVariable(ClVariable v, T c)
+ {assert(c != 0.0); _terms[v] = c; return *this; }
+
+ // Add a term c*v to this expression. If the expression already
+ // contains a term involving v, Add c to the existing coefficient.
+ // If the new coefficient is approximately 0, delete v. Notify the
+ // solver if v appears or disappears from this expression.
+ ClGenericLinearExpression<T> &AddVariable(ClVariable v, T c,
+ ClVariable subject,
+ ClTableau &solver);
+
+ // Return a pivotable variable in this expression. (It is an error
+ // if this expression is constant -- signal ExCLInternalError in
+ // that case). Return NULL if no pivotable variables
+ ClVariable AnyPivotableVariable() const;
+
+ // Replace var with a symbolic expression expr that is equal to it.
+ // If a variable has been added to this expression that wasn't there
+ // before, or if a variable has been dropped from this expression
+ // because it now has a coefficient of 0, inform the solver.
+ // PRECONDITIONS:
+ // var occurs with a non-Zero coefficient in this expression.
+ void SubstituteOut(ClVariable v,
+ const ClGenericLinearExpression<T> &expr,
+ ClVariable subject,
+ ClTableau &solver);
+
+ // This linear expression currently represents the equation
+ // oldSubject=self. Destructively modify it so that it represents
+ // the equation NewSubject=self.
+ //
+ // Precondition: NewSubject currently has a nonzero coefficient in
+ // this expression.
+ //
+ // NOTES
+ // Suppose this expression is c + a*NewSubject + a1*v1 + ... + an*vn.
+ //
+ // Then the current equation is
+ // oldSubject = c + a*NewSubject + a1*v1 + ... + an*vn.
+ // The new equation will be
+ // NewSubject = -c/a + oldSubject/a - (a1/a)*v1 - ... - (an/a)*vn.
+ // Note that the term involving NewSubject has been dropped.
+ void ChangeSubject(ClVariable old_subject,
+ ClVariable new_subject);
+
+ // This linear expression currently represents the equation self=0. Destructively modify it so
+ // that subject=self represents an equivalent equation.
+ //
+ // Precondition: subject must be one of the variables in this expression.
+ // NOTES
+ // Suppose this expression is
+ // c + a*subject + a1*v1 + ... + an*vn
+ // representing
+ // c + a*subject + a1*v1 + ... + an*vn = 0
+ // The modified expression will be
+ // subject = -c/a - (a1/a)*v1 - ... - (an/a)*vn
+ // representing
+ // subject = -c/a - (a1/a)*v1 - ... - (an/a)*vn
+ //
+ // Note that the term involving subject has been dropped.
+ // Returns the reciprocal, so ChangeSubject can use it, too
+ T NewSubject(ClVariable subject);
+
+ // Return the value of the linear expression
+ // given the current assignments of values to contained variables
+ T Evaluate() const;
+
+ // Return the coefficient corresponding to variable var, i.e.,
+ // the 'ci' corresponding to the 'vi' that var is:
+ // v1*c1 + v2*c2 + .. + vn*cn + c
+ T CoefficientFor(ClVariable var) const
+ {
+ typename ClVarToCoeffMap::const_iterator it = _terms.find(var);
+ if (it != _terms.end())
+ return (*it).second;
+ return 0.0;
+ }
+
+ T Constant() const
+ { return _constant; }
+
+ void Set_constant(T c)
+ { _constant = c; }
+
+ const ClVarToCoeffMap &Terms() const
+ { return _terms; }
+
+ ClVarToCoeffMap &Terms()
+ { return _terms; }
+
+ void IncrementConstant(T c)
+ { _constant += c; }
+
+ bool IsConstant() const
+ { return _terms.size() == 0; }
+
+#ifndef CL_NO_IO
+ virtual ostream &PrintOn(ostream &xo) const;
+
+ friend ostream &operator<<(ostream &xo,const ClGenericLinearExpression<T> &cle)
+ { return cle.PrintOn(xo); }
+#endif
+
+ friend ClGenericLinearExpression<T> operator+(const ClGenericLinearExpression<T> &e1,
+ const ClGenericLinearExpression<T> &e2)
+ { return e1.Plus(e2); }
+
+ friend ClGenericLinearExpression<T> operator-(const ClGenericLinearExpression<T> &e1,
+ const ClGenericLinearExpression<T> &e2)
+ { return e1.Minus(e2); }
+
+ friend ClGenericLinearExpression<T> operator*(const ClGenericLinearExpression<T> &e1,
+ const ClGenericLinearExpression<T> &e2)
+ { return e1.Times(e2); }
+
+
+ friend ClGenericLinearExpression<T> operator/(const ClGenericLinearExpression<T> &e1,
+ const ClGenericLinearExpression<T> &e2)
+ { return e1.Divide(e2); }
+
+ // FIXGJB -- this may be wrong -- should test underlying expression for equality
+ friend bool operator==(const ClGenericLinearExpression<T> &e1,
+ const ClGenericLinearExpression<T> &e2)
+ { return &e1 == &e2; }
+
+ /// Named versions of the operator functions for ease of
+ /// wrapping, or expressing using prefix notation
+
+ friend ClGenericLinearExpression<T> Plus(const ClGenericLinearExpression<T> &e1,
+ const ClGenericLinearExpression<T> &e2)
+ { return e1.Plus(e2); }
+
+ friend ClGenericLinearExpression<T> Minus(const ClGenericLinearExpression<T> &e1,
+ const ClGenericLinearExpression<T> &e2)
+ { return e1.Minus(e2); }
+
+ friend ClGenericLinearExpression<T> Times(const ClGenericLinearExpression<T> &e1,
+ const ClGenericLinearExpression<T> &e2)
+ { return e1.Times(e2); }
+
+
+ friend ClGenericLinearExpression<T> *Divide(const ClGenericLinearExpression<T> &e1,
+ const ClGenericLinearExpression<T> &e2)
+ { return new ClGenericLinearExpression<T>(e1.Divide(e2)); }
+
+ friend ClGenericLinearExpression<T> *p_Plus(const ClGenericLinearExpression<T> &e1,
+ const ClGenericLinearExpression<T> &e2)
+ { return new ClGenericLinearExpression<T>(e1.Plus(e2)); }
+
+ friend ClGenericLinearExpression<T> *p_Minus(const ClGenericLinearExpression<T> &e1,
+ const ClGenericLinearExpression<T> &e2)
+ { return new ClGenericLinearExpression<T>(e1.Minus(e2)); }
+
+ friend ClGenericLinearExpression<T> *p_Times(const ClGenericLinearExpression<T> &e1,
+ const ClGenericLinearExpression<T> &e2)
+ { return new ClGenericLinearExpression<T>(e1.Times(e2)); }
+
+ friend ClGenericLinearExpression<T> *p_Divide(const ClGenericLinearExpression<T> &e1,
+ const ClGenericLinearExpression<T> &e2)
+ { return new ClGenericLinearExpression<T>(e1.Divide(e2)); }
+
+
+ // FIXGJB -- this may be wrong -- should test underlying expression for equality
+ friend bool FEquals(const ClGenericLinearExpression<T> &e1,
+ const ClGenericLinearExpression<T> &e2)
+ { return &e1 == &e2; }
+
+ ClGenericLinearExpression<T> &MultiplyMe(T x);
+
+ private:
+
+ T _constant;
+ ClVarToCoeffMap _terms;
+
+};
+
+typedef ClGenericLinearExpression<Number>::ClVarToCoeffMap ClVarToNumberMap;
+
+#endif
diff --git a/libs/cassowary/cassowary/ClLinearExpression_fwd.h b/libs/cassowary/cassowary/ClLinearExpression_fwd.h
new file mode 100644
index 0000000000..99b48557ec
--- /dev/null
+++ b/libs/cassowary/cassowary/ClLinearExpression_fwd.h
@@ -0,0 +1,26 @@
+// $Id$
+//
+// Cassowary Incremental Constraint Solver
+// Original Smalltalk Implementation by Alan Borning
+// This C++ Implementation by Greg J. Badros, <gjb@cs.washington.edu>
+// http://www.cs.washington.edu/homes/gjb
+// (C) 1998, 1999 Greg J. Badros and Alan Borning
+// See ../LICENSE for legal details regarding this software
+//
+// ClLinearExpression.h
+
+#ifndef ClLinearExpression_fwd_H
+#define ClLinearExpression_fwd_H
+
+#if defined(HAVE_CONFIG_H) && !defined(CONFIG_H_INCLUDED) && !defined(CONFIG_INLINE_H_INCLUDED)
+#include <cassowary/config-inline.h>
+#define CONFIG_INLINE_H_INCLUDED
+#endif
+
+#include "Cassowary.h"
+
+template <class T> class ClGenericLinearExpression;
+typedef ClGenericLinearExpression<Number> ClLinearExpression;
+typedef ClLinearExpression* PClLinearExpression;
+
+#endif
diff --git a/libs/cassowary/cassowary/ClLinearInequality.h b/libs/cassowary/cassowary/ClLinearInequality.h
new file mode 100644
index 0000000000..017c4b819e
--- /dev/null
+++ b/libs/cassowary/cassowary/ClLinearInequality.h
@@ -0,0 +1,167 @@
+// $Id$
+//
+// Cassowary Incremental Constraint Solver
+// Original Smalltalk Implementation by Alan Borning
+// This C++ Implementation by Greg J. Badros, <gjb@cs.washington.edu>
+// http://www.cs.washington.edu/homes/gjb
+// (C) 1998, 1999 Greg J. Badros and Alan Borning
+// See ../LICENSE for legal details regarding this software
+//
+// ClLinearInequality.h
+
+#ifndef ClLinearInequality_H
+#define ClLinearInequality_H
+
+#if defined(HAVE_CONFIG_H) && !defined(CONFIG_H_INCLUDED) && !defined(CONFIG_INLINE_H_INCLUDED)
+#include <cassowary/config-inline.h>
+#define CONFIG_INLINE_H_INCLUDED
+#endif
+
+#include "ClConstraint.h"
+#include "ClLinearConstraint.h"
+
+class ClVariable;
+
+class ClLinearInequality : public ClLinearConstraint {
+ private: typedef ClLinearConstraint super;
+
+ public:
+ //// Constructors
+ // ClLinearInequality(expr,...) is expr >= 0
+ ClLinearInequality(const ClLinearExpression &cle,
+ const ClStrength &strength = ClsRequired(),
+ double weight = 1.0) :
+ ClLinearConstraint(cle,strength, weight),
+ _fStrictInequality(false)
+ { }
+
+ // ClLinearInequality(var,OP,expr) is var >= expr
+ ClLinearInequality(const ClVariable clv,
+ enum ClCnRelation op,
+ const ClLinearExpression &cle,
+ const ClStrength &strength = ClsRequired(),
+ double weight = 1.0) :
+ ClLinearConstraint( cle, strength, weight),
+ _fStrictInequality(false)
+ {
+ if (op == cnGEQ || op == cnGT)
+ {
+ _expression.MultiplyMe(-1.0);
+ _expression.AddVariable(clv,1.0);
+ }
+ else if (op == cnLEQ || op == cnGEQ)
+ {
+ _expression.AddVariable(clv,-1.0);
+ }
+ else
+ {
+ throw ExCLEditMisuse("Cannot use that operator for ClLinearInequality objects");
+ }
+ if (op == cnLT || op == cnGT) {
+ _fStrictInequality = true;
+ }
+ }
+
+#ifdef FIXGJB_AMBIGUOUS
+ // ClLinearInequality(expr,OP,var) is var ?<>? expr
+ ClLinearInequality(const ClLinearExpression &cle,
+ enum ClCnRelation op,
+ const ClVariable clv,
+ const ClStrength &strength = ClsRequired(),
+ double weight = 1.0) :
+ ClLinearConstraint( cle, strength, weight),
+ _fStrictInequality(false)
+ {
+ if (op == cnLEQ || op == cnLT)
+ {
+ _expression.MultiplyMe(-1.0);
+ _expression.AddVariable(clv,1.0);
+ }
+ else if (op == cnGEQ || op == cnGT)
+ {
+ _expression.AddVariable(clv,-1.0);
+ }
+ if (op == cnLT || op == cnGT) {
+ _fStrictInequality = true;
+ }
+ }
+#endif
+
+ // ClLinearInequality(expr,OP,expr) is expr >= expr
+ ClLinearInequality(const ClLinearExpression &cle1,
+ enum ClCnRelation op,
+ const ClLinearExpression &cle2,
+ const ClStrength &strength = ClsRequired(),
+ double weight = 1.0) :
+ ClLinearConstraint( cle2, strength, weight),
+ _fStrictInequality(false)
+ {
+ if (op == cnGEQ || op == cnGT)
+ {
+ _expression.MultiplyMe(-1.0);
+ _expression.AddExpression(cle1);
+ }
+ else if (op == cnLEQ || op == cnLT)
+ {
+ _expression.AddExpression(cle1,-1.0);
+ }
+ if (op == cnLT || op == cnGT) {
+ _fStrictInequality = true;
+ }
+ }
+
+#ifdef FIXGJB_AMBIGUOUS
+ // ClLinearInequality(var,OP,var) is var ?<>? var
+ ClLinearInequality(const ClVariable clv1,
+ enum ClCnRelation op,
+ const ClVariable clv2,
+ const ClStrength &strength = ClsRequired(),
+ double weight = 1.0) :
+ ClLinearConstraint( clv2, strength, weight),
+ _fStrictInequality(false)
+ {
+ if (op == cnGEQ || op == cnGT)
+ {
+ _expression.MultiplyMe(-1.0);
+ _expression.AddVariable(clv1,1.0);
+ }
+ else if (op == cnLEQ || op == cnLT)
+ {
+ _expression.AddVariable(clv1,-1.0);
+ }
+ if (op == cnLT || op == cnGT) {
+ _fStrictInequality = true;
+ }
+ }
+#endif
+
+
+ // Return true if this is an inequality constraint and
+ // false if it is an equality constraint. The default is
+ // that it is not.
+ virtual bool IsInequality() const
+ { return true; }
+
+ virtual bool IsStrictInequality() const
+ { return _fStrictInequality; }
+
+#ifndef CL_NO_IO
+ virtual ostream &PrintOn(ostream &xo) const
+ { super::PrintOn(xo); xo << " >= 0 )"; return xo; }
+#endif
+
+ virtual bool FIsSatisfied() const
+ {
+ Number v = _expression.Evaluate();
+ if (_fStrictInequality)
+ return (v > 0);
+ else
+ return (v >= 0);
+ }
+
+ private:
+
+ bool _fStrictInequality;
+};
+
+#endif
diff --git a/libs/cassowary/cassowary/ClObjectiveVariable.h b/libs/cassowary/cassowary/ClObjectiveVariable.h
new file mode 100644
index 0000000000..664e2d65a4
--- /dev/null
+++ b/libs/cassowary/cassowary/ClObjectiveVariable.h
@@ -0,0 +1,63 @@
+// $Id$
+//
+// Cassowary Incremental Constraint Solver
+// Original Smalltalk Implementation by Alan Borning
+// This C++ Implementation by Greg J. Badros, <gjb@cs.washington.edu>
+// http://www.cs.washington.edu/homes/gjb
+// (C) 1998, 1999 Greg J. Badros and Alan Borning
+// See ../LICENSE for legal details regarding this software
+//
+// ClObjectiveVariable.h
+
+#ifndef ClObjectiveVariable_H
+#define ClObjectiveVariable_H
+
+#if defined(HAVE_CONFIG_H) && !defined(CONFIG_H_INCLUDED) && !defined(CONFIG_INLINE_H_INCLUDED)
+#include <cassowary/config-inline.h>
+#define CONFIG_INLINE_H_INCLUDED
+#endif
+
+#include "Cassowary.h"
+#include "ClAbstractVariable.h"
+
+class ClTableau;
+class ClSimplexSolver;
+
+class ClObjectiveVariable : public ClAbstractVariable {
+protected:
+ friend class ClTableau;
+ friend class ClSimplexSolver;
+
+ ClObjectiveVariable(string name = "") :
+ ClAbstractVariable(name)
+ { }
+
+ ClObjectiveVariable(long number, char *prefix) :
+ ClAbstractVariable(number,prefix)
+ { }
+
+#ifndef CL_NO_IO
+ virtual ostream &PrintOn(ostream &xo) const
+ {
+ xo << "[" << Name() << ":obj]";
+ return xo;
+ }
+#endif
+
+ // We don't need to give such variables a Value after solving is complete.
+ virtual bool IsExternal() const
+ { return false; }
+
+ // Return true if we can Pivot on this variable.
+ virtual bool IsPivotable() const
+ { return false; }
+
+ // Return true if this is a restricted (or slack) variable. Such
+ // variables are constrained to be non-negative and occur only
+ // internally to the simplex solver.
+ virtual bool IsRestricted() const
+ { return false; }
+
+};
+
+#endif
diff --git a/libs/cassowary/cassowary/ClPoint.h b/libs/cassowary/cassowary/ClPoint.h
new file mode 100644
index 0000000000..15139aa73b
--- /dev/null
+++ b/libs/cassowary/cassowary/ClPoint.h
@@ -0,0 +1,74 @@
+// $Id$
+//
+// Cassowary Incremental Constraint Solver
+// Original Smalltalk Implementation by Alan Borning
+// This C++ Implementation by Greg J. Badros, <gjb@cs.washington.edu>
+// http://www.cs.washington.edu/homes/gjb
+// (C) 1998, 1999 Greg J. Badros and Alan Borning
+// See ../LICENSE for legal details regarding this software
+//
+// ClPoint.h
+
+#ifndef ClPoint_H
+#define ClPoint_H
+
+#if defined(HAVE_CONFIG_H) && !defined(CONFIG_H_INCLUDED) && !defined(CONFIG_INLINE_H_INCLUDED)
+#include <cassowary/config-inline.h>
+#define CONFIG_INLINE_H_INCLUDED
+#endif
+
+#include "Cassowary.h"
+#include "ClVariable.h"
+
+// ClPoint is just a convenience class for pairs of
+// ClVariables -- often useful for coordinate pairs in 2-space
+class ClPoint {
+ public:
+ ClPoint(Number x, Number y)
+ : _clv_x(x), _clv_y(y)
+ { }
+
+ ClPoint()
+ { }
+
+ ClVariable X()
+ { return _clv_x; }
+
+ ClVariable Y()
+ { return _clv_y; }
+
+ const ClVariable X() const
+ { return _clv_x; }
+
+ const ClVariable Y() const
+ { return _clv_y; }
+
+ void SetXY(Number x, Number y)
+ { _clv_x.SetValue(x); _clv_y.SetValue(y); }
+
+ Number Xvalue() const
+ { return X().Value(); }
+
+ Number Yvalue() const
+ { return Y().Value(); }
+
+ private:
+ ClVariable _clv_x;
+ ClVariable _clv_y;
+
+#ifndef CL_NO_IO
+ friend ostream &operator<<(ostream &xo, const ClPoint &clp);
+#endif
+
+};
+
+#ifndef CL_NO_IO
+inline ostream &
+operator<<(ostream &xo, const ClPoint &clp)
+{
+ xo << "(" << clp._clv_x << ", " << clp._clv_y << ")";
+ return xo;
+}
+#endif
+
+#endif
diff --git a/libs/cassowary/cassowary/ClReader.h b/libs/cassowary/cassowary/ClReader.h
new file mode 100644
index 0000000000..59369d6ac2
--- /dev/null
+++ b/libs/cassowary/cassowary/ClReader.h
@@ -0,0 +1,117 @@
+// $Id$
+//
+// Cassowary Incremental Constraint Solver
+// Original Smalltalk Implementation by Alan Borning
+// This C++ Implementation by Greg J. Badros, <gjb@cs.washington.edu>
+// http://www.cs.washington.edu/homes/gjb
+// (C) 1998, 1999 Greg J. Badros and Alan Borning
+// See ../LICENSE for legal details regarding this software
+//
+// ClReader.h
+// Original implementation contributed by Steve Wolfman
+// Subsequently largely revised by Greg J. Badros
+
+#ifndef CREADER_H
+#define CREADER_H
+
+#if defined(HAVE_CONFIG_H) && !defined(CONFIG_H_INCLUDED) && !defined(CONFIG_INLINE_H_INCLUDED)
+#include <cassowary/config-inline.h>
+#define CONFIG_INLINE_H_INCLUDED
+#endif
+
+#include <string>
+#include <map>
+#include <algorithm>
+#include <iostream>
+#include "ClErrors.h"
+#include "ClVariable.h"
+#include "ClStrength.h"
+#include "ClLinearExpression_fwd.h"
+
+using std::string;
+using std::istream;
+
+class ClConstraint;
+
+class ClVarLookupFunction : public std::unary_function<const string &,ClVariable *> {
+public:
+ virtual ClVariable *operator()(const string &) const { return &clvNil; }
+};
+
+
+// Attempts to read a constraint of input stream in
+// Returns constraint (freshly allocated, client responsibility to deallocate)
+// if succesful. Otherwise, returns 0.
+ClConstraint *PcnParseConstraint(istream &xi, const ClVarLookupFunction &lookup_func,
+ const ClStrength &strength = ClsRequired());
+
+class ClVarLookupInMap : public ClVarLookupFunction {
+public:
+ ClVarLookupInMap(StringToVarMap *pmapVars, bool fAutoCreate)
+ : _pmapVars(pmapVars), _fAutoCreate(fAutoCreate) { }
+
+ ClVariable *operator()(const string &str) const
+ {
+ if (!_pmapVars)
+ return &clvNil;
+ StringToVarMap &_mapVars = *_pmapVars;
+ StringToVarMap::iterator it = _mapVars.find(str);
+ if (it != _mapVars.end()) {
+ return &it->second;
+ } else if (_fAutoCreate) {
+ // save the old symbol table, if any
+ StringToVarMap *pmapOld = ClVariable::VarMap();
+ // and set it to this one temporarily
+ ClVariable::SetVarMap(&_mapVars);
+ ClVariable *pclv = new ClVariable(str);
+ // now switch it back
+ ClVariable::SetVarMap(pmapOld);
+ return pclv;
+ } else {
+ return &clvNil;
+ }
+ }
+private:
+ StringToVarMap *_pmapVars;
+ bool _fAutoCreate;
+};
+
+
+/* the "yyerror" function */
+void clerror(const char *sz);
+
+struct ClParseData {
+ ClParseData(istream &xi, const ClVarLookupFunction &lookup_func)
+ : _xi(xi), _lookup_func(lookup_func) { }
+
+ ClConstraint *Pcn() { return _pcn; }
+
+ ClVarSet _readOnlyVarsSoFar;
+
+ istream & _xi;
+ ClConstraint * _pcn;
+ const ClVarLookupFunction &_lookup_func;
+};
+
+
+inline
+const ClStrength
+&ClsFromSz(const char *sz)
+{
+ const ClStrength *pcls = &ClsRequired();
+ double n1, n2, n3;
+ if (strcmp("required",sz) == 0)
+ ; /* initialized to ClsRequired, above */
+ else if (strcasecmp("strong",sz) == 0) { pcls = &ClsStrong(); }
+ else if (strcasecmp("medium",sz) == 0) { pcls = &ClsMedium(); }
+ else if (strcasecmp("weak",sz) == 0) { pcls = &ClsWeak(); }
+ else if (sscanf(sz,"(%lf,%lf,%lf)",&n1,&n2,&n3) == 3) {
+ pcls = new ClStrength("parsed",n1,n2,n3);
+ } else {
+ throw ExCLParseErrorMisc("Error parsing strength");
+ }
+ return *pcls;
+}
+
+
+#endif
diff --git a/libs/cassowary/cassowary/ClSimplexSolver.h b/libs/cassowary/cassowary/ClSimplexSolver.h
new file mode 100644
index 0000000000..c187992728
--- /dev/null
+++ b/libs/cassowary/cassowary/ClSimplexSolver.h
@@ -0,0 +1,588 @@
+// $Id$
+//
+// Cassowary Incremental Constraint Solver
+// Original Smalltalk Implementation by Alan Borning
+// This C++ Implementation by Greg J. Badros, <gjb@cs.washington.edu>
+// http://www.cs.washington.edu/homes/gjb
+// (C) 1998, 1999 Greg J. Badros and Alan Borning
+// See ../LICENSE for legal details regarding this software
+//
+// ClSimplexSolver.h
+
+#ifndef ClSimplexSolver_H
+#define ClSimplexSolver_H
+
+#if defined(HAVE_CONFIG_H) && !defined(CONFIG_H_INCLUDED) && !defined(CONFIG_INLINE_H_INCLUDED)
+#include <cassowary/config-inline.h>
+#define CONFIG_INLINE_H_INCLUDED
+#endif
+
+#include <stack>
+#include <list>
+#include <iostream>
+#include "Cassowary.h"
+#include "ClSolver.h"
+#include "ClTableau.h"
+#include "ClLinearInequality.h"
+#include "ClStrength.h"
+#include "ClStayConstraint.h"
+#include "ClEditConstraint.h"
+#include "ClSlackVariable.h"
+#include "ClObjectiveVariable.h"
+#include "ClErrors.h"
+#include "ClTypedefs.h"
+
+using std::list;
+using std::stack;
+using std::ostream;
+
+class ClVariable;
+class ClPoint;
+class ExCLRequiredFailureWithExplanation;
+
+
+// ClSimplexSolver encapsulates the solving behaviour
+// of the cassowary algorithm
+class ClSimplexSolver : public ClSolver, public ClTableau {
+ protected:
+ class ClEditInfo;
+ typedef list<ClEditInfo *> ClEditInfoList;
+
+ ClEditInfo *PEditInfoFromClv(ClVariable clv) {
+ ClEditInfoList::iterator it = _editInfoList.begin();
+ for (; it != _editInfoList.end(); ++it) {
+ ClEditInfo *pei = (*it);
+ if (pei->_clv == clv)
+ return pei;
+ }
+ return 0;
+ }
+
+ public:
+
+ // Constructor
+ ClSimplexSolver() :
+ ClSolver(),
+ _objective(ClVariable(new ClObjectiveVariable("Z"))),
+ _slackCounter(0),
+ _artificialCounter(0),
+#ifdef CL_FIND_LEAK
+ _cArtificialVarsDeleted(0),
+#endif
+ _dummyCounter(0),
+ _epsilon(1e-8),
+ _fResetStayConstantsAutomatically(true),
+ _fNeedsSolving(false),
+ _fExplainFailure(false),
+ _pfnResolveCallback(0),
+ _pfnCnSatCallback(0)
+ {
+ _rows[_objective] = new ClLinearExpression();
+ // start out with no edit variables
+ _stkCedcns.push(0);
+#ifdef CL_TRACE
+ std::cerr << "objective row new@ " << _rows[_objective] << std::endl;
+#endif
+ }
+
+ virtual ~ClSimplexSolver();
+
+ // Add constraints so that lower<=var<=upper. (nil means no bound.)
+ ClSimplexSolver &AddLowerBound(ClVariable v, Number lower)
+ {
+ ClLinearInequality *pcn = new ClLinearInequality(ClLinearExpression(v - lower));
+ return AddConstraint(pcn);
+ }
+ ClSimplexSolver &AddUpperBound(ClVariable v, Number upper)
+ {
+ ClLinearInequality *pcn = new ClLinearInequality(ClLinearExpression(upper - v));
+ return AddConstraint(pcn);
+ }
+ ClSimplexSolver &AddBounds(ClVariable v, Number lower, Number upper)
+ { AddLowerBound(v,lower); AddUpperBound(v,upper); return *this; }
+
+ // Add the constraint cn to the tableau
+ ClSimplexSolver &AddConstraint(ClConstraint *const pcn);
+
+#ifndef CL_NO_DEPRECATED
+ // Deprecated! --02/19/99 gjb
+ ClSimplexSolver &AddConstraint(ClConstraint &cn)
+ { return AddConstraint(&cn); }
+#endif
+
+ // Add an edit constraint for "v" with given strength
+ ClSimplexSolver &AddEditVar(const ClVariable v, const ClStrength &strength = ClsStrong(),
+ double weight = 1.0 )
+ {
+ ClEditConstraint *pedit = new ClEditConstraint(v, strength, weight);
+ return AddConstraint(pedit);
+ }
+
+ ClSimplexSolver &RemoveEditVar(ClVariable v)
+ {
+ ClEditInfo *pcei = PEditInfoFromClv(v);
+ if (!pcei) {
+ throw ExCLEditMisuse("Removing edit variable that was not found");
+ }
+ ClConstraint *pcnEdit = pcei->_pconstraint;
+ RemoveConstraint(pcnEdit);
+ delete pcnEdit;
+ return *this;
+ }
+
+ // BeginEdit() should be called before sending
+ // Resolve() messages, after adding the appropriate edit variables
+ ClSimplexSolver &BeginEdit()
+ {
+ if (_editInfoList.size() == 0) {
+ throw ExCLEditMisuse("BeginEdit called, but no edit variable");
+ }
+ // may later want to do more in here
+ _infeasibleRows.clear();
+ ResetStayConstants();
+ _stkCedcns.push(_editInfoList.size());
+ return *this;
+ }
+
+ // EndEdit should be called after editing has finished
+ // for now, it just removes edit variables added from before the last BeginEdit
+ ClSimplexSolver &EndEdit()
+ {
+ if (_editInfoList.size() == 0)
+ throw ExCLEditMisuse("EndEdit called but no edit variables");
+ Resolve();
+ _stkCedcns.pop();
+ RemoveEditVarsTo(_stkCedcns.top());
+ // may later want to do more in here
+ return *this;
+ }
+
+ // RemoveAllEditVars() just eliminates all the edit constraints
+ // that were added
+ ClSimplexSolver &RemoveAllEditVars() { RemoveEditVarsTo(0); return *this; }
+
+ // remove the last added edit vars to leave only n edit vars left
+ ClSimplexSolver &RemoveEditVarsTo(unsigned int n);
+
+ int numEditVars() const
+ { return _editInfoList.size(); }
+
+ // Add weak stays to the x and y parts of each point. These have
+ // increasing weights so that the solver will try to satisfy the x
+ // and y stays on the same point, rather than the x stay on one and
+ // the y stay on another.
+ ClSimplexSolver &AddPointStays(const vector<const ClPoint *> &listOfPoints,
+ const ClStrength &strength = ClsWeak());
+
+ ClSimplexSolver &AddPointStay(const ClVariable vx, const ClVariable vy,
+ const ClStrength &strength = ClsWeak(),
+ double weight = 1.0)
+ { AddStay(vx,strength,weight); AddStay(vy,strength,weight); return *this; }
+
+ ClSimplexSolver &AddPointStay(const ClPoint &clp,
+ const ClStrength &strength = ClsWeak(),
+ double weight = 1.0);
+
+
+ // Add a stay of the given strength (default to weak) of v to the tableau
+ ClSimplexSolver &AddStay(const ClVariable v,
+ const ClStrength &strength = ClsWeak(), double weight = 1.0 )
+ {
+ ClStayConstraint *pcn = new ClStayConstraint(v,strength,weight);
+ return AddConstraint(pcn);
+ }
+
+ // Remove the constraint cn from the tableau
+ // Also remove any error variable associated with cn
+ ClSimplexSolver &RemoveConstraint(ClConstraint *const pcn)
+ { RemoveConstraintInternal(pcn); pcn->removedFrom(*this); return *this; }
+
+#ifndef CL_NO_DEPRECATED
+ // Deprecated! --02/19/99 gjb
+ ClSimplexSolver &RemoveConstraint(ClConstraint &cn)
+ { return RemoveConstraint(&cn); }
+#endif
+
+
+ // Re-initialize this solver from the original constraints, thus
+ // getting rid of any accumulated numerical problems. (Actually, we
+ // haven't definitely observed any such problems yet)
+ void Reset();
+
+ // Re-solve the current collection of constraints, given the new
+ // values for the edit variables that have already been
+ // suggested (see SuggestValue() method)
+ // This is not guaranteed to work if you remove an edit constraint
+ // from the middle of the edit constraints you added
+ // (e.g., edit A, edit B, edit C, remove B -> this will fail!)
+ // DEPRECATED
+ void Resolve();
+
+ // Re-solve the current collection of constraints for new values for
+ // the constants of the edit variables.
+ // This is implemented in terms of SuggestValue-s, and is
+ // less efficient than that more natural interface
+ void Resolve(const vector<Number> &newEditConstants);
+
+ // Convenience function for Resolve-s of two variables
+ void Resolve(Number x, Number y)
+ {
+ vector<Number> vals;
+ vals.push_back(x);
+ vals.push_back(y);
+ Resolve(vals);
+ }
+
+ // Suggest a new value for an edit variable
+ // the variable needs to be added as an edit variable
+ // and BeginEdit() needs to be called before this is called.
+ // The tableau will not be solved completely until
+ // after Resolve() has been called
+ ClSimplexSolver &SuggestValue(ClVariable v, Number x);
+
+ // Set and check whether or not the solver will attempt to compile
+ // an explanation of failure when a required constraint conflicts
+ // with another required constraint
+ ClSimplexSolver &SetExplaining(bool f)
+ { _fExplainFailure = f; return *this; }
+
+ bool FIsExplaining() const
+ { return _fExplainFailure; }
+
+ // If autosolving has been turned off, client code needs
+ // to explicitly call solve() before accessing variables
+ // values
+ ClSimplexSolver &Solve()
+ {
+#ifdef CL_SOLVER_CHECK_INTEGRITY
+ AssertValid();
+#endif
+ if (_fNeedsSolving)
+ {
+ Optimize(_objective);
+ SetExternalVariables();
+#ifdef CL_TRACE_VERBOSE
+ std::cerr << "Manual solve actually solving." << std::endl;
+#endif
+ }
+ return *this;
+ }
+
+ ClSimplexSolver &SetEditedValue(ClVariable v, double n)
+ {
+ if (!FContainsVariable(v))
+ {
+ ChangeClv(v,n);
+ return *this;
+ }
+
+ if (!ClApprox(n, v.Value()))
+ {
+ AddEditVar(v);
+ BeginEdit();
+ SuggestValue(v,n);
+ EndEdit();
+ }
+ return *this;
+ }
+
+ // Solver contains the variable if it's in either the columns
+ // list or the rows list
+ bool FContainsVariable(const ClVariable v)
+ { return ColumnsHasKey(v) || RowExpression(v); }
+
+ ClSimplexSolver &AddVar(const ClVariable v)
+ { if (!FContainsVariable(v))
+ {
+ AddStay(v);
+#ifdef CL_TRACE
+ std::cerr << "added initial stay on " << v << std::endl;
+#endif
+ }
+ return *this; }
+
+ typedef void (*PfnResolveCallback)(ClSimplexSolver *psolver);
+
+ void SetResolveCallback(PfnResolveCallback pfn)
+ { _pfnResolveCallback = pfn; }
+
+ typedef void (*PfnCnSatCallback)(ClSimplexSolver *psolver,
+ ClConstraint *pcn, bool fSatisfied);
+
+ void SetCnSatCallback(PfnCnSatCallback pfn)
+ { _pfnCnSatCallback = pfn; }
+
+#ifndef CL_NO_IO
+ friend ostream &operator<<(ostream &xo, const ClSimplexSolver &tableau);
+
+ ostream &PrintOn(ostream &xo) const;
+
+ ostream &PrintInternalInfo(ostream &xo) const;
+
+ ostream &PrintOnVerbose(ostream &xo) const
+ { PrintOn(xo); PrintInternalInfo(xo); xo << std::endl; return xo; }
+
+#endif
+
+ const ClConstraintToVarMap &ConstraintMap() const
+ { return _markerVars; }
+
+ const ClVarToConstraintMap &MarkerMap() const
+ { return _constraintsMarked; }
+
+ bool FIsConstraintSatisfied(const ClConstraint *const pcn) const;
+
+ // DEPRECATED
+ bool FIsConstraintSatisfied(const ClConstraint &pcn) const
+ { return FIsConstraintSatisfied(&pcn); }
+
+ // re-set all the external variables to their current values
+ // most importantly, this re-calls all the ChangeClv callbacks
+ // (which might be used to copy the ClVariable's value to another
+ // variable)
+ void UpdateExternalVariables()
+ { SetExternalVariables(); }
+
+ // A. Beurive' Tue Jul 6 17:05:39 CEST 1999
+ void ChangeStrengthAndWeight(ClConstraint *pcn, const ClStrength &strength, double weight);
+ void ChangeStrength(ClConstraint *pcn, const ClStrength &strength);
+ void ChangeWeight(ClConstraint *pcn, double weight);
+ // void DisplayObjective();
+
+ // Each of the non-required stays will be represented by an equation
+ // of the form
+ // v = c + eplus - eminus
+ // where v is the variable with the stay, c is the previous value of
+ // v, and eplus and eminus are slack variables that hold the error
+ // in satisfying the stay constraint. We are about to change
+ // something, and we want to fix the constants in the equations
+ // representing the stays. If both eplus and eminus are nonbasic
+ // they have value 0 in the current solution, meaning the previous
+ // stay was exactly satisfied. In this case nothing needs to be
+ // changed. Otherwise one of them is basic, and the other must
+ // occur only in the Expression for that basic error variable.
+ // Reset the Constant in this Expression to 0.
+ void ResetStayConstants();
+
+ ClSimplexSolver &SetAutoResetStayConstants(bool f)
+ { _fResetStayConstantsAutomatically = f; if (f) ResetStayConstants(); return *this; }
+
+ bool FIsAutoResetStayConstants() const
+ { return _fResetStayConstantsAutomatically; }
+
+ protected:
+
+ // ClEditInfo is a privately-used class
+ // that just wraps a constraint, its positive and negative
+ // error variables, and its prior edit Constant.
+ // It is used as values in _editInfoList, and replaces
+ // the parallel vectors of error variables and previous edit
+ // constants from the smalltalk version of the code.
+ class ClEditInfo {
+ friend class ClSimplexSolver;
+ public:
+
+ // These instances own none of the pointers;
+ // the tableau row (the Expression) owns the peplus, peminus,
+ // and AddEditVar/RemoveEditVar pair or the client code owns
+ // the constraint object
+ ClEditInfo(ClVariable clv,
+ ClEditConstraint *pconstraint,
+ ClVariable eplus, ClVariable eminus,
+ Number prevEditConstant)
+ :_clv(clv),
+ _pconstraint(pconstraint),
+ _clvEditPlus(eplus), _clvEditMinus(eminus),
+ _prevEditConstant(prevEditConstant)
+ { }
+
+ ~ClEditInfo()
+ { }
+
+ ostream &PrintOn(ostream &xo) const
+ { xo << _clv << " -> [" << _clvEditPlus << ", " << _clvEditMinus << "]("
+ << _prevEditConstant << ")@" << " -- "
+ << *_pconstraint;
+ return xo; }
+
+ friend ostream &operator<<(ostream &xo, const ClEditInfo &cei)
+ { return cei.PrintOn(xo); }
+
+ private:
+ ClVariable _clv;
+ ClConstraint *_pconstraint;
+ ClVariable _clvEditPlus;
+ ClVariable _clvEditMinus;
+ Number _prevEditConstant;
+ };
+
+ // Add the constraint expr=0 to the inequality tableau using an
+ // artificial variable. To do this, create an artificial variable
+ // av and Add av=expr to the inequality tableau, then make av be 0.
+ // (Raise an exception if we can't attain av=0.)
+ // (Raise an exception if we can't attain av=0.) If the Add fails,
+ // prepare an explanation in e that describes why it failed (note
+ // that an empty explanation is considered to mean the explanation
+ // encompasses all active constraints.
+ bool AddWithArtificialVariable(ClLinearExpression &pexpr,
+ ExCLRequiredFailureWithExplanation &e);
+
+ // Using the given equation (av = cle) build an explanation which
+ // implicates all constraints used to construct the equation. That
+ // is, everything for which the variables in the equation are markers.
+ // Thanks to Steve Wolfman for the implementation of the explanation feature
+ void BuildExplanation(ExCLRequiredFailureWithExplanation & e,
+ ClVariable av,
+ const ClLinearExpression * pcle);
+
+ // We are trying to Add the constraint expr=0 to the appropriate
+ // tableau. Try to Add expr directly to the tableax without
+ // creating an artificial variable. Return true if successful and
+ // false if not.
+ bool TryAddingDirectly(ClLinearExpression &pexpr);
+
+ // We are trying to Add the constraint expr=0 to the tableaux. Try
+ // to choose a subject (a variable to become basic) from among the
+ // current variables in expr. If expr contains any unrestricted
+ // variables, then we must choose an unrestricted variable as the
+ // subject. Also, if the subject is new to the solver we won't have
+ // to do any substitutions, so we prefer new variables to ones that
+ // are currently noted as parametric. If expr contains only
+ // restricted variables, if there is a restricted variable with a
+ // negative coefficient that is new to the solver we can make that
+ // the subject. Otherwise we can't find a subject, so return nil.
+ // (In this last case we have to Add an artificial variable and use
+ // that variable as the subject -- this is done outside this method
+ // though.)
+ //
+ // Note: in checking for variables that are new to the solver, we
+ // ignore whether a variable occurs in the objective function, since
+ // new slack variables are added to the objective function by
+ // 'NewExpression:', which is called before this method.
+ ClVariable ChooseSubject(ClLinearExpression &pexpr);
+
+ // Each of the non-required edits will be represented by an equation
+ // of the form
+ // v = c + eplus - eminus
+ // where v is the variable with the edit, c is the previous edit
+ // value, and eplus and eminus are slack variables that hold the
+ // error in satisfying the edit constraint. We are about to change
+ // something, and we want to fix the constants in the equations
+ // representing the edit constraints. If one of eplus and eminus is
+ // basic, the other must occur only in the Expression for that basic
+ // error variable. (They can't both be basic.) Fix the Constant in
+ // this Expression. Otherwise they are both nonbasic. Find all of
+ // the expressions in which they occur, and fix the constants in
+ // those. See the UIST paper for details.
+ // (This comment was for resetEditConstants(), but that is now
+ // gone since it was part of the screwey vector-based interface
+ // to resolveing. --02/15/99 gjb)
+ void DeltaEditConstant(Number delta, ClVariable pv1, ClVariable pv2);
+
+ // We have set new values for the constants in the edit constraints.
+ // Re-Optimize using the dual simplex algorithm.
+ void DualOptimize();
+
+ // Make a new linear Expression representing the constraint cn,
+ // replacing any basic variables with their defining expressions.
+ // Normalize if necessary so that the Constant is non-negative. If
+ // the constraint is non-required give its error variables an
+ // appropriate weight in the objective function.
+ ClLinearExpression *NewExpression(const ClConstraint *pcn,
+ /* output to */
+ ClVariable &clvEplus,
+ ClVariable &clvEminus,
+ Number &prevEConstant);
+
+ // Minimize the value of the objective. (The tableau should already
+ // be feasible.)
+ void Optimize(ClVariable zVar);
+
+ // Do a Pivot. Move entryVar into the basis (i.e. make it a basic variable),
+ // and move exitVar out of the basis (i.e., make it a parametric variable)
+ void Pivot(ClVariable entryVar, ClVariable exitVar);
+
+ // Set the external variables known to this solver to their appropriate values.
+ // Set each external basic variable to its value, and set each
+ // external parametric variable to 0. (It isn't clear that we will
+ // ever have external parametric variables -- every external
+ // variable should either have a stay on it, or have an equation
+ // that defines it in terms of other external variables that do have
+ // stays. For the moment I'll put this in though.) Variables that
+ // are internal to the solver don't actually store values -- their
+ // values are just implicit in the tableu -- so we don't need to set
+ // them.
+ void SetExternalVariables();
+
+ // this gets called by RemoveConstraint and by AddConstraint when the
+ // contraint we're trying to Add is inconsistent
+ ClSimplexSolver &RemoveConstraintInternal(const ClConstraint *const pcn);
+
+ void ChangeClv(ClVariable clv, Number n) {
+ clv.ChangeValue(n);
+ if (_pfnChangeClvCallback)
+ _pfnChangeClvCallback(&clv,this);
+ }
+
+ /// instance variables
+
+ // the arrays of positive and negative error vars for the stay constraints
+ // (need both positive and negative since they have only non-negative values)
+ ClVarVector _stayMinusErrorVars;
+ ClVarVector _stayPlusErrorVars;
+
+ // give error variables for a non required constraint,
+ // maps to ClSlackVariable-s
+ ClConstraintToVarSetMap _errorVars;
+
+ // Return a lookup table giving the marker variable for each
+ // constraint (used when deleting a constraint).
+ ClConstraintToVarMap _markerVars;
+
+ // Reverse of the above-- a lookup table giving the constraint
+ // for each marker variable (used when building failure explanations)
+ ClVarToConstraintMap _constraintsMarked;
+
+ ClVariable _objective;
+
+ // Map edit variables to their constraints, errors, and prior
+ // values
+ ClEditInfoList _editInfoList;
+
+ int _slackCounter;
+ int _artificialCounter;
+#ifdef CL_FIND_LEAK
+ int _cArtificialVarsDeleted;
+#endif
+ int _dummyCounter;
+ const double _epsilon;
+
+ bool _fResetStayConstantsAutomatically;
+ bool _fNeedsSolving;
+ bool _fExplainFailure;
+
+ PfnResolveCallback _pfnResolveCallback;
+ PfnCnSatCallback _pfnCnSatCallback;
+
+ // C-style extension mechanism so I
+ // don't have to wrap ScwmClSolver separately
+ void *_pv;
+
+ // a stack of the number of edit constraints
+ // that existed at the prior BeginEdit.
+ // an EndEdit needs to pop off the top value,
+ // then remove constraints to get down
+ // to the # of constraints as in _stkCedcns.top()
+ stack<int> _stkCedcns;
+
+
+#ifndef CL_NO_IO
+
+friend ostream &PrintTo(ostream &xo, const ClSimplexSolver::ClEditInfoList &listPEditInfo);
+friend ostream &operator<<(ostream &xo, const ClSimplexSolver::ClEditInfoList &listPEditInfo);
+
+#endif
+
+};
+
+#endif // ClSimplexSolver_H
diff --git a/libs/cassowary/cassowary/ClSlackVariable.h b/libs/cassowary/cassowary/ClSlackVariable.h
new file mode 100644
index 0000000000..ca116702e9
--- /dev/null
+++ b/libs/cassowary/cassowary/ClSlackVariable.h
@@ -0,0 +1,75 @@
+// $Id$
+//
+// Cassowary Incremental Constraint Solver
+// Original Smalltalk Implementation by Alan Borning
+// This C++ Implementation by Greg J. Badros, <gjb@cs.washington.edu>
+// http://www.cs.washington.edu/homes/gjb
+// (C) 1998, 1999 Greg J. Badros and Alan Borning
+// See ../LICENSE for legal details regarding this software
+//
+// ClSlackVariable.h
+
+#ifndef ClSlackVariable_H
+#define ClSlackVariable_H
+
+#if defined(HAVE_CONFIG_H) && !defined(CONFIG_H_INCLUDED) && !defined(CONFIG_INLINE_H_INCLUDED)
+#include <cassowary/config-inline.h>
+#define CONFIG_INLINE_H_INCLUDED
+#endif
+
+#include "Cassowary.h"
+#include "ClAbstractVariable.h"
+
+class ClTableau;
+class ClSimplexSolver;
+
+
+class ClSlackVariable : public ClAbstractVariable {
+public:
+#ifdef CL_FIND_LEAK
+ ~ClSlackVariable() { --cSlackVariables; };
+
+ static long cSlackVariables;
+#endif
+
+protected:
+ friend class ClTableau;
+ friend class ClSimplexSolver;
+
+ ClSlackVariable(string Name = "") :
+ ClAbstractVariable(Name)
+ {
+#ifdef CL_FIND_LEAK
+ ++cSlackVariables;
+#endif
+ }
+
+ ClSlackVariable(long number, char *prefix) :
+ ClAbstractVariable(number,prefix)
+ {
+#ifdef CL_FIND_LEAK
+ ++cSlackVariables;
+#endif
+ }
+
+#ifndef CL_NO_IO
+ virtual ostream &PrintOn(ostream &xo) const
+ {
+ xo << "[" << Name() << ":slack]";
+ return xo;
+ }
+#endif
+
+ virtual bool IsExternal() const
+ { return false; }
+
+ virtual bool IsPivotable() const
+ { return true; }
+
+ virtual bool IsRestricted() const
+ { return true; }
+
+};
+
+
+#endif
diff --git a/libs/cassowary/cassowary/ClSolver.h b/libs/cassowary/cassowary/ClSolver.h
new file mode 100644
index 0000000000..16e798d491
--- /dev/null
+++ b/libs/cassowary/cassowary/ClSolver.h
@@ -0,0 +1,167 @@
+// $Id$
+//
+// Cassowary Incremental Constraint Solver
+// Original Smalltalk Implementation by Alan Borning
+// This C++ Implementation by Greg J. Badros, <gjb@cs.washington.edu>
+// http://www.cs.washington.edu/homes/gjb
+// (C) 1998, 1999 Greg J. Badros and Alan Borning
+// See ../LICENSE for legal details regarding this software
+//
+// ClSolver.h
+
+#ifndef ClSolver_H
+#define ClSolver_H
+
+#if defined(HAVE_CONFIG_H) && !defined(CONFIG_H_INCLUDED) && !defined(CONFIG_INLINE_H_INCLUDED)
+#include <cassowary/config-inline.h>
+#define CONFIG_INLINE_H_INCLUDED
+#endif
+
+#include "Cassowary.h"
+#include "ClErrors.h"
+#include "ClTypedefs.h"
+#include <list>
+#include <iostream>
+
+using std::list;
+using std::ostream;
+
+class ClVariable;
+
+// ClSolver is an abstract base class
+class ClSolver {
+ public:
+
+ ClSolver() : _pv(0), _fAutosolve(true), _pfnChangeClvCallback(0) { }
+
+ virtual ~ClSolver()
+ { }
+
+ // Add the constraint cn to the solver
+ virtual ClSolver &AddConstraint(ClConstraint *const pcn) = 0;
+
+ // Remove the constraint cn from the solver
+ virtual ClSolver &RemoveConstraint(ClConstraint *const pcn) = 0;
+
+ // Same as above, but returns false if the constraint cannot be solved
+ // (i.e., the resulting system would be unsatisfiable)
+ // The above function "AddConstraint" throws an exception in that case
+ // which may be inconvenient
+ virtual bool AddConstraintNoException(ClConstraint *const pcn)
+ {
+ try {
+ AddConstraint(pcn);
+ return true;
+ }
+ catch (const ExCLRequiredFailure &e)
+ { return false; }
+ catch (const ExCLTooDifficult &e)
+ { return false; }
+ }
+
+#ifndef CL_NO_DEPRECATED
+ // Deprecated --02/22/99 gjb
+ bool AddConstraintNoException(ClConstraint &cn)
+ { return AddConstraintNoException(&cn); }
+#endif
+
+ virtual bool RemoveConstraintNoException(ClConstraint *const pcn)
+ {
+ try {
+ RemoveConstraint(pcn);
+ return true;
+ }
+ catch (const ExCLConstraintNotFound &e)
+ { return false; }
+ }
+
+#ifndef CL_NO_DEPRECATED
+ // Deprecated --02/22/99 gjb
+ bool RemoveConstraintNoException(ClConstraint &cn)
+ { return RemoveConstraintNoException(&cn); }
+#endif
+
+
+ virtual ClSolver &Solve()
+ { assert(false); return *this; }
+
+ virtual bool SolveNoException()
+ {
+ try {
+ Solve();
+ return true;
+ }
+ catch (const ExCLTooDifficult &e)
+ { return false; }
+ catch (const ExCLRequiredFailure &e)
+ { return false; }
+ }
+
+
+ virtual void Resolve()
+ { assert(false); }
+
+ void SetPv(void *pv)
+ { _pv = pv; }
+
+ void *Pv() const
+ { return _pv; }
+
+ typedef void (*PfnChangeClvCallback)(ClVariable *pclv, ClSolver *psolver);
+
+ void SetChangeClvCallback(PfnChangeClvCallback pfn)
+ { _pfnChangeClvCallback = pfn; }
+
+ // Control whether optimization and setting of external variables
+ // is done automatically or not. By default it is done
+ // automatically and solve() never needs to be explicitly
+ // called by client code; if SetAutosolve is put to false,
+ // then solve() needs to be invoked explicitly before using
+ // variables' values
+ // (Turning off autosolve while adding lots and lots of
+ // constraints [ala the addDel test in ClTests] saved
+ // about 20% in runtime, from 68sec to 54sec for 900 constraints,
+ // with 126 failed adds)
+ ClSolver &SetAutosolve(bool f)
+ { _fAutosolve = f; if (f) Solve(); return *this; }
+
+ // Tell whether we are autosolving
+ bool FIsAutosolving() const
+ { return _fAutosolve; }
+
+
+#ifndef CL_NO_IO
+ friend ostream &operator<<(ostream &xo, const ClSolver &solver);
+
+ virtual ostream &PrintOn(ostream &xo) const = 0;
+
+#endif
+
+ protected:
+
+ // C-style extension mechanism so I
+ // don't have to wrap ScwmClSolver separately
+ void *_pv;
+
+ bool _fAutosolve;
+
+ PfnChangeClvCallback _pfnChangeClvCallback;
+};
+
+
+#ifndef CL_NO_IO
+ostream &PrintTo(ostream &xo, const ClVarVector &varlist);
+ostream &operator<<(ostream &xo, const ClVarVector &varlist);
+
+ostream &PrintTo(ostream &xo, const ClConstraintToVarSetMap &mapCnToVarSet);
+ostream &operator<<(ostream &xo, const ClConstraintToVarSetMap &mapCnToVarSet);
+
+ostream &PrintTo(ostream &xo, const ClConstraintSet &setCn);
+ostream &operator<<(ostream &xo, const ClConstraintSet &setCn);
+
+ostream &PrintTo(ostream &xo, const list<FDNumber> &listFDN);
+ostream &operator<<(ostream &xo, const list<FDNumber> &listFDN);
+
+#endif
+
+#endif
diff --git a/libs/cassowary/cassowary/ClStayConstraint.h b/libs/cassowary/cassowary/ClStayConstraint.h
new file mode 100644
index 0000000000..f009731b09
--- /dev/null
+++ b/libs/cassowary/cassowary/ClStayConstraint.h
@@ -0,0 +1,43 @@
+// $Id$
+//
+// Cassowary Incremental Constraint Solver
+// Original Smalltalk Implementation by Alan Borning
+// This C++ Implementation by Greg J. Badros, <gjb@cs.washington.edu>
+// http://www.cs.washington.edu/homes/gjb
+// (C) 1998, 1999 Greg J. Badros and Alan Borning
+// See ../LICENSE for legal details regarding this software
+//
+// ClStayConstraint.h
+
+#ifndef ClStayConstraint_H
+#define ClStayConstraint_H
+
+#if defined(HAVE_CONFIG_H) && !defined(CONFIG_H_INCLUDED) && !defined(CONFIG_INLINE_H_INCLUDED)
+#include <cassowary/config-inline.h>
+#define CONFIG_INLINE_H_INCLUDED
+#endif
+
+#include "Cassowary.h"
+#include "ClEditOrStayConstraint.h"
+
+class ClStayConstraint : public ClEditOrStayConstraint {
+ typedef ClEditOrStayConstraint super;
+ public:
+
+ ClStayConstraint(const ClVariable var,
+ const ClStrength &strength = ClsWeak(), double weight = 1.0 ) :
+ ClEditOrStayConstraint(var,strength,weight)
+ { }
+
+ virtual bool isStayConstraint() const
+ { return true; }
+
+#ifndef CL_NO_IO
+ virtual ostream &PrintOn(ostream &xo) const
+ { super::PrintOn(xo); return xo << " STAY)"; }
+#endif
+
+ private:
+};
+
+#endif
diff --git a/libs/cassowary/cassowary/ClStrength.h b/libs/cassowary/cassowary/ClStrength.h
new file mode 100644
index 0000000000..644c04cb5f
--- /dev/null
+++ b/libs/cassowary/cassowary/ClStrength.h
@@ -0,0 +1,91 @@
+// $Id$
+//
+// Cassowary Incremental Constraint Solver
+// Original Smalltalk Implementation by Alan Borning
+// This C++ Implementation by Greg J. Badros, <gjb@cs.washington.edu>
+// http://www.cs.washington.edu/homes/gjb
+// (C) 1998, 1999 Greg J. Badros and Alan Borning
+// See ../LICENSE for legal details regarding this software
+//
+// ClStrength.h
+
+#ifndef ClStrength_H
+#define ClStrength_H
+
+#if defined(HAVE_CONFIG_H) && !defined(CONFIG_H_INCLUDED) && !defined(CONFIG_INLINE_H_INCLUDED)
+#include <cassowary/config-inline.h>
+#define CONFIG_INLINE_H_INCLUDED
+#endif
+
+#include <string>
+
+#include "Cassowary.h"
+#include "ClSymbolicWeight.h"
+
+using std::string;
+
+class ClStrength;
+
+const ClStrength &ClsRequired();
+const ClStrength &ClsStrong();
+const ClStrength &ClsMedium();
+const ClStrength &ClsWeak();
+
+class ClStrength {
+ public:
+
+ ClStrength(const string &Name, const ClSymbolicWeight &symbolicWeight) :
+ _name(Name), _symbolicWeight(symbolicWeight)
+ { }
+
+ // special case for when nLevels = 3, should assert nLevels() == 3
+ ClStrength(const string &Name, double w1, double w2, double w3);
+
+ virtual ~ClStrength()
+ { }
+
+ virtual bool IsRequired() const
+ { return (_symbolicWeight == ClsRequired()._symbolicWeight); }
+
+#ifndef CL_NO_IO
+ virtual ostream &PrintOn(ostream &xo) const
+ {
+ xo << Name();
+ if (!IsRequired())
+ xo << ":" << symbolicWeight();
+ return xo;
+ }
+
+ friend ostream& operator<<(ostream &xos, const ClStrength &Cls)
+ { Cls.PrintOn(xos); return xos; }
+
+#endif
+
+ virtual const ClSymbolicWeight &symbolicWeight() const
+ { return _symbolicWeight; }
+
+ void SetPv(void *pv)
+ { _pv = pv; }
+
+ void *Pv() const
+ { return _pv; }
+
+ private:
+ string Name() const
+ { return _name; }
+
+ void SetName(string Name)
+ { _name = Name; }
+
+ void SetSymbolicWeight(const ClSymbolicWeight &symbolicWeight)
+ { _symbolicWeight = symbolicWeight; }
+
+ // instance variables
+ string _name;
+ ClSymbolicWeight _symbolicWeight;
+
+ void *_pv;
+
+};
+
+#endif
diff --git a/libs/cassowary/cassowary/ClSymbolicWeight.h b/libs/cassowary/cassowary/ClSymbolicWeight.h
new file mode 100644
index 0000000000..1c0339c887
--- /dev/null
+++ b/libs/cassowary/cassowary/ClSymbolicWeight.h
@@ -0,0 +1,197 @@
+// $Id$
+//
+// Cassowary Incremental Constraint Solver
+// Original Smalltalk Implementation by Alan Borning
+// This C++ Implementation by Greg J. Badros, <gjb@cs.washington.edu>
+// http://www.cs.washington.edu/homes/gjb
+// (C) 1998, 1999 Greg J. Badros and Alan Borning
+// See ../LICENSE for legal details regarding this software
+//
+// ClSymbolicWeight.h
+
+#ifndef ClSymbolicWeight_H
+#define ClSymbolicWeight_H
+
+#if defined(HAVE_CONFIG_H) && !defined(CONFIG_H_INCLUDED) && !defined(CONFIG_INLINE_H_INCLUDED)
+#include <cassowary/config-inline.h>
+#define CONFIG_INLINE_H_INCLUDED
+#endif
+
+#include "Cassowary.h"
+#include "ClErrors.h"
+#include <vector>
+#include <iostream>
+
+using std::vector;
+using std::ostream;
+
+class ClSymbolicWeight {
+ public:
+ ClSymbolicWeight(unsigned int CLevels = 3, Number value = 0.0);
+
+ ClSymbolicWeight(Number w1, Number w2, Number w3);
+
+ ClSymbolicWeight(const vector<Number> &weights);
+
+ static ClSymbolicWeight &Zero();
+
+ ClSymbolicWeight &negated();
+
+ ClSymbolicWeight &MultiplyMe(Number n);
+
+ ClSymbolicWeight Times(Number n) const
+ { ClSymbolicWeight cl = *this; cl.MultiplyMe(n); return cl; }
+
+ ClSymbolicWeight DivideBy(Number n) const;
+
+ ClSymbolicWeight &addtoMe(const ClSymbolicWeight &cl);
+
+ ClSymbolicWeight Add(const ClSymbolicWeight &cl) const
+ { ClSymbolicWeight clRet = *this; clRet.addtoMe(cl); return clRet; }
+
+ ClSymbolicWeight Subtract(const ClSymbolicWeight &cl) const;
+
+ ClSymbolicWeight operator*(const Number &n) const
+ { return Times(n); }
+
+ ClSymbolicWeight operator/(const Number &n) const
+ { return DivideBy(n); }
+
+ // FIXGJB: can we express this statically?
+ ClSymbolicWeight operator*(ClSymbolicWeight &w) const
+ { throw ExCLInternalError("Multiplication of symbolic weights encountered");
+ return w; }
+ ClSymbolicWeight &operator*=(ClSymbolicWeight &w)
+ { throw ExCLInternalError("Multiplicative assignment of symbolic weights encountered");
+ return w; }
+
+ // FIXGJB: can we express this statically?
+ ClSymbolicWeight operator-() const
+ { throw ExCLInternalError("Can not negate a symbolic weight");
+ return ClSymbolicWeight::Zero(); }
+
+ friend ClSymbolicWeight ReciprocalOf(const ClSymbolicWeight &);
+
+ ClSymbolicWeight &operator*=(const Number &n)
+ { return MultiplyMe(n); }
+
+ ClSymbolicWeight operator+(const ClSymbolicWeight &cl) const
+ { return Add(cl); }
+
+ ClSymbolicWeight operator+=(const ClSymbolicWeight &cl)
+ { return addtoMe(cl); }
+
+ ClSymbolicWeight operator*(const Number &n)
+ { ClSymbolicWeight answer(*this);
+ answer *= n;
+ return answer; }
+
+ bool lessThan(const ClSymbolicWeight &cl) const;
+ bool lessThanOrEqual(const ClSymbolicWeight &cl) const;
+ bool equal(const ClSymbolicWeight &cl) const;
+ bool greaterThan(const ClSymbolicWeight &cl) const;
+ bool greaterThanOrEqual(const ClSymbolicWeight &cl) const;
+ bool isNegative() const;
+
+ friend bool operator==(const ClSymbolicWeight &cl1, const ClSymbolicWeight &cl2)
+ { return cl1.equal(cl2); }
+
+ friend bool operator!=(const ClSymbolicWeight &cl1, const ClSymbolicWeight &cl2)
+ { return !(cl1 == cl2); }
+
+ friend bool operator<(const ClSymbolicWeight &cl1, const ClSymbolicWeight &cl2)
+ { return cl1.lessThan(cl2); }
+
+ friend bool operator>(const ClSymbolicWeight &cl1, const ClSymbolicWeight &cl2)
+ { return (cl2 < cl1); }
+
+ // function.h provides operator>, >=, <= from operator<
+
+ double AsDouble() const
+ {
+ vector<Number>::const_reverse_iterator i = _values.rbegin();
+ Number sum = 0;
+ Number factor = 1;
+ // A. Beurive' Wed Jul 7 11:07:47 CEST 1999
+ Number multiplier = 1000000;
+ for ( ; i != _values.rend(); ++i)
+ {
+ sum += *i * factor;
+ factor *= multiplier;
+ }
+ return sum;
+ }
+
+#ifndef CL_NO_IO
+ ostream &PrintOn(ostream &xo) const
+ {
+ vector<Number>::const_iterator i = _values.begin();
+ if (i == _values.end())
+ return xo;
+
+ xo << *i;
+ for (++i; i != _values.end(); ++i)
+ {
+ xo << "," << *i;
+ }
+ return xo;
+ }
+
+ // FIXGJB: use a template function to generate these automatically
+ friend ostream& operator<<(ostream &xos, const ClSymbolicWeight &clsw)
+ { clsw.PrintOn(xos); return xos; }
+#endif
+
+ int CLevels() const
+ { return _values.size(); }
+
+ friend bool ClApprox(const ClSymbolicWeight &cl, Number n);
+ friend bool ClApprox(const ClSymbolicWeight &cl1, const ClSymbolicWeight &cl2);
+
+ private:
+ vector<Number> _values;
+
+ void push_back(Number d)
+ { _values.push_back(d); }
+
+};
+
+inline bool ClApprox(const ClSymbolicWeight &cl, Number n)
+{
+ vector<Number>::const_iterator it = cl._values.begin();
+ if (!ClApprox(*it,n))
+ return false;
+
+ ++it;
+ for (; it != cl._values.end(); ++it)
+ {
+ if (!ClApprox(*it,0))
+ return false;
+ }
+
+ return true;
+}
+
+inline bool ClApprox(const ClSymbolicWeight &cl1, const ClSymbolicWeight &cl2)
+{
+ vector<Number>::const_iterator it1 = cl1._values.begin();
+ vector<Number>::const_iterator it2 = cl2._values.begin();
+
+ for (; it1 != cl1._values.end() && it2 != cl2._values.end();
+ ++it1, ++it2)
+ {
+ if (!ClApprox(*it1,*it2))
+ return false;
+ }
+
+ if (it1 == cl1._values.end() && it2 == cl2._values.end())
+ return true;
+
+ return false;
+}
+
+inline ClSymbolicWeight ReciprocalOf(const ClSymbolicWeight &)
+{ throw(ExCLInternalError("Cannot take ReciprocalOf symbolic weight"));
+ return ClSymbolicWeight::Zero(); }
+
+#endif
diff --git a/libs/cassowary/cassowary/ClTableau.h b/libs/cassowary/cassowary/ClTableau.h
new file mode 100644
index 0000000000..117ed0fb9d
--- /dev/null
+++ b/libs/cassowary/cassowary/ClTableau.h
@@ -0,0 +1,230 @@
+// $Id$
+//
+// Cassowary Incremental Constraint Solver
+// Original Smalltalk Implementation by Alan Borning
+// This C++ Implementation by Greg J. Badros, <gjb@cs.washington.edu>
+// http://www.cs.washington.edu/homes/gjb
+// (C) 1998, 1999 Greg J. Badros and Alan Borning
+// See ../LICENSE for legal details regarding this software
+//
+// ClTableau.h
+
+#ifndef ClTableau_H
+#define ClTableau_H
+
+#include <iostream>
+
+#if defined(HAVE_CONFIG_H) && !defined(CONFIG_H_INCLUDED) && !defined(CONFIG_INLINE_H_INCLUDED)
+#include <cassowary/config-inline.h>
+#define CONFIG_INLINE_H_INCLUDED
+#endif
+
+#include "Cassowary.h"
+#include "ClLinearExpression.h"
+#include "ClVariable.h"
+#include "ClTypedefs.h"
+
+
+#ifndef CL_NO_IO
+class ClTableau;
+
+ostream &operator<<(ostream &xo, const ClTableau &clt);
+
+ostream &operator<<(ostream &xo, const ClVarSet &varset);
+
+ostream &operator<<(ostream &xo, const ClTableauColumnsMap &varmap);
+
+ostream &operator<<(ostream &xo, const ClTableauRowsMap &rows);
+
+ostream &operator<<(ostream &xo, const ClVarVector &varlist);
+#endif // CL_NO_IO
+
+class ClTableau {
+
+ public:
+ // No public constructor, since this does nothing but support
+ // an ADT for the ClSimplexSolver
+
+ // Variable v has been removed from an Expression. If the
+ // Expression is in a tableau the corresponding basic variable is
+ // subject (or if subject is nil then it's in the objective function).
+ // Update the column cross-indices.
+ void NoteRemovedVariable(ClVariable v, ClVariable subject)
+ {
+#ifdef CL_TRACE
+ Tracer TRACER(__FUNCTION__);
+ std::cerr << "(" << v << ", " << subject << ")" << std::endl;
+#endif
+ ClVarSet &column = _columns[v];
+ ClVarSet::const_iterator it = column.find(subject);
+ assert(it != column.end());
+ column.erase(it);
+#ifdef CL_TRACE_VERBOSE
+ std::cerr << "v = " << v << " and Columns[v].size() = "
+ << column.size() << std::endl;
+#endif
+ if (column.size() == 0)
+ {
+ _columns.erase(v);
+ _externalRows.erase(v);
+ _externalParametricVars.erase(v);
+ }
+ }
+
+ // v has been added to the linear Expression for subject
+ // update column cross indices
+ void NoteAddedVariable(ClVariable v, ClVariable subject)
+ {
+#ifdef CL_TRACE
+ Tracer TRACER(__FUNCTION__);
+ std::cerr << "(" << v << ", " << subject << ")" << std::endl;
+#endif
+ _columns[v].insert(subject);
+ if (v.IsExternal() && !FIsBasicVar(v))
+ {
+ _externalParametricVars.insert(v);
+ }
+ }
+
+#ifndef CL_NO_IO
+ std::ostream &PrintOn(ostream &xo) const;
+
+ ostream &PrintInternalInfo(ostream &xo) const;
+
+ ostream &printExternalVariablesTo(ostream &xo) const;
+
+#endif
+
+ // Check integrity of the tableau
+ // not complete, yet, but a start, at least
+ // Guard calls to AssertValid with CL_SOLVER_CHECK_INTEGRITY,
+ // since this is expensive
+ virtual void AssertValid() const {
+#ifndef NDEBUG
+ // all external basic variables are in _externalRows
+ // and all external parametric variables are in _externalParametricVars
+ ClTableauRowsMap::const_iterator itRow = _rows.begin();
+ for (; itRow != _rows.end(); ++itRow)
+ {
+ const ClVariable clv = (*itRow).first;
+ if (clv.IsExternal())
+ {
+ if (_externalRows.find(clv) == _externalRows.end())
+ {
+#ifndef CL_NO_IO
+ std::cerr << "External basic variable " << clv
+ << " is not in _externalRows" << std::endl;
+#endif
+ }
+ }
+ const ClLinearExpression *pcle = RowExpression(clv);
+ assert(pcle);
+ ClVarToNumberMap::const_iterator it = pcle->Terms().begin();
+ for (; it != pcle->Terms().end(); ++it)
+ {
+ ClVariable clv = (*it).first;
+ if (clv.IsExternal())
+ {
+ if (_externalParametricVars.find(clv) == _externalParametricVars.end())
+ {
+#ifndef CL_NO_IO
+ std::cerr << "External parametric variable " << clv
+ << " is not in _externalParametricVars" << std::endl;
+#endif
+ }
+ }
+ }
+ }
+#endif /* !NDEBUG */
+ }
+
+
+ protected:
+ // Constructor -- want to start with empty objects so not much to do
+ ClTableau()
+ { }
+
+ virtual ~ClTableau();
+
+ // Add v=expr to the tableau, update column cross indices
+ // v becomes a basic variable
+ // expr is now owned by ClTableau class,
+ // and ClTableauis responsible for deleting it
+ // (also, expr better be allocated on the heap!)
+ void addRow(ClVariable v, const ClLinearExpression &expr);
+
+ // Remove v from the tableau -- remove the column cross indices for v
+ // and remove v from every Expression in rows in which v occurs
+ // returns a pointer to the variable (since we often want to delete
+ // the variable)
+ ClVariable RemoveColumn(ClVariable v);
+
+ // Remove the basic variable v from the tableau row v=expr
+ // Then update column cross indices
+ // Probably want to call delete on the ClLinearExpression * returned
+ // unless you're adding that same Expression back into the
+ // tableau
+ ClLinearExpression *RemoveRow(ClVariable v);
+
+ // Replace all occurrences of oldVar with expr, and update column cross indices
+ // oldVar should now be a basic variable
+ void SubstituteOut(ClVariable oldVar, const ClLinearExpression &expr);
+
+ ClTableauColumnsMap Columns()
+ { return _columns; }
+
+ ClTableauRowsMap Rows()
+ { return _rows; }
+
+ // return true iff the variable subject is in the Columns keys
+ bool ColumnsHasKey(ClVariable subject) const
+ {
+ ClTableauColumnsMap::const_iterator i = _columns.find(subject);
+ return (i != _columns.end());
+ }
+
+ const ClLinearExpression *RowExpression(ClVariable v) const
+ {
+ ClTableauRowsMap::const_iterator i = _rows.find(v);
+ if (i != _rows.end())
+ return (*i).second;
+ else
+ return 0;
+ }
+
+ ClLinearExpression *RowExpression(ClVariable v)
+ {
+ const ClTableau *pthis = const_cast<const ClTableau *>(this);
+ return const_cast<ClLinearExpression *>(pthis->RowExpression(v));
+ }
+
+
+ bool FIsBasicVar(ClVariable v)
+ { return RowExpression(v) != 0; }
+
+ // private: FIXGJB: can I improve the encapsulation?
+
+ // _columns is a mapping from variables which occur in expressions to the
+ // set of basic variables whose expressions contain them
+ // i.e., it's a mapping from variables in expressions (a column) to the
+ // set of rows that contain them
+ ClTableauColumnsMap _columns;
+
+ // _rows maps basic variables to the expressions for that row in the tableau
+ ClTableauRowsMap _rows;
+
+ // the collection of basic variables that have infeasible rows
+ // (used when reoptimizing)
+ ClVarSet _infeasibleRows;
+
+ // the set of rows where the basic variable is external
+ // this was added to the C++ version to reduce time in SetExternalVariables()
+ ClVarSet _externalRows;
+
+ // the set of external variables which are parametric
+ // this was added to the C++ version to reduce time in SetExternalVariables()
+ ClVarSet _externalParametricVars;
+
+};
+
+#endif
diff --git a/libs/cassowary/cassowary/ClTypedefs.h b/libs/cassowary/cassowary/ClTypedefs.h
new file mode 100644
index 0000000000..74b625a72b
--- /dev/null
+++ b/libs/cassowary/cassowary/ClTypedefs.h
@@ -0,0 +1,48 @@
+// $Id$
+//
+// Cassowary Incremental Constraint Solver
+// Original Smalltalk Implementation by Alan Borning
+// This C++ Implementation by Greg J. Badros, <gjb@cs.washington.edu>
+// http://www.cs.washington.edu/homes/gjb
+// (C) 1998, 1999 Greg J. Badros and Alan Borning
+// See ../LICENSE for legal details regarding this software
+//
+// ClTypedefs.h
+
+#ifndef CL_TYPEDEFS_H__
+#define CL_TYPEDEFS_H__
+
+#if defined(HAVE_CONFIG_H) && !defined(CONFIG_H_INCLUDED) && !defined(CONFIG_INLINE_H_INCLUDED)
+#include <cassowary/config-inline.h>
+#define CONFIG_INLINE_H_INCLUDED
+#endif
+
+#include "ClLinearExpression_fwd.h"
+#include <set>
+#include <map>
+#include <vector>
+
+using std::set;
+using std::map;
+using std::vector;
+
+class ClVariable;
+class ClConstraint;
+class ClEditInfo;
+
+typedef set<ClVariable> ClVarSet;
+typedef map<ClVariable, ClVarSet > ClTableauColumnsMap;
+typedef map<ClVariable, ClLinearExpression *> ClTableauRowsMap;
+
+// For Solver
+typedef map<const ClConstraint *, ClVarSet> ClConstraintToVarSetMap;
+typedef map<const ClConstraint *, ClVariable> ClConstraintToVarMap;
+typedef map<ClVariable, const ClConstraint *> ClVarToConstraintMap;
+typedef vector<ClVariable> ClVarVector;
+
+typedef set<const ClConstraint *> ClConstraintSet;
+
+// For FDSolver
+typedef map<ClVariable, ClConstraintSet> ClVarToConstraintSetMap;
+
+#endif
diff --git a/libs/cassowary/cassowary/ClVariable.h b/libs/cassowary/cassowary/ClVariable.h
new file mode 100644
index 0000000000..03814e5ef2
--- /dev/null
+++ b/libs/cassowary/cassowary/ClVariable.h
@@ -0,0 +1,166 @@
+// $Id$
+//
+// Cassowary Incremental Constraint Solver
+// Original Smalltalk Implementation by Alan Borning
+// This C++ Implementation by Greg J. Badros, <gjb@cs.washington.edu>
+// http://www.cs.washington.edu/homes/gjb
+// (C) 1998, 1999 Greg J. Badros and Alan Borning
+// See ../LICENSE for legal details regarding this software
+//
+// ClVariable.h
+// A handle on ClAbstractVariable-s
+
+#ifndef ClVariable_H
+#define ClVariable_H
+
+#if defined(HAVE_CONFIG_H) && !defined(CONFIG_H_INCLUDED) && !defined(CONFIG_INLINE_H_INCLUDED)
+#include <cassowary/config-inline.h>
+#define CONFIG_INLINE_H_INCLUDED
+#endif
+
+#include <cstdio>
+#include <map>
+#include <string>
+#include "Cassowary.h"
+#include "ClFloatVariable.h"
+#include "ClFDVariable.h"
+
+using std::map;
+using std::string;
+
+class ClVariable;
+typedef map<const string,ClVariable> StringToVarMap;
+
+
+class ClVariable {
+ ClAbstractVariable *pclv;
+public:
+ // converters from raw ClAbstractVariable
+ ClVariable(ClAbstractVariable *pclv_) : pclv(pclv_) { }
+ ClVariable(ClAbstractVariable &clv_) : pclv(&clv_) { }
+
+ // Copy ctr
+ ClVariable(const ClVariable &clv_) : pclv(clv_.pclv) { }
+
+ /// These ctrs build ClFloatVariable-s
+ ClVariable(string name, Number Value = 0.0)
+ : pclv(new ClFloatVariable(name,Value))
+ { if (pmapStrPclv) { (*pmapStrPclv)[name] = *this; } }
+ ClVariable(Number Value = 0.0)
+ : pclv(new ClFloatVariable(Value)) { }
+ ClVariable(long number, char *prefix, Number Value = 0.0)
+ : pclv(new ClFloatVariable(number,prefix,Value)) { }
+
+ // This one builds a ClFDVariable
+ ClVariable(ClFDVariable *pcfv)
+ : pclv(pcfv)
+ { if (pmapStrPclv) { (*pmapStrPclv)[pcfv->Name()] = *this; } }
+
+ /// permit ClVariables to be used as pointers to pclvs
+ ClAbstractVariable *operator->() { return pclv; }
+ const ClAbstractVariable *operator->() const { return pclv; }
+
+ /// and also forward the function calls along
+
+
+ bool IsFloatVariable() const { assert(pclv); return pclv->IsFloatVariable(); }
+ bool IsFDVariable() const { assert(pclv); return pclv->IsFDVariable(); }
+ bool IsDummy() const { assert(pclv); return pclv->IsDummy(); }
+ bool IsExternal() const { assert(pclv); return pclv->IsExternal(); }
+ bool IsPivotable() const { assert(pclv); return pclv->IsPivotable(); }
+ bool IsRestricted() const { assert(pclv); return pclv->IsRestricted(); }
+
+ string Name() const { assert(pclv); return pclv->Name(); }
+
+ Number Value() const { assert(pclv); return pclv->Value(); }
+ int IntValue() const { assert(pclv); return pclv->IntValue(); }
+ void SetValue(Number Value)
+ { assert(pclv); pclv->SetValue(Value); }
+ void ChangeValue(Number Value)
+ { assert(pclv); pclv->ChangeValue(Value); }
+ void SetPv(void *pv)
+ { assert(pclv); pclv->SetPv(pv); }
+ void *Pv() const
+ { assert(pclv); return pclv->Pv(); }
+
+ void SetName(string const &nm) {
+ assert(pclv);
+ if (pmapStrPclv) {
+ pmapStrPclv->erase(Name());
+ (*pmapStrPclv)[nm] = *this;
+ }
+ pclv->SetName(nm);
+ }
+
+ ClAbstractVariable *get_pclv() const { return pclv; }
+ bool IsNil() const { return pclv == 0; }
+
+ virtual FDNumber DesiredValue() const
+ { assert(false); }
+
+ virtual list<FDNumber> *PlfdnDomain()
+ { assert(false); return 0; }
+
+ static void SetVarMap(StringToVarMap *pmap) { pmapStrPclv = pmap; }
+ static StringToVarMap *VarMap() { return pmapStrPclv; }
+ static StringToVarMap *pmapStrPclv;
+#ifndef CL_NO_IO
+ ostream &PrintOn(ostream &xo) const
+ {
+ if (pclv) return pclv->PrintOn(xo); /* return xo << "@" << pclv << endl; */
+ return xo << "clvNil";
+ }
+#endif
+
+ friend bool operator<(ClVariable cl1, ClVariable cl2)
+ { return cl1.pclv < cl2.pclv; }
+
+ friend bool operator==(ClVariable cl1, ClVariable cl2)
+ { return cl1.pclv == cl2.pclv; }
+
+ friend bool operator!=(ClVariable cl1, ClVariable cl2)
+ { return !(cl1 == cl2); }
+
+};
+
+#ifndef CL_NO_IO
+inline ostream &operator<<(ostream &xo, const ClVariable &clv)
+{ return clv.PrintOn(xo); }
+#endif
+
+#ifdef CL_USE_HASH_MAP_AND_SET
+struct hash<ClVariable> {
+ size_t operator()(const ClVariable & v) const
+ { return size_t((unsigned long)v.get_pclv()/CL_PTR_HASH_DIVISOR); }
+};
+#endif
+
+
+#include <math.h>
+
+// Compare two double-s approximately, since equality is no good
+inline bool ClApprox(double a, double b)
+{
+ const double epsilon = 1.0e-8;
+ if (a > b) {
+ return (a - b) < epsilon;
+ } else {
+ return (b - a) < epsilon;
+ }
+}
+
+// Can remove these if I decide to
+// autoconvert from ClVariable-s to double-s
+inline bool ClApprox(ClVariable clv, double b)
+{
+ return ClApprox(clv->Value(),b);
+}
+
+inline bool ClApprox(double a, ClVariable clv)
+{
+ return ClApprox(a,clv->Value());
+}
+
+extern ClVariable clvNil;
+
+#endif
diff --git a/libs/cassowary/cassowary/Makefile.am b/libs/cassowary/cassowary/Makefile.am
new file mode 100644
index 0000000000..cc581b80ff
--- /dev/null
+++ b/libs/cassowary/cassowary/Makefile.am
@@ -0,0 +1,36 @@
+MAINTAINERCLEANFILES = autom4te.cache Makefile.in
+
+noinst_HEADERS = \
+ Cassowary.h \
+ ClAbstractVariable.h \
+ ClDummyVariable.h \
+ ClObjectiveVariable.h \
+ ClSlackVariable.h \
+ ClConstraint.h \
+ ClConstraintHash.h \
+ ClEditConstraint.h \
+ ClEditOrStayConstraint.h \
+ ClErrors.h \
+ ClLinearConstraint.h \
+ ClLinearEquation.h \
+ ClLinearExpression.h \
+ ClLinearExpression_fwd.h \
+ ClLinearInequality.h \
+ ClSolver.h \
+ ClSimplexSolver.h \
+ ClStayConstraint.h \
+ ClStrength.h \
+ ClSymbolicWeight.h \
+ ClTableau.h \
+ ClFDVariable.h \
+ ClFDConnectorVariable.h \
+ ClFloatVariable.h \
+ ClVariable.h \
+ ClReader.h \
+ ClTypedefs.h \
+ ClPoint.h \
+ cl_auto_ptr.h \
+ config-inline.h \
+ debug.h \
+ timer.h
+
diff --git a/libs/cassowary/cassowary/cl_auto_ptr.h b/libs/cassowary/cassowary/cl_auto_ptr.h
new file mode 100644
index 0000000000..3c37429676
--- /dev/null
+++ b/libs/cassowary/cassowary/cl_auto_ptr.h
@@ -0,0 +1,69 @@
+// $Id$
+// See http://cseng.aw.com/bookdetail.qry?ISBN=0-201-63371-X&ptype=634
+// auto_ptr from More Effective C++ an earlier appendix (works w/ egcs)
+
+
+#ifndef CL_AUTO_PTR_H
+#define CL_AUTO_PTR_H
+
+#ifdef _MSC_VER
+#include <memory>
+template<class T>
+void ReinitializeAutoPtr(auto_ptr<T> &apref, T *pt)
+{
+ auto_ptr<T> ap(pt);
+ apref = ap;
+}
+#define cl_auto_ptr auto_ptr
+#else
+// FIXGJB: This implementation for egcs is buggy -- be careful
+// and replace ASAP
+template<class T>
+class cl_auto_ptr {
+ public:
+ explicit cl_auto_ptr(T *p = 0): pointee(p) {}
+
+ template<class U>
+ cl_auto_ptr(cl_auto_ptr<U>& rhs): pointee(rhs.release()) {}
+
+ ~cl_auto_ptr() { delete pointee; }
+
+ template<class U>
+ cl_auto_ptr<T>& operator=(cl_auto_ptr<U>& rhs)
+ {
+ if (this != &rhs) reset(rhs.release());
+ return *this;
+ }
+
+ T& operator*() const { return *pointee; }
+
+ T* operator->() const { return pointee; }
+
+ T* get() const { return pointee; }
+
+ T* release()
+ {
+ T *oldPointee = pointee;
+ pointee = 0;
+ return oldPointee;
+ }
+
+ // protected:
+ // This is non-standard
+ void reset(T *p = 0) { delete pointee; pointee = p; }
+
+ private:
+ T *pointee;
+};
+
+template<class T>
+void ReinitializeAutoPtr(cl_auto_ptr<T> &apref, T *pt)
+{
+ apref.reset(pt);
+}
+
+
+#endif
+
+
+#endif
diff --git a/libs/cassowary/cassowary/config-inline.h b/libs/cassowary/cassowary/config-inline.h
new file mode 100644
index 0000000000..8b13789179
--- /dev/null
+++ b/libs/cassowary/cassowary/config-inline.h
@@ -0,0 +1 @@
+
diff --git a/libs/cassowary/cassowary/debug.h b/libs/cassowary/cassowary/debug.h
new file mode 100644
index 0000000000..aa0499c641
--- /dev/null
+++ b/libs/cassowary/cassowary/debug.h
@@ -0,0 +1,48 @@
+// $Id$
+//
+// Cassowary Incremental Constraint Solver
+// Original Smalltalk Implementation by Alan Borning
+// This C++ Implementation by Greg J. Badros, <gjb@cs.washington.edu>
+// http://www.cs.washington.edu/homes/gjb
+// (C) 1998, 1999 Greg J. Badros and Alan Borning
+// See ../LICENSE for legal details regarding this software
+//
+// debug.h
+
+#ifndef CASSOWARY_DEBUG_H_
+#define CASSOWARY_DEBUG_H_
+
+#if defined(HAVE_CONFIG_H) && !defined(CONFIG_H_INCLUDED) && !defined(CONFIG_INLINE_H_INCLUDED)
+#include <cassowary/config-inline.h>
+#define CONFIG_INLINE_H_INCLUDED
+#endif
+
+#include <vector>
+#include "Cassowary.h"
+
+#ifdef CL_TRACE
+class Tracer {
+ public:
+ Tracer(const char *const sz) : sz_(sz) { cerr << "* " << sz; }
+ ~Tracer() { cerr << "x " << sz_ << " exited." << endl; }
+ private:
+ const char *const sz_;
+};
+
+inline void CtrTracer(const char *const sz, const void *pv)
+{ cerr << "@+ " << sz << " ctrnew@ " << pv << endl; }
+
+inline void DtrTracer(const char *const sz, const void *pv)
+{ cerr << "@- " << sz << " dtrnew@ " << pv << endl; }
+
+#else
+class Tracer {
+ public:
+ Tracer(const char *const) { }
+};
+
+inline void CtrTracer(const char *const, const void *) { }
+inline void DtrTracer(const char *const, const void *) { }
+#endif // CL_TRACE
+
+#endif
diff --git a/libs/cassowary/cassowary/timer.h b/libs/cassowary/cassowary/timer.h
new file mode 100644
index 0000000000..6bad1a6fef
--- /dev/null
+++ b/libs/cassowary/cassowary/timer.h
@@ -0,0 +1,176 @@
+/* $Id$ */
+#ifndef _TIMER_H_
+#define _TIMER_H_
+
+// Programmer: John P. Russo
+// --------------------------
+// John Russo has given permission to any of my students to use his
+// "timer" class.
+//
+// Please give full credit to him any time you wish to use this class.
+// Hossein Hakimzadeh 11/5/96
+
+/************************** timer.cpp **********************************
+
+ A simple example that shows how C++ classes can be used to implement
+ a "Timer" object, which mimics the familiar actions of a stopwatch.
+
+ The code relies heavily on the clock() function defined in the time
+ library. The clock() function returns the number of "ticks" that have
+ elapsed since a program starts. The size of a "tick" is compiler
+ dependent, but for PC compilers is about 1/18 second.
+
+ The problem with the clock function is that it is not convenient to
+ use for typical timing operations. The timer class, defined below, by
+ contrast, shows that an object-oriented approach to modules can
+ provide tools that are natural and easy to use.
+
+= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = */
+#include <time.h>
+
+class Timer
+{
+ //==================== public section ================================
+
+ // The functions and/or data in the public section of a class are
+ // accessible to anyone who uses the Timer class.
+
+public:
+ Timer(); // Constructor, used to declare Timer objects
+ void Start(); // Starts a timer object
+ void Stop(); // Stop a timer object
+ void Reset(); // Reset timer object
+ int IsRunning(); // Is the timer object running?
+ double ElapsedTime(); // How much time has been recorded?
+ double Resolution(); // Shortest measurable amount of time
+
+ //-------------------- private section -------------------------------
+
+ // The functions and/or data in the private section of a class are NOT
+ // accessible to those who use the Timer class. They are accessible by
+ // member functions of the class. This allows access to the data to be
+ // carefully controlled.
+
+private:
+ long StartReading; // Number of ticks when timer object last started.
+ long ElapsedTicks; // Number of ticks on timer object.
+ int TimerIsRunning; // 1 if and only if timer object is running.
+ double TicksPerSecond() // This inline function is used to convert
+// {return 18.206481;} // "ticks" (returned by clock() ) to seconds.
+ {return CLOCKS_PER_SEC;} // "ticks" (returned by clock() ) to seconds.
+ // In most UNIX systems this is 1000000
+};
+
+/**************************** Start ************************************
+
+ If the declaration "Timer StopWatch;" has been made, the the call,
+ "StopWatch.Start();" is like push the start button of a real stopwatch.
+
+- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
+void Timer::Start()
+{
+ TimerIsRunning = 1; // Stopwatch is now running
+ StartReading = clock(); // Look at internal clock and remember reading
+}
+
+/**************************** Stop ************************************
+
+ Looks at the PC's internal clock and computes the number of ticks that
+ have elapsed since the timer was started.
+
+ Note that if a timer is not reset, it can be used to time several events
+ and return the elapsed time for the enter set of events.
+
+- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
+void Timer::Stop()
+{
+ TimerIsRunning = 0; // Stop timer object.
+ ElapsedTicks += clock() - StartReading; // Add elapsed time to the
+} // previous time.
+
+/**************************** Reset ************************************
+
+ Clears a Timer of previous elapsed times, so that a new event can be
+ timed.
+
+- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
+void Timer::Reset()
+{
+ TimerIsRunning = 0; // Start not yet called.
+ ElapsedTicks = 0; // No time on timer object yet.
+}
+
+/************************** IsRunning ************************************
+
+ The data member, "TimerIsRunning" is used to keep track of whether a
+ timer is active, i.e. whether an event is being timed. While we want
+ those using the timer class to know when a timer is active, we do NOT
+ want them to directly access the TimerIsRunning variable. We solve this
+ problem, by making TimerIsRunning private and providing the public
+ "access function" below.
+
+- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
+int Timer::IsRunning()
+{
+ return TimerIsRunning;
+}
+
+/************************* ElapsedTime ***********************************
+
+ This function allows a client to determine the amount of time that has
+ elapsed on a timer object. Note that there are two possibilities:
+
+ 1) A timer object has been started and stopped. We can detect this
+ case, because the variable "TimerIsRunning" is false.
+
+ 2) A timer object is "running", i.e. is still in the process of timing
+ an event. It is not expected that this case will occur as frequently
+ as case 1).
+
+ In either case, this function converts ticks to seconds. Note that
+ since the function TicksPerSecond() returns a value of type double,
+ an implicit type conversion takes place before doing the division
+ required in either case.
+
+- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
+double Timer::ElapsedTime()
+{
+ if ( !TimerIsRunning ) // Normal case
+ return ElapsedTicks/TicksPerSecond();
+
+ else
+ return (ElapsedTicks + clock() - StartReading)/TicksPerSecond();
+}
+
+/************************** Resolution ***********************************
+
+ Althould we have no way of knowing how accurate the internal clock is,
+ we can predict its resolution, which is the shortest event that can be
+ measured by the clock.
+
+- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
+double Timer::Resolution()
+{
+ return 1/TicksPerSecond(); // Note 1 is coverted to 1.0 before division
+}
+
+/******************** Timer (constructor) *******************************
+
+ A "constructor" is a special class member function, one which has the
+ same name as the class. The "default constructor" is a constructor that
+ has no parameters. A constructor is called automatically when an
+ instance of a class is declared. For example, the constructor defined
+ below is called when the declaration "Timer T;" is executed.
+
+ If the programmer does not write a default constructor, then the
+ compiler will generate one automatically. However, by writing the
+ constructor below, we provide automatic initialization of timer objects.
+
+- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -*/
+Timer::Timer()
+{
+ TimerIsRunning = 0; // Start not yet called.
+ ElapsedTicks = 0; // No time on timer object yet.
+}
+
+#endif /* _TIMER_H_ */
diff --git a/libs/cassowary/configure.ac b/libs/cassowary/configure.ac
new file mode 100644
index 0000000000..3e565d7709
--- /dev/null
+++ b/libs/cassowary/configure.ac
@@ -0,0 +1,64 @@
+dnl Process this file with autoconf to produce a configure script.
+AC_INIT(cassowary)
+
+AC_CONFIG_AUX_DIR(.)
+AC_CANONICAL_HOST
+AC_CANONICAL_TARGET
+AC_VALIDATE_CACHED_SYSTEM_TUPLE()
+
+LIBCASSOWARY_MAJOR_VERSION=0
+LIBCASSOWARY_MINOR_VERSION=60
+LIBCASSOWARY_MICRO_VERSION=3
+
+AC_SUBST(LIBCASSOWARY_MAJOR_VERSION)
+AC_SUBST(LIBCASSOWARY_MINOR_VERSION)
+AC_SUBST(LIBCASSOWARY_MICRO_VERSION)
+
+BETA=
+
+LIBCASSOWARY_VERSION=$LIBCASSOWARY_MAJOR_VERSION.$LIBCASSOWARY_MINOR_VERSION.${LIBCASSOWARY_MICRO_VERSION}${BETA}
+LIBCASSOWARY_RELEASE=$LIBCASSOWARY_MAJOR_VERSION-$LIBCASSOWARY_MINOR_VERSION-${LIBCASSOWARY_MICRO_VERSION}${BETA}
+
+AC_SUBST(LIBCASSOWARY_SO_VERSION)
+AC_SUBST(LIBCASSOWARY_VERSION)
+AC_SUBST(LIBCASSOWARY_RELEASE)
+
+AM_INIT_AUTOMAKE(libcassowary,${LIBCASSOWARY_VERSION})
+
+AM_CONFIG_HEADER(config.h)
+
+dnl Checks for programs.
+
+AC_PROG_CC
+AC_PROG_CXX
+if test "$ac_cv_prog_cxx" = "no" ; then
+ AC_MSG_ERROR([*** libcassowary is C++. You don't appear to have a C++ compiler])
+fi
+
+CXXFLAGS="-g -D_REENTRANT"
+OPT_CXXFLAGS="-D_REENTRANT -O6 -fomit-frame-pointer -ffast-math -fstrength-reduce -funroll-loops -fmove-all-movables"
+if test x"$GXX" = xyes ; then
+ CXXFLAGS="$CXXFLAGS -Wall"
+fi
+if test x"$GXX" = xyes ; then
+ OPT_CXXFLAGS="$OPT_CXXFLAGS -Wall"
+fi
+
+AC_ARG_ENABLE(optimize,
+ [ --enable-optimize ask the compiler for its best optimizations.],
+ [ if test "x$enable_optimize" != "xno" ; then CXXFLAGS="$OPT_CXXFLAGS" ; fi ])
+
+AC_OBJEXT
+AC_PROG_RANLIB
+AM_PROG_LEX
+AC_PROG_YACC
+
+AC_LANG_CPLUSPLUS
+
+CFLAGS="$CFLAGS $GLIB_CFLAGS"
+CXXFLAGS="$CXXFLAGS $GLIB_CFLAGS"
+LIBS="$LIBS $GLIB_LIBS $POSIX_RTSCHED_LIBS"
+
+AC_OUTPUT([Makefile
+ cassowary/Makefile
+])
diff --git a/libs/glibmm2/.cvsignore b/libs/glibmm2/.cvsignore
new file mode 100644
index 0000000000..865cec5b6c
--- /dev/null
+++ b/libs/glibmm2/.cvsignore
@@ -0,0 +1,11 @@
+Makefile
+Makefile.in
+aclocal.m4
+autom4te.cache
+config.log
+config.status
+configure
+glibmm-2.4.pc
+glibmmconfig.h
+libtool
+stamp-h1
diff --git a/libs/glibmm2/AUTHORS b/libs/glibmm2/AUTHORS
new file mode 100644
index 0000000000..35ef03fe26
--- /dev/null
+++ b/libs/glibmm2/AUTHORS
@@ -0,0 +1,20 @@
+Please use the mailing list (gtkmm-list@gnome.org) instead of emailing developers directly.
+See the ChangeLog for up-to-date information.
+
+Murray Cumming <murrayc@usa.net>
+Daniel Elstner <daniel.elstner@gmx.net>
+
+Some former contributors:
+
+Karl Nelson <kenelson@ece.ucdavis.edu>
+Tero Pulkkinen <terop@modeemi.cs.tut.fi>
+Elliot Lee <sopwith@redhat.com>
+Phil Dawes <P.L.Dawes-CSSE94@cs.bham.ac.uk>
+Erik Andersen <andersee@debian.org>
+Bibek Sahu <scorpio@dodds.net>
+Mirko Streckenbach
+Havoc Pennington <hp@pobox.com>
+Guillaume Laurent <glaurent@telegraph-road.org>
+Todd Dukes <tdukes@ibmoto.com>
+Peter Lerner <peter.lerner@bnbt.de>
+Herbert Valerio Riedel <hvr@gnu.org>
diff --git a/libs/glibmm2/CHANGES b/libs/glibmm2/CHANGES
new file mode 100644
index 0000000000..36571a78e0
--- /dev/null
+++ b/libs/glibmm2/CHANGES
@@ -0,0 +1,33 @@
+Changes between glibmm 2.2 (previously part of gtkmm) and glibmm 2.4:
+
+* glibmm is now a separate module, for use with non-GUI software.
+ (Note that glibmm 2.4 and gtkmm 2.4 install in parallel with
+ gtkmm 2.2 - so you can install and use both simultaneously and
+ port to 2.4 whenever you are ready.)
+* glibmm now uses libsigc++ 2 rather than libsigc++ 1.2.
+ There is a libsigc++ compatibility header. The new, undeprecated, API
+ is slightly improved.
+ - Connecting signal handlers:
+ signal_something().connect( SigC::slot(*this, &Something::on_something) );
+ should become
+ signal_something().connect( sigc::mem_fun(*this, &Something::on_something) );
+ or, for non-member methods:
+ signal_something().connect( sigc::ptr_fun(&Something::on_something) );
+ - Binding extra parameters:
+ SigC::bind(...)
+ should become
+ sigc::bind(...)
+ - Declaring signals:
+ SigC::Signal1<void, int>
+ should become
+ sigc::signal<void, int>
+ - Declaring slots:
+ SigC::Slot1<void, int>
+ should become
+ sigc::slot<void,int>
+ - Inheriting from the libsigc++ base class:
+ class Something : public SigC::Object
+ should become
+ class Something : public sigc::trackable
+
+
diff --git a/libs/glibmm2/COPYING b/libs/glibmm2/COPYING
new file mode 100644
index 0000000000..c4792dd27a
--- /dev/null
+++ b/libs/glibmm2/COPYING
@@ -0,0 +1,515 @@
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations
+below.
+
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+^L
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it
+becomes
+a de-facto standard. To achieve this, non-free programs must be
+allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+^L
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control
+compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+^L
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+^L
+ 6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ d) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ e) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+^L
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+^L
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply, and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License
+may add an explicit geographical distribution limitation excluding those
+countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+^L
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+^L
+ How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms
+of the ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library.
+It is safest to attach them to the start of each source file to most
+effectively convey the exclusion of warranty; and each file should
+have at least the "copyright" line and a pointer to where the full
+notice is found.
+
+
+ <one line to give the library's name and a brief idea of what it
+does.>
+ Copyright (C) <year> <name of author>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+Also add information on how to contact you by electronic and paper
+mail.
+
+You should also get your employer (if you work as a programmer) or
+your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James
+Random Hacker.
+
+ <signature of Ty Coon>, 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
+
+
diff --git a/libs/glibmm2/ChangeLog b/libs/glibmm2/ChangeLog
new file mode 100644
index 0000000000..0bddbef6b1
--- /dev/null
+++ b/libs/glibmm2/ChangeLog
@@ -0,0 +1,998 @@
+2.6.1:
+
+2005-03-07 Murray Cumming <murrayc@murrayc.com>
+
+ * glib/glibmm/interface.cc: Disable the new check for pre-existing
+ interface implementations, because it checks all base gtypes and
+ not just the current gtype. Bug #169442 by Bryan Forbes.
+
+2.6.0:
+
+2.5.6:
+
+2005-02-18 Murray Cumming <murrayc@murrayc.com>
+
+ * glib/glibmm/interface.cc: Interface_Class:add_interface(), used by
+ add_interface() methods of Interfaces: Do not add interfaces that
+ have been added before, to avoid the warning from glib. This
+ allows application code to be simpler.
+
+2005-02-18 Murray Cumming <murrayc@murrayc.com>
+
+ * tools/pm/Output.pm: Add the documentation to the const property()
+ accessor as well as the non-const one.
+
+2005-02-13 Murray Cumming <murrayc@murrayc.com>
+
+ * tools/extra_defs_gen/generate_extra_defs.cc: Use
+ g_param_spec_get_blurb() to output the documentation for the
+ properties in the .defs file.
+ * tools/m4/property.m4: Take an extra docs argument, and put it in the
+ doxygen docs.
+ * tools/pm/Output.pm: Add the extra docs argument when calling the
+ property m4 macro.
+ * tools/pm/Property.pm: Read in the new docs part of the .defs, and
+ add a period at the end if neccessary.
+
+2005-02-01 Murray Cumming <murrayc@murrayc.com>
+
+ * examples/threadpool.cc, dispatcher.cc, dispatcher2.cc: Removed the
+ #ifdef for AIX, because sigc::bind now works on AIX.
+
+2005-01-27 Cedric Gustin <cedric.gustin@swing.be>
+
+ * MSVC_Net2003/glibmm/glibmm.rc.in: Reverted to 2.4 for the
+ library version number.
+
+2.5.5:
+
+2005-01-26 Cedric Gustin <cedric.gustin@swing.be>
+
+ * MSVC_Net2003/glibmm/glibmm.vcproj: Reverted to 2.4 for the
+ library version number.
+
+2005-01-24 Cedric Gustin <cedric.gustin@swing.be>
+
+ * Makefile.am, configure.in: Added MSVC_Net2003 directory.
+ * config.h.in: Added mkfifo #define (for mingw32).
+ * glib/glibmmconfig.h.in: Added new #define's to MSVC section.
+ * examples/iochannel_stream/Makefile.am: Do not build on win32
+ with mingw32 (mkfifo not available).
+ * scripts/cxx_std.m4: Fixed typo in AC_DEFINE macros.
+ * build_shared/Makefile_build.am_fragment: Removed
+ $(sublib_name)_COMPILATION variable (is useless now on
+ cygwin/mingw as all symbols are dll exported).
+ * MSVC_Net2003/*: Initial commit imported from glibmm-2-4 branch.
+ * MSVC_Net2003/glibmm/Makefile.am: Rewrote rule for local copy of
+ glibmmconfig.h (required for 'make distcheck').
+
+2005-01-21 Murray Cumming <murrayc@murrayc.com>
+
+ * configure.in, scripts/cxx.m4, glibmm/glibmmconfig.h.in: Added new
+ compiler tests to see whether extern "C" functions are put in the
+ global namespace, even when we use extern "C" inside a namespace
+ declaration. The AIX xlC compiler does this, but allows us to
+ redeclare the namespace inside the extern "C" block.
+ * glib/glibmm/property.h: Use the new
+ #ifdef GLIBMM_MUST_REDECLARE_NAMESPACES_INSIDE_EXTERNC and redeclare
+ the namespace when necessary.
+ * examples/thread/dispatcher.cc, dispatcher2.cc: Use sigc::bind<1>
+ instead of just sigc::bind<> because the AIX xlC compiler needs the
+ extra hint. However, the linker then fails, so the use of sigc::bind
+ is ifdefed out for _AIX. See the comments in the code.
+
+2005-01-21 Murray Cumming <murrayc@murrayc.com>
+
+ * configure.in, scripts/cxx.m4, glibmm/glibmmconfig.h.in: Added new
+ compiler tests.
+ 1. To see whether it allows use of non extern C functions
+ as extern C callbacks, because the Tru64 compiler does not
+ allow this, when using strict_ansi. We do not actually use this yet.
+ 2. To see whether it allows us to define a template that uses an
+ undefined type, even if we do not use it before defining the type.
+ Tru64 does not allow this. That's probably correct.
+ * glib/glibmm/container.h: #ifdef out a dynamic_cast that Tru64
+ does not allow, and which I can not think of a better place to put.
+ See the comment in the code.
+ * glib/glibmm/containerhandler_helpers.h: When the compiler does not
+ alllow the GObject and GtkObject (dynamic_cast of) specializations
+ here, then put them in glib/glibmm/object.h and
+ gtkmm/gtk/src/object.hg instead.- needed by Tru64 compiler.
+ * glib/glibmm/value.h, value_custom.[h|cc]: Conditionally moved
+ the RefPtr Value specialization into object.h, as above.
+ * glib/src/ optiongroup.ccg, spawn.ccg, thread.ccg: Make C callacks
+ separate extern "C".
+ * glib/src/optiongroup.ccg: Do not use the StringArrayHandle,
+ because the Tru64 compiler has problems with it - see comments
+ in code.
+ * glib/src/optionentry.hg: Remove the include of value.h, because
+ it is not used and it causes a Tru64 compile error in
+ optioncontext.cc because its templates are included before the
+ types that the template uses.
+
+2005-01-19 Murray Cumming <murrayc@murrayc.com>
+
+ * configure.in, scripts/cxx.m4, glibmm/glibmmconfig.h.in: Added a
+ compiler test, because the IRIX MipsPro compiler does not allow the
+ inline initialization of ustring::npos.
+ * glib/glibmm/ustring.[h|cc]: When the compiler does not support the
+ inline initialization of npos, initialize it in the .cc file.
+ Declare partial specializations of the SequenceString inner class
+ inside the class - needed by IRIX MipsPro compiler.
+
+2005-01-18 Murray Cumming <murrayc@murrayc.com>
+
+ * glibmm/src/optiongroup.[hg|ccg]: CppOptionEntry::convert_c_to_cpp():
+ Copy the strings to the vector in a loop, instead of using the
+ ArrayHandle constructor, because that does not seem to work with the
+ SUN Forte compiler.
+
+2.5.4:
+
+2005-01-10 Murray Cumming <murrayc@murrayc.com>
+
+ * glibmm/src/optiongroup.[hg|ccg]: Added a castitem constructor
+ that always takes ownership, needed by Gtk::Main. Added the new
+ FLAG_REVERSE flag value. Added reference documentation.
+
+2.5.3:
+
+2005-01-09 Murray Cumming <murrayc@murrayc.com>
+
+ * glib/glibmm/misc_utils.[h|cc]: Added setenv() and unsetenv(),
+ wrapping new functions added in glib 2.4.
+ * glib/src/convert.[hg|ccg]: Added filename_display_name() and
+ filename_display_basename().
+
+2005-01-09 Murray Cumming <murrayc@murrayc.com>
+
+ * glib/src/optionentry.ccg: Copy constructor: Copy the short name
+ form the src, not from itself. Bug #16331 from Daniel Holbach.
+
+2005-01-09 Murray Cumming <murrayc@murrayc.com>
+
+ * glib/src/optionentry.[hg|cc]: Add add_entry(entry, bool&), to wrap
+ use of G_OPTION_ARG_NONE. Bug #163325 from Daniel Holbach.
+ * examples/options/main.cc: Use the new add_entry() overload.
+
+2005-01-06 Benoît Dejean <TazForEver@dlfp.org>
+
+ * glib/glibmm/dispatcher.cc:
+ * glib/glibmm/error.cc:
+ * glib/glibmm/exceptionhandler.cc:
+ * glib/glibmm/main.cc:
+ * glib/glibmm/threadpool.cc:
+ * glib/glibmm/ustring.cc:
+ * glib/glibmm/wrap.cc: Don't export private API.
+ Closes #163031.
+
+2005-01-04 Chris Vine <chris@cvine.freeserve.co.uk>
+
+ * examples/iochannel_stream/: Provide a means of obtaining
+ Glib::IOChannel error information from the streambuffer. Remove
+ the code conversion option from the fdstream/fdstreambuf
+ constructors and add comments in fdstream.h about code conversion
+ and other matters. Add a detach() function and a destructor to
+ fdstreambuf. Correct an error in fdstreambuf::xsgetn(). Include
+ missing <string> header file in main.cc.
+
+2.5.2:
+
+2004-12-19 Murray Cumming <murrayc@murrayc.com>
+
+ * examples/: Adapted and added iochannel_stream example from
+ Chris Vine in bug #138259.
+
+2004-12-19 Murray Cumming <murrayc@murrayc.com>
+
+ * glib/src/: Added glib_docs.xml, generated with docsextract_to_xml.py
+ and glib_docs_override.xml, to generate some API reference from
+ the C docs.
+ * glib/src/Makefile.am: Mention the new files.
+
+2004-12-19 Murray Cumming <murrayc@murrayc.com>
+
+ * docs/reference/: Added a copy of the libstdc++ doxygen tags file,
+ but it still does not seem to work, for example with std::vector<>
+ and std::string.
+
+2004-12-19 Murray Cumming <murrayc@murrayc.com>
+
+ * docs/reference/Doxyfile.in: Use the libstdc++ TAG files, so that
+ references to std:: classes take people to their docs.
+ * glib/src/: Added glib_docs.xml and glib_docs_override.xml, and
+ mentioned them in Makefile.am.
+
+2004-12-19 Murray Cumming <murrayc@murrayc.com>
+
+ * glib/src/date.hg, glib/glibmm/main.h,
+ glib/glibmm/signalproxy_connectionnode.h: Deal with some doxygen
+ warnings about undocumented parameters.
+ * glib/glibmm/ustring.h: Added documentation for the size() and
+ bytes() methods.
+
+2004-11-21 Murray Cumming <murrayc@murrayc.com>
+
+ * glib/src/optionentry.[hg|ccg]: Removed OptionEntry enum and
+ set_arg_data(), because they are not needed any more.
+
+2.5.1:
+
+2004-11-01 Murray Cumming <murrayc@murrayc.com>
+
+ * glib/src/optiongroup.[hg|ccg]: Added add_entry() for vector<ustring>
+ and add_entry_filename() for std::string and vector<std::string>.
+ * examples/options/main.cc: Test these new methods.
+
+2004-10-30 Murray Cumming <murrayc@murrayc.com>
+
+ * glib/src/optiongroup.[hg|ccg]: Added gobj_give_ownership().
+ * glib/src/optioncontext.[hg|ccg]: add_group(), set_main_group(): Use
+ gobj_give_ownership() because GOptionContext deletes the GOptionGroups
+ that we give it.
+
+2004-10-26 Murray Cumming <murrayc@murrayc.com>
+
+ * glib/src/optionentry.hg: Remove accessors for arg and arg_data.
+ * glib/src/optiongroup.[hg|ccg]: add_entry(): Remove arg_type parameter
+ and instead add overrides which take specific C++ value types.
+ Add CppOptionEntry inner class to hold information about each entry
+ and its dynamically allocated C value.
+ Add map_entries_ map to store them, so we can iterate over them during
+ post_parse.
+
+2004-10-21 Murray Cumming <murrayc@murrayc.com>
+
+ * build_shared/Makefile_build.am_fragment: Patch from Roger Leigh in
+ bug # 15589 to use PLATFORM_WIN32 rather than OS_WIN32 to enable
+ -no-undefined. This allows glibmm to build in a cgwin environment,
+ apparently.
+
+2.5.0:
+
+2004-10-17 Murray Cumming <murrayc@murrayc.com>
+
+ * glib/src/optioncontext.[hg|ccg]: add_entry(): Fixed crash by
+ creating a temporary array, with a nulled last item, which is what the
+ C function wants. In callbacks, ignore the group parameter because our
+ option group in the data parameter is the same, and does not require
+ construction of a second C++ wrapper instance for the same C instance.
+ * glib/src/optiongroup.[hg|ccg]: Removed the cast constructor, because
+ it is not needed anymore, and there is no clear way to implement it.
+
+2004-10-14 Murray Cumming <murrayc@murrayc.com>
+
+ * tools/pm/WrapParser.pm: on_wrap_property(): Convert property name to
+ canonical form, so that we can recognise notifications of property
+ value changes. Bug #152764.
+
+2004-10-07 Philip Langdale <plangdale@vmware.com>
+
+ * glib/glibmm/signalproxy_connectionnode.cc: Remove unnecessary warning
+ when notify() is called after destroy_notify_handler(). (bug #154498)
+
+2004-10-01 Murray Cumming <murrayc@murrayc.com>
+
+ * glib/src/option*.[hg|ccg], examples/options/main.cc: Rethought the
+ structure now that I see how the parts work together. Rearranged the
+ example to show how the parsing can fill values in member variables
+ of a derived OptionGroup class. However, 1. it crashes now, 2. we need
+ extra code to map the GOption C types to suitable C++ types, probably
+ by doing pre and post parsing to create temporary C types for the C++
+ types.
+
+2004-09-27 Murray Cumming <murrayc@murrayc.com>
+
+ * glib/src/option*.[hg|ccg]: Wrapped more methods, but I have still not
+ finished.
+ * examples/options/: Started an example.
+
+2004-09-26 Murray Cumming <murrayc@murrayc.com>
+
+ * glib/src/glib_functions.defs: Regenerated with h2defs.py
+ * glib/src/: Added optionentry.[hg|ccg], optiongroup.[hg|ccg],
+ optioncontext.[hg|ccg].
+
+2004-09-19 Murray Cumming <murrayc@murrayc.com>
+
+ * This is the HEAD branch.
+
+2004-09-13 Cedric Gustin <cedric.gustin@swing.be>
+
+ * examples/thread/dispatcher.cc: Fixed a race condition on win32
+ that involved the combined use of auto_ptr and multithreading (bug
+ #109966).
+
+2.4.4:
+
+2004-07-23 Martin Schulze <mschulze@cvs.gnome.org>
+
+ * glib/glibmm/main.cc: Move deletion of SourceConnectionNode object
+ into destroy_notify_callback() exclusively; do not delete from
+ notify().
+ (bug #144420)
+
+2004-07-10 Murray Cumming <murrayc@murrayc.com>
+
+ * glib/glibmm/signalproxy_connectionnode.cc: notify(): Do not delete
+ the connection after disconnecting it, because disconnecting it
+ always causes disconnect_notify to be called, so just delete it there.
+ This prevents double deletes and reading of deleting memory, found in
+ bug #145571.
+
+2004-07-09 Murray Cumming <murrayc@murrayc.com>
+
+ * glib/glibmm/signalproxy.h.m4: Added some documentation.
+
+2004-06-20 Daniel Elstner <daniel.elstner@gmx.net>
+
+ * glib/glibmm/objectbase.cc: Spring cleaning.
+ * glib/glibmm/object.cc: ditto.
+
+2.4.3:
+
+2004-06-18 Daniel Elstner <daniel.elstner@gmx.net>
+
+ * scripts/macros.m4 (GTKMM_ARG_ENABLE_WARNINGS): Add
+ -Wno-long-long to the list of tried warning flags.
+
+2004-06-16 Daniel Elstner <daniel.elstner@gmx.net>
+
+ * glib/glibmm/dispatcher.cc (DispatchNotifier::create_pipe): There
+ is no point in calling g_file_error_from_errno() on win32 since we
+ have no real errno. Also fix the error text to say "event" rather
+ than "pipe".
+
+2004-06-14 Daniel Elstner <daniel.elstner@gmx.net>
+
+ * scripts/cxx.m4: Add a couple of casts to void in order to suppress
+ warnings about unused variables. I still have no idea as to why the
+ hardcore warning flags are remembered when running make distcheck...
+
+2004-06-14 Daniel Elstner <daniel.elstner@gmx.net>
+
+ * examples/thread/dispatcher.cc: Explicitely join all threads.
+ Hopefully that'll fix the crash on win32 (see bug #109966).
+
+2004-06-13 Daniel Elstner <daniel.elstner@gmx.net>
+
+ * examples/thread/dispatcher*.cc (main): Remove unused parameter
+ names to fix building with -Werror.
+
+2004-06-13 Daniel Elstner <daniel.elstner@gmx.net>
+
+ * configure.in (GTKMM_ENABLE_DEBUG_REFCOUNTING): s/^GTK/GLIB/
+
+2004-06-08 Daniel Elstner <daniel.elstner@gmx.net>
+
+ * build_shared/Makefile_build.am_fragment (all_includes): Remove
+ left-over include paths for pango, atk, gdk and gtk.
+
+2004-06-07 Daniel Elstner <daniel.elstner@gmx.net>
+
+ * glib/glibmm/stringutils.h: Replace a couple of double quotes with
+ &quot; to prevent doxygen from escaping the enclosed HTML entities.
+
+2004-06-04 Daniel Elstner <daniel.elstner@gmx.net>
+
+ * glib/glibmm/ustring.h: Use /*! instead of /** to introduce
+ doxygen comments in order to avoid cluttering the long method list
+ of class Glib::ustring. Replace a few double quotes with &quot;
+ to prevent doxygen from escaping the enclosed HTML entities.
+
+2.4.2:
+
+2004-06-03 Daniel Elstner <daniel.elstner@gmx.net>
+
+ * scripts/Makefile.am (EXTRA_DIST): Remove mkinstalldirs, because
+ automake-1.8 doesn't use it anymore and prior versions should pick
+ it up automatically anyway.
+
+2004-06-03 Daniel Elstner <daniel.elstner@gmx.net>
+
+ * glib/glibmm/dispatcher.cc: Complete overhaul of the Win32
+ implementation of Glib::Dispatcher. That is, mutex locking is
+ done correctly now and dynamic memory allocation is no longer
+ used, plus a few other cleanups. See reopened bug #109966.
+
+2004-06-03 Daniel Elstner <daniel.elstner@gmx.net>
+
+ * glib/glibmm/signalproxy_connectionnode.cc
+ (SignalProxyConnectionNode::SignalProxyConnectionNode):
+ Reorder the initializer list to match the declaration order.
+
+ (SignalProxyConnectionNode::notify): Add missing return 0.
+
+2004-05-26 Daniel Elstner <daniel.elstner@gmx.net>
+
+ * glib/glibmm/ustring.{cc,h}: Globally apply some minor code
+ cleanup and optimization tweaks.
+
+ (get_unichar_from_std_iterator): Replace implementation with a
+ hand-optimized and profiled variant that has been lurking in my
+ local tree for quite some time, thus should be well tested.
+ Also add the G_GNUC_PURE() attribute.
+
+ (operator+): Explicitely instantiate and return a temporary string,
+ instead of accessing the reference ustring::operator+=() returns.
+ This quite often allows the compiler to eliminate the additional
+ copy constructor invocation.
+
+2004-05-25 Murray Cumming <murrayc@murrayc.com>
+
+ * configure.in, Makefile.am: Removed the glibmm.spec files, because
+ it is broken and nobody has volunteered to fix it.
+
+2004-05-20 Daniel Elstner <daniel.elstner@gmx.net>
+
+ * examples/thread/dispatcher.cc: Revert last commit because it's
+ silly. To make the code truly exception-safe it would be necessary
+ to either join all threads or to notify them, which is way beyond
+ the scope of this example.
+
+2004-05-20 Daniel Elstner <daniel.elstner@gmx.net>
+
+ * examples/thread/dispatcher.cc: Set a good example and
+ be paranoid about possible memory leaks due to exeptions.
+
+2004-05-20 Daniel Elstner <daniel.elstner@gmx.net>
+
+ * examples/thread/dispatcher.cc: Code cleanup. Most importantly,
+ get rid of the locking around std::cout since it obfuscates the
+ purpose of using Glib::Dispatcher.
+
+2004-05-13 Daniel Elstner <daniel.elstner@gmx.net>
+
+ * glib/glibmm/object.{cc,h} (ConstructParams::ConstructParams):
+ Implement the copy constructor in a way that actually works if used.
+ Relying on the compiler to optimize it away is a bad idea. (#132300)
+
+2004-05-04 Murray Cumming <murrayc@murrayc.com>
+
+ * glib/glibmm/ustring.h: Documented the constructors, based on
+ the libstdc++ documentation, to make it clear that sizes are in
+ characters rather than bytes.
+
+2004-05-01 Murray Cumming <murrayc@murrayc.com>
+
+ * configure.in: Increase glib dependency to 2.4.0.
+
+2004-04-30 Murray Cumming <murrayc@murrayc.com>
+
+ * tools/m4/gobject.m4: Allow use of _CUSTOM_DTOR(), needed by
+ Gnome::Gda::Connection.
+
+2.4.1:
+
+2004-04-17 Murray Cumming <murrayc@murrayc.com>
+
+ * docs/reference/Makefile.am: Make the generated html depend on the
+ beautify_docs.pl.in source instead of the generated beautify_docs.pl,
+ so that the html is not rebuilt from tarballs.
+
+2004-04-17 Murray Cumming <murrayc@murrayc.com>
+
+ * glib/glibmm/container_handle.h: Reimplemented more of the
+ to_cpp_type() methods without using dependent methods, so that they
+ work with g++ 3.4 (cvs versions).
+
+2.4.0:
+
+2004-04-11 Murray Cumming <murrayc@murrayc.com>
+
+ * tools/pm/WrapParser.pm, Output.pm, m4/signal.m4: Allow _WRAP_SIGNAL()
+ to take an refreturn argument, so that Gtk::Widget::on_get_accessible()
+ can do an extra ref before returning the Atk::Object.
+
+2004-04-09 Murray Cumming <murrayc@murrayc.com>
+
+ * tools/pm/Output.pm: output_wrap_property(): Provide the actual
+ property name as well as one with - replace with _, so we can
+ test for the correct value in notification signal handler.
+ * tools/m4/property.m4: Use the actual property name when calling
+ C functions.
+
+2.3.8:
+
+2004-03-24 Murray Cumming <murrayc@murrayc.com>
+
+ * scripts/cxx.m4: Corrected parentheses, which cause the docs to be
+ written into config.h. Thanks to Alexander Nedotsukov.
+
+2004-03-23 Murray Cumming <murrayc@murrayc.com>
+
+ * scripts/cxx.m4: Corrected the ambiguous const template test, which
+ failed on all platforms because it generated bad code.
+
+2004-03-20 Martin Schulze <mschulze@cvs.gnome.org>
+
+ * glibmm/main.cc: Bug fix in SourceConnectionNode::notify() (#137030).
+
+2004-03-18 Murray Cumming <murrayc@murrayc.com>
+
+ * tools/generate_wrap_init.pl: Change a regex so that files are
+ included without full path. Apparently this helps when building outside
+ of the source directory, though I'm sceptical. By Victor Zverovich in
+ bug #137530.
+
+2.3.7:
+
+2004-03-14 Murray Cumming <murrayc@murrayc.com>
+
+ * scripts/sun.m4: Set the correct variable, so it is actually set in
+ glibmmconfig.
+
+2004-03-14 Murray Cumming <murrayc@murrayc.com>
+ * glib/glibmm/containerhandle_shared.h value.h: Used ifdef
+ GLIBMM_HAVE_DISAMBIGUOUS_CONST_TEMPLATE_SPECIALIZATIONS to avoid
+ problems with the SUN Forte compiler.
+
+2004-03-14 Murray Cumming <murrayc@murrayc.com>
+
+ * scripts/cxx.m4: Added CAN_DISAMBIGUATE_CONST_TEMPLATE_SPECIALIZATIONS
+ m4 macro to use in configure.in, to check for the SUN Forte problem -
+ see the comments in cxx.m4.
+ * scripts/sun.m4: Moved some brackets around to make the define
+ actually work.
+
+2004-03-13 Murray Cumming <murrayc@murrayc.com>
+
+ * glib/glibmm/containerhandle_shared.h: TypeTraits to_cpp_type()
+ specializations: Use wrap_auto() directly instead of a specific
+ wrap() overload that would be dependent. Needed for g++ 3.4.
+ * glib/glibmm/containers.h: Same again.
+
+2004-03-13 Murray Cumming <murrayc@murrayc.com>
+
+ * tools/m4/class_shared.m4: Remove the parent get_type() call from
+ the Class::init() function, because it is optimised away, and g++ 3.4
+ actually complains that it does nothing.
+ * glib/glibmm/object.[h|cc]: Add a public ConstructParams copy
+ constructor, needed by g++ 3.4. See comments in the code.
+ * tests/glibmm_value/glibmm_value.cc: Instantiate instances of
+ value types, to fix the g++ 3.4 build. I don't know what the code
+ was meant to do before anyway.
+
+2004-03-11 Murray Cumming <murrayc@murrayc.com>
+
+ * scripts/: Added sun.m4, copied from libsigc++-1.2/scripts and
+ modified, so we can detect the SUN Forte compiler.
+ * configure.in: Used the m4 macro.
+ * glibmm/glibmm-config.h: Undef the GLIBMM_COMPILER_SUN_FORTE macro
+ so that it will be defined if configure sets it.
+
+2004-03-09 Murray Cumming <murrayc@murrayc.com>
+
+ * Some, but not all, SUN Forte build fixes:
+ * tools/m4/convert_gdk.m4, convert_glib.m4: Use existing
+ sun-specific conversion when converting from any
+ RefPtr<const Something> to *Something.
+
+2004-04-08 Hagen Moebius <hagen.moebius@starschiffchen.de>
+
+ * tools/pm/DocsParser.pm: Another change to give better warnings and
+ errors at gmmproc-runtime. Further improvment of parsing parameter names
+ to strip traling underscres. This not only for reference text, but for
+ the parameter list also.
+
+2004-04-07 Hagen Moebius <hagen.moebius@starschiffchen.de>
+
+ * tools/pm/DocsParser.pm: Allow overrides to only override
+ part of the docs. Add a <mapping> tag to associate non-prefixed
+ functions with classes. Improve parsing of parameter names so they
+ can now have numbers in the names.
+
+2.3.6:
+
+2004-03-03 Murray Cumming <murrayc@murrayc.com>
+
+ * Added glib/glibmm/i18n.h and i18n-lib.h which defines _() and friends
+ for internationalization. See the comments in the header - you must
+ include things in the right order.
+ * glib/src/spawn.[hg|ccg]: Added spawn_close_id() as wrapper for
+ g_spawn_close_id().
+ * glib/glibmm/main.[h|cc]: Added MainLoop::depth() as wrapper for
+ g_main_depth().
+
+ 2004-03-02 Murray Cumming <murrayc@murrayc.com>
+
+ * tools/pm/Function.pm: parse_param(): Only parse const as an
+ individual part of the type name if it is followed by a space, so
+ that we can have const const_iterator& types.
+
+2004-02-27 Martin Schulze <teebaum@cvs.gnome.org>
+
+ * CHANGES: Fix typo reported by Chris Vine.
+
+2004-02-13 Martin Schulze <teebaum@cvs.gnome.org>
+
+ * documentation fixes and corrections in the comments reflecting
+ the shift to libsigc++ 2.
+ * make all source files in example thread use libsigc++ 2 instead
+ of libsigc++ 1.2.
+
+2.3.5:
+
+2004-02-10 Murray Cumming <murrayc@usa.net>
+
+ * glibmm now uses libsigc++ 2 instead of libsigc++ 1.2. See bug
+ #125061 for more details. We must update CHANGES later.
+
+2.3.4:
+
+2004-02-02 Murray Cumming <murrayc@usa.net>
+
+ * glib/glibmm/containerhandle_shared.h: Traits<const T*>: Added
+ const_cast, needed by TreeView::get_columns() const: bug #126721.
+
+2004-01-29 Murray Cumming <murrayc@usa.net>
+
+ * tools/pm/Parser.pm, Output.pm, tools/m4/signal.m4: Add an optional
+ custom_c_callback parameter to _WRAP_SIGNAL to allow special code
+ for the SelectionData& output parameter in Gtk::Widget signals.
+ Hopefully we won't need too many more of these hacks - the m4 is
+ becoming very hard to read, with all these nested ifelse() statements.
+
+2004-01-27 Cedric Gustin <cedric.gustin@swing.be>
+
+ * build_shared/Makefile_build.am_fragment: Added win32-specific
+ --export-all-symbols to linker flags. This is backported from
+ gtkmm-2.2.
+ * README.win32: Updated text for glibmm-2.4.
+ * tools/generate_wrap_init.pl.in: Replaced GTKMM_WIN32 by the
+ standard G_OS_WIN32.
+
+2.3.3:
+
+2004-01-22 Murray Cumming <murrayc@usa.net>
+
+ * glib/date.[hg|ccg]: Added clamp_min() and clamp_max() to wrap the
+ case where g_date_clamp() takes null values.
+
+2004-01-18 Alberto Paro <alberto@paro.homeunxi.org>
+
+ * glib/src/date.hg: documentated Glib::Date functions.
+ * glib/glibmm/main.h: documentated Glib::MainLoop,Glib::MainContext
+ and Glib::Source functions.
+
+2004-01-18 Murray Cumming <murrayc@usa.net>
+
+ * tools/pm/Output.pm, tools/m4/property.m4: When the property is not
+ read-only, add a second read-only propertyproxy for the same property,
+ with a const accessor. This allows setting of properties in const
+ methods. Make all read-only propertyproxies have const accessors.
+ * glib/glibmm/propertyproxy.h: Added class documentation.
+ * tools/pm/Output.pm: Declare _vfuncs as virtual methods - fixing
+ an error in my last change.
+
+2004-01-16 Murray Cumming <murrayc@usa.net>
+
+ * tools/pm/Output.pm, tools/m4/vfunc.m4:
+ - Generate const vfuncs when requested with _WRAP_VFUNC().
+ - Put the *_vfunc() decleraration directly into the header, where
+ the _WRAP_VFUNC() macro appears, instead of in a separate section.
+ This allows us to add doxygen documentation before the _WRAP_VFUNC()
+ in the .hg file. However, we must check that all of our _WRAP_VFUNC()
+ macros are in protected: sections.
+
+2004-01-12 Murray Cumming <murrayc@usa.net>
+
+ * glib/glibmm/object.cc: Object::Object() default constructor.
+ Remove the warning because we really need this to implement a custom
+ TreeModel. Derive a new GType, as in the
+ Object::Object(ConstructParams) constructor. Like that constructor,
+ the default one also assumes that you have called a suitable
+ ObjectBase constructor, such as ObejctBase(typeid(MyCustomClass)).
+
+2004-01-09 Murray Cumming <murrayc@usa.net>
+
+ * tools/pm/Output.pm: output_wrap_property(): Allow construct-only
+ properties to be wrapped, as read-only properties.
+
+2004-01-03 Murray Cumming <murrayc@usa.net>
+
+ * tools/gmmproc.in, pm/WrapParser.pm, DocsParser.pm: Removed the
+ mergecdocs option - because we always want to merge C docs, to avoid
+ accidental upload of half-complete docs.
+
+2003-12-29 Murray Cumming <murrayc@usa.net>
+
+ * Makefile.am: Add scripts and tests directories to SUBDIRS instead of
+ DIST_SUBDIRS, so that their Makefile.am files are actually used.
+ * scripts/macros.m4: renamed GTKMM_CHECK_PERL() to GLIBMM_CHECK_PERL()
+ and install it as glibmm_check_perl.m4, so that other *mm projects
+ can use it. They need the PERL_PATH for Doxygen.
+
+2003-12-22 Murray Cumming <murrayc@usa.net>
+
+ * docs/reference: generate beautify_docs.pl from beautify_docs.pl.in,
+ so it can have the perl path in it. Install it, so other *mm
+ modules can use it.
+
+2003-12-13 Murray Cumming <murrayc@usa.net>
+
+ * tools/m4/*.m4: Added fuller Doxygen documentation to all gobj() and
+ wrap() methods. Doxygen should not emit warnings about these now.
+
+2.3.2:
+
+2003-11-29 Murray Cumming <murrayc@usa.net>
+
+ * tools/m4/signal.m4: Add spaces inside signal_proxy template types,
+ to avoid << and >> when using templated types.
+
+2003-11-27 Murray Cumming <murrayc@usa.net>
+
+ * tools/pm/WrapParser.pm, Output.pm: Added WRAP_METHOD_DOCS_ONLY()
+ macro.
+ * docs/internal/using_gmmproc.txt: Explained the new macro.
+
+2003-11-02 Murray Cumming <murrayc@usa.net>
+
+ * glib/glibmm/: Added init.[h|cc] with Glib::init() so that the
+ gnomemm init() methods do not need to initialize gtkmm.
+ * tools/m4/class_gobject.m4, class_gtkobject.m4: Added
+ _GMMPROC_PROTECTED_GCLASS macro, needed by libgnomecanvasmm. This
+ was not previously properly merged from gtkmm2.
+ * tools/m4/property.m4: Re-added PropertyProxy reference documentation
+ that did not survive a previous merge from gtkmm2.
+
+2003-11-01 Murray Cumming <murrayc@usa.net>
+
+ * glib/glibmm/propertyproxy.h, propertyproxy_base.[h|cc]: Now uses
+ ObjectBase instead of Object, because glib can now have properties
+ on interfaces. This is needed, for instance, by the GtkFileChooser
+ interface wrapper in gtkmm.
+ * glib/glibmm/object.h: Moved get/set_property() methods into
+ ObjectBase, for the same reason.
+ * tools/pm/WrapParser.pm, Output.pm: Added optional no_default_handler
+ parameter to gmmproc _WRAP_SIGNAL() macro, for signals whose
+ default signal handler is not in the klass struct and therefore
+ can not be overridden.
+
+2003-10-31 Murray Cumming <murrayc@usa.net>
+
+ * docs/Makefile_web.am_fragment: Corrected install location,
+ so that links from the gtkmm docs work when they are installed.
+
+2003-10-30 Murray Cumming <murrayc@usa.net>
+
+ * docs: Added images directory, copied from gtkmm, for the reference
+ html docs.
+ * configure.in: Mention docs/images/Makefile.
+ * docs/reference/Doxyfile.in: Genereate glibmm_doxygen_tags instead
+ of gtkmm_doxygen_tags.
+ * docs/reference/Makefile.am: dist glibmm_doxygen_tags.
+ * docs/reference: gtkmm*.html_fragment are now glibmm*.html_fragment.
+
+2.3.1:
+
+2003-10-23 Murray Cumming <murrayc@usa.net>
+
+ * tools/pm/Output.pm: output_wrap_create(): Used
+ args_types_and_names_with_default_values() intead of
+ args_types_and_names(), so that create() functions .in .h files have
+ the default values as specified in _WRAP_CREATE() in .hg files.
+ * tools/pm/WrapParser.pm: on_ignore_signals(): Strip the quotes, to
+ make _IGNORE_SIGNAL() really work in .hg files.
+
+2003-10-02 J. Abelardo Gutierrez <jabelardo@cantv.net>
+
+ * examples/threads/dispatcher.cc
+ examples/threads/dispatcher2.cc: fixed to cast out all gktmm code,
+ now they only need glimm.
+ * configure.in: Added examples/threads because they don't use gtkmm
+ anymore. Now all examples/threads compiles and run just fine.
+
+2.3.0:
+
+2003-09-30 Murray Cumming <murrayc@usa.net>
+
+ * configure.in: Removed examples/threads because we don't build or
+ distribute it, because it doesn't build, because it uses gtkmm.
+
+2003-09-30 Murray Cumming <murrayc@usa.net>
+
+ * glib/glibmm/object_base.h: ObjectBase inherits virtually from
+ Sigc::Object. See bug #116280.
+
+2003-09-27 Cedric Gustin <cedric.gustin@swing.be>
+
+ * glib/glibmm/threadpool.cc: Removed
+ _GTKMMPROC_SIGNAL_H_AND_CC(#ifndef G_OS_WIN32) restrictions. These
+ functions are now implemented in the latest (2.2.4) GTK+ on win32.
+ * README.win32 : Updated list of unsupported functions.
+
+2003-08-20 Frank Naumann <fnaumann@freemint.de>
+
+ * glib/src/thread.hg,
+ glib/src/unicode.hg: Warning bugfix for VisualStudio .NET 2003;
+ made wrapper functions returning bool from glib functions
+ returning int (C lacks builtin type bool) explicit by adding
+ an != 0 check. Otherwise VisualStudio .NET warn about implicit
+ int -> bool cast.
+
+2003-07-26 Murray Cumming <murrayc@usa.net>
+
+ * glib/glibmm/dispatcher.cc: Added #include <algorithm>, needed
+ by MSVC++, as suggested by Frank Naumann in bug #118215.
+
+2003-05-31 Murray Cumming <murrayc@usa.net>
+
+ * tools/gmmproc.in: Corrected location of installed .pm files. They
+ are now in a glibmm-2.3 folder instead of a glibmm-2.4 folder.
+
+2003-05-14 Murray Cumming <murrayc@usa.net>
+
+ * Applied some of MSVC++ .NET 2003 changes from jburris. For instance,
+ use of Gtk:: prefix with manage, because MSVC++ can not guess it. Also
+ corrected the out-of-sync protected/private modifiers in the private
+ gtype classes and their prototypes.
+
+2003-05-09 Cedric Gustin <cedric.gustin@swing.be>
+
+ * glib/glibmm/dispatcher.cc: small typo in G_OS_WIN32 condition.
+
+2003-05-07 Murray Cumming <murrayc@usa.net>
+
+ * scripts/macros.m4: Made the --enable-debug-refcounting configure
+ option set GLIBMM_* instead of GTKMM_*.
+
+2003-05-02 Murray Cumming <murrayc@usa.net>
+
+ * tools/m4/*.m4: Added doxygen comments to gobj() methods.
+ * examples/markup/parser.cc: Commented-out a std::right that gcc 2.93
+ does not like.
+
+2003-04-23 Andrew Makeev
+
+ * glib/glibmm/dispatcher.cc: Added some #ifdefed code to implement
+ Glib::Dispatcher on WIN32. See comments with the code.
+
+2003-04-22 Murray Cumming <murrayc@usa.net>
+
+ * Install headers in a glibmm-2.3 directory instead of glibmm-2.4,
+ to be consistent with gtkmm 2.4.
+
+2003-04-21 Murray Cumming <murrayc@usa.net>
+
+ * arrayhandle.h, listhandle, slisthandle.h:
+ Glib::ListHandle, Glib::ListHandle, Glib::SListHandle: Added
+ reference docs explaining that people can use STL containers.
+
+2003-04-21 Murray Cumming <murrayc@usa.net>
+
+ * Removed examples/idle: It's now updated and in gtkmm/examples/book.
+
+2003-04-19 Murray Cumming <murrayc@usa.net>
+
+ * tools/pm/GtkDefs.pm: get_unwrapped(): Changed some & to && to
+ avoid warnings and because that is probably what they should be.
+
+ * tools/m4/extra_defs_gen/generate_defs_glib.cc: Removed parameter
+ names from main(), because they are not used. Avoid warning.
+
+2003-03-26 Ross Burton <ross@burtonini.com>
+
+ * glib/src/module.hg: Added API documentation.
+
+2003-03-18 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
+
+ * scripts/*.m4, configure.in:
+ Added description to several AC_DEFINE statements to make 'autoheader'
+ happy
+ * Makefile.am:
+ Added ACLOCAL_AMFLAGS to make 'autoreconf' work
+
+2003-03-18 Cedric Gustin <cgustin@ibelgique.com>
+
+ * Makefile.am : removed examples from DIST_SUBDIRS
+
+2003-03-18 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
+
+ * examples/Makefile.am_fragment: Added DESTDIR-support.
+
+2003-03-14 Cedric Gustin <cgustin@ibelgique.com>
+
+ * Install examples. The are built by default too. Patch adapted for
+ glibmm 2.4 by Murray Cumming.
+
+2003-03-04 Cedric Gustin <cgustin@ibelgique.com>
+
+ * configure.in : Removed libstdc++ in LDFLAGS on win32. Latest
+ libtool is taking care of it.
+ * build_shared/Makefile_build.am_fragment,
+ tools/extra_defs_gen/Makefile.am : Added
+ --export-all-symbols linker flag on win32 (required by latest
+ libtool to build DLLs).
+ * build_shared/Makefile_gensrc.am_fragment : Modifiy rule that
+ builds wrap_init.cc. wrap_init.cc now contains reference to all
+ objects, event on win32. #ifdefs are included when needed.
+ * README.win32 : updated for version 2.2. Added list of missing
+ methods and signals on win32
+ * tools/m4/base.m4 : Added _GTKMMPROC_SIGNAL_H_AND_CC macro.
+
+
+2003-03-14 Martin Schulze <MHL.Schulze@t-online.de>
+
+ * docs/internal/using_gtkmmproc.txt: Correct name of
+ [...]signals.defs generation utiliy.
+
+2003-01-30 Rick L Vinyard Jr <rvinyard@cs.nmsu.edu>
+
+ * glib/src/thread.hg Cond: Add documentation
+
+2003-01-27 Murray Cumming <murrayc@usa.net>
+
+ * glib/glibmm/refptr.h: Removed RefPtr<>::is_null() to encourage use
+ of more pointer-like operator bool() instead. Wanted to remove clear()
+ too, but there is no =0 equivalent yet.
+ * tools/gmmproc.in: Change harcoded gtkmm-2.0/m4 path to glibmm-2.4/m4.
+
+2003-01-22 Murray Cumming <murrayc@usa.net>
+
+ * GTKMM_ m4 tests and #defines are now prefixed with GLIBMM_
+
+2003-01-21 Murray Cumming <murrayc@usa.net>
+
+ * tests/Makefile.am_fragment, examples/Makefile.am_fragment:
+ Corrected LIBS and CFLAGS. Not all of these build because they
+ use gtkmm stuff too. They need to be reduced to glibmm-only code.
+
+2003-01-21 Murray Cumming <murrayc@usa.net>
+
+ * glib/Makefile.am, glib/glibmm/Makefile.am: Install headers in
+ glibmm-2.4 directory rather than gtkmm-2.4
+
+2003-01-21 Murray Cumming <murrayc@usa.net>
+
+ * configure.in: Use GLIBMM_* instead of GTKMM_* to avoid config.h
+ clashes with gtkmm 2.4.
+ * glib/glibmm-2.4.pc.in: Correct cflags - report 2.4 instead of 2.0.
+
+2003-01-21 Murray Cumming <murrayc@usa.net>
+
+ * tools/extra_defs_gen/Makefile.am: Changed extra_defs library name
+ from 2.4 to 2.3, so it can be unstable.
+
+2003-01-09 Daniel Elstner <daniel.elstner@gmx.net>
+
+ * glib/glibmm/utility.h (GLIBMM_INITIALIZE_STRUCT): Replace
+ __builtin_bzero() with __builtin_memset() because the former is
+ deprecated. Also, it looks like GCC is able to optimize the 0 case
+ so we don't lose anything here.
+
+2003-01-09 Daniel Elstner <daniel.elstner@gmx.net>
+
+ * glib/glibmm/miscutils.cc (Glib::build_path): Reserve 256 bytes
+ in advance to improve performance.
+
+2003-01-09 Daniel Elstner <daniel.elstner@gmx.net>
+
+ * glib/glibmm/miscutils.{cc,h} (Glib::build_path): Fix to make it
+ behave exactly like g_build_path(). (#102885, Jarek Dukat)
+
+ (Glib::build_filename(const std::string&, const std::string&)):
+ Implement in terms of Glib::build_path().
+
+2003-01-21 Murray Cumming <murrayc@usa.net>
+
+ * Renamed gtkmmproc to gmmproc.
+
+2003-01-08 Murray Cumming <murrayc@usa.net>
+
+ * glib/glibmm/refptr.h: Removed the operator=(CppObject*), as
+ suggested in the TODO comment.
+
+2003-01-08 Murray Cumming <murrayc@usa.net>
+
+ * make distcheck works.
+
+2003-01-08 Murray Cumming <murrayc@usa.net>
+
+ * It now builds, though I haven' tried installing it. The
+ library names and header directories should now all have 2.4
+ instead of 2.0 in their name.
+
+glibmm was previously part of gtkmm2.
+
diff --git a/libs/glibmm2/INSTALL b/libs/glibmm2/INSTALL
new file mode 100644
index 0000000000..095b1eb406
--- /dev/null
+++ b/libs/glibmm2/INSTALL
@@ -0,0 +1,231 @@
+Installation Instructions
+*************************
+
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004 Free
+Software Foundation, Inc.
+
+This file is free documentation; the Free Software Foundation gives
+unlimited permission to copy, distribute and modify it.
+
+Basic Installation
+==================
+
+These are generic installation instructions.
+
+ The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation. It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions. Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+ It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring. (Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.)
+
+ If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release. If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+ The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'. You only need
+`configure.ac' if you want to change it or regenerate `configure' using
+a newer version of `autoconf'.
+
+The simplest way to compile this package is:
+
+ 1. `cd' to the directory containing the package's source code and type
+ `./configure' to configure the package for your system. If you're
+ using `csh' on an old version of System V, you might need to type
+ `sh ./configure' instead to prevent `csh' from trying to execute
+ `configure' itself.
+
+ Running `configure' takes awhile. While running, it prints some
+ messages telling which features it is checking for.
+
+ 2. Type `make' to compile the package.
+
+ 3. Optionally, type `make check' to run any self-tests that come with
+ the package.
+
+ 4. Type `make install' to install the programs and any data files and
+ documentation.
+
+ 5. You can remove the program binaries and object files from the
+ source code directory by typing `make clean'. To also remove the
+ files that `configure' created (so you can compile the package for
+ a different kind of computer), type `make distclean'. There is
+ also a `make maintainer-clean' target, but that is intended mainly
+ for the package's developers. If you use it, you may have to get
+ all sorts of other programs in order to regenerate files that came
+ with the distribution.
+
+Compilers and Options
+=====================
+
+Some systems require unusual options for compilation or linking that the
+`configure' script does not know about. Run `./configure --help' for
+details on some of the pertinent environment variables.
+
+ You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment. Here
+is an example:
+
+ ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
+
+ *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory. To do this, you must use a version of `make' that
+supports the `VPATH' variable, such as GNU `make'. `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script. `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+ If you have to use a `make' that does not support the `VPATH'
+variable, you have to compile the package for one architecture at a
+time in the source code directory. After you have installed the
+package for one architecture, use `make distclean' before reconfiguring
+for another architecture.
+
+Installation Names
+==================
+
+By default, `make install' will install the package's files in
+`/usr/local/bin', `/usr/local/man', etc. You can specify an
+installation prefix other than `/usr/local' by giving `configure' the
+option `--prefix=PREFIX'.
+
+ You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files. If you
+give `configure' the option `--exec-prefix=PREFIX', the package will
+use PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files will still use the regular prefix.
+
+ In addition, if you use an unusual directory layout you can give
+options like `--bindir=DIR' to specify different values for particular
+kinds of files. Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.
+
+ If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System). The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+ For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Specifying the System Type
+==========================
+
+There may be some features `configure' cannot figure out automatically,
+but needs to determine by the type of machine the package will run on.
+Usually, assuming the package is built to be run on the _same_
+architectures, `configure' can figure that out, but if it prints a
+message saying it cannot guess the machine type, give it the
+`--build=TYPE' option. TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+ CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+ OS KERNEL-OS
+
+ See the file `config.sub' for the possible values of each field. If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+ If you are _building_ compiler tools for cross-compiling, you should
+use the `--target=TYPE' option to select the type of system they will
+produce code for.
+
+ If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+If you want to set default values for `configure' scripts to share, you
+can create a site shell script called `config.site' that gives default
+values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists. Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+Variables not defined in a site shell script can be set in the
+environment passed to `configure'. However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost. In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'. For example:
+
+ ./configure CC=/usr/local2/bin/gcc
+
+will cause the specified gcc to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+`configure' Invocation
+======================
+
+`configure' recognizes the following options to control how it operates.
+
+`--help'
+`-h'
+ Print a summary of the options to `configure', and exit.
+
+`--version'
+`-V'
+ Print the version of Autoconf used to generate the `configure'
+ script, and exit.
+
+`--cache-file=FILE'
+ Enable the cache: use and save the results of the tests in FILE,
+ traditionally `config.cache'. FILE defaults to `/dev/null' to
+ disable caching.
+
+`--config-cache'
+`-C'
+ Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+ Do not print messages saying which checks are being made. To
+ suppress all normal output, redirect it to `/dev/null' (any error
+ messages will still be shown).
+
+`--srcdir=DIR'
+ Look for the package's source code in directory DIR. Usually
+ `configure' can determine that directory automatically.
+
+`configure' also accepts some other, not widely useful, options. Run
+`configure --help' for more details.
+
diff --git a/libs/glibmm2/Makefile.am b/libs/glibmm2/Makefile.am
new file mode 100644
index 0000000000..8e49568562
--- /dev/null
+++ b/libs/glibmm2/Makefile.am
@@ -0,0 +1,23 @@
+ACLOCAL_AMFLAGS = -I scripts
+
+SUBDIRS = glibmm
+DIST_SUBDIRS = $(SUBDIRS)
+
+EXTRA_DIST = build_shared/Makefile_build.am_fragment \
+ build_shared/Makefile_build_gensrc.am_fragment \
+ build_shared/Makefile_gensrc.am_fragment \
+ build_shared/Makefile_gensrc_platform.am_fragment \
+ build_shared/Makefile_build_extra.am_fragment \
+ CHANGES glibmmconfig.h.in glibmm-2.4.pc.in
+
+glibmm_includedir = $(includedir)/glibmm-2.4
+glibmm_include_HEADERS = glibmm.h
+
+glibmm_configdir = $(libdir)/glibmm-2.4/include
+glibmm_config_DATA = glibmmconfig.h
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = glibmm-2.4.pc
+
+all-local:
+ @echo "*** Everything completed ***"
diff --git a/libs/glibmm2/NEWS b/libs/glibmm2/NEWS
new file mode 100644
index 0000000000..9edbf66137
--- /dev/null
+++ b/libs/glibmm2/NEWS
@@ -0,0 +1,242 @@
+2.6.1:
+
+* Interface::add_interface(): Disabled the check for a second call,
+ introduced in 2.6.0, for now, because it stops some valid uses.
+ (Bryan Forbes)
+
+2.6.0:
+
+New stable version. Changes compare to glibmm 2.4.x:
+
+* Added Option, OptionContext, OptionGroup for parsing of command-line arguments.
+* Added filename_display_basename() and filename_display_name().
+* Added setenv() and unsetenv().
+* add_interface() methods will no longer give warnings if you
+ call them twice.
+* gmmproc:
+ - Now reuses C properties documentation.
+
+2.5.6:
+
+* add_interface() methods will no longer give warnings if you
+call them twice.
+* gmmproc: Output properties documentation taken from the .defs.
+* examples now build on AIX.
+ (Murray Cumming)
+* MSVC++ .Net 2003 build fix. (Cedric Gustin)
+
+2.5.5:
+
+* Now builds with the following compilers, in addition to
+the existing GNU g++, and Intel compilers:
+- SUN Forte CC 5.5
+- IBM AIX xlC v7
+- Tru64 C++ V6.5-042
+- IRIX MIPSpro 7.4.2m
+ (Older versions of all these compilers might also work.)
+ (Murray Cumming, www.thewrittenword.com)
+* Now builds with MSVC++ .Net 2003 (gtkmm 2.4 already did).
+ (Cedric Gustin)
+
+2.5.4:
+
+Options:
+* Added Option(GOptionGroup* cast_item) constructor,
+ needed by Gtk::Main.
+* Added reference documentation.
+(Murray Cumming)
+
+2.5.3:
+
+* Options:
+ - Allow parsing of boolean arguments (arguments with no value).
+ - Really use the short names.
+ (Daniel Holbach, Murray Cumming)
+* Added filename_display_basename() and filename_display_name().
+ (Murray Cumming)
+* Added setenv() and unsetenv(). (Murray Cumming)
+* Use static keyword to prevent exporting private API.
+ (Benoît Dejean)
+* input example: Improvements and simplification. (Chris Vine)
+
+2.5.2:
+
+* OptionEntry: Remove useless enum. (Murray Cumming)
+* Documentation:
+ - examples: Added iochannel_stream example. (Chris Vine)
+ - reference: Generate more reference API from the C documentation, and
+ try to use the libstdc++ doxygen tags file to link to their
+ documentation. (Murray Cumming)
+
+2.5.1:
+
+* OptionContext, OptionGroup, OptionEntry: Made the add_entry() methods
+ type-safe and fixed several problems memory-management problems. This
+ API is now worth looking at.
+
+2.5.0:
+
+* Added OptionContext, OptionGroup, and OptionEntry classes, for
+ parsing of command-line options. See examples/options/
+
+2.4.4:
+
+* Signals: Avoid crashes when disconnecting a signal when handling that signal.
+ (Murray Cumming, Martin Schulze)
+*
+2.4.3:
+
+* Minor improvements to reference documentation. (Daniel Elstner)
+* Minor Glib::Dispatcher improvements (Daniel Elstner)
+
+2.4.2:
+
+* Glib::Dispatcher: win32 implementation rewritten, and hopefully, improved.
+ (Daniel Elstner)
+* Glib::ustring:
+ - Optimization and code-cleanup. (Daniel Elstner)
+ - Added reference documentation for constuctors. (Murray Cumming)
+* Fixed some compiler warnings.
+ (Daniel Elstner)
+* gmmproc: Some improvements for libgdamm. (Murray Cumming)
+
+
+2.4.1:
+
+* Build fixes for gcc 3.4.0.
+* Doxygen not required when building from tarballs.
+ (Murray Cumming)
+
+
+2.4.0:
+
+Changes since 2.2.0:
+
+* Now separate from gtkmm, so you can use things like Glib::ustring without depending on gtkmm. This glibmm 2.4 API installs in parallel with gtkmm 2.0/2.2, so you can install applications which use either.
+* When using pkg-config, you should check for "glibmm-2.4".
+* Glib::ObjectBase inherits virtually from SigC::Object, allowing multiple inheritance with other classes that inherit from SigC::Object.
+* RefPtr:
+ - is_null() was removed, to encourage you to use "== 0" instead.
+ - operator=(CppObject*) was removed.
+* The gtkmmproc code-generator is now gmmproc, and has several improvements to support gtkmm 2.4.
+* Now uses improved libsigc++ 2.0 API.
+* Added i18n.h and i18n-lib.h, which include the relevant
+ glib headers, which declare internationalization
+ macros such as _().
+* New methods:
+ Glib::spawn_close_id(), Glib::MainLoop::depth(),
+ Glib::Date::clamp_min(), Glib::Date::clamp_max().
+* Improved documentation.
+
+
+2.3.8:
+
+* Fix crash when using Glib::Main signals.
+ (Martin Schulze)
+* Corrected the configure-time SUN compiler check.
+ (Murray Cumming, Alexander Nedotsukov)
+
+2.3.7:
+
+* Added configure macros to detect SUN compiler oddities.
+* Various SUN Forte C+ and g++ 3.4 (cvs) build fixes.
+ (Murray Cumming)
+* gmmproc: Improved parsing of C docs.
+ (Hagen Moebius)
+
+2.3.6:
+
+* Added i18n.h and i18n-lib.h, which include the relevant
+ glib headers, which declare internationalization
+ macros such as _(). (Murray Cumming)
+* Added Glib::spawn_close_id(). (Murray Cumming)
+* Added Glib::MainLoop::depth(). (Murray Cumming)
+* Documentation: corrections to CHANGES (Martin Schulze).
+* gmmproc: Can now handle "const const_iterator& iter"
+ parameter names without getting confused by 2 consts.
+ (Murray Cumming)
+
+2.3.5:
+
+* glibmm now uses libsigc++ 2 rather than libsigc++ 1.2.
+
+2.3.4:
+
+* ListHandle/SListHandle (intermediate container types):
+ - Added a const_cast<> to allow lists of const elements.
+* gmmproc: _WRAP_SIGNAL(): Added optional custom_c_callback
+ parameter.
+ (Murray Cumming)
+* WIN32: Build fixes, mostly merged from the 2.2 branch.
+ (Cedric Gustin)
+
+2.3.3:
+
+* gmmproc (code generator)
+ - properties: Make read-only properties have const accessors,
+ and add a second read-only const accessor for normal
+ properties. Wrap construct-only properties as read-only,
+ instead of ignoring them.
+ - vfuncs: Really generate const vfuncs when requested. Put
+ the method declaration directly into the .h file, so that
+ the doxygen documentation can be next to it.
+ - documentation:
+ - Remove mergecdocs configure option - always
+ merge the C docs, to avoid any risk of uploading or
+ releasing empty documentation. Just delete the *_docs.xml
+ files to make building from cvs faster.
+ - Install a GLIBMM_CHECK_PERL() macro, for use by gtkmm
+ and other *mm projects, to get the perl path needed by
+ doxygen.
+ - Install beautify_docs.pl so it can be reused in gtkmm
+ and other *mm projects, instead of having lots of copies.
+* Glib::ObjectBase: The default constructor, never before used,
+ now generates a custom GType, for use when creating new
+ implementations of Glib::Interfaces - for instance, see the
+ new custom tree model example in gtkmm.
+* Glib::Date: Added clamp_min() and clamp_max().
+ (Murray Cumming)
+
+* Documentation:
+ - Added reference documentation for MainLoop, MainContext,
+ Source, and Date. (Alberto Paro)
+
+2.3.2:
+
+* gmmproc (code generator):
+ - signal proxies have extra space to avoid << with templates.
+ - Added WRAP_METHOD_DOCS_ONLY() for reusing documentation even
+ when the method is hand-coded.
+ - _WRAP_SIGNAL(): Added optional no_default_handler parameter,
+ because some of the new GTK+ signals have no public default
+ handler vfunc.
+* Added Glib::init(), for use by non-GUI apps which need to
+ use Glib::wrap().
+* PropertyProxy: Can now be used with Interfaces.
+* Documentation improvements, so that gtkmm docs link to glibmm
+ docs.
+ (Murray Cumming)
+
+2.3.1:
+
+* gmmproc changes needed by gtkmm 2.3.0
+ (Murray Cumming)
+* examples updated and buildable and working,
+ without gtkmm code.
+ (J. Abelardo Gutierrez)
+
+Changes in glibmm 2.3.0:
+
+* Now separate from gtkmm, so you can use things like Glib::ustring without depending on gtkmm.
+ This glibmm 2.4 API installs in parallel with gtkmm 2.0/2.2, so you can install this unstable library
+ without the risk of breaking existing application.
+* This does not yet require glib 2.3 because there has been no tarball release of that yet. For now, you
+ can use glibmm 2.3.0 with glib 2.2.x.
+* When using pkg-config, you should check for "glibmm-2.4".
+* Glib::ObjectBase inherits virtually from SigC::Object, allowing multiple inheritance with other
+ classes that inherit from SigC::Object.
+* RefPtr:
+ - is_null() was removed, to encourage you to use "== 0" instead.
+ - operator=(CppObject*) was removed.
+* gtkmmproc is now gmmproc.
+* All the glibmm bugfixes in gtkmm 2.2.x.
diff --git a/libs/glibmm2/README b/libs/glibmm2/README
new file mode 100644
index 0000000000..eef49fd1a7
--- /dev/null
+++ b/libs/glibmm2/README
@@ -0,0 +1,31 @@
+This is the unstable version of gtkmm, aimed at Gtk+ 2.0.x.
+See CHANGES for a comparison with gtkmm 1.2.
+
+Contents:
+* Your unstable development environment
+* Required libraries:
+
+Your unstable development environment
+-------------------------------------
+
+Until the GTK+ 2.0 / GNOME 2.0 platform is stable, you should try to separate these unstable libraries from your stable GTK+ 1.2 / GNOME 1.2/1.4 libraries. You can do this by installing the unstable libraries into a different prefix.
+e.g. ./configure --prefix=/usr/devgnome2
+
+When using the development libraries, you will need to modify some environment variables. This will be easier if you create a file (e.g. devgnome2) in your home directory that contains these commands:
+
+export PATH="/usr/devgnome2/bin:$PATH"; export LD_LIBRARY_PATH="/usr/devgnome2/lib" ; export PKG_CONFIG_PATH="/usr/devgnome2/lib/pkgconfig:$PKG_CONFIG_PATH" ;
+
+You can then type
+# source devgnome2
+to prepare your environment before building or working with the development libraries.
+
+You may also need to edit /etc/ld.so.conf to add /usr/devgnome2/lib, and then type /sbin/ldconfig to re-process the ld.so.conf.
+
+
+The vicious-build-scripts module in cvs.gnome.org might help you with this, if you can get it to work.
+
+Required Libraries
+------------------
+
+* Of course, you will need gtk+ 2 and its dependencies.
+* libsigc++ 1.2 (A release, or libsigc++-1.2 from cvs)
diff --git a/libs/glibmm2/SConscript b/libs/glibmm2/SConscript
new file mode 100644
index 0000000000..42b716c998
--- /dev/null
+++ b/libs/glibmm2/SConscript
@@ -0,0 +1,19 @@
+import glob
+import os
+
+glibmm2_files = glob.glob('glibmm/*.cc')
+
+Import('env libraries')
+
+glibmm2 = env.Copy()
+glibmm2.Merge([libraries['sigc2'], libraries['glib2']])
+
+glibmm2.Append(CXXFLAGS='-DHAVE_CONFIG_H')
+glibmm2.Append(CXXFLAGS='-DG_DISABLE_DEPRECATED')
+glibmm2.Append(CXXFLAGS='-DG_LOG_DOMAIN=\\\"glibmm\\\"')
+
+glibmm2_configure_script = glibmm2.Command ('configure', 'configure.ac', 'cd libs/glibmm2; ./autogen.sh; cd -', ENV=os.environ)
+glibmm2_config_h = glibmm2.Command('glibmmconfig.h', [glibmm2_configure_script, 'glibmmconfig.h.in'], 'cd libs/glibmm2; ./configure; cd -', ENV=os.environ)
+
+libglibmm2 = glibmm2.StaticLibrary('glibmm2', glibmm2_files)
+Default([glibmm2_config_h, libglibmm2])
diff --git a/libs/glibmm2/autogen.sh b/libs/glibmm2/autogen.sh
new file mode 100755
index 0000000000..c58ddd27a2
--- /dev/null
+++ b/libs/glibmm2/autogen.sh
@@ -0,0 +1,18 @@
+#! /bin/sh
+
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+
+echo "Adding libtools."
+libtoolize --automake --copy --force
+
+echo "Building macros."
+aclocal -I "$srcdir/scripts" $ACLOCAL_FLAGS
+
+echo "Building makefiles."
+automake --add-missing --copy
+
+echo "Building configure."
+autoconf
+
+rm -f config.cache
diff --git a/libs/glibmm2/configure.ac b/libs/glibmm2/configure.ac
new file mode 100644
index 0000000000..b34fbdbe00
--- /dev/null
+++ b/libs/glibmm2/configure.ac
@@ -0,0 +1,149 @@
+# Configure.in
+#
+# This file tests for various compiler features needed to configure
+# the gtkmm package. Original skeleton was provided by Stephan Kulow.
+# All tests were written by Tero Pulkkinen, Mirko Streckenbach, and
+# Karl Nelson.
+#
+# NOTE! IF YOU DO CHANGES HERE, CHECK IF YOU NEED TO MODIFY .m4 TOO!!!
+#
+# Copyright 2001 Free Software Foundation
+# Copyright 1999 gtkmm Development Team
+# Copyright 1998 Stephan Kulow
+#
+AC_INIT(glibmmconfig.h.in)
+AC_PREREQ(2.50)
+
+#########################################################################
+# Version and initialization
+#########################################################################
+GLIBMM_MAJOR_VERSION=2
+GLIBMM_MINOR_VERSION=6
+GLIBMM_MICRO_VERSION=1
+GLIBMM_VERSION=$GLIBMM_MAJOR_VERSION.$GLIBMM_MINOR_VERSION.$GLIBMM_MICRO_VERSION
+GLIBMM_RELEASE=$GLIBMM_MAJOR_VERSION.$GLIBMM_MINOR_VERSION
+AC_DEFINE_UNQUOTED(GLIBMM_MAJOR_VERSION, $GLIBMM_MAJOR_VERSION)
+AC_DEFINE_UNQUOTED(GLIBMM_MINOR_VERSION, $GLIBMM_MINOR_VERSION)
+AC_DEFINE_UNQUOTED(GLIBMM_MICRO_VERSION, $GLIBMM_MICRO_VERSION)
+AC_SUBST(GLIBMM_MAJOR_VERSION)
+AC_SUBST(GLIBMM_MINOR_VERSION)
+AC_SUBST(GLIBMM_MICRO_VERSION)
+AC_SUBST(GLIBMM_VERSION)
+AC_SUBST(GLIBMM_RELEASE)
+
+#
+# +1 : ? : +1 == new interface that does not break old one
+# +1 : ? : 0 == new interface that breaks old one
+# ? : ? : 0 == no new interfaces, but breaks apps
+# ? :+1 : ? == just some internal changes, nothing breaks but might work
+# better
+# CURRENT : REVISION : AGE
+LIBGLIBMM_SO_VERSION=1:13:0
+AC_SUBST(LIBGLIBMM_SO_VERSION)
+
+AC_CONFIG_AUX_DIR(scripts)
+
+dnl For automake.
+VERSION=$GLIBMM_VERSION
+PACKAGE=glibmm
+
+dnl Initialize automake stuff
+AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
+
+dnl Specify a configuration file (no autoheader)
+AM_CONFIG_HEADER(glibmmconfig.h)
+AM_MAINTAINER_MODE
+AL_ACLOCAL_INCLUDE(scripts)
+
+
+#########################################################################
+# Configure arguments
+#########################################################################
+
+#########################################################################
+# Environment Checks
+#########################################################################
+AC_PROG_CC
+AC_PROG_CPP
+AC_PROG_MAKE_SET
+AC_CANONICAL_BUILD
+AC_CANONICAL_HOST
+
+AC_DISABLE_STATIC
+AC_PROG_LIBTOOL
+
+AL_PROG_GNU_M4(AC_MSG_ERROR([dnl
+SUN m4 does not work for building gtkmm.
+Please install GNU m4.]))
+
+AL_PROG_GNU_MAKE(AC_MSG_ERROR([dnl
+SUN make does not work for building gtkmm.
+Please install GNU make.]))
+
+#########################################################################
+# Dependancy checks
+#########################################################################
+gtkmm_min_glib_version=2.6.0
+
+PKG_CHECK_MODULES(GLIBMM, glib-2.0 >= ${gtkmm_min_glib_version} gobject-2.0 >= ${gtkmm_min_glib_version} gmodule-2.0 >= ${gtkmm_min_glib_version})
+AC_SUBST(GLIBMM_CFLAGS)
+AC_SUBST(GLIBMM_LIBS)
+
+# gthread isn't a requirement, but we should use its CFLAGS if available.
+PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= ${gtkmm_min_glib_version},[],[GTHREAD_CFLAGS=''; GTHREAD_LIBS=''])
+AC_SUBST(GTHREAD_CFLAGS)
+AC_SUBST(GTHREAD_LIBS)
+
+
+#########################################################################
+# C++ checks
+#########################################################################
+AC_PROG_CXX
+
+AC_LANG_CPLUSPLUS
+
+AC_CXX_BOOL(,config_error=yes)
+AC_CXX_NAMESPACES(,config_error=yes)
+AC_CXX_MUTABLE(,config_error=yes)
+
+AC_MSG_CHECKING(if C++ environment provides all required features)
+if test "x$config_error" = xyes ; then
+ AC_MSG_RESULT([no])
+ AC_MSG_ERROR([Your compiler is not powerful enough to compile gtkmm. If it should be, see config.log for more information of why it failed.])
+fi
+AC_MSG_RESULT([yes])
+
+GLIBMM_CXX_HAS_NAMESPACE_STD()
+GLIBMM_CXX_HAS_STD_ITERATOR_TRAITS()
+GLIBMM_CXX_HAS_SUN_REVERSE_ITERATOR()
+GLIBMM_CXX_HAS_TEMPLATE_SEQUENCE_CTORS()
+GLIBMM_CXX_MEMBER_FUNCTIONS_MEMBER_TEMPLATES()
+GLIBMM_CXX_CAN_DISAMBIGUATE_CONST_TEMPLATE_SPECIALIZATIONS()
+GLIBMM_CXX_CAN_USE_DYNAMIC_CAST_IN_UNUSED_TEMPLATE_WITHOUT_DEFINITION()
+GLIBMM_CXX_CAN_ASSIGN_NON_EXTERN_C_FUNCTIONS_TO_EXTERN_C_CALLBACKS()
+GLIBMM_CXX_CAN_USE_NAMESPACES_INSIDE_EXTERNC()
+GLIBMM_CXX_ALLOWS_STATIC_INLINE_NPOS()
+
+# Check whether --enable-debug-refcounting was given.
+GLIBMM_ARG_ENABLE_DEBUG_REFCOUNTING()
+
+# Evaluate the --enable-warnings=level option.
+GTKMM_ARG_ENABLE_WARNINGS()
+
+# Dummy conditional just to make automake-1.4 happy.
+# We need an always-false condition in docs/Makefile.am.
+AM_CONDITIONAL(GTKMM_FALSE,[false])
+
+# HACK: Assign a dummy in order to prevent execution of autoheader by the
+# maintainer-mode rules. That would fail since we aren't using autoheader.
+AUTOHEADER=':'
+
+AC_CONFIG_FILES([
+ Makefile
+
+ glibmm-2.4.pc
+ glibmm/Makefile
+])
+
+AC_OUTPUT()
+
diff --git a/libs/glibmm2/glibmm-2.4.pc.in b/libs/glibmm2/glibmm-2.4.pc.in
new file mode 100644
index 0000000000..db098824be
--- /dev/null
+++ b/libs/glibmm2/glibmm-2.4.pc.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: GLibmm
+Description: C++ wrapper for GLib
+Requires: gobject-2.0 sigc++-2.0
+Version: @VERSION@
+Libs: -L${libdir} -lglibmm-2.4
+Cflags: -I${includedir}/glibmm-2.4 -I${libdir}/glibmm-2.4/include
diff --git a/libs/glibmm2/glibmm.h b/libs/glibmm2/glibmm.h
new file mode 100644
index 0000000000..3788db51a6
--- /dev/null
+++ b/libs/glibmm2/glibmm.h
@@ -0,0 +1,72 @@
+/* $Id$ */
+
+/* glibmm - a C++ wrapper for the GLib toolkit
+ *
+ * Copyright 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef _GLIBMM_H
+#define _GLIBMM_H
+
+#include <glibmmconfig.h>
+//#include <glibmm/i18n.h> //This must be included by the application, after system headers such as <iostream>.
+#include <glibmm/arrayhandle.h>
+#include <glibmm/class.h>
+#include <glibmm/containerhandle_shared.h>
+#include <glibmm/convert.h>
+#include <glibmm/date.h>
+#include <glibmm/dispatcher.h>
+#include <glibmm/error.h>
+#include <glibmm/exception.h>
+#include <glibmm/exceptionhandler.h>
+#include <glibmm/fileutils.h>
+#include <glibmm/helperlist.h>
+#include <glibmm/interface.h>
+#include <glibmm/iochannel.h>
+#include <glibmm/init.h>
+#include <glibmm/streamiochannel.h>
+#include <glibmm/listhandle.h>
+#include <glibmm/main.h>
+#include <glibmm/markup.h>
+#include <glibmm/miscutils.h>
+#include <glibmm/module.h>
+#include <glibmm/objectbase.h>
+#include <glibmm/object.h>
+#include <glibmm/optioncontext.h>
+#include <glibmm/pattern.h>
+#include <glibmm/property.h>
+#include <glibmm/propertyproxy_base.h>
+#include <glibmm/propertyproxy.h>
+#include <glibmm/quark.h>
+#include <glibmm/random.h>
+#include <glibmm/refptr.h>
+#include <glibmm/shell.h>
+#include <glibmm/signalproxy_connectionnode.h>
+#include <glibmm/signalproxy.h>
+#include <glibmm/slisthandle.h>
+#include <glibmm/spawn.h>
+#include <glibmm/stringutils.h>
+#include <glibmm/thread.h>
+#include <glibmm/threadpool.h>
+#include <glibmm/timer.h>
+#include <glibmm/timeval.h>
+#include <glibmm/ustring.h>
+#include <glibmm/value.h>
+#include <glibmm/wrap.h>
+
+#endif /* _GLIBMM_H */
+
diff --git a/libs/glibmm2/glibmm/.cvsignore b/libs/glibmm2/glibmm/.cvsignore
new file mode 100644
index 0000000000..282522db03
--- /dev/null
+++ b/libs/glibmm2/glibmm/.cvsignore
@@ -0,0 +1,2 @@
+Makefile
+Makefile.in
diff --git a/libs/glibmm2/glibmm/Makefile.am b/libs/glibmm2/glibmm/Makefile.am
new file mode 100644
index 0000000000..ff8555c571
--- /dev/null
+++ b/libs/glibmm2/glibmm/Makefile.am
@@ -0,0 +1,96 @@
+## Copyright (c) 2001
+## The gtkmm development team.
+
+SUBDIRS =
+
+sublib_name = glibmm
+sublib_libname = glibmm-2.4
+sublib_namespace = Glib
+sublib_cflags = $(GLIBMM_CFLAGS)
+
+sublib_files_extra_posix_cc =
+
+sublib_files_general_cc = \
+ class.cc \
+ containers.cc \
+ debug.cc \
+ dispatcher.cc \
+ error.cc \
+ exception.cc \
+ exceptionhandler.cc \
+ init.cc \
+ interface.cc \
+ main.cc \
+ miscutils.cc \
+ object.cc \
+ objectbase.cc \
+ pattern.cc \
+ property.cc \
+ propertyproxy.cc \
+ propertyproxy_base.cc \
+ quark.cc \
+ random.cc \
+ signalproxy.cc \
+ signalproxy_connectionnode.cc \
+ streamiochannel.cc \
+ stringutils.cc \
+ threadpool.cc \
+ timer.cc \
+ timeval.cc \
+ ustring.cc \
+ utility.cc \
+ value.cc \
+ value_custom.cc \
+ wrap.cc
+
+sublib_files_posix_h =
+
+sublib_files_general_h = \
+ arrayhandle.h \
+ class.h \
+ containerhandle_shared.h \
+ containers.h \
+ debug.h \
+ dispatcher.h \
+ error.h \
+ exception.h \
+ exceptionhandler.h \
+ helperlist.h \
+ init.h \
+ i18n.h \
+ interface.h \
+ iochannel.h \
+ listhandle.h \
+ main.h \
+ miscutils.h \
+ object.h \
+ objectbase.h \
+ pattern.h \
+ property.h \
+ propertyproxy.h \
+ propertyproxy_base.h \
+ quark.h \
+ random.h \
+ refptr.h \
+ sarray.h \
+ signalproxy_connectionnode.h \
+ slisthandle.h \
+ streamiochannel.h \
+ stringutils.h \
+ threadpool.h \
+ timer.h \
+ timeval.h \
+ ustring.h \
+ utility.h \
+ value.h \
+ value_custom.h \
+ wrap.h
+
+files_built_general_cc = value_basictypes.cc
+files_built_general_h = signalproxy.h value_basictypes.h
+
+lib_LTLIBRARIES = libglibmm-2.4.la
+libglibmm_2_4_la_SOURCES = $(files_all_general_cc) $(files_all_posix_cc)
+libglibmm_2_4_la_LDFLAGS = $(common_ldflags)
+libglibmm_2_4_la_LIBADD = $(GLIBMM_LIBS)
+
diff --git a/libs/glibmm2/glibmm/arrayhandle.h b/libs/glibmm2/glibmm/arrayhandle.h
new file mode 100644
index 0000000000..58e2630f5c
--- /dev/null
+++ b/libs/glibmm2/glibmm/arrayhandle.h
@@ -0,0 +1,522 @@
+// -*- c++ -*-
+#ifndef _GLIBMM_ARRAYHANDLE_H
+#define _GLIBMM_ARRAYHANDLE_H
+
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/containerhandle_shared.h>
+
+
+namespace Glib
+{
+
+namespace Container_Helpers
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+/* Count the number of elements in a 0-terminated sequence.
+ */
+template <class T> inline
+size_t compute_array_size(const T* array)
+{
+ const T* pend = array;
+
+ while(*pend)
+ ++pend;
+
+ return (pend - array);
+}
+
+/* Allocate and fill a 0-terminated array. The size argument
+ * specifies the number of elements in the input sequence.
+ */
+template <class For, class Tr>
+typename Tr::CType* create_array(For pbegin, size_t size, Tr)
+{
+ typedef typename Tr::CType CType;
+
+ CType *const array = static_cast<CType*>(g_malloc((size + 1) * sizeof(CType)));
+ CType *const array_end = array + size;
+
+ for(CType* pdest = array; pdest != array_end; ++pdest)
+ {
+ // Use & to force a warning if the iterator returns a temporary object.
+ *pdest = Tr::to_c_type(*&*pbegin);
+ ++pbegin;
+ }
+
+ *array_end = CType();
+ return array;
+}
+
+
+/* Convert from any container that supports forward
+ * iterators and has a size() method.
+ */
+template <class Tr, class Cont>
+struct ArraySourceTraits
+{
+ typedef typename Tr::CType CType;
+
+ static size_t get_size(const Cont& cont)
+ { return cont.size(); }
+
+ static const CType* get_data(const Cont& cont, size_t size)
+ { return Glib::Container_Helpers::create_array(cont.begin(), size, Tr()); }
+
+ static const Glib::OwnershipType initial_ownership = Glib::OWNERSHIP_SHALLOW;
+};
+
+/* Convert from a 0-terminated array. The Cont argument must be a pointer
+ * to the first element. Note that only arrays of the C type are supported.
+ */
+template <class Tr, class Cont>
+struct ArraySourceTraits<Tr,Cont*>
+{
+ typedef typename Tr::CType CType;
+
+ static size_t get_size(const CType* array)
+ { return (array) ? Glib::Container_Helpers::compute_array_size(array) : 0; }
+
+ static const CType* get_data(const CType* array, size_t)
+ { return array; }
+
+ static const Glib::OwnershipType initial_ownership = Glib::OWNERSHIP_NONE;
+};
+
+template <class Tr, class Cont>
+struct ArraySourceTraits<Tr,const Cont*> : ArraySourceTraits<Tr,Cont*>
+{};
+
+/* Convert from a 0-terminated array. The Cont argument must be a pointer
+ * to the first element. Note that only arrays of the C type are supported.
+ * For consistency, the array must be 0-terminated, even though the array
+ * size is known at compile time.
+ */
+template <class Tr, class Cont, size_t N>
+struct ArraySourceTraits<Tr,Cont[N]>
+{
+ typedef typename Tr::CType CType;
+
+ static size_t get_size(const CType*)
+ { return (N - 1); }
+
+ static const CType* get_data(const CType* array, size_t)
+ { return array; }
+
+ static const Glib::OwnershipType initial_ownership = Glib::OWNERSHIP_NONE;
+};
+
+template <class Tr, class Cont, size_t N>
+struct ArraySourceTraits<Tr,const Cont[N]> : ArraySourceTraits<Tr,Cont[N]>
+{};
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+/**
+ * @ingroup ContHelpers
+ */
+template <class Tr>
+class ArrayHandleIterator
+{
+public:
+ typedef typename Tr::CppType CppType;
+ typedef typename Tr::CType CType;
+
+ typedef std::random_access_iterator_tag iterator_category;
+ typedef CppType value_type;
+ typedef ptrdiff_t difference_type;
+ typedef value_type reference;
+ typedef void pointer;
+
+ explicit inline ArrayHandleIterator(const CType* pos);
+
+ inline value_type operator*() const;
+ inline value_type operator[](difference_type offset) const;
+
+ inline ArrayHandleIterator<Tr> & operator++();
+ inline const ArrayHandleIterator<Tr> operator++(int);
+
+ // All this random access stuff is only there because STL algorithms
+ // usually have optimized specializations for random access iterators,
+ // and we don't want to give away efficiency for nothing.
+ //
+ inline ArrayHandleIterator<Tr> & operator+=(difference_type rhs);
+ inline ArrayHandleIterator<Tr> & operator-=(difference_type rhs);
+ inline const ArrayHandleIterator<Tr> operator+ (difference_type rhs) const;
+ inline const ArrayHandleIterator<Tr> operator- (difference_type rhs) const;
+ inline difference_type operator-(const ArrayHandleIterator<Tr>& rhs) const;
+
+ inline bool operator==(const ArrayHandleIterator<Tr>& rhs) const;
+ inline bool operator!=(const ArrayHandleIterator<Tr>& rhs) const;
+ inline bool operator< (const ArrayHandleIterator<Tr>& rhs) const;
+ inline bool operator> (const ArrayHandleIterator<Tr>& rhs) const;
+ inline bool operator<=(const ArrayHandleIterator<Tr>& rhs) const;
+ inline bool operator>=(const ArrayHandleIterator<Tr>& rhs) const;
+
+private:
+ const CType* pos_;
+};
+
+} // namespace Container_Helpers
+
+
+/** If a method takes this as an argument, or has this as a return type, then you can use a standard
+ * container such as std::list or std::vector.
+ * @ingroup ContHandles
+ */
+template < class T, class Tr = Glib::Container_Helpers::TypeTraits<T> >
+class ArrayHandle
+{
+public:
+ typedef typename Tr::CppType CppType;
+ typedef typename Tr::CType CType;
+
+ typedef CppType value_type;
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+
+ typedef Glib::Container_Helpers::ArrayHandleIterator<Tr> const_iterator;
+ typedef Glib::Container_Helpers::ArrayHandleIterator<Tr> iterator;
+
+ template <class Cont> inline
+ ArrayHandle(const Cont& container);
+
+ // Take over ownership of an array created by GTK+ functions.
+ inline ArrayHandle(const CType* array, size_t array_size, Glib::OwnershipType ownership);
+ inline ArrayHandle(const CType* array, Glib::OwnershipType ownership);
+
+ // Copying clears the ownership flag of the source handle.
+ inline ArrayHandle(const ArrayHandle<T,Tr>& other);
+
+ ~ArrayHandle();
+
+ inline const_iterator begin() const;
+ inline const_iterator end() const;
+
+ template <class U> inline operator std::vector<U>() const;
+ template <class U> inline operator std::deque<U>() const;
+ template <class U> inline operator std::list<U>() const;
+
+ template <class Cont> inline
+ void assign_to(Cont& container) const;
+
+ template <class Out> inline
+ void copy(Out pdest) const;
+
+ inline const CType* data() const;
+ inline size_t size() const;
+ inline bool empty() const;
+
+private:
+ size_t size_;
+ const CType* parray_;
+ mutable Glib::OwnershipType ownership_;
+
+ // No copy assignment.
+ ArrayHandle<T, Tr>& operator=(const ArrayHandle<T,Tr>&);
+};
+
+/** If a method takes this as an argument, or has this as a return type, then you can use a standard
+ * container such as std::list<Glib::ustring> or std::vector<Glib::ustring>.
+ * @ingroup ContHandles
+ */
+typedef ArrayHandle<Glib::ustring> StringArrayHandle;
+
+
+/***************************************************************************/
+/* Inline implementation */
+/***************************************************************************/
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+namespace Container_Helpers
+{
+
+/**** Glib::Container_Helpers::ArrayHandleIterator<> ***********************/
+
+template <class Tr> inline
+ArrayHandleIterator<Tr>::ArrayHandleIterator(const CType* pos)
+:
+ pos_ (pos)
+{}
+
+template <class Tr> inline
+typename ArrayHandleIterator<Tr>::value_type ArrayHandleIterator<Tr>::operator*() const
+{
+ return Tr::to_cpp_type(*pos_);
+}
+
+template <class Tr> inline
+typename ArrayHandleIterator<Tr>::value_type
+ArrayHandleIterator<Tr>::operator[](difference_type offset) const
+{
+ return Tr::to_cpp_type(pos_[offset]);
+}
+
+template <class Tr> inline
+ArrayHandleIterator<Tr>& ArrayHandleIterator<Tr>::operator++()
+{
+ ++pos_;
+ return *this;
+}
+
+template <class Tr> inline
+const ArrayHandleIterator<Tr> ArrayHandleIterator<Tr>::operator++(int)
+{
+ return ArrayHandleIterator<Tr>(pos_++);
+}
+
+template <class Tr> inline
+ArrayHandleIterator<Tr>&
+ArrayHandleIterator<Tr>::operator+=(typename ArrayHandleIterator<Tr>::difference_type rhs)
+{
+ pos_ += rhs;
+ return *this;
+}
+
+template <class Tr> inline
+ArrayHandleIterator<Tr>&
+ArrayHandleIterator<Tr>::operator-=(typename ArrayHandleIterator<Tr>::difference_type rhs)
+{
+ pos_ -= rhs;
+ return *this;
+}
+
+template <class Tr> inline
+const ArrayHandleIterator<Tr>
+ArrayHandleIterator<Tr>::operator+(typename ArrayHandleIterator<Tr>::difference_type rhs) const
+{
+ return ArrayHandleIterator<Tr>(pos_ + rhs);
+}
+
+template <class Tr> inline
+const ArrayHandleIterator<Tr>
+ArrayHandleIterator<Tr>::operator-(typename ArrayHandleIterator<Tr>::difference_type rhs) const
+{
+ return ArrayHandleIterator<Tr>(pos_ - rhs);
+}
+
+template <class Tr> inline
+typename ArrayHandleIterator<Tr>::difference_type
+ArrayHandleIterator<Tr>::operator-(const ArrayHandleIterator<Tr>& rhs) const
+{
+ return (pos_ - rhs.pos_);
+}
+
+template <class Tr> inline
+bool ArrayHandleIterator<Tr>::operator==(const ArrayHandleIterator<Tr>& rhs) const
+{
+ return (pos_ == rhs.pos_);
+}
+
+template <class Tr> inline
+bool ArrayHandleIterator<Tr>::operator!=(const ArrayHandleIterator<Tr>& rhs) const
+{
+ return (pos_ != rhs.pos_);
+}
+
+template <class Tr> inline
+bool ArrayHandleIterator<Tr>::operator<(const ArrayHandleIterator<Tr>& rhs) const
+{
+ return (pos_ < rhs.pos_);
+}
+
+template <class Tr> inline
+bool ArrayHandleIterator<Tr>::operator>(const ArrayHandleIterator<Tr>& rhs) const
+{
+ return (pos_ > rhs.pos_);
+}
+
+template <class Tr> inline
+bool ArrayHandleIterator<Tr>::operator<=(const ArrayHandleIterator<Tr>& rhs) const
+{
+ return (pos_ <= rhs.pos_);
+}
+
+template <class Tr> inline
+bool ArrayHandleIterator<Tr>::operator>=(const ArrayHandleIterator<Tr>& rhs) const
+{
+ return (pos_ >= rhs.pos_);
+}
+
+} // namespace Container_Helpers
+
+
+/**** Glib::ArrayHandle<> **************************************************/
+
+template <class T, class Tr>
+ template <class Cont>
+inline
+ArrayHandle<T,Tr>::ArrayHandle(const Cont& container)
+:
+ size_ (Glib::Container_Helpers::ArraySourceTraits<Tr,Cont>::get_size(container)),
+ parray_ (Glib::Container_Helpers::ArraySourceTraits<Tr,Cont>::get_data(container, size_)),
+ ownership_ (Glib::Container_Helpers::ArraySourceTraits<Tr,Cont>::initial_ownership)
+{}
+
+template <class T, class Tr> inline
+ArrayHandle<T,Tr>::ArrayHandle(const typename ArrayHandle<T,Tr>::CType* array, size_t array_size,
+ Glib::OwnershipType ownership)
+:
+ size_ (array_size),
+ parray_ (array),
+ ownership_ (ownership)
+{}
+
+template <class T, class Tr> inline
+ArrayHandle<T,Tr>::ArrayHandle(const typename ArrayHandle<T,Tr>::CType* array,
+ Glib::OwnershipType ownership)
+:
+ size_ ((array) ? Glib::Container_Helpers::compute_array_size(array) : 0),
+ parray_ (array),
+ ownership_ (ownership)
+{}
+
+template <class T, class Tr> inline
+ArrayHandle<T,Tr>::ArrayHandle(const ArrayHandle<T,Tr>& other)
+:
+ size_ (other.size_),
+ parray_ (other.parray_),
+ ownership_ (other.ownership_)
+{
+ other.ownership_ = Glib::OWNERSHIP_NONE;
+}
+
+template <class T, class Tr>
+ArrayHandle<T,Tr>::~ArrayHandle()
+{
+ if(ownership_ != Glib::OWNERSHIP_NONE)
+ {
+ if(ownership_ != Glib::OWNERSHIP_SHALLOW)
+ {
+ // Deep ownership: release each container element.
+ const CType *const pend = parray_ + size_;
+ for(const CType* p = parray_; p != pend; ++p)
+ Tr::release_c_type(*p);
+ }
+ g_free(const_cast<CType*>(parray_));
+ }
+}
+
+template <class T, class Tr> inline
+typename ArrayHandle<T,Tr>::const_iterator ArrayHandle<T,Tr>::begin() const
+{
+ return Glib::Container_Helpers::ArrayHandleIterator<Tr>(parray_);
+}
+
+template <class T, class Tr> inline
+typename ArrayHandle<T,Tr>::const_iterator ArrayHandle<T,Tr>::end() const
+{
+ return Glib::Container_Helpers::ArrayHandleIterator<Tr>(parray_ + size_);
+}
+
+template <class T, class Tr>
+ template <class U>
+inline
+ArrayHandle<T,Tr>::operator std::vector<U>() const
+{
+#ifdef GLIBMM_HAVE_TEMPLATE_SEQUENCE_CTORS
+ return std::vector<U>(this->begin(), this->end());
+#else
+ std::vector<U> temp;
+ temp.reserve(this->size());
+ Glib::Container_Helpers::fill_container(temp, this->begin(), this->end());
+ return temp;
+#endif
+}
+
+template <class T, class Tr>
+ template <class U>
+inline
+ArrayHandle<T,Tr>::operator std::deque<U>() const
+{
+#ifdef GLIBMM_HAVE_TEMPLATE_SEQUENCE_CTORS
+ return std::deque<U>(this->begin(), this->end());
+#else
+ std::deque<U> temp;
+ Glib::Container_Helpers::fill_container(temp, this->begin(), this->end());
+ return temp;
+#endif
+}
+
+template <class T, class Tr>
+ template <class U>
+inline
+ArrayHandle<T,Tr>::operator std::list<U>() const
+{
+#ifdef GLIBMM_HAVE_TEMPLATE_SEQUENCE_CTORS
+ return std::list<U>(this->begin(), this->end());
+#else
+ std::list<U> temp;
+ Glib::Container_Helpers::fill_container(temp, this->begin(), this->end());
+ return temp;
+#endif
+}
+
+template <class T, class Tr>
+ template <class Cont>
+inline
+void ArrayHandle<T,Tr>::assign_to(Cont& container) const
+{
+#ifdef GLIBMM_HAVE_TEMPLATE_SEQUENCE_CTORS
+ container.assign(this->begin(), this->end());
+#else
+ Cont temp;
+ Glib::Container_Helpers::fill_container(temp, this->begin(), this->end());
+ container.swap(temp);
+#endif
+}
+
+template <class T, class Tr>
+ template <class Out>
+inline
+void ArrayHandle<T,Tr>::copy(Out pdest) const
+{
+ std::copy(this->begin(), this->end(), pdest);
+}
+
+template <class T, class Tr> inline
+const typename ArrayHandle<T,Tr>::CType* ArrayHandle<T,Tr>::data() const
+{
+ return parray_;
+}
+
+template <class T, class Tr> inline
+size_t ArrayHandle<T,Tr>::size() const
+{
+ return size_;
+}
+
+template <class T, class Tr> inline
+bool ArrayHandle<T,Tr>::empty() const
+{
+ return (size_ == 0);
+}
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+} // namespace Glib
+
+
+#endif /* _GLIBMM_ARRAYHANDLE_H */
+
diff --git a/libs/glibmm2/glibmm/class.cc b/libs/glibmm2/glibmm/class.cc
new file mode 100644
index 0000000000..ff4a671d8d
--- /dev/null
+++ b/libs/glibmm2/glibmm/class.cc
@@ -0,0 +1,116 @@
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/class.h>
+#include <glibmm/property.h>
+#include <glibmm/ustring.h>
+#include <glibmm/utility.h>
+
+
+namespace Glib
+{
+
+void Class::register_derived_type(GType base_type)
+{
+ if(gtype_)
+ return; // already initialized
+
+ GTypeQuery base_query = { 0, 0, 0, 0, };
+ g_type_query(base_type, &base_query);
+
+ const GTypeInfo derived_info =
+ {
+ base_query.class_size,
+ 0, // base_init
+ 0, // base_finalize
+ class_init_func_,
+ 0, // class_finalize
+ 0, // class_data
+ base_query.instance_size,
+ 0, // n_preallocs
+ 0, // instance_init
+ 0, // value_table
+ };
+
+ Glib::ustring derived_name = "gtkmm__";
+ derived_name += base_query.type_name;
+
+ gtype_ = g_type_register_static(base_type, derived_name.c_str(), &derived_info, GTypeFlags(0));
+}
+
+GType Class::clone_custom_type(const char* custom_type_name) const
+{
+ std::string full_name ("gtkmm__CustomObject_");
+ Glib::append_canonical_typename(full_name, custom_type_name);
+
+ GType custom_type = g_type_from_name(full_name.c_str());
+
+ if(!custom_type)
+ {
+ g_return_val_if_fail(gtype_ != 0, 0);
+
+ // Cloned custom types derive from the wrapper's parent type,
+ // so that g_type_class_peek_parent() works correctly.
+ const GType base_type = g_type_parent(gtype_);
+
+ GTypeQuery base_query = { 0, 0, 0, 0, };
+ g_type_query(base_type, &base_query);
+
+ const GTypeInfo derived_info =
+ {
+ base_query.class_size,
+ 0, // base_init
+ 0, // base_finalize
+ &Class::custom_class_init_function,
+ 0, // class_finalize
+ this, // class_data
+ base_query.instance_size,
+ 0, // n_preallocs
+ 0, // instance_init
+ 0, // value_table
+ };
+
+ custom_type = g_type_register_static(
+ base_type, full_name.c_str(), &derived_info, GTypeFlags(0));
+ }
+
+ return custom_type;
+}
+
+// static
+void Class::custom_class_init_function(void* g_class, void* class_data)
+{
+ // The class_data pointer is set to 'this' by clone_custom_type().
+ const Class *const self = static_cast<Class*>(class_data);
+
+ g_return_if_fail(self->class_init_func_ != 0);
+
+ // Call the wrapper's class_init_function() to redirect
+ // the vfunc and default signal handler callbacks.
+ (*self->class_init_func_)(g_class, 0);
+
+ GObjectClass *const gobject_class = static_cast<GObjectClass*>(g_class);
+
+ gobject_class->get_property = &Glib::custom_get_property_callback;
+ gobject_class->set_property = &Glib::custom_set_property_callback;
+}
+
+} // namespace Glib
+
diff --git a/libs/glibmm2/glibmm/class.h b/libs/glibmm2/glibmm/class.h
new file mode 100644
index 0000000000..c7b5a96fa7
--- /dev/null
+++ b/libs/glibmm2/glibmm/class.h
@@ -0,0 +1,76 @@
+// -*- c++ -*-
+#ifndef _GLIBMM_CLASS_H
+#define _GLIBMM_CLASS_H
+
+/* $Id$ */
+
+/* Copyright 2001 Free Software Foundation
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glib-object.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+namespace Glib
+{
+
+class Class
+{
+public:
+ /* No constructor/destructor:
+ * Glib::Class objects are used only as static data, which would cause
+ * lots of ugly global constructor invocations. These are avoidable,
+ * because the C/C++ standard explicitly specifies that all _static_ data
+ * is zero-initialized at program start.
+ */
+ //Class();
+ //~Class();
+
+ //static void class_init_function(BaseClassType *p);
+ //static void object_init_function(BaseObjectType *o);
+ //GType get_type() = 0; //Creates the GType when this is first called.
+
+ // Hook for translating API
+ //static Glib::Object* wrap_new(GObject*);
+
+ inline GType get_type() const;
+ GType clone_custom_type(const char* custom_type_name) const;
+
+protected:
+ GType gtype_;
+ GClassInitFunc class_init_func_;
+
+ void register_derived_type(GType base_type);
+
+private:
+ static void custom_class_init_function(void* g_class, void* class_data);
+};
+
+inline
+GType Class::get_type() const
+{
+ return gtype_;
+}
+
+} // namespace Glib
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+#endif /* _GLIBMM_CLASS_H */
+
diff --git a/libs/glibmm2/glibmm/containerhandle_shared.h b/libs/glibmm2/glibmm/containerhandle_shared.h
new file mode 100644
index 0000000000..ef557b476a
--- /dev/null
+++ b/libs/glibmm2/glibmm/containerhandle_shared.h
@@ -0,0 +1,343 @@
+// -*- c++ -*-
+#ifndef _GLIBMM_CONTAINERHANDLE_SHARED_H
+#define _GLIBMM_CONTAINERHANDLE_SHARED_H
+
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <cstddef>
+#include <algorithm>
+#include <iterator>
+#include <vector>
+#include <deque>
+#include <list>
+
+#include <glib-object.h>
+#include <glib/gmem.h>
+#include <glibmm/refptr.h>
+#include <glibmm/ustring.h>
+#include <glibmm/wrap.h>
+#include <glibmm/debug.h>
+
+#include <glibmmconfig.h>
+GLIBMM_USING_STD(forward_iterator_tag)
+GLIBMM_USING_STD(random_access_iterator_tag)
+GLIBMM_USING_STD(distance)
+GLIBMM_USING_STD(copy)
+GLIBMM_USING_STD(vector)
+GLIBMM_USING_STD(deque)
+GLIBMM_USING_STD(list)
+
+
+namespace Glib
+{
+
+/** @defgroup ContHandles Generic container converters
+ */
+
+/**
+ * @ingroup ContHandles
+ */
+enum OwnershipType
+{
+ OWNERSHIP_NONE = 0,
+ OWNERSHIP_SHALLOW, //Release the list, but not its elements, when the container is deleted
+ OWNERSHIP_DEEP //Release the list, and its elements, when the container is deleted.
+};
+
+
+/** Utility class holding an iterator sequence.
+ * @ingroup ContHandles
+ * This can be used to initialize a Glib container handle (such as
+ * Glib::ArrayHandle) with an iterator sequence. Use the helper
+ * function Glib::sequence() to create a Sequence<> object.
+ */
+template <class Iterator>
+class Sequence
+{
+private:
+ Iterator pbegin_;
+ Iterator pend_;
+
+public:
+ Sequence(Iterator pbegin, Iterator pend)
+ : pbegin_(pbegin), pend_(pend) {}
+
+ Iterator begin() const { return pbegin_; }
+ Iterator end() const { return pend_; }
+ size_t size() const { return std::distance(pbegin_, pend_); }
+};
+
+/** Helper function to create a Glib::Sequence<> object, which
+ * in turn can be used to initialize a container handle.
+ * @ingroup ContHandles
+ *
+ * @par Usage example:
+ * @code
+ * combo.set_popdown_strings(Glib::sequence(foo_begin, foo_end));
+ * @endcode
+ */
+template <class Iterator> inline
+Sequence<Iterator> sequence(Iterator pbegin, Iterator pend)
+{
+ return Sequence<Iterator>(pbegin, pend);
+}
+
+
+namespace Container_Helpers
+{
+
+/** @defgroup ContHelpers Helper classes
+ * @ingroup ContHandles
+ */
+
+/** Generic TypeTraits implementation.
+ * @ingroup ContHelpers
+ * This can be used if the C++ type is the same as the C type, or if implicit
+ * conversions between the types are available. Also, the types are required
+ * to implement copy-by-value semantics. (Ownership is just ignored.)
+ */
+template <class T>
+struct TypeTraits
+{
+ typedef T CppType;
+ typedef T CType;
+ typedef T CTypeNonConst;
+
+ static CType to_c_type (const CppType& item) { return item; }
+ static CppType to_cpp_type (const CType& item) { return item; }
+ static void release_c_type (const CType&) {}
+};
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS /* hide the specializations */
+
+//For some (proably, more spec-compliant) compilers, these specializations must
+//be next to the objects that they use.
+#ifdef GLIBMM_CAN_USE_DYNAMIC_CAST_IN_UNUSED_TEMPLATE_WITHOUT_DEFINITION
+
+/** Partial specialization for pointers to GtkObject instances.
+ * @ingroup ContHelpers
+ */
+template <class T>
+struct TypeTraits<T*>
+{
+ typedef T * CppType;
+ typedef typename T::BaseObjectType * CType;
+ typedef typename T::BaseObjectType * CTypeNonConst;
+
+ static CType to_c_type (CppType ptr) { return Glib::unwrap(ptr); }
+ static CType to_c_type (CType ptr) { return ptr; }
+ static CppType to_cpp_type (CType ptr)
+ {
+ //We copy/paste the widget wrap() implementation here,
+ //because we can not use a specific Glib::wrap(T_Impl) overload here,
+ //because that would be "dependent", and g++ 3.4 does not allow that.
+ //The specific Glib::wrap() overloads don't do anything special anyway.
+ GObject* cobj = (GObject*)ptr;
+ return dynamic_cast<CppType>(Glib::wrap_auto(cobj, false /* take_copy */));
+ }
+
+ static void release_c_type (CType ptr)
+ {
+ GLIBMM_DEBUG_UNREFERENCE(0, ptr);
+ g_object_unref(ptr);
+ }
+};
+
+//This confuse the SUN Forte compiler, so we ifdef it out:
+#ifdef GLIBMM_HAVE_DISAMBIGUOUS_CONST_TEMPLATE_SPECIALIZATIONS
+
+/** Partial specialization for pointers to const GtkObject instances.
+ * @ingroup ContHelpers
+ */
+template <class T>
+struct TypeTraits<const T*>
+{
+ typedef const T * CppType;
+ typedef const typename T::BaseObjectType * CType;
+ typedef typename T::BaseObjectType * CTypeNonConst;
+
+ static CType to_c_type (CppType ptr) { return Glib::unwrap(ptr); }
+ static CType to_c_type (CType ptr) { return ptr; }
+ static CppType to_cpp_type (CType ptr)
+ {
+ //We copy/paste the widget wrap() implementation here,
+ //because we can not use a specific Glib::wrap(T_Impl) overload here,
+ //because that would be "dependent", and g++ 3.4 does not allow that.
+ //The specific Glib::wrap() overloads don't do anything special anyway.
+ GObject* cobj = (GObject*)const_cast<CTypeNonConst>(ptr);
+ return dynamic_cast<CppType>(Glib::wrap_auto(cobj, false /* take_copy */));
+ }
+
+ static void release_c_type (CType ptr)
+ {
+ GLIBMM_DEBUG_UNREFERENCE(0, ptr);
+ g_object_unref(const_cast<CTypeNonConst>(ptr));
+ }
+};
+#endif //GLIBMM_HAVE_DISAMBIGUOUS_CONST_TEMPLATE_SPECIALIZATIONS
+
+/** Partial specialization for pointers to GObject instances.
+ * @ingroup ContHelpers
+ * The C++ type is always a Glib::RefPtr<>.
+ */
+template <class T>
+struct TypeTraits< Glib::RefPtr<T> >
+{
+ typedef Glib::RefPtr<T> CppType;
+ typedef typename T::BaseObjectType * CType;
+ typedef typename T::BaseObjectType * CTypeNonConst;
+
+ static CType to_c_type (const CppType& ptr) { return Glib::unwrap(ptr); }
+ static CType to_c_type (CType ptr) { return ptr; }
+ static CppType to_cpp_type (CType ptr)
+ {
+ //return Glib::wrap(ptr, true);
+
+ //We copy/paste the wrap() implementation here,
+ //because we can not use a specific Glib::wrap(CType) overload here,
+ //because that would be "dependent", and g++ 3.4 does not allow that.
+ //The specific Glib::wrap() overloads don't do anything special anyway.
+ GObject* cobj = (GObject*)const_cast<CTypeNonConst>(ptr);
+ return Glib::RefPtr<T>( dynamic_cast<T*>(Glib::wrap_auto(cobj, true /* take_copy */)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+ }
+
+ static void release_c_type (CType ptr)
+ {
+ GLIBMM_DEBUG_UNREFERENCE(0, ptr);
+ g_object_unref(ptr);
+ }
+};
+
+//This confuse the SUN Forte compiler, so we ifdef it out:
+#ifdef GLIBMM_HAVE_DISAMBIGUOUS_CONST_TEMPLATE_SPECIALIZATIONS
+
+/** Partial specialization for pointers to const GObject instances.
+ * @ingroup ContHelpers
+ * The C++ type is always a Glib::RefPtr<>.
+ */
+template <class T>
+struct TypeTraits< Glib::RefPtr<const T> >
+{
+ typedef Glib::RefPtr<const T> CppType;
+ typedef const typename T::BaseObjectType * CType;
+ typedef typename T::BaseObjectType * CTypeNonConst;
+
+ static CType to_c_type (const CppType& ptr) { return Glib::unwrap(ptr); }
+ static CType to_c_type (CType ptr) { return ptr; }
+ static CppType to_cpp_type (CType ptr)
+ {
+ //return Glib::wrap(ptr, true);
+
+ //We copy/paste the wrap() implementation here,
+ //because we can not use a specific Glib::wrap(CType) overload here,
+ //because that would be "dependent", and g++ 3.4 does not allow that.
+ //The specific Glib::wrap() overloads don't do anything special anyway.
+ GObject* cobj = (GObject*)(ptr);
+ return Glib::RefPtr<const T>( dynamic_cast<const T*>(Glib::wrap_auto(cobj, true /* take_copy */)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+ }
+
+ static void release_c_type (CType ptr)
+ {
+ GLIBMM_DEBUG_UNREFERENCE(0, ptr);
+ g_object_unref(const_cast<CTypeNonConst>(ptr));
+ }
+};
+
+#endif //GLIBMM_HAVE_DISAMBIGUOUS_CONST_TEMPLATE_SPECIALIZATIONS
+
+#endif //GLIBMM_CAN_USE_DYNAMIC_CAST_IN_UNUSED_TEMPLATE_WITHOUT_DEFINITION
+
+/** Specialization for UTF-8 strings.
+ * @ingroup ContHelpers
+ * When converting from C++ to C, Glib::ustring will be accepted as well as
+ * std::string and 'const char*'. However, when converting to the C++ side,
+ * the output type cannot be 'const char*'.
+ */
+template <>
+struct TypeTraits<Glib::ustring>
+{
+ typedef Glib::ustring CppType;
+ typedef const char * CType;
+ typedef char * CTypeNonConst;
+
+ static CType to_c_type (const Glib::ustring& str) { return str.c_str(); }
+ static CType to_c_type (const std::string& str) { return str.c_str(); }
+ static CType to_c_type (CType str) { return str; }
+
+ static CppType to_cpp_type(CType str)
+ { return (str) ? Glib::ustring(str) : Glib::ustring(); }
+
+ static void release_c_type(CType str)
+ { g_free(const_cast<CTypeNonConst>(str)); }
+};
+
+/** Specialization for std::string.
+ * @ingroup ContHelpers
+ * When converting from C++ to C, std::string will be accepted as well as
+ * 'const char*'. However, when converting to the C++ side, the output type
+ * cannot be 'const char*'.
+ */
+template <>
+struct TypeTraits<std::string>
+{
+ typedef std::string CppType;
+ typedef const char * CType;
+ typedef char * CTypeNonConst;
+
+ static CType to_c_type (const std::string& str) { return str.c_str(); }
+ static CType to_c_type (const Glib::ustring& str) { return str.c_str(); }
+ static CType to_c_type (CType str) { return str; }
+
+ static CppType to_cpp_type(CType str)
+ { return (str) ? std::string(str) : std::string(); }
+
+ static void release_c_type(CType str)
+ { g_free(const_cast<CTypeNonConst>(str)); }
+};
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+#ifndef GLIBMM_HAVE_TEMPLATE_SEQUENCE_CTORS
+
+/* The STL containers in Sun's libCstd don't support templated sequence
+ * constructors, for "backward compatibility" reasons. This helper function
+ * is used in the ContainerHandle -> STL-container conversion workarounds.
+ */
+template <class Cont, class In>
+void fill_container(Cont& container, In pbegin, In pend)
+{
+ for(; pbegin != pend; ++pbegin)
+ container.push_back(*pbegin);
+}
+
+#endif /* GLIBMM_HAVE_TEMPLATE_SEQUENCE_CTORS */
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+} // namespace Container_Helpers
+
+} // namespace Glib
+
+
+#endif /* _GLIBMM_CONTAINERHANDLE_SHARED_H */
+
diff --git a/libs/glibmm2/glibmm/containers.cc b/libs/glibmm2/glibmm/containers.cc
new file mode 100644
index 0000000000..49803e11b8
--- /dev/null
+++ b/libs/glibmm2/glibmm/containers.cc
@@ -0,0 +1,33 @@
+// -*- c++ -*-
+
+/* $Id$ */
+
+/* containers.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/containers.h>
+
+namespace Glib
+{
+
+gpointer glibmm_null_pointer=0;
+
+
+} //namespace Glib
+
diff --git a/libs/glibmm2/glibmm/containers.h b/libs/glibmm2/glibmm/containers.h
new file mode 100644
index 0000000000..c7090681a3
--- /dev/null
+++ b/libs/glibmm2/glibmm/containers.h
@@ -0,0 +1,372 @@
+// -*- c++ -*-
+#ifndef _GLIBMM_CONTAINERS_H
+#define _GLIBMM_CONTAINERS_H
+
+/* $Id$ */
+
+/* containers.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glib/glist.h>
+#include <glib/gslist.h>
+#include <glibmm/sarray.h> /* for backward compatibility */
+
+#include <iterator>
+#include <glibmmconfig.h>
+
+GLIBMM_USING_STD(bidirectional_iterator_tag)
+GLIBMM_USING_STD(forward_iterator_tag)
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+namespace Glib
+{
+
+template <class T> class List_Iterator;
+template <class T> class List_ConstIterator;
+template <class T> class List_ReverseIterator;
+
+// Most of these methods in the non-template classes needs to be moved
+// to implementation.
+
+//Daniel Elstner has ideas about generating these per-widget with m4. murrayc.
+
+
+extern GLIBMM_API gpointer glibmm_null_pointer;
+
+template <class T>
+class List_Iterator_Base
+{
+public:
+ typedef T value_type;
+ typedef T* pointer;
+ typedef T& reference;
+} ;
+
+///For instance, List_Iterator< Gtk::Widget >
+template <class T>
+class List_Iterator : public List_Iterator_Base<T>
+{
+public:
+ typedef std::bidirectional_iterator_tag iterator_category;
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+
+ typedef typename List_Iterator_Base<T>::pointer pointer;
+ typedef typename List_Iterator_Base<T>::reference reference;
+
+ GList* const* head_;
+ GList* node_;
+
+ typedef List_Iterator<T> Self;
+
+ List_Iterator(GList* const& head, GList* node)
+ : head_(&head), node_(node)
+ {}
+
+ List_Iterator()
+ : head_(0), node_(0)
+ {}
+
+ List_Iterator(const Self& src)
+ : head_(src.head_), node_(src.node_)
+ {}
+
+ bool operator==(const Self& src) const { return node_ == src.node_; }
+ bool operator!=(const Self& src) const { return node_ != src.node_; }
+
+ Self& operator++()
+ {
+ if (!node_)
+ node_ = g_list_first(*head_);
+ else
+ node_ = (GList*)g_list_next(node_);
+ return *this;
+ }
+
+ Self operator++(int)
+ {
+ Self tmp = *this;
+ ++*this;
+ return tmp;
+ }
+
+ Self& operator--()
+ {
+ if (!node_)
+ node_ = g_list_last(*head_);
+ else
+ node_ = (GList*)g_list_previous(node_);
+
+ return *this;
+ }
+
+ Self operator--(int)
+ {
+ Self tmp = *this;
+ --*this;
+ return tmp;
+ }
+
+ reference operator*() const
+ {
+ return *(pointer)( node_ ? node_->data : glibmm_null_pointer );
+ }
+
+ pointer operator -> () const { return &operator*(); }
+};
+
+///For instance, SList_Iterator< Gtk::Widget >
+template <class T>
+class SList_Iterator : public List_Iterator_Base<T>
+{
+public:
+ typedef std::forward_iterator_tag iterator_category;
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+
+ typedef typename List_Iterator_Base<T>::pointer pointer;
+ typedef typename List_Iterator_Base<T>::reference reference;
+
+ GSList* node_;
+ typedef SList_Iterator<T> Self;
+
+ SList_Iterator(GSList* node)
+ : node_(node)
+ {}
+
+ SList_Iterator()
+ : node_(0)
+ {}
+
+ SList_Iterator(const Self& src)
+ : node_(src.node_)
+ {}
+
+ bool operator==(const Self& src) const { return node_ == src.node_; }
+ bool operator!=(const Self& src) const { return node_ != src.node_; }
+
+ Self& operator++()
+ {
+ node_ = g_slist_next(node_);
+ return *this;
+ }
+
+ Self operator++(int)
+ {
+ Self tmp = *this;
+ ++*this;
+ return tmp;
+ }
+
+ reference operator*() const
+ {
+ g_assert(node_);
+ return reinterpret_cast<T&>( node_ ? node_->data : glibmm_null_pointer );
+ }
+
+ pointer operator -> () const { return &operator*(); }
+};
+
+
+// This iterator variation returns T_IFace (wrapped from T_Impl)
+// For instance, List_Cpp_Iterator<GtkWidget, Gtk::Widget> is a little like std::list<Gtk::Widget>::iterator
+template<class T_Impl, class T_IFace>
+class List_Cpp_Iterator : public List_Iterator_Base<T_IFace>
+{
+public:
+ typedef std::bidirectional_iterator_tag iterator_category;
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+
+ typedef typename List_Iterator_Base<T_IFace>::pointer pointer;
+ typedef typename List_Iterator_Base<T_IFace>::reference reference;
+
+ typedef List_Cpp_Iterator<T_Impl, T_IFace> Self;
+
+ GList** head_;
+ GList* node_;
+
+ bool operator==(const Self& src) const { return node_ == src.node_; }
+ bool operator!=(const Self& src) const { return node_ != src.node_; }
+
+ List_Cpp_Iterator(GList*& head, GList* node )
+ : head_(&head), node_(node )
+ {}
+
+ List_Cpp_Iterator()
+ : head_(0), node_(0)
+ {}
+
+ List_Cpp_Iterator(const Self& src)
+ : head_(src.head_), node_(src.node_)
+ {}
+
+ reference operator*() const
+ {
+ if (node_ && node_->data)
+ {
+ //We copy/paste the widget wrap() implementation here,
+ //because we can not use a specific Glib::wrap(T_Impl) overload here,
+ //because that would be "dependent", and g++ 3.4 does not allow that.
+ //The specific Glib::wrap() overloads don't do anything special anyway.
+ GObject* cobj = static_cast<GObject*>( (*node_).data );
+
+ #ifdef GLIBMM_CAN_USE_DYNAMIC_CAST_IN_UNUSED_TEMPLATE_WITHOUT_DEFINITION
+ return *(dynamic_cast<pointer>(Glib::wrap_auto(cobj, false /* take_copy */)));
+ #else
+ //We really do need to use dynamic_cast<>, so I expect problems if this code is used. murrayc.
+ return *(static_cast<pointer>(Glib::wrap_auto(cobj, false /* take_copy */)));
+ #endif
+
+ }
+
+ return *(pointer)glibmm_null_pointer;
+ }
+
+ pointer operator->() const { return &operator*(); }
+
+ Self& operator++()
+ {
+ if (!node_)
+ node_ = g_list_first(*head_);
+ else
+ node_ = (GList *)g_list_next(node_);
+
+ return *this;
+ }
+
+ Self operator++(int)
+ {
+ Self tmp = *this;
+ ++*this;
+ return tmp;
+ }
+
+ Self& operator--()
+ {
+ if (!node_)
+ node_ = g_list_last(*head_);
+ else
+ node_ = (GList *)g_list_previous(node_);
+
+ return *this;
+ }
+
+ Self operator--(int)
+ {
+ Self tmp = *this;
+ --*this;
+ return tmp;
+ }
+
+};
+
+template <class T_Base>
+class List_ReverseIterator: private T_Base
+{
+public:
+ typedef typename T_Base::iterator_category iterator_category;
+ typedef typename T_Base::size_type size_type;
+ typedef typename T_Base::difference_type difference_type;
+
+ typedef typename T_Base::value_type value_type;
+ typedef typename T_Base::pointer pointer;
+ typedef typename T_Base::reference reference;
+
+ typedef List_ReverseIterator<T_Base> Self;
+
+ bool operator==(const Self& src) const { return T_Base::operator==(src); }
+ bool operator!=(const Self& src) const { return T_Base::operator!=(src); }
+
+ List_ReverseIterator(GList* const& head, GList* node)
+ : T_Base(head, node)
+ {}
+
+ List_ReverseIterator()
+ : T_Base()
+ {}
+
+ List_ReverseIterator(const Self& src)
+ : T_Base(src)
+ {}
+
+ List_ReverseIterator(const T_Base& src)
+ : T_Base(src)
+ { ++(*this); }
+
+
+ Self& operator++() {T_Base::operator--(); return *this;}
+ Self& operator--() {T_Base::operator++(); return *this;}
+ Self operator++(int) {Self src = *this; T_Base::operator--(); return src;}
+ Self operator--(int) {Self src = *this; T_Base::operator++(); return src;}
+
+ reference operator*() const { return T_Base::operator*(); }
+ pointer operator->() const { return T_Base::operator->(); }
+};
+
+template <class T_Base>
+class List_ConstIterator: public T_Base
+{
+public:
+ typedef typename T_Base::iterator_category iterator_category;
+ typedef typename T_Base::size_type size_type;
+ typedef typename T_Base::difference_type difference_type;
+
+ typedef const typename T_Base::value_type value_type;
+ typedef const typename T_Base::pointer pointer;
+ typedef const typename T_Base::reference reference;
+
+ typedef List_ConstIterator<T_Base> Self;
+
+ bool operator==(const Self& src) const { return T_Base::operator==(src); }
+ bool operator!=(const Self& src) const { return T_Base::operator!=(src); }
+
+ List_ConstIterator(GList* const& head, GList* node)
+ : T_Base(head, node)
+ {}
+
+ List_ConstIterator()
+ : T_Base()
+ {}
+
+ List_ConstIterator(const Self& src)
+ : T_Base(src)
+ {}
+
+ List_ConstIterator(const T_Base& src)
+ : T_Base(src)
+ {}
+
+ Self& operator++() {T_Base::operator++(); return *this;}
+ Self& operator--() {T_Base::operator--(); return *this;}
+ Self operator++(int) {Self src = *this; T_Base::operator++(); return src;}
+ Self operator--(int) {Self src = *this; T_Base::operator--(); return src;}
+
+ reference operator*() const { return T_Base::operator*(); }
+ pointer operator->() const { return T_Base::operator->(); }
+};
+
+} // namespace Glib
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+#endif /* _GLIBMM_CONTAINERS_H */
+
diff --git a/libs/glibmm2/glibmm/convert.cc b/libs/glibmm2/glibmm/convert.cc
new file mode 100644
index 0000000000..1cd334bcd1
--- /dev/null
+++ b/libs/glibmm2/glibmm/convert.cc
@@ -0,0 +1,323 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <glibmm/convert.h>
+#include <glibmm/private/convert_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glib/gconvert.h>
+#include <glib/gmessages.h>
+#include <glib/gunicode.h>
+#include <glibmm/utility.h>
+
+
+namespace Glib
+{
+
+/**** Glib::IConv **********************************************************/
+
+IConv::IConv(const std::string& to_codeset, const std::string& from_codeset)
+:
+ gobject_ (g_iconv_open(to_codeset.c_str(), from_codeset.c_str()))
+{
+ if(gobject_ == reinterpret_cast<GIConv>(-1))
+ {
+ GError* error = 0;
+
+ // Abuse g_convert() to create a GError object. This may seem a weird
+ // thing to do, but it gives us consistently translated error messages
+ // at no further cost.
+ g_convert("", 0, to_codeset.c_str(), from_codeset.c_str(), 0, 0, &error);
+
+ // If this should ever fail we're fucked.
+ g_assert(error != 0);
+
+ Error::throw_exception(error);
+ }
+}
+
+IConv::IConv(GIConv gobject)
+:
+ gobject_ (gobject)
+{}
+
+IConv::~IConv()
+{
+ g_iconv_close(gobject_);
+}
+
+size_t IConv::iconv(char** inbuf, gsize* inbytes_left, char** outbuf, gsize* outbytes_left)
+{
+ return g_iconv(gobject_, inbuf, inbytes_left, outbuf, outbytes_left);
+}
+
+void IConv::reset()
+{
+ // Apparently iconv() on Solaris <= 7 segfaults if you pass in
+ // NULL for anything but inbuf; work around that. (NULL outbuf
+ // or NULL *outbuf is allowed by Unix98.)
+
+ char* outbuf = 0;
+ gsize inbytes_left = 0;
+ gsize outbytes_left = 0;
+
+ g_iconv(gobject_, 0, &inbytes_left, &outbuf, &outbytes_left);
+}
+
+std::string IConv::convert(const std::string& str)
+{
+ gsize bytes_written = 0;
+ GError* error = 0;
+
+ char *const buf = g_convert_with_iconv(
+ str.data(), str.size(), gobject_, 0, &bytes_written, &error);
+
+ if(error)
+ Error::throw_exception(error);
+
+ return std::string(ScopedPtr<char>(buf).get(), bytes_written);
+}
+
+
+/**** charset conversion functions *****************************************/
+
+bool get_charset()
+{
+ return g_get_charset(0);
+}
+
+bool get_charset(std::string& charset)
+{
+ const char* charset_cstr = 0;
+ const bool is_utf8 = g_get_charset(&charset_cstr);
+
+ charset = charset_cstr;
+ return is_utf8;
+}
+
+std::string convert(const std::string& str,
+ const std::string& to_codeset,
+ const std::string& from_codeset)
+{
+ gsize bytes_written = 0;
+ GError* error = 0;
+
+ char *const buf = g_convert(
+ str.data(), str.size(), to_codeset.c_str(), from_codeset.c_str(),
+ 0, &bytes_written, &error);
+
+ if(error)
+ Error::throw_exception(error);
+
+ return std::string(ScopedPtr<char>(buf).get(), bytes_written);
+}
+
+std::string convert_with_fallback(const std::string& str,
+ const std::string& to_codeset,
+ const std::string& from_codeset)
+{
+ gsize bytes_written = 0;
+ GError* error = 0;
+
+ char *const buf = g_convert_with_fallback(
+ str.data(), str.size(), to_codeset.c_str(), from_codeset.c_str(), 0,
+ 0, &bytes_written, &error);
+
+ if(error)
+ Error::throw_exception(error);
+
+ return std::string(ScopedPtr<char>(buf).get(), bytes_written);
+}
+
+std::string convert_with_fallback(const std::string& str,
+ const std::string& to_codeset,
+ const std::string& from_codeset,
+ const Glib::ustring& fallback)
+{
+ gsize bytes_written = 0;
+ GError* error = 0;
+
+ char *const buf = g_convert_with_fallback(
+ str.data(), str.size(), to_codeset.c_str(), from_codeset.c_str(),
+ const_cast<char*>(fallback.c_str()), 0, &bytes_written, &error);
+
+ if(error)
+ Error::throw_exception(error);
+
+ return std::string(ScopedPtr<char>(buf).get(), bytes_written);
+}
+
+Glib::ustring locale_to_utf8(const std::string& opsys_string)
+{
+ gsize bytes_written = 0;
+ GError* error = 0;
+
+ char *const buf = g_locale_to_utf8(
+ opsys_string.data(), opsys_string.size(), 0, &bytes_written, &error);
+
+ if(error)
+ Error::throw_exception(error);
+
+ const ScopedPtr<char> scoped_buf (buf);
+ return Glib::ustring(scoped_buf.get(), scoped_buf.get() + bytes_written);
+}
+
+std::string locale_from_utf8(const Glib::ustring& utf8_string)
+{
+ gsize bytes_written = 0;
+ GError* error = 0;
+
+ char *const buf = g_locale_from_utf8(
+ utf8_string.data(), utf8_string.bytes(), 0, &bytes_written, &error);
+
+ if(error)
+ Error::throw_exception(error);
+
+ return std::string(ScopedPtr<char>(buf).get(), bytes_written);
+}
+
+Glib::ustring filename_to_utf8(const std::string& opsys_string)
+{
+ gsize bytes_written = 0;
+ GError* error = 0;
+
+ char *const buf = g_filename_to_utf8(
+ opsys_string.data(), opsys_string.size(), 0, &bytes_written, &error);
+
+ if(error)
+ Error::throw_exception(error);
+
+ const ScopedPtr<char> scoped_buf (buf);
+ return Glib::ustring(scoped_buf.get(), scoped_buf.get() + bytes_written);
+}
+
+std::string filename_from_utf8(const Glib::ustring& utf8_string)
+{
+ gsize bytes_written = 0;
+ GError* error = 0;
+
+ char *const buf = g_filename_from_utf8(
+ utf8_string.data(), utf8_string.bytes(), 0, &bytes_written, &error);
+
+ if(error)
+ Error::throw_exception(error);
+
+ return std::string(ScopedPtr<char>(buf).get(), bytes_written);
+}
+
+std::string filename_from_uri(const Glib::ustring& uri, Glib::ustring& hostname)
+{
+ char* hostname_buf = 0;
+ GError* error = 0;
+
+ char *const buf = g_filename_from_uri(uri.c_str(), &hostname_buf, &error);
+
+ if(error)
+ Error::throw_exception(error);
+
+ // Let's take ownership at this point.
+ const ScopedPtr<char> scoped_buf (buf);
+
+ if(hostname_buf)
+ hostname = ScopedPtr<char>(hostname_buf).get();
+ else
+ hostname.erase();
+
+ return std::string(scoped_buf.get());
+}
+
+std::string filename_from_uri(const Glib::ustring& uri)
+{
+ GError* error = 0;
+ char *const buf = g_filename_from_uri(uri.c_str(), 0, &error);
+
+ if(error)
+ Error::throw_exception(error);
+
+ return std::string(ScopedPtr<char>(buf).get());
+}
+
+Glib::ustring filename_to_uri(const std::string& filename, const Glib::ustring& hostname)
+{
+ GError* error = 0;
+ char *const buf = g_filename_to_uri(filename.c_str(), hostname.c_str(), &error);
+
+ if(error)
+ Error::throw_exception(error);
+
+ return Glib::ustring(ScopedPtr<char>(buf).get());
+}
+
+Glib::ustring filename_to_uri(const std::string& filename)
+{
+ GError* error = 0;
+ char *const buf = g_filename_to_uri(filename.c_str(), 0, &error);
+
+ if(error)
+ Error::throw_exception(error);
+
+ return Glib::ustring(ScopedPtr<char>(buf).get());
+}
+
+Glib::ustring filename_display_basename(const std::string& filename)
+{
+ char *const buf = g_filename_display_basename(filename.c_str());
+
+ return Glib::ustring(ScopedPtr<char>(buf).get());
+}
+
+
+Glib::ustring filename_display_name(const std::string& filename)
+{
+ char *const buf = g_filename_display_name(filename.c_str());
+
+ return Glib::ustring(ScopedPtr<char>(buf).get());
+}
+
+} // namespace Glib
+
+
+namespace
+{
+} // anonymous namespace
+
+
+Glib::ConvertError::ConvertError(Glib::ConvertError::Code error_code, const Glib::ustring& error_message)
+:
+ Glib::Error (G_CONVERT_ERROR, error_code, error_message)
+{}
+
+Glib::ConvertError::ConvertError(GError* gobject)
+:
+ Glib::Error (gobject)
+{}
+
+Glib::ConvertError::Code Glib::ConvertError::code() const
+{
+ return static_cast<Code>(Glib::Error::code());
+}
+
+void Glib::ConvertError::throw_func(GError* gobject)
+{
+ throw Glib::ConvertError(gobject);
+}
+
+
diff --git a/libs/glibmm2/glibmm/convert.h b/libs/glibmm2/glibmm/convert.h
new file mode 100644
index 0000000000..335624f0ff
--- /dev/null
+++ b/libs/glibmm2/glibmm/convert.h
@@ -0,0 +1,299 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GLIBMM_CONVERT_H
+#define _GLIBMM_CONVERT_H
+
+
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#include <glib/gtypes.h> /* for gsize */
+
+#include <glibmm/error.h>
+#include <glibmm/ustring.h>
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C" { typedef struct _GIConv* GIConv; }
+#endif
+
+
+namespace Glib
+{
+
+/** @defgroup CharsetConv Character Set Conversion
+ * Utility functions for converting strings between different character sets.
+ * @{
+ */
+
+/** Exception class for charset conversion errors.
+ * Glib::convert() and friends throw a ConvertError exception if the charset
+ * conversion failed for some reason. When writing non-trivial applications
+ * you should always catch those errors, and then try to recover, or tell the
+ * user the input was invalid.
+ */
+class ConvertError : public Glib::Error
+{
+public:
+ enum Code
+ {
+ NO_CONVERSION,
+ ILLEGAL_SEQUENCE,
+ FAILED,
+ PARTIAL_INPUT,
+ BAD_URI,
+ NOT_ABSOLUTE_PATH
+ };
+
+ ConvertError(Code error_code, const Glib::ustring& error_message);
+ explicit ConvertError(GError* gobject);
+ Code code() const;
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+private:
+ static void throw_func(GError* gobject);
+ friend void wrap_init(); // uses throw_func()
+#endif
+};
+
+
+/** Thin %iconv() wrapper.
+ * glibmm provides Glib::convert() and Glib::locale_to_utf8() which
+ * are likely more convenient than the raw iconv wrappers. However,
+ * creating an IConv object once and using the convert() method could
+ * be useful when converting multiple times between the same charsets.
+ */
+class IConv
+{
+public:
+ /** Open new conversion descriptor.
+ * @param to_codeset Destination codeset.
+ * @param from_codeset %Source codeset.
+ * @throw Glib::ConvertError
+ */
+ IConv(const std::string& to_codeset, const std::string& from_codeset);
+
+ explicit IConv(GIConv gobject);
+
+ /** Close conversion descriptor.
+ */
+ ~IConv();
+
+ /** Same as the standard UNIX routine %iconv(), but may be implemented
+ * via libiconv on UNIX flavors that lack a native implementation. glibmm
+ * provides Glib::convert() and Glib::locale_to_utf8() which are likely
+ * more convenient than the raw iconv wrappers.
+ * @param inbuf Bytes to convert.
+ * @param inbytes_left In/out parameter, bytes remaining to convert in @a inbuf.
+ * @param outbuf Converted output bytes.
+ * @param outbytes_left In/out parameter, bytes available to fill in @a outbuf.
+ * @return Count of non-reversible conversions, or <tt>static_cast<size_t>(-1)</tt> on error.
+ */
+ size_t iconv(char** inbuf, gsize* inbytes_left, char** outbuf, gsize* outbytes_left);
+
+ /** Reset conversion descriptor to initial state.
+ * Same as <tt>iconv(0, 0, 0, 0)</tt>, but implemented slightly differently
+ * in order to work on Sun Solaris <= 7. It's also more obvious so you're
+ * encouraged to use it.
+ */
+ void reset();
+
+ /** Convert from one encoding to another.
+ * @param str The string to convert.
+ * @return The converted string.
+ * @throw Glib::ConvertError
+ */
+ std::string convert(const std::string& str);
+
+ GIConv gobj() { return gobject_; }
+
+private:
+ GIConv gobject_;
+
+ // noncopyable
+ IConv(const IConv&);
+ IConv& operator=(const IConv&);
+};
+
+
+/** Get the charset used by the current locale.
+ * @return Whether the current locale uses the UTF-8 charset.
+ */
+bool get_charset();
+
+/** Get the charset used by the current locale.
+ * @param charset Will be filled with the charset's name.
+ * @return Whether the current locale uses the UTF-8 charset.
+ */
+bool get_charset(std::string& charset);
+
+/** Convert from one encoding to another.
+ * @param str The string to convert.
+ * @param to_codeset Name of the target charset.
+ * @param from_codeset Name of the source charset.
+ * @return The converted string.
+ * @throw Glib::ConvertError
+ */
+std::string convert(const std::string& str,
+ const std::string& to_codeset,
+ const std::string& from_codeset);
+
+/** Converts a string from one character set to another, possibly including
+ * fallback sequences for characters not representable in the output.
+ * Characters not in the target encoding will be represented as Unicode
+ * escapes <tt>\\x{XXXX}</tt> or <tt>\\x{XXXXXX}</tt>.
+ * @param str The string to convert.
+ * @param to_codeset Name of the target charset.
+ * @param from_codeset Name of the source charset.
+ * @return The converted string.
+ * @throw Glib::ConvertError
+ */
+std::string convert_with_fallback(const std::string& str,
+ const std::string& to_codeset,
+ const std::string& from_codeset);
+
+/** Converts a string from one character set to another, possibly including
+ * fallback sequences for characters not representable in the output.
+ * @note It is not guaranteed that the specification for the fallback sequences
+ * in @a fallback will be honored. Some systems may do a approximate conversion
+ * from @a from_codeset to @a to_codeset in their iconv() functions, in which
+ * case Glib will simply return that approximate conversion.
+ *
+ * @param str The string to convert.
+ * @param to_codeset Name of the target charset.
+ * @param from_codeset Name of the source charset.
+ * @param fallback UTF-8 string to be used in place of characters which aren't
+ * available in the target encoding. All characters in the fallback string
+ * @em must be available in the target encoding.
+ * @return The converted string.
+ * @throw Glib::ConvertError
+ */
+std::string convert_with_fallback(const std::string& str,
+ const std::string& to_codeset,
+ const std::string& from_codeset,
+ const Glib::ustring& fallback);
+
+/** Convert from the current locale's encoding to UTF-8.
+ * Convenience wrapper around Glib::convert().
+ * @param opsys_string The string to convert. Must be encoded in the charset
+ * used by the operating system's current locale.
+ * @return The input string converted to UTF-8 encoding.
+ * @throw Glib::ConvertError
+ */
+Glib::ustring locale_to_utf8(const std::string& opsys_string);
+
+/** Convert from UTF-8 to the current locale's encoding.
+ * Convenience wrapper around Glib::convert().
+ * @param utf8_string The UTF-8 string to convert.
+ * @return The input string converted to the charset used by the operating
+ * system's current locale.
+ * @throw Glib::ConvertError
+ */
+std::string locale_from_utf8(const Glib::ustring& utf8_string);
+
+/** Converts a string which is in the encoding used for filenames into
+ * a UTF-8 string.
+ * @param opsys_string A string in the encoding for filenames.
+ * @return The converted string.
+ * @throw Glib::ConvertError
+ */
+Glib::ustring filename_to_utf8(const std::string& opsys_string);
+
+/** Converts a string from UTF-8 to the encoding used for filenames.
+ * @param utf8_string A UTF-8 encoded string.
+ * @return The converted string.
+ * @throw Glib::ConvertError
+ */
+std::string filename_from_utf8(const Glib::ustring& utf8_string);
+
+/** Converts an escaped UTF-8 encoded URI to a local filename
+ * in the encoding used for filenames.
+ * @param uri A string in the encoding for filenames.
+ * @param hostname Location to store hostname for the URI. If there is no
+ * hostname in the URI, <tt>""</tt> will be stored in this location.
+ * @return The resulting filename.
+ * @throw Glib::ConvertError
+ */
+std::string filename_from_uri(const Glib::ustring& uri, Glib::ustring& hostname);
+
+/** Converts an escaped UTF-8 encoded URI to a local filename in the encoding
+ * used for filenames.
+ * @param uri A string in the encoding for filenames.
+ * @return The resulting filename.
+ * @throw Glib::ConvertError
+ */
+std::string filename_from_uri(const Glib::ustring& uri);
+
+/** Converts an absolute filename to an escaped UTF-8 encoded URI.
+ * @param filename An absolute filename specified in the encoding used
+ * for filenames by the operating system.
+ * @param hostname A UTF-8 encoded hostname.
+ * @return The resulting URI.
+ * @throw Glib::ConvertError
+ */
+Glib::ustring filename_to_uri(const std::string& filename, const Glib::ustring& hostname);
+
+/** Converts an absolute filename to an escaped UTF-8 encoded URI.
+ * @param filename An absolute filename specified in the encoding used
+ * for filenames by the operating system.
+ * @return The resulting URI.
+ * @throw Glib::ConvertError
+ */
+Glib::ustring filename_to_uri(const std::string& filename);
+
+/** Returns the display basename for the particular filename, guaranteed
+ * to be valid UTF-8. The display name might not be identical to the filename,
+ * for instance there might be problems converting it to UTF-8, and some files
+ * can be translated in the display
+ *
+ * You must pass the whole absolute pathname to this function so that
+ * translation of well known locations can be done.
+ *
+ * This function is preferred over filename_display_name() if you know the
+ * whole path, as it allows translation.
+ *
+ * @param filename An absolute pathname in the GLib file name encoding.
+ * @result A string containing a rendition of the basename of the filename in valid UTF-8
+ */
+Glib::ustring filename_display_basename(const std::string& filename);
+
+/** Converts a filename into a valid UTF-8 string. The
+ * conversion is not necessarily reversible, so you
+ * should keep the original around and use the return
+ * value of this function only for display purposes.
+ * Unlike g_filename_to_utf8(), the result is guaranteed
+ * to be non-empty even if the filename actually isn't in the GLib
+ * file name encoding.
+ *
+ * If you know the whole pathname of the file you should use
+ * g_filename_display_basename(), since that allows location-based
+ * translation of filenames.
+ *
+ * @param filename: a pathname hopefully in the GLib file name encoding
+ * @result A string containing a rendition of the filename in valid UTF-8.
+ */
+Glib::ustring filename_display_name(const Glib::ustring& filename);
+
+/** @} group CharsetConv */
+
+} // namespace Glib
+
+
+#endif /* _GLIBMM_CONVERT_H */
+
diff --git a/libs/glibmm2/glibmm/date.cc b/libs/glibmm2/glibmm/date.cc
new file mode 100644
index 0000000000..8058376e2a
--- /dev/null
+++ b/libs/glibmm2/glibmm/date.cc
@@ -0,0 +1,348 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <glibmm/date.h>
+#include <glibmm/private/date_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glib/gmem.h>
+#include <glib/gmessages.h>
+
+#include <ctime>
+#include <algorithm>
+#include <glibmm/convert.h>
+#include <glibmm/utility.h>
+
+#include <glibmmconfig.h>
+GLIBMM_USING_STD(max)
+
+
+namespace Glib
+{
+
+Date::Date()
+{
+ g_date_clear(&gobject_, 1);
+}
+
+Date::Date(Date::Day day, Date::Month month, Date::Year year)
+{
+ g_date_clear(&gobject_, 1);
+ g_date_set_dmy(&gobject_, day, (GDateMonth) month, year);
+}
+
+Date::Date(guint32 julian_day)
+{
+ g_date_clear(&gobject_, 1);
+ g_date_set_julian(&gobject_, julian_day);
+}
+
+Date::Date(const GDate& castitem)
+:
+ gobject_ (castitem)
+{}
+
+void Date::clear()
+{
+ g_date_clear(&gobject_, 1);
+}
+
+void Date::set_parse(const Glib::ustring& str)
+{
+ g_date_set_parse(&gobject_, str.c_str());
+}
+
+void Date::set_time(GTime time)
+{
+ g_date_set_time(&gobject_, time);
+}
+
+void Date::set_month(Date::Month month)
+{
+ g_date_set_month(&gobject_, (GDateMonth) month);
+}
+
+void Date::set_day(Date::Day day)
+{
+ g_date_set_day(&gobject_, day);
+}
+
+void Date::set_year(Date::Year year)
+{
+ g_date_set_year(&gobject_, year);
+}
+
+void Date::set_dmy(Date::Day day, Date::Month month, Date::Year year)
+{
+ g_date_set_dmy(&gobject_, day, (GDateMonth) month, year);
+}
+
+void Date::set_julian(guint32 julian_day)
+{
+ g_date_set_julian(&gobject_, julian_day);
+}
+
+Date& Date::add_days(int n_days)
+{
+ if(n_days >= 0)
+ g_date_add_days(&gobject_, n_days);
+ else
+ g_date_subtract_days(&gobject_, -n_days);
+ return *this;
+}
+
+Date& Date::subtract_days(int n_days)
+{
+ if(n_days >= 0)
+ g_date_subtract_days(&gobject_, n_days);
+ else
+ g_date_add_days(&gobject_, -n_days);
+ return *this;
+}
+
+Date& Date::add_months(int n_months)
+{
+ if(n_months >= 0)
+ g_date_add_months(&gobject_, n_months);
+ else
+ g_date_subtract_months(&gobject_, -n_months);
+ return *this;
+}
+
+Date& Date::subtract_months(int n_months)
+{
+ if(n_months >= 0)
+ g_date_subtract_months(&gobject_, n_months);
+ else
+ g_date_add_months(&gobject_, -n_months);
+ return *this;
+}
+
+Date& Date::add_years(int n_years)
+{
+ if(n_years >= 0)
+ g_date_add_years(&gobject_, n_years);
+ else
+ g_date_subtract_years(&gobject_, -n_years);
+ return *this;
+}
+
+Date& Date::subtract_years(int n_years)
+{
+ if(n_years >= 0)
+ g_date_subtract_years(&gobject_, n_years);
+ else
+ g_date_add_years(&gobject_, -n_years);
+ return *this;
+}
+
+int Date::days_between(const Date& rhs) const
+{
+ return g_date_days_between(&gobject_, &rhs.gobject_);
+}
+
+int Date::compare(const Date& rhs) const
+{
+ return g_date_compare(&gobject_, &rhs.gobject_);
+}
+
+Date& Date::clamp(const Date& min_date, const Date& max_date)
+{
+ g_date_clamp(&gobject_, &min_date.gobject_, &max_date.gobject_);
+ return *this;
+}
+
+Date& Date::clamp_min(const Date& min_date)
+{
+ g_date_clamp(&gobject_, &min_date.gobject_, 0 /* see the C docs */);
+ return *this;
+}
+
+Date& Date::clamp_max(const Date& max_date)
+{
+ g_date_clamp(&gobject_, 0 /* see the C docs */, &max_date.gobject_);
+ return *this;
+}
+
+void Date::order(Date& other)
+{
+ g_date_order(&gobject_, &other.gobject_);
+}
+
+Date::Weekday Date::get_weekday() const
+{
+ return (Date::Weekday) g_date_get_weekday(&gobject_);
+}
+
+Date::Month Date::get_month() const
+{
+ return (Date::Month) g_date_get_month(&gobject_);
+}
+
+Date::Year Date::get_year() const
+{
+ return g_date_get_year(&gobject_);
+}
+
+Date::Day Date::get_day() const
+{
+ return g_date_get_day(&gobject_);
+}
+
+guint32 Date::get_julian() const
+{
+ return g_date_get_julian(&gobject_);
+}
+
+unsigned int Date::get_day_of_year() const
+{
+ return g_date_get_day_of_year(&gobject_);
+}
+
+unsigned int Date::get_monday_week_of_year() const
+{
+ return g_date_get_monday_week_of_year(&gobject_);
+}
+
+unsigned int Date::get_sunday_week_of_year() const
+{
+ return g_date_get_sunday_week_of_year(&gobject_);
+}
+
+bool Date::is_first_of_month() const
+{
+ return g_date_is_first_of_month(&gobject_);
+}
+
+bool Date::is_last_of_month() const
+{
+ return g_date_is_last_of_month(&gobject_);
+}
+
+//static
+guint8 Date::get_days_in_month(Date::Month month, Date::Year year)
+{
+ return g_date_get_days_in_month((GDateMonth) month, year);
+}
+
+//static
+guint8 Date::get_monday_weeks_in_year(Date::Year year)
+{
+ return g_date_get_monday_weeks_in_year(year);
+}
+
+//static
+guint8 Date::get_sunday_weeks_in_year(Date::Year year)
+{
+ return g_date_get_sunday_weeks_in_year(year);
+}
+
+//static
+bool Date::is_leap_year(Date::Year year)
+{
+ return g_date_is_leap_year(year);
+}
+
+Glib::ustring Date::format_string(const Glib::ustring& format) const
+{
+ struct tm tm_data;
+ g_date_to_struct_tm(&gobject_, &tm_data);
+
+ const std::string locale_format = locale_from_utf8(format);
+ gsize bufsize = std::max<gsize>(2 * locale_format.size(), 128);
+
+ do
+ {
+ const ScopedPtr<char> buf (static_cast<char*>(g_malloc(bufsize)));
+
+ // Set the first byte to something other than '\0', to be able to
+ // recognize whether strftime actually failed or just returned "".
+ buf.get()[0] = '\1';
+ const gsize len = strftime(buf.get(), bufsize, locale_format.c_str(), &tm_data);
+
+ if(len != 0 || buf.get()[0] == '\0')
+ {
+ g_assert(len < bufsize);
+ return locale_to_utf8(std::string(buf.get(), len));
+ }
+ }
+ while((bufsize *= 2) <= 65536);
+
+ // This error is quite unlikely (unless strftime is buggy).
+ g_warning("Glib::Date::format_string(): maximum size of strftime buffer exceeded, giving up");
+
+ return Glib::ustring();
+}
+
+void Date::to_struct_tm(struct tm& dest) const
+{
+ g_date_to_struct_tm(&gobject_, &dest);
+}
+
+bool Date::valid() const
+{
+ return g_date_valid(&gobject_);
+}
+
+//static
+bool Date::valid_day(Date::Day day)
+{
+ return g_date_valid_day(day);
+}
+
+//static
+bool Date::valid_month(Date::Month month)
+{
+ return g_date_valid_month((GDateMonth) month);
+}
+
+//static
+bool Date::valid_year(Date::Year year)
+{
+ return g_date_valid_year(year);
+}
+
+//static
+bool Date::valid_weekday(Date::Weekday weekday)
+{
+ return g_date_valid_weekday((GDateWeekday) weekday);
+}
+
+//static
+bool Date::valid_julian(guint32 julian_day)
+{
+ return g_date_valid_julian(julian_day);
+}
+
+//static
+bool Date::valid_dmy(Date::Day day, Date::Month month, Date::Year year)
+{
+ return g_date_valid_dmy(day, (GDateMonth) month, year);
+}
+
+} // namespace Glib
+
+
+namespace
+{
+} // anonymous namespace
+
+
diff --git a/libs/glibmm2/glibmm/date.h b/libs/glibmm2/glibmm/date.h
new file mode 100644
index 0000000000..341a641b1a
--- /dev/null
+++ b/libs/glibmm2/glibmm/date.h
@@ -0,0 +1,427 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GLIBMM_DATE_H
+#define _GLIBMM_DATE_H
+
+
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#include <glibmm/ustring.h>
+
+#include <glib/gdate.h>
+#include <glib/gtypes.h>
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C" { struct tm; }
+#endif
+
+
+namespace Glib
+{
+
+/** Julian calendar date.
+ */
+class Date
+{
+public:
+ typedef guint8 Day;
+ typedef guint16 Year;
+
+ /** @addtogroup glibmmEnums Enums and Flags */
+
+/**
+ * @ingroup glibmmEnums
+ */
+enum Month
+{
+ BAD_MONTH,
+ JANUARY,
+ FEBRUARY,
+ MARCH,
+ APRIL,
+ MAY,
+ JUNE,
+ JULY,
+ AUGUST,
+ SEPTEMBER,
+ OCTOBER,
+ NOVEMBER,
+ DECEMBER
+};
+
+
+ /**
+ * @ingroup glibmmEnums
+ */
+enum Weekday
+{
+ BAD_WEEKDAY,
+ MONDAY,
+ TUESDAY,
+ WEDNESDAY,
+ THURSDAY,
+ FRIDAY,
+ SATURDAY,
+ SUNDAY
+};
+
+
+ /**
+ * @ingroup glibmmEnums
+ */
+enum DMY
+{
+ DAY,
+ MONTH,
+ YEAR
+};
+
+
+ static const Day BAD_DAY = 0;
+ static const Year BAD_YEAR = 0;
+ static const guint32 BAD_JULIAN = 0;
+
+ Date();
+ Date(Day day, Month month, Year year);
+ explicit Date(guint32 julian_day);
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ explicit Date(const GDate& castitem);
+#endif
+
+ void clear();
+ /** Clear the date. The cleared dates will not represent an existing date, but will not contain garbage.
+ * @param month Month to set.
+ */
+
+ /** Parses a user-inputted string str, and try to figure out what date it represents, taking the current locale into account. If the string is successfully parsed, the date will be valid after the call. Otherwise, it will be invalid.
+ * This function is not appropriate for file formats and the like; it isn't very precise, and its exact behavior varies with the locale. It's intended to be a heuristic routine that guesses what the user means by a given string (and it does work pretty well in that capacity).
+ * @param str String to parse.
+ */
+ void set_parse (const Glib::ustring& str);
+
+ //TODO: Add set_time_current() - see the docs comment below.?
+ /** Sets the value of a date from a GTime (time_t) value.
+ * To set the value of a date to the current day, you could write:
+ *
+ *set_time(time(NULL));
+ *
+ * @param time GTime value to set.
+ */
+ void set_time(GTime time);
+
+ /** Sets the month of the year. If the resulting day-month-year triplet is invalid, the date will be invalid.
+ * @param month Month to set.
+ */
+ void set_month(Month month);
+
+ /** Sets the day of the month. If the resulting day-month-year triplet is invalid, the date will be invalid.
+ * @param day Day to set.
+ */
+ void set_day(Day day);
+
+ /** Sets the year. If the resulting day-month-year triplet is invalid, the date will be invalid.
+ * @param year Year to set.
+ */
+ void set_year(Year year);
+
+ /** Sets the value of a day, month, and year.. If the resulting day-month-year triplet is invalid, the date will be invalid.
+ * @param day Day to set.
+ * @param month Month to set.
+ * @param year Year to set.
+ */
+ void set_dmy(Day day, Month month, Year year);
+
+ /** Sets the value of a GDate from a Julian day number.
+ * @param julian_day Julian day to set.
+ */
+ void set_julian(guint32 julian_day);
+
+ //TODO: Why return Date& (which is always *this) from these methods?
+ //Isn't it enough to also change the current instance?
+ //Maybe we need a copy constructor too.
+ //murrayc
+
+ /** Add a number of days to a Date.
+ * @param n_days Days to add.
+ * @return Resulting Date
+ */
+ Date& add_days(int n_days);
+
+ /** Subtract n_days to a Date.
+ * @param n_days Days to subtract.
+ * @return Resulting Date
+ */
+ Date& subtract_days(int n_days);
+
+ /** Add n_months to a Date.
+ * @param n_months Months to add.
+ * @return Resulting Date
+ */
+ Date& add_months(int n_months);
+
+ /** Subtract n_months to a Date.
+ * @param n_months Months to subtract.
+ * @return Resulting Date
+ */
+ Date& subtract_months(int n_months);
+
+ /** Add n_days to a Date.
+ * @param n_years Years to add.
+ * @return Resulting Date
+ */
+ Date& add_years(int n_years);
+
+ /** Subtract n_years to a Date.
+ * @param n_years Years to subtract.
+ * @return Resulting Date
+ */
+ Date& subtract_years(int n_years);
+
+ /** Calculate days between two dates.
+ * @param rhs Date.
+ * @return Numbers of days.
+ */
+ int days_between(const Date& rhs) const;
+
+ /** Compare two dates.
+ * @param rhs Date to compare.
+ * @return Result of comparition.
+ */
+ int compare(const Date& rhs) const;
+
+ /** If date is prior to min_date, sets date equal to min_date.
+ * If date falls after max_date, sets date equal to max_date. All dates must be valid.
+ * See also clamp_min() and clamp_max().
+ * @param min_date Date minimum value.
+ * @param max_date Date maximum value.
+ * @return Date in interval.
+ */
+ Date& clamp(const Date& min_date, const Date& max_date);
+
+ /** If date is prior to min_date, sets date equal to min_date.
+ * See also clamp(), and clamp_max().
+ * @param min_date Date minimum value.
+ * @return Date in interval.
+ */
+ Date& clamp_min(const Date& min_date);
+
+ /** If date falls after max_date, sets date equal to max_date.
+ * See also clamp(), and clamp_min().
+ * @param max_date Date maximum value.
+ * @return Date in interval.
+ */
+ Date& clamp_max(const Date& max_date);
+
+ /** Checks if date is less than or equal to other date, and swap the values if this is not the case.
+ * @param other Date ro compare.
+ * @return Date.
+ */
+ void order(Date& other);
+
+ /** Returns the day of the week for a Date. The date must be valid.
+ * @return Day of the week as a Date::Weekday.
+ */
+ Weekday get_weekday() const;
+
+ /** Returns the month of the year. The date must be valid.
+ * @return Month of the year as a Date::Month.
+ */
+ Month get_month() const;
+
+ /** Returns the year of a Date. The date must be valid.
+ * @return Year in which the date falls.
+ */
+ Year get_year() const;
+
+ /** Returns the day of the month. The date must be valid.
+ * @return Day of the month..
+ */
+ Day get_day() const;
+
+ /** Returns the Julian day or "serial number" of the Date.
+ * The Julian day is simply the number of days since January 1, Year 1;
+ * i.e., January 1, Year 1 is Julian day 1; January 2, Year 1 is Julian day 2, etc.
+ * The date must be valid.
+ * @return Julian day.
+ */
+ guint32 get_julian() const;
+
+ /** Returns the day of the year, where Jan 1 is the first day of the year.
+ * The date must be valid.
+ * @return Julian day.
+ */
+ unsigned int get_day_of_year() const;
+
+ /** Returns the week of the year, where weeks are understood to start on Monday.
+ * If the date is before the first Monday of the year, return 0.
+ * The date must be valid.
+ * @return Week of the year.
+ */
+ unsigned int get_monday_week_of_year() const;
+
+ /** Returns the week of the year during which this date falls, if weeks are understood to being on Sunday.
+ * Can return 0 if the day is before the first Sunday of the year.
+ * The date must be valid.
+ * @return Week of the year.
+ */
+ unsigned int get_sunday_week_of_year() const;
+
+ /** Returns true if the date is on the first of a month.
+ * The date must be valid.
+ * @return true if the date is the first of the month.
+ */
+ bool is_first_of_month() const;
+
+ /** Returns true if the date is the last day of the month.
+ * The date must be valid.
+ * @return true if the date is the last day of the month.
+ */
+ bool is_last_of_month() const;
+
+ /** Returns the number of days in a month, taking leap years into account.
+ * @param month Month.
+ * @param year Year.
+ * @return Number of days in month during the year.
+ */
+ static guint8 get_days_in_month(Month month, Year year);
+
+ /** Returns the number of weeks in the year, where weeks are taken to start on Monday. Will be 52 or 53.
+ * (Years always have 52 7-day periods, plus 1 or 2 extra days depending on whether it's a leap year. This function is basically telling you how many Mondays are in the year, i.e. there are 53 Mondays if one of the extra days happens to be a Monday.)
+ * @param year Year to count weeks in.
+ * @return Number of weeks.
+ */
+ static guint8 get_monday_weeks_in_year(Year year);
+
+ /** Returns the number of weeks in the year, where weeks are taken to start on Sunday. Will be 52 or 53.
+ * (Years always have 52 7-day periods, plus 1 or 2 extra days depending on whether it's a leap year. This function is basically telling you how many Sundays are in the year, i.e. there are 53 Sundays if one of the extra days happens to be a Sunday.)
+ * @param year Year to count weeks in.
+ * @return Number of weeks.
+ */
+ static guint8 get_sunday_weeks_in_year(Year year);
+
+ /** Returns true if the year is a leap year.
+ * @param year Year to check.
+ * @return true if the year is a leap year.
+ */
+ static bool is_leap_year(Year year);
+
+ /** Convert date to string.
+ * @param format A format string as used by @c strftime(), in UTF-8
+ * encoding. Only date formats are allowed, the result of time formats
+ * is undefined.
+ * @return The formatted date string.
+ * @throw Glib::ConvertError
+ */
+ Glib::ustring format_string(const Glib::ustring& format) const;
+
+ /** Fills in the date-related bits of a struct tm using the date value. Initializes the non-date parts with something sane but meaningless.
+ * @param dest Struct tm to fill.
+ */
+ void to_struct_tm(struct tm& dest) const;
+
+ /** Returns true if the Date represents an existing day.
+ * @return true if the date is valid.
+ */
+ bool valid() const;
+
+ /** Returns true if the day of the month is valid (a day is valid if it's between 1 and 31 inclusive).
+ * @param day Day to check.
+ * @return true if the day is valid.
+ */
+ static bool valid_day(Day day);
+
+ /** Returns true if the month value is valid. The 12 Date::Month enumeration values are the only valid months.
+ * @param month Month to check.
+ * @return true if the month is valid.
+ */
+ static bool valid_month(Month month);
+
+
+ /** Returns true if the year is valid.
+ * Any year greater than 0 is valid, though there is a 16-bit limit to what Date will understand.
+ * @param year Year to check.
+ * @return true if the year is valid.
+ */
+ static bool valid_year(Year year);
+
+ /** Returns true if the weekday is valid.
+ * The 7 Date::Weekday enumeration values are the only valid.
+ * @param weekday Weekday to check.
+ * @return true if the weekday is valid.
+ */
+ static bool valid_weekday(Weekday weekday);
+
+ /** Returns true if the Julian day is valid.
+ * Anything greater than zero is basically a valid Julian, though there is a 32-bit limit.
+ * @param julian_day Julian day to check.
+ * @return true if the Julian day is valid.
+ */
+ static bool valid_julian(guint32 julian_day);
+
+
+ /** Returns true if the day-month-year triplet forms a valid, existing day in the range of days Date understands (Year 1 or later, no more than a few thousand years in the future).
+ * @param day Day to check.
+ * @param month Month to check.
+ * @param year Year to check.
+ * @return true if the date is a valid one.
+ */
+ static bool valid_dmy(Day day, Month month, Year year);
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ GDate* gobj() { return &gobject_; }
+ const GDate* gobj() const { return &gobject_; }
+#endif
+
+private:
+ GDate gobject_;
+};
+
+
+/** @relates Glib::Date */
+inline bool operator==(const Date& lhs, const Date& rhs)
+ { return (lhs.compare(rhs) == 0); }
+
+/** @relates Glib::Date */
+inline bool operator!=(const Date& lhs, const Date& rhs)
+ { return (lhs.compare(rhs) != 0); }
+
+/** @relates Glib::Date */
+inline bool operator<(const Date& lhs, const Date& rhs)
+ { return (lhs.compare(rhs) < 0); }
+
+/** @relates Glib::Date */
+inline bool operator>(const Date& lhs, const Date& rhs)
+ { return (lhs.compare(rhs) > 0); }
+
+/** @relates Glib::Date */
+inline bool operator<=(const Date& lhs, const Date& rhs)
+ { return (lhs.compare(rhs) <= 0); }
+
+/** @relates Glib::Date */
+inline bool operator>=(const Date& lhs, const Date& rhs)
+ { return (lhs.compare(rhs) >= 0); }
+
+} // namespace Glib
+
+
+#endif /* _GLIBMM_DATE_H */
+
diff --git a/libs/glibmm2/glibmm/debug.cc b/libs/glibmm2/glibmm/debug.cc
new file mode 100644
index 0000000000..de181ebf24
--- /dev/null
+++ b/libs/glibmm2/glibmm/debug.cc
@@ -0,0 +1,21 @@
+/* $Id$ */
+
+/* Copyright 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/debug.h>
+
diff --git a/libs/glibmm2/glibmm/debug.h b/libs/glibmm2/glibmm/debug.h
new file mode 100644
index 0000000000..556b16f865
--- /dev/null
+++ b/libs/glibmm2/glibmm/debug.h
@@ -0,0 +1,85 @@
+// -*- c++ -*-
+#ifndef _GLIBMM_DEBUG_H
+#define _GLIBMM_DEBUG_H
+
+/* $Id$ */
+
+/* Copyright 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glib/gmacros.h>
+#include <glibmmconfig.h>
+
+// Some stuff that's useful when debugging gtkmm internals:
+
+#ifdef GLIBMM_DEBUG_REFCOUNTING
+
+#include <glib/gmessages.h>
+
+/* We can't use G_GNUC_PRETTY_FUNCTION because it's always disabled in C++,
+ * even though __PRETTY_FUNCTION__ works fine in C++ as well if you use it
+ * right (i.e. concatenation with string literals isn't allowed).
+ */
+#ifdef __GNUC__
+#define GLIBMM_GNUC_PRETTY_FUNCTION __PRETTY_FUNCTION__
+#else
+#define GLIBMM_GNUC_PRETTY_FUNCTION ""
+#endif
+
+#define GLIBMM_DEBUG_REFERENCE(cppInstance, cInstance) \
+ G_STMT_START{ \
+ void *const cppInstance__ = (void*) (cppInstance); \
+ void *const cInstance__ = (void*) (cInstance); \
+ g_log(G_LOG_DOMAIN, \
+ G_LOG_LEVEL_DEBUG, \
+ "file %s: line %d (%s):\n" \
+ "ref: C++ instance: %p; C instance: %p, ref_count = %u, type = %s\n", \
+ __FILE__, \
+ __LINE__, \
+ GLIBMM_GNUC_PRETTY_FUNCTION, \
+ cppInstance__, \
+ cInstance__, \
+ G_OBJECT(cInstance__)->ref_count, \
+ G_OBJECT_TYPE_NAME(cInstance__)); \
+ }G_STMT_END
+
+#define GLIBMM_DEBUG_UNREFERENCE(cppInstance, cInstance) \
+ G_STMT_START{ \
+ void *const cppInstance__ = (void*) (cppInstance); \
+ void *const cInstance__ = (void*) (cInstance); \
+ g_log(G_LOG_DOMAIN, \
+ G_LOG_LEVEL_DEBUG, \
+ "file %s: line %d (%s):\n" \
+ "unref: C++ instance: %p; C instance: %p, ref_count = %u, type = %s\n", \
+ __FILE__, \
+ __LINE__, \
+ GLIBMM_GNUC_PRETTY_FUNCTION, \
+ cppInstance__, \
+ cInstance__, \
+ G_OBJECT(cInstance__)->ref_count, \
+ G_OBJECT_TYPE_NAME(cInstance__)); \
+ }G_STMT_END
+
+#else
+
+#define GLIBMM_DEBUG_REFERENCE(cppInstance,cInstance) G_STMT_START{ (void)0; }G_STMT_END
+#define GLIBMM_DEBUG_UNREFERENCE(cppInstance,cInstance) G_STMT_START{ (void)0; }G_STMT_END
+
+#endif /* GLIBMM_DEBUG_REFCOUNTING */
+
+#endif /* _GLIBMM_DEBUG_H */
+
diff --git a/libs/glibmm2/glibmm/dispatcher.cc b/libs/glibmm2/glibmm/dispatcher.cc
new file mode 100644
index 0000000000..15c63ae322
--- /dev/null
+++ b/libs/glibmm2/glibmm/dispatcher.cc
@@ -0,0 +1,442 @@
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/dispatcher.h>
+#include <glibmm/exceptionhandler.h>
+#include <glibmm/fileutils.h>
+#include <glibmm/main.h>
+#include <glibmm/thread.h>
+
+#include <cerrno>
+#include <fcntl.h>
+#include <glib.h>
+
+#ifndef G_OS_WIN32
+#include <unistd.h>
+
+#if defined(_tru64) //TODO: Use the real define
+//EINTR is not defined on Tru64
+//I have tried including these
+//#include <sys/types.h>
+//#include <sys/statvfs.h>
+//#include <signal.h>
+ #ifndef EINTR
+ #define EINTR 0
+ #endif
+#endif
+
+#else
+#include <windows.h>
+#include <io.h>
+#include <direct.h>
+#include <list>
+#endif /* G_OS_WIN32 */
+
+
+namespace
+{
+
+struct DispatchNotifyData
+{
+ unsigned long tag;
+ Glib::Dispatcher* dispatcher;
+ Glib::DispatchNotifier* notifier;
+
+ DispatchNotifyData()
+ : tag (0), dispatcher (0), notifier (0) {}
+
+ DispatchNotifyData(unsigned long tag_, Glib::Dispatcher* dispatcher_, Glib::DispatchNotifier* notifier_)
+ : tag (tag_), dispatcher (dispatcher_), notifier (notifier_) {}
+};
+
+static void warn_failed_pipe_io(const char* what, int err_no)
+{
+#ifdef G_OS_WIN32
+ const char *const message = g_win32_error_message(err_no);
+#else
+ const char *const message = g_strerror(err_no);
+#endif
+ g_critical("Error in inter-thread communication: %s() failed: %s", what, message);
+}
+
+#ifndef G_OS_WIN32
+/*
+ * Try to set the close-on-exec flag of the file descriptor,
+ * so that it won't be leaked if a new process is spawned.
+ */
+static void fd_set_close_on_exec(int fd)
+{
+ const int flags = fcntl(fd, F_GETFD, 0);
+ g_return_if_fail(flags >= 0);
+
+ fcntl(fd, F_SETFD, flags | FD_CLOEXEC);
+}
+#endif /* !G_OS_WIN32 */
+
+/*
+ * One word: paranoia.
+ */
+#ifdef G_OS_WIN32
+static void fd_close_and_invalidate(HANDLE& fd)
+{
+ if(fd != 0)
+ {
+ if(!CloseHandle(fd))
+ warn_failed_pipe_io("CloseHandle", GetLastError());
+
+ fd = 0;
+ }
+}
+#else /* !G_OS_WIN32 */
+static void fd_close_and_invalidate(int& fd)
+{
+ if(fd >= 0)
+ {
+ int result;
+
+ do
+ result = close(fd);
+ while(result < 0 && errno == EINTR);
+
+ if(result < 0)
+ warn_failed_pipe_io("close", errno);
+
+ fd = -1;
+ }
+}
+#endif /* !G_OS_WIN32 */
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+class DispatchNotifier
+{
+public:
+ ~DispatchNotifier();
+
+ static DispatchNotifier* reference_instance(const Glib::RefPtr<MainContext>& context);
+ static void unreference_instance(DispatchNotifier* notifier);
+
+ void send_notification(Dispatcher* dispatcher);
+
+protected:
+ // Only used by reference_instance(). Should be private, but that triggers
+ // a silly gcc warning even though DispatchNotifier has static methods.
+ explicit DispatchNotifier(const Glib::RefPtr<MainContext>& context);
+
+private:
+ static Glib::StaticPrivate<DispatchNotifier> thread_specific_instance_;
+
+ Glib::RefPtr<MainContext> context_;
+ int ref_count_;
+#ifdef G_OS_WIN32
+ HANDLE fd_receiver_;
+ Glib::Mutex mutex_;
+ std::list<DispatchNotifyData> notify_queue_;
+#else
+ int fd_receiver_;
+ int fd_sender_;
+#endif /* !G_OS_WIN32 */
+ sigc::connection conn_io_handler_;
+
+ void create_pipe();
+ bool pipe_io_handler(Glib::IOCondition condition);
+
+ // noncopyable
+ DispatchNotifier(const DispatchNotifier&);
+ DispatchNotifier& operator=(const DispatchNotifier&);
+};
+
+
+/**** Glib::DispatchNotifier ***********************************************/
+
+Glib::StaticPrivate<DispatchNotifier>
+DispatchNotifier::thread_specific_instance_ = GLIBMM_STATIC_PRIVATE_INIT;
+
+DispatchNotifier::DispatchNotifier(const Glib::RefPtr<MainContext>& context)
+:
+ context_ (context),
+ ref_count_ (0),
+#ifdef G_OS_WIN32
+ fd_receiver_ (0),
+ mutex_ (),
+ notify_queue_ ()
+#else
+ fd_receiver_ (-1),
+ fd_sender_ (-1)
+#endif
+{
+ create_pipe();
+
+ try
+ {
+#ifdef G_OS_WIN32
+ conn_io_handler_ = context_->signal_io().connect(
+ sigc::mem_fun(*this, &DispatchNotifier::pipe_io_handler),
+ GPOINTER_TO_INT(fd_receiver_), Glib::IO_IN);
+#else /* !G_OS_WIN32 */
+ conn_io_handler_ = context_->signal_io().connect(
+ sigc::mem_fun(*this, &DispatchNotifier::pipe_io_handler),
+ fd_receiver_, Glib::IO_IN);
+#endif /* !G_OS_WIN32 */
+ }
+ catch(...)
+ {
+#ifndef G_OS_WIN32
+ fd_close_and_invalidate(fd_sender_);
+#endif /* !G_OS_WIN32 */
+ fd_close_and_invalidate(fd_receiver_);
+
+ throw;
+ }
+}
+
+DispatchNotifier::~DispatchNotifier()
+{
+ // Disconnect manually because we don't inherit from sigc::trackable
+ conn_io_handler_.disconnect();
+
+#ifndef G_OS_WIN32
+ fd_close_and_invalidate(fd_sender_);
+#endif /* !G_OS_WIN32 */
+ fd_close_and_invalidate(fd_receiver_);
+}
+
+void DispatchNotifier::create_pipe()
+{
+#ifdef G_OS_WIN32
+ // On Win32 we are using synchronization object instead of pipe
+ // thus storing its handle as fd_receiver_.
+ fd_receiver_ = CreateEvent(0, FALSE, FALSE, 0);
+
+ if(!fd_receiver_)
+ {
+ GError* const error = g_error_new(G_FILE_ERROR, G_FILE_ERROR_FAILED,
+ "Failed to create event for inter-thread communication: %s",
+ g_win32_error_message(GetLastError()));
+ throw Glib::FileError(error);
+ }
+#else /* !G_OS_WIN32 */
+ int filedes[2] = { -1, -1 };
+
+ if(pipe(filedes) < 0)
+ {
+ GError* const error = g_error_new(G_FILE_ERROR, g_file_error_from_errno(errno),
+ "Failed to create pipe for inter-thread communication: %s",
+ g_strerror(errno));
+ throw Glib::FileError(error);
+ }
+
+ fd_set_close_on_exec(filedes[0]);
+ fd_set_close_on_exec(filedes[1]);
+
+ fd_receiver_ = filedes[0];
+ fd_sender_ = filedes[1];
+#endif /* !G_OS_WIN32 */
+}
+
+// static
+DispatchNotifier* DispatchNotifier::reference_instance(const Glib::RefPtr<MainContext>& context)
+{
+ DispatchNotifier* instance = thread_specific_instance_.get();
+
+ if(!instance)
+ {
+ instance = new DispatchNotifier(context);
+ thread_specific_instance_.set(instance);
+ }
+ else
+ {
+ // Prevent massive mess-up.
+ g_return_val_if_fail(instance->context_ == context, 0);
+ }
+
+ ++instance->ref_count_; // initially 0
+
+ return instance;
+}
+
+// static
+void DispatchNotifier::unreference_instance(DispatchNotifier* notifier)
+{
+ DispatchNotifier *const instance = thread_specific_instance_.get();
+
+ // Yes, the notifier argument is only used to check for sanity.
+ g_return_if_fail(instance == notifier);
+
+ if(--instance->ref_count_ <= 0)
+ {
+ g_return_if_fail(instance->ref_count_ == 0); // could be < 0 if messed up
+
+ // This will cause deletion of the notifier object.
+ thread_specific_instance_.set(0);
+ }
+}
+
+void DispatchNotifier::send_notification(Dispatcher* dispatcher)
+{
+#ifdef G_OS_WIN32
+ {
+ Glib::Mutex::Lock lock (mutex_);
+ notify_queue_.push_back(DispatchNotifyData(0xdeadbeef, dispatcher, this));
+ }
+
+ // Send notification event to GUI-thread.
+ if(!SetEvent(fd_receiver_))
+ {
+ warn_failed_pipe_io("SetEvent", GetLastError());
+ return;
+ }
+#else /* !G_OS_WIN32 */
+ DispatchNotifyData data (0xdeadbeef, dispatcher, this);
+ gssize n_written;
+
+ do
+ n_written = write(fd_sender_, &data, sizeof(data));
+ while(n_written < 0 && errno == EINTR);
+
+ if(n_written < 0)
+ {
+ warn_failed_pipe_io("write", errno);
+ return;
+ }
+
+ // All data must be written in a single call to write(), otherwise we can't
+ // guarantee reentrancy since another thread might be scheduled between two
+ // write() calls. The manpage is a bit unclear about this -- but I hope
+ // it's safe to assume immediate success for the tiny amount of data we're
+ // writing.
+ g_return_if_fail(n_written == sizeof(data));
+#endif /* !G_OS_WIN32 */
+}
+
+bool DispatchNotifier::pipe_io_handler(Glib::IOCondition)
+{
+#ifdef G_OS_WIN32
+ DispatchNotifyData data;
+
+ for(;;)
+ {
+ {
+ Glib::Mutex::Lock lock (mutex_);
+
+ if(notify_queue_.empty())
+ break;
+
+ data = notify_queue_.front();
+ notify_queue_.pop_front();
+ }
+
+ g_return_val_if_fail(data.tag == 0xdeadbeef, true);
+ g_return_val_if_fail(data.notifier == this, true);
+
+ // Actually, we wouldn't need the try/catch block because the Glib::Source
+ // C callback already does it for us. However, we do it anyway because the
+ // default return value is 'false', which is not what we want.
+ try
+ {
+ data.dispatcher->signal_();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+#else /* !G_OS_WIN32 */
+ DispatchNotifyData data;
+ gsize n_read = 0;
+
+ do
+ {
+ void * const buffer = reinterpret_cast<guint8*>(&data) + n_read;
+ const gssize result = read(fd_receiver_, buffer, sizeof(data) - n_read);
+
+ if(result < 0)
+ {
+ if(errno == EINTR)
+ continue;
+
+ warn_failed_pipe_io("read", errno);
+ return true;
+ }
+
+ n_read += result;
+ }
+ while(n_read < sizeof(data));
+
+ g_return_val_if_fail(data.tag == 0xdeadbeef, true);
+ g_return_val_if_fail(data.notifier == this, true);
+
+ // Actually, we wouldn't need the try/catch block because the Glib::Source
+ // C callback already does it for us. However, we do it anyway because the
+ // default return value is 'false', which is not what we want.
+ try
+ {
+ data.dispatcher->signal_(); // emit
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+#endif /* !G_OS_WIN32 */
+
+ return true;
+}
+
+
+/**** Glib::Dispatcher *****************************************************/
+
+Dispatcher::Dispatcher()
+:
+ signal_ (),
+ notifier_ (DispatchNotifier::reference_instance(MainContext::get_default()))
+{}
+
+Dispatcher::Dispatcher(const Glib::RefPtr<MainContext>& context)
+:
+ signal_ (),
+ notifier_ (DispatchNotifier::reference_instance(context))
+{}
+
+Dispatcher::~Dispatcher()
+{
+ DispatchNotifier::unreference_instance(notifier_);
+}
+
+void Dispatcher::emit()
+{
+ notifier_->send_notification(this);
+}
+
+void Dispatcher::operator()()
+{
+ emit();
+}
+
+sigc::connection Dispatcher::connect(const sigc::slot<void>& slot)
+{
+ return signal_.connect(slot);
+}
+
+} // namespace Glib
+
diff --git a/libs/glibmm2/glibmm/dispatcher.h b/libs/glibmm2/glibmm/dispatcher.h
new file mode 100644
index 0000000000..cecf606eeb
--- /dev/null
+++ b/libs/glibmm2/glibmm/dispatcher.h
@@ -0,0 +1,102 @@
+// -*- c++ -*-
+#ifndef _GLIBMM_DISPATCHER_H
+#define _GLIBMM_DISPATCHER_H
+
+/* $Id$ */
+
+/* Copyright 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <sigc++/sigc++.h>
+#include <glibmm/main.h>
+
+
+namespace Glib
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+class DispatchNotifier;
+#endif
+
+/** Signal class for inter-thread communication.
+ * @ingroup Threads
+ * Glib::Dispatcher works similar to sigc::signal<void>. But unlike normal
+ * signals, the notification happens asynchronously through a pipe. This is
+ * a simple and efficient way of communicating between threads, and especially
+ * useful in a thread model with a single GUI thread.
+ *
+ * No mutex locking is involved, apart from the operating system's internal
+ * I/O locking. That implies some usage rules:
+ *
+ * @li Only one thread may connect to the signal and receive notification, but
+ * multiple senders are allowed even without locking.
+ * @li The GLib main loop must run in the receiving thread (this will be the
+ * GUI thread usually).
+ * @li The Dispatcher object must be instantiated by the receiver thread.
+ * @li The Dispatcher object should be instantiated before creating any of the
+ * sender threads, if you want to avoid extra locking.
+ *
+ * Notes about performance:
+ *
+ * @li After instantiation, Glib::Dispatcher will never lock any mutexes on its
+ * own. The interaction with the GLib main loop might involve locking on the
+ * @em receiver side. The @em sender side, however, is guaranteed not to lock,
+ * except for internal locking in the <tt>%write()</tt> system call.
+ * @li All Dispatcher instances of a receiver thread share the same pipe. That
+ * is, if you use Glib::Dispatcher only to notify the GUI thread, only one pipe
+ * is created no matter how many Dispatcher objects you have.
+ */
+class Dispatcher
+{
+public:
+ /** Create new Dispatcher instance using the default main context.
+ * @throw Glib::FileError
+ */
+ Dispatcher();
+ /** Create new Dispatcher instance using an arbitrary main context.
+ * @throw Glib::FileError
+ */
+ explicit Dispatcher(const Glib::RefPtr<MainContext>& context);
+ ~Dispatcher();
+
+ void emit();
+ void operator()();
+
+ sigc::connection connect(const sigc::slot<void>& slot);
+
+private:
+ sigc::signal<void> signal_;
+ DispatchNotifier* notifier_;
+
+ // noncopyable
+ Dispatcher(const Dispatcher&);
+ Dispatcher& operator=(const Dispatcher&);
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ friend class Glib::DispatchNotifier;
+#endif
+};
+
+/*! A Glib::Dispatcher example.
+ * @example thread/dispatcher.cc
+ */
+
+} // namespace Glib
+
+
+#endif /* _GLIBMM_DISPATCHER_H */
+
diff --git a/libs/glibmm2/glibmm/error.cc b/libs/glibmm2/glibmm/error.cc
new file mode 100644
index 0000000000..2e8f072322
--- /dev/null
+++ b/libs/glibmm2/glibmm/error.cc
@@ -0,0 +1,187 @@
+// -*- c++ -*-
+/* $Id$ */
+
+/* error.cc
+ *
+ * Copyright 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glib/gerror.h>
+#include <glib/gmessages.h>
+
+#include <map>
+#include <glibmmconfig.h>
+#include <glibmm/error.h>
+#include <glibmm/wrap_init.h>
+
+GLIBMM_USING_STD(map)
+
+
+namespace
+{
+
+typedef std::map<GQuark,Glib::Error::ThrowFunc> ThrowFuncTable;
+
+static ThrowFuncTable* throw_func_table = 0;
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Error::Error()
+:
+ gobject_ (0)
+{}
+
+Error::Error(GQuark domain, int code, const Glib::ustring& message)
+:
+ gobject_ (g_error_new_literal(domain, code, message.c_str()))
+{}
+
+Error::Error(GError* gobject, bool take_copy)
+:
+ gobject_ ((take_copy && gobject) ? g_error_copy(gobject) : gobject)
+{}
+
+Error::Error(const Error& other)
+:
+ Exception(other),
+ gobject_ ((other.gobject_) ? g_error_copy(other.gobject_) : 0)
+{}
+
+Error& Error::operator=(const Error& other)
+{
+ if(gobject_ != other.gobject_)
+ {
+ if(gobject_)
+ {
+ g_error_free(gobject_);
+ gobject_ = 0;
+ }
+ if(other.gobject_)
+ {
+ gobject_ = g_error_copy(other.gobject_);
+ }
+ }
+ return *this;
+}
+
+Error::~Error() throw()
+{
+ if(gobject_)
+ g_error_free(gobject_);
+}
+
+GQuark Error::domain() const
+{
+ g_return_val_if_fail(gobject_ != 0, 0);
+
+ return gobject_->domain;
+}
+
+int Error::code() const
+{
+ g_return_val_if_fail(gobject_ != 0, -1);
+
+ return gobject_->code;
+}
+
+Glib::ustring Error::what() const
+{
+ g_return_val_if_fail(gobject_ != 0, "");
+ g_return_val_if_fail(gobject_->message != 0, "");
+
+ return gobject_->message;
+}
+
+bool Error::matches(GQuark domain, int code) const
+{
+ return g_error_matches(gobject_, domain, code);
+}
+
+GError* Error::gobj()
+{
+ return gobject_;
+}
+
+const GError* Error::gobj() const
+{
+ return gobject_;
+}
+
+void Error::propagate(GError** dest)
+{
+ g_propagate_error(dest, gobject_);
+ gobject_ = 0;
+}
+
+
+// static
+void Error::register_init()
+{
+ if(!throw_func_table)
+ {
+ throw_func_table = new ThrowFuncTable();
+ Glib::wrap_init(); // make sure that at least the Glib exceptions are registered
+ }
+}
+
+// static
+void Error::register_cleanup()
+{
+ if(throw_func_table)
+ {
+ delete throw_func_table;
+ throw_func_table = 0;
+ }
+}
+
+// static
+void Error::register_domain(GQuark domain, Error::ThrowFunc throw_func)
+{
+ g_assert(throw_func_table != 0);
+
+ (*throw_func_table)[domain] = throw_func;
+}
+
+// static, noreturn
+void Error::throw_exception(GError* gobject)
+{
+ g_assert(gobject != 0);
+
+ // Just in case Gtk::Main hasn't been instantiated yet.
+ if(!throw_func_table)
+ register_init();
+
+ if(const ThrowFunc throw_func = (*throw_func_table)[gobject->domain])
+ {
+ (*throw_func)(gobject);
+ g_assert_not_reached();
+ }
+
+ g_warning("Glib::Error::throw_exception():\n "
+ "unknown error domain '%s': throwing generic Glib::Error exception\n",
+ (gobject->domain) ? g_quark_to_string(gobject->domain) : "(null)");
+
+ // Doesn't copy, because error-returning functions return a newly allocated GError for us.
+ throw Glib::Error(gobject);
+}
+
+} // namespace Glib
+
diff --git a/libs/glibmm2/glibmm/error.h b/libs/glibmm2/glibmm/error.h
new file mode 100644
index 0000000000..d4c39e6d80
--- /dev/null
+++ b/libs/glibmm2/glibmm/error.h
@@ -0,0 +1,77 @@
+// -*- c++ -*-
+#ifndef _GLIBMM_ERROR_H
+#define _GLIBMM_ERROR_H
+/* $Id$ */
+
+/* Copyright 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C" { typedef struct _GError GError; }
+#endif
+
+#include <glib/gquark.h>
+#include <glibmm/exception.h>
+
+
+namespace Glib
+{
+
+class Error : public Glib::Exception
+{
+public:
+ Error();
+ Error(GQuark domain, int code, const Glib::ustring& message);
+ explicit Error(GError* gobject, bool take_copy = false);
+
+ Error(const Error& other);
+ Error& operator=(const Error& other);
+
+ virtual ~Error() throw();
+
+ GQuark domain() const;
+ int code() const;
+ virtual Glib::ustring what() const;
+
+ bool matches(GQuark domain, int code) const;
+
+ GError* gobj();
+ const GError* gobj() const;
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+ void propagate(GError** dest);
+
+ typedef void (* ThrowFunc) (GError*);
+
+ static void register_init();
+ static void register_cleanup();
+ static void register_domain(GQuark domain, ThrowFunc throw_func);
+
+ static void throw_exception(GError* gobject) G_GNUC_NORETURN;
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+protected:
+ GError* gobject_;
+};
+
+} // namespace Glib
+
+
+#endif /* _GLIBMM_ERROR_H */
+
diff --git a/libs/glibmm2/glibmm/exception.cc b/libs/glibmm2/glibmm/exception.cc
new file mode 100644
index 0000000000..22345b2853
--- /dev/null
+++ b/libs/glibmm2/glibmm/exception.cc
@@ -0,0 +1,40 @@
+// -*- c++ -*-
+/* $Id$ */
+
+/* exception.cc
+ *
+ * Copyright 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glib/gmessages.h>
+#include <glibmm/exception.h>
+
+
+namespace Glib
+{
+
+Exception::~Exception() throw()
+{}
+
+Glib::ustring Exception::what() const
+{
+ g_assert_not_reached();
+ return Glib::ustring();
+}
+
+} // namespace Glib
+
diff --git a/libs/glibmm2/glibmm/exception.h b/libs/glibmm2/glibmm/exception.h
new file mode 100644
index 0000000000..7f0dd43c9c
--- /dev/null
+++ b/libs/glibmm2/glibmm/exception.h
@@ -0,0 +1,42 @@
+// -*- c++ -*-
+#ifndef _GLIBMM_EXCEPTION_H
+#define _GLIBMM_EXCEPTION_H
+/* $Id$ */
+
+/* exception.h
+ *
+ * Copyright 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/ustring.h>
+
+
+namespace Glib
+{
+
+class Exception
+{
+public:
+ virtual ~Exception() throw() = 0;
+ virtual Glib::ustring what() const = 0;
+};
+
+} // namespace Glib
+
+
+#endif /* _GLIBMM_EXCEPTION_H */
+
diff --git a/libs/glibmm2/glibmm/exceptionhandler.cc b/libs/glibmm2/glibmm/exceptionhandler.cc
new file mode 100644
index 0000000000..cfe6892483
--- /dev/null
+++ b/libs/glibmm2/glibmm/exceptionhandler.cc
@@ -0,0 +1,159 @@
+// -*- c++ -*-
+/* $Id$ */
+
+/* exceptionhandler.cc
+ *
+ * Copyright 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glib.h>
+#include <exception>
+#include <list>
+
+#include <glibmmconfig.h>
+#include <glibmm/error.h>
+#include <glibmm/exceptionhandler.h>
+#include <glibmm/thread.h>
+
+GLIBMM_USING_STD(exception)
+GLIBMM_USING_STD(list)
+
+
+namespace
+{
+
+typedef sigc::signal<void> HandlerList;
+
+// Each thread has its own list of exception handlers
+// to avoid thread synchronization problems.
+static Glib::StaticPrivate<HandlerList> thread_specific_handler_list = GLIBMM_STATIC_PRIVATE_INIT;
+
+
+static void glibmm_exception_warning(const GError* error)
+{
+ g_assert(error != 0);
+
+ g_critical("\n"
+ "unhandled exception (type Glib::Error) in signal handler:\n"
+ "domain: %s\n"
+ "code : %d\n"
+ "what : %s\n",
+ g_quark_to_string(error->domain), error->code,
+ (error->message) ? error->message : "(null)");
+}
+
+static void glibmm_unexpected_exception()
+{
+ try
+ {
+ throw; // re-throw current exception
+ }
+ catch(const Glib::Error& error)
+ {
+ // Access the GError directly, to avoid possible exceptions from C++ code.
+ glibmm_exception_warning(error.gobj());
+
+ // For most failures that cause a Glib::Error exception, aborting the
+ // program seems too harsh. Instead, give control back to the main loop.
+ return;
+ }
+ catch(const std::exception& except)
+ {
+ g_error("\n"
+ "unhandled exception (type std::exception) in signal handler:\n"
+ "what: %s\n", except.what());
+ }
+ catch(...)
+ {
+ g_error("\nunhandled exception (type unknown) in signal handler\n");
+ }
+}
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+sigc::connection add_exception_handler(const sigc::slot<void>& slot)
+{
+ HandlerList* handler_list = thread_specific_handler_list.get();
+
+ if(!handler_list)
+ {
+ handler_list = new HandlerList();
+ thread_specific_handler_list.set(handler_list);
+ }
+
+ handler_list->slots().push_front(slot);
+ return handler_list->slots().begin();
+}
+
+// internal
+void exception_handlers_invoke() throw()
+{
+ // This function will be called from our GLib signal handler proxies
+ // if an exception has been caught. It's not possible to throw C++
+ // exceptions through C signal handlers. To handle this situation, the
+ // programmer can install slots to global Reusable Exception Handlers.
+ //
+ // A handler has to re-throw the current exception in a try block, and then
+ // catch the exceptions it knows about. Any unknown exceptions should just
+ // fall through, i.e. the handler must not do catch(...).
+ //
+ // We now invoke each of the installed slots until the exception has been
+ // handled. If there are no more handlers in the list and the exception
+ // is still unhandled, call glibmm_unexpected_exception().
+
+ if(HandlerList *const handler_list = thread_specific_handler_list.get())
+ {
+ HandlerList::iterator pslot = handler_list->slots().begin();
+
+ while(pslot != handler_list->slots().end())
+ {
+ // Calling an empty slot would mean ignoring the exception,
+ // thus we have to check for dead slots explicitly.
+ if(pslot->empty())
+ {
+ pslot = handler_list->slots().erase(pslot);
+ continue;
+ }
+
+ // Call the Reusable Exception Handler, which should re-throw
+ // the exception that's currently on the stack.
+ try
+ {
+ (*pslot)();
+ }
+ catch(...) // unhandled, try next slot
+ {
+ ++pslot;
+ continue;
+ }
+
+ // The exception has either been handled or ignored.
+ // Give control back to the GLib main loop.
+ return;
+ }
+ }
+
+ // Critical: The exception is still unhandled.
+ glibmm_unexpected_exception();
+}
+
+} // namespace Glib
+
diff --git a/libs/glibmm2/glibmm/exceptionhandler.h b/libs/glibmm2/glibmm/exceptionhandler.h
new file mode 100644
index 0000000000..de1d68f48c
--- /dev/null
+++ b/libs/glibmm2/glibmm/exceptionhandler.h
@@ -0,0 +1,45 @@
+// -*- c++ -*-
+#ifndef _GLIBMM_EXCEPTIONHANDLER_H
+#define _GLIBMM_EXCEPTIONHANDLER_H
+
+/* $Id$ */
+
+/* exceptionhandler.h
+ *
+ * Copyright 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <sigc++/sigc++.h>
+
+
+namespace Glib
+{
+
+/** Specify a slot to be called when an exception is thrown by a signal handler.
+ */
+sigc::connection add_exception_handler(const sigc::slot<void>& slot);
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+// internal
+void exception_handlers_invoke() throw();
+#endif
+
+} // namespace Glib
+
+
+#endif /* _GLIBMM_EXCEPTIONHANDLER_H */
+
diff --git a/libs/glibmm2/glibmm/fileutils.cc b/libs/glibmm2/glibmm/fileutils.cc
new file mode 100644
index 0000000000..ce7051faa0
--- /dev/null
+++ b/libs/glibmm2/glibmm/fileutils.cc
@@ -0,0 +1,217 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <glibmm/fileutils.h>
+#include <glibmm/private/fileutils_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glib/gdir.h>
+#include <glib/gfileutils.h>
+#include <glib/gstrfuncs.h>
+#include <glibmm/utility.h>
+
+
+namespace Glib
+{
+
+/**** Glib::Dir ************************************************************/
+
+Dir::Dir(const std::string& path)
+{
+ GError* error = 0;
+ gobject_ = g_dir_open(path.c_str(), 0, &error);
+
+ if(error)
+ Glib::Error::throw_exception(error);
+}
+
+Dir::Dir(GDir* gobject)
+:
+ gobject_ (gobject)
+{}
+
+Dir::~Dir()
+{
+ if(gobject_)
+ g_dir_close(gobject_);
+}
+
+std::string Dir::read_name()
+{
+ const char *const name = g_dir_read_name(gobject_);
+ return (name) ? std::string(name) : std::string();
+}
+
+void Dir::rewind()
+{
+ g_dir_rewind(gobject_);
+}
+
+void Dir::close()
+{
+ if(gobject_)
+ {
+ g_dir_close(gobject_);
+ gobject_ = 0;
+ }
+}
+
+DirIterator Dir::begin()
+{
+ g_dir_rewind(gobject_);
+ return DirIterator(gobject_, g_dir_read_name(gobject_));
+}
+
+DirIterator Dir::end()
+{
+ return DirIterator(gobject_, 0);
+}
+
+
+/**** Glib::DirIterator ****************************************************/
+
+DirIterator::DirIterator()
+:
+ gobject_ (0),
+ current_ (0)
+{}
+
+DirIterator::DirIterator(GDir* gobject, const char* current)
+:
+ gobject_ (gobject),
+ current_ (current)
+{}
+
+std::string DirIterator::operator*() const
+{
+ return (current_) ? std::string(current_) : std::string();
+}
+
+DirIterator& DirIterator::operator++()
+{
+ current_ = g_dir_read_name(gobject_);
+ return *this;
+}
+
+void DirIterator::operator++(int)
+{
+ current_ = g_dir_read_name(gobject_);
+}
+
+bool DirIterator::operator==(const DirIterator& rhs) const
+{
+ return (current_ == rhs.current_);
+}
+
+bool DirIterator::operator!=(const DirIterator& rhs) const
+{
+ return (current_ != rhs.current_);
+}
+
+
+bool file_test(const std::string& filename, FileTest test)
+{
+ return g_file_test(filename.c_str(), static_cast<GFileTest>(unsigned(test)));
+}
+
+int mkstemp(std::string& filename_template)
+{
+ const ScopedPtr<char> buf (g_strndup(filename_template.data(), filename_template.size()));
+ const int fileno = g_mkstemp(buf.get());
+
+ filename_template = buf.get();
+ return fileno;
+}
+
+int file_open_tmp(std::string& name_used, const std::string& prefix)
+{
+ std::string basename_template (prefix);
+ basename_template += "XXXXXX"; // this sillyness shouldn't be in the interface
+
+ GError* error = 0;
+ ScopedPtr<char> buf_name_used;
+
+ const int fileno = g_file_open_tmp(basename_template.c_str(), buf_name_used.addr(), &error);
+
+ if(error)
+ Glib::Error::throw_exception(error);
+
+ name_used = buf_name_used.get();
+ return fileno;
+}
+
+int file_open_tmp(std::string& name_used)
+{
+ GError* error = 0;
+ ScopedPtr<char> buf_name_used;
+
+ const int fileno = g_file_open_tmp(0, buf_name_used.addr(), &error);
+
+ if(error)
+ Glib::Error::throw_exception(error);
+
+ name_used = buf_name_used.get();
+ return fileno;
+}
+
+std::string file_get_contents(const std::string& filename)
+{
+ ScopedPtr<char> contents;
+ gsize length = 0;
+ GError* error = 0;
+
+ g_file_get_contents(filename.c_str(), contents.addr(), &length, &error);
+
+ if(error)
+ Glib::Error::throw_exception(error);
+
+ return std::string(contents.get(), length);
+}
+
+} // namespace Glib
+
+
+namespace
+{
+} // anonymous namespace
+
+
+Glib::FileError::FileError(Glib::FileError::Code error_code, const Glib::ustring& error_message)
+:
+ Glib::Error (G_FILE_ERROR, error_code, error_message)
+{}
+
+Glib::FileError::FileError(GError* gobject)
+:
+ Glib::Error (gobject)
+{}
+
+Glib::FileError::Code Glib::FileError::code() const
+{
+ return static_cast<Code>(Glib::Error::code());
+}
+
+void Glib::FileError::throw_func(GError* gobject)
+{
+ throw Glib::FileError(gobject);
+}
+
+
diff --git a/libs/glibmm2/glibmm/fileutils.h b/libs/glibmm2/glibmm/fileutils.h
new file mode 100644
index 0000000000..67f1106a64
--- /dev/null
+++ b/libs/glibmm2/glibmm/fileutils.h
@@ -0,0 +1,475 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GLIBMM_FILEUTILS_H
+#define _GLIBMM_FILEUTILS_H
+
+
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C" { typedef struct _GDir GDir; }
+#endif
+
+#include <iterator>
+#include <string>
+
+#include <glibmmconfig.h>
+#include <glibmm/error.h>
+
+GLIBMM_USING_STD(input_iterator_tag)
+GLIBMM_USING_STD(string)
+
+
+namespace Glib
+{
+
+/** @addtogroup glibmmEnums Enums and Flags */
+
+/**
+ * @ingroup glibmmEnums
+ * @par Bitwise operators:
+ * <tt>%FileTest operator|(FileTest, FileTest)</tt><br>
+ * <tt>%FileTest operator&(FileTest, FileTest)</tt><br>
+ * <tt>%FileTest operator^(FileTest, FileTest)</tt><br>
+ * <tt>%FileTest operator~(FileTest)</tt><br>
+ * <tt>%FileTest& operator|=(FileTest&, FileTest)</tt><br>
+ * <tt>%FileTest& operator&=(FileTest&, FileTest)</tt><br>
+ * <tt>%FileTest& operator^=(FileTest&, FileTest)</tt><br>
+ */
+enum FileTest
+{
+ FILE_TEST_IS_REGULAR = 1 << 0,
+ FILE_TEST_IS_SYMLINK = 1 << 1,
+ FILE_TEST_IS_DIR = 1 << 2,
+ FILE_TEST_IS_EXECUTABLE = 1 << 3,
+ FILE_TEST_EXISTS = 1 << 4
+};
+
+/** @ingroup glibmmEnums */
+inline FileTest operator|(FileTest lhs, FileTest rhs)
+ { return static_cast<FileTest>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
+
+/** @ingroup glibmmEnums */
+inline FileTest operator&(FileTest lhs, FileTest rhs)
+ { return static_cast<FileTest>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
+
+/** @ingroup glibmmEnums */
+inline FileTest operator^(FileTest lhs, FileTest rhs)
+ { return static_cast<FileTest>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
+
+/** @ingroup glibmmEnums */
+inline FileTest operator~(FileTest flags)
+ { return static_cast<FileTest>(~static_cast<unsigned>(flags)); }
+
+/** @ingroup glibmmEnums */
+inline FileTest& operator|=(FileTest& lhs, FileTest rhs)
+ { return (lhs = static_cast<FileTest>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
+
+/** @ingroup glibmmEnums */
+inline FileTest& operator&=(FileTest& lhs, FileTest rhs)
+ { return (lhs = static_cast<FileTest>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
+
+/** @ingroup glibmmEnums */
+inline FileTest& operator^=(FileTest& lhs, FileTest rhs)
+ { return (lhs = static_cast<FileTest>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
+
+
+/** @defgroup FileUtils File Utilities
+ * Various file-related classes and functions.
+ */
+
+/** Exception class for file-related errors.
+ * @ingroup FileUtils
+ */
+class FileError : public Glib::Error
+{
+public:
+ enum Code
+ {
+ EXISTS,
+ IS_DIRECTORY,
+ ACCESS_DENIED,
+ NAME_TOO_LONG,
+ NO_SUCH_ENTITY,
+ NOT_DIRECTORY,
+ NO_SUCH_DEVICE,
+ NOT_DEVICE,
+ READONLY_FILESYSTEM,
+ TEXT_FILE_BUSY,
+ FAULTY_ADDRESS,
+ SYMLINK_LOOP,
+ NO_SPACE_LEFT,
+ NOT_ENOUGH_MEMORY,
+ TOO_MANY_OPEN_FILES,
+ FILE_TABLE_OVERFLOW,
+ BAD_FILE_DESCRIPTOR,
+ INVALID_ARGUMENT,
+ BROKEN_PIPE,
+ TRYAGAIN,
+ INTERRUPTED,
+ IO_ERROR,
+ NOT_OWNER,
+ NOSYS,
+ FAILED
+ };
+
+ FileError(Code error_code, const Glib::ustring& error_message);
+ explicit FileError(GError* gobject);
+ Code code() const;
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+private:
+ static void throw_func(GError* gobject);
+ friend void wrap_init(); // uses throw_func()
+#endif
+};
+
+
+/** @enum FileError::Code
+ * Values corresponding to <tt>errno</tt> codes returned from file operations
+ * on UNIX.
+ * Unlike <tt>errno</tt> codes, FileError::Code values are available on all
+ * systems, even Windows. The exact meaning of each code depends on what sort
+ * of file operation you were performing; the UNIX documentation gives more
+ * details. The following error code descriptions come from the GNU C Library
+ * manual, and are under the copyright of that manual.
+ *
+ * It's not very portable to make detailed assumptions about exactly which
+ * errors will be returned from a given operation. Some errors don't occur on
+ * some systems, etc., sometimes there are subtle differences in when a system
+ * will report a given error, etc.
+ */
+
+/** @var FileError::Code FileError::EXISTS
+ * <tt>(EEXIST)</tt> Operation not permitted; only the owner of the file (or
+ * other resource) or processes with special privileges can perform the operation.
+ * <br><br>
+ */
+/** @var FileError::Code FileError::IS_DIRECTORY
+ * <tt>(EISDIR)</tt> File is a directory; you cannot open a directory for writing,
+ * or create or remove hard links to it.
+ * <br><br>
+ */
+/** @var FileError::Code FileError::ACCESS_DENIED
+ * <tt>(EACCES)</tt> Permission denied; the file permissions do not allow the
+ * attempted operation.
+ * <br><br>
+ */
+/** @var FileError::Code FileError::NAME_TOO_LONG
+ * <tt>(ENAMETOOLONG)</tt> Filename too long.
+ * <br><br>
+ */
+/** @var FileError::Code FileError::NO_SUCH_ENTITY
+ * <tt>(ENOENT)</tt> No such file or directory. This is a "file doesn't exist"
+ * error for ordinary files that are referenced in contexts where they are expected
+ * to already exist.
+ * <br><br>
+ */
+/** @var FileError::Code FileError::NOT_DIRECTORY
+ * <tt>(ENOTDIR)</tt> A file that isn't a directory was specified when a directory
+ * is required.
+ * <br><br>
+ */
+/** @var FileError::Code FileError::NO_SUCH_DEVICE
+ * <tt>(ENXIO)</tt> No such device or address. The system tried to use the device
+ * represented by a file you specified, and it couldn't find the device. This can
+ * mean that the device file was installed incorrectly, or that the physical device
+ * is missing or not correctly attached to the computer.
+ * <br><br>
+ */
+/** @var FileError::Code FileError::NOT_DEVICE
+ * <tt>(ENODEV)</tt> This file is of a type that doesn't support mapping.
+ * <br><br>
+ */
+/** @var FileError::Code FileError::READONLY_FILESYSTEM
+ * <tt>(EROFS)</tt> The directory containing the new link can't be modified
+ * because it's on a read-only file system.
+ * <br><br>
+ */
+/** @var FileError::Code FileError::TEXT_FILE_BUSY
+ * <tt>(ETXTBSY)</tt> Text file busy.
+ * <br><br>
+ */
+/** @var FileError::Code FileError::FAULTY_ADDRESS
+ * <tt>(EFAULT)</tt> You passed in a pointer to bad memory. (Glib won't
+ * reliably return this, don't pass in pointers to bad memory.)
+ * <br><br>
+ */
+/** @var FileError::Code FileError::SYMLINK_LOOP
+ * <tt>(ELOOP)</tt> Too many levels of symbolic links were encountered in
+ * looking up a file name. This often indicates a cycle of symbolic links.
+ * <br><br>
+ */
+/** @var FileError::Code FileError::NO_SPACE_LEFT
+ * <tt>(ENOSPC)</tt> No space left on device; write operation on a file failed
+ * because the disk is full.
+ * <br><br>
+ */
+/** @var FileError::Code FileError::NOT_ENOUGH_MEMORY
+ * <tt>(ENOMEM)</tt> No memory available. The system cannot allocate more
+ * virtual memory because its capacity is full.
+ * <br><br>
+ */
+/** @var FileError::Code FileError::TOO_MANY_OPEN_FILES
+ * <tt>(EMFILE)</tt> The current process has too many files open and can't
+ * open any more. Duplicate descriptors do count toward this limit.
+ * <br><br>
+ */
+/** @var FileError::Code FileError::FILE_TABLE_OVERFLOW
+ * <tt>(ENFILE)</tt> There are too many distinct file openings in the
+ * entire system.
+ * <br><br>
+ */
+/** @var FileError::Code FileError::BAD_FILE_DESCRIPTOR
+ * <tt>(EBADF)</tt> Bad file descriptor; for example, I/O on a descriptor
+ * that has been closed or reading from a descriptor open only for writing
+ * (or vice versa).
+ * <br><br>
+ */
+/** @var FileError::Code FileError::INVALID_ARGUMENT
+ * <tt>(EINVAL)</tt> Invalid argument. This is used to indicate various kinds
+ * of problems with passing the wrong argument to a library function.
+ * <br><br>
+ */
+/** @var FileError::Code FileError::BROKEN_PIPE
+ * <tt>(EPIPE)</tt> Broken pipe; there is no process reading from the other
+ * end of a pipe. Every library function that returns this error code also
+ * generates a <tt>SIGPIPE</tt> signal; this signal terminates the program
+ * if not handled or blocked. Thus, your program will never actually see
+ * this code unless it has handled or blocked <tt>SIGPIPE</tt>.
+ * <br><br>
+ */
+/** @var FileError::Code FileError::TRYAGAIN
+ * <tt>(EAGAIN)</tt> Resource temporarily unavailable; the call might work
+ * if you try again later.
+ * We used TRYAGAIN instead of TRY_AGAIN, because that is a defined as a macro by a Unix header.
+ * <br><br>
+ */
+/** @var FileError::Code FileError::INTERRUPTED
+ * <tt>(EINTR)</tt> Interrupted function call; an asynchronous signal occurred
+ * and prevented completion of the call. When this happens, you should try
+ * the call again.
+ * <br><br>
+ */
+/** @var FileError::Code FileError::IO_ERROR
+ * <tt>(EIO)</tt> Input/output error; usually used for physical read or write
+ * errors. I.e. the disk or other physical device hardware is returning errors.
+ * <br><br>
+ */
+/** @var FileError::Code FileError::NOT_OWNER
+ * <tt>(EPERM)</tt> Operation not permitted; only the owner of the file (or other
+ * resource) or processes with special privileges can perform the operation.
+ * <br><br>
+ */
+/** @var FileError::Code FileError::FAILED
+ * Does not correspond to a UNIX error code; this is the standard "failed for
+ * unspecified reason" error code present in all Glib::Error error code
+ * enumerations. Returned if no specific code applies.
+ */
+
+class Dir;
+
+/** The iterator type of Glib::Dir.
+ * @ingroup FileUtils
+ */
+class DirIterator
+{
+public:
+ typedef std::input_iterator_tag iterator_category;
+ typedef std::string value_type;
+ typedef int difference_type;
+ typedef value_type reference;
+ typedef void pointer;
+
+ DirIterator();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ DirIterator(GDir* gobject, const char* current);
+#endif
+
+ std::string operator*() const;
+ DirIterator& operator++();
+
+ /** @note DirIterator has input iterator semantics, which means real
+ * postfix increment is impossible. The return type is @c void to
+ * prevent surprising behaviour.
+ */
+ void operator++(int);
+
+ bool operator==(const DirIterator& rhs) const;
+ bool operator!=(const DirIterator& rhs) const;
+
+private:
+ GDir* gobject_;
+ const char* current_;
+};
+
+
+/** Utility class representing an open directory.
+ * @ingroup FileUtils
+ * It's highly recommended to use the iterator interface. With iterators,
+ * reading an entire directory into a STL container is really easy:
+ * @code
+ * Glib::Dir dir (directory_path);
+ * std::list<std::string> entries (dir.begin(), dir.end());
+ * @endcode
+ * @note The encoding of the directory entries isn't necessarily UTF-8.
+ * Use Glib::filename_to_utf8() if you need to display them.
+ */
+class Dir
+{
+public:
+ typedef DirIterator iterator;
+ typedef DirIterator const_iterator;
+
+ /** Opens a directory for reading. The names of the files in the
+ * directory can then be retrieved using read_name().
+ * @param path The path to the directory you are interested in.
+ * @throw Glib::FileError
+ */
+ explicit Dir(const std::string& path);
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ explicit Dir(GDir* gobject);
+#endif
+
+ /** Closes the directory and deallocates all related resources.
+ */
+ ~Dir();
+
+ /** Retrieves the name of the next entry in the directory.
+ * The <tt>'.'</tt> and <tt>'..'</tt> entries are omitted.
+ * @return The entry's name or <tt>""</tt> if there are no more entries.
+ * @see begin(), end()
+ */
+ std::string read_name();
+
+ /** Resets the directory. The next call to
+ * read_name() will return the first entry again.
+ */
+ void rewind();
+
+ /** Closes the directory and deallocates all related resources.
+ * Note that close() is implicitely called by ~Dir(). Thus you don't
+ * need to call close() yourself unless you want to close the directory
+ * before the destructor runs.
+ */
+ void close();
+
+ /** Get the begin of an input iterator sequence.
+ * @return An input iterator pointing to the first directory entry.
+ */
+ DirIterator begin();
+
+ /** Get the end of an input iterator sequence.
+ * @return An input iterator pointing behind the last directory entry.
+ */
+ DirIterator end();
+
+private:
+ GDir* gobject_;
+
+ // noncopyable
+ Dir(const Dir&);
+ Dir& operator=(const Dir&);
+};
+
+
+/** Returns @c true if any of the tests in the bitfield @a test are true.
+ * @ingroup FileUtils
+ * For example, <tt>(Glib::FILE_TEST_EXISTS | Glib::FILE_TEST_IS_DIR)</tt> will
+ * return @c true if the file exists; the check whether it's a directory
+ * doesn't matter since the existence test is true. With the current set of
+ * available tests, there's no point passing in more than one test at a time.
+ *
+ * Apart from <tt>Glib::FILE_TEST_IS_SYMLINK</tt> all tests follow symbolic
+ * links, so for a symbolic link to a regular file file_test() will return
+ * @c true for both <tt>Glib::FILE_TEST_IS_SYMLINK</tt> and
+ * <tt>Glib::FILE_TEST_IS_REGULAR</tt>.
+ *
+ * @note For a dangling symbolic link file_test() will return @c true for
+ * <tt>Glib::FILE_TEST_IS_SYMLINK</tt> and @c false for all other flags.
+ *
+ * @param filename A filename to test.
+ * @param test Bitfield of Glib::FileTest flags.
+ * @return Whether a test was true.
+ */
+bool file_test(const std::string& filename, FileTest test);
+
+/** Opens a temporary file.
+ * @ingroup FileUtils
+ * See the %mkstemp() documentation on most UNIX-like systems. This is a
+ * portability wrapper, which simply calls %mkstemp() on systems that have
+ * it, and implements it in GLib otherwise.
+ * @param filename_template A string that should match the rules for
+ * %mkstemp(), i.e. end in <tt>"XXXXXX"</tt>. The <tt>X</tt> string
+ * will be modified to form the name of a file that didn't exist.
+ * @return A file handle (as from open()) to the file opened for reading
+ * and writing. The file is opened in binary mode on platforms where there
+ * is a difference. The file handle should be closed with close(). In
+ * case of errors, <tt>-1</tt> is returned.
+ */
+int mkstemp(std::string& filename_template);
+
+/** Opens a file for writing in the preferred directory for temporary files
+ * (as returned by Glib::get_tmp_dir()).
+ * @ingroup FileUtils
+ * @a prefix should a basename template; it'll be suffixed by 6 characters
+ * in order to form a unique filename. No directory components are allowed.
+ *
+ * The actual name used is returned in @a name_used.
+ *
+ * @param prefix Template for file name, basename only.
+ * @retval name_used The actual name used.
+ * @return A file handle (as from <tt>open()</tt>) to the file opened for reading
+ * and writing. The file is opened in binary mode on platforms where there is a
+ * difference. The file handle should be closed with <tt>close()</tt>.
+ * @throw Glib::FileError
+ */
+int file_open_tmp(std::string& name_used, const std::string& prefix);
+
+/** Opens a file for writing in the preferred directory for temporary files
+ * (as returned by Glib::get_tmp_dir()).
+ * @ingroup FileUtils
+ * This function works like file_open_tmp(std::string&, const std::string&)
+ * but uses a default basename prefix.
+ *
+ * @retval name_used The actual name used.
+ * @return A file handle (as from <tt>open()</tt>) to the file opened for reading
+ * and writing. The file is opened in binary mode on platforms where there is a
+ * difference. The file handle should be closed with <tt>close()</tt>.
+ * @throw Glib::FileError
+ */
+int file_open_tmp(std::string& name_used);
+
+/** Reads an entire file into a string, with good error checking.
+ * @ingroup FileUtils
+ * @param filename A file to read contents from.
+ * @return The file contents.
+ * @throw Glib::FileError
+ */
+std::string file_get_contents(const std::string& filename);
+
+} // namespace Glib
+
+
+#endif /* _GLIBMM_FILEUTILS_H */
+
diff --git a/libs/glibmm2/glibmm/helperlist.h b/libs/glibmm2/glibmm/helperlist.h
new file mode 100644
index 0000000000..50685e80ca
--- /dev/null
+++ b/libs/glibmm2/glibmm/helperlist.h
@@ -0,0 +1,165 @@
+// -*- c++ -*-
+#ifndef _GLIBMM_HELPERLIST_H
+#define _GLIBMM_HELPERLIST_H
+/* $Id$ */
+
+/* helperlist.h
+ *
+ * Copyright 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/containers.h>
+
+namespace Glib
+{
+
+// This class has some pure virtual methods which need to be implemented by derived classes.
+template< typename T_Child, typename T_CppElement, typename T_Iterator >
+class HelperList
+{
+public:
+ HelperList()
+ : gparent_(0)
+ {}
+
+ HelperList(GObject* gparent)
+ : gparent_(gparent)
+ {}
+
+ virtual ~HelperList()
+ {}
+
+ typedef T_Child value_type;
+ typedef value_type& reference;
+ typedef const value_type& const_reference;
+
+ typedef T_Iterator iterator;
+ typedef List_ConstIterator<iterator> const_iterator;
+ typedef List_ReverseIterator<iterator> reverse_iterator;
+ typedef List_ConstIterator<reverse_iterator> const_reverse_iterator;
+
+ typedef T_CppElement element_type;
+
+ typedef size_t difference_type;
+ typedef size_t size_type;
+
+ //These are implemented differently for each Helper List.
+ virtual iterator erase(iterator) = 0;
+
+ virtual void erase(iterator start, iterator stop)
+ {
+ while(start != stop)
+ start = erase(start); //Implemented in derived class.
+ }
+
+ virtual void remove(const_reference) = 0;
+
+ size_type size() const
+ {
+ return g_list_length(glist());
+ }
+
+ inline size_type max_size() { return size_type(-1); }
+ inline bool empty() { return glist() == 0; }
+
+ inline iterator begin()
+ {return begin_();}
+ inline iterator end()
+ {return end_();}
+
+ inline const_iterator begin() const
+ { return const_iterator(begin_()); }
+ inline const_iterator end() const
+ { return const_iterator(end_()); }
+
+ inline reverse_iterator rbegin()
+ { return reverse_iterator(end_()); }
+ inline reverse_iterator rend()
+ { return reverse_iterator(begin_()); }
+
+ inline const_reverse_iterator rbegin() const
+ { return const_reverse_iterator(reverse_iterator(end_())); }
+ inline const_reverse_iterator rend() const
+ { return const_reverse_iterator(reverse_iterator(begin_())); }
+
+ reference front() const
+ {
+ return *begin();
+ }
+
+ reference back() const
+ {
+ return *(--end());
+ }
+
+ reference operator[](size_type l) const
+ {
+ size_type j = 0;
+ iterator i;
+ for(i = begin(), j = 0; i != end(), j < l; ++i, ++j);
+ return (*i);
+ }
+
+// iterator find(const_reference w)
+// {
+// iterator i = begin();
+// for(i = begin(); i != end() && (*i != w); i++);
+// return i;
+// }
+//
+// iterator find(Widget& w)
+// {
+// iterator i;
+// for (i = begin(); i != end() && ((*i)->$1() != &w); i++);
+// return i;
+// }
+
+ //Derived classes might choose to reimplement these as public:
+ inline void pop_front()
+ { erase(begin()); }
+ inline void pop_back()
+ { erase(--end()); }
+
+ void clear()
+ { erase(begin(), end()); }
+
+ GObject* gparent()
+ { return gparent_; };
+ const GObject* gparent() const
+ { return gparent_; };
+
+protected:
+ virtual GList*& glist() const = 0; // front of list
+
+ iterator begin_() const
+ {
+ return iterator(glist(), glist());
+ }
+
+ iterator end_() const
+ {
+ return iterator(glist(), (GList*)0);
+ }
+
+ GObject* gparent_;
+};
+
+
+} /* namespace Glib */
+
+#endif /* _GLIBMM_HELPERLIST_H */
+
diff --git a/libs/glibmm2/glibmm/i18n.h b/libs/glibmm2/glibmm/i18n.h
new file mode 100644
index 0000000000..2758bb57c3
--- /dev/null
+++ b/libs/glibmm2/glibmm/i18n.h
@@ -0,0 +1,30 @@
+// -*- c++ -*-
+#ifndef _GLIBMM_I18N_H
+#define _GLIBMM_I18N_H
+
+/* $Id$ */
+
+/* Copyright 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+// Include this file to define internationalization macros such as _().
+// This file must be included by the application, after system headers such as <iostream>.
+
+#include <glib/gi18n.h>
+
+#endif /* _GLIBMM_I18N_H */
+
diff --git a/libs/glibmm2/glibmm/init.cc b/libs/glibmm2/glibmm/init.cc
new file mode 100644
index 0000000000..c2748c8805
--- /dev/null
+++ b/libs/glibmm2/glibmm/init.cc
@@ -0,0 +1,34 @@
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright (C) 2003 The glibmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/wrap.h>
+#include <glibmm/error.h>
+
+namespace Glib
+{
+
+void init()
+{
+ Glib::wrap_register_init();
+ Glib::Error::register_init(); //also calls Glib::wrap_init();
+}
+
+} // namespace Glib
+
diff --git a/libs/glibmm2/glibmm/init.h b/libs/glibmm2/glibmm/init.h
new file mode 100644
index 0000000000..c913d3793a
--- /dev/null
+++ b/libs/glibmm2/glibmm/init.h
@@ -0,0 +1,39 @@
+// -*- c++ -*-
+#ifndef _GLIBMM_INIT_H
+#define _GLIBMM_INIT_H
+
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+namespace Glib
+{
+
+/** Initialize glibmm.
+ * You may call this more than once.
+ * You do nott need to call this if you are using Glib::MainLoop or Gtk::Main,
+ * because they call it for you.
+ */
+void init();
+
+} // namespace Glib
+
+
+
+#endif /* _GLIBMM_INIT_H */
+
diff --git a/libs/glibmm2/glibmm/interface.cc b/libs/glibmm2/glibmm/interface.cc
new file mode 100644
index 0000000000..d3ade45282
--- /dev/null
+++ b/libs/glibmm2/glibmm/interface.cc
@@ -0,0 +1,95 @@
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/interface.h>
+#include <glibmm/private/interface_p.h>
+
+
+namespace Glib
+{
+
+/**** Glib::Interface_Class ************************************************/
+
+void Interface_Class::add_interface(GType instance_type) const
+{
+ //This check is distabled, because it checks whether any of the types's bases implement the interface, not just the specific type.
+ //if( !g_type_is_a(instance_type, gtype_) ) //For convenience, don't complain about calling this twice.
+ //{
+ const GInterfaceInfo interface_info =
+ {
+ class_init_func_,
+ 0, // interface_finalize
+ 0, // interface_data
+ };
+
+ g_type_add_interface_static(instance_type, gtype_, &interface_info);
+ //}
+}
+
+
+/**** Interface Glib::Interface ********************************************/
+
+Interface::Interface(const Interface_Class& interface_class)
+{
+ //gobject_ will be set in the Object constructor.
+ //Any instantiable class that derives from Interface should also inherit from Object.
+
+ // If I understand it correctly, gobject_ shouldn't be 0 now. daniel.
+ // TODO: Make this a g_assert() if the assumption above is correct.
+
+ g_return_if_fail(gobject_ != 0);
+
+ if(custom_type_name_ && !is_anonymous_custom_())
+ {
+ void *const instance_class = G_OBJECT_GET_CLASS(gobject_);
+
+ if(!g_type_interface_peek(instance_class, interface_class.get_type()))
+ {
+ interface_class.add_interface(G_OBJECT_CLASS_TYPE(instance_class));
+ }
+ }
+}
+
+Interface::Interface(GObject* castitem)
+{
+ // Connect GObject and wrapper instances.
+ ObjectBase::initialize(castitem);
+}
+
+Interface::~Interface()
+{}
+
+GType Interface::get_type()
+{
+ return G_TYPE_INTERFACE;
+}
+
+GType Interface::get_base_type()
+{
+ return G_TYPE_INTERFACE;
+}
+
+RefPtr<ObjectBase> wrap_interface(GObject* object, bool take_copy)
+{
+ return Glib::RefPtr<ObjectBase>( wrap_auto(object, take_copy) );
+}
+
+} // namespace Glib
+
diff --git a/libs/glibmm2/glibmm/interface.h b/libs/glibmm2/glibmm/interface.h
new file mode 100644
index 0000000000..ce9bf509c8
--- /dev/null
+++ b/libs/glibmm2/glibmm/interface.h
@@ -0,0 +1,72 @@
+// -*- c++ -*-
+#ifndef _GLIBMM_INTERFACE_H
+#define _GLIBMM_INTERFACE_H
+
+/* $Id$ */
+
+/* Copyright 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/object.h>
+
+
+namespace Glib
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+class Interface_Class;
+#endif
+
+// There is no base GInterface struct in Glib, though there is G_TYPE_INTERFACE enum value.
+class Interface : virtual public Glib::ObjectBase
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Interface CppObjectType;
+ typedef Interface_Class CppClassType;
+ typedef GTypeInterface BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ explicit Interface(const Glib::Interface_Class& interface_class);
+ explicit Interface(GObject* castitem);
+ virtual ~Interface();
+
+ //void add_interface(GType gtype_implementer);
+
+ // Hook for translating API
+ //static Glib::Interface* wrap_new(GTypeInterface*);
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ inline GObject* gobj() { return gobject_; }
+ inline const GObject* gobj() const { return gobject_; }
+
+private:
+ // noncopyable
+ Interface(const Interface&);
+ Interface& operator=(const Interface&);
+};
+
+RefPtr<ObjectBase> wrap_interface(GObject* object, bool take_copy = false);
+
+} // namespace Glib
+
+#endif /* _GLIBMM_INTERFACE_H */
+
diff --git a/libs/glibmm2/glibmm/iochannel.cc b/libs/glibmm2/glibmm/iochannel.cc
new file mode 100644
index 0000000000..18e434da7a
--- /dev/null
+++ b/libs/glibmm2/glibmm/iochannel.cc
@@ -0,0 +1,687 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <glibmm/iochannel.h>
+#include <glibmm/private/iochannel_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/exceptionhandler.h>
+#include <glibmm/iochannel.h>
+#include <glibmm/utility.h>
+#include <glibmm/main.h>
+#include <glib.h>
+
+
+namespace
+{
+
+// Glib::IOChannel reference counting issues:
+//
+// Normally, you'd expect that the C++ object stays around as long as the
+// C instance does. Also Glib::wrap() usually returns always the same C++
+// wrapper object for a single C instance.
+//
+// Unfortunately it isn't possible to implement these features if we didn't
+// create the underlying GIOChannel. That is, when wrapping existing
+// GIOChannel instances such as returned by e.g. g_io_channel_unix_new() or
+// g_io_channel_new_file(). Neither is there a way to hook up a wrapper
+// object in an existing GIOChannel, nor exists any destroy notification.
+//
+// So that means: If the IOChannel is implemented in C++ -- that is, our
+// GlibmmIOChannel backend is used -- we use the GIOChannel reference
+// counting mechanism. If the IOChannel backend is unknown, then the
+// wrapper instance holds always exactly one reference to the GIOChannel.
+// The wrapper object itself is then managed via our own refcounting
+// mechanism. To do that a utility class ForeignIOChannel is introduced to
+// override reference() and unreference().
+
+class ForeignIOChannel : public Glib::IOChannel
+{
+public:
+ ForeignIOChannel(GIOChannel* gobject, bool take_copy)
+ : Glib::IOChannel(gobject, take_copy), ref_count_(0) {}
+
+ virtual void reference() const;
+ virtual void unreference() const;
+
+private:
+ mutable int ref_count_;
+};
+
+void ForeignIOChannel::reference() const
+{
+ ++ref_count_;
+}
+
+void ForeignIOChannel::unreference() const
+{
+ if (!(--ref_count_)) delete this;
+}
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+class GlibmmIOChannel
+{
+public:
+ GIOChannel base;
+ Glib::IOChannel* wrapper;
+
+ static const GIOFuncs vfunc_table;
+
+ static GIOStatus io_read(GIOChannel* channel, char* buf, gsize count,
+ gsize* bytes_read, GError** err);
+
+ static GIOStatus io_write(GIOChannel* channel, const char* buf, gsize count,
+ gsize* bytes_written, GError** err);
+
+ static GIOStatus io_seek (GIOChannel* channel, gint64 offset, GSeekType type, GError** err);
+ static GIOStatus io_close(GIOChannel* channel, GError** err);
+
+ static GSource* io_create_watch(GIOChannel* channel, GIOCondition condition);
+ static void io_free(GIOChannel* channel);
+
+ static GIOStatus io_set_flags(GIOChannel* channel, GIOFlags flags, GError** err);
+ static GIOFlags io_get_flags(GIOChannel* channel);
+};
+
+// static
+const GIOFuncs GlibmmIOChannel::vfunc_table =
+{
+ &GlibmmIOChannel::io_read,
+ &GlibmmIOChannel::io_write,
+ &GlibmmIOChannel::io_seek,
+ &GlibmmIOChannel::io_close,
+ &GlibmmIOChannel::io_create_watch,
+ &GlibmmIOChannel::io_free,
+ &GlibmmIOChannel::io_set_flags,
+ &GlibmmIOChannel::io_get_flags,
+};
+
+
+/**** GLib::IOChannel ******************************************************/
+
+/* Construct a custom C++-implemented IOChannel. GlibmmIOChannel is an
+ * extended GIOChannel struct which allows us to hook up a pointer to this
+ * persistent wrapper instance.
+ */
+IOChannel::IOChannel()
+:
+ gobject_ (static_cast<GIOChannel*>(g_malloc(sizeof(GlibmmIOChannel))))
+{
+ g_io_channel_init(gobject_);
+ gobject_->funcs = const_cast<GIOFuncs*>(&GlibmmIOChannel::vfunc_table);
+
+ reinterpret_cast<GlibmmIOChannel*>(gobject_)->wrapper = this;
+}
+
+/* Construct an IOChannel wrapper for an already created GIOChannel.
+ * See the comment at the top of this file for an explanation of the
+ * problems with this approach.
+ */
+IOChannel::IOChannel(GIOChannel* gobject, bool take_copy)
+:
+ gobject_ (gobject)
+{
+ // This ctor should never be called for GlibmmIOChannel instances.
+ g_assert(gobject != 0);
+ g_assert(gobject->funcs != &GlibmmIOChannel::vfunc_table);
+
+ if(take_copy)
+ g_io_channel_ref(gobject_);
+}
+
+IOChannel::~IOChannel()
+{
+ if(gobject_)
+ {
+ // Check whether this IOChannel is implemented in C++, i.e. whether it
+ // uses our GlibmmIOChannel forwarding backend. Normally, this will never
+ // be true because the wrapper should only be deleted in the io_free()
+ // callback, which clears gobject_ before deleting. But in case the ctor
+ // of a derived class threw an exception the GIOChannel must be destroyed
+ // prematurely.
+ //
+ if(gobject_->funcs == &GlibmmIOChannel::vfunc_table)
+ {
+ // Disconnect the wrapper object so that it won't be deleted twice.
+ reinterpret_cast<GlibmmIOChannel*>(gobject_)->wrapper = 0;
+ }
+
+ GIOChannel *const tmp_gobject = gobject_;
+ gobject_ = 0;
+
+ g_io_channel_unref(tmp_gobject);
+ }
+}
+
+Glib::RefPtr<IOChannel> IOChannel::create_from_file(const std::string& filename, const std::string& mode)
+{
+ GError* error = 0;
+ GIOChannel *const channel = g_io_channel_new_file(filename.c_str(), mode.c_str(), &error);
+
+ if(error)
+ Glib::Error::throw_exception(error);
+
+ return Glib::wrap(channel, false);
+}
+
+Glib::RefPtr<IOChannel> IOChannel::create_from_fd(int fd)
+{
+ return Glib::wrap(g_io_channel_unix_new(fd), false);
+}
+
+#ifdef G_OS_WIN32
+
+Glib::RefPtr<IOChannel> IOChannel::create_from_win32_fd(int fd)
+{
+ return Glib::wrap(g_io_channel_win32_new_fd(fd), false);
+}
+
+Glib::RefPtr<IOChannel> IOChannel::create_from_win32_socket(int socket)
+{
+ return Glib::wrap(g_io_channel_win32_new_socket(socket), false);
+}
+
+#endif /* G_OS_WIN32 */
+
+IOStatus IOChannel::write(const Glib::ustring& str)
+{
+ gsize bytes_written = 0;
+ return write(str.data(), str.bytes(), bytes_written);
+}
+
+IOStatus IOChannel::read_line(Glib::ustring& line)
+{
+ Glib::ScopedPtr<char> buf;
+ GError* error = 0;
+ gsize bytes = 0;
+
+ const GIOStatus status = g_io_channel_read_line(gobj(), buf.addr(), &bytes, 0, &error);
+
+ if(error)
+ Glib::Error::throw_exception(error);
+
+ if(buf.get())
+ line.assign(buf.get(), buf.get() + bytes);
+ else
+ line.erase();
+
+ return (IOStatus) status;
+}
+
+IOStatus IOChannel::read_to_end(Glib::ustring& str)
+{
+ Glib::ScopedPtr<char> buf;
+ GError* error = 0;
+ gsize bytes = 0;
+
+ const GIOStatus status = g_io_channel_read_to_end(gobj(), buf.addr(), &bytes, &error);
+
+ if(error)
+ Glib::Error::throw_exception(error);
+
+ if(buf.get())
+ str.assign(buf.get(), buf.get() + bytes);
+ else
+ str.erase();
+
+ return (IOStatus) status;
+}
+
+IOStatus IOChannel::read(Glib::ustring& str, gsize count)
+{
+ Glib::ScopedPtr<char> buf (g_new(char, count));
+ GError* error = 0;
+ gsize bytes = 0;
+
+ const GIOStatus status = g_io_channel_read_chars(gobj(), buf.get(), count, &bytes, &error);
+
+ if(error)
+ Glib::Error::throw_exception(error);
+
+ if(buf.get())
+ str.assign(buf.get(), buf.get() + bytes);
+ else
+ str.erase();
+
+ return (IOStatus) status;
+}
+
+IOStatus IOChannel::set_encoding(const std::string& encoding)
+{
+ GError* error = 0;
+
+ const GIOStatus status = g_io_channel_set_encoding(
+ gobj(), (encoding.empty()) ? 0 : encoding.c_str(), &error);
+
+ if(error)
+ Glib::Error::throw_exception(error);
+
+ return (IOStatus) status;
+}
+
+std::string IOChannel::get_encoding() const
+{
+ const char *const encoding = g_io_channel_get_encoding(gobject_);
+ return (encoding) ? std::string(encoding) : std::string();
+}
+
+void IOChannel::set_line_term(const std::string& term)
+{
+ if(term.empty())
+ g_io_channel_set_line_term(gobj(), 0, 0);
+ else
+ g_io_channel_set_line_term(gobj(), term.data(), term.size());
+}
+
+std::string IOChannel::get_line_term() const
+{
+ int len = 0;
+ const char *const term = g_io_channel_get_line_term(gobject_, &len);
+
+ return (term) ? std::string(term, len) : std::string();
+}
+
+Glib::RefPtr<IOSource> IOChannel::create_watch(IOCondition condition)
+{
+ // The corresponding unreference() takes place in the dtor
+ // of the Glib::RefPtr<IOChannel> object below.
+ reference();
+ return IOSource::create(Glib::RefPtr<IOChannel>(this), condition);
+}
+
+IOStatus IOChannel::read_vfunc(char*, gsize, gsize&)
+{
+ g_assert_not_reached();
+ return IO_STATUS_ERROR;
+}
+
+IOStatus IOChannel::write_vfunc(const char*, gsize, gsize&)
+{
+ g_assert_not_reached();
+ return IO_STATUS_ERROR;
+}
+
+IOStatus IOChannel::seek_vfunc(gint64, SeekType)
+{
+ g_assert_not_reached();
+ return IO_STATUS_ERROR;
+}
+
+IOStatus IOChannel::close_vfunc()
+{
+ g_assert_not_reached();
+ return IO_STATUS_ERROR;
+}
+
+Glib::RefPtr<Glib::Source> IOChannel::create_watch_vfunc(IOCondition)
+{
+ g_assert_not_reached();
+ return Glib::RefPtr<Glib::Source>();
+}
+
+IOStatus IOChannel::set_flags_vfunc(IOFlags)
+{
+ g_assert_not_reached();
+ return IO_STATUS_ERROR;
+}
+
+IOFlags IOChannel::get_flags_vfunc()
+{
+ g_assert_not_reached();
+ return IOFlags(0);
+}
+
+void IOChannel::reference() const
+{
+ g_io_channel_ref(gobject_);
+}
+
+void IOChannel::unreference() const
+{
+ g_io_channel_unref(gobject_);
+}
+
+Glib::RefPtr<IOChannel> wrap(GIOChannel* gobject, bool take_copy)
+{
+ IOChannel* cpp_object = 0;
+
+ if(gobject)
+ {
+ if(gobject->funcs == &GlibmmIOChannel::vfunc_table)
+ {
+ cpp_object = reinterpret_cast<GlibmmIOChannel*>(gobject)->wrapper;
+
+ if(take_copy && cpp_object)
+ cpp_object->reference();
+ }
+ else
+ {
+ cpp_object = new ForeignIOChannel(gobject, take_copy);
+ cpp_object->reference(); // the refcount is initially 0
+ }
+ }
+
+ return Glib::RefPtr<IOChannel>(cpp_object);
+}
+
+
+/**** Glib::GlibmmIOChannel ************************************************/
+
+// static
+GIOStatus GlibmmIOChannel::io_read(GIOChannel* channel, char* buf, gsize count,
+ gsize* bytes_read, GError** err)
+{
+ IOChannel *const wrapper = reinterpret_cast<GlibmmIOChannel*>(channel)->wrapper;
+
+ try
+ {
+ return (GIOStatus) wrapper->read_vfunc(buf, count, *bytes_read);
+ }
+ catch(Glib::Error& error)
+ {
+ error.propagate(err);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+
+ return G_IO_STATUS_ERROR;
+}
+
+// static
+GIOStatus GlibmmIOChannel::io_write(GIOChannel* channel, const char* buf, gsize count,
+ gsize* bytes_written, GError** err)
+{
+ IOChannel *const wrapper = reinterpret_cast<GlibmmIOChannel*>(channel)->wrapper;
+
+ try
+ {
+ return (GIOStatus) wrapper->write_vfunc(buf, count, *bytes_written);
+ }
+ catch(Glib::Error& error)
+ {
+ error.propagate(err);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+
+ return G_IO_STATUS_ERROR;
+}
+
+// static
+GIOStatus GlibmmIOChannel::io_seek(GIOChannel* channel, gint64 offset, GSeekType type, GError** err)
+{
+ IOChannel *const wrapper = reinterpret_cast<GlibmmIOChannel*>(channel)->wrapper;
+
+ try
+ {
+ return (GIOStatus) wrapper->seek_vfunc(offset, (SeekType) type);
+ }
+ catch(Glib::Error& error)
+ {
+ error.propagate(err);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+
+ return G_IO_STATUS_ERROR;
+}
+
+// static
+GIOStatus GlibmmIOChannel::io_close(GIOChannel* channel, GError** err)
+{
+ IOChannel *const wrapper = reinterpret_cast<GlibmmIOChannel*>(channel)->wrapper;
+
+ try
+ {
+ return (GIOStatus) wrapper->close_vfunc();
+ }
+ catch(Glib::Error& error)
+ {
+ error.propagate(err);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+
+ return G_IO_STATUS_ERROR;
+}
+
+// static
+GSource* GlibmmIOChannel::io_create_watch(GIOChannel* channel, GIOCondition condition)
+{
+ IOChannel *const wrapper = reinterpret_cast<GlibmmIOChannel*>(channel)->wrapper;
+
+ try
+ {
+ const Glib::RefPtr<Source> source = wrapper->create_watch_vfunc((IOCondition) condition);
+ return (source) ? source->gobj_copy() : 0;
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+
+ return 0;
+}
+
+// static
+void GlibmmIOChannel::io_free(GIOChannel* channel)
+{
+ if(IOChannel *const wrapper = reinterpret_cast<GlibmmIOChannel*>(channel)->wrapper)
+ {
+ wrapper->gobject_ = 0;
+ delete wrapper;
+ }
+
+ g_free(channel);
+}
+
+// static
+GIOStatus GlibmmIOChannel::io_set_flags(GIOChannel* channel, GIOFlags flags, GError** err)
+{
+ IOChannel *const wrapper = reinterpret_cast<GlibmmIOChannel*>(channel)->wrapper;
+
+ try
+ {
+ return (GIOStatus) wrapper->set_flags_vfunc((IOFlags) flags);
+ }
+ catch(Glib::Error& error)
+ {
+ error.propagate(err);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+
+ return G_IO_STATUS_ERROR;
+}
+
+// static
+GIOFlags GlibmmIOChannel::io_get_flags(GIOChannel* channel)
+{
+ IOChannel *const wrapper = reinterpret_cast<GlibmmIOChannel*>(channel)->wrapper;
+
+ try
+ {
+ return (GIOFlags) wrapper->get_flags_vfunc();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+
+ return GIOFlags(0);
+}
+
+} // namespace Glib
+
+
+namespace
+{
+} // anonymous namespace
+
+
+Glib::IOChannelError::IOChannelError(Glib::IOChannelError::Code error_code, const Glib::ustring& error_message)
+:
+ Glib::Error (G_IO_CHANNEL_ERROR, error_code, error_message)
+{}
+
+Glib::IOChannelError::IOChannelError(GError* gobject)
+:
+ Glib::Error (gobject)
+{}
+
+Glib::IOChannelError::Code Glib::IOChannelError::code() const
+{
+ return static_cast<Code>(Glib::Error::code());
+}
+
+void Glib::IOChannelError::throw_func(GError* gobject)
+{
+ throw Glib::IOChannelError(gobject);
+}
+
+
+namespace Glib
+{
+
+
+IOStatus IOChannel::read(gunichar& unichar)
+{
+ GError *error = 0;
+ IOStatus retvalue = ((IOStatus)(g_io_channel_read_unichar(gobj(), &(unichar), &(error))));
+ if(error) ::Glib::Error::throw_exception(error);
+ return retvalue;
+}
+
+IOStatus IOChannel::read(char* buf, gsize count, gsize& bytes_read)
+{
+ GError *error = 0;
+ IOStatus retvalue = ((IOStatus)(g_io_channel_read_chars(gobj(), buf, count, &(bytes_read), &(error))));
+ if(error) ::Glib::Error::throw_exception(error);
+ return retvalue;
+}
+
+IOStatus IOChannel::write(const char* buf, gssize count, gsize& bytes_written)
+{
+ GError *error = 0;
+ IOStatus retvalue = ((IOStatus)(g_io_channel_write_chars(gobj(), buf, count, &(bytes_written), &(error))));
+ if(error) ::Glib::Error::throw_exception(error);
+ return retvalue;
+}
+
+IOStatus IOChannel::write(gunichar unichar)
+{
+ GError *error = 0;
+ IOStatus retvalue = ((IOStatus)(g_io_channel_write_unichar(gobj(), unichar, &(error))));
+ if(error) ::Glib::Error::throw_exception(error);
+ return retvalue;
+}
+
+IOStatus IOChannel::seek(gint64 offset, SeekType type)
+{
+ GError *error = 0;
+ IOStatus retvalue = ((IOStatus)(g_io_channel_seek_position(gobj(), offset, ((GSeekType)(type)), &(error))));
+ if(error) ::Glib::Error::throw_exception(error);
+ return retvalue;
+}
+
+IOStatus IOChannel::flush()
+{
+ GError *error = 0;
+ IOStatus retvalue = ((IOStatus)(g_io_channel_flush(gobj(), &(error))));
+ if(error) ::Glib::Error::throw_exception(error);
+ return retvalue;
+}
+
+IOStatus IOChannel::close(bool flush)
+{
+ GError *error = 0;
+ IOStatus retvalue = ((IOStatus)(g_io_channel_shutdown(gobj(), static_cast<int>(flush), &(error))));
+ if(error) ::Glib::Error::throw_exception(error);
+ return retvalue;
+}
+
+gsize IOChannel::get_buffer_size() const
+{
+ return g_io_channel_get_buffer_size(const_cast<GIOChannel*>(gobj()));
+}
+
+void IOChannel::set_buffer_size(gsize size)
+{
+ g_io_channel_set_buffer_size(gobj(), size);
+}
+
+IOFlags IOChannel::get_flags() const
+{
+ return ((IOFlags)(g_io_channel_get_flags(const_cast<GIOChannel*>(gobj()))));
+}
+
+IOStatus IOChannel::set_flags(IOFlags flags)
+{
+ GError *error = 0;
+ IOStatus retvalue = ((IOStatus)(g_io_channel_set_flags(gobj(), ((GIOFlags)(flags)), &(error))));
+ if(error) ::Glib::Error::throw_exception(error);
+ return retvalue;
+}
+
+void IOChannel::set_buffered(bool buffered)
+{
+ g_io_channel_set_buffered(gobj(), static_cast<int>(buffered));
+}
+
+bool IOChannel::get_buffered() const
+{
+ return g_io_channel_get_buffered(const_cast<GIOChannel*>(gobj()));
+}
+
+IOCondition IOChannel::get_buffer_condition() const
+{
+ return ((IOCondition)(g_io_channel_get_buffer_condition(const_cast<GIOChannel*>(gobj()))));
+}
+
+bool IOChannel::get_close_on_unref() const
+{
+ return g_io_channel_get_close_on_unref(const_cast<GIOChannel*>(gobj()));
+}
+
+void IOChannel::set_close_on_unref(bool do_close)
+{
+ g_io_channel_set_close_on_unref(gobj(), static_cast<int>(do_close));
+}
+
+
+} // namespace Glib
+
+
diff --git a/libs/glibmm2/glibmm/iochannel.h b/libs/glibmm2/glibmm/iochannel.h
new file mode 100644
index 0000000000..3d8f93b3a7
--- /dev/null
+++ b/libs/glibmm2/glibmm/iochannel.h
@@ -0,0 +1,695 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GLIBMM_IOCHANNEL_H
+#define _GLIBMM_IOCHANNEL_H
+
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#include <glibmm/error.h>
+#include <glibmm/main.h>
+#include <glibmm/refptr.h>
+#include <glibmm/ustring.h>
+#include <glib/gtypes.h>
+
+#include <string>
+#include <glibmmconfig.h>
+
+GLIBMM_USING_STD(string)
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C" { typedef struct _GIOChannel GIOChannel; }
+#endif
+
+
+namespace Glib
+{
+
+class Source;
+class IOSource;
+
+/** @addtogroup glibmmEnums Enums and Flags */
+
+/**
+ * @ingroup glibmmEnums
+ */
+enum SeekType
+{
+ SEEK_TYPE_CUR,
+ SEEK_TYPE_SET,
+ SEEK_TYPE_END
+};
+
+
+/**
+ * @ingroup glibmmEnums
+ */
+enum IOStatus
+{
+ IO_STATUS_ERROR,
+ IO_STATUS_NORMAL,
+ IO_STATUS_EOF,
+ IO_STATUS_AGAIN
+};
+
+
+/**
+ * @ingroup glibmmEnums
+ * @par Bitwise operators:
+ * <tt>%IOFlags operator|(IOFlags, IOFlags)</tt><br>
+ * <tt>%IOFlags operator&(IOFlags, IOFlags)</tt><br>
+ * <tt>%IOFlags operator^(IOFlags, IOFlags)</tt><br>
+ * <tt>%IOFlags operator~(IOFlags)</tt><br>
+ * <tt>%IOFlags& operator|=(IOFlags&, IOFlags)</tt><br>
+ * <tt>%IOFlags& operator&=(IOFlags&, IOFlags)</tt><br>
+ * <tt>%IOFlags& operator^=(IOFlags&, IOFlags)</tt><br>
+ */
+enum IOFlags
+{
+ IO_FLAG_APPEND = 1 << 0,
+ IO_FLAG_NONBLOCK = 1 << 1,
+ IO_FLAG_IS_READABLE = 1 << 2,
+ IO_FLAG_IS_WRITEABLE = 1 << 3,
+ IO_FLAG_IS_SEEKABLE = 1 << 4,
+ IO_FLAG_GET_MASK = 0x0,
+ IO_FLAG_SET_MASK = 0x1
+};
+
+/** @ingroup glibmmEnums */
+inline IOFlags operator|(IOFlags lhs, IOFlags rhs)
+ { return static_cast<IOFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
+
+/** @ingroup glibmmEnums */
+inline IOFlags operator&(IOFlags lhs, IOFlags rhs)
+ { return static_cast<IOFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
+
+/** @ingroup glibmmEnums */
+inline IOFlags operator^(IOFlags lhs, IOFlags rhs)
+ { return static_cast<IOFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
+
+/** @ingroup glibmmEnums */
+inline IOFlags operator~(IOFlags flags)
+ { return static_cast<IOFlags>(~static_cast<unsigned>(flags)); }
+
+/** @ingroup glibmmEnums */
+inline IOFlags& operator|=(IOFlags& lhs, IOFlags rhs)
+ { return (lhs = static_cast<IOFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
+
+/** @ingroup glibmmEnums */
+inline IOFlags& operator&=(IOFlags& lhs, IOFlags rhs)
+ { return (lhs = static_cast<IOFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
+
+/** @ingroup glibmmEnums */
+inline IOFlags& operator^=(IOFlags& lhs, IOFlags rhs)
+ { return (lhs = static_cast<IOFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
+
+
+/** Exception class for IOChannel errors.
+ */
+class IOChannelError : public Glib::Error
+{
+public:
+ enum Code
+ {
+ FILE_TOO_BIG,
+ INVALID_ARGUMENT,
+ IO_ERROR,
+ IS_DIRECTORY,
+ NO_SPACE_LEFT,
+ NO_SUCH_DEVICE,
+ OVERFLOWN,
+ BROKEN_PIPE,
+ FAILED
+ };
+
+ IOChannelError(Code error_code, const Glib::ustring& error_message);
+ explicit IOChannelError(GError* gobject);
+ Code code() const;
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+private:
+ static void throw_func(GError* gobject);
+ friend void wrap_init(); // uses throw_func()
+#endif
+};
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+class GlibmmIOChannel;
+#endif
+
+/** IOChannel aims to provide portable I/O support for files, pipes
+ * and sockets, and to integrate them with the GLib main event loop.
+ *
+ * Note that IOChannels implement an automatic implicit character set
+ * conversion to the data stream, and usually will not pass by default
+ * binary data unchanged. To set the encoding of the channel, use e.g.
+ * set_encoding("ISO-8859-15"). To set the channel to no encoding, use
+ * set_encoding() without any arguments.
+ *
+ * You can create an IOChannel with one of the static create methods, or
+ * implement one yourself, in which case you have to 1)&nbsp;override all
+ * _vfunc() members. 2)&nbsp;set the GIOChannel flags in your constructor.
+ *
+ * @note This feature of being able to implement a custom Glib::IOChannel is
+ * deprecated in glibmm&nbsp;2.2. The vfunc interface has not yet stabilized
+ * enough to allow that -- the C++ wrapper went in by pure accident. Besides,
+ * it isn't terribly useful either. Thus please refrain from overriding any
+ * IOChannel vfuncs.
+ */
+class IOChannel : public sigc::trackable
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef IOChannel CppObjectType;
+ typedef GIOChannel BaseObjectType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+private:
+
+
+public:
+ virtual ~IOChannel();
+
+ /** Open a file @a filename as an I/O channel using mode @a mode.
+ * This channel will be closed when the last reference to it is dropped,
+ * so there is no need to call close() (though doing so will not cause
+ * problems, as long as no attempt is made to access the channel after
+ * it is closed).
+ * @param filename The name of the file to open.
+ * @param mode One of <tt>"r"</tt>, <tt>"w"</tt>, <tt>"a"</tt>,
+ * <tt>"r+"</tt>, <tt>"w+"</tt>, <tt>"a+"</tt>. These have the
+ * same meaning as in <tt>fopen()</tt>.
+ * @return An IOChannel for the opened file.
+ * @throw Glib::FileError
+ */
+ static Glib::RefPtr<IOChannel> create_from_file(const std::string& filename, const std::string& mode);
+
+
+ /** Creates an I/O channel from a file descriptor.
+ * On Unix, IOChannels created with this function work for any file
+ * descriptor or socket.
+ *
+ * On Win32, this can be used either for files opened with the MSVCRT (the
+ * Microsoft run-time C library) <tt>_open()</tt> or <tt>_pipe()</tt>,
+ * including file descriptors 0, 1 and 2 (corresponding to <tt>stdin</tt>,
+ * <tt>stdout</tt> and <tt>stderr</tt>), or for Winsock <tt>SOCKET</tt>s. If
+ * the parameter is a legal file descriptor, it is assumed to be such,
+ * otherwise it should be a <tt>SOCKET</tt>. This relies on <tt>SOCKET</tt>s
+ * and file descriptors not overlapping. If you want to be certain, call
+ * either create_from_win32_fd() or create_from_win32_socket() instead as
+ * appropriate.
+ *
+ * The term file descriptor as used in the context of Win32 refers to the
+ * emulated Unix-like file descriptors MSVCRT provides. The native
+ * corresponding concept is file <tt>HANDLE</tt>. There isn't as of yet
+ * a way to get IOChannels for Win32 file <tt>HANDLE</tt>s.
+ */
+ static Glib::RefPtr<IOChannel> create_from_fd(int fd);
+
+
+/* defined(DOXYGEN_SHOULD_SKIP_THIS) actually does the opposite of what it looks like... */
+#if defined(G_OS_WIN32) || defined(DOXYGEN_SHOULD_SKIP_THIS)
+
+ /** Create an I/O channel for C runtime (emulated Unix-like) file descriptors.
+ * After calling add_watch() on a I/O channel returned by this function, you
+ * shouldn't call read() on the file descriptor. This is because adding
+ * polling for a file descriptor is implemented on Win32 by starting a thread
+ * that sits blocked in a <tt>%read()</tt> from the file descriptor most of
+ * the time. All reads from the file descriptor should be done by this
+ * internal GLib thread. Your code should call only IOChannel::read().
+ */
+ static Glib::RefPtr<IOChannel> create_from_win32_fd(int fd);
+
+
+ /** Create an I/O channel for a winsock socket. The parameter should be a
+ * <tt>SOCKET</tt>. Contrary to I/O channels for file descriptors (on Win32),
+ * you can use normal <tt>recv()</tt> or <tt>recvfrom()</tt> on sockets even
+ * if GLib is polling them.
+ */
+ static Glib::RefPtr<IOChannel> create_from_win32_socket(int socket);
+
+
+#endif /* defined(G_OS_WIN32) || defined(DOXYGEN_SHOULD_SKIP_THIS) */
+
+ /** Read a single UCS-4 character.
+ * @retval unichar The Unicode character.
+ * @return The status of the operation.
+ * @throw Glib::IOChannelError
+ * @throw Glib::ConvertError
+ */
+
+ /** This function cannot be called on a channel with <tt>0</tt> encoding.
+ * @param thechar A location to return a character.
+ * @param error A location to return an error of type G::ConvertError
+ * or G::IOChannelError.
+ * @return A G::IOStatus.
+ */
+ IOStatus read(gunichar& unichar);
+
+ /** Read a character sequence into memory.
+ * @param buf A buffer to read data into.
+ * @param count The size of the buffer in bytes. Note that the buffer may
+ * not be complelely filled even if there is data in the buffer if the
+ * remaining data is not a complete character.
+ * @retval bytes_read The number of bytes read. This may be zero even on
+ * success if @a count < 6 and the channel's encoding is not <tt>""</tt>.
+ * This indicates that the next UTF-8 character is too wide for the buffer.
+ * @return The status of the operation.
+ * @throw Glib::IOChannelError
+ * @throw Glib::ConvertError
+ */
+
+ /** Replacement for g_io_channel_read() with the new API.
+ * @param buf A buffer to read data into.
+ * @param count The size of the buffer. Note that the buffer may
+ * not be complelely filled even if there is data
+ * in the buffer if the remaining data is not a
+ * complete character.
+ * @param bytes_read The number of bytes read. This may be zero even on
+ * success if count &lt; 6 and the channel's encoding is non-<tt>0</tt>.
+ * This indicates that the next UTF-8 character is too wide for
+ * the buffer.
+ * @param error A location to return an error of type G::ConvertError
+ * or G::IOChannelError.
+ * @return The status of the operation.
+ */
+ IOStatus read(char* buf, gsize count, gsize& bytes_read);
+
+ /** Read a maximum of @a count bytes into @a str.
+ * @param count The maximum number of bytes to read.
+ * @retval str The characters that have been read.
+ * @return The status of the operation.
+ * @throw Glib::IOChannelError
+ * @throw Glib::ConvertError
+ */
+ IOStatus read(Glib::ustring& str, gsize count);
+
+ /** Read a whole line.
+ * Reads until the line separator is found, which is included
+ * in the result string.
+ * @retval line The line that was read.
+ * @return The status of the operation.
+ * @throw Glib::IOChannelError
+ * @throw Glib::ConvertError
+ */
+ IOStatus read_line(Glib::ustring& line);
+
+
+ /** Reads all the remaining data from the file.
+ * @retval str The resulting string.
+ * @return Glib::IO_STATUS_NORMAL on success. This function never
+ * returns Glib::IO_STATUS_EOF.
+ * @throw Glib::IOChannelError
+ * @throw Glib::ConvertError
+ */
+ IOStatus read_to_end(Glib::ustring& str);
+
+
+ /** Write a string to the I/O channel.
+ * Note that this method does not return the number of characters written.
+ * If the channel is blocking and the returned value is
+ * Glib::IO_STATUS_NORMAL, the whole string was written.
+ * @param str the string to write.
+ * @return The status of the operation.
+ * @throw Glib::IOChannelError
+ * @throw Glib::ConvertError
+ */
+ IOStatus write(const Glib::ustring& str);
+
+ /** Write a memory area of @a count bytes to the I/O channel.
+ * @param buf The start of the memory area.
+ * @param count The number of bytes to write.
+ * @retval bytes_written The number of bytes written to the channel.
+ * @return The status of the operation.
+ * @throw Glib::IOChannelError
+ * @throw Glib::ConvertError
+ */
+
+ /** Replacement for g_io_channel_write() with the new API.
+ *
+ * On seekable channels with encodings other than <tt>0</tt> or UTF-8, generic
+ * mixing of reading and writing is not allowed. A call to g_io_channel_write_chars()
+ * may only be made on a channel from which data has been read in the
+ * cases described in the documentation for g_io_channel_set_encoding().
+ * @param buf A buffer to write data from.
+ * @param count The size of the buffer. If -1, the buffer
+ * is taken to be a nul-terminated string.
+ * @param bytes_written The number of bytes written. This can be nonzero
+ * even if the return value is not G::IO_STATUS_NORMAL.
+ * If the return value is G::IO_STATUS_NORMAL and the
+ * channel is blocking, this will always be equal
+ * to @a count if @a count &gt;= 0.
+ * @param error A location to return an error of type G::ConvertError
+ * or G::IOChannelError.
+ * @return The status of the operation.
+ */
+ IOStatus write(const char* buf, gssize count, gsize& bytes_written);
+
+ /** Write a single UCS-4 character to the I/O channel.
+ * @param unichar The character to write.
+ * @return The status of the operation.
+ * @throw Glib::IOChannelError
+ * @throw Glib::ConvertError
+ */
+
+ /** This function cannot be called on a channel with <tt>0</tt> encoding.
+ * @param thechar A character.
+ * @param error A location to return an error of type G::ConvertError
+ * or G::IOChannelError.
+ * @return A G::IOStatus.
+ */
+ IOStatus write(gunichar unichar);
+
+ /** Seek the I/O channel to a specific position.
+ * @param offset The offset in bytes from the position specified by @a type.
+ * @param type A SeekType. The type Glib::SEEK_TYPE_CUR is only allowed in
+ * those cases where a call to set_encoding() is allowed. See the
+ * documentation for set_encoding() for details.
+ * @return The status of the operation.
+ * @throw Glib::IOChannelError
+ * @throw Glib::ConvertError
+ */
+
+ /** Replacement for g_io_channel_seek() with the new API.
+ * @param offset The offset in bytes from the position specified by @a type .
+ * @param type A G::SeekType. The type G::SEEK_CUR is only allowed in those
+ * cases where a call to g_io_channel_set_encoding()
+ * is allowed. See the documentation for
+ * g_io_channel_set_encoding() for details.
+ * @param error A location to return an error of type G::IOChannelError.
+ * @return The status of the operation.
+ */
+ IOStatus seek(gint64 offset, SeekType type = SEEK_TYPE_SET);
+
+ /** Flush the buffers of the I/O channel.
+ * @return The status of the operation.
+ * @throw Glib::IOChannelError
+ * @throw Glib::ConvertError
+ */
+
+ /** Flushes the write buffer for the GIOChannel.
+ * @param error Location to store an error of type G::IOChannelError.
+ * @return The status of the operation: One of
+ * G::IO_CHANNEL_NORMAL, G::IO_CHANNEL_AGAIN, or
+ * G::IO_CHANNEL_ERROR.
+ */
+ IOStatus flush();
+
+ /** Close the I/O channel.
+ * Any pending data to be written will be flushed if @a flush is <tt>true</tt>.
+ * The channel will not be freed until the last reference is dropped.
+ * Accessing the channel after closing it is considered an error.
+ * @param flush Whether to flush() pending data before closing the channel.
+ * @return The status of the operation.
+ * @throw Glib::IOChannelError
+ */
+
+ /** Close an IO channel. Any pending data to be written will be
+ * flushed if @a flush is <tt>true</tt>. The channel will not be freed until the
+ * last reference is dropped using g_io_channel_unref().
+ * @param flush If <tt>true</tt>, flush pending.
+ * @param err Location to store a G::IOChannelError.
+ * @return The status of the operation.
+ */
+ IOStatus close(bool flush = true);
+
+ /** Get the IOChannel internal buffer size.
+ * @return The buffer size.
+ */
+
+ /** Gets the buffer size.
+ * @return The size of the buffer.
+ */
+ gsize get_buffer_size() const;
+
+ /** Set the internal IOChannel buffer size.
+ * @param size The buffer size the IOChannel should use.
+ */
+
+ /** Sets the buffer size.
+ * @param size The size of the buffer. 0 == pick a good size.
+ */
+ void set_buffer_size(gsize size);
+
+ /** Get the current flags for a IOChannel, including read-only
+ * flags such as Glib::IO_FLAG_IS_READABLE.
+ *
+ * The values of the flags Glib::IO_FLAG_IS_READABLE and
+ * Glib::IO_FLAG_IS_WRITEABLE are cached for internal use by the channel when
+ * it is created. If they should change at some later point (e.g. partial
+ * shutdown of a socket with the UNIX <tt>shutdown()</tt> function), the user
+ * should immediately call get_flags() to update the internal values of these
+ * flags.
+ * @return Bitwise combination of the flags set on the channel.
+ */
+
+ /** Gets the current flags for a G::IOChannel, including read-only
+ * flags such as G::IO_FLAG_IS_READABLE.
+ *
+ * The values of the flags G::IO_FLAG_IS_READABLE and G::IO_FLAG_IS_WRITEABLE
+ * are cached for internal use by the channel when it is created.
+ * If they should change at some later point (e.g. partial shutdown
+ * of a socket with the UNIX shutdown() function), the user
+ * should immediately call g_io_channel_get_flags() to update
+ * the internal values of these flags.
+ * @return The flags which are set on the channel.
+ */
+ IOFlags get_flags() const;
+
+ /** Set flags on the IOChannel.
+ * @param flags Bitwise combination of the flags to set.
+ * @return The operation result code.
+ * @throw Glib::IOChannelError
+ */
+
+ /** Sets the (writeable) flags in @a channel to ( @a flags & G::IO_CHANNEL_SET_MASK).
+ * @param flags The flags to set on the IO channel.
+ * @param error A location to return an error of type G::IOChannelError.
+ * @return The status of the operation.
+ */
+ IOStatus set_flags(IOFlags flags);
+
+ /** Set the buffering status of the I/O channel.
+ * The buffering state can only be set if the channel's encoding is
+ * <tt>""</tt>. For any other encoding, the channel must be buffered.
+ *
+ * A buffered channel can only be set unbuffered if the channel's internal
+ * buffers have been flushed. Newly created channels or channels which have
+ * returned Glib::IO_STATUS_EOF not require such a flush. For write-only
+ * channels, a call to flush() is sufficient. For all other channels, the
+ * buffers may be flushed by a call to seek(). This includes the possibility
+ * of seeking with seek type Glib::SEEK_TYPE_CUR and an offset of zero. Note
+ * that this means that socket-based channels cannot be set unbuffered once
+ * they have had data read from them.
+ *
+ * The default state of the channel is buffered.
+ *
+ * @param buffered Whether to set the channel buffered or unbuffered.
+ */
+
+ /** The buffering state can only be set if the channel's encoding
+ * is <tt>0</tt>. For any other encoding, the channel must be buffered.
+ *
+ * A buffered channel can only be set unbuffered if the channel's
+ * internal buffers have been flushed. Newly created channels or
+ * channels which have returned G::IO_STATUS_EOF
+ * not require such a flush. For write-only channels, a call to
+ * g_io_channel_flush() is sufficient. For all other channels,
+ * the buffers may be flushed by a call to g_io_channel_seek_position().
+ * This includes the possibility of seeking with seek type G::SEEK_CUR
+ * and an offset of zero. Note that this means that socket-based
+ * channels cannot be set unbuffered once they have had data
+ * read from them.
+ *
+ * On unbuffered channels, it is safe to mix read and write
+ * calls from the new and old APIs, if this is necessary for
+ * maintaining old code.
+ *
+ * The default state of the channel is buffered.
+ * @param buffered Whether to set the channel buffered or unbuffered.
+ */
+ void set_buffered(bool buffered);
+
+ /** Get the buffering status of the I/O channel.
+ * @return The buffering status of the channel.
+ */
+
+ /** Returns whether @a channel is buffered.
+ * @return <tt>true</tt> if the @a channel is buffered.
+ */
+ bool get_buffered() const;
+
+ /** Returns an IOCondition depending on whether there is data to be
+ * read/space to write data in the internal buffers in the I/O channel.
+ * Only the flags Glib::IO_IN and Glib::IO_OUT may be set.
+ * @return Bitwise combination of Glib::IOCondition flags.
+ */
+
+ /** This function returns a G::IOCondition depending on whether there
+ * is data to be read/space to write data in the
+ * internal buffers in the G::IOChannel. Only the flags G::IO_IN and
+ * G::IO_OUT may be set.
+ * @return A G::IOCondition.
+ */
+ IOCondition get_buffer_condition() const;
+
+ /** Returns whether the file/socket/whatever associated with the I/O channel
+ * will be closed when the channel receives its final unref and is destroyed.
+ * The default value of this is <tt>true</tt> for channels created by
+ * create_from_file(), and <tt>false</tt> for all other channels.
+ * @return Whether the channel will be closed on the final unref of the
+ * IOChannel object.
+ */
+
+ /** Returns whether the file/socket/whatever associated with @a channel
+ * will be closed when @a channel receives its final unref and is
+ * destroyed. The default value of this is <tt>true</tt> for channels created
+ * by g_io_channel_new_file(), and <tt>false</tt> for all other channels.
+ * @return Whether the channel will be closed on the final unref of
+ * the GIOChannel data structure.
+ */
+ bool get_close_on_unref() const;
+
+ /** Setting this flag to <tt>true</tt> for a channel you have already closed
+ * can cause problems.
+ * @param do_close Whether to close the channel on the final unref of the
+ * IOChannel object. The default value of this is <tt>true</tt> for channels
+ * created by create_from_file(), and <tt>false</tt> for all other channels.
+ */
+
+ /** Setting this flag to <tt>true</tt> for a channel you have already closed
+ * can cause problems.
+ * @param do_close Whether to close the channel on the final unref of
+ * the GIOChannel data structure. The default value of
+ * this is <tt>true</tt> for channels created by g_io_channel_new_file(),
+ * and <tt>false</tt> for all other channels.
+ */
+ void set_close_on_unref(bool do_close);
+
+ /** Sets the encoding for the input/output of the channel.
+ * The internal encoding is always UTF-8. The default encoding for the
+ * external file is UTF-8. The encoding <tt>""</tt> is safe to use with
+ * binary data.
+ *
+ * The encoding can only be set if one of the following conditions
+ * is true:
+ *
+ * -# The channel was just created, and has not been written to or read from
+ * yet.
+ * -# The channel is write-only.
+ * -# The channel is a file, and the file pointer was just repositioned by a
+ * call to seek_position(). (This flushes all the internal buffers.)
+ * -# The current encoding is <tt>""</tt> or UTF-8.
+ * -# One of the read methods has just returned Glib::IO_STATUS_EOF (or, in
+ * the case of read_to_end(), Glib::IO_STATUS_NORMAL).
+ * -# The read() method has returned Glib::IO_STATUS_AGAIN or thrown
+ * a Glib::Error exception. This may be useful in the case of
+ * ConvertError::ILLEGAL_SEQUENCE. Returning one of these statuses
+ * from read_line() or read_to_end() does <em>not</em> guarantee that
+ * the encoding can be changed.
+ *
+ * Channels which do not meet one of the above conditions cannot call
+ * seek_position() with a seek type of Glib::SEEK_TYPE_CUR and, if they
+ * are "seekable", cannot call write() after calling one of the API
+ * "read" methods.
+ *
+ * @param encoding The encoding name, or <tt>""</tt> for binary.
+ * @return Glib::IO_STATUS_NORMAL if the encoding was successfully set.
+ * @throw Glib::IOChannelError
+ */
+ IOStatus set_encoding(const std::string& encoding = std::string());
+
+
+ /** Get the encoding of the I/O channel.
+ * @return The current encoding of the channel.
+ */
+ std::string get_encoding() const;
+
+
+ void set_line_term(const std::string& term = std::string());
+
+
+ std::string get_line_term() const;
+
+
+ /** Creates an IOSource object.
+ * Create a slot from a function to be called when condition is met
+ * for the channel with sigc::ptr_fun() or sigc::mem_fun() and pass
+ * it into the connect() function of the returned IOSource object.
+ * Polling of the channel will start when you attach a MainContext
+ * object to the returned IOSource object using its attach() function.
+ *
+ * Glib::signal_io().connect() is a simpler interface to the same
+ * functionality, for the case where you want to add the source to the
+ * default main context.
+ * @param condition The condition to watch for.
+ * @return An IOSource object that can be polled from a MainContext's event loop.
+ */
+ Glib::RefPtr<IOSource> create_watch(IOCondition condition);
+
+
+ virtual void reference() const;
+ virtual void unreference() const;
+
+
+ GIOChannel* gobj() { return gobject_; }
+ const GIOChannel* gobj() const { return gobject_; }
+
+protected:
+ GIOChannel* gobject_;
+
+ /** Constructor that should be used by derived classes.
+ * Use this constructor if you want to inherit from IOChannel.
+ * It will set up a GIOChannel that will call the vfuncs of your
+ * class even if it is being used from C code, and it will keep
+ * a reference to the C++ code while the GIOChannel exists.
+ */
+ IOChannel();
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ IOChannel(GIOChannel* gobject, bool take_copy);
+#endif
+
+ virtual IOStatus read_vfunc(char* buf, gsize count, gsize& bytes_read);
+ virtual IOStatus write_vfunc(const char* buf, gsize count, gsize& bytes_written);
+ virtual IOStatus seek_vfunc(gint64 offset, SeekType type);
+ virtual IOStatus close_vfunc();
+ virtual IOStatus set_flags_vfunc(IOFlags flags);
+ virtual IOFlags get_flags_vfunc();
+ virtual Glib::RefPtr<Glib::Source> create_watch_vfunc(IOCondition cond);
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ friend class Glib::GlibmmIOChannel;
+#endif
+
+
+};
+
+Glib::RefPtr<IOChannel> wrap(GIOChannel* gobject, bool take_copy = false);
+
+} // namespace Glib
+
+
+#endif /* _GLIBMM_IOCHANNEL_H */
+
diff --git a/libs/glibmm2/glibmm/listhandle.h b/libs/glibmm2/glibmm/listhandle.h
new file mode 100644
index 0000000000..94b366d91b
--- /dev/null
+++ b/libs/glibmm2/glibmm/listhandle.h
@@ -0,0 +1,406 @@
+// -*- c++ -*-
+#ifndef _GLIBMM_LISTHANDLE_H
+#define _GLIBMM_LISTHANDLE_H
+
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glib/glist.h>
+#include <glibmm/containerhandle_shared.h>
+
+
+namespace Glib
+{
+
+namespace Container_Helpers
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+/* Create and fill a GList as efficient as possible.
+ * This requires bidirectional iterators.
+ */
+template <class Bi, class Tr>
+GList* create_list(Bi pbegin, Bi pend, Tr)
+{
+ GList* head = 0;
+
+ while(pend != pbegin)
+ {
+ // Use & to force a warning if the iterator returns a temporary object.
+ const void *const item = Tr::to_c_type(*&*--pend);
+ head = g_list_prepend(head, const_cast<void*>(item));
+ }
+
+ return head;
+}
+
+/* Create a GList from a 0-terminated input sequence.
+ * Build it in reverse order and reverse the whole list afterwards,
+ * because appending to the list would be horribly inefficient.
+ */
+template <class For, class Tr>
+GList* create_list(For pbegin, Tr)
+{
+ GList* head = 0;
+
+ while(*pbegin)
+ {
+ // Use & to force a warning if the iterator returns a temporary object.
+ const void *const item = Tr::to_c_type(*&*pbegin);
+ head = g_list_prepend(head, const_cast<void*>(item));
+ ++pbegin;
+ }
+
+ return g_list_reverse(head);
+}
+
+
+/* Convert from any container that supports bidirectional iterators.
+ */
+template <class Tr, class Cont>
+struct ListSourceTraits
+{
+ static GList* get_data(const Cont& cont)
+ { return Glib::Container_Helpers::create_list(cont.begin(), cont.end(), Tr()); }
+
+ static const Glib::OwnershipType initial_ownership = Glib::OWNERSHIP_SHALLOW;
+};
+
+/* Convert from a 0-terminated array. The Cont
+ * argument must be a pointer to the first element.
+ */
+template <class Tr, class Cont>
+struct ListSourceTraits<Tr,Cont*>
+{
+ static GList* get_data(const Cont* array)
+ { return (array) ? Glib::Container_Helpers::create_list(array, Tr()) : 0; }
+
+ static const Glib::OwnershipType initial_ownership = Glib::OWNERSHIP_SHALLOW;
+};
+
+template <class Tr, class Cont>
+struct ListSourceTraits<Tr,const Cont*> : ListSourceTraits<Tr,Cont*>
+{};
+
+/* Convert from a 0-terminated array. The Cont argument must be a pointer
+ * to the first element. For consistency, the array must be 0-terminated,
+ * even though the array size is known at compile time.
+ */
+template <class Tr, class Cont, size_t N>
+struct ListSourceTraits<Tr,Cont[N]>
+{
+ static GList* get_data(const Cont* array)
+ { return Glib::Container_Helpers::create_list(array, array + (N - 1), Tr()); }
+
+ static const Glib::OwnershipType initial_ownership = Glib::OWNERSHIP_SHALLOW;
+};
+
+template <class Tr, class Cont, size_t N>
+struct ListSourceTraits<Tr,const Cont[N]> : ListSourceTraits<Tr,Cont[N]>
+{};
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+/**
+ * @ingroup ContHelpers
+ * If a method takes this as an argument, or has this as a return type, then you can use a standard
+ * container such as std::list or std::vector.
+ */
+template <class Tr>
+class ListHandleIterator
+{
+public:
+ typedef typename Tr::CppType CppType;
+ typedef typename Tr::CType CType;
+
+ typedef std::forward_iterator_tag iterator_category;
+ typedef CppType value_type;
+ typedef ptrdiff_t difference_type;
+ typedef value_type reference;
+ typedef void pointer;
+
+ explicit inline ListHandleIterator(const GList* node);
+
+ inline value_type operator*() const;
+ inline ListHandleIterator<Tr> & operator++();
+ inline const ListHandleIterator<Tr> operator++(int);
+
+ inline bool operator==(const ListHandleIterator<Tr>& rhs) const;
+ inline bool operator!=(const ListHandleIterator<Tr>& rhs) const;
+
+private:
+ const GList* node_;
+};
+
+} // namespace Container_Helpers
+
+
+/**
+ * @ingroup ContHandles
+ */
+template < class T, class Tr = Glib::Container_Helpers::TypeTraits<T> >
+class ListHandle
+{
+public:
+ typedef typename Tr::CppType CppType;
+ typedef typename Tr::CType CType;
+
+ typedef CppType value_type;
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+
+ typedef Glib::Container_Helpers::ListHandleIterator<Tr> const_iterator;
+ typedef Glib::Container_Helpers::ListHandleIterator<Tr> iterator;
+
+ template <class Cont> inline
+ ListHandle(const Cont& container);
+
+ // Take over ownership of an array created by GTK+ functions.
+ inline ListHandle(GList* glist, Glib::OwnershipType ownership);
+
+ // Copying clears the ownership flag of the source handle.
+ inline ListHandle(const ListHandle<T,Tr>& other);
+
+ ~ListHandle();
+
+ inline const_iterator begin() const;
+ inline const_iterator end() const;
+
+ template <class U> inline operator std::vector<U>() const;
+ template <class U> inline operator std::deque<U>() const;
+ template <class U> inline operator std::list<U>() const;
+
+ template <class Cont> inline
+ void assign_to(Cont& container) const;
+
+ template <class Out> inline
+ void copy(Out pdest) const;
+
+ inline GList* data() const;
+ inline size_t size() const;
+ inline bool empty() const;
+
+private:
+ GList * plist_;
+ mutable Glib::OwnershipType ownership_;
+
+ // No copy assignment.
+ ListHandle<T,Tr>& operator=(const ListHandle<T,Tr>&);
+};
+
+
+/***************************************************************************/
+/* Inline implementation */
+/***************************************************************************/
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+namespace Container_Helpers
+{
+
+/**** Glib::Container_Helpers::ListHandleIterator<> ************************/
+
+template <class Tr> inline
+ListHandleIterator<Tr>::ListHandleIterator(const GList* node)
+:
+ node_ (node)
+{}
+
+template <class Tr> inline
+typename ListHandleIterator<Tr>::value_type ListHandleIterator<Tr>::operator*() const
+{
+ return Tr::to_cpp_type(static_cast<typename Tr::CTypeNonConst>(node_->data));
+}
+
+template <class Tr> inline
+ListHandleIterator<Tr>& ListHandleIterator<Tr>::operator++()
+{
+ node_ = node_->next;
+ return *this;
+}
+
+template <class Tr> inline
+const ListHandleIterator<Tr> ListHandleIterator<Tr>::operator++(int)
+{
+ const ListHandleIterator<Tr> tmp (*this);
+ node_ = node_->next;
+ return tmp;
+}
+
+template <class Tr> inline
+bool ListHandleIterator<Tr>::operator==(const ListHandleIterator<Tr>& rhs) const
+{
+ return (node_ == rhs.node_);
+}
+
+template <class Tr> inline
+bool ListHandleIterator<Tr>::operator!=(const ListHandleIterator<Tr>& rhs) const
+{
+ return (node_ != rhs.node_);
+}
+
+} // namespace Container_Helpers
+
+
+/**** Glib::ListHandle<> ***************************************************/
+
+template <class T, class Tr>
+ template <class Cont>
+inline
+ListHandle<T,Tr>::ListHandle(const Cont& container)
+:
+ plist_ (Glib::Container_Helpers::ListSourceTraits<Tr,Cont>::get_data(container)),
+ ownership_ (Glib::Container_Helpers::ListSourceTraits<Tr,Cont>::initial_ownership)
+{}
+
+template <class T, class Tr> inline
+ListHandle<T,Tr>::ListHandle(GList* glist, Glib::OwnershipType ownership)
+:
+ plist_ (glist),
+ ownership_ (ownership)
+{}
+
+template <class T, class Tr> inline
+ListHandle<T,Tr>::ListHandle(const ListHandle<T,Tr>& other)
+:
+ plist_ (other.plist_),
+ ownership_ (other.ownership_)
+{
+ other.ownership_ = Glib::OWNERSHIP_NONE;
+}
+
+template <class T, class Tr>
+ListHandle<T,Tr>::~ListHandle()
+{
+ if(ownership_ != Glib::OWNERSHIP_NONE)
+ {
+ if(ownership_ != Glib::OWNERSHIP_SHALLOW)
+ {
+ // Deep ownership: release each container element.
+ for(GList* node = plist_; node != 0; node = node->next)
+ Tr::release_c_type(static_cast<typename Tr::CTypeNonConst>(node->data));
+ }
+ g_list_free(plist_);
+ }
+}
+
+template <class T, class Tr> inline
+typename ListHandle<T,Tr>::const_iterator ListHandle<T,Tr>::begin() const
+{
+ return Glib::Container_Helpers::ListHandleIterator<Tr>(plist_);
+}
+
+template <class T, class Tr> inline
+typename ListHandle<T,Tr>::const_iterator ListHandle<T,Tr>::end() const
+{
+ return Glib::Container_Helpers::ListHandleIterator<Tr>(0);
+}
+
+template <class T, class Tr>
+ template <class U>
+inline
+ListHandle<T,Tr>::operator std::vector<U>() const
+{
+#ifdef GLIBMM_HAVE_TEMPLATE_SEQUENCE_CTORS
+ return std::vector<U>(this->begin(), this->end());
+#else
+ std::vector<U> temp;
+ temp.reserve(this->size());
+ Glib::Container_Helpers::fill_container(temp, this->begin(), this->end());
+ return temp;
+#endif
+}
+
+template <class T, class Tr>
+ template <class U>
+inline
+ListHandle<T,Tr>::operator std::deque<U>() const
+{
+#ifdef GLIBMM_HAVE_TEMPLATE_SEQUENCE_CTORS
+ return std::deque<U>(this->begin(), this->end());
+#else
+ std::deque<U> temp;
+ Glib::Container_Helpers::fill_container(temp, this->begin(), this->end());
+ return temp;
+#endif
+}
+
+template <class T, class Tr>
+ template <class U>
+inline
+ListHandle<T,Tr>::operator std::list<U>() const
+{
+#ifdef GLIBMM_HAVE_TEMPLATE_SEQUENCE_CTORS
+ return std::list<U>(this->begin(), this->end());
+#else
+ std::list<U> temp;
+ Glib::Container_Helpers::fill_container(temp, this->begin(), this->end());
+ return temp;
+#endif
+}
+
+template <class T, class Tr>
+ template <class Cont>
+inline
+void ListHandle<T,Tr>::assign_to(Cont& container) const
+{
+#ifdef GLIBMM_HAVE_TEMPLATE_SEQUENCE_CTORS
+ container.assign(this->begin(), this->end());
+#else
+ Cont temp;
+ Glib::Container_Helpers::fill_container(temp, this->begin(), this->end());
+ container.swap(temp);
+#endif
+}
+
+template <class T, class Tr>
+ template <class Out>
+inline
+void ListHandle<T,Tr>::copy(Out pdest) const
+{
+ std::copy(this->begin(), this->end(), pdest);
+}
+
+template <class T, class Tr> inline
+GList* ListHandle<T,Tr>::data() const
+{
+ return plist_;
+}
+
+template <class T, class Tr> inline
+size_t ListHandle<T,Tr>::size() const
+{
+ return g_list_length(plist_);
+}
+
+template <class T, class Tr> inline
+bool ListHandle<T,Tr>::empty() const
+{
+ return (plist_ == 0);
+}
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+} // namespace Glib
+
+
+#endif /* _GLIBMM_LISTHANDLE_H */
+
diff --git a/libs/glibmm2/glibmm/main.cc b/libs/glibmm2/glibmm/main.cc
new file mode 100644
index 0000000000..45e1e0d684
--- /dev/null
+++ b/libs/glibmm2/glibmm/main.cc
@@ -0,0 +1,986 @@
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/main.h>
+#include <glibmm/exceptionhandler.h>
+#include <glibmm/thread.h>
+#include <glibmm/wrap.h>
+#include <glibmm/iochannel.h>
+
+#include <glib/gmessages.h>
+#include <algorithm>
+
+GLIBMM_USING_STD(min)
+
+
+namespace
+{
+
+class SourceConnectionNode
+{
+public:
+ explicit inline SourceConnectionNode(const sigc::slot_base& slot);
+
+ static void* notify(void* data);
+ static void destroy_notify_callback(void* data);
+
+ inline void install(GSource* source);
+ inline sigc::slot_base* get_slot();
+
+private:
+ sigc::slot_base slot_;
+ GSource* source_;
+};
+
+inline
+SourceConnectionNode::SourceConnectionNode(const sigc::slot_base& slot)
+:
+ slot_ (slot),
+ source_ (0)
+{
+ slot_.set_parent(this, &SourceConnectionNode::notify);
+}
+
+void* SourceConnectionNode::notify(void* data)
+{
+ SourceConnectionNode *const self = static_cast<SourceConnectionNode*>(data);
+
+ // if there is no object, this call was triggered from destroy_notify_handler(),
+ // because we set self->source_ to 0 there:
+ if (self->source_)
+ {
+ GSource* s = self->source_;
+ self->source_ = 0;
+ g_source_destroy(s);
+
+ // Destroying the object triggers execution of destroy_notify_handler(),
+ // eiter immediately or later, so we leave that to do the deletion.
+ }
+
+ return 0;
+}
+
+// static
+void SourceConnectionNode::destroy_notify_callback(void* data)
+{
+ SourceConnectionNode *const self = static_cast<SourceConnectionNode*>(data);
+
+ if (self)
+ {
+ // The GLib side is disconnected now, thus the GSource* is no longer valid.
+ self->source_ = 0;
+
+ delete self;
+ }
+}
+
+inline
+void SourceConnectionNode::install(GSource* source)
+{
+ source_ = source;
+}
+
+inline
+sigc::slot_base* SourceConnectionNode::get_slot()
+{
+ return &slot_;
+}
+
+
+/* We use the callback data member of GSource to store both a pointer to our
+ * wrapper and a pointer to the connection node that is currently being used.
+ * The one and only SourceCallbackData object of a Glib::Source is constructed
+ * in the ctor of Glib::Source and destroyed after the GSource object when the
+ * reference counter of the GSource object reaches zero!
+ */
+struct SourceCallbackData
+{
+ explicit inline SourceCallbackData(Glib::Source* wrapper_);
+
+ void set_node(SourceConnectionNode* node_);
+
+ static void destroy_notify_callback(void* data);
+
+ Glib::Source* wrapper;
+ SourceConnectionNode* node;
+};
+
+inline
+SourceCallbackData::SourceCallbackData(Glib::Source* wrapper_)
+:
+ wrapper (wrapper_),
+ node (0)
+{}
+
+void SourceCallbackData::set_node(SourceConnectionNode* node_)
+{
+ if(node)
+ SourceConnectionNode::destroy_notify_callback(node);
+
+ node = node_;
+}
+
+// static
+void SourceCallbackData::destroy_notify_callback(void* data)
+{
+ SourceCallbackData *const self = static_cast<SourceCallbackData*>(data);
+
+ if(self->node)
+ SourceConnectionNode::destroy_notify_callback(self->node);
+
+ if(self->wrapper)
+ Glib::Source::destroy_notify_callback(self->wrapper);
+
+ delete self;
+}
+
+
+/* Retrieve the callback data from a wrapped GSource object.
+ */
+static SourceCallbackData* glibmm_source_get_callback_data(GSource* source)
+{
+ g_return_val_if_fail(source->callback_funcs->get != 0, 0);
+
+ GSourceFunc func;
+ void* user_data = 0;
+
+ // Retrieve the callback function and data.
+ (*source->callback_funcs->get)(source->callback_data, source, &func, &user_data);
+
+ return static_cast<SourceCallbackData*>(user_data);
+}
+
+/* Glib::Source doesn't use the callback function installed with
+ * g_source_set_callback(). Instead, it invokes the sigc++ slot
+ * directly from dispatch_vfunc(), which is both simpler and more
+ * efficient.
+ * For correctness, provide a pointer to this dummy callback rather
+ * than some random pointer. That also allows for sanity checks
+ * here as well as in Source::dispatch_vfunc().
+ */
+static gboolean glibmm_dummy_source_callback(void*)
+{
+ g_assert_not_reached();
+ return 0;
+}
+
+/* Only used by SignalTimeout::connect() and SignalIdle::connect().
+ * These don't use Glib::Source, to avoid the unnecessary overhead
+ * of a completely unused wrapper object.
+ */
+static gboolean glibmm_source_callback(void* data)
+{
+ SourceConnectionNode *const conn_data = static_cast<SourceConnectionNode*>(data);
+
+ try
+ {
+ // Recreate the specific slot from the generic slot node.
+ return (*static_cast<sigc::slot<bool>*>(conn_data->get_slot()))();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ return 0;
+}
+
+static gboolean glibmm_iosource_callback(GIOChannel*, GIOCondition condition, void* data)
+{
+ SourceCallbackData *const callback_data = static_cast<SourceCallbackData*>(data);
+ g_return_val_if_fail(callback_data->node != 0, 0);
+
+ try
+ {
+ // Recreate the specific slot from the generic slot node.
+ return (*static_cast<sigc::slot<bool,Glib::IOCondition>*>(callback_data->node->get_slot()))
+ ((Glib::IOCondition) condition);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ return 0;
+}
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+/**** Glib::PollFD *********************************************************/
+
+PollFD::PollFD()
+{
+ gobject_.fd = 0;
+ gobject_.events = 0;
+ gobject_.revents = 0;
+}
+
+PollFD::PollFD(int fd)
+{
+ gobject_.fd = fd;
+ gobject_.events = 0;
+ gobject_.revents = 0;
+}
+
+PollFD::PollFD(int fd, IOCondition events)
+{
+ gobject_.fd = fd;
+ gobject_.events = events;
+ gobject_.revents = 0;
+}
+
+
+/**** Glib::SignalTimeout **************************************************/
+
+inline
+SignalTimeout::SignalTimeout(GMainContext* context)
+:
+ context_ (context)
+{}
+
+sigc::connection SignalTimeout::connect(const sigc::slot<bool>& slot,
+ unsigned int interval, int priority)
+{
+ SourceConnectionNode *const conn_node = new SourceConnectionNode(slot);
+ const sigc::connection connection (*conn_node->get_slot());
+
+ GSource *const source = g_timeout_source_new(interval);
+
+ if(priority != G_PRIORITY_DEFAULT)
+ g_source_set_priority(source, priority);
+
+ g_source_set_callback(
+ source, &glibmm_source_callback, conn_node,
+ &SourceConnectionNode::destroy_notify_callback);
+
+ g_source_attach(source, context_);
+ g_source_unref(source); // GMainContext holds a reference
+
+ conn_node->install(source);
+ return connection;
+}
+
+SignalTimeout signal_timeout()
+{
+ return SignalTimeout(0); // 0 means default context
+}
+
+
+/**** Glib::SignalIdle *****************************************************/
+
+inline
+SignalIdle::SignalIdle(GMainContext* context)
+:
+ context_ (context)
+{}
+
+sigc::connection SignalIdle::connect(const sigc::slot<bool>& slot, int priority)
+{
+ SourceConnectionNode *const conn_node = new SourceConnectionNode(slot);
+ const sigc::connection connection (*conn_node->get_slot());
+
+ GSource *const source = g_idle_source_new();
+
+ if(priority != G_PRIORITY_DEFAULT)
+ g_source_set_priority(source, priority);
+
+ g_source_set_callback(
+ source, &glibmm_source_callback, conn_node,
+ &SourceConnectionNode::destroy_notify_callback);
+
+ g_source_attach(source, context_);
+ g_source_unref(source); // GMainContext holds a reference
+
+ conn_node->install(source);
+ return connection;
+}
+
+SignalIdle signal_idle()
+{
+ return SignalIdle(0); // 0 means default context
+}
+
+
+/**** Glib::SignalIO *******************************************************/
+
+inline
+SignalIO::SignalIO(GMainContext* context)
+:
+ context_ (context)
+{}
+
+sigc::connection SignalIO::connect(const sigc::slot<bool,IOCondition>& slot,
+ int fd, IOCondition condition, int priority)
+{
+ const Glib::RefPtr<IOSource> source = IOSource::create(fd, condition);
+
+ if(priority != G_PRIORITY_DEFAULT)
+ source->set_priority(priority);
+
+ const sigc::connection connection = source->connect(slot);
+
+ g_source_attach(source->gobj(), context_);
+
+ return connection;
+}
+
+sigc::connection SignalIO::connect(const sigc::slot<bool,IOCondition>& slot,
+ const Glib::RefPtr<IOChannel>& channel,
+ IOCondition condition, int priority)
+{
+ const Glib::RefPtr<IOSource> source = IOSource::create(channel, condition);
+
+ if(priority != G_PRIORITY_DEFAULT)
+ source->set_priority(priority);
+
+ const sigc::connection connection = source->connect(slot);
+
+ g_source_attach(source->gobj(), context_);
+
+ return connection;
+}
+
+SignalIO signal_io()
+{
+ return SignalIO(0); // 0 means default context
+}
+
+
+/**** Glib::MainContext ****************************************************/
+
+// static
+Glib::RefPtr<MainContext> MainContext::create()
+{
+ return Glib::RefPtr<MainContext>(reinterpret_cast<MainContext*>(g_main_context_new()));
+}
+
+// static
+Glib::RefPtr<MainContext> MainContext::get_default()
+{
+ return Glib::wrap(g_main_context_default(), true);
+}
+
+bool MainContext::iteration(bool may_block)
+{
+ return g_main_context_iteration(gobj(), may_block);
+}
+
+bool MainContext::pending()
+{
+ return g_main_context_pending(gobj());
+}
+
+void MainContext::wakeup()
+{
+ g_main_context_wakeup(gobj());
+}
+
+bool MainContext::acquire()
+{
+ return g_main_context_acquire(gobj());
+}
+
+bool MainContext::wait(Glib::Cond& cond, Glib::Mutex& mutex)
+{
+ return g_main_context_wait(gobj(), cond.gobj(), mutex.gobj());
+}
+
+void MainContext::release()
+{
+ g_main_context_release(gobj());
+}
+
+bool MainContext::prepare(int& priority)
+{
+ return g_main_context_prepare(gobj(), &priority);
+}
+
+bool MainContext::prepare()
+{
+ return g_main_context_prepare(gobj(), 0);
+}
+
+void MainContext::query(int max_priority, int& timeout, std::vector<PollFD>& fds)
+{
+ if(fds.empty())
+ fds.resize(8); // rather bogus number, but better than 0
+
+ for(;;)
+ {
+ const int size_before = fds.size();
+ const int size_needed = g_main_context_query(
+ gobj(), max_priority, &timeout, reinterpret_cast<GPollFD*>(&fds.front()), size_before);
+
+ fds.resize(size_needed);
+
+ if(size_needed <= size_before)
+ break;
+ }
+}
+
+bool MainContext::check(int max_priority, std::vector<PollFD>& fds)
+{
+ if(!fds.empty())
+ return g_main_context_check(gobj(), max_priority, reinterpret_cast<GPollFD*>(&fds.front()), fds.size());
+ else
+ return false;
+}
+
+void MainContext::dispatch()
+{
+ g_main_context_dispatch(gobj());
+}
+
+void MainContext::set_poll_func(GPollFunc poll_func)
+{
+ g_main_context_set_poll_func(gobj(), poll_func);
+}
+
+GPollFunc MainContext::get_poll_func()
+{
+ return g_main_context_get_poll_func(gobj());
+}
+
+void MainContext::add_poll(PollFD& fd, int priority)
+{
+ g_main_context_add_poll(gobj(), fd.gobj(), priority);
+}
+
+void MainContext::remove_poll(PollFD& fd)
+{
+ g_main_context_remove_poll(gobj(), fd.gobj());
+}
+
+SignalTimeout MainContext::signal_timeout()
+{
+ return SignalTimeout(gobj());
+}
+
+SignalIdle MainContext::signal_idle()
+{
+ return SignalIdle(gobj());
+}
+
+SignalIO MainContext::signal_io()
+{
+ return SignalIO(gobj());
+}
+
+void MainContext::reference() const
+{
+ g_main_context_ref(reinterpret_cast<GMainContext*>(const_cast<MainContext*>(this)));
+}
+
+void MainContext::unreference() const
+{
+ g_main_context_unref(reinterpret_cast<GMainContext*>(const_cast<MainContext*>(this)));
+}
+
+GMainContext* MainContext::gobj()
+{
+ return reinterpret_cast<GMainContext*>(this);
+}
+
+const GMainContext* MainContext::gobj() const
+{
+ return reinterpret_cast<const GMainContext*>(this);
+}
+
+GMainContext* MainContext::gobj_copy() const
+{
+ reference();
+ return const_cast<GMainContext*>(gobj());
+}
+
+Glib::RefPtr<MainContext> wrap(GMainContext* gobject, bool take_copy)
+{
+ if(take_copy && gobject)
+ g_main_context_ref(gobject);
+
+ return Glib::RefPtr<MainContext>(reinterpret_cast<MainContext*>(gobject));
+}
+
+
+/**** Glib::MainLoop *******************************************************/
+
+Glib::RefPtr<MainLoop> MainLoop::create(bool is_running)
+{
+ return Glib::RefPtr<MainLoop>(
+ reinterpret_cast<MainLoop*>(g_main_loop_new(0, is_running)));
+}
+
+Glib::RefPtr<MainLoop> MainLoop::create(const Glib::RefPtr<MainContext>& context, bool is_running)
+{
+ return Glib::RefPtr<MainLoop>(
+ reinterpret_cast<MainLoop*>(g_main_loop_new(Glib::unwrap(context), is_running)));
+}
+
+void MainLoop::run()
+{
+ g_main_loop_run(gobj());
+}
+
+void MainLoop::quit()
+{
+ g_main_loop_quit(gobj());
+}
+
+bool MainLoop::is_running()
+{
+ return g_main_loop_is_running(gobj());
+}
+
+Glib::RefPtr<MainContext> MainLoop::get_context()
+{
+ return Glib::wrap(g_main_loop_get_context(gobj()), true);
+}
+
+//static:
+int MainLoop::depth()
+{
+ return g_main_depth();
+}
+
+void MainLoop::reference() const
+{
+ g_main_loop_ref(reinterpret_cast<GMainLoop*>(const_cast<MainLoop*>(this)));
+}
+
+void MainLoop::unreference() const
+{
+ g_main_loop_unref(reinterpret_cast<GMainLoop*>(const_cast<MainLoop*>(this)));
+}
+
+GMainLoop* MainLoop::gobj()
+{
+ return reinterpret_cast<GMainLoop*>(this);
+}
+
+const GMainLoop* MainLoop::gobj() const
+{
+ return reinterpret_cast<const GMainLoop*>(this);
+}
+
+GMainLoop* MainLoop::gobj_copy() const
+{
+ reference();
+ return const_cast<GMainLoop*>(gobj());
+}
+
+Glib::RefPtr<MainLoop> wrap(GMainLoop* gobject, bool take_copy)
+{
+ if(take_copy && gobject)
+ g_main_loop_ref(gobject);
+
+ return Glib::RefPtr<MainLoop>(reinterpret_cast<MainLoop*>(gobject));
+}
+
+
+/**** Glib::Source *********************************************************/
+
+// static
+const GSourceFuncs Source::vfunc_table_ =
+{
+ &Source::prepare_vfunc,
+ &Source::check_vfunc,
+ &Source::dispatch_vfunc,
+ 0, // finalize_vfunc // We can't use finalize_vfunc because there is no way
+ // to store a pointer to our wrapper anywhere in GSource so
+ // that it persists until finalize_vfunc would be called from here.
+ 0, // closure_callback
+ 0, // closure_marshal
+};
+
+unsigned int Source::attach(const Glib::RefPtr<MainContext>& context)
+{
+ return g_source_attach(gobject_, Glib::unwrap(context));
+}
+
+unsigned int Source::attach()
+{
+ return g_source_attach(gobject_, 0);
+}
+
+void Source::destroy()
+{
+ g_source_destroy(gobject_);
+}
+
+void Source::set_priority(int priority)
+{
+ g_source_set_priority(gobject_, priority);
+}
+
+int Source::get_priority() const
+{
+ return g_source_get_priority(gobject_);
+}
+
+void Source::set_can_recurse(bool can_recurse)
+{
+ g_source_set_can_recurse(gobject_, can_recurse);
+}
+
+bool Source::get_can_recurse() const
+{
+ return g_source_get_can_recurse(gobject_);
+}
+
+unsigned int Source::get_id() const
+{
+ return g_source_get_id(gobject_);
+}
+
+Glib::RefPtr<MainContext> Source::get_context()
+{
+ return Glib::wrap(g_source_get_context(gobject_), true);
+}
+
+GSource* Source::gobj_copy() const
+{
+ return g_source_ref(gobject_);
+}
+
+void Source::reference() const
+{
+ g_source_ref(gobject_);
+}
+
+void Source::unreference() const
+{
+ g_source_unref(gobject_);
+}
+
+Source::Source()
+:
+ gobject_ (g_source_new(const_cast<GSourceFuncs*>(&vfunc_table_), sizeof(GSource)))
+{
+ g_source_set_callback(
+ gobject_, &glibmm_dummy_source_callback,
+ new SourceCallbackData(this), // our persistant callback data object
+ &SourceCallbackData::destroy_notify_callback);
+}
+
+Source::Source(GSource* cast_item, GSourceFunc callback_func)
+:
+ gobject_ (cast_item)
+{
+ g_source_set_callback(
+ gobject_, callback_func,
+ new SourceCallbackData(this), // our persistant callback data object
+ &SourceCallbackData::destroy_notify_callback);
+}
+
+Source::~Source()
+{
+ // The dtor should be invoked by destroy_notify_callback() only, which clears
+ // gobject_ before deleting. However, we might also get to this point if
+ // a derived ctor threw an exception, and then we need to unref manually.
+
+ if(gobject_)
+ {
+ SourceCallbackData *const data = glibmm_source_get_callback_data(gobject_);
+ data->wrapper = 0;
+
+ GSource *const tmp_gobject = gobject_;
+ gobject_ = 0;
+
+ g_source_unref(tmp_gobject);
+ }
+}
+
+sigc::connection Source::connect_generic(const sigc::slot_base& slot)
+{
+ SourceConnectionNode *const conn_node = new SourceConnectionNode(slot);
+ const sigc::connection connection (*conn_node->get_slot());
+
+ // Don't override the callback data. Reuse the existing one
+ // calling SourceCallbackData::set_node() to register conn_node.
+ SourceCallbackData *const data = glibmm_source_get_callback_data(gobject_);
+ data->set_node(conn_node);
+
+ conn_node->install(gobject_);
+ return connection;
+}
+
+void Source::add_poll(Glib::PollFD& poll_fd)
+{
+ g_source_add_poll(gobject_, poll_fd.gobj());
+}
+
+void Source::remove_poll(Glib::PollFD& poll_fd)
+{
+ g_source_remove_poll(gobject_, poll_fd.gobj());
+}
+
+void Source::get_current_time(Glib::TimeVal& current_time)
+{
+ g_source_get_current_time(gobject_, &current_time);
+}
+
+inline // static
+Source* Source::get_wrapper(GSource* source)
+{
+ SourceCallbackData *const data = glibmm_source_get_callback_data(source);
+ return data->wrapper;
+}
+
+// static
+gboolean Source::prepare_vfunc(GSource* source, int* timeout)
+{
+ try
+ {
+ Source *const self = get_wrapper(source);
+ return self->prepare(*timeout);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ return 0;
+}
+
+// static
+gboolean Source::check_vfunc(GSource* source)
+{
+ try
+ {
+ Source *const self = get_wrapper(source);
+ return self->check();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ return 0;
+}
+
+// static
+gboolean Source::dispatch_vfunc(GSource*, GSourceFunc callback, void* user_data)
+{
+ SourceCallbackData *const callback_data = static_cast<SourceCallbackData*>(user_data);
+
+ g_return_val_if_fail(callback == &glibmm_dummy_source_callback, 0);
+ g_return_val_if_fail(callback_data != 0 && callback_data->node != 0, 0);
+
+ try
+ {
+ Source *const self = callback_data->wrapper;
+ return self->dispatch(callback_data->node->get_slot());
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ return 0;
+}
+
+// static
+void Source::destroy_notify_callback(void* data)
+{
+ if(data)
+ {
+ Source *const self = static_cast<Source*>(data);
+
+ // gobject_ is already invalid at this point.
+ self->gobject_ = 0;
+
+ // No exception checking: if the dtor throws, you're out of luck anyway.
+ delete self;
+ }
+}
+
+
+/**** Glib::TimeoutSource **************************************************/
+
+// static
+Glib::RefPtr<TimeoutSource> TimeoutSource::create(unsigned int interval)
+{
+ return Glib::RefPtr<TimeoutSource>(new TimeoutSource(interval));
+}
+
+sigc::connection TimeoutSource::connect(const sigc::slot<bool>& slot)
+{
+ return connect_generic(slot);
+}
+
+TimeoutSource::TimeoutSource(unsigned int interval)
+:
+ interval_ (interval)
+{
+ expiration_.assign_current_time();
+ expiration_.add_milliseconds(std::min<unsigned long>(G_MAXLONG, interval_));
+}
+
+TimeoutSource::~TimeoutSource()
+{}
+
+bool TimeoutSource::prepare(int& timeout)
+{
+ Glib::TimeVal current_time;
+ get_current_time(current_time);
+
+ Glib::TimeVal remaining = expiration_;
+ remaining.subtract(current_time);
+
+ if(remaining.negative())
+ {
+ // Already expired.
+ timeout = 0;
+ }
+ else
+ {
+ const unsigned long milliseconds =
+ static_cast<unsigned long>(remaining.tv_sec) * 1000U +
+ static_cast<unsigned long>(remaining.tv_usec) / 1000U;
+
+ // Set remaining milliseconds.
+ timeout = std::min<unsigned long>(G_MAXINT, milliseconds);
+
+ // Check if the system time has been set backwards. (remaining > interval)
+ remaining.add_milliseconds(- std::min<unsigned long>(G_MAXLONG, interval_) - 1);
+ if(!remaining.negative())
+ {
+ // Oh well. Reset the expiration time to now + interval;
+ // this at least avoids hanging for long periods of time.
+ expiration_ = current_time;
+ expiration_.add_milliseconds(interval_);
+ timeout = std::min<unsigned int>(G_MAXINT, interval_);
+ }
+ }
+
+ return (timeout == 0);
+}
+
+bool TimeoutSource::check()
+{
+ Glib::TimeVal current_time;
+ get_current_time(current_time);
+
+ return (expiration_ <= current_time);
+}
+
+bool TimeoutSource::dispatch(sigc::slot_base* slot)
+{
+ const bool again = (*static_cast<sigc::slot<bool>*>(slot))();
+
+ if(again)
+ {
+ get_current_time(expiration_);
+ expiration_.add_milliseconds(std::min<unsigned long>(G_MAXLONG, interval_));
+ }
+
+ return again;
+}
+
+
+/**** Glib::IdleSource *****************************************************/
+
+// static
+Glib::RefPtr<IdleSource> IdleSource::create()
+{
+ return Glib::RefPtr<IdleSource>(new IdleSource());
+}
+
+sigc::connection IdleSource::connect(const sigc::slot<bool>& slot)
+{
+ return connect_generic(slot);
+}
+
+IdleSource::IdleSource()
+{
+ set_priority(PRIORITY_DEFAULT_IDLE);
+}
+
+IdleSource::~IdleSource()
+{}
+
+bool IdleSource::prepare(int& timeout)
+{
+ timeout = 0;
+ return true;
+}
+
+bool IdleSource::check()
+{
+ return true;
+}
+
+bool IdleSource::dispatch(sigc::slot_base* slot)
+{
+ return (*static_cast<sigc::slot<bool>*>(slot))();
+}
+
+
+/**** Glib::IOSource *******************************************************/
+
+// static
+Glib::RefPtr<IOSource> IOSource::create(int fd, IOCondition condition)
+{
+ return Glib::RefPtr<IOSource>(new IOSource(fd, condition));
+}
+
+Glib::RefPtr<IOSource> IOSource::create(const Glib::RefPtr<IOChannel>& channel, IOCondition condition)
+{
+ return Glib::RefPtr<IOSource>(new IOSource(channel, condition));
+}
+
+sigc::connection IOSource::connect(const sigc::slot<bool,IOCondition>& slot)
+{
+ return connect_generic(slot);
+}
+
+IOSource::IOSource(int fd, IOCondition condition)
+:
+ poll_fd_ (fd, condition)
+{
+ add_poll(poll_fd_);
+}
+
+IOSource::IOSource(const Glib::RefPtr<IOChannel>& channel, IOCondition condition)
+:
+ Source(g_io_create_watch(channel->gobj(), (GIOCondition) condition),
+ (GSourceFunc) &glibmm_iosource_callback)
+{}
+
+IOSource::~IOSource()
+{}
+
+bool IOSource::prepare(int& timeout)
+{
+ timeout = -1;
+ return false;
+}
+
+bool IOSource::check()
+{
+ return ((poll_fd_.get_revents() & poll_fd_.get_events()) != 0);
+}
+
+bool IOSource::dispatch(sigc::slot_base* slot)
+{
+ return (*static_cast<sigc::slot<bool,IOCondition>*>(slot))
+ (poll_fd_.get_revents());
+}
+
+} // namespace Glib
+
diff --git a/libs/glibmm2/glibmm/main.h b/libs/glibmm2/glibmm/main.h
new file mode 100644
index 0000000000..4165be3620
--- /dev/null
+++ b/libs/glibmm2/glibmm/main.h
@@ -0,0 +1,697 @@
+// -*- c++ -*-
+#ifndef _GLIBMM_MAIN_H
+#define _GLIBMM_MAIN_H
+
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glib/giochannel.h>
+#include <glib/gmain.h>
+
+#include <vector>
+#include <sigc++/sigc++.h>
+
+#include <glibmmconfig.h>
+#include <glibmm/refptr.h>
+#include <glibmm/timeval.h>
+
+GLIBMM_USING_STD(vector)
+
+
+namespace Glib
+{
+
+class Cond;
+class Mutex;
+class IOChannel;
+
+
+/** @defgroup MainLoop The Main Event Loop
+ * Manages all available sources of events.
+ * @{
+ */
+
+enum
+{
+ /*! Use this for high priority event sources. It is not used within
+ * GLib or GTK+.<br><br>
+ */
+ PRIORITY_HIGH = -100,
+
+ /*! Use this for default priority event sources. In glibmm this
+ * priority is used by default when installing timeout handlers with
+ * SignalTimeout::connect(). In GDK this priority is used for events
+ * from the X server.<br><br>
+ */
+ PRIORITY_DEFAULT = 0,
+
+ /*! Use this for high priority idle functions. GTK+ uses
+ * <tt>PRIORITY_HIGH_IDLE&nbsp;+&nbsp;10</tt> for resizing operations, and
+ * <tt>PRIORITY_HIGH_IDLE&nbsp;+&nbsp;20</tt> for redrawing operations.
+ * (This is done to ensure that any pending resizes are processed before
+ * any pending redraws, so that widgets are not redrawn twice unnecessarily.)
+ * <br><br>
+ */
+ PRIORITY_HIGH_IDLE = 100,
+
+ /*! Use this for default priority idle functions. In glibmm this priority is
+ * used by default when installing idle handlers with SignalIdle::connect().
+ * <br><br>
+ */
+ PRIORITY_DEFAULT_IDLE = 200,
+
+ /*! Use this for very low priority background tasks. It is not used within
+ * GLib or GTK+.
+ */
+ PRIORITY_LOW = 300
+};
+
+
+/** A bitwise combination representing an I/O condition to watch for on an
+ * event source.
+ * The flags correspond to those used by the <tt>%poll()</tt> system call
+ * on UNIX (see <tt>man 2 poll</tt>). To test for individual flags, do
+ * something like this:
+ * @code
+ * if((condition & Glib::IO_OUT) != 0)
+ * do_some_output();
+ * @endcode
+ * @par Bitwise operators:
+ * <tt>IOCondition operator|(IOCondition, IOCondition)</tt><br>
+ * <tt>IOCondition operator&(IOCondition, IOCondition)</tt><br>
+ * <tt>IOCondition operator^(IOCondition, IOCondition)</tt><br>
+ * <tt>IOCondition operator~(IOCondition)</tt><br>
+ * <tt>IOCondition& operator|=(IOCondition&, IOCondition)</tt><br>
+ * <tt>IOCondition& operator&=(IOCondition&, IOCondition)</tt><br>
+ * <tt>IOCondition& operator^=(IOCondition&, IOCondition)</tt><br>
+ */
+enum IOCondition
+{
+ IO_IN = G_IO_IN, /*!< @hideinitializer There is data to read. */
+ IO_OUT = G_IO_OUT, /*!< @hideinitializer Data can be written (without blocking). */
+ IO_PRI = G_IO_PRI, /*!< @hideinitializer There is urgent data to read. */
+ IO_ERR = G_IO_ERR, /*!< @hideinitializer %Error condition. */
+ IO_HUP = G_IO_HUP, /*!< @hideinitializer Hung up (the connection has been broken,
+ usually for pipes and sockets). */
+ IO_NVAL = G_IO_NVAL /*!< @hideinitializer Invalid request. The file descriptor is not open. */
+};
+
+inline IOCondition operator|(IOCondition lhs, IOCondition rhs)
+ { return static_cast<IOCondition>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
+
+inline IOCondition operator&(IOCondition lhs, IOCondition rhs)
+ { return static_cast<IOCondition>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
+
+inline IOCondition operator^(IOCondition lhs, IOCondition rhs)
+ { return static_cast<IOCondition>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
+
+inline IOCondition operator~(IOCondition flags)
+ { return static_cast<IOCondition>(~static_cast<unsigned>(flags)); }
+
+inline IOCondition& operator|=(IOCondition& lhs, IOCondition rhs)
+ { return (lhs = static_cast<IOCondition>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
+
+inline IOCondition& operator&=(IOCondition& lhs, IOCondition rhs)
+ { return (lhs = static_cast<IOCondition>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
+
+inline IOCondition& operator^=(IOCondition& lhs, IOCondition rhs)
+ { return (lhs = static_cast<IOCondition>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
+
+
+class PollFD
+{
+public:
+ PollFD();
+ explicit PollFD(int fd);
+ PollFD(int fd, IOCondition events);
+
+ void set_fd(int fd) { gobject_.fd = fd; }
+ int get_fd() const { return gobject_.fd; }
+
+ void set_events(IOCondition events) { gobject_.events = events; }
+ IOCondition get_events() const { return static_cast<IOCondition>(gobject_.events); }
+
+ void set_revents(IOCondition revents) { gobject_.revents = revents; }
+ IOCondition get_revents() const { return static_cast<IOCondition>(gobject_.revents); }
+
+ GPollFD* gobj() { return &gobject_; }
+ const GPollFD* gobj() const { return &gobject_; }
+
+private:
+ GPollFD gobject_;
+};
+
+
+class SignalTimeout
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ explicit inline SignalTimeout(GMainContext* context);
+#endif
+
+ /** Connects a timeout handler.
+ * @code
+ * Glib::signal_timeout().connect(sigc::ptr_fun(&timeout_handler), 1000);
+ * @endcode
+ * is equivalent to:
+ * @code
+ * const Glib::RefPtr<Glib::TimeoutSource> timeout_source = Glib::TimeoutSource::create(1000);
+ * timeout_source->connect(sigc::ptr_fun(&timeout_handler));
+ * timeout_source->attach(Glib::MainContext::get_default());
+ * @endcode
+ * @param slot A slot to call when @a interval elapsed.
+ * @param interval The timeout in milliseconds.
+ * @param priority The priority of the new event source.
+ * @return A connection handle, which can be used to disconnect the handler.
+ */
+ sigc::connection connect(const sigc::slot<bool>& slot, unsigned int interval,
+ int priority = PRIORITY_DEFAULT);
+private:
+ GMainContext* context_;
+
+ // no copy assignment
+ SignalTimeout& operator=(const SignalTimeout&);
+};
+
+
+class SignalIdle
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ explicit inline SignalIdle(GMainContext* context);
+#endif
+
+ /** Connects an idle handler.
+ * @code
+ * Glib::signal_idle().connect(sigc::ptr_fun(&idle_handler));
+ * @endcode
+ * is equivalent to:
+ * @code
+ * const Glib::RefPtr<Glib::IdleSource> idle_source = Glib::IdleSource::create();
+ * idle_source->connect(sigc::ptr_fun(&idle_handler));
+ * idle_source->attach(Glib::MainContext::get_default());
+ * @endcode
+ * @param slot A slot to call when the main loop is idle.
+ * @param priority The priority of the new event source.
+ * @return A connection handle, which can be used to disconnect the handler.
+ */
+ sigc::connection connect(const sigc::slot<bool>& slot, int priority = PRIORITY_DEFAULT_IDLE);
+
+private:
+ GMainContext* context_;
+
+ // no copy assignment
+ SignalIdle& operator=(const SignalIdle&);
+};
+
+
+class SignalIO
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ explicit inline SignalIO(GMainContext* context);
+#endif
+
+ /** Connects an I/O handler.
+ * @code
+ * Glib::signal_io().connect(sigc::ptr_fun(&io_handler), fd, Glib::IO_IN | Glib::IO_HUP);
+ * @endcode
+ * is equivalent to:
+ * @code
+ * const Glib::RefPtr<Glib::IOSource> io_source = Glib::IOSource::create(fd, Glib::IO_IN | Glib::IO_HUP);
+ * io_source->connect(sigc::ptr_fun(&io_handler));
+ * io_source->attach(Glib::MainContext::get_default());
+ * @endcode
+ * @param slot A slot to call when polling @a fd results in an event that matches @a condition.
+ * The event will be passed as a parameter to @a slot.
+ * If @a io_handler returns <tt>false</tt> the signal is disconnected.
+ * @param fd The file descriptor (or a @c HANDLE on Win32 systems) to watch.
+ * @param condition The conditions to watch for.
+ * @param priority The priority of the new event source.
+ * @return A connection handle, which can be used to disconnect the handler.
+ */
+ sigc::connection connect(const sigc::slot<bool,IOCondition>& slot, int fd,
+ IOCondition condition, int priority = PRIORITY_DEFAULT);
+
+ /** Connects an I/O channel.
+ * @code
+ * Glib::signal_io().connect(sigc::ptr_fun(&io_handler), channel, Glib::IO_IN | Glib::IO_HUP);
+ * @endcode
+ * is equivalent to:
+ * @code
+ * const Glib::RefPtr<Glib::IOSource> io_source = Glib::IOSource::create(channel, Glib::IO_IN | Glib::IO_HUP);
+ * io_source->connect(sigc::ptr_fun(&io_handler));
+ * io_source->attach(Glib::MainContext::get_default());
+ * @endcode
+ * @param slot A slot to call when polling @a channel results in an event that matches @a condition.
+ * The event will be passed as a parameter to @a slot.
+ * If @a io_handler returns <tt>false</tt> the signal is disconnected.
+ * @param channel The IOChannel object to watch.
+ * @param condition The conditions to watch for.
+ * @param priority The priority of the new event source.
+ * @return A connection handle, which can be used to disconnect the handler.
+ */
+ sigc::connection connect(const sigc::slot<bool,IOCondition>& slot, const Glib::RefPtr<IOChannel>& channel,
+ IOCondition condition, int priority = PRIORITY_DEFAULT);
+
+private:
+ GMainContext* context_;
+
+ // no copy assignment
+ SignalIO& operator=(const SignalIO&);
+};
+
+
+/** Convenience timeout signal.
+ * @return A signal proxy; you want to use SignalTimeout::connect().
+ */
+SignalTimeout signal_timeout();
+
+/** Convenience idle signal.
+ * @return A signal proxy; you want to use SignalIdle::connect().
+ */
+SignalIdle signal_idle();
+
+/** Convenience I/O signal.
+ * @return A signal proxy; you want to use SignalIO::connect().
+ */
+SignalIO signal_io();
+
+
+/** Main context.
+ */
+class MainContext
+{
+public:
+ typedef Glib::MainContext CppObjectType;
+ typedef GMainContext BaseObjectType;
+
+ /** Creates a new MainContext.
+ * @return The new MainContext.
+ */
+ static Glib::RefPtr<MainContext> create();
+ /** Returns the default main context.
+ * This is the main context used for main loop functions when a main loop is not explicitly specified.
+ * @return The new MainContext.
+ */
+ static Glib::RefPtr<MainContext> get_default();
+
+ /** Runs a single iteration for the given main loop.
+ * This involves checking to see if any event sources are ready to be processed, then if no events sources are ready and may_block is true, waiting for a source to become ready, then dispatching the highest priority events sources that are ready. Note that even when may_block is true, it is still possible for iteration() to return FALSE, since the the wait may be interrupted for other reasons than an event source becoming ready.
+ * @param may_block Whether the call may block.
+ * @return true if events were dispatched.
+ */
+ bool iteration(bool may_block);
+
+ /** Checks if any sources have pending events for the given context.
+ * @return true if events are pending.
+ */
+ bool pending();
+
+ /** If context is currently waiting in a poll(), interrupt the poll(), and continue the iteration process.
+ */
+ void wakeup();
+
+ /** Tries to become the owner of the specified context.
+ * If some other context is the owner of the context, returns FALSE immediately. Ownership is properly recursive: the owner can require ownership again and will release ownership when release() is called as many times as acquire().
+ * You must be the owner of a context before you can call prepare(), query(), check(), dispatch().
+ * @return true if the operation succeeded, and this thread is now the owner of context.
+ */
+ bool acquire();
+
+
+ /** Tries to become the owner of the specified context, as with acquire(). But if another thread is the owner, atomically drop mutex and wait on cond until that owner releases ownership or until cond is signaled, then try again (once) to become the owner.
+ * @param cond A condition variable.
+ * @param mutex A mutex, currently held.
+ * @return true if the operation succeeded, and this thread is now the owner of context.
+ */
+ bool wait(Glib::Cond& cond, Glib::Mutex& mutex);
+
+ /** Releases ownership of a context previously acquired by this thread with acquire(). If the context was acquired multiple times, the only release ownership when release() is called as many times as it was acquired.
+ */
+ void release();
+
+
+
+ /** Prepares to poll sources within a main loop. The resulting information for polling is determined by calling query().
+ * @param priority Location to store priority of highest priority source already ready.
+ * @return true if some source is ready to be dispatched prior to polling.
+ */
+ bool prepare(int& priority);
+ /** Prepares to poll sources within a main loop. The resulting information for polling is determined by calling query().
+ * @return true if some source is ready to be dispatched prior to polling.
+ */
+ bool prepare();
+
+ /** Determines information necessary to poll this main loop.
+ * @param max_priority Maximum priority source to check.
+ * @param timeout Location to store timeout to be used in polling.
+ * @param fds Location to store Glib::PollFD records that need to be polled.
+ * @return the number of records actually stored in fds, or, if more than n_fds records need to be stored, the number of records that need to be stored.
+ */
+ void query(int max_priority, int& timeout, std::vector<PollFD>& fds);
+
+ /** Passes the results of polling back to the main loop.
+ * @param max_priority Maximum numerical priority of sources to check.
+ * @param fds Vector of Glib::PollFD's that was passed to the last call to query()
+ * @return true if some sources are ready to be dispatched.
+ */
+ bool check(int max_priority, std::vector<PollFD>& fds);
+
+ /** Dispatches all pending sources.
+ */
+ void dispatch();
+
+ //TODO: Use slot instead?
+ /** Sets the function to use to handle polling of file descriptors. It will be used instead of the poll() system call (or GLib's replacement function, which is used where poll() isn't available).
+ * This function could possibly be used to integrate the GLib event loop with an external event loop.
+ * @param poll_func The function to call to poll all file descriptors.
+ */
+ void set_poll_func(GPollFunc poll_func);
+
+ /** Gets the poll function set by g_main_context_set_poll_func().
+ * @return The poll function
+ */
+ GPollFunc get_poll_func();
+
+ /** Adds a file descriptor to the set of file descriptors polled for this context. This will very seldomly be used directly. Instead a typical event source will use Glib::Source::add_poll() instead.
+ * @param fd A PollFD structure holding information about a file descriptor to watch.
+ * @param priority The priority for this file descriptor which should be the same as the priority used for Glib::Source::attach() to ensure that the file descriptor is polled whenever the results may be needed.
+ */
+ void add_poll(PollFD& fd, int priority);
+
+ /** Removes file descriptor from the set of file descriptors to be polled for a particular context.
+ * @param fd A PollFD structure holding information about a file descriptor.
+ */
+ void remove_poll(PollFD& fd);
+
+ /** Timeout signal, attached to this MainContext.
+ * @return A signal proxy; you want to use SignalTimeout::connect().
+ */
+ SignalTimeout signal_timeout();
+
+ /** Idle signal, attached to this MainContext.
+ * @return A signal proxy; you want to use SignalIdle::connect().
+ */
+ SignalIdle signal_idle();
+
+ /** I/O signal, attached to this MainContext.
+ * @return A signal proxy; you want to use SignalIO::connect().
+ */
+ SignalIO signal_io();
+
+ void reference() const;
+ void unreference() const;
+
+ GMainContext* gobj();
+ const GMainContext* gobj() const;
+ GMainContext* gobj_copy() const;
+
+private:
+ // Glib::MainContext can neither be constructed nor deleted.
+ MainContext();
+ void operator delete(void*, size_t);
+
+ // noncopyable
+ MainContext(const MainContext& other);
+ MainContext& operator=(const MainContext& other);
+
+};
+
+/** @relates Glib::MainContext */
+Glib::RefPtr<MainContext> wrap(GMainContext* gobject, bool take_copy = false);
+
+
+class MainLoop
+{
+public:
+ typedef Glib::MainLoop CppObjectType;
+ typedef GMainLoop BaseObjectType;
+
+ static Glib::RefPtr<MainLoop> create(bool is_running = false);
+ static Glib::RefPtr<MainLoop> create(const Glib::RefPtr<MainContext>& context,
+ bool is_running = false);
+
+ /** Runs a main loop until quit() is called on the loop.
+ * If this is called for the thread of the loop's MainContext, it will process events from the loop, otherwise it will simply wait.
+ */
+ void run();
+
+ /** Stops a MainLoop from running. Any calls to run() for the loop will return.
+ */
+ void quit();
+
+ /** Checks to see if the main loop is currently being run via run().
+ * @return true if the mainloop is currently being run.
+ */
+ bool is_running();
+
+ /** Returns the MainContext of loop.
+ * @return The MainContext of loop.
+ */
+ Glib::RefPtr<MainContext> get_context();
+
+ //TODO: C++ize the (big) g_main_depth docs here.
+ static int depth();
+
+ /** Increases the reference count on a MainLoop object by one.
+ */
+ void reference() const;
+
+ /** Decreases the reference count on a MainLoop object by one.
+ * If the result is zero, free the loop and free all associated memory.
+ */
+ void unreference() const;
+
+ GMainLoop* gobj();
+ const GMainLoop* gobj() const;
+ GMainLoop* gobj_copy() const;
+
+private:
+ // Glib::MainLoop can neither be constructed nor deleted.
+ MainLoop();
+ void operator delete(void*, size_t);
+
+ MainLoop(const MainLoop&);
+ MainLoop& operator=(const MainLoop&);
+};
+
+/** @relates Glib::MainLoop */
+Glib::RefPtr<MainLoop> wrap(GMainLoop* gobject, bool take_copy = false);
+
+
+class Source
+{
+public:
+ typedef Glib::Source CppObjectType;
+ typedef GSource BaseObjectType;
+
+ static Glib::RefPtr<Source> create() /* = 0 */;
+
+ /** Adds a Source to a context so that it will be executed within that context.
+ * @param context A MainContext.
+ * @return The ID for the source within the MainContext.
+ */
+ unsigned int attach(const Glib::RefPtr<MainContext>& context);
+
+ /** Adds a Source to a context so that it will be executed within that context.
+ * The default context will be used.
+ * @return The ID for the source within the MainContext.
+ */
+ unsigned int attach();
+
+ //TODO: Does this destroy step make sense in C++? Should it just be something that happens in a destructor?
+
+ /** Removes a source from its MainContext, if any, and marks it as destroyed.
+ * The source cannot be subsequently added to another context.
+ */
+ void destroy();
+
+ /** Sets the priority of a source. While the main loop is being run, a source will be dispatched if it is ready to be dispatched and no sources at a higher (numerically smaller) priority are ready to be dispatched.
+ * @param priority The new priority.
+ */
+ void set_priority(int priority);
+
+ /** Gets the priority of a source.
+ * @return The priority of the source.
+ */
+ int get_priority() const;
+
+ /** Sets whether a source can be called recursively.
+ * If @a can_recurse is true, then while the source is being dispatched then this source will be processed normally. Otherwise, all processing of this source is blocked until the dispatch function returns.
+ * @param can_recurse Whether recursion is allowed for this source.
+ */
+ void set_can_recurse(bool can_recurse);
+
+ /** Checks whether a source is allowed to be called recursively. see set_can_recurse().
+ * @return Whether recursion is allowed.
+ */
+ bool get_can_recurse() const;
+
+ /** Returns the numeric ID for a particular source.
+ * The ID of a source is unique within a particular main loop context. The reverse mapping from ID to source is done by MainContext::find_source_by_id().
+ * @return The ID for the source.
+ */
+ unsigned int get_id() const;
+
+ //TODO: Add a const version of this method?
+ /** Gets the MainContext with which the source is associated.
+ * Calling this function on a destroyed source is an error.
+ * @return The MainContext with which the source is associated, or a null RefPtr if the context has not yet been added to a source.
+ */
+ Glib::RefPtr<MainContext> get_context();
+
+ GSource* gobj() { return gobject_; }
+ const GSource* gobj() const { return gobject_; }
+ GSource* gobj_copy() const;
+
+ void reference() const;
+ void unreference() const;
+
+protected:
+ /** Construct an object that uses the virtual functions prepare(), check() and dispatch().
+ */
+ Source();
+
+ /** Wrap an existing GSource object and install the given callback function.
+ * The constructed object doesn't use the virtual functions prepare(), check() and dispatch().
+ * This constructor is for use by derived types that need to wrap a GSource object.
+ * The callback function can be a static member function. But beware -
+ * depending on the actual implementation of the GSource's virtual functions
+ * the expected type of the callback function can differ from GSourceFunc.
+ */
+ Source(GSource* cast_item, GSourceFunc callback_func);
+
+ virtual ~Source();
+
+ sigc::connection connect_generic(const sigc::slot_base& slot);
+
+ /** Adds a file descriptor to the set of file descriptors polled for this source.
+ * The event source's check function will typically test the revents field in the PollFD and return true if events need to be processed.
+ * @param poll_fd A PollFD object holding information about a file descriptor to watch.
+ */
+ void add_poll(PollFD& poll_fd);
+
+ /** Removes a file descriptor from the set of file descriptors polled for this source.
+ * @param poll_fd A PollFD object previously passed to add_poll().
+ */
+ void remove_poll(PollFD& poll_fd);
+
+ /** Gets the "current time" to be used when checking this source. The advantage of calling this function over calling get_current_time() directly is that when checking multiple sources, GLib can cache a single value instead of having to repeatedly get the system time.
+ * @param current_time Glib::TimeVal in which to store current time
+ */
+ void get_current_time(Glib::TimeVal& current_time);
+
+ virtual bool prepare(int& timeout) = 0;
+ virtual bool check() = 0;
+ virtual bool dispatch(sigc::slot_base* slot) = 0;
+
+private:
+ GSource* gobject_;
+
+#ifndef DOXGEN_SHOULD_SKIP_THIS
+
+ static inline Source* get_wrapper(GSource* source);
+
+ static const GSourceFuncs vfunc_table_;
+
+ static gboolean prepare_vfunc(GSource* source, int* timeout);
+ static gboolean check_vfunc(GSource* source);
+ static gboolean dispatch_vfunc(GSource* source, GSourceFunc callback, void* user_data);
+public:
+ static void destroy_notify_callback(void* data);
+private:
+
+#endif /* DOXGEN_SHOULD_SKIP_THIS */
+
+ // noncopyable
+ Source(const Source&);
+ Source& operator=(const Source&);
+};
+
+
+class TimeoutSource : public Glib::Source
+{
+public:
+ typedef Glib::TimeoutSource CppObjectType;
+
+ static Glib::RefPtr<TimeoutSource> create(unsigned int interval);
+ sigc::connection connect(const sigc::slot<bool>& slot);
+
+protected:
+ explicit TimeoutSource(unsigned int interval);
+ virtual ~TimeoutSource();
+
+ virtual bool prepare(int& timeout);
+ virtual bool check();
+ virtual bool dispatch(sigc::slot_base* slot);
+
+private:
+ Glib::TimeVal expiration_;
+ unsigned int interval_;
+};
+
+
+class IdleSource : public Glib::Source
+{
+public:
+ typedef Glib::IdleSource CppObjectType;
+
+ static Glib::RefPtr<IdleSource> create();
+ sigc::connection connect(const sigc::slot<bool>& slot);
+
+protected:
+ IdleSource();
+ virtual ~IdleSource();
+
+ virtual bool prepare(int& timeout);
+ virtual bool check();
+ virtual bool dispatch(sigc::slot_base* slot_data);
+};
+
+
+class IOSource : public Glib::Source
+{
+public:
+ typedef Glib::IOSource CppObjectType;
+
+ static Glib::RefPtr<IOSource> create(int fd, IOCondition condition);
+ static Glib::RefPtr<IOSource> create(const Glib::RefPtr<IOChannel>& channel, IOCondition condition);
+ sigc::connection connect(const sigc::slot<bool,IOCondition>& slot);
+
+protected:
+ IOSource(int fd, IOCondition condition);
+ IOSource(const Glib::RefPtr<IOChannel>& channel, IOCondition condition);
+ virtual ~IOSource();
+
+ virtual bool prepare(int& timeout);
+ virtual bool check();
+ virtual bool dispatch(sigc::slot_base* slot);
+
+private:
+ PollFD poll_fd_;
+};
+
+/** @} group MainLoop */
+
+} // namespace Glib
+
+
+#endif /* _GLIBMM_MAIN_H */
+
diff --git a/libs/glibmm2/glibmm/markup.cc b/libs/glibmm2/glibmm/markup.cc
new file mode 100644
index 0000000000..b0690406f6
--- /dev/null
+++ b/libs/glibmm2/glibmm/markup.cc
@@ -0,0 +1,350 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <glibmm/markup.h>
+#include <glibmm/private/markup_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/markup.h>
+#include <glibmm/exceptionhandler.h>
+#include <glibmm/utility.h>
+#include <glib.h>
+
+
+namespace Glib
+{
+
+namespace Markup
+{
+
+Glib::ustring escape_text(const Glib::ustring& text)
+{
+ const Glib::ScopedPtr<char> buf (g_markup_escape_text(text.data(), text.bytes()));
+ return Glib::ustring(buf.get());
+}
+
+
+/**** Glib::Markup::AttributeKeyLess ***************************************/
+
+bool AttributeKeyLess::operator()(const Glib::ustring& lhs, const Glib::ustring& rhs) const
+{
+ return (lhs.raw() < rhs.raw());
+}
+
+
+/**** Glib::Markup::ParserCallbacks ****************************************/
+
+class ParserCallbacks
+{
+public:
+ static const GMarkupParser vfunc_table;
+
+ static void start_element(GMarkupParseContext* context,
+ const char* element_name,
+ const char** attribute_names,
+ const char** attribute_values,
+ void* user_data,
+ GError** error);
+
+ static void end_element(GMarkupParseContext* context,
+ const char* element_name,
+ void* user_data,
+ GError** error);
+
+ static void text(GMarkupParseContext* context,
+ const char* text,
+ gsize text_len,
+ void* user_data,
+ GError** error);
+
+ static void passthrough(GMarkupParseContext* context,
+ const char* passthrough_text,
+ gsize text_len,
+ void* user_data,
+ GError** error);
+
+ static void error(GMarkupParseContext* context,
+ GError* error,
+ void* user_data);
+};
+
+
+const GMarkupParser ParserCallbacks::vfunc_table =
+{
+ &ParserCallbacks::start_element,
+ &ParserCallbacks::end_element,
+ &ParserCallbacks::text,
+ &ParserCallbacks::passthrough,
+ &ParserCallbacks::error,
+};
+
+void ParserCallbacks::start_element(GMarkupParseContext* context,
+ const char* element_name,
+ const char** attribute_names,
+ const char** attribute_values,
+ void* user_data,
+ GError** error)
+{
+ ParseContext& cpp_context = *static_cast<ParseContext*>(user_data);
+ g_return_if_fail(context == cpp_context.gobj());
+
+ try
+ {
+ Parser::AttributeMap attributes;
+
+ if(attribute_names && attribute_values)
+ {
+ const char *const * pname = attribute_names;
+ const char *const * pvalue = attribute_values;
+
+ for(; *pname && *pvalue; ++pname, ++pvalue)
+ attributes.insert(Parser::AttributeMap::value_type(*pname, *pvalue));
+
+ g_return_if_fail(*pname == 0 && *pvalue == 0);
+ }
+
+ cpp_context.get_parser()->on_start_element(cpp_context, element_name, attributes);
+ }
+ catch(MarkupError& err)
+ {
+ err.propagate(error);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+}
+
+void ParserCallbacks::end_element(GMarkupParseContext* context,
+ const char* element_name,
+ void* user_data,
+ GError** error)
+{
+ ParseContext& cpp_context = *static_cast<ParseContext*>(user_data);
+ g_return_if_fail(context == cpp_context.gobj());
+
+ try
+ {
+ cpp_context.get_parser()->on_end_element(cpp_context, element_name);
+ }
+ catch(MarkupError& err)
+ {
+ err.propagate(error);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+}
+
+void ParserCallbacks::text(GMarkupParseContext* context,
+ const char* text,
+ gsize text_len,
+ void* user_data,
+ GError** error)
+{
+ ParseContext& cpp_context = *static_cast<ParseContext*>(user_data);
+ g_return_if_fail(context == cpp_context.gobj());
+
+ try
+ {
+ cpp_context.get_parser()->on_text(cpp_context, Glib::ustring(text, text + text_len));
+ }
+ catch(MarkupError& err)
+ {
+ err.propagate(error);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+}
+
+void ParserCallbacks::passthrough(GMarkupParseContext* context,
+ const char* passthrough_text,
+ gsize text_len,
+ void* user_data,
+ GError** error)
+{
+ ParseContext& cpp_context = *static_cast<ParseContext*>(user_data);
+ g_return_if_fail(context == cpp_context.gobj());
+
+ try
+ {
+ cpp_context.get_parser()->on_passthrough(
+ cpp_context, Glib::ustring(passthrough_text, passthrough_text + text_len));
+ }
+ catch(MarkupError& err)
+ {
+ err.propagate(error);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+}
+
+void ParserCallbacks::error(GMarkupParseContext* context,
+ GError* error,
+ void* user_data)
+{
+ ParseContext& cpp_context = *static_cast<ParseContext*>(user_data);
+
+ g_return_if_fail(context == cpp_context.gobj());
+ g_return_if_fail(error->domain == G_MARKUP_ERROR);
+
+ try
+ {
+ cpp_context.get_parser()->on_error(cpp_context, MarkupError(g_error_copy(error)));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+}
+
+
+/**** Glib::Markup::Parser *************************************************/
+
+Parser::Parser()
+{}
+
+Parser::~Parser()
+{}
+
+void Parser::on_start_element(ParseContext&, const Glib::ustring&, const Parser::AttributeMap&)
+{}
+
+void Parser::on_end_element(ParseContext&, const Glib::ustring&)
+{}
+
+void Parser::on_text(ParseContext&, const Glib::ustring&)
+{}
+
+void Parser::on_passthrough(ParseContext&, const Glib::ustring&)
+{}
+
+void Parser::on_error(ParseContext&, const MarkupError&)
+{}
+
+
+/**** Glib::Markup::ParseContext *******************************************/
+
+ParseContext::ParseContext(Parser& parser, ParseFlags flags)
+:
+ parser_ (&parser),
+ gobject_ (g_markup_parse_context_new(&ParserCallbacks::vfunc_table, (GMarkupParseFlags) flags,
+ this, &ParseContext::destroy_notify_callback))
+{}
+
+ParseContext::~ParseContext()
+{
+ parser_ = 0;
+ g_markup_parse_context_free(gobject_);
+}
+
+void ParseContext::parse(const Glib::ustring& text)
+{
+ GError* error = 0;
+ g_markup_parse_context_parse(gobject_, text.data(), text.bytes(), &error);
+
+ if(error)
+ Glib::Error::throw_exception(error);
+}
+
+void ParseContext::parse(const char* text_begin, const char* text_end)
+{
+ GError* error = 0;
+ g_markup_parse_context_parse(gobject_, text_begin, text_end - text_begin, &error);
+
+ if(error)
+ Glib::Error::throw_exception(error);
+}
+
+void ParseContext::end_parse()
+{
+ GError* error = 0;
+ g_markup_parse_context_end_parse(gobject_, &error);
+
+ if(error)
+ Glib::Error::throw_exception(error);
+}
+
+Glib::ustring ParseContext::get_element() const
+{
+ const char *const element_name = g_markup_parse_context_get_element(gobject_);
+ return (element_name) ? Glib::ustring(element_name) : Glib::ustring();
+}
+
+int ParseContext::get_line_number() const
+{
+ int line_number = 0;
+ g_markup_parse_context_get_position(gobject_, &line_number, 0);
+ return line_number;
+}
+
+int ParseContext::get_char_number() const
+{
+ int char_number = 0;
+ g_markup_parse_context_get_position(gobject_, 0, &char_number);
+ return char_number;
+}
+
+// static
+void ParseContext::destroy_notify_callback(void* data)
+{
+ ParseContext *const self = static_cast<ParseContext*>(data);
+
+ // Detect premature destruction.
+ g_return_if_fail(self->parser_ == 0);
+}
+
+} // namespace Markup
+
+} // namespace Glib
+
+
+namespace
+{
+} // anonymous namespace
+
+
+Glib::MarkupError::MarkupError(Glib::MarkupError::Code error_code, const Glib::ustring& error_message)
+:
+ Glib::Error (G_MARKUP_ERROR, error_code, error_message)
+{}
+
+Glib::MarkupError::MarkupError(GError* gobject)
+:
+ Glib::Error (gobject)
+{}
+
+Glib::MarkupError::Code Glib::MarkupError::code() const
+{
+ return static_cast<Code>(Glib::Error::code());
+}
+
+void Glib::MarkupError::throw_func(GError* gobject)
+{
+ throw Glib::MarkupError(gobject);
+}
+
+
diff --git a/libs/glibmm2/glibmm/markup.h b/libs/glibmm2/glibmm/markup.h
new file mode 100644
index 0000000000..83076f15b8
--- /dev/null
+++ b/libs/glibmm2/glibmm/markup.h
@@ -0,0 +1,420 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GLIBMM_MARKUP_H
+#define _GLIBMM_MARKUP_H
+
+
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#include <glibmm/error.h>
+#include <sigc++/sigc++.h>
+
+#include <map>
+#include <glibmmconfig.h>
+
+GLIBMM_USING_STD(map)
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C" { typedef struct _GMarkupParseContext GMarkupParseContext; }
+#endif
+
+
+namespace Glib
+{
+
+/** @defgroup Markup Simple XML Subset Parser
+ *
+ * The Glib::Markup parser is intended to parse a simple markup format that's a
+ * subset of XML. This is a small, efficient, easy-to-use parser. It should not
+ * be used if you expect to interoperate with other applications generating
+ * full-scale XML. However, it's very useful for application data files, config
+ * files, etc. where you know your application will be the only one writing the
+ * file. Full-scale XML parsers should be able to parse the subset used by
+ * Glib::Markup parser, so you can easily migrate to full-scale XML at a later
+ * time if the need arises.
+ *
+ * Glib::Markup is not guaranteed to signal an error on all invalid XML;
+ * the parser may accept documents that an XML parser would not. However,
+ * invalid XML documents are not considered valid Glib::Markup documents.
+ *
+ * @par Simplifications to XML include:
+ *
+ * - Only UTF-8 encoding is allowed.
+ * - No user-defined entities.
+ * - Processing instructions, comments and the doctype declaration are "passed
+ * through" but are not interpreted in any way.
+ * - No DTD or validation.
+ *
+ * @par The markup format does support:
+ *
+ * - Elements
+ * - Attributes
+ * - 5 standard entities: <tt>\&amp; \&lt; \&gt; \&quot; \&apos;</tt>
+ * - Character references
+ * - Sections marked as <tt>CDATA</tt>
+ *
+ * @{
+ */
+
+/** %Exception class for markup parsing errors.
+ */
+class MarkupError : public Glib::Error
+{
+public:
+ enum Code
+ {
+ BAD_UTF8,
+ EMPTY,
+ PARSE,
+ UNKNOWN_ELEMENT,
+ UNKNOWN_ATTRIBUTE,
+ INVALID_CONTENT
+ };
+
+ MarkupError(Code error_code, const Glib::ustring& error_message);
+ explicit MarkupError(GError* gobject);
+ Code code() const;
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+private:
+ static void throw_func(GError* gobject);
+ friend void wrap_init(); // uses throw_func()
+#endif
+};
+
+
+/*! @var MarkupError::Code MarkupError::BAD_UTF8
+ * Text being parsed was not valid UTF-8.
+ */
+/*! @var MarkupError::Code MarkupError::EMPTY
+ * Document contained nothing, or only whitespace.
+ */
+/*! @var MarkupError::Code MarkupError::PARSE
+ * Document was ill-formed.
+ */
+/*! @var MarkupError::Code MarkupError::UNKNOWN_ELEMENT
+ * This error should be set by Glib::Markup::Parser virtual methods;
+ * element wasn't known.
+ */
+/*! @var MarkupError::Code MarkupError::UNKNOWN_ATTRIBUTE
+ * This error should be set by Glib::Markup::Parser virtual methods;
+ * attribute wasn't known.
+ */
+/*! @var MarkupError::Code MarkupError::INVALID_CONTENT
+ * This error should be set by Glib::Markup::Parser virtual methods;
+ * something was wrong with contents of the document, e.g. invalid attribute value.
+ */
+
+/** @} group Markup */
+
+
+namespace Markup
+{
+
+class ParseContext;
+
+/** @ingroup Markup */
+typedef Glib::MarkupError Error;
+
+
+/** Escapes text so that the markup parser will parse it verbatim.
+ * Less than, greater than, ampersand, etc. are replaced with the corresponding
+ * entities. This function would typically be used when writing out a file to
+ * be parsed with the markup parser.
+ * @ingroup Markup
+ * @param text Some valid UTF-8 text.
+ * @return Escaped text.
+ */
+Glib::ustring escape_text(const Glib::ustring& text);
+
+
+/** @addtogroup glibmmEnums Enums and Flags */
+
+/** There are no flags right now. Pass <tt>Glib::Markup::ParseFlags(0)</tt> for
+ * the flags argument to all functions (this should be the default argument
+ * anyway).
+ * @ingroup glibmmEnums
+ * @par Bitwise operators:
+ * <tt>%ParseFlags operator|(ParseFlags, ParseFlags)</tt><br>
+ * <tt>%ParseFlags operator&(ParseFlags, ParseFlags)</tt><br>
+ * <tt>%ParseFlags operator^(ParseFlags, ParseFlags)</tt><br>
+ * <tt>%ParseFlags operator~(ParseFlags)</tt><br>
+ * <tt>%ParseFlags& operator|=(ParseFlags&, ParseFlags)</tt><br>
+ * <tt>%ParseFlags& operator&=(ParseFlags&, ParseFlags)</tt><br>
+ * <tt>%ParseFlags& operator^=(ParseFlags&, ParseFlags)</tt><br>
+ */
+enum ParseFlags
+{
+ DO_NOT_USE_THIS_UNSUPPORTED_FLAG = 1 << 0
+};
+
+/** @ingroup glibmmEnums */
+inline ParseFlags operator|(ParseFlags lhs, ParseFlags rhs)
+ { return static_cast<ParseFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
+
+/** @ingroup glibmmEnums */
+inline ParseFlags operator&(ParseFlags lhs, ParseFlags rhs)
+ { return static_cast<ParseFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
+
+/** @ingroup glibmmEnums */
+inline ParseFlags operator^(ParseFlags lhs, ParseFlags rhs)
+ { return static_cast<ParseFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
+
+/** @ingroup glibmmEnums */
+inline ParseFlags operator~(ParseFlags flags)
+ { return static_cast<ParseFlags>(~static_cast<unsigned>(flags)); }
+
+/** @ingroup glibmmEnums */
+inline ParseFlags& operator|=(ParseFlags& lhs, ParseFlags rhs)
+ { return (lhs = static_cast<ParseFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
+
+/** @ingroup glibmmEnums */
+inline ParseFlags& operator&=(ParseFlags& lhs, ParseFlags rhs)
+ { return (lhs = static_cast<ParseFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
+
+/** @ingroup glibmmEnums */
+inline ParseFlags& operator^=(ParseFlags& lhs, ParseFlags rhs)
+ { return (lhs = static_cast<ParseFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
+
+
+/*! @var Markup::ParseFlags DO_NOT_USE_THIS_UNSUPPORTED_FLAG
+ * Flag you should not use.
+ */
+
+
+/** Binary predicate used by Markup::Parser::AttributeMap.
+ * @ingroup Markup
+ * Unlike <tt>operator<(const ustring& lhs, const ustring& rhs)</tt>
+ * which would be used by the default <tt>std::less<></tt> predicate,
+ * the AttributeKeyLess predicate is locale-independent. This is both
+ * more correct and much more efficient.
+ */
+class AttributeKeyLess
+{
+public:
+ typedef Glib::ustring first_argument_type;
+ typedef Glib::ustring second_argument_type;
+ typedef bool result_type;
+
+ bool operator()(const Glib::ustring& lhs, const Glib::ustring& rhs) const;
+};
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+class ParserCallbacks;
+#endif
+
+/** The abstract markup parser base class.
+ * @ingroup Markup
+ * To implement a parser for your markup format, derive from
+ * Glib::Markup::Parser and implement the virtual methods.
+ *
+ * You don't have to override all of the virtual methods. If a particular
+ * method is not implement the data passed to it will be ignored. Except for
+ * the error method, any of these callbacks can throw an error exception; in
+ * particular the MarkupError::UNKNOWN_ELEMENT,
+ * MarkupError::UNKNOWN_ATTRIBUTE, and MarkupError::INVALID_CONTENT errors
+ * are intended to be thrown from these overridden methods. If you throw an
+ * error from a method, Glib::Markup::ParseContext::parse() will report that
+ * error back to its caller.
+ */
+class Parser : public sigc::trackable
+{
+public:
+ typedef std::map<Glib::ustring, Glib::ustring, Glib::Markup::AttributeKeyLess> AttributeMap;
+
+ virtual ~Parser() = 0;
+
+protected:
+ /** Constructs a Parser object.
+ * Note that Markup::Parser is an abstract class which can't be instantiated
+ * directly. To implement the parser for your markup format, derive from
+ * Markup::Parser and implement the virtual methods.
+ */
+ Parser();
+
+ /** Called for open tags <tt>\<foo bar="baz"\></tt>.
+ * This virtual method is invoked when the opening tag of an element is seen.
+ * @param context The Markup::ParseContext object the parsed data belongs to.
+ * @param element_name The name of the element.
+ * @param attributes A map of attribute name/value pairs.
+ * @throw Glib::MarkupError An exception <em>you</em> should throw if
+ * something went wrong, for instance if an unknown attribute name was
+ * encountered. In particular the MarkupError::UNKNOWN_ELEMENT,
+ * MarkupError::UNKNOWN_ATTRIBUTE, and MarkupError::INVALID_CONTENT
+ * errors are intended to be thrown from user-implemented methods.
+ */
+ virtual void on_start_element(ParseContext& context,
+ const Glib::ustring& element_name,
+ const AttributeMap& attributes);
+
+ /** Called for close tags <tt>\</foo\></tt>.
+ * This virtual method is invoked when the closing tag of an element is seen.
+ * @param context The Markup::ParseContext object the parsed data belongs to.
+ * @param element_name The name of the element.
+ * @throw Glib::MarkupError An exception <em>you</em> should throw if
+ * something went wrong, for instance if an unknown attribute name was
+ * encountered. In particular the MarkupError::UNKNOWN_ELEMENT,
+ * MarkupError::UNKNOWN_ATTRIBUTE, and MarkupError::INVALID_CONTENT
+ * errors are intended to be thrown from user-implemented methods.
+ */
+ virtual void on_end_element(ParseContext& context, const Glib::ustring& element_name);
+
+ /** Called for character data.
+ * This virtual method is invoked when some text is seen (text is always
+ * inside an element).
+ * @param context The Markup::ParseContext object the parsed data belongs to.
+ * @param text The parsed text in UTF-8 encoding.
+ * @throw Glib::MarkupError An exception <em>you</em> should throw if
+ * something went wrong, for instance if an unknown attribute name was
+ * encountered. In particular the MarkupError::UNKNOWN_ELEMENT,
+ * MarkupError::UNKNOWN_ATTRIBUTE, and MarkupError::INVALID_CONTENT
+ * errors are intended to be thrown from user-implemented methods.
+ */
+ virtual void on_text(ParseContext& context, const Glib::ustring& text);
+
+ /** Called for strings that should be re-saved verbatim in this same
+ * position, but are not otherwise interpretable.
+ * This virtual method is invoked for comments, processing instructions and
+ * doctype declarations; if you're re-writing the parsed document, write the
+ * passthrough text back out in the same position.
+ * @param context The Markup::ParseContext object the parsed data belongs to.
+ * @param passthrough_text The text that should be passed through.
+ * @throw Glib::MarkupError An exception <em>you</em> should throw if
+ * something went wrong, for instance if an unknown attribute name was
+ * encountered. In particular the MarkupError::UNKNOWN_ELEMENT,
+ * MarkupError::UNKNOWN_ATTRIBUTE, and MarkupError::INVALID_CONTENT
+ * errors are intended to be thrown from user-implemented methods.
+ */
+ virtual void on_passthrough(ParseContext& context, const Glib::ustring& passthrough_text);
+
+ /** Called on error, including one thrown by an overridden virtual method.
+ * @param context The Markup::ParseContext object the parsed data belongs to.
+ * @param error A MarkupError object with detailed information about the error.
+ */
+ virtual void on_error(ParseContext& context, const MarkupError& error);
+
+private:
+ // noncopyable
+ Parser(const Parser&);
+ Parser& operator=(const Parser&);
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ friend class Glib::Markup::ParserCallbacks;
+#endif
+};
+
+
+/** A parse context is used to parse marked-up documents.
+ * @ingroup Markup
+ * You can feed any number of documents into a context, as long as no errors
+ * occur; once an error occurs, the parse context can't continue to parse text
+ * (you have to destroy it and create a new parse context).
+ */
+class ParseContext : public sigc::trackable
+{
+public:
+ /** Creates a new parse context.
+ * @param parser A Markup::Parser instance.
+ * @param flags Bitwise combination of Markup::ParseFlags.
+ */
+ explicit ParseContext(Parser& parser, ParseFlags flags = ParseFlags(0));
+ virtual ~ParseContext();
+
+ /** Feed some data to the ParseContext.
+ * The data need not be valid UTF-8; an error will be signalled if it's
+ * invalid. The data need not be an entire document; you can feed a document
+ * into the parser incrementally, via multiple calls to this function.
+ * Typically, as you receive data from a network connection or file, you feed
+ * each received chunk of data into this function, aborting the process if an
+ * error occurs. Once an error is reported, no further data may be fed to the
+ * ParseContext; all errors are fatal.
+ * @param text Chunk of text to parse.
+ * @throw Glib::MarkupError
+ */
+ void parse(const Glib::ustring& text);
+
+ /** Feed some data to the ParseContext.
+ * The data need not be valid UTF-8; an error will be signalled if it's
+ * invalid. The data need not be an entire document; you can feed a document
+ * into the parser incrementally, via multiple calls to this function.
+ * Typically, as you receive data from a network connection or file, you feed
+ * each received chunk of data into this function, aborting the process if an
+ * error occurs. Once an error is reported, no further data may be fed to the
+ * ParseContext; all errors are fatal.
+ * @param text_begin Begin of chunk of text to parse.
+ * @param text_end End of chunk of text to parse.
+ * @throw Glib::MarkupError
+ */
+ void parse(const char* text_begin, const char* text_end);
+
+ /** Signals to the ParseContext that all data has been fed into the parse
+ * context with parse(). This method reports an error if the document isn't
+ * complete, for example if elements are still open.
+ * @throw Glib::MarkupError
+ */
+ void end_parse();
+
+ /** Retrieves the name of the currently open element.
+ * @return The name of the currently open element, or <tt>""</tt>.
+ */
+ Glib::ustring get_element() const;
+
+ /** Retrieves the current line number.
+ * Intended for use in error messages; there are no strict semantics for what
+ * constitutes the "current" line number other than "the best number we could
+ * come up with for error messages."
+ */
+ int get_line_number() const;
+
+ /** Retrieves the number of the current character on the current line.
+ * Intended for use in error messages; there are no strict semantics for what
+ * constitutes the "current" character number other than "the best number we
+ * could come up with for error messages."
+ */
+ int get_char_number() const;
+
+ Parser* get_parser() { return parser_; }
+ const Parser* get_parser() const { return parser_; }
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ GMarkupParseContext* gobj() { return gobject_; }
+ const GMarkupParseContext* gobj() const { return gobject_; }
+#endif
+
+private:
+ Markup::Parser* parser_;
+ GMarkupParseContext* gobject_;
+
+ // noncopyable
+ ParseContext(const ParseContext&);
+ ParseContext& operator=(const ParseContext&);
+
+ static void destroy_notify_callback(void* data);
+};
+
+} // namespace Markup
+
+} // namespace Glib
+
+
+#endif /* _GLIBMM_MARKUP_H */
+
diff --git a/libs/glibmm2/glibmm/miscutils.cc b/libs/glibmm2/glibmm/miscutils.cc
new file mode 100644
index 0000000000..b25318fca7
--- /dev/null
+++ b/libs/glibmm2/glibmm/miscutils.cc
@@ -0,0 +1,243 @@
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <cstddef>
+#include <cstring>
+
+#include <glibmm/miscutils.h>
+#include <glibmm/utility.h>
+#include <glib.h>
+
+
+namespace Glib
+{
+
+Glib::ustring get_application_name()
+{
+ if(const char *const application_name = g_get_application_name())
+ {
+ // Lets be a bit more strict than the original GLib function and ensure
+ // we always return valid UTF-8. gtkmm coders surely won't expect invalid
+ // UTF-8 in a Glib::ustring returned by a glibmm function.
+
+ if(g_utf8_validate(application_name, -1, 0))
+ return Glib::ustring(application_name);
+
+ char *const appname_utf8 = g_filename_to_utf8(application_name, -1, 0, 0, 0);
+ g_return_val_if_fail(appname_utf8 != 0, "");
+
+ return Glib::ustring(ScopedPtr<char>(appname_utf8).get());
+ }
+
+ return Glib::ustring();
+}
+
+void set_application_name(const Glib::ustring& application_name)
+{
+ g_set_application_name(application_name.c_str());
+}
+
+std::string get_prgname()
+{
+ const char *const prgname = g_get_prgname();
+ return (prgname) ? std::string(prgname) : std::string();
+}
+
+void set_prgname(const std::string& prgname)
+{
+ g_set_prgname(prgname.c_str());
+}
+
+std::string getenv(const std::string& variable, bool& found)
+{
+ const char *const value = g_getenv(variable.c_str());
+ found = (value != 0);
+ return (value) ? std::string(value) : std::string();
+}
+
+std::string getenv(const std::string& variable)
+{
+ const char *const value = g_getenv(variable.c_str());
+ return (value) ? std::string(value) : std::string();
+}
+
+bool setenv(const std::string& variable, const std::string& value, bool overwrite)
+{
+ return g_setenv(variable.c_str(), value.c_str(), overwrite);
+}
+
+void unsetenv(const std::string& variable)
+{
+ g_unsetenv(variable.c_str());
+}
+
+std::string get_user_name()
+{
+ return std::string(g_get_user_name());
+}
+
+std::string get_real_name()
+{
+ return std::string(g_get_real_name());
+}
+
+std::string get_home_dir()
+{
+ return std::string(g_get_home_dir());
+}
+
+std::string get_tmp_dir()
+{
+ return std::string(g_get_tmp_dir());
+}
+
+std::string get_current_dir()
+{
+ const ScopedPtr<char> buf (g_get_current_dir());
+ return std::string(buf.get());
+}
+
+bool path_is_absolute(const std::string& filename)
+{
+ return g_path_is_absolute(filename.c_str());
+}
+
+std::string path_skip_root(const std::string& filename)
+{
+ // g_path_skip_root() returns a pointer _into_ the argument string,
+ // or NULL if there was no root component.
+
+ if(const char *const ptr = g_path_skip_root(filename.c_str()))
+ return std::string(ptr);
+ else
+ return std::string();
+}
+
+std::string path_get_basename(const std::string& filename)
+{
+ const ScopedPtr<char> buf (g_path_get_basename(filename.c_str()));
+ return std::string(buf.get());
+}
+
+std::string path_get_dirname(const std::string& filename)
+{
+ const ScopedPtr<char> buf (g_path_get_dirname(filename.c_str()));
+ return std::string(buf.get());
+}
+
+std::string build_filename(const Glib::ArrayHandle<std::string>& elements)
+{
+ return build_path(G_DIR_SEPARATOR_S, elements);
+}
+
+std::string build_filename(const std::string& elem1, const std::string& elem2)
+{
+ const char *const elements[] = { elem1.c_str(), elem2.c_str(), 0 };
+ return build_path(G_DIR_SEPARATOR_S, elements);
+}
+
+/* Yes, this reimplements the functionality of g_build_path() -- because
+ * it takes a varargs list, and calling it several times would result
+ * in different behaviour.
+ */
+std::string build_path(const std::string& separator, const Glib::ArrayHandle<std::string>& elements)
+{
+ std::string result;
+ result.reserve(256); //TODO: Explain why this magic number is useful. murrayc
+
+ const char *const sep = separator.c_str();
+ const size_t seplen = separator.length();
+
+ bool is_first = true;
+ bool have_leading = false;
+ const char* single_element = 0;
+ const char* last_trailing = 0;
+
+ const char *const *const elements_begin = elements.data();
+ const char *const *const elements_end = elements_begin + elements.size();
+
+ for(const char *const * pelement = elements_begin; pelement != elements_end; ++pelement)
+ {
+ const char* start = *pelement;
+
+ if(*start == '\0')
+ continue; // ignore empty elements
+
+ if(seplen != 0)
+ {
+ while(strncmp(start, sep, seplen) == 0)
+ start += seplen;
+ }
+
+ const char* end = start + strlen(start);
+
+ if(seplen != 0)
+ {
+ while(end >= start + seplen && strncmp(end - seplen, sep, seplen) == 0)
+ end -= seplen;
+
+ last_trailing = end;
+
+ while(last_trailing >= *pelement + seplen && strncmp(last_trailing - seplen, sep, seplen) == 0)
+ last_trailing -= seplen;
+
+ if(!have_leading)
+ {
+ // If the leading and trailing separator strings are in the
+ // same element and overlap, the result is exactly that element.
+ //
+ if(last_trailing <= start)
+ single_element = *pelement;
+
+ result.append(*pelement, start);
+ have_leading = true;
+ }
+ else
+ single_element = 0;
+ }
+
+ if(end == start)
+ continue;
+
+ if(!is_first)
+ result += separator;
+
+ result.append(start, end);
+ is_first = false;
+ }
+
+ if(single_element)
+ result = single_element;
+ else if(last_trailing)
+ result += last_trailing;
+
+ return result;
+}
+
+std::string find_program_in_path(const std::string& program)
+{
+ if(char *const buf = g_find_program_in_path(program.c_str()))
+ return std::string(ScopedPtr<char>(buf).get());
+ else
+ return std::string();
+}
+
+} // namespace Glib
+
diff --git a/libs/glibmm2/glibmm/miscutils.h b/libs/glibmm2/glibmm/miscutils.h
new file mode 100644
index 0000000000..8087add39f
--- /dev/null
+++ b/libs/glibmm2/glibmm/miscutils.h
@@ -0,0 +1,272 @@
+// -*- c++ -*-
+#ifndef _GLIBMM_MISCUTILS_H
+#define _GLIBMM_MISCUTILS_H
+
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/arrayhandle.h>
+#include <glibmm/ustring.h>
+
+
+namespace Glib
+{
+
+/** @defgroup MiscUtils Miscellaneous Utility Functions
+ * Miscellaneous Utility Functions -- a selection of portable utility functions.
+ * @{
+ */
+
+/** Gets a human-readable name for the application,
+ * as set by Glib::set_application_name().
+ * This name should be localized if possible, and is intended for display to
+ * the user. Contrast with Glib::get_prgname(), which gets a non-localized
+ * name. If Glib::set_application_name() has not been called, returns the
+ * result of Glib::get_prgname() (which may be empty if Glib::set_prgname()
+ * has also not been called).
+ *
+ * @return Human-readable application name. May return <tt>""</tt>.
+ */
+Glib::ustring get_application_name();
+
+/** Sets a human-readable name for the application.
+ * This name should be localized if possible, and is intended for display to
+ * the user. Contrast with Glib::set_prgname(), which sets a non-localized
+ * name. Glib::set_prgname() will be called automatically by
+ * <tt>gtk_init()</tt>, but Glib::set_application_name() will not.
+ *
+ * Note that for thread safety reasons, this function can only be called once.
+ *
+ * The application name will be used in contexts such as error messages,
+ * or when displaying an application's name in the task list.
+ *
+ * @param application_name Localized name of the application.
+ */
+void set_application_name(const Glib::ustring& application_name);
+
+/** Gets the name of the program.
+ * If you are using GDK or GTK+ the program name is set in <tt>gdk_init()</tt>,
+ * which is called by <tt>gtk_init()</tt>. The program name is found by taking
+ * the last component of <tt>argv[0]</tt>.
+ * @return The name of the program.
+ */
+std::string get_prgname();
+
+/** Sets the name of the program.
+ * @param prgname The name of the program.
+ */
+void set_prgname(const std::string& prgname);
+
+/** Returns the value of an environment variable. The name and value
+ * are in the GLib file name encoding. On Unix, this means the actual
+ * bytes which might or might not be in some consistent character set
+ * and encoding. On Windows, it is in UTF-8. On Windows, in case the
+ * environment variable's value contains references to other
+ * environment variables, they are expanded.
+ *
+ * @param variable The environment variable to get.
+ * @retval found <tt>true</tt> Whether the environment variable has been found.
+ * @return The value of the environment variable, or <tt>""</tt> if not found.
+ */
+std::string getenv(const std::string& variable, bool& found);
+
+/** Returns the value of an environment variable. The name and value
+ * are in the GLib file name encoding. On Unix, this means the actual
+ * bytes which might or might not be in some consistent character set
+ * and encoding. On Windows, it is in UTF-8. On Windows, in case the
+ * environment variable's value contains references to other
+ * environment variables, they are expanded.
+ *
+ * @param variable The environment variable to get.
+ * @return The value of the environment variable, or <tt>""</tt> if not found.
+ */
+std::string getenv(const std::string& variable);
+
+
+/** Sets an environment variable. Both the variable's name and value
+ * should be in the GLib file name encoding. On Unix, this means that
+ * they can be any sequence of bytes. On Windows, they should be in
+ * UTF-8.
+ *
+ * Note that on some systems, when variables are overwritten, the memory
+ * used for the previous variables and its value isn't reclaimed.
+ *
+ * @param variable The environment variable to set. It must not contain '='.
+ * @param value The value to which the variable should be set.
+ * @param overwrite Whether to change the variable if it already exists.
+ * @result false if the environment variable couldn't be set.
+ */
+bool setenv(const std::string& variable, const std::string& value, bool overwrite = true);
+
+/** Removes an environment variable from the environment.
+ *
+ * Note that on some systems, when variables are overwritten, the memory
+ * used for the previous variables and its value isn't reclaimed.
+ * Furthermore, this function can't be guaranteed to operate in a
+ * threadsafe way.
+ *
+ * @param variable: the environment variable to remove. It must not contain '='.
+ **/
+void unsetenv(const std::string& variable);
+
+/** Gets the user name of the current user.
+ * @return The name of the current user.
+ */
+std::string get_user_name();
+
+/** Gets the real name of the user.
+ * This usually comes from the user's entry in the <tt>passwd</tt> file.
+ * @return The user's real name.
+ */
+std::string get_real_name();
+
+/** Gets the current user's home directory.
+ * @return The current user's home directory.
+ */
+std::string get_home_dir();
+
+/** Gets the directory to use for temporary files.
+ * This is found from inspecting the environment variables <tt>TMPDIR</tt>,
+ * <tt>TMP</tt>, and <tt>TEMP</tt> in that order. If none of those are defined
+ * <tt>"/tmp"</tt> is returned on UNIX and <tt>"C:\\"</tt> on Windows.
+ * @return The directory to use for temporary files.
+ */
+std::string get_tmp_dir();
+
+/** Gets the current directory.
+ * @return The current directory.
+ */
+std::string get_current_dir();
+
+/** Returns @c true if the given @a filename is an absolute file name, i.e.\ it
+ * contains a full path from the root directory such as <tt>"/usr/local"</tt>
+ * on UNIX or <tt>"C:\\windows"</tt> on Windows systems.
+ * @param filename A file name.
+ * @return Whether @a filename is an absolute path.
+ */
+bool path_is_absolute(const std::string& filename);
+
+/** Returns the remaining part of @a filename after the root component,
+ * i.e.\ after the <tt>"/"</tt> on UNIX or <tt>"C:\\"</tt> on Windows.
+ * If @a filename is not an absolute path, <tt>""</tt> will be returned.
+ * @param filename A file name.
+ * @return The file name without the root component, or <tt>""</tt>.
+ */
+std::string path_skip_root(const std::string& filename);
+
+/** Gets the name of the file without any leading directory components.
+ * @param filename The name of the file.
+ * @return The name of the file without any leading directory components.
+ */
+std::string path_get_basename(const std::string& filename);
+
+/** Gets the directory components of a file name.
+ * If the file name has no directory components <tt>"."</tt> is returned.
+ * @param filename The name of the file.
+ * @return The directory components of the file.
+ */
+std::string path_get_dirname(const std::string& filename);
+
+/** Creates a filename from a series of elements using the correct
+ * separator for filenames.
+ * This function behaves identically to Glib::build_path(G_DIR_SEPARATOR_S,
+ * elements). No attempt is made to force the resulting filename to be an
+ * absolute path. If the first element is a relative path, the result will
+ * be a relative path.
+ * @param elements A container holding the elements of the path to build.
+ * Any STL compatible container type is accepted.
+ * @return The resulting path.
+ */
+std::string build_filename(const Glib::ArrayHandle<std::string>& elements);
+
+/** Creates a filename from two elements using the correct separator for filenames.
+ * No attempt is made to force the resulting filename to be an absolute path.
+ * If the first element is a relative path, the result will be a relative path.
+ * @param elem1 First path element.
+ * @param elem2 Second path element.
+ * @return The resulting path.
+ */
+std::string build_filename(const std::string& elem1, const std::string& elem2);
+
+/** Creates a path from a series of elements using @a separator as the
+ * separator between elements.
+ *
+ * At the boundary between two elements, any trailing occurrences of
+ * @a separator in the first element, or leading occurrences of @a separator
+ * in the second element are removed and exactly one copy of the separator is
+ * inserted.
+ *
+ * Empty elements are ignored.
+ *
+ * The number of leading copies of the separator on the result is
+ * the same as the number of leading copies of the separator on
+ * the first non-empty element.
+ *
+ * The number of trailing copies of the separator on the result is the same
+ * as the number of trailing copies of the separator on the last non-empty
+ * element. (Determination of the number of trailing copies is done without
+ * stripping leading copies, so if the separator is <tt>"ABA"</tt>,
+ * <tt>"ABABA"</tt> has 1 trailing copy.)
+ *
+ * However, if there is only a single non-empty element, and there
+ * are no characters in that element not part of the leading or
+ * trailing separators, then the result is exactly the original value
+ * of that element.
+ *
+ * Other than for determination of the number of leading and trailing
+ * copies of the separator, elements consisting only of copies
+ * of the separator are ignored.
+ *
+ * @param separator A string used to separate the elements of the path.
+ * @param elements A container holding the elements of the path to build.
+ * Any STL compatible container type is accepted.
+ * @return The resulting path.
+ */
+std::string build_path(const std::string& separator,
+ const Glib::ArrayHandle<std::string>& elements);
+
+/** Locates the first executable named @a program in the user's path, in the
+ * same way that <tt>execvp()</tt> would locate it.
+ * Returns a string with the absolute path name, or <tt>""</tt> if the program
+ * is not found in the path. If @a program is already an absolute path,
+ * returns a copy of @a program if @a program exists and is executable, and
+ * <tt>""</tt> otherwise.
+ *
+ * On Windows, if @a program does not have a file type suffix, tries to append
+ * the suffixes in the <tt>PATHEXT</tt> environment variable (if that doesn't
+ * exist, the suffixes .com, .exe, and .bat) in turn, and then look for the
+ * resulting file name in the same way as CreateProcess() would. This means
+ * first in the directory where the program was loaded from, then in the
+ * current directory, then in the Windows 32-bit system directory, then in the
+ * Windows directory, and finally in the directories in the <tt>PATH</tt>
+ * environment variable. If the program is found, the return value contains
+ * the full name including the type suffix.
+ *
+ * @param program A program name.
+ * @return An absolute path, or <tt>""</tt>.
+ */
+std::string find_program_in_path(const std::string& program);
+
+/** @} group MiscUtils */
+
+} // namespace Glib
+
+
+#endif /* _GLIBMM_FILEUTILS_H */
+
diff --git a/libs/glibmm2/glibmm/module.cc b/libs/glibmm2/glibmm/module.cc
new file mode 100644
index 0000000000..3bc621ff73
--- /dev/null
+++ b/libs/glibmm2/glibmm/module.cc
@@ -0,0 +1,93 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <glibmm/module.h>
+#include <glibmm/private/module_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/utility.h>
+#include <gmodule.h>
+
+namespace Glib
+{
+
+Module::Module(const std::string& file_name, ModuleFlags flags)
+:
+ gobject_ (g_module_open(file_name.c_str(), (GModuleFlags) flags))
+{}
+
+Module::~Module()
+{
+ if(gobject_)
+ g_module_close(gobject_);
+}
+
+Module::operator bool() const
+{
+ return (gobject_ != 0);
+}
+
+} // namespace Glib
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+
+bool Module::get_supported()
+{
+ return g_module_supported();
+}
+
+void Module::make_resident()
+{
+ g_module_make_resident(gobj());
+}
+
+std::string Module::get_last_error()
+{
+ return Glib::convert_const_gchar_ptr_to_stdstring(g_module_error());
+}
+
+bool Module::get_symbol(const std::string& symbol_name, void*& symbol) const
+{
+ return g_module_symbol(const_cast<GModule*>(gobj()), symbol_name.c_str(), &(symbol));
+}
+
+std::string Module::get_name() const
+{
+ return Glib::convert_const_gchar_ptr_to_stdstring(g_module_name(const_cast<GModule*>(gobj())));
+}
+
+std::string Module::build_path(const std::string& directory, const std::string& module_name)
+{
+ return Glib::convert_return_gchar_ptr_to_stdstring(g_module_build_path(directory.c_str(), module_name.c_str()));
+}
+
+
+} // namespace Glib
+
+
diff --git a/libs/glibmm2/glibmm/module.h b/libs/glibmm2/glibmm/module.h
new file mode 100644
index 0000000000..0c73bc9a81
--- /dev/null
+++ b/libs/glibmm2/glibmm/module.h
@@ -0,0 +1,221 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GLIBMM_MODULE_H
+#define _GLIBMM_MODULE_H
+
+
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#include <glibmmconfig.h>
+#include <string>
+
+GLIBMM_USING_STD(string)
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C" { typedef struct _GModule GModule; }
+#endif
+
+
+namespace Glib
+{
+
+/** @addtogroup glibmmEnums Enums and Flags */
+
+/**
+ * @ingroup glibmmEnums
+ * @par Bitwise operators:
+ * <tt>%ModuleFlags operator|(ModuleFlags, ModuleFlags)</tt><br>
+ * <tt>%ModuleFlags operator&(ModuleFlags, ModuleFlags)</tt><br>
+ * <tt>%ModuleFlags operator^(ModuleFlags, ModuleFlags)</tt><br>
+ * <tt>%ModuleFlags operator~(ModuleFlags)</tt><br>
+ * <tt>%ModuleFlags& operator|=(ModuleFlags&, ModuleFlags)</tt><br>
+ * <tt>%ModuleFlags& operator&=(ModuleFlags&, ModuleFlags)</tt><br>
+ * <tt>%ModuleFlags& operator^=(ModuleFlags&, ModuleFlags)</tt><br>
+ */
+enum ModuleFlags
+{
+ MODULE_BIND_LAZY = 1 << 0,
+ MODULE_BIND_MASK = 0x01
+};
+
+/** @ingroup glibmmEnums */
+inline ModuleFlags operator|(ModuleFlags lhs, ModuleFlags rhs)
+ { return static_cast<ModuleFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
+
+/** @ingroup glibmmEnums */
+inline ModuleFlags operator&(ModuleFlags lhs, ModuleFlags rhs)
+ { return static_cast<ModuleFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
+
+/** @ingroup glibmmEnums */
+inline ModuleFlags operator^(ModuleFlags lhs, ModuleFlags rhs)
+ { return static_cast<ModuleFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
+
+/** @ingroup glibmmEnums */
+inline ModuleFlags operator~(ModuleFlags flags)
+ { return static_cast<ModuleFlags>(~static_cast<unsigned>(flags)); }
+
+/** @ingroup glibmmEnums */
+inline ModuleFlags& operator|=(ModuleFlags& lhs, ModuleFlags rhs)
+ { return (lhs = static_cast<ModuleFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
+
+/** @ingroup glibmmEnums */
+inline ModuleFlags& operator&=(ModuleFlags& lhs, ModuleFlags rhs)
+ { return (lhs = static_cast<ModuleFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
+
+/** @ingroup glibmmEnums */
+inline ModuleFlags& operator^=(ModuleFlags& lhs, ModuleFlags rhs)
+ { return (lhs = static_cast<ModuleFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
+
+
+//TODO: Replace get_last_error() with exceptions?
+//Provide operator()?
+
+/** Dynamic Loading of Modules
+ * These functions provide a portable way to dynamically load object
+ * files (commonly known as 'plug-ins'). The current implementation
+ * supports all systems that provide an implementation of dlopen()
+ * (e.g. Linux/Sun), as well as HP-UX via its shl_load() mechanism,
+ * and Windows platforms via DLLs.
+ */
+class Module
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Module CppObjectType;
+ typedef GModule BaseObjectType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+private:
+
+
+public:
+
+ /** Opens a module.
+ *
+ * First of all it tries to open file_name as a module. If that
+ * fails and file_name has the ".la"-suffix (and is a libtool
+ * archive) it tries to open the corresponding module. If that fails
+ * and it doesn't have the proper module suffix for the platform
+ * (G_MODULE_SUFFIX), this suffix will be appended and the
+ * corresponding module will be opended. If that fails and file_name
+ * doesn't have the ".la"-suffix, this suffix is appended and
+ * it tries to open the corresponding module.
+ *
+ * Use operator bool() to see whether the operation succeeded. For instance,
+ * @code
+ * Glib::Module module("plugins/helloworld");
+ * if(module)
+ * {
+ * void* func = 0;
+ * bool found = get_symbol("some_function", func);
+ * }
+ * @endcode
+ *
+ * @param file_name The library filename to open
+ * @param flags Flags to configure the load process
+ */
+ explicit Module(const std::string& file_name, ModuleFlags flags = ModuleFlags(0));
+
+ /** Close a module. The module will be removed from memory, unless
+ * <tt>make_resident</tt> has been called.
+ */
+ virtual ~Module();
+
+ /** Check whether the module was found.
+ */
+ operator bool() const;
+
+ /** Checks if modules are supported on the current platform.
+ * @returns true if available, false otherwise
+ */
+
+ static bool get_supported();
+
+ /** Ensures that a module will never be unloaded. Any calls to the
+ * Glib::Module destructor will not unload the module.
+ */
+
+ void make_resident();
+
+ /** Gets a string describing the last module error.
+ * @returns The error string
+ */
+
+ static std::string get_last_error();
+
+ /** Gets a symbol pointer from the module.
+ * @param symbol_name The name of the symbol to lookup
+ * @param symbol A pointer to set to the symbol
+ * @returns True if the symbol was found, false otherwise.
+ */
+
+ bool get_symbol(const std::string& symbol_name, void*& symbol) const;
+
+ /** Get the name of the module.
+ * @returns The name of the module
+ */
+
+ std::string get_name() const;
+
+ /** A portable way to build the filename of a module. The
+ * platform-specific prefix and suffix are added to the filename, if
+ * needed, and the result is added to the directory, using the
+ * correct separator character.
+ *
+ * The directory should specify the directory where the module can
+ * be found. It can be an empty string to indicate that the
+ * module is in a standard platform-specific directory, though this
+ * is not recommended since the wrong module may be found.
+ *
+ * For example, calling <tt>g_module_build_path()</tt> on a Linux
+ * system with a directory of <tt>/lib</tt> and a module_name of
+ * "mylibrary" will return <tt>/lib/libmylibrary.so</tt>. On a
+ * Windows system, using <tt>\\Windows</tt> as the directory it will
+ * return <tt>\\Windows\\mylibrary.dll</tt>.
+ *
+ * @param directory The directory the module is in
+ * @param module_name The name of the module
+ * @returns The system-specific filename of the module
+ */
+ // TODO: add an override which doesn't take a directory
+ // TODO: check what happens when directory is ""
+
+ static std::string build_path(const std::string& directory, const std::string& module_name);
+
+ GModule* gobj() { return gobject_; }
+ const GModule* gobj() const { return gobject_; }
+
+protected:
+ GModule* gobject_;
+
+private:
+ // noncopyable
+ Module(const Module&);
+ Module& operator=(const Module&);
+
+
+};
+
+} // namespace Glib
+
+
+#endif /* _GLIBMM_MODULE_H */
+
diff --git a/libs/glibmm2/glibmm/object.cc b/libs/glibmm2/glibmm/object.cc
new file mode 100644
index 0000000000..007002b779
--- /dev/null
+++ b/libs/glibmm2/glibmm/object.cc
@@ -0,0 +1,312 @@
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/object.h>
+#include <glibmm/private/object_p.h>
+#include <glibmm/property.h>
+
+#include <glib.h>
+#include <glib-object.h>
+#include <gobject/gvaluecollector.h>
+
+#include <cstdarg>
+
+#include <cstring>
+
+//Weak references:
+//I'm not sure what the point of these are apart from being a hacky way out of circular references,
+//but maybe we could make it easier to use them by making a Java Reference Object -style class like so:
+// Glib::WeakRef<SomeDerivedObject> weakrefSomeObject(object1);
+// ...
+// if(weakrefSomeObject->isStillAlive())
+// {
+// weakrefSomeObject->some_method();
+// }
+// else
+// {
+// //Deal with it, maybe recreating the object.
+// }
+//
+// Without this, the coder has to define his own signal handler which sets his own isStillAlive boolean.
+// weakrefSomeObject<> could still have its own signal_destroyed signal so that coders can choose to deal
+// with the destruction as soon as it happens instead of just checking later before they try to use it.
+
+
+namespace Glib
+{
+
+ConstructParams::ConstructParams(const Glib::Class& glibmm_class_)
+:
+ glibmm_class (glibmm_class_),
+ n_parameters (0),
+ parameters (0)
+{}
+
+/* The implementation is mostly copied from gobject.c, with some minor tweaks.
+ * Basically, it looks up each property name to get its GType, and then uses
+ * G_VALUE_COLLECT() to store the varargs argument in a GValue of the correct
+ * type.
+ */
+ConstructParams::ConstructParams(const Glib::Class& glibmm_class_,
+ const char* first_property_name, ...)
+:
+ glibmm_class (glibmm_class_),
+ n_parameters (0),
+ parameters (0)
+{
+ va_list var_args;
+ va_start(var_args, first_property_name);
+
+ GObjectClass *const g_class =
+ static_cast<GObjectClass*>(g_type_class_ref(glibmm_class.get_type()));
+
+ unsigned int n_alloced_params = 0;
+ char* collect_error = 0; // output argument of G_VALUE_COLLECT()
+
+ for(const char* name = first_property_name;
+ name != 0;
+ name = va_arg(var_args, char*))
+ {
+ GParamSpec *const pspec = g_object_class_find_property(g_class, name);
+
+ if(!pspec)
+ {
+ g_warning("Glib::ConstructParams::ConstructParams(): "
+ "object class `%s' has no property named `%s'",
+ g_type_name(glibmm_class.get_type()), name);
+ break;
+ }
+
+ if(n_parameters >= n_alloced_params)
+ parameters = g_renew(GParameter, parameters, n_alloced_params += 8);
+
+ GParameter& param = parameters[n_parameters];
+
+ param.name = name;
+ param.value.g_type = 0;
+
+ // Fill the GValue with the current vararg, and move on to the next one.
+ g_value_init(&param.value, G_PARAM_SPEC_VALUE_TYPE(pspec));
+ G_VALUE_COLLECT(&param.value, var_args, 0, &collect_error);
+
+ if(collect_error)
+ {
+ g_warning("Glib::ConstructParams::ConstructParams(): %s", collect_error);
+ g_free(collect_error);
+ g_value_unset(&param.value);
+ break;
+ }
+
+ ++n_parameters;
+ }
+
+ g_type_class_unref(g_class);
+
+ va_end(var_args);
+}
+
+ConstructParams::~ConstructParams()
+{
+ while(n_parameters > 0)
+ g_value_unset(&parameters[--n_parameters].value);
+
+ g_free(parameters);
+}
+
+/*
+ * Some compilers require the existance of a copy constructor in certain
+ * usage contexts. This implementation is fully functional, but unlikely
+ * to be ever actually called due to optimization.
+ */
+ConstructParams::ConstructParams(const ConstructParams& other)
+:
+ glibmm_class (other.glibmm_class),
+ n_parameters (other.n_parameters),
+ parameters (g_new(GParameter, n_parameters))
+{
+ for(unsigned int i = 0; i < n_parameters; ++i)
+ {
+ parameters[i].name = other.parameters[i].name;
+ parameters[i].value.g_type = 0;
+
+ g_value_init(&parameters[i].value, G_VALUE_TYPE(&other.parameters[i].value));
+ g_value_copy(&other.parameters[i].value, &parameters[i].value);
+ }
+}
+
+
+/**** Glib::Object_Class ***************************************************/
+
+const Glib::Class& Object_Class::init()
+{
+ if(!gtype_)
+ {
+ class_init_func_ = &Object_Class::class_init_function;
+ register_derived_type(G_TYPE_OBJECT);
+ }
+
+ return *this;
+}
+
+void Object_Class::class_init_function(void*, void*)
+{}
+
+Object* Object_Class::wrap_new(GObject* object)
+{
+ return new Object(object);
+}
+
+
+/**** Glib::Object *********************************************************/
+
+// static data
+Object::CppClassType Object::object_class_;
+
+Object::Object()
+{
+ // This constructor is ONLY for derived classes that are NOT wrappers of
+ // derived C objects. For instance, Gtk::Object should NOT use this
+ // constructor.
+
+ //g_warning("Object::Object(): Did you really mean to call this?");
+
+ // If Glib::ObjectBase has been constructed with a custom typeid, we derive
+ // a new GType on the fly. This works because ObjectBase is a virtual base
+ // class, therefore its constructor is always executed first.
+
+ GType object_type = G_TYPE_OBJECT; // the default -- not very useful
+
+ if(custom_type_name_ && !is_anonymous_custom_())
+ {
+ object_class_.init();
+ object_type = object_class_.clone_custom_type(custom_type_name_); //A type that is derived from GObject.
+ }
+
+ // Create a new GObject with the specified array of construct properties.
+ // This works with custom types too, since those inherit the properties of
+ // their base class.
+
+ void *const new_object = g_object_newv(object_type, 0, 0);
+
+ // Connect the GObject and Glib::Object instances.
+ ObjectBase::initialize(static_cast<GObject*>(new_object));
+
+}
+
+Object::Object(const Glib::ConstructParams& construct_params)
+{
+ GType object_type = construct_params.glibmm_class.get_type();
+
+ // If Glib::ObjectBase has been constructed with a custom typeid, we derive
+ // a new GType on the fly. This works because ObjectBase is a virtual base
+ // class, therefore its constructor is always executed first.
+
+ if(custom_type_name_ && !is_anonymous_custom_())
+ object_type = construct_params.glibmm_class.clone_custom_type(custom_type_name_);
+
+ // Create a new GObject with the specified array of construct properties.
+ // This works with custom types too, since those inherit the properties of
+ // their base class.
+
+ void *const new_object = g_object_newv(
+ object_type, construct_params.n_parameters, construct_params.parameters);
+
+ // Connect the GObject and Glib::Object instances.
+ ObjectBase::initialize(static_cast<GObject*>(new_object));
+}
+
+Object::Object(GObject* castitem)
+{
+ //I disabled this check because libglademm really does need to do this.
+ //(actually it tells libglade to instantiate "gtkmm_" types.
+ //The 2nd instance bug will be caught elsewhere anyway.
+/*
+ static const char gtkmm_prefix[] = "gtkmm__";
+ const char *const type_name = G_OBJECT_TYPE_NAME(castitem);
+
+ if(strncmp(type_name, gtkmm_prefix, sizeof(gtkmm_prefix) - 1) == 0)
+ {
+ g_warning("Glib::Object::Object(GObject*): "
+ "An object of type '%s' was created directly via g_object_new(). "
+ "The Object::Object(const Glib::ConstructParams&) constructor "
+ "should be used instead.\n"
+ "This could happen if the C instance lived longer than the C++ instance, so that "
+ "a second C++ instance was created automatically to wrap it. That would be a gtkmm bug that you should report.",
+ type_name);
+ }
+*/
+
+ // Connect the GObject and Glib::Object instances.
+ ObjectBase::initialize(castitem);
+}
+
+Object::~Object()
+{
+ cpp_destruction_in_progress_ = true;
+}
+
+/*
+RefPtr<Object> Object::create()
+{
+ // Derived classes will actually return RefPtr<>s that contain useful instances.
+ return RefPtr<Object>();
+}
+*/
+
+GType Object::get_type()
+{
+ return object_class_.init().get_type();
+}
+
+GType Object::get_base_type()
+{
+ return G_TYPE_OBJECT;
+}
+
+// Data services
+void* Object::get_data(const QueryQuark& id)
+{
+ return g_object_get_qdata(gobj(),id);
+}
+
+void Object::set_data(const Quark& id, void* data)
+{
+ g_object_set_qdata(gobj(),id,data);
+}
+
+void Object::set_data(const Quark& id, void* data, DestroyNotify destroy)
+{
+ g_object_set_qdata_full(gobj(), id, data, destroy);
+}
+
+void Object::remove_data(const QueryQuark& id)
+{
+ // missing in glib??
+ g_return_if_fail(id.id() > 0);
+ g_datalist_id_remove_data(&gobj()->qdata, id);
+}
+
+void* Object::steal_data(const QueryQuark& id)
+{
+ return g_object_steal_qdata(gobj(), id);
+}
+
+} // namespace Glib
+
diff --git a/libs/glibmm2/glibmm/object.h b/libs/glibmm2/glibmm/object.h
new file mode 100644
index 0000000000..3f196f9cc5
--- /dev/null
+++ b/libs/glibmm2/glibmm/object.h
@@ -0,0 +1,282 @@
+// -*- c++ -*-
+#ifndef _GLIBMM_OBJECT_H
+#define _GLIBMM_OBJECT_H
+/* $Id$ */
+
+/* Copyright 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/objectbase.h>
+#include <glibmm/wrap.h>
+#include <glibmm/quark.h>
+#include <glibmm/refptr.h>
+#include <glibmm/utility.h> /* Could be private, but that would be tedious. */
+#include <glibmm/containerhandle_shared.h> //Because its specializations may be here.
+#include <glibmm/value.h>
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C"
+{
+typedef struct _GObject GObject;
+typedef struct _GObjectClass GObjectClass;
+}
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Glib
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+class Class;
+class Object_Class;
+class GSigConnectionNode;
+
+/* ConstructParams::ConstructParams() takes a varargs list of properties
+ * and values, like g_object_new() does. This list will then be converted
+ * to a GParameter array, for use with g_object_newv(). No overhead is
+ * involved, since g_object_new() is just a wrapper around g_object_newv()
+ * as well.
+ *
+ * The advantage of an auxilary ConstructParams object over g_object_new()
+ * is that the actual construction is always done in the Glib::Object ctor.
+ * This allows for neat tricks like easy creation of derived custom types,
+ * without adding special support to each ctor of every class.
+ *
+ * The comments in object.cc and objectbase.cc should explain in detail
+ * how this works.
+ */
+class ConstructParams
+{
+public:
+ const Glib::Class& glibmm_class;
+ unsigned int n_parameters;
+ GParameter* parameters;
+
+ explicit ConstructParams(const Glib::Class& glibmm_class_);
+ ConstructParams(const Glib::Class& glibmm_class_, const char* first_property_name, ...);
+ ~ConstructParams();
+
+ // This is only used by the C++ compiler (since g++ 3.4) to create temporary instances.
+ // Apparently the compiler will actually optimize away the use of this.
+ // See bug #132300.
+ ConstructParams(const ConstructParams& other);
+
+private:
+ // noncopyable
+ ConstructParams& operator=(const ConstructParams&);
+};
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+class Object : virtual public ObjectBase
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Object CppObjectType;
+ typedef Object_Class CppClassType;
+ typedef GObject BaseObjectType;
+ typedef GObjectClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+protected:
+ Object(); //For use by C++-only sub-types.
+ explicit Object(const Glib::ConstructParams& construct_params);
+ explicit Object(GObject* castitem);
+ virtual ~Object(); //It should only be deleted by the callback.
+
+public:
+ //static RefPtr<Object> create(); //You must reimplement this in each derived class.
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ //GObject* gobj_copy(); //Give a ref-ed copy to someone. Use for direct struct access.
+
+ // Glib::Objects contain a list<Quark, pair<void*, DestroyNotify> >
+ // to store run time data added to the object at run time.
+ //TODO: Use slots instead:
+ void* get_data(const QueryQuark &key);
+ void set_data(const Quark &key, void* data);
+ typedef void (*DestroyNotify) (gpointer data);
+ void set_data(const Quark &key, void* data, DestroyNotify notify);
+ void remove_data(const QueryQuark& quark);
+ // same as remove without notifying
+ void* steal_data(const QueryQuark& quark);
+
+ // convenience functions
+ //template <class T>
+ //void set_data_typed(const Quark& quark, const T& data)
+ // { set_data(quark, new T(data), delete_typed<T>); }
+
+ //template <class T>
+ //T& get_data_typed(const QueryQuark& quark)
+ // { return *static_cast<T*>(get_data(quark)); }
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class Glib::Object_Class;
+ static CppClassType object_class_;
+
+ // noncopyable
+ Object(const Object&);
+ Object& operator=(const Object&);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ // Glib::Object can not be dynamic because it lacks a float state.
+ //virtual void set_manage();
+};
+
+
+//For some (proably, more spec-compliant) compilers, these specializations must
+//be next to the objects that they use.
+#ifndef GLIBMM_CAN_USE_DYNAMIC_CAST_IN_UNUSED_TEMPLATE_WITHOUT_DEFINITION
+#ifndef DOXYGEN_SHOULD_SKIP_THIS /* hide the specializations */
+
+namespace Container_Helpers
+{
+
+/** Partial specialization for pointers to GObject instances.
+ * @ingroup ContHelpers
+ * The C++ type is always a Glib::RefPtr<>.
+ */
+template <class T>
+struct TypeTraits< Glib::RefPtr<T> >
+{
+ typedef Glib::RefPtr<T> CppType;
+ typedef typename T::BaseObjectType * CType;
+ typedef typename T::BaseObjectType * CTypeNonConst;
+
+ static CType to_c_type (const CppType& ptr) { return Glib::unwrap(ptr); }
+ static CType to_c_type (CType ptr) { return ptr; }
+ static CppType to_cpp_type (CType ptr)
+ {
+ //return Glib::wrap(ptr, true);
+
+ //We copy/paste the wrap() implementation here,
+ //because we can not use a specific Glib::wrap(CType) overload here,
+ //because that would be "dependent", and g++ 3.4 does not allow that.
+ //The specific Glib::wrap() overloads don't do anything special anyway.
+ GObject* cobj = (GObject*)const_cast<CTypeNonConst>(ptr);
+ return Glib::RefPtr<T>( dynamic_cast<T*>(Glib::wrap_auto(cobj, true /* take_copy */)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+ }
+
+ static void release_c_type (CType ptr)
+ {
+ GLIBMM_DEBUG_UNREFERENCE(0, ptr);
+ g_object_unref(ptr);
+ }
+};
+
+//This confuse the SUN Forte compiler, so we ifdef it out:
+#ifdef GLIBMM_HAVE_DISAMBIGUOUS_CONST_TEMPLATE_SPECIALIZATIONS
+
+/** Partial specialization for pointers to const GObject instances.
+ * @ingroup ContHelpers
+ * The C++ type is always a Glib::RefPtr<>.
+ */
+template <class T>
+struct TypeTraits< Glib::RefPtr<const T> >
+{
+ typedef Glib::RefPtr<const T> CppType;
+ typedef const typename T::BaseObjectType * CType;
+ typedef typename T::BaseObjectType * CTypeNonConst;
+
+ static CType to_c_type (const CppType& ptr) { return Glib::unwrap(ptr); }
+ static CType to_c_type (CType ptr) { return ptr; }
+ static CppType to_cpp_type (CType ptr)
+ {
+ //return Glib::wrap(ptr, true);
+
+ //We copy/paste the wrap() implementation here,
+ //because we can not use a specific Glib::wrap(CType) overload here,
+ //because that would be "dependent", and g++ 3.4 does not allow that.
+ //The specific Glib::wrap() overloads don't do anything special anyway.
+ GObject* cobj = (GObject*)(ptr);
+ return Glib::RefPtr<const T>( dynamic_cast<const T*>(Glib::wrap_auto(cobj, true /* take_copy */)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+ }
+
+ static void release_c_type (CType ptr)
+ {
+ GLIBMM_DEBUG_UNREFERENCE(0, ptr);
+ g_object_unref(const_cast<CTypeNonConst>(ptr));
+ }
+};
+
+#endif //GLIBMM_HAVE_DISAMBIGUOUS_CONST_TEMPLATE_SPECIALIZATIONS
+
+} //namespace Container_Helpers
+
+
+template <class T, class PtrT> inline
+PtrT Value_Pointer<T,PtrT>::get_(Glib::Object*) const
+{
+ return dynamic_cast<T*>(get_object());
+}
+
+
+/** Partial specialization for RefPtr<> to Glib::Object.
+ * @ingroup glibmmValue
+ */
+template <class T>
+class Value< Glib::RefPtr<T> > : public ValueBase_Object
+{
+public:
+ typedef Glib::RefPtr<T> CppType;
+ typedef typename T::BaseObjectType* CType;
+
+ static GType value_type() { return T::get_base_type(); }
+
+ void set(const CppType& data) { set_object(data.operator->()); }
+ CppType get() const { return Glib::RefPtr<T>::cast_dynamic(get_object_copy()); }
+};
+
+//The SUN Forte Compiler has a problem with this:
+#ifdef GLIBMM_HAVE_DISAMBIGUOUS_CONST_TEMPLATE_SPECIALIZATIONS
+
+/** Partial specialization for RefPtr<> to const Glib::Object.
+ * @ingroup glibmmValue
+ */
+template <class T>
+class Value< Glib::RefPtr<const T> > : public ValueBase_Object
+{
+public:
+ typedef Glib::RefPtr<const T> CppType;
+ typedef typename T::BaseObjectType* CType;
+
+ static GType value_type() { return T::get_base_type(); }
+
+ void set(const CppType& data) { set_object(const_cast<T*>(data.operator->())); }
+ CppType get() const { return Glib::RefPtr<T>::cast_dynamic(get_object_copy()); }
+};
+#endif //GLIBMM_HAVE_DISAMBIGUOUS_CONST_TEMPLATE_SPECIALIZATIONS
+
+
+#endif //DOXYGEN_SHOULD_SKIP_THIS
+#endif //GLIBMM_CAN_USE_DYNAMIC_CAST_IN_UNUSED_TEMPLATE_WITHOUT_DEFINITION
+
+} // namespace Glib
+
+#endif /* _GLIBMM_OBJECT_H */
+
diff --git a/libs/glibmm2/glibmm/objectbase.cc b/libs/glibmm2/glibmm/objectbase.cc
new file mode 100644
index 0000000000..1bb14e79fd
--- /dev/null
+++ b/libs/glibmm2/glibmm/objectbase.cc
@@ -0,0 +1,271 @@
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glib-object.h>
+
+#include <glibmm/quark.h>
+#include <glibmm/objectbase.h>
+
+
+namespace
+{
+
+// Used by the Glib::ObjectBase default ctor. Using an explicitly defined
+// char array rather than a string literal allows for fast pointer comparison,
+// which is otherwise not guaranteed to work.
+
+const char anonymous_custom_type_name[] = "gtkmm__anonymous_custom_type";
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+/**** Glib::ObjectBase *****************************************************/
+
+ObjectBase::ObjectBase()
+:
+ gobject_ (0),
+ custom_type_name_ (anonymous_custom_type_name),
+ cpp_destruction_in_progress_ (false)
+{}
+
+ObjectBase::ObjectBase(const char* custom_type_name)
+:
+ gobject_ (0),
+ custom_type_name_ (custom_type_name),
+ cpp_destruction_in_progress_ (false)
+{}
+
+ObjectBase::ObjectBase(const std::type_info& custom_type_info)
+:
+ gobject_ (0),
+ custom_type_name_ (custom_type_info.name()),
+ cpp_destruction_in_progress_ (false)
+{}
+
+// initialize() actually initializes the wrapper. Glib::ObjectBase is used
+// as virtual base class, which means the most-derived class' ctor invokes
+// the Glib::ObjectBase ctor -- thus it's useless for Glib::Object.
+//
+void ObjectBase::initialize(GObject* castitem)
+{
+ if(gobject_)
+ {
+ // initialize() might be called twice when used with MI, e.g. by the ctors
+ // of Glib::Object and Glib::Interface. However, they must both refer to
+ // the same underlying GObject instance.
+ //
+ g_assert(gobject_ == castitem);
+
+ // TODO: Think about it. Will this really be called twice?
+ g_printerr("ObjectBase::initialize() called twice for the same GObject\n");
+
+ return; // Don't initialize the wrapper twice.
+ }
+
+ //g_print("%s : %s\n", G_GNUC_PRETTY_FUNCTION, G_OBJECT_TYPE_NAME(castitem));
+
+ gobject_ = castitem;
+ _set_current_wrapper(castitem);
+}
+
+ObjectBase::~ObjectBase()
+{
+ // Normally, gobject_ should always be 0 at this point, because:
+ //
+ // a) Gtk::Object handles memory management on its own and always resets
+ // the gobject_ pointer in its destructor.
+ //
+ // b) Glib::Object instances that aren't Gtk::Objects will always be
+ // deleted by the destroy_notify_() virtual method. Calling delete
+ // on a Glib::Object is a programming error.
+ //
+ // The *only* situation where gobject_ is validly not 0 at this point
+ // happens if a derived class's ctor throws an exception. In that case
+ // we have to call g_object_unref() on our own.
+ //
+ if(GObject *const gobject = gobject_)
+ {
+#ifdef GLIBMM_DEBUG_REFCOUNTING
+ g_warning("(Glib::ObjectBase::~ObjectBase): gobject_ = %p", (void*) gobject_);
+#endif
+
+ gobject_ = 0;
+
+#ifdef GLIBMM_DEBUG_REFCOUNTING
+ g_warning("(Glib::ObjectBase::~ObjectBase): before g_object_steal_qdata()");
+#endif
+
+ // Remove the pointer to the wrapper from the underlying instance.
+ // This does _not_ cause invocation of the destroy_notify callback.
+ g_object_steal_qdata(gobject, quark_);
+
+#ifdef GLIBMM_DEBUG_REFCOUNTING
+ g_warning("(Glib::ObjectBase::~ObjectBase): calling g_object_unref()");
+#endif
+
+ g_object_unref(gobject);
+ }
+}
+
+void ObjectBase::reference() const
+{
+ GLIBMM_DEBUG_REFERENCE(this, gobject_);
+ g_object_ref(gobject_);
+}
+
+void ObjectBase::unreference() const
+{
+ GLIBMM_DEBUG_UNREFERENCE(this, gobject_);
+ g_object_unref(gobject_);
+}
+
+GObject* ObjectBase::gobj_copy() const
+{
+ reference();
+ return gobject_;
+}
+
+void ObjectBase::_set_current_wrapper(GObject* object)
+{
+ // Store a pointer to this wrapper in the underlying instance, so that we
+ // never create a second wrapper for the same underlying instance. Also,
+ // specify a callback that will tell us when it's time to delete this C++
+ // wrapper instance:
+
+ if(object)
+ {
+ if(!g_object_get_qdata(object, Glib::quark_))
+ {
+ g_object_set_qdata_full(object, Glib::quark_, this, &destroy_notify_callback_);
+ }
+ else
+ {
+ g_warning("This object, of type %s, already has a wrapper.\n"
+ "You should use wrap() instead of a constructor.",
+ G_OBJECT_TYPE_NAME(object));
+ }
+ }
+}
+
+// static
+ObjectBase* ObjectBase::_get_current_wrapper(GObject* object)
+{
+ if(object)
+ return static_cast<ObjectBase*>(g_object_get_qdata(object, Glib::quark_));
+ else
+ return 0;
+}
+
+// static
+void ObjectBase::destroy_notify_callback_(void* data)
+{
+ //GLIBMM_LIFECYCLE
+
+ // This method is called (indirectly) from g_object_run_dispose().
+ // Get the C++ instance associated with the C instance:
+ ObjectBase* cppObject = static_cast<ObjectBase*>(data); //Previously set with g_object_set_qdata_full().
+
+#ifdef GLIBMM_DEBUG_REFCOUNTING
+ g_warning("ObjectBase::destroy_notify_callback_: cppObject = %p, gobject_ = %p, gtypename = %s",
+ (void*) cppObject, (void*) cppObject->gobject_, cppObject->gobject_);
+#endif
+
+ if(cppObject) //This will be 0 if the C++ destructor has already run.
+ {
+ cppObject->destroy_notify_(); //Virtual - it does different things for GObject and GtkObject.
+ }
+}
+
+void ObjectBase::destroy_notify_()
+{
+ // The C instance is about to be disposed, making it unusable. Now is a
+ // good time to delete the C++ wrapper of the C instance. There is no way
+ // to force the disposal of the GObject (though GtkObject has
+ // gtk_object_destroy()), So this is the *only* place where we delete the
+ // C++ wrapper.
+ //
+ // This will only happen after the last unreference(), which will be done by
+ // the RefPtr<> destructor. There should be no way to access the wrapper or
+ // the undobjecterlying instance after that, so it's OK to delete this.
+
+#ifdef GLIBMM_DEBUG_REFCOUNTING
+ g_warning("Glib::ObjectBase::destroy_notify_: gobject_ = %p", (void*) gobject_);
+#endif
+
+ gobject_ = 0; // Make sure we don't unref it again in the dtor.
+
+ delete this;
+}
+
+bool ObjectBase::is_anonymous_custom_() const
+{
+ // Doing high-speed pointer comparison is OK here.
+ return (custom_type_name_ == anonymous_custom_type_name);
+}
+
+bool ObjectBase::is_derived_() const
+{
+ // gtkmmproc-generated classes initialize this to 0 by default.
+ return (custom_type_name_ != 0);
+}
+
+void ObjectBase::set_manage()
+{
+ // This is a private method and Gtk::manage() is a template function.
+ // Thus this will probably never run, unless you do something like:
+ //
+ // manage(static_cast<Gtk::Object*>(refptr.operator->()));
+
+ g_error("Glib::ObjectBase::set_manage(): "
+ "only Gtk::Object instances can be managed");
+}
+
+bool ObjectBase::_cpp_destruction_is_in_progress() const
+{
+ return cpp_destruction_in_progress_;
+}
+
+void ObjectBase::set_property_value(const Glib::ustring& property_name, const Glib::ValueBase& value)
+{
+ g_object_set_property(gobj(), property_name.c_str(), value.gobj());
+}
+
+void ObjectBase::get_property_value(const Glib::ustring& property_name, Glib::ValueBase& value) const
+{
+ g_object_get_property(const_cast<GObject*>(gobj()), property_name.c_str(), value.gobj());
+}
+
+
+bool _gobject_cppinstance_already_deleted(GObject* gobject)
+{
+ //This function is used to prevent calling wrap() on a GTK+ instance whose gtkmm instance has been deleted.
+
+ if(gobject)
+ return (bool)g_object_get_qdata(gobject, Glib::quark_cpp_wrapper_deleted_); //true means that something is odd.
+ else
+ return false; //Nothing is particularly wrong.
+}
+
+
+} // namespace Glib
+
diff --git a/libs/glibmm2/glibmm/objectbase.h b/libs/glibmm2/glibmm/objectbase.h
new file mode 100644
index 0000000000..bddfdcf6ca
--- /dev/null
+++ b/libs/glibmm2/glibmm/objectbase.h
@@ -0,0 +1,171 @@
+// -*- c++ -*-
+#ifndef _GLIBMM_OBJECTBASE_H
+#define _GLIBMM_OBJECTBASE_H
+
+/* $Id$ */
+
+/* Copyright 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/signalproxy.h>
+#include <glibmm/propertyproxy.h>
+#include <sigc++/trackable.h>
+#include <typeinfo>
+#include <glibmmconfig.h>
+#include <glibmm/debug.h>
+
+GLIBMM_USING_STD(type_info)
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C" { typedef struct _GObject GObject; }
+#endif
+
+
+namespace Glib
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+class GSigConnectionNode;
+#endif
+
+//This inherits virtually from sigc::trackable so that people can multiply inherit glibmm classes from other sigc::trackable-derived classes.
+//See bugzilla.gnome.org bug # 116280
+class ObjectBase : virtual public sigc::trackable
+{
+protected:
+ // Glib::ObjectBase is used as virtual base class. This means the ObjectBase
+ // ctor runs before all others -- either implicitly or explicitly. Each of
+ // the available ctors initializes custom_type_name_ in a different way:
+ //
+ // 1) default: custom_type_name_ = "gtkmm__anonymous_custom_type"
+ // 2) const char*: custom_type_name_ = custom_type_name
+ // 3) type_info: custom_type_name_ = custom_type_info.name()
+ //
+ // All classes generated by gtkmmproc use ctor 2) with custom_type_name = 0,
+ // which essentially means it's not a custom type. This is used to optimize
+ // vfunc and signal handler callbacks -- since the C++ virtual methods are
+ // not overridden, invocation can be skipped.
+ //
+ // The default ctor 1) is called implicitly from the ctor of user-derived
+ // classes -- yes, even if e.g. Gtk::Button calls ctor 2), a derived ctor
+ // always overrides this choice. The language itself ensures that the ctor
+ // is only invoked once.
+ //
+ // Ctor 3) is a special feature to allow creation of derived types on the
+ // fly, without having to use g_object_new() manually. This feature is
+ // sometimes necessary, e.g. to implement a custom Gtk::CellRenderer. The
+ // neat trick with the virtual base class ctor makes it possible to reuse
+ // the same direct base class' ctor as with non-custom types.
+
+ ObjectBase();
+ explicit ObjectBase(const char* custom_type_name);
+ explicit ObjectBase(const std::type_info& custom_type_info);
+
+ virtual ~ObjectBase() = 0;
+
+ // Called by Glib::Object and Glib::Interface constructors. See comments there.
+ void initialize(GObject* castitem);
+
+public:
+
+ /// You probably want to use a specific property_*() accessor method instead.
+ void set_property_value(const Glib::ustring& property_name, const Glib::ValueBase& value);
+
+ /// You probably want to use a specific property_*() accessor method instead.
+ void get_property_value(const Glib::ustring& property_name, Glib::ValueBase& value) const;
+
+ /// You probably want to use a specific property_*() accessor method instead.
+ template <class PropertyType>
+ void set_property(const Glib::ustring& property_name, const PropertyType& value);
+
+ /// You probably want to use a specific property_*() accessor method instead.
+ template <class PropertyType>
+ void get_property(const Glib::ustring& property_name, PropertyType& value) const;
+
+
+ virtual void reference() const;
+ virtual void unreference() const;
+
+ inline GObject* gobj() { return gobject_; }
+ inline const GObject* gobj() const { return gobject_; }
+
+ // Give a ref-ed copy to someone. Use for direct struct access.
+ GObject* gobj_copy() const;
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static ObjectBase* _get_current_wrapper(GObject* object);
+ bool _cpp_destruction_is_in_progress() const;
+#endif
+
+protected:
+ GObject* gobject_; // the GLib/GDK/GTK+ object instance
+ const char* custom_type_name_;
+ bool cpp_destruction_in_progress_;
+
+ bool is_anonymous_custom_() const;
+ bool is_derived_() const;
+
+ static void destroy_notify_callback_(void* data);
+ virtual void destroy_notify_();
+
+ void _set_current_wrapper(GObject* object);
+
+private:
+ // noncopyable
+ ObjectBase(const ObjectBase&);
+ ObjectBase& operator=(const ObjectBase&);
+
+ virtual void set_manage(); // calls g_error()
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ friend class Glib::GSigConnectionNode; // for GSigConnectionNode::notify()
+#endif
+};
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+template <class PropertyType>
+void ObjectBase::set_property(const Glib::ustring& property_name, const PropertyType& value)
+{
+ Glib::Value<PropertyType> property_value;
+ property_value.init(Glib::Value<PropertyType>::value_type());
+
+ property_value.set(value);
+ this->set_property_value(property_name, property_value);
+}
+
+template <class PropertyType>
+void ObjectBase::get_property(const Glib::ustring& property_name, PropertyType& value) const
+{
+ Glib::Value<PropertyType> property_value;
+ property_value.init(Glib::Value<PropertyType>::value_type());
+
+ this->get_property_value(property_name, property_value);
+
+ value = property_value.get();
+}
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+bool _gobject_cppinstance_already_deleted(GObject* gobject);
+
+} // namespace Glib
+
+
+#endif /* _GLIBMM_OBJECTBASE_H */
+
diff --git a/libs/glibmm2/glibmm/optioncontext.cc b/libs/glibmm2/glibmm/optioncontext.cc
new file mode 100644
index 0000000000..5a96ad414d
--- /dev/null
+++ b/libs/glibmm2/glibmm/optioncontext.cc
@@ -0,0 +1,141 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <glibmm/optioncontext.h>
+#include <glibmm/private/optioncontext_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/utility.h>
+#include <glib/goption.h>
+
+namespace Glib
+{
+
+
+OptionContext::OptionContext(const Glib::ustring& parameter_string)
+: gobject_( g_option_context_new(parameter_string.c_str()) ),
+ has_ownership_(true)
+{
+}
+
+OptionContext::OptionContext(GOptionContext* castitem, bool take_ownership)
+: gobject_(castitem),
+ has_ownership_(take_ownership)
+{
+}
+
+OptionContext::~OptionContext()
+{
+ if(has_ownership_)
+ g_option_context_free(gobj());
+
+ gobject_ = 0;
+}
+
+void OptionContext::add_group(OptionGroup& group)
+{
+ //Strangely, GObjectContext actually takes ownership of the GOptionGroup, deleting it later.
+ g_option_context_add_group(gobj(), (group).gobj_give_ownership());
+}
+
+void OptionContext::set_main_group(OptionGroup& group)
+{
+ //Strangely, GObjectContext actually takes ownership of the GOptionGroup, deleting it later.
+ g_option_context_set_main_group(gobj(), (group).gobj_give_ownership());
+}
+
+
+/*
+OptionGroup OptionContext::get_main_group() const
+{
+ const GOptionGroup* cobj = g_option_context_get_main_group(const_cast<GOptionContext*>( gobj()) );
+ OptionGroup cppObj(const_cast<GOptionGroup*>(cobj), true); // take_copy
+ return cppObj;
+}
+
+*/
+
+
+} // namespace Glib
+
+
+namespace
+{
+} // anonymous namespace
+
+
+Glib::OptionError::OptionError(Glib::OptionError::Code error_code, const Glib::ustring& error_message)
+:
+ Glib::Error (G_OPTION_ERROR, error_code, error_message)
+{}
+
+Glib::OptionError::OptionError(GError* gobject)
+:
+ Glib::Error (gobject)
+{}
+
+Glib::OptionError::Code Glib::OptionError::code() const
+{
+ return static_cast<Code>(Glib::Error::code());
+}
+
+void Glib::OptionError::throw_func(GError* gobject)
+{
+ throw Glib::OptionError(gobject);
+}
+
+
+namespace Glib
+{
+
+
+void OptionContext::set_help_enabled(bool help_enabled)
+{
+ g_option_context_set_help_enabled(gobj(), static_cast<int>(help_enabled));
+}
+
+bool OptionContext::get_help_enabled() const
+{
+ return g_option_context_get_help_enabled(const_cast<GOptionContext*>(gobj()));
+}
+
+void OptionContext::set_ignore_unknown_options(bool ignore_unknown)
+{
+ g_option_context_set_ignore_unknown_options(gobj(), static_cast<int>(ignore_unknown));
+}
+
+bool OptionContext::get_ignore_unknown_options() const
+{
+ return g_option_context_get_ignore_unknown_options(const_cast<GOptionContext*>(gobj()));
+}
+
+bool OptionContext::parse(int& argc, char**& argv)
+{
+ GError *error = 0;
+ bool retvalue = g_option_context_parse(gobj(), &argc, &(argv), &(error));
+ if(error) ::Glib::Error::throw_exception(error);
+ return retvalue;
+}
+
+
+} // namespace Glib
+
+
diff --git a/libs/glibmm2/glibmm/optioncontext.h b/libs/glibmm2/glibmm/optioncontext.h
new file mode 100644
index 0000000000..e621648935
--- /dev/null
+++ b/libs/glibmm2/glibmm/optioncontext.h
@@ -0,0 +1,197 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GLIBMM_OPTIONCONTEXT_H
+#define _GLIBMM_OPTIONCONTEXT_H
+
+
+/* $Id$ */
+
+/* Copyright (C) 2004 The glibmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#include <glibmm/optionentry.h>
+#include <glibmm/optiongroup.h>
+#include <glibmm/error.h>
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C" { typedef struct _GOptionContext GOptionContext; }
+#endif
+
+
+namespace Glib
+{
+
+/** Exception class for options.
+ */
+class OptionError : public Glib::Error
+{
+public:
+ enum Code
+ {
+ UNKNOWN_OPTION,
+ BAD_VALUE,
+ FAILED
+ };
+
+ OptionError(Code error_code, const Glib::ustring& error_message);
+ explicit OptionError(GError* gobject);
+ Code code() const;
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+private:
+ static void throw_func(GError* gobject);
+ friend void wrap_init(); // uses throw_func()
+#endif
+};
+
+
+/** An OptionContext defines which options are accepted by the commandline option parser.
+ */
+class OptionContext
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef OptionContext CppObjectType;
+ typedef GOptionContext BaseObjectType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+private:
+
+public:
+
+ /** Creates a new option context.
+ * @param parameter_string A string which is displayed in the first line of --help output, after programname [OPTION...]
+ */
+ explicit OptionContext(const Glib::ustring& parameter_string = Glib::ustring());
+
+ //Note that, unlike Glib::Wrap(), this would create a second C++ instance for the same C instance,
+ //so it should be used carefully. For instance you could not access data in a derived class via this second instance.
+ explicit OptionContext(GOptionContext* castitem, bool take_ownership = false);
+ virtual ~OptionContext();
+
+
+ /** Enables or disables automatic generation of &lt;option&gt;--help&lt;/option&gt;
+ * output. By default, g_option_context_parse() recognizes
+ * &lt;option&gt;--help&lt;/option&gt;, &lt;option&gt;-?&lt;/option&gt;, &lt;option&gt;--help-all&lt;/option&gt;
+ * and &lt;option&gt;--help-&lt;/option&gt;&lt;replaceable&gt;groupname&lt;/replaceable&gt; and creates
+ * suitable output to stdout.
+ *
+ * Since: 2.6
+ * @param help_enabled <tt>true</tt> to enable &lt;option&gt;--help&lt;/option&gt;, <tt>false</tt> to disable it.
+ */
+ void set_help_enabled(bool help_enabled = true);
+
+ /** Returns whether automatic &lt;option&gt;--help&lt;/option&gt; generation
+ * is turned on for @a context . See g_option_context_set_help_enabled().
+ * @return <tt>true</tt> if automatic help generation is turned on.
+ *
+ * Since: 2.6.
+ */
+ bool get_help_enabled() const;
+
+ /** Sets whether to ignore unknown options or not. If an argument is
+ * ignored, it is left in the @a argv array after parsing. By default,
+ * g_option_context_parse() treats unknown options as error.
+ *
+ * This setting does not affect non-option arguments (i.e. arguments
+ * which don't start with a dash). But note that GOption cannot reliably
+ * determine whether a non-option belongs to a preceding unknown option.
+ *
+ * Since: 2.6
+ * @param ignore_unknown <tt>true</tt> to ignore unknown options, <tt>false</tt> to produce
+ * an error when unknown options are met.
+ */
+ void set_ignore_unknown_options(bool ignore_unknown = true);
+
+ /** Returns whether unknown options are ignored or not. See
+ * g_option_context_set_ignore_unknown_options().
+ * @return <tt>true</tt> if unknown options are ignored.
+ *
+ * Since: 2.6.
+ */
+ bool get_ignore_unknown_options() const;
+
+
+ /** Parses the command line arguments, recognizing options
+ * which have been added to @a context . A side-effect of
+ * calling this function is that g_set_prgname() will be
+ * called.
+ *
+ * If the parsing is successful, any parsed arguments are
+ * removed from the array and @a argc and @a argv are updated
+ * accordingly. In case of an error, @a argc and @a argv are
+ * left unmodified.
+ *
+ * If automatic &lt;option&gt;--help&lt;/option&gt; support is enabled
+ * (see g_option_context_set_help_enabled()), and the
+ * @a argv array contains one of the recognized help options,
+ * this function will produce help output to stdout and
+ * call <tt>exit (0)</tt>.
+ * @param argc A pointer to the number of command line arguments.
+ * @param argv A pointer to the array of command line arguments.
+ * @param error A return location for errors.
+ * @return <tt>true</tt> if the parsing was successful,
+ * <tt>false</tt> if an error occurred
+ *
+ * Since: 2.6.
+ */
+ bool parse(int& argc, char**& argv);
+
+ //g_option_context_add_main_entries(), just creates a group internally, adds them to it, and does a set_main_group()
+ //- a group without callbacks seems to do some simple default parsing.
+
+
+ /** Adds an OptionGroup to the context, so that parsing with context will recognize the options in the group.
+ * Note that the group will not be copied, so it should exist for as long as the context exists.
+ *
+ * @param group The group to add.
+ */
+ void add_group(OptionGroup& group);
+
+
+ /** Sets an OptionGroup as the main group of the context. This has the same effect as calling add_group(), the only
+ * difference is that the options in the main group are treated differently when generating --help output.
+ * Note that the group will not be copied, so it should exist for as long as the context exists.
+ *
+ * @param group The group to add.
+ */
+ void set_main_group(OptionGroup& group);
+
+
+ //We don't need this (hopefully), and the memory management would be really awkward.
+ //OptionGroup& get_main_group();
+ //const OptionGroup& get_main_group() const;
+
+
+ GOptionContext* gobj() { return gobject_; }
+ const GOptionContext* gobj() const { return gobject_; }
+
+protected:
+
+ GOptionContext* gobject_;
+ bool has_ownership_;
+
+
+};
+
+
+} // namespace Glib
+
+
+#endif /* _GLIBMM_OPTIONCONTEXT_H */
+
diff --git a/libs/glibmm2/glibmm/optionentry.cc b/libs/glibmm2/glibmm/optionentry.cc
new file mode 100644
index 0000000000..7fd5c53c49
--- /dev/null
+++ b/libs/glibmm2/glibmm/optionentry.cc
@@ -0,0 +1,149 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <glibmm/optionentry.h>
+#include <glibmm/private/optionentry_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/utility.h>
+#include <glib/goption.h>
+#include <glib/gmem.h>
+
+namespace Glib
+{
+
+OptionEntry::OptionEntry()
+: gobject_( new GOptionEntry() )
+{
+ gobject_ = g_new0(GOptionEntry, 1);
+}
+
+OptionEntry::~OptionEntry()
+{
+ g_free(const_cast<char*>(gobject_->long_name));
+ g_free(const_cast<char*>(gobject_->description));
+ g_free(const_cast<char*>(gobject_->arg_description));
+ g_free(gobject_);
+}
+
+OptionEntry::OptionEntry(const OptionEntry& src)
+{
+ gobject_ = g_new0(GOptionEntry, 1);
+
+ operator=(src);
+}
+
+OptionEntry& OptionEntry::operator=(const OptionEntry& src)
+{
+ if(this != &src)
+ {
+ if(gobject_->long_name)
+ g_free(const_cast<char*>(gobject_->long_name));
+
+ gobject_->long_name = g_strdup(src.gobject_->long_name);
+
+ gobject_->short_name = src.gobject_->short_name; //It's just one char.
+
+ gobject_->flags = src.gobject_->flags;
+ gobject_->arg = src.gobject_->arg;
+ gobject_->arg_data = src.gobject_->arg_data; //Shared, because it's not owned by any instance of this class anyway.
+
+ if(gobject_->description)
+ g_free(const_cast<char*>(gobject_->description));
+
+ gobject_->description = g_strdup(src.gobject_->description);
+
+ if(gobject_->arg_description)
+ g_free(const_cast<char*>(gobject_->arg_description));
+
+ gobject_->arg_description = g_strdup(src.gobject_->arg_description);
+ }
+
+ return *this;
+}
+
+
+} // namespace Glib
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+
+Glib::ustring OptionEntry::get_long_name() const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(gobj()->long_name);
+}
+
+void OptionEntry::set_long_name(const Glib::ustring& value)
+{
+ gobj()->long_name = g_strdup((value).c_str());
+}
+
+gchar OptionEntry::get_short_name() const
+{
+ return gobj()->short_name;
+}
+
+void OptionEntry::set_short_name(const gchar& value)
+{
+ gobj()->short_name = value;
+}
+
+int OptionEntry::get_flags() const
+{
+ return gobj()->flags;
+}
+
+void OptionEntry::set_flags(const int& value)
+{
+ gobj()->flags = value;
+}
+
+Glib::ustring OptionEntry::get_description() const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(gobj()->description);
+}
+
+void OptionEntry::set_description(const Glib::ustring& value)
+{
+ gobj()->description = g_strdup((value).c_str());
+}
+
+Glib::ustring OptionEntry::get_arg_description() const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(gobj()->arg_description);
+}
+
+void OptionEntry::set_arg_description(const Glib::ustring& value)
+{
+ gobj()->arg_description = g_strdup((value).c_str());
+}
+
+
+} // namespace Glib
+
+
diff --git a/libs/glibmm2/glibmm/optionentry.h b/libs/glibmm2/glibmm/optionentry.h
new file mode 100644
index 0000000000..f7ce6a4a1f
--- /dev/null
+++ b/libs/glibmm2/glibmm/optionentry.h
@@ -0,0 +1,108 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GLIBMM_OPTIONENTRY_H
+#define _GLIBMM_OPTIONENTRY_H
+
+
+/* $Id$ */
+
+/* Copyright (C) 2004 The glibmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#include <glibmm/ustring.h>
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C" { typedef struct _GOptionEntry GOptionEntry; }
+#endif
+
+
+namespace Glib
+{
+
+/** An OptionEntry defines a single option. To have an effect, it must be added to an OptionGroup with
+ * OptionGroup::add_entry().
+ *
+ * The long name of an option can be used to specify it in a commandline as --long_name.
+ * Every option must have a long name. To resolve conflicts if multiple option groups contain the same long name, it is also
+ * possible to specify the option as --groupname-long_name.
+ *
+ * If an option has a short name, it can be specified as -short_name in a commandline.
+ *
+ * The description for the option is shown in the --help output.
+ *
+ * The arg_descripton is the placeholder to use for the extra argument parsed by the option in --help output.
+ */
+class OptionEntry
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef OptionEntry CppObjectType;
+ typedef GOptionEntry BaseObjectType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+private:
+
+public:
+
+ //Copied from goption.h, instead of generated, so that we can put it inside the class.
+ enum Flags
+ {
+ FLAG_HIDDEN = 1 << 0,
+ FLAG_IN_MAIN = 1 << 1,
+ FLAG_REVERSE = 1 << 2
+ } GOptionFlags;
+
+ OptionEntry();
+ OptionEntry(const OptionEntry& src);
+ virtual ~OptionEntry();
+
+ OptionEntry& operator=(const OptionEntry& src);
+
+
+ Glib::ustring get_long_name() const;
+ void set_long_name(const Glib::ustring& value);
+
+ gchar get_short_name() const;
+ void set_short_name(const gchar& value);
+
+ int get_flags() const;
+ void set_flags(const int& value);
+
+ //TODO: G_OPTION_ARG_CALLBACK,
+
+ Glib::ustring get_description() const;
+ void set_description(const Glib::ustring& value);
+
+ Glib::ustring get_arg_description() const;
+ void set_arg_description(const Glib::ustring& value);
+
+ GOptionEntry* gobj() { return gobject_; }
+ const GOptionEntry* gobj() const { return gobject_; }
+
+protected:
+
+ GOptionEntry* gobject_;
+
+
+};
+
+} // namespace Glib
+
+
+#endif /* _GLIBMM_OPTIONENTRY_H */
+
diff --git a/libs/glibmm2/glibmm/optiongroup.cc b/libs/glibmm2/glibmm/optiongroup.cc
new file mode 100644
index 0000000000..f8f35d2f29
--- /dev/null
+++ b/libs/glibmm2/glibmm/optiongroup.cc
@@ -0,0 +1,453 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <glibmm/optiongroup.h>
+#include <glibmm/private/optiongroup_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/optionentry.h>
+#include <glibmm/optioncontext.h>
+#include <glibmm/utility.h>
+//#include <glibmm/containers.h>
+#include <glib/goption.h>
+
+namespace Glib
+{
+
+namespace //anonymous
+{
+
+extern "C"
+{
+
+static gboolean g_callback_pre_parse(GOptionContext* context, GOptionGroup* /* group */, gpointer data, GError** /* TODO error */)
+{
+ OptionContext cppContext(context, false /* take_ownership */);
+ //OptionGroup cppGroup(group, true /* take_copy */); //Maybe this should be option_group.
+
+ OptionGroup* option_group = static_cast<OptionGroup*>(data);
+ if(option_group)
+ return option_group->on_pre_parse(cppContext, *option_group);
+ else
+ return false;
+}
+
+static gboolean g_callback_post_parse(GOptionContext* context, GOptionGroup* /* group */, gpointer data, GError** /* TODO error */)
+{
+ OptionContext cppContext(context, false /* take_ownership */);
+ //OptionGroup cppGroup(group, true /* take_copy */); //Maybe this should be option_group.
+
+ OptionGroup* option_group = static_cast<OptionGroup*>(data);
+ if(option_group)
+ {
+ return option_group->on_post_parse(cppContext, *option_group);
+ }
+ else
+ return false;
+}
+
+static void g_callback_error(GOptionContext* context, GOptionGroup* /* group */, gpointer data, GError** /* TODO error*/)
+{
+ OptionContext cppContext(context, false /* take_ownership */);
+ //OptionGroup cppGroup(group); //Maybe this should be option_group.
+
+ OptionGroup* option_group = static_cast<OptionGroup*>(data);
+ if(option_group)
+ return option_group->on_error(cppContext, *option_group);
+}
+
+} /* extern "C" */
+
+} //anonymous namespace
+
+
+OptionGroup::OptionGroup(const Glib::ustring& name, const Glib::ustring& description, const Glib::ustring& help_description)
+: gobject_( g_option_group_new(name.c_str(), description.c_str(), help_description.c_str(), this, 0 /* destroy_func */) ),
+ has_ownership_(true)
+{
+ //Connect callbacks, so that derived classes can override the virtual methods:
+ g_option_group_set_parse_hooks(gobj(), &g_callback_pre_parse, &g_callback_post_parse);
+ g_option_group_set_error_hook(gobj(), &g_callback_error);
+}
+
+OptionGroup::OptionGroup(GOptionGroup* castitem)
+: gobject_(castitem),
+ has_ownership_(true)
+{
+ //Always takes ownership - never takes copy.
+}
+
+
+OptionGroup::~OptionGroup()
+{
+ //Free any C types that were allocated during add_entry():
+ for(type_map_entries::iterator iter = map_entries_.begin(); iter != map_entries_.end(); ++iter)
+ {
+ CppOptionEntry& cpp_entry = iter->second;
+ cpp_entry.release_c_arg();
+ }
+
+ if(has_ownership_)
+ {
+ g_option_group_free(gobj());
+ gobject_ = 0;
+ }
+}
+
+void OptionGroup::add_entry(const OptionEntry& entry)
+{
+ //It does not copy the entry, so it needs to live as long as the group.
+
+ //g_option_group_add_entries takes an array, with the last item in the array having a null long_name.
+ //Hopefully this will be properly documented eventually - see bug #
+
+ //Create a temporary array, just so we can give the correct thing to g_option_group_add_entries:
+ GOptionEntry array[2];
+ array[0] = *(entry.gobj()); //Copy contents.
+ GLIBMM_INITIALIZE_STRUCT(array[1], GOptionEntry);
+
+ g_option_group_add_entries(gobj(), array);
+}
+
+void OptionGroup::add_entry(const OptionEntry& entry, bool& arg)
+{
+ add_entry_with_wrapper(entry, G_OPTION_ARG_NONE /* Actually a boolean on/off, depending on whether the argument name was given, without argument parameters. */, &arg);
+}
+
+void OptionGroup::add_entry(const OptionEntry& entry, int& arg)
+{
+ add_entry_with_wrapper(entry, G_OPTION_ARG_INT, &arg);
+}
+
+void OptionGroup::add_entry(const OptionEntry& entry, Glib::ustring& arg)
+{
+ add_entry_with_wrapper(entry, G_OPTION_ARG_STRING, &arg);
+}
+
+void OptionGroup::add_entry(const OptionEntry& entry, vecustrings& arg)
+{
+ add_entry_with_wrapper(entry, G_OPTION_ARG_STRING_ARRAY, &arg);
+}
+
+void OptionGroup::add_entry_filename(const OptionEntry& entry, std::string& arg)
+{
+ add_entry_with_wrapper(entry, G_OPTION_ARG_FILENAME, &arg);
+}
+
+void OptionGroup::add_entry_filename(const OptionEntry& entry, vecstrings& arg)
+{
+ add_entry_with_wrapper(entry, G_OPTION_ARG_FILENAME_ARRAY, &arg);
+}
+
+void OptionGroup::add_entry_with_wrapper(const OptionEntry& entry, GOptionArg arg_type, void* cpp_arg)
+{
+ const Glib::ustring name = entry.get_long_name();
+ type_map_entries::iterator iterFind = map_entries_.find(name);
+ if( iterFind == map_entries_.end() ) //If we have not added this entry already
+ {
+ CppOptionEntry cppEntry;
+ cppEntry.carg_type_ = arg_type;
+ cppEntry.allocate_c_arg();
+
+ cppEntry.cpparg_ = cpp_arg;
+
+ //Remember the C++/C mapping so that we can use it later:
+ map_entries_[name] = cppEntry;
+
+ //Give the information to the C API:
+ cppEntry.entry_ = new OptionEntry(entry); //g_option_group_add_entry() does not take its own copy, so we must keep the instance alive.*/
+ cppEntry.entry_->gobj()->arg = arg_type;
+ cppEntry.entry_->gobj()->arg_data = cppEntry.carg_;
+
+ add_entry(*(cppEntry.entry_));
+ }
+}
+
+
+bool OptionGroup::on_pre_parse(OptionContext& /* context */, OptionGroup& /* group */)
+{
+
+ return true;
+}
+
+bool OptionGroup::on_post_parse(OptionContext& /* context */, OptionGroup& /* group */)
+{
+ //Call this at the start of overrides.
+
+ //TODO: Maybe put this in the C callback:
+
+ //The C args have now been given values by GOption.
+ //Convert C values to C++ values:
+
+ for(type_map_entries::iterator iter = map_entries_.begin(); iter != map_entries_.end(); ++iter)
+ {
+ CppOptionEntry& cpp_entry = iter->second;
+ cpp_entry.convert_c_to_cpp();
+ }
+
+ return true;
+}
+
+void OptionGroup::on_error(OptionContext& /* context */, OptionGroup& /* group */)
+{
+}
+
+
+OptionGroup::CppOptionEntry::CppOptionEntry()
+: carg_type_(G_OPTION_ARG_NONE), carg_(0), cpparg_(0), entry_(0)
+{}
+
+void OptionGroup::CppOptionEntry::allocate_c_arg()
+{
+ //Create an instance of the appropriate C type.
+ //This will be destroyed in the OptionGroup destructor.
+ switch(carg_type_)
+ {
+ case G_OPTION_ARG_STRING: //The char* will be for UTF8 strins.
+ case G_OPTION_ARG_FILENAME: //The char* will be for strings in the current locale's encoding.
+ {
+ char** typed_arg = new char*;
+ *typed_arg = 0; //The C code will allocate a char* and put it here, for us to g_free() later.
+ carg_ = typed_arg;
+
+ break;
+ }
+ case G_OPTION_ARG_INT:
+ {
+ int* typed_arg = new int;
+ *typed_arg = 0;
+ carg_ = typed_arg;
+
+ break;
+ }
+ case G_OPTION_ARG_STRING_ARRAY:
+ case G_OPTION_ARG_FILENAME_ARRAY:
+ {
+ char*** typed_arg = new char**;
+ *typed_arg = 0;
+ carg_ = typed_arg;
+
+ break;
+ }
+ case G_OPTION_ARG_NONE: /* Actually a boolean. */
+ {
+ gboolean* typed_arg = new gboolean;
+ *typed_arg = 0;
+ carg_ = typed_arg;
+
+ break;
+ }
+ default:
+ {
+ break;
+ }
+ }
+}
+
+void OptionGroup::CppOptionEntry::release_c_arg()
+{
+ //Delete the instances that we created in allocate_c_arg().
+ //Notice that we delete the type that we created, but not the value to which it points.
+ if(carg_)
+ {
+ switch(carg_type_)
+ {
+ case G_OPTION_ARG_STRING:
+ case G_OPTION_ARG_FILENAME:
+ {
+ char** typed_arg = (char**)carg_;
+ g_free(*typed_arg); //Free the char* string at type_arg, which was allocated by the C code.
+ delete typed_arg; //Delete the char** that we allocated in allocate_c_arg;
+
+ break;
+ }
+ case G_OPTION_ARG_INT:
+ {
+ int* typed_arg = (int*)carg_;
+ delete typed_arg;
+
+ break;
+ }
+ case G_OPTION_ARG_STRING_ARRAY:
+ case G_OPTION_ARG_FILENAME_ARRAY:
+ {
+ delete (char**)carg_;
+ break;
+ }
+ case G_OPTION_ARG_NONE: /* Actually a boolean. */
+ {
+ gboolean* typed_arg = (gboolean*)carg_;
+ delete typed_arg;
+
+ break;
+ }
+ default:
+ {
+ /* TODO:
+ G_OPTION_ARG_CALLBACK,
+*/
+ break;
+ }
+ }
+
+ carg_ = 0;
+ }
+
+ if(entry_)
+ delete entry_;
+}
+
+void OptionGroup::CppOptionEntry::convert_c_to_cpp()
+{
+ switch(carg_type_)
+ {
+ case G_OPTION_ARG_STRING:
+ {
+ char** typed_arg = (char**)carg_;
+ Glib::ustring* typed_cpp_arg = (Glib::ustring*)cpparg_;
+ if(typed_arg && typed_cpp_arg)
+ {
+ char* pch = *typed_arg;
+ (*typed_cpp_arg) = Glib::convert_const_gchar_ptr_to_ustring(pch);
+
+ break;
+ }
+ }
+ case G_OPTION_ARG_FILENAME:
+ {
+ char** typed_arg = (char**)carg_;
+ std::string* typed_cpp_arg = (std::string*)cpparg_;
+ if(typed_arg && typed_cpp_arg)
+ {
+ char* pch = *typed_arg;
+ (*typed_cpp_arg) = Glib::convert_const_gchar_ptr_to_stdstring(pch);
+
+ break;
+ }
+ }
+ case G_OPTION_ARG_INT:
+ {
+ *((int*)cpparg_) = *((int*)carg_);
+ break;
+ }
+ case G_OPTION_ARG_STRING_ARRAY:
+ {
+ char*** typed_arg = (char***)carg_;
+ vecustrings* typed_cpp_arg = (vecustrings*)cpparg_;
+ if(typed_arg && typed_cpp_arg)
+ {
+ typed_cpp_arg->clear();
+
+ //The C array seems to be null-terminated.
+ //Glib::StringArrayHandle array_handle(*typed_arg, Glib::OWNERSHIP_NONE);
+
+ //The SUN Forte compiler complains about this:
+ // "optiongroup.cc", line 354: Error: Cannot assign Glib::ArrayHandle<Glib::ustring,
+ // Glib::Container_Helpers::TypeTraits<Glib::ustring>> to std::vector<Glib::ustring> without
+ // "std::vector<Glib::ustring>::operator=(const std::vector<Glib::ustring>&)";.
+ //
+ //(*typed_cpp_arg) = array_handle;
+ //
+ //And the Tru64 compiler does not even like us to instantiate the StringArrayHandle:
+ //
+ // cxx: Error: ../../glib/glibmm/containerhandle_shared.h, line 149: the operand
+ // of a pointer dynamic_cast must be a pointer to a complete class type
+ // return dynamic_cast<CppType>(Glib::wrap_auto(cobj, false /* take_copy */));
+
+ //for(Glib::StringArrayHandle::iterator iter = array_handle.begin(); iter != array_handle.end(); ++iter)
+ //{
+ // typed_cpp_arg->push_back(*iter);
+ //}
+
+ //So we do this:
+
+ char** char_array_next = *typed_arg;
+ while(char_array_next && *char_array_next)
+ {
+ typed_cpp_arg->push_back(*char_array_next);
+ ++char_array_next;
+ }
+ }
+
+ break;
+ }
+ case G_OPTION_ARG_FILENAME_ARRAY:
+ {
+ char*** typed_arg = (char***)carg_;
+ vecustrings* typed_cpp_arg = (vecustrings*)cpparg_;
+ if(typed_arg && typed_cpp_arg)
+ {
+ typed_cpp_arg->clear();
+
+ //See comments above about the SUN Forte and Tru64 compilers.
+
+ char** char_array_next = *typed_arg;
+ while(char_array_next && *char_array_next)
+ {
+ typed_cpp_arg->push_back(*char_array_next);
+ ++char_array_next;
+ }
+ }
+
+ break;
+ }
+ case G_OPTION_ARG_NONE: /* Actually a boolean. */
+ {
+ *((bool*)cpparg_) = *((gboolean*)carg_);
+ break;
+ }
+ default:
+ {
+ /* TODO:
+ G_OPTION_ARG_CALLBACK,
+ */
+ break;
+ }
+ }
+}
+
+GOptionGroup* OptionGroup::gobj_give_ownership()
+{
+ has_ownership_ = false;
+ return gobj();
+}
+
+} // namespace Glib
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+
+void OptionGroup::set_translation_domain(const Glib::ustring& domain)
+{
+ g_option_group_set_translation_domain(gobj(), domain.c_str());
+}
+
+
+} // namespace Glib
+
+
diff --git a/libs/glibmm2/glibmm/optiongroup.h b/libs/glibmm2/glibmm/optiongroup.h
new file mode 100644
index 0000000000..3d8ce78779
--- /dev/null
+++ b/libs/glibmm2/glibmm/optiongroup.h
@@ -0,0 +1,141 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GLIBMM_OPTIONGROUP_H
+#define _GLIBMM_OPTIONGROUP_H
+
+
+/* $Id$ */
+
+/* Copyright (C) 2004 The glibmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#include <glibmm/ustring.h>
+#include <map>
+#include <vector>
+#include <glib/goption.h> //TODO: Try to hide this.
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C" { typedef struct _GOptionGroup GOptionGroup; }
+#endif //DOXYGEN_SHOULD_SKIP_THIS
+
+
+namespace Glib
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+class OptionEntry;
+class OptionContext;
+#endif //DOXYGEN_SHOULD_SKIP_THIS
+
+/** An OptionGroup defines the options in a single group.
+ * Libraries which need to parse commandline options are expected to provide a function that allows their OptionGroups to
+ * be added to the application's OptionContext.
+ */
+class OptionGroup
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef OptionGroup CppObjectType;
+ typedef GOptionGroup BaseObjectType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+private:
+
+public:
+ OptionGroup(const Glib::ustring& name, const Glib::ustring& description, const Glib::ustring& help_description = Glib::ustring());
+
+ /** This always takes ownership of the underlying GOptionGroup,
+ * so it is only useful with C functions that return newly-allocated GOptionGroups.
+ */
+ explicit OptionGroup(GOptionGroup* castitem);
+
+ virtual ~OptionGroup();
+
+
+ virtual bool on_pre_parse(OptionContext& context, OptionGroup& group);
+ virtual bool on_post_parse(OptionContext& context, OptionGroup& group);
+ virtual void on_error(OptionContext& context, OptionGroup& group);
+
+
+ void add_entry(const OptionEntry& entry);
+
+
+ typedef std::vector<Glib::ustring> vecustrings;
+ typedef std::vector<std::string> vecstrings;
+
+ void add_entry(const OptionEntry& entry, bool& arg);
+ void add_entry(const OptionEntry& entry, int& arg);
+ void add_entry(const OptionEntry& entry, Glib::ustring& arg);
+ void add_entry_filename(const OptionEntry& entry, std::string& arg);
+ void add_entry(const OptionEntry& entry, vecustrings& arg);
+ void add_entry_filename(const OptionEntry& entry, vecstrings& arg);
+
+/* TODO:
+void g_option_group_set_translate_func (GOptionGroup *group,
+ GTranslateFunc func,
+ gpointer data,
+ GDestroyNotify destroy_notify);
+*/
+
+ /** A convenience function to use gettext() for translating
+ * user-visible strings.
+ *
+ * Since: 2.6
+ * @param domain The domain to use.
+ */
+ void set_translation_domain(const Glib::ustring& domain);
+
+ GOptionGroup* gobj() { return gobject_; }
+ const GOptionGroup* gobj() const { return gobject_; }
+ GOptionGroup* gobj_give_ownership();
+
+protected:
+
+ class CppOptionEntry
+ {
+ public:
+ CppOptionEntry();
+
+ void allocate_c_arg();
+ void convert_c_to_cpp();
+ void release_c_arg();
+
+ GOptionArg carg_type_;
+ void* carg_;
+ void* cpparg_;
+ OptionEntry* entry_;
+ };
+
+ void add_entry_with_wrapper(const OptionEntry& entry, GOptionArg arg_type, void* cpp_arg);
+
+ //Map of entry names to CppOptionEntry:
+ typedef std::map<Glib::ustring, CppOptionEntry> type_map_entries;
+ type_map_entries map_entries_;
+
+ GOptionGroup* gobject_;
+ bool has_ownership_; //Whether the gobject_ belongs to this C++ instance.
+
+
+};
+
+} // namespace Glib
+
+
+#endif /* _GLIBMM_OPTIONGROUP_H */
+
diff --git a/libs/glibmm2/glibmm/pattern.cc b/libs/glibmm2/glibmm/pattern.cc
new file mode 100644
index 0000000000..a655259563
--- /dev/null
+++ b/libs/glibmm2/glibmm/pattern.cc
@@ -0,0 +1,66 @@
+// -*- c++ -*-
+/* $Id$ */
+
+/* pattern.cc
+ *
+ * Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glib/gpattern.h>
+#include <glibmm/pattern.h>
+
+
+namespace Glib
+{
+
+PatternSpec::PatternSpec(const Glib::ustring& pattern)
+:
+ gobject_ (g_pattern_spec_new(pattern.c_str()))
+{}
+
+PatternSpec::PatternSpec(GPatternSpec* gobject)
+:
+ gobject_ (gobject)
+{}
+
+PatternSpec::~PatternSpec()
+{
+ g_pattern_spec_free(gobject_);
+}
+
+bool PatternSpec::match(const Glib::ustring& str) const
+{
+ return g_pattern_match(gobject_, str.bytes(), str.c_str(), 0);
+}
+
+bool PatternSpec::match(const Glib::ustring& str, const Glib::ustring& str_reversed) const
+{
+ return g_pattern_match(gobject_, str.bytes(), str.c_str(), str_reversed.c_str());
+}
+
+bool PatternSpec::operator==(const PatternSpec& rhs) const
+{
+ return g_pattern_spec_equal(gobject_, rhs.gobject_);
+}
+
+bool PatternSpec::operator!=(const PatternSpec& rhs) const
+{
+ return !g_pattern_spec_equal(gobject_, rhs.gobject_);
+}
+
+} // namespace Glib
+
diff --git a/libs/glibmm2/glibmm/pattern.h b/libs/glibmm2/glibmm/pattern.h
new file mode 100644
index 0000000000..bf09a3a1bf
--- /dev/null
+++ b/libs/glibmm2/glibmm/pattern.h
@@ -0,0 +1,69 @@
+// -*- c++ -*-
+#ifndef _GLIBMM_PATTERN_H
+#define _GLIBMM_PATTERN_H
+
+/* $Id$ */
+
+/* pattern.h
+ *
+ * Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+extern "C" { typedef struct _GPatternSpec GPatternSpec; }
+
+#include <glibmm/ustring.h>
+
+
+namespace Glib
+{
+
+/** @defgroup PatternMatching Glob-style Pattern Matching
+ * Match strings against patterns containing '*' (wildcard) and '?' (joker).
+ * @{
+ */
+
+class PatternSpec
+{
+public:
+ explicit PatternSpec(const Glib::ustring& pattern);
+ explicit PatternSpec(GPatternSpec* gobject);
+ ~PatternSpec();
+
+ bool match(const Glib::ustring& str) const;
+ bool match(const Glib::ustring& str, const Glib::ustring& str_reversed) const;
+
+ bool operator==(const PatternSpec& rhs) const;
+ bool operator!=(const PatternSpec& rhs) const;
+
+ GPatternSpec* gobj() { return gobject_; }
+ const GPatternSpec* gobj() const { return gobject_; }
+
+private:
+ GPatternSpec* gobject_;
+
+ // noncopyable
+ PatternSpec(const PatternSpec&);
+ PatternSpec& operator=(const PatternSpec&);
+};
+
+/** @} group PatternMatching */
+
+} // namespace Glib
+
+
+#endif /* _GLIBMM_PATTERN_H */
+
diff --git a/libs/glibmm2/glibmm/private/convert_p.h b/libs/glibmm2/glibmm/private/convert_p.h
new file mode 100644
index 0000000000..b8819e5c70
--- /dev/null
+++ b/libs/glibmm2/glibmm/private/convert_p.h
@@ -0,0 +1,6 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GLIBMM_CONVERT_P_H
+#define _GLIBMM_CONVERT_P_H
+#endif /* _GLIBMM_CONVERT_P_H */
+
diff --git a/libs/glibmm2/glibmm/private/date_p.h b/libs/glibmm2/glibmm/private/date_p.h
new file mode 100644
index 0000000000..8c09c9b7f5
--- /dev/null
+++ b/libs/glibmm2/glibmm/private/date_p.h
@@ -0,0 +1,6 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GLIBMM_DATE_P_H
+#define _GLIBMM_DATE_P_H
+#endif /* _GLIBMM_DATE_P_H */
+
diff --git a/libs/glibmm2/glibmm/private/fileutils_p.h b/libs/glibmm2/glibmm/private/fileutils_p.h
new file mode 100644
index 0000000000..2d15adfee7
--- /dev/null
+++ b/libs/glibmm2/glibmm/private/fileutils_p.h
@@ -0,0 +1,6 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GLIBMM_FILEUTILS_P_H
+#define _GLIBMM_FILEUTILS_P_H
+#endif /* _GLIBMM_FILEUTILS_P_H */
+
diff --git a/libs/glibmm2/glibmm/private/interface_p.h b/libs/glibmm2/glibmm/private/interface_p.h
new file mode 100644
index 0000000000..805d8db3e5
--- /dev/null
+++ b/libs/glibmm2/glibmm/private/interface_p.h
@@ -0,0 +1,24 @@
+// -*- c++ -*-
+
+#ifndef _GLIBMM_INTERFACE_P_H
+#define _GLIBMM_INTERFACE_P_H
+
+#include <glibmm/class.h>
+
+
+namespace Glib
+{
+
+class Interface_Class : public Glib::Class
+{
+public:
+ typedef Interface CppObjectType;
+ typedef GTypeInterface BaseClassType;
+
+ void add_interface(GType instance_type) const;
+};
+
+} // namespace Glib
+
+#endif /* _GLIBMM_INTERFACE_P_H */
+
diff --git a/libs/glibmm2/glibmm/private/iochannel_p.h b/libs/glibmm2/glibmm/private/iochannel_p.h
new file mode 100644
index 0000000000..a66f0a8483
--- /dev/null
+++ b/libs/glibmm2/glibmm/private/iochannel_p.h
@@ -0,0 +1,6 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GLIBMM_IOCHANNEL_P_H
+#define _GLIBMM_IOCHANNEL_P_H
+#endif /* _GLIBMM_IOCHANNEL_P_H */
+
diff --git a/libs/glibmm2/glibmm/private/markup_p.h b/libs/glibmm2/glibmm/private/markup_p.h
new file mode 100644
index 0000000000..2abb186965
--- /dev/null
+++ b/libs/glibmm2/glibmm/private/markup_p.h
@@ -0,0 +1,6 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GLIBMM_MARKUP_P_H
+#define _GLIBMM_MARKUP_P_H
+#endif /* _GLIBMM_MARKUP_P_H */
+
diff --git a/libs/glibmm2/glibmm/private/module_p.h b/libs/glibmm2/glibmm/private/module_p.h
new file mode 100644
index 0000000000..f06c0782f6
--- /dev/null
+++ b/libs/glibmm2/glibmm/private/module_p.h
@@ -0,0 +1,6 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GLIBMM_MODULE_P_H
+#define _GLIBMM_MODULE_P_H
+#endif /* _GLIBMM_MODULE_P_H */
+
diff --git a/libs/glibmm2/glibmm/private/object_p.h b/libs/glibmm2/glibmm/private/object_p.h
new file mode 100644
index 0000000000..20a711898f
--- /dev/null
+++ b/libs/glibmm2/glibmm/private/object_p.h
@@ -0,0 +1,28 @@
+// -*- c++ -*-
+
+#ifndef _GLIBMM_OBJECT_P_H
+#define _GLIBMM_OBJECT_P_H
+
+#include <glibmm/class.h>
+
+namespace Glib
+{
+
+class Object_Class : public Glib::Class
+{
+public:
+ typedef Object CppObjectType;
+ typedef GObject BaseObjectType;
+ typedef GObjectClass BaseClassType;
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ const Glib::Class& init();
+
+ static Glib::Object* wrap_new(GObject*);
+};
+
+} // namespace Glib
+
+#endif /* _GLIBMM_OBJECT_P_H */
+
diff --git a/libs/glibmm2/glibmm/private/optioncontext_p.h b/libs/glibmm2/glibmm/private/optioncontext_p.h
new file mode 100644
index 0000000000..a0499f001f
--- /dev/null
+++ b/libs/glibmm2/glibmm/private/optioncontext_p.h
@@ -0,0 +1,6 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GLIBMM_OPTIONCONTEXT_P_H
+#define _GLIBMM_OPTIONCONTEXT_P_H
+#endif /* _GLIBMM_OPTIONCONTEXT_P_H */
+
diff --git a/libs/glibmm2/glibmm/private/optionentry_p.h b/libs/glibmm2/glibmm/private/optionentry_p.h
new file mode 100644
index 0000000000..df59695279
--- /dev/null
+++ b/libs/glibmm2/glibmm/private/optionentry_p.h
@@ -0,0 +1,6 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GLIBMM_OPTIONENTRY_P_H
+#define _GLIBMM_OPTIONENTRY_P_H
+#endif /* _GLIBMM_OPTIONENTRY_P_H */
+
diff --git a/libs/glibmm2/glibmm/private/optiongroup_p.h b/libs/glibmm2/glibmm/private/optiongroup_p.h
new file mode 100644
index 0000000000..7bbc139ea4
--- /dev/null
+++ b/libs/glibmm2/glibmm/private/optiongroup_p.h
@@ -0,0 +1,6 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GLIBMM_OPTIONGROUP_P_H
+#define _GLIBMM_OPTIONGROUP_P_H
+#endif /* _GLIBMM_OPTIONGROUP_P_H */
+
diff --git a/libs/glibmm2/glibmm/private/shell_p.h b/libs/glibmm2/glibmm/private/shell_p.h
new file mode 100644
index 0000000000..6d9c6258a8
--- /dev/null
+++ b/libs/glibmm2/glibmm/private/shell_p.h
@@ -0,0 +1,6 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GLIBMM_SHELL_P_H
+#define _GLIBMM_SHELL_P_H
+#endif /* _GLIBMM_SHELL_P_H */
+
diff --git a/libs/glibmm2/glibmm/private/spawn_p.h b/libs/glibmm2/glibmm/private/spawn_p.h
new file mode 100644
index 0000000000..fddcf2bf86
--- /dev/null
+++ b/libs/glibmm2/glibmm/private/spawn_p.h
@@ -0,0 +1,6 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GLIBMM_SPAWN_P_H
+#define _GLIBMM_SPAWN_P_H
+#endif /* _GLIBMM_SPAWN_P_H */
+
diff --git a/libs/glibmm2/glibmm/private/thread_p.h b/libs/glibmm2/glibmm/private/thread_p.h
new file mode 100644
index 0000000000..8767041773
--- /dev/null
+++ b/libs/glibmm2/glibmm/private/thread_p.h
@@ -0,0 +1,6 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GLIBMM_THREAD_P_H
+#define _GLIBMM_THREAD_P_H
+#endif /* _GLIBMM_THREAD_P_H */
+
diff --git a/libs/glibmm2/glibmm/private/unicode_p.h b/libs/glibmm2/glibmm/private/unicode_p.h
new file mode 100644
index 0000000000..6ee135feda
--- /dev/null
+++ b/libs/glibmm2/glibmm/private/unicode_p.h
@@ -0,0 +1,6 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GLIBMM_UNICODE_P_H
+#define _GLIBMM_UNICODE_P_H
+#endif /* _GLIBMM_UNICODE_P_H */
+
diff --git a/libs/glibmm2/glibmm/property.cc b/libs/glibmm2/glibmm/property.cc
new file mode 100644
index 0000000000..e801e0c1bd
--- /dev/null
+++ b/libs/glibmm2/glibmm/property.cc
@@ -0,0 +1,198 @@
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/property.h>
+#include <glibmm/object.h>
+#include <cstddef>
+
+// Temporary hack till GLib gets fixed.
+#undef G_STRLOC
+#define G_STRLOC __FILE__ ":" G_STRINGIFY(__LINE__)
+
+
+namespace
+{
+
+// OK guys, please don't kill me for that. Let me explain what happens here.
+//
+// The task:
+// ---------
+// a) Autogenerate a property ID number for each custom property. This is an
+// unsigned integer, which doesn't have to be assigned continuously. I.e.,
+// it can be everything but 0.
+// b) If more than one object of the same class is instantiated, then of course
+// the already installed properties must be used. That means, a property ID
+// must not be associated with a single Glib::Property<> instance. Rather,
+// the ID has to be associated with the class somehow.
+// c) With only a GObject pointer and a property ID (and perhaps GParamSpec*
+// if necessary), it must be possible to acquire a reference to the property
+// wrapper instance.
+//
+// The current solution:
+// ---------------------
+// a) Assign an ID to a Glib::PropertyBase by calculating its offset in bytes
+// relative to the beginning of the object's memory. dynamic_cast<void*>
+// is used to retrieve a pointer to the very beginning of an instance.
+// b) Recalculate a specific PropertyBase pointer by adding the property ID
+// (i.e. the byte offset) to the object start pointer. The result is then
+// just casted to PropertyBase*.
+//
+// Drawbacks:
+// ----------
+// a) It's a low-level hack. Should be portable, yes, but we can only do very
+// limited error checking.
+// b) All Glib::Property<> instances are absolutely required to be direct data
+// members of the class that implements the property. That seems a natural
+// thing to do, but it's questionable whether it should be a requirement.
+//
+// Advantages:
+// -----------
+// a) Although low-level, it's extremely easy to implement. The nasty code is
+// concentrated in only two non-exposed utility functions, and it works
+// just fine.
+// b) It's efficient, and the memory footprint is very small too.
+// c) I actually tried other ways, too, but ran into dead-ends everywhere.
+// It's probably possible to implement this without calculating offsets,
+// but it'll be very complicated, and involve a lot of qdata pointers to
+// property tables andwhatnot.
+//
+// We can reimplement this later if necessary.
+
+unsigned int property_to_id(Glib::ObjectBase& object, Glib::PropertyBase& property)
+{
+ void *const base_ptr = dynamic_cast<void*>(&object);
+ void *const prop_ptr = &property;
+
+ const ptrdiff_t offset = static_cast<guint8*>(prop_ptr) - static_cast<guint8*>(base_ptr);
+
+ g_return_val_if_fail(offset > 0 && offset < G_MAXINT, 0);
+
+ return static_cast<unsigned int>(offset);
+}
+
+Glib::PropertyBase& property_from_id(Glib::ObjectBase& object, unsigned int property_id)
+{
+ void *const base_ptr = dynamic_cast<void*>(&object);
+ void *const prop_ptr = static_cast<guint8*>(base_ptr) + property_id;
+
+ return *static_cast<Glib::PropertyBase*>(prop_ptr);
+}
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+void custom_get_property_callback(GObject* object, unsigned int property_id,
+ GValue* value, GParamSpec* param_spec)
+{
+ if(Glib::ObjectBase *const wrapper = Glib::ObjectBase::_get_current_wrapper(object))
+ {
+ PropertyBase& property = property_from_id(*wrapper, property_id);
+
+ if((property.object_ == wrapper) && (property.param_spec_ == param_spec))
+ g_value_copy(property.value_.gobj(), value);
+ else
+ G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, param_spec);
+ }
+}
+
+void custom_set_property_callback(GObject* object, unsigned int property_id,
+ const GValue* value, GParamSpec* param_spec)
+{
+ if(Glib::ObjectBase *const wrapper = Glib::ObjectBase::_get_current_wrapper(object))
+ {
+ PropertyBase& property = property_from_id(*wrapper, property_id);
+
+ if((property.object_ == wrapper) && (property.param_spec_ == param_spec))
+ {
+ g_value_copy(value, property.value_.gobj());
+ g_object_notify(object, g_param_spec_get_name(param_spec));
+ }
+ else
+ G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, param_spec);
+ }
+}
+
+
+/**** Glib::PropertyBase ***************************************************/
+
+PropertyBase::PropertyBase(Glib::Object& object, GType value_type)
+:
+ object_ (&object),
+ value_ (),
+ param_spec_ (0)
+{
+ value_.init(value_type);
+}
+
+PropertyBase::~PropertyBase()
+{
+ if(param_spec_)
+ g_param_spec_unref(param_spec_);
+}
+
+bool PropertyBase::lookup_property(const Glib::ustring& name)
+{
+ g_assert(param_spec_ == 0);
+
+ param_spec_ = g_object_class_find_property(G_OBJECT_GET_CLASS(object_->gobj()), name.c_str());
+
+ if(param_spec_)
+ {
+ g_assert(G_PARAM_SPEC_VALUE_TYPE(param_spec_) == G_VALUE_TYPE(value_.gobj()));
+ g_param_spec_ref(param_spec_);
+ }
+
+ return (param_spec_ != 0);
+}
+
+void PropertyBase::install_property(GParamSpec* param_spec)
+{
+ g_return_if_fail(param_spec != 0);
+
+ const unsigned int property_id = property_to_id(*object_, *this);
+
+ g_object_class_install_property(G_OBJECT_GET_CLASS(object_->gobj()), property_id, param_spec);
+
+ param_spec_ = param_spec;
+ g_param_spec_ref(param_spec_);
+}
+
+const char* PropertyBase::get_name_internal() const
+{
+ const char *const name = g_param_spec_get_name(param_spec_);
+ g_return_val_if_fail(name != 0, "");
+ return name;
+}
+
+Glib::ustring PropertyBase::get_name() const
+{
+ return Glib::ustring(get_name_internal());
+}
+
+void PropertyBase::notify()
+{
+ g_object_notify(object_->gobj(), g_param_spec_get_name(param_spec_));
+}
+
+} // namespace Glib
+
diff --git a/libs/glibmm2/glibmm/property.h b/libs/glibmm2/glibmm/property.h
new file mode 100644
index 0000000000..f25ef84d1f
--- /dev/null
+++ b/libs/glibmm2/glibmm/property.h
@@ -0,0 +1,171 @@
+// -*- c++ -*-
+#ifndef _GLIBMM_PROPERTY_H
+#define _GLIBMM_PROPERTY_H
+/* $Id$ */
+
+/* Copyright 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/propertyproxy.h>
+#include <glibmm/value.h>
+
+
+namespace Glib
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+#ifdef GLIBMM_CXX_CAN_USE_NAMESPACES_INSIDE_EXTERNC
+//For the AIX xlC compiler, I can not find a way to do this without putting the functions in the global namespace. murrayc
+extern "C"
+{
+#endif //GLIBMM_CXX_CAN_USE_NAMESPACES_INSIDE_EXTERNC
+
+void custom_get_property_callback(GObject* object, unsigned int property_id,
+ GValue* value, GParamSpec* param_spec);
+
+void custom_set_property_callback(GObject* object, unsigned int property_id,
+ const GValue* value, GParamSpec* param_spec);
+
+#ifdef GLIBMM_CXX_CAN_USE_NAMESPACES_INSIDE_EXTERNC
+} //extern "C"
+#endif //GLIBMM_CXX_CAN_USE_NAMESPACES_INSIDE_EXTERNC
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+class PropertyBase
+{
+public:
+ Glib::ustring get_name() const;
+ void notify();
+
+protected:
+ Glib::Object* object_;
+ Glib::ValueBase value_;
+ GParamSpec* param_spec_;
+
+ PropertyBase(Glib::Object& object, GType value_type);
+ ~PropertyBase();
+
+ bool lookup_property(const Glib::ustring& name);
+ void install_property(GParamSpec* param_spec);
+
+ const char* get_name_internal() const;
+
+private:
+ // noncopyable
+ PropertyBase(const PropertyBase&);
+ PropertyBase& operator=(const PropertyBase&);
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+ friend void Glib::custom_get_property_callback(GObject* object, unsigned int property_id,
+ GValue* value, GParamSpec* param_spec);
+
+ friend void Glib::custom_set_property_callback(GObject* object, unsigned int property_id,
+ const GValue* value, GParamSpec* param_spec);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+};
+
+
+template <class T>
+class Property : public PropertyBase
+{
+public:
+ typedef T PropertyType;
+ typedef Glib::Value<T> ValueType;
+
+ Property(Glib::Object& object, const Glib::ustring& name);
+ Property(Glib::Object& object, const Glib::ustring& name, const PropertyType& default_value);
+
+ inline void set_value(const PropertyType& data);
+ inline PropertyType get_value() const;
+
+ inline Property<T>& operator=(const PropertyType& data);
+ inline operator PropertyType() const;
+
+ inline Glib::PropertyProxy<T> get_proxy();
+};
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+/**** Glib::Property<T> ****************************************************/
+
+template <class T>
+Property<T>::Property(Glib::Object& object, const Glib::ustring& name)
+:
+ PropertyBase(object, ValueType::value_type())
+{
+ if(!lookup_property(name))
+ install_property(static_cast<ValueType&>(value_).create_param_spec(name));
+}
+
+template <class T>
+Property<T>::Property(Glib::Object& object, const Glib::ustring& name,
+ const typename Property<T>::PropertyType& default_value)
+:
+ PropertyBase(object, ValueType::value_type())
+{
+ static_cast<ValueType&>(value_).set(default_value);
+
+ if(!lookup_property(name))
+ install_property(static_cast<ValueType&>(value_).create_param_spec(name));
+}
+
+template <class T> inline
+void Property<T>::set_value(const typename Property<T>::PropertyType& data)
+{
+ static_cast<ValueType&>(value_).set(data);
+ this->notify();
+}
+
+template <class T> inline
+typename Property<T>::PropertyType Property<T>::get_value() const
+{
+ return static_cast<const ValueType&>(value_).get();
+}
+
+template <class T> inline
+Property<T>& Property<T>::operator=(const typename Property<T>::PropertyType& data)
+{
+ static_cast<ValueType&>(value_).set(data);
+ this->notify();
+ return *this;
+}
+
+template <class T> inline
+Property<T>::operator T() const
+{
+ return static_cast<const ValueType&>(value_).get();
+}
+
+template <class T> inline
+Glib::PropertyProxy<T> Property<T>::get_proxy()
+{
+ return Glib::PropertyProxy<T>(object_, get_name_internal());
+}
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+} // namespace Glib
+
+
+#endif /* _GLIBMM_PROPERTY_H */
+
diff --git a/libs/glibmm2/glibmm/propertyproxy.cc b/libs/glibmm2/glibmm/propertyproxy.cc
new file mode 100644
index 0000000000..c20f36bc3e
--- /dev/null
+++ b/libs/glibmm2/glibmm/propertyproxy.cc
@@ -0,0 +1,24 @@
+// -*- c++ -*-
+/* $Id$ */
+
+/* propertyproxy.cc
+ *
+ * Copyright 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/propertyproxy.h>
+
diff --git a/libs/glibmm2/glibmm/propertyproxy.h b/libs/glibmm2/glibmm/propertyproxy.h
new file mode 100644
index 0000000000..bfba551611
--- /dev/null
+++ b/libs/glibmm2/glibmm/propertyproxy.h
@@ -0,0 +1,163 @@
+// -*- c++ -*-
+#ifndef _GLIBMM_PROPERTYPROXY_H
+#define _GLIBMM_PROPERTYPROXY_H
+/* $Id$ */
+
+/* propertyproxy.h
+ *
+ * Copyright 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/propertyproxy_base.h>
+
+
+namespace Glib
+{
+
+/** A PropertyProxy can be used to get and set the value of an object's property.
+ * There are usually also get and set methods on the class itself, which you might find more convenient.
+ * With the PropertyProxy, you may use either get_value() and set_value(), or operator=() and
+ * operator PropertyType(), like so:
+ * @code
+ * int height = cellrenderer.property_height();
+ * cellrenderer.property_editable() = true;
+ * @endcode
+ *
+ * You may also receive notification when a property's value changes, by connecting to signal_changed().
+ */
+template <class T>
+class PropertyProxy : public PropertyProxy_Base
+{
+public:
+ typedef T PropertyType;
+
+ PropertyProxy(ObjectBase* obj, const char* name)
+ : PropertyProxy_Base(obj, name) {}
+
+ /** Set the value of this property.
+ * @param data The new value for the property.
+ */
+ void set_value(const PropertyType& data);
+
+ /** Get the value of this property.
+ * @result The current value of the property.
+ */
+ PropertyType get_value() const;
+
+ /** Set the value of this property back to its default value
+ */
+ void reset_value()
+ { reset_property_(); }
+
+ PropertyProxy<T>& operator=(const PropertyType& data)
+ { this->set_value(data); return *this; }
+
+ operator PropertyType() const
+ { return this->get_value(); }
+};
+
+
+/** See PropertyProxy().
+ * This property can be written, but not read, so there is no get_value() method.
+ */
+template <class T>
+class PropertyProxy_WriteOnly : public PropertyProxy_Base
+{
+public:
+ typedef T PropertyType;
+
+ PropertyProxy_WriteOnly(ObjectBase* obj, const char* name)
+ : PropertyProxy_Base(obj, name) {}
+
+ /** Set the value of this property.
+ * @param data The new value for the property.
+ */
+ void set_value(const PropertyType& data)
+ {
+ PropertyProxy_Base& base = *this;
+ // The downcast to PropertyProxy<T> is safe, and avoids code duplication.
+ static_cast<PropertyProxy<T>&>(base).set_value(data);
+ }
+
+ /** Set the value of this property back to its default value
+ */
+ void reset_value()
+ { reset_property_(); }
+
+ PropertyProxy_WriteOnly<T>& operator=(const PropertyType& data)
+ { this->set_value(data); return *this; }
+};
+
+/** See PropertyProxy().
+ * This property can be read, but not written, so there is no set_value() method.
+ */
+template <class T>
+class PropertyProxy_ReadOnly : public PropertyProxy_Base
+{
+public:
+ typedef T PropertyType;
+
+ //obj is const, because this should be returned by const accessors.
+ PropertyProxy_ReadOnly(const ObjectBase* obj, const char* name)
+ : PropertyProxy_Base(const_cast<ObjectBase*>(obj), name) {}
+
+ /** Get the value of this property.
+ * @result The current value of the property.
+ */
+ PropertyType get_value() const
+ {
+ const PropertyProxy_Base& base = *this;
+ // The downcast to PropertyProxy<T> is safe, and avoids code duplication.
+ return static_cast<const PropertyProxy<T>&>(base).get_value();
+ }
+
+ operator PropertyType() const
+ { return this->get_value(); }
+};
+
+
+/**** Template Implementation **********************************************/
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+template <class T>
+void PropertyProxy<T>::set_value(const T& data)
+{
+ Glib::Value<T> value;
+ value.init(Glib::Value<T>::value_type());
+
+ value.set(data);
+ set_property_(value);
+}
+
+template <class T>
+T PropertyProxy<T>::get_value() const
+{
+ Glib::Value<T> value;
+ value.init(Glib::Value<T>::value_type());
+
+ get_property_(value);
+ return value.get();
+}
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+} // namespace Glib
+
+
+#endif /* _GLIBMM_PROPERTYPROXY_H */
+
diff --git a/libs/glibmm2/glibmm/propertyproxy_base.cc b/libs/glibmm2/glibmm/propertyproxy_base.cc
new file mode 100644
index 0000000000..d10c8cd352
--- /dev/null
+++ b/libs/glibmm2/glibmm/propertyproxy_base.cc
@@ -0,0 +1,151 @@
+// -*- c++ -*-
+/* $Id$ */
+
+/* propertyproxy_base.h
+ *
+ * Copyright 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/propertyproxy_base.h>
+#include <glibmm/signalproxy_connectionnode.h>
+#include <glibmm/object.h>
+#include <glibmm/private/object_p.h>
+
+namespace Glib
+{
+
+/** PropertyProxyConnectionNode is a connection node for use with SignalProxyProperty.
+ * It's like ProxyConnectionNode, but it contains the property name too.
+ */
+class PropertyProxyConnectionNode : public SignalProxyConnectionNode
+{
+public:
+ friend class SignalProxyProperty;
+
+ PropertyProxyConnectionNode(const sigc::slot_base& slot, GObject* gobject, const gchar* property_name);
+
+protected:
+ //This will be examined in the callback.
+ //Should be a static string literal.
+ const gchar* property_name_;
+};
+
+PropertyProxyConnectionNode::PropertyProxyConnectionNode(const sigc::slot_base& slot, GObject* gobject, const gchar* property_name)
+: SignalProxyConnectionNode(slot, gobject),
+ property_name_(property_name)
+{
+}
+
+//SignalProxyProperty implementation:
+
+SignalProxyProperty::SignalProxyProperty(Glib::ObjectBase* obj, const gchar* property_name)
+: SignalProxyBase(obj),
+ property_name_(property_name)
+{
+}
+
+SignalProxyProperty::~SignalProxyProperty()
+{
+}
+
+sigc::connection SignalProxyProperty::connect(const SlotType& sl)
+{
+ // create a proxy to hold our connection info
+ PropertyProxyConnectionNode* pConnectionNode = new PropertyProxyConnectionNode(sl, obj_->gobj(), property_name_ );
+
+ // connect it to gtk+
+ // pConnectionNode will be passed as the data argument to the callback.
+ // The callback will then call the virtual Object::property_change_notify() method,
+ // which will contain a switch/case statement which will examine the property name.
+ pConnectionNode->connection_id_ = g_signal_connect_data(obj_->gobj(),
+ "notify", (GCallback)(&callback), pConnectionNode,
+ &PropertyProxyConnectionNode::destroy_notify_handler,
+ G_CONNECT_AFTER);
+
+ return sigc::connection(pConnectionNode->slot_);
+}
+
+void SignalProxyProperty::callback(GObject*, GParamSpec* pspec, gpointer data) //static
+{
+ if(pspec && data)
+ {
+ //Get the name of the property that has changed:
+ const char* property_name_changed = pspec->name;
+
+ //Get the name of the property that we are waiting for:
+ PropertyProxyConnectionNode* conn = static_cast<PropertyProxyConnectionNode*>(data);
+ const char* property_name_monitored = conn->property_name_;
+
+ //If it's the correct property, then call the signal handler:
+ if(strcmp(property_name_changed, property_name_monitored) == 0)
+ {
+ if(sigc::slot_base *const slot = data_to_slot(data))
+ (*static_cast<sigc::slot<void>*>(slot))();
+ }
+ }
+}
+
+
+//PropertyProxy_Base implementation:
+
+PropertyProxy_Base::PropertyProxy_Base(ObjectBase* obj, const char* property_name)
+:
+ obj_ (obj),
+ property_name_ (property_name)
+{}
+
+PropertyProxy_Base::PropertyProxy_Base(const PropertyProxy_Base& other)
+:
+ obj_ (other.obj_),
+ property_name_ (other.property_name_)
+{}
+
+SignalProxyProperty PropertyProxy_Base::signal_changed()
+{
+ return SignalProxyProperty(obj_, property_name_);
+}
+
+void PropertyProxy_Base::set_property_(const Glib::ValueBase& value)
+{
+ g_object_set_property(obj_->gobj(), property_name_, value.gobj());
+}
+
+void PropertyProxy_Base::get_property_(Glib::ValueBase& value) const
+{
+ g_object_get_property(obj_->gobj(), property_name_, value.gobj());
+}
+
+void PropertyProxy_Base::reset_property_()
+{
+ // Get information about the parameter:
+ const GParamSpec *const pParamSpec =
+ g_object_class_find_property(G_OBJECT_GET_CLASS(obj_->gobj()), property_name_);
+
+ g_return_if_fail(pParamSpec != 0);
+
+ Glib::ValueBase value;
+ value.init(G_PARAM_SPEC_VALUE_TYPE(pParamSpec));
+
+ // An explicit reset is not needed, because ValueBase:init()
+ // has already initialized it to the default value for this type.
+ // value.reset();
+
+ g_object_set_property(obj_->gobj(), property_name_, value.gobj());
+}
+
+} // namespace Glib
+
diff --git a/libs/glibmm2/glibmm/propertyproxy_base.h b/libs/glibmm2/glibmm/propertyproxy_base.h
new file mode 100644
index 0000000000..036291df39
--- /dev/null
+++ b/libs/glibmm2/glibmm/propertyproxy_base.h
@@ -0,0 +1,84 @@
+// -*- c++ -*-
+#ifndef _GLIBMM_PROPERTYPROXY_BASE_H
+#define _GLIBMM_PROPERTYPROXY_BASE_H
+/* $Id$ */
+
+/* propertyproxy_base.h
+ *
+ * Copyright 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/value.h>
+#include <glibmm/signalproxy.h>
+
+
+namespace Glib
+{
+
+class ObjectBase;
+
+/// Use the connect() method, with sigc::ptr_fun() or sig::mem_fun() to connect signals to signal handlers.
+class SignalProxyProperty : public SignalProxyBase
+{
+public:
+ friend class PropertyProxy_Base;
+
+ SignalProxyProperty(Glib::ObjectBase* obj, const gchar* property_name);
+ ~SignalProxyProperty();
+
+ typedef sigc::slot<void> SlotType;
+ sigc::connection connect(const SlotType& sl);
+
+protected:
+ static void callback(GObject* object, GParamSpec* pspec, gpointer data);
+
+ const char* property_name_; //Should be a static string literal.
+
+private:
+ SignalProxyProperty& operator=(const SignalProxyProperty&); // not implemented
+};
+
+
+class PropertyProxy_Base
+{
+public:
+ PropertyProxy_Base(ObjectBase* obj, const char* property_name);
+ PropertyProxy_Base(const PropertyProxy_Base& other);
+
+ ///This signal will be emitted when the property changes.
+ SignalProxyProperty signal_changed();
+
+ ObjectBase* get_object() const { return obj_; }
+ const char* get_name() const { return property_name_; }
+
+protected:
+ void set_property_(const Glib::ValueBase& value);
+ void get_property_(Glib::ValueBase& value) const;
+ void reset_property_();
+
+ ObjectBase* obj_; //The C++ wrapper instance of which this PropertyProxy is a member.
+ const char* property_name_; //Should be a static string literal.
+
+private:
+ //Declared as private, but not implemented to prevent any automatically generated implementation.
+ PropertyProxy_Base& operator=(const PropertyProxy_Base&);
+};
+
+} // namespace Glib
+
+#endif /* _GLIBMM_PROPERTYPROXY_BASE_H */
+
diff --git a/libs/glibmm2/glibmm/quark.cc b/libs/glibmm2/glibmm/quark.cc
new file mode 100644
index 0000000000..ea01f470b0
--- /dev/null
+++ b/libs/glibmm2/glibmm/quark.cc
@@ -0,0 +1,66 @@
+/* $Id$ */
+
+/* quark.cc
+ *
+ * Copyright 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glib/gquark.h>
+#include <glibmm/quark.h>
+
+namespace Glib
+{
+
+QueryQuark::QueryQuark(const GQuark& q)
+ : quark_(q)
+{}
+
+QueryQuark::QueryQuark(const ustring& s)
+: quark_(g_quark_try_string(s.c_str()))
+{}
+
+QueryQuark::QueryQuark(const char* s)
+: quark_(g_quark_try_string(s))
+{}
+
+QueryQuark& QueryQuark::operator=(const QueryQuark& q)
+{ quark_=q.quark_;
+ return *this;
+}
+
+QueryQuark::operator ustring() const
+{
+ return ustring(g_quark_to_string(quark_));
+}
+
+
+Quark::Quark(const ustring& s)
+: QueryQuark(g_quark_from_string(s.c_str()))
+{}
+
+Quark::Quark(const char* s)
+: QueryQuark(g_quark_from_string(s))
+{}
+
+Quark::~Quark()
+{}
+
+
+GQuark quark_ = 0;
+GQuark quark_cpp_wrapper_deleted_ = 0;
+
+} /* namespace Glib */
diff --git a/libs/glibmm2/glibmm/quark.h b/libs/glibmm2/glibmm/quark.h
new file mode 100644
index 0000000000..d2f450fe07
--- /dev/null
+++ b/libs/glibmm2/glibmm/quark.h
@@ -0,0 +1,88 @@
+// -*- c++ -*-
+#ifndef _GLIBMM_QUARK_H
+#define _GLIBMM_QUARK_H
+/* $Id$ */
+
+/* quark.h
+ *
+ * Copyright 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glib/gquark.h>
+#include <glibmm/ustring.h>
+
+
+namespace Glib
+{
+
+/** Quarks are unique IDs in Glib for strings for use in
+ * hash table lookups. Each Quark is unique but may change
+ * between runs.
+ *
+ * QueryQuark is a converter class for looking up but not
+ * allocating an ID. An id means the quark lookup failed.
+ *
+ * Quark is used for actions for which the id should live on
+ * While QueryQuark should be used for queries.
+ * ie.
+ * void set_data (const Quark&, void * data);
+ * void* get_data (const QueryQuark&);
+ */
+class QueryQuark
+{
+ public:
+ QueryQuark(const GQuark& q);
+ QueryQuark(const ustring& s);
+ QueryQuark(const char*s);
+ ~QueryQuark() {}
+ QueryQuark& operator=(const QueryQuark& q);
+ operator ustring() const;
+
+ operator GQuark() const {return quark_;}
+ GQuark id() const {return quark_;}
+
+ private:
+ GQuark quark_;
+};
+
+class Quark: public QueryQuark
+{
+ public:
+ Quark(const ustring& s);
+ Quark(const char* s);
+ ~Quark();
+};
+
+/** @relates Glib::QueryQuark */
+inline bool operator==(const QueryQuark& a, const QueryQuark& b)
+ { return a.id() == b.id(); }
+
+/** @relates Glib::QueryQuark */
+inline bool operator!=(const QueryQuark& a, const QueryQuark& b)
+ { return a.id() != b.id(); }
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+// TODO: Put this somewhere else.
+// (internal) The quark for C++ wrappers.
+extern GLIBMM_API GQuark quark_;
+extern GLIBMM_API GQuark quark_cpp_wrapper_deleted_;
+#endif
+
+} /* namespace Glib */
+
+#endif /* _GLIBMM_QUARK_H */
+
diff --git a/libs/glibmm2/glibmm/random.cc b/libs/glibmm2/glibmm/random.cc
new file mode 100644
index 0000000000..d4475616b5
--- /dev/null
+++ b/libs/glibmm2/glibmm/random.cc
@@ -0,0 +1,76 @@
+// -*- c++ -*-
+/* $Id$ */
+
+/* random.cc
+ *
+ * Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/random.h>
+#include <glib/grand.h>
+
+
+namespace Glib
+{
+
+Rand::Rand()
+:
+ gobject_ (g_rand_new())
+{}
+
+Rand::Rand(guint32 seed)
+:
+ gobject_ (g_rand_new_with_seed(seed))
+{}
+
+Rand::~Rand()
+{
+ g_rand_free(gobject_);
+}
+
+void Rand::set_seed(guint32 seed)
+{
+ g_rand_set_seed(gobject_, seed);
+}
+
+bool Rand::get_bool()
+{
+ return g_rand_boolean(gobject_);
+}
+
+guint32 Rand::get_int()
+{
+ return g_rand_int(gobject_);
+}
+
+gint32 Rand::get_int_range(gint32 begin, gint32 end)
+{
+ return g_rand_int_range(gobject_, begin, end);
+}
+
+double Rand::get_double()
+{
+ return g_rand_double(gobject_);
+}
+
+double Rand::get_double_range(double begin, double end)
+{
+ return g_rand_double_range(gobject_, begin, end);
+}
+
+} // namespace Glib
+
diff --git a/libs/glibmm2/glibmm/random.h b/libs/glibmm2/glibmm/random.h
new file mode 100644
index 0000000000..4a4ce84420
--- /dev/null
+++ b/libs/glibmm2/glibmm/random.h
@@ -0,0 +1,73 @@
+// -*- c++ -*-
+#ifndef _GLIBMM_RANDOM_H
+#define _GLIBMM_RANDOM_H
+
+/* $Id$ */
+
+/* random.h
+ *
+ * Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glib/gtypes.h>
+
+extern "C" { typedef struct _GRand GRand; }
+
+
+namespace Glib
+{
+
+/** @defgroup Random Random Numbers
+ * Pseudo random number generator.
+ * @{
+ */
+
+class Rand
+{
+public:
+ Rand();
+ explicit Rand(guint32 seed);
+ ~Rand();
+
+ void set_seed(guint32 seed);
+
+ bool get_bool();
+
+ guint32 get_int();
+ gint32 get_int_range(gint32 begin, gint32 end);
+
+ double get_double();
+ double get_double_range(double begin, double end);
+
+ GRand* gobj() { return gobject_; }
+ const GRand* gobj() const { return gobject_; }
+
+private:
+ GRand* gobject_;
+
+ // noncopyable
+ Rand(const Rand&);
+ Rand& operator=(const Rand&);
+};
+
+/** @} group Random */
+
+} // namespace Glib
+
+
+#endif /* _GLIBMM_RANDOM_H */
+
diff --git a/libs/glibmm2/glibmm/refptr.h b/libs/glibmm2/glibmm/refptr.h
new file mode 100644
index 0000000000..d375f7a52b
--- /dev/null
+++ b/libs/glibmm2/glibmm/refptr.h
@@ -0,0 +1,318 @@
+// -*- c++ -*-
+#ifndef _GLIBMM_REFPTR_H
+#define _GLIBMM_REFPTR_H
+
+/* $Id$ */
+
+/* Copyright 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+namespace Glib
+{
+
+/** RefPtr<> is a reference-counting shared smartpointer.
+ *
+ * Some objects in gtkmm are obtained from a shared
+ * store. Consequently you cannot instantiate them yourself. Instead they
+ * return a RefPtr which behaves much like an ordinary pointer in that members
+ * can be reached with the usual <code>object_ptr->member</code> notation.
+ * Unlike most other smart pointers, RefPtr doesn't support dereferencing
+ * through <code>*object_ptr</code>.
+ *
+ * Reference counting means that a shared reference count is incremented each
+ * time a RefPtr is copied, and decremented each time a RefPtr is destroyed,
+ * for instance when it leaves its scope. When the reference count reaches
+ * zero, the contained object is deleted, meaning you don't need to remember
+ * to delete the object.
+ *
+ * RefPtr<> can store any class that has reference() and unreference() methods.
+ * In gtkmm, that is anything derived from Glib::ObjectBase, such as
+ * Gdk::Pixmap.
+ *
+ * See the "Memory Management" section in the "Programming with gtkmm"
+ * book for further information.
+ */
+template <class T_CppObject>
+class RefPtr
+{
+public:
+ /** Default constructor
+ *
+ * Afterwards it will be null and use of -> will cause a segmentation fault.
+ */
+ inline RefPtr();
+
+ /// Destructor - decrements reference count.
+ inline ~RefPtr();
+
+ /// For use only by the ::create() methods.
+ explicit inline RefPtr(T_CppObject* pCppObject);
+
+ /** Copy constructor
+ *
+ * This increments the shared reference count.
+ */
+ inline RefPtr(const RefPtr<T_CppObject>& src);
+
+ /** Copy constructor (from different, but castable type).
+ *
+ * Increments the reference count.
+ */
+ template <class T_CastFrom>
+ inline RefPtr(const RefPtr<T_CastFrom>& src);
+
+ /** Swap the contents of two RefPtr<>.
+ * This method swaps the internal pointers to T_CppObject. This can be
+ * done safely without involving a reference/unreference cycle and is
+ * therefore highly efficient.
+ */
+ inline void swap(RefPtr<T_CppObject>& other);
+
+ /// Copy from another RefPtr:
+ inline RefPtr<T_CppObject>& operator=(const RefPtr<T_CppObject>& src);
+
+ /** Copy from different, but castable type).
+ *
+ * Increments the reference count.
+ */
+ template <class T_CastFrom>
+ inline RefPtr<T_CppObject>& operator=(const RefPtr<T_CastFrom>& src);
+
+ /// Tests whether the RefPtr<> point to the same underlying instance.
+ inline bool operator==(const RefPtr<T_CppObject>& src) const;
+
+ /// See operator==().
+ inline bool operator!=(const RefPtr<T_CppObject>& src) const;
+
+ /** Dereferencing.
+ *
+ * Use the methods of the underlying instance like so:
+ * <code>refptr->memberfun()</code>.
+ */
+ inline T_CppObject* operator->() const;
+
+ /** Test whether the RefPtr<> points to any underlying instance.
+ *
+ * Mimics usage of ordinary pointers:
+ * @code
+ * if (ptr)
+ * do_something();
+ * @endcode
+ */
+ inline operator bool() const;
+
+ /// Set underlying instance to 0, decrementing reference count of existing instance appropriately.
+ inline void clear();
+
+
+ /** Dynamic cast to derived class.
+ *
+ * The RefPtr can't be cast with the usual notation so instead you can use
+ * @code
+ * ptr_derived = RefPtr<Derived>::cast_dynamic(ptr_base);
+ * @endcode
+ */
+ template <class T_CastFrom>
+ static inline RefPtr<T_CppObject> cast_dynamic(const RefPtr<T_CastFrom>& src);
+
+ /** Static cast to derived class.
+ *
+ * Like the dynamic cast; the notation is
+ * @code
+ * ptr_derived = RefPtr<Derived>::cast_static(ptr_base);
+ * @endcode
+ */
+ template <class T_CastFrom>
+ static inline RefPtr<T_CppObject> cast_static(const RefPtr<T_CastFrom>& src);
+
+private:
+ T_CppObject* pCppObject_;
+};
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+// RefPtr<>::operator->() comes first here since it's used by other methods.
+// If it would come after them it wouldn't be inlined.
+
+template <class T_CppObject> inline
+T_CppObject* RefPtr<T_CppObject>::operator->() const
+{
+ return pCppObject_;
+}
+
+template <class T_CppObject> inline
+RefPtr<T_CppObject>::RefPtr()
+:
+ pCppObject_ (0)
+{}
+
+template <class T_CppObject> inline
+RefPtr<T_CppObject>::~RefPtr()
+{
+ if(pCppObject_)
+ pCppObject_->unreference(); // This could cause pCppObject to be deleted.
+}
+
+template <class T_CppObject> inline
+RefPtr<T_CppObject>::RefPtr(T_CppObject* pCppObject)
+:
+ pCppObject_ (pCppObject)
+{}
+
+template <class T_CppObject> inline
+RefPtr<T_CppObject>::RefPtr(const RefPtr<T_CppObject>& src)
+:
+ pCppObject_ (src.pCppObject_)
+{
+ if(pCppObject_)
+ pCppObject_->reference();
+}
+
+// The templated ctor allows copy construction from any object that's
+// castable. Thus, it does downcasts:
+// base_ref = derived_ref
+template <class T_CppObject>
+ template <class T_CastFrom>
+inline
+RefPtr<T_CppObject>::RefPtr(const RefPtr<T_CastFrom>& src)
+:
+ // A different RefPtr<> will not allow us access to pCppObject_. We need
+ // to add a get_underlying() for this, but that would encourage incorrect
+ // use, so we use the less well-known operator->() accessor:
+ pCppObject_ (src.operator->())
+{
+ if(pCppObject_)
+ pCppObject_->reference();
+}
+
+template <class T_CppObject> inline
+void RefPtr<T_CppObject>::swap(RefPtr<T_CppObject>& other)
+{
+ T_CppObject *const temp = pCppObject_;
+ pCppObject_ = other.pCppObject_;
+ other.pCppObject_ = temp;
+}
+
+template <class T_CppObject> inline
+RefPtr<T_CppObject>& RefPtr<T_CppObject>::operator=(const RefPtr<T_CppObject>& src)
+{
+ // In case you haven't seen the swap() technique to implement copy
+ // assignment before, here's what it does:
+ //
+ // 1) Create a temporary RefPtr<> instance via the copy ctor, thereby
+ // increasing the reference count of the source object.
+ //
+ // 2) Swap the internal object pointers of *this and the temporary
+ // RefPtr<>. After this step, *this already contains the new pointer,
+ // and the old pointer is now managed by temp.
+ //
+ // 3) The destructor of temp is executed, thereby unreferencing the
+ // old object pointer.
+ //
+ // This technique is described in Herb Sutter's "Exceptional C++", and
+ // has a number of advantages over conventional approaches:
+ //
+ // - Code reuse by calling the copy ctor.
+ // - Strong exception safety for free.
+ // - Self assignment is handled implicitely.
+ // - Simplicity.
+ // - It just works and is hard to get wrong; i.e. you can use it without
+ // even thinking about it to implement copy assignment whereever the
+ // object data is managed indirectly via a pointer, which is very common.
+
+ RefPtr<T_CppObject> temp (src);
+ this->swap(temp);
+ return *this;
+}
+
+template <class T_CppObject>
+ template <class T_CastFrom>
+inline
+RefPtr<T_CppObject>& RefPtr<T_CppObject>::operator=(const RefPtr<T_CastFrom>& src)
+{
+ RefPtr<T_CppObject> temp (src);
+ this->swap(temp);
+ return *this;
+}
+
+template <class T_CppObject> inline
+bool RefPtr<T_CppObject>::operator==(const RefPtr<T_CppObject>& src) const
+{
+ return (pCppObject_ == src.pCppObject_);
+}
+
+template <class T_CppObject> inline
+bool RefPtr<T_CppObject>::operator!=(const RefPtr<T_CppObject>& src) const
+{
+ return (pCppObject_ != src.pCppObject_);
+}
+
+template <class T_CppObject> inline
+RefPtr<T_CppObject>::operator bool() const
+{
+ return (pCppObject_ != 0);
+}
+
+template <class T_CppObject> inline
+void RefPtr<T_CppObject>::clear()
+{
+ RefPtr<T_CppObject> temp; // swap with an empty RefPtr<> to clear *this
+ this->swap(temp);
+}
+
+template <class T_CppObject>
+ template <class T_CastFrom>
+inline
+RefPtr<T_CppObject> RefPtr<T_CppObject>::cast_dynamic(const RefPtr<T_CastFrom>& src)
+{
+ T_CppObject *const pCppObject = dynamic_cast<T_CppObject*>(src.operator->());
+
+ if(pCppObject)
+ pCppObject->reference();
+
+ return RefPtr<T_CppObject>(pCppObject);
+}
+
+template <class T_CppObject>
+ template <class T_CastFrom>
+inline
+RefPtr<T_CppObject> RefPtr<T_CppObject>::cast_static(const RefPtr<T_CastFrom>& src)
+{
+ T_CppObject *const pCppObject = static_cast<T_CppObject*>(src.operator->());
+
+ if(pCppObject)
+ pCppObject->reference();
+
+ return RefPtr<T_CppObject>(pCppObject);
+}
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+/** @relates Glib::RefPtr */
+template <class T_CppObject> inline
+void swap(RefPtr<T_CppObject>& lhs, RefPtr<T_CppObject>& rhs)
+{
+ lhs.swap(rhs);
+}
+
+} // namespace Glib
+
+
+#endif /* _GLIBMM_REFPTR_H */
+
diff --git a/libs/glibmm2/glibmm/sarray.h b/libs/glibmm2/glibmm/sarray.h
new file mode 100644
index 0000000000..01d7ee204e
--- /dev/null
+++ b/libs/glibmm2/glibmm/sarray.h
@@ -0,0 +1,108 @@
+// -*- c++ -*-
+#ifndef _GLIBMM_SARRAY_H
+#define _GLIBMM_SARRAY_H
+
+/* $Id$ */
+
+/* array.h
+ *
+ * Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#include <glibmm/arrayhandle.h>
+#include <glibmm/ustring.h>
+
+namespace Glib { typedef Glib::ArrayHandle<Glib::ustring> SArray; }
+
+#if 0
+
+namespace Glib
+{
+
+template <>
+inline void cpp_type_to_c_type(const ustring& cpp_value, type_constpch& ref_c_value)
+{
+ ref_c_value = cpp_value.c_str();
+}
+
+template <>
+inline void cpp_type_to_c_type(const std::string& cpp_value, type_constpch& ref_c_value)
+{
+ ref_c_value = cpp_value.c_str();
+}
+
+typedef Array<Glib::ustring, const char*> SArray;
+
+/*
+class SArray: public Array<nstring, const char*>
+{
+public:
+ typedef const char* T_c;
+ typedef Array<nstring, const char*> type_base;
+
+ SArray(const SArray& src);
+
+ // copy other containers
+ template <typename T_container>
+ SArray(const T_container& t)
+ {
+ owned_ = Array_Helpers::Traits<T_container, pointer>::get_owned();
+ size_ = Array_Helpers::Traits<T_container, pointer>::get_size(t);
+ pData_ = Array_Helpers::Traits<T_container, pointer>::get_data(t);
+ }
+
+ SArray(const T_c* pValues, size_type size);
+
+ // copy a sequence
+ template <typename Iterator>
+ SArray(Iterator b, Iterator e);
+
+ operator std::vector<nstring>() const;
+ operator std::vector<ustring>() const;
+ operator std::vector<std::string>() const;
+
+ operator std::deque<nstring>() const;
+ operator std::deque<ustring>() const;
+ operator std::deque<std::string>() const;
+
+ operator std::list<nstring>() const;
+ operator std::list<ustring>() const;
+ operator std::list<std::string>() const;
+};
+
+
+//template <typename T_container>
+//SArray::SArray(const T_container& t)
+//: type_base(t)
+//{
+//}
+
+
+template <typename Iterator>
+SArray::SArray(Iterator b, Iterator e)
+: type_base(b, e)
+{
+}
+*/
+
+} // namespace Glib
+
+#endif /* #if 0 */
+
+#endif // _GLIBMM_SARRAY_H
+
diff --git a/libs/glibmm2/glibmm/shell.cc b/libs/glibmm2/glibmm/shell.cc
new file mode 100644
index 0000000000..adb3473dde
--- /dev/null
+++ b/libs/glibmm2/glibmm/shell.cc
@@ -0,0 +1,93 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <glibmm/shell.h>
+#include <glibmm/private/shell_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/utility.h>
+
+
+namespace Glib
+{
+
+/**** shell utility functions **********************************************/
+
+Glib::ArrayHandle<std::string> shell_parse_argv(const std::string& command_line)
+{
+ char** argv = 0;
+ int argc = 0;
+ GError* error = 0;
+
+ g_shell_parse_argv(command_line.c_str(), &argc, &argv, &error);
+
+ if(error)
+ Glib::Error::throw_exception(error);
+
+ return Glib::ArrayHandle<std::string>(argv, argc, Glib::OWNERSHIP_DEEP);
+}
+
+std::string shell_quote(const std::string& unquoted_string)
+{
+ const ScopedPtr<char> buf (g_shell_quote(unquoted_string.c_str()));
+ return std::string(buf.get());
+}
+
+std::string shell_unquote(const std::string& quoted_string)
+{
+ GError* error = 0;
+ char *const buf = g_shell_unquote(quoted_string.c_str(), &error);
+
+ if(error)
+ Glib::Error::throw_exception(error);
+
+ return std::string(ScopedPtr<char>(buf).get());
+}
+
+} // namespace Glib
+
+
+namespace
+{
+} // anonymous namespace
+
+
+Glib::ShellError::ShellError(Glib::ShellError::Code error_code, const Glib::ustring& error_message)
+:
+ Glib::Error (G_SHELL_ERROR, error_code, error_message)
+{}
+
+Glib::ShellError::ShellError(GError* gobject)
+:
+ Glib::Error (gobject)
+{}
+
+Glib::ShellError::Code Glib::ShellError::code() const
+{
+ return static_cast<Code>(Glib::Error::code());
+}
+
+void Glib::ShellError::throw_func(GError* gobject)
+{
+ throw Glib::ShellError(gobject);
+}
+
+
diff --git a/libs/glibmm2/glibmm/shell.h b/libs/glibmm2/glibmm/shell.h
new file mode 100644
index 0000000000..55512f57b2
--- /dev/null
+++ b/libs/glibmm2/glibmm/shell.h
@@ -0,0 +1,123 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GLIBMM_SHELL_H
+#define _GLIBMM_SHELL_H
+
+
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#include <glib/gshell.h>
+#include <string>
+
+#include <glibmm/arrayhandle.h>
+#include <glibmm/error.h>
+
+#include <glibmmconfig.h>
+GLIBMM_USING_STD(string)
+
+
+namespace Glib
+{
+
+/** @defgroup ShellUtils Shell-related Utilities
+ * Shell-like command line handling.
+ * @{
+ */
+
+/** Exception class for shell utility errors.
+ */
+class ShellError : public Glib::Error
+{
+public:
+ enum Code
+ {
+ BAD_QUOTING,
+ EMPTY_STRING,
+ FAILED
+ };
+
+ ShellError(Code error_code, const Glib::ustring& error_message);
+ explicit ShellError(GError* gobject);
+ Code code() const;
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+private:
+ static void throw_func(GError* gobject);
+ friend void wrap_init(); // uses throw_func()
+#endif
+};
+
+
+/** Parses a command line into an argument vector, in much the same way the
+ * shell would, but without many of the expansions the shell would perform
+ * (variable expansion, globs, operators, filename expansion, etc.\ are not
+ * supported). The results are defined to be the same as those you would
+ * get from a UNIX98 /bin/sh, as long as the input contains none of the
+ * unsupported shell expansions. If the input does contain such expansions,
+ * they are passed through literally.
+ * @param command_line Command line to parse.
+ * @return Array of args (The generic ArrayHandle will be implicitly
+ * converted to any STL compatible container type).
+ * @throw Glib::ShellError
+ */
+Glib::ArrayHandle<std::string> shell_parse_argv(const std::string& command_line);
+
+/** Quotes a string so that the shell (/bin/sh) will interpret the quoted
+ * string to mean @a unquoted_string. If you pass a filename to the shell,
+ * for example, you should first quote it with this function. The quoting
+ * style used is undefined (single or double quotes may be used).
+ * @param unquoted_string A literal string.
+ * @return A quoted string.
+ */
+std::string shell_quote(const std::string& unquoted_string);
+
+/** Unquotes a string as the shell (/bin/sh) would. Only handles quotes; if
+ * a string contains file globs, arithmetic operators, variables, backticks,
+ * redirections, or other special-to-the-shell features, the result will be
+ * different from the result a real shell would produce (the variables,
+ * backticks, etc. will be passed through literally instead of being expanded).
+ * This function is guaranteed to succeed if applied to the result of
+ * shell_quote(). If it fails, it throws a Glib::ShellError exception. The
+ * @a quoted_string need not actually contain quoted or escaped text;
+ * shell_unquote() simply goes through the string and unquotes/unescapes
+ * anything that the shell would. Both single and double quotes are handled,
+ * as are escapes including escaped newlines.
+ *
+ * Shell quoting rules are a bit strange. Single quotes preserve the literal
+ * string exactly. Escape sequences are not allowed; not even <tt>\\'</tt> --
+ * if you want a <tt>'</tt> in the quoted text, you have to do something like
+ * <tt>'foo'\\''bar'</tt>. Double quotes allow <tt>$</tt>, <tt>`</tt>,
+ * <tt>"</tt>, <tt>\\</tt>, and newline to be escaped with backslash.
+ * Otherwise double quotes preserve things literally.
+ *
+ * @param quoted_string Shell-quoted string.
+ * @return An unquoted string.
+ * @throw Glib::ShellError
+ */
+std::string shell_unquote(const std::string& quoted_string);
+
+/** @} group ShellUtils */
+
+} // namespace Glib
+
+
+#endif /* _GLIBMM_SHELL_H */
+
diff --git a/libs/glibmm2/glibmm/signalproxy.cc b/libs/glibmm2/glibmm/signalproxy.cc
new file mode 100644
index 0000000000..67f7a9290b
--- /dev/null
+++ b/libs/glibmm2/glibmm/signalproxy.cc
@@ -0,0 +1,105 @@
+// -*- c++ -*-
+
+/* $Id$ */
+
+/* signalproxy.cc
+ *
+ * Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glib-object.h>
+#include <glibmm/exceptionhandler.h>
+#include <glibmm/object.h>
+#include <glibmm/signalproxy.h>
+
+
+namespace Glib
+{
+
+// SignalProxyBase implementation:
+
+SignalProxyBase::SignalProxyBase(Glib::ObjectBase* obj)
+:
+ obj_ (obj)
+{}
+
+
+// SignalProxyNormal implementation:
+
+SignalProxyNormal::SignalProxyNormal(Glib::ObjectBase* obj, const SignalProxyInfo* info)
+:
+ SignalProxyBase (obj),
+ info_ (info)
+{}
+
+SignalProxyNormal::~SignalProxyNormal()
+{}
+
+sigc::slot_base&
+SignalProxyNormal::connect_(const sigc::slot_base& slot, bool after)
+{
+ return connect_impl_(info_->callback, slot, after);
+}
+
+sigc::slot_base&
+SignalProxyNormal::connect_notify_(const sigc::slot_base& slot, bool after)
+{
+ return connect_impl_(info_->notify_callback, slot, after);
+}
+
+sigc::slot_base&
+SignalProxyNormal::connect_impl_(GCallback callback, const sigc::slot_base& slot, bool after)
+{
+ // create a proxy to hold our connection info
+ SignalProxyConnectionNode *const pConnectionNode =
+ new SignalProxyConnectionNode(slot, obj_->gobj());
+
+ // connect it to glib
+ // pConnectionNode will be passed in the data argument to the callback.
+ pConnectionNode->connection_id_ = g_signal_connect_data(
+ obj_->gobj(), info_->signal_name, callback, pConnectionNode,
+ &SignalProxyConnectionNode::destroy_notify_handler,
+ static_cast<GConnectFlags>((after) ? G_CONNECT_AFTER : 0));
+
+ return pConnectionNode->slot_;
+}
+
+void SignalProxyNormal::emission_stop()
+{
+ g_signal_stop_emission_by_name(obj_->gobj(), info_->signal_name);
+}
+
+// static
+void SignalProxyNormal::slot0_void_callback(GObject* self, void* data)
+{
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper(self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = data_to_slot(data))
+ (*static_cast<sigc::slot<void>*>(slot))();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+} // namespace Glib
+
diff --git a/libs/glibmm2/glibmm/signalproxy.h b/libs/glibmm2/glibmm/signalproxy.h
new file mode 100644
index 0000000000..43c8fc3fb8
--- /dev/null
+++ b/libs/glibmm2/glibmm/signalproxy.h
@@ -0,0 +1,394 @@
+// -*- c++ -*-
+/* This is a generated file, do not edit. Generated from signalproxy.h.m4 */
+
+#ifndef _GLIBMM_SIGNALPROXY_H
+#define _GLIBMM_SIGNALPROXY_H
+
+extern "C"
+{
+ typedef void (*GCallback) (void);
+ typedef struct _GObject GObject;
+}
+
+#include <sigc++/sigc++.h>
+#include <glibmm/signalproxy_connectionnode.h>
+
+
+namespace Glib
+{
+
+// Forward declarations
+class ObjectBase;
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+struct SignalProxyInfo
+{
+ const char* signal_name;
+ GCallback callback;
+ GCallback notify_callback;
+};
+
+#endif //DOXYGEN_SHOULD_SKIP_THIS
+
+// This base class is used by SignalProxyNormal and SignalProxyProperty.
+class SignalProxyBase
+{
+public:
+ SignalProxyBase(Glib::ObjectBase* obj);
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static inline sigc::slot_base* data_to_slot(void* data)
+ {
+ SignalProxyConnectionNode *const pConnectionNode = static_cast<SignalProxyConnectionNode*>(data);
+
+ // Return 0 if the connection is blocked.
+ return (!pConnectionNode->slot_.blocked()) ? &pConnectionNode->slot_ : 0;
+ }
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+protected:
+ ObjectBase* obj_;
+
+private:
+ SignalProxyBase& operator=(const SignalProxyBase&); // not implemented
+};
+
+
+// shared portion of a Signal
+/** The SignalProxy provides an API similar to sigc::signal that can be used to
+ * connect sigc::slots to glib signals.
+ *
+ * This holds the name of the glib signal and the object
+ * which might emit it. Actually, proxies are controlled by
+ * the template derivatives, which serve as gatekeepers for the
+ * types allowed on a particular signal.
+ *
+ */
+class SignalProxyNormal : public SignalProxyBase
+{
+public:
+ ~SignalProxyNormal();
+
+ /// stops the current signal emmision (not in libsigc++)
+ void emission_stop();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ // This callback for SignalProxy0<void>
+ // is defined here to avoid code duplication.
+ static void slot0_void_callback(GObject*, void* data);
+#endif
+
+protected:
+
+ /** Create a proxy for a signal that can be emitted by @a obj.
+ * @param obj The object that can emit the signal.
+ * @param info Information about the signal, including its name, and the C callbacks that should be called by glib.
+ */
+ SignalProxyNormal(Glib::ObjectBase* obj, const SignalProxyInfo* info);
+
+ /** Connects a signal to a generic signal handler. This is called by connect() in derived SignalProxy classes.
+ *
+ * @param slot The signal handler, usually created with sigc::mem_fun(), or sigc::ptr_fun().
+ * @param after Whether this signal handler should be called before or after the default signal handler.
+ */
+ sigc::slot_base& connect_(const sigc::slot_base& slot, bool after);
+
+ /** Connects a signal to a signal handler without a return value.
+ * This is called by connect() in derived SignalProxy classes.
+ *
+ * By default, the signal handler will be called before the default signal handler,
+ * in which case any return value would be replaced anyway by that of the later signal handler.
+ *
+ * @param slot The signal handler, which should have a void return type, usually created with sigc::mem_fun(), or sigc::ptr_fun().
+ * @param after Whether this signal handler should be called before or after the default signal handler.
+ */
+ sigc::slot_base& connect_notify_(const sigc::slot_base& slot, bool after);
+
+private:
+ const SignalProxyInfo* info_;
+
+ //TODO: We could maybe replace both connect_ and connect_notify_ with this in future, because they don't do anything extra.
+ /** This is called by connect_ and connect_impl_.
+ */
+ sigc::slot_base& connect_impl_(GCallback callback, const sigc::slot_base& slot, bool after);
+
+ // no copy assignment
+ SignalProxyNormal& operator=(const SignalProxyNormal&);
+};
+
+
+
+
+
+/**** Glib::SignalProxy0 ***************************************************/
+
+/** Proxy for signals with 0 arguments.
+ * Use the connect() method, with sigc::mem_fun() or sigc::ptr_fun() to connect signals to signal handlers.
+ */
+template <class R>
+class SignalProxy0 : public SignalProxyNormal
+{
+public:
+ typedef sigc::slot<R> SlotType;
+ typedef sigc::slot<void> VoidSlotType;
+
+ SignalProxy0(ObjectBase* obj, const SignalProxyInfo* info)
+ : SignalProxyNormal(obj, info) {}
+
+ /** Connects a signal to a signal handler.
+ * For instance, connect( sigc::mem_fun(*this, &TheClass::on_something) );
+ *
+ * @param slot The signal handler, usually created with sigc::mem_fun(), or sigc::ptr_fun().
+ * @param after Whether this signal handler should be called before or after the default signal handler.
+ */
+ sigc::connection connect(const SlotType& slot, bool after = true)
+ { return sigc::connection(connect_(slot, after)); }
+
+ /** Connects a signal to a signal handler without a return value.
+ * By default, the signal handler will be called before the default signal handler,
+ * in which case any return value would be replaced anyway by that of the later signal handler.
+ *
+ * For instance, connect( sigc::mem_fun(*this, &TheClass::on_something) );
+ *
+ * @param slot The signal handler, which should have a void return type, usually created with sigc::mem_fun(), or sigc::ptr_fun().
+ * @param after Whether this signal handler should be called before or after the default signal handler.
+ */
+ sigc::connection connect_notify(const VoidSlotType& slot, bool after = false)
+ { return sigc::connection(connect_notify_(slot, after)); }
+};
+
+
+/**** Glib::SignalProxy1 ***************************************************/
+
+/** Proxy for signals with 1 arguments.
+ * Use the connect() method, with sigc::mem_fun() or sigc::ptr_fun() to connect signals to signal handlers.
+ */
+template <class R,class P1>
+class SignalProxy1 : public SignalProxyNormal
+{
+public:
+ typedef sigc::slot<R,P1> SlotType;
+ typedef sigc::slot<void,P1> VoidSlotType;
+
+ SignalProxy1(ObjectBase* obj, const SignalProxyInfo* info)
+ : SignalProxyNormal(obj, info) {}
+
+ /** Connects a signal to a signal handler.
+ * For instance, connect( sigc::mem_fun(*this, &TheClass::on_something) );
+ *
+ * @param slot The signal handler, usually created with sigc::mem_fun(), or sigc::ptr_fun().
+ * @param after Whether this signal handler should be called before or after the default signal handler.
+ */
+ sigc::connection connect(const SlotType& slot, bool after = true)
+ { return sigc::connection(connect_(slot, after)); }
+
+ /** Connects a signal to a signal handler without a return value.
+ * By default, the signal handler will be called before the default signal handler,
+ * in which case any return value would be replaced anyway by that of the later signal handler.
+ *
+ * For instance, connect( sigc::mem_fun(*this, &TheClass::on_something) );
+ *
+ * @param slot The signal handler, which should have a void return type, usually created with sigc::mem_fun(), or sigc::ptr_fun().
+ * @param after Whether this signal handler should be called before or after the default signal handler.
+ */
+ sigc::connection connect_notify(const VoidSlotType& slot, bool after = false)
+ { return sigc::connection(connect_notify_(slot, after)); }
+};
+
+
+/**** Glib::SignalProxy2 ***************************************************/
+
+/** Proxy for signals with 2 arguments.
+ * Use the connect() method, with sigc::mem_fun() or sigc::ptr_fun() to connect signals to signal handlers.
+ */
+template <class R,class P1,class P2>
+class SignalProxy2 : public SignalProxyNormal
+{
+public:
+ typedef sigc::slot<R,P1,P2> SlotType;
+ typedef sigc::slot<void,P1,P2> VoidSlotType;
+
+ SignalProxy2(ObjectBase* obj, const SignalProxyInfo* info)
+ : SignalProxyNormal(obj, info) {}
+
+ /** Connects a signal to a signal handler.
+ * For instance, connect( sigc::mem_fun(*this, &TheClass::on_something) );
+ *
+ * @param slot The signal handler, usually created with sigc::mem_fun(), or sigc::ptr_fun().
+ * @param after Whether this signal handler should be called before or after the default signal handler.
+ */
+ sigc::connection connect(const SlotType& slot, bool after = true)
+ { return sigc::connection(connect_(slot, after)); }
+
+ /** Connects a signal to a signal handler without a return value.
+ * By default, the signal handler will be called before the default signal handler,
+ * in which case any return value would be replaced anyway by that of the later signal handler.
+ *
+ * For instance, connect( sigc::mem_fun(*this, &TheClass::on_something) );
+ *
+ * @param slot The signal handler, which should have a void return type, usually created with sigc::mem_fun(), or sigc::ptr_fun().
+ * @param after Whether this signal handler should be called before or after the default signal handler.
+ */
+ sigc::connection connect_notify(const VoidSlotType& slot, bool after = false)
+ { return sigc::connection(connect_notify_(slot, after)); }
+};
+
+
+/**** Glib::SignalProxy3 ***************************************************/
+
+/** Proxy for signals with 3 arguments.
+ * Use the connect() method, with sigc::mem_fun() or sigc::ptr_fun() to connect signals to signal handlers.
+ */
+template <class R,class P1,class P2,class P3>
+class SignalProxy3 : public SignalProxyNormal
+{
+public:
+ typedef sigc::slot<R,P1,P2,P3> SlotType;
+ typedef sigc::slot<void,P1,P2,P3> VoidSlotType;
+
+ SignalProxy3(ObjectBase* obj, const SignalProxyInfo* info)
+ : SignalProxyNormal(obj, info) {}
+
+ /** Connects a signal to a signal handler.
+ * For instance, connect( sigc::mem_fun(*this, &TheClass::on_something) );
+ *
+ * @param slot The signal handler, usually created with sigc::mem_fun(), or sigc::ptr_fun().
+ * @param after Whether this signal handler should be called before or after the default signal handler.
+ */
+ sigc::connection connect(const SlotType& slot, bool after = true)
+ { return sigc::connection(connect_(slot, after)); }
+
+ /** Connects a signal to a signal handler without a return value.
+ * By default, the signal handler will be called before the default signal handler,
+ * in which case any return value would be replaced anyway by that of the later signal handler.
+ *
+ * For instance, connect( sigc::mem_fun(*this, &TheClass::on_something) );
+ *
+ * @param slot The signal handler, which should have a void return type, usually created with sigc::mem_fun(), or sigc::ptr_fun().
+ * @param after Whether this signal handler should be called before or after the default signal handler.
+ */
+ sigc::connection connect_notify(const VoidSlotType& slot, bool after = false)
+ { return sigc::connection(connect_notify_(slot, after)); }
+};
+
+
+/**** Glib::SignalProxy4 ***************************************************/
+
+/** Proxy for signals with 4 arguments.
+ * Use the connect() method, with sigc::mem_fun() or sigc::ptr_fun() to connect signals to signal handlers.
+ */
+template <class R,class P1,class P2,class P3,class P4>
+class SignalProxy4 : public SignalProxyNormal
+{
+public:
+ typedef sigc::slot<R,P1,P2,P3,P4> SlotType;
+ typedef sigc::slot<void,P1,P2,P3,P4> VoidSlotType;
+
+ SignalProxy4(ObjectBase* obj, const SignalProxyInfo* info)
+ : SignalProxyNormal(obj, info) {}
+
+ /** Connects a signal to a signal handler.
+ * For instance, connect( sigc::mem_fun(*this, &TheClass::on_something) );
+ *
+ * @param slot The signal handler, usually created with sigc::mem_fun(), or sigc::ptr_fun().
+ * @param after Whether this signal handler should be called before or after the default signal handler.
+ */
+ sigc::connection connect(const SlotType& slot, bool after = true)
+ { return sigc::connection(connect_(slot, after)); }
+
+ /** Connects a signal to a signal handler without a return value.
+ * By default, the signal handler will be called before the default signal handler,
+ * in which case any return value would be replaced anyway by that of the later signal handler.
+ *
+ * For instance, connect( sigc::mem_fun(*this, &TheClass::on_something) );
+ *
+ * @param slot The signal handler, which should have a void return type, usually created with sigc::mem_fun(), or sigc::ptr_fun().
+ * @param after Whether this signal handler should be called before or after the default signal handler.
+ */
+ sigc::connection connect_notify(const VoidSlotType& slot, bool after = false)
+ { return sigc::connection(connect_notify_(slot, after)); }
+};
+
+
+/**** Glib::SignalProxy5 ***************************************************/
+
+/** Proxy for signals with 5 arguments.
+ * Use the connect() method, with sigc::mem_fun() or sigc::ptr_fun() to connect signals to signal handlers.
+ */
+template <class R,class P1,class P2,class P3,class P4,class P5>
+class SignalProxy5 : public SignalProxyNormal
+{
+public:
+ typedef sigc::slot<R,P1,P2,P3,P4,P5> SlotType;
+ typedef sigc::slot<void,P1,P2,P3,P4,P5> VoidSlotType;
+
+ SignalProxy5(ObjectBase* obj, const SignalProxyInfo* info)
+ : SignalProxyNormal(obj, info) {}
+
+ /** Connects a signal to a signal handler.
+ * For instance, connect( sigc::mem_fun(*this, &TheClass::on_something) );
+ *
+ * @param slot The signal handler, usually created with sigc::mem_fun(), or sigc::ptr_fun().
+ * @param after Whether this signal handler should be called before or after the default signal handler.
+ */
+ sigc::connection connect(const SlotType& slot, bool after = true)
+ { return sigc::connection(connect_(slot, after)); }
+
+ /** Connects a signal to a signal handler without a return value.
+ * By default, the signal handler will be called before the default signal handler,
+ * in which case any return value would be replaced anyway by that of the later signal handler.
+ *
+ * For instance, connect( sigc::mem_fun(*this, &TheClass::on_something) );
+ *
+ * @param slot The signal handler, which should have a void return type, usually created with sigc::mem_fun(), or sigc::ptr_fun().
+ * @param after Whether this signal handler should be called before or after the default signal handler.
+ */
+ sigc::connection connect_notify(const VoidSlotType& slot, bool after = false)
+ { return sigc::connection(connect_notify_(slot, after)); }
+};
+
+
+/**** Glib::SignalProxy6 ***************************************************/
+
+/** Proxy for signals with 6 arguments.
+ * Use the connect() method, with sigc::mem_fun() or sigc::ptr_fun() to connect signals to signal handlers.
+ */
+template <class R,class P1,class P2,class P3,class P4,class P5,class P6>
+class SignalProxy6 : public SignalProxyNormal
+{
+public:
+ typedef sigc::slot<R,P1,P2,P3,P4,P5,P6> SlotType;
+ typedef sigc::slot<void,P1,P2,P3,P4,P5,P6> VoidSlotType;
+
+ SignalProxy6(ObjectBase* obj, const SignalProxyInfo* info)
+ : SignalProxyNormal(obj, info) {}
+
+ /** Connects a signal to a signal handler.
+ * For instance, connect( sigc::mem_fun(*this, &TheClass::on_something) );
+ *
+ * @param slot The signal handler, usually created with sigc::mem_fun(), or sigc::ptr_fun().
+ * @param after Whether this signal handler should be called before or after the default signal handler.
+ */
+ sigc::connection connect(const SlotType& slot, bool after = true)
+ { return sigc::connection(connect_(slot, after)); }
+
+ /** Connects a signal to a signal handler without a return value.
+ * By default, the signal handler will be called before the default signal handler,
+ * in which case any return value would be replaced anyway by that of the later signal handler.
+ *
+ * For instance, connect( sigc::mem_fun(*this, &TheClass::on_something) );
+ *
+ * @param slot The signal handler, which should have a void return type, usually created with sigc::mem_fun(), or sigc::ptr_fun().
+ * @param after Whether this signal handler should be called before or after the default signal handler.
+ */
+ sigc::connection connect_notify(const VoidSlotType& slot, bool after = false)
+ { return sigc::connection(connect_notify_(slot, after)); }
+};
+
+
+} // namespace Glib
+
+
+#endif /* _GLIBMM_SIGNALPROXY_H */
+
diff --git a/libs/glibmm2/glibmm/signalproxy_connectionnode.cc b/libs/glibmm2/glibmm/signalproxy_connectionnode.cc
new file mode 100644
index 0000000000..dc1c1c3103
--- /dev/null
+++ b/libs/glibmm2/glibmm/signalproxy_connectionnode.cc
@@ -0,0 +1,94 @@
+// -*- c++ -*-
+
+/* $Id$ */
+
+/* signalproxy_connectionnode.cc
+ *
+ * Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/signalproxy_connectionnode.h>
+#include <glibmm/object.h>
+
+
+namespace Glib
+{
+
+SignalProxyConnectionNode::SignalProxyConnectionNode(const sigc::slot_base& slot, GObject* gobject)
+:
+ connection_id_ (0),
+ slot_ (slot),
+ object_ (gobject)
+{
+ //The cleanup callback will be called when the connection is disconnected.
+ slot_.set_parent(this, &SignalProxyConnectionNode::notify /* cleanup callback */);
+}
+
+// notify is a message coming up from the slot to be passed back to Gtk+
+// disconnect is a message coming up from the Gtk+ to be passed down to SigC++
+//static
+void* SignalProxyConnectionNode::notify(void* data)
+{
+ // notification from libsigc++.
+ SignalProxyConnectionNode* conn = static_cast<SignalProxyConnectionNode*>(data);
+
+ // If there is no object, this call was triggered from destroy_notify_handler(),
+ // because we set conn->object to 0 there:
+ if(conn && conn->object_)
+ {
+ GObject* o = conn->object_;
+ conn->object_ = 0;
+
+ if(g_signal_handler_is_connected(o, conn->connection_id_)) //We check first, because during destruction, GTK+ sometimes seems to disconnect them for us, before we expect it to. See bug #87912
+ {
+ // Disconnecting triggers execution of destroy_notify_handler(), eiter immediately or later:
+ // When the signal handler is currently running. (for instance, if the callback disconnects its own connection)
+ // In that case, destroy_notify_handler() will be called after this whole function has returned.
+ // Anyway. destroy_notify_handler() will always be called, so we leave that to do the deletion.
+
+
+ //Forget the connection:
+ gulong connection_id = conn->connection_id_;
+ conn->connection_id_ = 0;
+
+ g_signal_handler_disconnect(o, connection_id);
+ }
+ }
+
+ return 0; // apparently unused in libsigc++
+}
+
+//static
+void SignalProxyConnectionNode::destroy_notify_handler(gpointer data, GClosure*)
+{
+ //glib calls this when it has finished with a glib signal connection,
+ //either when the emitting object dies, or when the connection has been disconnected.
+
+ // notification from gtk+.
+ SignalProxyConnectionNode* conn = static_cast<SignalProxyConnectionNode*>(data);
+
+ if(conn)
+ {
+ // the object has already lost track of this object.
+ conn->object_ = 0;
+
+ delete conn; // if there are connection objects referring to slot_ they are notified during destruction of slot_
+ }
+}
+
+} /* namespace Glib */
+
diff --git a/libs/glibmm2/glibmm/signalproxy_connectionnode.h b/libs/glibmm2/glibmm/signalproxy_connectionnode.h
new file mode 100644
index 0000000000..d3cfff81f0
--- /dev/null
+++ b/libs/glibmm2/glibmm/signalproxy_connectionnode.h
@@ -0,0 +1,70 @@
+// -*- c++ -*-
+#ifndef _GLIBMM_SIGNALPROXY_CONNECTIONNODE_H
+#define _GLIBMM_SIGNALPROXY_CONNECTIONNODE_H
+
+/* $Id$ */
+
+/* signalproxy_connectionnode.h
+ *
+ * Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <sigc++/sigc++.h>
+#include <glibmm/wrap.h>
+
+typedef struct _GObject GObject;
+
+namespace Glib
+{
+
+/** SignalProxyConnectionNode is a connection node for use with SignalProxy.
+ * It lives between the layer of Gtk+ and libsigc++.
+ * It is very much an internal class.
+ */
+class SignalProxyConnectionNode
+{
+public:
+
+ /** @param slot The signal handler for the glib signal.
+ * @param gobject The GObject that might emit this glib signal
+ */
+ SignalProxyConnectionNode(const sigc::slot_base& slot, GObject* gobject);
+
+ /** Callback that is executed when the slot becomes invalid.
+ * This callback is registered in the slot.
+ * @param data The SignalProxyConnectionNode object (@p this).
+ */
+ static void* notify(void* data);
+
+ /** Callback that is executed when the glib closure is destroyed.
+ * @param data The SignalProxyConnectionNode object (@p this).
+ * @param closure The glib closure object.
+ */
+ static void destroy_notify_handler(gpointer data, GClosure* closure);
+
+ gulong connection_id_;
+ sigc::slot_base slot_;
+
+protected:
+ GObject* object_;
+};
+
+} /* namespace Glib */
+
+
+#endif /* _GLIBMM_SIGNALPROXY_CONNECTIONNODE_H */
+
diff --git a/libs/glibmm2/glibmm/slisthandle.h b/libs/glibmm2/glibmm/slisthandle.h
new file mode 100644
index 0000000000..7034914ed3
--- /dev/null
+++ b/libs/glibmm2/glibmm/slisthandle.h
@@ -0,0 +1,405 @@
+// -*- c++ -*-
+#ifndef _GLIBMM_SLISTHANDLE_H
+#define _GLIBMM_SLISTHANDLE_H
+
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glib/gslist.h>
+#include <glibmm/containerhandle_shared.h>
+
+
+namespace Glib
+{
+
+namespace Container_Helpers
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+/* Create and fill a GSList as efficient as possible.
+ * This requires bidirectional iterators.
+ */
+template <class Bi, class Tr>
+GSList* create_slist(Bi pbegin, Bi pend, Tr)
+{
+ GSList* head = 0;
+
+ while(pend != pbegin)
+ {
+ // Use & to force a warning if the iterator returns a temporary object.
+ const void *const item = Tr::to_c_type(*&*--pend);
+ head = g_slist_prepend(head, const_cast<void*>(item));
+ }
+
+ return head;
+}
+
+/* Create a GSList from a 0-terminated input sequence.
+ * Build it in reverse order and reverse the whole list afterwards,
+ * because appending to the list would be horribly inefficient.
+ */
+template <class For, class Tr>
+GSList* create_slist(For pbegin, Tr)
+{
+ GSList* head = 0;
+
+ while(*pbegin)
+ {
+ // Use & to force a warning if the iterator returns a temporary object.
+ const void *const item = Tr::to_c_type(*&*pbegin);
+ head = g_slist_prepend(head, const_cast<void*>(item));
+ ++pbegin;
+ }
+
+ return g_slist_reverse(head);
+}
+
+
+/* Convert from any container that supports bidirectional iterators.
+ */
+template <class Tr, class Cont>
+struct SListSourceTraits
+{
+ static GSList* get_data(const Cont& cont)
+ { return Glib::Container_Helpers::create_slist(cont.begin(), cont.end(), Tr()); }
+
+ static const Glib::OwnershipType initial_ownership = Glib::OWNERSHIP_SHALLOW;
+};
+
+/* Convert from a 0-terminated array. The Cont
+ * argument must be a pointer to the first element.
+ */
+template <class Tr, class Cont>
+struct SListSourceTraits<Tr,Cont*>
+{
+ static GSList* get_data(const Cont* array)
+ { return (array) ? Glib::Container_Helpers::create_slist(array, Tr()) : 0; }
+
+ static const Glib::OwnershipType initial_ownership = Glib::OWNERSHIP_SHALLOW;
+};
+
+template <class Tr, class Cont>
+struct SListSourceTraits<Tr,const Cont*> : SListSourceTraits<Tr,Cont*>
+{};
+
+/* Convert from a 0-terminated array. The Cont argument must be a pointer
+ * to the first element. For consistency, the array must be 0-terminated,
+ * even though the array size is known at compile time.
+ */
+template <class Tr, class Cont, size_t N>
+struct SListSourceTraits<Tr,Cont[N]>
+{
+ static GSList* get_data(const Cont* array)
+ { return Glib::Container_Helpers::create_slist(array, array + (N - 1), Tr()); }
+
+ static const Glib::OwnershipType initial_ownership = Glib::OWNERSHIP_SHALLOW;
+};
+
+template <class Tr, class Cont, size_t N>
+struct SListSourceTraits<Tr,const Cont[N]> : SListSourceTraits<Tr,Cont[N]>
+{};
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+/**
+ * @ingroup ContHelpers
+ * If a method takes this as an argument, or has this as a return type, then you can use a standard
+ * container such as std::list or std::vector.
+ */
+template <class Tr>
+class SListHandleIterator
+{
+public:
+ typedef typename Tr::CppType CppType;
+ typedef typename Tr::CType CType;
+
+ typedef std::forward_iterator_tag iterator_category;
+ typedef CppType value_type;
+ typedef ptrdiff_t difference_type;
+ typedef value_type reference;
+ typedef void pointer;
+
+ explicit inline SListHandleIterator(const GSList* node);
+
+ inline value_type operator*() const;
+ inline SListHandleIterator<Tr> & operator++();
+ inline const SListHandleIterator<Tr> operator++(int);
+
+ inline bool operator==(const SListHandleIterator<Tr>& rhs) const;
+ inline bool operator!=(const SListHandleIterator<Tr>& rhs) const;
+
+private:
+ const GSList* node_;
+};
+
+} // namespace Container_Helpers
+
+
+/**
+ * @ingroup ContHandles
+ */
+template < class T, class Tr = Glib::Container_Helpers::TypeTraits<T> >
+class SListHandle
+{
+public:
+ typedef typename Tr::CppType CppType;
+ typedef typename Tr::CType CType;
+
+ typedef CppType value_type;
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+
+ typedef Glib::Container_Helpers::SListHandleIterator<Tr> const_iterator;
+ typedef Glib::Container_Helpers::SListHandleIterator<Tr> iterator;
+
+ template <class Cont> inline
+ SListHandle(const Cont& container);
+
+ // Take over ownership of a GSList created by GTK+ functions.
+ inline SListHandle(GSList* glist, Glib::OwnershipType ownership);
+
+ // Copying clears the ownership flag of the source handle.
+ inline SListHandle(const SListHandle<T,Tr>& other);
+
+ ~SListHandle();
+
+ inline const_iterator begin() const;
+ inline const_iterator end() const;
+
+ template <class U> inline operator std::vector<U>() const;
+ template <class U> inline operator std::deque<U>() const;
+ template <class U> inline operator std::list<U>() const;
+
+ template <class Cont> inline
+ void assign_to(Cont& container) const;
+ template <class Out> inline
+ void copy(Out pdest) const;
+
+ inline GSList* data() const;
+ inline size_t size() const;
+ inline bool empty() const;
+
+private:
+ GSList * pslist_;
+ mutable Glib::OwnershipType ownership_;
+
+ // No copy assignment.
+ SListHandle<T,Tr>& operator=(const SListHandle<T,Tr>&);
+};
+
+
+/***************************************************************************/
+/* Inline implementation */
+/***************************************************************************/
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+namespace Container_Helpers
+{
+
+/**** Glib::Container_Helpers::SListHandleIterator<> ***********************/
+
+template <class Tr> inline
+SListHandleIterator<Tr>::SListHandleIterator(const GSList* node)
+:
+ node_ (node)
+{}
+
+template <class Tr> inline
+typename SListHandleIterator<Tr>::value_type SListHandleIterator<Tr>::operator*() const
+{
+ return Tr::to_cpp_type(static_cast<typename Tr::CTypeNonConst>(node_->data));
+}
+
+template <class Tr> inline
+SListHandleIterator<Tr>& SListHandleIterator<Tr>::operator++()
+{
+ node_ = node_->next;
+ return *this;
+}
+
+template <class Tr> inline
+const SListHandleIterator<Tr> SListHandleIterator<Tr>::operator++(int)
+{
+ const SListHandleIterator<Tr> tmp (*this);
+ node_ = node_->next;
+ return tmp;
+}
+
+template <class Tr> inline
+bool SListHandleIterator<Tr>::operator==(const SListHandleIterator<Tr>& rhs) const
+{
+ return (node_ == rhs.node_);
+}
+
+template <class Tr> inline
+bool SListHandleIterator<Tr>::operator!=(const SListHandleIterator<Tr>& rhs) const
+{
+ return (node_ != rhs.node_);
+}
+
+} // namespace Container_Helpers
+
+
+/**** Glib::SListHandle<> **************************************************/
+
+template <class T, class Tr>
+ template <class Cont>
+inline
+SListHandle<T,Tr>::SListHandle(const Cont& container)
+:
+ pslist_ (Glib::Container_Helpers::SListSourceTraits<Tr,Cont>::get_data(container)),
+ ownership_ (Glib::Container_Helpers::SListSourceTraits<Tr,Cont>::initial_ownership)
+{}
+
+template <class T, class Tr> inline
+SListHandle<T,Tr>::SListHandle(GSList* gslist, Glib::OwnershipType ownership)
+:
+ pslist_ (gslist),
+ ownership_ (ownership)
+{}
+
+template <class T, class Tr> inline
+SListHandle<T,Tr>::SListHandle(const SListHandle<T,Tr>& other)
+:
+ pslist_ (other.pslist_),
+ ownership_ (other.ownership_)
+{
+ other.ownership_ = Glib::OWNERSHIP_NONE;
+}
+
+template <class T, class Tr>
+SListHandle<T,Tr>::~SListHandle()
+{
+ if(ownership_ != Glib::OWNERSHIP_NONE)
+ {
+ if(ownership_ != Glib::OWNERSHIP_SHALLOW)
+ {
+ // Deep ownership: release each container element.
+ for(GSList* node = pslist_; node != 0; node = node->next)
+ Tr::release_c_type(static_cast<typename Tr::CTypeNonConst>(node->data));
+ }
+ g_slist_free(pslist_);
+ }
+}
+
+template <class T, class Tr> inline
+typename SListHandle<T,Tr>::const_iterator SListHandle<T,Tr>::begin() const
+{
+ return Glib::Container_Helpers::SListHandleIterator<Tr>(pslist_);
+}
+
+template <class T, class Tr> inline
+typename SListHandle<T,Tr>::const_iterator SListHandle<T,Tr>::end() const
+{
+ return Glib::Container_Helpers::SListHandleIterator<Tr>(0);
+}
+
+template <class T, class Tr>
+ template <class U>
+inline
+SListHandle<T,Tr>::operator std::vector<U>() const
+{
+#ifdef GLIBMM_HAVE_TEMPLATE_SEQUENCE_CTORS
+ return std::vector<U>(this->begin(), this->end());
+#else
+ std::vector<U> temp;
+ temp.reserve(this->size());
+ Glib::Container_Helpers::fill_container(temp, this->begin(), this->end());
+ return temp;
+#endif
+}
+
+template <class T, class Tr>
+ template <class U>
+inline
+SListHandle<T,Tr>::operator std::deque<U>() const
+{
+#ifdef GLIBMM_HAVE_TEMPLATE_SEQUENCE_CTORS
+ return std::deque<U>(this->begin(), this->end());
+#else
+ std::deque<U> temp;
+ Glib::Container_Helpers::fill_container(temp, this->begin(), this->end());
+ return temp;
+#endif
+}
+
+template <class T, class Tr>
+ template <class U>
+inline
+SListHandle<T,Tr>::operator std::list<U>() const
+{
+#ifdef GLIBMM_HAVE_TEMPLATE_SEQUENCE_CTORS
+ return std::list<U>(this->begin(), this->end());
+#else
+ std::list<U> temp;
+ Glib::Container_Helpers::fill_container(temp, this->begin(), this->end());
+ return temp;
+#endif
+}
+
+template <class T, class Tr>
+ template <class Cont>
+inline
+void SListHandle<T,Tr>::assign_to(Cont& container) const
+{
+#ifdef GLIBMM_HAVE_TEMPLATE_SEQUENCE_CTORS
+ container.assign(this->begin(), this->end());
+#else
+ Cont temp;
+ Glib::Container_Helpers::fill_container(temp, this->begin(), this->end());
+ container.swap(temp);
+#endif
+}
+
+template <class T, class Tr>
+ template <class Out>
+inline
+void SListHandle<T,Tr>::copy(Out pdest) const
+{
+ std::copy(this->begin(), this->end(), pdest);
+}
+
+template <class T, class Tr> inline
+GSList* SListHandle<T,Tr>::data() const
+{
+ return pslist_;
+}
+
+template <class T, class Tr> inline
+size_t SListHandle<T,Tr>::size() const
+{
+ return g_slist_length(pslist_);
+}
+
+template <class T, class Tr> inline
+bool SListHandle<T,Tr>::empty() const
+{
+ return (pslist_ == 0);
+}
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+} // namespace Glib
+
+
+#endif /* _GLIBMM_SLISTHANDLE_H */
+
diff --git a/libs/glibmm2/glibmm/spawn.cc b/libs/glibmm2/glibmm/spawn.cc
new file mode 100644
index 0000000000..cbc204cd70
--- /dev/null
+++ b/libs/glibmm2/glibmm/spawn.cc
@@ -0,0 +1,311 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <glibmm/spawn.h>
+#include <glibmm/private/spawn_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glib/gspawn.h>
+#include <glibmm/exceptionhandler.h>
+#include <glibmm/utility.h>
+
+
+namespace
+{
+
+extern "C"
+{
+
+/* Helper callback to invoke the actual sigc++ slot.
+ * We don't need to worry about (un)referencing, since the
+ * child process gets its own copy of the parent's memory anyway.
+ */
+void child_setup_callback(void* user_data)
+{
+ try
+ {
+ (*reinterpret_cast<sigc::slot<void>*>(user_data))();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+}
+
+void copy_output_buf(std::string* dest, const char* buf)
+{
+ if(dest)
+ {
+ if(buf)
+ *dest = buf;
+ else
+ dest->erase();
+ }
+}
+
+} //extern "C"
+
+} //anonymous namespace
+
+
+namespace Glib
+{
+
+/**** process spawning functions *******************************************/
+
+void spawn_async_with_pipes(const std::string& working_directory,
+ const Glib::ArrayHandle<std::string>& argv,
+ const Glib::ArrayHandle<std::string>& envp,
+ SpawnFlags flags,
+ const sigc::slot<void>& child_setup,
+ Pid* child_pid,
+ int* standard_input,
+ int* standard_output,
+ int* standard_error)
+{
+ const bool setup_slot = !child_setup.empty();
+ sigc::slot<void> child_setup_ = child_setup;
+ GError* error = 0;
+
+ g_spawn_async_with_pipes(
+ working_directory.c_str(),
+ const_cast<char**>(argv.data()),
+ const_cast<char**>(envp.data()),
+ static_cast<GSpawnFlags>(unsigned(flags)),
+ (setup_slot) ? &child_setup_callback : 0,
+ (setup_slot) ? &child_setup_ : 0,
+ child_pid,
+ standard_input, standard_output, standard_error,
+ &error);
+
+ if(error)
+ Glib::Error::throw_exception(error);
+}
+
+void spawn_async_with_pipes(const std::string& working_directory,
+ const Glib::ArrayHandle<std::string>& argv,
+ SpawnFlags flags,
+ const sigc::slot<void>& child_setup,
+ Pid* child_pid,
+ int* standard_input,
+ int* standard_output,
+ int* standard_error)
+{
+ const bool setup_slot = !child_setup.empty();
+ sigc::slot<void> child_setup_ = child_setup;
+ GError* error = 0;
+
+ g_spawn_async_with_pipes(
+ working_directory.c_str(),
+ const_cast<char**>(argv.data()), 0,
+ static_cast<GSpawnFlags>(unsigned(flags)),
+ (setup_slot) ? &child_setup_callback : 0,
+ (setup_slot) ? &child_setup_ : 0,
+ child_pid,
+ standard_input, standard_output, standard_error,
+ &error);
+
+ if(error)
+ Glib::Error::throw_exception(error);
+}
+
+void spawn_async(const std::string& working_directory,
+ const Glib::ArrayHandle<std::string>& argv,
+ const Glib::ArrayHandle<std::string>& envp,
+ SpawnFlags flags,
+ const sigc::slot<void>& child_setup,
+ Pid* child_pid)
+{
+ const bool setup_slot = !child_setup.empty();
+ sigc::slot<void> child_setup_ = child_setup;
+ GError* error = 0;
+
+ g_spawn_async(
+ working_directory.c_str(),
+ const_cast<char**>(argv.data()),
+ const_cast<char**>(envp.data()),
+ static_cast<GSpawnFlags>(unsigned(flags)),
+ (setup_slot) ? &child_setup_callback : 0,
+ (setup_slot) ? &child_setup_ : 0,
+ child_pid,
+ &error);
+
+ if(error)
+ Glib::Error::throw_exception(error);
+}
+
+void spawn_async(const std::string& working_directory,
+ const Glib::ArrayHandle<std::string>& argv,
+ SpawnFlags flags,
+ const sigc::slot<void>& child_setup,
+ Pid* child_pid)
+{
+ const bool setup_slot = !child_setup.empty();
+ sigc::slot<void> child_setup_ = child_setup;
+ GError* error = 0;
+
+ g_spawn_async(
+ working_directory.c_str(),
+ const_cast<char**>(argv.data()), 0,
+ static_cast<GSpawnFlags>(unsigned(flags)),
+ (setup_slot) ? &child_setup_callback : 0,
+ (setup_slot) ? &child_setup_ : 0,
+ child_pid,
+ &error);
+
+ if(error)
+ Glib::Error::throw_exception(error);
+}
+
+void spawn_sync(const std::string& working_directory,
+ const Glib::ArrayHandle<std::string>& argv,
+ const Glib::ArrayHandle<std::string>& envp,
+ SpawnFlags flags,
+ const sigc::slot<void>& child_setup,
+ std::string* standard_output,
+ std::string* standard_error,
+ int* exit_status)
+{
+ const bool setup_slot = !child_setup.empty();
+ sigc::slot<void> child_setup_ = child_setup;
+
+ Glib::ScopedPtr<char> buf_standard_output;
+ Glib::ScopedPtr<char> buf_standard_error;
+ GError* error = 0;
+
+ g_spawn_sync(
+ working_directory.c_str(),
+ const_cast<char**>(argv.data()),
+ const_cast<char**>(envp.data()),
+ static_cast<GSpawnFlags>(unsigned(flags)),
+ (setup_slot) ? &child_setup_callback : 0,
+ (setup_slot) ? &child_setup_ : 0,
+ (standard_output) ? buf_standard_output.addr() : 0,
+ (standard_error) ? buf_standard_error.addr() : 0,
+ exit_status,
+ &error);
+
+ if(error)
+ Glib::Error::throw_exception(error);
+
+ copy_output_buf(standard_output, buf_standard_output.get());
+ copy_output_buf(standard_error, buf_standard_error.get());
+}
+
+void spawn_sync(const std::string& working_directory,
+ const Glib::ArrayHandle<std::string>& argv,
+ SpawnFlags flags,
+ const sigc::slot<void>& child_setup,
+ std::string* standard_output,
+ std::string* standard_error,
+ int* exit_status)
+{
+ const bool setup_slot = !child_setup.empty();
+ sigc::slot<void> child_setup_ = child_setup;
+
+ Glib::ScopedPtr<char> buf_standard_output;
+ Glib::ScopedPtr<char> buf_standard_error;
+ GError* error = 0;
+
+ g_spawn_sync(
+ working_directory.c_str(),
+ const_cast<char**>(argv.data()), 0,
+ static_cast<GSpawnFlags>(unsigned(flags)),
+ (setup_slot) ? &child_setup_callback : 0,
+ (setup_slot) ? &child_setup_ : 0,
+ (standard_output) ? buf_standard_output.addr() : 0,
+ (standard_error) ? buf_standard_error.addr() : 0,
+ exit_status,
+ &error);
+
+ if(error)
+ Glib::Error::throw_exception(error);
+
+ copy_output_buf(standard_output, buf_standard_output.get());
+ copy_output_buf(standard_error, buf_standard_error.get());
+}
+
+void spawn_command_line_async(const std::string& command_line)
+{
+ GError* error = 0;
+ g_spawn_command_line_async(command_line.c_str(), &error);
+
+ if(error)
+ Glib::Error::throw_exception(error);
+}
+
+void spawn_command_line_sync(const std::string& command_line,
+ std::string* standard_output,
+ std::string* standard_error,
+ int* exit_status)
+{
+ Glib::ScopedPtr<char> buf_standard_output;
+ Glib::ScopedPtr<char> buf_standard_error;
+ GError* error = 0;
+
+ g_spawn_command_line_sync(
+ command_line.c_str(),
+ (standard_output) ? buf_standard_output.addr() : 0,
+ (standard_error) ? buf_standard_error.addr() : 0,
+ exit_status,
+ &error);
+
+ if(error)
+ Glib::Error::throw_exception(error);
+
+ copy_output_buf(standard_output, buf_standard_output.get());
+ copy_output_buf(standard_error, buf_standard_error.get());
+}
+
+void spawn_close_pid(Pid pid)
+{
+ g_spawn_close_pid(pid);
+}
+
+} // namespace Glib
+
+
+namespace
+{
+} // anonymous namespace
+
+
+Glib::SpawnError::SpawnError(Glib::SpawnError::Code error_code, const Glib::ustring& error_message)
+:
+ Glib::Error (G_SPAWN_ERROR, error_code, error_message)
+{}
+
+Glib::SpawnError::SpawnError(GError* gobject)
+:
+ Glib::Error (gobject)
+{}
+
+Glib::SpawnError::Code Glib::SpawnError::code() const
+{
+ return static_cast<Code>(Glib::Error::code());
+}
+
+void Glib::SpawnError::throw_func(GError* gobject)
+{
+ throw Glib::SpawnError(gobject);
+}
+
+
diff --git a/libs/glibmm2/glibmm/spawn.h b/libs/glibmm2/glibmm/spawn.h
new file mode 100644
index 0000000000..df7a43a594
--- /dev/null
+++ b/libs/glibmm2/glibmm/spawn.h
@@ -0,0 +1,203 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GLIBMM_SPAWN_H
+#define _GLIBMM_SPAWN_H
+
+
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#include <string>
+#include <sigc++/sigc++.h>
+#include <glibmm/arrayhandle.h>
+#include <glibmm/error.h>
+
+#include <glibmmconfig.h>
+GLIBMM_USING_STD(string)
+
+
+namespace Glib
+{
+
+typedef GPid Pid;
+
+/** @addtogroup glibmmEnums Enums and Flags */
+
+/**
+ * @ingroup glibmmEnums
+ * @par Bitwise operators:
+ * <tt>%SpawnFlags operator|(SpawnFlags, SpawnFlags)</tt><br>
+ * <tt>%SpawnFlags operator&(SpawnFlags, SpawnFlags)</tt><br>
+ * <tt>%SpawnFlags operator^(SpawnFlags, SpawnFlags)</tt><br>
+ * <tt>%SpawnFlags operator~(SpawnFlags)</tt><br>
+ * <tt>%SpawnFlags& operator|=(SpawnFlags&, SpawnFlags)</tt><br>
+ * <tt>%SpawnFlags& operator&=(SpawnFlags&, SpawnFlags)</tt><br>
+ * <tt>%SpawnFlags& operator^=(SpawnFlags&, SpawnFlags)</tt><br>
+ */
+enum SpawnFlags
+{
+ SPAWN_LEAVE_DESCRIPTORS_OPEN = 1 << 0,
+ SPAWN_DO_NOT_REAP_CHILD = 1 << 1,
+ SPAWN_SEARCH_PATH = 1 << 2,
+ SPAWN_STDOUT_TO_DEV_NULL = 1 << 3,
+ SPAWN_STDERR_TO_DEV_NULL = 1 << 4,
+ SPAWN_CHILD_INHERITS_STDIN = 1 << 5,
+ SPAWN_FILE_AND_ARGV_ZERO = 1 << 6
+};
+
+/** @ingroup glibmmEnums */
+inline SpawnFlags operator|(SpawnFlags lhs, SpawnFlags rhs)
+ { return static_cast<SpawnFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
+
+/** @ingroup glibmmEnums */
+inline SpawnFlags operator&(SpawnFlags lhs, SpawnFlags rhs)
+ { return static_cast<SpawnFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
+
+/** @ingroup glibmmEnums */
+inline SpawnFlags operator^(SpawnFlags lhs, SpawnFlags rhs)
+ { return static_cast<SpawnFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
+
+/** @ingroup glibmmEnums */
+inline SpawnFlags operator~(SpawnFlags flags)
+ { return static_cast<SpawnFlags>(~static_cast<unsigned>(flags)); }
+
+/** @ingroup glibmmEnums */
+inline SpawnFlags& operator|=(SpawnFlags& lhs, SpawnFlags rhs)
+ { return (lhs = static_cast<SpawnFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
+
+/** @ingroup glibmmEnums */
+inline SpawnFlags& operator&=(SpawnFlags& lhs, SpawnFlags rhs)
+ { return (lhs = static_cast<SpawnFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
+
+/** @ingroup glibmmEnums */
+inline SpawnFlags& operator^=(SpawnFlags& lhs, SpawnFlags rhs)
+ { return (lhs = static_cast<SpawnFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
+
+
+/** @defgroup Spawn Spawning Processes
+ * Process launching with fork()/exec().
+ * @{
+ */
+
+/** Exception class for errors occuring when spawning processes.
+ */
+class SpawnError : public Glib::Error
+{
+public:
+ enum Code
+ {
+ FORK,
+ READ,
+ CHDIR,
+ ACCES,
+ PERM,
+ TOOBIG,
+ NOEXEC,
+ NAMETOOLONG,
+ NOENT,
+ NOMEM,
+ NOTDIR,
+ LOOP,
+ TXTBUSY,
+ IO,
+ NFILE,
+ MFILE,
+ INVAL,
+ ISDIR,
+ LIBBAD
+ };
+
+ SpawnError(Code error_code, const Glib::ustring& error_message);
+ explicit SpawnError(GError* gobject);
+ Code code() const;
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+private:
+ static void throw_func(GError* gobject);
+ friend void wrap_init(); // uses throw_func()
+#endif
+};
+
+
+void spawn_async_with_pipes(const std::string& working_directory,
+ const Glib::ArrayHandle<std::string>& argv,
+ const Glib::ArrayHandle<std::string>& envp,
+ SpawnFlags flags = SpawnFlags(0),
+ const sigc::slot<void>& child_setup = sigc::slot<void>(),
+ Pid* child_pid = 0,
+ int* standard_input = 0,
+ int* standard_output = 0,
+ int* standard_error = 0);
+
+void spawn_async_with_pipes(const std::string& working_directory,
+ const Glib::ArrayHandle<std::string>& argv,
+ SpawnFlags flags = SpawnFlags(0),
+ const sigc::slot<void>& child_setup = sigc::slot<void>(),
+ Pid* child_pid = 0,
+ int* standard_input = 0,
+ int* standard_output = 0,
+ int* standard_error = 0);
+
+void spawn_async(const std::string& working_directory,
+ const Glib::ArrayHandle<std::string>& argv,
+ const Glib::ArrayHandle<std::string>& envp,
+ SpawnFlags flags = SpawnFlags(0),
+ const sigc::slot<void>& child_setup = sigc::slot<void>(),
+ Pid* child_pid = 0);
+
+void spawn_async(const std::string& working_directory,
+ const Glib::ArrayHandle<std::string>& argv,
+ SpawnFlags flags = SpawnFlags(0),
+ const sigc::slot<void>& child_setup = sigc::slot<void>(),
+ Pid* child_pid = 0);
+
+void spawn_sync(const std::string& working_directory,
+ const Glib::ArrayHandle<std::string>& argv,
+ const Glib::ArrayHandle<std::string>& envp,
+ SpawnFlags flags = SpawnFlags(0),
+ const sigc::slot<void>& child_setup = sigc::slot<void>(),
+ std::string* standard_output = 0,
+ std::string* standard_error = 0,
+ int* exit_status = 0);
+
+void spawn_sync(const std::string& working_directory,
+ const Glib::ArrayHandle<std::string>& argv,
+ SpawnFlags flags = SpawnFlags(0),
+ const sigc::slot<void>& child_setup = sigc::slot<void>(),
+ std::string* standard_output = 0,
+ std::string* standard_error = 0,
+ int* exit_status = 0);
+
+void spawn_command_line_async(const std::string& command_line);
+
+void spawn_command_line_sync(const std::string& command_line,
+ std::string* standard_output = 0,
+ std::string* standard_error = 0,
+ int* exit_status = 0);
+
+void spawn_close_pid(Pid pid);
+
+/** @} group Spawn */
+
+} // namespace Glib
+
+
+#endif /* _GLIBMM_SPAWN_H */
+
diff --git a/libs/glibmm2/glibmm/streamiochannel.cc b/libs/glibmm2/glibmm/streamiochannel.cc
new file mode 100644
index 0000000000..985931dec8
--- /dev/null
+++ b/libs/glibmm2/glibmm/streamiochannel.cc
@@ -0,0 +1,188 @@
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/streamiochannel.h>
+#include <glib.h>
+#include <fstream>
+#include <iostream>
+
+GLIBMM_USING_STD(ios)
+
+
+namespace Glib
+{
+
+// static
+Glib::RefPtr<StreamIOChannel> StreamIOChannel::create(std::istream& stream)
+{
+ return Glib::RefPtr<StreamIOChannel>(new StreamIOChannel(&stream, 0));
+}
+
+// static
+Glib::RefPtr<StreamIOChannel> StreamIOChannel::create(std::ostream& stream)
+{
+ return Glib::RefPtr<StreamIOChannel>(new StreamIOChannel(0, &stream));
+}
+
+// static
+Glib::RefPtr<StreamIOChannel> StreamIOChannel::create(std::iostream& stream)
+{
+ return Glib::RefPtr<StreamIOChannel>(new StreamIOChannel(&stream, &stream));
+}
+
+StreamIOChannel::StreamIOChannel(std::istream* stream_in, std::ostream* stream_out)
+:
+ stream_in_ (stream_in),
+ stream_out_ (stream_out)
+{
+ get_flags_vfunc(); // initialize GIOChannel flag bits
+}
+
+StreamIOChannel::~StreamIOChannel()
+{}
+
+IOStatus StreamIOChannel::read_vfunc(char* buf, gsize count, gsize& bytes_read)
+{
+ g_return_val_if_fail(stream_in_ != 0, IO_STATUS_ERROR);
+
+ stream_in_->clear();
+ stream_in_->read(buf, count);
+ bytes_read = stream_in_->gcount();
+
+ if(stream_in_->eof())
+ return IO_STATUS_EOF;
+
+ if(stream_in_->fail())
+ throw Glib::Error(G_IO_CHANNEL_ERROR, G_IO_CHANNEL_ERROR_FAILED, "Reading from stream failed");
+
+ return IO_STATUS_NORMAL;
+}
+
+IOStatus StreamIOChannel::write_vfunc(const char* buf, gsize count, gsize& bytes_written)
+{
+ g_return_val_if_fail(stream_out_ != 0, IO_STATUS_ERROR);
+
+ bytes_written = 0;
+
+ stream_out_->clear();
+ stream_out_->write(buf, count);
+
+ if(stream_out_->fail())
+ throw Glib::Error(G_IO_CHANNEL_ERROR, G_IO_CHANNEL_ERROR_FAILED, "Writing to stream failed");
+
+ bytes_written = count; // all or nothing ;)
+
+ return IO_STATUS_NORMAL;
+}
+
+IOStatus StreamIOChannel::seek_vfunc(gint64 offset, SeekType type)
+{
+ std::ios::seekdir direction = std::ios::beg;
+
+ switch(type)
+ {
+ case SEEK_TYPE_SET: direction = std::ios::beg; break;
+ case SEEK_TYPE_CUR: direction = std::ios::cur; break;
+ case SEEK_TYPE_END: direction = std::ios::end; break;
+ }
+
+ bool failed = false;
+
+ if(stream_in_)
+ {
+ stream_in_->clear();
+ stream_in_->seekg(offset, direction);
+ failed = stream_in_->fail();
+ }
+ if(stream_out_)
+ {
+ stream_out_->clear();
+ stream_out_->seekp(offset, direction);
+ failed = (failed || stream_out_->fail());
+ }
+
+ if(failed)
+ throw Glib::Error(G_IO_CHANNEL_ERROR, G_IO_CHANNEL_ERROR_FAILED, "Seeking into stream failed");
+
+ return Glib::IO_STATUS_NORMAL;
+}
+
+IOStatus StreamIOChannel::close_vfunc()
+{
+ bool failed = false;
+
+ if(std::fstream *const stream = dynamic_cast<std::fstream*>(stream_in_))
+ {
+ stream->clear();
+ stream->close();
+ failed = stream->fail();
+ }
+ else if(std::ifstream *const stream = dynamic_cast<std::ifstream*>(stream_in_))
+ {
+ stream->clear();
+ stream->close();
+ failed = stream->fail();
+ }
+ else if(std::ofstream *const stream = dynamic_cast<std::ofstream*>(stream_out_))
+ {
+ stream->clear();
+ stream->close();
+ failed = stream->fail();
+ }
+ else
+ {
+ throw Glib::Error(G_IO_CHANNEL_ERROR, G_IO_CHANNEL_ERROR_FAILED,
+ "Attempt to close non-file stream");
+ }
+
+ if(failed)
+ throw Glib::Error(G_IO_CHANNEL_ERROR, G_IO_CHANNEL_ERROR_FAILED, "Failed to close stream");
+
+ return IO_STATUS_NORMAL;
+}
+
+IOStatus StreamIOChannel::set_flags_vfunc(IOFlags)
+{
+ return IO_STATUS_NORMAL;
+}
+
+IOFlags StreamIOChannel::get_flags_vfunc()
+{
+ gobj()->is_seekable = 1;
+ gobj()->is_readable = (stream_in_ != 0);
+ gobj()->is_writeable = (stream_out_ != 0);
+
+ IOFlags flags = IO_FLAG_IS_SEEKABLE;
+
+ if(stream_in_)
+ flags |= IO_FLAG_IS_READABLE;
+ if(stream_out_)
+ flags |= IO_FLAG_IS_WRITEABLE;
+
+ return flags;
+}
+
+Glib::RefPtr<Glib::Source> StreamIOChannel::create_watch_vfunc(IOCondition)
+{
+ g_warning("Glib::StreamIOChannel::create_watch_vfunc() not implemented");
+ return Glib::RefPtr<Glib::Source>();
+}
+
+} // namespace Glib
+
diff --git a/libs/glibmm2/glibmm/streamiochannel.h b/libs/glibmm2/glibmm/streamiochannel.h
new file mode 100644
index 0000000000..7165de9096
--- /dev/null
+++ b/libs/glibmm2/glibmm/streamiochannel.h
@@ -0,0 +1,67 @@
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef _GLIBMM_STREAMIOCHANNEL_H
+#define _GLIBMM_STREAMIOCHANNEL_H
+
+#include <glibmm/iochannel.h>
+#include <glibmmconfig.h>
+#include <iosfwd>
+
+GLIBMM_USING_STD(istream)
+GLIBMM_USING_STD(ostream)
+GLIBMM_USING_STD(iostream)
+
+
+namespace Glib
+{
+
+/** This whole class is deprecated in glibmm&nbsp;2.2.
+ * See the Glib::IOChannel documentation for an explanation.
+ */
+class StreamIOChannel : public Glib::IOChannel
+{
+public:
+ virtual ~StreamIOChannel();
+
+ static Glib::RefPtr<StreamIOChannel> create(std::istream& stream);
+ static Glib::RefPtr<StreamIOChannel> create(std::ostream& stream);
+ static Glib::RefPtr<StreamIOChannel> create(std::iostream& stream);
+
+protected:
+ std::istream* stream_in_;
+ std::ostream* stream_out_;
+
+ StreamIOChannel(std::istream* stream_in, std::ostream* stream_out);
+
+ virtual IOStatus read_vfunc(char* buf, gsize count, gsize& bytes_read);
+ virtual IOStatus write_vfunc(const char* buf, gsize count, gsize& bytes_written);
+ virtual IOStatus seek_vfunc(gint64 offset, SeekType type);
+ virtual IOStatus close_vfunc();
+ virtual IOStatus set_flags_vfunc(IOFlags flags);
+ virtual IOFlags get_flags_vfunc();
+ virtual Glib::RefPtr<Glib::Source> create_watch_vfunc(IOCondition cond);
+};
+
+} // namespace Glib
+
+
+#endif /* _GLIBMM_STREAMIOCHANNEL_H */
+
diff --git a/libs/glibmm2/glibmm/stringutils.cc b/libs/glibmm2/glibmm/stringutils.cc
new file mode 100644
index 0000000000..7113c014b8
--- /dev/null
+++ b/libs/glibmm2/glibmm/stringutils.cc
@@ -0,0 +1,117 @@
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/stringutils.h>
+#include <glibmm/utility.h>
+#include <glib.h>
+#include <cerrno>
+#include <stdexcept>
+#include <glibmmconfig.h>
+
+GLIBMM_USING_STD(out_of_range)
+GLIBMM_USING_STD(overflow_error)
+GLIBMM_USING_STD(underflow_error)
+
+
+bool Glib::str_has_prefix(const std::string& str, const std::string& prefix)
+{
+ return g_str_has_prefix(str.c_str(), prefix.c_str());
+}
+
+bool Glib::str_has_suffix(const std::string& str, const std::string& suffix)
+{
+ return g_str_has_suffix(str.c_str(), suffix.c_str());
+}
+
+double Glib::Ascii::strtod(const std::string& str)
+{
+ std::string::size_type dummy;
+ return Glib::Ascii::strtod(str, dummy, 0);
+}
+
+double Glib::Ascii::strtod(const std::string& str,
+ std::string::size_type& end_index,
+ std::string::size_type start_index)
+{
+ if(start_index > str.size())
+ throw std::out_of_range("out of range (strtod): start_index > str.size()");
+
+ const char *const bufptr = str.c_str();
+ char* endptr = 0;
+
+ const double result = g_ascii_strtod(bufptr + start_index, &endptr);
+ const int err_no = errno;
+
+ if(err_no != 0)
+ {
+ g_return_val_if_fail(err_no == ERANGE, result);
+
+ if(result > 0.0)
+ throw std::overflow_error("overflow (strtod): positive number too large");
+
+ if(result < 0.0)
+ throw std::overflow_error("overflow (strtod): negative number too large");
+
+ throw std::underflow_error("underflow (strtod): number too small");
+ }
+
+ if(endptr)
+ end_index = endptr - bufptr;
+ else
+ end_index = str.size();
+
+ return result;
+}
+
+std::string Glib::Ascii::dtostr(double d)
+{
+ char buf[G_ASCII_DTOSTR_BUF_SIZE];
+
+ return g_ascii_dtostr(buf, sizeof(buf), d);
+}
+
+std::string Glib::strescape(const std::string& source)
+{
+ const Glib::ScopedPtr<char> buf (g_strescape(source.c_str(), 0));
+ return buf.get();
+}
+
+std::string Glib::strescape(const std::string& source, const std::string& exceptions)
+{
+ const Glib::ScopedPtr<char> buf (g_strescape(source.c_str(), exceptions.c_str()));
+ return buf.get();
+}
+
+std::string Glib::strcompress(const std::string& source)
+{
+ const Glib::ScopedPtr<char> buf (g_strcompress(source.c_str()));
+ return buf.get();
+}
+
+Glib::ustring Glib::strerror(int errnum)
+{
+ return g_strerror(errnum);
+}
+
+Glib::ustring Glib::strsignal(int signum)
+{
+ return g_strsignal(signum);
+}
+
diff --git a/libs/glibmm2/glibmm/stringutils.h b/libs/glibmm2/glibmm/stringutils.h
new file mode 100644
index 0000000000..c6920e0830
--- /dev/null
+++ b/libs/glibmm2/glibmm/stringutils.h
@@ -0,0 +1,184 @@
+// -*- c++ -*-
+#ifndef _GLIBMM_STRINGUTILS_H
+#define _GLIBMM_STRINGUTILS_H
+
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/ustring.h>
+
+
+namespace Glib
+{
+
+/** @defgroup StringUtils String Utility Functions
+ *
+ * This section describes a number of utility functions for creating
+ * and manipulating strings, as well as other string-related stuff.
+ */
+
+/** Looks whether the string @a str begins with @a prefix.
+ * @ingroup StringUtils
+ * @param str A string.
+ * @param prefix The prefix to look for.
+ * @return <tt>true</tt> if @a str begins with @a prefix, <tt>false</tt> otherwise.
+ */
+bool str_has_prefix(const std::string& str, const std::string& prefix);
+
+/** Looks whether the string @a str ends with @a suffix.
+ * @ingroup StringUtils
+ * @param str A string.
+ * @param suffix The suffix to look for.
+ * @return <tt>true</tt> if @a str ends with @a suffix, <tt>false</tt> otherwise.
+ */
+bool str_has_suffix(const std::string& str, const std::string& suffix);
+
+
+namespace Ascii
+{
+
+/** Converts a string to a <tt>double</tt> value.
+ * @ingroup StringUtils
+ * This function behaves like the standard <tt>%strtod()</tt> function does in
+ * the C&nbsp;locale. It does this without actually changing the current
+ * locale, since that would not be thread-safe.
+ *
+ * This function is typically used when reading configuration files or other
+ * non-user input that should be locale independent. To handle input from the
+ * user you should normally use locale-sensitive C++ streams.
+ *
+ * To convert from a string to <tt>double</tt> in a locale-insensitive way, use
+ * Glib::Ascii::dtostr().
+ *
+ * @param str The string to convert to a numeric value.
+ * @return The <tt>double</tt> value.
+ * @throw std::overflow_error Thrown if the correct value would cause overflow.
+ * @throw std::underflow_error Thrown if the correct value would cause underflow.
+ */
+double strtod(const std::string& str);
+
+/** Converts a string to a <tt>double</tt> value.
+ * @ingroup StringUtils
+ * This function behaves like the standard <tt>%strtod()</tt> function does in
+ * the C&nbsp;locale. It does this without actually changing the current
+ * locale, since that would not be thread-safe.
+ *
+ * This function is typically used when reading configuration files or other
+ * non-user input that should be locale independent. To handle input from the
+ * user you should normally use locale-sensitive C++ streams.
+ *
+ * To convert from a string to <tt>double</tt> in a locale-insensitive way, use
+ * Glib::Ascii::dtostr().
+ *
+ * @param str The string to convert to a numeric value.
+ * @param start_index The index of the first character that should be used in the conversion.
+ * @retval end_index The index of the character after the last character used in the conversion.
+ * @return The <tt>double</tt> value.
+ * @throw std::out_of_range Thrown if @a start_index is out of range.
+ * @throw std::overflow_error Thrown if the correct value would cause overflow.
+ * @throw std::underflow_error Thrown if the correct value would cause underflow.
+ */
+double strtod(const std::string& str,
+ std::string::size_type& end_index,
+ std::string::size_type start_index = 0);
+
+/** Converts a <tt>double</tt> to a string, using the <tt>'.'</tt> as decimal point.
+ * @ingroup StringUtils
+ * This functions generates enough precision that converting the string back
+ * using Glib::Ascii::strtod() gives the same machine-number (on machines with
+ * IEEE compatible 64bit doubles).
+ *
+ * @param d The <tt>double</tt> value to convert.
+ * @return The converted string.
+ */
+std::string dtostr(double d);
+
+} // namespace Ascii
+
+
+/** Escapes all special characters in the string.
+ * @ingroup StringUtils
+ * Escapes the special characters <tt>'\\b'</tt>, <tt>'\\f'</tt>, <tt>'\\n'</tt>,
+ * <tt>'\\r'</tt>, <tt>'\\t'</tt>, <tt>'\\'</tt> and <tt>'"'</tt> in the string
+ * @a source by inserting a <tt>'\\'</tt> before them. Additionally all characters
+ * in the range <tt>0x01</tt>&nbsp;-&nbsp;<tt>0x1F</tt> (everything below <tt>SPACE</tt>)
+ * and in the range <tt>0x80</tt>&nbsp;-&nbsp;<tt>0xFF</tt> (all non-ASCII chars)
+ * are replaced with a <tt>'\\'</tt> followed by their octal representation.
+ *
+ * Glib::strcompress() does the reverse conversion.
+ *
+ * @param source A string to escape.
+ * @return A copy of @a source with certain characters escaped. See above.
+ */
+std::string strescape(const std::string& source);
+
+/** Escapes all special characters in the string.
+ * @ingroup StringUtils
+ * Escapes the special characters <tt>'\\b'</tt>, <tt>'\\f'</tt>, <tt>'\\n'</tt>,
+ * <tt>'\\r'</tt>, <tt>'\\t'</tt>, <tt>'\\'</tt> and <tt>'"'</tt> in the string
+ * @a source by inserting a <tt>'\\'</tt> before them. Additionally all characters
+ * in the range <tt>0x01</tt>&nbsp;-&nbsp;<tt>0x1F</tt> (everything below <tt>SPACE</tt>)
+ * and in the range <tt>0x80</tt>&nbsp;-&nbsp;<tt>0xFF</tt> (all non-ASCII chars)
+ * are replaced with a <tt>'\\'</tt> followed by their octal representation.
+ * Characters supplied in @a exceptions are not escaped.
+ *
+ * Glib::strcompress() does the reverse conversion.
+ *
+ * @param source A string to escape.
+ * @param exceptions A string of characters not to escape in @a source.
+ * @return A copy of @a source with certain characters escaped. See above.
+ */
+std::string strescape(const std::string& source, const std::string& exceptions);
+
+/** Replaces all escaped characters with their one byte equivalent.
+ * @ingroup StringUtils
+ * This function does the reverse conversion of Glib::strescape().
+ *
+ * @param source A string to compress.
+ * @return A copy of @a source with all escaped characters compressed.
+ */
+std::string strcompress(const std::string& source);
+
+/** Returns a string corresponding to the given error code, e.g.\ <tt>"no such process"</tt>.
+ * @ingroup StringUtils
+ * This function is included since not all platforms support the
+ * <tt>%strerror()</tt> function.
+ *
+ * @param errnum The system error number. See the standard C <tt>errno</tt> documentation.
+ * @return A string describing the error code. If the error code is unknown,
+ * <tt>&quot;unknown error (<em>\<errnum\></em>)&quot;</tt> is returned.
+ */
+Glib::ustring strerror(int errnum);
+
+/** Returns a string describing the given signal, e.g.\ <tt>"Segmentation fault"</tt>.
+ * @ingroup StringUtils
+ * This function is included since not all platforms support the
+ * <tt>%strsignal()</tt> function.
+ *
+ * @param signum The signal number. See the <tt>signal()</tt> documentation.
+ * @return A string describing the signal. If the signal is unknown,
+ * <tt>&quot;unknown signal (<em>\<signum\></em>)&quot;</tt> is returned.
+ */
+Glib::ustring strsignal(int signum);
+
+} // namespace Glib
+
+
+#endif /* _GLIBMM_STRINGUTILS_H */
+
diff --git a/libs/glibmm2/glibmm/thread.cc b/libs/glibmm2/glibmm/thread.cc
new file mode 100644
index 0000000000..1910c6fa38
--- /dev/null
+++ b/libs/glibmm2/glibmm/thread.cc
@@ -0,0 +1,399 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <glibmm/thread.h>
+#include <glibmm/private/thread_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/exceptionhandler.h>
+#include <glib/gmessages.h>
+
+
+namespace
+{
+
+extern "C"
+{
+
+static void* call_thread_entry_slot(void* data)
+{
+ sigc::slot_base *const slot = reinterpret_cast<sigc::slot_base*>(data);
+
+ try
+ {
+ // Recreate the specific slot, and drop the reference obtained by create().
+ (*static_cast<sigc::slot<void>*>(slot))();
+ }
+ catch(Glib::Thread::Exit&)
+ {
+ // Just exit from the thread. The Thread::Exit exception
+ // is our sane C++ replacement of g_thread_exit().
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+
+ delete slot;
+ return 0;
+}
+
+} //extern "C"
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+// internal
+void thread_init_impl()
+{
+ // Make sure the exception map is initialized before creating any thread.
+ Glib::Error::register_init();
+}
+
+
+/**** Glib::Thread *********************************************************/
+
+// static
+Thread* Thread::create(const sigc::slot<void>& slot, bool joinable)
+{
+ // Make a copy of slot on the heap
+ sigc::slot_base *const slot_copy = new sigc::slot<void>(slot);
+
+ GError* error = 0;
+
+ GThread *const thread = g_thread_create(
+ &call_thread_entry_slot, slot_copy, joinable, &error);
+
+ if(error)
+ {
+ delete slot_copy;
+ Glib::Error::throw_exception(error);
+ }
+
+ return reinterpret_cast<Thread*>(thread);
+}
+
+// static
+Thread* Thread::create(const sigc::slot<void>& slot, unsigned long stack_size,
+ bool joinable, bool bound, ThreadPriority priority)
+{
+ // Make a copy of slot on the heap
+ sigc::slot_base *const slot_copy = new sigc::slot<void>(slot);
+
+ GError* error = 0;
+
+ GThread *const thread = g_thread_create_full(
+ &call_thread_entry_slot, slot_copy, stack_size, joinable,
+ bound, (GThreadPriority) priority, &error);
+
+ if(error)
+ {
+ delete slot_copy;
+ Glib::Error::throw_exception(error);
+ }
+
+ return reinterpret_cast<Thread*>(thread);
+}
+
+// static
+Thread* Thread::self()
+{
+ return reinterpret_cast<Thread*>(g_thread_self());
+}
+
+bool Thread::joinable() const
+{
+ return gobject_.joinable;
+}
+
+void Thread::join()
+{
+ g_thread_join(&gobject_);
+}
+
+void Thread::set_priority(ThreadPriority priority)
+{
+ g_thread_set_priority(&gobject_, (GThreadPriority) priority);
+}
+
+ThreadPriority Thread::get_priority() const
+{
+ return (ThreadPriority) gobject_.priority;
+}
+
+// static
+void Thread::yield()
+{
+ g_thread_yield();
+}
+
+Thread* wrap(GThread* gobject)
+{
+ return reinterpret_cast<Thread*>(gobject);
+}
+
+
+/**** Glib::StaticMutex ****************************************************/
+
+void StaticMutex::lock()
+{
+ g_static_mutex_lock(&gobject_);
+}
+
+bool StaticMutex::trylock()
+{
+ return g_static_mutex_trylock(&gobject_);
+}
+
+void StaticMutex::unlock()
+{
+ g_static_mutex_unlock(&gobject_);
+}
+
+StaticMutex::operator Mutex&()
+{
+ // If GStaticMutex is implemented as struct (e.g. on Linux), its first struct
+ // member (runtime_mutex) is a GMutex pointer. If the gthread implementation
+ // is native (i.e. the vtable pointer passed to g_thread_init() was 0), then
+ // the runtime_mutex pointer is unused, and the rest of the GStaticMutex
+ // struct resembles the mutex data.
+ //
+ // On Win32, GStaticMutex is just a typedef to struct _GMutex*. Either way,
+ // the first sizeof(GMutex*) bytes of GStaticMutex always resemble a GMutex
+ // pointer. The gthread implementation relies on that, and we'll also do so.
+
+ GMutex*& runtime_mutex = reinterpret_cast<GMutex*&>(gobject_);
+
+ // Fortunately, it cannot hurt if we set this to the GMutex pointer returned
+ // by g_static_mutex_get_mutex(). Either we just overwrite it with the same
+ // value, or it was unused anyway. Doing that allows casting the pointer
+ // location to a Glib::Mutex reference (its only data member is a GMutex*).
+
+ runtime_mutex = g_static_mutex_get_mutex(&gobject_);
+
+ return reinterpret_cast<Mutex&>(runtime_mutex);
+}
+
+
+/**** Glib::Mutex **********************************************************/
+
+Mutex::Mutex()
+:
+ gobject_ (g_mutex_new())
+{}
+
+Mutex::~Mutex()
+{
+ g_mutex_free(gobject_);
+}
+
+void Mutex::lock()
+{
+ g_mutex_lock(gobject_);
+}
+
+bool Mutex::trylock()
+{
+ return g_mutex_trylock(gobject_);
+}
+
+void Mutex::unlock()
+{
+ g_mutex_unlock(gobject_);
+}
+
+
+/**** Glib::StaticRecMutex *************************************************/
+
+void StaticRecMutex::lock()
+{
+ g_static_rec_mutex_lock(&gobject_);
+}
+
+bool StaticRecMutex::trylock()
+{
+ return g_static_rec_mutex_trylock(&gobject_);
+}
+
+void StaticRecMutex::unlock()
+{
+ g_static_rec_mutex_unlock(&gobject_);
+}
+
+void StaticRecMutex::lock_full(unsigned int depth)
+{
+ g_static_rec_mutex_lock_full(&gobject_, depth);
+}
+
+unsigned int StaticRecMutex::unlock_full()
+{
+ return g_static_rec_mutex_unlock_full(&gobject_);
+}
+
+StaticRecMutex::operator RecMutex&()
+{
+ return static_cast<RecMutex&>(*this);
+}
+
+
+/**** Glib::RecMutex *******************************************************/
+
+RecMutex::RecMutex()
+{
+ g_static_rec_mutex_init(&gobject_);
+
+ // GLib doesn't have GRecMutex, only GStaticRecMutex. Force initialization
+ // of the mutex now, to mimic the behaviour of a (hypothetical) GRecMutex.
+ g_static_mutex_get_mutex(&gobject_.mutex);
+}
+
+RecMutex::~RecMutex()
+{
+ g_static_rec_mutex_free(&gobject_);
+}
+
+
+/**** Glib::StaticRWLock ***************************************************/
+
+void StaticRWLock::reader_lock()
+{
+ g_static_rw_lock_reader_lock(&gobject_);
+}
+
+bool StaticRWLock::reader_trylock()
+{
+ return g_static_rw_lock_reader_trylock(&gobject_);
+}
+
+void StaticRWLock::reader_unlock()
+{
+ g_static_rw_lock_reader_unlock(&gobject_);
+}
+
+void StaticRWLock::writer_lock()
+{
+ g_static_rw_lock_writer_lock(&gobject_);
+}
+
+bool StaticRWLock::writer_trylock()
+{
+ return g_static_rw_lock_writer_trylock(&gobject_);
+}
+
+void StaticRWLock::writer_unlock()
+{
+ g_static_rw_lock_writer_unlock(&gobject_);
+}
+
+StaticRWLock::operator RWLock&()
+{
+ return static_cast<RWLock&>(*this);
+}
+
+
+/**** Glib::RWLock *********************************************************/
+
+RWLock::RWLock()
+{
+ g_static_rw_lock_init(&gobject_);
+
+ // GLib doesn't have GRWLock, only GStaticRWLock. Force initialization
+ // of the mutex and the condition variables now, to mimic the behaviour
+ // of a (hypothetical) GRWLock.
+
+ if(g_static_mutex_get_mutex(&gobject_.mutex))
+ {
+ gobject_.read_cond = g_cond_new();
+ gobject_.write_cond = g_cond_new();
+ }
+}
+
+RWLock::~RWLock()
+{
+ g_static_rw_lock_free(&gobject_);
+}
+
+
+/**** Glib::Cond ***********************************************************/
+
+Cond::Cond()
+:
+ gobject_ (g_cond_new())
+{}
+
+Cond::~Cond()
+{
+ g_cond_free(gobject_);
+}
+
+void Cond::signal()
+{
+ g_cond_signal(gobject_);
+}
+
+void Cond::broadcast()
+{
+ g_cond_broadcast(gobject_);
+}
+
+void Cond::wait(Mutex& mutex)
+{
+ g_cond_wait(gobject_, mutex.gobj());
+}
+
+bool Cond::timed_wait(Mutex& mutex, const Glib::TimeVal& abs_time)
+{
+ return g_cond_timed_wait(gobject_, mutex.gobj(), const_cast<Glib::TimeVal*>(&abs_time));
+}
+
+
+} // namespace Glib
+
+
+namespace
+{
+} // anonymous namespace
+
+
+Glib::ThreadError::ThreadError(Glib::ThreadError::Code error_code, const Glib::ustring& error_message)
+:
+ Glib::Error (G_THREAD_ERROR, error_code, error_message)
+{}
+
+Glib::ThreadError::ThreadError(GError* gobject)
+:
+ Glib::Error (gobject)
+{}
+
+Glib::ThreadError::Code Glib::ThreadError::code() const
+{
+ return static_cast<Code>(Glib::Error::code());
+}
+
+void Glib::ThreadError::throw_func(GError* gobject)
+{
+ throw Glib::ThreadError(gobject);
+}
+
+
diff --git a/libs/glibmm2/glibmm/thread.h b/libs/glibmm2/glibmm/thread.h
new file mode 100644
index 0000000000..a4fa61da0b
--- /dev/null
+++ b/libs/glibmm2/glibmm/thread.h
@@ -0,0 +1,1082 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GLIBMM_THREAD_H
+#define _GLIBMM_THREAD_H
+
+
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#include <glib/gthread.h>
+#include <cstddef>
+
+#include <sigc++/sigc++.h>
+#include <glibmm/error.h>
+#include <glibmm/timeval.h>
+
+/* Shadow THREAD_PRIORITY_NORMAL macro (from winbase.h).
+ */
+#if defined(THREAD_PRIORITY_NORMAL) && !defined(GLIBMM_MACRO_SHADOW_THREAD_PRIORITY_NORMAL)
+enum { GLIBMM_MACRO_DEFINITION_THREAD_PRIORITY_NORMAL = THREAD_PRIORITY_NORMAL };
+#undef THREAD_PRIORITY_NORMAL
+enum { THREAD_PRIORITY_NORMAL = GLIBMM_MACRO_DEFINITION_THREAD_PRIORITY_NORMAL };
+#define THREAD_PRIORITY_NORMAL THREAD_PRIORITY_NORMAL
+#define GLIBMM_MACRO_SHADOW_THREAD_PRIORITY_NORMAL 1
+#endif
+
+
+/** Initializer macro for Glib::StaticMutex.
+ * @relates Glib::StaticMutex
+ * @hideinitializer
+ */
+#define GLIBMM_STATIC_MUTEX_INIT { G_STATIC_MUTEX_INIT }
+
+/** Initializer macro for Glib::StaticRecMutex.
+ * @relates Glib::StaticRecMutex
+ * @hideinitializer
+ */
+#define GLIBMM_STATIC_REC_MUTEX_INIT { G_STATIC_REC_MUTEX_INIT }
+
+/** Initializer macro for Glib::StaticRWLock.
+ * @relates Glib::StaticRWLock
+ * @hideinitializer
+ */
+#define GLIBMM_STATIC_RW_LOCK_INIT { G_STATIC_RW_LOCK_INIT }
+
+/** Initializer macro for Glib::StaticPrivate.
+ * @relates Glib::StaticPrivate
+ * @hideinitializer
+ */
+#define GLIBMM_STATIC_PRIVATE_INIT { G_STATIC_PRIVATE_INIT }
+
+
+namespace Glib
+{
+
+/** @addtogroup glibmmEnums Enums and Flags */
+
+/** Specifies the priority of a thread.
+ * @note It is not guaranteed, that threads with different priorities really
+ * behave accordingly. On some systems (e.g. Linux) only <tt>root</tt> can
+ * increase priorities. On other systems (e.g. Solaris) there doesn't seem to
+ * be different scheduling for different priorities. All in all try to avoid
+ * being dependent on priorities.
+ * @ingroup glibmmEnums
+ */
+enum ThreadPriority
+{
+ THREAD_PRIORITY_LOW,
+ THREAD_PRIORITY_NORMAL,
+ THREAD_PRIORITY_HIGH,
+ THREAD_PRIORITY_URGENT
+};
+
+
+/*! @var ThreadPriority THREAD_PRIORITY_LOW
+ * A priority lower than normal.
+ */
+/*! @var ThreadPriority THREAD_PRIORITY_NORMAL
+ * The default priority.
+ */
+/*! @var ThreadPriority THREAD_PRIORITY_HIGH
+ * A priority higher than normal.
+ */
+/*! @var ThreadPriority THREAD_PRIORITY_URGENT
+ * The highest priority.
+ */
+
+
+/** @defgroup Threads Threads
+ * Thread abstraction; including threads, different mutexes,
+ * conditions and thread private data.
+ * @{
+ */
+
+enum NotLock { NOT_LOCK };
+enum TryLock { TRY_LOCK };
+
+/** Initializes the GLib thread system.
+ * Before you use a thread related function in glibmm, you should initialize
+ * the thread system. This is done by calling Glib::thread_init().
+ *
+ * @note You should only call thread_init() with a non-<tt>0</tt> parameter
+ * if you really know what you are doing.
+ *
+ * @note thread_init() must not be called directly or indirectly as
+ * a callback from glibmm. Also no mutexes may be currently locked while
+ * calling thread_init().
+ *
+ * thread_init() might only be called once. On the second call it will
+ * abort with an error. If you want to make sure that the thread system
+ * is initialized, you can do that too:
+ * @code
+ * if(!Glib::thread_supported()) Glib::thread_init();
+ * @endcode
+ * After that line either the thread system is initialized, or the program
+ * will abort if no thread system is available in GLib, i.e. either
+ * @c G_THREADS_ENABLED is not defined or @c G_THREADS_IMPL_NONE is defined.
+ *
+ * If no thread system is available and @a vtable is <tt>0</tt> or if not all
+ * elements of @a vtable are non-<tt>0</tt>, then thread_init() will abort.
+ *
+ * @note To use thread_init() in your program, you have to link with the
+ * libraries that the command <tt>pkg-config&nbsp;--libs&nbsp;gthread-2.0</tt>
+ * outputs. This is not the case for all the other thread related functions
+ * of glibmm. Those can be used without having to link with the thread
+ * libraries. (You @em have to link with <tt>gthread-2.0</tt> if you actually
+ * want to use threads in your application, though.)
+ *
+ * @param vtable A function table of type @c GThreadFunctions, that provides
+ * the entry points to the thread system to be used.
+ */
+inline void thread_init(GThreadFunctions* vtable = 0);
+
+/** Returns whether the thread system is initialized.
+ * @return @c true, if the thread system is initialized.
+ */
+inline bool thread_supported();
+
+
+class Mutex;
+class RecMutex;
+class RWLock;
+struct StaticMutex;
+struct StaticRecMutex;
+struct StaticRWLock;
+
+
+/** Exception class for thread-related errors.
+ */
+class ThreadError : public Glib::Error
+{
+public:
+ enum Code
+ {
+ AGAIN
+ };
+
+ ThreadError(Code error_code, const Glib::ustring& error_message);
+ explicit ThreadError(GError* gobject);
+ Code code() const;
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+private:
+ static void throw_func(GError* gobject);
+ friend void wrap_init(); // uses throw_func()
+#endif
+};
+
+
+/** Represents a running thread.
+ * An instance of this class can only be obtained with create(), self(),
+ * or wrap(GThread*). It's not possible to delete a Thread object. If the
+ * thread is @em not joinable, its resources will be freed automatically
+ * when it exits. Otherwise, if the thread @em is joinable, you must call
+ * join() to avoid a memory leak.
+ *
+ * @note g_thread_exit() is not wrapped, because that function exits a thread
+ * without any cleanup. That's especially dangerous in C++ code, since the
+ * destructors of automatic objects won't be invoked. Instead, you can throw
+ * a Thread::Exit exception, which will be caught by the internal thread
+ * entry function.
+ *
+ * @note You might have noticed that the thread entry slot doesn't have the
+ * usual void* return value. If you want to return any data from your thread
+ * you can pass an additional output argument to the thread's entry slot.
+ */
+class Thread
+{
+public:
+ class Exit;
+
+ /** Creates a new thread with the priority <tt>THREAD_PRIORITY_NORMAL</tt>.
+ * If @a joinable is @c true, you can wait for this thread's termination by
+ * calling join(). Otherwise the thread will just disappear, when ready.
+ *
+ * The new thread executes the function or method @a slot points to. You can
+ * pass additional arguments using sigc::bind(). If the thread was created
+ * successfully, it is returned, otherwise a ThreadError exception is thrown.
+ *
+ * @param slot A slot to execute in the new thread.
+ * @param joinable Should this thread be joinable?
+ * @return The new Thread* on success.
+ * @throw Glib::ThreadError
+ */
+ static Thread* create(const sigc::slot<void>& slot, bool joinable);
+
+ /** Creates a new thread with the priority @a priority. The stack gets the
+ * size @a stack_size or the default value for the current platform, if
+ * @a stack_size is <tt>0</tt>.
+ *
+ * If @a joinable is @c true, you can wait for this thread's termination by
+ * calling join(). Otherwise the thread will just disappear, when ready.
+ * If @a bound is @c true, this thread will be scheduled in the system scope,
+ * otherwise the implementation is free to do scheduling in the process
+ * scope. The first variant is more expensive resource-wise, but generally
+ * faster. On some systems (e.g. Linux) all threads are bound.
+ *
+ * The new thread executes the function or method @a slot points to. You can
+ * pass additional arguments using sigc::bind(). If the thread was created
+ * successfully, it is returned.
+ *
+ * @note It is not guaranteed, that threads with different priorities really
+ * behave accordingly. On some systems (e.g. Linux) only root can increase
+ * priorities. On other systems (e.g. Solaris) there doesn't seem to be
+ * different scheduling for different priorities. All in all try to avoid
+ * being dependent on priorities. Use <tt>Glib::THREAD_PRIORITY_NORMAL</tt>
+ * here as a default.
+ *
+ * @note Only use the extended
+ * create(const sigc::slot<void>&, unsigned long, bool, bool, ThreadPriority)
+ * function, when you really can't use the simple
+ * create(const sigc::slot<void>&, bool)
+ * instead. The latter overload does not take @a stack_size, @a bound and
+ * @a priority as arguments, as they should only be used for cases, where
+ * it is inevitable.
+ *
+ * @param slot A slot to execute in the new thread.
+ * @param stack_size A stack size for the new thread, or <tt>0</tt>.
+ * @param joinable Should this thread be joinable?
+ * @param bound Should this thread be bound to a system thread?
+ * @param priority A priority for the thread.
+ * @return The new Thread* on success.
+ * @throw Glib::ThreadError
+ */
+ static Thread* create(const sigc::slot<void>& slot, unsigned long stack_size,
+ bool joinable, bool bound, ThreadPriority priority);
+
+ /** Returns the Thread* corresponding to the calling thread.
+ * @return The current thread.
+ */
+ static Thread* self();
+
+ /** Returns whether the thread is joinable.
+ * @return Whether the thread is joinable.
+ */
+ bool joinable() const;
+
+ /** Waits until the thread finishes.
+ * Waits until the thread finishes, i.e. the slot, as given to create(),
+ * returns or g_thread_exit() is called by the thread. (Calling
+ * g_thread_exit() in a C++ program should be avoided.) All resources of
+ * the thread including the Glib::Thread object are released. The thread
+ * must have been created with <tt>joinable&nbsp;=&nbsp;true</tt>.
+ */
+ void join();
+
+ /** Changes the priority of the thread to @a priority.
+ * @note It is not guaranteed, that threads with different priorities really
+ * behave accordingly. On some systems (e.g. Linux) only @c root can
+ * increase priorities. On other systems (e.g. Solaris) there doesn't seem
+ * to be different scheduling for different priorities. All in all try to
+ * avoid being dependent on priorities.
+ * @param priority A new priority for the thread.
+ */
+ void set_priority(ThreadPriority priority);
+
+ /** Returns the priority of the thread.
+ * @return The thread's priority.
+ */
+ ThreadPriority get_priority() const;
+
+ /** Gives way to other threads waiting to be scheduled.
+ * This function is often used as a method to make busy wait less evil. But
+ * in most cases, you will encounter, there are better methods to do that.
+ * So in general you shouldn't use this function.
+ */
+ static void yield();
+
+ GThread* gobj() { return &gobject_; }
+ const GThread* gobj() const { return &gobject_; }
+
+private:
+ GThread gobject_;
+
+ // Glib::Thread can neither be constructed nor deleted.
+ Thread();
+ void operator delete(void*, size_t);
+
+ // noncopyable
+ Thread(const Thread&);
+ Thread& operator=(const Thread&);
+};
+
+/** %Exception class used to exit from a thread.
+ * @code
+ * throw Glib::Thread::Exit();
+ * @endcode
+ * Write this if you want to exit from a thread created by Thread::create().
+ * Of course you must make sure not to catch Thread::Exit by accident, i.e.
+ * when using <tt>catch(...)</tt> somewhere in your code.
+ */
+class Thread::Exit
+{};
+
+/** @relates Glib::Thread */
+Thread* wrap(GThread* gobject);
+
+
+/** Like Glib::Mutex, but can be defined at compile time.
+ * Use @c GLIBMM_STATIC_MUTEX_INIT to initialize a StaticMutex:
+ * @code
+ * Glib::StaticMutex mutex = GLIBMM_STATIC_MUTEX_INIT;
+ * @endcode
+ * A StaticMutex can be used without calling Glib::thread_init(), it will
+ * silently do nothing then. That will also work when using the implicit
+ * conversion to Mutex&, thus you can safely use Mutex::Lock with a
+ * StaticMutex.
+ */
+struct StaticMutex
+{
+ void lock();
+ bool trylock();
+ void unlock();
+
+ operator Mutex&();
+
+ GStaticMutex* gobj() { return &gobject_; }
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ // Must be public to allow initialization at compile time.
+ GStaticMutex gobject_;
+#endif
+};
+
+/** Represents a mutex (mutual exclusion).
+ * It can be used to protect data against shared access. Try to use
+ * Mutex::Lock instead of calling lock() and unlock() directly&nbsp;--
+ * it will make your life much easier.
+ *
+ * @note Before creating a Glib::Mutex, Glib::thread_init() has to be called.
+ *
+ * @note Glib::Mutex is not recursive, i.e. a thread will deadlock, if it
+ * already has locked the mutex while calling lock(). Use Glib::RecMutex
+ * instead, if you need recursive mutexes.
+ */
+class Mutex
+{
+public:
+ class Lock;
+
+ Mutex();
+ ~Mutex();
+
+ /** Locks the mutex.
+ * If mutex is already locked by another thread, the current thread will
+ * block until mutex is unlocked by the other thread.
+ * @see Mutex::Lock
+ */
+ void lock();
+
+ /** Tries to lock the mutex.
+ * If the mutex is already locked by another thread, it immediately returns
+ * @c false. Otherwise it locks the mutex and returns @c true.
+ * @return Whether the mutex could be locked.
+ * @see Mutex::Lock
+ */
+ bool trylock();
+
+ /** Unlocks the mutex.
+ * If another thread is blocked in a lock() call for this mutex, it will be
+ * woken and can lock the mutex itself.
+ * @see Mutex::Lock
+ */
+ void unlock();
+
+ GMutex* gobj() { return gobject_; }
+
+private:
+ GMutex* gobject_;
+
+ // noncopyable
+ Mutex(const Mutex&);
+ Mutex& operator=(const Mutex&);
+};
+
+/** Utility class for exception-safe mutex locking.
+ * @par Usage example:
+ * @code
+ * {
+ * Glib::Mutex::Lock lock (mutex); // calls mutex.lock()
+ * do_something();
+ * } // the destructor calls mutex.unlock()
+ * @endcode
+ * As you can see, the compiler takes care of the unlocking. This is not
+ * only exception safe but also much less error-prone. You could even
+ * <tt>return</tt> while still holding the lock and it will be released
+ * properly.
+ */
+class Mutex::Lock
+{
+public:
+ explicit inline Lock(Mutex& mutex);
+ inline Lock(Mutex& mutex, NotLock);
+ inline Lock(Mutex& mutex, TryLock);
+ inline ~Lock();
+
+ inline void acquire();
+ inline bool try_acquire();
+ inline void release();
+ inline bool locked() const;
+
+private:
+ Mutex& mutex_;
+ bool locked_;
+
+ // noncopyable
+ Lock(const Mutex::Lock&);
+ Mutex::Lock& operator=(const Mutex::Lock&);
+};
+
+
+/** Like Glib::RecMutex, but can be defined at compile time.
+ * Use @c GLIBMM_STATIC_REC_MUTEX_INIT to initialize a StaticRecMutex:
+ * @code
+ * Glib::StaticRecMutex mutex = GLIBMM_STATIC_REC_MUTEX_INIT;
+ * @endcode
+ * A StaticRecMutex can be used without calling Glib::thread_init(), it will
+ * silently do nothing then. That will also work when using the implicit
+ * conversion to RecMutex&, thus you can safely use RecMutex::Lock with a
+ * StaticRecMutex.
+ */
+struct StaticRecMutex
+{
+ void lock();
+ bool trylock();
+ void unlock();
+
+ void lock_full(unsigned int depth);
+ unsigned int unlock_full();
+
+ operator RecMutex&();
+
+ GStaticRecMutex* gobj() { return &gobject_; }
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ // Must be public to allow initialization at compile time.
+ GStaticRecMutex gobject_;
+#endif
+};
+
+class RecMutex : public StaticRecMutex
+{
+public:
+ class Lock;
+
+ RecMutex();
+ ~RecMutex();
+
+private:
+ // noncopyable
+ RecMutex(const RecMutex&);
+ RecMutex& operator=(const RecMutex&);
+};
+
+/** Utility class for exception-safe locking of recursive mutexes.
+ */
+class RecMutex::Lock
+{
+public:
+ explicit inline Lock(RecMutex& mutex);
+ inline Lock(RecMutex& mutex, NotLock);
+ inline Lock(RecMutex& mutex, TryLock);
+ inline ~Lock();
+
+ inline void acquire();
+ inline bool try_acquire();
+ inline void release();
+ inline bool locked() const;
+
+private:
+ RecMutex& mutex_;
+ bool locked_;
+
+ // noncopyable
+ Lock(const RecMutex::Lock&);
+ RecMutex::Lock& operator=(const RecMutex::Lock&);
+};
+
+
+/** Like Glib::RWLock, but can be defined at compile time.
+ * Use @c GLIBMM_STATIC_RW_LOCK_INIT to initialize a StaticRWLock:
+ * @code
+ * Glib::StaticRWLock rw_lock = GLIBMM_STATIC_RW_LOCK_INIT;
+ * @endcode
+ * A StaticRWLock can be used without calling Glib::thread_init(), it will
+ * silently do nothing then. That will also work when using the implicit
+ * conversion to RWLock&, thus you can safely use RWLock::ReaderLock and
+ * RWLock::WriterLock with a StaticRWLock.
+ */
+struct StaticRWLock
+{
+ void reader_lock();
+ bool reader_trylock();
+ void reader_unlock();
+
+ void writer_lock();
+ bool writer_trylock();
+ void writer_unlock();
+
+ operator RWLock&();
+
+ GStaticRWLock* gobj() { return &gobject_; }
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ // Must be public to allow initialization at compile time.
+ GStaticRWLock gobject_;
+#endif
+};
+
+class RWLock : public StaticRWLock
+{
+public:
+ class ReaderLock;
+ class WriterLock;
+
+ RWLock();
+ ~RWLock();
+
+private:
+ // noncopyable
+ RWLock(const RWLock&);
+ RWLock& operator=(const RWLock&);
+};
+
+/** Utility class for exception-safe locking of read/write locks.
+ */
+class RWLock::ReaderLock
+{
+public:
+ explicit inline ReaderLock(RWLock& rwlock);
+ inline ReaderLock(RWLock& rwlock, NotLock);
+ inline ReaderLock(RWLock& rwlock, TryLock);
+ inline ~ReaderLock();
+
+ inline void acquire();
+ inline bool try_acquire();
+ inline void release();
+ inline bool locked() const;
+
+private:
+ RWLock& rwlock_;
+ bool locked_;
+
+ // noncopyable
+ ReaderLock(const RWLock::ReaderLock&);
+ RWLock::ReaderLock& operator=(const RWLock::ReaderLock&);
+};
+
+/** Utility class for exception-safe locking of read/write locks.
+ */
+class RWLock::WriterLock
+{
+public:
+ explicit inline WriterLock(RWLock& rwlock);
+ inline WriterLock(RWLock& rwlock, NotLock);
+ inline WriterLock(RWLock& rwlock, TryLock);
+ inline ~WriterLock();
+
+ inline void acquire();
+ inline bool try_acquire();
+ inline void release();
+ inline bool locked() const;
+
+private:
+ RWLock& rwlock_;
+ bool locked_;
+
+ // noncopyable
+ WriterLock(const RWLock::WriterLock&);
+ RWLock::WriterLock& operator=(const RWLock::WriterLock&);
+};
+
+/** An opaque data structure to represent a condition.
+ * A @a Cond is an object that threads can block on, if they find a certain
+ * condition to be false. If other threads change the state of this condition
+ * they can signal the @a Cond, such that the waiting thread is woken up.
+ * @par Usage example:
+ * @code
+ * Glib::Cond data_cond;
+ * Glib::Mutex data_mutex;
+ * void* current_data = NULL;
+ *
+ * void push_data (void* data)
+ * {
+ * data_mutex.lock();
+ * current_data = data;
+ * data_cond.signal();
+ * data_mutex.unlock();
+ * }
+ *
+ * void* pop_data ()
+ * {
+ * void* data;
+ *
+ * data_mutex.lock();
+ * while (!current_data)
+ * data_cond.wait(data_mutex);
+ * data = current_data;
+ * current_data = NULL;
+ * data_mutex.unlock();
+ * return data;
+ * }
+ * @endcode
+*/
+class Cond
+{
+public:
+ Cond();
+ ~Cond();
+
+ /** If threads are waiting for this @a Cond, exactly one of them is woken up.
+ * It is good practice to hold the same lock as the waiting thread, while calling
+ * this method, though not required.
+ *
+ * @note This method can also be used if @a Glib::thread_init() has not yet been
+ * called and will do nothing then.
+ */
+ void signal();
+
+ /** If threads are waiting for this @a Cond, all of them are woken up.
+ * It is good practice to hold the same lock as the waiting thread, while calling
+ * this method, though not required.
+ *
+ * @note This method can also be used if @a Glib::thread_init() has not yet been
+ * called and will do nothing then.
+ */
+ void broadcast();
+
+ /** Waits until this thread is woken up on this @a Cond.
+ * The mutex is unlocked before falling asleep and locked again before resuming.
+ *
+ * This method can also be used if @a Glib::thread_init() has not yet been
+ * called and will immediately return then.
+ *
+ * @param mutex a @a Mutex that is currently locked.
+ *
+ * @note It is important to use the @a wait() and @a timed_wait() methods
+ * only inside a loop, which checks for the condition to be true as it is not
+ * guaranteed that the waiting thread will find it fulfilled, even if the signaling
+ * thread left the condition in that state. This is because another thread can have
+ * altered the condition, before the waiting thread got the chance to be woken up,
+ * even if the condition itself is protected by a @a Mutex.
+ */
+ void wait(Mutex& mutex);
+
+ /** Waits until this thread is woken up on this @a Cond, but not longer than until the time, that is specified by @a abs_time.
+ * The mutex is unlocked before falling asleep and locked again before resuming.
+ *
+ * This function can also be used, if @a Glib::thread_init() has not yet been
+ * called and will immediately return @c true then.
+ *
+ * @param mutex a @a Mutex that is currently locked.
+ * @param abs_time a max time to wait.
+ *
+ * @note It is important to use the @a wait() and @a timed_wait() methods
+ * only inside a loop, which checks for the condition to be true as it is not
+ * guaranteed that the waiting thread will find it fulfilled, even if the signaling
+ * thread left the condition in that state. This is because another thread can have
+ * altered the condition, before the waiting thread got the chance to be woken up,
+ * even if the condition itself is protected by a @a Mutex.
+ */
+ bool timed_wait(Mutex& mutex, const Glib::TimeVal& abs_time);
+
+ GCond* gobj() { return gobject_; }
+
+private:
+ GCond* gobject_;
+
+ // noncopyable
+ Cond(const Cond&);
+ Cond& operator=(const Cond&);
+};
+
+
+template <class T>
+struct StaticPrivate
+{
+ typedef void (*DestroyNotifyFunc) (void*);
+
+ static void delete_ptr(void* data);
+
+ inline T* get();
+ inline void set(T* data, DestroyNotifyFunc notify_func = &StaticPrivate<T>::delete_ptr);
+
+ GStaticPrivate* gobj() { return &gobject_; }
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ // Must be public to allow initialization at compile time.
+ GStaticPrivate gobject_;
+#endif
+};
+
+template <class T>
+class Private
+{
+public:
+ typedef void (*DestructorFunc) (void*);
+
+ static void delete_ptr(void* data);
+
+ explicit inline Private(DestructorFunc destructor_func = &Private<T>::delete_ptr);
+ inline T* get();
+ inline void set(T* data);
+
+ GPrivate* gobj() { return gobject_; }
+
+private:
+ GPrivate* gobject_;
+
+ // noncopyable
+ Private(const Private<T>&);
+ Private<T>& operator=(const Private<T>&);
+};
+
+/** @} group Threads */
+
+/*! A glibmm thread example.
+ * @example thread/thread.cc
+ */
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+/***************************************************************************/
+/* inline implementation */
+/***************************************************************************/
+
+// internal
+void thread_init_impl();
+
+/* This function must be inline, to avoid an unnecessary dependency on
+ * libgthread even if the thread system is not used. libgthread might
+ * not even be available if GLib was compiled without thread support.
+ */
+inline
+void thread_init(GThreadFunctions* vtable)
+{
+ g_thread_init(vtable);
+ Glib::thread_init_impl();
+}
+
+inline
+bool thread_supported()
+{
+ //MSVC++ needs the != 0 to avoid an int -> bool cast warning.
+ return (g_thread_supported() != 0);
+}
+
+
+/**** Glib::Mutex::Lock ****************************************************/
+
+inline
+Mutex::Lock::Lock(Mutex& mutex)
+:
+ mutex_ (mutex),
+ locked_ (true)
+{
+ mutex_.lock();
+}
+
+inline
+Mutex::Lock::Lock(Mutex& mutex, NotLock)
+:
+ mutex_ (mutex),
+ locked_ (false)
+{}
+
+inline
+Mutex::Lock::Lock(Mutex& mutex, TryLock)
+:
+ mutex_ (mutex),
+ locked_ (mutex.trylock())
+{}
+
+inline
+Mutex::Lock::~Lock()
+{
+ if(locked_)
+ mutex_.unlock();
+}
+
+inline
+void Mutex::Lock::acquire()
+{
+ mutex_.lock();
+ locked_ = true;
+}
+
+inline
+bool Mutex::Lock::try_acquire()
+{
+ locked_ = mutex_.trylock();
+ return locked_;
+}
+
+inline
+void Mutex::Lock::release()
+{
+ mutex_.unlock();
+ locked_ = false;
+}
+
+inline
+bool Mutex::Lock::locked() const
+{
+ return locked_;
+}
+
+
+/**** Glib::RecMutex::Lock *************************************************/
+
+inline
+RecMutex::Lock::Lock(RecMutex& mutex)
+:
+ mutex_ (mutex),
+ locked_ (true)
+{
+ mutex_.lock();
+}
+
+inline
+RecMutex::Lock::Lock(RecMutex& mutex, NotLock)
+:
+ mutex_ (mutex),
+ locked_ (false)
+{}
+
+inline
+RecMutex::Lock::Lock(RecMutex& mutex, TryLock)
+:
+ mutex_ (mutex),
+ locked_ (mutex.trylock())
+{}
+
+inline
+RecMutex::Lock::~Lock()
+{
+ if(locked_)
+ mutex_.unlock();
+}
+
+inline
+void RecMutex::Lock::acquire()
+{
+ mutex_.lock();
+ locked_ = true;
+}
+
+inline
+bool RecMutex::Lock::try_acquire()
+{
+ locked_ = mutex_.trylock();
+ return locked_;
+}
+
+inline
+void RecMutex::Lock::release()
+{
+ mutex_.unlock();
+ locked_ = false;
+}
+
+inline
+bool RecMutex::Lock::locked() const
+{
+ return locked_;
+}
+
+
+/**** Glib::RWLock::ReaderLock *********************************************/
+
+inline
+RWLock::ReaderLock::ReaderLock(RWLock& rwlock)
+:
+ rwlock_ (rwlock),
+ locked_ (true)
+{
+ rwlock_.reader_lock();
+}
+
+inline
+RWLock::ReaderLock::ReaderLock(RWLock& rwlock, NotLock)
+:
+ rwlock_ (rwlock),
+ locked_ (false)
+{}
+
+inline
+RWLock::ReaderLock::ReaderLock(RWLock& rwlock, TryLock)
+:
+ rwlock_ (rwlock),
+ locked_ (rwlock.reader_trylock())
+{}
+
+inline
+RWLock::ReaderLock::~ReaderLock()
+{
+ if(locked_)
+ rwlock_.reader_unlock();
+}
+
+inline
+void RWLock::ReaderLock::acquire()
+{
+ rwlock_.reader_lock();
+ locked_ = true;
+}
+
+inline
+bool RWLock::ReaderLock::try_acquire()
+{
+ locked_ = rwlock_.reader_trylock();
+ return locked_;
+}
+
+inline
+void RWLock::ReaderLock::release()
+{
+ rwlock_.reader_unlock();
+ locked_ = false;
+}
+
+inline
+bool RWLock::ReaderLock::locked() const
+{
+ return locked_;
+}
+
+
+/**** Glib::RWLock::WriterLock *********************************************/
+
+inline
+RWLock::WriterLock::WriterLock(RWLock& rwlock)
+:
+ rwlock_ (rwlock),
+ locked_ (true)
+{
+ rwlock_.writer_lock();
+}
+
+inline
+RWLock::WriterLock::WriterLock(RWLock& rwlock, NotLock)
+:
+ rwlock_ (rwlock),
+ locked_ (false)
+{}
+
+inline
+RWLock::WriterLock::WriterLock(RWLock& rwlock, TryLock)
+:
+ rwlock_ (rwlock),
+ locked_ (rwlock.writer_trylock())
+{}
+
+inline
+RWLock::WriterLock::~WriterLock()
+{
+ if(locked_)
+ rwlock_.writer_unlock();
+}
+
+inline
+void RWLock::WriterLock::acquire()
+{
+ rwlock_.writer_lock();
+ locked_ = true;
+}
+
+inline
+bool RWLock::WriterLock::try_acquire()
+{
+ locked_ = rwlock_.writer_trylock();
+ return locked_;
+}
+
+inline
+void RWLock::WriterLock::release()
+{
+ rwlock_.writer_unlock();
+ locked_ = false;
+}
+
+inline
+bool RWLock::WriterLock::locked() const
+{
+ return locked_;
+}
+
+
+/**** Glib::StaticPrivate **************************************************/
+
+// static
+template <class T>
+void StaticPrivate<T>::delete_ptr(void* data)
+{
+ delete static_cast<T*>(data);
+}
+
+template <class T> inline
+T* StaticPrivate<T>::get()
+{
+ return static_cast<T*>(g_static_private_get(&gobject_));
+}
+
+template <class T> inline
+void StaticPrivate<T>::set(T* data, typename StaticPrivate<T>::DestroyNotifyFunc notify_func)
+{
+ g_static_private_set(&gobject_, data, notify_func);
+}
+
+
+/**** Glib::Private ********************************************************/
+
+// static
+template <class T>
+void Private<T>::delete_ptr(void* data)
+{
+ delete static_cast<T*>(data);
+}
+
+template <class T> inline
+Private<T>::Private(typename Private<T>::DestructorFunc destructor_func)
+:
+ gobject_ (g_private_new(destructor_func))
+{}
+
+template <class T> inline
+T* Private<T>::get()
+{
+ return static_cast<T*>(g_private_get(gobject_));
+}
+
+template <class T> inline
+void Private<T>::set(T* data)
+{
+ g_private_set(gobject_, data);
+}
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+} // namespace Glib
+
+
+#endif /* _GLIBMM_THREAD_H */
+
diff --git a/libs/glibmm2/glibmm/threadpool.cc b/libs/glibmm2/glibmm/threadpool.cc
new file mode 100644
index 0000000000..db9b089c9a
--- /dev/null
+++ b/libs/glibmm2/glibmm/threadpool.cc
@@ -0,0 +1,245 @@
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/threadpool.h>
+#include <glibmm/exceptionhandler.h>
+#include <glib.h>
+#include <list>
+#include <glibmmconfig.h>
+
+GLIBMM_USING_STD(list)
+
+
+namespace Glib
+{
+
+// internal
+class ThreadPool::SlotList
+{
+public:
+ SlotList();
+ ~SlotList();
+
+ sigc::slot<void>* push(const sigc::slot<void>& slot);
+ sigc::slot<void> pop(sigc::slot<void>* slot_ptr);
+
+ void lock_and_unlock();
+
+private:
+ Glib::Mutex mutex_;
+ std::list< sigc::slot<void> > list_;
+
+ // noncopyable
+ SlotList(const ThreadPool::SlotList&);
+ ThreadPool::SlotList& operator=(const ThreadPool::SlotList&);
+};
+
+ThreadPool::SlotList::SlotList()
+{}
+
+ThreadPool::SlotList::~SlotList()
+{}
+
+sigc::slot<void>* ThreadPool::SlotList::push(const sigc::slot<void>& slot)
+{
+ Mutex::Lock lock (mutex_);
+
+ list_.push_back(slot);
+ return &list_.back();
+}
+
+sigc::slot<void> ThreadPool::SlotList::pop(sigc::slot<void>* slot_ptr)
+{
+ sigc::slot<void> slot;
+
+ {
+ Mutex::Lock lock (mutex_);
+
+ std::list< sigc::slot<void> >::iterator pslot = list_.begin();
+ while(pslot != list_.end() && slot_ptr != &*pslot)
+ ++pslot;
+
+ if(pslot != list_.end())
+ {
+ slot = *pslot;
+ list_.erase(pslot);
+ }
+ }
+
+ return slot;
+}
+
+void ThreadPool::SlotList::lock_and_unlock()
+{
+ mutex_.lock();
+ mutex_.unlock();
+}
+
+} // namespace Glib
+
+
+namespace
+{
+
+static void call_thread_entry_slot(void* data, void* user_data)
+{
+ try
+ {
+ Glib::ThreadPool::SlotList *const slot_list =
+ static_cast<Glib::ThreadPool::SlotList*>(user_data);
+
+ sigc::slot<void> slot (slot_list->pop(static_cast<sigc::slot<void>*>(data)));
+
+ slot();
+ }
+ catch(Glib::Thread::Exit&)
+ {
+ // Just exit from the thread. The Thread::Exit exception
+ // is our sane C++ replacement of g_thread_exit().
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+}
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+ThreadPool::ThreadPool(int max_threads, bool exclusive)
+:
+ gobject_ (0),
+ slot_list_ (new SlotList())
+{
+ GError* error = 0;
+
+ gobject_ = g_thread_pool_new(
+ &call_thread_entry_slot, slot_list_, max_threads, exclusive, &error);
+
+ if(error)
+ {
+ delete slot_list_;
+ slot_list_ = 0;
+ Glib::Error::throw_exception(error);
+ }
+}
+
+ThreadPool::~ThreadPool()
+{
+ if(gobject_)
+ g_thread_pool_free(gobject_, 1, 1);
+
+ if(slot_list_)
+ {
+ slot_list_->lock_and_unlock();
+ delete slot_list_;
+ }
+}
+
+void ThreadPool::push(const sigc::slot<void>& slot)
+{
+ sigc::slot<void> *const slot_ptr = slot_list_->push(slot);
+
+ GError* error = 0;
+ g_thread_pool_push(gobject_, slot_ptr, &error);
+
+ if(error)
+ {
+ slot_list_->pop(slot_ptr);
+ Glib::Error::throw_exception(error);
+ }
+}
+
+void ThreadPool::set_max_threads(int max_threads)
+{
+ GError* error = 0;
+ g_thread_pool_set_max_threads(gobject_, max_threads, &error);
+
+ if(error)
+ Glib::Error::throw_exception(error);
+}
+
+int ThreadPool::get_max_threads() const
+{
+ return g_thread_pool_get_max_threads(gobject_);
+}
+
+unsigned int ThreadPool::get_num_threads() const
+{
+ return g_thread_pool_get_num_threads(gobject_);
+}
+
+unsigned int ThreadPool::unprocessed() const
+{
+ return g_thread_pool_unprocessed(gobject_);
+}
+
+bool ThreadPool::get_exclusive() const
+{
+ g_return_val_if_fail(gobject_ != 0, false);
+
+ return gobject_->exclusive;
+}
+
+void ThreadPool::shutdown(bool immediately)
+{
+ if(gobject_)
+ {
+ g_thread_pool_free(gobject_, immediately, 1);
+ gobject_ = 0;
+ }
+
+ if(slot_list_)
+ {
+ slot_list_->lock_and_unlock();
+ delete slot_list_;
+ slot_list_ = 0;
+ }
+}
+
+// static
+void ThreadPool::set_max_unused_threads(int max_threads)
+{
+ g_thread_pool_set_max_unused_threads(max_threads);
+}
+
+// static
+int ThreadPool::get_max_unused_threads()
+{
+ return g_thread_pool_get_max_unused_threads();
+}
+
+// static
+unsigned int ThreadPool::get_num_unused_threads()
+{
+ return g_thread_pool_get_num_unused_threads();
+}
+
+// static
+void ThreadPool::stop_unused_threads()
+{
+ g_thread_pool_stop_unused_threads();
+}
+
+} // namespace Glib
+
diff --git a/libs/glibmm2/glibmm/threadpool.h b/libs/glibmm2/glibmm/threadpool.h
new file mode 100644
index 0000000000..5cff035b8a
--- /dev/null
+++ b/libs/glibmm2/glibmm/threadpool.h
@@ -0,0 +1,183 @@
+// -*- c++ -*-
+#ifndef _GLIBMM_THREADPOOL_H
+#define _GLIBMM_THREADPOOL_H
+
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/thread.h>
+
+extern "C" { typedef struct _GThreadPool GThreadPool; }
+
+
+namespace Glib
+{
+
+/** @defgroup ThreadPools Thread Pools
+ * Pools of threads to execute work concurrently.
+ * @{
+ */
+
+/** A pool of threads to execute work concurrently.
+ */
+class ThreadPool
+{
+public:
+ /** Constructs a new thread pool.
+ * Whenever you call ThreadPool::push(), either a new thread is created or an
+ * unused one is reused. At most @a max_threads threads are running
+ * concurrently for this thread pool. @a max_threads&nbsp;=&nbsp;-1 allows
+ * unlimited threads to be created for this thread pool.
+ *
+ * The parameter @a exclusive determines, whether the thread pool owns all
+ * threads exclusive or whether the threads are shared globally. If @a
+ * exclusive is <tt>true</tt>, @a max_threads threads are started immediately
+ * and they will run exclusively for this thread pool until it is destroyed
+ * by ~ThreadPool(). If @a exclusive is <tt>false</tt>, threads are created
+ * when needed and shared between all non-exclusive thread pools. This
+ * implies that @a max_threads may not be -1 for exclusive thread pools.
+ *
+ * @param max_threads The maximal number of threads to execute concurrently
+ * in the new thread pool, -1 means no limit.
+ * @param exclusive Should this thread pool be exclusive?
+ * @throw Glib::ThreadError An error can only occur when @a exclusive is
+ * set to <tt>true</tt> and not all @a max_threads threads could be created.
+ */
+ explicit ThreadPool(int max_threads = -1, bool exclusive = false);
+ virtual ~ThreadPool();
+
+ /** Inserts @a slot into the list of tasks to be executed by the pool.
+ * When the number of currently running threads is lower than the maximal
+ * allowed number of threads, a new thread is started (or reused). Otherwise
+ * @a slot stays in the queue until a thread in this pool finishes its
+ * previous task and processes @a slot.
+ * @param slot A new task for the thread pool.
+ * @throw Glib::ThreadError An error can only occur when a new thread
+ * couldn't be created. In that case @a slot is simply appended to the
+ * queue of work to do.
+ */
+ void push(const sigc::slot<void>& slot);
+
+ /** Sets the maximal allowed number of threads for the pool.
+ * A value of -1 means that the maximal number of threads is unlimited.
+ * Setting @a max_threads to 0 means stopping all work for pool. It is
+ * effectively frozen until @a max_threads is set to a non-zero value again.
+ *
+ * A thread is never terminated while it is still running. Instead the
+ * maximal number of threads only has effect for the allocation of new
+ * threads in ThreadPool::push(). A new thread is allocated whenever the
+ * number of currently running threads in the pool is smaller than the
+ * maximal number.
+ *
+ * @param max_threads A new maximal number of threads for the pool.
+ * @throw Glib::ThreadError An error can only occur when a new thread
+ * couldn't be created.
+ */
+ void set_max_threads(int max_threads);
+
+ /** Returns the maximal number of threads for the pool.
+ * @return The maximal number of threads.
+ */
+ int get_max_threads() const;
+
+ /** Returns the number of threads currently running in the pool.
+ * @return The number of threads currently running.
+ */
+ unsigned int get_num_threads() const;
+
+ /** Returns the number of tasks still unprocessed in the pool.
+ * @return The number of unprocessed tasks.
+ */
+ unsigned int unprocessed() const;
+
+ /** Returns whether all threads are exclusive to this pool.
+ * @return Whether all threads are exclusive to this pool.
+ */
+ bool get_exclusive() const;
+
+ /** Frees all resources allocated for the pool.
+ * If @a immediately is <tt>true</tt>, no new task is processed. Otherwise the
+ * pool is not freed before the last task is processed. Note however, that no
+ * thread of this pool is interrupted while processing a task. Instead at least
+ * all still running threads can finish their tasks before the pool is freed.
+ *
+ * This method does not return before all tasks to be processed (dependent on
+ * @a immediately, whether all or only the currently running) are ready.
+ * After calling shutdown() the pool must not be used anymore.
+ *
+ * @param immediately Should the pool shut down immediately?
+ */
+ void shutdown(bool immediately = false);
+
+ /** Sets the maximal number of unused threads to @a max_threads.
+ * If @a max_threads is -1, no limit is imposed on the number of unused threads.
+ * @param max_threads Maximal number of unused threads.
+ */
+ static void set_max_unused_threads(int max_threads);
+
+ /** Returns the maximal allowed number of unused threads.
+ * @return The maximal number of unused threads.
+ */
+ static int get_max_unused_threads();
+
+ /** Returns the number of currently unused threads.
+ * @return The number of currently unused threads.
+ */
+ static unsigned int get_num_unused_threads();
+
+ /** Stops all currently unused threads.
+ * This does not change the maximal number of unused threads. This function can
+ * be used to regularly stop all unused threads e.g. from Glib::signal_timeout().
+ */
+ static void stop_unused_threads();
+
+ GThreadPool* gobj() { return gobject_; }
+ const GThreadPool* gobj() const { return gobject_; }
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ class SlotList;
+#endif
+
+private:
+ GThreadPool* gobject_;
+ SlotList* slot_list_;
+
+ ThreadPool(const ThreadPool&);
+ ThreadPool& operator=(const ThreadPool&);
+};
+
+/** @} group ThreadPools */
+
+
+/***************************************************************************/
+/* inline implementation */
+/***************************************************************************/
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+/**** Glib::Private ********************************************************/
+
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+} // namespace Glib
+
+
+#endif /* _GLIBMM_THREADPOOL_H */
+
diff --git a/libs/glibmm2/glibmm/timer.cc b/libs/glibmm2/glibmm/timer.cc
new file mode 100644
index 0000000000..40a7fd35ab
--- /dev/null
+++ b/libs/glibmm2/glibmm/timer.cc
@@ -0,0 +1,72 @@
+// -*- c++ -*-
+/* $Id$ */
+
+/* timer.cc
+ *
+ * Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glib/gtimer.h>
+#include <glibmm/timer.h>
+
+
+namespace Glib
+{
+
+Timer::Timer()
+:
+ gobject_ (g_timer_new())
+{}
+
+Timer::~Timer()
+{
+ g_timer_destroy(gobject_);
+}
+
+void Timer::start()
+{
+ g_timer_start(gobject_);
+}
+
+void Timer::stop()
+{
+ g_timer_stop(gobject_);
+}
+
+void Timer::reset()
+{
+ g_timer_reset(gobject_);
+}
+
+double Timer::elapsed() const
+{
+ return g_timer_elapsed(gobject_, 0);
+}
+
+double Timer::elapsed(unsigned long& microseconds) const
+{
+ return g_timer_elapsed(gobject_, &microseconds);
+}
+
+
+void usleep(unsigned long microseconds)
+{
+ g_usleep(microseconds);
+}
+
+} // namespace Glib
+
diff --git a/libs/glibmm2/glibmm/timer.h b/libs/glibmm2/glibmm/timer.h
new file mode 100644
index 0000000000..a9ac479fbf
--- /dev/null
+++ b/libs/glibmm2/glibmm/timer.h
@@ -0,0 +1,79 @@
+// -*- c++ -*-
+#ifndef _GLIBMM_TIMER_H
+#define _GLIBMM_TIMER_H
+
+/* $Id$ */
+
+/* timer.h
+ *
+ * Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+extern "C" { typedef struct _GTimer GTimer; }
+
+
+namespace Glib
+{
+
+/** Portable stop watch interface.
+ * This resembles a convient and portable timer with microseconds resolution.
+ */
+class Timer
+{
+public:
+ /** Create a new timer.
+ * Also starts timing by calling start() implicitly.
+ */
+ Timer();
+ ~Timer();
+
+ void start();
+ void stop();
+ void reset();
+
+ /** Get the elapsed time.
+ * @return The value in seconds.
+ */
+ double elapsed() const;
+
+ /** Get the elapsed time.
+ * @return The value in seconds. Also fills @p microseconds
+ * with the corresponding @htmlonly&micro;s@endhtmlonly value.
+ */
+ double elapsed(unsigned long& microseconds) const;
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ GTimer* gobj() { return gobject_; }
+ const GTimer* gobj() const { return gobject_; }
+#endif
+
+private:
+ GTimer* gobject_;
+
+ // not copyable
+ Timer(const Timer&);
+ Timer& operator=(const Timer&);
+};
+
+
+void usleep(unsigned long microseconds);
+
+} // namespace Glib
+
+
+#endif /* _GLIBMM_TIMER_H */
+
diff --git a/libs/glibmm2/glibmm/timeval.cc b/libs/glibmm2/glibmm/timeval.cc
new file mode 100644
index 0000000000..6494d0f41d
--- /dev/null
+++ b/libs/glibmm2/glibmm/timeval.cc
@@ -0,0 +1,120 @@
+// -*- c++ -*-
+/* $Id$ */
+
+/* timeval.cc
+ *
+ * Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glib/gmain.h>
+#include <glib/gmessages.h>
+#include <glib/gtimer.h>
+
+#include <glibmm/timeval.h>
+
+
+namespace Glib
+{
+
+void TimeVal::assign_current_time()
+{
+ g_get_current_time(this);
+}
+
+void TimeVal::add(const TimeVal& rhs)
+{
+ g_return_if_fail(tv_usec >= 0 && tv_usec < G_USEC_PER_SEC);
+ g_return_if_fail(rhs.tv_usec >= 0 && rhs.tv_usec < G_USEC_PER_SEC);
+
+ tv_usec += rhs.tv_usec;
+
+ if(tv_usec >= G_USEC_PER_SEC)
+ {
+ tv_usec -= G_USEC_PER_SEC;
+ ++tv_sec;
+ }
+
+ tv_sec += rhs.tv_sec;
+}
+
+void TimeVal::subtract(const TimeVal& rhs)
+{
+ g_return_if_fail(tv_usec >= 0 && tv_usec < G_USEC_PER_SEC);
+ g_return_if_fail(rhs.tv_usec >= 0 && rhs.tv_usec < G_USEC_PER_SEC);
+
+ tv_usec -= rhs.tv_usec;
+
+ if(tv_usec < 0)
+ {
+ tv_usec += G_USEC_PER_SEC;
+ --tv_sec;
+ }
+
+ tv_sec -= rhs.tv_sec;
+}
+
+void TimeVal::add_seconds(long seconds)
+{
+ g_return_if_fail(tv_usec >= 0 && tv_usec < G_USEC_PER_SEC);
+
+ tv_sec += seconds;
+}
+
+void TimeVal::subtract_seconds(long seconds)
+{
+ g_return_if_fail(tv_usec >= 0 && tv_usec < G_USEC_PER_SEC);
+
+ tv_sec -= seconds;
+}
+
+void TimeVal::add_milliseconds(long milliseconds)
+{
+ g_return_if_fail(tv_usec >= 0 && tv_usec < G_USEC_PER_SEC);
+
+ tv_usec += (milliseconds % 1000) * 1000;
+
+ if(tv_usec < 0)
+ {
+ tv_usec += G_USEC_PER_SEC;
+ --tv_sec;
+ }
+ else if(tv_usec >= G_USEC_PER_SEC)
+ {
+ tv_usec -= G_USEC_PER_SEC;
+ ++tv_sec;
+ }
+
+ tv_sec += milliseconds / 1000;
+}
+
+void TimeVal::subtract_milliseconds(long milliseconds)
+{
+ add_milliseconds(-1 * milliseconds);
+}
+
+void TimeVal::add_microseconds(long microseconds)
+{
+ g_time_val_add(this, microseconds);
+}
+
+void TimeVal::subtract_microseconds(long microseconds)
+{
+ g_time_val_add(this, -1 * microseconds);
+}
+
+} // namespace Glib
+
diff --git a/libs/glibmm2/glibmm/timeval.h b/libs/glibmm2/glibmm/timeval.h
new file mode 100644
index 0000000000..f27952c238
--- /dev/null
+++ b/libs/glibmm2/glibmm/timeval.h
@@ -0,0 +1,233 @@
+// -*- c++ -*-
+#ifndef _GLIBMM_TIMEVAL_H
+#define _GLIBMM_TIMEVAL_H
+
+/* $Id$ */
+
+/* timeval.h
+ *
+ * Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glib/gtypes.h>
+#include <glib/gtimer.h>
+
+namespace Glib
+{
+
+/** Glib::TimeVal is a wrapper around the glib structure GTimeVal.
+ * The glib structure GTimeVal itself is equivalent to struct timeval,
+ * which is returned by the gettimeofday() UNIX call. Additionally
+ * this wrapper provides an assortment of time manipulation functions.
+ */
+struct TimeVal : public GTimeVal
+{
+ inline TimeVal();
+ inline TimeVal(long seconds, long microseconds);
+
+ inline TimeVal(const GTimeVal& gtimeval);
+ inline TimeVal& operator=(const GTimeVal& gtimeval);
+
+ /** Assigns the current time to the TimeVal instance.
+ * Equivalent to the UNIX gettimeofday() function, but is portable and
+ * works also on Win32.
+ */
+ void assign_current_time();
+
+ void add(const TimeVal& rhs);
+ void subtract(const TimeVal& rhs);
+ void add_seconds(long seconds);
+ void subtract_seconds(long seconds);
+ void add_milliseconds(long milliseconds);
+ void subtract_milliseconds(long milliseconds);
+ void add_microseconds(long microseconds);
+ void subtract_microseconds(long microseconds);
+
+ inline TimeVal& operator+=(const TimeVal& gtimeval);
+ inline TimeVal& operator-=(const TimeVal& gtimeval);
+ inline TimeVal& operator+=(long seconds);
+ inline TimeVal& operator-=(long seconds);
+
+ /** Returns a double representation of the time interval.
+ * This member function converts the time interval, that is
+ * internally stored as two long values for seconds and microseconds,
+ * to a double representation, whose unit is seconds.
+ */
+ inline double as_double() const;
+
+ inline bool negative() const;
+
+ /** Checks whether the stored time interval is positive.
+ * Returns true if the stored time / time interval is positive.
+ */
+ inline bool valid() const;
+};
+
+inline
+TimeVal::TimeVal()
+{
+ tv_sec = 0;
+ tv_usec = 0;
+}
+
+inline
+TimeVal::TimeVal(long seconds, long microseconds)
+{
+ tv_sec = seconds;
+ tv_usec = microseconds;
+}
+
+inline
+TimeVal::TimeVal(const GTimeVal& gtimeval)
+{
+ tv_sec = gtimeval.tv_sec;
+ tv_usec = gtimeval.tv_usec;
+}
+
+inline
+TimeVal& TimeVal::operator=(const GTimeVal& gtimeval)
+{
+ tv_sec = gtimeval.tv_sec;
+ tv_usec = gtimeval.tv_usec;
+ return *this;
+}
+
+inline
+TimeVal& TimeVal::operator+=(const TimeVal& gtimeval)
+{
+ add(gtimeval);
+
+ return *this;
+}
+
+inline
+TimeVal& TimeVal::operator-=(const TimeVal& gtimeval)
+{
+ subtract(gtimeval);
+
+ return *this;
+}
+
+inline
+TimeVal& TimeVal::operator+=(long seconds)
+{
+ add_seconds(seconds);
+
+ return *this;
+}
+
+inline
+TimeVal& TimeVal::operator-=(long seconds)
+{
+ subtract_seconds(seconds);
+
+ return *this;
+}
+
+inline
+double TimeVal::as_double() const
+{
+ return tv_sec + ((double) tv_usec / (double) G_USEC_PER_SEC);
+}
+
+inline
+bool TimeVal::negative() const
+{
+ return (tv_sec < 0);
+}
+
+inline
+bool TimeVal::valid() const
+{
+ return (tv_usec >= 0 && tv_usec < G_USEC_PER_SEC);
+}
+
+/** @relates Glib::TimeVal */
+inline
+TimeVal operator+(const TimeVal& lhs, const TimeVal& rhs)
+{ return TimeVal(lhs) += rhs; }
+
+/** @relates Glib::TimeVal */
+inline
+TimeVal operator+(const TimeVal& lhs, long seconds)
+{ return TimeVal(lhs) += seconds; }
+
+/** @relates Glib::TimeVal */
+inline
+TimeVal operator-(const TimeVal& lhs, const TimeVal& rhs)
+{ return TimeVal(lhs) -= rhs; }
+
+/** @relates Glib::TimeVal */
+inline
+TimeVal operator-(const TimeVal& lhs, long seconds)
+{ return TimeVal(lhs) -= seconds; }
+
+
+/** @relates Glib::TimeVal */
+inline
+bool operator==(const TimeVal& lhs, const TimeVal& rhs)
+{
+ return (lhs.tv_sec == rhs.tv_sec && lhs.tv_usec == rhs.tv_usec);
+}
+
+/** @relates Glib::TimeVal */
+inline
+bool operator!=(const TimeVal& lhs, const TimeVal& rhs)
+{
+ return (lhs.tv_sec != rhs.tv_sec || lhs.tv_usec != rhs.tv_usec);
+}
+
+/** @relates Glib::TimeVal */
+inline
+bool operator<(const TimeVal& lhs, const TimeVal& rhs)
+{
+ return ((lhs.tv_sec < rhs.tv_sec) ||
+ (lhs.tv_sec == rhs.tv_sec && lhs.tv_usec < rhs.tv_usec));
+}
+
+/** @relates Glib::TimeVal */
+inline
+bool operator>(const TimeVal& lhs, const TimeVal& rhs)
+{
+ return ((lhs.tv_sec > rhs.tv_sec) ||
+ (lhs.tv_sec == rhs.tv_sec && lhs.tv_usec > rhs.tv_usec));
+}
+
+/** @relates Glib::TimeVal */
+inline
+bool operator<=(const TimeVal& lhs, const TimeVal& rhs)
+{
+ return ((lhs.tv_sec < rhs.tv_sec) ||
+ (lhs.tv_sec == rhs.tv_sec && lhs.tv_usec <= rhs.tv_usec));
+}
+
+/** @relates Glib::TimeVal */
+inline
+bool operator>=(const TimeVal& lhs, const TimeVal& rhs)
+{
+ return ((lhs.tv_sec > rhs.tv_sec) ||
+ (lhs.tv_sec == rhs.tv_sec && lhs.tv_usec >= rhs.tv_usec));
+}
+
+} // namespace Glib
+
+
+#endif /* _GLIBMM_TIMEVAL_H */
+
+
+
+
diff --git a/libs/glibmm2/glibmm/unicode.cc b/libs/glibmm2/glibmm/unicode.cc
new file mode 100644
index 0000000000..cb58371dff
--- /dev/null
+++ b/libs/glibmm2/glibmm/unicode.cc
@@ -0,0 +1,33 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <glibmm/unicode.h>
+#include <glibmm/private/unicode_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/unicode.h>
+
+
+namespace
+{
+} // anonymous namespace
+
+
diff --git a/libs/glibmm2/glibmm/unicode.h b/libs/glibmm2/glibmm/unicode.h
new file mode 100644
index 0000000000..fd2f68a798
--- /dev/null
+++ b/libs/glibmm2/glibmm/unicode.h
@@ -0,0 +1,311 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GLIBMM_UNICODE_H
+#define _GLIBMM_UNICODE_H
+
+
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#include <glib/gmacros.h>
+#include <glib/gstrfuncs.h>
+#include <glib/gunicode.h>
+
+// Not used, but we want to get rid of possible <ctype.h> macros.
+#include <cctype>
+
+#undef isalnum
+#undef isalpha
+#undef iscntrl
+#undef isdigit
+#undef isgraph
+#undef islower
+#undef isprint
+#undef ispunct
+#undef isspace
+#undef isupper
+#undef isxdigit
+#undef istitle
+#undef isdefined
+#undef iswide
+#undef toupper
+#undef tolower
+#undef totitle
+
+
+namespace Glib
+{
+
+/** @addtogroup glibmmEnums Enums and Flags */
+
+/**
+ * @ingroup glibmmEnums
+ */
+enum UnicodeType
+{
+ UNICODE_CONTROL,
+ UNICODE_FORMAT,
+ UNICODE_UNASSIGNED,
+ UNICODE_PRIVATE_USE,
+ UNICODE_SURROGATE,
+ UNICODE_LOWERCASE_LETTER,
+ UNICODE_MODIFIER_LETTER,
+ UNICODE_OTHER_LETTER,
+ UNICODE_TITLECASE_LETTER,
+ UNICODE_UPPERCASE_LETTER,
+ UNICODE_COMBINING_MARK,
+ UNICODE_ENCLOSING_MARK,
+ UNICODE_NON_SPACING_MARK,
+ UNICODE_DECIMAL_NUMBER,
+ UNICODE_LETTER_NUMBER,
+ UNICODE_OTHER_NUMBER,
+ UNICODE_CONNECT_PUNCTUATION,
+ UNICODE_DASH_PUNCTUATION,
+ UNICODE_CLOSE_PUNCTUATION,
+ UNICODE_FINAL_PUNCTUATION,
+ UNICODE_INITIAL_PUNCTUATION,
+ UNICODE_OTHER_PUNCTUATION,
+ UNICODE_OPEN_PUNCTUATION,
+ UNICODE_CURRENCY_SYMBOL,
+ UNICODE_MODIFIER_SYMBOL,
+ UNICODE_MATH_SYMBOL,
+ UNICODE_OTHER_SYMBOL,
+ UNICODE_LINE_SEPARATOR,
+ UNICODE_PARAGRAPH_SEPARATOR,
+ UNICODE_SPACE_SEPARATOR
+};
+
+
+/**
+ * @ingroup glibmmEnums
+ */
+enum UnicodeBreakType
+{
+ UNICODE_BREAK_MANDATORY,
+ UNICODE_BREAK_CARRIAGE_RETURN,
+ UNICODE_BREAK_LINE_FEED,
+ UNICODE_BREAK_COMBINING_MARK,
+ UNICODE_BREAK_SURROGATE,
+ UNICODE_BREAK_ZERO_WIDTH_SPACE,
+ UNICODE_BREAK_INSEPARABLE,
+ UNICODE_BREAK_NON_BREAKING_GLUE,
+ UNICODE_BREAK_CONTINGENT,
+ UNICODE_BREAK_SPACE,
+ UNICODE_BREAK_AFTER,
+ UNICODE_BREAK_BEFORE,
+ UNICODE_BREAK_BEFORE_AND_AFTER,
+ UNICODE_BREAK_HYPHEN,
+ UNICODE_BREAK_NON_STARTER,
+ UNICODE_BREAK_OPEN_PUNCTUATION,
+ UNICODE_BREAK_CLOSE_PUNCTUATION,
+ UNICODE_BREAK_QUOTATION,
+ UNICODE_BREAK_EXCLAMATION,
+ UNICODE_BREAK_IDEOGRAPHIC,
+ UNICODE_BREAK_NUMERIC,
+ UNICODE_BREAK_INFIX_SEPARATOR,
+ UNICODE_BREAK_SYMBOL,
+ UNICODE_BREAK_ALPHABETIC,
+ UNICODE_BREAK_PREFIX,
+ UNICODE_BREAK_POSTFIX,
+ UNICODE_BREAK_COMPLEX_CONTEXT,
+ UNICODE_BREAK_AMBIGUOUS,
+ UNICODE_BREAK_UNKNOWN,
+ UNICODE_BREAK_NEXT_LINE,
+ UNICODE_BREAK_WORD_JOINER
+};
+
+
+/**
+ * @ingroup glibmmEnums
+ * @par Bitwise operators:
+ * <tt>%AsciiType operator|(AsciiType, AsciiType)</tt><br>
+ * <tt>%AsciiType operator&(AsciiType, AsciiType)</tt><br>
+ * <tt>%AsciiType operator^(AsciiType, AsciiType)</tt><br>
+ * <tt>%AsciiType operator~(AsciiType)</tt><br>
+ * <tt>%AsciiType& operator|=(AsciiType&, AsciiType)</tt><br>
+ * <tt>%AsciiType& operator&=(AsciiType&, AsciiType)</tt><br>
+ * <tt>%AsciiType& operator^=(AsciiType&, AsciiType)</tt><br>
+ */
+enum AsciiType
+{
+ ASCII_ALNUM = 1 << 0,
+ ASCII_ALPHA = 1 << 1,
+ ASCII_CNTRL = 1 << 2,
+ ASCII_DIGIT = 1 << 3,
+ ASCII_GRAPH = 1 << 4,
+ ASCII_LOWER = 1 << 5,
+ ASCII_PRINT = 1 << 6,
+ ASCII_PUNCT = 1 << 7,
+ ASCII_SPACE = 1 << 8,
+ ASCII_UPPER = 1 << 9,
+ ASCII_XDIGIT = 1 << 10
+};
+
+/** @ingroup glibmmEnums */
+inline AsciiType operator|(AsciiType lhs, AsciiType rhs)
+ { return static_cast<AsciiType>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
+
+/** @ingroup glibmmEnums */
+inline AsciiType operator&(AsciiType lhs, AsciiType rhs)
+ { return static_cast<AsciiType>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
+
+/** @ingroup glibmmEnums */
+inline AsciiType operator^(AsciiType lhs, AsciiType rhs)
+ { return static_cast<AsciiType>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
+
+/** @ingroup glibmmEnums */
+inline AsciiType operator~(AsciiType flags)
+ { return static_cast<AsciiType>(~static_cast<unsigned>(flags)); }
+
+/** @ingroup glibmmEnums */
+inline AsciiType& operator|=(AsciiType& lhs, AsciiType rhs)
+ { return (lhs = static_cast<AsciiType>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
+
+/** @ingroup glibmmEnums */
+inline AsciiType& operator&=(AsciiType& lhs, AsciiType rhs)
+ { return (lhs = static_cast<AsciiType>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
+
+/** @ingroup glibmmEnums */
+inline AsciiType& operator^=(AsciiType& lhs, AsciiType rhs)
+ { return (lhs = static_cast<AsciiType>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
+
+
+/**
+ * @ingroup glibmmEnums
+ */
+enum NormalizeMode
+{
+ NORMALIZE_DEFAULT,
+ NORMALIZE_NFD,
+ NORMALIZE_DEFAULT_COMPOSE,
+ NORMALIZE_NFC = NORMALIZE_DEFAULT_COMPOSE,
+ NORMALIZE_ALL,
+ NORMALIZE_NFKD = NORMALIZE_ALL,
+ NORMALIZE_ALL_COMPOSE,
+ NORMALIZE_NFKC = NORMALIZE_ALL_COMPOSE
+};
+
+
+/** @defgroup Unicode Unicode Manipulation
+ * Functions operating on Unicode characters and UTF-8 strings.
+ * @{
+ */
+
+namespace Unicode
+{
+
+inline bool validate(gunichar uc)
+ { return (g_unichar_validate(uc) != 0); }
+inline bool isalnum(gunichar uc)
+ { return (g_unichar_isalnum(uc) != 0); }
+inline bool isalpha(gunichar uc)
+ { return (g_unichar_isalpha(uc) != 0); }
+inline bool iscntrl(gunichar uc)
+ { return (g_unichar_iscntrl(uc) != 0); }
+inline bool isdigit(gunichar uc)
+ { return (g_unichar_isdigit(uc) != 0); }
+inline bool isgraph(gunichar uc)
+ { return (g_unichar_isgraph(uc) != 0); }
+inline bool islower(gunichar uc)
+ { return (g_unichar_islower(uc) != 0); }
+inline bool isprint(gunichar uc)
+ { return (g_unichar_isprint(uc) != 0); }
+inline bool ispunct(gunichar uc)
+ { return (g_unichar_ispunct(uc) != 0); }
+inline bool isspace(gunichar uc)
+ { return (g_unichar_isspace(uc) != 0); }
+inline bool isupper(gunichar uc)
+ { return (g_unichar_isupper(uc) != 0); }
+inline bool isxdigit(gunichar uc)
+ { return (g_unichar_isxdigit(uc) != 0); }
+inline bool istitle(gunichar uc)
+ { return (g_unichar_istitle(uc) != 0); }
+inline bool isdefined(gunichar uc)
+ { return (g_unichar_isdefined(uc) != 0); }
+inline bool iswide(gunichar uc)
+ { return (g_unichar_iswide(uc) != 0); }
+
+inline gunichar toupper(gunichar uc)
+ { return g_unichar_toupper(uc); }
+inline gunichar tolower(gunichar uc)
+ { return g_unichar_tolower(uc); }
+inline gunichar totitle(gunichar uc)
+ { return g_unichar_totitle(uc); }
+
+inline int digit_value(gunichar uc)
+ { return g_unichar_digit_value(uc); }
+inline int xdigit_value(gunichar uc)
+ { return g_unichar_xdigit_value(uc); }
+
+inline Glib::UnicodeType type(gunichar uc)
+ { return static_cast<Glib::UnicodeType>(static_cast<int>(g_unichar_type(uc))); }
+
+inline Glib::UnicodeBreakType break_type(gunichar uc)
+ { return static_cast<Glib::UnicodeBreakType>(static_cast<int>(g_unichar_break_type(uc))); }
+
+} // namespace Unicode
+
+
+namespace Ascii
+{
+
+inline bool isalnum(char c)
+ { return g_ascii_isalnum(c); }
+inline bool isalpha(char c)
+ { return g_ascii_isalpha(c); }
+inline bool iscntrl(char c)
+ { return g_ascii_iscntrl(c); }
+inline bool isdigit(char c)
+ { return g_ascii_isdigit(c); }
+inline bool isgraph(char c)
+ { return g_ascii_isgraph(c); }
+inline bool islower(char c)
+ { return g_ascii_islower(c); }
+inline bool isprint(char c)
+ { return g_ascii_isprint(c); }
+inline bool ispunct(char c)
+ { return g_ascii_ispunct(c); }
+inline bool isspace(char c)
+ { return g_ascii_isspace(c); }
+inline bool isupper(char c)
+ { return g_ascii_isupper(c); }
+inline bool isxdigit(char c)
+ { return g_ascii_isxdigit(c); }
+
+inline char tolower(char c)
+ { return g_ascii_tolower(c); }
+inline char toupper(char c)
+ { return g_ascii_toupper(c); }
+
+inline int digit_value(char c)
+ { return g_ascii_digit_value(c); }
+inline int xdigit_value(char c)
+ { return g_ascii_xdigit_value(c); }
+
+} // namespace Ascii
+
+
+/** @} group Unicode */
+
+} // namespace Glib
+
+
+#endif /* _GLIBMM_UNICODE_H */
+
diff --git a/libs/glibmm2/glibmm/ustring.cc b/libs/glibmm2/glibmm/ustring.cc
new file mode 100644
index 0000000000..76e8d01438
--- /dev/null
+++ b/libs/glibmm2/glibmm/ustring.cc
@@ -0,0 +1,1207 @@
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/ustring.h>
+#include <glibmm/convert.h>
+#include <glibmm/error.h>
+#include <glibmm/utility.h>
+
+#include <algorithm>
+#include <iostream>
+
+#include <glibmmconfig.h>
+GLIBMM_USING_STD(find)
+
+
+namespace
+{
+
+using Glib::ustring;
+
+// Little helper to make the conversion from gunichar to UTF-8 a one-liner.
+//
+struct UnicharToUtf8
+{
+ char buf[6];
+ ustring::size_type len;
+
+ explicit UnicharToUtf8(gunichar uc)
+ : len (g_unichar_to_utf8(uc, buf)) {}
+};
+
+
+// All utf8_*_offset() functions return npos if offset is out of range.
+// The caller should decide if npos is a valid argument and just marks
+// the whole string, or if it is not allowed (e.g. for start positions).
+// In the latter case std::out_of_range should be thrown, but usually
+// std::string will do that for us.
+
+// First overload: stop on '\0' character.
+//
+static ustring::size_type utf8_byte_offset(const char* str, ustring::size_type offset)
+{
+ if(offset == ustring::npos)
+ return ustring::npos;
+
+ const char *const utf8_skip = g_utf8_skip;
+ const char* p = str;
+
+ for(; offset != 0; --offset)
+ {
+ const unsigned int c = static_cast<unsigned char>(*p);
+
+ if(c == 0)
+ return ustring::npos;
+
+ p += utf8_skip[c];
+ }
+
+ return (p - str);
+}
+
+// Second overload: stop when reaching maxlen.
+//
+static ustring::size_type utf8_byte_offset(const char* str, ustring::size_type offset,
+ ustring::size_type maxlen)
+{
+ if(offset == ustring::npos)
+ return ustring::npos;
+
+ const char *const utf8_skip = g_utf8_skip;
+ const char *const pend = str + maxlen;
+ const char* p = str;
+
+ for(; offset != 0; --offset)
+ {
+ if(p >= pend)
+ return ustring::npos;
+
+ p += utf8_skip[static_cast<unsigned char>(*p)];
+ }
+
+ return (p - str);
+}
+
+// Third overload: stop when reaching str.size().
+//
+inline
+ustring::size_type utf8_byte_offset(const std::string& str, ustring::size_type offset)
+{
+ return utf8_byte_offset(str.data(), offset, str.size());
+}
+
+// Takes UTF-8 character offset and count in ci and cn.
+// Returns the byte offset and count in i and n.
+//
+struct Utf8SubstrBounds
+{
+ ustring::size_type i;
+ ustring::size_type n;
+
+ Utf8SubstrBounds(const std::string& str, ustring::size_type ci, ustring::size_type cn)
+ :
+ i (utf8_byte_offset(str, ci)),
+ n (ustring::npos)
+ {
+ if(i != ustring::npos)
+ n = utf8_byte_offset(str.data() + i, cn, str.size() - i);
+ }
+};
+
+// Converts byte offset to UTF-8 character offset.
+inline
+ustring::size_type utf8_char_offset(const std::string& str, ustring::size_type offset)
+{
+ if(offset == ustring::npos)
+ return ustring::npos;
+
+ const char *const pdata = str.data();
+ return g_utf8_pointer_to_offset(pdata, pdata + offset);
+}
+
+
+// Helper to implement ustring::find_first_of() and find_first_not_of().
+// Returns the UTF-8 character offset, or ustring::npos if not found.
+//
+ustring::size_type utf8_find_first_of(const std::string& str, ustring::size_type offset,
+ const char* utf8_match, long utf8_match_size,
+ bool find_not_of)
+{
+ const ustring::size_type byte_offset = utf8_byte_offset(str, offset);
+ if(byte_offset == ustring::npos)
+ return ustring::npos;
+
+ long ucs4_match_size = 0;
+ const Glib::ScopedPtr<gunichar> ucs4_match
+ (g_utf8_to_ucs4_fast(utf8_match, utf8_match_size, &ucs4_match_size));
+
+ const gunichar *const match_begin = ucs4_match.get();
+ const gunichar *const match_end = match_begin + ucs4_match_size;
+
+ const char *const str_begin = str.data();
+ const char *const str_end = str_begin + str.size();
+
+ for(const char* pstr = str_begin + byte_offset;
+ pstr < str_end;
+ pstr = g_utf8_next_char(pstr))
+ {
+ const gunichar *const pfound = std::find(match_begin, match_end, g_utf8_get_char(pstr));
+
+ if((pfound != match_end) != find_not_of)
+ return offset;
+
+ ++offset;
+ }
+
+ return ustring::npos;
+}
+
+// Helper to implement ustring::find_last_of() and find_last_not_of().
+// Returns the UTF-8 character offset, or ustring::npos if not found.
+//
+ustring::size_type utf8_find_last_of(const std::string& str, ustring::size_type offset,
+ const char* utf8_match, long utf8_match_size,
+ bool find_not_of)
+{
+ long ucs4_match_size = 0;
+ const Glib::ScopedPtr<gunichar> ucs4_match
+ (g_utf8_to_ucs4_fast(utf8_match, utf8_match_size, &ucs4_match_size));
+
+ const gunichar *const match_begin = ucs4_match.get();
+ const gunichar *const match_end = match_begin + ucs4_match_size;
+
+ const char *const str_begin = str.data();
+ const char* pstr = str_begin;
+
+ // Set pstr one byte beyond the actual start position.
+ const ustring::size_type byte_offset = utf8_byte_offset(str, offset);
+ pstr += (byte_offset < str.size()) ? byte_offset + 1 : str.size();
+
+ while(pstr > str_begin)
+ {
+ // Move to previous character.
+ do --pstr; while((*pstr & '\xC0') == '\x80');
+
+ const gunichar *const pfound = std::find(match_begin, match_end, g_utf8_get_char(pstr));
+
+ if((pfound != match_end) != find_not_of)
+ return g_utf8_pointer_to_offset(str_begin, pstr);
+ }
+
+ return ustring::npos;
+}
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+#ifndef GLIBMM_HAVE_ALLOWS_STATIC_INLINE_NPOS
+// Initialize static member here,
+// because the compiler did not allow us do it inline.
+const ustring::size_type ustring::npos = std::string::npos;
+#endif
+
+// We need our own version of g_utf8_get_char(), because the std::string
+// iterator is not necessarily a plain pointer (it's in fact not in GCC's
+// libstdc++-v3). Copying the UTF-8 data into a temporary buffer isn't an
+// option since this operation is quite time critical. The implementation
+// is quite different from g_utf8_get_char() -- both more generic and faster.
+//
+// By looking at the first byte of a UTF-8 character one can determine the
+// number of bytes used. GLib offers the g_utf8_skip[] array for this purpose,
+// but accessing this global variable would introduce a function call to fetch
+// the Global Offset Table, plus two levels of indirection in order to read the
+// value. Even worse, fetching the GOT is always done right at the start of
+// the function instead of the branch that actually uses the variable.
+//
+// Fortunately, there's a better way to get the byte count. As this table
+// shows, there's a nice regular pattern in the UTF-8 encoding scheme:
+//
+// 0x00000000 - 0x0000007F: 0xxxxxxx
+// 0x00000080 - 0x000007FF: 110xxxxx 10xxxxxx
+// 0x00000800 - 0x0000FFFF: 1110xxxx 10xxxxxx 10xxxxxx
+// 0x00010000 - 0x001FFFFF: 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
+// 0x00200000 - 0x03FFFFFF: 111110xx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx
+// 0x04000000 - 0x7FFFFFFF: 1111110x 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx 10xxxxxx
+//
+// Except for the single byte case, the number of leading 1-bits equals the
+// byte count. All that is needed is to shift the first byte to the left
+// until bit 7 becomes 0. Naturally, doing so requires a loop -- but since
+// we already have one, no additional cost is introduced. This shifting can
+// further be combined with the computation of the bitmask needed to eliminate
+// the leading length bits, thus saving yet another register.
+//
+gunichar get_unichar_from_std_iterator(std::string::const_iterator pos)
+{
+ unsigned int result = static_cast<unsigned char>(*pos);
+
+ if((result & 0x80) != 0)
+ {
+ unsigned int mask = 0x40;
+
+ // This loop may look somewhat strange, but this happens to be the
+ // one variant g++ 3.3 generates optimum code for. (In particular,
+ // the unconditional break avoids counterproductive loop alignment.)
+ for(++pos;; ++pos)
+ {
+ mask <<= 5;
+ const unsigned int c = static_cast<unsigned char>(*pos);
+ result = (result << 6) + c - 0x80;
+
+ if((result & mask) != 0)
+ continue;
+ break;
+ }
+
+ result &= --mask;
+ }
+
+ return result;
+}
+
+
+/**** Glib::ustring ********************************************************/
+
+ustring::ustring()
+:
+ string_ ()
+{}
+
+ustring::ustring(const ustring& other)
+:
+ string_ (other.string_)
+{}
+
+ustring::ustring(const ustring& src, ustring::size_type i, ustring::size_type n)
+:
+ string_ ()
+{
+ const Utf8SubstrBounds bounds (src.string_, i, n);
+ string_.assign(src.string_, bounds.i, bounds.n);
+}
+
+ustring::ustring(const char* src, ustring::size_type n)
+:
+ string_ (src, utf8_byte_offset(src, n))
+{}
+
+ustring::ustring(const char* src)
+:
+ string_ (src)
+{}
+
+ustring::ustring(ustring::size_type n, gunichar uc)
+:
+ string_ ()
+{
+ if(uc < 0x80)
+ {
+ // Optimize the probably most common case.
+ string_.assign(n, static_cast<char>(uc));
+ }
+ else
+ {
+ const UnicharToUtf8 conv (uc);
+ string_.reserve(n * conv.len);
+
+ for(; n > 0; --n)
+ string_.append(conv.buf, conv.len);
+ }
+}
+
+ustring::ustring(ustring::size_type n, char c)
+:
+ string_ (n, c)
+{}
+
+ustring::ustring(const std::string& src)
+:
+ string_ (src)
+{}
+
+ustring::~ustring()
+{}
+
+void ustring::swap(ustring& other)
+{
+ string_.swap(other.string_);
+}
+
+
+/**** Glib::ustring::operator=() *******************************************/
+
+ustring& ustring::operator=(const ustring& other)
+{
+ string_ = other.string_;
+ return *this;
+}
+
+ustring& ustring::operator=(const std::string& src)
+{
+ string_ = src;
+ return *this;
+}
+
+ustring& ustring::operator=(const char* src)
+{
+ string_ = src;
+ return *this;
+}
+
+ustring& ustring::operator=(gunichar uc)
+{
+ const UnicharToUtf8 conv (uc);
+ string_.assign(conv.buf, conv.len);
+ return *this;
+}
+
+ustring& ustring::operator=(char c)
+{
+ string_ = c;
+ return *this;
+}
+
+
+/**** Glib::ustring::assign() **********************************************/
+
+ustring& ustring::assign(const ustring& src)
+{
+ string_ = src.string_;
+ return *this;
+}
+
+ustring& ustring::assign(const ustring& src, ustring::size_type i, ustring::size_type n)
+{
+ const Utf8SubstrBounds bounds (src.string_, i, n);
+ string_.assign(src.string_, bounds.i, bounds.n);
+ return *this;
+}
+
+ustring& ustring::assign(const char* src, ustring::size_type n)
+{
+ string_.assign(src, utf8_byte_offset(src, n));
+ return *this;
+}
+
+ustring& ustring::assign(const char* src)
+{
+ string_ = src;
+ return *this;
+}
+
+ustring& ustring::assign(ustring::size_type n, gunichar uc)
+{
+ ustring temp (n, uc);
+ string_.swap(temp.string_);
+ return *this;
+}
+
+ustring& ustring::assign(ustring::size_type n, char c)
+{
+ string_.assign(n, c);
+ return *this;
+}
+
+
+/**** Glib::ustring::operator+=() ******************************************/
+
+ustring& ustring::operator+=(const ustring& src)
+{
+ string_ += src.string_;
+ return *this;
+}
+
+ustring& ustring::operator+=(const char* src)
+{
+ string_ += src;
+ return *this;
+}
+
+ustring& ustring::operator+=(gunichar uc)
+{
+ const UnicharToUtf8 conv (uc);
+ string_.append(conv.buf, conv.len);
+ return *this;
+}
+
+ustring& ustring::operator+=(char c)
+{
+ string_ += c;
+ return *this;
+}
+
+
+/**** Glib::ustring::push_back() *******************************************/
+
+void ustring::push_back(gunichar uc)
+{
+ const UnicharToUtf8 conv (uc);
+ string_.append(conv.buf, conv.len);
+}
+
+void ustring::push_back(char c)
+{
+ string_ += c;
+}
+
+
+/**** Glib::ustring::append() **********************************************/
+
+ustring& ustring::append(const ustring& src)
+{
+ string_ += src.string_;
+ return *this;
+}
+
+ustring& ustring::append(const ustring& src, ustring::size_type i, ustring::size_type n)
+{
+ const Utf8SubstrBounds bounds (src.string_, i, n);
+ string_.append(src.string_, bounds.i, bounds.n);
+ return *this;
+}
+
+ustring& ustring::append(const char* src, ustring::size_type n)
+{
+ string_.append(src, utf8_byte_offset(src, n));
+ return *this;
+}
+
+ustring& ustring::append(const char* src)
+{
+ string_ += src;
+ return *this;
+}
+
+ustring& ustring::append(ustring::size_type n, gunichar uc)
+{
+ string_.append(ustring(n, uc).string_);
+ return *this;
+}
+
+ustring& ustring::append(ustring::size_type n, char c)
+{
+ string_.append(n, c);
+ return *this;
+}
+
+
+/**** Glib::ustring::insert() **********************************************/
+
+ustring& ustring::insert(ustring::size_type i, const ustring& src)
+{
+ string_.insert(utf8_byte_offset(string_, i), src.string_);
+ return *this;
+}
+
+ustring& ustring::insert(ustring::size_type i, const ustring& src,
+ ustring::size_type i2, ustring::size_type n)
+{
+ const Utf8SubstrBounds bounds2 (src.string_, i2, n);
+ string_.insert(utf8_byte_offset(string_, i), src.string_, bounds2.i, bounds2.n);
+ return *this;
+}
+
+ustring& ustring::insert(ustring::size_type i, const char* src, ustring::size_type n)
+{
+ string_.insert(utf8_byte_offset(string_, i), src, utf8_byte_offset(src, n));
+ return *this;
+}
+
+ustring& ustring::insert(ustring::size_type i, const char* src)
+{
+ string_.insert(utf8_byte_offset(string_, i), src);
+ return *this;
+}
+
+ustring& ustring::insert(ustring::size_type i, ustring::size_type n, gunichar uc)
+{
+ string_.insert(utf8_byte_offset(string_, i), ustring(n, uc).string_);
+ return *this;
+}
+
+ustring& ustring::insert(ustring::size_type i, ustring::size_type n, char c)
+{
+ string_.insert(utf8_byte_offset(string_, i), n, c);
+ return *this;
+}
+
+ustring::iterator ustring::insert(ustring::iterator p, gunichar uc)
+{
+ const size_type offset = p.base() - string_.begin();
+ const UnicharToUtf8 conv (uc);
+ string_.insert(offset, conv.buf, conv.len);
+ return iterator(string_.begin() + offset);
+}
+
+ustring::iterator ustring::insert(ustring::iterator p, char c)
+{
+ return iterator(string_.insert(p.base(), c));
+}
+
+void ustring::insert(ustring::iterator p, ustring::size_type n, gunichar uc)
+{
+ string_.insert(p.base() - string_.begin(), ustring(n, uc).string_);
+}
+
+void ustring::insert(ustring::iterator p, ustring::size_type n, char c)
+{
+ string_.insert(p.base(), n, c);
+}
+
+
+/**** Glib::ustring::replace() *********************************************/
+
+ustring& ustring::replace(ustring::size_type i, ustring::size_type n, const ustring& src)
+{
+ const Utf8SubstrBounds bounds (string_, i, n);
+ string_.replace(bounds.i, bounds.n, src.string_);
+ return *this;
+}
+
+ustring& ustring::replace(ustring::size_type i, ustring::size_type n,
+ const ustring& src, ustring::size_type i2, ustring::size_type n2)
+{
+ const Utf8SubstrBounds bounds (string_, i, n);
+ const Utf8SubstrBounds bounds2 (src.string_, i2, n2);
+ string_.replace(bounds.i, bounds.n, src.string_, bounds2.i, bounds2.n);
+ return *this;
+}
+
+ustring& ustring::replace(ustring::size_type i, ustring::size_type n,
+ const char* src, ustring::size_type n2)
+{
+ const Utf8SubstrBounds bounds (string_, i, n);
+ string_.replace(bounds.i, bounds.n, src, utf8_byte_offset(src, n2));
+ return *this;
+}
+
+ustring& ustring::replace(ustring::size_type i, ustring::size_type n, const char* src)
+{
+ const Utf8SubstrBounds bounds (string_, i, n);
+ string_.replace(bounds.i, bounds.n, src);
+ return *this;
+}
+
+ustring& ustring::replace(ustring::size_type i, ustring::size_type n,
+ ustring::size_type n2, gunichar uc)
+{
+ const Utf8SubstrBounds bounds (string_, i, n);
+ string_.replace(bounds.i, bounds.n, ustring(n2, uc).string_);
+ return *this;
+}
+
+ustring& ustring::replace(ustring::size_type i, ustring::size_type n,
+ ustring::size_type n2, char c)
+{
+ const Utf8SubstrBounds bounds (string_, i, n);
+ string_.replace(bounds.i, bounds.n, n2, c);
+ return *this;
+}
+
+ustring& ustring::replace(ustring::iterator pbegin, ustring::iterator pend, const ustring& src)
+{
+ string_.replace(pbegin.base(), pend.base(), src.string_);
+ return *this;
+}
+
+ustring& ustring::replace(ustring::iterator pbegin, ustring::iterator pend,
+ const char* src, ustring::size_type n)
+{
+ string_.replace(pbegin.base(), pend.base(), src, utf8_byte_offset(src, n));
+ return *this;
+}
+
+ustring& ustring::replace(ustring::iterator pbegin, ustring::iterator pend, const char* src)
+{
+ string_.replace(pbegin.base(), pend.base(), src);
+ return *this;
+}
+
+ustring& ustring::replace(ustring::iterator pbegin, ustring::iterator pend,
+ ustring::size_type n, gunichar uc)
+{
+ string_.replace(pbegin.base(), pend.base(), ustring(n, uc).string_);
+ return *this;
+}
+
+ustring& ustring::replace(ustring::iterator pbegin, ustring::iterator pend,
+ ustring::size_type n, char c)
+{
+ string_.replace(pbegin.base(), pend.base(), n, c);
+ return *this;
+}
+
+
+/**** Glib::ustring::erase() ***********************************************/
+
+void ustring::clear()
+{
+ string_.erase();
+}
+
+ustring& ustring::erase(ustring::size_type i, ustring::size_type n)
+{
+ const Utf8SubstrBounds bounds (string_, i, n);
+ string_.erase(bounds.i, bounds.n);
+ return *this;
+}
+
+ustring& ustring::erase()
+{
+ string_.erase();
+ return *this;
+}
+
+ustring::iterator ustring::erase(ustring::iterator p)
+{
+ return iterator(string_.erase(p.base()));
+}
+
+ustring::iterator ustring::erase(ustring::iterator pbegin, ustring::iterator pend)
+{
+ return iterator(string_.erase(pbegin.base(), pend.base()));
+}
+
+
+/**** Glib::ustring::compare() *********************************************/
+
+int ustring::compare(const ustring& rhs) const
+{
+ return g_utf8_collate(string_.c_str(), rhs.string_.c_str());
+}
+
+int ustring::compare(const char* rhs) const
+{
+ return g_utf8_collate(string_.c_str(), rhs);
+}
+
+int ustring::compare(ustring::size_type i, ustring::size_type n, const ustring& rhs) const
+{
+ return ustring(*this, i, n).compare(rhs);
+}
+
+int ustring::compare(ustring::size_type i, ustring::size_type n,
+ const ustring& rhs, ustring::size_type i2, ustring::size_type n2) const
+{
+ return ustring(*this, i, n).compare(ustring(rhs, i2, n2));
+}
+
+int ustring::compare(ustring::size_type i, ustring::size_type n,
+ const char* rhs, ustring::size_type n2) const
+{
+ return ustring(*this, i, n).compare(ustring(rhs, n2));
+}
+
+int ustring::compare(ustring::size_type i, ustring::size_type n, const char* rhs) const
+{
+ return ustring(*this, i, n).compare(rhs);
+}
+
+
+/**** Glib::ustring -- index access ****************************************/
+
+ustring::value_type ustring::operator[](ustring::size_type i) const
+{
+ return g_utf8_get_char(g_utf8_offset_to_pointer(string_.data(), i));
+}
+
+ustring::value_type ustring::at(ustring::size_type i) const
+{
+ const size_type byte_offset = utf8_byte_offset(string_, i);
+
+ // Throws std::out_of_range if the index is invalid.
+ return g_utf8_get_char(&string_.at(byte_offset));
+}
+
+
+/**** Glib::ustring -- iterator access *************************************/
+
+ustring::iterator ustring::begin()
+{
+ return iterator(string_.begin());
+}
+
+ustring::iterator ustring::end()
+{
+ return iterator(string_.end());
+}
+
+ustring::const_iterator ustring::begin() const
+{
+ return const_iterator(string_.begin());
+}
+
+ustring::const_iterator ustring::end() const
+{
+ return const_iterator(string_.end());
+}
+
+ustring::reverse_iterator ustring::rbegin()
+{
+ return reverse_iterator(iterator(string_.end()));
+}
+
+ustring::reverse_iterator ustring::rend()
+{
+ return reverse_iterator(iterator(string_.begin()));
+}
+
+ustring::const_reverse_iterator ustring::rbegin() const
+{
+ return const_reverse_iterator(const_iterator(string_.end()));
+}
+
+ustring::const_reverse_iterator ustring::rend() const
+{
+ return const_reverse_iterator(const_iterator(string_.begin()));
+}
+
+
+/**** Glib::ustring::find() ************************************************/
+
+ustring::size_type ustring::find(const ustring& str, ustring::size_type i) const
+{
+ return utf8_char_offset(string_, string_.find(str.string_, utf8_byte_offset(string_, i)));
+}
+
+ustring::size_type ustring::find(const char* str, ustring::size_type i, ustring::size_type n) const
+{
+ return utf8_char_offset(string_, string_.find(str, utf8_byte_offset(string_, i),
+ utf8_byte_offset(str, n)));
+}
+
+ustring::size_type ustring::find(const char* str, ustring::size_type i) const
+{
+ return utf8_char_offset(string_, string_.find(str, utf8_byte_offset(string_, i)));
+}
+
+ustring::size_type ustring::find(gunichar uc, ustring::size_type i) const
+{
+ const UnicharToUtf8 conv (uc);
+ return utf8_char_offset(string_, string_.find(conv.buf, utf8_byte_offset(string_, i), conv.len));
+}
+
+ustring::size_type ustring::find(char c, ustring::size_type i) const
+{
+ return utf8_char_offset(string_, string_.find(c, utf8_byte_offset(string_, i)));
+}
+
+
+/**** Glib::ustring::rfind() ***********************************************/
+
+ustring::size_type ustring::rfind(const ustring& str, ustring::size_type i) const
+{
+ return utf8_char_offset(string_, string_.rfind(str.string_, utf8_byte_offset(string_, i)));
+}
+
+ustring::size_type ustring::rfind(const char* str, ustring::size_type i,
+ ustring::size_type n) const
+{
+ return utf8_char_offset(string_, string_.rfind(str, utf8_byte_offset(string_, i),
+ utf8_byte_offset(str, n)));
+}
+
+ustring::size_type ustring::rfind(const char* str, ustring::size_type i) const
+{
+ return utf8_char_offset(string_, string_.rfind(str, utf8_byte_offset(string_, i)));
+}
+
+ustring::size_type ustring::rfind(gunichar uc, ustring::size_type i) const
+{
+ const UnicharToUtf8 conv (uc);
+ return utf8_char_offset(string_, string_.rfind(conv.buf, utf8_byte_offset(string_, i), conv.len));
+}
+
+ustring::size_type ustring::rfind(char c, ustring::size_type i) const
+{
+ return utf8_char_offset(string_, string_.rfind(c, utf8_byte_offset(string_, i)));
+}
+
+
+/**** Glib::ustring::find_first_of() ***************************************/
+
+ustring::size_type ustring::find_first_of(const ustring& match, ustring::size_type i) const
+{
+ return utf8_find_first_of(string_, i, match.string_.data(), match.string_.size(), false);
+}
+
+ustring::size_type ustring::find_first_of(const char* match,
+ ustring::size_type i, ustring::size_type n) const
+{
+ return utf8_find_first_of(string_, i, match, n, false);
+}
+
+ustring::size_type ustring::find_first_of(const char* match, ustring::size_type i) const
+{
+ return utf8_find_first_of(string_, i, match, -1, false);
+}
+
+ustring::size_type ustring::find_first_of(gunichar uc, ustring::size_type i) const
+{
+ return find(uc, i);
+}
+
+ustring::size_type ustring::find_first_of(char c, ustring::size_type i) const
+{
+ return find(c, i);
+}
+
+
+/**** Glib::ustring::find_last_of() ****************************************/
+
+ustring::size_type ustring::find_last_of(const ustring& match, ustring::size_type i) const
+{
+ return utf8_find_last_of(string_, i, match.string_.data(), match.string_.size(), false);
+}
+
+ustring::size_type ustring::find_last_of(const char* match,
+ ustring::size_type i, ustring::size_type n) const
+{
+ return utf8_find_last_of(string_, i, match, n, false);
+}
+
+ustring::size_type ustring::find_last_of(const char* match, ustring::size_type i) const
+{
+ return utf8_find_last_of(string_, i, match, -1, false);
+}
+
+ustring::size_type ustring::find_last_of(gunichar uc, ustring::size_type i) const
+{
+ return rfind(uc, i);
+}
+
+ustring::size_type ustring::find_last_of(char c, ustring::size_type i) const
+{
+ return rfind(c, i);
+}
+
+
+/**** Glib::ustring::find_first_not_of() ***********************************/
+
+ustring::size_type ustring::find_first_not_of(const ustring& match, ustring::size_type i) const
+{
+ return utf8_find_first_of(string_, i, match.string_.data(), match.string_.size(), true);
+}
+
+ustring::size_type ustring::find_first_not_of(const char* match,
+ ustring::size_type i, ustring::size_type n) const
+{
+ return utf8_find_first_of(string_, i, match, n, true);
+}
+
+ustring::size_type ustring::find_first_not_of(const char* match, ustring::size_type i) const
+{
+ return utf8_find_first_of(string_, i, match, -1, true);
+}
+
+// Unfortunately, all of the find_*_not_of() methods for single
+// characters need their own special implementation.
+//
+ustring::size_type ustring::find_first_not_of(gunichar uc, ustring::size_type i) const
+{
+ const size_type bi = utf8_byte_offset(string_, i);
+ if(bi != npos)
+ {
+ const char *const pbegin = string_.data();
+ const char *const pend = pbegin + string_.size();
+
+ for(const char* p = pbegin + bi;
+ p < pend;
+ p = g_utf8_next_char(p), ++i)
+ {
+ if(g_utf8_get_char(p) != uc)
+ return i;
+ }
+ }
+ return npos;
+}
+
+ustring::size_type ustring::find_first_not_of(char c, ustring::size_type i) const
+{
+ const size_type bi = utf8_byte_offset(string_, i);
+ if(bi != npos)
+ {
+ const char *const pbegin = string_.data();
+ const char *const pend = pbegin + string_.size();
+
+ for(const char* p = pbegin + bi;
+ p < pend;
+ p = g_utf8_next_char(p), ++i)
+ {
+ if(*p != c)
+ return i;
+ }
+ }
+ return npos;
+}
+
+
+/**** Glib::ustring::find_last_not_of() ************************************/
+
+ustring::size_type ustring::find_last_not_of(const ustring& match, ustring::size_type i) const
+{
+ return utf8_find_last_of(string_, i, match.string_.data(), match.string_.size(), true);
+}
+
+ustring::size_type ustring::find_last_not_of(const char* match,
+ ustring::size_type i, ustring::size_type n) const
+{
+ return utf8_find_last_of(string_, i, match, n, true);
+}
+
+ustring::size_type ustring::find_last_not_of(const char* match, ustring::size_type i) const
+{
+ return utf8_find_last_of(string_, i, match, -1, true);
+}
+
+// Unfortunately, all of the find_*_not_of() methods for single
+// characters need their own special implementation.
+//
+ustring::size_type ustring::find_last_not_of(gunichar uc, ustring::size_type i) const
+{
+ const char *const pbegin = string_.data();
+ const char *const pend = pbegin + string_.size();
+ size_type i_cur = 0;
+ size_type i_found = npos;
+
+ for(const char* p = pbegin;
+ p < pend && i_cur <= i;
+ p = g_utf8_next_char(p), ++i_cur)
+ {
+ if(g_utf8_get_char(p) != uc)
+ i_found = i_cur;
+ }
+ return i_found;
+}
+
+ustring::size_type ustring::find_last_not_of(char c, ustring::size_type i) const
+{
+ const char *const pbegin = string_.data();
+ const char *const pend = pbegin + string_.size();
+ size_type i_cur = 0;
+ size_type i_found = npos;
+
+ for(const char* p = pbegin;
+ p < pend && i_cur <= i;
+ p = g_utf8_next_char(p), ++i_cur)
+ {
+ if(*p != c)
+ i_found = i_cur;
+ }
+ return i_found;
+}
+
+
+/**** Glib::ustring -- get size and resize *********************************/
+
+bool ustring::empty() const
+{
+ return string_.empty();
+}
+
+ustring::size_type ustring::size() const
+{
+ const char *const pdata = string_.data();
+ return g_utf8_pointer_to_offset(pdata, pdata + string_.size());
+}
+
+ustring::size_type ustring::length() const
+{
+ const char *const pdata = string_.data();
+ return g_utf8_pointer_to_offset(pdata, pdata + string_.size());
+}
+
+ustring::size_type ustring::bytes() const
+{
+ return string_.size();
+}
+
+ustring::size_type ustring::capacity() const
+{
+ return string_.capacity();
+}
+
+ustring::size_type ustring::max_size() const
+{
+ return string_.max_size();
+}
+
+void ustring::resize(ustring::size_type n, gunichar uc)
+{
+ const size_type size_now = size();
+ if(n < size_now)
+ erase(n, npos);
+ else if(n > size_now)
+ append(n - size_now, uc);
+}
+
+void ustring::resize(ustring::size_type n, char c)
+{
+ const size_type size_now = size();
+ if(n < size_now)
+ erase(n, npos);
+ else if(n > size_now)
+ string_.append(n - size_now, c);
+}
+
+void ustring::reserve(ustring::size_type n)
+{
+ string_.reserve(n);
+}
+
+
+/**** Glib::ustring -- C string access *************************************/
+
+const char* ustring::data() const
+{
+ return string_.data();
+}
+
+const char* ustring::c_str() const
+{
+ return string_.c_str();
+}
+
+// Note that copy() requests UTF-8 character offsets as
+// parameters, but returns the number of copied bytes.
+//
+ustring::size_type ustring::copy(char* dest, ustring::size_type n, ustring::size_type i) const
+{
+ const Utf8SubstrBounds bounds (string_, i, n);
+ return string_.copy(dest, bounds.n, bounds.i);
+}
+
+
+/**** Glib::ustring -- UTF-8 utilities *************************************/
+
+bool ustring::validate() const
+{
+ return (g_utf8_validate(string_.data(), string_.size(), 0) != 0);
+}
+
+bool ustring::validate(ustring::iterator& first_invalid)
+{
+ const char *const pdata = string_.data();
+ const char* valid_end = pdata;
+ const int is_valid = g_utf8_validate(pdata, string_.size(), &valid_end);
+
+ first_invalid = iterator(string_.begin() + (valid_end - pdata));
+ return (is_valid != 0);
+}
+
+bool ustring::validate(ustring::const_iterator& first_invalid) const
+{
+ const char *const pdata = string_.data();
+ const char* valid_end = pdata;
+ const int is_valid = g_utf8_validate(pdata, string_.size(), &valid_end);
+
+ first_invalid = const_iterator(string_.begin() + (valid_end - pdata));
+ return (is_valid != 0);
+}
+
+bool ustring::is_ascii() const
+{
+ const char* p = string_.data();
+ const char *const pend = p + string_.size();
+
+ for(; p != pend; ++p)
+ {
+ if((*p & '\x80') != 0)
+ return false;
+ }
+
+ return true;
+}
+
+ustring ustring::normalize(NormalizeMode mode) const
+{
+ const ScopedPtr<char> buf (g_utf8_normalize(string_.data(), string_.size(),
+ static_cast<GNormalizeMode>(int(mode))));
+ return ustring(buf.get());
+}
+
+ustring ustring::uppercase() const
+{
+ const ScopedPtr<char> buf (g_utf8_strup(string_.data(), string_.size()));
+ return ustring(buf.get());
+}
+
+ustring ustring::lowercase() const
+{
+ const ScopedPtr<char> buf (g_utf8_strdown(string_.data(), string_.size()));
+ return ustring(buf.get());
+}
+
+ustring ustring::casefold() const
+{
+ const ScopedPtr<char> buf (g_utf8_casefold(string_.data(), string_.size()));
+ return ustring(buf.get());
+}
+
+std::string ustring::collate_key() const
+{
+ const ScopedPtr<char> buf (g_utf8_collate_key(string_.data(), string_.size()));
+ return std::string(buf.get());
+}
+
+std::string ustring::casefold_collate_key() const
+{
+ char *const casefold_buf = g_utf8_casefold(string_.data(), string_.size());
+ char *const key_buf = g_utf8_collate_key(casefold_buf, -1);
+ g_free(casefold_buf);
+ return std::string(ScopedPtr<char>(key_buf).get());
+}
+
+
+/**** Glib::ustring::SequenceToString **************************************/
+
+ustring::SequenceToString<Glib::ustring::iterator,gunichar>
+ ::SequenceToString(Glib::ustring::iterator pbegin, Glib::ustring::iterator pend)
+:
+ std::string(pbegin.base(), pend.base())
+{}
+
+ustring::SequenceToString<Glib::ustring::const_iterator,gunichar>
+ ::SequenceToString(Glib::ustring::const_iterator pbegin, Glib::ustring::const_iterator pend)
+:
+ std::string(pbegin.base(), pend.base())
+{}
+
+
+/**** Glib::ustring -- stream I/O operators ********************************/
+
+std::istream& operator>>(std::istream& is, Glib::ustring& utf8_string)
+{
+ std::string locale_string;
+ is >> locale_string;
+ utf8_string = Glib::locale_to_utf8(locale_string);
+ return is;
+}
+
+std::ostream& operator<<(std::ostream& os, const Glib::ustring& utf8_string)
+{
+ os << Glib::locale_from_utf8(utf8_string);
+ return os;
+}
+
+} // namespace Glib
+
diff --git a/libs/glibmm2/glibmm/ustring.h b/libs/glibmm2/glibmm/ustring.h
new file mode 100644
index 0000000000..86578b43bb
--- /dev/null
+++ b/libs/glibmm2/glibmm/ustring.h
@@ -0,0 +1,997 @@
+// -*- c++ -*-
+#ifndef _GLIBMM_USTRING_H
+#define _GLIBMM_USTRING_H
+
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glib/gmacros.h>
+#include <glib/gunicode.h>
+#include <glibmm/unicode.h>
+
+#include <iosfwd>
+#include <iterator>
+#include <string>
+
+#include <glibmmconfig.h>
+GLIBMM_USING_STD(bidirectional_iterator_tag)
+GLIBMM_USING_STD(reverse_iterator)
+GLIBMM_USING_STD(string)
+GLIBMM_USING_STD(istream)
+GLIBMM_USING_STD(ostream)
+
+#ifdef GLIBMM_HAVE_STD_ITERATOR_TRAITS
+GLIBMM_USING_STD(iterator_traits)
+#else
+#include <cstddef> /* for ptrdiff_t */
+GLIBMM_USING_STD(random_access_iterator_tag)
+#endif
+
+
+namespace Glib
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+#ifndef GLIBMM_HAVE_STD_ITERATOR_TRAITS
+
+template <class T>
+struct IteratorTraits
+{
+ typedef typename T::iterator_category iterator_category;
+ typedef typename T::value_type value_type;
+ typedef typename T::difference_type difference_type;
+ typedef typename T::pointer pointer;
+ typedef typename T::reference reference;
+};
+
+template <class T>
+struct IteratorTraits<T*>
+{
+ typedef std::random_access_iterator_tag iterator_category;
+ typedef T value_type;
+ typedef ptrdiff_t difference_type;
+ typedef T* pointer;
+ typedef T& reference;
+};
+
+template <class T>
+struct IteratorTraits<const T*>
+{
+ typedef std::random_access_iterator_tag iterator_category;
+ typedef T value_type;
+ typedef ptrdiff_t difference_type;
+ typedef const T* pointer;
+ typedef const T& reference;
+};
+
+#endif /* GLIBMM_HAVE_STD_ITERATOR_TRAITS */
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+/** The iterator type of Glib::ustring.
+ * Note this is not a random access iterator but a bidirectional one,
+ * since all index operations need to iterate over the UTF-8 data. Use
+ * std::advance() to move to a certain position. However, all of the
+ * relational operators are available:
+ * <tt>==&nbsp;!=&nbsp;<&nbsp;>&nbsp;<=&nbsp;>=</tt>
+ *
+ * A writeable iterator isn't provided because: The number of bytes of
+ * the old UTF-8 character and the new one to write could be different.
+ * Therefore, any write operation would invalidate all other iterators
+ * pointing into the same string.
+ */
+template <class T>
+class ustring_Iterator
+{
+public:
+ typedef std::bidirectional_iterator_tag iterator_category;
+ typedef gunichar value_type;
+ typedef std::string::difference_type difference_type;
+ typedef value_type reference;
+ typedef void pointer;
+
+ inline ustring_Iterator();
+ inline ustring_Iterator(const ustring_Iterator<std::string::iterator>& other);
+
+ inline value_type operator*() const;
+
+ inline ustring_Iterator<T> & operator++();
+ inline const ustring_Iterator<T> operator++(int);
+ inline ustring_Iterator<T> & operator--();
+ inline const ustring_Iterator<T> operator--(int);
+
+ explicit inline ustring_Iterator(T pos);
+ inline T base() const;
+
+private:
+ T pos_;
+};
+
+
+/** Extract a UCS-4 character from UTF-8 data.
+ * Convert a single UTF-8 (multibyte) character starting at @p pos to
+ * a UCS-4 wide character. This may read up to 6 bytes after the start
+ * position, depending on the UTF-8 character width. You have to make
+ * sure the source contains at least one valid UTF-8 character.
+ *
+ * This is mainly used by the implementation of Glib::ustring::iterator,
+ * but it might be useful as utility function if you prefer using
+ * std::string even for UTF-8 encoding.
+ */
+gunichar get_unichar_from_std_iterator(std::string::const_iterator pos) G_GNUC_PURE;
+
+
+/** Glib::ustring has much the same interface as std::string, but contains
+ * %Unicode characters encoded as UTF-8.
+ *
+ * @par About UTF-8 and ASCII
+ * @par
+ * The standard character set ANSI_X3.4-1968&nbsp;-- more commonly known as
+ * ASCII&nbsp;-- is a subset of UTF-8. So, if you want to, you can use
+ * Glib::ustring without even thinking about UTF-8.
+ * @par
+ * Whenever ASCII is mentioned in this manual, we mean the @em real ASCII
+ * (i.e. as defined in ANSI_X3.4-1968), which contains only 7-bit characters.
+ * Glib::ustring can @em not be used with ASCII-compatible extended 8-bit
+ * charsets like ISO-8859-1. It's a good idea to avoid string literals
+ * containing non-ASCII characters (e.g. German umlauts) in source code,
+ * or at least you should use UTF-8 literals.
+ * @par
+ * You can find a detailed UTF-8 and %Unicode FAQ here:
+ * http://www.cl.cam.ac.uk/~mgk25/unicode.html
+ *
+ * @par Glib::ustring vs. std::string
+ * @par
+ * Glib::ustring has implicit type conversions to and from std::string.
+ * These conversions do @em not convert to/from the current locale (see
+ * Glib::locale_from_utf8() and Glib::locale_to_utf8() if you need that). You
+ * can always use std::string instead of Glib::ustring&nbsp;-- however, using
+ * std::string with multi-byte characters is quite hard. For instance,
+ * <tt>std::string::operator[]</tt> might return a byte in the middle of a
+ * character, and <tt>std::string::length()</tt> returns the number of bytes
+ * rather than characters. So don't do that without a good reason.
+ * @par
+ * In a perfect world the C++ Standard Library would contain a UTF-8 string
+ * class. Unfortunately, the C++ standard doesn't mention UTF-8 at all. Note
+ * that std::wstring is not a UTF-8 string class because it contains only
+ * fixed-width characters (where width could be 32, 16, or even 8 bits).
+ *
+ * @par Glib::ustring and stream input/output
+ * @par
+ * The stream I/O operators, that is operator<<() and operator>>(), perform
+ * implicit charset conversion to/from the current locale. If that's not
+ * what you intented (e.g. when writing to a configuration file that should
+ * always be UTF-8 encoded) use ustring::raw() to override this behaviour.
+ * @par
+ * If you're using std::ostringstream to build strings for display in the
+ * user interface, you must convert the result back to UTF-8 as shown below:
+ * @code
+ * std::ostringstream output;
+ * output.imbue(std::locale("")); // use the user's locale for this stream
+ * output << percentage << " % done";
+ * label->set_text(Glib::locale_to_utf8(output.str()));
+ * @endcode
+ *
+ * @par Implementation notes
+ * @par
+ * Glib::ustring does not inherit from std::string, because std::string was
+ * intended to be a final class. For instance, it does not have a virtual
+ * destructor. Also, a HAS-A relationship is more appropriate because
+ * ustring can't just enhance the std::string interface. Rather, it has to
+ * reimplement the interface so that all operations are based on characters
+ * instead of bytes.
+ */
+class ustring
+{
+public:
+ typedef std::string::size_type size_type;
+ typedef std::string::difference_type difference_type;
+
+ typedef gunichar value_type;
+ typedef gunichar & reference;
+ typedef const gunichar & const_reference;
+
+ typedef ustring_Iterator<std::string::iterator> iterator;
+ typedef ustring_Iterator<std::string::const_iterator> const_iterator;
+
+#ifndef GLIBMM_HAVE_SUN_REVERSE_ITERATOR
+
+ typedef std::reverse_iterator<iterator> reverse_iterator;
+ typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
+
+#else
+
+ typedef std::reverse_iterator<iterator,
+ iterator::iterator_category,
+ iterator::value_type,
+ iterator::reference,
+ iterator::pointer,
+ iterator::difference_type> reverse_iterator;
+ typedef std::reverse_iterator<const_iterator,
+ const_iterator::iterator_category,
+ const_iterator::value_type,
+ const_iterator::reference,
+ const_iterator::pointer,
+ const_iterator::difference_type> const_reverse_iterator;
+
+#endif /* GLIBMM_HAVE_SUN_REVERSE_ITERATOR */
+
+#ifdef GLIBMM_HAVE_ALLOWS_STATIC_INLINE_NPOS
+ static const size_type npos = std::string::npos;
+#else
+ //The IRIX MipsPro compiler says "The indicated constant value is not known",
+ //so we need to initalize the static member data elsewhere.
+ static const size_type npos;
+#endif
+
+ /*! Default constructor, which creates an empty string.
+ */
+ ustring();
+
+ ~ustring();
+
+ /*! Construct a ustring as a copy of another ustring.
+ * @param other A source string.
+ */
+ ustring(const ustring& other);
+
+ /*! Assign the value of another string to this string.
+ * @param other A source string.
+ */
+ ustring& operator=(const ustring& other);
+
+ /*! Swap contents with another string.
+ * @param other String to swap with.
+ */
+ void swap(ustring& other);
+
+ /*! Construct a ustring as a copy of another std::string.
+ * @param src A source <tt>std::string</tt> containing text encoded as UTF-8.
+ */
+ ustring(const std::string& src);
+
+ /*! Construct a ustring as a copy of a substring.
+ * @param src %Source ustring.
+ * @param i Index of first character to copy from.
+ * @param n Number of characters to copy (defaults to copying the remainder).
+ */
+ ustring(const ustring& src, size_type i, size_type n=npos);
+
+ /*! Construct a ustring as a partial copy of a C string.
+ * @param src %Source C string encoded as UTF-8.
+ * @param n Number of characters to copy.
+ */
+ ustring(const char* src, size_type n);
+
+ /*! Construct a ustring as a copy of a C string.
+ * @param src %Source C string encoded as UTF-8.
+ */
+ ustring(const char* src);
+
+ /*! Construct a ustring as multiple characters.
+ * @param n Number of characters.
+ * @param uc UCS-4 code point to use.
+ */
+ ustring(size_type n, gunichar uc);
+
+ /*! Construct a ustring as multiple characters.
+ * @param n Number of characters.
+ * @param c ASCII character to use.
+ */
+ ustring(size_type n, char c);
+
+ /*! Construct a ustring as a copy of a range.
+ * @param pbegin Start of range.
+ * @param pend End of range.
+ */
+ template <class In> ustring(In pbegin, In pend);
+
+
+//! @name Assign new contents.
+//! @{
+
+ ustring& operator=(const std::string& src);
+ ustring& operator=(const char* src);
+ ustring& operator=(gunichar uc);
+ ustring& operator=(char c);
+
+ ustring& assign(const ustring& src);
+ ustring& assign(const ustring& src, size_type i, size_type n);
+ ustring& assign(const char* src, size_type n);
+ ustring& assign(const char* src);
+ ustring& assign(size_type n, gunichar uc);
+ ustring& assign(size_type n, char c);
+ template <class In> ustring& assign(In pbegin, In pend);
+
+//! @}
+//! @name Append to the string.
+//! @{
+
+ ustring& operator+=(const ustring& src);
+ ustring& operator+=(const char* src);
+ ustring& operator+=(gunichar uc);
+ ustring& operator+=(char c);
+ void push_back(gunichar uc);
+ void push_back(char c);
+
+ ustring& append(const ustring& src);
+ ustring& append(const ustring& src, size_type i, size_type n);
+ ustring& append(const char* src, size_type n);
+ ustring& append(const char* src);
+ ustring& append(size_type n, gunichar uc);
+ ustring& append(size_type n, char c);
+ template <class In> ustring& append(In pbegin, In pend);
+
+//! @}
+//! @name Insert into the string.
+//! @{
+
+ ustring& insert(size_type i, const ustring& src);
+ ustring& insert(size_type i, const ustring& src, size_type i2, size_type n);
+ ustring& insert(size_type i, const char* src, size_type n);
+ ustring& insert(size_type i, const char* src);
+ ustring& insert(size_type i, size_type n, gunichar uc);
+ ustring& insert(size_type i, size_type n, char c);
+
+ iterator insert(iterator p, gunichar uc);
+ iterator insert(iterator p, char c);
+ void insert(iterator p, size_type n, gunichar uc);
+ void insert(iterator p, size_type n, char c);
+ template <class In> void insert(iterator p, In pbegin, In pend);
+
+//! @}
+//! @name Replace sub-strings.
+//! @{
+
+ ustring& replace(size_type i, size_type n, const ustring& src);
+ ustring& replace(size_type i, size_type n, const ustring& src, size_type i2, size_type n2);
+ ustring& replace(size_type i, size_type n, const char* src, size_type n2);
+ ustring& replace(size_type i, size_type n, const char* src);
+ ustring& replace(size_type i, size_type n, size_type n2, gunichar uc);
+ ustring& replace(size_type i, size_type n, size_type n2, char c);
+
+ ustring& replace(iterator pbegin, iterator pend, const ustring& src);
+ ustring& replace(iterator pbegin, iterator pend, const char* src, size_type n);
+ ustring& replace(iterator pbegin, iterator pend, const char* src);
+ ustring& replace(iterator pbegin, iterator pend, size_type n, gunichar uc);
+ ustring& replace(iterator pbegin, iterator pend, size_type n, char c);
+ template <class In> ustring& replace(iterator pbegin, iterator pend, In pbegin2, In pend2);
+
+//! @}
+//! @name Erase sub-strings.
+//! @{
+
+ void clear();
+ ustring& erase(size_type i, size_type n=npos);
+ ustring& erase();
+ iterator erase(iterator p);
+ iterator erase(iterator pbegin, iterator pend);
+
+//! @}
+//! @name Compare and collate.
+//! @{
+
+ int compare(const ustring& rhs) const;
+ int compare(const char* rhs) const;
+ int compare(size_type i, size_type n, const ustring& rhs) const;
+ int compare(size_type i, size_type n, const ustring& rhs, size_type i2, size_type n2) const;
+ int compare(size_type i, size_type n, const char* rhs, size_type n2) const;
+ int compare(size_type i, size_type n, const char* rhs) const;
+
+ /*! Create a unique sorting key for the UTF-8 string. If you need to
+ * compare UTF-8 strings regularly, e.g. for sorted containers such as
+ * <tt>std::set<></tt>, you should consider creating a collate key first
+ * and compare this key instead of the actual string.
+ *
+ * The ustring::compare() methods as well as the relational operators
+ * <tt>==&nbsp;!=&nbsp;<&nbsp;>&nbsp;<=&nbsp;>=</tt> are quite costly
+ * because they have to deal with %Unicode and the collation rules defined by
+ * the current locale. Converting both operands to UCS-4 is just the first
+ * of several costly steps involved when comparing ustrings. So be careful.
+ */
+ std::string collate_key() const;
+
+ /*! Create a unique key for the UTF-8 string that can be used for caseless
+ * sorting. <tt>ustr.casefold_collate_key()</tt> results in the same string
+ * as <tt>ustr.casefold().collate_key()</tt>, but the former is likely more
+ * efficient.
+ */
+ std::string casefold_collate_key() const;
+
+//! @}
+//! @name Extract characters and sub-strings.
+//! @{
+
+ /*! No reference return; use replace() to write characters. */
+ value_type operator[](size_type i) const;
+
+ /*! No reference return; use replace() to write characters. @throw std::out_of_range */
+ value_type at(size_type i) const;
+
+ inline ustring substr(size_type i=0, size_type n=npos) const;
+
+//! @}
+//! @name Access a sequence of characters.
+//! @{
+
+ iterator begin();
+ iterator end();
+ const_iterator begin() const;
+ const_iterator end() const;
+ reverse_iterator rbegin();
+ reverse_iterator rend();
+ const_reverse_iterator rbegin() const;
+ const_reverse_iterator rend() const;
+
+//! @}
+//! @name Find sub-strings.
+//! @{
+
+ size_type find(const ustring& str, size_type i=0) const;
+ size_type find(const char* str, size_type i, size_type n) const;
+ size_type find(const char* str, size_type i=0) const;
+ size_type find(gunichar uc, size_type i=0) const;
+ size_type find(char c, size_type i=0) const;
+
+ size_type rfind(const ustring& str, size_type i=npos) const;
+ size_type rfind(const char* str, size_type i, size_type n) const;
+ size_type rfind(const char* str, size_type i=npos) const;
+ size_type rfind(gunichar uc, size_type i=npos) const;
+ size_type rfind(char c, size_type i=npos) const;
+
+//! @}
+//! @name Match against a set of characters.
+//! @{
+
+ size_type find_first_of(const ustring& match, size_type i=0) const;
+ size_type find_first_of(const char* match, size_type i, size_type n) const;
+ size_type find_first_of(const char* match, size_type i=0) const;
+ size_type find_first_of(gunichar uc, size_type i=0) const;
+ size_type find_first_of(char c, size_type i=0) const;
+
+ size_type find_last_of(const ustring& match, size_type i=npos) const;
+ size_type find_last_of(const char* match, size_type i, size_type n) const;
+ size_type find_last_of(const char* match, size_type i=npos) const;
+ size_type find_last_of(gunichar uc, size_type i=npos) const;
+ size_type find_last_of(char c, size_type i=npos) const;
+
+ size_type find_first_not_of(const ustring& match, size_type i=0) const;
+ size_type find_first_not_of(const char* match, size_type i, size_type n) const;
+ size_type find_first_not_of(const char* match, size_type i=0) const;
+ size_type find_first_not_of(gunichar uc, size_type i=0) const;
+ size_type find_first_not_of(char c, size_type i=0) const;
+
+ size_type find_last_not_of(const ustring& match, size_type i=npos) const;
+ size_type find_last_not_of(const char* match, size_type i, size_type n) const;
+ size_type find_last_not_of(const char* match, size_type i=npos) const;
+ size_type find_last_not_of(gunichar uc, size_type i=npos) const;
+ size_type find_last_not_of(char c, size_type i=npos) const;
+
+//! @}
+//! @name Retrieve the string's size.
+//! @{
+
+ /** Returns true if the string is empty. Equivalent to *this == "".
+ * @result Whether the string is empty.
+ */
+ bool empty() const;
+
+ /** Returns the number of characters in the string, not including any null-termination.
+ * @result The number of UTF-8 characters.
+ *
+ * @see bytes(), empty()
+ */
+ size_type size() const;
+
+ //We have length() as well as size(), because std::string has both.
+
+ /** This is the same as size().
+ */
+ size_type length() const;
+
+ /** Returns the number of bytes in the string, not including any null-termination.
+ * @result The number of bytes.
+ *
+ * @see size(), empty()
+ */
+ size_type bytes() const;
+
+//! @}
+//! @name Change the string's size.
+//! @{
+
+ void resize(size_type n, gunichar uc);
+ void resize(size_type n, char c='\0');
+
+//! @}
+//! @name Control the allocated memory.
+//! @{
+
+ size_type capacity() const;
+ size_type max_size() const;
+ void reserve(size_type n=0);
+
+//! @}
+//! @name Get a per-byte representation of the string.
+//! @{
+
+ inline operator std::string() const; // e.g. std::string str = ustring();
+ inline const std::string& raw() const;
+
+ // Not necessarily an ASCII char*. Use g_utf8_*() where necessary.
+ const char* data() const;
+ const char* c_str() const;
+
+ /*! @return Number of copied @em bytes, not characters. */
+ size_type copy(char* dest, size_type n, size_type i=0) const;
+
+//! @}
+//! @name UTF-8 utilities.
+//! @{
+
+ /*! Check whether the string is valid UTF-8. */
+ bool validate() const;
+
+ /*! Check whether the string is valid UTF-8. */
+ bool validate(iterator& first_invalid);
+
+ /*! Check whether the string is valid UTF-8. */
+ bool validate(const_iterator& first_invalid) const;
+
+ /*! Check whether the string is plain 7-bit ASCII. @par
+ * Unlike any other ustring method, is_ascii() is safe to use on invalid
+ * UTF-8 strings. If the string isn't valid UTF-8, it cannot be valid
+ * ASCII either, therefore is_ascii() will just return @c false then.
+ * @return Whether the string contains only ASCII characters.
+ */
+ bool is_ascii() const;
+
+ /*! "Normalize" the %Unicode character representation of the string. */
+ ustring normalize(NormalizeMode mode = NORMALIZE_DEFAULT_COMPOSE) const;
+
+//! @}
+//! @name Character case conversion.
+//! @{
+
+ /*! Returns a new UTF-8 string with all characters characters converted to
+ * their lowercase equivalent, while honoring the current locale. The
+ * resulting string may change in the number of bytes as well as in the
+ * number of characters. For instance, the German sharp&nbsp;s
+ * <tt>&quot;&szlig;&quot;</tt> will be replaced by two characters
+ * <tt>"SS"</tt> because there is no capital <tt>&quot;&szlig;&quot;</tt>.
+ */
+ ustring uppercase() const;
+
+ /*! Returns a new UTF-8 string with all characters characters converted to
+ * their lowercase equivalent, while honoring the current locale. The
+ * resulting string may change in the number of bytes as well as in the
+ * number of characters.
+ */
+ ustring lowercase() const;
+
+ /*! Returns a caseless representation of the UTF-8 string. The resulting
+ * string doesn't correspond to any particular case, therefore the result
+ * is only useful to compare strings and should never be displayed to the
+ * user.
+ */
+ ustring casefold() const;
+
+//! @}
+
+private:
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+#ifdef GLIBMM_HAVE_STD_ITERATOR_TRAITS
+ template <class In, class ValueType = typename std::iterator_traits<In>::value_type>
+#else
+ template <class In, class ValueType = typename Glib::IteratorTraits<In>::value_type>
+#endif
+ struct SequenceToString;
+
+ //The Tru64 compiler needs these partial specializations to be declared here,
+ //as well as defined later. That's probably correct. murrayc.
+ template <class In>
+ struct SequenceToString<In, char>;
+
+ template <class In>
+ struct SequenceToString<In, gunichar>;
+
+ /*
+ template <>
+ struct ustring::SequenceToString<Glib::ustring::iterator, gunichar>;
+
+ template <>
+ struct ustring::SequenceToString<Glib::ustring::const_iterator, gunichar>;
+ */
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ std::string string_;
+};
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+template <class In, class ValueType>
+struct ustring::SequenceToString
+{};
+
+template <class In>
+struct ustring::SequenceToString<In, char> : public std::string
+{
+ SequenceToString(In pbegin, In pend);
+};
+
+template <class In>
+struct ustring::SequenceToString<In, gunichar> : public std::string
+{
+ SequenceToString(In pbegin, In pend);
+};
+
+template <>
+struct ustring::SequenceToString<Glib::ustring::iterator, gunichar> : public std::string
+{
+ SequenceToString(Glib::ustring::iterator pbegin, Glib::ustring::iterator pend);
+};
+
+template <>
+struct ustring::SequenceToString<Glib::ustring::const_iterator, gunichar> : public std::string
+{
+ SequenceToString(Glib::ustring::const_iterator pbegin, Glib::ustring::const_iterator pend);
+};
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+/** Stream input operator.
+ * @relates Glib::ustring
+ * @throw Glib::ConvertError
+ */
+std::istream& operator>>(std::istream& is, Glib::ustring& utf8_string);
+
+/** Stream output operator.
+ * @relates Glib::ustring
+ * @throw Glib::ConvertError
+ */
+std::ostream& operator<<(std::ostream& os, const Glib::ustring& utf8_string);
+
+
+/***************************************************************************/
+/* Inline implementation */
+/***************************************************************************/
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+/**** Glib::ustring_Iterator<> *********************************************/
+
+template <class T> inline
+ustring_Iterator<T>::ustring_Iterator(T pos)
+:
+ pos_ (pos)
+{}
+
+template <class T> inline
+T ustring_Iterator<T>::base() const
+{
+ return pos_;
+}
+
+template <class T> inline
+ustring_Iterator<T>::ustring_Iterator()
+:
+ pos_ ()
+{}
+
+template <class T> inline
+ustring_Iterator<T>::ustring_Iterator(const ustring_Iterator<std::string::iterator>& other)
+:
+ pos_ (other.base())
+{}
+
+template <class T> inline
+typename ustring_Iterator<T>::value_type ustring_Iterator<T>::operator*() const
+{
+ return Glib::get_unichar_from_std_iterator(pos_);
+}
+
+template <class T> inline
+ustring_Iterator<T>& ustring_Iterator<T>::operator++()
+{
+ pos_ += g_utf8_skip[static_cast<unsigned char>(*pos_)];
+ return *this;
+}
+
+template <class T> inline
+const ustring_Iterator<T> ustring_Iterator<T>::operator++(int)
+{
+ const ustring_Iterator<T> temp (*this);
+ this->operator++();
+ return temp;
+}
+
+template <class T> inline
+ustring_Iterator<T>& ustring_Iterator<T>::operator--()
+{
+ do --pos_; while((*pos_ & '\xC0') == '\x80');
+ return *this;
+}
+
+template <class T> inline
+const ustring_Iterator<T> ustring_Iterator<T>::operator--(int)
+{
+ const ustring_Iterator<T> temp (*this);
+ this->operator--();
+ return temp;
+}
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+/** @relates Glib::ustring_Iterator */
+template <class T> inline
+bool operator==(const ustring_Iterator<T>& lhs, const ustring_Iterator<T>& rhs)
+{
+ return (lhs.base() == rhs.base());
+}
+
+/** @relates Glib::ustring_Iterator */
+template <class T> inline
+bool operator!=(const ustring_Iterator<T>& lhs, const ustring_Iterator<T>& rhs)
+{
+ return (lhs.base() != rhs.base());
+}
+
+/** @relates Glib::ustring_Iterator */
+template <class T> inline
+bool operator<(const ustring_Iterator<T>& lhs, const ustring_Iterator<T>& rhs)
+{
+ return (lhs.base() < rhs.base());
+}
+
+/** @relates Glib::ustring_Iterator */
+template <class T> inline
+bool operator>(const ustring_Iterator<T>& lhs, const ustring_Iterator<T>& rhs)
+{
+ return (lhs.base() > rhs.base());
+}
+
+/** @relates Glib::ustring_Iterator */
+template <class T> inline
+bool operator<=(const ustring_Iterator<T>& lhs, const ustring_Iterator<T>& rhs)
+{
+ return (lhs.base() <= rhs.base());
+}
+
+/** @relates Glib::ustring_Iterator */
+template <class T> inline
+bool operator>=(const ustring_Iterator<T>& lhs, const ustring_Iterator<T>& rhs)
+{
+ return (lhs.base() >= rhs.base());
+}
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+/**** Glib::ustring::SequenceToString **************************************/
+
+template <class In>
+ustring::SequenceToString<In,char>::SequenceToString(In pbegin, In pend)
+:
+ std::string(pbegin, pend)
+{}
+
+template <class In>
+ustring::SequenceToString<In,gunichar>::SequenceToString(In pbegin, In pend)
+{
+ char utf8_buf[6]; // stores a single UTF-8 character
+
+ for(; pbegin != pend; ++pbegin)
+ {
+ const std::string::size_type utf8_len = g_unichar_to_utf8(*pbegin, utf8_buf);
+ this->append(utf8_buf, utf8_len);
+ }
+}
+
+
+/**** Glib::ustring ********************************************************/
+
+template <class In>
+ustring::ustring(In pbegin, In pend)
+:
+ string_ (Glib::ustring::SequenceToString<In>(pbegin, pend))
+{}
+
+template <class In>
+ustring& ustring::assign(In pbegin, In pend)
+{
+ Glib::ustring::SequenceToString<In> temp_string (pbegin, pend);
+ string_.swap(temp_string); // constant-time operation
+ return *this;
+}
+
+template <class In>
+ustring& ustring::append(In pbegin, In pend)
+{
+ string_.append(Glib::ustring::SequenceToString<In>(pbegin, pend));
+ return *this;
+}
+
+template <class In>
+void ustring::insert(ustring::iterator p, In pbegin, In pend)
+{
+ string_.insert(p.base(), Glib::ustring::SequenceToString<In>(pbegin, pend));
+}
+
+template <class In>
+ustring& ustring::replace(ustring::iterator pbegin, ustring::iterator pend, In pbegin2, In pend2)
+{
+ string_.replace(
+ pbegin.base(), pend.base(),
+ Glib::ustring::SequenceToString<In>(pbegin2, pend2));
+ return *this;
+}
+
+// The ustring methods substr() and operator std::string() are inline,
+// so that the compiler has a fair chance to optimize the copy ctor away.
+
+inline
+ustring ustring::substr(ustring::size_type i, ustring::size_type n) const
+{
+ return ustring(*this, i, n);
+}
+
+inline
+ustring::operator std::string() const
+{
+ return string_;
+}
+
+inline
+const std::string& ustring::raw() const
+{
+ return string_;
+}
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+/** @relates Glib::ustring */
+inline
+void swap(ustring& lhs, ustring& rhs)
+{
+ lhs.swap(rhs);
+}
+
+
+/**** Glib::ustring -- comparison operators ********************************/
+
+/** @relates Glib::ustring */
+inline bool operator==(const ustring& lhs, const ustring& rhs)
+ { return (lhs.compare(rhs) == 0); }
+
+/** @relates Glib::ustring */
+inline bool operator==(const ustring& lhs, const char* rhs)
+ { return (lhs.compare(rhs) == 0); }
+
+/** @relates Glib::ustring */
+inline bool operator==(const char* lhs, const ustring& rhs)
+ { return (rhs.compare(lhs) == 0); }
+
+
+/** @relates Glib::ustring */
+inline bool operator!=(const ustring& lhs, const ustring& rhs)
+ { return (lhs.compare(rhs) != 0); }
+
+/** @relates Glib::ustring */
+inline bool operator!=(const ustring& lhs, const char* rhs)
+ { return (lhs.compare(rhs) != 0); }
+
+/** @relates Glib::ustring */
+inline bool operator!=(const char* lhs, const ustring& rhs)
+ { return (rhs.compare(lhs) != 0); }
+
+
+/** @relates Glib::ustring */
+inline bool operator<(const ustring& lhs, const ustring& rhs)
+ { return (lhs.compare(rhs) < 0); }
+
+/** @relates Glib::ustring */
+inline bool operator<(const ustring& lhs, const char* rhs)
+ { return (lhs.compare(rhs) < 0); }
+
+/** @relates Glib::ustring */
+inline bool operator<(const char* lhs, const ustring& rhs)
+ { return (rhs.compare(lhs) > 0); }
+
+
+/** @relates Glib::ustring */
+inline bool operator>(const ustring& lhs, const ustring& rhs)
+ { return (lhs.compare(rhs) > 0); }
+
+/** @relates Glib::ustring */
+inline bool operator>(const ustring& lhs, const char* rhs)
+ { return (lhs.compare(rhs) > 0); }
+
+/** @relates Glib::ustring */
+inline bool operator>(const char* lhs, const ustring& rhs)
+ { return (rhs.compare(lhs) < 0); }
+
+
+/** @relates Glib::ustring */
+inline bool operator<=(const ustring& lhs, const ustring& rhs)
+ { return (lhs.compare(rhs) <= 0); }
+
+/** @relates Glib::ustring */
+inline bool operator<=(const ustring& lhs, const char* rhs)
+ { return (lhs.compare(rhs) <= 0); }
+
+/** @relates Glib::ustring */
+inline bool operator<=(const char* lhs, const ustring& rhs)
+ { return (rhs.compare(lhs) >= 0); }
+
+
+/** @relates Glib::ustring */
+inline bool operator>=(const ustring& lhs, const ustring& rhs)
+ { return (lhs.compare(rhs) >= 0); }
+
+/** @relates Glib::ustring */
+inline bool operator>=(const ustring& lhs, const char* rhs)
+ { return (lhs.compare(rhs) >= 0); }
+
+/** @relates Glib::ustring */
+inline bool operator>=(const char* lhs, const ustring& rhs)
+ { return (rhs.compare(lhs) <= 0); }
+
+
+/**** Glib::ustring -- concatenation operators *****************************/
+
+/** @relates Glib::ustring */
+inline ustring operator+(const ustring& lhs, const ustring& rhs)
+ { ustring temp (lhs); temp += rhs; return temp; }
+
+/** @relates Glib::ustring */
+inline ustring operator+(const ustring& lhs, const char* rhs)
+ { ustring temp (lhs); temp += rhs; return temp; }
+
+/** @relates Glib::ustring */
+inline ustring operator+(const char* lhs, const ustring& rhs)
+ { ustring temp (lhs); temp += rhs; return temp; }
+
+/** @relates Glib::ustring */
+inline ustring operator+(const ustring& lhs, gunichar rhs)
+ { ustring temp (lhs); temp += rhs; return temp; }
+
+/** @relates Glib::ustring */
+inline ustring operator+(gunichar lhs, const ustring& rhs)
+ { ustring temp (1, lhs); temp += rhs; return temp; }
+
+/** @relates Glib::ustring */
+inline ustring operator+(const ustring& lhs, char rhs)
+ { ustring temp (lhs); temp += rhs; return temp; }
+
+/** @relates Glib::ustring */
+inline ustring operator+(char lhs, const ustring& rhs)
+ { ustring temp (1, lhs); temp += rhs; return temp; }
+
+} // namespace Glib
+
+
+#endif /* _GLIBMM_USTRING_H */
+
diff --git a/libs/glibmm2/glibmm/utility.cc b/libs/glibmm2/glibmm/utility.cc
new file mode 100644
index 0000000000..f415bcb816
--- /dev/null
+++ b/libs/glibmm2/glibmm/utility.cc
@@ -0,0 +1,40 @@
+// -*- c++ -*-
+
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/utility.h>
+#include <glib/gstrfuncs.h>
+
+
+void Glib::append_canonical_typename(std::string& dest, const char* type_name)
+{
+ const std::string::size_type offset = dest.size();
+ dest += type_name;
+
+ std::string::iterator p = dest.begin() + offset;
+ const std::string::iterator pend = dest.end();
+
+ for(; p != pend; ++p)
+ {
+ if(!(g_ascii_isalnum(*p) || *p == '_' || *p == '-'))
+ *p = '+';
+ }
+}
+
diff --git a/libs/glibmm2/glibmm/utility.h b/libs/glibmm2/glibmm/utility.h
new file mode 100644
index 0000000000..8890f9af91
--- /dev/null
+++ b/libs/glibmm2/glibmm/utility.h
@@ -0,0 +1,119 @@
+// -*- c++ -*-
+#ifndef _GLIBMM_UTILITY_H
+#define _GLIBMM_UTILITY_H
+/* $Id$ */
+
+/* Copyright 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glib/gmacros.h>
+#include <glibmm/ustring.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+extern "C" void g_free(void*);
+
+
+/* Occasionally, a struct variable has to be initialized after its definition,
+ * i.e. when using structs as class member data. For convenience, the macro
+ * GLIBMM_INITIALIZE_STRUCT(Var, Type) is provided. It even avoids creating
+ * a temporary if the compiler is GCC.
+ */
+#if ((__GNUC__ >= 3) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)) && !defined(__STRICT_ANSI__)
+
+#define GLIBMM_INITIALIZE_STRUCT(Var, Type) __builtin_memset(&(Var), 0, sizeof(Type))
+
+#else
+
+#define GLIBMM_INITIALIZE_STRUCT(Var, Type) \
+ G_STMT_START{ \
+ Type const temp_initializer__ = { 0, }; \
+ (Var) = temp_initializer__; \
+ }G_STMT_END
+
+#endif /* ((__GNUC__ >= 3) || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)) && !defined(__STRICT_ANSI__) */
+
+
+namespace Glib
+{
+
+// These are used by gtkmmproc-generated type conversions:
+
+// Helper to deal with memory allocated
+// by GLib functions in an exception-safe manner.
+template <typename T>
+class ScopedPtr
+{
+private:
+ T* ptr_;
+ ScopedPtr(const ScopedPtr<T>&);
+ ScopedPtr<T>& operator=(const ScopedPtr<T>&);
+
+public:
+ ScopedPtr() : ptr_ (0) {}
+ explicit ScopedPtr(T* ptr) : ptr_ (ptr) {}
+ ~ScopedPtr() { g_free(ptr_); }
+ T* get() const { return ptr_; }
+ T** addr() { return &ptr_; }
+};
+
+// Removes the const nature of a ptr
+template <class T>
+inline T* unconst(const T* t)
+ { return const_cast<T*>(t); }
+
+// Convert const gchar* to ustring, while treating NULL as empty string.
+inline
+Glib::ustring convert_const_gchar_ptr_to_ustring(const char* str)
+{
+ return (str) ? Glib::ustring(str) : Glib::ustring();
+}
+
+// Convert const gchar* to std::string, while treating NULL as empty string.
+inline
+std::string convert_const_gchar_ptr_to_stdstring(const char* str)
+{
+ return (str) ? std::string(str) : std::string();
+}
+
+// Convert a non-const gchar* return value to ustring, freeing it too.
+inline
+Glib::ustring convert_return_gchar_ptr_to_ustring(char* str)
+{
+ return (str) ? Glib::ustring(Glib::ScopedPtr<char>(str).get())
+ : Glib::ustring();
+}
+
+// Convert a non-const gchar* return value to std::string, freeing it too.
+inline
+std::string convert_return_gchar_ptr_to_stdstring(char* str)
+{
+ return (str) ? std::string(Glib::ScopedPtr<char>(str).get())
+ : std::string();
+}
+
+// Append type_name to dest, while replacing special characters with '+'.
+void append_canonical_typename(std::string& dest, const char* type_name);
+
+} // namespace Glib
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+#endif /* _GLIBMM_UTILITY_H */
+
diff --git a/libs/glibmm2/glibmm/value.cc b/libs/glibmm2/glibmm/value.cc
new file mode 100644
index 0000000000..adb3e90252
--- /dev/null
+++ b/libs/glibmm2/glibmm/value.cc
@@ -0,0 +1,242 @@
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/value.h>
+#include <glibmm/objectbase.h>
+#include <glibmm/utility.h>
+#include <glibmm/wrap.h>
+
+
+namespace Glib
+{
+
+/**** Glib::ValueBase ******************************************************/
+
+ValueBase::ValueBase()
+{
+ GLIBMM_INITIALIZE_STRUCT(gobject_, GValue);
+}
+
+void ValueBase::init(GType type)
+{
+ g_value_init(&gobject_, type);
+}
+
+ValueBase::ValueBase(const ValueBase& other)
+{
+ GLIBMM_INITIALIZE_STRUCT(gobject_, GValue);
+
+ g_value_init(&gobject_, G_VALUE_TYPE(&other.gobject_));
+ g_value_copy(&other.gobject_, &gobject_);
+}
+
+ValueBase& ValueBase::operator=(const ValueBase& other)
+{
+ // g_value_copy() prevents self-assignment and deletes the destination.
+ g_value_copy(&other.gobject_, &gobject_);
+ return *this;
+}
+
+ValueBase::~ValueBase()
+{
+ g_value_unset(&gobject_);
+}
+
+void ValueBase::reset()
+{
+ g_value_reset(&gobject_);
+}
+
+
+/**** Glib::ValueBase_Boxed ************************************************/
+
+// static
+GType ValueBase_Boxed::value_type()
+{
+ return G_TYPE_BOXED;
+}
+
+void ValueBase_Boxed::set_boxed(const void* data)
+{
+ g_value_set_boxed(&gobject_, data);
+}
+
+void* ValueBase_Boxed::get_boxed() const
+{
+ return g_value_get_boxed(&gobject_);
+}
+
+GParamSpec* ValueBase_Boxed::create_param_spec(const Glib::ustring& name) const
+{
+ return g_param_spec_boxed(
+ name.c_str(), 0, 0, G_VALUE_TYPE(&gobject_),
+ GParamFlags(G_PARAM_READABLE | G_PARAM_WRITABLE));
+}
+
+
+/**** Glib::ValueBase_Object ***********************************************/
+
+// static
+GType ValueBase_Object::value_type()
+{
+ return G_TYPE_OBJECT;
+}
+
+void ValueBase_Object::set_object(Glib::ObjectBase* data)
+{
+ g_value_set_object(&gobject_, (data) ? data->gobj() : 0);
+}
+
+Glib::ObjectBase* ValueBase_Object::get_object() const
+{
+ GObject *const data = static_cast<GObject*>(g_value_get_object(&gobject_));
+ return Glib::wrap_auto(data, false);
+}
+
+Glib::RefPtr<Glib::ObjectBase> ValueBase_Object::get_object_copy() const
+{
+ GObject *const data = static_cast<GObject*>(g_value_get_object(&gobject_));
+ return Glib::RefPtr<Glib::ObjectBase>(Glib::wrap_auto(data, true));
+}
+
+GParamSpec* ValueBase_Object::create_param_spec(const Glib::ustring& name) const
+{
+ // Glib::Value_Pointer<> derives from Glib::ValueBase_Object, because
+ // we don't know beforehand whether a certain type is derived from
+ // Glib::Object or not. To keep create_param_spec() out of the template
+ // struggle, we dispatch here at runtime.
+
+ if(G_VALUE_HOLDS_OBJECT(&gobject_))
+ {
+ return g_param_spec_object(
+ name.c_str(), 0, 0, G_VALUE_TYPE(&gobject_),
+ GParamFlags(G_PARAM_READABLE | G_PARAM_WRITABLE));
+ }
+ else
+ {
+ g_return_val_if_fail(G_VALUE_HOLDS_POINTER(&gobject_), 0);
+
+ return g_param_spec_pointer(
+ name.c_str(), 0, 0,
+ GParamFlags(G_PARAM_READABLE | G_PARAM_WRITABLE));
+ }
+}
+
+
+/**** Glib::ValueBase_Enum *************************************************/
+
+// static
+GType ValueBase_Enum::value_type()
+{
+ return G_TYPE_ENUM;
+}
+
+void ValueBase_Enum::set_enum(int data)
+{
+ g_value_set_enum(&gobject_, data);
+}
+
+int ValueBase_Enum::get_enum() const
+{
+ return g_value_get_enum(&gobject_);
+}
+
+GParamSpec* ValueBase_Enum::create_param_spec(const Glib::ustring& name) const
+{
+ return g_param_spec_enum(
+ name.c_str(), 0, 0,
+ G_VALUE_TYPE(&gobject_), g_value_get_enum(&gobject_),
+ GParamFlags(G_PARAM_READABLE | G_PARAM_WRITABLE));
+}
+
+
+/**** Glib::ValueBase_Flags ************************************************/
+
+// static
+GType ValueBase_Flags::value_type()
+{
+ return G_TYPE_FLAGS;
+}
+
+void ValueBase_Flags::set_flags(unsigned int data)
+{
+ g_value_set_flags(&gobject_, data);
+}
+
+unsigned int ValueBase_Flags::get_flags() const
+{
+ return g_value_get_flags(&gobject_);
+}
+
+GParamSpec* ValueBase_Flags::create_param_spec(const Glib::ustring& name) const
+{
+ return g_param_spec_flags(
+ name.c_str(), 0, 0,
+ G_VALUE_TYPE(&gobject_), g_value_get_flags(&gobject_),
+ GParamFlags(G_PARAM_READABLE | G_PARAM_WRITABLE));
+}
+
+
+/**** Glib::ValueBase_String ***********************************************/
+
+// static
+GType ValueBase_String::value_type()
+{
+ return G_TYPE_STRING;
+}
+
+void ValueBase_String::set_cstring(const char* data)
+{
+ g_value_set_string(&gobject_, data);
+}
+
+const char* ValueBase_String::get_cstring() const
+{
+ if(const char *const data = g_value_get_string(&gobject_))
+ return data;
+ else
+ return "";
+}
+
+GParamSpec* ValueBase_String::create_param_spec(const Glib::ustring& name) const
+{
+ return g_param_spec_string(
+ name.c_str(), 0, 0, get_cstring(),
+ GParamFlags(G_PARAM_READABLE | G_PARAM_WRITABLE));
+}
+
+
+/**** Glib::Value<std::string> *********************************************/
+
+void Value<std::string>::set(const std::string& data)
+{
+ g_value_set_string(&gobject_, data.c_str());
+}
+
+
+/**** Glib::Value<Glib::ustring> *******************************************/
+
+void Value<Glib::ustring>::set(const Glib::ustring& data)
+{
+ g_value_set_string(&gobject_, data.c_str());
+}
+
+} // namespace Glib
+
diff --git a/libs/glibmm2/glibmm/value.h b/libs/glibmm2/glibmm/value.h
new file mode 100644
index 0000000000..94203a324c
--- /dev/null
+++ b/libs/glibmm2/glibmm/value.h
@@ -0,0 +1,319 @@
+// -*- c++ -*-
+#ifndef _GLIBMM_VALUE_H
+#define _GLIBMM_VALUE_H
+/* $Id$ */
+
+/* Copyright 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glib-object.h>
+#include <glibmm/refptr.h>
+#include <glibmm/ustring.h>
+
+
+namespace Glib
+{
+
+class ObjectBase;
+class Object;
+
+/** @defgroup glibmmValue Generic Values
+ *
+ * Glib::Value<> is specialized for almost any type used within
+ * the glibmm and gtkmm libraries.
+ *
+ * - Basic types like <tt>int</tt>, <tt>char</tt>, <tt>bool</tt>, etc., also <tt>void*</tt>.
+ * - Glib::ustring and std::string.
+ * - Pointers to classes derived from Glib::Object.
+ * - Glib::RefPtr<> pointer types, which are assumed to be Glib::Object pointers.
+ * - All flags and enum types used within the gtkmm libraries.
+ *
+ * If a type doesn't fit into any of these categories, then a generic
+ * implementation for custom types will be used. The requirements imposed
+ * on custom types are described in the Glib::Value class documentation.
+ */
+
+/**
+ * @ingroup glibmmValue
+ */
+class ValueBase
+{
+public:
+ /** Initializes the GValue, but without a type. You have to
+ * call init() before using the set(), get(), or reset() methods.
+ */
+ ValueBase();
+
+ ValueBase(const ValueBase& other);
+ ValueBase& operator=(const ValueBase& other);
+
+ ~ValueBase();
+
+ /** Setup the GValue for storing the specified @a type.
+ * The contents will be initialized to the default value for this type.
+ * Note that init() should never be called twice.
+ *
+ * init() is not implemented as constructor, to avoid the necessity
+ * to implement a forward constructor in each derived class.
+ */
+ void init(GType type);
+
+ /** Reset contents to the default value of its type.
+ */
+ void reset();
+
+ GValue* gobj() { return &gobject_; }
+ const GValue* gobj() const { return &gobject_; }
+
+protected:
+ GValue gobject_;
+};
+
+/**
+ * @ingroup glibmmValue
+ */
+class ValueBase_Boxed : public ValueBase
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ GParamSpec* create_param_spec(const Glib::ustring& name) const;
+#endif
+
+protected:
+ void set_boxed(const void* data);
+ void* get_boxed() const; // doesn't copy
+};
+
+
+/**
+ * @ingroup glibmmValue
+ */
+class ValueBase_Object : public ValueBase
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ GParamSpec* create_param_spec(const Glib::ustring& name) const;
+#endif
+
+protected:
+ void set_object(Glib::ObjectBase* data);
+ Glib::ObjectBase* get_object() const;
+ Glib::RefPtr<Glib::ObjectBase> get_object_copy() const;
+};
+
+
+/**
+ * @ingroup glibmmValue
+ */
+class ValueBase_Enum : public ValueBase
+{
+public:
+ typedef gint CType;
+ static GType value_type() G_GNUC_CONST;
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ GParamSpec* create_param_spec(const Glib::ustring& name) const;
+#endif
+
+protected:
+ void set_enum(int data);
+ int get_enum() const;
+};
+
+
+/**
+ * @ingroup glibmmValue
+ */
+class ValueBase_Flags : public ValueBase
+{
+public:
+ typedef guint CType;
+ static GType value_type() G_GNUC_CONST;
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ GParamSpec* create_param_spec(const Glib::ustring& name) const;
+#endif
+
+protected:
+ void set_flags(unsigned int data);
+ unsigned int get_flags() const;
+};
+
+
+/**
+ * @ingroup glibmmValue
+ */
+class ValueBase_String : public ValueBase
+{
+public:
+ typedef const gchar* CType;
+ static GType value_type() G_GNUC_CONST;
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ GParamSpec* create_param_spec(const Glib::ustring& name) const;
+#endif
+
+protected:
+ void set_cstring(const char* data);
+ const char* get_cstring() const; // never returns 0
+};
+
+} // namespace Glib
+
+
+/* Include generic Glib::Value<> template, before any specializations:
+ */
+#define _GLIBMM_VALUE_H_INCLUDE_VALUE_CUSTOM_H
+#include <glibmm/value_custom.h>
+#undef _GLIBMM_VALUE_H_INCLUDE_VALUE_CUSTOM_H
+
+
+namespace Glib
+{
+
+/**
+ * @ingroup glibmmValue
+ */
+template <class T>
+class Value_Boxed : public ValueBase_Boxed
+{
+public:
+ typedef T CppType;
+ typedef typename T::BaseObjectType* CType;
+
+ static GType value_type() { return T::get_type(); }
+
+ void set(const CppType& data) { set_boxed(data.gobj()); }
+ CppType get() const { return CppType(static_cast<CType>(get_boxed())); }
+};
+
+//More spec-compliant compilers (such as Tru64) need this to be near Glib::Object instead.
+#ifdef GLIBMM_CAN_USE_DYNAMIC_CAST_IN_UNUSED_TEMPLATE_WITHOUT_DEFINITION
+
+/** Partial specialization for RefPtr<> to Glib::Object.
+ * @ingroup glibmmValue
+ */
+template <class T>
+class Value< Glib::RefPtr<T> > : public ValueBase_Object
+{
+public:
+ typedef Glib::RefPtr<T> CppType;
+ typedef typename T::BaseObjectType* CType;
+
+ static GType value_type() { return T::get_base_type(); }
+
+ void set(const CppType& data) { set_object(data.operator->()); }
+ CppType get() const { return Glib::RefPtr<T>::cast_dynamic(get_object_copy()); }
+};
+
+//The SUN Forte Compiler has a problem with this:
+#ifdef GLIBMM_HAVE_DISAMBIGUOUS_CONST_TEMPLATE_SPECIALIZATIONS
+
+/** Partial specialization for RefPtr<> to const Glib::Object.
+ * @ingroup glibmmValue
+ */
+template <class T>
+class Value< Glib::RefPtr<const T> > : public ValueBase_Object
+{
+public:
+ typedef Glib::RefPtr<const T> CppType;
+ typedef typename T::BaseObjectType* CType;
+
+ static GType value_type() { return T::get_base_type(); }
+
+ void set(const CppType& data) { set_object(const_cast<T*>(data.operator->())); }
+ CppType get() const { return Glib::RefPtr<T>::cast_dynamic(get_object_copy()); }
+};
+#endif //GLIBMM_HAVE_DISAMBIGUOUS_CONST_TEMPLATE_SPECIALIZATIONS
+
+#endif //GLIBMM_CAN_USE_DYNAMIC_CAST_IN_UNUSED_TEMPLATE_WITHOUT_DEFINITION
+
+} // namespace Glib
+
+
+/* Include generated specializations of Glib::Value<> for fundamental types:
+ */
+#define _GLIBMM_VALUE_H_INCLUDE_VALUE_BASICTYPES_H
+#include <glibmm/value_basictypes.h>
+#undef _GLIBMM_VALUE_H_INCLUDE_VALUE_BASICTYPES_H
+
+
+namespace Glib
+{
+
+/** Specialization for strings.
+ * @ingroup glibmmValue
+ */
+template <>
+class Value<std::string> : public ValueBase_String
+{
+public:
+ typedef std::string CppType;
+
+ void set(const std::string& data);
+ std::string get() const { return get_cstring(); }
+};
+
+/** Specialization for UTF-8 strings.
+ * @ingroup glibmmValue
+ */
+template <>
+class Value<Glib::ustring> : public ValueBase_String
+{
+public:
+ typedef Glib::ustring CppType;
+
+ void set(const Glib::ustring& data);
+ Glib::ustring get() const { return get_cstring(); }
+};
+
+
+/** Base class of Glib::Value<T> specializations for enum types.
+ * @ingroup glibmmValue
+ */
+template <class T>
+class Value_Enum : public ValueBase_Enum
+{
+public:
+ typedef T CppType;
+
+ void set(CppType data) { set_enum(data); }
+ CppType get() const { return CppType(get_enum()); }
+};
+
+/** Base class of Glib::Value<T> specializations for flags types.
+ * @ingroup glibmmValue
+ */
+template <class T>
+class Value_Flags : public ValueBase_Flags
+{
+public:
+ typedef T CppType;
+
+ void set(CppType data) { set_flags(data); }
+ CppType get() const { return CppType(get_flags()); }
+};
+
+} // namespace Glib
+
+
+#endif /* _GLIBMM_VALUE_H */
+
diff --git a/libs/glibmm2/glibmm/value_basictypes.cc b/libs/glibmm2/glibmm/value_basictypes.cc
new file mode 100644
index 0000000000..4d76b89f3e
--- /dev/null
+++ b/libs/glibmm2/glibmm/value_basictypes.cc
@@ -0,0 +1,336 @@
+// -*- c++ -*-
+// This is a generated file, do not edit. Generated from value_basictypes.cc.m4
+
+#include <glibmm/value.h>
+
+namespace Glib
+{
+
+G_GNUC_EXTENSION typedef long long long_long;
+G_GNUC_EXTENSION typedef unsigned long long unsigned_long_long;
+
+
+/**** Glib::Value<bool> ****************************************************/
+
+// static
+GType Value<bool>::value_type()
+{
+ return G_TYPE_BOOLEAN;
+}
+
+void Value<bool>::set(bool data)
+{
+ g_value_set_boolean(&gobject_, data);
+}
+
+bool Value<bool>::get() const
+{
+ return g_value_get_boolean(&gobject_);
+}
+
+GParamSpec* Value<bool>::create_param_spec(const Glib::ustring& name) const
+{
+ return g_param_spec_boolean(
+ name.c_str(), 0, 0,
+ g_value_get_boolean(&gobject_),
+ GParamFlags(G_PARAM_READABLE | G_PARAM_WRITABLE));
+}
+
+
+/**** Glib::Value<char> ****************************************************/
+
+// static
+GType Value<char>::value_type()
+{
+ return G_TYPE_CHAR;
+}
+
+void Value<char>::set(char data)
+{
+ g_value_set_char(&gobject_, data);
+}
+
+char Value<char>::get() const
+{
+ return g_value_get_char(&gobject_);
+}
+
+GParamSpec* Value<char>::create_param_spec(const Glib::ustring& name) const
+{
+ return g_param_spec_char(
+ name.c_str(), 0, 0,
+ -128, 127, g_value_get_char(&gobject_),
+ GParamFlags(G_PARAM_READABLE | G_PARAM_WRITABLE));
+}
+
+
+/**** Glib::Value<unsigned char> *******************************************/
+
+// static
+GType Value<unsigned char>::value_type()
+{
+ return G_TYPE_UCHAR;
+}
+
+void Value<unsigned char>::set(unsigned char data)
+{
+ g_value_set_uchar(&gobject_, data);
+}
+
+unsigned char Value<unsigned char>::get() const
+{
+ return g_value_get_uchar(&gobject_);
+}
+
+GParamSpec* Value<unsigned char>::create_param_spec(const Glib::ustring& name) const
+{
+ return g_param_spec_uchar(
+ name.c_str(), 0, 0,
+ 0, 255, g_value_get_uchar(&gobject_),
+ GParamFlags(G_PARAM_READABLE | G_PARAM_WRITABLE));
+}
+
+
+/**** Glib::Value<int> *****************************************************/
+
+// static
+GType Value<int>::value_type()
+{
+ return G_TYPE_INT;
+}
+
+void Value<int>::set(int data)
+{
+ g_value_set_int(&gobject_, data);
+}
+
+int Value<int>::get() const
+{
+ return g_value_get_int(&gobject_);
+}
+
+GParamSpec* Value<int>::create_param_spec(const Glib::ustring& name) const
+{
+ return g_param_spec_int(
+ name.c_str(), 0, 0,
+ G_MININT, G_MAXINT, g_value_get_int(&gobject_),
+ GParamFlags(G_PARAM_READABLE | G_PARAM_WRITABLE));
+}
+
+
+/**** Glib::Value<unsigned int> ********************************************/
+
+// static
+GType Value<unsigned int>::value_type()
+{
+ return G_TYPE_UINT;
+}
+
+void Value<unsigned int>::set(unsigned int data)
+{
+ g_value_set_uint(&gobject_, data);
+}
+
+unsigned int Value<unsigned int>::get() const
+{
+ return g_value_get_uint(&gobject_);
+}
+
+GParamSpec* Value<unsigned int>::create_param_spec(const Glib::ustring& name) const
+{
+ return g_param_spec_uint(
+ name.c_str(), 0, 0,
+ 0, G_MAXUINT, g_value_get_uint(&gobject_),
+ GParamFlags(G_PARAM_READABLE | G_PARAM_WRITABLE));
+}
+
+
+/**** Glib::Value<long> ****************************************************/
+
+// static
+GType Value<long>::value_type()
+{
+ return G_TYPE_LONG;
+}
+
+void Value<long>::set(long data)
+{
+ g_value_set_long(&gobject_, data);
+}
+
+long Value<long>::get() const
+{
+ return g_value_get_long(&gobject_);
+}
+
+GParamSpec* Value<long>::create_param_spec(const Glib::ustring& name) const
+{
+ return g_param_spec_long(
+ name.c_str(), 0, 0,
+ G_MINLONG, G_MAXLONG, g_value_get_long(&gobject_),
+ GParamFlags(G_PARAM_READABLE | G_PARAM_WRITABLE));
+}
+
+
+/**** Glib::Value<unsigned long> *******************************************/
+
+// static
+GType Value<unsigned long>::value_type()
+{
+ return G_TYPE_ULONG;
+}
+
+void Value<unsigned long>::set(unsigned long data)
+{
+ g_value_set_ulong(&gobject_, data);
+}
+
+unsigned long Value<unsigned long>::get() const
+{
+ return g_value_get_ulong(&gobject_);
+}
+
+GParamSpec* Value<unsigned long>::create_param_spec(const Glib::ustring& name) const
+{
+ return g_param_spec_ulong(
+ name.c_str(), 0, 0,
+ 0, G_MAXULONG, g_value_get_ulong(&gobject_),
+ GParamFlags(G_PARAM_READABLE | G_PARAM_WRITABLE));
+}
+
+
+/**** Glib::Value<long_long> ***********************************************/
+
+// static
+GType Value<long_long>::value_type()
+{
+ return G_TYPE_INT64;
+}
+
+void Value<long_long>::set(long_long data)
+{
+ g_value_set_int64(&gobject_, data);
+}
+
+long_long Value<long_long>::get() const
+{
+ return g_value_get_int64(&gobject_);
+}
+
+GParamSpec* Value<long_long>::create_param_spec(const Glib::ustring& name) const
+{
+ return g_param_spec_int64(
+ name.c_str(), 0, 0,
+ G_GINT64_CONSTANT(0x8000000000000000), G_GINT64_CONSTANT(0x7fffffffffffffff), g_value_get_int64(&gobject_),
+ GParamFlags(G_PARAM_READABLE | G_PARAM_WRITABLE));
+}
+
+
+/**** Glib::Value<unsigned_long_long> **************************************/
+
+// static
+GType Value<unsigned_long_long>::value_type()
+{
+ return G_TYPE_UINT64;
+}
+
+void Value<unsigned_long_long>::set(unsigned_long_long data)
+{
+ g_value_set_uint64(&gobject_, data);
+}
+
+unsigned_long_long Value<unsigned_long_long>::get() const
+{
+ return g_value_get_uint64(&gobject_);
+}
+
+GParamSpec* Value<unsigned_long_long>::create_param_spec(const Glib::ustring& name) const
+{
+ return g_param_spec_uint64(
+ name.c_str(), 0, 0,
+ G_GINT64_CONSTANT(0U), G_GINT64_CONSTANT(0xffffffffffffffffU), g_value_get_uint64(&gobject_),
+ GParamFlags(G_PARAM_READABLE | G_PARAM_WRITABLE));
+}
+
+
+/**** Glib::Value<float> ***************************************************/
+
+// static
+GType Value<float>::value_type()
+{
+ return G_TYPE_FLOAT;
+}
+
+void Value<float>::set(float data)
+{
+ g_value_set_float(&gobject_, data);
+}
+
+float Value<float>::get() const
+{
+ return g_value_get_float(&gobject_);
+}
+
+GParamSpec* Value<float>::create_param_spec(const Glib::ustring& name) const
+{
+ return g_param_spec_float(
+ name.c_str(), 0, 0,
+ G_MINFLOAT, G_MAXFLOAT, g_value_get_float(&gobject_),
+ GParamFlags(G_PARAM_READABLE | G_PARAM_WRITABLE));
+}
+
+
+/**** Glib::Value<double> **************************************************/
+
+// static
+GType Value<double>::value_type()
+{
+ return G_TYPE_DOUBLE;
+}
+
+void Value<double>::set(double data)
+{
+ g_value_set_double(&gobject_, data);
+}
+
+double Value<double>::get() const
+{
+ return g_value_get_double(&gobject_);
+}
+
+GParamSpec* Value<double>::create_param_spec(const Glib::ustring& name) const
+{
+ return g_param_spec_double(
+ name.c_str(), 0, 0,
+ G_MINDOUBLE, G_MAXDOUBLE, g_value_get_double(&gobject_),
+ GParamFlags(G_PARAM_READABLE | G_PARAM_WRITABLE));
+}
+
+
+/**** Glib::Value<void*> ***************************************************/
+
+// static
+GType Value<void*>::value_type()
+{
+ return G_TYPE_POINTER;
+}
+
+void Value<void*>::set(void* data)
+{
+ g_value_set_pointer(&gobject_, data);
+}
+
+void* Value<void*>::get() const
+{
+ return g_value_get_pointer(&gobject_);
+}
+
+GParamSpec* Value<void*>::create_param_spec(const Glib::ustring& name) const
+{
+ return g_param_spec_pointer(
+ name.c_str(), 0, 0,
+ GParamFlags(G_PARAM_READABLE | G_PARAM_WRITABLE));
+}
+
+} // namespace Glib
+
diff --git a/libs/glibmm2/glibmm/value_basictypes.h b/libs/glibmm2/glibmm/value_basictypes.h
new file mode 100644
index 0000000000..3d81e3ece8
--- /dev/null
+++ b/libs/glibmm2/glibmm/value_basictypes.h
@@ -0,0 +1,271 @@
+// -*- c++ -*-
+// This is a generated file, do not edit. Generated from value_basictypes.h.m4
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+#ifndef _GLIBMM_VALUE_H_INCLUDE_VALUE_BASICTYPES_H
+#error "glibmm/value_basictypes.h cannot be included directly"
+#endif
+#endif
+
+/* Suppress warnings about `long long' when GCC is in -pedantic mode.
+ */
+#if (__GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96))
+#pragma GCC system_header
+#endif
+
+namespace Glib
+{
+
+/**
+ * @ingroup glibmmValue
+ */
+template <>
+class Value<bool> : public ValueBase
+{
+public:
+ typedef bool CppType;
+ typedef gboolean CType;
+
+ static GType value_type() G_GNUC_CONST;
+
+ void set(bool data);
+ bool get() const;
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ GParamSpec* create_param_spec(const Glib::ustring& name) const;
+#endif
+};
+
+
+/**
+ * @ingroup glibmmValue
+ */
+template <>
+class Value<char> : public ValueBase
+{
+public:
+ typedef char CppType;
+ typedef gchar CType;
+
+ static GType value_type() G_GNUC_CONST;
+
+ void set(char data);
+ char get() const;
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ GParamSpec* create_param_spec(const Glib::ustring& name) const;
+#endif
+};
+
+
+/**
+ * @ingroup glibmmValue
+ */
+template <>
+class Value<unsigned char> : public ValueBase
+{
+public:
+ typedef unsigned char CppType;
+ typedef guchar CType;
+
+ static GType value_type() G_GNUC_CONST;
+
+ void set(unsigned char data);
+ unsigned char get() const;
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ GParamSpec* create_param_spec(const Glib::ustring& name) const;
+#endif
+};
+
+
+/**
+ * @ingroup glibmmValue
+ */
+template <>
+class Value<int> : public ValueBase
+{
+public:
+ typedef int CppType;
+ typedef gint CType;
+
+ static GType value_type() G_GNUC_CONST;
+
+ void set(int data);
+ int get() const;
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ GParamSpec* create_param_spec(const Glib::ustring& name) const;
+#endif
+};
+
+
+/**
+ * @ingroup glibmmValue
+ */
+template <>
+class Value<unsigned int> : public ValueBase
+{
+public:
+ typedef unsigned int CppType;
+ typedef guint CType;
+
+ static GType value_type() G_GNUC_CONST;
+
+ void set(unsigned int data);
+ unsigned int get() const;
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ GParamSpec* create_param_spec(const Glib::ustring& name) const;
+#endif
+};
+
+
+/**
+ * @ingroup glibmmValue
+ */
+template <>
+class Value<long> : public ValueBase
+{
+public:
+ typedef long CppType;
+ typedef glong CType;
+
+ static GType value_type() G_GNUC_CONST;
+
+ void set(long data);
+ long get() const;
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ GParamSpec* create_param_spec(const Glib::ustring& name) const;
+#endif
+};
+
+
+/**
+ * @ingroup glibmmValue
+ */
+template <>
+class Value<unsigned long> : public ValueBase
+{
+public:
+ typedef unsigned long CppType;
+ typedef gulong CType;
+
+ static GType value_type() G_GNUC_CONST;
+
+ void set(unsigned long data);
+ unsigned long get() const;
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ GParamSpec* create_param_spec(const Glib::ustring& name) const;
+#endif
+};
+
+
+/**
+ * @ingroup glibmmValue
+ */
+template <>
+class Value<long long> : public ValueBase
+{
+public:
+ typedef long long CppType;
+ typedef gint64 CType;
+
+ static GType value_type() G_GNUC_CONST;
+
+ void set(long long data);
+ long long get() const;
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ GParamSpec* create_param_spec(const Glib::ustring& name) const;
+#endif
+};
+
+
+/**
+ * @ingroup glibmmValue
+ */
+template <>
+class Value<unsigned long long> : public ValueBase
+{
+public:
+ typedef unsigned long long CppType;
+ typedef guint64 CType;
+
+ static GType value_type() G_GNUC_CONST;
+
+ void set(unsigned long long data);
+ unsigned long long get() const;
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ GParamSpec* create_param_spec(const Glib::ustring& name) const;
+#endif
+};
+
+
+/**
+ * @ingroup glibmmValue
+ */
+template <>
+class Value<float> : public ValueBase
+{
+public:
+ typedef float CppType;
+ typedef gfloat CType;
+
+ static GType value_type() G_GNUC_CONST;
+
+ void set(float data);
+ float get() const;
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ GParamSpec* create_param_spec(const Glib::ustring& name) const;
+#endif
+};
+
+
+/**
+ * @ingroup glibmmValue
+ */
+template <>
+class Value<double> : public ValueBase
+{
+public:
+ typedef double CppType;
+ typedef gdouble CType;
+
+ static GType value_type() G_GNUC_CONST;
+
+ void set(double data);
+ double get() const;
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ GParamSpec* create_param_spec(const Glib::ustring& name) const;
+#endif
+};
+
+
+/**
+ * @ingroup glibmmValue
+ */
+template <>
+class Value<void*> : public ValueBase
+{
+public:
+ typedef void* CppType;
+ typedef gpointer CType;
+
+ static GType value_type() G_GNUC_CONST;
+
+ void set(void* data);
+ void* get() const;
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ GParamSpec* create_param_spec(const Glib::ustring& name) const;
+#endif
+};
+
+} // namespace Glib
+
diff --git a/libs/glibmm2/glibmm/value_custom.cc b/libs/glibmm2/glibmm/value_custom.cc
new file mode 100644
index 0000000000..f277477712
--- /dev/null
+++ b/libs/glibmm2/glibmm/value_custom.cc
@@ -0,0 +1,145 @@
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/value.h>
+#include <glibmm/utility.h>
+#include <glib.h>
+
+
+namespace
+{
+
+void warn_already_registered(const char* location, const std::string& full_name)
+{
+ g_warning("file %s: (%s): The type name `%s' has been registered already.\n"
+ "This is not supposed to happen -- please send a mail with detailed "
+ "information about your platform to gtkmm-list@gnome.org. Thanks.\n",
+ __FILE__, location, full_name.c_str());
+}
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+GType custom_boxed_type_register(const char* type_name,
+ ValueInitFunc init_func,
+ ValueFreeFunc free_func,
+ ValueCopyFunc copy_func)
+{
+ std::string full_name ("glibmm__CustomBoxed_");
+ Glib::append_canonical_typename(full_name, type_name);
+
+ // Templates of the same type _might_ be duplicated when instantiated in
+ // multiple translation units -- I'm not sure whether this is true. If the
+ // static custom_type_ variable in Value<> is duplicated, then the type
+ // would be registered more than once.
+ //
+ // Lookup the type name to see whether this scenario actually happens.
+ // If this turns out to be common behaviour on some platform the warning
+ // should be removed.
+
+ if(const GType existing_type = g_type_from_name(full_name.c_str()))
+ {
+ warn_already_registered("Glib::custom_boxed_type_register", full_name);
+ return existing_type;
+ }
+
+ // Via GTypeValueTable, we can teach GValue how to instantiate,
+ // destroy, and copy arbitrary objects of the C++ type.
+
+ const GTypeValueTable value_table =
+ {
+ init_func,
+ free_func,
+ copy_func,
+ 0, // value_peek_pointer
+ 0, // collect_format
+ 0, // collect_value
+ 0, // lcopy_format
+ 0, // lcopy_value
+ };
+
+ const GTypeInfo type_info =
+ {
+ 0, // class_size
+ 0, // base_init
+ 0, // base_finalize
+ 0, // class_init_func
+ 0, // class_finalize
+ 0, // class_data
+ 0, // instance_size
+ 0, // n_preallocs
+ 0, // instance_init
+ &value_table,
+ };
+
+ // Don't use g_boxed_type_register_static(), because that wouldn't allow
+ // for a non-NULL default value. The implementation of g_boxed_copy() will
+ // use our custom GTypeValueTable automatically.
+
+ return g_type_register_static(G_TYPE_BOXED, full_name.c_str(), &type_info, GTypeFlags(0));
+}
+
+GType custom_pointer_type_register(const char* type_name)
+{
+ std::string full_name ("glibmm__CustomPointer_");
+ Glib::append_canonical_typename(full_name, type_name);
+
+ // Templates of the same type _might_ be duplicated when instantiated in
+ // multiple translation units -- I'm not sure whether this is true. If the
+ // static custom_type variable in Value<>::value_type_() is duplicated, then
+ // the type would be registered more than once.
+ //
+ // Lookup the type name to see whether this scenario actually happens.
+ // If this turns out to be common behaviour on some platform the warning
+ // should be removed.
+
+ if(const GType existing_type = g_type_from_name(full_name.c_str()))
+ {
+ warn_already_registered("Glib::custom_pointer_type_register", full_name);
+ return existing_type;
+ }
+
+ const GTypeInfo type_info =
+ {
+ 0, // class_size
+ 0, // base_init
+ 0, // base_finalize
+ 0, // class_init_func
+ 0, // class_finalize
+ 0, // class_data
+ 0, // instance_size
+ 0, // n_preallocs
+ 0, // instance_init
+ 0, // value_table
+ };
+
+ // We could probably use g_pointer_type_register_static(), but I want
+ // to keep this function symmetric to custom_boxed_type_register(). Also,
+ // g_pointer_type_register_static() would lookup the type name once again.
+
+ return g_type_register_static(G_TYPE_POINTER, full_name.c_str(), &type_info, GTypeFlags(0));
+}
+
+
+} // namespace Glib
+
diff --git a/libs/glibmm2/glibmm/value_custom.h b/libs/glibmm2/glibmm/value_custom.h
new file mode 100644
index 0000000000..ab4ad7d594
--- /dev/null
+++ b/libs/glibmm2/glibmm/value_custom.h
@@ -0,0 +1,289 @@
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+#ifndef _GLIBMM_VALUE_H_INCLUDE_VALUE_CUSTOM_H
+#error "glibmm/value_custom.h cannot be included directly"
+#endif
+#endif
+
+#include <new>
+#include <typeinfo>
+#include <glibmmconfig.h>
+
+GLIBMM_USING_STD(nothrow)
+
+
+namespace Glib
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+extern "C"
+{
+ typedef void (* ValueInitFunc) (GValue*);
+ typedef void (* ValueFreeFunc) (GValue*);
+ typedef void (* ValueCopyFunc) (const GValue*, GValue*);
+}
+
+/* When using Glib::Value<T> with custom types, each T will be registered
+ * as subtype of G_TYPE_BOXED, via this function. The type_name argument
+ * should be the C++ RTTI name.
+ */
+GType custom_boxed_type_register(const char* type_name,
+ ValueInitFunc init_func,
+ ValueFreeFunc free_func,
+ ValueCopyFunc copy_func);
+
+/* When using Glib::Value<T*> or Glib::Value<const T*> with custom types,
+ * each T* or const T* will be registered as a subtype of G_TYPE_POINTER,
+ * via this function. The type_name argument should be the C++ RTTI name.
+ */
+GType custom_pointer_type_register(const char* type_name);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+/**
+ * @ingroup glibmmValue
+ */
+template <class T, class PtrT>
+class Value_Pointer : public ValueBase_Object
+{
+public:
+ typedef PtrT CppType;
+ typedef void* CType;
+
+ static inline GType value_type() G_GNUC_CONST;
+
+ inline void set(CppType data);
+ inline CppType get() const;
+
+private:
+ inline
+ static GType value_type_(Glib::Object*);
+ static GType value_type_(void*);
+
+ inline void set_(CppType data, Glib::Object*);
+ inline void set_(CppType data, void*);
+
+ inline CppType get_(Glib::Object*) const;
+ inline CppType get_(void*) const;
+};
+
+
+/** Generic value implementation for custom types.
+ * @ingroup glibmmValue
+ * Any type to be used with this template must implement:
+ * - default constructor
+ * - copy constructor
+ * - assignment operator
+ * - destructor
+ *
+ * Compiler-generated implementations are OK, provided they do the
+ * right thing for the type. In other words, any type that works with
+ * <tt>std::vector</tt> will work with Glib::Value<>.
+ *
+ * @note None of the operations listed above are allowed to throw. If you
+ * cannot ensure that no exceptions will be thrown, consider using either
+ * a normal pointer or a smart pointer to hold your objects indirectly.
+ */
+template <class T>
+class Value : public ValueBase_Boxed
+{
+public:
+ typedef T CppType;
+ typedef T* CType;
+
+ static GType value_type() G_GNUC_CONST;
+
+ inline void set(const CppType& data);
+ inline CppType get() const;
+
+private:
+ static GType custom_type_;
+
+ static void value_init_func(GValue* value);
+ static void value_free_func(GValue* value);
+ static void value_copy_func(const GValue* src_value, GValue* dest_value);
+};
+
+
+/** Specialization for pointers to instances of any type.
+ * @ingroup glibmmValue
+ * No attempt is made to manage the memory associated with the
+ * pointer, you must take care of that yourself.
+ */
+template <class T>
+class Value<T*> : public Value_Pointer<T,T*>
+{};
+
+/** Specialization for pointers to const instances of any type.
+ * @ingroup glibmmValue
+ * No attempt is made to manage the memory associated with the
+ * pointer, you must take care of that yourself.
+ */
+template <class T>
+class Value<const T*> : public Value_Pointer<T,const T*>
+{};
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+/**** Glib::Value_Pointer<T, PtrT> *****************************************/
+
+/** Implementation for Glib::Object pointers **/
+
+// static
+template <class T, class PtrT> inline
+GType Value_Pointer<T,PtrT>::value_type_(Glib::Object*)
+{
+ return T::get_base_type();
+}
+
+template <class T, class PtrT> inline
+void Value_Pointer<T,PtrT>::set_(PtrT data, Glib::Object*)
+{
+ set_object(const_cast<T*>(data));
+}
+
+//More spec-compliant compilers (such as Tru64) need this to be near Glib::Object instead.
+#ifdef GLIBMM_CAN_USE_DYNAMIC_CAST_IN_UNUSED_TEMPLATE_WITHOUT_DEFINITION
+template <class T, class PtrT> inline
+PtrT Value_Pointer<T,PtrT>::get_(Glib::Object*) const
+{
+ return dynamic_cast<T*>(get_object());
+}
+#endif //GLIBMM_CAN_USE_DYNAMIC_CAST_IN_UNUSED_TEMPLATE_WITHOUT_DEFINITION
+
+/** Implementation for custom pointers **/
+
+// static
+template <class T, class PtrT>
+GType Value_Pointer<T,PtrT>::value_type_(void*)
+{
+ static GType custom_type = 0;
+
+ if(!custom_type)
+ custom_type = Glib::custom_pointer_type_register(typeid(PtrT).name());
+
+ return custom_type;
+}
+
+template <class T, class PtrT> inline
+void Value_Pointer<T,PtrT>::set_(PtrT data, void*)
+{
+ gobject_.data[0].v_pointer = const_cast<T*>(data);
+}
+
+template <class T, class PtrT> inline
+PtrT Value_Pointer<T,PtrT>::get_(void*) const
+{
+ return static_cast<T*>(gobject_.data[0].v_pointer);
+}
+
+/** Public forwarding interface **/
+
+// static
+template <class T, class PtrT> inline
+GType Value_Pointer<T,PtrT>::value_type()
+{
+ // Dispatch to the specific value_type_() overload.
+ return Value_Pointer<T,PtrT>::value_type_(static_cast<T*>(0));
+}
+
+template <class T, class PtrT> inline
+void Value_Pointer<T,PtrT>::set(PtrT data)
+{
+ // Dispatch to the specific set_() overload.
+ this->set_(data, static_cast<T*>(0));
+}
+
+template <class T, class PtrT> inline
+PtrT Value_Pointer<T,PtrT>::get() const
+{
+ // Dispatch to the specific get_() overload.
+ return this->get_(static_cast<T*>(0));
+}
+
+
+/**** Glib::Value<T> *******************************************************/
+
+// Static data, specific to each template instantiation.
+template <class T>
+GType Value<T>::custom_type_ = 0;
+
+template <class T> inline
+void Value<T>::set(const typename Value<T>::CppType& data)
+{
+ // Assume the value is already default-initialized. See value_init_func().
+ *static_cast<T*>(gobject_.data[0].v_pointer) = data;
+}
+
+template <class T> inline
+typename Value<T>::CppType Value<T>::get() const
+{
+ // Assume the pointer is not NULL. See value_init_func().
+ return *static_cast<T*>(gobject_.data[0].v_pointer);
+}
+
+// static
+template <class T>
+GType Value<T>::value_type()
+{
+ if(!custom_type_)
+ {
+ custom_type_ = Glib::custom_boxed_type_register(
+ typeid(CppType).name(),
+ &Value<T>::value_init_func,
+ &Value<T>::value_free_func,
+ &Value<T>::value_copy_func);
+ }
+ return custom_type_;
+}
+
+// static
+template <class T>
+void Value<T>::value_init_func(GValue* value)
+{
+ // Never store a NULL pointer (unless we're out of memory).
+ value->data[0].v_pointer = new(std::nothrow) T();
+}
+
+// static
+template <class T>
+void Value<T>::value_free_func(GValue* value)
+{
+ delete static_cast<T*>(value->data[0].v_pointer);
+}
+
+// static
+template <class T>
+void Value<T>::value_copy_func(const GValue* src_value, GValue* dest_value)
+{
+ // Assume the source is not NULL. See value_init_func().
+ const T& source = *static_cast<T*>(src_value->data[0].v_pointer);
+ dest_value->data[0].v_pointer = new(std::nothrow) T(source);
+}
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+} // namespace Glib
+
diff --git a/libs/glibmm2/glibmm/wrap.cc b/libs/glibmm2/glibmm/wrap.cc
new file mode 100644
index 0000000000..5a7d84048b
--- /dev/null
+++ b/libs/glibmm2/glibmm/wrap.cc
@@ -0,0 +1,161 @@
+// -*- c++ -*-
+/* $Id$ */
+
+/* wrap.cc
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glib-object.h>
+#include <glib/gtypes.h>
+#include <glib/gmacros.h>
+
+#include <vector>
+#include <glibmm/object.h>
+#include <glibmm/quark.h>
+#include <glibmm/wrap.h>
+
+#include <glibmmconfig.h>
+GLIBMM_USING_STD(vector)
+
+
+namespace
+{
+
+// Although the new g_type_set_qdata() interface is used now, we still need
+// a table because we cannot assume that a function pointer fits into void*
+// on any platform. Nevertheless, indexing a vector costs almost nothing
+// compared to a map lookup.
+
+typedef std::vector<Glib::WrapNewFunction> WrapFuncTable;
+
+static WrapFuncTable* wrap_func_table = 0;
+
+
+static Glib::ObjectBase* create_new_wrapper(GObject* object)
+{
+ g_return_val_if_fail(wrap_func_table != 0, 0);
+
+ bool gtkmm_wrapper_already_deleted = (bool)g_object_get_qdata((GObject*)object, Glib::quark_cpp_wrapper_deleted_);
+ if(gtkmm_wrapper_already_deleted)
+ {
+ g_warning("Glib::create_new_wrapper: Attempted to create a 2nd C++ wrapper for a C instance whose C++ wrapper has been deleted.");
+ return 0;
+ }
+
+ // Traverse upwards through the inheritance hierarchy
+ // to find the most-specialized wrap_new() for this GType.
+ //
+ for(GType type = G_OBJECT_TYPE(object); type != 0; type = g_type_parent(type))
+ {
+ // Look up the wrap table index stored in the type's static data.
+ // If a wrap_new() has been registered for the type then call it.
+ //
+ if(const gpointer idx = g_type_get_qdata(type, Glib::quark_))
+ {
+ const Glib::WrapNewFunction func = (*wrap_func_table)[GPOINTER_TO_UINT(idx)];
+ return (*func)(object);
+ }
+ }
+
+ return 0;
+}
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+void wrap_register_init()
+{
+ g_type_init();
+
+ if(!Glib::quark_)
+ {
+ Glib::quark_ = g_quark_from_static_string("glibmm__Glib::quark_");
+ Glib::quark_cpp_wrapper_deleted_ = g_quark_from_static_string("glibmm__Glib::quark_cpp_wrapper_deleted_");
+ }
+
+ if(!wrap_func_table)
+ {
+ // Make the first element a dummy so we can detect unregistered types.
+ // g_type_get_qdata() returns NULL if no data has been set up.
+ wrap_func_table = new WrapFuncTable(1);
+ }
+}
+
+void wrap_register_cleanup()
+{
+ if(wrap_func_table)
+ {
+ delete wrap_func_table;
+ wrap_func_table = 0;
+ }
+}
+
+// Register the unique wrap_new() function of a new C++ wrapper type.
+// The GType argument specifies the parent C type to wrap from.
+//
+void wrap_register(GType type, WrapNewFunction func)
+{
+ const guint idx = wrap_func_table->size();
+ wrap_func_table->push_back(func);
+
+ // Store the table index in the type's static data.
+ g_type_set_qdata(type, Glib::quark_, GUINT_TO_POINTER(idx));
+}
+
+// This is a factory function that converts any type to
+// its C++ wrapper instance by looking up a wrap_new() function in a map.
+//
+ObjectBase* wrap_auto(GObject* object, bool take_copy)
+{
+ if(!object)
+ return 0;
+
+ // Look up current C++ wrapper instance:
+ ObjectBase* pCppObject =
+ static_cast<ObjectBase*>(g_object_get_qdata(object, Glib::quark_));
+
+ if(!pCppObject)
+ {
+ // There's not already a wrapper: generate a new C++ instance.
+ pCppObject = create_new_wrapper(object);
+
+ if(!pCppObject)
+ {
+ g_warning("failed to wrap type of '%s'", G_OBJECT_TYPE_NAME(object));
+ return 0;
+ }
+ }
+
+ // take_copy=true is used where the GTK+ function doesn't do
+ // an extra ref for us, and always for plain struct members.
+ if(take_copy)
+ pCppObject->reference();
+
+ return pCppObject;
+}
+
+Glib::RefPtr<Object> wrap(GObject* object, bool take_copy /* = false */)
+{
+ return Glib::RefPtr<Object>(dynamic_cast<Object*>(wrap_auto(object, take_copy)));
+}
+
+} /* namespace Glib */
+
diff --git a/libs/glibmm2/glibmm/wrap.h b/libs/glibmm2/glibmm/wrap.h
new file mode 100644
index 0000000000..58288ecd98
--- /dev/null
+++ b/libs/glibmm2/glibmm/wrap.h
@@ -0,0 +1,118 @@
+// -*- c++ -*-
+#ifndef _GLIBMM_WRAP_H
+#define _GLIBMM_WRAP_H
+
+/* $Id$ */
+
+/* Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glib-object.h>
+#include <glibmm/refptr.h>
+
+
+namespace Glib
+{
+
+class ObjectBase;
+class Object;
+
+// Type of the per-class wrap_new() functions.
+typedef Glib::ObjectBase* (*WrapNewFunction) (GObject*);
+
+// Setup and free the structures used by wrap_register().
+// Both functions might be called more than once.
+void wrap_register_init();
+void wrap_register_cleanup();
+
+// Register a new type for auto allocation.
+void wrap_register(GType type, WrapNewFunction func);
+
+// Return the current C++ wrapper instance of the GObject,
+// or automatically generate a new wrapper if there's none.
+Glib::ObjectBase* wrap_auto(GObject* object, bool take_copy = false);
+
+// Get a C++ instance that wraps the C instance.
+// This always returns the same C++ instance for the same C instance.
+// Each wrapper has it's own override of Glib::wrap().
+// use take_copy = true when wrapping a struct member.
+// TODO: move to object.h ?
+/** @relates Glib::Object */
+Glib::RefPtr<Glib::Object> wrap(GObject* object, bool take_copy = false);
+
+
+/** Get the underlying C instance from the C++ instance. This is just
+ * like calling gobj(), but it does its own check for a NULL pointer.
+ */
+template <class T> inline
+typename T::BaseObjectType* unwrap(T* ptr)
+{
+ return (ptr) ? ptr->gobj() : 0;
+}
+
+/** Get the underlying C instance from the C++ instance. This is just
+ * like calling gobj(), but it does its own check for a NULL pointer.
+ */
+template <class T> inline
+const typename T::BaseObjectType* unwrap(const T* ptr)
+{
+ return (ptr) ? ptr->gobj() : 0;
+}
+
+/** Get the underlying C instance from the C++ instance. This is just
+ * like calling gobj(), but it does its own check for a NULL pointer.
+ */
+template <class T> inline
+typename T::BaseObjectType* unwrap(const Glib::RefPtr<T>& ptr)
+{
+ return (ptr) ? ptr->gobj() : 0;
+}
+
+/** Get the underlying C instance from the C++ instance. This is just
+ * like calling gobj(), but it does its own check for a NULL pointer.
+ */
+template <class T> inline
+const typename T::BaseObjectType* unwrap(const Glib::RefPtr<const T>& ptr)
+{
+ return (ptr) ? ptr->gobj() : 0;
+}
+
+/** Get the underlying C instance from the C++ instance and acquire a
+ * reference. This is just like calling gobj_copy(), but it does its own
+ * check for a NULL pointer.
+ */
+template <class T> inline
+typename T::BaseObjectType* unwrap_copy(const Glib::RefPtr<T>& ptr)
+{
+ return (ptr) ? ptr->gobj_copy() : 0;
+}
+
+/** Get the underlying C instance from the C++ instance and acquire a
+ * reference. This is just like calling gobj_copy(), but it does its own
+ * check for a NULL pointer.
+ */
+template <class T> inline
+const typename T::BaseObjectType* unwrap_copy(const Glib::RefPtr<const T>& ptr)
+{
+ return (ptr) ? ptr->gobj_copy() : 0;
+}
+
+} // namespace Glib
+
+
+#endif /* _GLIBMM_WRAP_H */
+
diff --git a/libs/glibmm2/glibmm/wrap_init.cc b/libs/glibmm2/glibmm/wrap_init.cc
new file mode 100644
index 0000000000..54188b4045
--- /dev/null
+++ b/libs/glibmm2/glibmm/wrap_init.cc
@@ -0,0 +1,73 @@
+
+#include <glib.h>
+
+// Disable the 'const' function attribute of the get_type() functions.
+// GCC would optimize them out because we don't use the return value.
+#undef G_GNUC_CONST
+#define G_GNUC_CONST /* empty */
+
+#include <glibmm/wrap_init.h>
+#include <glibmm/error.h>
+#include <glibmm/object.h>
+
+// #include the widget headers so that we can call the get_type() static methods:
+
+#include "convert.h"
+#include "date.h"
+#include "fileutils.h"
+#include "iochannel.h"
+#include "markup.h"
+#include "module.h"
+#include "optioncontext.h"
+#include "optionentry.h"
+#include "optiongroup.h"
+#include "shell.h"
+#include "spawn.h"
+#include "thread.h"
+#include "unicode.h"
+
+extern "C"
+{
+
+//Declarations of the *_get_type() functions:
+
+
+//Declarations of the *_error_quark() functions:
+
+GQuark g_convert_error_quark(void);
+GQuark g_file_error_quark(void);
+GQuark g_io_channel_error_quark(void);
+GQuark g_markup_error_quark(void);
+GQuark g_option_error_quark(void);
+GQuark g_shell_error_quark(void);
+GQuark g_spawn_error_quark(void);
+GQuark g_thread_error_quark(void);
+} // extern "C"
+
+
+//Declarations of the *_Class::wrap_new() methods, instead of including all the private headers:
+
+
+namespace Glib {
+
+void wrap_init()
+{
+ // Register Error domains:
+ Glib::Error::register_domain(g_convert_error_quark(), &Glib::ConvertError::throw_func);
+ Glib::Error::register_domain(g_file_error_quark(), &Glib::FileError::throw_func);
+ Glib::Error::register_domain(g_io_channel_error_quark(), &Glib::IOChannelError::throw_func);
+ Glib::Error::register_domain(g_markup_error_quark(), &Glib::MarkupError::throw_func);
+ Glib::Error::register_domain(g_option_error_quark(), &Glib::OptionError::throw_func);
+ Glib::Error::register_domain(g_shell_error_quark(), &Glib::ShellError::throw_func);
+ Glib::Error::register_domain(g_spawn_error_quark(), &Glib::SpawnError::throw_func);
+ Glib::Error::register_domain(g_thread_error_quark(), &Glib::ThreadError::throw_func);
+
+// Map gtypes to gtkmm wrapper-creation functions:
+
+ // Register the gtkmm gtypes:
+
+} // wrap_init()
+
+} //Glib
+
+
diff --git a/libs/glibmm2/glibmm/wrap_init.h b/libs/glibmm2/glibmm/wrap_init.h
new file mode 100644
index 0000000000..63c8a1c8c0
--- /dev/null
+++ b/libs/glibmm2/glibmm/wrap_init.h
@@ -0,0 +1,38 @@
+// -*- c++ -*-
+#ifndef _GLIBMM_WRAP_INIT_H
+#define _GLIBMM_WRAP_INIT_H
+
+/* $Id$ */
+
+/* wrap_init.h
+ *
+ * Copyright 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/error.h>
+
+
+namespace Glib
+{
+
+void wrap_init();
+
+} // namespace Glib
+
+
+#endif /* _GLIBMM_WRAP_INIT_H */
+
diff --git a/libs/glibmm2/glibmmconfig.h.in b/libs/glibmm2/glibmmconfig.h.in
new file mode 100644
index 0000000000..dddcc07da5
--- /dev/null
+++ b/libs/glibmm2/glibmmconfig.h.in
@@ -0,0 +1,85 @@
+#ifndef _GLIBMM_CONFIG_H
+#define _GLIBMM_CONFIG_H 1
+
+/* version numbers */
+#undef GLIBMM_MAJOR_VERSION
+#undef GLIBMM_MINOR_VERSION
+#undef GLIBMM_MICRO_VERSION
+
+// detect common platforms
+#if defined(_WIN32)
+// Win32 compilers have a lot of varation
+#if defined(_MSC_VER)
+#define GLIBMM_MSC
+#define GLIBMM_WIN32
+#define GLIBMM_DLL
+#elif defined(__CYGWIN__)
+#define GLIBMM_CONFIGURE
+#elif defined(__MINGW32__)
+#define GLIBMM_WIN32
+#define GLIBMM_CONFIGURE
+#else
+//AIX clR compiler complains about this even though it doesn't get this far:
+//#warning "Unknown architecture (send me gcc --dumpspecs or equiv)"
+#endif
+#else
+#define GLIBMM_CONFIGURE
+#endif /* _WIN32 */
+
+#ifdef GLIBMM_CONFIGURE
+/* compiler feature tests that are used during compile time and run-time
+ by gtk-- only. tests used by gdk-- and gtk-- should go into
+ gdk--config.h.in */
+#undef GLIBMM_CXX_HAVE_MUTABLE
+#undef GLIBMM_CXX_HAVE_NAMESPACES
+//#undef GLIBMM_CXX_GAUB
+//#undef GLIBMM_CXX_AMBIGUOUS_TEMPLATES
+#undef GLIBMM_HAVE_NAMESPACE_STD
+#undef GLIBMM_HAVE_STD_ITERATOR_TRAITS
+#undef GLIBMM_HAVE_SUN_REVERSE_ITERATOR
+#undef GLIBMM_HAVE_TEMPLATE_SEQUENCE_CTORS
+#undef GLIBMM_HAVE_DISAMBIGUOUS_CONST_TEMPLATE_SPECIALIZATIONS
+#undef GLIBMM_COMPILER_SUN_FORTE
+#undef GLIBMM_DEBUG_REFCOUNTING
+#undef GLIBMM_CAN_USE_DYNAMIC_CAST_IN_UNUSED_TEMPLATE_WITHOUT_DEFINITION
+#undef GLIBMM_CAN_ASSIGN_NON_EXTERN_C_FUNCTIONS_TO_EXTERN_C_CALLBACKS
+#undef GLIBMM_CAN_USE_NAMESPACES_INSIDE_EXTERNC
+#undef GLIBMM_HAVE_ALLOWS_STATIC_INLINE_NPOS
+#endif
+
+#ifdef GLIBMM_MSC
+ #define GLIBMM_CXX_HAVE_MUTABLE 1
+ #define GLIBMM_CXX_HAVE_NAMESPACES 1
+ #define GLIBMM_HAVE_NAMESPACE_STD 1
+ #define GLIBMM_HAVE_STD_ITERATOR_TRAITS 1
+ #define GLIBMM_HAVE_TEMPLATE_SEQUENCE_CTORS 2
+ #define GLIBMM_HAVE_DISAMBIGUOUS_CONST_TEMPLATE_SPECIALIZATIONS 1
+ #define GLIBMM_CAN_USE_DYNAMIC_CAST_IN_UNUSED_TEMPLATE_WITHOUT_DEFINITION 1
+ #define GLIBMM_CAN_ASSIGN_NON_EXTERN_C_FUNCTIONS_TO_EXTERN_C_CALLBACKS 1
+ #define GLIBMM_CAN_USE_NAMESPACES_INSIDE_EXTERNC 1
+ #define GLIBMM_HAVE_ALLOWS_STATIC_INLINE_NPOS 1
+ #pragma warning (disable: 4786 4355 4800 4181)
+#endif
+
+#ifndef GLIBMM_HAVE_NAMESPACE_STD
+# define GLIBMM_USING_STD(Symbol) namespace std { using ::Symbol; }
+#else
+# define GLIBMM_USING_STD(Symbol) /* empty */
+#endif
+
+#ifdef GLIBMM_DLL
+ #if defined(GLIBMM_BUILD) && defined(_WINDLL)
+ /* Do not dllexport as it is handled by gendef on MSVC */
+ #define GLIBMM_API
+ #elif !defined(GLIBMM_BUILD)
+ #define GLIBMM_API __declspec(dllimport)
+ #else
+ /* Build a static library */
+ #define GLIBMM_API
+ #endif /* GLIBMM_BUILD - _WINDLL */
+#else
+ #define GLIBMM_API
+#endif /* GLIBMM_DLL */
+
+#endif /* _GLIBMM_CONFIG_H */
+
diff --git a/libs/glibmm2/scripts/.cvsignore b/libs/glibmm2/scripts/.cvsignore
new file mode 100644
index 0000000000..f480274b19
--- /dev/null
+++ b/libs/glibmm2/scripts/.cvsignore
@@ -0,0 +1,5 @@
+config.guess
+config.sub
+install-sh
+ltmain.sh
+missing
diff --git a/libs/glibmm2/scripts/cxx.m4 b/libs/glibmm2/scripts/cxx.m4
new file mode 100644
index 0000000000..8dce019940
--- /dev/null
+++ b/libs/glibmm2/scripts/cxx.m4
@@ -0,0 +1,364 @@
+
+dnl
+dnl AC_CXX_NAMESPACES(ACTION_FOUND,ACTION_NOT_FOUND)
+dnl
+AC_DEFUN([AC_CXX_NAMESPACES],[
+AC_MSG_CHECKING(if C++ compiler supports namespaces)
+AC_TRY_COMPILE(
+[
+namespace Foo { struct A {}; }
+using namespace Foo;
+],[
+A a;
+(void)a;
+],[
+ ac_cxx_namespaces=yes
+ AC_MSG_RESULT([$ac_cxx_namespaces])
+ $1
+],[
+ ac_cxx_namespaces=no
+ AC_MSG_RESULT([$ac_cxx_namespaces])
+ $2
+])
+])
+
+dnl
+dnl AC_CXX_NAMESPACES(ACTION_FOUND,ACTION_NOT_FOUND)
+dnl
+AC_DEFUN([AC_CXX_BOOL],[
+AC_MSG_CHECKING(if C++ compiler supports bool)
+AC_TRY_COMPILE(
+[
+],[
+ bool b=true;
+ bool b1=false;
+ (void)b;
+ (void)b1;
+],[
+ ac_cxx_bool=yes
+ AC_MSG_RESULT([$ac_cxx_bool])
+ $1
+],[
+ ac_cxx_bool=no
+ AC_MSG_RESULT([$ac_cxx_bool])
+ $2
+])
+])
+
+dnl
+dnl AC_CXX_MUTABLE(ACTION_FOUND,ACTION_NOT_FOUND)
+dnl
+AC_DEFUN([AC_CXX_MUTABLE],[
+AC_MSG_CHECKING(if C++ compiler supports mutable)
+AC_TRY_COMPILE(
+[
+class k {
+ mutable char *c;
+public:
+ void foo() const { c=0; }
+};
+],[
+],[
+ ac_cxx_mutable=yes
+ AC_MSG_RESULT([$ac_cxx_mutable])
+ $1
+],[
+ ac_cxx_mutable=no
+ AC_MSG_RESULT([$ac_cxx_mutable])
+ $2
+])
+])
+
+
+dnl
+dnl AC_CXX_CONST_CAST(ACTION_FOUND,ACTION_NOT_FOUND)
+dnl
+AC_DEFUN([AC_CXX_CONST_CAST],[
+AC_MSG_CHECKING([if C++ compiler supports const_cast<>])
+AC_TRY_COMPILE(
+[
+ class foo;
+],[
+ const foo *c=0;
+ foo *c1=const_cast<foo*>(c);
+ (void)c1;
+],[
+ ac_cxx_const_cast=yes
+ AC_MSG_RESULT([$ac_cxx_const_cast])
+],[
+ ac_cxx_const_cast=no
+ AC_MSG_RESULT([$ac_cxx_const_cast])
+])
+])
+
+
+dnl
+dnl GLIBMM_CXX_MEMBER_FUNCTIONS_MEMBER_TEMPLATES(ACTION_FOUND,ACTION_NOT_FOUND)
+dnl
+dnl Test whether the compiler allows member functions to refer to spezialized member function templates.
+dnl Some compilers have problems with this. gcc 2.95.3 aborts with an internal compiler error.
+dnl
+AC_DEFUN([GLIBMM_CXX_MEMBER_FUNCTIONS_MEMBER_TEMPLATES],[
+AC_MSG_CHECKING([if C++ compiler allows member functions to refer to member templates])
+AC_TRY_COMPILE(
+[
+ struct foo {
+ template <class C> inline
+ void doit();
+ void thebug();
+ };
+
+ template <class C> inline
+ void foo::doit() {
+ }
+
+ struct bar {
+ void neitherabug();
+ };
+
+ void notabug() {
+ void (foo::*func)();
+ func = &foo::doit<int>;
+ (void)func;
+ }
+
+ void bar::neitherabug() {
+ void (foo::*func)();
+ func = &foo::doit<int>;
+ (void)func;
+ }
+
+ void foo::thebug() {
+ void (foo::*func)();
+ func = &foo::doit<int>; //Compiler bugs usually show here.
+ (void)func;
+ }
+],[],[
+ glibmm_cxx_member_functions_member_templates=yes
+ AC_DEFINE([GLIBMM_MEMBER_FUNCTIONS_MEMBER_TEMPLATES],[1],[does the C++ compiler allow member functions to refer to member templates])
+ AC_MSG_RESULT([$glibmm_cxx_member_functions_member_templates])
+],[
+ glibmm_cxx_member_functions_member_templates=no
+ AC_DEFINE([GLIBMM_MEMBER_FUNCTIONS_MEMBER_TEMPLATES],[0])
+ AC_MSG_RESULT([$glibmm_cxx_member_functions_member_templates])
+])
+])
+
+## GLIBMM_CXX_CAN_DISAMBIGUATE_CONST_TEMPLATE_SPECIALIZATIONS()
+##
+## Check whether the compiler finds it ambiguous to have both
+## const and non-const template specializations,
+## The SUN Forte compiler has this problem, though we are
+## not 100% sure that it's a C++ standards violation.
+##
+AC_DEFUN([GLIBMM_CXX_CAN_DISAMBIGUATE_CONST_TEMPLATE_SPECIALIZATIONS],
+[
+ AC_REQUIRE([GLIBMM_CXX_HAS_NAMESPACE_STD])
+
+ AC_CACHE_CHECK(
+ [whether the compiler finds it ambiguous to have both const and non-const template specializations],
+ [glibmm_cv_cxx_can_disambiguate_const_template_specializations],
+ [
+ AC_TRY_COMPILE(
+ [
+ #include <iostream>
+
+ template <class T> class Foo {};
+
+ template <typename T> class Traits {
+ public:
+ const char* whoami() {
+ return "generic template";
+ }
+ };
+
+ template <typename T> class Traits<Foo<T> > {
+ public:
+ const char* whoami() {
+ return "partial specialization for Foo<T>";
+ }
+ };
+
+ template <typename T> class Traits<Foo<const T> > {
+ public:
+ const char* whoami() {
+ return "partial specialization for Foo<const T>";
+ }
+ };
+
+ ],[
+ Traits<int> it;
+ Traits<Foo<int> > fit;
+ Traits<Foo<const int> > cfit;
+
+ std::cout << "Traits<int> --> "
+ << it.whoami() << std::endl;
+ std::cout << "Traits<Foo<int>> --> "
+ << fit.whoami() << std::endl;
+ std::cout << "Traits<Foo<const int >> --> "
+ << cfit.whoami() << std::endl;
+ ],
+ [glibmm_cv_cxx_can_disambiguate_const_template_specializations="yes"],
+ [glibmm_cv_cxx_can_disambiguate_const_template_specializations="no"]
+ )
+ ])
+
+ if test "x${glibmm_cv_cxx_can_disambiguate_const_template_specializations}" = "xyes"; then
+ {
+ AC_DEFINE([GLIBMM_HAVE_DISAMBIGUOUS_CONST_TEMPLATE_SPECIALIZATIONS],[1], [Defined if the compiler does not find it ambiguous to have both const and non-const template specializations])
+ }
+ fi
+])
+
+
+
+## GLIBMM_CXX_CAN_USE_DYNAMIC_CAST_IN_UNUSED_TEMPLATE_WITHOUT_DEFINITION()
+##
+## Check whether the compiler allows us to define a template that uses
+## dynamic_cast<> with an object whose type is not defined,
+## even if we do not use that template before we have defined the type.
+## This should probably not be allowed anyway.
+##
+AC_DEFUN([GLIBMM_CXX_CAN_USE_DYNAMIC_CAST_IN_UNUSED_TEMPLATE_WITHOUT_DEFINITION],
+[
+ AC_CACHE_CHECK(
+ [whether the compiler allows us to define a template that uses dynamic_cast<> with an object whose type is not yet defined],
+ [glibmm_cv_cxx_can_use_dynamic_cast_in_unused_template_without_definition],
+ [
+ AC_TRY_COMPILE(
+ [
+ class SomeClass;
+
+ SomeClass* some_function();
+
+ template <class T>
+ class SomeTemplate
+ {
+ static bool do_something()
+ {
+ //This does not compile, with the MipsPro (IRIX) compiler
+ //even if we don't use this template at all.
+ //(We would use it later, after we have defined the type).
+ return dynamic_cast<T*>(some_function());
+ }
+ };
+
+ ],[
+
+ ],
+ [glibmm_cv_cxx_can_use_dynamic_cast_in_unused_template_without_definition="yes"],
+ [glibmm_cv_cxx_can_use_dynamic_cast_in_unused_template_without_definition="no"]
+ )
+ ])
+
+ if test "x${glibmm_cv_cxx_can_use_dynamic_cast_in_unused_template_without_definition}" = "xyes"; then
+ {
+ AC_DEFINE([GLIBMM_CAN_USE_DYNAMIC_CAST_IN_UNUSED_TEMPLATE_WITHOUT_DEFINITION],[1], [Defined if the compiler allows us to define a template that uses dynamic_cast<> with an object whose type is not yet defined.])
+ }
+ fi
+])
+
+
+## GLIBMM_CXX_CAN_ASSIGN_NON_EXTERN_C_FUNCTIONS_TO_EXTERN_C_CALLBACKS()
+##
+## Check whether the compiler allows us to use a non-extern "C" function,
+## such as a static member function, to an extern "C" function pointer,
+## such as a GTK+ callback.
+## This should not be allowed anyway.
+##
+AC_DEFUN([GLIBMM_CXX_CAN_ASSIGN_NON_EXTERN_C_FUNCTIONS_TO_EXTERN_C_CALLBACKS],
+[
+ AC_CACHE_CHECK(
+ [whether the the compilerallows us to use a non-extern "C" function for an extern "C" function pointer.],
+ [glibmm_cv_cxx_can_assign_non_extern_c_functions_to_extern_c_callbacks],
+ [
+ AC_TRY_COMPILE(
+ [
+ extern "C"
+ {
+ struct somestruct
+ {
+ void (*callback) (int);
+ };
+
+ } // extern "C"
+
+ void somefunction(int)
+ {
+ }
+
+ ],[
+ somestruct something;
+ something.callback = &somefunction;
+ ],
+ [glibmm_cv_cxx_can_assign_non_extern_c_functions_to_extern_c_callbacks="yes"],
+ [glibmm_cv_cxx_can_assign_non_extern_c_functions_to_extern_c_callbacks="no"]
+ )
+ ])
+
+ if test "x${glibmm_cv_cxx_can_assign_non_extern_c_functions_to_extern_c_callbacks}" = "xyes"; then
+ {
+ AC_DEFINE([GLIBMM_CAN_ASSIGN_NON_EXTERN_C_FUNCTIONS_TO_EXTERN_C_CALLBACKS],[1], [Defined if the compiler allows us to use a non-extern "C" function for an extern "C" function pointer.])
+ }
+ fi
+])
+
+## GLIBMM_CXX_CAN_USE_NAMESPACES_INSIDE_EXTERNC()
+##
+## Check whether the compiler puts extern "C" functions in the global namespace,
+## even inside a namespace declaration. The AIX xlC compiler does this, and also
+## gets confused if we declare the namespace again inside the extern "C" block.
+## This seems like a compiler bug, but not a serious one.
+##
+AC_DEFUN([GLIBMM_CXX_CAN_USE_NAMESPACES_INSIDE_EXTERNC],
+[
+ AC_CACHE_CHECK(
+ [whether the compiler uses namespace declarations inside extern "C" blocks.],
+ [glibmm_cv_cxx_can_use_namespaces_inside_externc],
+ [
+ AC_TRY_COMPILE(
+ [
+ namespace test
+ {
+
+ extern "C"
+ {
+
+ void do_something();
+
+ } //extern C
+
+
+ class Something
+ {
+ protected:
+ int i;
+
+ friend void do_something();
+ };
+
+ void do_something()
+ {
+ Something something;
+ something.i = 1;
+ }
+
+ } //namespace
+
+
+ ],[
+
+ ],
+ [glibmm_cv_cxx_can_use_namespaces_inside_externc="yes"],
+ [glibmm_cv_cxx_can_use_namespaces_inside_externc="no"]
+ )
+ ])
+
+ if test "x${glibmm_cv_cxx_can_use_namespaces_inside_externc}" = "xyes"; then
+ {
+ AC_DEFINE([GLIBMM_CAN_USE_NAMESPACES_INSIDE_EXTERNC],[1], [Defined if the compiler whether the compiler uses namespace declarations inside extern "C" blocks.])
+ }
+ fi
+])
+
+
diff --git a/libs/glibmm2/scripts/cxx_std.m4 b/libs/glibmm2/scripts/cxx_std.m4
new file mode 100644
index 0000000000..cb64fd4afe
--- /dev/null
+++ b/libs/glibmm2/scripts/cxx_std.m4
@@ -0,0 +1,195 @@
+cv_cxx_has_namespace_std
+## GLIBMM_CXX_HAS_NAMESPACE_STD()
+##
+## Test whether libstdc++ declares namespace std. For safety,
+## also check whether several randomly selected STL symbols
+## are available in namespace std.
+##
+## On success, #define GLIBMM_HAVE_NAMESPACE_STD to 1.
+##
+AC_DEFUN([GLIBMM_CXX_HAS_NAMESPACE_STD],
+[
+ AC_CACHE_CHECK(
+ [whether C++ library symbols are declared in namespace std],
+ [gtkmm_cv_cxx_has_namespace_std],
+ [
+ AC_TRY_COMPILE(
+ [
+ #include <algorithm>
+ #include <iterator>
+ #include <iostream>
+ #include <string>
+ ],[
+ using std::min;
+ using std::find;
+ using std::copy;
+ using std::bidirectional_iterator_tag;
+ using std::string;
+ using std::istream;
+ using std::cout;
+ ],
+ [gtkmm_cv_cxx_has_namespace_std="yes"],
+ [gtkmm_cv_cxx_has_namespace_std="no"]
+ )
+ ])
+
+ if test "x${gtkmm_cv_cxx_has_namespace_std}" = "xyes"; then
+ {
+ AC_DEFINE([GLIBMM_HAVE_NAMESPACE_STD],[1], [Defined when the libstdc++ declares the std-namespace])
+ }
+ fi
+])
+
+
+## GLIBMM_CXX_HAS_STD_ITERATOR_TRAITS()
+##
+## Check for standard-conform std::iterator_traits<>, and
+## #define GLIBMM_HAVE_STD_ITERATOR_TRAITS on success.
+##
+AC_DEFUN([GLIBMM_CXX_HAS_STD_ITERATOR_TRAITS],
+[
+ AC_REQUIRE([GLIBMM_CXX_HAS_NAMESPACE_STD])
+
+ AC_CACHE_CHECK(
+ [whether the C++ library supports std::iterator_traits],
+ [gtkmm_cv_cxx_has_std_iterator_traits],
+ [
+ AC_TRY_COMPILE(
+ [
+ #include <iterator>
+ #ifdef GLIBMM_HAVE_NAMESPACE_STD
+ using namespace std;
+ #endif
+ ],[
+ typedef iterator_traits<char*>::value_type ValueType;
+ ],
+ [gtkmm_cv_cxx_has_std_iterator_traits="yes"],
+ [gtkmm_cv_cxx_has_std_iterator_traits="no"]
+ )
+ ])
+
+ if test "x${gtkmm_cv_cxx_has_std_iterator_traits}" = "xyes"; then
+ {
+ AC_DEFINE([GLIBMM_HAVE_STD_ITERATOR_TRAITS],[1], [Defined if std::iterator_traits<> is standard-conforming])
+ }
+ fi
+])
+
+
+## GLIBMM_CXX_HAS_SUN_REVERSE_ITERATOR()
+##
+## Check for Sun libCstd style std::reverse_iterator,
+## and #define GLIBMM_HAVE_SUN_REVERSE_ITERATOR if found.
+##
+AC_DEFUN([GLIBMM_CXX_HAS_SUN_REVERSE_ITERATOR],
+[
+ AC_REQUIRE([GLIBMM_CXX_HAS_NAMESPACE_STD])
+
+ AC_CACHE_CHECK(
+ [for non-standard Sun libCstd reverse_iterator],
+ [gtkmm_cv_cxx_has_sun_reverse_iterator],
+ [
+ AC_TRY_COMPILE(
+ [
+ #include <iterator>
+ #ifdef GLIBMM_HAVE_NAMESPACE_STD
+ using namespace std;
+ #endif
+ ],[
+ typedef reverse_iterator<char*,random_access_iterator_tag,char,char&,char*,int> ReverseIter;
+ ],
+ [gtkmm_cv_cxx_has_sun_reverse_iterator="yes"],
+ [gtkmm_cv_cxx_has_sun_reverse_iterator="no"]
+ )
+ ])
+
+ if test "x${gtkmm_cv_cxx_has_sun_reverse_iterator}" = "xyes"; then
+ {
+ AC_DEFINE([GLIBMM_HAVE_SUN_REVERSE_ITERATOR],[1], [Defined if std::reverse_iterator is in Sun libCstd style])
+ }
+ fi
+])
+
+
+## GLIBMM_CXX_HAS_TEMPLATE_SEQUENCE_CTORS()
+##
+## Check whether the STL containers have templated sequence ctors,
+## and #define GLIBMM_HAVE_TEMPLATE_SEQUENCE_CTORS on success.
+##
+AC_DEFUN([GLIBMM_CXX_HAS_TEMPLATE_SEQUENCE_CTORS],
+[
+ AC_REQUIRE([GLIBMM_CXX_HAS_NAMESPACE_STD])
+
+ AC_CACHE_CHECK(
+ [whether STL containers have templated sequence constructors],
+ [gtkmm_cv_cxx_has_template_sequence_ctors],
+ [
+ AC_TRY_COMPILE(
+ [
+ #include <vector>
+ #include <deque>
+ #include <list>
+ #ifdef GLIBMM_HAVE_NAMESPACE_STD
+ using namespace std;
+ #endif
+ ],[
+ const int array[8] = { 0, };
+ vector<int> test_vector (&array[0], &array[8]);
+ deque<short> test_deque (test_vector.begin(), test_vector.end());
+ list<long> test_list (test_deque.begin(), test_deque.end());
+ test_vector.assign(test_list.begin(), test_list.end());
+ ],
+ [gtkmm_cv_cxx_has_template_sequence_ctors="yes"],
+ [gtkmm_cv_cxx_has_template_sequence_ctors="no"]
+ )
+ ])
+
+ if test "x${gtkmm_cv_cxx_has_template_sequence_ctors}" = "xyes"; then
+ {
+ AC_DEFINE([GLIBMM_HAVE_TEMPLATE_SEQUENCE_CTORS],[1], [Defined if the STL containers have templated sequence ctors])
+ }
+ fi
+])
+
+## GLIBMM_CXX_ALLOWS_STATIC_INLINE_NPOS()
+##
+## Check whether the a static member variable may be initialized inline to std::string::npos.
+## The MipsPro (IRIX) compiler does not like this.
+## and #define GLIBMM_HAVE_ALLOWS_STATIC_INLINE_NPOS on success.
+##
+AC_DEFUN([GLIBMM_CXX_ALLOWS_STATIC_INLINE_NPOS],
+[
+ AC_REQUIRE([GLIBMM_CXX_HAS_NAMESPACE_STD])
+
+ AC_CACHE_CHECK(
+ [whether the compiler allows a static member variable to be initialized inline to std::string::npos],
+ [gtkmm_cv_cxx_has_allows_static_inline_npos],
+ [
+ AC_TRY_COMPILE(
+ [
+ #include <string>
+ #include <iostream>
+
+ class ustringtest
+ {
+ public:
+ //The MipsPro compiler (IRIX) says "The indicated constant value is not known",
+ //so we need to initalize the static member data elsewhere.
+ static const std::string::size_type ustringnpos = std::string::npos;
+ };
+ ],[
+ std::cout << "npos=" << ustringtest::ustringnpos << std::endl;
+ ],
+ [gtkmm_cv_cxx_has_allows_static_inline_npos="yes"],
+ [gtkmm_cv_cxx_has_allows_static_inline_npos="no"]
+ )
+ ])
+
+ if test "x${gtkmm_cv_cxx_has_allows_static_inline_npos}" = "xyes"; then
+ {
+ AC_DEFINE([GLIBMM_HAVE_ALLOWS_STATIC_INLINE_NPOS],[1], [Defined if a static member variable may be initialized inline to std::string::npos])
+ }
+ fi
+])
+
+
diff --git a/libs/glibmm2/scripts/macros.m4 b/libs/glibmm2/scripts/macros.m4
new file mode 100644
index 0000000000..dc125a3c9c
--- /dev/null
+++ b/libs/glibmm2/scripts/macros.m4
@@ -0,0 +1,134 @@
+dnl
+dnl Some macros needed for autoconf
+dnl
+
+dnl AL_PROG_GNU_M4(ACTION_NOT_FOUND)
+dnl Check for GNU m4. (sun won't do.)
+dnl
+AC_DEFUN([AL_PROG_GNU_M4],[
+AC_CHECK_PROGS(M4, gm4 m4, m4)
+
+if test "$M4" = "m4"; then
+ AC_MSG_CHECKING(whether m4 is GNU m4)
+ if $M4 --version </dev/null 2>/dev/null | grep '^GNU m4 ' >/dev/null ; then
+ AC_MSG_RESULT(yes)
+ else
+ AC_MSG_RESULT(no)
+ if test "$host_vendor" = "sun"; then
+ $1
+ fi
+ fi
+fi
+])
+
+
+dnl AL_PROG_GNU_MAKE(ACTION_NOT_FOUND)
+dnl Check for GNU make (no sun make)
+dnl
+AC_DEFUN([AL_PROG_GNU_MAKE],[
+dnl
+dnl Check for GNU make (stolen from gtk+/configure.in)
+AC_MSG_CHECKING(whether make is GNU Make)
+if $ac_make --version 2>/dev/null | grep '^GNU Make ' >/dev/null ; then
+ AC_MSG_RESULT(yes)
+else
+ AC_MSG_RESULT(no)
+ if test "$host_vendor" = "sun" ; then
+ $1
+ fi
+fi
+])
+
+dnl AL_ACLOCAL_INCLUDE(macrodir)
+dnl Add a directory to macro search (from gnome)
+AC_DEFUN([AL_ACLOCAL_INCLUDE],
+[
+ test "x$ACLOCAL_FLAGS" = "x" || ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS"
+ for dir in $1
+ do
+ ACLOCAL="$ACLOCAL -I $srcdir/$dir"
+ done
+])
+
+
+## GLIBMM_ARG_ENABLE_DEBUG_REFCOUNTING()
+##
+## Provide the --enable-debug-refcounting configure argument, disabled
+## by default. If enabled, #define GTKMM_DEBUG_REFCOUNTING.
+##
+AC_DEFUN([GLIBMM_ARG_ENABLE_DEBUG_REFCOUNTING],
+[
+ AC_ARG_ENABLE([debug-refcounting],
+ [ --enable-debug-refcounting Print a debug message on every ref/unref.
+ [[default=disabled]]],
+ [glibmm_debug_refcounting="$enableval"],
+ [glibmm_debug_refcounting='no'])
+
+ if test "x$glibmm_debug_refcounting" = "xyes"; then
+ {
+ AC_DEFINE([GLIBMM_DEBUG_REFCOUNTING],[1], [Defined when the --enable-debug-refcounting configure argument was given])
+ }
+ fi
+])
+
+
+## GTKMM_ARG_ENABLE_WARNINGS()
+##
+## Provide the --enable-warnings configure argument, set to 'minimum'
+## by default.
+##
+AC_DEFUN([GTKMM_ARG_ENABLE_WARNINGS],
+[
+ AC_ARG_ENABLE([warnings],
+ [ --enable-warnings=[[none|minimum|maximum|hardcore]]
+ Control compiler pickyness. [[default=minimum]]],
+ [gtkmm_enable_warnings="$enableval"],
+ [gtkmm_enable_warnings='minimum'])
+
+ AC_MSG_CHECKING([for compiler warning flags to use])
+
+ gtkmm_warning_flags=''
+
+ case "$gtkmm_enable_warnings" in
+ minimum|yes) gtkmm_warning_flags='-Wall -Wno-long-long';;
+ maximum) gtkmm_warning_flags='-pedantic -W -Wall -Wno-long-long';;
+ hardcore) gtkmm_warning_flags='-pedantic -W -Wall -Wno-long-long -Werror';;
+ esac
+
+ gtkmm_use_flags=''
+
+ if test "x$gtkmm_warning_flags" != "x"
+ then
+ echo 'int foo() { return 0; }' > conftest.cc
+
+ for flag in $gtkmm_warning_flags
+ do
+ # Test whether the compiler accepts the flag. GCC doesn't bail
+ # out when given an unsupported flag but prints a warning, so
+ # check the compiler output instead.
+ gtkmm_cxx_out="`$CXX $flag -c conftest.cc 2>&1`"
+ rm -f conftest.$OBJEXT
+ test "x${gtkmm_cxx_out}" = "x" && \
+ gtkmm_use_flags="${gtkmm_use_flags:+$gtkmm_use_flags }$flag"
+ done
+
+ rm -f conftest.cc
+ gtkmm_cxx_out=''
+ fi
+
+ if test "x$gtkmm_use_flags" != "x"
+ then
+ for flag in $gtkmm_use_flags
+ do
+ case " $CXXFLAGS " in
+ *" $flag "*) ;; # don't add flags twice
+ *) CXXFLAGS="${CXXFLAGS:+$CXXFLAGS }$flag";;
+ esac
+ done
+ else
+ gtkmm_use_flags='none'
+ fi
+
+ AC_MSG_RESULT([$gtkmm_use_flags])
+])
+
diff --git a/libs/gtkmm2/AUTHORS b/libs/gtkmm2/AUTHORS
new file mode 100644
index 0000000000..35ef03fe26
--- /dev/null
+++ b/libs/gtkmm2/AUTHORS
@@ -0,0 +1,20 @@
+Please use the mailing list (gtkmm-list@gnome.org) instead of emailing developers directly.
+See the ChangeLog for up-to-date information.
+
+Murray Cumming <murrayc@usa.net>
+Daniel Elstner <daniel.elstner@gmx.net>
+
+Some former contributors:
+
+Karl Nelson <kenelson@ece.ucdavis.edu>
+Tero Pulkkinen <terop@modeemi.cs.tut.fi>
+Elliot Lee <sopwith@redhat.com>
+Phil Dawes <P.L.Dawes-CSSE94@cs.bham.ac.uk>
+Erik Andersen <andersee@debian.org>
+Bibek Sahu <scorpio@dodds.net>
+Mirko Streckenbach
+Havoc Pennington <hp@pobox.com>
+Guillaume Laurent <glaurent@telegraph-road.org>
+Todd Dukes <tdukes@ibmoto.com>
+Peter Lerner <peter.lerner@bnbt.de>
+Herbert Valerio Riedel <hvr@gnu.org>
diff --git a/libs/gtkmm2/CHANGES b/libs/gtkmm2/CHANGES
new file mode 100644
index 0000000000..20c0771eb2
--- /dev/null
+++ b/libs/gtkmm2/CHANGES
@@ -0,0 +1,88 @@
+*** Changes from gtkmm 2.4 to 2.6:
+
+* Added IconView, FileChooserButton, and CellView widgets.
+
+* New API for existing classes:
+ TODO
+
+*** Changes from gtkmm 2.0/2.2 to gtkmm 2.4:
+
+* Useless signals not wrapped.
+
+* Use of libsigc++ 2 instead of libsigc++ 1.2. See the glibmm CHANGES for details of the syntax.
+
+* It is now easier to see which signal you should handle, because there are less of them.
+ Previously we wrapped key-binding signals, but they were quite useless for gtkmm coders.
+
+* Use of Gdk::Device and Gtk::SelectionData instead of C equivalents
+ (Murray Cumming)
+
+* New classes:
+
+ UIManager: Action-based menu and toolbar items.
+ - Add Actions to an ActionGroup.
+ - Add the ActionGroup to the UIManager.
+ - Layout the Menus and Toolbars, with an XML string. Toolbar items and menu items can share the same Action.
+ - Add the Layout string to the UIManager.
+ - Get a top-level menu or toolbar from the UIManager and put it in a container.
+
+ ComboBox, ComboBoxText, ComboBoxEntry, CellLayout
+
+ EntryCompletion
+
+ ColorButton, FontButton: Buttons that open selection dialogs when clicked, and show the result inside the button.
+
+ Expander: A disclosure triangle, to hide distracting widgets.
+
+ FileChooser: A new File Selection widget.
+
+ RadioToolButton, SeparatorToolItem, ToggleToolButton, ToolItem, ToolButton
+
+ IconTheme, IconInfo
+
+* New API for existing classes:
+ Gtk::AccelMap: lock_path(), unlock_path()
+ Gtk::Alignment: get/set_padding(). Useful for indenting Gtk::Frame contents.
+ Gtk::Button: get/set_focus_on_click() get/set_alignment()
+ Gtk::ButtonBox: get_child_secondary().
+ Gtk::Calendar:
+ - display_options() is now set_display_options().
+ - New properties.
+ Gtk::Clipboard: wait_for_targets(), and a simpler request_targets().
+ Gtk::CheckMenuItem: get/set_draw_as_radio()
+ Gtk::Entry: get/set_completion()
+ Gtk::EventBox: get/set_visible_window(), get/set_above_child()
+ Gtk::IconSource: get/set_icon_name()
+ Gtk::Menu: attach(), set_monitor()
+ Gtk::MenuItem: unset_accel_path()
+ Gtk::MenuShell: cancel()
+ Gtk::MessageDialog:
+ - set_markup()
+ - Constructors: Added bool use_markup paramater after message parameter.
+ This is an API change, and I'd leak to hear suggestions for alternatives.
+ Gtk::TextBuffer: select_range()
+ Gtk::TextIter (also known as Gtk::TextBuffer::iterator):
+ Added *_visible_* versions of forwards/backwards methods.
+ Gtk::TextView:
+ - get/set_overwrite(), get/set_accepts_tab()
+ - Added WRAP_WORD_CHAR wrap mode.
+ Gtk::TreeViewColumn (also known as Gtk::TreeView::Column):
+ Added get/set_expand(), get_cell_position()
+ Gtk::Widget:
+ - queue_resize_no_redraw(), get/set__no_show_all()
+ - Added unset_fg(), unset_bg(), unset_font(), unset_text(), unset_base().
+ - Added add_modal_grab(), remove_modal_grab(), get_current_modal_grab().
+ (Ole Laursen)
+ - Added set_window() and set_allocation() for implementing new native widgets.
+ (Detlef Reichl)
+ Gtk::Window: set_default_icon(), set_keep_above(), set_keep_below()
+
+ Gdk::Cursor: new constructor: Cursor(const Glib::RefPtr<Display>& display, const Glib::RefPtr<Pixbuf>& pixbuf, int x, int y)
+ Gdk::Display: flush(), supports_cursor_alpha(), supports_cursor_color(), get_default_cursor_size(),
+ get_maximal_cursor_size(), set_double_click_distance(), get_default_group().
+ Gdk::Pixbuf: get_formats().
+ Gdk::PixbufLoader: create() now has extra bool mime_type parameter.
+ Gdk::Window: set_keep_above(), set_keep_below().
+
+ Pango:LayoutLine: get_length(), get_start_index(), and get_layout().
+
diff --git a/libs/gtkmm2/COPYING b/libs/gtkmm2/COPYING
new file mode 100644
index 0000000000..c4792dd27a
--- /dev/null
+++ b/libs/gtkmm2/COPYING
@@ -0,0 +1,515 @@
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations
+below.
+
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+^L
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it
+becomes
+a de-facto standard. To achieve this, non-free programs must be
+allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+^L
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control
+compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+^L
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+^L
+ 6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ d) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ e) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+^L
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+^L
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply, and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License
+may add an explicit geographical distribution limitation excluding those
+countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+^L
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+^L
+ How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms
+of the ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library.
+It is safest to attach them to the start of each source file to most
+effectively convey the exclusion of warranty; and each file should
+have at least the "copyright" line and a pointer to where the full
+notice is found.
+
+
+ <one line to give the library's name and a brief idea of what it
+does.>
+ Copyright (C) <year> <name of author>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+Also add information on how to contact you by electronic and paper
+mail.
+
+You should also get your employer (if you work as a programmer) or
+your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James
+Random Hacker.
+
+ <signature of Ty Coon>, 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
+
+
diff --git a/libs/gtkmm2/ChangeLog b/libs/gtkmm2/ChangeLog
new file mode 100644
index 0000000000..9966e67673
--- /dev/null
+++ b/libs/gtkmm2/ChangeLog
@@ -0,0 +1,2390 @@
+2.6.1:
+
+2005-03-12 Claudio Saavedra <csaavedra@alumnos.utalca.cl>
+
+ * docs/tutorial/gtkmm-tut.xml: Fixing inconsistences in documentation.
+ Bug #170131.
+
+2005-03-13 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/cellrenderercombo.hg:
+ * gtk/src/combo.hg:
+ * gtk/src/fileselection.hg:
+ * gtk/src/optionmenu.hg:
+ * gtk/src/treemodel.hg:
+ Doxygen comments: Remove deprecated widgets from
+ the Widgets and Dialogs groups, so they don't
+ show up in the lists.
+
+2005-03-11 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/cellrenderer.ccg: property_renderable_(): Call the base
+ class method, not the method itself, to avoid an infinite loop.
+
+2005-03-10 Cedric Gustin <cedric.gustin@swing.be>
+
+ * MSVC_Net2003/Makefile.am: Add blank.cpp to EXTRA_DIST.
+ * MSVC_Net2003/atkmm/atkmm.rc.in,
+ MSVC_Net2003/pangomm/pangomm.rc.in: Use gtkmm @VERSION@ as version
+ string.
+
+2.6.0:
+
+2005-03-04 Murray Cumming <murrayc@murrayc.com>
+
+ * examples/book/menus_and_toolbars/main_menu/examplewindow.[h|cc]:
+ Demonstrate radio action items.
+
+2005-03-04 Murray Cumming <murrayc@murrayc.com>
+
+ * docs/tutorial/gtkmm-tut.xml: Fixed a duplication section id.
+ * docs/tutorial/Makefile: Make the phpwebnotes version build in a
+ separate directory, to make things simpler.
+
+2005-03-03 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/scale.hg: format_value signal: Modify the custom conversion
+ so that this never sends an empty string to GTK+, so we do not stop
+ C callbacks from using the special meaning that format_value gives to
+ a null string. This needs an extra signal parameter in C++ in future -
+ see the comment. Bug #154004 from Lars Luthman, who did the
+ detective work.
+
+2005-03-03 <meissner@suse.de>
+
+ * gtk/src/treeview.ccg: insert_column(): Used (void*)0 instead of 0
+ for the terminating vararg, to avoid g++ 4.0 warning about missing
+ sentinel in function call.
+
+2005-03-03 Albert Chin <thewrittenword.com>
+
+ * configure.in: Check whether funlockfile(), flockfile(), and
+ getc_unlocked() are really available to the compiler, rather than
+ just present in a library.
+ * demos/gtk-demo/demo-window.c: Use the new tests.
+
+2005-02-28 Roel Vanhout <roel.vanhout@gmail.com>
+
+ * docs/tutorial/gtkmm-tut.xml: Add more section ids so that
+ phpwebnotes would have permanent ids to use.
+
+2.5.7:
+
+2005-02-23 Roel Vanhout <roel.vanhout@gmail.com>
+
+ * docs/tutorial/: Experimental generation of the html with
+ phpWebNotes code, to allow online comments. Not used yet.
+
+2005-02-18 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/gtk_signals.defs: Removed some more quotes from inside
+ the properties docs strings, because gmmproc can not handle those yet.
+
+2005-02-18 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/cellrenderer.hg: start_editing(): Add a default value of 0
+ for the last flags parameter, because this is a valid value.
+ * examples/book/treeview/editable_cells: Added a number_validated
+ column, which shows how to handle edited cells without the
+ convenience functions, and how to validate date.
+
+2005-02-15 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/messagedialog.hg: Deprecate set_markup in favour of
+ set_message(string, false), which now uses the new
+ gtk_message_dialog_set_markup() function. We should not have added
+ this, but we are past API freeze now. Added documentation for
+ set_message() and set_secondary_text().
+ * examples/book/dialogs/messagedialog/examplewindow.cc: Used
+ set_secondary_text().
+
+2005-02-13 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/cellview.hg, comboboxentry.hg, image.hg, main.hg,
+ gkd/src/pixbuf.hg: Corrected some minor doxygen documenation errors.
+
+2005-02-13 Murray Cumming <murrayc@murrayc.com>
+
+ * atk/src/atk_signals.defs, gdk/src/gdk_signals.defs,
+ gtk/gtk_signals.defs: Regenerate with latest extra_defs_gen, to get
+ the property documentation.
+ * docs/reference: Added widget_hierarchy html image map and .dia
+ original from Marco Scholten in bug 88610.
+ * docs/index.html: Added link to hierarchy.
+ * docs/reference/Makefile.am: Add extra commands to install and
+ upload the widget_hierarchy files.
+
+2005-02-13 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/cellrenderertext.hg: Added documentation for the edited()
+ method. Bug found by Antonio Coralles.
+
+2005-02-13 Murray Cumming <murrayc@murrayc.com>
+
+ * gdk/src/dragtarget.ccg: get_targets(): Fixed typo to fix the build.
+
+2005-02-07 Ronald Lembcke <es186@fen-net.de>
+
+ * gdk/src/dragcontext.ccg: get_targets(): Actually step through the
+ list, instead of looping infinitely. Bug #166412.
+
+2005-02-03 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/targetlist.ccg: Add TargetList:: prefix to the create
+ method, so that it is actually defined. Bug found by Ronald Lembcke.
+
+2005-02-02 Murray Cumming <murrayc@murrayc.com>
+
+ * examples/cellrenderercustom/cellrenderertoggle.cc: AppWindow:
+ Move the inner ModelColumns class outside of the AppWindow class,
+ because the IRIX MipsPro compiler (wrongly) says that its
+ destructor it was referenced but not defined.
+ * examples/gdk/radar.cc: Added #include of math.h, needed by
+ IRIX MipsPro compiler.
+
+2005-02-02 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/treeview.hg: append_column_numeric(),
+ _connect_auto_store_editable_signal(): Use an intermediate
+ function pointer, because the IRIX MipsPro compiler needs that.
+
+2005-02-01 Murray Cumming <murrayc@murrayc.com>
+
+ * examples/book/clipboard/ideal/examplewindow.cc:
+ on_clipboard_received_targets(). Use targets = targets_array instead
+ of targets(targets_array). The IRIX MipsPro compiler needs this,
+ maybe because of the ustring-std::string conversion. We should
+ maybe use ustring anyway.
+
+2005-02-01 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/gtkmm/comboboxtext.h: Class documentation: Warn about using this
+ with Glade. Bug #165411,
+
+2005-02-01 Murray Cumming <murrayc@murrayc.com>
+
+ * configure.in: Check for atk version 1.9 at configure time,
+ because that is what we use, because it follows the same schedule as
+ gtkmm.
+
+2005-02-01 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/treeview.hg, colorselection.ccg: Remove the #ifdefs for AIX,
+ because sigc::bind now works on AIX.
+
+2.5.6:
+
+2005-01-26 Cedric Gustin <cedric.gustin@swing.be>
+
+ * Makefile.am: Added MSVC_Net2003 directory.
+ * configure.in: Added MSVC_Net2003 entries. AC_SUBST
+ GTKMM_*_VERSION macros (for the MSVC resource files)
+ * gtk/gtkmmconfig.h.in: Added dllimport/dllexport rules. Moved
+ HAVE_FLOCKFILE and HAVE_FUNLOCKFILE #undef's to GLIBMM_CONFIGURE
+ section, as it is not relevant to platforms that do not run
+ configure (MSVC for example).
+ * examples/stock/stock.cc, examples/tictactoe/tictactoe.cc: Added
+ Gtk namespace to "manage" calls (Gtk::manage) as required by MSVC.
+ * demos/gtk-demo/demo-common.cc: Fixed typo in #ifdef/#endif
+ structure. Uncommented get_democodedir function.
+ * demos/gtk-demo/textwidget.cc: Use default system font on win32.
+ * MSVC_Net2003/*: Initial commit, imported from gtkmm-2-4 branch.
+ * MSVC_Net2003/gtkmm/Makefile.am, MSVC_Net2003/gdkmm/Makefile.am:
+ Rewrote rule for local copy of g[d|t]kmmconfig.h (required for
+ 'make distcheck').
+
+2005-01-25 Bryan Forbes <bryan@reigndropsfall.net>
+
+ * gtk/src/plug.[hg|ccg]: Add a default constructor.
+
+2005-01-25 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/colorselection.hg: set_change_pallete_hook(): On AIX, #ifdef
+ out the part that uses sigc::bind, which does not work with the AIX
+ xlC compiler. This method will be broken of that platform, but it is
+ rarely used anyway.
+ * demos/gtk-demo/demowindow.cc: SUN Forte, AIX, and Tru64 have the
+ problem with flockfile and funlockfile - configure finds it but the
+ compiler can not find it while compiling demowindow.cc. #undef
+ HAVE_FLOCKFILE and HAVE_FUNLOCKFILE for now, so that it builds on
+ those platforms.
+
+2005-01-25 Murray Cumming <murrayc@murrayc.com>
+
+ * configure.in, Makefile.am: Add --disable-demos configure option,
+ by plors in bug #160756. This is needed because AIX does not support
+ sigc::bind at all and the demos would be quite unreadable if we
+ worked around that. This way, at least gtkmm can be installed on AIX.
+
+2005-01-25 Murray Cumming <murrayc@murrayc.com>
+
+ * examples/book/input/main.cc: Do not use O_NONBLOCK, because the
+ example is meant to be blocking. As advised by Chris Vine.
+
+2005-01-25 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/treeview.hg: Use nested sigc::bind<-1>s instead of
+ sigc::bind(), because the Tru64 compiler needs the extra hint.
+ Added #ifdef GTKMM_HAVE_SIGC_BIND() around some templated convenience
+ methods, so we can disable these on AIX.
+ * gtk/src/treemodel.[hg|ccg]: Use Gtk::TreeModel::iterator instead of just
+ iterator, because the Tru64 compiler finds it ambiguous.
+ * demos/example_treeview_editable_cells.cc: Replace use of
+ TreeView::append_column_editable() with the long-winded workaround,
+ so that the IRIX MipsPro and Tru64 compilers can build this
+
+2005-01-18 Marco Scholten <mscholtn@xs4all.nl>
+
+ * examples/book/custom/custom_widget/examplewindow.cc:
+ Removed #include <iostream> because it is not used.
+ * examples/book/custom/custom_widget/mywidget.cc:
+ Removed #include <iostream> because it is not used.
+ In on_realize() removed:
+ -set_flags(Gtk::REALIZED);
+ -set_window( get_parent_window() );
+ -GtkWidget* cWidget = (GtkWidget*)gobj();
+ -cWidget->style = gtk_style_attach(cWidget->style, get_window()->gobj());
+ Added attributes.event_mask = get_events () | Gdk::EXPOSURE_MASK;
+ to make the widget receive expose events.
+ Create GdkWindow and set this as the widgets window
+ Set colors in on_realize() instead of on_expose_event() because this
+ needs to be done only once.
+ Removed colormap in on_expose_event() because of problem with
+ get_default_colormap() (see Bug 163992). I decided not to wait for a fix
+ on that bug because how we set the color is not essential to this example.
+ Made it draw something nice.
+
+2005-01-18 Murray Cumming <murrayc@murrayc.com>
+
+ * demos/gtk-demo/demos.h: Use sigc::ptr_fun() instead of the bare
+ function pointer, because that does not work with the SUN Forte
+ compiler. on_treeview_row_activated(): Use a const reference of the
+ slot with operator[] to avoid ambiguity with the SUN Forte compiler -
+ see the comment in the code.
+
+2005-01-18 Murray Cumming <murrayc@murrayc.com>
+
+ * examples/book/input/main.cc: Add extra #includes, needed by
+ the SUN Forte compiler.
+
+2005-01-18 Murray Cumming <murrayc@murrayc.com>
+
+ * demos/demowindow.cc: #ifdef on __SUNPRO_CC instead of
+ GLIBMM_COMPILER_SUN_FORTE, though we should really find out why
+ GLIBMM_COMPILER_SUN_FORTE is not defined with the SUN compiler.
+ * demos/example_stockbrowser.cc: Remove some consts that the
+ SUN compiler does not allow.
+ * gtk/src/radiobutton.hg: Remove duplicate Group typedef, which
+ SUN Forte complains about.
+ * This should fix the remaining issues in bug #154973.
+ Joel Fredrikson helped with these fixes.
+
+2005-01-11 Murray Cumming <murrayc@murrayc.com>
+
+ * examples/book/custom/custom_widget/mywidget.cc: Fix from Marco
+ (mshcoltn) to make this widget actually draw something: on_realize():
+ Use get_window() instead of creating our own Gdk::Window. I am not
+ sure why this works, but it is simpler.
+
+2.5.5:
+
+2005-01-10 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/main.[hg|ccg]: Added Main constructor that takes a
+ Glib::OptionContext(), and added
+ Main::add_gtk_option_group(option_context) to wrap functionality in
+ gtk_init_with_args() and gtk_get_option_group(), hopefully.
+ * tests/: Added main_with_option_group to show that it works.
+
+2005-01-10 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/combobox.hg, comboboxentry.hg, clipboard.hg, cellview.hg,
+ celllayout.hg, celleditable.hg, cellrenderer*.hg: Added class
+ documentation, based on the C documentation.
+ * gtk/src/clipboard.hg: Added set_can_store() overload that takes no
+ arguments.
+ * gtk/src/combobox.hg: Added unset_row_separator_func().
+
+2005-01-09 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/filechooserbutton.[hg|ccg]: Inherit from the FileChooser
+ interface. Add constructor which takes no title. Add documentation,
+ based on the C documentation.
+
+2005-01-09 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/examples/book/buttons/: Added filechooserbutton example,
+ though I see g_warnings.
+
+2005-01-09 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/examples/book/treeview/list/examplewindow.[h|cc]: Add an extra
+ model column, rendered with a CellRendererProgress, to show that it
+ works.
+
+2005-01-08 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/aboutdialog.hg: Add logo_icon_name proeprty.
+ * gtk/src/iconview.hg: Wrap the properties.
+
+2005-01-07 Murray Cumming <murrayc@murrayc.com>
+
+ * Makefile.am: Offline documentation tarball: Do not try to tar up non
+ existant docs/internals directory. Put 2-4 in the tarball name to
+ avoid confusion.
+ * docs/index.html: Correct the offline documentation link, so that
+ people do not download the tarball for the 2.0 documentation instead.
+ Bug #163122.
+
+2005-01-07 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/modelfilter.hg: Added documentation for set_modify_func().
+ * pango/src/renderer.hg: Added get_color(),
+ * pango/src/color.hg: Added operator bool() so that people can check
+ for a null Color returned by Renderer::get_color().
+
+2005-01-07 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/entrycompletion.hg, toolitem.hg: Added //TODO comments
+ to tell us to add default signal handlers when we can break ABI. Also
+ remove an extra ; to avoid a warning and fix the build.
+
+2005-01-06 Bryan Forbes <bryan@reigndropsfall.net>
+
+ * updated .cvsignore files.
+ * gtk/gtkmm/stock.[h|cc]: Added new stock items.
+ * gtk/src/entrycompletion.hg: Changed to use no_default_handler on
+ insert_prefix signal.
+ * gtk/src/filechooserdialog.[hg|ccg]:
+ * gtk/src/filechooserwidget.[hg|ccg]: Added constructors to choose the
+ backend used.
+ * gtk/src/main.[hg|ccg]: Added commented constructors for gtk_init_with_args
+ so we can take a look at it.
+ * gtk/src/toolitem.hg: Changed to use no_default_handler on set_tooltip
+ signal.
+
+2005-01-06 Murray Cumming <murrayc@murrayc.com>
+
+ * gdk/src/pixbufloader.hg, gtk/src/cellrenderer.hg, gtk/src/range.hg:
+ For the signals that are new in gtkmm 2.5, use the extra
+ no_default_handler argument with _WRAP_SIGNAL(), to avoid adding new
+ virtual functions which would break the ABI by increasing the size
+ of base class objects.
+
+2005-01-06 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/treeiter.[hg|ccg]: Add forward_search() and
+ backward_search() overloads without the limit argument.
+ * gtk/src/gtk_docs_override.xml: Correct the documentation for
+ the full forward_search() and backward_search() methods, so that it
+ does not suggest 0 for references. Bug found by Rob Page.
+
+2005-01-06 Murray Cumming <murrayc@murrayc.com>
+
+ * examples/book/dialog/: Added aboutdialog example.
+
+2.5.4:
+
+2005-01-05 Murray Cumming <murrayc@murrayc.com>
+
+ * atk/src/atk_enums.defs: Regenerated.
+ * atk/src/relation.hg: Added add_target().
+ * atk/src/relationset.hg: Added add_relation_by_type().
+ * atk/src/text.hg: Added get_range_extents(), get_bounded_ranges().
+
+2005-01-05 Murray Cumming <murrayc@murrayc.com>
+
+ * gdk/src/gdk_pixbuf.defs: Updated with h2defs.py
+ * gdk/src/display.[hg|ccg]: Added supports_selection_notification(),
+ request_selection_notification(), supports_clipboard_persistance(),
+ store_clipboard().
+ * gdk/src/pixbuf.[hg|ccg]: Added rotate_simple(), flip(),
+ save_to_buffer().
+ * gdk/src/pixbuf_format.hg: Added is_scalable(), is_disabled(),
+ set_disabled(), get_license().
+ * gdk/src/window.hg: Added enable_synchronized_configure(),
+ configure_finished(), set_focus_on_map().
+
+2005-01-05 Murray Cumming <murrayc@murrayc.com>
+
+ * gdk/src/gdk_methods.defs: Updated with h2defs.py.
+
+2005-01-04 Murray Cumming <murrayc@murrayc.com>
+
+ * gdk/src/gdk_enums.defs, gtk/src/gtk_enums.defs,
+ gtk/src/gtk_signals.defs: Regenerated.
+ * gtk/src/gtk_others.defs: Added get_authors, get_documentors and
+ get_artists because h2defs.py does not add them to gtk_methods.defs,
+ for some reason.
+ * gtk/src/action.hg: Added get_accel_path().
+
+2005-01-04 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/treeview.hg: Added hover_expand and hover_selection
+ properties.
+
+2005-01-03 Bryan Forbes <bryan@reigndropsfall.net>
+
+ * gtk/src/cellrenderertext.hg: added properties "language",
+ "ellipsize", and "ellipsize-set".
+
+2.5.3:
+
+2004-12-19 Murray Cumming <murraycmurrayc.com>
+
+ * gdk/pixbuf.hg: Added create_from_file() overload that takes
+ height and width, wrapping gdk_pixbuf_create_from_file_at_scale().
+ Bug #157894.
+
+2004-12-19 Claudio Saavedra <csaavedra@alumnos.utalca.cl>
+
+ * example/book/input/main.cc: Improved example to use a
+ Glib::IOChannel. References bug #138259.
+
+2004-12-19 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/cellrenderer.hg: Added stop_editing() which replaces the
+ now-deprecated editing_cancelled().
+ * gtk/src/iconview.hg: Added get/set_columns(), get/set_item_width(),
+ get/set_spacing(), get/set_row_spacing(), get/set_column_spacing(),
+ get/set_margin().
+ * gtk/src/label.hg: Added get/set_max_chars_width(), and property.
+ * gtk/src/textview.hg: Added get_iter_at_position().
+ * gdk/src/gdk_docs.xml, pango/src/pango_docs.xml,
+ gtk/src/gtk_docs.xml: Regenerated with docextract_to_xm.py, to get
+ new GTK+ documentation.
+
+2004-12-19 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/filechooserbutton.hg: Constructors: Added action parameters,
+ because they have been added to the GTK+ API.
+ * gtk/src/gtk_methods.defs: Regenerated with h2defs.py
+
+2004-12-16 Murray Cumming <murrayc@murrayc.com>
+
+ * examples/book/dialogs/messagedialog/examplewindow.cc: The
+ ButtonsType enum is not an ORable flag.
+ * docs/tutorial/gtkmm-tut.xml: Fix the text where it says that it is.
+
+2004-12-16 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/cellview.hg: Remove set_value(), because it has been
+ removed from GTK+. This fixes the build. Now inherits from the
+ CellLayout interface. Added text and pixbuf constructors, to match
+ the C _new conveience functions.
+
+2.5.2:
+
+2004-12-04 Roger Leigh <roger@whinlatter.uklinux.net>
+
+ * configure.in: Bug #160244: Ask automake to use the utar format, to
+ fix the problems with the long filenames of our documentation in the
+ tarballs.
+
+2004-12-03 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/treeview.hg: Added append_column_numeric() which allows you
+ to specify a printf-style format string for the View column, and
+ append_column_numeric_editable() which does the same, and auto-stores
+ decimal input. Updated the append_column() documentation to improve
+ the explanation of supported types, and to suggest use of
+ append_column_numeric().
+ * examples/book/treeview/list/, editable_cells/: Demonstrate these
+ new convenience methods.
+
+2004-12-01 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/label.hg: Added get/set_angle().
+
+2004-12-01 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/filechooserbutton.hg: GtkFileChooser inherits from HBox, not
+ Button.
+
+2004-12-01 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/filechooserbutton.hg: Removed get/set_active(), because they
+ have been removed from GTK+.
+
+2004-12-01 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/cellview.hg: Removed set_cell_data() because it has been
+ removed from GTK+.
+
+2004-12-01 Murray Cumming <murrayc@murrayc.com>
+
+ * pango/pangomm/: Added types.h, for typedefs of simple structs.
+ * pango/src/: Added renderer.[hg|ccg].
+ * pango/src/context.hg: Add get/set_matrix().
+ * pango/src/fontmetrics.hg: Added get_underline_position(),
+ get_underline_thickness(), get_strikethrough_position(),
+ get_strikethrough_thickness().
+ * pango/src/pango_enums.defs: Regenerated.
+ * tools/m4/convert_pango.m4: Added Matrix and Layout conversions.
+
+2004-11-30 Murray Cumming <murrayc@murrayc.com>
+
+ * tools/m4/convert_gtk.m4: Use _CONVERT_CONST_REFPTR_TO_P_SUN() instead
+ of _CONVERT_CONST_REFPTR_TO_P(), to hopefully fix the SUN Forte build
+ problems in bug #154973.
+
+2004-11-30 Murray Cumming <murrayc@murrayc.com>
+
+ * examples/book/menus_and_toolbars: Applied Fredrik Arnerup's patch
+ to add a non-stock icon, with some changes.
+
+2004-11-30 Murray Cumming <murrayc@murrayc.com>
+
+ * atk/src/hyperlink.hg: get_object(),
+ * atk/src/object.hg: get_relation_set(),
+ * gdk/src/cursor.hg: get_display(),
+ * gdk/src/display.hg: get_default_group(),
+ * gdk/src/displaymanager.hg: get_default_display(),
+ * gdk/src/drawable.hg: get_screen(), get_display(),
+ * gdk/src/event.hg: get_screen(),
+ * gdk/src/visual.hg: get_system(), get_best(), get_screen(),
+ * gtk/src/widget.hg: get_default_style()
+
+2004-11-25 Chris Vine <cvine@freeserve.co.uk>
+
+ * example/book/input/: This now works.
+
+2004-11-25 Murray Cumming <murrayc@murrayc.com>
+
+ * docs/tut/gtkmm-tut.xml: TreeView selection: Use
+ selected_foreach_iter() instead of selected_foreach(). Error
+ found by Teus Benschop.
+
+2004-11-24 Murray Cumming <murrayc@murrayc.com>
+
+ * demos/gtk-demo/: Added missing demo-common.[h|cc] files.
+ * gtk/src/treeview.hg, gdk/src/pixbuf.hg, : Removed extra ; and
+ unused parameter to fix build for g++ 3.4.
+
+2004-11-21 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/dialog.[hg|ccg]: Added set_alternative_button_order().
+ * gtk/src/button.[hg|ccg]: Added set/get_image() and property.
+
+2004-11-17 Murray Cumming <murrayc@murayc.com>
+
+ * gtk/src/iconinfo.[hg|ccg]: Added operator bool(), needed to check
+ the result of IconTheme::lookup_icon(). Bug #143018.
+
+2004-11-16 Murray Cumming <murrayc@murrayc.com>
+
+ * docs/tutorial/gtkmm-tut.xml: Mention Gtk::manage() in the Basics/
+ Widgets section, with a link to the Memory Management chapter, so that
+ people have an explanation of manage() before it is used in examples.
+ Bug #138248.
+
+2004-11-16 Claudio Saavedra <csaavedra@alumnos.utalca.cl>
+
+ * docs/tutorial/gtkmm-tut.xml: Fixed two typos in Chapter 19 and
+ Appendix A.
+ * examples/book/helloworld/helloworld.cc: Fixed wrong reference
+ to a inexistent method in a comment.
+
+2.5.1:
+
+2004-11-11 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/filechooser.hg: Wrap GTK_FILE_CHOOSER_ERROR as exception.
+ Still need to investigate whether GTK_FILE_SYSTEM_ERROR is public API.
+ * gtk/src/icontheme.hg: Wrap GTK_ICON_THEME_ERROR as exception
+ instead of enum. Luckily, the enum was not used in the API anywhere
+ so nobody can be using it.
+ * examples/book/: Added input example, based on code that was in the
+ tutorial inline. This needs to be updated properly - see TODO in the
+ code.
+ * docs/tutorial/gtkmm-tut.xml: Some minor corrections to the
+ Idle/Timeout chapter, but it needs to be reviewed properly after we
+ have finished the example. Get the example from the source, instead of
+ pasting it inline.
+ * gdk/src/pixbufloader.hg: Wrap size_prepared signal. I am not sure
+ why this was not wrapped in 2.4.
+ * gtk/src/filefilter.hg: Add add_pixbuf_formats().
+
+2004-11-11 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/textbuffer.hg: Added ; to fix build.
+
+2004-11-10 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/gtk_methods.defs: Regenerated with h2defs.py.
+ * gtk/src/selectiondata.hg: Added targets_include_image().
+ * gtk/src/progressbar.hg: Added set/get_ellipsize() and property.
+ * gtk/src/label.hg: Added set/get_single_line_mode() and property.
+ * gtk/src/clipboard.hg: Added set_image(), wait_is_image_available(),
+ wait_for_image(), request_image().
+ * gtk/src/toolitem: Added rebuild_menu().
+
+2004-11-08 Murray Cumming <murrayc@murrayc.com>
+
+ * examples/book/treeview/combo_renderer/examplewindow.[h|cc]: Use a
+ combo model from the treeview model, now that it works in GTK+.
+
+2004-11-07 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/combocellrenderer.hg: The model is a TreeModel, not a
+ Pixbuf.
+ * gtk/gtkmm/cellrenderer_generation.[h|cc]: Remove the TreeModel/Combo
+ specialization, because the Combo is not for representing or editing
+ a TreeModel - it's just to use a TreeModel to present choices for
+ a text column.
+ * examples/book/treeview/combo_renderer/examplewindow.[h|cc]: This
+ now works.
+
+2004-11-04 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/messagedialog.hg: Reverted set_message() implementation
+ change and added set_secondary_text().
+ * gtk/src/dialog.hg: Added alternative_button_order().
+ * gtk/src/: Added cellrenderercombo.[hg|ccg] and cellrendererprogress.[hg|ccg].
+ * gtk/gtkmm/cellrenderer_generation.[h|cc]: Add template
+ specializations to create a CellRendererCombo when the model is of
+ type TreeModel.
+ * pango/src/context.hg: Added get_font_map().
+ * examples/book/treeview/: Added combo_renderer example - does not
+ actually work yet.
+
+2004-11-03 Murray Cumming <murrayc@murrayc.com>
+
+ * examples/book/menus/popup/examplewindow.[h|cc]: Use the popup
+ UIManager node type, so that this example works.
+ * docs/tutorial/gtkmm-tut.xml: Update the popup menu section.
+
+2004-11-03 Murray Cumming <murrayc@murrayc.com>
+
+ * Removed gtkmm.spec.in and mention of it in configure.in and
+ Makefile.am, yet again. There is no point in having a broken spec
+ file that nobody is maintaining. spec files are distro-specific and
+ belong with distros.
+
+2004-10-31 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/treemodelfilter.ccg: SignalProxy_Modify::gtk_callback():
+ Do not return before actually copying the value.
+ * examples/book/treeview/: Added filter_modify example, to show the
+ use of set_modify_func().
+
+2004-10-30 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/gtk_methods.hg: Regenerated with h2defs.py.
+ * gtk/src/window.hg: Added drag_dest_add_text_targets(),
+ drag_dest_add_uri_targets(), drag_dest_add_image_targets(),
+ drag_source_add_text_targets(), drag_source_add_uri_targets(),
+ drag_source_add_image_targets().
+ * gtk/src/aboutdialog: Added get_logo_icon_name(), and
+ set_logo_icon_name().
+ * gtk/src/clipboard.hg: Added wait_is_target_available(),
+ set_can_store(), store()
+ * gtk/src/filechooserbutton: Added get/set_width_chars()
+ * gtk/src/image.hg: Added set_from_icon_name(), get/set_pixel_size(),
+ get_icon_name()
+ * gtk/src/label.hg: Added get/set_width_chars().
+ * gtk/src/messagedialog.[hg|ccg]: Made set_message() public and
+ reimplemented it with gtk_message_dialog_format_secondary_text() and
+ gtk_message_dialog_format_secondary_markup() instead of the private
+ label field.
+ * gtk/src/selectiondata.hg: Added get/set_pixbuf(), get/set_uris().
+
+2004-10-30 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/treemodelfilter.[hg|ccg]: Added implementations of
+ set_value_impl() to ouput a warning when it is used instead of
+ the child model. Added const versions of patch convert methods.
+ * gtk/src/treeview.[hg|ccg]: Added _get_base_model() non-public API
+ member method to get the child model, if necessary. Used it in the
+ cell renderer signal handlers instead of get_model().
+ * Added examples/book/treeview/filter, from the gtkmm-2-4 branch.
+
+2004-10-16 Gene Ruebsamen <gene@erachampion.com>
+
+ * docs/tutorial/gtkmm-tut.xml: Added a chapter for the new gtk-2.4
+ FileChooserDialog.
+ * docs/tutorial/figures/dialogs_filechooser.png: Added a PNG image
+ of the new FileChooserDialog.
+
+2004-10-25 Roger Leigh <rleigh@debian.org>
+
+ * build_shared/Makefile_build.am_fragment: Use PLATFORM_WIN32
+ rather than OS_WIN32 so that -no-undefined is used on Cygwin
+ as well as MinGW toolchains.
+
+2004-10-25 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/gtkmm.h: #include filechooserwidget.h, as suggested in bug
+ #156170 from Arjan Timmerman.
+
+2004-10-24 Murray Cumming <murrayc@murrayc.com>
+
+ * docs/tutorial/gtkmm-tut.xml: Updated the menus and toolbars section
+ about UIManager, though the popup example does not work yet, and I
+ should mention ui merging and toggle items.
+
+2004-10-22 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/treemodelfilter.hg: _WRAP_CTOR: Rename root parameter to
+ virual_root so that it sets the correct property.
+
+2004-10-22 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/treeiter.hg: In ifdef, use SUN-Forte-style reverse_iterator.
+ Patch from TODO in bug #154973.
+
+2004-10-22 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/aboutdialog.hg: Wrap the get and set methods that deal with
+ char** arrays, using Glib::SArrayHandle. Wrap the callback set
+ methods with a SignalProxy.
+ * gtk/src/gtk_signals.defs: Add signals and properties for
+ AboutDialog and MenuToolButton.
+ * tools/extra_defs_gen/generate_defs_gtk.cc: Get defs for
+ GtkAboutDialog and GtkMenuToolButton.
+ * gtk/src/action_group.hg: Add translate_string(). We probably need to
+ use iit in the .ccg file.
+ * gtk/src/icontheme.hg: Added get_icon_sizes().
+ * gtk/src/iconview.hg: Added get_selected_items().
+ * tools/m4/convert_gtk.m4: Added conversion for SArrayHandle to char**,
+ and GList* to SListHandle<TreePath>
+
+2004-10-17 Gene Ruebsamen <gene@erachampion.com>
+
+ * docs/tutorial/gtkmm-tut.xml: Updated the Windows installation
+ appendix by providing a link to the latest Gtk+ Win32 installer,
+ and updating the installation instructions.
+
+2004-10-12 Murray Cumming <murrayc@murrayc.com>
+
+ * examples/book/custom/custom_container.cc: Use only C++ methods
+ instead of the C functions, now that they are public.
+ * docs/tutorial/figures/: Added custom_container.png.
+
+2004-10-10 Murray Cumming <murrayc@murrayc.com>
+
+ * docs/tutorial/gtkmm-tut.xml: Added Custom Widgets chapter, so far
+ with a Custom Container section and example.
+
+2004-10-10 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/widget.hg: Made set_parent(), and unparent() public instead
+ of protected, because they are need by custom Containers. Added
+ size_request() which is const and actually returns a value, also
+ needed by custom Containers.
+ * gtk/src/accelgroup,hg: Wrap the new gtk_accelerator_get_label()
+ function.
+ * gtk/src/comboboxentry.[hg|ccg]: Hand-code get_entry() to fix the
+ build.
+ * gtk/src/: Added menutoolbutton.[hg|ccg].
+ * gtk/gtkmm/comboboxtext.[h|cc], comboboxentrytext.[h||cc]: Added
+ set_active_text(), clear(). Reimplemented append() and prepend()
+ without using the C functions, because they might not work with our
+ model.
+
+2004-10-09 Murray Cumming <murrayc@murrayc.com>
+
+ * docs/index.html: Changed cvs links to viewcvs, because lxr and
+ bonsai are still broken.
+
+2004-10-09 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/style.hg: Add create() method, as per bug #148012.
+
+2004-10-09 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/comboboxentry.hg: Added get_entry(), as per bug #142758.
+
+2004-09-04 Jonathan Brandmeyer <jbrandmeyer@earthlink.net>
+
+ * gdk/src/screen.hg: get_default(): Take an extra reference so that
+ the Screen is not deleted too early.
+
+2004-09-17 Murray Cumming <murrayc@murrayc.com>
+
+ * iconview.hg: Added overrides of set_text_column(), and
+ set_pixbuf_column() that take ModelColumns instead of ints.
+ Wrapped signals. Added foreach()
+ * cellview.hg: Make get_size_of_row() const.
+ * tools/extra_defs_gen/gtk_extra_defs_gen: Added new types.
+ * gtk/src/gtk_signals.defs: Regenerated (making the usual corrections
+ for Event* and gpointer parameters.
+ * combobox.[hg|ccg], treeview.[hg|ccg]: Add set_row_separator_func(),
+ with common implementation in treeview-private.[h|cc].
+ * range.hg: Wrapped change_value signal.
+ * demos/gtk-demo/: Added example_iconview.cc, which demonstrates the
+ IconView and is a C++ version of the C original..
+
+2.5.0:
+
+2004-09-12 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/: Added cellview.[hg|ccg].
+
+2004-09-10 Murray Cumming <murrayc@murrayc.com>
+
+ * pango/src/layout: Added set_ellipsize(), get_ellipsize(), and
+ EllipsizeMode enum.
+ * pango/src/pango_enums.defs: Regenerated.
+ * pango/src/pango_methods.defs: Regenerated.
+ * gtk/src/: Added iconview.[hg|ccg|, filechooserbutton.[hg|ccg].
+ * gtk/src/entry.hg: Added layout_index_to_text_index() and
+ text_index_to_layout_index()
+ * gtk/src/entrycompletion.hg: Added insert_prefix(),
+ set_inline_completion(), get_inline_completion(),
+ set_popup_completion(), get_popup_completion(), get_text_column()
+ * gtk/src/combobox.hg: Added get_wrap_width(), get_row_span_column(),
+ get_column_span_column(), get_add_tearoffs(), set_add_tearoffs(),
+ get_focus_on_click(), set_focus_on_click(), get_popup_accessible().
+ Wrapped new properties.
+ * gtk/src/action.hg: Wrap new gtk_action_set_sensitive()
+ instead of writing our own method. Add set_visible() too.
+ * gtk/src/label.hg: Added set_ellipsize(), get_ellipsize().
+ * gtk/src/cellrenderer.hg: Added editing_started signal.
+ * gtk/src/filechooser.hg: Added set_show_hidden(), get_show_hidden().
+ * gtk/src/gtk_methods.defs: Regenerated.
+ * gtk/src/treesortable.hg: Added DEFAULT_UNSORTED_COLUMN_ID constant.
+ * gtk/src/treeview.hg: Added set_fixed_height_mode(),
+ get_fixed_height_mode(), set_hover_selection(), get_hover_selection(),
+ set_hover_expand(), get_hover_expand()
+
+2004-09-02 Murray Cumming <murrayc@murrayc.com>
+
+ * This is the HEAD branch, which should wrap new API in GTK+ 2.5/2.6.
+
+2004-08-30 Murray Cumming <murrayc@murrayc.com>
+
+ * examples/book/dialogs/fileselection/examplewindow.cc: Removed a
+ misleading include.
+
+2.4.5:
+
+2004-08-07 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/toolbar.hg: Class documentation: remove mention of
+ tools() which no longer exists.
+ * examples/book/treeview/drag_and_drop: Correct the implementation
+ of the vfuncs so that they actually work. In particular they are const
+ in gtkmm 2.4.
+
+2004-07-16 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/settings.ccg: get_default(): Use reference() instead of an
+ extra parameter, to fix the build.
+
+2004-07-15 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/settings.ccg: get_default(): Take an extra reference so that
+ the Settings is not deleted too early. Bug #147592.
+
+2004-07-15 Murray Cumming <murrayc@murrayc.com>
+
+ * examples/book/treeview/: Added popup example, which was already in
+ gtkmm 2.0/2.2.
+
+2004-07-08 Murray Cumming <murrayc@murrayc.com>
+
+ * docs/tutorial/gtk_tut.xml: libglademm chapter: Mention memory
+ management.
+
+2004-07-08 Murray Cumming <murrayc@murrayc.com>
+
+ * Patch from Christopher Palm in bug #145594, to change ActionGroup and
+ EntryCompletion constructors from private to protected. Lets hope
+ there are no more of these, because this is technically API change in
+ the stable branch. However, the methods already exist and are tested
+ by the create() methods, and are simple and generated, and therefore
+ unlikely to have errors. Also, this change will only be useful to a
+ very small number of people, so it does not confuse the API versions.
+
+2004-07-04 Murray Cumming <murrayc@murrayc.com>
+
+ * docs/tutorial/gtkmm_tut.xml: Tell people to pkg-config for 2.4
+ instead of 2.0.
+
+2004-07-02 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/uimanager.hg: Made constructor protected, like in the
+ previous change.
+ * gtk/src/treesortable.hg: Added docs explaining the return values
+ for the sort func.
+
+2.4.4:
+
+2004-07-01 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/action.hg, toggleaction.hg, radioaction.hg, icontheme.hg:
+ Added protected keyword at start of class so that
+ the constructors can be used by derived classes. This is addition of
+ API in the stable branch, but it should not affect many people and it
+ is a little too embarassing to leave as it is.
+
+2004-06-30 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/container.hg: Add code to the GClass init() function to null
+ the remove callback if the type is actually GtkContainer rather than
+ a derived class. The default implementation in GtkContainer complains
+ about it not being implemented, but that is useless and annoying to us
+ when deriving directly from Gtk::Container.
+
+2004-06-20 Daniel Elstner <daniel.elstner@gmx.net>
+
+ * gtk/src/stockitem.ccg (StockItem::StockItem): Pass a 0 pointer
+ to GTK+ if translation_domain is the empty string, so that the
+ application's global translation domain will be used by default.
+
+2004-06-20 Daniel Elstner <daniel.elstner@gmx.net>
+
+ * gtk/src/widget.ccg (Widget::unset_fg): First cast Gtk::StateType
+ to int and then to GtkStateType, because direct static_cast<> from
+ one enum type to another is invalid C++. Why g++ 3.3 accepts this
+ is a mystery to me though...
+ (Widget::unset_bg): ditto
+ (Widget::unset_text): ditto
+ (Widget::unset_base): ditto.
+
+2.4.3:
+
+2004-06-16 Daniel Elstner <daniel.elstner@gmx.net>
+
+ * gtk/src/treeiter.ccg (TreeIter::operator--): Correctly decrement
+ the end iterator. Also assert that the iterator is not already at
+ the begin of the sequence.
+
+ * gtk/src/treeiter.hg (TreeIter::operator--): s/slow/very slow/
+
+2004-06-15 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/gtkmm/comboboxentrytext.h: Correct the header guard so that it
+ can be used at the same time as comboboxentry.h.
+ * gtk/gtkmm/comboboxentrytext.cc, comboboxtext.cc: Implement the
+ GObject* castitem constructors.
+
+2004-06-08 Cedric Gustin <cedric.gustin@swing.be>
+
+ * gdk/gdkmm/Makefile.am: link against libpangomm-1.4 instead of
+ 1.6 on win32 (sublib_win32_dlls_libs variable).
+
+2.4.2:
+
+2004-06-04 Daniel Elstner <daniel.elstner@gmx.net>
+
+ * gtk/src/filechooser.hg (FileChooser): Copy the class docs from
+ GTK+. Also explain the fact that the API is broken and how to use
+ it correctly despite this problem (bug #142138).
+
+2004-06-03 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/treeview.ccg: get_path_at_pos(): Correct memory management
+ of the path. Bug #142970 from david@thepriorities.com.
+
+2004-05-28 Murray Cumming <murrayc@murrayc.com>
+
+ * docs/FAQ/gtkmm_faq.xml: Mentioned gtkmm 2.4.
+
+2004-05-28 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/combobox.ccg: get_active(): Instantiate a
+ Gtk::TreeModel::iterator instead of the GtkTreeIter, so that the
+ underlying GtkTreeIter is properly initialized.
+
+2004-05-25 Daniel Elstner <daniel.elstner@gmx.net>
+
+ * demos/pixbuf-demo.cc: More micro tweaking.
+
+2004-05-25 Daniel Elstner <daniel.elstner@gmx.net>
+
+ * demos/pixbuf-demo.cc: Minor cleanups: use const double rather
+ than a macro for pi, no need to explicitly maintain the timeout
+ signal connection, and some other stuff.
+
+2004-05-23 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/gtkmm/comboboxentrytext.cc: Patch from Teemu Tervo to prevent
+ the text column from being added twice, in bug #142956.
+
+2004-05-22 Daniel Elstner <daniel.elstner@gmx.net>
+
+ * configure.in: Check for gthread-2.0 and if it exists, substitute
+ the required compiler flags into GTHREAD_CFLAGS. This is necessary
+ to make the library code work correctly in a threaded application.
+ For instance, on glibc systems errno is replaced by a macro which
+ expands into a function call. Actually this stuff was already in
+ place, but apparently got lost when glibmm was split off.
+
+ * build_shared/Makefile_build.am_fragment (all_includes): Append
+ $(GTHREAD_CFLAGS).
+
+2004-05-19 Daniel Elstner <daniel.elstner@gmx.net>
+
+ * gtk/gtkmm.h: Remove duplicated combobox.h include. Add missing
+ includes of comboboxentry.h and comboboxentrytext.h.
+
+2004-05-18 Daniel Elstner <daniel.elstner@gmx.net>
+
+ * gtk/src/treeiter.ccg (TreeIter::operator bool): Put the original
+ test for gobject_.stamp != 0 back in place. The iter_is_valid()
+ method provided by model implementations is intended for debugging
+ purposes only, and thus should not be used here (bug #142599).
+
+ * gtk/src/treemodel.hg (TreeModel::iter_is_valid): Document that
+ the usage of this method as abstract interface is deprecated, and
+ that the implementation's iter_is_valid() should be used directly.
+
+2004-05-14 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/gtkmm/comboboxtext.cc, comboboxentrytext.cc: get_active_text():
+ The iterator was being used in ways that probably should not compile.
+ This leads to strange results in other situations, so it is best to fix
+ it.
+
+2.4.1:
+
+2004-04-25 Murray Cumming <murrayc@murrayc.com>
+
+ * gdk/Makefile.am: install gdkmmconfig.h in a gdkmm-2.6 directory,
+ instead of a gtkmm-2.6 directory. Bug #141045.
+
+2004-04-23 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/uimanager.[hg|ccg]: add_ui_from_string now returns a
+ ui_merge_id instead of a guint, to make the API clearer. This is
+ technically an API change, but it's not a breaking one, and it's not
+ an ABI change.
+
+2004-04-22 Alexander Nedotsukov <bland@FreeBSD.org>
+
+ * atk/atkmm: Fixed private/ includes installation directory.
+
+2004-04-17 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/optionmenu.hg, fileselection.hg, combo.hg: Mark them as
+ deprecated in the docs, by using the Doxygen @deprecated command.
+
+2004-04-17 Murray Cumming <murrayc@murrayc.com>
+
+ * Removed some extra semi-colons detected by gcc 3.4 from cvs.
+
+2.4.0:
+
+2004-04-11 Murray Cumming <murrayc@murrayc.com>
+
+ * atk/src/: Added implementor.[hg|ccg] to wrap the AtkImplementorIface.
+ * gtk/src/widget.hg: Widget inherits from the Implementor interface
+ as well as Gtk::Object.
+
+2004-04-10 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/gtkmm.h: #include treemodelsort.h and treemodelfilter.h
+ * gtk/src/menu.hg: popup(): Wrap the C callback as a Slot, so we do
+ not need to include gtkmenu.h.
+ * gtk/src/iconinfo.hg: Do not include gtkiconinfo.h.
+ * gtk/src/notebook.hg: Do not include gtknotebook.h
+ * gtk/src/stockitem.hg: Do not include gtkstockitem.h
+ * gtk/src/texttag.hg: Do not include gtktexttag.h
+
+2004-04-09 Murray Cumming <murrayc@murrayc.com>
+
+ * toolbar.hg: Added get_tooltips_object() accessor, which should let
+ us set tooltips on toolbar objects.
+
+2004-04-09 Murray Cumming <murrayc@murrayc.com>
+
+ * filefilter.hg: Create a FileFilter::Info class to use in place of
+ GtkFileFilterInfo, in the add_custom() callbak . Removed filter(),
+ because it is not needed and because it is difficult to wrap.
+
+2004-04-08 Bryan Forbes <bryan@reigndropsfall.net>
+
+ * gtk/gtkmm.h: include gtkmm/settings.h.
+
+2.3.8
+
+2004-04-09 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/action.hg: Added set_tooltip().
+
+2004-04-07 Bryan Forbes <bryan@reigndropsfall.net>
+
+ * gtk/src/icontheme.hg: added refreturns for get_default and get_for_screen.
+ * gtk/src/settings.hg: added unwrapped properties.
+ * gtk/src/targetlist.[hg|ccg]: added a create method that wraps
+ gtk_target_list_new.
+
+2004-04-07 Murray Cumming <murrayc@murrayc.com>
+
+ * Removed some TODO comments that are no longer relevant.
+
+2004-04-03 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/treemodel.[hg|ccg]: Rename 2 of the 3 foreach() overloads
+ to foreach_iter() and foreach_path(), because they are ambiguous with
+ libsigc++ 2.
+
+2004-04-03 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/liststore.[hg|ccg], treestore.[hg|ccg]: Added insert_after(),
+ because it is apparently faster with many rows. Bug #131019.
+
+2004-04-01 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/action.[hg|ccg]: Added set_sensitive(), even though
+ it does not exist in GTK+ itself yet. Spotted by Matthew Walton.
+
+2.3.7:
+
+2004-03-28 Bryan Forbes <bryan@reigndropsfall.net>
+
+ * gtk/src/action.[hg|ccg]:
+ * tools/m4/convert_gtk.m4: changed Action::create_menu_item(),
+ create_tool_item(), and create_icon() to return Gtk::MenuItem*,
+ Gtk::ToolItem*, and Gtk::Image respectively, rather than Gtk::Widget*.
+
+2004-03-28 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/uimanager.ccg: Fix typo to fix the build.
+ * */src/*_methods.defs: Regenerated with h2defs.py.
+
+2004-03-28 Murray Cumming <murrayc@murrayc.com>
+
+ * *_docs_override.xml: Added several overrides to remove references to
+ 0 parameters and freeing of strings.
+ * atk/src/table.hg: Added const versions of some get_*() methods.
+
+2004-03-25 Andrew E. Makeev <andrew@solvo.ru>
+
+ * gtk/src/treeview.hg, gtk/src/treeview.ccg: Added
+ move_column_to_start(), which uses gtk_tree_view_move_column_after()
+ with a 0 parameter.
+
+2004-03-26 Elijah Newren <newren@math.utah.edu>
+
+ * docs/tutorial/gtkmm-tut.xml: Several simple fixes.
+
+2004-03-27 Murray Cumming <murrayc@murrayc.com>
+
+ * example/book/: Added menus_and_toolbars example that uses UIManager.
+ The book should probably stop using the other menu and toolbar examples
+ and they should be moved away.
+
+2004-03-27 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/action.ccg, toggleaction.ccg, radioaction.ccg:
+ Constructor: Give GTK+ 0 instead of "" for default labels and tooltips,
+ so that the stock ones are used.
+
+2004-03-25 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/filefilter.[hg|ccg]: Wrapped filefilter as a GtkObject
+ instead of a GObject, because it is a GtkObject.
+ * examples/book/dialogs/filechooserdialog/: Used filefilter.
+
+2004-03-25 Bryan Forbes <bryan@reigndropsfall.net>
+
+ * gtk/src/messagedialog.[hg|ccg]: removed use_separator parameter from
+ constructor as GtkMessageDialog gets its separator setting from the style
+ now.
+
+2004-03-24 Bryan Forbes <bryan@reigndropsfall.net>
+
+ * gtk/src/uimanager.hg: fixed typo in disconnect_proxy signal.
+
+2004-03-21 Elijah Newren <newren@math.utah.edu>
+
+ * doc/FAQ/gtkmm-faq.xml: Updated to mention gtkmm2 more than gtkmm 1.2.
+
+2004-03-20 Murray Cumming <murrayc@murrayc.com>
+
+ * demos/gtk-demo/demowindow.cc: Use sigc::ptr_fun() instead of giving
+ the set_select_function function pointer directly to connect.
+
+2004-03-20 Murray Cumming <murrayc@murrayc.com>
+
+ * ActionGroup::get_action(), Clipboard::get_owner(),
+ ComboBox::get_model(), Entry::get_layout(), get_completion(),
+ EntryCompletion::get_model(), FileChooser::get_filter(),
+ IconInfo::get_builtin_pixbuf(), IconSource::get_pixbuf(),
+ Image::get_pixbuf(), get_animation(), Menu::get_accel_group(),
+ Scale::get_layout(), TreeModelFilter::get_model(),
+ UIManager::get_accel_group(), get_action(),
+ Widget::drag_begin(): Use refreturn.
+ * Entry::get_layout(), IconInfo::get_builtin_pixbuf():
+ IconSource::get_pixbuf(), Image::get_pixbuf(),
+ Menu::get_accel_group(): Added const versions.
+ (Thanks to Bryan Forbes for finding the missing refreturns.)
+
+2004-03-18 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/icontheme.hg: Wrapped changed signal.
+
+2004-03-14 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/bin.ccg remove(),
+ gtk/src/container.[hg|ccg]: If the child widget is managed, do
+ a reference on the child widget before removing it, so that it
+ is not destroyed, and is ready for a new container, just like
+ when it was first instantiated.
+
+2.3.6:
+
+2004-03-14 Murray Cumming <murrayc@murrayc.com>
+
+ * demos/demowindow.cc: Do not use flockfile if we are using the SUN
+ compiler, even though it passes the configure test, because it does
+ not seem to work here.
+
+2004-03-13 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/toolbar, treestore: Removed extra semicolon to remove
+ g++ 3.4 warning.
+
+2004-03-13 Murray Cumming <murrayc@murrayc.com>
+
+ * atk/src/hypertext.hg,
+ Removed extra semicolon to remove g++ 3.4 warning.
+
+2004-03-12 Cedric Gustin <cedric.gustin@swing.be>
+
+ * README.win32: Updated file for upcoming gtkmm-2.4.
+ * atk/src/action.hg, atk/src/component.hg, atk/src/object.hg,
+ gtk/gtkmm/accelmap.cc, gtk/gtkmm/accelmap.h,
+ gtk/gtkmm/comboboxtext.cc, gtk/gtkmm/comboboxtext.h,
+ gtk/src/main.ccg : Removed many #ifndef WIN32 as all methods are
+ now available/dllexported on win32, with the exceptions og Plug
+ and Socket.
+ * atk/atkmm/Makefile.am, atk/atkmm/private/Makefile.am,
+ atk/src/Makefile_list_of_hg.am_fragment,
+ build_shared/Makefile_build.am_fragment,
+ build_shared/Makefile_build_gensrc.am_fragment,
+ build_shared/Makefile_conditional.am_fragment,
+ build_shared/Makefile_gensrc.am_fragment, gdk/gdkmm/Makefile.am,
+ gdk/gdkmm/private/Makefile.am,
+ gdk/src/Makefile_list_of_hg.am_fragment, gtk/gtkmm/Makefile.am,
+ gtk/gtkmm/private/Makefile.am,
+ gtk/src/Makefile_list_of_hg.am_fragment,
+ pango/pangomm/Makefile.am, pango/pangomm/private/Makefile.am,
+ pango/src/Makefile_list_of_hg.am_fragment: Revamped the
+ Makefile.am helpers to accomodate multiple platforms (general,
+ posix, win32) and files sections (regular and deprecated files).
+
+2004-03-12 Murray Cumming <murrayc@murrayc.com>
+
+ * docs/reference/Makefile.am: remove the make dependency of
+ html/index.html on the generated installed beautify_docs.pl script, so
+ that docs are not rebuilt when building from a tarball.
+ Bug #136597 from dalgoda.
+
+2004-03-12 Murray Cumming <murrayc@murrayc.com>
+
+ * examples/cellrenderercustom/cellrendererpopup.cc: Removed some
+ accidentally pasted text that breaks the build.
+
+2004-03-11 Murray Cumming <murrayc@murrayc.com>
+
+ * demos/gtk-demo/demowindow.cc: Added #ifdef GLIBMM_COMPILER_SUN_FORTE
+ around the strange flockfile and funlockfile function prototypes, to
+ avoid problems on platforms which declare them differently.
+
+2004-03-09 Murray Cumming <murrayc@murrayc.com>
+
+ * Some, but not all, SUN Forte build fixes:
+ * demos/gtk-demo/demowindow.cc: Added prototypes for flockfile()
+ and funlockfile() because it does not seem to get them from
+ stdio.h - very strange. Commented-out the g_assert() lines that it
+ says as badly formed.
+ * demos/gtk-demo/textwidget.cc: Made the next_token char* const.
+ * examples/book/clipboard/ideal/examplewindow.cc:
+ on_clipboard_received_targets: Remove the useless const from the
+ std::list variable because it confused the compiler.
+ * examples/cellrenderercustom/cellrendererpopup.cc:
+ on_show_popup(): Use namespaced class name when specifying a
+ particular version of gobj().
+ * gdk/src/display.hg: Removed lots of extra ;s that caused
+ warnings.
+ * gdk/src/pixmap.ccg: Use unwrap<Drawable> instead of
+ unwrap<const Drawable> - this is the same as the sun-specific
+ stuff in tools/m4/convert_*.m4.
+ * gdk/src/pixmap.hg: Removed extra ;s that cause warnings.
+ * gtk/src/textbuffer.ccg: insert_(): Some const changes - see the
+ comments.
+ * tools/m4/convert_gdk.m4, convert_glib.m4: Use existing
+ sun-specific conversion when converting from any
+ RefPtr<const Something> to *Something.
+
+2004-03-09 Murray Cumming <murrayc@murrayc.com>
+
+ * Regenerated gtk/src/gtk_docs.xml, and gdk/src/gdk_docs.xml with
+ docextract_to_xml.py.
+ * docs/reference/Makefile.am: Upload doxygen-warnings.txt and
+ doxygen-output.txt every time, so everybody sees them.
+
+2004-03-09 Hagen Moebius <hagen.moebius@starschiffchen.de>
+
+ * Recent efforts cumulated in a massive documentation patch, which
+ eliminates almost all doxygen warnings/errors.
+ Files: atk/atkmm/init.h, gdk/src/display.hg, drawable.hg,
+ gdk_docs_override.xml, pixbuf.hg, window.ccg, window.hg,
+ gtk/gtkmm/accelkey.h, gtk/src/accellabel.hg, alignment.hg, box.hg
+ button.hg, cellrenderer.hg, filechooser.hg, gtk_docs_override.xml,
+ image.hg, layout.hg, main.hg, notebook.hg, rc.hg, textbuffer.hg,
+ treedragdest.hg, treemodelfilter.hg, treemodel.hg, treepath.hg,
+ treeview.hg, widget.hg, window.hg, pango/src/attributes.hg,
+ pango_docs_override.xml
+
+2004-03-07 Murray Cumming <murrayc@murrayc.com>
+
+ * Regenerated *_docs.xml files for atk, gdk, pango, and gtkmm,
+ because Hagen Moebius improved the docextract_to_xml.py script.
+
+2004-04-07 Hagen Moebius <hagen.moebius@starschiffchen.de>
+
+ * added documentation to gtk/src/viewport.hg, gtk/src/toolbutton.hg,
+ gtk/src/toggletoolbutton.hg, gtk/src/separatortoolitem.hg and
+ gtk/src/range.hg. Fixed a spelling error in gtk/src/radiotoolbutton.hg.
+ All documentation copy/pasted from Gtk+, so still room for imrovement.
+
+2004-04-06 Hagen Moebius <hagen.moebius@starschiffchen.de>
+
+ * modified docs/reference/Makefile.am to support a more general output
+ of doxygen warnings/errors.
+
+2004-03-06 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/gtk_signals.defs: Added the new RadioMenuItem::group_changed
+ signal.
+
+2004-03-06 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/filechooser.hg: set_current_folder(),
+ set_current_folder_uri(), select_filename(), select_uri(),
+ set_filename(), and set_uri() now return bools, because GTK+ now
+ does this.
+
+2004-03-06 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/gtk_methods.defs: regenerated.
+ * gtk/src/gtk_docs.xml: regenerated.
+
+2004-03-05 Hagen Moebius <hagen.moebius@starschiffchen.de>
+
+ * added missing documentation to gtk/src/expander.hg,
+ gtk/src/filechooserwidget.hg, gtk/src/fontbutton.hg,
+ gtk/src/imagemenuitem.hg, gtk/src/radiotoolbutton.hg. Mainly
+ class documentation, some non-Gtk+ function and some constructors.
+
+2004-03-05 Hagen Moebius <hagen.moebius@starschiffchen.de>
+
+ * gtk/src/colorbutton.hg: added missing documentation to some functions.
+
+2004-03-05 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/radiobutton.hg, radiomenuitem.hg: Wrap the group_changed
+ signals now that they are corrected in GTK+.
+ * gtk/src/filechooser.hg: Correct the set_local_only() parameter name
+ to match the one in GTK+, as spotted by Matthew Walton.
+
+2.3.5:
+
+2004-03-03 Bryan Forbes <mxpxfifws@yahoo.com>
+
+ * gtk/src/toolbar.[hg|ccg]: added methods to append, prepend, and
+ insert with a sigc::slot.
+ * examples/stock/stock.cc: use new append method to append with a slot;
+ added a toggle button to prove that there are no ambiguity problems
+ with the new methods.
+
+2004-03-02 Bryan Forbes <mxpxfifws@yahoo.com>
+
+ * gtk/src/toolbar.[hg|ccg]: removed old STL-stlye API (deprecated and
+ can't co-exist with new API).
+ * gtk/gtkmm/toolbar_elements.[h|cc]: removed these files to get rid of
+ all old API for Gtk::Toolbar.
+ * gtk/gtkmm/Makefile.am: removed toolbar_elements.[h|cc] from list of
+ files to build, because it is only needed by the old STL-style Toolbar
+ API.
+
+2004-03-03 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/radiobutton.hg, radiomenuitem.hg: Commented-out
+ the new group_changed signals until their declarations
+ are fixed in GTK+ - patch submitted.
+
+2004-03-03 Murray Cumming <murrayc@murrayc.com>
+
+ * pango/src/pango_methods.defs: Updated with h2defs.py.
+ * pango/fontface.[hg|ccg]: Added list_sizes().
+ * pango/attriter.[hg|ccg]: Added get_attrs().
+ * pango/fontfamily.hg: Added is_monospace().
+ * pango/fontset.[hg|ccg]: Added foreach().
+ * pango/language.hg: Added includes_script().
+ * pango/layout: Added set/get_auto_dir().
+
+2004-03-02 Murray Cumming <murrayc@murrayc.com>
+
+ * Updated gtk/src/gtk_signals.defs with tools/extra_defs_gen.
+ * gtk/src/cellrendererpixbuf.hg: Wrapped several new properties.
+
+2004-03-02 Murray Cumming <murrayc@murrayc.com>
+
+ * New GTK+ API wrapped:
+ * FileChooser: Added set/get_use_preview_label() and use_preview_label
+ property.
+ * Entry: Added set/get_alignment().
+ * ComboBox: Added popup() and popdown().
+ * Scale: Added get_layout() and get_layout_offsets().
+ * Widget: Added add_mnemonic_labels(), remove_mnemonic_label(), and
+ list_mnemonic_labels().
+ * ComboBoxEntry: Added a set_text_column() overload that takes a
+ ModelColumnBase instead of an int.
+ * Added ComboBoxEntryText, like ComboBoxText, as an equivalent for
+ gtk_combo_box_entry_new_text().
+ * RadioButton, RadioMenuItem: Added group_changed signals.
+ * Widget: Added draw_insertion_cursor() as wrapper for
+ gtk_draw_insertion_cursor, which has a GtkWidget as the first
+ parameter.
+ * Updated gtk/src/gtk_methods.defs with h2defs.py
+
+2004-03-01 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/treeview.ccg: Corrected the implementation of
+ unset_expander_column() to reset_expander_column(), to fix the build.
+
+2004-02-29 Billy O'Connor <billyoc@gnuyork.org>
+
+ * gtk/src/treeview.hg: Added documentation for Gtk::TreeView.
+
+2004-02-29 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/treeiter.[hg|ccg]: begins_tag(), ends_tag(), toggles_tag(),
+ has_tag(): Use a const parameter, and added method overloads with no
+ parameter, because the C functions can take a NULL.
+ * gtk/src/treemodel.[hg|ccg]: rows_reordered() now takes a
+ Glib::ArrayHandle<int> instead of a int* array of unknown size.
+ * gtk/src/entrycompletion.hg: Added prepend_*() methods instead of
+ using a default arg for insert().
+ * examples/book/entry: Moved the existing example into a simple
+ sub-directory, and added a completion sub-directory, demonstrating
+ Gtk::EntryCompletion.
+
+2004-02-29 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/treeselection.[hg|ccg]: Made selected_foreach() methods
+ const, because the slots are not allowed to change the model. But we
+ really need a TreeModel::const_iterator for this, and other things.
+
+2004-02-27 Bryan Forbes <mxpxfifws@yahoo.com>
+
+ * gtk/src/filechooser.hg: removed the inclusion of gtk/gtkfilechooser.h
+ since it's included in the ccg.
+
+2004-02-27 Bryan Forbes <mxpxfifws@yahoo.com>
+
+ * gtk/src/gtk_methods.defs: removed the set_folder_mode and get_folder_mode
+ methods as they are no longer in gtk+.
+
+2004-02-27 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/gtk_enums.defs: Added new FileChooser enum values, so that
+ set_action() is now a real replacement for set_folder_mode().
+ * examples/book/dialogs/filechooser/: Updated to use set_action()
+ instead of set_folder_mode(), really fixin build.
+
+2004-02-27 Murray Cumming <murrayc@murray.com>
+
+ * gtk/src/filechooser.hg: Removed set_folder_mode() and
+ get_folder_mode() because they have been removed from GTK+. This fixes
+ the cvs build.
+
+2004-02-27 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/treepath.hg: append<>(): Corrected a typo that is detected by
+ gtk++ 3.4 prereleases and would have been detected before if this
+ template method had been used. Bug #131928 by Matthew Tuck.
+
+2004-02-26 Martin Schulze <martin-ml@hippogriff.de>
+
+ * More libsigc++ 2 changes: Some documentation fixes, updates in the
+ tutorial and tries to solve some issues in GtkMainConnectionNode. With
+ fixes from Bryan Forbes.
+
+2004-02-26 Bryan Forbes <mxpxfifws@yahoo.com>
+
+ * configure.in:
+ * Makefile.am: added --enable-examples to configure to enable/disable the
+ building of the examples.
+
+2004-02-26 Murray Cumming <murrayc@murrayc.com>
+
+ * examples/book/treeview/tree/examplewindow.[h|cc]: Handle the TreeView
+ row_activated signal.
+ * gdk/src/display.hg: Add const overloads get_screen(),
+ get_default_screen(), list_devices(), get_event(), and peek_event().
+ * gdk/src/iconinfo.ccg: Actually implement get_attach_points(), though
+ the implementation is incomplete - see the TODO in the code.
+ * gdk/src/iconinfo.hg: Add default parameter values for
+ set_raw_coordinates(). Make get_embedded_rect() and get_attach_points()
+ const.
+ * gdk/src/icontheme.hg: Add parameter names in get_for_screen() and
+ set_screen(). Made load_icon() and list_icons() const.
+ * gtk/src/widget.[hg|ccg]: Made drag_dest_find_target() const.
+ * gdk/src/treeiter: Added reverse_iterator and const_reverse_iterator,
+ though const_iterator and const_reverse_iterator are not really const
+ yet. Added suitable overloads of begin() and end(), and added rbegin()
+ and rend().
+ * tools/m4/convert_gtk.m4: Added conversion needed by the above.
+
+2004-02-26 Bryan Forbes <mxpxfifws@yahoo.com>
+
+ * examples/stock/stock.cc: fixed to use the new Toolbar API.
+
+2.5.4:
+
+2004-02-14 Murray Cumming <murrayc@murrayc.com>
+
+ * gtk/src/gtk_methods.defs: Updated with h2defs.py
+ * gtk/src/gtk_signals.defs: Updated with generate_extra_defs, keeping
+ hand-coded changes for the Widget _event signals.
+ * gtk/src/gtk_enums.defs: Updated with glibmm/tools/enums.pl.
+ * gdk/src/pixbufloader.hg: Added set_size() as wrapper for
+ gdk_pixbuf_loader_set_size().
+ * gtk/src/cellrenderer.hg: Wrapped editing_cancelled() and the
+ editing_cancelled signal, for use by CellRenderer implementations.
+ * gtk/src/action.hg: Added get_visible(), get_sensitive(),
+ is_visible(), is_sensitive().
+ * gtk/src/actiongroup.hg: Added set_sensitive(), set_visible(),
+ get_visible(), get_sensitive().
+ * gtk/src/uimanager.hg: Wrapped the proxy_connected,
+ proxy_disconnected, pre_activate, and post_activate signals.
+ * gtk/src/widget.hg: Wrapped event_after signal.
+
+2004-02-11 Bryan Forbes <mxpxfifws@yahoo.com>
+
+ * examples/cellrenderercustom/popupentry.cc: change to use Gtk::Requisition.
+ * examples/dnd/dndwindow.cc: change to use Gtk::AtomString::to_cpp_type.
+ * gdk/src/drawable.hg: changed the PangoGlyphString* arg to
+ Pango::GlyphString& since that argument is not an array. closes bug #97036
+ * gdk/src/window.[ccg|hg]: changed methods that use GList* to a
+ Glib::ListHandle<>; wrote get_internal_paint_info by hand because we need a
+ temporary variable.
+ * gtk/gtkmm/stock.[cc|h]: added the new Authentication dialog stock icon.
+ * gtk/src/Makefile_list_of_hg.am_fragment: added new iconinfo.hg.
+ * gtk/src/filechooser.hg: changed the GSList* returned by get_uris() to a
+ Glib::SListHandle<Glib::ustring>.
+ * gtk/src/iconinfo.[ccg|hg]: added new class to deal with GtkIconInfo.
+ * gtk/src/icontheme.[ccg|hg]: changed to use new IconInfo class; hand coded
+ get|set_search_path.
+ * gtk/src/window.hg: added property "role".
+ * tools/m4/convert_gtk.m4: added conversion for GtkIconInfo*->IconInfo.
+
+2.3.4:
+
+2004-02-13 Murray Cumming <murrayc@usa.net>
+
+ * examples/cellrendercustom/popup.cc: Get and use a string for the
+ target, to fix the build.
+ * gdk/src/dragcontext.hg: get_selection() is now const.
+
+2004-02-11 Matthew Walton <matthew@alledora.co.uk>
+
+ * examples/book/dialogs/filechooserdialog/examplewindow.cc:
+ Add buttons, as you would need in a real example.
+
+2004-02-10 Bryan Forbes <mxpxfifws@yahoo.com>
+
+ * tools/m4/convert_gtk.m4: added TargetFlags<->GtkTargetFlags,
+ IconLookupFlags<->GtkIconLookupFlags, and
+ IconThemeError<->GtkIconThemeError; added conversions for
+ IconTheme<->GtkIconTheme and TargetList<->GtkTargetList.
+ * gtk/gtkmm/targetentry.[cc|h]: use the TargetFlags enum.
+ * gtk/src/Makefile_list_of_hg.am_fragment: added icontheme.hg and
+ targetlist.hg.
+ * gtk/src/enums.hg: added TargetFlags enum.
+ * gtk/src/frame.hg: use Allocation instead of GtkAllocation.
+ * gtk/src/icontheme.[ccg|hg]: added IconTheme class.
+ * gtk/src/socket.hg: use Gdk::NativeWindow instead of GdkNativeWindow.
+ * gtk/src/targetlist.[ccg|hg]: added TargetList class.
+ * gtk/src/widget.[ccg|hg]: use the new TargetList class; typedef Requisition
+ and Allocation and convert methods to use them; use Glib::ustring instead of
+ GdkAtom where necessary;
+ * demos/gtk-demo/example_drawingarea.cc:
+ * examples/cellrenderercustom/cellrendererpopup.cc: changed to use new
+ Allocation API.
+ * examples/dnd/dndwindow.c: changed to use the new TargetFlag enum.
+ * fixed up as per murrayc's requests; closes bug #133936.
+
+2004-02-10 Bryan Forbes <mxpxfifws@yahoo.com>
+
+ * tools/m4/convert_gdk.m4: added InputSource<->GdkInputSource,
+ Glib::ustring<->GdkAtom, and NativeWindow<->GdkNativeWindow.
+ * gdk/src/colormap.hg: Used Gdk::Color instead of GdkColor.
+ * gdk/src/device.hg: Wrapped GdkInputSource and used the new enum in
+ corresponding methods.
+ * gdk/src/display.[hg|ccg]: Used Glib::ustring instead of GdkAtom and
+ NativeWindow instead of GdkNativeWindow.
+ * gdk/src/dragcontext.[ccg|hg]: Used DragProtocol instead of
+ GdkDragProtocol; GdkAtom->Glib::ustring.
+ * gdk/src/event.[ccg|hg]:
+ * gdk/src/pixmap.[ccg|hg]: GdkNativeWindow->NativeWindow.
+ * gdk/src/types.[ccg|hg]: Added Gdk::AtomStringTraits struct back and
+ typedef'd it as AtomString; typedef'd GdkNativeWindow as Gdk::NativeWindow.
+ * gdk/src/window.hg: GdkGeometry->Geometry.
+ * fixed up as per murrayc's requests; closes bug #133933.
+
+2004-02-10 Murray Cumming <murrayc@usa.net>
+
+ * gtkmm now uses libsigc++ 2 as like glibmm, with slightly different
+ API. See bug #125061. We need to update CHANGES later.
+
+2.3.3:
+
+2004-01-31 Murray Cumming <murrayc@usa.net>
+
+ * gdk/src/window.hg, gtk/src/widget.hg: Used C++ Region type instead of
+ GdkRegion. Make Region& args const where appropriate.
+ * gtk/src/treedragsource.[hg|ccg]: Hand-coded the drag_get_data vfunc
+ so that it can use a C++ SelectionData& output parameter.
+ * gtk/src/selectiondata.[hg|ccg]: Added set() method with fewer
+ parameters, that calls get_target() to get the type(), like the
+ examples do. Hopefully that is sensible.
+ * gtk/src/celllayout.hg: Use C++ CellRenderer* instead of C
+ GtkCellRenderer for vfunc paramters.
+ * gtk/src/treeiter.[hg|ccg]: Added TreeIter::operator--(), which is
+ slow and which has no direct equivalent in GTK+ itself yet.
+ * Added lots of const ListHandle and SListHandle get methods, with
+ const elements. Fixes bug 126721.
+
+
+2004-01-29 Murray Cumming <murrayc@usa.net>
+
+ * gtk/src/widget: The drag_data_get and selection_get signals now have
+ Gtk::SelectionData& return parameters instead of GtkSelectionData*.
+ This requires the latest glibmm, which has added the optional
+ custom_c_callback parameter for _WRAP_SIGNAL(). This required some
+ copy/paste/changed code in the .ccg files.
+
+2.3.2:
+
+2004-01-21 Murray Cumming <murrayc@usa.net>
+
+ * examples/book/treemodelcustom/exampletreemodel.[h|cc]: Wrote and
+ used some GlueItem and GlueList classes to better manage the
+ GtkTreeIter data. But at the moment, the old iters are never
+ invalidatated so this concept is not fully tested.
+ * gtk/src/treemodelfilter: Wrapped set_modify_func() after talking
+ to Kris about what it does.
+
+2004-01-19 Murray Cumming <murrayc@usa.net>
+
+ * gtk/src/liststore.[hg|ccg], gtk/src/treestore.[hg|ccg]: Added
+ set_model_columns() methods, as wrappers for
+ gtk_list_store_set_model_columns() and
+ gtk_tree_store_set_model_columns().
+ * examples/book/treeview/drag_and_drop/dnd_treemodel.[h|cc]: Used
+ these methods with a non-static member ModelColumnRecord, so that
+ the ModelColumnRecord can be instantiated after the gtkmm type system.
+ Thanks to Bryan Forbes for pointing this out.
+
+2004-01-19 Takashi Takekawa <takekawa@users.sourceforge.jp>
+
+ * atk/src/text.hg, gtk/src/enums.hg: deleted unnecessary namespace
+ qualification, for the Intel compiler. Bug #131172.
+
+2004-01-19 Murray Cumming <murrayc@usa.net>
+
+ * gdk/src/drawable.[hg|ccg]: Added copy_to_image() as wrapper for
+ gdk_drawable_copy_to_image().
+ * gtk/src/cellrenderertext.hg: Add a custom m4 conversion for the
+ Gdk::Drawable paramter of the render() vfunc, so that it takes
+ an extra reference.
+
+2004-01-16 Murray Cumming <murrayc@usa.net>
+
+ * */*.hg: All _WRAP_VFUNCS are now in protected sections, because
+ gmmproc no longer puts them in a separated protected section
+ automatically. Note also, that gmmproc now generates correct const
+ _vfuncs, so some of your overrides might no longer be overrides. Also,
+ you can add doxygen documentation before the _WRAP_VFUNC() macro now,
+ and it will be read by doxygen.
+
+2004-01-14 Murray Cumming <murrayc@usa.net>
+
+ * gtk/src/treeiter.[hg}ccg]: Added TreeIter::set_stamp() and
+ get_stamp(), with documentation, for use when implementing a
+ custom TreeModel.
+ * gtk/src/treemodel.[hg|ccg]:
+ - Hand-coded several vfuncs and their C callbacks, so that we can have
+ C++ iterators instead of GtkTreeIter*s in the API, and to reorder some
+ parameters.
+ - Added 2 extra vfuncs for information about root nodes. The C
+ versions of these vfuncs provide root node information when the iter
+ is NULL, but it is nicer in C++ to just have an extra vfunc without
+ that parameter. This requires an extra if() in the _vfunc_callback()
+ implementation.
+ - Added documentation for the vfuncs but gmmproc does not yet put the
+ documentation in the right place for the generated vfuncs.
+ * gtk/src/cellrenderer.hg: Added docuemntation for the vfuncs, but
+ gmmproc does not put this documentation in the right place yet.
+ * examples/: Added treemodelcustom to show a derived TreeModel, which
+ overrides those vfuncs, based on the example by Christof Pettig.
+
+2004-01-12 Murray Cumming <murrayc@usa.net>
+
+ * demos/gtk-demo/example_uimanager.cc: Removed extra comma to fix
+ build - patch by Billy O'Connor.
+
+2004-01-09 Murray Cumming <murrayc@usa.net>
+
+ * gtk/src/main.[hg|ccg]: Added docs, based on the C docs. Added bool
+ return value to iteration().
+ * gtk/src/uimanager.hg: Added wrapper for get_toplevels(), as wrapper
+ for gtk_ui_manager_get_toplevels().
+ * gtk/src/action.hg: add(): Use the new
+ gtk_action_group_add_action_with_accels() instead of
+ gtk_action_group_add_action() so that it tries to use the stock
+ accelerator if the action has a stock_id.
+
+2004-01-05 Murray Cumming <murrayc@usa.net>
+
+ * gdk/src/image.hg: Added accessors for public struct fields.
+
+2003-01-05 Eric Bourque <ericb@computer.org>
+
+ * gtkmm.spec.in: added an unpackaged file (.devhelp) to the %files
+ section.
+
+2004-01-03 Murray Cumming <murrayc@usa.net>
+
+ * gdk/src/*.[hg|ccg]: Added class documentation, by copying it from the
+ C documentation.
+ * gdk/gdkmm/: Added rgb.[h|cc] with some global functions, wrapping
+ gdk_rgb_get_colormap(), gdk_rgb_get_visual() and gdk_rgb_ditherable().
+ * gdk/src/color.hg: Documented all methods, apart from the hsv and hsl
+ stuff that is a mystery to me.
+ * gdk/src/colormap.hg: Added get_system() as a wrapper for
+ gdk_colormap_get_system().
+ * gdk/src/device.hg: Added get_name(), get_source(), get_mode() and
+ get_has_cursor() as accessors for read-only struct fields.
+ * gdk/src/dragcontext.[hg|ccg]: Added get_targets() and documented it
+ and other accessors.
+ * gtk/src/liststore.hg, treestore.hg: Documented all methods.
+ * gtk/src/tree*.hg: Added lots of class and method documentation.
+
+2003-12-31 Murray Cumming <murrayc@usa.net>
+
+ * docs/reference/Makefile.am: Corrected generated .devhelp filename
+ so that it matches the pattern that devhelp looks for.
+ * docs/reference/doxygen_to_devhelp.xsl: Correct link prefix, so that
+ it links to the installed html documentation.
+ * gtk/gtkmm/accelmap.[h|cc]: Added lock_path() and unlock_path() as
+ wrappers for new GTK+ functions. Added documentation for all AccelMap
+ methods, based on the GTK+ docs.
+ * gtk/src/clipboard.[hg|ccg]: Added documentation, based on the C docs.
+ Added wait_for_targets(), as a wrapper for
+ gtk_clipboard_wait_for_targets(). Added a version of request_targets()
+ with a callback that takes a list of strings, as a wrapper for
+ gtk_clipboard_request_targets(), and deprecated the hacky one
+ with a callback that takes a SelectionData.
+ * atk/src/: Added Hyperlink, Hypertext, Document, and StreamableContent
+ * atk/src/atkobject.hg: Now inherits from the Hypertext interfaces as
+ well as the others.
+ * gtk/src/gtk_methods.defs: Updated from gtk+ with h2defs.py
+
+2003-12-30 Murray Cumming <murrayc@usa.net>
+
+ * docs/reference/Makefile.am: Use installed beautify_docs, instead
+ of a copy.
+ * configure.in: Use installed glibmm_check_perl() instead of a copy.
+
+2003-12-21 Murray Cumming <murrayc@usa.net>
+
+ * gtk/src/menushell.hg: Added cancel() as wrapper for
+ gtk_menu_shell_cancel().
+
+2003-12-20 Murray Cumming <murrayc@usa.net>
+
+ * gtk/src/celllayout.hg: Wrapped reorder() method and vfunc.
+ * gtk/src/gtk_methods.defs and gdk/src/gdk_methods.defs: regenerated
+ with h2defs.pyt.
+
+2003-12-18 Murray Cumming <murrayc@usa.net>
+
+ * gdk/src/display.hg: Added set_double_click_distance() as wrapper
+ for gdk_display_set_double_click_distance(), though the .defs for
+ it are not there yet.
+ * gtk/src/settings.hg: Added double-click-distance property.
+ * gtk/src/button.hg: Added get/set_alignment() as wrapper for
+ gtk_button_get/set_alignment(), though the .defs are not there yet.
+ * pango/src/pangoline.hg: Added get_length(), get_start_index(), and
+ get_layout() as accessors for the public struct fields.
+ * gtk/src/cellrenderertext.hg: Wrapped the new single-paragraph-mode
+ property.
+
+2003-12-13 Murray Cumming <murrayc@usa.net>
+
+ * docs/reference/Makefile.am: Make sure that gtkmm2.devhelp is
+ generated before trying to install it. Added a doxygen-warnings
+ target that outputs the doxygen log to doyxgen_warnings.txt.
+ * gdk/src/window.hg: Added get_group(), as a wrapper for
+ gdk_window_get_group(), and set_accept_focus() as wrapper for
+ gdk_window_set_accept_focus().
+ * gdk/src/display.hg: Added get_default_group(), as wrapper for
+ gdk_display_get_default_group().
+
+2.3.1:
+
+2003-12-08 Murray Cumming <murrayc@usa.net>
+
+ * gtk/src/gtk_methods.defs: Regenerated with h2defs.py.
+ * gtk/src/combobox.hg: Corrected C function name in _WRAP_CONSTRUCT,
+ so that the constructor is actually generated.
+ * gtk/src/comboboxentry.hg: Added set_text_column() as wrapper
+ for gtk_combo_box_entry_set_text_column().
+ * gtk/src/entrycompletion.[hg|ccg]: Wrapped match_selected signal,
+ unpleasantly, by hand-coding everything.
+ * gtk/src/filefilter.[hg|ccg]: Added add_custom() as wrapper for
+ gtk_file_filter_add_custom(), using a SignalProxy.
+ * gtk/src/menu: Added set_monitor() as wrapper for
+ gtk_menu_set_monitor().
+ * gtk/src/treeviewcolumn.hg: Added get_cell_position() as a
+ wrapper for gtk_tree_view_column_cell_get_position().
+
+2003-12-08 Murray Cumming <murrayc@usa.net>
+
+ * atk/atkmm/, pango/pangomm: Added init.[h|cc] so you can use
+ these libraries without using all of gtkmm.
+
+2003-12-06 Murray Cumming <murrayc@usa.net>
+
+ * gtk/src/radiotoolbutton.[hg|ccg]: Removed the constructor that
+ takes a RadioToolButton& group, because it looks like a copy
+ constructor. Added a constructor that takes a Widget& icon_group,
+ for consistency with the other ToolButton classes.
+ Bug 128484 (Billy O'Connor).
+
+2003-12-03 Murray Cumming <murrayc@usa.net>
+
+ * gtk/src/widget.hg: Wrapped get_accessible, screen_changed, and
+ can_activate_accel signals, though the .defs are not there for them
+ yet.
+
+2003-11-27 Murray Cumming <murrayc@usa.net>
+
+ * gtk/src/treemodel.hg: Added iter_is_valid(). Use the old TreeIter::
+ operator bool() as a default implementation, but this is already
+ reimplemented in ListStore and TreeStore, using GTK+ functions.
+ * gtk/src/treeiter.hg: operator bool(): Use iter_is_valid() instead
+ of our hack.
+
+2003-11-23 Murray Cumming <murrayc@usa.net>
+
+ * gtk/src/radiotoolbutton.[hg|ccg]: Manually-implement constructors,
+ because the group is not a property.
+ * examples/book/toolbar: Use the new Toolbar API, to test it, though
+ this example should probably use the UIManager in future.
+ * gtk/gtkmm.h: Added the toolitem headers.
+
+2003-11-22 Murray Cumming <murrayc@usa.net>
+
+ * gtk/src/toolbar.[hg|ccg]: Deprecated ToolList.
+ * examples/Makefile.am_fragment: Added GTKMM_DISABLE_DEPRECATED to
+ examples build.
+ * gdk/src/pixbuf.[hg|ccg]: Wrapped get_formats().
+
+2003-11-19 Murray Cumming <murrayc@usa.net>
+
+ * docs/reference/Makefile.am: Fix the distcheck for the .devhelp file.
+ * gtk/src/expander.hg: Add the get/set_markup methods, though there
+ are no .defs for them yet.
+
+2003-11-17 Murray Cumming <murrayc@usa.net>
+
+ * gtk/src/combobox.hg: Changed constructors, and added set_model(),
+ because the model is now a non-construct-only property in GTK+.
+ * gtk/gtkmm/comboboxtext.[h|cc]: Used changed API to implement this.
+ examples/book/combobox/text now works.
+
+2003-11-16 Murray Cumming <murrayc@usa.net>
+
+ * gtk/src/toolbar.[hg|cc]: Wrapped new functions, including the
+ ToolItem-based insert, append, and prepend, and deprecated our
+ equivalents of the deprecated C functions.
+ Moved deprecated Elements API into toolbar_elements.[h|cc].
+ * gtk/src/gtk_docs.xml: Replaced with freshly generated output
+ from docextract_to_xml.py from pygtk.
+ * Added gdk/src/pixbufformat.[hg|ccg] as wrapper for GdkPixbufFormat.
+
+2003-11-14 Murray Cumming <murrayc@usa.net>
+
+ * gdk/src/gdk_docs_override.xml, gtk/src/gtk_docs_override.xm,
+ pango/src/pango_docs_override.xml. Added overrides for 4 or 5 methods
+ that mention Glib::Free, though I feel sure that I did this once
+ before. Bug #126870.
+
+2003-11-05 Murray Cumming <murrayc@usa.net>
+
+ * gtk/src/widget.hg, gdk/src/window.hg: Fixed typos to fix build.
+
+2003-11-03 Murray Cumming <murrayc@usa.net>
+
+ * gtk/src/action.[hg|ccg]: Renamed add_action() to add(), to reduce
+ the amount of client code slightly.
+ * gtk/src/celllayout.[hg|ccg]: Added set_cell_data_func(), using
+ SignalProxy.
+ * gtk/src/treemodelfilter.[hg|ccg]:
+ Added set_visible_func(), using SignalProxy.
+ Added convert methods.
+
+
+2003-11-02 Murray Cumming <murrayc@usa.net>
+
+ * gtk/src/*action.[hg|ccg]: renamed create_from_stock() to
+ create() because I think we can overload the methods, because the
+ parameters are distinguishable.
+ * examples/book/dialogs/: Added filechooserdialog, by copying and
+ modifying the fileselectiondialog example.
+ * gtk/src/entrycompletion.[hg|ccg]: wrap set_match_func() using
+ SignalProxy.
+
+2003-11-01 Murray Cumming <murrayc@usa.net>
+
+ * gtk/src/: Added wrappers for FileChooser, FileChooserWidget,
+ FileChooserDialog and FileFilter. FileChooser is an interface
+ but I see no way to override it.
+ * Wrapped some more signals and vfuncs.
+
+2003-10-31 Murray Cumming <murrayc@usa.net>
+
+ * docs/index.html: Corrected links to glibmm docs, using relative
+ links.
+
+2003-10-30 Murray Cumming <murrayc@usa.net>
+
+ * gtk/src/toolitem.hg: Removed get/set_pack_end() now that they are
+ removed from GTK+, to fix the CVS build.
+ * docs/Makefile.am_fragment: Install docs to gtkmm-2.4 directory
+ instead of gtkmm-2.3.
+ * docs/reference/Makefile.am: Add installdox rule to make the
+ reference html link to the glibmm docs when they are installed.
+
+2003-10-26 Murray Cumming <murrayc@usa.net>
+
+ * Dealt with several //TODO comments, adding several unset_*() methods
+ * *Action: Changed create() to create_from_stock() and create.
+ * ToggleAction: create() methods: Added bool is_active parameter.
+ * RadioAction: create() methods: Added group parameter.
+ * Added gtk/gtkmm/radiobuttongroup.[h|cc] containing
+ Gtk::RadioButtonGroup. This was previously in the Gtk::Menu_Helpers
+ namespace. It now works with RadioActions as well as the 3 other
+ Radio item classes.
+ * Added examples/combobox/complex, showing a custom tree model,
+
+2.3.0:
+
+2003-10-24 Murray Cumming <murrayc@usa.net>
+
+ * gtk/src/gtk_signals.defs: regenerated, keeping hand-coded changes,
+ after adding some extra GTypes to tools/extra_defs_gen.
+ * gkt/gtkmm: Added cellrenderer_generation.[h|cc], with some of the
+ templates and template specialisations previously in
+ treeviewcolumn.[hg|ccg]. This allowed them to be reused in
+ gtk/src/celllayout.hg for a pack_start(model column) template.
+ * demos/gtk-demo/: Added example_ui_manager.cc - a C++ version of
+ the C one.
+
+2003-10-22 Murray Cumming <murrayc@usa.net>
+
+ * Added wrappers for GtkToolItem, ToolButton, ToggleButton,
+ RadioToolButton.
+
+2003-10-17 Murray Cumming <murrayc@usa.net>
+
+ * gtk/src/combobox.hg: Updated for latest API.
+ * Added gtk/gtkmm/comboboxtext.[h|cc], putting text-based stuff
+ in a sub class.
+ * gtk/src/treemodel.[hg|ccg]: Added const overload of children(),
+ but it's a bad hack that needs more attention.
+ * Added examples/book/combobox, which uses ComboBoxText and should use
+ ComboBox also in future. It segfaults at the moment.
+ * Added gtk/src/toggleaction.[hg|ccg] and gtk/src/radioaction.hg.
+ * Wrapped GList* and GSList*-using methods.
+ * UIManager: Wrapped Error-using methods, with optional errthrow
+ parameter of _WRAP_METHOD().
+ * gtk/src/gtk_signals.defs: Updated with newly-generated defs from
+ extra_defs_gen, redoing the by-hand corrections.
+ * examples/book/dialogs/colorselection, fontselection: Used
+ the buttons instead. This will be moved into the buttons folder
+ later.
+ * examples/book/dialogs/messagedialog: Updated for new constructor
+ API.
+
+2003-10-12 Murray Cumming <murrayc@usa.net>
+
+ * gtk/src/treemodel.hg: Comment-out wrapper for row-inserted
+ signal, until gtk+ bug 123923 has been dealt with, to prevent
+ treeview crash with GTK+ 2.3
+
+2003-10-12 Murray Cumming <murrayc@usa.net>
+
+ * Added wrappers for new GTK+ classes: Action, ActionGroup,
+ CellLayout, ComboBox, ComboBoxEntry, ColorButton, EntryCompletion,
+ Expander, FontButton, UIManager, and a few extra methods and
+ properties. More API details in NEWS.
+
+2003-10-01 Murray Cumming <murrayc@usa.net>
+
+ * tools/m4/convert_gdk.m4: Correct the GdkDrawable conversion to
+ fix the build.
+
+2003-09-30 Murray Cumming <murrayc@usa.net>
+
+ * gtk/src/cellrenderer.hg, gtk/src/gtk_vfuncs.defs,
+ tools/m4/convert_gdk.m4: The CellRenderer render vfunc now takes a
+ Gdk::Drawable instead of a Gdk::Window, as per my recent change
+ in GTK+ in CVS. See bug #102405.
+
+2003-09-30 Murray Cumming <murrayc@usa.net>
+
+ * gtk/src/gtk_methods.defs: Updated with h2defs.py from GTK+ in cvs.
+
+2003-09-30 Murray Cumming <murrayc@usa.net>
+
+ * gtk/src/cellrenderer.hg, gtk/src/gtk_signals.defs:
+ Wrapped the CellRenderer::background-cell-* properties that seem
+ to have been added in GTK+ 2.2, but that we had not wrapped yet.
+ Bug #116803.
+
+2003-09-30 Murray Cumming <murrayc@usa.net>
+
+ * gtk/src/textbuffer.hg: get_selection_bounds() returns a bool
+ to say whether anything is selected. Bug #118459
+ * gtk/src/widget.hg: get_style_property(): Parameter renamed to
+ avoid rare warning. Part of bug #117740.
+
+2003-09-28 Bradley Bell <btb@debian.org>
+
+ * gtk/src/notebook.hg, gtk/src/treeiter.ccg, gtk/src/treeiter.hg:
+ workarounds for inaccessible base bugs with latest gcc.
+
+2003-09-11 Cedric Gustin <cedric.gustin@swing.be>
+
+ * atk/src/text.hg, gdk/src/display.hg, gdk/src/displaymanager.hg,
+ gdk/src/screen.hg, glib/glibmm/threadpool.cc,
+ gtk/src/clipboard.hg, gtk/src/treerowreference.hg,
+ gtk/src/widget.hg, gtk/src/window.hg : Removed a bunch of
+ _GTKMMPROC_SIGNAL_H_AND_CC(#ifndef G_OS_WIN32) restrictions. These
+ functions are now implemented in the latest (2.2.4) GTK+ on win32.
+ * gdk/src/Makefile_list_of_hg.am_fragment,
+ gtk/src/Makefile_list_of_hg.am_fragment : Adapted Makefile.am's
+ accordingly. In particular, Gtk::Clipboard is now supported on
+ win32.
+ * README.win32 : Updated list of unsupported functions.
+
+2003-09-04 Bradley Bell <btb@debian.org>
+
+ * docs/reference/Makefile.am: Distribute doxygen tags
+
+2003-08-20 Murray Cumming <murrayc@usa.net>
+
+ * gdk/src/display.hg: Add refreturn WRAP_METHOD() parameter to
+ open() and open_default_libgtk_only(), because these seem to return
+ an existing instance rather than a new one. Should fix bug #119049.
+
+2003-08-20 Frank Naumann <fnaumann@freemint.de>
+
+ * demos/gtk-demo/example_treeview_editable_cells.cc,
+ examples/book/treeview/editable_cells/examplewindow.cc,
+ gtk/src/treeview.hg: Added workaround for MSVC++.
+ The MSVC++ now compile Gtk::TreeView::append_column_editable
+ and the result work as expected. An exact description
+ can be found in the treeview.h as comment. Removed
+ the no longer required MSVC++ workarounds from the
+ examples too.
+
+2003-08-11 Martin Schulze <teebaum@cvs.gnome.org>
+
+ * gtk/src/treeview.hg, docs/tutorial/gtkmm-tut.xml:
+ Add information about what to do when the column type is not
+ supported and TreeView::append_column() sets up the CellRenderer
+ incompletely (bug #118922).
+
+2003-07-21 Murray Cumming <murrayc@usa.net>
+
+ * src/gtk/buttonbox.hg: Documentation: Corrected the switched
+ vertical/horizonal descriptions of VButtonBox and HButtonBox.
+ Bug #117883.
+
+2003-07-05 Murray Cumming <murrayc@usa.net>
+
+ * gtk/src/object.ccg Object::_init_unmanage():
+ Don't g_object_ref() objects that are already not managed, such as
+ stuff used with Glib::Wrap() which is already in a container
+ (Containers sink (unfloat) child widgets after they are added). Also,
+ don't mark it as not manage()d, (!referenced_) of course. This was
+ doing one-too-many refs, so sometimes the objects would not be
+ finalized even if they were destroyed. Daniel Elstner found this
+ potential problem months ago and I should have listened to him.
+ This seems to fix the lifetime bug shown in tests/wrap_existing. I think this
+ fixes the get_toplevel_windows() leak shown in tests/refcount_dialog also.
+ Thanks to Harold Hopfes for doing _lots_ of investigation work on this bug.
+ * gtk/src/window.ccg: Window::_destroy_c_instance():
+ Remove the g_object_unref() that was a window-specific fix for the
+ extra g_object_ref() in gtk/src/object.ccg above.
+
+2003-07-12 Murray Cumming <murrayc@usa.net>
+
+ * pango/src/pango_docs_override.xml,
+ gdk/src/gdk_docs_override.xml,
+ gtk/src/gtk_docs_override.xml: Added overrides for documentation
+ that talks about null pointer values where we use references. Added
+ TODOs in the .hg files to add unset() methods in 2.4 to support this
+ functionality.
+
+2003-07-03 Murray Cumming <murrayc@usa.net>
+
+ * Used %p and (void*) cast to various g_warning()s used when
+ --enable-debug-refcounting is used, avoiding compiler warnings.
+ * Added tests/wrap_existing, which shows a memory leak that we are
+ currently working on.
+
+2003-06-17 Murray Cumming <murrayc@usa.net>
+
+ * docs/FAQ/gtkmm_faq.xml: Applied patch from Andreas Rottman
+ mentioning libsigcx extension library.
+
+2003-06-13 Cedric Gustin <cedric.gustin@swing.be>
+
+ * gtk/src/treeviewcolumn.hg: Added declaration of
+ generate_cellrenderer full class specialization for types bool and
+ Gdk::Pixbuf. This solves a long-standing bug with treeviews on
+ win32. Hopefully, it will also solve bug #113688 on Debian.
+ * demos/gtk-demo/example_stockbrowser.cc: Removed GTKMM_WIN32
+ compiler directive. On win32, stock icons are not displayed as
+ expected in the first column of the treeview.
+
+2003-05-31 Murray Cumming <murrayc@usa.net>
+
+ * configure.in: Depends on GTK+ 2.3.0 now that GTK+ has branched, with
+ GTK+ 2.4 in HEAD.
+ * configure.in: gmmproc is now installed in a glibmm-2.3 folder
+ rather than a glibmm-2.4 folder.
+ * gtk/src/alignment.hg: Wrapped new padding functions and properties.
+ Wrote New in GTK+ 2.4 next to them. They need regenerated .defs files,
+ but we can do that later.
+
+2003-05-18 Murray Cumming <murrayc@usa.net>
+
+ * docs/tutorial/gtkmm-tut.xml: TreeView chapter: Replaced some TODOs
+ with short paragraphs. Added copies of the example screenshots to
+ show the list and tree models.
+
+2003-05-14 Murray Cumming <murrayc@usa.net>
+
+ * Applied some of MSVC++ .NET 2003 changes from jburris. For instance,
+ use of Gtk:: prefix with manage, because MSVC++ can not guess it. Also
+ corrected the out-of-sync protected/private modifiers in the private
+ gtype classes and their prototypes.
+
+2003-05-09 Murray Cumming <murrayc@usa.net>
+
+ * gtk/src/menushell.[hg|ccg] replace GP_LIST_CONTAINER_REMOVE() with
+ custom-written remove() and erase() MenuList methods, to ensure that
+ we unset the accel widget that we might have set in the MenuItem()
+ constructor. This avoids a memory leak due to the extra reference.
+ * gtk/src/accel_label.[hg|ccg]: Added unset_accel_widget().
+
+2003-05-06 Enrico Costanza <ec142@york.ac.uk>
+
+ * gtk/src/image.hg: Added "refreturn" to _METHOD_WRAP for get_pixbuf
+ This fixes a bug that caused "(g_object_unref): assertion `G_IS_OBJECT
+ (object)' failed"
+
+2003-05-06 Murray Cumming <murrayc@usa.net>
+
+ * gtk/src/optionmenu.[hg|ccg]: Implemented a custom destructor which
+ calls remove_menu(), to prevent the menu (set with set_menu()), from
+ remembering a dead OptionMenu. See the comment in the destructor for
+ more details.
+
+2003-05-02 Murray Cumming <murrayc@usa.net>
+
+ * *.hg: Added namespace prefix to all StateType parameter types,
+ because there is one in Atk and in Gtk and that confuses Doxygen.
+ * demos/gtk-demo/example_change_display.cc: Commented-out some unused
+ method parameters, to avoid warnings.
+
+2003-04-26 Gene Ruebsamen <gene@erachampion.com>
+
+ * docs/tutorial/gtkmm-tut.xml: Added a new appendix for win32
+ with the cygwin/command-line portion contributed by Cedric Gustin.
+ Created a new link from the Installation section to point to the new appendix.
+ Also fixed the filename of the tutorial in the "Contributing" section.
+ * docs/tutorial/figures/devcpp_project_options.png: Added new image for the new win32 appendix described above.
+
+2003-04-22 Murray Cumming <murrayc@usa.net>
+
+ * Install headers in x.3 directories instead of .4 because I noticed
+ that some are already there so it needed to be fixed, and, given the
+ current build files, it was easier to choose .3 than .4 (it is based
+ on the library names), and because it does not seem like such a bad
+ idea.
+
+2003-04-21 Murray Cumming <murrayc@usa.net>
+
+ * gtk/src/menushell.ccg: Added
+ GP_LIST_ITER(Glib::List_Cpp_Iterator<GtkListItem, ComboDropDownItem>
+ because the standard GP_LIST iterator seems to be useless. See bug
+ #110206.
+
+2003-04-21 Murray Cumming <murrayc@usa.net>
+
+ * examples/book/Makefile.am: Added idle directory.
+ * configure.in: Added examples/book/idle/Makefile.
+
+2003-03-30 Gene Ruebsamen <gene@erachampion.com>
+
+ * examples/book/timeout/timerexample.[cc,h]: update examples to
+ work with Gtkmm2.
+ * examples/book/idle/idleexample.[cc,h]: create new idle directory and
+ examples for Gtkmm2.
+ * docs/tutorial/gtkmm-tut.xml: update the idle/timeout chapter for
+ Gtkmm2 and modify to use the program listings in the examples/book/
+ directories.
+
+2003-04-21 Oli Kessler <ok@tor.ch>
+
+ * gtk/gtk_docs_override.xml, fixed docu bug in the function
+ gtk_window_set_default
+
+2003-04-15 Ole Laursen <olau@hardworking.dk>
+
+ * gtk/src/widget.{cc,h}g: Added unset_fg/bg/font/text/base to
+ support unwrapped null pointer parameter to modify_fg/bg/....
+
+2003-04-13 Ole Laursen <olau@hardworking.dk>
+
+ * examples/cellrenderercustom/cellrendererpopup.cc: Switched to
+ using wrappers of grab_add and friends instead of using the C
+ functions.
+
+ * gtk/src/main.ccg, gtk/src/main.hg: Removed commented wrapper of
+ grab_add and friends.
+
+ * gtk/src/widget.ccg, gtk/src/widget.hg: Wrapped
+ gtk_grab_add()/remove()/get_current().
+
+2003-03-30 Murray Cumming <murrayc@usa.net>
+
+ * gtk/gtk_docs_override.xml, likewise atk, pango: Added overrides for
+ docs that mention *_free() functions.
+
+2003-03-26 Martin Schulze <MHL.Schulze@t-online.de>
+
+ * pango/src/attrlist.{ccg,hg}: AttrList::insert,
+ AttrList::insert_before, AttrList::change must pass a copy of
+ the attribute parameter into the c functions (should fix #109334).
+
+2003-03-22 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
+
+ * examples/Makefile.am_fragment: Added DESTDIR-support.
+
+2003-03-20 Ole Laursen <olau@hardworking.dk>
+
+ * gtk/src/widget.hg: Applied patch from Detlef Reichl to add
+ protected set_window and set_allocation (#108484).
+
+2003-03-18 Cedric Gustin <cgustin@ibelgique.com>
+
+ * Makefile.am : removed examples from DIST_SUBDIRS.
+
+2003-03-13 Sebastian Rittau <srittau@jroger.in-berlin.de>
+
+ * gdk/src/gc.hg: Added refreturn flag to both GC::get_screen() flavors.
+ Closes bug #108233. (With help by Sven Grottke.)
+
+2003-02-14 Bryan Forbes <mxpxfifws@yahoo.com>
+
+ * gtk/src/accelgroup.hg:
+ * gtk/src/accellabel.hg:
+ * gtk/src/adjustment.hg:
+ * gtk/src/alignment.hg:
+ * gtk/src/arrow.hg:
+ * gtk/src/aspectframe.hg:
+ * gtk/src/bin.hg: Added documentation for constructors and
+ _MEMBER_GET() wrappers.
+ * gtk/src/box.hg: Added the PackOptions enum into the gtkmmEnums
+ group so it is now on the correct documentation page.
+ * gtk/src/enums.hg: Allow Doxygen to grab Gtk::AlignmentEnum (used in
+ alignment.hg and others) and added it to the gtkmmEnums group.
+ * gtk/src/gtk_docs_override.xml: Added documentation for methods
+ in accelgroup.hg, accellabel.hg, adjusment.hg, and arrow.hg.
+
+2003-01-27 Murray Cumming <murrayc@usa.net>
+
+ * gdk/src/display.hg: Used refreturn on get_default() and
+ get_core_pointer(), preventing segfaults.
+
+2003-01-27 Murray Cumming <murrayc@usa.net>
+
+ * Replaced use of RefPtr::is_null() with use of operator bool().
+
+2003-01-24 Murray Cumming <murrayc@usa.net>
+
+ * gtk/gtkmm/menu_elems.cc: Element::Element(MenuItem): Use the
+ Glib::RefPtr<> constructor explicitly, for clarity, and do the
+ necessary extra ref - fixes lifetime bug 104194
+
+2003-01-23 Murray Cumming <murrayc@usa.net>
+
+ * More TODOs:
+ - Gtk::Container: Removed const set_focus_chain(), added const
+ get_focus_chain().
+ - Gtk::TreeDragSource::drag_data_get() and
+ Gtk::TreeDragDest::row_drag_possible() now use SelectionData
+ instead of GtkSelectionData.
+
+2003-01-23 Murray Cumming <murrayc@usa.net>
+
+ * Updated dnd examples for new signal signatures.
+
+2003-01-23 Murray Cumming <murrayc@usa.net>
+
+ * More use of Gdk::Device and Gtk::SelectionData.
+
+2003-01-22 Murray Cumming <murrayc@usa.net>
+
+ * Used _IGNORE_SIGNAL() on keybinding signals, though gmmproc still
+ complains about them. I founds these signals by grepping for
+ binding_entry_add_signal in the gtk+ source code.
+ * Dealt with various minor TODOs, adding const and using C++ types.
+
+2003-01-22 Murray Cumming <murrayc@usa.net>
+
+ * Rename GTKMM_ macros to GLIBMM_.
+
+2003-01-22 Murray Cumming <murrayc@usa.net>
+
+ * build_shared: Used the general/win32/posix variables used in
+ the gtkmm Makefile.ams, so that the libraries actually build.
+ * gtk/src/treepath.[hg|ccg]: Removed the TreePath(bool) override, as
+ suggested, because it broke the build, because we don't seem to set
+ gtkmm_COMPILATION.
+ * gtk/gtkmm/menu_elem.[h|cc]: It used the RefPtr::operator=() that we
+ removed because that operator=() shouldn't be used. Faked the behaviour
+ with an explict use of the constructor and a reference() for now, with
+ a TODO.
+
+2003-01-21 Murray Cumming <murrayc@usa.net>
+
+ * Changed library names: 1.4 -> 1.3 and 2.4 -> 2.3 so that they
+ can be unstable.
+
+2003-01-21 Murray Cumming <murrayc@usa.net>
+
+ * Copied and modified slightly the build_shared files from libgdamm,
+ to use the gmmproc from glibmm-2.4.
+
+2003-01-21 Murray Cumming <murrayc@usa.net>
+
+ * Changed library names: 1.0 -> 1.4 and 2.0 -> 2.4
+
+See gtkmm 2.2 for previous ChangeLog entries.
diff --git a/libs/gtkmm2/atk/SConscript b/libs/gtkmm2/atk/SConscript
new file mode 100644
index 0000000000..f0f18d4d12
--- /dev/null
+++ b/libs/gtkmm2/atk/SConscript
@@ -0,0 +1,10 @@
+import glob
+
+atkmm_files = glob.glob('atkmm/*.cc')
+
+Import('env libraries')
+atkmm = env.Copy()
+atkmm.Merge([libraries['glibmm2'], libraries['gtk2'], libraries['sigc2'] ])
+
+libatkmm = atkmm.StaticLibrary('atkmm', atkmm_files)
+Default(libatkmm)
diff --git a/libs/gtkmm2/atk/atkmm.h b/libs/gtkmm2/atk/atkmm.h
new file mode 100644
index 0000000000..712664344f
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm.h
@@ -0,0 +1,42 @@
+/* $Id$ */
+
+/* atkmm - a C++ wrapper for the GLib toolkit
+ *
+ * Copyright 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef _ATKMM_H
+#define _ATKMM_H
+
+#include <atkmm/action.h>
+#include <atkmm/component.h>
+#include <atkmm/document.h>
+#include <atkmm/editabletext.h>
+#include <atkmm/image.h>
+#include <atkmm/implementor.h>
+#include <atkmm/object.h>
+#include <atkmm/objectaccessible.h>
+#include <atkmm/relation.h>
+#include <atkmm/relationset.h>
+#include <atkmm/selection.h>
+#include <atkmm/stateset.h>
+#include <atkmm/table.h>
+#include <atkmm/text.h>
+#include <atkmm/value.h>
+
+#endif /* _ATKMM_H */
+
diff --git a/libs/gtkmm2/atk/atkmm/action.cc b/libs/gtkmm2/atk/atkmm/action.cc
new file mode 100644
index 0000000000..69a260463c
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/action.cc
@@ -0,0 +1,481 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <atkmm/action.h>
+#include <atkmm/private/action_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <atk/atkaction.h>
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Atk::Action> wrap(AtkAction* object, bool take_copy)
+{
+ return Glib::RefPtr<Atk::Action>( dynamic_cast<Atk::Action*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} // namespace Glib
+
+
+namespace Atk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Interface_Class& Action_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Interface_Class has to know the interface init function
+ // in order to add interfaces to implementing types.
+ class_init_func_ = &Action_Class::iface_init_function;
+
+ // We can not derive from another interface, and it is not necessary anyway.
+ gtype_ = atk_action_get_type();
+ }
+
+ return *this;
+}
+
+void Action_Class::iface_init_function(void* g_iface, void*)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_iface);
+
+ //This is just to avoid an "unused variable" warning when there are no vfuncs or signal handlers to connect.
+ //This is a temporary fix until I find out why I can not seem to derive a GtkFileChooser interface. murrayc
+ g_assert(klass != 0);
+
+ klass->do_action = &do_action_vfunc_callback;
+ klass->get_n_actions = &get_n_actions_vfunc_callback;
+ klass->get_description = &get_description_vfunc_callback;
+ klass->get_name = &get_name_vfunc_callback;
+ klass->get_keybinding = &get_keybinding_vfunc_callback;
+ klass->set_description = &set_description_vfunc_callback;
+}
+
+gboolean Action_Class::do_action_vfunc_callback(AtkAction* self, gint i)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->do_action_vfunc(i
+));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->do_action)
+ return (*base->do_action)(self, i);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gint Action_Class::get_n_actions_vfunc_callback(AtkAction* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return obj->get_n_actions_vfunc();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_n_actions)
+ return (*base->get_n_actions)(self);
+ }
+
+ typedef gint RType;
+ return RType();
+}
+
+const gchar* Action_Class::get_description_vfunc_callback(AtkAction* self, gint i)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return obj->get_description_vfunc(i
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_description)
+ return (*base->get_description)(self, i);
+ }
+
+ typedef const gchar* RType;
+ return RType();
+}
+
+const gchar* Action_Class::get_name_vfunc_callback(AtkAction* self, gint i)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return obj->get_name_vfunc(i
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_name)
+ return (*base->get_name)(self, i);
+ }
+
+ typedef const gchar* RType;
+ return RType();
+}
+
+const gchar* Action_Class::get_keybinding_vfunc_callback(AtkAction* self, gint i)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return obj->get_keybinding_vfunc(i
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_keybinding)
+ return (*base->get_keybinding)(self, i);
+ }
+
+ typedef const gchar* RType;
+ return RType();
+}
+
+gboolean Action_Class::set_description_vfunc_callback(AtkAction* self, gint i, const gchar* desc)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->set_description_vfunc(i
+, Glib::convert_const_gchar_ptr_to_ustring(desc)
+));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->set_description)
+ return (*base->set_description)(self, i, desc);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+
+Glib::ObjectBase* Action_Class::wrap_new(GObject* object)
+{
+ return new Action((AtkAction*)(object));
+}
+
+
+/* The implementation: */
+
+Action::Action()
+:
+ Glib::Interface(action_class_.init())
+{}
+
+Action::Action(AtkAction* castitem)
+:
+ Glib::Interface((GObject*)(castitem))
+{}
+
+Action::~Action()
+{}
+
+// static
+void Action::add_interface(GType gtype_implementer)
+{
+ action_class_.init().add_interface(gtype_implementer);
+}
+
+Action::CppClassType Action::action_class_; // initialize static member
+
+GType Action::get_type()
+{
+ return action_class_.init().get_type();
+}
+
+GType Action::get_base_type()
+{
+ return atk_action_get_type();
+}
+
+
+bool Action::do_action(int i)
+{
+ return atk_action_do_action(gobj(), i);
+}
+
+int Action::get_n_actions() const
+{
+ return atk_action_get_n_actions(const_cast<AtkAction*>(gobj()));
+}
+
+Glib::ustring Action::get_description(int i) const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(atk_action_get_description(const_cast<AtkAction*>(gobj()), i));
+}
+
+Glib::ustring Action::get_name(int i) const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(atk_action_get_name(const_cast<AtkAction*>(gobj()), i));
+}
+
+Glib::ustring Action::get_keybinding(int i)
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(atk_action_get_keybinding(gobj(), i));
+}
+
+bool Action::set_description(int i, const Glib::ustring& desc)
+{
+ return atk_action_set_description(gobj(), i, desc.c_str());
+}
+
+Glib::ustring Action::get_localized_name(int i)
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(atk_action_get_localized_name(gobj(), i));
+}
+
+
+bool Atk::Action::do_action_vfunc(int i)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->do_action)
+ return (*base->do_action)(gobj(),i);
+
+ typedef bool RType;
+ return RType();
+}
+
+int Atk::Action::get_n_actions_vfunc() const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_n_actions)
+ return (*base->get_n_actions)(const_cast<AtkAction*>(gobj()));
+
+ typedef int RType;
+ return RType();
+}
+
+const char* Atk::Action::get_description_vfunc(int i) const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_description)
+ return (*base->get_description)(const_cast<AtkAction*>(gobj()),i);
+
+ typedef const char* RType;
+ return RType();
+}
+
+const char* Atk::Action::get_name_vfunc(int i) const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_name)
+ return (*base->get_name)(const_cast<AtkAction*>(gobj()),i);
+
+ typedef const char* RType;
+ return RType();
+}
+
+const char* Atk::Action::get_keybinding_vfunc(int i) const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_keybinding)
+ return (*base->get_keybinding)(const_cast<AtkAction*>(gobj()),i);
+
+ typedef const char* RType;
+ return RType();
+}
+
+bool Atk::Action::set_description_vfunc(int i, const Glib::ustring& desc)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->set_description)
+ return (*base->set_description)(gobj(),i,desc.c_str());
+
+ typedef bool RType;
+ return RType();
+}
+
+
+} // namespace Atk
+
+
diff --git a/libs/gtkmm2/atk/atkmm/action.h b/libs/gtkmm2/atk/atkmm/action.h
new file mode 100644
index 0000000000..af8a131378
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/action.h
@@ -0,0 +1,193 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _ATKMM_ACTION_H
+#define _ATKMM_ACTION_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C" { typedef struct _AtkActionIface AtkActionIface; }
+#endif
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _AtkAction AtkAction;
+typedef struct _AtkActionClass AtkActionClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Atk
+{ class Action_Class; } // namespace Atk
+namespace Atk
+{
+
+/** The ATK interface provided by UI components which the user can activate/interact with,
+ * This should be implemented by instances of Atk::Object classes with which the user can interact directly, i.e. buttons,
+ * checkboxes, scrollbars, e.g. components which are not "passive" providers of UI information.
+ *
+ * Exceptions: when the user interaction is already covered by another appropriate interface such as Atk::EditableText
+ * (insert/delete test, etc.) or Atk::Value (set value) then these actions should not be exposed by Atk::Action as well.
+ *
+ * Also note that the Atk::Action API is limited in that parameters may not be passed to the object being activated;
+ * thus the action must be self-contained and specifiable via only a single "verb". Concrete examples include "press",
+ * "release", "click" for buttons, "drag" (meaning initiate drag) and "drop" for drag sources and drop targets, etc.
+ *
+ * Though most UI interactions on components should be invocable via keyboard as well as mouse, there will generally be
+ * a close mapping between "mouse actions" that are possible on a component and the Atk::Actions. Where mouse and keyboard
+ * actions are redundant in effect, Atk::Action should expose only one action rather than exposing redundant actions if
+ * possible. By convention we have been using "mouse centric" terminology for Atk::Action names.
+ */
+
+class Action : public Glib::Interface
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef Action CppObjectType;
+ typedef Action_Class CppClassType;
+ typedef AtkAction BaseObjectType;
+ typedef AtkActionIface BaseClassType;
+
+private:
+ friend class Action_Class;
+ static CppClassType action_class_;
+
+ // noncopyable
+ Action(const Action&);
+ Action& operator=(const Action&);
+
+protected:
+ Action(); // you must derive from this class
+ explicit Action(AtkAction* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~Action();
+
+ static void add_interface(GType gtype_implementer);
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ AtkAction* gobj() { return reinterpret_cast<AtkAction*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const AtkAction* gobj() const { return reinterpret_cast<AtkAction*>(gobject_); }
+
+private:
+
+
+public:
+
+
+ /** Perform the specified action on the object.
+ * @param i The action index corresponding to the action to be performed.
+ * @return <tt>true</tt> if success, <tt>false</tt> otherwise.
+ */
+ bool do_action(int i);
+
+ /** Gets the number of accessible actions available on the object.
+ * If there are more than one, the first one is considered the
+ * "default" action of the object.
+ * @return A the number of actions, or 0 if @a action does not
+ * implement this interface.
+ */
+ int get_n_actions() const;
+
+ /** Returns a description of the specified action of the object.
+ * @param i The action index corresponding to the action to be performed.
+ * @return A description string, or <tt>0</tt>
+ * if @a action does not implement this interface.
+ */
+ Glib::ustring get_description(int i) const;
+
+ /** Returns the name of the specified action of the object.
+ * @param i The action index corresponding to the action to be performed.
+ * @return A name string, or an empty string if @a action does not implement this interface.
+ */
+ Glib::ustring get_name(int i) const;
+
+ /** Returns a keybinding associated with this action, if one exists.
+ * @param i The action index corresponding to the action to be performed.
+ * @return A string representing the keybinding, or an empty string
+ * if there is no keybinding for this action.
+ */
+ Glib::ustring get_keybinding(int i);
+
+ /** Sets a description of the specified action of the object.
+ * @param i The action index corresponding to the action to be performed.
+ * @param desc The description to be assigned to this action.
+ * @return A <tt>bool</tt> representing if the description was successfully set;.
+ */
+ bool set_description(int i, const Glib::ustring& desc);
+
+ /** Returns the localized name of the specified action of the object.
+ * @param i The action index corresponding to the action to be performed.
+ * @return A name string, or an empty string
+ * if @a action does not implement this interface.
+ */
+ Glib::ustring get_localized_name(int i);
+
+protected:
+ virtual bool do_action_vfunc(int i);
+ virtual int get_n_actions_vfunc() const;
+ virtual const char* get_description_vfunc(int i) const;
+ virtual const char* get_name_vfunc(int i) const;
+ virtual const char* get_keybinding_vfunc(int i) const;
+ virtual bool set_description_vfunc(int i, const Glib::ustring& desc);
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+};
+
+} // namespace Atk
+
+
+namespace Glib
+{
+ /** @relates Atk::Action
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Atk::Action> wrap(AtkAction* object, bool take_copy = false);
+
+} // namespace Glib
+
+#endif /* _ATKMM_ACTION_H */
+
diff --git a/libs/gtkmm2/atk/atkmm/component.cc b/libs/gtkmm2/atk/atkmm/component.cc
new file mode 100644
index 0000000000..c4256e7699
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/component.cc
@@ -0,0 +1,892 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <atkmm/component.h>
+#include <atkmm/private/component_p.h>
+
+#include <atk/atk-enum-types.h>
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <atkmm/object.h>
+#include <atk/atkcomponent.h>
+
+
+namespace
+{
+} // anonymous namespace
+
+// static
+GType Glib::Value<Atk::CoordType>::value_type()
+{
+ return atk_coord_type_get_type();
+}
+
+// static
+GType Glib::Value<Atk::Layer>::value_type()
+{
+ return atk_layer_get_type();
+}
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Atk::Component> wrap(AtkComponent* object, bool take_copy)
+{
+ return Glib::RefPtr<Atk::Component>( dynamic_cast<Atk::Component*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} // namespace Glib
+
+
+namespace Atk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Interface_Class& Component_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Interface_Class has to know the interface init function
+ // in order to add interfaces to implementing types.
+ class_init_func_ = &Component_Class::iface_init_function;
+
+ // We can not derive from another interface, and it is not necessary anyway.
+ gtype_ = atk_component_get_type();
+ }
+
+ return *this;
+}
+
+void Component_Class::iface_init_function(void* g_iface, void*)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_iface);
+
+ //This is just to avoid an "unused variable" warning when there are no vfuncs or signal handlers to connect.
+ //This is a temporary fix until I find out why I can not seem to derive a GtkFileChooser interface. murrayc
+ g_assert(klass != 0);
+
+ klass->add_focus_handler = &add_focus_handler_vfunc_callback;
+ klass->contains = &contains_vfunc_callback;
+ klass->ref_accessible_at_point = &ref_accessible_at_point_vfunc_callback;
+ klass->get_extents = &get_extents_vfunc_callback;
+ klass->get_position = &get_position_vfunc_callback;
+ klass->get_size = &get_size_vfunc_callback;
+ klass->get_layer = &get_layer_vfunc_callback;
+ klass->get_mdi_zorder = &get_mdi_zorder_vfunc_callback;
+ klass->grab_focus = &grab_focus_vfunc_callback;
+ klass->remove_focus_handler = &remove_focus_handler_vfunc_callback;
+ klass->set_extents = &set_extents_vfunc_callback;
+ klass->set_position = &set_position_vfunc_callback;
+ klass->set_size = &set_size_vfunc_callback;
+}
+
+guint Component_Class::add_focus_handler_vfunc_callback(AtkComponent* self, AtkFocusHandler handler)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return obj->add_focus_handler_vfunc(handler);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->add_focus_handler)
+ return (*base->add_focus_handler)(self, handler);
+ }
+
+ typedef guint RType;
+ return RType();
+}
+
+gboolean Component_Class::contains_vfunc_callback(AtkComponent* self, gint x, gint y, AtkCoordType coord_type)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->contains_vfunc(x
+, y
+, ((CoordType)(coord_type))
+));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->contains)
+ return (*base->contains)(self, x, y, coord_type);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+AtkObject* Component_Class::ref_accessible_at_point_vfunc_callback(AtkComponent* self, gint x, gint y, AtkCoordType coord_type)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return Glib::unwrap_copy(obj->get_accessible_at_point_vfunc(x
+, y
+, ((CoordType)(coord_type))
+));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->ref_accessible_at_point)
+ return (*base->ref_accessible_at_point)(self, x, y, coord_type);
+ }
+
+ typedef AtkObject* RType;
+ return RType();
+}
+
+void Component_Class::get_extents_vfunc_callback(AtkComponent* self, gint* x, gint* y, gint* width, gint* height, AtkCoordType coord_type)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->get_extents_vfunc(*(x)
+, *(y)
+, *(width)
+, *(height)
+, ((CoordType)(coord_type))
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_extents)
+ (*base->get_extents)(self, x, y, width, height, coord_type);
+ }
+}
+
+void Component_Class::get_position_vfunc_callback(AtkComponent* self, gint* x, gint* y, AtkCoordType coord_type)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->get_position_vfunc(*(x)
+, *(y)
+, ((CoordType)(coord_type))
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_position)
+ (*base->get_position)(self, x, y, coord_type);
+ }
+}
+
+void Component_Class::get_size_vfunc_callback(AtkComponent* self, gint* width, gint* height)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->get_size_vfunc(*(width)
+, *(height)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_size)
+ (*base->get_size)(self, width, height);
+ }
+}
+
+AtkLayer Component_Class::get_layer_vfunc_callback(AtkComponent* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return ((AtkLayer)(obj->get_layer_vfunc()));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_layer)
+ return (*base->get_layer)(self);
+ }
+
+ typedef AtkLayer RType;
+ return RType();
+}
+
+gint Component_Class::get_mdi_zorder_vfunc_callback(AtkComponent* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return obj->get_mdi_zorder_vfunc();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_mdi_zorder)
+ return (*base->get_mdi_zorder)(self);
+ }
+
+ typedef gint RType;
+ return RType();
+}
+
+gboolean Component_Class::grab_focus_vfunc_callback(AtkComponent* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->grab_focus_vfunc());
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->grab_focus)
+ return (*base->grab_focus)(self);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+void Component_Class::remove_focus_handler_vfunc_callback(AtkComponent* self, guint handler_id)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->remove_focus_handler_vfunc(handler_id);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->remove_focus_handler)
+ (*base->remove_focus_handler)(self, handler_id);
+ }
+}
+
+gboolean Component_Class::set_extents_vfunc_callback(AtkComponent* self, gint x, gint y, gint width, gint height, AtkCoordType coord_type)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->set_extents_vfunc(x
+, y
+, width
+, height
+, ((CoordType)(coord_type))
+));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->set_extents)
+ return (*base->set_extents)(self, x, y, width, height, coord_type);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Component_Class::set_position_vfunc_callback(AtkComponent* self, gint x, gint y, AtkCoordType coord_type)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->set_position_vfunc(x
+, y
+, ((CoordType)(coord_type))
+));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->set_position)
+ return (*base->set_position)(self, x, y, coord_type);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Component_Class::set_size_vfunc_callback(AtkComponent* self, gint width, gint height)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->set_size_vfunc(width
+, height
+));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->set_size)
+ return (*base->set_size)(self, width, height);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+
+Glib::ObjectBase* Component_Class::wrap_new(GObject* object)
+{
+ return new Component((AtkComponent*)(object));
+}
+
+
+/* The implementation: */
+
+Component::Component()
+:
+ Glib::Interface(component_class_.init())
+{}
+
+Component::Component(AtkComponent* castitem)
+:
+ Glib::Interface((GObject*)(castitem))
+{}
+
+Component::~Component()
+{}
+
+// static
+void Component::add_interface(GType gtype_implementer)
+{
+ component_class_.init().add_interface(gtype_implementer);
+}
+
+Component::CppClassType Component::component_class_; // initialize static member
+
+GType Component::get_type()
+{
+ return component_class_.init().get_type();
+}
+
+GType Component::get_base_type()
+{
+ return atk_component_get_type();
+}
+
+
+guint Component::add_focus_handler(AtkFocusHandler handler)
+{
+ return atk_component_add_focus_handler(gobj(), handler);
+}
+
+bool Component::contains(int x, int y, CoordType coord_type) const
+{
+ return atk_component_contains(const_cast<AtkComponent*>(gobj()), x, y, ((AtkCoordType)(coord_type)));
+}
+
+Glib::RefPtr<Atk::Object> Component::get_accessible_at_point(int x, int y, CoordType coord_type)
+{
+ return Glib::wrap(atk_component_ref_accessible_at_point(gobj(), x, y, ((AtkCoordType)(coord_type))));
+}
+
+void Component::get_extents(int& x, int& y, int& width, int& height, CoordType coord_type) const
+{
+ atk_component_get_extents(const_cast<AtkComponent*>(gobj()), &x, &y, &width, &height, ((AtkCoordType)(coord_type)));
+}
+
+void Component::get_position(int& x, int& y, CoordType coord_type) const
+{
+ atk_component_get_position(const_cast<AtkComponent*>(gobj()), &x, &y, ((AtkCoordType)(coord_type)));
+}
+
+void Component::get_size(int& width, int& height) const
+{
+ atk_component_get_size(const_cast<AtkComponent*>(gobj()), &width, &height);
+}
+
+Layer Component::get_layer() const
+{
+ return ((Layer)(atk_component_get_layer(const_cast<AtkComponent*>(gobj()))));
+}
+
+int Component::get_mdi_zorder() const
+{
+ return atk_component_get_mdi_zorder(const_cast<AtkComponent*>(gobj()));
+}
+
+bool Component::grab_focus()
+{
+ return atk_component_grab_focus(gobj());
+}
+
+void Component::remove_focus_handler(guint handler_id)
+{
+ atk_component_remove_focus_handler(gobj(), handler_id);
+}
+
+bool Component::set_extents(int x, int y, int width, int height, CoordType coord_type)
+{
+ return atk_component_set_extents(gobj(), x, y, width, height, ((AtkCoordType)(coord_type)));
+}
+
+bool Component::set_position(int x, int y, CoordType coord_type)
+{
+ return atk_component_set_position(gobj(), x, y, ((AtkCoordType)(coord_type)));
+}
+
+bool Component::set_size(int width, int height)
+{
+ return atk_component_set_size(gobj(), width, height);
+}
+
+
+guint Atk::Component::add_focus_handler_vfunc(AtkFocusHandler handler)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->add_focus_handler)
+ return (*base->add_focus_handler)(gobj(),handler);
+
+ typedef guint RType;
+ return RType();
+}
+
+bool Atk::Component::contains_vfunc(int x, int y, CoordType coord_type) const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->contains)
+ return (*base->contains)(const_cast<AtkComponent*>(gobj()),x,y,((AtkCoordType)(coord_type)));
+
+ typedef bool RType;
+ return RType();
+}
+
+Glib::RefPtr<Atk::Object> Atk::Component::get_accessible_at_point_vfunc(int x, int y, CoordType coord_type)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->ref_accessible_at_point)
+ return Glib::wrap((*base->ref_accessible_at_point)(gobj(),x,y,((AtkCoordType)(coord_type))));
+
+ typedef Glib::RefPtr<Atk::Object> RType;
+ return RType();
+}
+
+void Atk::Component::get_extents_vfunc(int& x, int& y, int& width, int& height, CoordType coord_type) const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_extents)
+ (*base->get_extents)(const_cast<AtkComponent*>(gobj()),&x,&y,&width,&height,((AtkCoordType)(coord_type)));
+}
+
+void Atk::Component::get_position_vfunc(int& x, int& y, CoordType coord_type) const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_position)
+ (*base->get_position)(const_cast<AtkComponent*>(gobj()),&x,&y,((AtkCoordType)(coord_type)));
+}
+
+void Atk::Component::get_size_vfunc(int& width, int& height) const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_size)
+ (*base->get_size)(const_cast<AtkComponent*>(gobj()),&width,&height);
+}
+
+Layer Atk::Component::get_layer_vfunc() const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_layer)
+ return ((Layer)((*base->get_layer)(const_cast<AtkComponent*>(gobj()))));
+
+ typedef Layer RType;
+ return RType();
+}
+
+int Atk::Component::get_mdi_zorder_vfunc() const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_mdi_zorder)
+ return (*base->get_mdi_zorder)(const_cast<AtkComponent*>(gobj()));
+
+ typedef int RType;
+ return RType();
+}
+
+bool Atk::Component::grab_focus_vfunc()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->grab_focus)
+ return (*base->grab_focus)(gobj());
+
+ typedef bool RType;
+ return RType();
+}
+
+void Atk::Component::remove_focus_handler_vfunc(guint handler_id)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->remove_focus_handler)
+ (*base->remove_focus_handler)(gobj(),handler_id);
+}
+
+bool Atk::Component::set_extents_vfunc(int x, int y, int width, int height, CoordType coord_type)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->set_extents)
+ return (*base->set_extents)(gobj(),x,y,width,height,((AtkCoordType)(coord_type)));
+
+ typedef bool RType;
+ return RType();
+}
+
+bool Atk::Component::set_position_vfunc(int x, int y, CoordType coord_type)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->set_position)
+ return (*base->set_position)(gobj(),x,y,((AtkCoordType)(coord_type)));
+
+ typedef bool RType;
+ return RType();
+}
+
+bool Atk::Component::set_size_vfunc(int width, int height)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->set_size)
+ return (*base->set_size)(gobj(),width,height);
+
+ typedef bool RType;
+ return RType();
+}
+
+
+} // namespace Atk
+
+
diff --git a/libs/gtkmm2/atk/atkmm/component.h b/libs/gtkmm2/atk/atkmm/component.h
new file mode 100644
index 0000000000..889d626dae
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/component.h
@@ -0,0 +1,331 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _ATKMM_COMPONENT_H
+#define _ATKMM_COMPONENT_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C"
+{
+ typedef struct _AtkComponentIface AtkComponentIface;
+ typedef struct _AtkObject AtkObject;
+ typedef void (* AtkFocusHandler) (AtkObject*, gboolean);
+}
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _AtkComponent AtkComponent;
+typedef struct _AtkComponentClass AtkComponentClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Atk
+{ class Component_Class; } // namespace Atk
+namespace Atk
+{
+
+
+/** @addtogroup atkmmEnums Enums and Flags */
+
+/**
+ * @ingroup atkmmEnums
+ */
+enum CoordType
+{
+ XY_SCREEN,
+ XY_WINDOW
+};
+
+} // namespace Atk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Atk::CoordType> : public Glib::Value_Enum<Atk::CoordType>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Atk
+{
+
+/**
+ * @ingroup atkmmEnums
+ */
+enum Layer
+{
+ LAYER_INVALID,
+ LAYER_BACKGROUND,
+ LAYER_CANVAS,
+ LAYER_WIDGET,
+ LAYER_MDI,
+ LAYER_POPUP,
+ LAYER_OVERLAY,
+ LAYER_WINDOW
+};
+
+} // namespace Atk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Atk::Layer> : public Glib::Value_Enum<Atk::Layer>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Atk
+{
+
+
+class Object;
+
+
+/** The ATK interface provided by UI components which occupy a physical area on the screen.
+ * This should be implemented by most if not all UI elements with an actual on-screen presence, i.e. components which
+ * can be said to have a screen-coordinate bounding box. Virtually all widgets will need to have Atk::Component
+ * implementations provided for their corresponding Atk::Object class. In short, only UI elements which are *not* GUI
+ * elements will omit this ATK interface.
+ *
+ * A possible exception might be textual information with a transparent background, in which case text glyph bounding
+ * box information is provided by Atk::Text.
+ */
+
+class Component : public Glib::Interface
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef Component CppObjectType;
+ typedef Component_Class CppClassType;
+ typedef AtkComponent BaseObjectType;
+ typedef AtkComponentIface BaseClassType;
+
+private:
+ friend class Component_Class;
+ static CppClassType component_class_;
+
+ // noncopyable
+ Component(const Component&);
+ Component& operator=(const Component&);
+
+protected:
+ Component(); // you must derive from this class
+ explicit Component(AtkComponent* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~Component();
+
+ static void add_interface(GType gtype_implementer);
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ AtkComponent* gobj() { return reinterpret_cast<AtkComponent*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const AtkComponent* gobj() const { return reinterpret_cast<AtkComponent*>(gobject_); }
+
+private:
+
+
+public:
+
+ /** Add the specified handler to the set of functions to be called
+ * when this object receives focus events (in or out). If the handler is
+ * already added it is not added again
+ * @param handler The Atk::FocusHandler to be attached to @a component .
+ * @return A handler id which can be used in atk_component_remove_focus_handler
+ * or zero if the handler was already added.
+ */
+ guint add_focus_handler(AtkFocusHandler handler);
+
+ /** Checks whether the specified point is within the extent of the @a component .
+ * @param x X coordinate.
+ * @param y Y coordinate.
+ * @param coord_type Specifies whether the coordinates are relative to the screen
+ * or to the components top level window.
+ * @return <tt>true</tt> or <tt>false</tt> indicating whether the specified point is within
+ * the extent of the @a component or not.
+ */
+ bool contains(int x, int y, CoordType coord_type) const;
+
+ /** Gets a reference to the accessible child, if one exists, at the
+ * coordinate point specified by @a x and @a y .
+ * @param x X coordinate.
+ * @param y Y coordinate.
+ * @param coord_type Specifies whether the coordinates are relative to the screen
+ * or to the components top level window.
+ * @return A reference to the accessible child, if one exists.
+ */
+ Glib::RefPtr<Atk::Object> get_accessible_at_point(int x, int y, CoordType coord_type);
+
+ /** Gets the rectangle which gives the extent of the @a component .
+ * @param x Address of <tt>int</tt> to put x coordinate.
+ * @param y Address of <tt>int</tt> to put y coordinate.
+ * @param width Address of <tt>int</tt> to put width.
+ * @param height Address of <tt>int</tt> to put height.
+ * @param coord_type Specifies whether the coordinates are relative to the screen
+ * or to the components top level window.
+ */
+ void get_extents(int& x, int& y, int& width, int& height, CoordType coord_type) const;
+
+ /** Gets the position of @a component in the form of
+ * a point specifying @a component 's top-left corner.
+ * @param x Address of <tt>int</tt> to put x coordinate position.
+ * @param y Address of <tt>int</tt> to put y coordinate position.
+ * @param coord_type Specifies whether the coordinates are relative to the screen
+ * or to the components top level window.
+ */
+ void get_position(int& x, int& y, CoordType coord_type) const;
+
+ /** Gets the size of the @a component in terms of width and height.
+ * @param width Address of <tt>int</tt> to put width of @a component .
+ * @param height Address of <tt>int</tt> to put height of @a component .
+ */
+ void get_size(int& width, int& height) const;
+
+ /** Gets the layer of the component.
+ * @return An Atk::Layer which is the layer of the component.
+ */
+ Layer get_layer() const;
+
+ /** Gets the zorder of the component. The value G_MININT will be returned
+ * if the layer of the component is not ATK_LAYER_MDI or ATK_LAYER_WINDOW.
+ * @return A <tt>int</tt> which is the zorder of the component, i.e. the depth at
+ * which the component is shown in relation to other components in the same
+ * container.
+ */
+ int get_mdi_zorder() const;
+
+ /** Grabs focus for this @a component .
+ * @return <tt>true</tt> if successful, <tt>false</tt> otherwise.
+ */
+ bool grab_focus();
+
+ /** Remove the handler specified by @a handler_id from the list of
+ * functions to be executed when this object receives focus events
+ * (in or out).
+ * @param handler_id The handler id of the focus handler to be removed
+ * from @a component .
+ */
+ void remove_focus_handler(guint handler_id);
+
+ /** Sets the extents of @a component .
+ * @param x X coordinate.
+ * @param y Y coordinate.
+ * @param width Width to set for @a component .
+ * @param height Height to set for @a component .
+ * @param coord_type Specifies whether the coordinates are relative to the screen
+ * or to the components top level window.
+ * @return <tt>true</tt> or <tt>false</tt> whether the extents were set or not.
+ */
+ bool set_extents(int x, int y, int width, int height, CoordType coord_type);
+
+ /** Sets the postition of @a component .
+ * @param x X coordinate.
+ * @param y Y coordinate.
+ * @param coord_type Specifies whether the coordinates are relative to the screen
+ * or to the components top level window.
+ * @return <tt>true</tt> or <tt>false</tt> whether or not the position was set or not.
+ */
+ bool set_position(int x, int y, CoordType coord_type);
+
+ /** Set the size of the @a component in terms of width and height.
+ * @param width Width to set for @a component .
+ * @param height Height to set for @a component .
+ * @return <tt>true</tt> or <tt>false</tt> whether the size was set or not.
+ */
+ bool set_size(int width, int height);
+
+protected:
+ virtual guint add_focus_handler_vfunc(AtkFocusHandler handler);
+ virtual bool contains_vfunc(int x, int y, CoordType coord_type) const;
+
+ virtual Glib::RefPtr<Atk::Object> get_accessible_at_point_vfunc(int x, int y, CoordType coord_type);
+
+ virtual void get_extents_vfunc(int& x, int& y, int& width, int& height, CoordType coord_type) const;
+ virtual void get_position_vfunc(int& x, int& y, CoordType coord_type) const;
+ virtual void get_size_vfunc(int& width, int& height) const;
+ virtual Layer get_layer_vfunc() const;
+ virtual int get_mdi_zorder_vfunc() const;
+ virtual bool grab_focus_vfunc();
+ virtual void remove_focus_handler_vfunc(guint handler_id);
+ virtual bool set_extents_vfunc(int x, int y, int width, int height, CoordType coord_type);
+ virtual bool set_position_vfunc(int x, int y, CoordType coord_type);
+ virtual bool set_size_vfunc(int width, int height);
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+};
+
+} // namespace Atk
+
+
+namespace Glib
+{
+ /** @relates Atk::Component
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Atk::Component> wrap(AtkComponent* object, bool take_copy = false);
+
+} // namespace Glib
+
+#endif /* _ATKMM_COMPONENT_H */
+
diff --git a/libs/gtkmm2/atk/atkmm/document.cc b/libs/gtkmm2/atk/atkmm/document.cc
new file mode 100644
index 0000000000..64946c6f84
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/document.cc
@@ -0,0 +1,246 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <atkmm/document.h>
+#include <atkmm/private/document_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 2003 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <atkmm/object.h>
+#include <atk/atkdocument.h>
+
+
+namespace Atk
+{
+
+
+} // namespace Atk
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Atk::Document> wrap(AtkDocument* object, bool take_copy)
+{
+ return Glib::RefPtr<Atk::Document>( dynamic_cast<Atk::Document*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} // namespace Glib
+
+
+namespace Atk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Interface_Class& Document_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Interface_Class has to know the interface init function
+ // in order to add interfaces to implementing types.
+ class_init_func_ = &Document_Class::iface_init_function;
+
+ // We can not derive from another interface, and it is not necessary anyway.
+ gtype_ = atk_document_get_type();
+ }
+
+ return *this;
+}
+
+void Document_Class::iface_init_function(void* g_iface, void*)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_iface);
+
+ //This is just to avoid an "unused variable" warning when there are no vfuncs or signal handlers to connect.
+ //This is a temporary fix until I find out why I can not seem to derive a GtkFileChooser interface. murrayc
+ g_assert(klass != 0);
+
+ klass->get_document_type = &get_document_type_vfunc_callback;
+ klass->get_document = &get_document_vfunc_callback;
+}
+
+const gchar* Document_Class::get_document_type_vfunc_callback(AtkDocument* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return obj->get_document_type_vfunc();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_document_type)
+ return (*base->get_document_type)(self);
+ }
+
+ typedef const gchar* RType;
+ return RType();
+}
+
+gpointer Document_Class::get_document_vfunc_callback(AtkDocument* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return obj->get_document_vfunc();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_document)
+ return (*base->get_document)(self);
+ }
+
+ typedef gpointer RType;
+ return RType();
+}
+
+
+Glib::ObjectBase* Document_Class::wrap_new(GObject* object)
+{
+ return new Document((AtkDocument*)(object));
+}
+
+
+/* The implementation: */
+
+Document::Document()
+:
+ Glib::Interface(document_class_.init())
+{}
+
+Document::Document(AtkDocument* castitem)
+:
+ Glib::Interface((GObject*)(castitem))
+{}
+
+Document::~Document()
+{}
+
+// static
+void Document::add_interface(GType gtype_implementer)
+{
+ document_class_.init().add_interface(gtype_implementer);
+}
+
+Document::CppClassType Document::document_class_; // initialize static member
+
+GType Document::get_type()
+{
+ return document_class_.init().get_type();
+}
+
+GType Document::get_base_type()
+{
+ return atk_document_get_type();
+}
+
+
+Glib::ustring Document::get_document_type() const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(atk_document_get_document_type(const_cast<AtkDocument*>(gobj())));
+}
+
+gpointer Document::get_document()
+{
+ return atk_document_get_document(gobj());
+}
+
+
+const gchar* Atk::Document::get_document_type_vfunc()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_document_type)
+ return (*base->get_document_type)(gobj());
+
+ typedef const gchar* RType;
+ return RType();
+}
+
+gpointer Atk::Document::get_document_vfunc() const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_document)
+ return (*base->get_document)(const_cast<AtkDocument*>(gobj()));
+
+ typedef gpointer RType;
+ return RType();
+}
+
+
+} // namespace Atk
+
+
diff --git a/libs/gtkmm2/atk/atkmm/document.h b/libs/gtkmm2/atk/atkmm/document.h
new file mode 100644
index 0000000000..71808475c3
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/document.h
@@ -0,0 +1,145 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _ATKMM_DOCUMENT_H
+#define _ATKMM_DOCUMENT_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 2003 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C"
+{
+ typedef struct _AtkDocumentIface AtkDocumentIface;
+ typedef struct _AtkDocument AtkDocument;
+}
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _AtkDocument AtkDocument;
+typedef struct _AtkDocumentClass AtkDocumentClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Atk
+{ class Document_Class; } // namespace Atk
+namespace Atk
+{
+
+class Object;
+
+/** The ATK interface which allows access to a DOM associated with on object.
+ * This interface should be supported by any object that has an associated document object model (DOM). This interface
+ * provides the standard mechanism allowing an assistive technology access to the DOM.
+ */
+
+class Document : public Glib::Interface
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef Document CppObjectType;
+ typedef Document_Class CppClassType;
+ typedef AtkDocument BaseObjectType;
+ typedef AtkDocumentIface BaseClassType;
+
+private:
+ friend class Document_Class;
+ static CppClassType document_class_;
+
+ // noncopyable
+ Document(const Document&);
+ Document& operator=(const Document&);
+
+protected:
+ Document(); // you must derive from this class
+ explicit Document(AtkDocument* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~Document();
+
+ static void add_interface(GType gtype_implementer);
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ AtkDocument* gobj() { return reinterpret_cast<AtkDocument*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const AtkDocument* gobj() const { return reinterpret_cast<AtkDocument*>(gobject_); }
+
+private:
+
+public:
+
+
+ /** Gets a string indicating the document type.
+ * @return A string indicating the document type.
+ */
+ Glib::ustring get_document_type() const;
+
+ /** Gets a %gpointer that points to an instance of the DOM. It is
+ * up to the caller to check atk_document_get_type to determine
+ * how to cast this pointer.
+ * @return A %gpointer that points to an instance of the DOM.
+ */
+ gpointer get_document();
+
+protected:
+ virtual const gchar* get_document_type_vfunc();
+ virtual gpointer get_document_vfunc() const;
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+};
+
+} // namespace Atk
+
+
+namespace Glib
+{
+ /** @relates Atk::Document
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Atk::Document> wrap(AtkDocument* object, bool take_copy = false);
+
+} // namespace Glib
+
+#endif /* _ATKMM_DOCUMENT_H */
+
diff --git a/libs/gtkmm2/atk/atkmm/editabletext.cc b/libs/gtkmm2/atk/atkmm/editabletext.cc
new file mode 100644
index 0000000000..10e58003b7
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/editabletext.cc
@@ -0,0 +1,506 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <atkmm/editabletext.h>
+#include <atkmm/private/editabletext_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <atkmm/object.h>
+#include <atk/atkeditabletext.h>
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Atk::EditableText> wrap(AtkEditableText* object, bool take_copy)
+{
+ return Glib::RefPtr<Atk::EditableText>( dynamic_cast<Atk::EditableText*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} // namespace Glib
+
+
+namespace Atk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Interface_Class& EditableText_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Interface_Class has to know the interface init function
+ // in order to add interfaces to implementing types.
+ class_init_func_ = &EditableText_Class::iface_init_function;
+
+ // We can not derive from another interface, and it is not necessary anyway.
+ gtype_ = atk_editable_text_get_type();
+ }
+
+ return *this;
+}
+
+void EditableText_Class::iface_init_function(void* g_iface, void*)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_iface);
+
+ //This is just to avoid an "unused variable" warning when there are no vfuncs or signal handlers to connect.
+ //This is a temporary fix until I find out why I can not seem to derive a GtkFileChooser interface. murrayc
+ g_assert(klass != 0);
+
+ klass->set_run_attributes = &set_run_attributes_vfunc_callback;
+ klass->set_text_contents = &set_text_contents_vfunc_callback;
+ klass->insert_text = &insert_text_vfunc_callback;
+ klass->copy_text = &copy_text_vfunc_callback;
+ klass->cut_text = &cut_text_vfunc_callback;
+ klass->delete_text = &delete_text_vfunc_callback;
+ klass->paste_text = &paste_text_vfunc_callback;
+}
+
+gboolean EditableText_Class::set_run_attributes_vfunc_callback(AtkEditableText* self, AtkAttributeSet* attrib_set, gint start_offset, gint end_offset)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->set_run_attributes_vfunc(attrib_set, start_offset
+, end_offset
+));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->set_run_attributes)
+ return (*base->set_run_attributes)(self, attrib_set, start_offset, end_offset);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+void EditableText_Class::set_text_contents_vfunc_callback(AtkEditableText* self, const gchar* string)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->set_text_contents_vfunc(Glib::convert_const_gchar_ptr_to_ustring(string)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->set_text_contents)
+ (*base->set_text_contents)(self, string);
+ }
+}
+
+void EditableText_Class::insert_text_vfunc_callback(AtkEditableText* self, const gchar* string, gint length, gint* position)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->insert_text_vfunc(Glib::convert_const_gchar_ptr_to_ustring(string)
+, length
+, *(position)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->insert_text)
+ (*base->insert_text)(self, string, length, position);
+ }
+}
+
+void EditableText_Class::copy_text_vfunc_callback(AtkEditableText* self, gint start_pos, gint end_pos)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->copy_text_vfunc(start_pos
+, end_pos
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->copy_text)
+ (*base->copy_text)(self, start_pos, end_pos);
+ }
+}
+
+void EditableText_Class::cut_text_vfunc_callback(AtkEditableText* self, gint start_pos, gint end_pos)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->cut_text_vfunc(start_pos
+, end_pos
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->cut_text)
+ (*base->cut_text)(self, start_pos, end_pos);
+ }
+}
+
+void EditableText_Class::delete_text_vfunc_callback(AtkEditableText* self, gint start_pos, gint end_pos)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->delete_text_vfunc(start_pos
+, end_pos
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->delete_text)
+ (*base->delete_text)(self, start_pos, end_pos);
+ }
+}
+
+void EditableText_Class::paste_text_vfunc_callback(AtkEditableText* self, gint position)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->paste_text_vfunc(position
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->paste_text)
+ (*base->paste_text)(self, position);
+ }
+}
+
+
+Glib::ObjectBase* EditableText_Class::wrap_new(GObject* object)
+{
+ return new EditableText((AtkEditableText*)(object));
+}
+
+
+/* The implementation: */
+
+EditableText::EditableText()
+:
+ Glib::Interface(editabletext_class_.init())
+{}
+
+EditableText::EditableText(AtkEditableText* castitem)
+:
+ Glib::Interface((GObject*)(castitem))
+{}
+
+EditableText::~EditableText()
+{}
+
+// static
+void EditableText::add_interface(GType gtype_implementer)
+{
+ editabletext_class_.init().add_interface(gtype_implementer);
+}
+
+EditableText::CppClassType EditableText::editabletext_class_; // initialize static member
+
+GType EditableText::get_type()
+{
+ return editabletext_class_.init().get_type();
+}
+
+GType EditableText::get_base_type()
+{
+ return atk_editable_text_get_type();
+}
+
+
+bool EditableText::set_run_attributes(const AttributeSet& attrib_set, int start_offset, int end_offset)
+{
+ return atk_editable_text_set_run_attributes(gobj(), (attrib_set).data(), start_offset, end_offset);
+}
+
+void EditableText::set_text_contents(const Glib::ustring& string)
+{
+ atk_editable_text_set_text_contents(gobj(), string.c_str());
+}
+
+void EditableText::insert_text(const Glib::ustring& string, int length, int& position)
+{
+ atk_editable_text_insert_text(gobj(), string.c_str(), length, &position);
+}
+
+void EditableText::copy_text(int start_pos, int end_pos)
+{
+ atk_editable_text_copy_text(gobj(), start_pos, end_pos);
+}
+
+void EditableText::cut_text(int start_pos, int end_pos)
+{
+ atk_editable_text_cut_text(gobj(), start_pos, end_pos);
+}
+
+void EditableText::delete_text(int start_pos, int end_pos)
+{
+ atk_editable_text_delete_text(gobj(), start_pos, end_pos);
+}
+
+void EditableText::paste_text(int position)
+{
+ atk_editable_text_paste_text(gobj(), position);
+}
+
+
+bool Atk::EditableText::set_run_attributes_vfunc(AtkAttributeSet* attrib_set, int start_offset, int end_offset)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->set_run_attributes)
+ return (*base->set_run_attributes)(gobj(),attrib_set,start_offset,end_offset);
+
+ typedef bool RType;
+ return RType();
+}
+
+void Atk::EditableText::set_text_contents_vfunc(const Glib::ustring& string)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->set_text_contents)
+ (*base->set_text_contents)(gobj(),string.c_str());
+}
+
+void Atk::EditableText::insert_text_vfunc(const Glib::ustring& string, int length, int& position)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->insert_text)
+ (*base->insert_text)(gobj(),string.c_str(),length,&position);
+}
+
+void Atk::EditableText::copy_text_vfunc(int start_pos, int end_pos)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->copy_text)
+ (*base->copy_text)(gobj(),start_pos,end_pos);
+}
+
+void Atk::EditableText::cut_text_vfunc(int start_pos, int end_pos)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->cut_text)
+ (*base->cut_text)(gobj(),start_pos,end_pos);
+}
+
+void Atk::EditableText::delete_text_vfunc(int start_pos, int end_pos)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->delete_text)
+ (*base->delete_text)(gobj(),start_pos,end_pos);
+}
+
+void Atk::EditableText::paste_text_vfunc(int position)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->paste_text)
+ (*base->paste_text)(gobj(),position);
+}
+
+
+} // namespace Atk
+
+
diff --git a/libs/gtkmm2/atk/atkmm/editabletext.h b/libs/gtkmm2/atk/atkmm/editabletext.h
new file mode 100644
index 0000000000..233aa9e892
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/editabletext.h
@@ -0,0 +1,193 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _ATKMM_EDITABLETEXT_H
+#define _ATKMM_EDITABLETEXT_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#include <atkmm/text.h>
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C"
+{
+ typedef struct _AtkEditableTextIface AtkEditableTextIface;
+ typedef struct _AtkEditableText AtkEditableText;
+}
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _AtkEditableText AtkEditableText;
+typedef struct _AtkEditableTextClass AtkEditableTextClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Atk
+{ class EditableText_Class; } // namespace Atk
+namespace Atk
+{
+
+//TODO: I see no evidence that AtkEditableText is actually a subclass of AtkText, as the C docs say. murrayc.
+/* The ATK interface implemented by components containing user-editable text content.
+ * This should be implemented by UI components which contain text which the user can edit, via the Atk::Object
+ * corresponding to that component (see Atk::Object).
+ * EditableText is a subclass of AtkText, and as such, an object which implements EditableText is by definition
+ * an Atk::Text implementor as well.
+ */
+
+class EditableText : public Glib::Interface
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef EditableText CppObjectType;
+ typedef EditableText_Class CppClassType;
+ typedef AtkEditableText BaseObjectType;
+ typedef AtkEditableTextIface BaseClassType;
+
+private:
+ friend class EditableText_Class;
+ static CppClassType editabletext_class_;
+
+ // noncopyable
+ EditableText(const EditableText&);
+ EditableText& operator=(const EditableText&);
+
+protected:
+ EditableText(); // you must derive from this class
+ explicit EditableText(AtkEditableText* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~EditableText();
+
+ static void add_interface(GType gtype_implementer);
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ AtkEditableText* gobj() { return reinterpret_cast<AtkEditableText*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const AtkEditableText* gobj() const { return reinterpret_cast<AtkEditableText*>(gobject_); }
+
+private:
+
+
+public:
+
+ /** Sets the attributes for a specified range. See the ATK_ATTRIBUTE
+ * macros (such as Atk::ATTRIBUTE_LEFT_MARGIN) for examples of attributes
+ * that can be set. Note that other attributes that do not have corresponding
+ * ATK_ATTRIBUTE macros may also be set for certain text widgets.
+ * @param attrib_set An Atk::AttributeSet.
+ * @param start_offset Start of range in which to set attributes.
+ * @param end_offset End of range in which to set attributes.
+ * @return <tt>true</tt> if attributes successfully set for the specified
+ * range, otherwise <tt>false</tt>.
+ */
+ bool set_run_attributes(const AttributeSet& attrib_set, int start_offset, int end_offset);
+
+ /** Set text contents of @a text .
+ * @param string String to set for text contents of @a text .
+ */
+ void set_text_contents(const Glib::ustring& string);
+
+ /** Insert text at a given position.
+ * @param string The text to insert.
+ * @param length The length of text to insert, in bytes.
+ * @param position The caller initializes this to
+ * the position at which to insert the text. After the call it
+ * points at the position after the newly inserted text.
+ */
+ void insert_text(const Glib::ustring& string, int length, int& position);
+
+ /** Copy text from @a start_pos up to, but not including @a end_pos
+ * to the clipboard.
+ * @param start_pos Start position.
+ * @param end_pos End position.
+ */
+ void copy_text(int start_pos, int end_pos);
+
+ /** Copy text from @a start_pos up to, but not including @a end_pos
+ * to the clipboard and then delete from the widget.
+ * @param start_pos Start position.
+ * @param end_pos End position.
+ */
+ void cut_text(int start_pos, int end_pos);
+
+ /** Delete text @a start_pos up to, but not including @a end_pos .
+ * @param start_pos Start position.
+ * @param end_pos End position.
+ */
+ void delete_text(int start_pos, int end_pos);
+
+ /** Paste text from clipboard to specified @a position .
+ * @param position Position to paste.
+ */
+ void paste_text(int position);
+
+protected:
+ virtual bool set_run_attributes_vfunc(AtkAttributeSet* attrib_set, int start_offset, int end_offset);
+ virtual void set_text_contents_vfunc(const Glib::ustring& string);
+ virtual void insert_text_vfunc(const Glib::ustring& string, int length, int& position);
+ virtual void copy_text_vfunc(int start_pos, int end_pos);
+ virtual void cut_text_vfunc(int start_pos, int end_pos);
+ virtual void delete_text_vfunc(int start_pos, int end_pos);
+ virtual void paste_text_vfunc(int position);
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+};
+
+} // namespace Atk
+
+
+namespace Glib
+{
+ /** @relates Atk::EditableText
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Atk::EditableText> wrap(AtkEditableText* object, bool take_copy = false);
+
+} // namespace Glib
+
+#endif /* _ATKMM_EDITABLETEXT_H */
+
diff --git a/libs/gtkmm2/atk/atkmm/hyperlink.cc b/libs/gtkmm2/atk/atkmm/hyperlink.cc
new file mode 100644
index 0000000000..d9e1050a7b
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/hyperlink.cc
@@ -0,0 +1,681 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <atkmm/hyperlink.h>
+#include <atkmm/private/hyperlink_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 2003 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <atkmm/object.h>
+#include <atk/atkobject.h>
+#include <atk/atkhyperlink.h>
+
+
+namespace Atk
+{
+
+} // namespace Atk
+
+
+namespace
+{
+
+const Glib::SignalProxyInfo Hyperlink_signal_link_activated_info =
+{
+ "link_activated",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Atk::Hyperlink> wrap(AtkHyperlink* object, bool take_copy)
+{
+ return Glib::RefPtr<Atk::Hyperlink>( dynamic_cast<Atk::Hyperlink*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} /* namespace Glib */
+
+
+namespace Atk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Hyperlink_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Hyperlink_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(atk_hyperlink_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ Action::add_interface(get_type());
+ }
+
+ return *this;
+}
+
+void Hyperlink_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->get_uri = &get_uri_vfunc_callback;
+ klass->get_object = &get_object_vfunc_callback;
+ klass->get_end_index = &get_end_index_vfunc_callback;
+ klass->get_start_index = &get_start_index_vfunc_callback;
+ klass->is_valid = &is_valid_vfunc_callback;
+ klass->get_n_anchors = &get_n_anchors_vfunc_callback;
+ klass->link_state = &link_state_vfunc_callback;
+ klass->is_selected_link = &is_selected_link_vfunc_callback;
+ klass->link_activated = &link_activated_callback;
+}
+
+gchar* Hyperlink_Class::get_uri_vfunc_callback(AtkHyperlink* self, gint i)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return obj->get_uri_vfunc(i
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->get_uri)
+ return (*base->get_uri)(self, i);
+ }
+
+ typedef gchar* RType;
+ return RType();
+}
+
+AtkObject* Hyperlink_Class::get_object_vfunc_callback(AtkHyperlink* self, gint i)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return Glib::unwrap(obj->get_object_vfunc(i
+));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->get_object)
+ return (*base->get_object)(self, i);
+ }
+
+ typedef AtkObject* RType;
+ return RType();
+}
+
+gint Hyperlink_Class::get_end_index_vfunc_callback(AtkHyperlink* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return obj->get_end_index_vfunc();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->get_end_index)
+ return (*base->get_end_index)(self);
+ }
+
+ typedef gint RType;
+ return RType();
+}
+
+gint Hyperlink_Class::get_start_index_vfunc_callback(AtkHyperlink* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return obj->get_start_index_vfunc();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->get_start_index)
+ return (*base->get_start_index)(self);
+ }
+
+ typedef gint RType;
+ return RType();
+}
+
+gboolean Hyperlink_Class::is_valid_vfunc_callback(AtkHyperlink* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->is_valid_vfunc());
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->is_valid)
+ return (*base->is_valid)(self);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gint Hyperlink_Class::get_n_anchors_vfunc_callback(AtkHyperlink* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return obj->get_n_anchors_vfunc();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->get_n_anchors)
+ return (*base->get_n_anchors)(self);
+ }
+
+ typedef gint RType;
+ return RType();
+}
+
+guint Hyperlink_Class::link_state_vfunc_callback(AtkHyperlink* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return obj->link_state_vfunc();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->link_state)
+ return (*base->link_state)(self);
+ }
+
+ typedef guint RType;
+ return RType();
+}
+
+gboolean Hyperlink_Class::is_selected_link_vfunc_callback(AtkHyperlink* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->is_selected_link_vfunc());
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->is_selected_link)
+ return (*base->is_selected_link)(self);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+
+void Hyperlink_Class::link_activated_callback(AtkHyperlink* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_link_activated();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->link_activated)
+ (*base->link_activated)(self);
+ }
+}
+
+
+Glib::ObjectBase* Hyperlink_Class::wrap_new(GObject* object)
+{
+ return new Hyperlink((AtkHyperlink*)object);
+}
+
+
+/* The implementation: */
+
+AtkHyperlink* Hyperlink::gobj_copy()
+{
+ reference();
+ return gobj();
+}
+
+Hyperlink::Hyperlink(const Glib::ConstructParams& construct_params)
+:
+ Glib::Object(construct_params)
+{}
+
+Hyperlink::Hyperlink(AtkHyperlink* castitem)
+:
+ Glib::Object((GObject*)(castitem))
+{}
+
+Hyperlink::~Hyperlink()
+{}
+
+
+Hyperlink::CppClassType Hyperlink::hyperlink_class_; // initialize static member
+
+GType Hyperlink::get_type()
+{
+ return hyperlink_class_.init().get_type();
+}
+
+GType Hyperlink::get_base_type()
+{
+ return atk_hyperlink_get_type();
+}
+
+
+Glib::ustring Hyperlink::get_uri(int i) const
+{
+ return Glib::convert_return_gchar_ptr_to_ustring(atk_hyperlink_get_uri(const_cast<AtkHyperlink*>(gobj()), i));
+}
+
+Glib::RefPtr<Atk::Object> Hyperlink::get_object(int i)
+{
+
+ Glib::RefPtr<Atk::Object> retvalue = Glib::wrap(atk_hyperlink_get_object(gobj(), i));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const Atk::Object> Hyperlink::get_object(int i) const
+{
+
+ Glib::RefPtr<const Atk::Object> retvalue = Glib::wrap(atk_hyperlink_get_object(const_cast<AtkHyperlink*>(gobj()), i));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+int Hyperlink::get_end_index() const
+{
+ return atk_hyperlink_get_end_index(const_cast<AtkHyperlink*>(gobj()));
+}
+
+int Hyperlink::get_start_index() const
+{
+ return atk_hyperlink_get_start_index(const_cast<AtkHyperlink*>(gobj()));
+}
+
+bool Hyperlink::is_valid() const
+{
+ return atk_hyperlink_is_valid(const_cast<AtkHyperlink*>(gobj()));
+}
+
+bool Hyperlink::is_inline() const
+{
+ return atk_hyperlink_is_inline(const_cast<AtkHyperlink*>(gobj()));
+}
+
+int Hyperlink::get_n_anchors() const
+{
+ return atk_hyperlink_get_n_anchors(const_cast<AtkHyperlink*>(gobj()));
+}
+
+bool Hyperlink::is_selected_link() const
+{
+ return atk_hyperlink_is_selected_link(const_cast<AtkHyperlink*>(gobj()));
+}
+
+
+Glib::SignalProxy0< void > Hyperlink::signal_link_activated()
+{
+ return Glib::SignalProxy0< void >(this, &Hyperlink_signal_link_activated_info);
+}
+
+
+Glib::PropertyProxy_ReadOnly<bool> Hyperlink::property_selected_link() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "selected-link");
+}
+
+Glib::PropertyProxy_ReadOnly<int> Hyperlink::property_number_of_anchors() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "number-of-anchors");
+}
+
+Glib::PropertyProxy_ReadOnly<int> Hyperlink::property_end_index() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "end-index");
+}
+
+Glib::PropertyProxy_ReadOnly<int> Hyperlink::property_start_index() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "start-index");
+}
+
+
+void Atk::Hyperlink::on_link_activated()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->link_activated)
+ (*base->link_activated)(gobj());
+}
+
+
+gchar* Atk::Hyperlink::get_uri_vfunc(int i) const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->get_uri)
+ return (*base->get_uri)(const_cast<AtkHyperlink*>(gobj()),i);
+
+ typedef gchar* RType;
+ return RType();
+}
+
+Glib::RefPtr<Atk::Object> Atk::Hyperlink::get_object_vfunc(int i)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->get_object)
+ return Glib::wrap((*base->get_object)(gobj(),i));
+
+ typedef Glib::RefPtr<Atk::Object> RType;
+ return RType();
+}
+
+int Atk::Hyperlink::get_end_index_vfunc() const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->get_end_index)
+ return (*base->get_end_index)(const_cast<AtkHyperlink*>(gobj()));
+
+ typedef int RType;
+ return RType();
+}
+
+int Atk::Hyperlink::get_start_index_vfunc() const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->get_start_index)
+ return (*base->get_start_index)(const_cast<AtkHyperlink*>(gobj()));
+
+ typedef int RType;
+ return RType();
+}
+
+bool Atk::Hyperlink::is_valid_vfunc() const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->is_valid)
+ return (*base->is_valid)(const_cast<AtkHyperlink*>(gobj()));
+
+ typedef bool RType;
+ return RType();
+}
+
+int Atk::Hyperlink::get_n_anchors_vfunc() const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->get_n_anchors)
+ return (*base->get_n_anchors)(const_cast<AtkHyperlink*>(gobj()));
+
+ typedef int RType;
+ return RType();
+}
+
+guint Atk::Hyperlink::link_state_vfunc() const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->link_state)
+ return (*base->link_state)(const_cast<AtkHyperlink*>(gobj()));
+
+ typedef guint RType;
+ return RType();
+}
+
+bool Atk::Hyperlink::is_selected_link_vfunc() const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->is_selected_link)
+ return (*base->is_selected_link)(const_cast<AtkHyperlink*>(gobj()));
+
+ typedef bool RType;
+ return RType();
+}
+
+
+} // namespace Atk
+
+
diff --git a/libs/gtkmm2/atk/atkmm/hyperlink.h b/libs/gtkmm2/atk/atkmm/hyperlink.h
new file mode 100644
index 0000000000..293137afb0
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/hyperlink.h
@@ -0,0 +1,252 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _ATKMM_HYPERLINK_H
+#define _ATKMM_HYPERLINK_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 2003 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <atkmm/action.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _AtkHyperlink AtkHyperlink;
+typedef struct _AtkHyperlinkClass AtkHyperlinkClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Atk
+{ class Hyperlink_Class; } // namespace Atk
+namespace Atk
+{
+
+class Object;
+
+/* An ATK object which encapsulates a link or set of links in a hypertext document.
+ * It implements the AtkAction interface.
+ */
+
+class Hyperlink
+ : public Glib::Object,
+ public Atk::Action
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef Hyperlink CppObjectType;
+ typedef Hyperlink_Class CppClassType;
+ typedef AtkHyperlink BaseObjectType;
+ typedef AtkHyperlinkClass BaseClassType;
+
+private: friend class Hyperlink_Class;
+ static CppClassType hyperlink_class_;
+
+private:
+ // noncopyable
+ Hyperlink(const Hyperlink&);
+ Hyperlink& operator=(const Hyperlink&);
+
+protected:
+ explicit Hyperlink(const Glib::ConstructParams& construct_params);
+ explicit Hyperlink(AtkHyperlink* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~Hyperlink();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ AtkHyperlink* gobj() { return reinterpret_cast<AtkHyperlink*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const AtkHyperlink* gobj() const { return reinterpret_cast<AtkHyperlink*>(gobject_); }
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ AtkHyperlink* gobj_copy();
+
+private:
+
+
+protected:
+
+public:
+
+
+ /** Get a the URI associated with the anchor specified
+ * by @a i of @a link .
+ *
+ * Multiple anchors are primarily used by client-side image maps.
+ * @param i A (zero-index) integer specifying the desired anchor.
+ * @return A string specifying the URI.
+ */
+ Glib::ustring get_uri(int i) const;
+
+
+ /** Returns the item associated with this hyperlinks nth anchor.
+ * For instance, the returned Atk::Object will implement Atk::Text
+ * if @a link is a text hyperlink, Atk::Image if @a link is an image
+ * hyperlink etc.
+ *
+ * Multiple anchors are primarily used by client-side image maps.
+ * @param i A (zero-index) integer specifying the desired anchor.
+ * @return An Atk::Object associated with this hyperlinks i-th anchor.
+ */
+ Glib::RefPtr<Atk::Object> get_object(int i);
+
+ /** Returns the item associated with this hyperlinks nth anchor.
+ * For instance, the returned Atk::Object will implement Atk::Text
+ * if @a link is a text hyperlink, Atk::Image if @a link is an image
+ * hyperlink etc.
+ *
+ * Multiple anchors are primarily used by client-side image maps.
+ * @param i A (zero-index) integer specifying the desired anchor.
+ * @return An Atk::Object associated with this hyperlinks i-th anchor.
+ */
+ Glib::RefPtr<const Atk::Object> get_object(int i) const;
+
+
+ /** Gets the index with the hypertext document at which this link ends.
+ * @return The index with the hypertext document at which this link ends.
+ */
+ int get_end_index() const;
+
+
+ /** Gets the index with the hypertext document at which this link begins.
+ * @return The index with the hypertext document at which this link begins.
+ */
+ int get_start_index() const;
+
+
+ /** Since the document that a link is associated with may have changed
+ * this method returns <tt>true</tt> if the link is still valid (with
+ * respect to the document it references) and <tt>false</tt> otherwise.
+ * @return Whether or not this link is still valid.
+ */
+ bool is_valid() const;
+
+
+ /** Indicates whether the link currently displays some or all of its
+ * content inline. Ordinary HTML links will usually return
+ * <tt>false</tt>, but an inline &lt;src&gt; HTML element will return
+ * <tt>true</tt>.
+ * a *
+ * @return Whether or not this link displays its content inline.
+ */
+ bool is_inline() const;
+
+
+ /** Gets the number of anchors associated with this hyperlink.
+ * @return The number of anchors associated with this hyperlink.
+ */
+ int get_n_anchors() const;
+
+ /** Determines whether this AtkHyperlink is selected
+ * @return True is the AtkHyperlink is selected, False otherwise.
+ */
+ bool is_selected_link() const;
+
+
+ Glib::SignalProxy0< void > signal_link_activated();
+
+
+ /** Specifies whether the AtkHyperlink object is selected.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_selected_link() const;
+
+
+ /** The number of anchors associated with the AtkHyperlink object.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_number_of_anchors() const;
+
+
+ /** The end index of the AtkHyperlink object.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_end_index() const;
+
+
+ /** The start index of the AtkHyperlink object.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_start_index() const;
+
+
+protected:
+ virtual gchar* get_uri_vfunc(int i) const;
+ virtual Glib::RefPtr<Atk::Object> get_object_vfunc(int i);
+ virtual int get_end_index_vfunc() const;
+ virtual int get_start_index_vfunc() const;
+ virtual bool is_valid_vfunc() const;
+ virtual int get_n_anchors_vfunc() const;
+ virtual guint link_state_vfunc() const;
+ virtual bool is_selected_link_vfunc() const;
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_link_activated();
+
+
+};
+
+} // namespace Atk
+
+
+namespace Glib
+{
+ /** @relates Atk::Hyperlink
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Atk::Hyperlink> wrap(AtkHyperlink* object, bool take_copy = false);
+}
+
+
+#endif /* _ATKMM_HYPERLINK_H */
+
diff --git a/libs/gtkmm2/atk/atkmm/hypertext.cc b/libs/gtkmm2/atk/atkmm/hypertext.cc
new file mode 100644
index 0000000000..f383ba5e74
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/hypertext.cc
@@ -0,0 +1,396 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <atkmm/hypertext.h>
+#include <atkmm/private/hypertext_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 2003 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <atkmm/object.h>
+#include <atk/atkhypertext.h>
+
+
+namespace Atk
+{
+
+
+} // namespace Atk
+
+
+namespace
+{
+
+void Hypertext_signal_link_selected_callback(AtkHypertext* self, gint p0,void* data)
+{
+ using namespace Atk;
+ typedef sigc::slot< void,int > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(p0
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo Hypertext_signal_link_selected_info =
+{
+ "link_selected",
+ (GCallback) &Hypertext_signal_link_selected_callback,
+ (GCallback) &Hypertext_signal_link_selected_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Atk::Hypertext> wrap(AtkHypertext* object, bool take_copy)
+{
+ return Glib::RefPtr<Atk::Hypertext>( dynamic_cast<Atk::Hypertext*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} // namespace Glib
+
+
+namespace Atk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Interface_Class& Hypertext_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Interface_Class has to know the interface init function
+ // in order to add interfaces to implementing types.
+ class_init_func_ = &Hypertext_Class::iface_init_function;
+
+ // We can not derive from another interface, and it is not necessary anyway.
+ gtype_ = atk_hypertext_get_type();
+ }
+
+ return *this;
+}
+
+void Hypertext_Class::iface_init_function(void* g_iface, void*)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_iface);
+
+ //This is just to avoid an "unused variable" warning when there are no vfuncs or signal handlers to connect.
+ //This is a temporary fix until I find out why I can not seem to derive a GtkFileChooser interface. murrayc
+ g_assert(klass != 0);
+
+ klass->get_link = &get_link_vfunc_callback;
+ klass->get_n_links = &get_n_links_vfunc_callback;
+ klass->get_link_index = &get_link_index_vfunc_callback;
+ klass->link_selected = &link_selected_callback;
+}
+
+AtkHyperlink* Hypertext_Class::get_link_vfunc_callback(AtkHypertext* self, gint link_index)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return Glib::unwrap(obj->get_link_vfunc(link_index
+));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_link)
+ return (*base->get_link)(self, link_index);
+ }
+
+ typedef AtkHyperlink* RType;
+ return RType();
+}
+
+gint Hypertext_Class::get_n_links_vfunc_callback(AtkHypertext* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return obj->get_n_links_vfunc();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_n_links)
+ return (*base->get_n_links)(self);
+ }
+
+ typedef gint RType;
+ return RType();
+}
+
+gint Hypertext_Class::get_link_index_vfunc_callback(AtkHypertext* self, gint char_index)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return obj->get_link_index_vfunc(char_index
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_link_index)
+ return (*base->get_link_index)(self, char_index);
+ }
+
+ typedef gint RType;
+ return RType();
+}
+
+
+void Hypertext_Class::link_selected_callback(AtkHypertext* self, gint p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_link_selected(p0
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->link_selected)
+ (*base->link_selected)(self, p0);
+ }
+}
+
+
+Glib::ObjectBase* Hypertext_Class::wrap_new(GObject* object)
+{
+ return new Hypertext((AtkHypertext*)(object));
+}
+
+
+/* The implementation: */
+
+Hypertext::Hypertext()
+:
+ Glib::Interface(hypertext_class_.init())
+{}
+
+Hypertext::Hypertext(AtkHypertext* castitem)
+:
+ Glib::Interface((GObject*)(castitem))
+{}
+
+Hypertext::~Hypertext()
+{}
+
+// static
+void Hypertext::add_interface(GType gtype_implementer)
+{
+ hypertext_class_.init().add_interface(gtype_implementer);
+}
+
+Hypertext::CppClassType Hypertext::hypertext_class_; // initialize static member
+
+GType Hypertext::get_type()
+{
+ return hypertext_class_.init().get_type();
+}
+
+GType Hypertext::get_base_type()
+{
+ return atk_hypertext_get_type();
+}
+
+
+Glib::RefPtr<Hyperlink> Hypertext::get_link(int link_index)
+{
+ return Glib::wrap(atk_hypertext_get_link(gobj(), link_index));
+}
+
+Glib::RefPtr<const Hyperlink> Hypertext::get_link(int link_index) const
+{
+ return Glib::wrap(atk_hypertext_get_link(const_cast<AtkHypertext*>(gobj()), link_index));
+}
+
+int Hypertext::get_n_links() const
+{
+ return atk_hypertext_get_n_links(const_cast<AtkHypertext*>(gobj()));
+}
+
+int Hypertext::get_link_index(int char_index) const
+{
+ return atk_hypertext_get_link_index(const_cast<AtkHypertext*>(gobj()), char_index);
+}
+
+
+Glib::SignalProxy1< void,int > Hypertext::signal_link_selected()
+{
+ return Glib::SignalProxy1< void,int >(this, &Hypertext_signal_link_selected_info);
+}
+
+
+void Atk::Hypertext::on_link_selected(int link_index)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->link_selected)
+ (*base->link_selected)(gobj(),link_index);
+}
+
+
+Glib::RefPtr<Hyperlink> Atk::Hypertext::get_link_vfunc(int link_index)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_link)
+ return Glib::wrap((*base->get_link)(gobj(),link_index));
+
+ typedef Glib::RefPtr<Hyperlink> RType;
+ return RType();
+}
+
+int Atk::Hypertext::get_n_links_vfunc() const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_n_links)
+ return (*base->get_n_links)(const_cast<AtkHypertext*>(gobj()));
+
+ typedef int RType;
+ return RType();
+}
+
+int Atk::Hypertext::get_link_index_vfunc(int char_index) const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_link_index)
+ return (*base->get_link_index)(const_cast<AtkHypertext*>(gobj()),char_index);
+
+ typedef int RType;
+ return RType();
+}
+
+
+} // namespace Atk
+
+
diff --git a/libs/gtkmm2/atk/atkmm/hypertext.h b/libs/gtkmm2/atk/atkmm/hypertext.h
new file mode 100644
index 0000000000..090827662a
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/hypertext.h
@@ -0,0 +1,167 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _ATKMM_HYPERTEXT_H
+#define _ATKMM_HYPERTEXT_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 2003 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#include <atkmm/hyperlink.h>
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C"
+{
+ typedef struct _AtkHypertextIface AtkHypertextIface;
+ typedef struct _AtkHypertext AtkHypertext;
+}
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+/** The ATK interface which provides standard mechanism for manipulating hyperlinks.
+ */
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _AtkHypertext AtkHypertext;
+typedef struct _AtkHypertextClass AtkHypertextClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Atk
+{ class Hypertext_Class; } // namespace Atk
+namespace Atk
+{
+
+class Object;
+
+
+class Hypertext : public Glib::Interface
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef Hypertext CppObjectType;
+ typedef Hypertext_Class CppClassType;
+ typedef AtkHypertext BaseObjectType;
+ typedef AtkHypertextIface BaseClassType;
+
+private:
+ friend class Hypertext_Class;
+ static CppClassType hypertext_class_;
+
+ // noncopyable
+ Hypertext(const Hypertext&);
+ Hypertext& operator=(const Hypertext&);
+
+protected:
+ Hypertext(); // you must derive from this class
+ explicit Hypertext(AtkHypertext* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~Hypertext();
+
+ static void add_interface(GType gtype_implementer);
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ AtkHypertext* gobj() { return reinterpret_cast<AtkHypertext*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const AtkHypertext* gobj() const { return reinterpret_cast<AtkHypertext*>(gobject_); }
+
+private:
+
+public:
+
+
+ /** Gets the link in this hypertext document at index
+ * @a link_index
+ * @param link_index An integer specifying the desired link.
+ * @return The link in this hypertext document at
+ * index @a link_index .
+ */
+ Glib::RefPtr<Hyperlink> get_link(int link_index);
+
+ /** Gets the link in this hypertext document at index
+ * @a link_index
+ * @param link_index An integer specifying the desired link.
+ * @return The link in this hypertext document at
+ * index @a link_index .
+ */
+ Glib::RefPtr<const Hyperlink> get_link(int link_index) const;
+
+ /** Gets the number of links within this hypertext document.
+ * @return The number of links within this hypertext document.
+ */
+ int get_n_links() const;
+
+ /** Gets the index into the array of hyperlinks that is associated with
+ * the character specified by @a char_index , or -1 if there is no hyperlink
+ * associated with this character.
+ * @param char_index A character index.
+ * @return An index into the array of hyperlinks in @a hypertext .
+ */
+ int get_link_index(int char_index) const;
+
+
+ Glib::SignalProxy1< void,int > signal_link_selected();
+
+
+ virtual Glib::RefPtr<Hyperlink> get_link_vfunc(int link_index);
+ virtual int get_n_links_vfunc() const;
+ virtual int get_link_index_vfunc(int char_index) const;
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_link_selected(int link_index);
+
+
+};
+
+} // namespace Atk
+
+
+namespace Glib
+{
+ /** @relates Atk::Hypertext
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Atk::Hypertext> wrap(AtkHypertext* object, bool take_copy = false);
+
+} // namespace Glib
+
+#endif /* _ATKMM_HYPERTEXT_H */
+
diff --git a/libs/gtkmm2/atk/atkmm/image.cc b/libs/gtkmm2/atk/atkmm/image.cc
new file mode 100644
index 0000000000..2f1df28c18
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/image.cc
@@ -0,0 +1,349 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <atkmm/image.h>
+#include <atkmm/private/image_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <atkmm/object.h>
+#include <atk/atkimage.h>
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Atk::Image> wrap(AtkImage* object, bool take_copy)
+{
+ return Glib::RefPtr<Atk::Image>( dynamic_cast<Atk::Image*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} // namespace Glib
+
+
+namespace Atk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Interface_Class& Image_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Interface_Class has to know the interface init function
+ // in order to add interfaces to implementing types.
+ class_init_func_ = &Image_Class::iface_init_function;
+
+ // We can not derive from another interface, and it is not necessary anyway.
+ gtype_ = atk_image_get_type();
+ }
+
+ return *this;
+}
+
+void Image_Class::iface_init_function(void* g_iface, void*)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_iface);
+
+ //This is just to avoid an "unused variable" warning when there are no vfuncs or signal handlers to connect.
+ //This is a temporary fix until I find out why I can not seem to derive a GtkFileChooser interface. murrayc
+ g_assert(klass != 0);
+
+ klass->set_image_description = &set_image_description_vfunc_callback;
+ klass->get_image_description = &get_image_description_vfunc_callback;
+ klass->get_image_position = &get_image_position_vfunc_callback;
+ klass->get_image_size = &get_image_size_vfunc_callback;
+}
+
+gboolean Image_Class::set_image_description_vfunc_callback(AtkImage* self, const gchar* description)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->set_image_description_vfunc(Glib::convert_const_gchar_ptr_to_ustring(description)
+));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->set_image_description)
+ return (*base->set_image_description)(self, description);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+const gchar* Image_Class::get_image_description_vfunc_callback(AtkImage* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return obj->get_image_description_vfunc();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_image_description)
+ return (*base->get_image_description)(self);
+ }
+
+ typedef const gchar* RType;
+ return RType();
+}
+
+void Image_Class::get_image_position_vfunc_callback(AtkImage* self, gint* x, gint* y, AtkCoordType coord_type)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->get_image_position_vfunc(*(x)
+, *(y)
+, ((CoordType)(coord_type))
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_image_position)
+ (*base->get_image_position)(self, x, y, coord_type);
+ }
+}
+
+void Image_Class::get_image_size_vfunc_callback(AtkImage* self, gint* width, gint* height)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->get_image_size_vfunc(*(width)
+, *(height)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_image_size)
+ (*base->get_image_size)(self, width, height);
+ }
+}
+
+
+Glib::ObjectBase* Image_Class::wrap_new(GObject* object)
+{
+ return new Image((AtkImage*)(object));
+}
+
+
+/* The implementation: */
+
+Image::Image()
+:
+ Glib::Interface(image_class_.init())
+{}
+
+Image::Image(AtkImage* castitem)
+:
+ Glib::Interface((GObject*)(castitem))
+{}
+
+Image::~Image()
+{}
+
+// static
+void Image::add_interface(GType gtype_implementer)
+{
+ image_class_.init().add_interface(gtype_implementer);
+}
+
+Image::CppClassType Image::image_class_; // initialize static member
+
+GType Image::get_type()
+{
+ return image_class_.init().get_type();
+}
+
+GType Image::get_base_type()
+{
+ return atk_image_get_type();
+}
+
+
+bool Image::set_image_description(const Glib::ustring& description)
+{
+ return atk_image_set_image_description(gobj(), description.c_str());
+}
+
+Glib::ustring Image::get_image_description() const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(atk_image_get_image_description(const_cast<AtkImage*>(gobj())));
+}
+
+void Image::get_image_size(int& width, int& height) const
+{
+ atk_image_get_image_size(const_cast<AtkImage*>(gobj()), &width, &height);
+}
+
+void Image::get_image_position(int& x, int& y, CoordType coord_type) const
+{
+ atk_image_get_image_position(const_cast<AtkImage*>(gobj()), &x, &y, ((AtkCoordType)(coord_type)));
+}
+
+
+bool Atk::Image::set_image_description_vfunc(const Glib::ustring& description)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->set_image_description)
+ return (*base->set_image_description)(gobj(),description.c_str());
+
+ typedef bool RType;
+ return RType();
+}
+
+const char* Atk::Image::get_image_description_vfunc() const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_image_description)
+ return (*base->get_image_description)(const_cast<AtkImage*>(gobj()));
+
+ typedef const char* RType;
+ return RType();
+}
+
+void Atk::Image::get_image_position_vfunc(int& x, int& y, CoordType coord_type) const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_image_position)
+ (*base->get_image_position)(const_cast<AtkImage*>(gobj()),&x,&y,((AtkCoordType)(coord_type)));
+}
+
+void Atk::Image::get_image_size_vfunc(int& width, int& height) const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_image_size)
+ (*base->get_image_size)(const_cast<AtkImage*>(gobj()),&width,&height);
+}
+
+
+} // namespace Atk
+
+
diff --git a/libs/gtkmm2/atk/atkmm/image.h b/libs/gtkmm2/atk/atkmm/image.h
new file mode 100644
index 0000000000..a6af34884a
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/image.h
@@ -0,0 +1,173 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _ATKMM_IMAGE_H
+#define _ATKMM_IMAGE_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#include <atkmm/component.h> /* for Atk::CoordType */
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C"
+{
+ typedef struct _AtkImageIface AtkImageIface;
+ typedef struct _AtkImage AtkImage;
+}
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _AtkImage AtkImage;
+typedef struct _AtkImageClass AtkImageClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Atk
+{ class Image_Class; } // namespace Atk
+namespace Atk
+{
+
+/** The ATK Interface implemented by components which expose image or pixmap content on-screen.
+ * This should be implemented by Atk::Object subtypes on behalf of components which display image/pixmap information
+ * onscreen, and which provide information (other than just widget borders, etc.) via that image content. For instance,
+ * icons, buttons with icons, toolbar elements, and image viewing panes typically should implement AtkImage.
+ *
+ * Atk::Image primarily provides two types of information: coordinate information (useful for screen review mode of
+ * screenreaders, and for use by onscreen magnifiers), and descriptive information. The descriptive information is
+ * provided for alternative, text-only presentation of the most significant information present in the image.
+ */
+
+class Image : public Glib::Interface
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef Image CppObjectType;
+ typedef Image_Class CppClassType;
+ typedef AtkImage BaseObjectType;
+ typedef AtkImageIface BaseClassType;
+
+private:
+ friend class Image_Class;
+ static CppClassType image_class_;
+
+ // noncopyable
+ Image(const Image&);
+ Image& operator=(const Image&);
+
+protected:
+ Image(); // you must derive from this class
+ explicit Image(AtkImage* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~Image();
+
+ static void add_interface(GType gtype_implementer);
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ AtkImage* gobj() { return reinterpret_cast<AtkImage*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const AtkImage* gobj() const { return reinterpret_cast<AtkImage*>(gobject_); }
+
+private:
+
+
+public:
+
+ /** Sets the textual description for this image.
+ * @param description A string description to set for @a image .
+ * @return Boolean <tt>true</tt>, or <tt>false</tt> if operation could
+ * not be completed.
+ */
+ bool set_image_description(const Glib::ustring& description);
+
+ /** Get a textual description of this image.
+ * @return A string representing the image description.
+ */
+ Glib::ustring get_image_description() const;
+
+
+ /** Get the width and height in pixels for the specified image.
+ * The values of @a width and @a height are returned as -1 if the
+ * values cannot be obtained.
+ * @param width Filled with the image width.
+ * @param height Filled with the image height.
+ */
+ void get_image_size(int& width, int& height) const;
+
+ /** Gets the position of the image in the form of a point specifying the
+ * images top-left corner. The values of @a x and @a y are returned as -1
+ * if the values cannot be obtained.
+ * @param x Address of <tt>int</tt> to put x coordinate position.
+ * @param y Address of <tt>int</tt> to put y coordinate position.
+ * @param coord_type Specifies whether the coordinates are relative to the screen
+ * or to the components top level window.
+ */
+ void get_image_position(int& x, int& y, CoordType coord_type) const;
+
+protected:
+ virtual bool set_image_description_vfunc(const Glib::ustring& description);
+ virtual const char* get_image_description_vfunc() const;
+
+ virtual void get_image_position_vfunc(int& x, int& y, CoordType coord_type) const;
+ virtual void get_image_size_vfunc(int& width, int& height) const;
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+};
+
+} // namespace Atk
+
+
+namespace Glib
+{
+ /** @relates Atk::Image
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Atk::Image> wrap(AtkImage* object, bool take_copy = false);
+
+} // namespace Glib
+
+#endif /* _ATKMM_IMAGE_H */
+
diff --git a/libs/gtkmm2/atk/atkmm/implementor.cc b/libs/gtkmm2/atk/atkmm/implementor.cc
new file mode 100644
index 0000000000..303bf3d0a1
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/implementor.cc
@@ -0,0 +1,175 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <atkmm/implementor.h>
+#include <atkmm/private/implementor_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <atkmm/object.h>
+#include <atk/atkobject.h>
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Atk::Implementor> wrap(AtkImplementor* object, bool take_copy)
+{
+ return Glib::RefPtr<Atk::Implementor>( dynamic_cast<Atk::Implementor*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} // namespace Glib
+
+
+namespace Atk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Interface_Class& Implementor_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Interface_Class has to know the interface init function
+ // in order to add interfaces to implementing types.
+ class_init_func_ = &Implementor_Class::iface_init_function;
+
+ // We can not derive from another interface, and it is not necessary anyway.
+ gtype_ = atk_implementor_get_type();
+ }
+
+ return *this;
+}
+
+void Implementor_Class::iface_init_function(void* g_iface, void*)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_iface);
+
+ //This is just to avoid an "unused variable" warning when there are no vfuncs or signal handlers to connect.
+ //This is a temporary fix until I find out why I can not seem to derive a GtkFileChooser interface. murrayc
+ g_assert(klass != 0);
+
+ klass->ref_accessible = &ref_accessible_vfunc_callback;
+}
+
+AtkObject* Implementor_Class::ref_accessible_vfunc_callback(AtkImplementor* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return Glib::unwrap(obj->ref_accessibile_vfunc());
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->ref_accessible)
+ return (*base->ref_accessible)(self);
+ }
+
+ typedef AtkObject* RType;
+ return RType();
+}
+
+
+Glib::ObjectBase* Implementor_Class::wrap_new(GObject* object)
+{
+ return new Implementor((AtkImplementor*)(object));
+}
+
+
+/* The implementation: */
+
+Implementor::Implementor()
+:
+ Glib::Interface(implementor_class_.init())
+{}
+
+Implementor::Implementor(AtkImplementor* castitem)
+:
+ Glib::Interface((GObject*)(castitem))
+{}
+
+Implementor::~Implementor()
+{}
+
+// static
+void Implementor::add_interface(GType gtype_implementer)
+{
+ implementor_class_.init().add_interface(gtype_implementer);
+}
+
+Implementor::CppClassType Implementor::implementor_class_; // initialize static member
+
+GType Implementor::get_type()
+{
+ return implementor_class_.init().get_type();
+}
+
+GType Implementor::get_base_type()
+{
+ return atk_implementor_get_type();
+}
+
+
+Glib::RefPtr<Object> Atk::Implementor::ref_accessibile_vfunc()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->ref_accessible)
+ return Glib::wrap((*base->ref_accessible)(gobj()));
+
+ typedef Glib::RefPtr<Object> RType;
+ return RType();
+}
+
+
+} // namespace Atk
+
+
diff --git a/libs/gtkmm2/atk/atkmm/implementor.h b/libs/gtkmm2/atk/atkmm/implementor.h
new file mode 100644
index 0000000000..7df786ce27
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/implementor.h
@@ -0,0 +1,127 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _ATKMM_IMPLEMENTOR_H
+#define _ATKMM_IMPLEMENTOR_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#include <atkmm/object.h>
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C"
+{
+ typedef struct _AtkImplementorIface AtkImplementorIface;
+ typedef struct _AtkImplementor AtkImplementor;
+}
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _AtkImplementor AtkImplementor;
+typedef struct _AtkImplementorClass AtkImplementorClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Atk
+{ class Implementor_Class; } // namespace Atk
+namespace Atk
+{
+
+
+class Implementor : public Glib::Interface
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef Implementor CppObjectType;
+ typedef Implementor_Class CppClassType;
+ typedef AtkImplementor BaseObjectType;
+ typedef AtkImplementorIface BaseClassType;
+
+private:
+ friend class Implementor_Class;
+ static CppClassType implementor_class_;
+
+ // noncopyable
+ Implementor(const Implementor&);
+ Implementor& operator=(const Implementor&);
+
+protected:
+ Implementor(); // you must derive from this class
+ explicit Implementor(AtkImplementor* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~Implementor();
+
+ static void add_interface(GType gtype_implementer);
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ AtkImplementor* gobj() { return reinterpret_cast<AtkImplementor*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const AtkImplementor* gobj() const { return reinterpret_cast<AtkImplementor*>(gobject_); }
+
+private:
+
+
+protected:
+ virtual Glib::RefPtr<Object> ref_accessibile_vfunc();
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+};
+
+} // namespace Atk
+
+
+namespace Glib
+{
+ /** @relates Atk::Implementor
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Atk::Implementor> wrap(AtkImplementor* object, bool take_copy = false);
+
+} // namespace Glib
+
+#endif /* _ATKMM_IMPLEMENTOR_H */
+
diff --git a/libs/gtkmm2/atk/atkmm/init.cc b/libs/gtkmm2/atk/atkmm/init.cc
new file mode 100644
index 0000000000..0b103a9b05
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/init.cc
@@ -0,0 +1,34 @@
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright (C) 2003 The atkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/init.h>
+#include <atkmm/wrap_init.h>
+
+namespace Atk
+{
+
+void init()
+{
+ Glib::init();
+ Atk::wrap_init();
+}
+
+} // namespace Atk
+
diff --git a/libs/gtkmm2/atk/atkmm/init.h b/libs/gtkmm2/atk/atkmm/init.h
new file mode 100644
index 0000000000..05bdd07f34
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/init.h
@@ -0,0 +1,40 @@
+// -*- c++ -*-
+#ifndef _ATKMM_INIT_H
+#define _ATKMM_INIT_H
+
+/* $Id$ */
+
+/* Copyright (C) 2003 The atkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+namespace Atk
+{
+
+/** Initialize atkmm.
+ * You may call this more than once.
+ * You do not need to call this if you are using Gtk::Main,
+ * because it calls this for you.
+ */
+void init();
+
+} // namespace Atk
+
+
+
+#endif // _ATKMM_INIT_H
+
+
diff --git a/libs/gtkmm2/atk/atkmm/noopobject.cc b/libs/gtkmm2/atk/atkmm/noopobject.cc
new file mode 100644
index 0000000000..c9c78627cd
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/noopobject.cc
@@ -0,0 +1,132 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <atkmm/noopobject.h>
+#include <atkmm/private/noopobject_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <atk/atknoopobject.h>
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Atk::NoOpObject> wrap(AtkNoOpObject* object, bool take_copy)
+{
+ return Glib::RefPtr<Atk::NoOpObject>( dynamic_cast<Atk::NoOpObject*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} /* namespace Glib */
+
+
+namespace Atk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& NoOpObject_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &NoOpObject_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(atk_no_op_object_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ Component::add_interface(get_type());
+ Action::add_interface(get_type());
+ EditableText::add_interface(get_type());
+ Image::add_interface(get_type());
+ Selection::add_interface(get_type());
+ Table::add_interface(get_type());
+ Text::add_interface(get_type());
+ Hypertext::add_interface(get_type());
+ Value::add_interface(get_type());
+ }
+
+ return *this;
+}
+
+void NoOpObject_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* NoOpObject_Class::wrap_new(GObject* object)
+{
+ return new NoOpObject((AtkNoOpObject*)object);
+}
+
+
+/* The implementation: */
+
+AtkNoOpObject* NoOpObject::gobj_copy()
+{
+ reference();
+ return gobj();
+}
+
+NoOpObject::NoOpObject(const Glib::ConstructParams& construct_params)
+:
+ Atk::Object(construct_params)
+{}
+
+NoOpObject::NoOpObject(AtkNoOpObject* castitem)
+:
+ Atk::Object((AtkObject*)(castitem))
+{}
+
+NoOpObject::~NoOpObject()
+{}
+
+
+NoOpObject::CppClassType NoOpObject::noopobject_class_; // initialize static member
+
+GType NoOpObject::get_type()
+{
+ return noopobject_class_.init().get_type();
+}
+
+GType NoOpObject::get_base_type()
+{
+ return atk_no_op_object_get_type();
+}
+
+
+} // namespace Atk
+
+
diff --git a/libs/gtkmm2/atk/atkmm/noopobject.h b/libs/gtkmm2/atk/atkmm/noopobject.h
new file mode 100644
index 0000000000..b5ee9bed0c
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/noopobject.h
@@ -0,0 +1,143 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _ATKMM_NOOPOBJECT_H
+#define _ATKMM_NOOPOBJECT_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <atkmm/object.h>
+#include <atkmm/component.h>
+#include <atkmm/action.h>
+#include <atkmm/editabletext.h>
+#include <atkmm/image.h>
+#include <atkmm/selection.h>
+#include <atkmm/table.h>
+#include <atkmm/value.h>
+#include <atkmm/hypertext.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _AtkNoOpObject AtkNoOpObject;
+typedef struct _AtkNoOpObjectClass AtkNoOpObjectClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Atk
+{ class NoOpObject_Class; } // namespace Atk
+namespace Atk
+{
+
+/** An Atk::NoOpObject is an Atk::Object which purports to implement all ATK interfaces.
+ * It is the type of Atk::Object which is created if an accessible object is requested for an object type for which no
+ * factory type is specified.
+ */
+
+class NoOpObject
+:
+ public Atk::Object,
+ public Atk::Component,
+ public Atk::Action,
+ public Atk::EditableText,
+ public Atk::Image,
+ public Atk::Selection,
+ public Atk::Table,
+ public Atk::Text,
+ public Atk::Hypertext,
+ public Atk::Value
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef NoOpObject CppObjectType;
+ typedef NoOpObject_Class CppClassType;
+ typedef AtkNoOpObject BaseObjectType;
+ typedef AtkNoOpObjectClass BaseClassType;
+
+private: friend class NoOpObject_Class;
+ static CppClassType noopobject_class_;
+
+private:
+ // noncopyable
+ NoOpObject(const NoOpObject&);
+ NoOpObject& operator=(const NoOpObject&);
+
+protected:
+ explicit NoOpObject(const Glib::ConstructParams& construct_params);
+ explicit NoOpObject(AtkNoOpObject* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~NoOpObject();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ AtkNoOpObject* gobj() { return reinterpret_cast<AtkNoOpObject*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const AtkNoOpObject* gobj() const { return reinterpret_cast<AtkNoOpObject*>(gobject_); }
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ AtkNoOpObject* gobj_copy();
+
+private:
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ friend class Atk::Object_Class;
+#endif
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+};
+
+} // namespace Atk
+
+
+namespace Glib
+{
+ /** @relates Atk::NoOpObject
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Atk::NoOpObject> wrap(AtkNoOpObject* object, bool take_copy = false);
+}
+
+
+#endif /* _ATKMM_NOOPOBJECT_H */
+
diff --git a/libs/gtkmm2/atk/atkmm/object.cc b/libs/gtkmm2/atk/atkmm/object.cc
new file mode 100644
index 0000000000..44e7301691
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/object.cc
@@ -0,0 +1,834 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <atkmm/object.h>
+#include <atkmm/private/object_p.h>
+
+#include <atk/atk-enum-types.h>
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <atkmm/noopobject.h>
+#include <atkmm/relation.h>
+#include <atkmm/relationset.h>
+#include <atkmm/stateset.h>
+#include <atk/atkobject.h>
+
+
+namespace Atk
+{
+
+/* AtkObject is actually an abstract base class. So if this wrap_new()
+ * function is called, it means that no wrapper exists for the real C object.
+ * The problem is that gail (the real accessibility implementation) is
+ * currently not wrapped and will probably never be. Therefore, code like
+ * in the following example is doomed to fail:
+ *
+ * Gtk::Image image ("icon.png");
+ * Glib::RefPtr<Atk::Image> accessible = Glib::RefPtr<Atk::Image>::cast_dynamic(image.get_accessible());
+ * accessible->set_image_description("my icon");
+ *
+ * This would segfault, even though the accessible object _does_ implement
+ * AtkImage. But Atk::Image is an interface class that can't be instantiated
+ * as is. It needs an object.
+ *
+ * The solution is to instantiate a dummy object that implements all of the
+ * ATK interfaces. Fortunately, ATK already provides us with such a thing,
+ * AtkNoOpObject. All widget accessible objects are of this type if the gail
+ * module is not loaded (which is the default).
+ *
+ * So what we do here is abusing Atk::NoOpObject to get around the lack of
+ * C++ wrappers for gail. Instead of instantiating a useless instance of an
+ * abstract base class, we just create a Atk::NoOpObject instance which can
+ * be casted to any of the Atk interface classes.
+ */
+Glib::ObjectBase* Object_Class::wrap_new(GObject* object)
+{
+ return new Atk::NoOpObject((AtkNoOpObject*) object);
+}
+
+} // namespace Atk
+
+
+namespace
+{
+
+void Object_signal_children_changed_callback(AtkObject* self, guint p0,gpointer p1,void* data)
+{
+ using namespace Atk;
+ typedef sigc::slot< void,guint,gpointer > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(p0, p1);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo Object_signal_children_changed_info =
+{
+ "children_changed",
+ (GCallback) &Object_signal_children_changed_callback,
+ (GCallback) &Object_signal_children_changed_callback
+};
+
+
+void Object_signal_focus_event_callback(AtkObject* self, gboolean p0,void* data)
+{
+ using namespace Atk;
+ typedef sigc::slot< void,bool > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(p0
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo Object_signal_focus_event_info =
+{
+ "focus_event",
+ (GCallback) &Object_signal_focus_event_callback,
+ (GCallback) &Object_signal_focus_event_callback
+};
+
+
+void Object_signal_property_change_callback(AtkObject* self, AtkPropertyValues* p0,void* data)
+{
+ using namespace Atk;
+ typedef sigc::slot< void,AtkPropertyValues* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(p0);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo Object_signal_property_change_info =
+{
+ "property_change",
+ (GCallback) &Object_signal_property_change_callback,
+ (GCallback) &Object_signal_property_change_callback
+};
+
+
+void Object_signal_state_change_callback(AtkObject* self, const gchar* p0,gboolean p1,void* data)
+{
+ using namespace Atk;
+ typedef sigc::slot< void,const Glib::ustring&,bool > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::convert_const_gchar_ptr_to_ustring(p0)
+, p1
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo Object_signal_state_change_info =
+{
+ "state_change",
+ (GCallback) &Object_signal_state_change_callback,
+ (GCallback) &Object_signal_state_change_callback
+};
+
+
+const Glib::SignalProxyInfo Object_signal_visible_data_changed_info =
+{
+ "visible_data_changed",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+
+void Object_signal_active_descendant_changed_callback(AtkObject* self, gpointer* p0,void* data)
+{
+ using namespace Atk;
+ typedef sigc::slot< void,void** > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(p0
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo Object_signal_active_descendant_changed_info =
+{
+ "active_descendant_changed",
+ (GCallback) &Object_signal_active_descendant_changed_callback,
+ (GCallback) &Object_signal_active_descendant_changed_callback
+};
+
+} // anonymous namespace
+
+// static
+GType Glib::Value<Atk::Role>::value_type()
+{
+ return atk_role_get_type();
+}
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Atk::Object> wrap(AtkObject* object, bool take_copy)
+{
+ return Glib::RefPtr<Atk::Object>( dynamic_cast<Atk::Object*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} /* namespace Glib */
+
+
+namespace Atk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Object_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Object_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(atk_object_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Object_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->children_changed = &children_changed_callback;
+ klass->focus_event = &focus_event_callback;
+ klass->property_change = &property_change_callback;
+ klass->state_change = &state_change_callback;
+ klass->visible_data_changed = &visible_data_changed_callback;
+ klass->active_descendant_changed = &active_descendant_changed_callback;
+}
+
+
+void Object_Class::children_changed_callback(AtkObject* self, guint p0, gpointer p1)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_children_changed(p0, p1);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->children_changed)
+ (*base->children_changed)(self, p0, p1);
+ }
+}
+
+void Object_Class::focus_event_callback(AtkObject* self, gboolean p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_focus_event(p0
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->focus_event)
+ (*base->focus_event)(self, p0);
+ }
+}
+
+void Object_Class::property_change_callback(AtkObject* self, AtkPropertyValues* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_property_change(p0);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->property_change)
+ (*base->property_change)(self, p0);
+ }
+}
+
+void Object_Class::state_change_callback(AtkObject* self, const gchar* p0, gboolean p1)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_state_change(Glib::convert_const_gchar_ptr_to_ustring(p0)
+, p1
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->state_change)
+ (*base->state_change)(self, p0, p1);
+ }
+}
+
+void Object_Class::visible_data_changed_callback(AtkObject* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_visible_data_changed();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->visible_data_changed)
+ (*base->visible_data_changed)(self);
+ }
+}
+
+void Object_Class::active_descendant_changed_callback(AtkObject* self, gpointer* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_active_descendant_changed(p0
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->active_descendant_changed)
+ (*base->active_descendant_changed)(self, p0);
+ }
+}
+
+
+/* The implementation: */
+
+AtkObject* Object::gobj_copy()
+{
+ reference();
+ return gobj();
+}
+
+Object::Object(const Glib::ConstructParams& construct_params)
+:
+ Glib::Object(construct_params)
+{}
+
+Object::Object(AtkObject* castitem)
+:
+ Glib::Object((GObject*)(castitem))
+{}
+
+Object::~Object()
+{}
+
+
+Object::CppClassType Object::object_class_; // initialize static member
+
+GType Object::get_type()
+{
+ return object_class_.init().get_type();
+}
+
+GType Object::get_base_type()
+{
+ return atk_object_get_type();
+}
+
+
+Glib::ustring Object::get_name() const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(atk_object_get_name(const_cast<AtkObject*>(gobj())));
+}
+
+Glib::ustring Object::get_description() const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(atk_object_get_description(const_cast<AtkObject*>(gobj())));
+}
+
+Glib::RefPtr<Atk::Object> Object::get_parent()
+{
+
+ Glib::RefPtr<Atk::Object> retvalue = Glib::wrap(atk_object_get_parent(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+int Object::get_n_accessible_children() const
+{
+ return atk_object_get_n_accessible_children(const_cast<AtkObject*>(gobj()));
+}
+
+Glib::RefPtr<Atk::Object> Object::get_accessible_child(int i)
+{
+ return Glib::wrap(atk_object_ref_accessible_child(gobj(), i));
+}
+
+Glib::RefPtr<RelationSet> Object::get_relation_set()
+{
+
+ Glib::RefPtr<RelationSet> retvalue = Glib::wrap(atk_object_ref_relation_set(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Role Object::get_role() const
+{
+ return ((Role)(atk_object_get_role(const_cast<AtkObject*>(gobj()))));
+}
+
+Glib::RefPtr<StateSet> Object::get_state_set()
+{
+ return Glib::wrap(atk_object_ref_state_set(gobj()));
+}
+
+int Object::get_index_in_parent()
+{
+ return atk_object_get_index_in_parent(gobj());
+}
+
+void Object::set_name(const Glib::ustring& name)
+{
+ atk_object_set_name(gobj(), name.c_str());
+}
+
+void Object::set_description(const Glib::ustring& description)
+{
+ atk_object_set_description(gobj(), description.c_str());
+}
+
+void Object::set_parent(const Glib::RefPtr<Atk::Object>& parent)
+{
+ atk_object_set_parent(gobj(), Glib::unwrap(parent));
+}
+
+void Object::set_role(Role role)
+{
+ atk_object_set_role(gobj(), ((AtkRole)(role)));
+}
+
+void Object::notify_state_change(State state, bool value)
+{
+ atk_object_notify_state_change(gobj(), state, static_cast<int>(value));
+}
+
+bool Object::add_relationship(RelationType relationship, const Glib::RefPtr<Object>& target)
+{
+ return atk_object_add_relationship(gobj(), ((AtkRelationType)(relationship)), Glib::unwrap(target));
+}
+
+bool Object::remove_relationship(RelationType relationship, const Glib::RefPtr<Object>& target)
+{
+ return atk_object_remove_relationship(gobj(), ((AtkRelationType)(relationship)), Glib::unwrap(target));
+}
+
+
+Glib::SignalProxy2< void,guint,gpointer > Object::signal_children_changed()
+{
+ return Glib::SignalProxy2< void,guint,gpointer >(this, &Object_signal_children_changed_info);
+}
+
+Glib::SignalProxy1< void,bool > Object::signal_focus_event()
+{
+ return Glib::SignalProxy1< void,bool >(this, &Object_signal_focus_event_info);
+}
+
+Glib::SignalProxy1< void,AtkPropertyValues* > Object::signal_property_change()
+{
+ return Glib::SignalProxy1< void,AtkPropertyValues* >(this, &Object_signal_property_change_info);
+}
+
+Glib::SignalProxy2< void,const Glib::ustring&,bool > Object::signal_state_change()
+{
+ return Glib::SignalProxy2< void,const Glib::ustring&,bool >(this, &Object_signal_state_change_info);
+}
+
+Glib::SignalProxy0< void > Object::signal_visible_data_changed()
+{
+ return Glib::SignalProxy0< void >(this, &Object_signal_visible_data_changed_info);
+}
+
+Glib::SignalProxy1< void,void** > Object::signal_active_descendant_changed()
+{
+ return Glib::SignalProxy1< void,void** >(this, &Object_signal_active_descendant_changed_info);
+}
+
+
+Glib::PropertyProxy<Glib::ustring> Object::property_accessible_name()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "accessible-name");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> Object::property_accessible_name() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "accessible-name");
+}
+
+Glib::PropertyProxy<Glib::ustring> Object::property_accessible_description()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "accessible-description");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> Object::property_accessible_description() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "accessible-description");
+}
+
+Glib::PropertyProxy< Glib::RefPtr<Atk::Object> > Object::property_accessible_parent()
+{
+ return Glib::PropertyProxy< Glib::RefPtr<Atk::Object> >(this, "accessible-parent");
+}
+
+Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Atk::Object> > Object::property_accessible_parent() const
+{
+ return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Atk::Object> >(this, "accessible-parent");
+}
+
+Glib::PropertyProxy<double> Object::property_accessible_value()
+{
+ return Glib::PropertyProxy<double>(this, "accessible-value");
+}
+
+Glib::PropertyProxy_ReadOnly<double> Object::property_accessible_value() const
+{
+ return Glib::PropertyProxy_ReadOnly<double>(this, "accessible-value");
+}
+
+Glib::PropertyProxy<int> Object::property_accessible_role()
+{
+ return Glib::PropertyProxy<int>(this, "accessible-role");
+}
+
+Glib::PropertyProxy_ReadOnly<int> Object::property_accessible_role() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "accessible-role");
+}
+
+Glib::PropertyProxy_ReadOnly<int> Object::property_accessible_component_layer() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "accessible-component-layer");
+}
+
+Glib::PropertyProxy_ReadOnly<int> Object::property_accessible_component_mdi_zorder() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "accessible-component-mdi-zorder");
+}
+
+Glib::PropertyProxy<Glib::ustring> Object::property_accessible_table_caption()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "accessible-table-caption");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> Object::property_accessible_table_caption() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "accessible-table-caption");
+}
+
+Glib::PropertyProxy<Glib::ustring> Object::property_accessible_table_column_description()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "accessible-table-column-description");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> Object::property_accessible_table_column_description() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "accessible-table-column-description");
+}
+
+Glib::PropertyProxy< Glib::RefPtr<Atk::Object> > Object::property_accessible_table_column_header()
+{
+ return Glib::PropertyProxy< Glib::RefPtr<Atk::Object> >(this, "accessible-table-column-header");
+}
+
+Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Atk::Object> > Object::property_accessible_table_column_header() const
+{
+ return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Atk::Object> >(this, "accessible-table-column-header");
+}
+
+Glib::PropertyProxy<Glib::ustring> Object::property_accessible_table_row_description()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "accessible-table-row-description");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> Object::property_accessible_table_row_description() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "accessible-table-row-description");
+}
+
+Glib::PropertyProxy< Glib::RefPtr<Atk::Object> > Object::property_accessible_table_row_header()
+{
+ return Glib::PropertyProxy< Glib::RefPtr<Atk::Object> >(this, "accessible-table-row-header");
+}
+
+Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Atk::Object> > Object::property_accessible_table_row_header() const
+{
+ return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Atk::Object> >(this, "accessible-table-row-header");
+}
+
+Glib::PropertyProxy< Glib::RefPtr<Atk::Object> > Object::property_accessible_table_summary()
+{
+ return Glib::PropertyProxy< Glib::RefPtr<Atk::Object> >(this, "accessible-table-summary");
+}
+
+Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Atk::Object> > Object::property_accessible_table_summary() const
+{
+ return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Atk::Object> >(this, "accessible-table-summary");
+}
+
+
+void Atk::Object::on_children_changed(guint change_index, gpointer changed_child)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->children_changed)
+ (*base->children_changed)(gobj(),change_index,changed_child);
+}
+
+void Atk::Object::on_focus_event(bool focus_in)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->focus_event)
+ (*base->focus_event)(gobj(),static_cast<int>(focus_in));
+}
+
+void Atk::Object::on_property_change(AtkPropertyValues* values)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->property_change)
+ (*base->property_change)(gobj(),values);
+}
+
+void Atk::Object::on_state_change(const Glib::ustring& name, bool state_set)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->state_change)
+ (*base->state_change)(gobj(),name.c_str(),static_cast<int>(state_set));
+}
+
+void Atk::Object::on_visible_data_changed()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->visible_data_changed)
+ (*base->visible_data_changed)(gobj());
+}
+
+void Atk::Object::on_active_descendant_changed(void** child)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->active_descendant_changed)
+ (*base->active_descendant_changed)(gobj(),child);
+}
+
+
+} // namespace Atk
+
+
diff --git a/libs/gtkmm2/atk/atkmm/object.h b/libs/gtkmm2/atk/atkmm/object.h
new file mode 100644
index 0000000000..047cb2a254
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/object.h
@@ -0,0 +1,570 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _ATKMM_OBJECT_H
+#define _ATKMM_OBJECT_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#include <atkmm/component.h>
+#include <atkmm/relation.h>
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C" { typedef struct _AtkPropertyValues AtkPropertyValues; }
+#endif
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _AtkObject AtkObject;
+typedef struct _AtkObjectClass AtkObjectClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Atk
+{ class Object_Class; } // namespace Atk
+namespace Atk
+{
+
+
+/** @addtogroup atkmmEnums Enums and Flags */
+
+/**
+ * @ingroup atkmmEnums
+ */
+enum Role
+{
+ ROLE_INVALID,
+ ROLE_ACCEL_LABEL,
+ ROLE_ALERT,
+ ROLE_ANIMATION,
+ ROLE_ARROW,
+ ROLE_CALENDAR,
+ ROLE_CANVAS,
+ ROLE_CHECK_BOX,
+ ROLE_CHECK_MENU_ITEM,
+ ROLE_COLOR_CHOOSER,
+ ROLE_COLUMN_HEADER,
+ ROLE_COMBO_BOX,
+ ROLE_DATE_EDITOR,
+ ROLE_DESKTOP_ICON,
+ ROLE_DESKTOP_FRAME,
+ ROLE_DIAL,
+ ROLE_DIALOG,
+ ROLE_DIRECTORY_PANE,
+ ROLE_DRAWING_AREA,
+ ROLE_FILE_CHOOSER,
+ ROLE_FILLER,
+ ROLE_FONT_CHOOSER,
+ ROLE_FRAME,
+ ROLE_GLASS_PANE,
+ ROLE_HTML_CONTAINER,
+ ROLE_ICON,
+ ROLE_IMAGE,
+ ROLE_INTERNAL_FRAME,
+ ROLE_LABEL,
+ ROLE_LAYERED_PANE,
+ ROLE_LIST,
+ ROLE_LIST_ITEM,
+ ROLE_MENU,
+ ROLE_MENU_BAR,
+ ROLE_MENU_ITEM,
+ ROLE_OPTION_PANE,
+ ROLE_PAGE_TAB,
+ ROLE_PAGE_TAB_LIST,
+ ROLE_PANEL,
+ ROLE_PASSWORD_TEXT,
+ ROLE_POPUP_MENU,
+ ROLE_PROGRESS_BAR,
+ ROLE_PUSH_BUTTON,
+ ROLE_RADIO_BUTTON,
+ ROLE_RADIO_MENU_ITEM,
+ ROLE_ROOT_PANE,
+ ROLE_ROW_HEADER,
+ ROLE_SCROLL_BAR,
+ ROLE_SCROLL_PANE,
+ ROLE_SEPARATOR,
+ ROLE_SLIDER,
+ ROLE_SPLIT_PANE,
+ ROLE_SPIN_BUTTON,
+ ROLE_STATUSBAR,
+ ROLE_TABLE,
+ ROLE_TABLE_CELL,
+ ROLE_TABLE_COLUMN_HEADER,
+ ROLE_TABLE_ROW_HEADER,
+ ROLE_TEAR_OFF_MENU_ITEM,
+ ROLE_TERMINAL,
+ ROLE_TEXT,
+ ROLE_TOGGLE_BUTTON,
+ ROLE_TOOL_BAR,
+ ROLE_TOOL_TIP,
+ ROLE_TREE,
+ ROLE_TREE_TABLE,
+ ROLE_UNKNOWN,
+ ROLE_VIEWPORT,
+ ROLE_WINDOW,
+ ROLE_HEADER,
+ ROLE_FOOTER,
+ ROLE_PARAGRAPH,
+ ROLE_RULER,
+ ROLE_APPLICATION,
+ ROLE_AUTOCOMPLETE,
+ ROLE_EDITBAR,
+ ROLE_EMBEDDED,
+ ROLE_LAST_DEFINED
+};
+
+} // namespace Atk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Atk::Role> : public Glib::Value_Enum<Atk::Role>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Atk
+{
+
+
+class RelationSet;
+class Relation;
+class StateSet;
+
+typedef guint64 State;
+
+/** The base object class for the Accessibility Toolkit API.
+ * This class is the primary class for accessibility support via the Accessibility ToolKit (ATK). Objects which are
+ * instances of Atk::Object (or instances of Atk::Object-derived types) are queried for properties which relate basic
+ * (and generic) properties of a UI component such as name and description. Instances of Atk::Object may also be queried
+ * as to whether they implement other ATK interfaces (e.g. Atk::Action, Atk::Component, etc.), as appropriate to the role
+ * which a given UI component plays in a user interface.
+ *
+ * All UI components in an application which provide useful information or services to the user must provide corresponding
+ * Atk::Object instances on request (in GTK+, for instance, usually on a call to Gtk::Widget::get_accessible()), either via
+ * ATK support built into the toolkit for the widget class or ancestor class, or in the case of custom widgets, if the
+ * inherited Atk::Object implementation is insufficient, via instances of a new Atk::Object subclass.
+ */
+
+class Object : public Glib::Object
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef Object CppObjectType;
+ typedef Object_Class CppClassType;
+ typedef AtkObject BaseObjectType;
+ typedef AtkObjectClass BaseClassType;
+
+private: friend class Object_Class;
+ static CppClassType object_class_;
+
+private:
+ // noncopyable
+ Object(const Object&);
+ Object& operator=(const Object&);
+
+protected:
+ explicit Object(const Glib::ConstructParams& construct_params);
+ explicit Object(AtkObject* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~Object();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ AtkObject* gobj() { return reinterpret_cast<AtkObject*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const AtkObject* gobj() const { return reinterpret_cast<AtkObject*>(gobject_); }
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ AtkObject* gobj_copy();
+
+private:
+
+ // see wrap_new() implementation in object.ccg
+
+public:
+
+
+ /** Gets the accessible name of the accessible.
+ * @return A character string representing the accessible name of the object.
+ */
+ Glib::ustring get_name() const;
+
+ /** Gets the accessible description of the accessible.
+ * @return A character string representing the accessible description
+ * of the accessible.
+ */
+ Glib::ustring get_description() const;
+
+ /** Gets the accessible parent of the accessible.
+ * @return A Atk::Object representing the accessible parent of the accessible.
+ */
+ Glib::RefPtr<Atk::Object> get_parent();
+
+ /** Gets the number of accessible children of the accessible.
+ * @return An integer representing the number of accessible children
+ * of the accessible.
+ */
+ int get_n_accessible_children() const;
+
+ /** Gets a reference to the specified accessible child of the object.
+ * The accessible children are 0-based so the first accessible child is
+ * at index 0, the second at index 1 and so on.
+ * @param i A <tt>int</tt> representing the position of the child, starting from 0.
+ * @return An Atk::Object representing the specified accessible child
+ * of the accessible.
+ */
+ Glib::RefPtr<Atk::Object> get_accessible_child(int i);
+
+ /** Gets the Atk::RelationSet associated with the object.
+ * @return An Atk::RelationSet representing the relation set of the object.
+ */
+ Glib::RefPtr<RelationSet> get_relation_set();
+
+ /** Gets the role of the accessible.
+ * @return An Atk::Role which is the role of the accessible.
+ */
+ Role get_role() const;
+
+ /** Gets a reference to the state set of the accessible; the caller must
+ * unreference it when it is no longer needed.
+ * @return A reference to an Atk::StateSet which is the state
+ * set of the accessible.
+ */
+ Glib::RefPtr<StateSet> get_state_set();
+
+ /** Gets the 0-based index of this accessible in its parent; returns -1 if the
+ * accessible does not have an accessible parent.
+ * @return An integer which is the index of the accessible in its parent.
+ */
+ int get_index_in_parent();
+
+ /** Sets the accessible name of the accessible.
+ * @param name A character string to be set as the accessible name.
+ */
+ void set_name(const Glib::ustring& name);
+
+ /** Sets the accessible description of the accessible.
+ * @param description A character string to be set as the accessible description.
+ */
+ void set_description(const Glib::ustring& description);
+
+ /** Sets the accessible parent of the accessible.
+ * @param parent An Atk::Object to be set as the accessible parent.
+ */
+ void set_parent(const Glib::RefPtr<Atk::Object>& parent);
+
+ /** Sets the role of the accessible.
+ * @param role An Atk::Role to be set as the role.
+ */
+ void set_role(Role role);
+ //_WRAP_METHOD(guint connect_property_change_handler(AtkPropertyChangeHandler* handler), atk_object_connect_property_change_handler)
+ //_WRAP_METHOD(void remove_property_change_handler(guint handler_id), atk_object_remove_property_change_handler)
+
+ /** Emits a state-change signal for the specified state.
+ * @param state An Atk::State whose state is changed.
+ * @param value A <tt>bool</tt> which indicates whether the state is being set on or off.
+ */
+ void notify_state_change(State state, bool value);
+
+
+ /** Adds a relationship of the specified type with the specified target.
+ * @param relationship The Atk::RelationType of the relation.
+ * @param target The Atk::Object which is to be the target of the relation.
+ * @return <tt>true</tt> if the relationship is added.
+ */
+ bool add_relationship(RelationType relationship, const Glib::RefPtr<Object>& target);
+
+ /** Removes a relationship of the specified type with the specified target.
+ * @param relationship The Atk::RelationType of the relation.
+ * @param target The Atk::Object which is the target of the relation to be removed.
+ * @return <tt>true</tt> if the relationship is removed.
+ */
+ bool remove_relationship(RelationType relationship, const Glib::RefPtr<Object>& target);
+
+
+ Glib::SignalProxy2< void,guint,gpointer > signal_children_changed();
+
+
+ Glib::SignalProxy1< void,bool > signal_focus_event();
+
+
+ Glib::SignalProxy1< void,AtkPropertyValues* > signal_property_change();
+
+
+ Glib::SignalProxy2< void,const Glib::ustring&,bool > signal_state_change();
+
+
+ Glib::SignalProxy0< void > signal_visible_data_changed();
+
+
+ Glib::SignalProxy1< void,void** > signal_active_descendant_changed();
+
+
+ /** Object instance's name formatted for assistive technology access.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_accessible_name() ;
+
+/** Object instance's name formatted for assistive technology access.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_accessible_name() const;
+
+ /** Description of an object
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_accessible_description() ;
+
+/** Description of an object
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_accessible_description() const;
+
+ /** Is used to notify that the parent has changed.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy< Glib::RefPtr<Atk::Object> > property_accessible_parent() ;
+
+/** Is used to notify that the parent has changed.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Atk::Object> > property_accessible_parent() const;
+
+ /** Is used to notify that the value has changed.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<double> property_accessible_value() ;
+
+/** Is used to notify that the value has changed.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<double> property_accessible_value() const;
+
+ /** The accessible role of this object.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_accessible_role() ;
+
+/** The accessible role of this object.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_accessible_role() const;
+
+ /** The accessible layer of this object.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_accessible_component_layer() const;
+
+
+ /** The accessible MDI value of this object.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_accessible_component_mdi_zorder() const;
+
+
+ /** Is used to notify that the table caption has changed; this property should not be used. accessible-table-caption-object should be used instead.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_accessible_table_caption() ;
+
+/** Is used to notify that the table caption has changed; this property should not be used. accessible-table-caption-object should be used instead.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_accessible_table_caption() const;
+
+ /** Is used to notify that the table column description has changed.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_accessible_table_column_description() ;
+
+/** Is used to notify that the table column description has changed.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_accessible_table_column_description() const;
+
+ /** Is used to notify that the table column header has changed.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy< Glib::RefPtr<Atk::Object> > property_accessible_table_column_header() ;
+
+/** Is used to notify that the table column header has changed.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Atk::Object> > property_accessible_table_column_header() const;
+
+ /** Is used to notify that the table row description has changed.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_accessible_table_row_description() ;
+
+/** Is used to notify that the table row description has changed.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_accessible_table_row_description() const;
+
+ /** Is used to notify that the table row header has changed.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy< Glib::RefPtr<Atk::Object> > property_accessible_table_row_header() ;
+
+/** Is used to notify that the table row header has changed.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Atk::Object> > property_accessible_table_row_header() const;
+
+ /** Is used to notify that the table summary has changed.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy< Glib::RefPtr<Atk::Object> > property_accessible_table_summary() ;
+
+/** Is used to notify that the table summary has changed.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Atk::Object> > property_accessible_table_summary() const;
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_children_changed(guint change_index, gpointer changed_child);
+ virtual void on_focus_event(bool focus_in);
+ virtual void on_property_change(AtkPropertyValues* values);
+ virtual void on_state_change(const Glib::ustring& name, bool state_set);
+ virtual void on_visible_data_changed();
+ virtual void on_active_descendant_changed(void** child);
+
+
+};
+
+} // namespace Atk
+
+
+namespace Glib
+{
+ /** @relates Atk::Object
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Atk::Object> wrap(AtkObject* object, bool take_copy = false);
+}
+
+
+#endif /* _ATKMM_OBJECT_H */
+
diff --git a/libs/gtkmm2/atk/atkmm/objectaccessible.cc b/libs/gtkmm2/atk/atkmm/objectaccessible.cc
new file mode 100644
index 0000000000..da4136bef7
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/objectaccessible.cc
@@ -0,0 +1,165 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <atkmm/objectaccessible.h>
+#include <atkmm/private/objectaccessible_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <atk/atkgobjectaccessible.h>
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Atk::ObjectAccessible> wrap(AtkGObjectAccessible* object, bool take_copy)
+{
+ return Glib::RefPtr<Atk::ObjectAccessible>( dynamic_cast<Atk::ObjectAccessible*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} /* namespace Glib */
+
+
+namespace Atk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& ObjectAccessible_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &ObjectAccessible_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(atk_gobject_accessible_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void ObjectAccessible_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* ObjectAccessible_Class::wrap_new(GObject* object)
+{
+ return new ObjectAccessible((AtkGObjectAccessible*)object);
+}
+
+
+/* The implementation: */
+
+AtkGObjectAccessible* ObjectAccessible::gobj_copy()
+{
+ reference();
+ return gobj();
+}
+
+ObjectAccessible::ObjectAccessible(const Glib::ConstructParams& construct_params)
+:
+ Atk::Object(construct_params)
+{}
+
+ObjectAccessible::ObjectAccessible(AtkGObjectAccessible* castitem)
+:
+ Atk::Object((AtkObject*)(castitem))
+{}
+
+ObjectAccessible::~ObjectAccessible()
+{}
+
+
+ObjectAccessible::CppClassType ObjectAccessible::objectaccessible_class_; // initialize static member
+
+GType ObjectAccessible::get_type()
+{
+ return objectaccessible_class_.init().get_type();
+}
+
+GType ObjectAccessible::get_base_type()
+{
+ return atk_gobject_accessible_get_type();
+}
+
+
+Glib::RefPtr<Glib::Object> ObjectAccessible::get_object()
+{
+
+ Glib::RefPtr<Glib::Object> retvalue = Glib::wrap(atk_gobject_accessible_get_object(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const Glib::Object> ObjectAccessible::get_object() const
+{
+
+ Glib::RefPtr<const Glib::Object> retvalue = Glib::wrap(atk_gobject_accessible_get_object(const_cast<AtkGObjectAccessible*>(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<Atk::Object> ObjectAccessible::for_object(const Glib::RefPtr<Glib::Object>& obj)
+{
+
+ Glib::RefPtr<Atk::Object> retvalue = Glib::wrap(atk_gobject_accessible_for_object(Glib::unwrap(obj)));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const Atk::Object> ObjectAccessible::for_object(const Glib::RefPtr<const Glib::Object>& obj)
+{
+
+ Glib::RefPtr<const Atk::Object> retvalue = Glib::wrap(atk_gobject_accessible_for_object(const_cast<GObject*>(Glib::unwrap<Glib::Object>(obj))));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+
+} // namespace Atk
+
+
diff --git a/libs/gtkmm2/atk/atkmm/objectaccessible.h b/libs/gtkmm2/atk/atkmm/objectaccessible.h
new file mode 100644
index 0000000000..d266f9a97e
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/objectaccessible.h
@@ -0,0 +1,145 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _ATKMM_OBJECTACCESSIBLE_H
+#define _ATKMM_OBJECTACCESSIBLE_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <atkmm/object.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _AtkGObjectAccessible AtkGObjectAccessible;
+typedef struct _AtkGObjectAccessibleClass AtkGObjectAccessibleClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Atk
+{ class ObjectAccessible_Class; } // namespace Atk
+namespace Atk
+{
+
+/** This object class is derived from AtkObject and can be used as a basis implementing accessible objects.
+ * This can be used as a basis for implementing accessible objects for Glib::Objects which are not derived from
+ * Gtk::Widget. One example of its use is in providing an accessible object for GnomeCanvasItem in the GAIL library.
+ */
+
+class ObjectAccessible : public Atk::Object
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef ObjectAccessible CppObjectType;
+ typedef ObjectAccessible_Class CppClassType;
+ typedef AtkGObjectAccessible BaseObjectType;
+ typedef AtkGObjectAccessibleClass BaseClassType;
+
+private: friend class ObjectAccessible_Class;
+ static CppClassType objectaccessible_class_;
+
+private:
+ // noncopyable
+ ObjectAccessible(const ObjectAccessible&);
+ ObjectAccessible& operator=(const ObjectAccessible&);
+
+protected:
+ explicit ObjectAccessible(const Glib::ConstructParams& construct_params);
+ explicit ObjectAccessible(AtkGObjectAccessible* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~ObjectAccessible();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ AtkGObjectAccessible* gobj() { return reinterpret_cast<AtkGObjectAccessible*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const AtkGObjectAccessible* gobj() const { return reinterpret_cast<AtkGObjectAccessible*>(gobject_); }
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ AtkGObjectAccessible* gobj_copy();
+
+private:
+
+protected:
+
+
+ /** Gets the GObject for which @a obj is the accessible object.
+ * @return A G::Object which is the object for which @a obj is the accessible objedct.
+ */
+ Glib::RefPtr<Glib::Object> get_object();
+
+ /** Gets the GObject for which @a obj is the accessible object.
+ * @return A G::Object which is the object for which @a obj is the accessible objedct.
+ */
+ Glib::RefPtr<const Glib::Object> get_object() const;
+
+
+ /** Gets the accessible object for the specified @a obj .
+ * @param obj A G::Object.
+ * @return A Atk::Object which is the accessible object for the @a obj .
+ */
+ static Glib::RefPtr<Atk::Object> for_object(const Glib::RefPtr<Glib::Object>& obj);
+
+ /** Gets the accessible object for the specified @a obj .
+ * @param obj A G::Object.
+ * @return A Atk::Object which is the accessible object for the @a obj .
+ */
+ static Glib::RefPtr<const Atk::Object> for_object(const Glib::RefPtr<const Glib::Object>& obj);
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+};
+
+} // namespace Atk
+
+
+namespace Glib
+{
+ /** @relates Atk::ObjectAccessible
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Atk::ObjectAccessible> wrap(AtkGObjectAccessible* object, bool take_copy = false);
+}
+
+
+#endif /* _ATKMM_OBJECTACCESSIBLE_H */
+
diff --git a/libs/gtkmm2/atk/atkmm/private/action_p.h b/libs/gtkmm2/atk/atkmm/private/action_p.h
new file mode 100644
index 0000000000..bb3c5afa09
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/private/action_p.h
@@ -0,0 +1,47 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _ATKMM_ACTION_P_H
+#define _ATKMM_ACTION_P_H
+#include <glibmm/private/interface_p.h>
+
+#include <glibmm/private/interface_p.h>
+
+namespace Atk
+{
+
+class Action_Class : public Glib::Interface_Class
+{
+public:
+ typedef Action CppObjectType;
+ typedef AtkAction BaseObjectType;
+ typedef AtkActionIface BaseClassType;
+ typedef Glib::Interface_Class CppClassParent;
+
+ friend class Action;
+
+ const Glib::Interface_Class& init();
+
+ static void iface_init_function(void* g_iface, void* iface_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+ static gboolean do_action_vfunc_callback(AtkAction* self, gint i);
+ static gint get_n_actions_vfunc_callback(AtkAction* self);
+ static const gchar* get_description_vfunc_callback(AtkAction* self, gint i);
+ static const gchar* get_name_vfunc_callback(AtkAction* self, gint i);
+ static const gchar* get_keybinding_vfunc_callback(AtkAction* self, gint i);
+ static gboolean set_description_vfunc_callback(AtkAction* self, gint i, const gchar* desc);
+};
+
+
+} // namespace Atk
+
+#endif /* _ATKMM_ACTION_P_H */
+
diff --git a/libs/gtkmm2/atk/atkmm/private/component_p.h b/libs/gtkmm2/atk/atkmm/private/component_p.h
new file mode 100644
index 0000000000..010df9e92f
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/private/component_p.h
@@ -0,0 +1,54 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _ATKMM_COMPONENT_P_H
+#define _ATKMM_COMPONENT_P_H
+#include <atk/atkcomponent.h>
+
+#include <glibmm/private/interface_p.h>
+
+namespace Atk
+{
+
+class Component_Class : public Glib::Interface_Class
+{
+public:
+ typedef Component CppObjectType;
+ typedef AtkComponent BaseObjectType;
+ typedef AtkComponentIface BaseClassType;
+ typedef Glib::Interface_Class CppClassParent;
+
+ friend class Component;
+
+ const Glib::Interface_Class& init();
+
+ static void iface_init_function(void* g_iface, void* iface_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+ static guint add_focus_handler_vfunc_callback(AtkComponent* self, AtkFocusHandler handler);
+ static gboolean contains_vfunc_callback(AtkComponent* self, gint x, gint y, AtkCoordType coord_type);
+ static AtkObject* ref_accessible_at_point_vfunc_callback(AtkComponent* self, gint x, gint y, AtkCoordType coord_type);
+ static void get_extents_vfunc_callback(AtkComponent* self, gint* x, gint* y, gint* width, gint* height, AtkCoordType coord_type);
+ static void get_position_vfunc_callback(AtkComponent* self, gint* x, gint* y, AtkCoordType coord_type);
+ static void get_size_vfunc_callback(AtkComponent* self, gint* width, gint* height);
+ static AtkLayer get_layer_vfunc_callback(AtkComponent* self);
+ static gint get_mdi_zorder_vfunc_callback(AtkComponent* self);
+ static gboolean grab_focus_vfunc_callback(AtkComponent* self);
+ static void remove_focus_handler_vfunc_callback(AtkComponent* self, guint handler_id);
+ static gboolean set_extents_vfunc_callback(AtkComponent* self, gint x, gint y, gint width, gint height, AtkCoordType coord_type);
+ static gboolean set_position_vfunc_callback(AtkComponent* self, gint x, gint y, AtkCoordType coord_type);
+ static gboolean set_size_vfunc_callback(AtkComponent* self, gint width, gint height);
+};
+
+
+} // namespace Atk
+
+#endif /* _ATKMM_COMPONENT_P_H */
+
diff --git a/libs/gtkmm2/atk/atkmm/private/document_p.h b/libs/gtkmm2/atk/atkmm/private/document_p.h
new file mode 100644
index 0000000000..01115486b5
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/private/document_p.h
@@ -0,0 +1,43 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _ATKMM_DOCUMENT_P_H
+#define _ATKMM_DOCUMENT_P_H
+#include <glibmm/private/object_p.h>
+
+#include <glibmm/private/interface_p.h>
+
+namespace Atk
+{
+
+class Document_Class : public Glib::Interface_Class
+{
+public:
+ typedef Document CppObjectType;
+ typedef AtkDocument BaseObjectType;
+ typedef AtkDocumentIface BaseClassType;
+ typedef Glib::Interface_Class CppClassParent;
+
+ friend class Document;
+
+ const Glib::Interface_Class& init();
+
+ static void iface_init_function(void* g_iface, void* iface_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+ static const gchar* get_document_type_vfunc_callback(AtkDocument* self);
+ static gpointer get_document_vfunc_callback(AtkDocument* self);
+};
+
+
+} // namespace Atk
+
+#endif /* _ATKMM_DOCUMENT_P_H */
+
diff --git a/libs/gtkmm2/atk/atkmm/private/editabletext_p.h b/libs/gtkmm2/atk/atkmm/private/editabletext_p.h
new file mode 100644
index 0000000000..fb5004ed1d
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/private/editabletext_p.h
@@ -0,0 +1,47 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _ATKMM_EDITABLETEXT_P_H
+#define _ATKMM_EDITABLETEXT_P_H
+
+#include <glibmm/private/interface_p.h>
+
+namespace Atk
+{
+
+class EditableText_Class : public Glib::Interface_Class
+{
+public:
+ typedef EditableText CppObjectType;
+ typedef AtkEditableText BaseObjectType;
+ typedef AtkEditableTextIface BaseClassType;
+ typedef Glib::Interface_Class CppClassParent;
+
+ friend class EditableText;
+
+ const Glib::Interface_Class& init();
+
+ static void iface_init_function(void* g_iface, void* iface_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+ static gboolean set_run_attributes_vfunc_callback(AtkEditableText* self, AtkAttributeSet* attrib_set, gint start_offset, gint end_offset);
+ static void set_text_contents_vfunc_callback(AtkEditableText* self, const gchar* string);
+ static void insert_text_vfunc_callback(AtkEditableText* self, const gchar* string, gint length, gint* position);
+ static void copy_text_vfunc_callback(AtkEditableText* self, gint start_pos, gint end_pos);
+ static void cut_text_vfunc_callback(AtkEditableText* self, gint start_pos, gint end_pos);
+ static void delete_text_vfunc_callback(AtkEditableText* self, gint start_pos, gint end_pos);
+ static void paste_text_vfunc_callback(AtkEditableText* self, gint position);
+};
+
+
+} // namespace Atk
+
+#endif /* _ATKMM_EDITABLETEXT_P_H */
+
diff --git a/libs/gtkmm2/atk/atkmm/private/hyperlink_p.h b/libs/gtkmm2/atk/atkmm/private/hyperlink_p.h
new file mode 100644
index 0000000000..a5d9e61275
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/private/hyperlink_p.h
@@ -0,0 +1,54 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _ATKMM_HYPERLINK_P_H
+#define _ATKMM_HYPERLINK_P_H
+#include <glibmm/private/object_p.h>
+#include <atk/atkobject.h>
+
+#include <glibmm/class.h>
+
+namespace Atk
+{
+
+class Hyperlink_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Hyperlink CppObjectType;
+ typedef AtkHyperlink BaseObjectType;
+ typedef AtkHyperlinkClass BaseClassType;
+ typedef Glib::Object_Class CppClassParent;
+ typedef GObjectClass BaseClassParent;
+
+ friend class Hyperlink;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void link_activated_callback(AtkHyperlink* self);
+
+ //Callbacks (virtual functions):
+ static gchar* get_uri_vfunc_callback(AtkHyperlink* self, gint i);
+ static AtkObject* get_object_vfunc_callback(AtkHyperlink* self, gint i);
+ static gint get_end_index_vfunc_callback(AtkHyperlink* self);
+ static gint get_start_index_vfunc_callback(AtkHyperlink* self);
+ static gboolean is_valid_vfunc_callback(AtkHyperlink* self);
+ static gint get_n_anchors_vfunc_callback(AtkHyperlink* self);
+ static guint link_state_vfunc_callback(AtkHyperlink* self);
+ static gboolean is_selected_link_vfunc_callback(AtkHyperlink* self);
+};
+
+
+} // namespace Atk
+
+#endif /* _ATKMM_HYPERLINK_P_H */
+
diff --git a/libs/gtkmm2/atk/atkmm/private/hypertext_p.h b/libs/gtkmm2/atk/atkmm/private/hypertext_p.h
new file mode 100644
index 0000000000..79eaad32c5
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/private/hypertext_p.h
@@ -0,0 +1,45 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _ATKMM_HYPERTEXT_P_H
+#define _ATKMM_HYPERTEXT_P_H
+#include <glibmm/private/object_p.h>
+
+#include <glibmm/private/interface_p.h>
+
+namespace Atk
+{
+
+class Hypertext_Class : public Glib::Interface_Class
+{
+public:
+ typedef Hypertext CppObjectType;
+ typedef AtkHypertext BaseObjectType;
+ typedef AtkHypertextIface BaseClassType;
+ typedef Glib::Interface_Class CppClassParent;
+
+ friend class Hypertext;
+
+ const Glib::Interface_Class& init();
+
+ static void iface_init_function(void* g_iface, void* iface_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void link_selected_callback(AtkHypertext* self, gint p0);
+
+ //Callbacks (virtual functions):
+ static AtkHyperlink* get_link_vfunc_callback(AtkHypertext* self, gint link_index);
+ static gint get_n_links_vfunc_callback(AtkHypertext* self);
+ static gint get_link_index_vfunc_callback(AtkHypertext* self, gint char_index);
+};
+
+
+} // namespace Atk
+
+#endif /* _ATKMM_HYPERTEXT_P_H */
+
diff --git a/libs/gtkmm2/atk/atkmm/private/image_p.h b/libs/gtkmm2/atk/atkmm/private/image_p.h
new file mode 100644
index 0000000000..b2e8d327ca
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/private/image_p.h
@@ -0,0 +1,45 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _ATKMM_IMAGE_P_H
+#define _ATKMM_IMAGE_P_H
+#include <atk/atkimage.h>
+
+#include <glibmm/private/interface_p.h>
+
+namespace Atk
+{
+
+class Image_Class : public Glib::Interface_Class
+{
+public:
+ typedef Image CppObjectType;
+ typedef AtkImage BaseObjectType;
+ typedef AtkImageIface BaseClassType;
+ typedef Glib::Interface_Class CppClassParent;
+
+ friend class Image;
+
+ const Glib::Interface_Class& init();
+
+ static void iface_init_function(void* g_iface, void* iface_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+ static gboolean set_image_description_vfunc_callback(AtkImage* self, const gchar* description);
+ static const gchar* get_image_description_vfunc_callback(AtkImage* self);
+ static void get_image_position_vfunc_callback(AtkImage* self, gint* x, gint* y, AtkCoordType coord_type);
+ static void get_image_size_vfunc_callback(AtkImage* self, gint* width, gint* height);
+};
+
+
+} // namespace Atk
+
+#endif /* _ATKMM_IMAGE_P_H */
+
diff --git a/libs/gtkmm2/atk/atkmm/private/implementor_p.h b/libs/gtkmm2/atk/atkmm/private/implementor_p.h
new file mode 100644
index 0000000000..7c5fc8804f
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/private/implementor_p.h
@@ -0,0 +1,41 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _ATKMM_IMPLEMENTOR_P_H
+#define _ATKMM_IMPLEMENTOR_P_H
+
+#include <glibmm/private/interface_p.h>
+
+namespace Atk
+{
+
+class Implementor_Class : public Glib::Interface_Class
+{
+public:
+ typedef Implementor CppObjectType;
+ typedef AtkImplementor BaseObjectType;
+ typedef AtkImplementorIface BaseClassType;
+ typedef Glib::Interface_Class CppClassParent;
+
+ friend class Implementor;
+
+ const Glib::Interface_Class& init();
+
+ static void iface_init_function(void* g_iface, void* iface_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+ static AtkObject* ref_accessible_vfunc_callback(AtkImplementor* self);
+};
+
+
+} // namespace Atk
+
+#endif /* _ATKMM_IMPLEMENTOR_P_H */
+
diff --git a/libs/gtkmm2/atk/atkmm/private/noopobject_p.h b/libs/gtkmm2/atk/atkmm/private/noopobject_p.h
new file mode 100644
index 0000000000..afa515b316
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/private/noopobject_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _ATKMM_NOOPOBJECT_P_H
+#define _ATKMM_NOOPOBJECT_P_H
+#include <atkmm/private/object_p.h>
+
+#include <glibmm/class.h>
+
+namespace Atk
+{
+
+class NoOpObject_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef NoOpObject CppObjectType;
+ typedef AtkNoOpObject BaseObjectType;
+ typedef AtkNoOpObjectClass BaseClassType;
+ typedef Atk::Object_Class CppClassParent;
+ typedef AtkObjectClass BaseClassParent;
+
+ friend class NoOpObject;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Atk
+
+#endif /* _ATKMM_NOOPOBJECT_P_H */
+
diff --git a/libs/gtkmm2/atk/atkmm/private/object_p.h b/libs/gtkmm2/atk/atkmm/private/object_p.h
new file mode 100644
index 0000000000..f65e8f8c08
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/private/object_p.h
@@ -0,0 +1,50 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _ATKMM_OBJECT_P_H
+#define _ATKMM_OBJECT_P_H
+#include <glibmm/private/object_p.h>
+
+#include <glibmm/class.h>
+
+namespace Atk
+{
+
+class Object_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Object CppObjectType;
+ typedef AtkObject BaseObjectType;
+ typedef AtkObjectClass BaseClassType;
+ typedef Glib::Object_Class CppClassParent;
+ typedef GObjectClass BaseClassParent;
+
+ friend class Object;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void children_changed_callback(AtkObject* self, guint p0, gpointer p1);
+ static void focus_event_callback(AtkObject* self, gboolean p0);
+ static void property_change_callback(AtkObject* self, AtkPropertyValues* p0);
+ static void state_change_callback(AtkObject* self, const gchar* p0, gboolean p1);
+ static void visible_data_changed_callback(AtkObject* self);
+ static void active_descendant_changed_callback(AtkObject* self, gpointer* p0);
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Atk
+
+#endif /* _ATKMM_OBJECT_P_H */
+
diff --git a/libs/gtkmm2/atk/atkmm/private/objectaccessible_p.h b/libs/gtkmm2/atk/atkmm/private/objectaccessible_p.h
new file mode 100644
index 0000000000..b94c1320e5
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/private/objectaccessible_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _ATKMM_OBJECTACCESSIBLE_P_H
+#define _ATKMM_OBJECTACCESSIBLE_P_H
+#include <atkmm/private/object_p.h>
+
+#include <glibmm/class.h>
+
+namespace Atk
+{
+
+class ObjectAccessible_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef ObjectAccessible CppObjectType;
+ typedef AtkGObjectAccessible BaseObjectType;
+ typedef AtkGObjectAccessibleClass BaseClassType;
+ typedef Atk::Object_Class CppClassParent;
+ typedef AtkObjectClass BaseClassParent;
+
+ friend class ObjectAccessible;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Atk
+
+#endif /* _ATKMM_OBJECTACCESSIBLE_P_H */
+
diff --git a/libs/gtkmm2/atk/atkmm/private/relation_p.h b/libs/gtkmm2/atk/atkmm/private/relation_p.h
new file mode 100644
index 0000000000..63513db828
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/private/relation_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _ATKMM_RELATION_P_H
+#define _ATKMM_RELATION_P_H
+#include <glibmm/private/object_p.h>
+
+#include <glibmm/class.h>
+
+namespace Atk
+{
+
+class Relation_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Relation CppObjectType;
+ typedef AtkRelation BaseObjectType;
+ typedef AtkRelationClass BaseClassType;
+ typedef Glib::Object_Class CppClassParent;
+ typedef GObjectClass BaseClassParent;
+
+ friend class Relation;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Atk
+
+#endif /* _ATKMM_RELATION_P_H */
+
diff --git a/libs/gtkmm2/atk/atkmm/private/relationset_p.h b/libs/gtkmm2/atk/atkmm/private/relationset_p.h
new file mode 100644
index 0000000000..8d3787e6e6
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/private/relationset_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _ATKMM_RELATIONSET_P_H
+#define _ATKMM_RELATIONSET_P_H
+#include <glibmm/private/object_p.h>
+
+#include <glibmm/class.h>
+
+namespace Atk
+{
+
+class RelationSet_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef RelationSet CppObjectType;
+ typedef AtkRelationSet BaseObjectType;
+ typedef AtkRelationSetClass BaseClassType;
+ typedef Glib::Object_Class CppClassParent;
+ typedef GObjectClass BaseClassParent;
+
+ friend class RelationSet;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Atk
+
+#endif /* _ATKMM_RELATIONSET_P_H */
+
diff --git a/libs/gtkmm2/atk/atkmm/private/selection_p.h b/libs/gtkmm2/atk/atkmm/private/selection_p.h
new file mode 100644
index 0000000000..dd5f27702a
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/private/selection_p.h
@@ -0,0 +1,49 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _ATKMM_SELECTION_P_H
+#define _ATKMM_SELECTION_P_H
+#include <atk/atkobject.h>
+
+#include <glibmm/private/interface_p.h>
+
+namespace Atk
+{
+
+class Selection_Class : public Glib::Interface_Class
+{
+public:
+ typedef Selection CppObjectType;
+ typedef AtkSelection BaseObjectType;
+ typedef AtkSelectionIface BaseClassType;
+ typedef Glib::Interface_Class CppClassParent;
+
+ friend class Selection;
+
+ const Glib::Interface_Class& init();
+
+ static void iface_init_function(void* g_iface, void* iface_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void selection_changed_callback(AtkSelection* self);
+
+ //Callbacks (virtual functions):
+ static gboolean add_selection_vfunc_callback(AtkSelection* self, gint i);
+ static gboolean clear_selection_vfunc_callback(AtkSelection* self);
+ static AtkObject* ref_selection_vfunc_callback(AtkSelection* self, gint i);
+ static gint get_selection_count_vfunc_callback(AtkSelection* self);
+ static gboolean is_child_selected_vfunc_callback(AtkSelection* self, gint i);
+ static gboolean remove_selection_vfunc_callback(AtkSelection* self, gint i);
+ static gboolean select_all_selection_vfunc_callback(AtkSelection* self);
+};
+
+
+} // namespace Atk
+
+#endif /* _ATKMM_SELECTION_P_H */
+
diff --git a/libs/gtkmm2/atk/atkmm/private/stateset_p.h b/libs/gtkmm2/atk/atkmm/private/stateset_p.h
new file mode 100644
index 0000000000..51dd352ec0
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/private/stateset_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _ATKMM_STATESET_P_H
+#define _ATKMM_STATESET_P_H
+#include <glibmm/private/object_p.h>
+
+#include <glibmm/class.h>
+
+namespace Atk
+{
+
+class StateSet_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef StateSet CppObjectType;
+ typedef AtkStateSet BaseObjectType;
+ typedef AtkStateSetClass BaseClassType;
+ typedef Glib::Object_Class CppClassParent;
+ typedef GObjectClass BaseClassParent;
+
+ friend class StateSet;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Atk
+
+#endif /* _ATKMM_STATESET_P_H */
+
diff --git a/libs/gtkmm2/atk/atkmm/private/streamablecontent_p.h b/libs/gtkmm2/atk/atkmm/private/streamablecontent_p.h
new file mode 100644
index 0000000000..7c22e8c8ec
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/private/streamablecontent_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _ATKMM_STREAMABLECONTENT_P_H
+#define _ATKMM_STREAMABLECONTENT_P_H
+#include <glibmm/private/object_p.h>
+
+#include <glibmm/private/interface_p.h>
+
+namespace Atk
+{
+
+class StreamableContent_Class : public Glib::Interface_Class
+{
+public:
+ typedef StreamableContent CppObjectType;
+ typedef AtkStreamableContent BaseObjectType;
+ typedef AtkStreamableContentIface BaseClassType;
+ typedef Glib::Interface_Class CppClassParent;
+
+ friend class StreamableContent;
+
+ const Glib::Interface_Class& init();
+
+ static void iface_init_function(void* g_iface, void* iface_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+ static int get_n_mime_types_vfunc_callback(AtkStreamableContent* self);
+ static const gchar* get_mime_type_vfunc_callback(AtkStreamableContent* self, gint i);
+ static GIOChannel* get_stream_vfunc_callback(AtkStreamableContent* self, const gchar* mime_type);
+};
+
+
+} // namespace Atk
+
+#endif /* _ATKMM_STREAMABLECONTENT_P_H */
+
diff --git a/libs/gtkmm2/atk/atkmm/private/table_p.h b/libs/gtkmm2/atk/atkmm/private/table_p.h
new file mode 100644
index 0000000000..5516bb05c9
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/private/table_p.h
@@ -0,0 +1,77 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _ATKMM_TABLE_P_H
+#define _ATKMM_TABLE_P_H
+#include <atk/atkobject.h>
+
+#include <glibmm/private/interface_p.h>
+
+namespace Atk
+{
+
+class Table_Class : public Glib::Interface_Class
+{
+public:
+ typedef Table CppObjectType;
+ typedef AtkTable BaseObjectType;
+ typedef AtkTableIface BaseClassType;
+ typedef Glib::Interface_Class CppClassParent;
+
+ friend class Table;
+
+ const Glib::Interface_Class& init();
+
+ static void iface_init_function(void* g_iface, void* iface_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void row_inserted_callback(AtkTable* self, gint p0, gint p1);
+ static void column_inserted_callback(AtkTable* self, gint p0, gint p1);
+ static void row_deleted_callback(AtkTable* self, gint p0, gint p1);
+ static void column_deleted_callback(AtkTable* self, gint p0, gint p1);
+ static void row_reordered_callback(AtkTable* self);
+ static void column_reordered_callback(AtkTable* self);
+ static void model_changed_callback(AtkTable* self);
+
+ //Callbacks (virtual functions):
+ static AtkObject* ref_at_vfunc_callback(AtkTable* self, gint row, gint column);
+ static gint get_index_at_vfunc_callback(AtkTable* self, gint row, gint column);
+ static gint get_column_at_index_vfunc_callback(AtkTable* self, gint index_);
+ static gint get_row_at_index_vfunc_callback(AtkTable* self, gint index_);
+ static gint get_n_columns_vfunc_callback(AtkTable* self);
+ static gint get_n_rows_vfunc_callback(AtkTable* self);
+ static gint get_column_extent_at_vfunc_callback(AtkTable* self, gint row, gint column);
+ static gint get_row_extent_at_vfunc_callback(AtkTable* self, gint row, gint column);
+ static AtkObject* get_caption_vfunc_callback(AtkTable* self);
+ static const gchar* get_column_description_vfunc_callback(AtkTable* self, gint column);
+ static AtkObject* get_column_header_vfunc_callback(AtkTable* self, gint column);
+ static const gchar* get_row_description_vfunc_callback(AtkTable* self, gint row);
+ static AtkObject* get_row_header_vfunc_callback(AtkTable* self, gint row);
+ static AtkObject* get_summary_vfunc_callback(AtkTable* self);
+ static void set_caption_vfunc_callback(AtkTable* self, AtkObject* caption);
+ static void set_column_description_vfunc_callback(AtkTable* self, gint column, const gchar* description);
+ static void set_column_header_vfunc_callback(AtkTable* self, gint column, AtkObject* header);
+ static void set_row_description_vfunc_callback(AtkTable* self, gint row, const gchar* description);
+ static void set_row_header_vfunc_callback(AtkTable* self, gint row, AtkObject* header);
+ static void set_summary_vfunc_callback(AtkTable* self, AtkObject* accessible);
+ static gboolean is_column_selected_vfunc_callback(AtkTable* self, gint column);
+ static gboolean is_row_selected_vfunc_callback(AtkTable* self, gint row);
+ static gboolean is_selected_vfunc_callback(AtkTable* self, gint row, gint column);
+ static gboolean add_row_selection_vfunc_callback(AtkTable* self, gint row);
+ static gboolean remove_row_selection_vfunc_callback(AtkTable* self, gint row);
+ static gboolean add_column_selection_vfunc_callback(AtkTable* self, gint column);
+ static gboolean remove_column_selection_vfunc_callback(AtkTable* self, gint column);
+ static gint get_selected_columns_vfunc_callback(AtkTable* self, gint** selected);
+ static gint get_selected_rows_vfunc_callback(AtkTable* self, gint** selected);
+};
+
+
+} // namespace Atk
+
+#endif /* _ATKMM_TABLE_P_H */
+
diff --git a/libs/gtkmm2/atk/atkmm/private/text_p.h b/libs/gtkmm2/atk/atkmm/private/text_p.h
new file mode 100644
index 0000000000..3ccc748965
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/private/text_p.h
@@ -0,0 +1,61 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _ATKMM_TEXT_P_H
+#define _ATKMM_TEXT_P_H
+
+#include <glibmm/private/interface_p.h>
+
+namespace Atk
+{
+
+class Text_Class : public Glib::Interface_Class
+{
+public:
+ typedef Text CppObjectType;
+ typedef AtkText BaseObjectType;
+ typedef AtkTextIface BaseClassType;
+ typedef Glib::Interface_Class CppClassParent;
+
+ friend class Text;
+
+ const Glib::Interface_Class& init();
+
+ static void iface_init_function(void* g_iface, void* iface_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void text_changed_callback(AtkText* self, gint p0, gint p1);
+ static void text_caret_moved_callback(AtkText* self, gint p0);
+ static void text_selection_changed_callback(AtkText* self);
+ static void text_attributes_changed_callback(AtkText* self);
+
+ //Callbacks (virtual functions):
+ static gchar* get_text_vfunc_callback(AtkText* self, gint start_offset, gint end_offset);
+ static gunichar get_character_at_offset_vfunc_callback(AtkText* self, gint offset);
+ static gchar* get_text_after_offset_vfunc_callback(AtkText* self, gint offset, AtkTextBoundary boundary_type, gint* start_offset, gint* end_offset);
+ static gchar* get_text_at_offset_vfunc_callback(AtkText* self, gint offset, AtkTextBoundary boundary_type, gint* start_offset, gint* end_offset);
+ static gchar* get_text_before_offset_vfunc_callback(AtkText* self, gint offset, AtkTextBoundary boundary_type, gint* start_offset, gint* end_offset);
+ static gint get_caret_offset_vfunc_callback(AtkText* self);
+ static void get_character_extents_vfunc_callback(AtkText* self, gint offset, gint* x, gint* y, gint* width, gint* height, AtkCoordType coords);
+ static AtkAttributeSet* get_run_attributes_vfunc_callback(AtkText* self, gint offset, gint* start_offset, gint* end_offset);
+ static AtkAttributeSet* get_default_attributes_vfunc_callback(AtkText* self);
+ static gint get_character_count_vfunc_callback(AtkText* self);
+ static gint get_offset_at_point_vfunc_callback(AtkText* self, gint x, gint y, AtkCoordType coords);
+ static gint get_n_selections_vfunc_callback(AtkText* self);
+ static gchar* get_selection_vfunc_callback(AtkText* self, gint selection_num, gint* start_offset, gint* end_offset);
+ static gboolean add_selection_vfunc_callback(AtkText* self, gint start_offset, gint end_offset);
+ static gboolean remove_selection_vfunc_callback(AtkText* self, gint selection_num);
+ static gboolean set_selection_vfunc_callback(AtkText* self, gint selection_num, gint start_offset, gint end_offset);
+ static gboolean set_caret_offset_vfunc_callback(AtkText* self, gint offset);
+};
+
+
+} // namespace Atk
+
+#endif /* _ATKMM_TEXT_P_H */
+
diff --git a/libs/gtkmm2/atk/atkmm/private/value_p.h b/libs/gtkmm2/atk/atkmm/private/value_p.h
new file mode 100644
index 0000000000..f712e3cd70
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/private/value_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _ATKMM_VALUE_P_H
+#define _ATKMM_VALUE_P_H
+
+#include <glibmm/private/interface_p.h>
+
+namespace Atk
+{
+
+class Value_Class : public Glib::Interface_Class
+{
+public:
+ typedef Value CppObjectType;
+ typedef AtkValue BaseObjectType;
+ typedef AtkValueIface BaseClassType;
+ typedef Glib::Interface_Class CppClassParent;
+
+ friend class Value;
+
+ const Glib::Interface_Class& init();
+
+ static void iface_init_function(void* g_iface, void* iface_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+ static void get_current_value_vfunc_callback(AtkValue* self, GValue* value);
+ static void get_maximum_value_vfunc_callback(AtkValue* self, GValue* value);
+ static void get_minimum_value_vfunc_callback(AtkValue* self, GValue* value);
+ static gboolean set_current_value_vfunc_callback(AtkValue* self, const GValue* value);
+};
+
+
+} // namespace Atk
+
+#endif /* _ATKMM_VALUE_P_H */
+
diff --git a/libs/gtkmm2/atk/atkmm/relation.cc b/libs/gtkmm2/atk/atkmm/relation.cc
new file mode 100644
index 0000000000..94c3fe2d48
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/relation.cc
@@ -0,0 +1,177 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <atkmm/relation.h>
+#include <atkmm/private/relation_p.h>
+
+#include <atk/atk-enum-types.h>
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <atkmm/object.h>
+#include <atk/atkobject.h>
+#include <atk/atkrelation.h>
+
+
+namespace Atk
+{
+
+//TODO: Implement this with the new GValue array thingy. See bug #74246.
+Relation::Relation(const Glib::ArrayHandle< Glib::RefPtr<Atk::Object> >& targets,
+ RelationType relationship)
+:
+ Glib::Object((GObject*) atk_relation_new(const_cast<AtkObject**>(targets.data()), targets.size(),
+ (AtkRelationType) relationship))
+{}
+
+Glib::ArrayHandle< Glib::RefPtr<Atk::Object> > Relation::get_target()
+{
+ GPtrArray *const parray = atk_relation_get_target(gobj());
+
+ return Glib::ArrayHandle< Glib::RefPtr<Atk::Object> >
+ (reinterpret_cast<AtkObject**>(parray->pdata), parray->len, Glib::OWNERSHIP_NONE);
+}
+
+Glib::ArrayHandle< Glib::RefPtr<const Atk::Object> > Relation::get_target() const
+{
+ GPtrArray *const parray = atk_relation_get_target(const_cast<AtkRelation*>(gobj()));
+
+ return Glib::ArrayHandle< Glib::RefPtr<const Atk::Object> >
+ (reinterpret_cast<AtkObject**>(parray->pdata), parray->len, Glib::OWNERSHIP_NONE);
+}
+
+} // namespace Atk
+
+
+namespace
+{
+} // anonymous namespace
+
+// static
+GType Glib::Value<Atk::RelationType>::value_type()
+{
+ return atk_relation_type_get_type();
+}
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Atk::Relation> wrap(AtkRelation* object, bool take_copy)
+{
+ return Glib::RefPtr<Atk::Relation>( dynamic_cast<Atk::Relation*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} /* namespace Glib */
+
+
+namespace Atk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Relation_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Relation_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(atk_relation_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Relation_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* Relation_Class::wrap_new(GObject* object)
+{
+ return new Relation((AtkRelation*)object);
+}
+
+
+/* The implementation: */
+
+AtkRelation* Relation::gobj_copy()
+{
+ reference();
+ return gobj();
+}
+
+Relation::Relation(const Glib::ConstructParams& construct_params)
+:
+ Glib::Object(construct_params)
+{}
+
+Relation::Relation(AtkRelation* castitem)
+:
+ Glib::Object((GObject*)(castitem))
+{}
+
+Relation::~Relation()
+{}
+
+
+Relation::CppClassType Relation::relation_class_; // initialize static member
+
+GType Relation::get_type()
+{
+ return relation_class_.init().get_type();
+}
+
+GType Relation::get_base_type()
+{
+ return atk_relation_get_type();
+}
+
+
+Glib::RefPtr<Relation> Relation::create(const Glib::ArrayHandle< Glib::RefPtr<Atk::Object> >& targets, RelationType relationship)
+{
+ return Glib::RefPtr<Relation>( new Relation(targets, relationship) );
+}
+RelationType Relation::get_relation_type() const
+{
+ return ((RelationType)(atk_relation_get_relation_type(const_cast<AtkRelation*>(gobj()))));
+}
+
+void Relation::add_target(const Glib::RefPtr<Atk::Object>& target)
+{
+ atk_relation_add_target(gobj(), Glib::unwrap(target));
+}
+
+
+} // namespace Atk
+
+
diff --git a/libs/gtkmm2/atk/atkmm/relation.h b/libs/gtkmm2/atk/atkmm/relation.h
new file mode 100644
index 0000000000..683b938947
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/relation.h
@@ -0,0 +1,187 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _ATKMM_RELATION_H
+#define _ATKMM_RELATION_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _AtkRelation AtkRelation;
+typedef struct _AtkRelationClass AtkRelationClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Atk
+{ class Relation_Class; } // namespace Atk
+namespace Atk
+{
+
+
+/** @addtogroup atkmmEnums Enums and Flags */
+
+/**
+ * @ingroup atkmmEnums
+ */
+enum RelationType
+{
+ RELATION_NULL,
+ RELATION_CONTROLLED_BY,
+ RELATION_CONTROLLER_FOR,
+ RELATION_LABEL_FOR,
+ RELATION_LABELLED_BY,
+ RELATION_MEMBER_OF,
+ RELATION_NODE_CHILD_OF,
+ RELATION_FLOWS_TO,
+ RELATION_FLOWS_FROM,
+ RELATION_SUBWINDOW_OF,
+ RELATION_EMBEDS,
+ RELATION_EMBEDDED_BY,
+ RELATION_POPUP_FOR,
+ RELATION_PARENT_WINDOW_OF,
+ RELATION_LAST_DEFINED
+};
+
+} // namespace Atk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Atk::RelationType> : public Glib::Value_Enum<Atk::RelationType>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Atk
+{
+
+
+class Object;
+
+/** An Atk::Relation describes a relation between an object and one or more other objects.
+ * The actual relations that an object has with other objects are defined as an Atk::RelationSet,
+ * which is a set of Atk::Relations.
+ */
+
+class Relation : public Glib::Object
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef Relation CppObjectType;
+ typedef Relation_Class CppClassType;
+ typedef AtkRelation BaseObjectType;
+ typedef AtkRelationClass BaseClassType;
+
+private: friend class Relation_Class;
+ static CppClassType relation_class_;
+
+private:
+ // noncopyable
+ Relation(const Relation&);
+ Relation& operator=(const Relation&);
+
+protected:
+ explicit Relation(const Glib::ConstructParams& construct_params);
+ explicit Relation(AtkRelation* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~Relation();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ AtkRelation* gobj() { return reinterpret_cast<AtkRelation*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const AtkRelation* gobj() const { return reinterpret_cast<AtkRelation*>(gobject_); }
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ AtkRelation* gobj_copy();
+
+private:
+
+
+protected:
+ explicit Relation(const Glib::ArrayHandle< Glib::RefPtr<Atk::Object> >& targets,
+ RelationType relationship);
+
+public:
+
+ static Glib::RefPtr<Relation> create(const Glib::ArrayHandle< Glib::RefPtr<Atk::Object> >& targets, RelationType relationship = RELATION_NULL);
+
+
+ /** Gets the type of @a relation
+ * @return The type of @a relation .
+ */
+ RelationType get_relation_type() const;
+
+ Glib::ArrayHandle< Glib::RefPtr<Atk::Object> > get_target();
+ Glib::ArrayHandle< Glib::RefPtr<const Atk::Object> > get_target() const;
+
+
+ void add_target(const Glib::RefPtr<Atk::Object>& target);
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+};
+
+} // namespace Atk
+
+
+namespace Glib
+{
+ /** @relates Atk::Relation
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Atk::Relation> wrap(AtkRelation* object, bool take_copy = false);
+}
+
+
+#endif /* _ATKMM_RELATION_H */
+
diff --git a/libs/gtkmm2/atk/atkmm/relationset.cc b/libs/gtkmm2/atk/atkmm/relationset.cc
new file mode 100644
index 0000000000..2060639bc1
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/relationset.cc
@@ -0,0 +1,181 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <atkmm/relationset.h>
+#include <atkmm/private/relationset_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <atk/atkobject.h>
+#include <atk/atkrelationset.h>
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Atk::RelationSet> wrap(AtkRelationSet* object, bool take_copy)
+{
+ return Glib::RefPtr<Atk::RelationSet>( dynamic_cast<Atk::RelationSet*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} /* namespace Glib */
+
+
+namespace Atk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& RelationSet_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &RelationSet_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(atk_relation_set_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void RelationSet_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* RelationSet_Class::wrap_new(GObject* object)
+{
+ return new RelationSet((AtkRelationSet*)object);
+}
+
+
+/* The implementation: */
+
+AtkRelationSet* RelationSet::gobj_copy()
+{
+ reference();
+ return gobj();
+}
+
+RelationSet::RelationSet(const Glib::ConstructParams& construct_params)
+:
+ Glib::Object(construct_params)
+{}
+
+RelationSet::RelationSet(AtkRelationSet* castitem)
+:
+ Glib::Object((GObject*)(castitem))
+{}
+
+RelationSet::~RelationSet()
+{}
+
+
+RelationSet::CppClassType RelationSet::relationset_class_; // initialize static member
+
+GType RelationSet::get_type()
+{
+ return relationset_class_.init().get_type();
+}
+
+GType RelationSet::get_base_type()
+{
+ return atk_relation_set_get_type();
+}
+
+
+RelationSet::RelationSet()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Glib::Object(Glib::ConstructParams(relationset_class_.init()))
+{
+ }
+
+Glib::RefPtr<RelationSet> RelationSet::create()
+{
+ return Glib::RefPtr<RelationSet>( new RelationSet() );
+}
+bool RelationSet::set_contains(RelationType relationship)
+{
+ return atk_relation_set_contains(gobj(), ((AtkRelationType)(relationship)));
+}
+
+void RelationSet::set_remove(const Glib::RefPtr<Relation>& relation)
+{
+ atk_relation_set_remove(gobj(), Glib::unwrap(relation));
+}
+
+void RelationSet::set_add(const Glib::RefPtr<Relation>& relation)
+{
+ atk_relation_set_add(gobj(), Glib::unwrap(relation));
+}
+
+int RelationSet::get_n_relations() const
+{
+ return atk_relation_set_get_n_relations(const_cast<AtkRelationSet*>(gobj()));
+}
+
+Glib::RefPtr<Relation> RelationSet::get_relation(gint i)
+{
+
+ Glib::RefPtr<Relation> retvalue = Glib::wrap(atk_relation_set_get_relation(gobj(), i));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<Relation> RelationSet::get_relation(RelationType relationship)
+{
+
+ Glib::RefPtr<Relation> retvalue = Glib::wrap(atk_relation_set_get_relation_by_type(gobj(), ((AtkRelationType)(relationship))));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+void RelationSet::add_relation_by_type(RelationType relationship, const Glib::RefPtr<Atk::Object>& target)
+{
+ atk_relation_set_add_relation_by_type(gobj(), ((AtkRelationType)(relationship)), Glib::unwrap(target));
+}
+
+
+} // namespace Atk
+
+
diff --git a/libs/gtkmm2/atk/atkmm/relationset.h b/libs/gtkmm2/atk/atkmm/relationset.h
new file mode 100644
index 0000000000..3702083fa5
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/relationset.h
@@ -0,0 +1,171 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _ATKMM_RELATIONSET_H
+#define _ATKMM_RELATIONSET_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#include <atkmm/relation.h>
+#include <atkmm/object.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _AtkRelationSet AtkRelationSet;
+typedef struct _AtkRelationSetClass AtkRelationSetClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Atk
+{ class RelationSet_Class; } // namespace Atk
+namespace Atk
+{
+
+/** A set of Atk::Relations, normally the set of AtkRelations which an Atk::Object has.
+ */
+
+class RelationSet : public Glib::Object
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef RelationSet CppObjectType;
+ typedef RelationSet_Class CppClassType;
+ typedef AtkRelationSet BaseObjectType;
+ typedef AtkRelationSetClass BaseClassType;
+
+private: friend class RelationSet_Class;
+ static CppClassType relationset_class_;
+
+private:
+ // noncopyable
+ RelationSet(const RelationSet&);
+ RelationSet& operator=(const RelationSet&);
+
+protected:
+ explicit RelationSet(const Glib::ConstructParams& construct_params);
+ explicit RelationSet(AtkRelationSet* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~RelationSet();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ AtkRelationSet* gobj() { return reinterpret_cast<AtkRelationSet*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const AtkRelationSet* gobj() const { return reinterpret_cast<AtkRelationSet*>(gobject_); }
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ AtkRelationSet* gobj_copy();
+
+private:
+
+protected:
+ RelationSet();
+
+public:
+
+ static Glib::RefPtr<RelationSet> create();
+
+
+ /** Determines whether the relation set contains a relation that matches the
+ * specified type.
+ * @param relationship An Atk::RelationType.
+ * @return <tt>true</tt> if @a relationship is the relationship type of a relation
+ * in @a set , <tt>false</tt> otherwise.
+ */
+ bool set_contains(RelationType relationship);
+
+ /** Removes a relation from the relation set.
+ * This function unref's the Atk::Relation so it will be deleted unless there
+ * is another reference to it.
+ * @param relation An Atk::Relation.
+ */
+ void set_remove(const Glib::RefPtr<Relation>& relation);
+
+ /** Add a new relation to the current relation set if it is not already
+ * present.
+ * This function ref's the AtkRelation so the caller of this function
+ * should unref it to ensure that it will be destroyed when the AtkRelationSet
+ * is destroyed.
+ * @param relation An Atk::Relation.
+ */
+ void set_add(const Glib::RefPtr<Relation>& relation);
+
+ /** Determines the number of relations in a relation set.
+ * @return An integer representing the number of relations in the set.
+ */
+ int get_n_relations() const;
+
+ /** Determines the relation at the specified position in the relation set.
+ * @param i A <tt>int</tt> representing a position in the set, starting from 0.
+ * @return A Atk::Relation, which is the relation at position i in the set.
+ */
+ Glib::RefPtr<Relation> get_relation(gint i);
+
+ /** Finds a relation that matches the specified type.
+ * @param relationship An Atk::RelationType.
+ * @return An Atk::Relation, which is a relation matching the specified type.
+ */
+ Glib::RefPtr<Relation> get_relation(RelationType relationship);
+
+
+ void add_relation_by_type(RelationType relationship, const Glib::RefPtr<Atk::Object>& target);
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+};
+
+} // namespace Atk
+
+
+namespace Glib
+{
+ /** @relates Atk::RelationSet
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Atk::RelationSet> wrap(AtkRelationSet* object, bool take_copy = false);
+}
+
+
+#endif /* _ATKMM_RELATIONSET_H */
+
diff --git a/libs/gtkmm2/atk/atkmm/selection.cc b/libs/gtkmm2/atk/atkmm/selection.cc
new file mode 100644
index 0000000000..95c6a0a60a
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/selection.cc
@@ -0,0 +1,596 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <atkmm/selection.h>
+#include <atkmm/private/selection_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <atkmm/object.h>
+#include <atk/atkselection.h>
+
+
+namespace
+{
+
+const Glib::SignalProxyInfo Selection_signal_selection_changed_info =
+{
+ "selection_changed",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Atk::Selection> wrap(AtkSelection* object, bool take_copy)
+{
+ return Glib::RefPtr<Atk::Selection>( dynamic_cast<Atk::Selection*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} // namespace Glib
+
+
+namespace Atk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Interface_Class& Selection_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Interface_Class has to know the interface init function
+ // in order to add interfaces to implementing types.
+ class_init_func_ = &Selection_Class::iface_init_function;
+
+ // We can not derive from another interface, and it is not necessary anyway.
+ gtype_ = atk_selection_get_type();
+ }
+
+ return *this;
+}
+
+void Selection_Class::iface_init_function(void* g_iface, void*)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_iface);
+
+ //This is just to avoid an "unused variable" warning when there are no vfuncs or signal handlers to connect.
+ //This is a temporary fix until I find out why I can not seem to derive a GtkFileChooser interface. murrayc
+ g_assert(klass != 0);
+
+ klass->add_selection = &add_selection_vfunc_callback;
+ klass->clear_selection = &clear_selection_vfunc_callback;
+ klass->ref_selection = &ref_selection_vfunc_callback;
+ klass->get_selection_count = &get_selection_count_vfunc_callback;
+ klass->is_child_selected = &is_child_selected_vfunc_callback;
+ klass->remove_selection = &remove_selection_vfunc_callback;
+ klass->select_all_selection = &select_all_selection_vfunc_callback;
+ klass->selection_changed = &selection_changed_callback;
+}
+
+gboolean Selection_Class::add_selection_vfunc_callback(AtkSelection* self, gint i)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->add_selection_vfunc(i
+));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->add_selection)
+ return (*base->add_selection)(self, i);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Selection_Class::clear_selection_vfunc_callback(AtkSelection* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->clear_selection_vfunc());
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->clear_selection)
+ return (*base->clear_selection)(self);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+AtkObject* Selection_Class::ref_selection_vfunc_callback(AtkSelection* self, gint i)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return Glib::unwrap_copy(obj->get_selection_vfunc(i
+));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->ref_selection)
+ return (*base->ref_selection)(self, i);
+ }
+
+ typedef AtkObject* RType;
+ return RType();
+}
+
+gint Selection_Class::get_selection_count_vfunc_callback(AtkSelection* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return obj->get_selection_count_vfunc();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_selection_count)
+ return (*base->get_selection_count)(self);
+ }
+
+ typedef gint RType;
+ return RType();
+}
+
+gboolean Selection_Class::is_child_selected_vfunc_callback(AtkSelection* self, gint i)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->is_child_selected_vfunc(i
+));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->is_child_selected)
+ return (*base->is_child_selected)(self, i);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Selection_Class::remove_selection_vfunc_callback(AtkSelection* self, gint i)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->remove_selection_vfunc(i
+));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->remove_selection)
+ return (*base->remove_selection)(self, i);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Selection_Class::select_all_selection_vfunc_callback(AtkSelection* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->select_all_selection_vfunc());
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->select_all_selection)
+ return (*base->select_all_selection)(self);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+
+void Selection_Class::selection_changed_callback(AtkSelection* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_selection_changed();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->selection_changed)
+ (*base->selection_changed)(self);
+ }
+}
+
+
+Glib::ObjectBase* Selection_Class::wrap_new(GObject* object)
+{
+ return new Selection((AtkSelection*)(object));
+}
+
+
+/* The implementation: */
+
+Selection::Selection()
+:
+ Glib::Interface(selection_class_.init())
+{}
+
+Selection::Selection(AtkSelection* castitem)
+:
+ Glib::Interface((GObject*)(castitem))
+{}
+
+Selection::~Selection()
+{}
+
+// static
+void Selection::add_interface(GType gtype_implementer)
+{
+ selection_class_.init().add_interface(gtype_implementer);
+}
+
+Selection::CppClassType Selection::selection_class_; // initialize static member
+
+GType Selection::get_type()
+{
+ return selection_class_.init().get_type();
+}
+
+GType Selection::get_base_type()
+{
+ return atk_selection_get_type();
+}
+
+
+bool Selection::add_selection(int i)
+{
+ return atk_selection_add_selection(gobj(), i);
+}
+
+bool Selection::clear_selection()
+{
+ return atk_selection_clear_selection(gobj());
+}
+
+Glib::RefPtr<Atk::Object> Selection::get_selection(int i)
+{
+ return Glib::wrap(atk_selection_ref_selection(gobj(), i));
+}
+
+int Selection::get_selection_count() const
+{
+ return atk_selection_get_selection_count(const_cast<AtkSelection*>(gobj()));
+}
+
+bool Selection::is_child_selected(int i) const
+{
+ return atk_selection_is_child_selected(const_cast<AtkSelection*>(gobj()), i);
+}
+
+bool Selection::remove_selection(int i)
+{
+ return atk_selection_remove_selection(gobj(), i);
+}
+
+bool Selection::select_all_selection()
+{
+ return atk_selection_select_all_selection(gobj());
+}
+
+
+Glib::SignalProxy0< void > Selection::signal_selection_changed()
+{
+ return Glib::SignalProxy0< void >(this, &Selection_signal_selection_changed_info);
+}
+
+
+void Atk::Selection::on_selection_changed()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->selection_changed)
+ (*base->selection_changed)(gobj());
+}
+
+
+bool Atk::Selection::add_selection_vfunc(int i)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->add_selection)
+ return (*base->add_selection)(gobj(),i);
+
+ typedef bool RType;
+ return RType();
+}
+
+bool Atk::Selection::clear_selection_vfunc()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->clear_selection)
+ return (*base->clear_selection)(gobj());
+
+ typedef bool RType;
+ return RType();
+}
+
+Glib::RefPtr<Atk::Object> Atk::Selection::get_selection_vfunc(int i)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->ref_selection)
+ return Glib::wrap((*base->ref_selection)(gobj(),i));
+
+ typedef Glib::RefPtr<Atk::Object> RType;
+ return RType();
+}
+
+int Atk::Selection::get_selection_count_vfunc() const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_selection_count)
+ return (*base->get_selection_count)(const_cast<AtkSelection*>(gobj()));
+
+ typedef int RType;
+ return RType();
+}
+
+bool Atk::Selection::is_child_selected_vfunc(int i) const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->is_child_selected)
+ return (*base->is_child_selected)(const_cast<AtkSelection*>(gobj()),i);
+
+ typedef bool RType;
+ return RType();
+}
+
+bool Atk::Selection::remove_selection_vfunc(int i)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->remove_selection)
+ return (*base->remove_selection)(gobj(),i);
+
+ typedef bool RType;
+ return RType();
+}
+
+bool Atk::Selection::select_all_selection_vfunc()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->select_all_selection)
+ return (*base->select_all_selection)(gobj());
+
+ typedef bool RType;
+ return RType();
+}
+
+
+} // namespace Atk
+
+
diff --git a/libs/gtkmm2/atk/atkmm/selection.h b/libs/gtkmm2/atk/atkmm/selection.h
new file mode 100644
index 0000000000..62185ed0d9
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/selection.h
@@ -0,0 +1,208 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _ATKMM_SELECTION_H
+#define _ATKMM_SELECTION_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C"
+{
+ typedef struct _AtkSelectionIface AtkSelectionIface;
+ typedef struct _AtkSelection AtkSelection;
+}
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _AtkSelection AtkSelection;
+typedef struct _AtkSelectionClass AtkSelectionClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Atk
+{ class Selection_Class; } // namespace Atk
+namespace Atk
+{
+
+class Object;
+
+/** The ATK interface implemented by container objects whose Atk::Object children can be selected.
+ * This should be implemented by UI components with children which are exposed by Atk::Object::ref_child and
+ * Atk::Object::get_n_children, if the use of the parent UI component ordinarily involves selection of one or
+ * more of the objects corresponding to those AtkObject children - for example, selectable lists.
+ *
+ * Note that other types of "selection" (for instance text selection) are accomplished a other ATK interfaces -
+ * Atk::Selection is limited to the selection/deselection of children.
+ */
+
+class Selection : public Glib::Interface
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef Selection CppObjectType;
+ typedef Selection_Class CppClassType;
+ typedef AtkSelection BaseObjectType;
+ typedef AtkSelectionIface BaseClassType;
+
+private:
+ friend class Selection_Class;
+ static CppClassType selection_class_;
+
+ // noncopyable
+ Selection(const Selection&);
+ Selection& operator=(const Selection&);
+
+protected:
+ Selection(); // you must derive from this class
+ explicit Selection(AtkSelection* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~Selection();
+
+ static void add_interface(GType gtype_implementer);
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ AtkSelection* gobj() { return reinterpret_cast<AtkSelection*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const AtkSelection* gobj() const { return reinterpret_cast<AtkSelection*>(gobject_); }
+
+private:
+
+
+public:
+
+ /** Adds the specified accessible child of the object to the
+ * object's selection.
+ * @param i A <tt>int</tt> specifying the child index.
+ * @return <tt>true</tt> if success, <tt>false</tt> otherwise.
+ */
+ bool add_selection(int i);
+
+ /** Clears the selection in the object so that no children in the object
+ * are selected.
+ * @return <tt>true</tt> if success, <tt>false</tt> otherwise.
+ */
+ bool clear_selection();
+
+ /** Gets a reference to the accessible object representing the specified
+ * selected child of the object.
+ * @note callers should not rely on <tt>0</tt> or on a zero value for
+ * indication of whether AtkSelectionIface is implemented, they should
+ * use type checking/interface checking macros or the
+ * atk_get_accessible_value() convenience method.
+ * @param i A <tt>int</tt> specifying the index in the selection set. (e.g. the
+ * ith selection as opposed to the ith child).
+ * @return An Atk::Object representing the selected accessible , or <tt>0</tt>
+ * if @a selection does not implement this interface.
+ */
+ Glib::RefPtr<Atk::Object> get_selection(int i);
+
+ /** Gets the number of accessible children currently selected.
+ * @note callers should not rely on <tt>0</tt> or on a zero value for
+ * indication of whether AtkSelectionIface is implemented, they should
+ * use type checking/interface checking macros or the
+ * atk_get_accessible_value() convenience method.
+ * @return A <tt>int</tt> representing the number of items selected, or 0
+ * if @a selection does not implement this interface.
+ */
+ int get_selection_count() const;
+
+ /** Determines if the current child of this object is selected
+ * @note callers should not rely on <tt>0</tt> or on a zero value for
+ * indication of whether AtkSelectionIface is implemented, they should
+ * use type checking/interface checking macros or the
+ * atk_get_accessible_value() convenience method.
+ * @param i A <tt>int</tt> specifying the child index.
+ * @return A <tt>bool</tt> representing the specified child is selected, or 0
+ * if @a selection does not implement this interface.
+ */
+ bool is_child_selected(int i) const;
+
+ /** Removes the specified child of the object from the object's selection.
+ * @param i A <tt>int</tt> specifying the index in the selection set. (e.g. the
+ * ith selection as opposed to the ith child).
+ * @return <tt>true</tt> if success, <tt>false</tt> otherwise.
+ */
+ bool remove_selection(int i);
+
+ /** Causes every child of the object to be selected if the object
+ * supports multiple selections.
+ * @return <tt>true</tt> if success, <tt>false</tt> otherwise.
+ */
+ bool select_all_selection();
+
+
+ Glib::SignalProxy0< void > signal_selection_changed();
+
+
+protected:
+ virtual bool add_selection_vfunc(int i);
+ virtual bool clear_selection_vfunc();
+ virtual Glib::RefPtr<Atk::Object> get_selection_vfunc(int i);
+ virtual int get_selection_count_vfunc() const;
+ virtual bool is_child_selected_vfunc(int i) const;
+ virtual bool remove_selection_vfunc(int i);
+ virtual bool select_all_selection_vfunc();
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_selection_changed();
+
+
+};
+
+} // namespace Atk
+
+
+namespace Glib
+{
+ /** @relates Atk::Selection
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Atk::Selection> wrap(AtkSelection* object, bool take_copy = false);
+
+} // namespace Glib
+
+#endif /* _ATKMM_SELECTION_H */
+
diff --git a/libs/gtkmm2/atk/atkmm/stateset.cc b/libs/gtkmm2/atk/atkmm/stateset.cc
new file mode 100644
index 0000000000..6feb4d6ee3
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/stateset.cc
@@ -0,0 +1,200 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <atkmm/stateset.h>
+#include <atkmm/private/stateset_p.h>
+
+#include <atk/atk-enum-types.h>
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <atk/atkobject.h>
+#include <atk/atkstateset.h>
+
+
+namespace Atk
+{
+
+void StateSet::add_states(const Glib::ArrayHandle<StateType>& types)
+{
+ atk_state_set_add_states(gobj(), (AtkStateType*) types.data(), types.size());
+}
+
+bool StateSet::contains_states(const Glib::ArrayHandle<StateType>& types) const
+{
+ return atk_state_set_contains_states(
+ const_cast<AtkStateSet*>(gobj()), (AtkStateType*) types.data(), types.size());
+}
+
+} // namespace Atk
+
+
+namespace
+{
+} // anonymous namespace
+
+// static
+GType Glib::Value<Atk::StateType>::value_type()
+{
+ return atk_state_type_get_type();
+}
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Atk::StateSet> wrap(AtkStateSet* object, bool take_copy)
+{
+ return Glib::RefPtr<Atk::StateSet>( dynamic_cast<Atk::StateSet*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} /* namespace Glib */
+
+
+namespace Atk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& StateSet_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &StateSet_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(atk_state_set_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void StateSet_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* StateSet_Class::wrap_new(GObject* object)
+{
+ return new StateSet((AtkStateSet*)object);
+}
+
+
+/* The implementation: */
+
+AtkStateSet* StateSet::gobj_copy()
+{
+ reference();
+ return gobj();
+}
+
+StateSet::StateSet(const Glib::ConstructParams& construct_params)
+:
+ Glib::Object(construct_params)
+{}
+
+StateSet::StateSet(AtkStateSet* castitem)
+:
+ Glib::Object((GObject*)(castitem))
+{}
+
+StateSet::~StateSet()
+{}
+
+
+StateSet::CppClassType StateSet::stateset_class_; // initialize static member
+
+GType StateSet::get_type()
+{
+ return stateset_class_.init().get_type();
+}
+
+GType StateSet::get_base_type()
+{
+ return atk_state_set_get_type();
+}
+
+
+StateSet::StateSet()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Glib::Object(Glib::ConstructParams(stateset_class_.init()))
+{
+ }
+
+Glib::RefPtr<StateSet> StateSet::create()
+{
+ return Glib::RefPtr<StateSet>( new StateSet() );
+}
+bool StateSet::is_empty() const
+{
+ return atk_state_set_is_empty(const_cast<AtkStateSet*>(gobj()));
+}
+
+bool StateSet::add_state(Atk::StateType type)
+{
+ return atk_state_set_add_state(gobj(), ((AtkStateType)(type)));
+}
+
+void StateSet::clear_states()
+{
+ atk_state_set_clear_states(gobj());
+}
+
+bool StateSet::contains_state(Atk::StateType type)
+{
+ return atk_state_set_contains_state(gobj(), ((AtkStateType)(type)));
+}
+
+bool StateSet::remove_state(Atk::StateType type)
+{
+ return atk_state_set_remove_state(gobj(), ((AtkStateType)(type)));
+}
+
+Glib::RefPtr<StateSet> StateSet::and_sets(const Glib::RefPtr<StateSet>& compare_set)
+{
+ return Glib::wrap(atk_state_set_and_sets(gobj(), Glib::unwrap(compare_set)));
+}
+
+Glib::RefPtr<StateSet> StateSet::or_sets(const Glib::RefPtr<StateSet>& compare_set)
+{
+ return Glib::wrap(atk_state_set_or_sets(gobj(), Glib::unwrap(compare_set)));
+}
+
+Glib::RefPtr<StateSet> StateSet::xor_sets(const Glib::RefPtr<StateSet>& compare_set)
+{
+ return Glib::wrap(atk_state_set_xor_sets(gobj(), Glib::unwrap(compare_set)));
+}
+
+
+} // namespace Atk
+
+
diff --git a/libs/gtkmm2/atk/atkmm/stateset.h b/libs/gtkmm2/atk/atkmm/stateset.h
new file mode 100644
index 0000000000..f3e8f70504
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/stateset.h
@@ -0,0 +1,247 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _ATKMM_STATESET_H
+#define _ATKMM_STATESET_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _AtkStateSet AtkStateSet;
+typedef struct _AtkStateSetClass AtkStateSetClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Atk
+{ class StateSet_Class; } // namespace Atk
+namespace Atk
+{
+
+
+/** @addtogroup atkmmEnums Enums and Flags */
+
+/**
+ * @ingroup atkmmEnums
+ */
+enum StateType
+{
+ STATE_INVALID,
+ STATE_ACTIVE,
+ STATE_ARMED,
+ STATE_BUSY,
+ STATE_CHECKED,
+ STATE_DEFUNCT,
+ STATE_EDITABLE,
+ STATE_ENABLED,
+ STATE_EXPANDABLE,
+ STATE_EXPANDED,
+ STATE_FOCUSABLE,
+ STATE_FOCUSED,
+ STATE_HORIZONTAL,
+ STATE_ICONIFIED,
+ STATE_MODAL,
+ STATE_MULTI_LINE,
+ STATE_MULTISELECTABLE,
+ STATE_OPAQUE,
+ STATE_PRESSED,
+ STATE_RESIZABLE,
+ STATE_SELECTABLE,
+ STATE_SELECTED,
+ STATE_SENSITIVE,
+ STATE_SHOWING,
+ STATE_SINGLE_LINE,
+ STATE_STALE,
+ STATE_TRANSIENT,
+ STATE_VERTICAL,
+ STATE_VISIBLE,
+ STATE_MANAGES_DESCENDANTS,
+ STATE_INDETERMINATE,
+ STATE_TRUNCATED,
+ STATE_LAST_DEFINED
+};
+
+} // namespace Atk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Atk::StateType> : public Glib::Value_Enum<Atk::StateType>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Atk
+{
+
+
+/** An AtkStateSet determines a component's state set.
+ * It is composed of a set of Atk::States.
+ */
+
+class StateSet : public Glib::Object
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef StateSet CppObjectType;
+ typedef StateSet_Class CppClassType;
+ typedef AtkStateSet BaseObjectType;
+ typedef AtkStateSetClass BaseClassType;
+
+private: friend class StateSet_Class;
+ static CppClassType stateset_class_;
+
+private:
+ // noncopyable
+ StateSet(const StateSet&);
+ StateSet& operator=(const StateSet&);
+
+protected:
+ explicit StateSet(const Glib::ConstructParams& construct_params);
+ explicit StateSet(AtkStateSet* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~StateSet();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ AtkStateSet* gobj() { return reinterpret_cast<AtkStateSet*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const AtkStateSet* gobj() const { return reinterpret_cast<AtkStateSet*>(gobject_); }
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ AtkStateSet* gobj_copy();
+
+private:
+
+
+protected:
+ StateSet();
+
+public:
+
+ static Glib::RefPtr<StateSet> create();
+
+
+ /** Checks whether the state set is empty, i.e.\ has no states set.
+ * @return <tt>true</tt> if @a set has no states set, otherwise <tt>false</tt>.
+ */
+ bool is_empty() const;
+
+ //Note that we use Atk::StateType instead of StateType, because there is a Gtk::StateType too, and Doxygen gets confused.
+
+ /** Add a new state for the specified type to the current state set if
+ * it is not already present.
+ * @param type An Atk::StateType.
+ * @return <tt>true</tt> if the state for @a type is not already in @a set .
+ */
+ bool add_state(Atk::StateType type);
+ void add_states(const Glib::ArrayHandle<Atk::StateType>& types);
+
+
+ /** Removes all states from the state set.
+ */
+ void clear_states();
+
+ /** Checks whether the state for the specified type is in the specified set.
+ * @param type An Atk::StateType.
+ * @return <tt>true</tt> if @a type is the state type is in @a set .
+ */
+ bool contains_state(Atk::StateType type);
+ bool contains_states(const Glib::ArrayHandle<Atk::StateType>& types) const;
+
+
+ /** Removes the state for the specified type from the state set.
+ * @param type An Atk::Type.
+ * @return <tt>true</tt> if @a type was the state type is in @a set .
+ */
+ bool remove_state(Atk::StateType type);
+
+ /** Constructs the intersection of the two sets, returning <tt>0</tt> if the
+ * intersection is empty.
+ * @param compare_set Another Atk::StateSet.
+ * @return A new Atk::StateSet which is the intersection of the two sets.
+ */
+ Glib::RefPtr<StateSet> and_sets(const Glib::RefPtr<StateSet>& compare_set);
+
+ /** Constructs the union of the two sets.
+ * @param compare_set Another Atk::StateSet.
+ * @return A new Atk::StateSet which is the union of the two sets,
+ * returning <tt>0</tt> is empty.
+ */
+ Glib::RefPtr<StateSet> or_sets(const Glib::RefPtr<StateSet>& compare_set);
+
+ /** Constructs the exclusive-or of the two sets, returning <tt>0</tt> is empty.
+ * The set returned by this operation contains the states in exactly
+ * one of the two sets.
+ * @param compare_set Another Atk::StateSet.
+ * @return A new Atk::StateSet which contains the states which are
+ * in exactly one of the two sets.
+ */
+ Glib::RefPtr<StateSet> xor_sets(const Glib::RefPtr<StateSet>& compare_set);
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+};
+
+} // namespace Atk
+
+
+namespace Glib
+{
+ /** @relates Atk::StateSet
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Atk::StateSet> wrap(AtkStateSet* object, bool take_copy = false);
+}
+
+
+#endif /* _ATKMM_STATESET_H */
+
diff --git a/libs/gtkmm2/atk/atkmm/streamablecontent.cc b/libs/gtkmm2/atk/atkmm/streamablecontent.cc
new file mode 100644
index 0000000000..13916f861d
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/streamablecontent.cc
@@ -0,0 +1,306 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <atkmm/streamablecontent.h>
+#include <atkmm/private/streamablecontent_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 2003 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <atkmm/object.h>
+#include <atk/atkstreamablecontent.h>
+
+
+namespace Atk
+{
+
+
+} // namespace Atk
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Atk::StreamableContent> wrap(AtkStreamableContent* object, bool take_copy)
+{
+ return Glib::RefPtr<Atk::StreamableContent>( dynamic_cast<Atk::StreamableContent*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} // namespace Glib
+
+
+namespace Atk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Interface_Class& StreamableContent_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Interface_Class has to know the interface init function
+ // in order to add interfaces to implementing types.
+ class_init_func_ = &StreamableContent_Class::iface_init_function;
+
+ // We can not derive from another interface, and it is not necessary anyway.
+ gtype_ = atk_streamable_content_get_type();
+ }
+
+ return *this;
+}
+
+void StreamableContent_Class::iface_init_function(void* g_iface, void*)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_iface);
+
+ //This is just to avoid an "unused variable" warning when there are no vfuncs or signal handlers to connect.
+ //This is a temporary fix until I find out why I can not seem to derive a GtkFileChooser interface. murrayc
+ g_assert(klass != 0);
+
+ klass->get_n_mime_types = &get_n_mime_types_vfunc_callback;
+ klass->get_mime_type = &get_mime_type_vfunc_callback;
+ klass->get_stream = &get_stream_vfunc_callback;
+}
+
+int StreamableContent_Class::get_n_mime_types_vfunc_callback(AtkStreamableContent* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return obj->get_n_mime_types_vfunc();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_n_mime_types)
+ return (*base->get_n_mime_types)(self);
+ }
+
+ typedef int RType;
+ return RType();
+}
+
+const gchar* StreamableContent_Class::get_mime_type_vfunc_callback(AtkStreamableContent* self, gint i)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return obj->get_mime_type_vfunc(i
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_mime_type)
+ return (*base->get_mime_type)(self, i);
+ }
+
+ typedef const gchar* RType;
+ return RType();
+}
+
+GIOChannel* StreamableContent_Class::get_stream_vfunc_callback(AtkStreamableContent* self, const gchar* mime_type)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return obj->get_stream_vfunc(Glib::convert_const_gchar_ptr_to_ustring(mime_type)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_stream)
+ return (*base->get_stream)(self, mime_type);
+ }
+
+ typedef GIOChannel* RType;
+ return RType();
+}
+
+
+Glib::ObjectBase* StreamableContent_Class::wrap_new(GObject* object)
+{
+ return new StreamableContent((AtkStreamableContent*)(object));
+}
+
+
+/* The implementation: */
+
+StreamableContent::StreamableContent()
+:
+ Glib::Interface(streamablecontent_class_.init())
+{}
+
+StreamableContent::StreamableContent(AtkStreamableContent* castitem)
+:
+ Glib::Interface((GObject*)(castitem))
+{}
+
+StreamableContent::~StreamableContent()
+{}
+
+// static
+void StreamableContent::add_interface(GType gtype_implementer)
+{
+ streamablecontent_class_.init().add_interface(gtype_implementer);
+}
+
+StreamableContent::CppClassType StreamableContent::streamablecontent_class_; // initialize static member
+
+GType StreamableContent::get_type()
+{
+ return streamablecontent_class_.init().get_type();
+}
+
+GType StreamableContent::get_base_type()
+{
+ return atk_streamable_content_get_type();
+}
+
+
+int StreamableContent::get_n_mime_types() const
+{
+ return atk_streamable_content_get_n_mime_types(const_cast<AtkStreamableContent*>(gobj()));
+}
+
+Glib::ustring StreamableContent::get_mime_type(int i) const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(atk_streamable_content_get_mime_type(const_cast<AtkStreamableContent*>(gobj()), i));
+}
+
+Glib::RefPtr<Glib::IOChannel> StreamableContent::get_stream(const Glib::ustring& mime_type)
+{
+ return Glib::wrap(atk_streamable_content_get_stream(gobj(), mime_type.c_str()));
+}
+
+
+int Atk::StreamableContent::get_n_mime_types_vfunc() const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_n_mime_types)
+ return (*base->get_n_mime_types)(const_cast<AtkStreamableContent*>(gobj()));
+
+ typedef int RType;
+ return RType();
+}
+
+const gchar* Atk::StreamableContent::get_mime_type_vfunc(int i) const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_mime_type)
+ return (*base->get_mime_type)(const_cast<AtkStreamableContent*>(gobj()),i);
+
+ typedef const gchar* RType;
+ return RType();
+}
+
+GIOChannel* Atk::StreamableContent::get_stream_vfunc(const Glib::ustring& mime_type)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_stream)
+ return (*base->get_stream)(gobj(),mime_type.c_str());
+
+ typedef GIOChannel* RType;
+ return RType();
+}
+
+
+} // namespace Atk
+
+
diff --git a/libs/gtkmm2/atk/atkmm/streamablecontent.h b/libs/gtkmm2/atk/atkmm/streamablecontent.h
new file mode 100644
index 0000000000..698aaef86b
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/streamablecontent.h
@@ -0,0 +1,153 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _ATKMM_STREAMABLECONTENT_H
+#define _ATKMM_STREAMABLECONTENT_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 2003 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C"
+{
+ typedef struct _AtkStreamableContentIface AtkStreamableContentIface;
+ typedef struct _AtkStreamableContent AtkStreamableContent;
+}
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _AtkStreamableContent AtkStreamableContent;
+typedef struct _AtkStreamableContentClass AtkStreamableContentClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Atk
+{ class StreamableContent_Class; } // namespace Atk
+namespace Atk
+{
+
+class Object;
+
+/** The ATK interface which provides access to streamable content.
+ */
+
+class StreamableContent : public Glib::Interface
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef StreamableContent CppObjectType;
+ typedef StreamableContent_Class CppClassType;
+ typedef AtkStreamableContent BaseObjectType;
+ typedef AtkStreamableContentIface BaseClassType;
+
+private:
+ friend class StreamableContent_Class;
+ static CppClassType streamablecontent_class_;
+
+ // noncopyable
+ StreamableContent(const StreamableContent&);
+ StreamableContent& operator=(const StreamableContent&);
+
+protected:
+ StreamableContent(); // you must derive from this class
+ explicit StreamableContent(AtkStreamableContent* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~StreamableContent();
+
+ static void add_interface(GType gtype_implementer);
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ AtkStreamableContent* gobj() { return reinterpret_cast<AtkStreamableContent*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const AtkStreamableContent* gobj() const { return reinterpret_cast<AtkStreamableContent*>(gobject_); }
+
+private:
+
+public:
+
+
+ /** Gets the number of mime types supported by this object.
+ * @return A <tt>int</tt> which is the number of mime types supported by the object.
+ */
+ int get_n_mime_types() const;
+
+ /** Gets the character string of the specified mime type. The first mime
+ * type is at position 0, the second at position 1, and so on.
+ * @param i A <tt>int</tt> representing the position of the mime type starting from 0.
+ * @return : a gchar* representing the specified mime type; the caller
+ * should not free the character string.
+ */
+ Glib::ustring get_mime_type(int i) const;
+
+ /** Gets the content in the specified mime type.
+ * @param mime_type A gchar* representing the mime type.
+ * @return A G::IOChannel which contains the content in the specified mime
+ * type.
+ */
+ Glib::RefPtr<Glib::IOChannel> get_stream(const Glib::ustring& mime_type);
+
+protected:
+ virtual int get_n_mime_types_vfunc() const;
+ virtual const gchar* get_mime_type_vfunc(int i) const;
+ virtual GIOChannel* get_stream_vfunc(const Glib::ustring& mime_type);
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+};
+
+} // namespace Atk
+
+
+namespace Glib
+{
+ /** @relates Atk::StreamableContent
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Atk::StreamableContent> wrap(AtkStreamableContent* object, bool take_copy = false);
+
+} // namespace Glib
+
+#endif /* _ATKMM_STREAMABLECONTENT_H */
+
diff --git a/libs/gtkmm2/atk/atkmm/table.cc b/libs/gtkmm2/atk/atkmm/table.cc
new file mode 100644
index 0000000000..335fb55ece
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/table.cc
@@ -0,0 +1,2394 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <atkmm/table.h>
+#include <atkmm/private/table_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <atkmm/object.h>
+#include <atk/atktable.h>
+
+
+namespace Atk
+{
+
+Glib::ArrayHandle<int> Table::get_selected_columns() const
+{
+ int* selected = 0;
+ const int n_selected = atk_table_get_selected_columns(const_cast<AtkTable*>(gobj()), &selected);
+
+ return Glib::ArrayHandle<int>(selected, n_selected, Glib::OWNERSHIP_SHALLOW);
+}
+
+Glib::ArrayHandle<int> Table::get_selected_rows() const
+{
+ int* selected = 0;
+ const int n_selected = atk_table_get_selected_rows(const_cast<AtkTable*>(gobj()), &selected);
+
+ return Glib::ArrayHandle<int>(selected, n_selected, Glib::OWNERSHIP_SHALLOW);
+}
+
+} // namespace Atk
+
+
+namespace
+{
+
+void Table_signal_row_inserted_callback(AtkTable* self, gint p0,gint p1,void* data)
+{
+ using namespace Atk;
+ typedef sigc::slot< void,int,int > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(p0
+, p1
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo Table_signal_row_inserted_info =
+{
+ "row_inserted",
+ (GCallback) &Table_signal_row_inserted_callback,
+ (GCallback) &Table_signal_row_inserted_callback
+};
+
+
+void Table_signal_column_inserted_callback(AtkTable* self, gint p0,gint p1,void* data)
+{
+ using namespace Atk;
+ typedef sigc::slot< void,int,int > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(p0
+, p1
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo Table_signal_column_inserted_info =
+{
+ "column_inserted",
+ (GCallback) &Table_signal_column_inserted_callback,
+ (GCallback) &Table_signal_column_inserted_callback
+};
+
+
+void Table_signal_row_deleted_callback(AtkTable* self, gint p0,gint p1,void* data)
+{
+ using namespace Atk;
+ typedef sigc::slot< void,int,int > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(p0
+, p1
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo Table_signal_row_deleted_info =
+{
+ "row_deleted",
+ (GCallback) &Table_signal_row_deleted_callback,
+ (GCallback) &Table_signal_row_deleted_callback
+};
+
+
+void Table_signal_column_deleted_callback(AtkTable* self, gint p0,gint p1,void* data)
+{
+ using namespace Atk;
+ typedef sigc::slot< void,int,int > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(p0
+, p1
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo Table_signal_column_deleted_info =
+{
+ "column_deleted",
+ (GCallback) &Table_signal_column_deleted_callback,
+ (GCallback) &Table_signal_column_deleted_callback
+};
+
+
+const Glib::SignalProxyInfo Table_signal_row_reordered_info =
+{
+ "row_reordered",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+
+const Glib::SignalProxyInfo Table_signal_column_reordered_info =
+{
+ "column_reordered",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+
+const Glib::SignalProxyInfo Table_signal_model_changed_info =
+{
+ "model_changed",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Atk::Table> wrap(AtkTable* object, bool take_copy)
+{
+ return Glib::RefPtr<Atk::Table>( dynamic_cast<Atk::Table*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} // namespace Glib
+
+
+namespace Atk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Interface_Class& Table_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Interface_Class has to know the interface init function
+ // in order to add interfaces to implementing types.
+ class_init_func_ = &Table_Class::iface_init_function;
+
+ // We can not derive from another interface, and it is not necessary anyway.
+ gtype_ = atk_table_get_type();
+ }
+
+ return *this;
+}
+
+void Table_Class::iface_init_function(void* g_iface, void*)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_iface);
+
+ //This is just to avoid an "unused variable" warning when there are no vfuncs or signal handlers to connect.
+ //This is a temporary fix until I find out why I can not seem to derive a GtkFileChooser interface. murrayc
+ g_assert(klass != 0);
+
+ klass->ref_at = &ref_at_vfunc_callback;
+ klass->get_index_at = &get_index_at_vfunc_callback;
+ klass->get_column_at_index = &get_column_at_index_vfunc_callback;
+ klass->get_row_at_index = &get_row_at_index_vfunc_callback;
+ klass->get_n_columns = &get_n_columns_vfunc_callback;
+ klass->get_n_rows = &get_n_rows_vfunc_callback;
+ klass->get_column_extent_at = &get_column_extent_at_vfunc_callback;
+ klass->get_row_extent_at = &get_row_extent_at_vfunc_callback;
+ klass->get_caption = &get_caption_vfunc_callback;
+ klass->get_column_description = &get_column_description_vfunc_callback;
+ klass->get_column_header = &get_column_header_vfunc_callback;
+ klass->get_row_description = &get_row_description_vfunc_callback;
+ klass->get_row_header = &get_row_header_vfunc_callback;
+ klass->get_summary = &get_summary_vfunc_callback;
+ klass->set_caption = &set_caption_vfunc_callback;
+ klass->set_column_description = &set_column_description_vfunc_callback;
+ klass->set_column_header = &set_column_header_vfunc_callback;
+ klass->set_row_description = &set_row_description_vfunc_callback;
+ klass->set_row_header = &set_row_header_vfunc_callback;
+ klass->set_summary = &set_summary_vfunc_callback;
+ klass->is_column_selected = &is_column_selected_vfunc_callback;
+ klass->is_row_selected = &is_row_selected_vfunc_callback;
+ klass->is_selected = &is_selected_vfunc_callback;
+ klass->add_row_selection = &add_row_selection_vfunc_callback;
+ klass->remove_row_selection = &remove_row_selection_vfunc_callback;
+ klass->add_column_selection = &add_column_selection_vfunc_callback;
+ klass->remove_column_selection = &remove_column_selection_vfunc_callback;
+ klass->get_selected_columns = &get_selected_columns_vfunc_callback;
+ klass->get_selected_rows = &get_selected_rows_vfunc_callback;
+ klass->row_inserted = &row_inserted_callback;
+ klass->column_inserted = &column_inserted_callback;
+ klass->row_deleted = &row_deleted_callback;
+ klass->column_deleted = &column_deleted_callback;
+ klass->row_reordered = &row_reordered_callback;
+ klass->column_reordered = &column_reordered_callback;
+ klass->model_changed = &model_changed_callback;
+}
+
+AtkObject* Table_Class::ref_at_vfunc_callback(AtkTable* self, gint row, gint column)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return Glib::unwrap_copy(obj->get_at_vfunc(row
+, column
+));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->ref_at)
+ return (*base->ref_at)(self, row, column);
+ }
+
+ typedef AtkObject* RType;
+ return RType();
+}
+
+gint Table_Class::get_index_at_vfunc_callback(AtkTable* self, gint row, gint column)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return obj->get_index_at_vfunc(row
+, column
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_index_at)
+ return (*base->get_index_at)(self, row, column);
+ }
+
+ typedef gint RType;
+ return RType();
+}
+
+gint Table_Class::get_column_at_index_vfunc_callback(AtkTable* self, gint index_)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return obj->get_column_at_index_vfunc(index_
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_column_at_index)
+ return (*base->get_column_at_index)(self, index_);
+ }
+
+ typedef gint RType;
+ return RType();
+}
+
+gint Table_Class::get_row_at_index_vfunc_callback(AtkTable* self, gint index_)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return obj->get_row_at_index_vfunc(index_
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_row_at_index)
+ return (*base->get_row_at_index)(self, index_);
+ }
+
+ typedef gint RType;
+ return RType();
+}
+
+gint Table_Class::get_n_columns_vfunc_callback(AtkTable* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return obj->get_n_columns_vfunc();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_n_columns)
+ return (*base->get_n_columns)(self);
+ }
+
+ typedef gint RType;
+ return RType();
+}
+
+gint Table_Class::get_n_rows_vfunc_callback(AtkTable* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return obj->get_n_rows_vfunc();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_n_rows)
+ return (*base->get_n_rows)(self);
+ }
+
+ typedef gint RType;
+ return RType();
+}
+
+gint Table_Class::get_column_extent_at_vfunc_callback(AtkTable* self, gint row, gint column)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return obj->get_column_extent_at_vfunc(row
+, column
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_column_extent_at)
+ return (*base->get_column_extent_at)(self, row, column);
+ }
+
+ typedef gint RType;
+ return RType();
+}
+
+gint Table_Class::get_row_extent_at_vfunc_callback(AtkTable* self, gint row, gint column)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return obj->get_row_extent_at_vfunc(row
+, column
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_row_extent_at)
+ return (*base->get_row_extent_at)(self, row, column);
+ }
+
+ typedef gint RType;
+ return RType();
+}
+
+AtkObject* Table_Class::get_caption_vfunc_callback(AtkTable* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return Glib::unwrap(obj->get_caption_vfunc());
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_caption)
+ return (*base->get_caption)(self);
+ }
+
+ typedef AtkObject* RType;
+ return RType();
+}
+
+const gchar* Table_Class::get_column_description_vfunc_callback(AtkTable* self, gint column)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return obj->get_column_description_vfunc(column
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_column_description)
+ return (*base->get_column_description)(self, column);
+ }
+
+ typedef const gchar* RType;
+ return RType();
+}
+
+AtkObject* Table_Class::get_column_header_vfunc_callback(AtkTable* self, gint column)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return Glib::unwrap(obj->get_column_header_vfunc(column
+));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_column_header)
+ return (*base->get_column_header)(self, column);
+ }
+
+ typedef AtkObject* RType;
+ return RType();
+}
+
+const gchar* Table_Class::get_row_description_vfunc_callback(AtkTable* self, gint row)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return obj->get_row_description_vfunc(row
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_row_description)
+ return (*base->get_row_description)(self, row);
+ }
+
+ typedef const gchar* RType;
+ return RType();
+}
+
+AtkObject* Table_Class::get_row_header_vfunc_callback(AtkTable* self, gint row)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return Glib::unwrap(obj->get_row_header_vfunc(row
+));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_row_header)
+ return (*base->get_row_header)(self, row);
+ }
+
+ typedef AtkObject* RType;
+ return RType();
+}
+
+AtkObject* Table_Class::get_summary_vfunc_callback(AtkTable* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return Glib::unwrap(obj->get_summary_vfunc());
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_summary)
+ return (*base->get_summary)(self);
+ }
+
+ typedef AtkObject* RType;
+ return RType();
+}
+
+void Table_Class::set_caption_vfunc_callback(AtkTable* self, AtkObject* caption)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->set_caption_vfunc(Glib::wrap(caption, true)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->set_caption)
+ (*base->set_caption)(self, caption);
+ }
+}
+
+void Table_Class::set_column_description_vfunc_callback(AtkTable* self, gint column, const gchar* description)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->set_column_description_vfunc(column
+, description
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->set_column_description)
+ (*base->set_column_description)(self, column, description);
+ }
+}
+
+void Table_Class::set_column_header_vfunc_callback(AtkTable* self, gint column, AtkObject* header)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->set_column_header_vfunc(column
+, Glib::wrap(header, true)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->set_column_header)
+ (*base->set_column_header)(self, column, header);
+ }
+}
+
+void Table_Class::set_row_description_vfunc_callback(AtkTable* self, gint row, const gchar* description)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->set_row_description_vfunc(row
+, description
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->set_row_description)
+ (*base->set_row_description)(self, row, description);
+ }
+}
+
+void Table_Class::set_row_header_vfunc_callback(AtkTable* self, gint row, AtkObject* header)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->set_row_header_vfunc(row
+, Glib::wrap(header, true)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->set_row_header)
+ (*base->set_row_header)(self, row, header);
+ }
+}
+
+void Table_Class::set_summary_vfunc_callback(AtkTable* self, AtkObject* accessible)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->set_summary_vfunc(Glib::wrap(accessible, true)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->set_summary)
+ (*base->set_summary)(self, accessible);
+ }
+}
+
+gboolean Table_Class::is_column_selected_vfunc_callback(AtkTable* self, gint column)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->is_column_selected_vfunc(column
+));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->is_column_selected)
+ return (*base->is_column_selected)(self, column);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Table_Class::is_row_selected_vfunc_callback(AtkTable* self, gint row)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->is_row_selected_vfunc(row
+));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->is_row_selected)
+ return (*base->is_row_selected)(self, row);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Table_Class::is_selected_vfunc_callback(AtkTable* self, gint row, gint column)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->is_selected_vfunc(row
+, column
+));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->is_selected)
+ return (*base->is_selected)(self, row, column);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Table_Class::add_row_selection_vfunc_callback(AtkTable* self, gint row)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->add_row_selection_vfunc(row
+));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->add_row_selection)
+ return (*base->add_row_selection)(self, row);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Table_Class::remove_row_selection_vfunc_callback(AtkTable* self, gint row)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->remove_row_selection_vfunc(row
+));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->remove_row_selection)
+ return (*base->remove_row_selection)(self, row);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Table_Class::add_column_selection_vfunc_callback(AtkTable* self, gint column)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->add_column_selection_vfunc(column
+));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->add_column_selection)
+ return (*base->add_column_selection)(self, column);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Table_Class::remove_column_selection_vfunc_callback(AtkTable* self, gint column)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->remove_column_selection_vfunc(column
+));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->remove_column_selection)
+ return (*base->remove_column_selection)(self, column);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gint Table_Class::get_selected_columns_vfunc_callback(AtkTable* self, gint** selected)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return obj->get_selected_columns_vfunc(selected
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_selected_columns)
+ return (*base->get_selected_columns)(self, selected);
+ }
+
+ typedef gint RType;
+ return RType();
+}
+
+gint Table_Class::get_selected_rows_vfunc_callback(AtkTable* self, gint** selected)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return obj->get_selected_rows_vfunc(selected
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_selected_rows)
+ return (*base->get_selected_rows)(self, selected);
+ }
+
+ typedef gint RType;
+ return RType();
+}
+
+
+void Table_Class::row_inserted_callback(AtkTable* self, gint p0, gint p1)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_row_inserted(p0
+, p1
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->row_inserted)
+ (*base->row_inserted)(self, p0, p1);
+ }
+}
+
+void Table_Class::column_inserted_callback(AtkTable* self, gint p0, gint p1)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_column_inserted(p0
+, p1
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->column_inserted)
+ (*base->column_inserted)(self, p0, p1);
+ }
+}
+
+void Table_Class::row_deleted_callback(AtkTable* self, gint p0, gint p1)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_row_deleted(p0
+, p1
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->row_deleted)
+ (*base->row_deleted)(self, p0, p1);
+ }
+}
+
+void Table_Class::column_deleted_callback(AtkTable* self, gint p0, gint p1)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_column_deleted(p0
+, p1
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->column_deleted)
+ (*base->column_deleted)(self, p0, p1);
+ }
+}
+
+void Table_Class::row_reordered_callback(AtkTable* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_row_reordered();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->row_reordered)
+ (*base->row_reordered)(self);
+ }
+}
+
+void Table_Class::column_reordered_callback(AtkTable* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_column_reordered();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->column_reordered)
+ (*base->column_reordered)(self);
+ }
+}
+
+void Table_Class::model_changed_callback(AtkTable* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_model_changed();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->model_changed)
+ (*base->model_changed)(self);
+ }
+}
+
+
+Glib::ObjectBase* Table_Class::wrap_new(GObject* object)
+{
+ return new Table((AtkTable*)(object));
+}
+
+
+/* The implementation: */
+
+Table::Table()
+:
+ Glib::Interface(table_class_.init())
+{}
+
+Table::Table(AtkTable* castitem)
+:
+ Glib::Interface((GObject*)(castitem))
+{}
+
+Table::~Table()
+{}
+
+// static
+void Table::add_interface(GType gtype_implementer)
+{
+ table_class_.init().add_interface(gtype_implementer);
+}
+
+Table::CppClassType Table::table_class_; // initialize static member
+
+GType Table::get_type()
+{
+ return table_class_.init().get_type();
+}
+
+GType Table::get_base_type()
+{
+ return atk_table_get_type();
+}
+
+
+Glib::RefPtr<Atk::Object> Table::get_at(int row, int column)
+{
+ return Glib::wrap(atk_table_ref_at(gobj(), row, column));
+}
+
+int Table::get_index_at(int row, int column) const
+{
+ return atk_table_get_index_at(const_cast<AtkTable*>(gobj()), row, column);
+}
+
+int Table::get_column_at_index(int index) const
+{
+ return atk_table_get_column_at_index(const_cast<AtkTable*>(gobj()), index);
+}
+
+int Table::get_row_at_index(int index) const
+{
+ return atk_table_get_row_at_index(const_cast<AtkTable*>(gobj()), index);
+}
+
+int Table::get_n_columns() const
+{
+ return atk_table_get_n_columns(const_cast<AtkTable*>(gobj()));
+}
+
+int Table::get_n_rows() const
+{
+ return atk_table_get_n_rows(const_cast<AtkTable*>(gobj()));
+}
+
+int Table::get_column_extent_at(int row, int column) const
+{
+ return atk_table_get_column_extent_at(const_cast<AtkTable*>(gobj()), row, column);
+}
+
+int Table::get_row_extent_at(int row, int column) const
+{
+ return atk_table_get_row_extent_at(const_cast<AtkTable*>(gobj()), row, column);
+}
+
+Glib::RefPtr<Atk::Object> Table::get_caption()
+{
+
+ Glib::RefPtr<Atk::Object> retvalue = Glib::wrap(atk_table_get_caption(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const Atk::Object> Table::get_caption() const
+{
+
+ Glib::RefPtr<const Atk::Object> retvalue = Glib::wrap(atk_table_get_caption(const_cast<AtkTable*>(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::ustring Table::get_column_description(int column) const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(atk_table_get_column_description(const_cast<AtkTable*>(gobj()), column));
+}
+
+Glib::RefPtr<Atk::Object> Table::get_column_header(int column)
+{
+
+ Glib::RefPtr<Atk::Object> retvalue = Glib::wrap(atk_table_get_column_header(gobj(), column));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const Atk::Object> Table::get_column_header(int column) const
+{
+
+ Glib::RefPtr<const Atk::Object> retvalue = Glib::wrap(atk_table_get_column_header(const_cast<AtkTable*>(gobj()), column));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::ustring Table::get_row_description(int row) const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(atk_table_get_row_description(const_cast<AtkTable*>(gobj()), row));
+}
+
+Glib::RefPtr<Atk::Object> Table::get_row_header(int row)
+{
+
+ Glib::RefPtr<Atk::Object> retvalue = Glib::wrap(atk_table_get_row_header(gobj(), row));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const Atk::Object> Table::get_row_header(int row) const
+{
+
+ Glib::RefPtr<const Atk::Object> retvalue = Glib::wrap(atk_table_get_row_header(const_cast<AtkTable*>(gobj()), row));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<Atk::Object> Table::get_summary()
+{
+
+ Glib::RefPtr<Atk::Object> retvalue = Glib::wrap(atk_table_get_summary(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const Atk::Object> Table::get_summary() const
+{
+
+ Glib::RefPtr<const Atk::Object> retvalue = Glib::wrap(atk_table_get_summary(const_cast<AtkTable*>(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+void Table::set_caption(const Glib::RefPtr<Atk::Object>& caption)
+{
+ atk_table_set_caption(gobj(), Glib::unwrap(caption));
+}
+
+void Table::set_column_description(int column, const Glib::ustring& description)
+{
+ atk_table_set_column_description(gobj(), column, description.c_str());
+}
+
+void Table::set_column_header(int column, const Glib::RefPtr<Atk::Object>& header)
+{
+ atk_table_set_column_header(gobj(), column, Glib::unwrap(header));
+}
+
+void Table::set_row_description(int row, const Glib::ustring& description)
+{
+ atk_table_set_row_description(gobj(), row, description.c_str());
+}
+
+void Table::set_row_header(int row, const Glib::RefPtr<Atk::Object>& header)
+{
+ atk_table_set_row_header(gobj(), row, Glib::unwrap(header));
+}
+
+void Table::set_summary(const Glib::RefPtr<Atk::Object>& accessible)
+{
+ atk_table_set_summary(gobj(), Glib::unwrap(accessible));
+}
+
+bool Table::is_column_selected(int column) const
+{
+ return atk_table_is_column_selected(const_cast<AtkTable*>(gobj()), column);
+}
+
+bool Table::is_row_selected(int row) const
+{
+ return atk_table_is_row_selected(const_cast<AtkTable*>(gobj()), row);
+}
+
+bool Table::is_selected(int row, int column) const
+{
+ return atk_table_is_selected(const_cast<AtkTable*>(gobj()), row, column);
+}
+
+bool Table::add_row_selection(int row)
+{
+ return atk_table_add_row_selection(gobj(), row);
+}
+
+bool Table::remove_row_selection(int row)
+{
+ return atk_table_remove_row_selection(gobj(), row);
+}
+
+bool Table::add_column_selection(int column)
+{
+ return atk_table_add_column_selection(gobj(), column);
+}
+
+bool Table::remove_column_selection(int column)
+{
+ return atk_table_remove_column_selection(gobj(), column);
+}
+
+
+Glib::SignalProxy2< void,int,int > Table::signal_row_inserted()
+{
+ return Glib::SignalProxy2< void,int,int >(this, &Table_signal_row_inserted_info);
+}
+
+Glib::SignalProxy2< void,int,int > Table::signal_column_inserted()
+{
+ return Glib::SignalProxy2< void,int,int >(this, &Table_signal_column_inserted_info);
+}
+
+Glib::SignalProxy2< void,int,int > Table::signal_row_deleted()
+{
+ return Glib::SignalProxy2< void,int,int >(this, &Table_signal_row_deleted_info);
+}
+
+Glib::SignalProxy2< void,int,int > Table::signal_column_deleted()
+{
+ return Glib::SignalProxy2< void,int,int >(this, &Table_signal_column_deleted_info);
+}
+
+Glib::SignalProxy0< void > Table::signal_row_reordered()
+{
+ return Glib::SignalProxy0< void >(this, &Table_signal_row_reordered_info);
+}
+
+Glib::SignalProxy0< void > Table::signal_column_reordered()
+{
+ return Glib::SignalProxy0< void >(this, &Table_signal_column_reordered_info);
+}
+
+Glib::SignalProxy0< void > Table::signal_model_changed()
+{
+ return Glib::SignalProxy0< void >(this, &Table_signal_model_changed_info);
+}
+
+
+void Atk::Table::on_row_inserted(int row, int num_inserted)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->row_inserted)
+ (*base->row_inserted)(gobj(),row,num_inserted);
+}
+
+void Atk::Table::on_column_inserted(int column, int num_inserted)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->column_inserted)
+ (*base->column_inserted)(gobj(),column,num_inserted);
+}
+
+void Atk::Table::on_row_deleted(int row, int num_deleted)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->row_deleted)
+ (*base->row_deleted)(gobj(),row,num_deleted);
+}
+
+void Atk::Table::on_column_deleted(int column, int num_deleted)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->column_deleted)
+ (*base->column_deleted)(gobj(),column,num_deleted);
+}
+
+void Atk::Table::on_row_reordered()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->row_reordered)
+ (*base->row_reordered)(gobj());
+}
+
+void Atk::Table::on_column_reordered()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->column_reordered)
+ (*base->column_reordered)(gobj());
+}
+
+void Atk::Table::on_model_changed()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->model_changed)
+ (*base->model_changed)(gobj());
+}
+
+
+Glib::RefPtr<Atk::Object> Atk::Table::get_at_vfunc(int row, int column)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->ref_at)
+ return Glib::wrap((*base->ref_at)(gobj(),row,column));
+
+ typedef Glib::RefPtr<Atk::Object> RType;
+ return RType();
+}
+
+int Atk::Table::get_index_at_vfunc(int row, int column) const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_index_at)
+ return (*base->get_index_at)(const_cast<AtkTable*>(gobj()),row,column);
+
+ typedef int RType;
+ return RType();
+}
+
+int Atk::Table::get_column_at_index_vfunc(int index) const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_column_at_index)
+ return (*base->get_column_at_index)(const_cast<AtkTable*>(gobj()),index);
+
+ typedef int RType;
+ return RType();
+}
+
+int Atk::Table::get_row_at_index_vfunc(int index) const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_row_at_index)
+ return (*base->get_row_at_index)(const_cast<AtkTable*>(gobj()),index);
+
+ typedef int RType;
+ return RType();
+}
+
+int Atk::Table::get_n_columns_vfunc() const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_n_columns)
+ return (*base->get_n_columns)(const_cast<AtkTable*>(gobj()));
+
+ typedef int RType;
+ return RType();
+}
+
+int Atk::Table::get_n_rows_vfunc() const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_n_rows)
+ return (*base->get_n_rows)(const_cast<AtkTable*>(gobj()));
+
+ typedef int RType;
+ return RType();
+}
+
+int Atk::Table::get_column_extent_at_vfunc(int row, int column) const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_column_extent_at)
+ return (*base->get_column_extent_at)(const_cast<AtkTable*>(gobj()),row,column);
+
+ typedef int RType;
+ return RType();
+}
+
+int Atk::Table::get_row_extent_at_vfunc(int row, int column) const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_row_extent_at)
+ return (*base->get_row_extent_at)(const_cast<AtkTable*>(gobj()),row,column);
+
+ typedef int RType;
+ return RType();
+}
+
+Glib::RefPtr<Atk::Object> Atk::Table::get_caption_vfunc()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_caption)
+ return Glib::wrap((*base->get_caption)(gobj()));
+
+ typedef Glib::RefPtr<Atk::Object> RType;
+ return RType();
+}
+
+const char* Atk::Table::get_column_description_vfunc(int column) const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_column_description)
+ return (*base->get_column_description)(const_cast<AtkTable*>(gobj()),column);
+
+ typedef const char* RType;
+ return RType();
+}
+
+Glib::RefPtr<Atk::Object> Atk::Table::get_column_header_vfunc(int column)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_column_header)
+ return Glib::wrap((*base->get_column_header)(gobj(),column));
+
+ typedef Glib::RefPtr<Atk::Object> RType;
+ return RType();
+}
+
+const char* Atk::Table::get_row_description_vfunc(int row) const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_row_description)
+ return (*base->get_row_description)(const_cast<AtkTable*>(gobj()),row);
+
+ typedef const char* RType;
+ return RType();
+}
+
+Glib::RefPtr<Atk::Object> Atk::Table::get_row_header_vfunc(int row)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_row_header)
+ return Glib::wrap((*base->get_row_header)(gobj(),row));
+
+ typedef Glib::RefPtr<Atk::Object> RType;
+ return RType();
+}
+
+Glib::RefPtr<Atk::Object> Atk::Table::get_summary_vfunc()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_summary)
+ return Glib::wrap((*base->get_summary)(gobj()));
+
+ typedef Glib::RefPtr<Atk::Object> RType;
+ return RType();
+}
+
+void Atk::Table::set_caption_vfunc(const Glib::RefPtr<Atk::Object>& caption)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->set_caption)
+ (*base->set_caption)(gobj(),Glib::unwrap(caption));
+}
+
+void Atk::Table::set_column_description_vfunc(int column, const char* description)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->set_column_description)
+ (*base->set_column_description)(gobj(),column,description);
+}
+
+void Atk::Table::set_column_header_vfunc(int column, const Glib::RefPtr<Atk::Object>& header)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->set_column_header)
+ (*base->set_column_header)(gobj(),column,Glib::unwrap(header));
+}
+
+void Atk::Table::set_row_description_vfunc(int row, const char* description)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->set_row_description)
+ (*base->set_row_description)(gobj(),row,description);
+}
+
+void Atk::Table::set_row_header_vfunc(int row, const Glib::RefPtr<Atk::Object>& header)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->set_row_header)
+ (*base->set_row_header)(gobj(),row,Glib::unwrap(header));
+}
+
+void Atk::Table::set_summary_vfunc(const Glib::RefPtr<Atk::Object>& accessible)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->set_summary)
+ (*base->set_summary)(gobj(),Glib::unwrap(accessible));
+}
+
+bool Atk::Table::is_column_selected_vfunc(int column) const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->is_column_selected)
+ return (*base->is_column_selected)(const_cast<AtkTable*>(gobj()),column);
+
+ typedef bool RType;
+ return RType();
+}
+
+bool Atk::Table::is_row_selected_vfunc(int row) const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->is_row_selected)
+ return (*base->is_row_selected)(const_cast<AtkTable*>(gobj()),row);
+
+ typedef bool RType;
+ return RType();
+}
+
+bool Atk::Table::is_selected_vfunc(int row, int column) const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->is_selected)
+ return (*base->is_selected)(const_cast<AtkTable*>(gobj()),row,column);
+
+ typedef bool RType;
+ return RType();
+}
+
+bool Atk::Table::add_row_selection_vfunc(int row)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->add_row_selection)
+ return (*base->add_row_selection)(gobj(),row);
+
+ typedef bool RType;
+ return RType();
+}
+
+bool Atk::Table::remove_row_selection_vfunc(int row)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->remove_row_selection)
+ return (*base->remove_row_selection)(gobj(),row);
+
+ typedef bool RType;
+ return RType();
+}
+
+bool Atk::Table::add_column_selection_vfunc(int column)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->add_column_selection)
+ return (*base->add_column_selection)(gobj(),column);
+
+ typedef bool RType;
+ return RType();
+}
+
+bool Atk::Table::remove_column_selection_vfunc(int column)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->remove_column_selection)
+ return (*base->remove_column_selection)(gobj(),column);
+
+ typedef bool RType;
+ return RType();
+}
+
+int Atk::Table::get_selected_columns_vfunc(int** selected) const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_selected_columns)
+ return (*base->get_selected_columns)(const_cast<AtkTable*>(gobj()),selected);
+
+ typedef int RType;
+ return RType();
+}
+
+int Atk::Table::get_selected_rows_vfunc(int** selected) const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_selected_rows)
+ return (*base->get_selected_rows)(const_cast<AtkTable*>(gobj()),selected);
+
+ typedef int RType;
+ return RType();
+}
+
+
+} // namespace Atk
+
+
diff --git a/libs/gtkmm2/atk/atkmm/table.h b/libs/gtkmm2/atk/atkmm/table.h
new file mode 100644
index 0000000000..f1936afd49
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/table.h
@@ -0,0 +1,427 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _ATKMM_TABLE_H
+#define _ATKMM_TABLE_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C"
+{
+ typedef struct _AtkTableIface AtkTableIface;
+ typedef struct _AtkTable AtkTable;
+}
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _AtkTable AtkTable;
+typedef struct _AtkTableClass AtkTableClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Atk
+{ class Table_Class; } // namespace Atk
+namespace Atk
+{
+
+class Object;
+
+/** The ATK interface implemented for UI components which contain tabular or row/column information.
+ * This should be implemented by components which present elements ordered via rows and columns. It may also be used to
+ * present tree-structured information if the nodes of the trees can be said to contain multiple "columns". Individual
+ * elements of an Atk::Table are typically referred to as "cells", and these cells are exposed by Atk::Table as child
+ * Atk::Objects of the Atk::Table. Both row/column and child-index-based access to these children is provided.
+ *
+ * Children of Atk::Table are frequently "lightweight" objects, that is, they may not have backing widgets in the host UI
+ * toolkit. They are therefore often transient.
+ *
+ * Since tables are often very complex, Atk::Table includes provision for offering simplified summary information, as
+ * well as row and column headers and captions. Headers and captions are AtkObjects which may implement other interfaces
+ * (Atk::Text, Atk::Image, etc.) as appropriate. Atk::Table summaries may themselves be (simplified) Atk::Tables, etc.
+ */
+
+class Table : public Glib::Interface
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef Table CppObjectType;
+ typedef Table_Class CppClassType;
+ typedef AtkTable BaseObjectType;
+ typedef AtkTableIface BaseClassType;
+
+private:
+ friend class Table_Class;
+ static CppClassType table_class_;
+
+ // noncopyable
+ Table(const Table&);
+ Table& operator=(const Table&);
+
+protected:
+ Table(); // you must derive from this class
+ explicit Table(AtkTable* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~Table();
+
+ static void add_interface(GType gtype_implementer);
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ AtkTable* gobj() { return reinterpret_cast<AtkTable*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const AtkTable* gobj() const { return reinterpret_cast<AtkTable*>(gobject_); }
+
+private:
+
+
+public:
+
+ /** Get a reference to the table cell at @a row , @a column .
+ * @param row A <tt>int</tt> representing a row in @a table .
+ * @param column A <tt>int</tt> representing a column in @a table .
+ * @return A AtkObject* representing the referred to accessible.
+ */
+ Glib::RefPtr<Atk::Object> get_at(int row, int column);
+
+ /** Gets a <tt>int</tt> representing the index at the specified @a row and @a column .
+ * The value -1 is returned if the object at row,column is not a child
+ * of table or table does not implement this interface.
+ * @param row A <tt>int</tt> representing a row in @a table .
+ * @param column A <tt>int</tt> representing a column in @a table .
+ * @return A <tt>int</tt> representing the index at specified position.
+ */
+ int get_index_at(int row, int column) const;
+
+ /** Gets a <tt>int</tt> representing the column at the specified @a index , or -1
+ * if the table does not implement this interface
+ * @param index A <tt>int</tt> representing an index in @a table .
+ * @return A <tt>int</tt> representing the column at the specified index.
+ */
+ int get_column_at_index(int index) const;
+
+ /** Gets a <tt>int</tt> representing the row at the specified @a index , or -1
+ * if the table does not implement this interface
+ * @param index A <tt>int</tt> representing an index in @a table .
+ * @return A <tt>int</tt> representing the row at the specified index.
+ */
+ int get_row_at_index(int index) const;
+
+ /** Gets the number of columns in the table.
+ * @return A <tt>int</tt> representing the number of columns, or 0
+ * if value does not implement this interface.
+ */
+ int get_n_columns() const;
+
+ /** Gets the number of rows in the table.
+ * @return A <tt>int</tt> representing the number of rows, or 0
+ * if value does not implement this interface.
+ */
+ int get_n_rows() const;
+
+ /** Gets the number of columns occupied by the accessible object
+ * at the specified @a row and @a column in the @a table .
+ * @param row A <tt>int</tt> representing a row in @a table .
+ * @param column A <tt>int</tt> representing a column in @a table .
+ * @return A <tt>int</tt> representing the column extent at specified position, or 0
+ * if value does not implement this interface.
+ */
+ int get_column_extent_at(int row, int column) const;
+
+ /** Gets the number of rows occupied by the accessible object
+ * at a specified @a row and @a column in the @a table .
+ * @param row A <tt>int</tt> representing a row in @a table .
+ * @param column A <tt>int</tt> representing a column in @a table .
+ * @return A <tt>int</tt> representing the row extent at specified position, or 0
+ * if value does not implement this interface.
+ */
+ int get_row_extent_at(int row, int column) const;
+
+
+ /** Gets the caption for the @a table .
+ * @return A AtkObject* representing the table caption, or <tt>0</tt>
+ * if value does not implement this interface.
+ */
+ Glib::RefPtr<Atk::Object> get_caption();
+
+ /** Gets the caption for the @a table .
+ * @return A AtkObject* representing the table caption, or <tt>0</tt>
+ * if value does not implement this interface.
+ */
+ Glib::RefPtr<const Atk::Object> get_caption() const;
+
+
+ /** Gets the description text of the specified @a column in the table
+ * @param column A <tt>int</tt> representing a column in @a table .
+ * @return A gchar* representing the column description, or <tt>0</tt>
+ * if value does not implement this interface.
+ */
+ Glib::ustring get_column_description(int column) const;
+
+
+ /** Gets the column header of a specified column in an accessible table.
+ * @param column A <tt>int</tt> representing a column in the table.
+ * @return A AtkObject* representing the specified column header, or
+ * <tt>0</tt> if value does not implement this interface.
+ */
+ Glib::RefPtr<Atk::Object> get_column_header(int column);
+
+ /** Gets the column header of a specified column in an accessible table.
+ * @param column A <tt>int</tt> representing a column in the table.
+ * @return A AtkObject* representing the specified column header, or
+ * <tt>0</tt> if value does not implement this interface.
+ */
+ Glib::RefPtr<const Atk::Object> get_column_header(int column) const;
+
+
+ /** Gets the description text of the specified row in the table
+ * @param row A <tt>int</tt> representing a row in @a table .
+ * @return A gchar* representing the row description, or <tt>0</tt>
+ * if value does not implement this interface.
+ */
+ Glib::ustring get_row_description(int row) const;
+
+
+ /** Gets the row header of a specified row in an accessible table.
+ * @param row A <tt>int</tt> representing a row in the table.
+ * @return A AtkObject* representing the specified row header, or
+ * <tt>0</tt> if value does not implement this interface.
+ */
+ Glib::RefPtr<Atk::Object> get_row_header(int row);
+
+ /** Gets the row header of a specified row in an accessible table.
+ * @param row A <tt>int</tt> representing a row in the table.
+ * @return A AtkObject* representing the specified row header, or
+ * <tt>0</tt> if value does not implement this interface.
+ */
+ Glib::RefPtr<const Atk::Object> get_row_header(int row) const;
+
+
+ /** Gets the summary description of the table.
+ * @return A AtkObject* representing a summary description of the table,
+ * or zero if value does not implement this interface.
+ */
+ Glib::RefPtr<Atk::Object> get_summary();
+
+ /** Gets the summary description of the table.
+ * @return A AtkObject* representing a summary description of the table,
+ * or zero if value does not implement this interface.
+ */
+ Glib::RefPtr<const Atk::Object> get_summary() const;
+
+
+ /** Sets the caption for the table.
+ * @param caption A Atk::Object representing the caption to set for @a table .
+ */
+ void set_caption(const Glib::RefPtr<Atk::Object>& caption);
+
+ /** Sets the description text for the specified @a column of the @a table .
+ * @param column A <tt>int</tt> representing a column in @a table .
+ * @param description A #gchar representing the description text
+ * to set for the specified @a column of the @a table .
+ */
+ void set_column_description(int column, const Glib::ustring& description);
+
+ /** Sets the specified column header to @a header .
+ * @param column A <tt>int</tt> representing a column in @a table .
+ * @param header An Atk::Table.
+ */
+ void set_column_header(int column, const Glib::RefPtr<Atk::Object>& header);
+
+ /** Sets the description text for the specified @a row of @a table .
+ * @param row A <tt>int</tt> representing a row in @a table .
+ * @param description A #gchar representing the description text
+ * to set for the specified @a row of @a table .
+ */
+ void set_row_description(int row, const Glib::ustring& description);
+
+ /** Sets the specified row header to @a header .
+ * @param row A <tt>int</tt> representing a row in @a table .
+ * @param header An Atk::Table.
+ */
+ void set_row_header(int row, const Glib::RefPtr<Atk::Object>& header);
+
+ /** Sets the summary description of the table.
+ * @param accessible An Atk::Object representing the summary description
+ * to set for @a table .
+ */
+ void set_summary(const Glib::RefPtr<Atk::Object>& accessible);
+
+
+ Glib::ArrayHandle<int> get_selected_columns() const;
+ Glib::ArrayHandle<int> get_selected_rows() const;
+
+
+ /** Gets a boolean value indicating whether the specified @a column
+ * is selected
+ * @param column A <tt>int</tt> representing a column in @a table .
+ * @return A <tt>bool</tt> representing if the column is selected, or 0
+ * if value does not implement this interface.
+ */
+ bool is_column_selected(int column) const;
+
+ /** Gets a boolean value indicating whether the specified @a row
+ * is selected
+ * @param row A <tt>int</tt> representing a row in @a table .
+ * @return A <tt>bool</tt> representing if the row is selected, or 0
+ * if value does not implement this interface.
+ */
+ bool is_row_selected(int row) const;
+
+ /** Gets a boolean value indicating whether the accessible object
+ * at the specified @a row and @a column is selected
+ * @param row A <tt>int</tt> representing a row in @a table .
+ * @param column A <tt>int</tt> representing a column in @a table .
+ * @return A <tt>bool</tt> representing if the cell is selected, or 0
+ * if value does not implement this interface.
+ */
+ bool is_selected(int row, int column) const;
+
+ /** Adds the specified @a row to the selection.
+ * @param row A <tt>int</tt> representing a row in @a table .
+ * @return A <tt>bool</tt> representing if row was successfully added to selection,
+ * or 0 if value does not implement this interface.
+ */
+ bool add_row_selection(int row);
+
+ /** Removes the specified @a row from the selection.
+ * @param row A <tt>int</tt> representing a row in @a table .
+ * @return A <tt>bool</tt> representing if the row was successfully removed from
+ * the selection, or 0 if value does not implement this interface.
+ */
+ bool remove_row_selection(int row);
+
+ /** Adds the specified @a column to the selection.
+ * @param column A <tt>int</tt> representing a column in @a table .
+ * @return A <tt>bool</tt> representing if the column was successfully added to
+ * the selection, or 0 if value does not implement this interface.
+ */
+ bool add_column_selection(int column);
+
+ /** Adds the specified @a column to the selection.
+ * @param column A <tt>int</tt> representing a column in @a table .
+ * @return A <tt>bool</tt> representing if the column was successfully removed from
+ * the selection, or 0 if value does not implement this interface.
+ */
+ bool remove_column_selection(int column);
+
+
+ Glib::SignalProxy2< void,int,int > signal_row_inserted();
+
+
+ Glib::SignalProxy2< void,int,int > signal_column_inserted();
+
+
+ Glib::SignalProxy2< void,int,int > signal_row_deleted();
+
+
+ Glib::SignalProxy2< void,int,int > signal_column_deleted();
+
+
+ Glib::SignalProxy0< void > signal_row_reordered();
+
+
+ Glib::SignalProxy0< void > signal_column_reordered();
+
+
+ Glib::SignalProxy0< void > signal_model_changed();
+
+
+protected:
+ virtual Glib::RefPtr<Atk::Object> get_at_vfunc(int row, int column);
+ virtual int get_index_at_vfunc(int row, int column) const;
+ virtual int get_column_at_index_vfunc(int index) const;
+ virtual int get_row_at_index_vfunc(int index) const;
+ virtual int get_n_columns_vfunc() const;
+ virtual int get_n_rows_vfunc() const;
+ virtual int get_column_extent_at_vfunc(int row, int column) const;
+ virtual int get_row_extent_at_vfunc(int row, int column) const;
+ virtual Glib::RefPtr<Atk::Object> get_caption_vfunc();
+ virtual const char* get_column_description_vfunc(int column) const;
+ virtual Glib::RefPtr<Atk::Object> get_column_header_vfunc(int column);
+ virtual const char* get_row_description_vfunc(int row) const;
+ virtual Glib::RefPtr<Atk::Object> get_row_header_vfunc(int row);
+ virtual Glib::RefPtr<Atk::Object> get_summary_vfunc();
+ virtual void set_caption_vfunc(const Glib::RefPtr<Atk::Object>& caption);
+ virtual void set_column_description_vfunc(int column, const char* description);
+ virtual void set_column_header_vfunc(int column, const Glib::RefPtr<Atk::Object>& header);
+ virtual void set_row_description_vfunc(int row, const char* description);
+ virtual void set_row_header_vfunc(int row, const Glib::RefPtr<Atk::Object>& header);
+ virtual void set_summary_vfunc(const Glib::RefPtr<Atk::Object>& accessible);
+ virtual bool is_column_selected_vfunc(int column) const;
+ virtual bool is_row_selected_vfunc(int row) const;
+ virtual bool is_selected_vfunc(int row, int column) const;
+ virtual bool add_row_selection_vfunc(int row);
+ virtual bool remove_row_selection_vfunc(int row);
+ virtual bool add_column_selection_vfunc(int column);
+ virtual bool remove_column_selection_vfunc(int column);
+ virtual int get_selected_columns_vfunc(int** selected) const;
+ virtual int get_selected_rows_vfunc(int** selected) const;
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_row_inserted(int row, int num_inserted);
+ virtual void on_column_inserted(int column, int num_inserted);
+ virtual void on_row_deleted(int row, int num_deleted);
+ virtual void on_column_deleted(int column, int num_deleted);
+ virtual void on_row_reordered();
+ virtual void on_column_reordered();
+ virtual void on_model_changed();
+
+
+};
+
+} // namespace Atk
+
+
+namespace Glib
+{
+ /** @relates Atk::Table
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Atk::Table> wrap(AtkTable* object, bool take_copy = false);
+
+} // namespace Glib
+
+#endif /* _ATKMM_TABLE_H */
+
diff --git a/libs/gtkmm2/atk/atkmm/text.cc b/libs/gtkmm2/atk/atkmm/text.cc
new file mode 100644
index 0000000000..af101a5117
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/text.cc
@@ -0,0 +1,1563 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <atkmm/text.h>
+#include <atkmm/private/text_p.h>
+
+#include <atk/atk-enum-types.h>
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <atkmm/object.h>
+#include <glib.h>
+#include <algorithm> /* for std::swap() */
+
+
+// static
+GType Glib::Value<Atk::TextAttribute>::value_type()
+{
+ return atk_text_attribute_get_type();
+}
+
+
+namespace Atk
+{
+
+/**** Atk::Attribute *******************************************************/
+
+Attribute::Attribute()
+{
+ gobject_.name = 0;
+ gobject_.value = 0;
+}
+
+Attribute::Attribute(const Glib::ustring& name, const Glib::ustring& value)
+{
+ gobject_.name = g_strndup(name .data(), name .bytes());
+ gobject_.value = g_strndup(value.data(), value.bytes());
+}
+
+Attribute::Attribute(const AtkAttribute* gobject)
+{
+ g_return_if_fail(gobject != 0);
+
+ gobject_.name = g_strdup(gobject->name);
+ gobject_.value = g_strdup(gobject->value);
+}
+
+Attribute::~Attribute()
+{
+ g_free(gobject_.name);
+ g_free(gobject_.value);
+}
+
+Attribute::Attribute(const Attribute& other)
+{
+ gobject_.name = g_strdup(other.gobject_.name);
+ gobject_.value = g_strdup(other.gobject_.value);
+}
+
+Attribute& Attribute::operator=(const Attribute& other)
+{
+ Attribute temp (other);
+ swap(temp);
+ return *this;
+}
+
+void Attribute::swap(Attribute& other)
+{
+ std::swap(gobject_.name, other.gobject_.name);
+ std::swap(gobject_.value, other.gobject_.value);
+}
+
+
+/**** Atk::TextAttribute ***************************************************/
+
+// static
+TextAttribute TextAttribute::for_name(const Glib::ustring& name)
+{
+ return TextAttribute(int(atk_text_attribute_for_name(name.c_str())));
+}
+
+// static
+Glib::ustring TextAttribute::get_name(TextAttribute attribute)
+{
+ if(const char *const name = atk_text_attribute_get_name(AtkTextAttribute(int(attribute))))
+ return Glib::ustring(name);
+ else
+ return Glib::ustring();
+}
+
+// static
+Glib::ustring TextAttribute::get_value(TextAttribute attribute, int index)
+{
+ if(const char *const value = atk_text_attribute_get_value(AtkTextAttribute(int(attribute)), index))
+ return Glib::ustring(value);
+ else
+ return Glib::ustring();
+}
+
+} // namespace Atk
+
+
+namespace
+{
+
+void Text_signal_text_changed_callback(AtkText* self, gint p0,gint p1,void* data)
+{
+ using namespace Atk;
+ typedef sigc::slot< void,int,int > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(p0
+, p1
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo Text_signal_text_changed_info =
+{
+ "text_changed",
+ (GCallback) &Text_signal_text_changed_callback,
+ (GCallback) &Text_signal_text_changed_callback
+};
+
+
+void Text_signal_text_caret_moved_callback(AtkText* self, gint p0,void* data)
+{
+ using namespace Atk;
+ typedef sigc::slot< void,int > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(p0
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo Text_signal_text_caret_moved_info =
+{
+ "text_caret_moved",
+ (GCallback) &Text_signal_text_caret_moved_callback,
+ (GCallback) &Text_signal_text_caret_moved_callback
+};
+
+
+const Glib::SignalProxyInfo Text_signal_text_selection_changed_info =
+{
+ "text_selection_changed",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+
+const Glib::SignalProxyInfo Text_signal_text_attributes_changed_info =
+{
+ "text_attributes_changed",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+} // anonymous namespace
+
+
+namespace Atk
+{
+
+
+Glib::ustring Attribute::get_name() const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(gobj()->name);
+}
+
+Glib::ustring Attribute::get_value() const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(gobj()->value);
+}
+
+
+} // namespace Atk
+
+// static
+GType Glib::Value<Atk::BuiltinTextAttribute>::value_type()
+{
+ return atk_text_attribute_get_type();
+}
+
+// static
+GType Glib::Value<Atk::TextBoundary>::value_type()
+{
+ return atk_text_boundary_get_type();
+}
+
+// static
+GType Glib::Value<Atk::TextClipType>::value_type()
+{
+ return atk_text_clip_type_get_type();
+}
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Atk::Text> wrap(AtkText* object, bool take_copy)
+{
+ return Glib::RefPtr<Atk::Text>( dynamic_cast<Atk::Text*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} // namespace Glib
+
+
+namespace Atk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Interface_Class& Text_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Interface_Class has to know the interface init function
+ // in order to add interfaces to implementing types.
+ class_init_func_ = &Text_Class::iface_init_function;
+
+ // We can not derive from another interface, and it is not necessary anyway.
+ gtype_ = atk_text_get_type();
+ }
+
+ return *this;
+}
+
+void Text_Class::iface_init_function(void* g_iface, void*)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_iface);
+
+ //This is just to avoid an "unused variable" warning when there are no vfuncs or signal handlers to connect.
+ //This is a temporary fix until I find out why I can not seem to derive a GtkFileChooser interface. murrayc
+ g_assert(klass != 0);
+
+ klass->get_text = &get_text_vfunc_callback;
+ klass->get_character_at_offset = &get_character_at_offset_vfunc_callback;
+ klass->get_text_after_offset = &get_text_after_offset_vfunc_callback;
+ klass->get_text_at_offset = &get_text_at_offset_vfunc_callback;
+ klass->get_text_before_offset = &get_text_before_offset_vfunc_callback;
+ klass->get_caret_offset = &get_caret_offset_vfunc_callback;
+ klass->get_character_extents = &get_character_extents_vfunc_callback;
+ klass->get_run_attributes = &get_run_attributes_vfunc_callback;
+ klass->get_default_attributes = &get_default_attributes_vfunc_callback;
+ klass->get_character_count = &get_character_count_vfunc_callback;
+ klass->get_offset_at_point = &get_offset_at_point_vfunc_callback;
+ klass->get_n_selections = &get_n_selections_vfunc_callback;
+ klass->get_selection = &get_selection_vfunc_callback;
+ klass->add_selection = &add_selection_vfunc_callback;
+ klass->remove_selection = &remove_selection_vfunc_callback;
+ klass->set_selection = &set_selection_vfunc_callback;
+ klass->set_caret_offset = &set_caret_offset_vfunc_callback;
+ klass->text_changed = &text_changed_callback;
+ klass->text_caret_moved = &text_caret_moved_callback;
+ klass->text_selection_changed = &text_selection_changed_callback;
+ klass->text_attributes_changed = &text_attributes_changed_callback;
+}
+
+gchar* Text_Class::get_text_vfunc_callback(AtkText* self, gint start_offset, gint end_offset)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return g_strdup((obj->get_text_vfunc(start_offset
+, end_offset
+)).c_str());
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_text)
+ return (*base->get_text)(self, start_offset, end_offset);
+ }
+
+ typedef gchar* RType;
+ return RType();
+}
+
+gunichar Text_Class::get_character_at_offset_vfunc_callback(AtkText* self, gint offset)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return obj->get_character_at_offset_vfunc(offset
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_character_at_offset)
+ return (*base->get_character_at_offset)(self, offset);
+ }
+
+ typedef gunichar RType;
+ return RType();
+}
+
+gchar* Text_Class::get_text_after_offset_vfunc_callback(AtkText* self, gint offset, AtkTextBoundary boundary_type, gint* start_offset, gint* end_offset)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return g_strdup((obj->get_text_after_offset_vfunc(offset
+, ((TextBoundary)(boundary_type))
+, *(start_offset)
+, *(end_offset)
+)).c_str());
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_text_after_offset)
+ return (*base->get_text_after_offset)(self, offset, boundary_type, start_offset, end_offset);
+ }
+
+ typedef gchar* RType;
+ return RType();
+}
+
+gchar* Text_Class::get_text_at_offset_vfunc_callback(AtkText* self, gint offset, AtkTextBoundary boundary_type, gint* start_offset, gint* end_offset)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return g_strdup((obj->get_text_at_offset_vfunc(offset
+, ((TextBoundary)(boundary_type))
+, *(start_offset)
+, *(end_offset)
+)).c_str());
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_text_at_offset)
+ return (*base->get_text_at_offset)(self, offset, boundary_type, start_offset, end_offset);
+ }
+
+ typedef gchar* RType;
+ return RType();
+}
+
+gchar* Text_Class::get_text_before_offset_vfunc_callback(AtkText* self, gint offset, AtkTextBoundary boundary_type, gint* start_offset, gint* end_offset)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return g_strdup((obj->get_text_before_offset_vfunc(offset
+, ((TextBoundary)(boundary_type))
+, *(start_offset)
+, *(end_offset)
+)).c_str());
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_text_before_offset)
+ return (*base->get_text_before_offset)(self, offset, boundary_type, start_offset, end_offset);
+ }
+
+ typedef gchar* RType;
+ return RType();
+}
+
+gint Text_Class::get_caret_offset_vfunc_callback(AtkText* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return obj->get_caret_offset_vfunc();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_caret_offset)
+ return (*base->get_caret_offset)(self);
+ }
+
+ typedef gint RType;
+ return RType();
+}
+
+void Text_Class::get_character_extents_vfunc_callback(AtkText* self, gint offset, gint* x, gint* y, gint* width, gint* height, AtkCoordType coords)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->get_character_extents_vfunc(offset
+, *(x)
+, *(y)
+, *(width)
+, *(height)
+, ((CoordType)(coords))
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_character_extents)
+ (*base->get_character_extents)(self, offset, x, y, width, height, coords);
+ }
+}
+
+AtkAttributeSet* Text_Class::get_run_attributes_vfunc_callback(AtkText* self, gint offset, gint* start_offset, gint* end_offset)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return obj->get_run_attributes_vfunc(offset
+, *(start_offset)
+, *(end_offset)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_run_attributes)
+ return (*base->get_run_attributes)(self, offset, start_offset, end_offset);
+ }
+
+ typedef AtkAttributeSet* RType;
+ return RType();
+}
+
+AtkAttributeSet* Text_Class::get_default_attributes_vfunc_callback(AtkText* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return obj->get_default_attributes_vfunc();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_default_attributes)
+ return (*base->get_default_attributes)(self);
+ }
+
+ typedef AtkAttributeSet* RType;
+ return RType();
+}
+
+gint Text_Class::get_character_count_vfunc_callback(AtkText* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return obj->get_character_count_vfunc();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_character_count)
+ return (*base->get_character_count)(self);
+ }
+
+ typedef gint RType;
+ return RType();
+}
+
+gint Text_Class::get_offset_at_point_vfunc_callback(AtkText* self, gint x, gint y, AtkCoordType coords)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return obj->get_offset_at_point_vfunc(x
+, y
+, ((CoordType)(coords))
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_offset_at_point)
+ return (*base->get_offset_at_point)(self, x, y, coords);
+ }
+
+ typedef gint RType;
+ return RType();
+}
+
+gint Text_Class::get_n_selections_vfunc_callback(AtkText* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return obj->get_n_selections_vfunc();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_n_selections)
+ return (*base->get_n_selections)(self);
+ }
+
+ typedef gint RType;
+ return RType();
+}
+
+gchar* Text_Class::get_selection_vfunc_callback(AtkText* self, gint selection_num, gint* start_offset, gint* end_offset)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return g_strdup((obj->get_selection_vfunc(selection_num
+, *(start_offset)
+, *(end_offset)
+)).c_str());
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_selection)
+ return (*base->get_selection)(self, selection_num, start_offset, end_offset);
+ }
+
+ typedef gchar* RType;
+ return RType();
+}
+
+gboolean Text_Class::add_selection_vfunc_callback(AtkText* self, gint start_offset, gint end_offset)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->add_selection_vfunc(start_offset
+, end_offset
+));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->add_selection)
+ return (*base->add_selection)(self, start_offset, end_offset);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Text_Class::remove_selection_vfunc_callback(AtkText* self, gint selection_num)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->remove_selection_vfunc(selection_num
+));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->remove_selection)
+ return (*base->remove_selection)(self, selection_num);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Text_Class::set_selection_vfunc_callback(AtkText* self, gint selection_num, gint start_offset, gint end_offset)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->set_selection_vfunc(selection_num
+, start_offset
+, end_offset
+));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->set_selection)
+ return (*base->set_selection)(self, selection_num, start_offset, end_offset);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Text_Class::set_caret_offset_vfunc_callback(AtkText* self, gint offset)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->set_caret_offset_vfunc(offset
+));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->set_caret_offset)
+ return (*base->set_caret_offset)(self, offset);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+
+void Text_Class::text_changed_callback(AtkText* self, gint p0, gint p1)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_text_changed(p0
+, p1
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->text_changed)
+ (*base->text_changed)(self, p0, p1);
+ }
+}
+
+void Text_Class::text_caret_moved_callback(AtkText* self, gint p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_text_caret_moved(p0
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->text_caret_moved)
+ (*base->text_caret_moved)(self, p0);
+ }
+}
+
+void Text_Class::text_selection_changed_callback(AtkText* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_text_selection_changed();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->text_selection_changed)
+ (*base->text_selection_changed)(self);
+ }
+}
+
+void Text_Class::text_attributes_changed_callback(AtkText* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_text_attributes_changed();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->text_attributes_changed)
+ (*base->text_attributes_changed)(self);
+ }
+}
+
+
+Glib::ObjectBase* Text_Class::wrap_new(GObject* object)
+{
+ return new Text((AtkText*)(object));
+}
+
+
+/* The implementation: */
+
+Text::Text()
+:
+ Glib::Interface(text_class_.init())
+{}
+
+Text::Text(AtkText* castitem)
+:
+ Glib::Interface((GObject*)(castitem))
+{}
+
+Text::~Text()
+{}
+
+// static
+void Text::add_interface(GType gtype_implementer)
+{
+ text_class_.init().add_interface(gtype_implementer);
+}
+
+Text::CppClassType Text::text_class_; // initialize static member
+
+GType Text::get_type()
+{
+ return text_class_.init().get_type();
+}
+
+GType Text::get_base_type()
+{
+ return atk_text_get_type();
+}
+
+Glib::ustring Text::get_text(int start_offset, int end_offset) const
+{
+ return Glib::convert_return_gchar_ptr_to_ustring(atk_text_get_text(const_cast<AtkText*>(gobj()), start_offset, end_offset));
+}
+
+gunichar Text::get_character_at_offset(int offset) const
+{
+ return atk_text_get_character_at_offset(const_cast<AtkText*>(gobj()), offset);
+}
+
+Glib::ustring Text::get_text_after_offset(int offset, TextBoundary boundary_type, int& start_offset, int& end_offset) const
+{
+ return Glib::convert_return_gchar_ptr_to_ustring(atk_text_get_text_after_offset(const_cast<AtkText*>(gobj()), offset, ((AtkTextBoundary)(boundary_type)), &start_offset, &end_offset));
+}
+
+Glib::ustring Text::get_text_at_offset(int offset, TextBoundary boundary_type, int& start_offset, int& end_offset) const
+{
+ return Glib::convert_return_gchar_ptr_to_ustring(atk_text_get_text_at_offset(const_cast<AtkText*>(gobj()), offset, ((AtkTextBoundary)(boundary_type)), &start_offset, &end_offset));
+}
+
+Glib::ustring Text::get_text_before_offset(int offset, TextBoundary boundary_type, int& start_offset, int& end_offset) const
+{
+ return Glib::convert_return_gchar_ptr_to_ustring(atk_text_get_text_before_offset(const_cast<AtkText*>(gobj()), offset, ((AtkTextBoundary)(boundary_type)), &start_offset, &end_offset));
+}
+
+int Text::get_caret_offset() const
+{
+ return atk_text_get_caret_offset(const_cast<AtkText*>(gobj()));
+}
+
+void Text::get_character_extents(int offset, int& x, int& y, int& width, int& height, CoordType coords) const
+{
+ atk_text_get_character_extents(const_cast<AtkText*>(gobj()), offset, &x, &y, &width, &height, ((AtkCoordType)(coords)));
+}
+
+AttributeSet Text::get_run_attributes(int offset, int& start_offset, int& end_offset) const
+{
+ return AttributeSet(atk_text_get_run_attributes(const_cast<AtkText*>(gobj()), offset, &start_offset, &end_offset), Glib::OWNERSHIP_DEEP);
+}
+
+AttributeSet Text::get_default_attributes() const
+{
+ return AttributeSet(atk_text_get_default_attributes(const_cast<AtkText*>(gobj())), Glib::OWNERSHIP_DEEP);
+}
+
+int Text::get_character_count() const
+{
+ return atk_text_get_character_count(const_cast<AtkText*>(gobj()));
+}
+
+int Text::get_offset_at_point(int x, int y, CoordType coords) const
+{
+ return atk_text_get_offset_at_point(const_cast<AtkText*>(gobj()), x, y, ((AtkCoordType)(coords)));
+}
+
+int Text::get_n_selections() const
+{
+ return atk_text_get_n_selections(const_cast<AtkText*>(gobj()));
+}
+
+Glib::ustring Text::get_selection(int selection_num, int& start_offset, int& end_offset) const
+{
+ return Glib::convert_return_gchar_ptr_to_ustring(atk_text_get_selection(const_cast<AtkText*>(gobj()), selection_num, &start_offset, &end_offset));
+}
+
+bool Text::add_selection(int start_offset, int end_offset)
+{
+ return atk_text_add_selection(gobj(), start_offset, end_offset);
+}
+
+bool Text::remove_selection(int selection_num)
+{
+ return atk_text_remove_selection(gobj(), selection_num);
+}
+
+bool Text::set_selection(int selection_num, int start_offset, int end_offset)
+{
+ return atk_text_set_selection(gobj(), selection_num, start_offset, end_offset);
+}
+
+bool Text::set_caret_offset(int offset)
+{
+ return atk_text_set_caret_offset(gobj(), offset);
+}
+
+void Text::get_range_extents(int start_offset, int end_offset, CoordType coord_type, Rectangle& rect)
+{
+ atk_text_get_range_extents(gobj(), start_offset, end_offset, ((AtkCoordType)(coord_type)), &(rect));
+}
+
+AtkTextRange** Text::get_bounded_ranges(const Rectangle& rect, CoordType coord_type, TextClipType x_clip_type, TextClipType y_clip_type)
+{
+ return atk_text_get_bounded_ranges(gobj(), const_cast<AtkTextRectangle*>(&(rect)), ((AtkCoordType)(coord_type)), ((AtkTextClipType)(x_clip_type)), ((AtkTextClipType)(y_clip_type)));
+}
+
+
+Glib::SignalProxy2< void,int,int > Text::signal_text_changed()
+{
+ return Glib::SignalProxy2< void,int,int >(this, &Text_signal_text_changed_info);
+}
+
+Glib::SignalProxy1< void,int > Text::signal_text_caret_moved()
+{
+ return Glib::SignalProxy1< void,int >(this, &Text_signal_text_caret_moved_info);
+}
+
+Glib::SignalProxy0< void > Text::signal_text_selection_changed()
+{
+ return Glib::SignalProxy0< void >(this, &Text_signal_text_selection_changed_info);
+}
+
+Glib::SignalProxy0< void > Text::signal_text_attributes_changed()
+{
+ return Glib::SignalProxy0< void >(this, &Text_signal_text_attributes_changed_info);
+}
+
+
+void Atk::Text::on_text_changed(int position, int length)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->text_changed)
+ (*base->text_changed)(gobj(),position,length);
+}
+
+void Atk::Text::on_text_caret_moved(int location)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->text_caret_moved)
+ (*base->text_caret_moved)(gobj(),location);
+}
+
+void Atk::Text::on_text_selection_changed()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->text_selection_changed)
+ (*base->text_selection_changed)(gobj());
+}
+
+void Atk::Text::on_text_attributes_changed()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->text_attributes_changed)
+ (*base->text_attributes_changed)(gobj());
+}
+
+
+Glib::ustring Atk::Text::get_text_vfunc(int start_offset, int end_offset) const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_text)
+ return Glib::convert_const_gchar_ptr_to_ustring((*base->get_text)(const_cast<AtkText*>(gobj()),start_offset,end_offset));
+
+ typedef Glib::ustring RType;
+ return RType();
+}
+
+gunichar Atk::Text::get_character_at_offset_vfunc(int offset) const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_character_at_offset)
+ return (*base->get_character_at_offset)(const_cast<AtkText*>(gobj()),offset);
+
+ typedef gunichar RType;
+ return RType();
+}
+
+Glib::ustring Atk::Text::get_text_after_offset_vfunc(int offset, TextBoundary boundary_type, int& start_offset, int& end_offset) const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_text_after_offset)
+ return Glib::convert_const_gchar_ptr_to_ustring((*base->get_text_after_offset)(const_cast<AtkText*>(gobj()),offset,((AtkTextBoundary)(boundary_type)),&start_offset,&end_offset));
+
+ typedef Glib::ustring RType;
+ return RType();
+}
+
+Glib::ustring Atk::Text::get_text_at_offset_vfunc(int offset, TextBoundary boundary_type, int& start_offset, int& end_offset) const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_text_at_offset)
+ return Glib::convert_const_gchar_ptr_to_ustring((*base->get_text_at_offset)(const_cast<AtkText*>(gobj()),offset,((AtkTextBoundary)(boundary_type)),&start_offset,&end_offset));
+
+ typedef Glib::ustring RType;
+ return RType();
+}
+
+Glib::ustring Atk::Text::get_text_before_offset_vfunc(int offset, TextBoundary boundary_type, int& start_offset, int& end_offset) const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_text_before_offset)
+ return Glib::convert_const_gchar_ptr_to_ustring((*base->get_text_before_offset)(const_cast<AtkText*>(gobj()),offset,((AtkTextBoundary)(boundary_type)),&start_offset,&end_offset));
+
+ typedef Glib::ustring RType;
+ return RType();
+}
+
+int Atk::Text::get_caret_offset_vfunc() const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_caret_offset)
+ return (*base->get_caret_offset)(const_cast<AtkText*>(gobj()));
+
+ typedef int RType;
+ return RType();
+}
+
+void Atk::Text::get_character_extents_vfunc(int offset, int& x, int& y, int& width, int& height, CoordType coords) const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_character_extents)
+ (*base->get_character_extents)(const_cast<AtkText*>(gobj()),offset,&x,&y,&width,&height,((AtkCoordType)(coords)));
+}
+
+AtkAttributeSet* Atk::Text::get_run_attributes_vfunc(int offset, int& start_offset, int& end_offset) const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_run_attributes)
+ return (*base->get_run_attributes)(const_cast<AtkText*>(gobj()),offset,&start_offset,&end_offset);
+
+ typedef AtkAttributeSet* RType;
+ return RType();
+}
+
+AtkAttributeSet* Atk::Text::get_default_attributes_vfunc() const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_default_attributes)
+ return (*base->get_default_attributes)(const_cast<AtkText*>(gobj()));
+
+ typedef AtkAttributeSet* RType;
+ return RType();
+}
+
+int Atk::Text::get_character_count_vfunc() const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_character_count)
+ return (*base->get_character_count)(const_cast<AtkText*>(gobj()));
+
+ typedef int RType;
+ return RType();
+}
+
+int Atk::Text::get_offset_at_point_vfunc(int x, int y, CoordType coords) const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_offset_at_point)
+ return (*base->get_offset_at_point)(const_cast<AtkText*>(gobj()),x,y,((AtkCoordType)(coords)));
+
+ typedef int RType;
+ return RType();
+}
+
+int Atk::Text::get_n_selections_vfunc() const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_n_selections)
+ return (*base->get_n_selections)(const_cast<AtkText*>(gobj()));
+
+ typedef int RType;
+ return RType();
+}
+
+Glib::ustring Atk::Text::get_selection_vfunc(int selection_num, int& start_offset, int& end_offset) const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_selection)
+ return Glib::convert_const_gchar_ptr_to_ustring((*base->get_selection)(const_cast<AtkText*>(gobj()),selection_num,&start_offset,&end_offset));
+
+ typedef Glib::ustring RType;
+ return RType();
+}
+
+bool Atk::Text::add_selection_vfunc(int start_offset, int end_offset)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->add_selection)
+ return (*base->add_selection)(gobj(),start_offset,end_offset);
+
+ typedef bool RType;
+ return RType();
+}
+
+bool Atk::Text::remove_selection_vfunc(int selection_num)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->remove_selection)
+ return (*base->remove_selection)(gobj(),selection_num);
+
+ typedef bool RType;
+ return RType();
+}
+
+bool Atk::Text::set_selection_vfunc(int selection_num, int start_offset, int end_offset)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->set_selection)
+ return (*base->set_selection)(gobj(),selection_num,start_offset,end_offset);
+
+ typedef bool RType;
+ return RType();
+}
+
+bool Atk::Text::set_caret_offset_vfunc(int offset)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->set_caret_offset)
+ return (*base->set_caret_offset)(gobj(),offset);
+
+ typedef bool RType;
+ return RType();
+}
+
+
+} // namespace Atk
+
+
diff --git a/libs/gtkmm2/atk/atkmm/text.h b/libs/gtkmm2/atk/atkmm/text.h
new file mode 100644
index 0000000000..86dee7ee39
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/text.h
@@ -0,0 +1,687 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _ATKMM_TEXT_H
+#define _ATKMM_TEXT_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#include <atkmm/component.h> /* for Atk::CoordType */
+#include <atk/atktext.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _AtkText AtkText;
+typedef struct _AtkTextClass AtkTextClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Atk
+{ class Text_Class; } // namespace Atk
+namespace Atk
+{
+
+class Attribute
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Attribute CppObjectType;
+ typedef AtkAttribute BaseObjectType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+private:
+
+
+public:
+ Attribute();
+ Attribute(const Glib::ustring& name, const Glib::ustring& value);
+ explicit Attribute(const AtkAttribute* gobject);
+ ~Attribute();
+
+ Attribute(const Attribute& other);
+ Attribute& operator=(const Attribute& other);
+
+ void swap(Attribute& other);
+
+ Glib::ustring get_name() const;
+ Glib::ustring get_value() const;
+
+ /// Provides access to the underlying C GObject.
+ AtkAttribute* gobj() { return &gobject_; }
+
+ /// Provides access to the underlying C GObject.
+ const AtkAttribute* gobj() const { return &gobject_; }
+
+protected:
+ AtkAttribute gobject_;
+
+
+};
+
+/** @relates Atk::Attribute */
+inline void swap(Attribute& lhs, Attribute& rhs)
+ { lhs.swap(rhs); }
+
+struct AttributeTraits
+{
+ typedef Atk::Attribute CppType;
+ typedef const AtkAttribute* CType;
+ typedef AtkAttribute* CTypeNonConst;
+
+ static CType to_c_type(CType item) { return item; }
+ static CType to_c_type(const CppType& item) { return item.gobj(); }
+ static CppType to_cpp_type(CType item) { return CppType(item); }
+ static void release_c_type(CType item) { g_free(const_cast<CTypeNonConst>(item)); }
+};
+
+typedef Glib::SListHandle<Attribute, AttributeTraits> AttributeSet;
+
+
+/** @addtogroup atkmmEnums Enums and Flags */
+
+/**
+ * @ingroup atkmmEnums
+ */
+enum BuiltinTextAttribute
+{
+ TEXT_ATTR_INVALID,
+ TEXT_ATTR_LEFT_MARGIN,
+ TEXT_ATTR_RIGHT_MARGIN,
+ TEXT_ATTR_INDENT,
+ TEXT_ATTR_INVISIBLE,
+ TEXT_ATTR_EDITABLE,
+ TEXT_ATTR_PIXELS_ABOVE_LINES,
+ TEXT_ATTR_PIXELS_BELOW_LINES,
+ TEXT_ATTR_PIXELS_INSIDE_WRAP,
+ TEXT_ATTR_BG_FULL_HEIGHT,
+ TEXT_ATTR_RISE,
+ TEXT_ATTR_UNDERLINE,
+ TEXT_ATTR_STRIKETHROUGH,
+ TEXT_ATTR_SIZE,
+ TEXT_ATTR_SCALE,
+ TEXT_ATTR_WEIGHT,
+ TEXT_ATTR_LANGUAGE,
+ TEXT_ATTR_FAMILY_NAME,
+ TEXT_ATTR_BG_COLOR,
+ TEXT_ATTR_FG_COLOR,
+ TEXT_ATTR_BG_STIPPLE,
+ TEXT_ATTR_FG_STIPPLE,
+ TEXT_ATTR_WRAP_MODE,
+ TEXT_ATTR_DIRECTION,
+ TEXT_ATTR_JUSTIFICATION,
+ TEXT_ATTR_STRETCH,
+ TEXT_ATTR_VARIANT,
+ TEXT_ATTR_STYLE,
+ TEXT_ATTR_LAST_DEFINED
+};
+
+} // namespace Atk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Atk::BuiltinTextAttribute> : public Glib::Value_Enum<Atk::BuiltinTextAttribute>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Atk
+{
+
+
+class TextAttribute
+{
+private:
+ int attribute_;
+
+public:
+ TextAttribute() : attribute_ (0) {}
+ TextAttribute(BuiltinTextAttribute attribute) : attribute_ (attribute) {}
+
+ // Behave like an ordinary enum.
+ explicit TextAttribute(int attribute) : attribute_ (attribute) {}
+ operator int() const { return attribute_; }
+
+ static TextAttribute for_name(const Glib::ustring& name);
+ static Glib::ustring get_name(TextAttribute attribute);
+ static Glib::ustring get_value(TextAttribute attribute, int index);
+};
+
+} // namespace Atk
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Atk::TextAttribute> : public Glib::Value_Enum<Atk::TextAttribute>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+namespace Atk
+{
+
+/**
+ * @ingroup atkmmEnums
+ */
+enum TextBoundary
+{
+ TEXT_BOUNDARY_CHAR,
+ TEXT_BOUNDARY_WORD_START,
+ TEXT_BOUNDARY_WORD_END,
+ TEXT_BOUNDARY_SENTENCE_START,
+ TEXT_BOUNDARY_SENTENCE_END,
+ TEXT_BOUNDARY_LINE_START,
+ TEXT_BOUNDARY_LINE_END
+};
+
+} // namespace Atk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Atk::TextBoundary> : public Glib::Value_Enum<Atk::TextBoundary>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Atk
+{
+
+/**
+ * @ingroup atkmmEnums
+ */
+enum TextClipType
+{
+ TEXT_CLIP_NONE,
+ TEXT_CLIP_MIN,
+ TEXT_CLIP_MAX,
+ TEXT_CLIP_BOTH
+};
+
+} // namespace Atk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Atk::TextClipType> : public Glib::Value_Enum<Atk::TextClipType>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Atk
+{
+
+
+/** The ATK interface implemented by components with text content.
+ * This should be implemented by Atk::Objects on behalf of widgets that have text content which is either attributed
+ * or otherwise non-trivial. Atk::Objects whose text content is simple, unattributed, and very brief may expose that
+ * content via Atk::Object::get_name() instead; however if the text is editable, multi-line, typically longer than
+ * three or four words, attributed, selectable, or if the object already uses the 'name' ATK property for other
+ * information, this Text interface should be used to expose the text content. In the case of editable text content,
+ * Atk::EditableText (a subtype of the Atk::Text interface) should be implemented instead.
+ *
+ * Atk::Text provides not only traversal facilities and change notification for text content, but also caret tracking
+ * and glyph bounding box calculations. Note that the text strings are exposed as UTF-8, and are therefore potentially
+ * multi-byte, and caret-to-byte offset mapping makes no assumptions about the character length; also bounding box
+ * glyph-to-offset mapping may be complex for languages which use ligatures.
+ */
+
+class Text : public Glib::Interface
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef Text CppObjectType;
+ typedef Text_Class CppClassType;
+ typedef AtkText BaseObjectType;
+ typedef AtkTextIface BaseClassType;
+
+private:
+ friend class Text_Class;
+ static CppClassType text_class_;
+
+ // noncopyable
+ Text(const Text&);
+ Text& operator=(const Text&);
+
+protected:
+ Text(); // you must derive from this class
+ explicit Text(AtkText* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~Text();
+
+ static void add_interface(GType gtype_implementer);
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ AtkText* gobj() { return reinterpret_cast<AtkText*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const AtkText* gobj() const { return reinterpret_cast<AtkText*>(gobject_); }
+
+private:
+
+
+public:
+
+ /** Gets the specified text.
+ * @param start_offset Start position.
+ * @param end_offset End position.
+ * @return The text from @a start_offset up to, but not including @a end_offset .
+ */
+ Glib::ustring get_text(int start_offset, int end_offset) const;
+
+ /** Gets the specified text.
+ * @param offset Position.
+ * @return The character at @a offset .
+ */
+ gunichar get_character_at_offset(int offset) const;
+
+ /** Gets the specified text.
+ *
+ * If the boundary_type if ATK_TEXT_BOUNDARY_CHAR the character after the
+ * offset is returned.
+ *
+ * If the boundary_type is ATK_TEXT_BOUNDARY_WORD_START the returned string
+ * is from the word start after the offset to the next word start.
+ *
+ * The returned string will contain the word after the offset if the offset
+ * is inside a word or if the offset is not inside a word.
+ *
+ * If the boundary_type is ATK_TEXT_BOUNDARY_WORD_END the returned string
+ * is from the word end at or after the offset to the next work end.
+ *
+ * The returned string will contain the word after the offset if the offset
+ * is inside a word and will contain the word after the word after the offset
+ * if the offset is not inside a word.
+ *
+ * If the boundary type is ATK_TEXT_BOUNDARY_SENTENCE_START the returned
+ * string is from the sentence start after the offset to the next sentence
+ * start.
+ *
+ * The returned string will contain the sentence after the offset if the offset
+ * is inside a sentence or if the offset is not inside a sentence.
+ *
+ * If the boundary_type is ATK_TEXT_BOUNDARY_SENTENCE_END the returned string
+ * is from the sentence end at or after the offset to the next sentence end.
+ *
+ * The returned string will contain the sentence after the offset if the offset
+ * is inside a sentence and will contain the sentence after the sentence
+ * after the offset if the offset is not inside a sentence.
+ *
+ * If the boundary type is ATK_TEXT_BOUNDARY_LINE_START the returned
+ * string is from the line start after the offset to the next line start.
+ *
+ * If the boundary_type is ATK_TEXT_BOUNDARY_LINE_END the returned string
+ * is from the line end at or after the offset to the next line start.
+ * @param offset Position.
+ * @param boundary_type An Atk::TextBoundary.
+ * @param start_offset The start offset of the returned string.
+ * @param end_offset The end offset of the returned string.
+ * @return The text after @a offset bounded by the specified @a boundary_type .
+ */
+ Glib::ustring get_text_after_offset(int offset, TextBoundary boundary_type, int& start_offset, int& end_offset) const;
+
+ /** Gets the specified text.
+ *
+ * If the boundary_type if ATK_TEXT_BOUNDARY_CHAR the character at the
+ * offset is returned.
+ *
+ * If the boundary_type is ATK_TEXT_BOUNDARY_WORD_START the returned string
+ * is from the word start at or before the offset to the word start after
+ * the offset.
+ *
+ * The returned string will contain the word at the offset if the offset
+ * is inside a word and will contain the word before the offset if the
+ * offset is not inside a word.
+ *
+ * If the boundary_type is ATK_TEXT_BOUNDARY_WORD_END the returned string
+ * is from the word end before the offset to the word end at or after the
+ * offset.
+ *
+ * The returned string will contain the word at the offset if the offset
+ * is inside a word and will contain the word after to the offset if the
+ * offset is not inside a word.
+ *
+ * If the boundary type is ATK_TEXT_BOUNDARY_SENTENCE_START the returned
+ * string is from the sentence start at or before the offset to the sentence
+ * start after the offset.
+ *
+ * The returned string will contain the sentence at the offset if the offset
+ * is inside a sentence and will contain the sentence before the offset
+ * if the offset is not inside a sentence.
+ *
+ * If the boundary_type is ATK_TEXT_BOUNDARY_SENTENCE_END the returned string
+ * is from the sentence end before the offset to the sentence end at or
+ * after the offset.
+ *
+ * The returned string will contain the sentence at the offset if the offset
+ * is inside a sentence and will contain the sentence after the offset
+ * if the offset is not inside a sentence.
+ *
+ * If the boundary type is ATK_TEXT_BOUNDARY_LINE_START the returned
+ * string is from the line start at or before the offset to the line
+ * start after the offset.
+ *
+ * If the boundary_type is ATK_TEXT_BOUNDARY_LINE_END the returned string
+ * is from the line end before the offset to the line end at or after
+ * the offset.
+ * @param offset Position.
+ * @param boundary_type An Atk::TextBoundary.
+ * @param start_offset The start offset of the returned string.
+ * @param end_offset The end offset of the returned string.
+ * @return The text at @a offset bounded by the specified @a boundary_type .
+ */
+ Glib::ustring get_text_at_offset(int offset, TextBoundary boundary_type, int& start_offset, int& end_offset) const;
+
+ /** Gets the specified text.
+ *
+ * If the boundary_type if ATK_TEXT_BOUNDARY_CHAR the character before the
+ * offset is returned.
+ *
+ * If the boundary_type is ATK_TEXT_BOUNDARY_WORD_START the returned string
+ * is from the word start before the word start before the offset to
+ * the word start before the offset.
+ *
+ * The returned string will contain the word before the offset if the offset
+ * is inside a word and will contain the word before the word before the
+ * offset if the offset is not inside a word.
+ *
+ * If the boundary_type is ATK_TEXT_BOUNDARY_WORD_END the returned string
+ * is from the word end before the word end at or before the offset to the
+ * word end at or before the offset.
+ *
+ * The returned string will contain the word before the offset if the offset
+ * is inside a word or if the offset is not inside a word.
+ *
+ * If the boundary type is ATK_TEXT_BOUNDARY_SENTENCE_START the returned
+ * string is from the sentence start before the sentence start before
+ * the offset to the sentence start before the offset.
+ *
+ * The returned string will contain the sentence before the offset if the
+ * offset is inside a sentence and will contain the sentence before the
+ * sentence before the offset if the offset is not inside a sentence.
+ *
+ * If the boundary_type is ATK_TEXT_BOUNDARY_SENTENCE_END the returned string
+ * is from the sentence end before the sentence end at or before the offset to
+ * the sentence end at or before the offset.
+ *
+ * The returned string will contain the sentence before the offset if the
+ * offset is inside a sentence or if the offset is not inside a sentence.
+ *
+ * If the boundary type is ATK_TEXT_BOUNDARY_LINE_START the returned
+ * string is from the line start before the line start ar or before the offset
+ * to the line start ar or before the offset.
+ *
+ * If the boundary_type is ATK_TEXT_BOUNDARY_LINE_END the returned string
+ * is from the line end before the line end before the offset to the
+ * line end before the offset.
+ * @param offset Position.
+ * @param boundary_type An Atk::TextBoundary.
+ * @param start_offset The start offset of the returned string.
+ * @param end_offset The end offset of the returned string.
+ * @return The text before @a offset bounded by the specified @a boundary_type .
+ */
+ Glib::ustring get_text_before_offset(int offset, TextBoundary boundary_type, int& start_offset, int& end_offset) const;
+
+ /** Gets the offset position of the caret (cursor).
+ * @return The offset position of the caret (cursor).
+ */
+ int get_caret_offset() const;
+
+ /** Get the bounding box containing the glyph representing the character at
+ * a particular text offset.
+ * @param offset The offset of the text character for which bounding information is required.
+ * @param x Pointer for the x cordinate of the bounding box.
+ * @param y Pointer for the y cordinate of the bounding box.
+ * @param width Pointer for the width of the bounding box.
+ * @param height Pointer for the height of the bounding box.
+ * @param coords Specify whether coordinates are relative to the screen or widget window.
+ */
+ void get_character_extents(int offset, int& x, int& y, int& width, int& height, CoordType coords) const;
+
+ /** Creates an Atk::AttributeSet which consists of the attributes explicitly
+ * set at the position @a offset in the text. @a start_offset and @a end_offset are
+ * set to the start and end of the range around @a offset where the attributes are
+ * invariant. See the enum AtkTextAttribute for types of text attributes that
+ * can be returned. Note that other attributes may also be returned.
+ * @param offset The offset at which to get the attributes.
+ * @param start_offset The address to put the start offset of the range.
+ * @param end_offset The address to put the end offset of the range.
+ * @return An Atk::AttributeSet which contains the attributes explicitly set
+ * at @a offset .
+ */
+ AttributeSet get_run_attributes(int offset, int& start_offset, int& end_offset) const;
+
+ /** Creates an Atk::AttributeSet which consists of the default values of
+ * attributes for the text. See the enum AtkTextAttribute for types of text
+ * attributes that can be returned. Note that other attributes may also be
+ * returned.
+ * @return An Atk::AttributeSet which contains the default values of attributes.
+ * at @a offset .
+ */
+ AttributeSet get_default_attributes() const;
+
+ /** Gets the character count.
+ * @return The number of characters.
+ */
+ int get_character_count() const;
+
+ /** Gets the offset of the character located at coordinates @a x and @a y . @a x and @a y
+ * are interpreted as being relative to the screen or this widget's window
+ * depending on @a coords .
+ * @param x Screen x-position of character.
+ * @param y Screen y-position of character.
+ * @param coords Specify whether coordinates are relative to the screen or
+ * widget window.
+ * @return The offset to the character which is located at
+ * the specified @a x and @a y coordinates.
+ */
+ int get_offset_at_point(int x, int y, CoordType coords) const;
+
+ /** Gets the number of selected regions.
+ * @return The number of selected regions, or -1 if a failure
+ * occurred.
+ */
+ int get_n_selections() const;
+
+ /** Gets the text from the specified selection.
+ * @param selection_num The selection number. The selected regions are
+ * assigned numbers that correspond to how far the region is from the
+ * start of the text. The selected region closest to the beginning
+ * of the text region is assigned the number 0, etc. Note that adding,
+ * moving or deleting a selected region can change the numbering.
+ * @param start_offset Passes back the start position of the selected region.
+ * @param end_offset Passes back the end position of the selected region.
+ * @return The selected text.
+ */
+ Glib::ustring get_selection(int selection_num, int& start_offset, int& end_offset) const;
+
+ /** Adds a selection bounded by the specified offsets.
+ * @param start_offset The start position of the selected region.
+ * @param end_offset The end position of the selected region.
+ * @return <tt>true</tt> if success, <tt>false</tt> otherwise.
+ */
+ bool add_selection(int start_offset, int end_offset);
+
+ /** Removes the specified selection.
+ * @param selection_num The selection number. The selected regions are
+ * assigned numbers that correspond to how far the region is from the
+ * start of the text. The selected region closest to the beginning
+ * of the text region is assigned the number 0, etc. Note that adding,
+ * moving or deleting a selected region can change the numbering.
+ * @return <tt>true</tt> if success, <tt>false</tt> otherwise.
+ */
+ bool remove_selection(int selection_num);
+
+ /** Changes the start and end offset of the specified selection.
+ * @param selection_num The selection number. The selected regions are
+ * assigned numbers that correspond to how far the region is from the
+ * start of the text. The selected region closest to the beginning
+ * of the text region is assigned the number 0, etc. Note that adding,
+ * moving or deleting a selected region can change the numbering.
+ * @param start_offset The new start position of the selection.
+ * @param end_offset The new end position of the selection.
+ * @return <tt>true</tt> if success, <tt>false</tt> otherwise.
+ */
+ bool set_selection(int selection_num, int start_offset, int end_offset);
+
+ /** Sets the caret (cursor) position to the specified @a offset .
+ * @param offset Position.
+ * @return <tt>true</tt> if success, <tt>false</tt> otherwise.
+ */
+ bool set_caret_offset(int offset);
+
+ typedef AtkTextRectangle Rectangle;
+
+
+ /** Get the bounding box for text within the specified range.
+ * @param start_offset The offset of the first text character for which boundary
+ * information is required.
+ * @param end_offset The offset of the text character after the last character
+ * for which boundary information is required.
+ * @param coord_type Specify whether coordinates are relative to the screen or widget window.
+ * @param rect A pointer to a AtkTextRectangle which is filled in by this function.
+ */
+ void get_range_extents(int start_offset, int end_offset,
+ CoordType coord_type,
+ Rectangle& rect);
+
+ /** Get the ranges of text in the specified bounding box.
+ * @param rect An AtkTextRectagle giving the dimensions of the bounding box.
+ * @param coord_type Specify whether coordinates are relative to the screen or widget window.
+ * @param x_clip_type Specify the horizontal clip type.
+ * @param y_clip_type Specify the vertical clip type.
+ * @return Array of AtkTextRange. The last element of the array returned
+ * by this function will be <tt>0</tt>.
+ */
+ AtkTextRange** get_bounded_ranges(const Rectangle& rect, CoordType coord_type,
+ TextClipType x_clip_type, TextClipType y_clip_type);
+
+
+ Glib::SignalProxy2< void,int,int > signal_text_changed();
+
+
+ Glib::SignalProxy1< void,int > signal_text_caret_moved();
+
+
+ Glib::SignalProxy0< void > signal_text_selection_changed();
+
+
+ Glib::SignalProxy0< void > signal_text_attributes_changed();
+
+
+protected:
+
+
+ virtual Glib::ustring get_text_vfunc(int start_offset, int end_offset) const;
+ virtual gunichar get_character_at_offset_vfunc(int offset) const;
+ virtual Glib::ustring get_text_after_offset_vfunc(int offset, TextBoundary boundary_type, int& start_offset, int& end_offset) const;
+ virtual Glib::ustring get_text_at_offset_vfunc(int offset, TextBoundary boundary_type, int& start_offset, int& end_offset) const;
+ virtual Glib::ustring get_text_before_offset_vfunc(int offset, TextBoundary boundary_type, int& start_offset, int& end_offset) const;
+ virtual int get_caret_offset_vfunc() const;
+ virtual void get_character_extents_vfunc(int offset, int& x, int& y, int& width, int& height, CoordType coords) const;
+ virtual AtkAttributeSet* get_run_attributes_vfunc(int offset, int& start_offset, int& end_offset) const;
+ virtual AtkAttributeSet* get_default_attributes_vfunc() const;
+ virtual int get_character_count_vfunc() const;
+ virtual int get_offset_at_point_vfunc(int x, int y, CoordType coords) const;
+ virtual int get_n_selections_vfunc() const;
+ virtual Glib::ustring get_selection_vfunc(int selection_num, int& start_offset, int& end_offset) const;
+ virtual bool add_selection_vfunc(int start_offset, int end_offset);
+ virtual bool remove_selection_vfunc(int selection_num);
+ virtual bool set_selection_vfunc(int selection_num, int start_offset, int end_offset);
+ virtual bool set_caret_offset_vfunc(int offset);
+
+ //TODO: Add get_range_extents(), and get_bounded_ranges() vfuncs when we can break ABI.
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_text_changed(int position, int length);
+ virtual void on_text_caret_moved(int location);
+ virtual void on_text_selection_changed();
+ virtual void on_text_attributes_changed();
+
+
+};
+
+} // namespace Atk
+
+
+namespace Glib
+{
+ /** @relates Atk::Text
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Atk::Text> wrap(AtkText* object, bool take_copy = false);
+
+} // namespace Glib
+
+#endif /* _ATKMM_TEXT_H */
+
diff --git a/libs/gtkmm2/atk/atkmm/value.cc b/libs/gtkmm2/atk/atkmm/value.cc
new file mode 100644
index 0000000000..eeff7dfd2f
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/value.cc
@@ -0,0 +1,340 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <atkmm/value.h>
+#include <atkmm/private/value_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <atk/atkvalue.h>
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Atk::Value> wrap(AtkValue* object, bool take_copy)
+{
+ return Glib::RefPtr<Atk::Value>( dynamic_cast<Atk::Value*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} // namespace Glib
+
+
+namespace Atk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Interface_Class& Value_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Interface_Class has to know the interface init function
+ // in order to add interfaces to implementing types.
+ class_init_func_ = &Value_Class::iface_init_function;
+
+ // We can not derive from another interface, and it is not necessary anyway.
+ gtype_ = atk_value_get_type();
+ }
+
+ return *this;
+}
+
+void Value_Class::iface_init_function(void* g_iface, void*)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_iface);
+
+ //This is just to avoid an "unused variable" warning when there are no vfuncs or signal handlers to connect.
+ //This is a temporary fix until I find out why I can not seem to derive a GtkFileChooser interface. murrayc
+ g_assert(klass != 0);
+
+ klass->get_current_value = &get_current_value_vfunc_callback;
+ klass->get_maximum_value = &get_maximum_value_vfunc_callback;
+ klass->get_minimum_value = &get_minimum_value_vfunc_callback;
+ klass->set_current_value = &set_current_value_vfunc_callback;
+}
+
+void Value_Class::get_current_value_vfunc_callback(AtkValue* self, GValue* value)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->get_current_value_vfunc(*reinterpret_cast<Glib::ValueBase*>(value)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_current_value)
+ (*base->get_current_value)(self, value);
+ }
+}
+
+void Value_Class::get_maximum_value_vfunc_callback(AtkValue* self, GValue* value)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->get_maximum_value_vfunc(*reinterpret_cast<Glib::ValueBase*>(value)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_maximum_value)
+ (*base->get_maximum_value)(self, value);
+ }
+}
+
+void Value_Class::get_minimum_value_vfunc_callback(AtkValue* self, GValue* value)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->get_minimum_value_vfunc(*reinterpret_cast<Glib::ValueBase*>(value)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_minimum_value)
+ (*base->get_minimum_value)(self, value);
+ }
+}
+
+gboolean Value_Class::set_current_value_vfunc_callback(AtkValue* self, const GValue* value)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->set_current_value_vfunc(*reinterpret_cast<const Glib::ValueBase*>(value)
+));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->set_current_value)
+ return (*base->set_current_value)(self, value);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+
+Glib::ObjectBase* Value_Class::wrap_new(GObject* object)
+{
+ return new Value((AtkValue*)(object));
+}
+
+
+/* The implementation: */
+
+Value::Value()
+:
+ Glib::Interface(value_class_.init())
+{}
+
+Value::Value(AtkValue* castitem)
+:
+ Glib::Interface((GObject*)(castitem))
+{}
+
+Value::~Value()
+{}
+
+// static
+void Value::add_interface(GType gtype_implementer)
+{
+ value_class_.init().add_interface(gtype_implementer);
+}
+
+Value::CppClassType Value::value_class_; // initialize static member
+
+GType Value::get_type()
+{
+ return value_class_.init().get_type();
+}
+
+GType Value::get_base_type()
+{
+ return atk_value_get_type();
+}
+
+
+void Value::get_current_value(Glib::ValueBase& value) const
+{
+ atk_value_get_current_value(const_cast<AtkValue*>(gobj()), (value).gobj());
+}
+
+void Value::get_maximum_value(Glib::ValueBase& value) const
+{
+ atk_value_get_maximum_value(const_cast<AtkValue*>(gobj()), (value).gobj());
+}
+
+void Value::get_minimum_value(Glib::ValueBase& value) const
+{
+ atk_value_get_minimum_value(const_cast<AtkValue*>(gobj()), (value).gobj());
+}
+
+bool Value::set_current_value(const Glib::ValueBase& value)
+{
+ return atk_value_set_current_value(gobj(), (value).gobj());
+}
+
+
+void Atk::Value::get_current_value_vfunc(Glib::ValueBase& value) const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_current_value)
+ (*base->get_current_value)(const_cast<AtkValue*>(gobj()),(value).gobj());
+}
+
+void Atk::Value::get_maximum_value_vfunc(Glib::ValueBase& value) const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_maximum_value)
+ (*base->get_maximum_value)(const_cast<AtkValue*>(gobj()),(value).gobj());
+}
+
+void Atk::Value::get_minimum_value_vfunc(Glib::ValueBase& value) const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_minimum_value)
+ (*base->get_minimum_value)(const_cast<AtkValue*>(gobj()),(value).gobj());
+}
+
+bool Atk::Value::set_current_value_vfunc(const Glib::ValueBase& value)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->set_current_value)
+ return (*base->set_current_value)(gobj(),(value).gobj());
+
+ typedef bool RType;
+ return RType();
+}
+
+
+} // namespace Atk
+
+
diff --git a/libs/gtkmm2/atk/atkmm/value.h b/libs/gtkmm2/atk/atkmm/value.h
new file mode 100644
index 0000000000..25615dd92e
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/value.h
@@ -0,0 +1,157 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _ATKMM_VALUE_H
+#define _ATKMM_VALUE_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C"
+{
+ typedef struct _AtkValueIface AtkValueIface;
+ typedef struct _AtkValue AtkValue;
+}
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _AtkValue AtkValue;
+typedef struct _AtkValueClass AtkValueClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Atk
+{ class Value_Class; } // namespace Atk
+namespace Atk
+{
+
+/** The ATK interface implemented by valuators and components which display or select a value from a bounded range of values.
+ * This should be implemented for components which either display a value from a bounded range, or which allow the user
+ * to specify a value from a bounded range, or both. For instance, most sliders and range controls, as well as dials,
+ * should have Atk::Object representations which implement Atk::Value on the component's behalf. Atk::Values may be
+ * read-only, in which case attempts to alter the value return false to indicate failure.
+ */
+
+class Value : public Glib::Interface
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef Value CppObjectType;
+ typedef Value_Class CppClassType;
+ typedef AtkValue BaseObjectType;
+ typedef AtkValueIface BaseClassType;
+
+private:
+ friend class Value_Class;
+ static CppClassType value_class_;
+
+ // noncopyable
+ Value(const Value&);
+ Value& operator=(const Value&);
+
+protected:
+ Value(); // you must derive from this class
+ explicit Value(AtkValue* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~Value();
+
+ static void add_interface(GType gtype_implementer);
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ AtkValue* gobj() { return reinterpret_cast<AtkValue*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const AtkValue* gobj() const { return reinterpret_cast<AtkValue*>(gobject_); }
+
+private:
+
+
+public:
+
+ /** Gets the value of this object.
+ * @param value A G::Value representing the current accessible value.
+ */
+ void get_current_value(Glib::ValueBase& value) const;
+
+ /** Gets the maximum value of this object.
+ * @param value A G::Value representing the maximum accessible value.
+ */
+ void get_maximum_value(Glib::ValueBase& value) const;
+
+ /** Gets the minimum value of this object.
+ * @param value A G::Value representing the minimum accessible value.
+ */
+ void get_minimum_value(Glib::ValueBase& value) const;
+
+ /** Sets the value of this object.
+ * @param value A G::Value which is the desired new accessible value.
+ * @return <tt>true</tt> if new value is successfully set, <tt>false</tt> otherwise.
+ */
+ bool set_current_value(const Glib::ValueBase& value);
+
+protected:
+ virtual void get_current_value_vfunc(Glib::ValueBase& value) const;
+ virtual void get_maximum_value_vfunc(Glib::ValueBase& value) const;
+ virtual void get_minimum_value_vfunc(Glib::ValueBase& value) const;
+ virtual bool set_current_value_vfunc(const Glib::ValueBase& value);
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+};
+
+} // namespace Atk
+
+
+namespace Glib
+{
+ /** @relates Atk::Value
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Atk::Value> wrap(AtkValue* object, bool take_copy = false);
+
+} // namespace Glib
+
+#endif /* _ATKMM_VALUE_H */
+
diff --git a/libs/gtkmm2/atk/atkmm/wrap_init.cc b/libs/gtkmm2/atk/atkmm/wrap_init.cc
new file mode 100644
index 0000000000..1c72a15488
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/wrap_init.cc
@@ -0,0 +1,91 @@
+
+#include <glib.h>
+
+// Disable the 'const' function attribute of the get_type() functions.
+// GCC would optimize them out because we don't use the return value.
+#undef G_GNUC_CONST
+#define G_GNUC_CONST /* empty */
+
+#include <atkmm/wrap_init.h>
+#include <glibmm/error.h>
+#include <glibmm/object.h>
+
+// #include the widget headers so that we can call the get_type() static methods:
+
+#include "action.h"
+#include "component.h"
+#include "document.h"
+#include "editabletext.h"
+#include "hyperlink.h"
+#include "hypertext.h"
+#include "image.h"
+#include "implementor.h"
+#include "noopobject.h"
+#include "object.h"
+#include "objectaccessible.h"
+#include "relation.h"
+#include "relationset.h"
+#include "selection.h"
+#include "stateset.h"
+#include "streamablecontent.h"
+#include "table.h"
+#include "text.h"
+#include "value.h"
+
+extern "C"
+{
+
+//Declarations of the *_get_type() functions:
+
+GType atk_hyperlink_get_type(void);
+GType atk_no_op_object_get_type(void);
+GType atk_object_get_type(void);
+GType atk_gobject_accessible_get_type(void);
+GType atk_relation_get_type(void);
+GType atk_relation_set_get_type(void);
+GType atk_state_set_get_type(void);
+
+//Declarations of the *_error_quark() functions:
+
+} // extern "C"
+
+
+//Declarations of the *_Class::wrap_new() methods, instead of including all the private headers:
+
+namespace Atk { class Hyperlink_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Atk { class NoOpObject_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Atk { class Object_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Atk { class ObjectAccessible_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Atk { class Relation_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Atk { class RelationSet_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Atk { class StateSet_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+
+namespace Atk {
+
+void wrap_init()
+{
+ // Register Error domains:
+
+// Map gtypes to gtkmm wrapper-creation functions:
+ Glib::wrap_register(atk_hyperlink_get_type(), &Atk::Hyperlink_Class::wrap_new);
+ Glib::wrap_register(atk_no_op_object_get_type(), &Atk::NoOpObject_Class::wrap_new);
+ Glib::wrap_register(atk_object_get_type(), &Atk::Object_Class::wrap_new);
+ Glib::wrap_register(atk_gobject_accessible_get_type(), &Atk::ObjectAccessible_Class::wrap_new);
+ Glib::wrap_register(atk_relation_get_type(), &Atk::Relation_Class::wrap_new);
+ Glib::wrap_register(atk_relation_set_get_type(), &Atk::RelationSet_Class::wrap_new);
+ Glib::wrap_register(atk_state_set_get_type(), &Atk::StateSet_Class::wrap_new);
+
+ // Register the gtkmm gtypes:
+ Atk::Hyperlink::get_type();
+ Atk::NoOpObject::get_type();
+ Atk::Object::get_type();
+ Atk::ObjectAccessible::get_type();
+ Atk::Relation::get_type();
+ Atk::RelationSet::get_type();
+ Atk::StateSet::get_type();
+
+} // wrap_init()
+
+} //Atk
+
+
diff --git a/libs/gtkmm2/atk/atkmm/wrap_init.h b/libs/gtkmm2/atk/atkmm/wrap_init.h
new file mode 100644
index 0000000000..2015280680
--- /dev/null
+++ b/libs/gtkmm2/atk/atkmm/wrap_init.h
@@ -0,0 +1,32 @@
+#ifndef _ATKMM_WRAP_INIT_H
+#define _ATKMM_WRAP_INIT_H
+
+/* wrap_init.h
+ *
+ * Copyright (C) 1998-2001 The Gtk-- Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+// wrap_init.cc is generated by tools/generate_wrap_init.pl
+
+namespace Atk
+{
+
+void wrap_init();
+
+} /* namespace Atk */
+
+#endif // _ATKMM_WRAP_INIT_H
diff --git a/libs/gtkmm2/gdk/.DS_Store b/libs/gtkmm2/gdk/.DS_Store
new file mode 100644
index 0000000000..5008ddfcf5
--- /dev/null
+++ b/libs/gtkmm2/gdk/.DS_Store
Binary files differ
diff --git a/libs/gtkmm2/gdk/SConscript b/libs/gtkmm2/gdk/SConscript
new file mode 100644
index 0000000000..05c5288d51
--- /dev/null
+++ b/libs/gtkmm2/gdk/SConscript
@@ -0,0 +1,10 @@
+import glob
+
+gdkmm2_files = glob.glob('gdkmm/*.cc')
+
+Import('env libraries')
+gdkmm2 = env.Copy()
+gdkmm2.Merge([libraries['glibmm2'], libraries['gtk2'], libraries['sigc2'], libraries['pangomm'], libraries['gtkmm2']])
+
+libgdkmm2 = gdkmm2.StaticLibrary('gdkmm2', gdkmm2_files)
+Default(libgdkmm2)
diff --git a/libs/gtkmm2/gdk/gdkmm.h b/libs/gtkmm2/gdk/gdkmm.h
new file mode 100644
index 0000000000..4af8eda3a0
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm.h
@@ -0,0 +1,48 @@
+// This is -*- C++ -*-
+
+/*
+ * gdkmm.h
+ *
+ * Copyright 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ */
+
+#ifndef _GDKMM_GDKMM_H_
+#define _GDKMM_GDKMM_H_
+
+#include <gdkmm/types.h>
+#include <gdkmm/visual.h>
+#include <gdkmm/gc.h>
+#include <gdkmm/drawable.h>
+#include <gdkmm/window.h>
+#include <gdkmm/pixbuf.h>
+#include <gdkmm/pixbufanimation.h>
+#include <gdkmm/pixbufformat.h>
+#include <gdkmm/pixbufloader.h>
+#include <gdkmm/pixmap.h>
+#include <gdkmm/bitmap.h>
+#include <gdkmm/image.h>
+#include <gdkmm/cursor.h>
+#include <gdkmm/rectangle.h>
+#include <gdkmm/display.h>
+#include <gdkmm/displaymanager.h>
+#include <gdkmm/screen.h>
+#include <gdkmm/general.h>
+#include <gdkmm/rgb.h>
+
+#endif /* _GDKMM_GDKMM_H_ */
+
diff --git a/libs/gtkmm2/gdk/gdkmm/bitmap.cc b/libs/gtkmm2/gdk/gdkmm/bitmap.cc
new file mode 100644
index 0000000000..27063537a6
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/bitmap.cc
@@ -0,0 +1,71 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gdkmm/bitmap.h>
+#include <gdkmm/private/bitmap_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gdk/gdkpixmap.h>
+#include <gdkmm/window.h>
+
+
+namespace Gdk
+{
+
+Bitmap::Bitmap(GdkBitmap* castitem)
+:
+ Pixmap((GdkPixmap*) castitem)
+{}
+
+Bitmap::Bitmap(const char* data, int width, int height)
+:
+ Pixmap((GdkPixmap*) gdk_bitmap_create_from_data(0, data, width, height))
+{}
+
+Bitmap::Bitmap(const Glib::RefPtr<Drawable>& drawable, const char* data, int width, int height)
+:
+ Pixmap((GdkPixmap*) gdk_bitmap_create_from_data(Glib::unwrap(drawable), data, width, height))
+{}
+
+} // namespace Gdk
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Gdk
+{
+
+
+Glib::RefPtr<Bitmap> Bitmap::create(const char* data, int width, int height)
+{
+ return Glib::RefPtr<Bitmap>( new Bitmap(data, width, height) );
+}
+Glib::RefPtr<Bitmap> Bitmap::create(const Glib::RefPtr<Gdk::Drawable>& drawable, const char* data, int width, int height)
+{
+ return Glib::RefPtr<Bitmap>( new Bitmap(drawable, data, width, height) );
+}
+
+} // namespace Gdk
+
+
diff --git a/libs/gtkmm2/gdk/gdkmm/bitmap.h b/libs/gtkmm2/gdk/gdkmm/bitmap.h
new file mode 100644
index 0000000000..57dc9fb087
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/bitmap.h
@@ -0,0 +1,79 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GDKMM_BITMAP_H
+#define _GDKMM_BITMAP_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gdkmm/pixmap.h>
+#include <gdk/gdkpixmap.h>
+
+
+namespace Gdk
+{
+
+class Window;
+
+// In GDK, GdkBitmap has the same type as GdkPixmap. Both are typedefed
+// to their base type GdkDrawable, but the real type is GdkPixmapObject.
+// A GdkBitmap is a GdkPixmap with a depth of 1.
+
+/** Bitmaps are simply pixmaps with a depth of 1. (That is, they are monochrome bitmaps - each pixel can be either on or off).
+ */
+class Bitmap : public Gdk::Pixmap
+{
+ // The Bitmap type only really exists in gtkmm. We fake its existence
+ // with a custom Gdk::Pixmap_Class::wrap_new() -- see comments there.
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Bitmap CppObjectType;
+ typedef GdkBitmap BaseObjectType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+private:
+
+
+protected:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ explicit Bitmap(GdkBitmap* castitem);
+ friend class Gdk::Pixmap_Class;
+#endif
+
+ Bitmap(const char* data, int width, int height);
+
+ Bitmap(const Glib::RefPtr<Gdk::Drawable>& drawable, const char* data, int width, int height);
+
+public:
+
+ static Glib::RefPtr<Bitmap> create(const char* data, int width, int height);
+
+
+ static Glib::RefPtr<Bitmap> create(const Glib::RefPtr<Gdk::Drawable>& drawable, const char* data, int width, int height);
+
+
+};
+
+} // namespace Gdk
+
+
+#endif /* _GDKMM_BITMAP_H */
+
diff --git a/libs/gtkmm2/gdk/gdkmm/color.cc b/libs/gtkmm2/gdk/gdkmm/color.cc
new file mode 100644
index 0000000000..06c8e70cf5
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/color.cc
@@ -0,0 +1,297 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gdkmm/color.h>
+#include <gdkmm/private/color_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gdkmm/colormap.h>
+#include <gdk/gdkcolor.h>
+#include <gdk/gdkrgb.h>
+
+namespace Gdk
+{
+
+Color::Color()
+{
+ GdkColor tmp = { 0, 0, 0, 0, };
+ gobject_ = gdk_color_copy(&tmp);
+}
+
+Color::Color(const Glib::ustring& value)
+{
+ GdkColor tmp = { 0, 0, 0, 0, };
+ gobject_ = gdk_color_copy(&tmp);
+
+ set(value);
+}
+
+void Color::set_grey(gushort value)
+{
+ gobject_->red = gobject_->green = gobject_->blue = value;
+}
+
+void Color::set_grey_p(double g)
+{
+ gobject_->red = gobject_->green = gobject_->blue = (gushort)(g * 65535.0);
+}
+
+void Color::set_rgb(gushort red_, gushort green_, gushort blue_)
+{
+ gobject_->red = red_;
+ gobject_->green = green_;
+ gobject_->blue = blue_;
+}
+
+void Color::set_rgb_p(double red_, double green_, double blue_)
+{
+ gobject_->red = (gushort)(red_ * 65535.0);
+ gobject_->green = (gushort)(green_ * 65535.0);
+ gobject_->blue = (gushort)(blue_ * 65535.0);
+}
+
+void Color::set_hsv(double h, double s, double v)
+{
+ //TODO: Comments/Documentation. I have no idea what this code does. murrayc.
+
+ h /= 60.0;
+ int i = (int)h;
+ double p = v * (1 - s);
+ double q = v * (1 - s * (h - i));
+ double t = v * (1 - s * (1 - h + i));
+
+ switch(i)
+ {
+ case 0:
+ set_rgb_p(v, t, p);
+ break;
+ case 1:
+ set_rgb_p(q, v, p);
+ break;
+ case 2:
+ set_rgb_p(p, v, t);
+ break;
+ case 3:
+ set_rgb_p(p, q, v);
+ break;
+ case 4:
+ set_rgb_p(t, p, v);
+ break;
+ default:
+ set_rgb_p(v, p, q);
+ }
+}
+
+void Color::set_hsl(double h, double s, double l)
+{
+ //TODO: Comments/Documentation. I have no idea what this code does. murrayc.
+
+ if(s == 0.0)
+ set_grey_p(l);
+ else
+ {
+ double t2 = (l < 0.5) ? l * (1.0 + s) : l + s - l * s;
+ double t1 = 2*l-t2;
+ h /= 360.0;
+
+ double tr = h + 1.0/3.0;
+ double tg = h;
+ double tb = h - 1.0/3.0;
+ if (tb < 0) tb += 1.0;
+
+ double r = 0.0, g = 0.0, b = 0.0;
+
+ if (tr < 1.0/6.0)
+ r = t1 +(t2-t1) * 6 * tr;
+ else if (tr < 1.0/2.0)
+ r = t2;
+ else if (tr < 2.0/3.0)
+ r = t1+(t2-t1)*(2.0/3.0 - tr) * 6.0;
+
+ if (tg < 1.0/6.0)
+ g = t1 + (t2 - t1) * 6 * tg;
+ else if (tg < 1.0/2.0)
+ g = t2;
+ else if (tg < 2.0/3.0)
+ g = t1+(t2-t1)*(2.0/3.0 - tg) * 6.0;
+
+ if (tb < 1.0/6.0)
+ b = t1 +(t2-t1) * 6 * tb;
+ else if (tb < 1.0/2.0)
+ b = t2;
+ else if (tb < 2.0/3.0)
+ b = t1+(t2-t1)*(2.0/3.0 - tb) * 6.0;
+
+ set_rgb_p(r, g, b);
+ }
+}
+
+bool Color::set(const Glib::ustring& value)
+{
+ return gdk_color_parse(value.c_str(), gobj());
+}
+
+bool Color::parse(const Glib::ustring& spec)
+{
+ return set(spec);
+}
+
+gushort Color::get_red() const
+{
+ return gobject_->red;
+}
+
+gushort Color::get_green() const
+{
+ return gobject_->green;
+
+}
+gushort Color::get_blue() const
+{
+ return gobject_->blue;
+}
+
+void Color::set_red(gushort value)
+{
+ gobject_->red = value;
+}
+
+void Color::set_green(gushort value)
+{
+ gobject_->green = value;
+}
+
+void Color::set_blue(gushort value)
+{
+ gobject_->blue = value;
+}
+
+void Color::rgb_find_color(const Glib::RefPtr<Gdk::Colormap>& map)
+{
+ gdk_rgb_find_color(map->gobj(), gobj());
+}
+
+guint Color::get_pixel() const
+{
+ return gobject_->pixel;
+}
+
+double Color::get_red_p() const
+{
+ return gobject_->red / 65535.0;
+}
+
+double Color::get_green_p() const
+{
+ return gobject_->green / 65535.0;
+}
+
+double Color::get_blue_p() const
+{
+ return gobject_->blue / 65535.0;
+}
+
+
+} //namespace Gdk
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gdk::Color wrap(GdkColor* object, bool take_copy)
+{
+ return Gdk::Color(object, take_copy);
+}
+
+} // namespace Glib
+
+
+namespace Gdk
+{
+
+
+// static
+GType Color::get_type()
+{
+ return gdk_color_get_type();
+}
+
+
+Color::Color(const Color& other)
+:
+ gobject_ ((other.gobject_) ? gdk_color_copy(other.gobject_) : 0)
+{}
+
+Color::Color(GdkColor* gobject, bool make_a_copy)
+:
+ // For BoxedType wrappers, make_a_copy is true by default. The static
+ // BoxedType wrappers must always take a copy, thus make_a_copy = true
+ // ensures identical behaviour if the default argument is used.
+ gobject_ ((make_a_copy && gobject) ? gdk_color_copy(gobject) : gobject)
+{}
+
+Color& Color::operator=(const Color& other)
+{
+ Color temp (other);
+ swap(temp);
+ return *this;
+}
+
+Color::~Color()
+{
+ if(gobject_)
+ gdk_color_free(gobject_);
+}
+
+void Color::swap(Color& other)
+{
+ GdkColor *const temp = gobject_;
+ gobject_ = other.gobject_;
+ other.gobject_ = temp;
+}
+
+GdkColor* Color::gobj_copy() const
+{
+ return gdk_color_copy(gobject_);
+}
+
+
+bool operator==(const Color& lhs, const Color& rhs)
+{
+ return (gdk_color_equal(lhs.gobj(), rhs.gobj()) != 0);
+}
+
+bool operator!=(const Color& lhs, const Color& rhs)
+{
+ return (gdk_color_equal(lhs.gobj(), rhs.gobj()) == 0);
+}
+
+
+} // namespace Gdk
+
+
diff --git a/libs/gtkmm2/gdk/gdkmm/color.h b/libs/gtkmm2/gdk/gdkmm/color.h
new file mode 100644
index 0000000000..c40ff67f25
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/color.h
@@ -0,0 +1,274 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GDKMM_COLOR_H
+#define _GDKMM_COLOR_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gdk/gdkcolor.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C" { typedef struct _GdkColor GdkColor; }
+#endif
+
+namespace Gdk
+{
+
+class Colormap;
+
+/** Gdk::Color is used to describe an allocated or unallocated color.
+ * It contains the following data:
+ * pixel: For allocated colors, the value used to draw this color on the screen.
+ * red: The red component of the color. This is a value between 0 and 65535, with 65535 indicating full intensitiy.
+ * green: The green component of the color.
+ * blue: The blue component of the color.
+ */
+class Color
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Color CppObjectType;
+ typedef GdkColor BaseObjectType;
+
+ static GType get_type() G_GNUC_CONST;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+ explicit Color(GdkColor* gobject, bool make_a_copy = true);
+
+ Color(const Color& other);
+ Color& operator=(const Color& other);
+
+ ~Color();
+
+ void swap(Color& other);
+
+ ///Provides access to the underlying C instance.
+ GdkColor* gobj() { return gobject_; }
+
+ ///Provides access to the underlying C instance.
+ const GdkColor* gobj() const { return gobject_; }
+
+ ///Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs.
+ GdkColor* gobj_copy() const;
+
+protected:
+ GdkColor* gobject_;
+
+private:
+
+public:
+
+
+ /** Instantiate a new Gdk::Color.
+ * You should then use the set methods and call Gdk::Colormap::alloc_color().
+ */
+ Color();
+
+ /** Instantiate a new Gdk::Color.
+ * The color is not allocated - you must call Gdk::Colormap::alloc_color() yourself.
+ * The text string can be in any of the forms accepted by XParseColor; these include names for a color from rgb.txt,
+ * such as DarkSlateGray, or a hex specification such as 305050.
+ * @param value the string specifying the color..
+ */
+ explicit Color(const Glib::ustring& value);
+
+ /** Set a grey color, by using the same value for all color components.
+ * @param value The value to be used for the red, green, and blue components.
+ */
+ void set_grey(gushort value);
+ void set_grey_p(double g);
+
+ /** Set the color, by specifying red, green, and blue color component values.
+ * @param red_ The red component of the color.
+ * @param green_ The green component of the color.
+ * @param blue_ The blue component of the color.
+ */
+ void set_rgb(gushort red_, gushort green_, gushort blue_);
+
+ /** Set the color, by specifying red, green, and blue color component values, as percentages.
+ * @param red_ The red component of the color, as a percentage.
+ * @param green_ The green component of the color, as a percentage.
+ * @param blue_ The blue component of the color, as a percentage.
+ */
+ void set_rgb_p(double red_, double green_, double blue_);
+
+ void set_hsv(double h, double s, double v);
+ void set_hsl(double h, double s, double l);
+
+ /** Parses a textual specification of a color and fills in the red, green, and blue values.
+ * The color is not allocated - you must call Gdk::Colormap::alloc_color() yourself.
+ * The text string can be in any of the forms accepted by XParseColor; these include names for a color from rgb.txt,
+ * such as DarkSlateGray, or a hex specification such as 305050.
+ *
+ * @param value the string specifying the color.
+ * @result true if the parsing succeeded.
+ */
+ bool set(const Glib::ustring& value);
+
+ #ifndef GDKMM_DEPRECATED
+ /**
+ * @deprecated See set().
+ */
+ bool parse(const Glib::ustring& spec);
+ #endif //GDKMM_DEPRECATED
+
+ /** Get the red component of the color.
+ * @result The red component of the color.
+ */
+ gushort get_red() const;
+
+ /** Get the green component of the color.
+ * @result The green component of the color.
+ */
+ gushort get_green() const;
+
+ /** Get the blue component of the color.
+ * @result The blue component of the color.
+ */
+ gushort get_blue() const;
+
+ /** Set the red component of the color.
+ * @param value The red component of the color.
+ */
+ void set_red(gushort value);
+
+ /** Set the green component of the color.
+ * @param value The green component of the color.
+ */
+ void set_green(gushort value);
+
+ /** Set the blue component of the color.
+ * @param value The blue component of the color.
+ */
+ void set_blue(gushort value);
+
+ /** This will fill in the pixel field with the best matching pixel from a color cube.
+ * The color is then ready to be used for drawing, e.g. you can call Gdk::GC::set_foreground() which expects pixel to be initialized.
+ * Call this after setting the red, green, and blue fields.
+ *
+ * In many cases, you can avoid this whole issue by calling Gdk::GC::set_rgb_fg_color() or Gdk::GC::set_rgb_bg_color(),
+ * which do not expect pixels to be initialized in advance. If you use those methods, there's no need for this method().
+ *
+ * @param map The colormap for the graphics context and drawable you're using to draw. If you're drawing to a Gtk::Widget, call Gtk::Widget::get_colormap().
+ */
+ void rgb_find_color(const Glib::RefPtr<Gdk::Colormap>& map);
+
+ /** Get the pixel value, for allocated colors.
+ * @result For allocated colors, the value used to draw this color on the screen.
+ */
+ guint get_pixel() const;
+
+ /** Get the red component of the color, as a percentage.
+ * @result The red component of the color, as a percentage.
+ */
+ double get_red_p() const;
+
+ /** Get the green component of the color, as a percentage.
+ * @result The green component of the color, as a percentage.
+ */
+ double get_green_p() const;
+
+ /** Get the blue component of the color, as a percentage.
+ * @result The blue component of the color, as a percentage.
+ */
+ double get_blue_p() const;
+
+
+};
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+/* These traits are for arrays of GdkColor structs -- not pointer arrays.
+ */
+struct ColorTraits
+{
+ typedef Gdk::Color CppType;
+ typedef GdkColor CType;
+ typedef GdkColor CTypeNonConst;
+
+ static CType to_c_type (const CppType& obj) { return *obj.gobj(); }
+ static CType to_c_type (const CType& obj) { return obj; }
+ static CppType to_cpp_type (const CType& obj) { return CppType(const_cast<CType*>(&obj), true); }
+ static void release_c_type (const CType&) {}
+};
+#endif //DOXYGEN_SHOULD_SKIP_THIS
+
+typedef Glib::ArrayHandle<Color,ColorTraits> ArrayHandle_Color;
+
+} // namespace Gdk
+
+
+namespace Gdk
+{
+
+/** @relates Gdk::Color
+ * @param lhs The left-hand side
+ * @param rhs The right-hand side
+ * @result The result
+ */
+bool operator==(const Color& lhs, const Color& rhs);
+
+/** @relates Gdk::Color
+ * @param lhs The left-hand side
+ * @param rhs The right-hand side
+ * @result The result
+ */
+bool operator!=(const Color& lhs, const Color& rhs);
+
+
+} // namespace Gdk
+
+
+namespace Gdk
+{
+
+/** @relates Gdk::Color
+ * @param lhs The left-hand side
+ * @param rhs The right-hand side
+ */
+inline void swap(Color& lhs, Color& rhs)
+ { lhs.swap(rhs); }
+
+} // namespace Gdk
+
+namespace Glib
+{
+
+/** @relates Gdk::Color
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+Gdk::Color wrap(GdkColor* object, bool take_copy = false);
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+template <>
+class Value<Gdk::Color> : public Glib::Value_Boxed<Gdk::Color>
+{};
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+} // namespace Glib
+
+#endif /* _GDKMM_COLOR_H */
+
diff --git a/libs/gtkmm2/gdk/gdkmm/colormap.cc b/libs/gtkmm2/gdk/gdkmm/colormap.cc
new file mode 100644
index 0000000000..af2d64aec1
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/colormap.cc
@@ -0,0 +1,209 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gdkmm/colormap.h>
+#include <gdkmm/private/colormap_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gdk/gdkcolor.h>
+
+namespace Gdk
+{
+
+Colormap::Colormap(const Glib::RefPtr<Visual>& visual, bool allocate)
+: Glib::Object( G_OBJECT( gdk_colormap_new(visual->gobj(), (gboolean)allocate) ) )
+ {}
+
+} /* namespace Gdk */
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Gdk::Colormap> wrap(GdkColormap* object, bool take_copy)
+{
+ return Glib::RefPtr<Gdk::Colormap>( dynamic_cast<Gdk::Colormap*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} /* namespace Glib */
+
+
+namespace Gdk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Colormap_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Colormap_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gdk_colormap_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Colormap_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* Colormap_Class::wrap_new(GObject* object)
+{
+ return new Colormap((GdkColormap*)object);
+}
+
+
+/* The implementation: */
+
+GdkColormap* Colormap::gobj_copy()
+{
+ reference();
+ return gobj();
+}
+
+Colormap::Colormap(const Glib::ConstructParams& construct_params)
+:
+ Glib::Object(construct_params)
+{}
+
+Colormap::Colormap(GdkColormap* castitem)
+:
+ Glib::Object((GObject*)(castitem))
+{}
+
+Colormap::~Colormap()
+{}
+
+
+Colormap::CppClassType Colormap::colormap_class_; // initialize static member
+
+GType Colormap::get_type()
+{
+ return colormap_class_.init().get_type();
+}
+
+GType Colormap::get_base_type()
+{
+ return gdk_colormap_get_type();
+}
+
+
+Glib::RefPtr<Colormap> Colormap::create(const Glib::RefPtr<Visual>& visual, bool allocate)
+{
+ return Glib::RefPtr<Colormap>( new Colormap(visual, allocate) );
+}
+Glib::RefPtr<Colormap> Colormap::get_system()
+{
+
+ Glib::RefPtr<Colormap> retvalue = Glib::wrap(gdk_colormap_get_system());
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+int Colormap::alloc_colors(ArrayHandle_Color& colors, int ncolors, bool writeable, bool best_match, Glib::ArrayHandle<bool>& success)
+{
+ return gdk_colormap_alloc_colors(gobj(), const_cast<GdkColor*>(colors.data()), ncolors, static_cast<int>(writeable), static_cast<int>(best_match), (gboolean*)(success.data()));
+}
+
+bool Colormap::alloc_color(Color& color, bool writeable, bool best_match)
+{
+ return gdk_colormap_alloc_color(gobj(), (color).gobj(), static_cast<int>(writeable), static_cast<int>(best_match));
+}
+
+void Colormap::free_colors(Color& colors, int ncolors)
+{
+ gdk_colormap_free_colors(gobj(), (colors).gobj(), ncolors);
+}
+
+void Colormap::query_color(gulong pixel, Color& result)
+{
+ gdk_colormap_query_color(gobj(), pixel, (result).gobj());
+}
+
+Glib::RefPtr<Visual> Colormap::get_visual()
+{
+
+ Glib::RefPtr<Visual> retvalue = Glib::wrap(gdk_colormap_get_visual(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const Visual> Colormap::get_visual() const
+{
+
+ Glib::RefPtr<const Visual> retvalue = Glib::wrap(gdk_colormap_get_visual(const_cast<GdkColormap*>(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<Screen> Colormap::get_screen()
+{
+
+ Glib::RefPtr<Screen> retvalue = Glib::wrap(gdk_colormap_get_screen(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const Screen> Colormap::get_screen() const
+{
+
+ Glib::RefPtr<const Screen> retvalue = Glib::wrap(gdk_colormap_get_screen(const_cast<GdkColormap*>(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+
+} // namespace Gdk
+
+
diff --git a/libs/gtkmm2/gdk/gdkmm/colormap.h b/libs/gtkmm2/gdk/gdkmm/colormap.h
new file mode 100644
index 0000000000..5f73acbf59
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/colormap.h
@@ -0,0 +1,227 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GDKMM_COLORMAP_H
+#define _GDKMM_COLORMAP_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* box.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/object.h>
+#include <gdkmm/visual.h>
+#include <gdkmm/color.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GdkColormap GdkColormap;
+typedef struct _GdkColormapClass GdkColormapClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gdk
+{ class Colormap_Class; } // namespace Gdk
+namespace Gdk
+{
+
+/** A Colormap is an object that contains the mapping between the color values stored in memory and the RGB values that are
+ * used to display color values. In general, colormaps only contain significant information for pseudo-color visuals, but
+ * even for other visual types, a colormap object is required in some circumstances.
+ *
+ * There are a couple of special colormaps that can be retrieved. The system colormap (retrieved with get_system()) is the
+ * default colormap of the system. If you are using GdkRGB, there is another colormap that is important - the colormap in
+ * which GdkRGB works, retrieved with Gdk::rgb_get_colormap(). However, when using GdkRGB, it is not generally necessary to
+ * allocate colors directly.
+ */
+
+class Colormap : public Glib::Object
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef Colormap CppObjectType;
+ typedef Colormap_Class CppClassType;
+ typedef GdkColormap BaseObjectType;
+ typedef GdkColormapClass BaseClassType;
+
+private: friend class Colormap_Class;
+ static CppClassType colormap_class_;
+
+private:
+ // noncopyable
+ Colormap(const Colormap&);
+ Colormap& operator=(const Colormap&);
+
+protected:
+ explicit Colormap(const Glib::ConstructParams& construct_params);
+ explicit Colormap(GdkColormap* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~Colormap();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ GdkColormap* gobj() { return reinterpret_cast<GdkColormap*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const GdkColormap* gobj() const { return reinterpret_cast<GdkColormap*>(gobject_); }
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ GdkColormap* gobj_copy();
+
+private:
+
+
+protected:
+ explicit Colormap(const Glib::RefPtr<Visual>& visual, bool allocate);
+
+public:
+
+
+ static Glib::RefPtr<Colormap> create(const Glib::RefPtr<Visual>& visual, bool allocate);
+
+
+ /** Gets the system's default colormap for the default screen. (See
+ * gdk_colormap_get_system_for_screen())
+ * @return The default colormap.
+ */
+ static Glib::RefPtr<Colormap> get_system();
+
+ //_WRAP_METHOD(void change(int ncolors), gdk_colormap_change)
+
+ // Both 'GdkColor* colors' and 'gboolean* success' are _array_ output arguments.
+
+
+ /** Allocates colors from a colormap.
+ * @param colors The color values to allocate. On return, the pixel
+ * values for allocated colors will be filled in.
+ * @param ncolors The number of colors in @a colors .
+ * @param writeable If <tt>true</tt>, the colors are allocated writeable
+ * (their values can later be changed using gdk_color_change()).
+ * Writeable colors cannot be shared between applications.
+ * @param best_match If <tt>true</tt>, GDK will attempt to do matching against
+ * existing colors if the colors cannot be allocated as requested.
+ * @param success An array of length @a ncolors . On return, this
+ * indicates whether the corresponding color in @a colors was
+ * successfully allocated or not.
+ * @return The number of colors that were not successfully
+ * allocated.
+ */
+ int alloc_colors(ArrayHandle_Color& colors, int ncolors, bool writeable, bool best_match, Glib::ArrayHandle<bool>& success);
+
+
+ /** Allocates a single color from a colormap.
+ * @param color The color to allocate. On return the
+ * &lt;structfield&gt;pixel&lt;/structfield&gt; field will be
+ * filled in if allocation succeeds.
+ * @param writeable If <tt>true</tt>, the color is allocated writeable
+ * (their values can later be changed using gdk_color_change()).
+ * Writeable colors cannot be shared between applications.
+ * @param best_match If <tt>true</tt>, GDK will attempt to do matching against
+ * existing colors if the color cannot be allocated as requested.
+ * @return <tt>true</tt> if the allocation succeeded.
+ */
+ bool alloc_color(Color& color, bool writeable = false, bool best_match = true);
+
+ /** Frees previously allocated colors.
+ * @param colors The colors to free.
+ * @param ncolors The number of colors in @a colors .
+ */
+ void free_colors(Color& colors, int ncolors);
+
+ /** Locates the RGB color in @a colormap corresponding to the given
+ * hardware pixel @a pixel . @a pixel must be a valid pixel in the
+ * colormap; it's a programmer error to call this function with a
+ * pixel which is not in the colormap. Hardware pixels are normally
+ * obtained from alloc_colors(), or from a Gdk::Image. (A
+ * Gdk::Image contains image data in hardware format, a Gdk::Pixbuf
+ * contains image data in a canonical 24-bit RGB format.)
+ *
+ * This function is rarely useful; it's used for example to
+ * implement the eyedropper feature in Gtk::ColorSelection.
+ * @param pixel Pixel value in hardware display format.
+ * @param result Gdk::Color with red, green, blue fields initialized.
+ */
+ void query_color (gulong pixel, Color& result);
+
+
+ /** Returns the visual for which a given colormap was created.
+ * @return The visual of the colormap.
+ */
+ Glib::RefPtr<Visual> get_visual();
+
+ /** Returns the visual for which a given colormap was created.
+ * @return The visual of the colormap.
+ */
+ Glib::RefPtr<const Visual> get_visual() const;
+
+
+ /** Gets the screen for which this colormap was created.
+ * @return The screen for which this colormap was created.
+ *
+ * Since: 2.2.
+ */
+ Glib::RefPtr<Screen> get_screen();
+
+ /** Gets the screen for which this colormap was created.
+ * @return The screen for which this colormap was created.
+ *
+ * Since: 2.2.
+ */
+ Glib::RefPtr<const Screen> get_screen() const;
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+};
+
+} /* namespace Gdk */
+
+
+namespace Glib
+{
+ /** @relates Gdk::Colormap
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Gdk::Colormap> wrap(GdkColormap* object, bool take_copy = false);
+}
+
+
+#endif /* _GDKMM_COLORMAP_H */
+
diff --git a/libs/gtkmm2/gdk/gdkmm/cursor.cc b/libs/gtkmm2/gdk/gdkmm/cursor.cc
new file mode 100644
index 0000000000..1a8e639472
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/cursor.cc
@@ -0,0 +1,161 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gdkmm/cursor.h>
+#include <gdkmm/private/cursor_p.h>
+
+#include <gdk/gdkenumtypes.h>
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gdk/gdkcursor.h>
+
+namespace Gdk
+{
+
+Cursor::Cursor(CursorType cursor_type)
+{
+ gobject_ = gdk_cursor_new((GdkCursorType)cursor_type);
+}
+
+Cursor::Cursor(const Glib::RefPtr<Pixmap>& source, const Glib::RefPtr<Pixmap>& mask,
+ const Color& fg, const Color& bg,
+ int x, int y)
+{
+ gobject_ = gdk_cursor_new_from_pixmap(source->gobj(), mask->gobj(),
+ const_cast<GdkColor*>(fg.gobj()),
+ const_cast<GdkColor*>(bg.gobj()),
+ x, y);
+}
+
+Cursor::Cursor(const Glib::RefPtr<Display>& display, CursorType cursor_type)
+{
+ gobject_ = gdk_cursor_new_for_display(display->gobj(), (GdkCursorType)cursor_type);
+}
+
+Cursor::Cursor(const Glib::RefPtr<Display>& display, const Glib::RefPtr<Pixbuf>& pixbuf, int x, int y)
+{
+ gobject_ = gdk_cursor_new_from_pixbuf(display->gobj(), pixbuf->gobj(), x, y);
+}
+
+} //namespace Gdk
+
+
+namespace
+{
+} // anonymous namespace
+
+// static
+GType Glib::Value<Gdk::CursorType>::value_type()
+{
+ return gdk_cursor_type_get_type();
+}
+
+
+namespace Glib
+{
+
+Gdk::Cursor wrap(GdkCursor* object, bool take_copy)
+{
+ return Gdk::Cursor(object, take_copy);
+}
+
+} // namespace Glib
+
+
+namespace Gdk
+{
+
+
+// static
+GType Cursor::get_type()
+{
+ return gdk_cursor_get_type();
+}
+
+Cursor::Cursor()
+:
+ gobject_ (0) // Allows creation of invalid wrapper, e.g. for output arguments to methods.
+{}
+
+Cursor::Cursor(const Cursor& other)
+:
+ gobject_ ((other.gobject_) ? gdk_cursor_ref(other.gobject_) : 0)
+{}
+
+Cursor::Cursor(GdkCursor* gobject, bool make_a_copy)
+:
+ // For BoxedType wrappers, make_a_copy is true by default. The static
+ // BoxedType wrappers must always take a copy, thus make_a_copy = true
+ // ensures identical behaviour if the default argument is used.
+ gobject_ ((make_a_copy && gobject) ? gdk_cursor_ref(gobject) : gobject)
+{}
+
+Cursor& Cursor::operator=(const Cursor& other)
+{
+ Cursor temp (other);
+ swap(temp);
+ return *this;
+}
+
+Cursor::~Cursor()
+{
+ if(gobject_)
+ gdk_cursor_unref(gobject_);
+}
+
+void Cursor::swap(Cursor& other)
+{
+ GdkCursor *const temp = gobject_;
+ gobject_ = other.gobject_;
+ other.gobject_ = temp;
+}
+
+GdkCursor* Cursor::gobj_copy() const
+{
+ return gdk_cursor_ref(gobject_);
+}
+
+
+Glib::RefPtr<Display> Cursor::get_display()
+{
+
+ Glib::RefPtr<Display> retvalue = Glib::wrap(gdk_cursor_get_display(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const Display> Cursor::get_display() const
+{
+
+ Glib::RefPtr<const Display> retvalue = Glib::wrap(gdk_cursor_get_display(const_cast<GdkCursor*>(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+
+} // namespace Gdk
+
+
diff --git a/libs/gtkmm2/gdk/gdkmm/cursor.h b/libs/gtkmm2/gdk/gdkmm/cursor.h
new file mode 100644
index 0000000000..59ab2f827f
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/cursor.h
@@ -0,0 +1,251 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GDKMM_CURSOR_H
+#define _GDKMM_CURSOR_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* drawable.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gdkmm/color.h>
+#include <gdkmm/bitmap.h>
+#include <gdkmm/display.h>
+#include <gdkmm/pixbuf.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C" { typedef struct _GdkCursor GdkCursor; }
+#endif
+
+namespace Gdk
+{
+
+
+/** @addtogroup gdkmmEnums Enums and Flags */
+
+/**
+ * @ingroup gdkmmEnums
+ */
+enum CursorType
+{
+ X_CURSOR = 0,
+ ARROW = 2,
+ BASED_ARROW_DOWN = 4,
+ BASED_ARROW_UP = 6,
+ BOAT = 8,
+ BOGOSITY = 10,
+ BOTTOM_LEFT_CORNER = 12,
+ BOTTOM_RIGHT_CORNER = 14,
+ BOTTOM_SIDE = 16,
+ BOTTOM_TEE = 18,
+ BOX_SPIRAL = 20,
+ CENTER_PTR = 22,
+ CIRCLE = 24,
+ CLOCK = 26,
+ COFFEE_MUG = 28,
+ CROSS = 30,
+ CROSS_REVERSE = 32,
+ CROSSHAIR = 34,
+ DIAMOND_CROSS = 36,
+ DOT = 38,
+ DOTBOX = 40,
+ DOUBLE_ARROW = 42,
+ DRAFT_LARGE = 44,
+ DRAFT_SMALL = 46,
+ DRAPED_BOX = 48,
+ EXCHANGE = 50,
+ FLEUR = 52,
+ GOBBLER = 54,
+ GUMBY = 56,
+ HAND1 = 58,
+ HAND2 = 60,
+ HEART = 62,
+ ICON = 64,
+ IRON_CROSS = 66,
+ LEFT_PTR = 68,
+ LEFT_SIDE = 70,
+ LEFT_TEE = 72,
+ LEFTBUTTON = 74,
+ LL_ANGLE = 76,
+ LR_ANGLE = 78,
+ MAN = 80,
+ MIDDLEBUTTON = 82,
+ MOUSE = 84,
+ PENCIL = 86,
+ PIRATE = 88,
+ PLUS = 90,
+ QUESTION_ARROW = 92,
+ RIGHT_PTR = 94,
+ RIGHT_SIDE = 96,
+ RIGHT_TEE = 98,
+ RIGHTBUTTON = 100,
+ RTL_LOGO = 102,
+ SAILBOAT = 104,
+ SB_DOWN_ARROW = 106,
+ SB_H_DOUBLE_ARROW = 108,
+ SB_LEFT_ARROW = 110,
+ SB_RIGHT_ARROW = 112,
+ SB_UP_ARROW = 114,
+ SB_V_DOUBLE_ARROW = 116,
+ SHUTTLE = 118,
+ SIZING = 120,
+ SPIDER = 122,
+ SPRAYCAN = 124,
+ STAR = 126,
+ TARGET = 128,
+ TCROSS = 130,
+ TOP_LEFT_ARROW = 132,
+ TOP_LEFT_CORNER = 134,
+ TOP_RIGHT_CORNER = 136,
+ TOP_SIDE = 138,
+ TOP_TEE = 140,
+ TREK = 142,
+ UL_ANGLE = 144,
+ UMBRELLA = 146,
+ UR_ANGLE = 148,
+ WATCH = 150,
+ XTERM = 152,
+ LAST_CURSOR = 153,
+ CURSOR_IS_PIXMAP = -1
+};
+
+} // namespace Gdk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gdk::CursorType> : public Glib::Value_Enum<Gdk::CursorType>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gdk
+{
+
+
+/** This represents a cursor.
+ */
+class Cursor
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Cursor CppObjectType;
+ typedef GdkCursor BaseObjectType;
+
+ static GType get_type() G_GNUC_CONST;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ Cursor();
+
+ explicit Cursor(GdkCursor* gobject, bool make_a_copy = true);
+
+ Cursor(const Cursor& other);
+ Cursor& operator=(const Cursor& other);
+
+ ~Cursor();
+
+ void swap(Cursor& other);
+
+ ///Provides access to the underlying C instance.
+ GdkCursor* gobj() { return gobject_; }
+
+ ///Provides access to the underlying C instance.
+ const GdkCursor* gobj() const { return gobject_; }
+
+ ///Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs.
+ GdkCursor* gobj_copy() const;
+
+protected:
+ GdkCursor* gobject_;
+
+private:
+
+
+public:
+ explicit Cursor(CursorType cursor_type);
+ Cursor(const Glib::RefPtr<Pixmap>& source, const Glib::RefPtr<Pixmap>& mask,
+ const Color& fg, const Color& bg,
+ int x, int y);
+ explicit Cursor(const Glib::RefPtr<Display>& display, CursorType cursor_type);
+ Cursor(const Glib::RefPtr<Display>& display, const Glib::RefPtr<Pixbuf>& pixbuf, int x, int y);
+
+
+ /** Returns the display on which the Gdk::Cursor is defined.
+ * @return The Gdk::Display associated to @a cursor
+ *
+ * Since: 2.2.
+ */
+ Glib::RefPtr<Display> get_display();
+
+ /** Returns the display on which the Gdk::Cursor is defined.
+ * @return The Gdk::Display associated to @a cursor
+ *
+ * Since: 2.2.
+ */
+ Glib::RefPtr<const Display> get_display() const;
+
+
+};
+
+} //namespace Gdk
+
+
+namespace Gdk
+{
+
+/** @relates Gdk::Cursor
+ * @param lhs The left-hand side
+ * @param rhs The right-hand side
+ */
+inline void swap(Cursor& lhs, Cursor& rhs)
+ { lhs.swap(rhs); }
+
+} // namespace Gdk
+
+namespace Glib
+{
+
+/** @relates Gdk::Cursor
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+Gdk::Cursor wrap(GdkCursor* object, bool take_copy = false);
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+template <>
+class Value<Gdk::Cursor> : public Glib::Value_Boxed<Gdk::Cursor>
+{};
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+} // namespace Glib
+
+#endif /* _GDKMM_CURSOR_H */
+
diff --git a/libs/gtkmm2/gdk/gdkmm/device.cc b/libs/gtkmm2/gdk/gdkmm/device.cc
new file mode 100644
index 0000000000..78d223a363
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/device.cc
@@ -0,0 +1,204 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gdkmm/device.h>
+#include <gdkmm/private/device_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gdk/gdkinput.h>
+
+namespace Gdk
+{
+
+
+} // namespace Gdk
+
+
+namespace
+{
+} // anonymous namespace
+
+// static
+GType Glib::Value<Gdk::InputMode>::value_type()
+{
+ return gdk_input_mode_get_type();
+}
+
+// static
+GType Glib::Value<Gdk::InputSource>::value_type()
+{
+ return gdk_input_source_get_type();
+}
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Gdk::Device> wrap(GdkDevice* object, bool take_copy)
+{
+ return Glib::RefPtr<Gdk::Device>( dynamic_cast<Gdk::Device*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} /* namespace Glib */
+
+
+namespace Gdk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Device_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Device_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gdk_device_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Device_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* Device_Class::wrap_new(GObject* object)
+{
+ return new Device((GdkDevice*)object);
+}
+
+
+/* The implementation: */
+
+GdkDevice* Device::gobj_copy()
+{
+ reference();
+ return gobj();
+}
+
+Device::Device(const Glib::ConstructParams& construct_params)
+:
+ Glib::Object(construct_params)
+{}
+
+Device::Device(GdkDevice* castitem)
+:
+ Glib::Object((GObject*)(castitem))
+{}
+
+Device::~Device()
+{}
+
+
+Device::CppClassType Device::device_class_; // initialize static member
+
+GType Device::get_type()
+{
+ return device_class_.init().get_type();
+}
+
+GType Device::get_base_type()
+{
+ return gdk_device_get_type();
+}
+
+
+Device::Device()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Glib::Object(Glib::ConstructParams(device_class_.init()))
+{
+ }
+
+void Device::set_source(InputSource source)
+{
+ gdk_device_set_source(gobj(), ((GdkInputSource)(source)));
+}
+
+bool Device::set_mode(InputMode mode)
+{
+ return gdk_device_set_mode(gobj(), ((GdkInputMode)(mode)));
+}
+
+void Device::set_key(guint index_, guint keyval, ModifierType modifiers)
+{
+ gdk_device_set_key(gobj(), index_, keyval, ((GdkModifierType)(modifiers)));
+}
+
+void Device::set_axis_use(guint index_, AxisUse use)
+{
+ gdk_device_set_axis_use(gobj(), index_, ((GdkAxisUse)(use)));
+}
+
+void Device::get_state(const Glib::RefPtr<Window>& window, double& axes, ModifierType& mask)
+{
+ gdk_device_get_state(gobj(), Glib::unwrap(window), &(axes), ((GdkModifierType*) &(mask)));
+}
+
+bool Device::get_history(const Glib::RefPtr<Window>& window, guint32 start, guint32 stop, GdkTimeCoord**& events, int& n_events)
+{
+ return gdk_device_get_history(gobj(), Glib::unwrap(window), start, stop, &(events), &n_events);
+}
+
+bool Device::get_axis(double& axes, AxisUse use, double& value) const
+{
+ return gdk_device_get_axis(const_cast<GdkDevice*>(gobj()), &(axes), ((GdkAxisUse)(use)), &(value));
+}
+
+Glib::ustring Device::get_name() const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(gobj()->name);
+}
+
+InputSource Device::get_source() const
+{
+ return ((InputSource)(gobj()->source));
+}
+
+InputMode Device::get_mode() const
+{
+ return ((InputMode)(gobj()->mode));
+}
+
+bool Device::get_has_cursor() const
+{
+ return gobj()->has_cursor;
+}
+
+
+} // namespace Gdk
+
+
diff --git a/libs/gtkmm2/gdk/gdkmm/device.h b/libs/gtkmm2/gdk/gdkmm/device.h
new file mode 100644
index 0000000000..c3146c0010
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/device.h
@@ -0,0 +1,254 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GDKMM_DEVICE_H
+#define _GDKMM_DEVICE_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 2002-2004 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gdkmm/window.h>
+#include <gdkmm/event.h>
+#include <gdk/gdkinput.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GdkDevice GdkDevice;
+typedef struct _GdkDeviceClass GdkDeviceClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gdk
+{ class Device_Class; } // namespace Gdk
+namespace Gdk
+{
+
+/** @addtogroup gdkmmEnums Enums and Flags */
+
+/**
+ * @ingroup gdkmmEnums
+ */
+enum InputMode
+{
+ MODE_DISABLED,
+ MODE_SCREEN,
+ MODE_WINDOW
+};
+
+} // namespace Gdk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gdk::InputMode> : public Glib::Value_Enum<Gdk::InputMode>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gdk
+{
+
+/**
+ * @ingroup gdkmmEnums
+ */
+enum InputSource
+{
+ SOURCE_MOUSE,
+ SOURCE_PEN,
+ SOURCE_ERASER,
+ SOURCE_CURSOR
+};
+
+} // namespace Gdk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gdk::InputSource> : public Glib::Value_Enum<Gdk::InputSource>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gdk
+{
+
+
+/** A Gdk::Device instance contains a detailed description of an extended input device.
+ */
+
+class Device : public Glib::Object
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef Device CppObjectType;
+ typedef Device_Class CppClassType;
+ typedef GdkDevice BaseObjectType;
+ typedef GdkDeviceClass BaseClassType;
+
+private: friend class Device_Class;
+ static CppClassType device_class_;
+
+private:
+ // noncopyable
+ Device(const Device&);
+ Device& operator=(const Device&);
+
+protected:
+ explicit Device(const Glib::ConstructParams& construct_params);
+ explicit Device(GdkDevice* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~Device();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ GdkDevice* gobj() { return reinterpret_cast<GdkDevice*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const GdkDevice* gobj() const { return reinterpret_cast<GdkDevice*>(gobject_); }
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ GdkDevice* gobj_copy();
+
+private:
+
+
+protected:
+ Device();
+
+public:
+
+
+ void set_source(InputSource source);
+
+ bool set_mode(InputMode mode);
+
+ void set_key(guint index_, guint keyval, ModifierType modifiers);
+
+ void set_axis_use(guint index_, AxisUse use);
+
+ void get_state(const Glib::RefPtr<Window>& window, double& axes, ModifierType& mask);
+
+ /** Obtains the motion history for a device; given a starting and
+ * ending timestamp, return all events in the motion history for
+ * the device in the given range of time. Some windowing systems
+ * do not support motion history, in which case, <tt>false</tt> will
+ * be returned. (This is not distinguishable from the case where
+ * motion history is supported and no events were found.)
+ * @param window The window with respect to which which the event coordinates will be reported.
+ * @param start Starting timestamp for range of events to return.
+ * @param stop Ending timestamp for the range of events to return.
+ * @param events Location to store a newly-allocated array of Gdk::TimeCoord, or <tt>0</tt>.
+ * @param n_events Location to store the length of @a events , or <tt>0</tt>.
+ * @return <tt>true</tt> if the windowing system supports motion history and
+ * at least one event was found.
+ */
+ bool get_history(const Glib::RefPtr<Window>& window, guint32 start, guint32 stop, GdkTimeCoord**& events, int& n_events);
+
+ /** Interprets an array of double as axis values for a given device,
+ * and locates the value in the array for a given axis use.
+ * @param axes Pointer to an array of axes.
+ * @param use The use to look for.
+ * @param value Location to store the found value.
+ * @return <tt>true</tt> if the given axis use was found, otherwise <tt>false</tt>.
+ */
+ bool get_axis(double& axes, AxisUse use, double& value) const;
+
+ /** Gets the name of this device.
+ * @result The name of this device.
+ */
+ Glib::ustring get_name() const;
+
+ /** Gets the type of this device.
+ * @result The type of this device.
+ */
+ InputSource get_source() const;
+
+ /** Gets the mode of this device.
+ * @result The mode of this device.
+ */
+ InputMode get_mode() const;
+
+ /** Discover whether the pointer follows device motion.
+ * @result true if the pointer follows device motion.
+ */
+ bool get_has_cursor() const;
+
+ //TODO: Add suitable accessor for the information in these fields. For now, people must use gobj() and access them directly.
+ //gint num_axes the length of the axes array.
+ //GdkDeviceAxis *axes an array of GdkDeviceAxis, describing the axes of this device.
+ //
+ //gint num_keys the length of the keys array.
+ //GdkDeviceKey *keys an array of GdkDeviceKey, describing the mapped macro buttons of this device.
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+};
+
+} // namespace Gdk
+
+
+namespace Glib
+{
+ /** @relates Gdk::Device
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Gdk::Device> wrap(GdkDevice* object, bool take_copy = false);
+}
+
+
+#endif /* _GDKMM_DEVICE_H */
+
diff --git a/libs/gtkmm2/gdk/gdkmm/display.cc b/libs/gtkmm2/gdk/gdkmm/display.cc
new file mode 100644
index 0000000000..ff3f528fff
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/display.cc
@@ -0,0 +1,596 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gdkmm/display.h>
+#include <gdkmm/private/display_p.h>
+
+#include <gdk/gdkenumtypes.h>
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gdkmm/window.h>
+#include <gdk/gdkdisplay.h>
+
+namespace Gdk
+{
+
+bool Display::set_selection_owner(const Glib::RefPtr<Window>& owner, Glib::ustring& selection, guint32 time_, bool send_event)
+{
+ return gdk_selection_owner_set_for_display(gobj(), owner->gobj(), Gdk::AtomString::to_c_type(selection), time_, (gboolean)send_event);
+}
+
+Glib::RefPtr<Window> Display::get_selection_owner(const Glib::ustring& selection)
+{
+ return Glib::wrap( (GdkWindowObject*)gdk_selection_owner_get_for_display(gobj(), Gdk::AtomString::to_c_type(selection)) , true);
+}
+
+void Display::selection_send_notify(guint32 requestor, Glib::ustring& selection, Glib::ustring& target, Glib::ustring& property, guint32 time_)
+{
+ gdk_selection_send_notify_for_display(gobj(), requestor, Gdk::AtomString::to_c_type(selection), Gdk::AtomString::to_c_type(target), Gdk::AtomString::to_c_type(property), time_);
+}
+
+void Display::get_pointer(Glib::RefPtr<Screen>& screen, int& x, int& y, ModifierType& mask)
+{
+ GdkScreen* cScreen = 0;
+ GdkModifierType cMask = (GdkModifierType)mask;
+ gdk_display_get_pointer(gobj(), &cScreen, &x, &y, &cMask);
+ screen = Glib::wrap(cScreen);
+ mask = (ModifierType)cMask;
+}
+
+void Display::get_pointer(int& x, int& y, ModifierType& mask)
+{
+ GdkModifierType cMask = (GdkModifierType)mask;
+ gdk_display_get_pointer(gobj(), 0, &x, &y, &cMask);
+ mask = (ModifierType)cMask;
+}
+
+
+Glib::RefPtr<Window> Display::get_window_at_pointer()
+{
+
+ Glib::RefPtr<Window> retvalue = Glib::wrap((GdkWindowObject*)(gdk_display_get_window_at_pointer(gobj(), 0, 0)));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const Window> Display::get_window_at_pointer() const
+{
+
+ Glib::RefPtr<const Window> retvalue = Glib::wrap((GdkWindowObject*)(gdk_display_get_window_at_pointer(const_cast<GdkDisplay*>(gobj()), 0, 0)));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+GdkDisplayPointerHooks* Display::unset_pointer_hooks()
+{
+ return gdk_display_set_pointer_hooks(gobj(), 0 /* See GDK docs */);
+}
+
+ void Display::store_clipboard(const Glib::RefPtr<Gdk::Window>& clipboard_window, guint32 time_)
+ {
+ gdk_display_store_clipboard(gobj(), clipboard_window->gobj(), time_, 0 /* see the C docs */, 0);
+ }
+
+ void Display::store_clipboard(const Glib::RefPtr<Gdk::Window>& clipboard_window, guint32 time_, const Glib::StringArrayHandle& targets)
+ {
+ //Put it into a real container that we can use:
+ std::vector<Glib::ustring> targets_copy = targets;
+
+ //Create array of target GdkAtoms from target strings:
+ if(!targets_copy.empty())
+ {
+ GdkAtom* pAtoms = new GdkAtom[targets_copy.size()];
+
+ for(guint i = 0; i < targets_copy.size(); ++i)
+ {
+ *pAtoms = Gdk::AtomString::to_c_type(targets_copy[i]);
+ }
+
+ gdk_display_store_clipboard(gobj(), clipboard_window->gobj(), time_, 0 /* see the C docs */, 0);
+
+ delete[] pAtoms;
+ }
+ }
+
+} //Gdk
+
+
+namespace
+{
+
+void Display_signal_closed_callback(GdkDisplay* self, gboolean p0,void* data)
+{
+ using namespace Gdk;
+ typedef sigc::slot< void,bool > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(p0
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo Display_signal_closed_info =
+{
+ "closed",
+ (GCallback) &Display_signal_closed_callback,
+ (GCallback) &Display_signal_closed_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Gdk::Display> wrap(GdkDisplay* object, bool take_copy)
+{
+ return Glib::RefPtr<Gdk::Display>( dynamic_cast<Gdk::Display*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} /* namespace Glib */
+
+
+namespace Gdk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Display_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Display_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gdk_display_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Display_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->closed = &closed_callback;
+}
+
+
+void Display_Class::closed_callback(GdkDisplay* self, gboolean p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_closed(p0
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->closed)
+ (*base->closed)(self, p0);
+ }
+}
+
+
+Glib::ObjectBase* Display_Class::wrap_new(GObject* object)
+{
+ return new Display((GdkDisplay*)object);
+}
+
+
+/* The implementation: */
+
+GdkDisplay* Display::gobj_copy()
+{
+ reference();
+ return gobj();
+}
+
+Display::Display(const Glib::ConstructParams& construct_params)
+:
+ Glib::Object(construct_params)
+{}
+
+Display::Display(GdkDisplay* castitem)
+:
+ Glib::Object((GObject*)(castitem))
+{}
+
+Display::~Display()
+{}
+
+
+Display::CppClassType Display::display_class_; // initialize static member
+
+GType Display::get_type()
+{
+ return display_class_.init().get_type();
+}
+
+GType Display::get_base_type()
+{
+ return gdk_display_get_type();
+}
+
+
+Display::Display()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Glib::Object(Glib::ConstructParams(display_class_.init()))
+{
+ }
+
+Glib::RefPtr<Display> Display::open(const Glib::ustring& display_name)
+{
+
+ Glib::RefPtr<Display> retvalue = Glib::wrap(gdk_display_open(display_name.c_str()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::ustring Display::get_name() const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(gdk_display_get_name(const_cast<GdkDisplay*>(gobj())));
+}
+
+int Display::get_n_screens() const
+{
+ return gdk_display_get_n_screens(const_cast<GdkDisplay*>(gobj()));
+}
+
+Glib::RefPtr<Screen> Display::get_screen(int screen_num)
+{
+
+ Glib::RefPtr<Screen> retvalue = Glib::wrap(gdk_display_get_screen(gobj(), screen_num));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const Screen> Display::get_screen(int screen_num) const
+{
+
+ Glib::RefPtr<const Screen> retvalue = Glib::wrap(gdk_display_get_screen(const_cast<GdkDisplay*>(gobj()), screen_num));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<Screen> Display::get_default_screen()
+{
+
+ Glib::RefPtr<Screen> retvalue = Glib::wrap(gdk_display_get_default_screen(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const Screen> Display::get_default_screen() const
+{
+
+ Glib::RefPtr<const Screen> retvalue = Glib::wrap(gdk_display_get_default_screen(const_cast<GdkDisplay*>(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+void Display::pointer_ungrab(guint32 timestamp)
+{
+ gdk_display_pointer_ungrab(gobj(), timestamp);
+}
+
+void Display::keyboard_ungrab(guint32 timestamp)
+{
+ gdk_display_keyboard_ungrab(gobj(), timestamp);
+}
+
+bool Display::pointer_is_grabbed() const
+{
+ return gdk_display_pointer_is_grabbed(const_cast<GdkDisplay*>(gobj()));
+}
+
+void Display::beep()
+{
+ gdk_display_beep(gobj());
+}
+
+void Display::sync()
+{
+ gdk_display_sync(gobj());
+}
+
+void Display::close()
+{
+ gdk_display_close(gobj());
+}
+
+Glib::ListHandle< Glib::RefPtr<Device> > Display::list_devices()
+{
+ return Glib::ListHandle< Glib::RefPtr<Device> >(gdk_display_list_devices(gobj()), Glib::OWNERSHIP_DEEP);
+}
+
+Glib::ListHandle< Glib::RefPtr<const Device> > Display::list_devices() const
+{
+ return Glib::ListHandle< Glib::RefPtr<const Device> >(gdk_display_list_devices(const_cast<GdkDisplay*>(gobj())), Glib::OWNERSHIP_DEEP);
+}
+
+GdkEvent* Display::get_event()
+{
+ return gdk_display_get_event(gobj());
+}
+
+const GdkEvent* Display::get_event() const
+{
+ return (const GdkEvent*)(gdk_display_get_event(const_cast<GdkDisplay*>(gobj())));
+}
+
+GdkEvent* Display::peek_event()
+{
+ return gdk_display_peek_event(gobj());
+}
+
+GdkEvent* Display::peek_event() const
+{
+ return gdk_display_peek_event(const_cast<GdkDisplay*>(gobj()));
+}
+
+void Display::put_event(GdkEvent* event)
+{
+ gdk_display_put_event(gobj(), event);
+}
+
+void Display::add_client_message_filter(Glib::ustring& message_type, GdkFilterFunc func, gpointer data)
+{
+ gdk_display_add_client_message_filter(gobj(), Gdk::AtomString::to_c_type(message_type), func, data);
+}
+
+void Display::set_double_click_time(guint msec)
+{
+ gdk_display_set_double_click_time(gobj(), msec);
+}
+
+void Display::set_double_click_distance(guint distance)
+{
+ gdk_display_set_double_click_distance(gobj(), distance);
+}
+
+Glib::RefPtr<Display> Display::get_default()
+{
+
+ Glib::RefPtr<Display> retvalue = Glib::wrap(gdk_display_get_default());
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<Device> Display::get_core_pointer()
+{
+
+ Glib::RefPtr<Device> retvalue = Glib::wrap(gdk_display_get_core_pointer(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const Device> Display::get_core_pointer() const
+{
+
+ Glib::RefPtr<const Device> retvalue = Glib::wrap(gdk_display_get_core_pointer(const_cast<GdkDisplay*>(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<Window> Display::get_window_at_pointer(int& win_x, int& win_y)
+{
+
+ Glib::RefPtr<Window> retvalue = Glib::wrap((GdkWindowObject*)(gdk_display_get_window_at_pointer(gobj(), &win_x, &win_y)));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const Window> Display::get_window_at_pointer(int& win_x, int& win_y) const
+{
+
+ Glib::RefPtr<const Window> retvalue = Glib::wrap((GdkWindowObject*)(gdk_display_get_window_at_pointer(const_cast<GdkDisplay*>(gobj()), &win_x, &win_y)));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+GdkDisplayPointerHooks* Display::set_pointer_hooks(const GdkDisplayPointerHooks* new_hooks)
+{
+ return gdk_display_set_pointer_hooks(gobj(), new_hooks);
+}
+
+Glib::RefPtr<Display> Display::open_default_libgtk_only()
+{
+
+ Glib::RefPtr<Display> retvalue = Glib::wrap(gdk_display_open_default_libgtk_only());
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+guint32 Display::get_drag_protocol(guint32 xid, GdkDragProtocol& protocol)
+{
+ return gdk_drag_get_protocol_for_display(gobj(), xid, &(protocol));
+}
+
+GdkKeymap* Display::get_keymap()
+{
+ return gdk_keymap_get_for_display(gobj());
+}
+
+const GdkKeymap* Display::get_keymap() const
+{
+ return gdk_keymap_get_for_display(const_cast<GdkDisplay*>(gobj()));
+}
+
+Glib::RefPtr<Pixmap> Display::lookup_pixmap(NativeWindow anid)
+{
+ return Glib::wrap((GdkPixmapObject*)(gdk_pixmap_lookup_for_display(gobj(), (GdkNativeWindow)(anid))));
+}
+
+Glib::RefPtr<const Pixmap> Display::lookup_pixmap(NativeWindow anid) const
+{
+ return Glib::wrap((GdkPixmapObject*)(gdk_pixmap_lookup_for_display(const_cast<GdkDisplay*>(gobj()), (GdkNativeWindow)(anid))));
+}
+
+void Display::flush()
+{
+ gdk_display_flush(gobj());
+}
+
+bool Display::supports_cursor_alpha() const
+{
+ return gdk_display_supports_cursor_alpha(const_cast<GdkDisplay*>(gobj()));
+}
+
+bool Display::supports_cursor_color() const
+{
+ return gdk_display_supports_cursor_color(const_cast<GdkDisplay*>(gobj()));
+}
+
+guint Display::get_default_cursor_size() const
+{
+ return gdk_display_get_default_cursor_size(const_cast<GdkDisplay*>(gobj()));
+}
+
+void Display::get_maximal_cursor_size(guint& width, guint& height)
+{
+ gdk_display_get_maximal_cursor_size(gobj(), &(width), &(height));
+}
+
+Glib::RefPtr<Window> Display::get_default_group()
+{
+
+ Glib::RefPtr<Window> retvalue = Glib::wrap((GdkWindowObject*)(gdk_display_get_default_group(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const Window> Display::get_default_group() const
+{
+
+ Glib::RefPtr<const Window> retvalue = Glib::wrap((GdkWindowObject*)(gdk_display_get_default_group(const_cast<GdkDisplay*>(gobj()))));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+bool Display::supports_selection_notification() const
+{
+ return gdk_display_supports_selection_notification(const_cast<GdkDisplay*>(gobj()));
+}
+
+bool Display::request_selection_notification(const Glib::ustring& selection)
+{
+ return gdk_display_request_selection_notification(gobj(), Gdk::AtomString::to_c_type(selection));
+}
+
+bool Display::supports_clipboard_persistence() const
+{
+ return gdk_display_supports_clipboard_persistence(const_cast<GdkDisplay*>(gobj()));
+}
+
+
+Glib::SignalProxy1< void,bool > Display::signal_closed()
+{
+ return Glib::SignalProxy1< void,bool >(this, &Display_signal_closed_info);
+}
+
+
+void Gdk::Display::on_closed(bool is_error)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->closed)
+ (*base->closed)(gobj(),static_cast<int>(is_error));
+}
+
+
+} // namespace Gdk
+
+
diff --git a/libs/gtkmm2/gdk/gdkmm/display.h b/libs/gtkmm2/gdk/gdkmm/display.h
new file mode 100644
index 0000000000..238025599a
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/display.h
@@ -0,0 +1,635 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GDKMM_DISPLAY_H
+#define _GDKMM_DISPLAY_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* display.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gdkmm/screen.h>
+#include <gdkmm/device.h>
+#include <gdkmm/types.h> //For ModifierType
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GdkDisplay GdkDisplay;
+typedef struct _GdkDisplayClass GdkDisplayClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gdk
+{ class Display_Class; } // namespace Gdk
+namespace Gdk
+{
+
+
+class Drawable;
+
+ /** Gdk::Display object's purpose is two fold:
+ * To grab/ungrab keyboard focus and mouse pointer
+ * To manage and provide information about the Gdk::Screen(s) available for this Gdk::Display
+ *
+ * Gdk::Display objects are the GDK representation of the X Display which can be described as a workstation consisting
+ * of a keyboard a pointing device (such as a mouse) and one or more screens. It is used to open and keep track of
+ * various Gdk::Screen objects currently instantiated by the application. It is also used to grab and release the keyboard
+ * and the mouse pointer.
+ */
+
+class Display : public Glib::Object
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef Display CppObjectType;
+ typedef Display_Class CppClassType;
+ typedef GdkDisplay BaseObjectType;
+ typedef GdkDisplayClass BaseClassType;
+
+private: friend class Display_Class;
+ static CppClassType display_class_;
+
+private:
+ // noncopyable
+ Display(const Display&);
+ Display& operator=(const Display&);
+
+protected:
+ explicit Display(const Glib::ConstructParams& construct_params);
+ explicit Display(GdkDisplay* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~Display();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ GdkDisplay* gobj() { return reinterpret_cast<GdkDisplay*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const GdkDisplay* gobj() const { return reinterpret_cast<GdkDisplay*>(gobject_); }
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ GdkDisplay* gobj_copy();
+
+private:
+
+protected:
+ Display();
+
+public:
+
+ /** Opens a display.
+ *
+ * Since: 2.2
+ * @param display_name The name of the display to open.
+ * @return A Gdk::Display, or <tt>0</tt> if the display
+ * could not be opened.
+ */
+ static Glib::RefPtr<Display> open(const Glib::ustring& display_name);
+
+
+ /** Gets the name of the display.
+ * @return A string representing the display name. This string is owned
+ * by GDK and should not be modified or freed.
+ *
+ * Since: 2.2.
+ */
+ Glib::ustring get_name() const;
+
+
+ /** Gets the number of screen managed by the @a display .
+ * @return Number of screens.
+ *
+ * Since: 2.2.
+ */
+ int get_n_screens() const;
+
+ /** Returns a screen object for one of the screens of the display.
+ * @param screen_num The screen number.
+ * @return The Gdk::Screen object
+ *
+ * Since: 2.2.
+ */
+ Glib::RefPtr<Screen> get_screen(int screen_num);
+
+ /** Returns a screen object for one of the screens of the display.
+ * @param screen_num The screen number.
+ * @return The Gdk::Screen object
+ *
+ * Since: 2.2.
+ */
+ Glib::RefPtr<const Screen> get_screen(int screen_num) const;
+
+
+ /** Get the default Gdk::Screen for @a display .
+ * @return The default Gdk::Screen object for @a display
+ *
+ * Since: 2.2.
+ */
+ Glib::RefPtr<Screen> get_default_screen();
+
+ /** Get the default Gdk::Screen for @a display .
+ * @return The default Gdk::Screen object for @a display
+ *
+ * Since: 2.2.
+ */
+ Glib::RefPtr<const Screen> get_default_screen() const;
+
+
+ /** Release any pointer grab.
+ *
+ * Since: 2.2
+ * @param timestamp A timestap (e.g. GDK_CURRENT_TIME).
+ */
+ void pointer_ungrab(guint32 timestamp);
+
+ /** Release any keyboard grab
+ *
+ * Since: 2.2
+ * @param timestamp A timestap (e.g Gdk::CURRENT_TIME).
+ */
+ void keyboard_ungrab(guint32 timestamp);
+
+ /** Test if the pointer is grabbed.
+ * @return <tt>true</tt> if an active X pointer grab is in effect
+ *
+ * Since: 2.2.
+ */
+ bool pointer_is_grabbed() const;
+
+ /** Emits a short beep on @a display
+ *
+ * Since: 2.2
+ */
+ void beep();
+
+ /** Flushes any requests queued for the windowing system and waits until all
+ * requests have been handled. This is often used for making sure that the
+ * display is synchronized with the current state of the program. Calling
+ * sync() before gdk_error_trap_pop() makes sure that any errors
+ * generated from earlier requests are handled before the error trap is
+ * removed.
+ *
+ * This is most useful for X11. On windowing systems where requests are
+ * handled synchronously, this function will do nothing.
+ *
+ * Since: 2.2
+ */
+ void sync();
+
+ /** Closes the connection to the windowing system for the given display,
+ * and cleans up associated resources.
+ *
+ * Since: 2.2
+ */
+ void close();
+
+
+ /** Returns the list of available input devices attached to @a display .
+ * The list is statically allocated and should not be freed.
+ * @return A list of Gdk::Device
+ *
+ * Since: 2.2.
+ */
+ Glib::ListHandle< Glib::RefPtr<Device> > list_devices();
+
+ /** Returns the list of available input devices attached to @a display .
+ * The list is statically allocated and should not be freed.
+ * @return A list of Gdk::Device
+ *
+ * Since: 2.2.
+ */
+ Glib::ListHandle< Glib::RefPtr<const Device> > list_devices() const;
+
+ //TODO: Use C++ Gdk::Event:
+ //TODO: get_event() might remove the event - if so, then there should not be a const version:
+
+ /** Gets the next Gdk::Event to be processed for @a display , fetching events from the
+ * windowing system if necessary.
+ * @return The next Gdk::Event to be processed, or <tt>0</tt> if no events
+ * are pending. The returned Gdk::Event should be freed with gdk_event_free().
+ *
+ * Since: 2.2.
+ */
+ GdkEvent* get_event();
+
+ /** Gets the next Gdk::Event to be processed for @a display , fetching events from the
+ * windowing system if necessary.
+ * @return The next Gdk::Event to be processed, or <tt>0</tt> if no events
+ * are pending. The returned Gdk::Event should be freed with gdk_event_free().
+ *
+ * Since: 2.2.
+ */
+ const GdkEvent* get_event() const;
+
+
+ /** Gets a copy of the first Gdk::Event in the @a display 's event queue, without
+ * removing the event from the queue. (Note that this function will
+ * not get more events from the windowing system. It only checks the events
+ * that have already been moved to the GDK event queue.)
+ * @return A copy of the first Gdk::Event on the event queue, or <tt>0</tt>
+ * if no events are in the queue. The returned Gdk::Event should be freed with
+ * gdk_event_free().
+ *
+ * Since: 2.2.
+ */
+ GdkEvent* peek_event();
+
+ /** Gets a copy of the first Gdk::Event in the @a display 's event queue, without
+ * removing the event from the queue. (Note that this function will
+ * not get more events from the windowing system. It only checks the events
+ * that have already been moved to the GDK event queue.)
+ * @return A copy of the first Gdk::Event on the event queue, or <tt>0</tt>
+ * if no events are in the queue. The returned Gdk::Event should be freed with
+ * gdk_event_free().
+ *
+ * Since: 2.2.
+ */
+ GdkEvent* peek_event() const;
+
+ /** Appends a copy of the given event onto the front of the event
+ * queue for @a display .
+ *
+ * Since: 2.2
+ * @param event A Gdk::Event.
+ */
+ void put_event(GdkEvent* event);
+
+ //TODO: Use a slot here, though this is probably never used anyway:
+ //Find out whether we can use a string representation for the atom - look for examples of this function's use.
+
+ /** Adds a filter to be called when X ClientMessage events are received.
+ *
+ * Since: 2.2
+ * @param message_type The type of ClientMessage events to receive.
+ * This will be checked against the @a message_type field
+ * of the XClientMessage event struct.
+ * @param func The function to call to process the event.
+ * @param data User data to pass to @a func .
+ */
+ void add_client_message_filter(Glib::ustring& message_type, GdkFilterFunc func, gpointer data);
+
+
+ /** Sets the double click time (two clicks within this time interval
+ * count as a double click and result in a Gdk::2BUTTON_PRESS event).
+ * Applications should <em>not</em> set this, it is a global
+ * user-configured setting.
+ *
+ * Since: 2.2
+ * @param msec Double click time in milliseconds (thousandths of a second).
+ */
+ void set_double_click_time(guint msec);
+
+ /** Sets the double click distance (two clicks within this distance
+ * count as a double click and result in a Gdk::2BUTTON_PRESS event).
+ * See also set_double_click_time().
+ * Applications should <em>not</em> set this, it is a global
+ * user-configured setting.
+ *
+ * Since: 2.4
+ * @param distance Distance in pixels.
+ */
+ void set_double_click_distance(guint distance);
+
+
+ /** Gets the default Gdk::Display. This is a convenience
+ * function for:
+ *
+ * gdk_display_manager_get_default_display (manager_get())
+ *
+ * @return A Gdk::Display, or <tt>0</tt> if there is no default
+ * display.
+ *
+ * Since: 2.2.
+ */
+ static Glib::RefPtr<Display> get_default();
+
+
+ /** Returns the core pointer device for the given display
+ * @return The core pointer device; this is owned by the
+ * display and should not be freed.
+ *
+ * Since: 2.2.
+ */
+ Glib::RefPtr<Device> get_core_pointer();
+
+ /** Returns the core pointer device for the given display
+ * @return The core pointer device; this is owned by the
+ * display and should not be freed.
+ *
+ * Since: 2.2.
+ */
+ Glib::RefPtr<const Device> get_core_pointer() const;
+
+ /** Gets the current location of the pointer and the current modifier
+ * mask for a given display.
+ *
+ * @param screen location to store the screen that the cursor is on.
+ * @param x location to store root window X coordinate of pointer.
+ * @param y location to store root window Y coordinate of pointer.
+ * @param mask location to store current modifier mask.
+ *
+ **/
+ void get_pointer(Glib::RefPtr<Screen>& screen, int& x, int& y, ModifierType& mask);
+
+ // In fact, any one of these gdk_display_get_pointer() args can be NULL, but we don't need so many overloads.
+ /**
+ * Gets the current location of the pointer and the current modifier
+ * mask for a given display.
+ *
+ * @param x location to store root window X coordinate of pointer.
+ * @param y location to store root window Y coordinate of pointer.
+ * @param mask location to store current modifier mask.
+ *
+ **/
+ void get_pointer(int& x, int& y, ModifierType& mask);
+
+
+ /** Obtains the window underneath the mouse pointer, returning the location
+ * of that window in @a win_x , @a win_y for @a screen . Returns <tt>0</tt> if the window
+ * under the mouse pointer is not known to GDK (for example, belongs to
+ * another application).
+ * @param win_x Return location for origin of the window under the pointer.
+ * @param win_y Return location for origin of the window under the pointer.
+ * @return The window under the mouse pointer, or <tt>0</tt>
+ *
+ * Since: 2.2.
+ */
+ Glib::RefPtr<Window> get_window_at_pointer(int& win_x, int& win_y);
+
+ /** Obtains the window underneath the mouse pointer, returning the location
+ * of that window in @a win_x , @a win_y for @a screen . Returns <tt>0</tt> if the window
+ * under the mouse pointer is not known to GDK (for example, belongs to
+ * another application).
+ * @param win_x Return location for origin of the window under the pointer.
+ * @param win_y Return location for origin of the window under the pointer.
+ * @return The window under the mouse pointer, or <tt>0</tt>
+ *
+ * Since: 2.2.
+ */
+ Glib::RefPtr<const Window> get_window_at_pointer(int& win_x, int& win_y) const;
+
+ /** Obtains the window underneath the mouse pointer. Returns a null RefPtr if the window
+ * under the mouse pointer is not known to GDK (for example, belongs to
+ * another application).
+ * @result The window underneath the mouse pointer.
+ */
+ Glib::RefPtr<Window> get_window_at_pointer();
+
+ /** Obtains the window underneath the mouse pointer. Returns a null RefPtr if the window
+ * under the mouse pointer is not known to GDK (for example, belongs to
+ * another application).
+ * @result The window underneath the mouse pointer.
+ */
+ Glib::RefPtr<const Window> get_window_at_pointer() const;
+
+
+ /** This function allows for hooking into the operation
+ * of getting the current location of the pointer on a particular
+ * display. This is only useful for such low-level tools as an
+ * event recorder. Applications should never have any
+ * reason to use this facility.
+ * @param new_hooks A table of pointers to functions for getting
+ * quantities related to the current pointer position.
+ * @return The previous pointer hook table
+ *
+ * Since: 2.2.
+ */
+ GdkDisplayPointerHooks* set_pointer_hooks(const GdkDisplayPointerHooks* new_hooks);
+ GdkDisplayPointerHooks* unset_pointer_hooks();
+
+
+ /** Opens the default display specified by command line arguments or
+ * environment variables, sets it as the default display, and returns
+ * it. gdk_parse_args must have been called first. If the default
+ * display has previously been set, simply returns that. An internal
+ * function that should not be used by applications.
+ * @return The default display, if it could be opened,
+ * otherwise <tt>0</tt>.
+ */
+ static Glib::RefPtr<Display> open_default_libgtk_only();
+
+
+ /** Finds out the DND protocol supported by a window.
+ *
+ * Since: 2.2
+ * @param xid The X id of the destination window.
+ * @param protocol Location where the supported DND protocol is returned.
+ * @return The X id of the window where the drop should happen. This
+ * may be @a xid or the X id of a proxy window, or None if @a xid doesn't
+ * support Drag and Drop.
+ */
+ guint32 get_drag_protocol(guint32 xid, GdkDragProtocol& protocol);
+
+
+ /**
+ * @return The Gdk::Keymap attached to @a display .
+ * the Gdk::Keymap attached to @a display .
+ *
+ * Since: 2.2.
+ */
+ GdkKeymap* get_keymap();
+
+ /**
+ * @return The Gdk::Keymap attached to @a display .
+ * the Gdk::Keymap attached to @a display .
+ *
+ * Since: 2.2.
+ */
+ const GdkKeymap* get_keymap() const;
+
+ bool set_selection_owner(const Glib::RefPtr<Window>& owner, Glib::ustring& selection, guint32 time_, bool send_event);
+ Glib::RefPtr<Window> get_selection_owner(const Glib::ustring& selection);
+ void selection_send_notify(guint32 requestor, Glib::ustring& selection, Glib::ustring& target, Glib::ustring& property, guint32 time_);
+
+
+ /** Looks up the Gdk::Pixmap that wraps the given native pixmap handle.
+ *
+ * For example in the X backend, a native pixmap handle is an Xlib
+ * &lt;type&gt;XID&lt;/type&gt;.
+ * @param anid A native pixmap handle.
+ * @return The Gdk::Pixmap wrapper for the native pixmap,
+ * or <tt>0</tt> if there is none.
+ *
+ * Since: 2.2.
+ */
+ Glib::RefPtr<Pixmap> lookup_pixmap(NativeWindow anid);
+
+ /** Looks up the Gdk::Pixmap that wraps the given native pixmap handle.
+ *
+ * For example in the X backend, a native pixmap handle is an Xlib
+ * &lt;type&gt;XID&lt;/type&gt;.
+ * @param anid A native pixmap handle.
+ * @return The Gdk::Pixmap wrapper for the native pixmap,
+ * or <tt>0</tt> if there is none.
+ *
+ * Since: 2.2.
+ */
+ Glib::RefPtr<const Pixmap> lookup_pixmap(NativeWindow anid) const;
+
+
+ /** Flushes any requests queued for the windowing system; this happens automatically
+ * when the main loop blocks waiting for new events, but if your application
+ * is drawing without returning control to the main loop, you may need
+ * to call this function explicitely. A common case where this function
+ * needs to be called is when an application is executing drawing commands
+ * from a thread other than the thread where the main loop is running.
+ *
+ * This is most useful for X11. On windowing systems where requests are
+ * handled synchronously, this function will do nothing.
+ *
+ * Since: 2.4
+ */
+ void flush();
+
+ /** Returns <tt>true</tt> if cursors can use an 8bit alpha channel
+ * on @a display . Otherwise, cursors are restricted to bilevel
+ * alpha (i.e. a mask).
+ * @return Whether cursors can have alpha channels.
+ *
+ * Since: 2.4.
+ */
+ bool supports_cursor_alpha() const;
+
+ /** Returns <tt>true</tt> if multicolored cursors are supported
+ * on @a display . Otherwise, cursors have only a forground
+ * and a background color.
+ * @return Whether cursors can have multiple colors.
+ *
+ * Since: 2.4.
+ */
+ bool supports_cursor_color() const;
+
+ /** Returns the default size to use for cursors on @a display .
+ * @return The default cursor size.
+ *
+ * Since: 2.4.
+ */
+ guint get_default_cursor_size() const;
+
+ /** Gets the maximal size to use for cursors on @a display .
+ *
+ * Since: 2.4
+ * @param width The return location for the maximal cursor width.
+ * @param height The return location for the maximal cursor height.
+ */
+ void get_maximal_cursor_size(guint& width, guint& height);
+
+
+ /** Returns the default group leader window for all toplevel windows
+ * on @a display . This window is implicitly created by GDK.
+ * See gdk_window_set_group().
+ * @return The default group leader window for @a display
+ *
+ * Since: 2.4.
+ */
+ Glib::RefPtr<Window> get_default_group();
+
+ /** Returns the default group leader window for all toplevel windows
+ * on @a display . This window is implicitly created by GDK.
+ * See gdk_window_set_group().
+ * @return The default group leader window for @a display
+ *
+ * Since: 2.4.
+ */
+ Glib::RefPtr<const Window> get_default_group() const;
+
+ //TODO: wrap the vfuncs, though they are not very useful because people will not derive from this class? murrayc.
+
+
+ /** Returns whether Gdk::EventOwnerChange events will be
+ * sent when the owner of a selection changes.
+ * @return Whether Gdk::EventOwnerChange events will
+ * be sent.
+ *
+ * Since: 2.6.
+ */
+ bool supports_selection_notification() const;
+
+ /** Request Gdk::EventOwnerChange events for ownership changes
+ * of the selection named by the given atom.
+ * @param selection The Gdk::Atom naming the selection for which
+ * ownership change notification is requested.
+ * @return Whether Gdk::EventOwnerChange events will
+ * be sent.
+ *
+ * Since: 2.6.
+ */
+ bool request_selection_notification(const Glib::ustring& selection);
+
+
+ /** Returns whether the speicifed display supports clipboard
+ * persistance; i.e.\ if it's possible to store the clipboard data after an
+ * application has quit. On X11 this checks if a clipboard daemon is
+ * running.
+ * @return <tt>true</tt> if the display supports clipboard persistance.
+ *
+ * Since: 2.6.
+ */
+ bool supports_clipboard_persistence() const;
+
+ //TODO: Documentation, based on C docs:
+ void store_clipboard(const Glib::RefPtr<Gdk::Window>& clipboard_window, guint32 time_);
+
+ void store_clipboard(const Glib::RefPtr<Gdk::Window>& clipboard_window, guint32 time_, const Glib::StringArrayHandle& targets);
+
+
+ Glib::SignalProxy1< void,bool > signal_closed();
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_closed(bool is_error);
+
+
+};
+
+} /* namespace Gdk */
+
+
+namespace Glib
+{
+ /** @relates Gdk::Display
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Gdk::Display> wrap(GdkDisplay* object, bool take_copy = false);
+}
+
+
+#endif /* _GDKMM_DISPLAY_H */
+
diff --git a/libs/gtkmm2/gdk/gdkmm/displaymanager.cc b/libs/gtkmm2/gdk/gdkmm/displaymanager.cc
new file mode 100644
index 0000000000..5edb22e506
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/displaymanager.cc
@@ -0,0 +1,265 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gdkmm/displaymanager.h>
+#include <gdkmm/private/displaymanager_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gdk/gdkdisplaymanager.h>
+namespace Gdk
+{
+
+
+} //Gdk
+
+
+namespace
+{
+
+void DisplayManager_signal_display_opened_callback(GdkDisplayManager* self, GdkDisplay* p0,void* data)
+{
+ using namespace Gdk;
+ typedef sigc::slot< void,const Glib::RefPtr<Display>& > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::wrap(p0, true)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo DisplayManager_signal_display_opened_info =
+{
+ "display-opened",
+ (GCallback) &DisplayManager_signal_display_opened_callback,
+ (GCallback) &DisplayManager_signal_display_opened_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Gdk::DisplayManager> wrap(GdkDisplayManager* object, bool take_copy)
+{
+ return Glib::RefPtr<Gdk::DisplayManager>( dynamic_cast<Gdk::DisplayManager*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} /* namespace Glib */
+
+
+namespace Gdk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& DisplayManager_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &DisplayManager_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gdk_display_manager_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void DisplayManager_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->display_opened = &display_opened_callback;
+}
+
+
+void DisplayManager_Class::display_opened_callback(GdkDisplayManager* self, GdkDisplay* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_display_opened(Glib::wrap(p0, true)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->display_opened)
+ (*base->display_opened)(self, p0);
+ }
+}
+
+
+Glib::ObjectBase* DisplayManager_Class::wrap_new(GObject* object)
+{
+ return new DisplayManager((GdkDisplayManager*)object);
+}
+
+
+/* The implementation: */
+
+GdkDisplayManager* DisplayManager::gobj_copy()
+{
+ reference();
+ return gobj();
+}
+
+DisplayManager::DisplayManager(const Glib::ConstructParams& construct_params)
+:
+ Glib::Object(construct_params)
+{}
+
+DisplayManager::DisplayManager(GdkDisplayManager* castitem)
+:
+ Glib::Object((GObject*)(castitem))
+{}
+
+DisplayManager::~DisplayManager()
+{}
+
+
+DisplayManager::CppClassType DisplayManager::displaymanager_class_; // initialize static member
+
+GType DisplayManager::get_type()
+{
+ return displaymanager_class_.init().get_type();
+}
+
+GType DisplayManager::get_base_type()
+{
+ return gdk_display_manager_get_type();
+}
+
+
+Glib::RefPtr<DisplayManager> DisplayManager::get()
+{
+
+ Glib::RefPtr<DisplayManager> retvalue = Glib::wrap(gdk_display_manager_get());
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<Display> DisplayManager::get_default_display()
+{
+
+ Glib::RefPtr<Display> retvalue = Glib::wrap(gdk_display_manager_get_default_display(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const Display> DisplayManager::get_default_display() const
+{
+
+ Glib::RefPtr<const Display> retvalue = Glib::wrap(gdk_display_manager_get_default_display(const_cast<GdkDisplayManager*>(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+void DisplayManager::set_default_display(const Glib::RefPtr<Display>& display)
+{
+ gdk_display_manager_set_default_display(gobj(), Glib::unwrap(display));
+}
+
+Glib::SListHandle< Glib::RefPtr<Display> > DisplayManager::list_displays()
+{
+ return Glib::SListHandle< Glib::RefPtr<Display> >(gdk_display_manager_list_displays(gobj()), Glib::OWNERSHIP_SHALLOW);
+}
+
+
+Glib::SignalProxy1< void,const Glib::RefPtr<Display>& > DisplayManager::signal_display_opened()
+{
+ return Glib::SignalProxy1< void,const Glib::RefPtr<Display>& >(this, &DisplayManager_signal_display_opened_info);
+}
+
+
+Glib::PropertyProxy< Glib::RefPtr<Display> > DisplayManager::property_default_display()
+{
+ return Glib::PropertyProxy< Glib::RefPtr<Display> >(this, "default-display");
+}
+
+Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Display> > DisplayManager::property_default_display() const
+{
+ return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Display> >(this, "default-display");
+}
+
+
+void Gdk::DisplayManager::on_display_opened(const Glib::RefPtr<Display>& display)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->display_opened)
+ (*base->display_opened)(gobj(),Glib::unwrap(display));
+}
+
+
+} // namespace Gdk
+
+
diff --git a/libs/gtkmm2/gdk/gdkmm/displaymanager.h b/libs/gtkmm2/gdk/gdkmm/displaymanager.h
new file mode 100644
index 0000000000..fb223270d6
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/displaymanager.h
@@ -0,0 +1,186 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GDKMM_DISPLAYMANAGER_H
+#define _GDKMM_DISPLAYMANAGER_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* displaymanager.h
+ *
+ * Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/object.h>
+#include <gdkmm/display.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GdkDisplayManager GdkDisplayManager;
+typedef struct _GdkDisplayManagerClass GdkDisplayManagerClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gdk
+{ class DisplayManager_Class; } // namespace Gdk
+namespace Gdk
+{
+
+/** The purpose of the GdkDisplayManager singleton object is to offer notification when displays appear or disappear or the
+ * default display changes.
+ */
+
+class DisplayManager : public Glib::Object
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef DisplayManager CppObjectType;
+ typedef DisplayManager_Class CppClassType;
+ typedef GdkDisplayManager BaseObjectType;
+ typedef GdkDisplayManagerClass BaseClassType;
+
+private: friend class DisplayManager_Class;
+ static CppClassType displaymanager_class_;
+
+private:
+ // noncopyable
+ DisplayManager(const DisplayManager&);
+ DisplayManager& operator=(const DisplayManager&);
+
+protected:
+ explicit DisplayManager(const Glib::ConstructParams& construct_params);
+ explicit DisplayManager(GdkDisplayManager* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~DisplayManager();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ GdkDisplayManager* gobj() { return reinterpret_cast<GdkDisplayManager*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const GdkDisplayManager* gobj() const { return reinterpret_cast<GdkDisplayManager*>(gobject_); }
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ GdkDisplayManager* gobj_copy();
+
+private:
+
+protected:
+
+public:
+
+
+ /**
+ * @return The singleton Gdk::DisplayManager object.
+ * the global Gdk::DisplayManager singleton; gdk_parse_pargs(),
+ * gdk_init(), or gdk_init_check() must have been called first.
+ *
+ * Since: 2.2.
+ */
+ static Glib::RefPtr<DisplayManager> get();
+
+ /** Gets the default Gdk::Display.
+ * @return A Gdk::Display, or <tt>0</tt> if there is no default
+ * display.
+ *
+ * Since: 2.2.
+ */
+ Glib::RefPtr<Display> get_default_display();
+
+ /** Gets the default Gdk::Display.
+ * @return A Gdk::Display, or <tt>0</tt> if there is no default
+ * display.
+ *
+ * Since: 2.2.
+ */
+ Glib::RefPtr<const Display> get_default_display() const;
+
+
+ /** Sets @a display as the default display.
+ *
+ * Since: 2.2
+ * @param display A Gdk::Display.
+ */
+ void set_default_display(const Glib::RefPtr<Display>& display);
+
+
+ /** List all currently open displays.
+ * @return A list of Gdk::Display objects.
+ * Since: 2.2.
+ */
+ Glib::SListHandle< Glib::RefPtr<Display> > list_displays();
+
+ /** The default display for GDK.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy< Glib::RefPtr<Display> > property_default_display() ;
+
+/** The default display for GDK.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Display> > property_default_display() const;
+
+
+ Glib::SignalProxy1< void,const Glib::RefPtr<Display>& > signal_display_opened();
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_display_opened(const Glib::RefPtr<Display>& display);
+
+
+};
+
+} /* namespace Gdk */
+
+
+namespace Glib
+{
+ /** @relates Gdk::DisplayManager
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Gdk::DisplayManager> wrap(GdkDisplayManager* object, bool take_copy = false);
+}
+
+
+#endif /* _GDKMM_DISPLAYMANAGER_H */
+
diff --git a/libs/gtkmm2/gdk/gdkmm/dragcontext.cc b/libs/gtkmm2/gdk/gdkmm/dragcontext.cc
new file mode 100644
index 0000000000..3a2574fb72
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/dragcontext.cc
@@ -0,0 +1,310 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gdkmm/dragcontext.h>
+#include <gdkmm/private/dragcontext_p.h>
+
+#include <gdk/gdkenumtypes.h>
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gdkmm/window.h>
+#include <gtk/gtkdnd.h>
+#include <gdk/gdkwindow.h>
+#include <glibmm/utility.h> //For ScopedPtr<>.
+
+namespace Gdk
+{
+
+void DragContext::find_window_for_screen(const Glib::RefPtr<Window>& drag_window, const Glib::RefPtr<Screen>& screen, int x_root, int y_root, Glib::RefPtr<Window>& dest_window, DragProtocol* protocol) const
+{
+ GdkWindow* cWindow = 0;
+ gdk_drag_find_window_for_screen(const_cast<GdkDragContext*>(gobj()), drag_window->gobj(), screen->gobj(), x_root, y_root, &cWindow, (GdkDragProtocol*)(protocol));
+ dest_window = Glib::wrap((GdkWindowObject*)cWindow);
+}
+
+void DragContext::drag_refuse(guint32 time)
+{
+ gdk_drag_status(gobj(), ((GdkDragAction)(0)) /* see GDK docs */, time);
+}
+
+Glib::StringArrayHandle DragContext::get_targets() const
+{
+ std::list<Glib::ustring> listTargets;
+
+ //Get a newly-allocated array of atoms:
+ GList* list = gobj()->targets;
+ while(list)
+ {
+ GdkAtom atom = (GdkAtom)list->data;
+
+ //Convert the atom to a string:
+ gchar* const atom_name = gdk_atom_name(atom);
+
+ Glib::ustring target;
+ if(atom_name)
+ target = Glib::ScopedPtr<char>(atom_name).get(); //This frees the gchar*.
+
+ listTargets.push_back(target);
+
+ list = list->next;
+ }
+
+ return listTargets;
+}
+
+} /* namespace Gdk */
+
+
+namespace
+{
+} // anonymous namespace
+
+// static
+GType Glib::Value<Gdk::DragAction>::value_type()
+{
+ return gdk_drag_action_get_type();
+}
+
+// static
+GType Glib::Value<Gdk::DragProtocol>::value_type()
+{
+ return gdk_drag_protocol_get_type();
+}
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Gdk::DragContext> wrap(GdkDragContext* object, bool take_copy)
+{
+ return Glib::RefPtr<Gdk::DragContext>( dynamic_cast<Gdk::DragContext*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} /* namespace Glib */
+
+
+namespace Gdk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& DragContext_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &DragContext_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gdk_drag_context_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void DragContext_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* DragContext_Class::wrap_new(GObject* object)
+{
+ return new DragContext((GdkDragContext*)object);
+}
+
+
+/* The implementation: */
+
+GdkDragContext* DragContext::gobj_copy()
+{
+ reference();
+ return gobj();
+}
+
+DragContext::DragContext(const Glib::ConstructParams& construct_params)
+:
+ Glib::Object(construct_params)
+{}
+
+DragContext::DragContext(GdkDragContext* castitem)
+:
+ Glib::Object((GObject*)(castitem))
+{}
+
+DragContext::~DragContext()
+{}
+
+
+DragContext::CppClassType DragContext::dragcontext_class_; // initialize static member
+
+GType DragContext::get_type()
+{
+ return dragcontext_class_.init().get_type();
+}
+
+GType DragContext::get_base_type()
+{
+ return gdk_drag_context_get_type();
+}
+
+
+DragContext::DragContext()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Glib::Object(Glib::ConstructParams(dragcontext_class_.init()))
+{
+ }
+
+Glib::RefPtr<DragContext> DragContext::create()
+{
+ return Glib::RefPtr<DragContext>( new DragContext() );
+}
+void DragContext::drag_status(DragAction action, guint32 time)
+{
+ gdk_drag_status(gobj(), ((GdkDragAction)(action)), time);
+}
+
+void DragContext::drop_reply(bool ok, guint32 time)
+{
+ gdk_drop_reply(gobj(), static_cast<int>(ok), time);
+}
+
+void DragContext::drop_finish(bool success, guint32 time)
+{
+ gdk_drop_finish(gobj(), static_cast<int>(success), time);
+}
+
+Glib::ustring DragContext::get_selection() const
+{
+ return Gdk::AtomString::to_cpp_type(gdk_drag_get_selection(const_cast<GdkDragContext*>(gobj())));
+}
+
+void DragContext::drag_finish(bool success, bool del, guint32 time)
+{
+ gtk_drag_finish(gobj(), static_cast<int>(success), static_cast<int>(del), time);
+}
+
+void DragContext::set_icon(const Glib::RefPtr<Gdk::Colormap>& colormap, const Glib::RefPtr<Gdk::Pixmap>& pixmap, const Glib::RefPtr<Gdk::Bitmap>& mask, int hot_x, int hot_y)
+{
+ gtk_drag_set_icon_pixmap(gobj(), Glib::unwrap(colormap), Glib::unwrap(pixmap), Glib::unwrap(mask), hot_x, hot_y);
+}
+
+void DragContext::set_icon(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf, int hot_x, int hot_y)
+{
+ gtk_drag_set_icon_pixbuf(gobj(), Glib::unwrap(pixbuf), hot_x, hot_y);
+}
+
+void DragContext::set_icon(const Glib::ustring& stock_id, int hot_x, int hot_y)
+{
+ gtk_drag_set_icon_stock(gobj(), stock_id.c_str(), hot_x, hot_y);
+}
+
+void DragContext::set_icon()
+{
+ gtk_drag_set_icon_default(gobj());
+}
+
+Glib::RefPtr<Window> DragContext::get_source_window()
+{
+ Glib::RefPtr<Window> ref_ptr(Glib::wrap((GdkWindowObject*)(gobj()->source_window)));
+
+ if(ref_ptr)
+ ref_ptr->reference();
+
+ return ref_ptr;
+}
+
+Glib::RefPtr<const Window> DragContext::get_source_window() const
+{
+ Glib::RefPtr<const Window> ref_ptr(Glib::wrap((GdkWindowObject*)(gobj()->source_window)));
+
+ if(ref_ptr)
+ ref_ptr->reference();
+
+ return ref_ptr;
+}
+
+Glib::RefPtr<Window> DragContext::get_destination_window()
+{
+ Glib::RefPtr<Window> ref_ptr(Glib::wrap((GdkWindowObject*)(gobj()->dest_window)));
+
+ if(ref_ptr)
+ ref_ptr->reference();
+
+ return ref_ptr;
+}
+
+Glib::RefPtr<const Window> DragContext::get_destination_window() const
+{
+ Glib::RefPtr<const Window> ref_ptr(Glib::wrap((GdkWindowObject*)(gobj()->dest_window)));
+
+ if(ref_ptr)
+ ref_ptr->reference();
+
+ return ref_ptr;
+}
+
+DragProtocol DragContext::get_protocol() const
+{
+ return ((DragProtocol)(gobj()->protocol));
+}
+
+bool DragContext::get_is_source() const
+{
+ return gobj()->is_source;
+}
+
+DragAction DragContext::get_actions() const
+{
+ return ((DragAction)(gobj()->actions));
+}
+
+DragAction DragContext::get_suggested_action() const
+{
+ return ((DragAction)(gobj()->suggested_action));
+}
+
+DragAction DragContext::get_action() const
+{
+ return ((DragAction)(gobj()->action));
+}
+
+guint32 DragContext::get_start_time() const
+{
+ return gobj()->start_time;
+}
+
+
+} // namespace Gdk
+
+
diff --git a/libs/gtkmm2/gdk/gdkmm/dragcontext.h b/libs/gtkmm2/gdk/gdkmm/dragcontext.h
new file mode 100644
index 0000000000..57507df105
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/dragcontext.h
@@ -0,0 +1,369 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GDKMM_DRAGCONTEXT_H
+#define _GDKMM_DRAGCONTEXT_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* dragcontext.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gdkmm/color.h>
+#include <gdkmm/pixbuf.h>
+#include <gdkmm/bitmap.h>
+#include <glibmm/object.h>
+#include <gdk/gdkdnd.h>
+#include <glibmm/listhandle.h>
+#include <gtkmm/stockid.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GdkDragContext GdkDragContext;
+typedef struct _GdkDragContextClass GdkDragContextClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gdk
+{ class DragContext_Class; } // namespace Gdk
+namespace Gtk
+{
+ class Widget;
+} /* namespace Gtk */
+
+//typedef struct _GdkAtom *GdkAtom;
+
+namespace Gdk
+{
+
+
+/** @addtogroup gdkmmEnums Enums and Flags */
+
+/**
+ * @ingroup gdkmmEnums
+ * @par Bitwise operators:
+ * <tt>%DragAction operator|(DragAction, DragAction)</tt><br>
+ * <tt>%DragAction operator&(DragAction, DragAction)</tt><br>
+ * <tt>%DragAction operator^(DragAction, DragAction)</tt><br>
+ * <tt>%DragAction operator~(DragAction)</tt><br>
+ * <tt>%DragAction& operator|=(DragAction&, DragAction)</tt><br>
+ * <tt>%DragAction& operator&=(DragAction&, DragAction)</tt><br>
+ * <tt>%DragAction& operator^=(DragAction&, DragAction)</tt><br>
+ */
+enum DragAction
+{
+ ACTION_DEFAULT = 1 << 0,
+ ACTION_COPY = 1 << 1,
+ ACTION_MOVE = 1 << 2,
+ ACTION_LINK = 1 << 3,
+ ACTION_PRIVATE = 1 << 4,
+ ACTION_ASK = 1 << 5
+};
+
+/** @ingroup gdkmmEnums */
+inline DragAction operator|(DragAction lhs, DragAction rhs)
+ { return static_cast<DragAction>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
+
+/** @ingroup gdkmmEnums */
+inline DragAction operator&(DragAction lhs, DragAction rhs)
+ { return static_cast<DragAction>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
+
+/** @ingroup gdkmmEnums */
+inline DragAction operator^(DragAction lhs, DragAction rhs)
+ { return static_cast<DragAction>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
+
+/** @ingroup gdkmmEnums */
+inline DragAction operator~(DragAction flags)
+ { return static_cast<DragAction>(~static_cast<unsigned>(flags)); }
+
+/** @ingroup gdkmmEnums */
+inline DragAction& operator|=(DragAction& lhs, DragAction rhs)
+ { return (lhs = static_cast<DragAction>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
+
+/** @ingroup gdkmmEnums */
+inline DragAction& operator&=(DragAction& lhs, DragAction rhs)
+ { return (lhs = static_cast<DragAction>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
+
+/** @ingroup gdkmmEnums */
+inline DragAction& operator^=(DragAction& lhs, DragAction rhs)
+ { return (lhs = static_cast<DragAction>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
+
+} // namespace Gdk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gdk::DragAction> : public Glib::Value_Flags<Gdk::DragAction>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gdk
+{
+
+/**
+ * @ingroup gdkmmEnums
+ */
+enum DragProtocol
+{
+ DRAG_PROTO_MOTIF,
+ DRAG_PROTO_XDND,
+ DRAG_PROTO_NONE,
+ DRAG_PROTO_WIN32_DROPFILES,
+ DRAG_PROTO_OLE2,
+ DRAG_PROTO_LOCAL
+};
+
+} // namespace Gdk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gdk::DragProtocol> : public Glib::Value_Enum<Gdk::DragProtocol>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gdk
+{
+
+
+/** A Gdk::DragContext holds information about a drag in progress. It is used on both source and destination sides.
+ */
+
+class DragContext : public Glib::Object
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef DragContext CppObjectType;
+ typedef DragContext_Class CppClassType;
+ typedef GdkDragContext BaseObjectType;
+ typedef GdkDragContextClass BaseClassType;
+
+private: friend class DragContext_Class;
+ static CppClassType dragcontext_class_;
+
+private:
+ // noncopyable
+ DragContext(const DragContext&);
+ DragContext& operator=(const DragContext&);
+
+protected:
+ explicit DragContext(const Glib::ConstructParams& construct_params);
+ explicit DragContext(GdkDragContext* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~DragContext();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ GdkDragContext* gobj() { return reinterpret_cast<GdkDragContext*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const GdkDragContext* gobj() const { return reinterpret_cast<GdkDragContext*>(gobject_); }
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ GdkDragContext* gobj_copy();
+
+private:
+
+
+protected:
+ DragContext();
+
+public:
+
+ static Glib::RefPtr<DragContext> create();
+
+
+ /** Selects one of the actions offered by the drag source.
+ *
+ * This function is called by the drag destination in response to
+ * gdk_drag_motion() called by the drag source.
+ * @param action The selected action which will be taken when a drop happens,
+ * or 0 to indicate that a drop will not be accepted.
+ * @param time The timestamp for this operation.
+ */
+ void drag_status(DragAction action, guint32 time);
+ void drag_refuse(guint32 time);
+
+ //gdk_drag_motion is only used in GDK internally.
+
+
+ /** Accepts or rejects a drop.
+ *
+ * This function is called by the drag destination in response
+ * to a drop initiated by the drag source.
+ * @param ok <tt>true</tt> if the drop is accepted.
+ * @param time The timestamp for this operation.
+ */
+ void drop_reply(bool ok, guint32 time);
+
+ /** Ends the drag operation after a drop.
+ *
+ * This function is called by the drag destination.
+ * @param success <tt>true</tt> if the data was successfully received.
+ * @param time The timestamp for this operation.
+ */
+ void drop_finish(bool success, guint32 time);
+
+ /** Returns the selection atom for the current source window.
+ * @return The selection atom.
+ */
+ Glib::ustring get_selection() const;
+
+
+ void drag_finish(bool success, bool del, guint32 time);
+ //Gtk::Widget* get_source_widget() - see Gtk::Widget::drag_get_source_widget()
+
+ // void set_icon(Gtk::Widget* widget, int hot_x, int hot_y) - see Gtk::Widget::set_as_icon().
+
+ void set_icon(const Glib::RefPtr<Gdk::Colormap>& colormap, const Glib::RefPtr<Gdk::Pixmap>& pixmap, const Glib::RefPtr<Gdk::Bitmap>& mask, int hot_x, int hot_y);
+
+ void set_icon(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf, int hot_x, int hot_y);
+
+ // The first argument was changed from StockID to ustring to avoid
+ // cross-dependence between gdkmm and gtkmm.
+ // See http://bugzilla.gnome.org/show_bug.cgi?id=79124 for details
+
+ void set_icon(const Glib::ustring& stock_id, int hot_x, int hot_y);
+
+ void set_icon();
+
+ /** Get the the source window of this drag.
+ * @result the source window of this drag.
+ */
+ Glib::RefPtr<Window> get_source_window();
+ Glib::RefPtr<const Window> get_source_window() const;
+
+ /** Get the the source window of this drag.
+ * @result the source window of this drag.
+ */
+ Glib::RefPtr<Window> get_destination_window();
+ Glib::RefPtr<const Window> get_destination_window() const;
+
+ /** Get a list of targets offered by the source.
+ * @result a list of targets offered by the source.
+ */
+ Glib::StringArrayHandle get_targets() const;
+
+ /** Get the DND protocol which governs this drag.
+ * @result the DND protocol which governs this drag.
+ */
+ DragProtocol get_protocol() const;
+
+ /** Discover whether the context is used on the source side.
+ * @result true if the context is used on the source side.
+ */
+ bool get_is_source() const;
+
+ /** Get a bitmask of actions proposed by the source when the suggested_action is Gdk::ACTION_ASK
+ * @result a bitmask of actions proposed by the source when the suggested_action is Gdk::ACTION_ASK
+ */
+ DragAction get_actions() const;
+
+ /** Get the action suggested by the source.
+ * @result The action suggested by the source.
+ */
+ DragAction get_suggested_action() const;
+
+ /** Get the action chosen by the destination.
+ * @result the action chosen byt the destination.
+ */
+ DragAction get_action() const;
+
+ /** Get a timestamp recording the start time of this drag.
+ * @result a timestamp recording the start time of this drag.
+ */
+ guint32 get_start_time() const;
+
+
+ /** Finds the destination window and DND protocol to use at the
+ * given pointer position.
+ *
+ * This function is called by the drag source to obtain the
+ * @a dest_window and @a protocol parameters for gdk_drag_motion().
+ *
+ * Since: 2.2
+ * @param drag_window A window which may be at the pointer position, but
+ * should be ignored, since it is put up by the drag source as an icon.
+ * @param screen The screen where the destination window is sought.
+ * @param x_root The x position of the pointer in root coordinates.
+ * @param y_root The y position of the pointer in root coordinates.
+ * @param dest_window Location to store the destination window in.
+ * @param protocol Location to store the DND protocol in.
+ */
+
+ void find_window_for_screen(const Glib::RefPtr<Window>& drag_window, const Glib::RefPtr<Screen>& screen, int x_root, int y_root, Glib::RefPtr<Window>& dest_window, DragProtocol* protocol) const;
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+};
+
+} /* namespace Gdk */
+
+
+namespace Glib
+{
+ /** @relates Gdk::DragContext
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Gdk::DragContext> wrap(GdkDragContext* object, bool take_copy = false);
+}
+
+
+#endif /* _GDKMM_DRAGCONTEXT_H */
+
diff --git a/libs/gtkmm2/gdk/gdkmm/drawable.cc b/libs/gtkmm2/gdk/gdkmm/drawable.cc
new file mode 100644
index 0000000000..58adc15cec
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/drawable.cc
@@ -0,0 +1,369 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gdkmm/drawable.h>
+#include <gdkmm/private/drawable_p.h>
+
+#include <gdk/gdkenumtypes.h>
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gdkmm/gc.h>
+#include <gdkmm/display.h>
+#include <gdkmm/pixbuf.h>
+#include <gdk/gdkdrawable.h>
+
+namespace Gdk
+{
+
+void Drawable::draw_points(const Glib::RefPtr<const GC>& gc, const Glib::ArrayHandle<Point>& points)
+{
+ // Don't assume the reinterpret_cast<> works everywhere. Gdk::Point is *special*.
+ gdk_draw_points(
+ gobj(), const_cast<GdkGC*>(Glib::unwrap<Gdk::GC>(gc)),
+ reinterpret_cast<GdkPoint*>(const_cast<Point*>(points.data())),
+ points.size());
+}
+
+void Drawable::draw_lines(const Glib::RefPtr<const GC>& gc, const Glib::ArrayHandle<Point>& points)
+{
+ // Don't assume the reinterpret_cast<> works everywhere. Gdk::Point is *special*.
+ gdk_draw_lines(
+ gobj(), const_cast<GdkGC*>(Glib::unwrap<Gdk::GC>(gc)),
+ reinterpret_cast<GdkPoint*>(const_cast<Point*>(points.data())),
+ points.size());
+}
+
+void Drawable::draw_polygon(const Glib::RefPtr<const GC>& gc, bool filled,
+ const Glib::ArrayHandle<Point>& points)
+{
+ // Don't assume the reinterpret_cast<> works everywhere. Gdk::Point is *special*.
+ gdk_draw_polygon(
+ gobj(), const_cast<GdkGC*>(Glib::unwrap<Gdk::GC>(gc)), filled,
+ reinterpret_cast<GdkPoint*>(const_cast<Point*>(points.data())),
+ points.size());
+}
+
+void Drawable::copy_to_image(const Glib::RefPtr<Image>& image, int src_x, int src_y, int dest_x, int dest_y, int width, int height) const
+{
+ gdk_drawable_copy_to_image(const_cast<GdkDrawable*>(gobj()), Glib::unwrap(image), src_x, src_y, dest_x, dest_y, width, height);
+}
+
+
+} // namespace Gdk
+
+
+namespace
+{
+} // anonymous namespace
+
+// static
+GType Glib::Value<Gdk::RgbDither>::value_type()
+{
+ return gdk_rgb_dither_get_type();
+}
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Gdk::Drawable> wrap(GdkDrawable* object, bool take_copy)
+{
+ return Glib::RefPtr<Gdk::Drawable>( dynamic_cast<Gdk::Drawable*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} /* namespace Glib */
+
+
+namespace Gdk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Drawable_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Drawable_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gdk_drawable_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Drawable_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* Drawable_Class::wrap_new(GObject* object)
+{
+ return new Drawable((GdkDrawable*)object);
+}
+
+
+/* The implementation: */
+
+GdkDrawable* Drawable::gobj_copy()
+{
+ reference();
+ return gobj();
+}
+
+Drawable::Drawable(const Glib::ConstructParams& construct_params)
+:
+ Glib::Object(construct_params)
+{}
+
+Drawable::Drawable(GdkDrawable* castitem)
+:
+ Glib::Object((GObject*)(castitem))
+{}
+
+Drawable::~Drawable()
+{}
+
+
+Drawable::CppClassType Drawable::drawable_class_; // initialize static member
+
+GType Drawable::get_type()
+{
+ return drawable_class_.init().get_type();
+}
+
+GType Drawable::get_base_type()
+{
+ return gdk_drawable_get_type();
+}
+
+
+Drawable::Drawable()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Glib::Object(Glib::ConstructParams(drawable_class_.init()))
+{
+ }
+
+Glib::RefPtr<Drawable> Drawable::create()
+{
+ return Glib::RefPtr<Drawable>( new Drawable() );
+}
+void Drawable::get_size(int& width, int& height)
+{
+ gdk_drawable_get_size(gobj(), &width, &height);
+}
+
+int Drawable::get_depth() const
+{
+ return gdk_drawable_get_depth(const_cast<GdkDrawable*>(gobj()));
+}
+
+void Drawable::set_colormap(const Glib::RefPtr<Colormap>& colormap)
+{
+ gdk_drawable_set_colormap(gobj(), Glib::unwrap(colormap));
+}
+
+Glib::RefPtr<Colormap> Drawable::get_colormap()
+{
+
+ Glib::RefPtr<Colormap> retvalue = Glib::wrap(gdk_drawable_get_colormap(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<Visual> Drawable::get_visual()
+{
+
+ Glib::RefPtr<Visual> retvalue = Glib::wrap(gdk_drawable_get_visual(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+void Drawable::draw_point(const Glib::RefPtr<const GC>& gc, int x, int y)
+{
+ gdk_draw_point(gobj(), const_cast<GdkGC*>(Glib::unwrap<GC>(gc)), x, y);
+}
+
+void Drawable::draw_line(const Glib::RefPtr<const GC>& gc, int x1, int y1, int x2, int y2)
+{
+ gdk_draw_line(gobj(), const_cast<GdkGC*>(Glib::unwrap<GC>(gc)), x1, y1, x2, y2);
+}
+
+void Drawable::draw_rectangle(const Glib::RefPtr<const GC>& gc, bool filled, int x, int y, int width, int height)
+{
+ gdk_draw_rectangle(gobj(), const_cast<GdkGC*>(Glib::unwrap<GC>(gc)), static_cast<int>(filled), x, y, width, height);
+}
+
+void Drawable::draw_arc(const Glib::RefPtr<const GC>& gc, bool filled, int x, int y, int width, int height, int angle1, int angle2)
+{
+ gdk_draw_arc(gobj(), const_cast<GdkGC*>(Glib::unwrap<GC>(gc)), static_cast<int>(filled), x, y, width, height, angle1, angle2);
+}
+
+void Drawable::draw_drawable(const Glib::RefPtr<const GC>& gc, const Glib::RefPtr<const Drawable>& src, int xsrc, int ysrc, int xdest, int ydest, int width, int height)
+{
+ gdk_draw_drawable(gobj(), const_cast<GdkGC*>(Glib::unwrap<GC>(gc)), const_cast<GdkDrawable*>(Glib::unwrap<Drawable>(src)), xsrc, ysrc, xdest, ydest, width, height);
+}
+
+void Drawable::draw_image(const Glib::RefPtr<const GC>& gc, const Glib::RefPtr<const Image>& image, int xsrc, int ysrc, int xdest, int ydest, int width, int height)
+{
+ gdk_draw_image(gobj(), const_cast<GdkGC*>(Glib::unwrap<GC>(gc)), const_cast<GdkImage*>(Glib::unwrap<Image>(image)), xsrc, ysrc, xdest, ydest, width, height);
+}
+
+void Drawable::draw_segments(const Glib::RefPtr<const GC>& gc, GdkSegment* segs, int nsegs)
+{
+ gdk_draw_segments(gobj(), const_cast<GdkGC*>(Glib::unwrap<GC>(gc)), segs, nsegs);
+}
+
+void Drawable::draw_glyphs(const Glib::RefPtr<const GC>& gc, const Glib::RefPtr<const Pango::Font>& font, int x, int y, const Pango::GlyphString& glyphs)
+{
+ gdk_draw_glyphs(gobj(), const_cast<GdkGC*>(Glib::unwrap<GC>(gc)), const_cast<PangoFont*>(Glib::unwrap<Pango::Font>(font)), x, y, const_cast<PangoGlyphString*>(glyphs.gobj()));
+}
+
+void Drawable::draw_layout_line(const Glib::RefPtr<const GC>& gc, int x, int y, const Glib::RefPtr<const Pango::LayoutLine>& line)
+{
+ gdk_draw_layout_line(gobj(), const_cast<GdkGC*>(Glib::unwrap<GC>(gc)), x, y, const_cast<PangoLayoutLine*>(Glib::unwrap<Pango::LayoutLine>(line)));
+}
+
+void Drawable::draw_layout_line(const Glib::RefPtr<const GC>& gc, int x, int y, const Glib::RefPtr<const Pango::LayoutLine>& line, const Color& foreground, const Color& background)
+{
+ gdk_draw_layout_line_with_colors(gobj(), const_cast<GdkGC*>(Glib::unwrap<GC>(gc)), x, y, const_cast<PangoLayoutLine*>(Glib::unwrap<Pango::LayoutLine>(line)), (foreground).gobj(), (background).gobj());
+}
+
+void Drawable::draw_layout(const Glib::RefPtr<const GC>& gc, int x, int y, const Glib::RefPtr<const Pango::Layout>& layout)
+{
+ gdk_draw_layout(gobj(), const_cast<GdkGC*>(Glib::unwrap<GC>(gc)), x, y, const_cast<PangoLayout*>(Glib::unwrap<Pango::Layout>(layout)));
+}
+
+void Drawable::draw_layout(const Glib::RefPtr<const GC>& gc, int x, int y, const Glib::RefPtr<const Pango::Layout>& layout, const Color& foreground, const Color& background)
+{
+ gdk_draw_layout_with_colors(gobj(), const_cast<GdkGC*>(Glib::unwrap<GC>(gc)), x, y, const_cast<PangoLayout*>(Glib::unwrap<Pango::Layout>(layout)), (foreground).gobj(), (background).gobj());
+}
+
+void Drawable::draw_pixbuf(const Glib::RefPtr<const GC>& gc, const Glib::RefPtr<Pixbuf>& pixbuf, int src_x, int src_y, int dest_x, int dest_y, int width, int height, RgbDither dither, int x_dither, int y_dither)
+{
+ gdk_draw_pixbuf(gobj(), const_cast<GdkGC*>(Glib::unwrap<GC>(gc)), Glib::unwrap(pixbuf), src_x, src_y, dest_x, dest_y, width, height, ((GdkRgbDither)(dither)), x_dither, y_dither);
+}
+
+Glib::RefPtr<Image> Drawable::get_image(int x, int y, int width, int height) const
+{
+ return Glib::wrap(gdk_drawable_get_image(const_cast<GdkDrawable*>(gobj()), x, y, width, height));
+}
+
+Region Drawable::get_clip_region() const
+{
+ return Region(gdk_drawable_get_clip_region(const_cast<GdkDrawable*>(gobj())));
+}
+
+Region Drawable::get_visible_region() const
+{
+ return Region(gdk_drawable_get_visible_region(const_cast<GdkDrawable*>(gobj())));
+}
+
+void Drawable::draw_rgb_image(const Glib::RefPtr<const GC>& gc, int x, int y, int width, int height, RgbDither dith, const guchar* rgb_buf, int rowstride)
+{
+ gdk_draw_rgb_image(gobj(), const_cast<GdkGC*>(Glib::unwrap<GC>(gc)), x, y, width, height, ((GdkRgbDither)(dith)), const_cast<guchar*>(rgb_buf), rowstride);
+}
+
+void Drawable::draw_rgb_image_dithalign(const Glib::RefPtr<const GC>& gc, int x, int y, int width, int height, RgbDither dith, const guchar* rgb_buf, int rowstride, int xdith, int ydith)
+{
+ gdk_draw_rgb_image_dithalign(gobj(), const_cast<GdkGC*>(Glib::unwrap<GC>(gc)), x, y, width, height, ((GdkRgbDither)(dith)), const_cast<guchar*>(rgb_buf), rowstride, xdith, ydith);
+}
+
+void Drawable::draw_rgb_32_image(const Glib::RefPtr<const GC>& gc, int x, int y, int width, int height, RgbDither dith, const guchar* rgb_buf, int rowstride)
+{
+ gdk_draw_rgb_32_image(gobj(), const_cast<GdkGC*>(Glib::unwrap<GC>(gc)), x, y, width, height, ((GdkRgbDither)(dith)), const_cast<guchar*>(rgb_buf), rowstride);
+}
+
+void Drawable::draw_rgb_32_image_dithalign(const Glib::RefPtr<const GC>& gc, int x, int y, int width, int height, RgbDither dith, const guchar* buf, int rowstride, int xdith, int ydith)
+{
+ gdk_draw_rgb_32_image_dithalign(gobj(), const_cast<GdkGC*>(Glib::unwrap<GC>(gc)), x, y, width, height, ((GdkRgbDither)(dith)), const_cast<guchar*>(buf), rowstride, xdith, ydith);
+}
+
+void Drawable::draw_gray_image(const Glib::RefPtr<const GC>& gc, int x, int y, int width, int height, RgbDither dith, const guchar* rgb_buf, int rowstride)
+{
+ gdk_draw_gray_image(gobj(), const_cast<GdkGC*>(Glib::unwrap<GC>(gc)), x, y, width, height, ((GdkRgbDither)(dith)), const_cast<guchar*>(rgb_buf), rowstride);
+}
+
+void Drawable::draw_indexed_image(const Glib::RefPtr<const GC>& gc, int x, int y, int width, int height, RgbDither dith, const guchar* rgb_buf, int rowstride, const RgbCmap& cmap)
+{
+ gdk_draw_indexed_image(gobj(), const_cast<GdkGC*>(Glib::unwrap<GC>(gc)), x, y, width, height, ((GdkRgbDither)(dith)), const_cast<guchar*>(rgb_buf), rowstride, const_cast<GdkRgbCmap*>(cmap.gobj()));
+}
+
+Glib::RefPtr<Screen> Drawable::get_screen()
+{
+
+ Glib::RefPtr<Screen> retvalue = Glib::wrap(gdk_drawable_get_screen(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const Screen> Drawable::get_screen() const
+{
+
+ Glib::RefPtr<const Screen> retvalue = Glib::wrap(gdk_drawable_get_screen(const_cast<GdkDrawable*>(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<Display> Drawable::get_display()
+{
+
+ Glib::RefPtr<Display> retvalue = Glib::wrap(gdk_drawable_get_display(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const Display> Drawable::get_display() const
+{
+
+ Glib::RefPtr<const Display> retvalue = Glib::wrap(gdk_drawable_get_display(const_cast<GdkDrawable*>(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+
+} // namespace Gdk
+
+
diff --git a/libs/gtkmm2/gdk/gdkmm/drawable.h b/libs/gtkmm2/gdk/gdkmm/drawable.h
new file mode 100644
index 0000000000..6331e46ff2
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/drawable.h
@@ -0,0 +1,601 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GDKMM_DRAWABLE_H
+#define _GDKMM_DRAWABLE_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gdk/gdkdrawable.h>
+#include <gdk/gdkrgb.h>
+#include <pangomm/font.h>
+#include <pangomm/layout.h>
+#include <pangomm/layoutline.h>
+#include <pangomm/glyphstring.h>
+#include <gdkmm/gc.h>
+#include <gdkmm/image.h>
+#include <gdkmm/color.h>
+#include <gdkmm/region.h>
+#include <gdkmm/rgbcmap.h>
+#include <gdkmm/types.h>
+//#include <gdkmm/pixbuf.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GdkDrawable GdkDrawable;
+typedef struct _GdkDrawableClass GdkDrawableClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gdk
+{ class Drawable_Class; } // namespace Gdk
+namespace Gdk
+{
+
+
+/** @addtogroup gdkmmEnums Enums and Flags */
+
+/**
+ * @ingroup gdkmmEnums
+ */
+enum RgbDither
+{
+ RGB_DITHER_NONE,
+ RGB_DITHER_NORMAL,
+ RGB_DITHER_MAX
+};
+
+} // namespace Gdk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gdk::RgbDither> : public Glib::Value_Enum<Gdk::RgbDither>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gdk
+{
+
+
+class GC;
+class Pixbuf;
+
+/** Drawing Primitives.
+ * Gdk::Drawable is the base class for all of the objects that accept drawing
+ * commands. The available drawables include pixmaps, windows, and bitmaps.
+ * Drawable is abstract as there is no such type on the server side.
+ *
+ * To use a drawable, create a concrete Drawable of the type you wish to use
+ * and a Gdk::GC (graphics context) for that Drawable. With the GC you can
+ * draw lines, text, arcs and such.
+ */
+
+class Drawable : public Glib::Object
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef Drawable CppObjectType;
+ typedef Drawable_Class CppClassType;
+ typedef GdkDrawable BaseObjectType;
+ typedef GdkDrawableClass BaseClassType;
+
+private: friend class Drawable_Class;
+ static CppClassType drawable_class_;
+
+private:
+ // noncopyable
+ Drawable(const Drawable&);
+ Drawable& operator=(const Drawable&);
+
+protected:
+ explicit Drawable(const Glib::ConstructParams& construct_params);
+ explicit Drawable(GdkDrawable* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~Drawable();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ GdkDrawable* gobj() { return reinterpret_cast<GdkDrawable*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const GdkDrawable* gobj() const { return reinterpret_cast<GdkDrawable*>(gobject_); }
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ GdkDrawable* gobj_copy();
+
+private:
+
+
+protected:
+ Drawable();
+
+public:
+
+ static Glib::RefPtr<Drawable> create();
+
+
+ /** Fills * @a width and * @a height with the size of @a drawable .
+ * @a width or @a height can be <tt>0</tt> if you only want the other one.
+ *
+ * On the X11 platform, if @a drawable is a Gdk::Window, the returned
+ * size is the size reported in the most-recently-processed configure
+ * event, rather than the current size on the X server.
+ * @param width Location to store drawable's width, or <tt>0</tt>.
+ * @param height Location to store drawable's height, or <tt>0</tt>.
+ */
+ void get_size(int& width, int& height);
+
+ /** Obtains the bit depth of the drawable, that is, the number of bits
+ * that make up a pixel in the drawable's visual. Examples are 8 bits
+ * per pixel, 24 bits per pixel, etc.
+ * @return Number of bits per pixel.
+ */
+ int get_depth() const;
+
+
+ /** Sets the colormap associated with @a drawable . Normally this will
+ * happen automatically when the drawable is created; you only need to
+ * use this function if the drawable-creating function did not have a
+ * way to determine the colormap, and you then use drawable operations
+ * that require a colormap. The colormap for all drawables and
+ * graphics contexts you intend to use together should match. i.e.
+ * when using a Gdk::GC to draw to a drawable, or copying one drawable
+ * to another, the colormaps should match.
+ * @param colormap A Gdk::Colormap.
+ */
+ void set_colormap(const Glib::RefPtr<Colormap>& colormap);
+
+ /** Gets the colormap for @a drawable , if one is set; returns
+ * <tt>0</tt> otherwise.
+ * @return The colormap, or <tt>0</tt>.
+ */
+ Glib::RefPtr<Colormap> get_colormap();
+
+ /** Gets the Gdk::Visual describing the pixel format of @a drawable .
+ * @return A Gdk::Visual.
+ */
+ Glib::RefPtr<Visual> get_visual();
+
+
+ /** Draws a point, using the foreground color and other attributes of
+ * the Gdk::GC.
+ * @param gc A Gdk::GC.
+ * @param x The x coordinate of the point.
+ * @param y The y coordinate of the point.
+ */
+ void draw_point(const Glib::RefPtr<const GC>& gc, int x, int y);
+ void draw_points(const Glib::RefPtr<const GC>& gc, const Glib::ArrayHandle<Point>& points);
+
+
+ /** Draws a line, using the foreground color and other attributes of
+ * the Gdk::GC.
+ * @param gc A Gdk::GC.
+ * @param x1 The x coordinate of the start point.
+ * @param y1 The y coordinate of the start point.
+ * @param x2 The x coordinate of the end point.
+ * @param y2 The y coordinate of the end point.
+ */
+ void draw_line(const Glib::RefPtr<const GC>& gc, int x1, int y1, int x2, int y2);
+ void draw_lines(const Glib::RefPtr<const GC>& gc, const Glib::ArrayHandle<Point>& points);
+
+
+ /** Draws a rectangular outline or filled rectangle, using the foreground color
+ * and other attributes of the Gdk::GC.
+ *
+ * A rectangle drawn filled is 1 pixel smaller in both dimensions than a
+ * rectangle outlined. Calling
+ * <tt>gdk_draw_rectangle (window, gc, <tt>true</tt>, 0, 0, 20, 20)</tt>
+ * results in a filled rectangle 20 pixels wide and 20 pixels high. Calling
+ * <tt>gdk_draw_rectangle (window, gc, <tt>false</tt>, 0, 0, 20, 20)</tt>
+ * results in an outlined rectangle with corners at (0, 0), (0, 20), (20, 20),
+ * and (20, 0), which makes it 21 pixels wide and 21 pixels high.
+ * @param gc A Gdk::GC.
+ * @param filled <tt>true</tt> if the rectangle should be filled.
+ * @param x The x coordinate of the left edge of the rectangle.
+ * @param y The y coordinate of the top edge of the rectangle.
+ * @param width The width of the rectangle.
+ * @param height The height of the rectangle.
+ */
+ void draw_rectangle(const Glib::RefPtr<const GC>& gc, bool filled, int x, int y, int width, int height);
+
+ /** Draws an arc or a filled 'pie slice'. The arc is defined by the bounding
+ * rectangle of the entire ellipse, and the start and end angles of the part
+ * of the ellipse to be drawn.
+ * @param gc A Gdk::GC.
+ * @param filled <tt>true</tt> if the arc should be filled, producing a 'pie slice'.
+ * @param x The x coordinate of the left edge of the bounding rectangle.
+ * @param y The y coordinate of the top edge of the bounding rectangle.
+ * @param width The width of the bounding rectangle.
+ * @param height The height of the bounding rectangle.
+ * @param angle1 The start angle of the arc, relative to the 3 o'clock position,
+ * counter-clockwise, in 1/64ths of a degree.
+ * @param angle2 The end angle of the arc, relative to @a angle1 , in 1/64ths
+ * of a degree.
+ */
+ void draw_arc(const Glib::RefPtr<const GC>& gc, bool filled, int x, int y, int width, int height, int angle1, int angle2);
+ void draw_polygon(const Glib::RefPtr<const GC>& gc, bool filled, const Glib::ArrayHandle<Point>& points);
+
+
+ /** Copies the @a width x @a height region of @a src at coordinates ( @a xsrc ,
+ * @a ysrc ) to coordinates ( @a xdest , @a ydest ) in @a drawable .
+ * @a width and/or @a height may be given as -1, in which case the entire
+ * @a src drawable will be copied.
+ *
+ * Most fields in @a gc are not used for this operation, but notably the
+ * clip mask or clip region will be honored.
+ *
+ * The source and destination drawables must have the same visual and
+ * colormap, or errors will result. (On X11, failure to match
+ * visual/colormap results in a BadMatch error from the X server.)
+ * A common cause of this problem is an attempt to draw a bitmap to
+ * a color drawable. The way to draw a bitmap is to set the
+ * bitmap as a clip mask on your Gdk::GC, then use gdk_draw_rectangle()
+ * to draw a rectangle clipped to the bitmap.
+ * @param gc A Gdk::GC sharing the drawable's visual and colormap.
+ * @param src The source Gdk::Drawable, which may be the same as @a drawable .
+ * @param xsrc X position in @a src of rectangle to draw.
+ * @param ysrc Y position in @a src of rectangle to draw.
+ * @param xdest X position in @a drawable where the rectangle should be drawn.
+ * @param ydest Y position in @a drawable where the rectangle should be drawn.
+ * @param width Width of rectangle to draw, or -1 for entire @a src width.
+ * @param height Height of rectangle to draw, or -1 for entire @a src height.
+ */
+ void draw_drawable(const Glib::RefPtr<const GC>& gc, const Glib::RefPtr<const Drawable>& src, int xsrc, int ysrc, int xdest, int ydest, int width = -1, int height = -1);
+
+ /** Draws a Gdk::Image onto a drawable.
+ * The depth of the Gdk::Image must match the depth of the Gdk::Drawable.
+ * @param gc A Gdk::GC.
+ * @param image The Gdk::Image to draw.
+ * @param xsrc The left edge of the source rectangle within @a image .
+ * @param ysrc The top of the source rectangle within @a image .
+ * @param xdest The x coordinate of the destination within @a drawable .
+ * @param ydest The y coordinate of the destination within @a drawable .
+ * @param width The width of the area to be copied, or -1 to make the area
+ * extend to the right edge of @a image .
+ * @param height The height of the area to be copied, or -1 to make the area
+ * extend to the bottom edge of @a image .
+ */
+ void draw_image(const Glib::RefPtr<const GC>& gc, const Glib::RefPtr<const Image>& image, int xsrc, int ysrc, int xdest, int ydest, int width = -1, int height = -1);
+
+ //segs is an array, and this function will be used so little that it doesn't seem worth wrapping it to use a container of C++ types.
+
+ /** Draws a number of unconnected lines.
+ * @param gc A Gdk::GC.
+ * @param segs An array of Gdk::Segment structures specifying the start and
+ * end points of the lines to be drawn.
+ * @param nsegs The number of line segments to draw, i.e. the size of the
+ * @a segs array.
+ */
+ void draw_segments(const Glib::RefPtr<const GC>& gc, GdkSegment* segs, int nsegs); // TODO
+
+ //glyphs is not an array. I went down to pango_xft_render in pango and saw that PangoGlyphString here is not an array. -Bryan
+
+ /** This is a low-level function; 99% of text rendering should be done
+ * using gdk_draw_layout() instead.
+ *
+ * A glyph is a single image in a font. This function draws a sequence of
+ * glyphs. To obtain a sequence of glyphs you have to understand a
+ * lot about internationalized text handling, which you don't want to
+ * understand; thus, use gdk_draw_layout() instead of this function,
+ * gdk_draw_layout() handles the details.
+ * @param gc A Gdk::GC.
+ * @param font Font to be used.
+ * @param x X coordinate of baseline origin.
+ * @param y Y coordinate of baseline origin.
+ * @param glyphs The glyph string to draw.
+ */
+ void draw_glyphs(const Glib::RefPtr<const GC>& gc, const Glib::RefPtr<const Pango::Font>& font, int x, int y, const Pango::GlyphString& glyphs);
+
+
+ /** Render a Pango::LayoutLine onto an GDK drawable
+ *
+ * If the layout's Pango::Context has a transformation matrix set, then
+ * @a x and @a y specify the position of the left edge of the baseline
+ * (left is in before-tranform user coordinates) in after-transform
+ * device coordinates.
+ * @param gc Base graphics to use.
+ * @param x The x position of start of string (in pixels).
+ * @param y The y position of baseline (in pixels).
+ * @param line A Pango::LayoutLine.
+ */
+ void draw_layout_line(const Glib::RefPtr<const GC>& gc, int x, int y, const Glib::RefPtr<const Pango::LayoutLine>& line);
+
+ /** Render a Pango::LayoutLine onto a Gdk::Drawable, overriding the
+ * layout's normal colors with @a foreground and/or @a background .
+ * @a foreground and @a background need not be allocated.
+ *
+ * If the layout's Pango::Context has a transformation matrix set, then
+ * @a x and @a y specify the position of the left edge of the baseline
+ * (left is in before-tranform user coordinates) in after-transform
+ * device coordinates.
+ * @param gc Base graphics to use.
+ * @param x The x position of start of string (in pixels).
+ * @param y The y position of baseline (in pixels).
+ * @param line A Pango::LayoutLine.
+ * @param foreground Foreground override color, or <tt>0</tt> for none.
+ * @param background Background override color, or <tt>0</tt> for none.
+ */
+ void draw_layout_line(const Glib::RefPtr<const GC>& gc, int x, int y, const Glib::RefPtr<const Pango::LayoutLine>& line, const Color& foreground, const Color& background);
+
+
+ /** Render a Pango::Layout onto a GDK drawable
+ *
+ * If the layout's Pango::Context has a transformation matrix set, then
+ * @a x and @a y specify the position of the top left corner of the
+ * bounding box (in device space) of the transformed layout.
+ *
+ * If you're using GTK+, the usual way to obtain a Pango::Layout
+ * is gtk_widget_create_pango_layout().
+ * @param gc Base graphics context to use.
+ * @param x The X position of the left of the layout (in pixels).
+ * @param y The Y position of the top of the layout (in pixels).
+ * @param layout A Pango::Layout.
+ */
+ void draw_layout(const Glib::RefPtr<const GC>& gc, int x, int y, const Glib::RefPtr<const Pango::Layout>& layout);
+
+ /** Render a Pango::Layout onto a Gdk::Drawable, overriding the
+ * layout's normal colors with @a foreground and/or @a background .
+ * @a foreground and @a background need not be allocated.
+ *
+ * If the layout's Pango::Context has a transformation matrix set, then
+ * @a x and @a y specify the position of the top left corner of the
+ * bounding box (in device space) of the transformed layout.
+ *
+ * If you're using GTK+, the ususal way to obtain a Pango::Layout
+ * is gtk_widget_create_pango_layout().
+ * @param gc Base graphics context to use.
+ * @param x The X position of the left of the layout (in pixels).
+ * @param y The Y position of the top of the layout (in pixels).
+ * @param layout A Pango::Layout.
+ * @param foreground Foreground override color, or <tt>0</tt> for none.
+ * @param background Background override color, or <tt>0</tt> for none.
+ */
+ void draw_layout(const Glib::RefPtr<const GC>& gc, int x, int y, const Glib::RefPtr<const Pango::Layout>& layout, const Color& foreground, const Color& background);
+
+
+ /** Renders a rectangular portion of a pixbuf to a drawable. The destination
+ * drawable must have a colormap. All windows have a colormap, however, pixmaps
+ * only have colormap by default if they were created with a non-<tt>0</tt> window
+ * argument. Otherwise a colormap must be set on them with
+ * Gdk::Drawable::set_colormap().
+ *
+ * On older X servers, rendering pixbufs with an alpha channel involves round
+ * trips to the X server, and may be somewhat slow.
+ *
+ * The clip mask of @a gc is ignored, but clip rectangles and clip regions work
+ * fine.
+ *
+ * Since: 2.2
+ * @param gc A Gdk::GC, used for clipping, or <tt>0</tt>.
+ * @param pixbuf A Gdk::Pixbuf.
+ * @param src_x Source X coordinate within pixbuf.
+ * @param src_y Source Y coordinates within pixbuf.
+ * @param dest_x Destination X coordinate within drawable.
+ * @param dest_y Destination Y coordinate within drawable.
+ * @param width Width of region to render, in pixels, or -1 to use pixbuf width.
+ * @param height Height of region to render, in pixels, or -1 to use pixbuf height.
+ * @param dither Dithering mode for Gdk::RGB.
+ * @param x_dither X offset for dither.
+ * @param y_dither Y offset for dither.
+ */
+ void draw_pixbuf(const Glib::RefPtr<const GC>& gc, const Glib::RefPtr<Pixbuf>& pixbuf,
+ int src_x, int src_y, int dest_x, int dest_y,
+ int width, int height,
+ RgbDither dither, int x_dither, int y_dither);
+
+ // Note: This has no 'refreturn' because get_image() returns a newly created Image object.
+
+ /** A Gdk::Image stores client-side image data (pixels). In contrast,
+ * Gdk::Pixmap and Gdk::Window are server-side
+ * objects. get_image() obtains the pixels from a
+ * server-side drawable as a client-side Gdk::Image. The format of a
+ * Gdk::Image depends on the Gdk::Visual of the current display, which
+ * makes manipulating Gdk::Image extremely difficult; therefore, in
+ * most cases you should use Gdk::Pixbuf::get_from_drawable() instead of
+ * this lower-level function. A Gdk::Pixbuf contains image data in a
+ * canonicalized RGB format, rather than a display-dependent format.
+ * Of course, there's a convenience vs. speed tradeoff here, so you'll
+ * want to think about what makes sense for your application.
+ *
+ * @a x , @a y , @a width , and @a height define the region of @a drawable to
+ * obtain as an image.
+ *
+ * You would usually copy image data to the client side if you intend
+ * to examine the values of individual pixels, for example to darken
+ * an image or add a red tint. It would be prohibitively slow to
+ * make a round-trip request to the windowing system for each pixel,
+ * so instead you get all of them at once, modify them, then copy
+ * them all back at once.
+ *
+ * If the X server or other windowing system backend is on the local
+ * machine, this function may use shared memory to avoid copying
+ * the image data.
+ *
+ * If the source drawable is a Gdk::Window and partially offscreen
+ * or obscured, then the obscured portions of the returned image
+ * will contain undefined data.
+ * @param x X coordinate on @a drawable .
+ * @param y Y coordinate on @a drawable .
+ * @param width Width of region to get.
+ * @param height Height or region to get.
+ * @return A Gdk::Image containing the contents of @a drawable .
+ */
+ Glib::RefPtr<Image> get_image(int x, int y, int width, int height) const;
+
+ // gdk_drawable_copy_to_image() returns a new GdkImage when the image parameter is NULL, but that seems to be much the
+ // same as gdk_drawable_get_image().
+ void copy_to_image(const Glib::RefPtr<Image>& image, int src_x, int src_y, int dest_x, int dest_y, int width, int height) const;
+
+
+ /** Computes the region of a drawable that potentially can be written
+ * to by drawing primitives. This region will not take into account
+ * the clip region for the GC, and may also not take into account
+ * other factors such as if the window is obscured by other windows,
+ * but no area outside of this region will be affected by drawing
+ * primitives.
+ * @return A Gdk::Region. This must be freed with gdk_region_destroy()
+ * when you are done.
+ */
+ Region get_clip_region() const;
+
+ /** Computes the region of a drawable that is potentially visible.
+ * This does not necessarily take into account if the window is
+ * obscured by other windows, but no area outside of this region
+ * is visible.
+ * @return A Gdk::Region. This must be freed with gdk_region_destroy()
+ * when you are done.
+ */
+ Region get_visible_region() const;
+
+
+ // **** RGB stuff ****
+
+
+ void draw_rgb_image(
+ const Glib::RefPtr<const GC>& gc,
+ int x, int y, int width, int height,
+ RgbDither dith, const guchar* rgb_buf, int rowstride);
+
+
+ void draw_rgb_image_dithalign(
+ const Glib::RefPtr<const GC>& gc,
+ int x, int y, int width, int height,
+ RgbDither dith, const guchar* rgb_buf, int rowstride,
+ int xdith, int ydith);
+
+
+ void draw_rgb_32_image(
+ const Glib::RefPtr<const GC>& gc,
+ int x, int y, int width, int height,
+ RgbDither dith, const guchar* rgb_buf, int rowstride);
+
+
+ /** Like gdk_draw_rgb_32_image(), but allows you to specify the dither
+ * offsets. See gdk_draw_rgb_image_dithalign() for more details.
+ * @param gc A Gdk::GC.
+ * @param x X coordinate on @a drawable where image should go.
+ * @param y Y coordinate on @a drawable where image should go.
+ * @param width Width of area of image to draw.
+ * @param height Height of area of image to draw.
+ * @param dith Dithering mode.
+ * @param buf RGB image data.
+ * @param rowstride Rowstride of RGB image data.
+ * @param xdith X dither offset.
+ * @param ydith Y dither offset.
+ */
+ void draw_rgb_32_image_dithalign(
+ const Glib::RefPtr<const GC>& gc,
+ int x, int y, int width, int height,
+ RgbDither dith, const guchar* buf, int rowstride,
+ int xdith, int ydith);
+
+
+ void draw_gray_image(
+ const Glib::RefPtr<const GC>& gc,
+ int x, int y, int width, int height,
+ RgbDither dith, const guchar* rgb_buf, int rowstride);
+
+
+ void draw_indexed_image(
+ const Glib::RefPtr<const GC>& gc,
+ int x, int y, int width, int height,
+ RgbDither dith, const guchar* rgb_buf, int rowstride,
+ const RgbCmap& cmap);
+
+
+ /** Gets the Gdk::Screen associated with a Gdk::Drawable.
+ * @return The Gdk::Screen associated with @a drawable
+ *
+ * Since: 2.2.
+ */
+ Glib::RefPtr<Screen> get_screen();
+
+ /** Gets the Gdk::Screen associated with a Gdk::Drawable.
+ * @return The Gdk::Screen associated with @a drawable
+ *
+ * Since: 2.2.
+ */
+ Glib::RefPtr<const Screen> get_screen() const;
+
+
+ /** Gets the Gdk::Display associated with a Gdk::Drawable.
+ * @return The Gdk::Display associated with @a drawable
+ *
+ * Since: 2.2.
+ */
+ Glib::RefPtr<Display> get_display();
+
+ /** Gets the Gdk::Display associated with a Gdk::Drawable.
+ * @return The Gdk::Display associated with @a drawable
+ *
+ * Since: 2.2.
+ */
+ Glib::RefPtr<const Display> get_display() const;
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+};
+
+} // namespace Gdk
+
+
+namespace Glib
+{
+ /** @relates Gdk::Drawable
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Gdk::Drawable> wrap(GdkDrawable* object, bool take_copy = false);
+}
+
+
+#endif /* _GDKMM_DRAWABLE_H */
+
diff --git a/libs/gtkmm2/gdk/gdkmm/event.cc b/libs/gtkmm2/gdk/gdkmm/event.cc
new file mode 100644
index 0000000000..e9a71e918c
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/event.cc
@@ -0,0 +1,223 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gdkmm/event.h>
+#include <gdkmm/private/event_p.h>
+
+#include <gdk/gdkenumtypes.h>
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gdkmm/display.h>
+
+namespace Gdk
+{
+
+bool Event::send_client_message(const Glib::RefPtr<Display>& display, NativeWindow winid)
+{
+ return gdk_event_send_client_message_for_display(display->gobj(), gobj(), winid);
+}
+
+} //namespace Gdk
+
+
+namespace
+{
+} // anonymous namespace
+
+// static
+GType Glib::Value<Gdk::EventType>::value_type()
+{
+ return gdk_event_type_get_type();
+}
+
+// static
+GType Glib::Value<Gdk::ExtensionMode>::value_type()
+{
+ return gdk_extension_mode_get_type();
+}
+
+// static
+GType Glib::Value<Gdk::AxisUse>::value_type()
+{
+ return gdk_axis_use_get_type();
+}
+
+
+namespace Glib
+{
+
+Gdk::Event wrap(GdkEvent* object, bool take_copy)
+{
+ return Gdk::Event(object, take_copy);
+}
+
+} // namespace Glib
+
+
+namespace Gdk
+{
+
+
+// static
+GType Event::get_type()
+{
+ return gdk_event_get_type();
+}
+
+Event::Event()
+:
+ gobject_ (0) // Allows creation of invalid wrapper, e.g. for output arguments to methods.
+{}
+
+Event::Event(const Event& other)
+:
+ gobject_ ((other.gobject_) ? gdk_event_copy(other.gobject_) : 0)
+{}
+
+Event::Event(GdkEvent* gobject, bool make_a_copy)
+:
+ // For BoxedType wrappers, make_a_copy is true by default. The static
+ // BoxedType wrappers must always take a copy, thus make_a_copy = true
+ // ensures identical behaviour if the default argument is used.
+ gobject_ ((make_a_copy && gobject) ? gdk_event_copy(gobject) : gobject)
+{}
+
+Event& Event::operator=(const Event& other)
+{
+ Event temp (other);
+ swap(temp);
+ return *this;
+}
+
+Event::~Event()
+{
+ if(gobject_)
+ gdk_event_free(gobject_);
+}
+
+void Event::swap(Event& other)
+{
+ GdkEvent *const temp = gobject_;
+ gobject_ = other.gobject_;
+ other.gobject_ = temp;
+}
+
+GdkEvent* Event::gobj_copy() const
+{
+ return gdk_event_copy(gobject_);
+}
+
+
+Event Event::get()
+{
+ return Event(gdk_event_get());
+}
+
+Event Event::peek()
+{
+ return Event(gdk_event_peek());
+}
+
+Event Event::get_graphics_expose(const Glib::RefPtr<Window>& window)
+{
+ return Event(gdk_event_get_graphics_expose(Glib::unwrap(window)));
+}
+
+void Event::put()
+{
+ gdk_event_put(gobj());
+}
+
+bool Event::events_pending()
+{
+ return gdk_events_pending();
+}
+
+guint32 Event::get_time() const
+{
+ return gdk_event_get_time(const_cast<GdkEvent*>(gobj()));
+}
+
+bool Event::get_state(ModifierType& state) const
+{
+ return gdk_event_get_state(const_cast<GdkEvent*>(gobj()), ((GdkModifierType*) &(state)));
+}
+
+bool Event::get_coords(double& x_win, double& y_win) const
+{
+ return gdk_event_get_coords(const_cast<GdkEvent*>(gobj()), &(x_win), &(y_win));
+}
+
+bool Event::get_root_coords(double& x_root, double& y_root) const
+{
+ return gdk_event_get_root_coords(const_cast<GdkEvent*>(gobj()), &(x_root), &(y_root));
+}
+
+bool Event::get_axis(AxisUse axis_use, double& value) const
+{
+ return gdk_event_get_axis(const_cast<GdkEvent*>(gobj()), ((GdkAxisUse)(axis_use)), &(value));
+}
+
+void Event::set_show_events(bool show_events)
+{
+ gdk_set_show_events(static_cast<int>(show_events));
+}
+
+bool Event::get_show_events()
+{
+ return gdk_get_show_events();
+}
+
+void Event::set_screen(const Glib::RefPtr<Screen>& screen)
+{
+ gdk_event_set_screen(gobj(), Glib::unwrap(screen));
+}
+
+Glib::RefPtr<Screen> Event::get_screen()
+{
+
+ Glib::RefPtr<Screen> retvalue = Glib::wrap(gdk_event_get_screen(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const Screen> Event::get_screen() const
+{
+
+ Glib::RefPtr<const Screen> retvalue = Glib::wrap(gdk_event_get_screen(const_cast<GdkEvent*>(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+bool Event::send_client_message(NativeWindow winid)
+{
+ return gdk_event_send_client_message(gobj(), (GdkNativeWindow)(winid));
+}
+
+
+} // namespace Gdk
+
+
diff --git a/libs/gtkmm2/gdk/gdkmm/event.h b/libs/gtkmm2/gdk/gdkmm/event.h
new file mode 100644
index 0000000000..8d1095d46b
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/event.h
@@ -0,0 +1,398 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GDKMM_EVENT_H
+#define _GDKMM_EVENT_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#include <gdkmm/window.h>
+#include <gdkmm/screen.h>
+
+/* Shadow DELETE macro (from winnt.h).
+ */
+#if defined(DELETE) && !defined(GTKMM_MACRO_SHADOW_DELETE)
+enum { GTKMM_MACRO_DEFINITION_DELETE = DELETE };
+#undef DELETE
+enum { DELETE = GTKMM_MACRO_DEFINITION_DELETE };
+#define DELETE DELETE
+#define GTKMM_MACRO_SHADOW_DELETE 1
+#endif
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C" { typedef union _GdkEvent GdkEvent; }
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gdk
+{
+
+/** @addtogroup gdkmmEnums Enums and Flags */
+
+/**
+ * @ingroup gdkmmEnums
+ */
+enum EventType
+{
+ NOTHING = -1,
+ DELETE,
+ DESTROY,
+ EXPOSE,
+ MOTION_NOTIFY,
+ BUTTON_PRESS,
+ DOUBLE_BUTTON_PRESS,
+ TRIPLE_BUTTON_PRESS,
+ BUTTON_RELEASE,
+ KEY_PRESS,
+ KEY_RELEASE,
+ ENTER_NOTIFY,
+ LEAVE_NOTIFY,
+ FOCUS_CHANGE,
+ CONFIGURE,
+ MAP,
+ UNMAP,
+ PROPERTY_NOTIFY,
+ SELECTION_CLEAR,
+ SELECTION_REQUEST,
+ SELECTION_NOTIFY,
+ PROXIMITY_IN,
+ PROXIMITY_OUT,
+ DRAG_ENTER,
+ DRAG_LEAVE,
+ DRAG_MOTION,
+ DRAG_STATUS,
+ DROP_START,
+ DROP_FINISHED,
+ CLIENT_EVENT,
+ VISIBILITY_NOTIFY,
+ NO_EXPOSE,
+ SCROLL,
+ WINDOW_STATE,
+ SETTING,
+ OWNER_CHANGE
+};
+
+} // namespace Gdk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gdk::EventType> : public Glib::Value_Enum<Gdk::EventType>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gdk
+{
+
+
+/**
+ * @ingroup gdkmmEnums
+ */
+enum ExtensionMode
+{
+ EXTENSION_EVENTS_NONE,
+ EXTENSION_EVENTS_ALL,
+ EXTENSION_EVENTS_CURSOR
+};
+
+} // namespace Gdk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gdk::ExtensionMode> : public Glib::Value_Enum<Gdk::ExtensionMode>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gdk
+{
+
+/**
+ * @ingroup gdkmmEnums
+ */
+enum AxisUse
+{
+ AXIS_IGNORE,
+ AXIS_X,
+ AXIS_Y,
+ AXIS_PRESSURE,
+ AXIS_XTILT,
+ AXIS_YTILT,
+ AXIS_WHEEL,
+ AXIS_LAST
+};
+
+} // namespace Gdk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gdk::AxisUse> : public Glib::Value_Enum<Gdk::AxisUse>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gdk
+{
+
+
+//TODO: Actually use this class instead of GdkEvent?
+class Event
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Event CppObjectType;
+ typedef GdkEvent BaseObjectType;
+
+ static GType get_type() G_GNUC_CONST;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ Event();
+
+ explicit Event(GdkEvent* gobject, bool make_a_copy = true);
+
+ Event(const Event& other);
+ Event& operator=(const Event& other);
+
+ ~Event();
+
+ void swap(Event& other);
+
+ ///Provides access to the underlying C instance.
+ GdkEvent* gobj() { return gobject_; }
+
+ ///Provides access to the underlying C instance.
+ const GdkEvent* gobj() const { return gobject_; }
+
+ ///Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs.
+ GdkEvent* gobj_copy() const;
+
+protected:
+ GdkEvent* gobject_;
+
+private:
+
+
+public:
+
+
+ /** Checks all open displays for a Gdk::Event to process,to be processed
+ * on, fetching events from the windowing system if necessary.
+ * See Gdk::Display::get_event().
+ * @return The next Gdk::Event to be processed, or <tt>0</tt> if no events
+ * are pending. The returned Gdk::Event should be freed with gdk_event_free().
+ */
+ static Event get();
+
+ /** If there is an event waiting in the event queue of some open
+ * display, returns a copy of it. See Gdk::Display::peek_event().
+ * @return A copy of the first Gdk::Event on some event queue, or <tt>0</tt> if no
+ * events are in any queues. The returned Gdk::Event should be freed with
+ * gdk_event_free().
+ */
+ static Event peek();
+
+ /** Waits for a GraphicsExpose or NoExpose event from the X server.
+ * This is used in the Gtk::Text and Gtk::CList widgets in GTK+ to make sure any
+ * GraphicsExpose events are handled before the widget is scrolled.
+ * @param window The Gdk::Window to wait for the events for.
+ * @return A Gdk::EventExpose if a GraphicsExpose was received, or <tt>0</tt> if a
+ * NoExpose event was received.
+ */
+ static Event get_graphics_expose(const Glib::RefPtr<Window>& window);
+
+ /** Appends a copy of the given event onto the front of the event
+ * queue for event->any.window's display, or the default event
+ * queue if event->any.window is <tt>0</tt>. See Gdk::Display::put_event().
+ */
+ void put();
+
+
+ /** Checks if any events are ready to be processed for any display.
+ * @return <tt>true</tt> if any events are pending.
+ */
+ static bool events_pending();
+
+
+ /** Returns the time stamp from @a event , if there is one; otherwise
+ * returns Gdk::CURRENT_TIME. If @a event is <tt>0</tt>, returns Gdk::CURRENT_TIME.
+ * @return Time stamp field from @a event .
+ */
+ guint32 get_time() const;
+
+ /** If the event contains a "state" field, puts that field in @a state . Otherwise
+ * stores an empty state (0). Returns <tt>true</tt> if there was a state field
+ * in the event. @a event may be <tt>0</tt>, in which case it's treated
+ * as if the event had no state field.
+ * @param state Return location for state.
+ * @return <tt>true</tt> if there was a state field in the event.
+ */
+ bool get_state(ModifierType& state) const;
+
+ /** Extract the event window relative x/y coordinates from an event.
+ * @param x_win Location to put event window x coordinate.
+ * @param y_win Location to put event window y coordinate.
+ * @return <tt>true</tt> if the event delivered event window coordinates.
+ */
+ bool get_coords(double& x_win, double& y_win) const;
+
+ /** Extract the root window relative x/y coordinates from an event.
+ * @param x_root Location to put root window x coordinate.
+ * @param y_root Location to put root window y coordinate.
+ * @return <tt>true</tt> if the event delivered root window coordinates.
+ */
+ bool get_root_coords(double& x_root, double& y_root) const;
+
+ /** Extract the axis value for a particular axis use from
+ * an event structure.
+ * @param axis_use The axis use to look for.
+ * @param value Location to store the value found.
+ * @return <tt>true</tt> if the specified axis was found, otherwise <tt>false</tt>.
+ */
+ bool get_axis(AxisUse axis_use, double& value) const;
+ //_WRAP_METHOD(void gdk_event_handler_set(GdkEventFunc func, gpointer data, GDestroyNotify notify), gdk_event_handler_set)
+
+
+ /** Sets whether a trace of received events is output.
+ * Note that GTK+ must be compiled with debugging (that is,
+ * configured using the &lt;option&gt;--enable-debug&lt;/option&gt; option)
+ * to use this option.
+ * @param show_events <tt>true</tt> to output event debugging information.
+ */
+ static void set_show_events(bool show_events);
+
+ /** Gets whether event debugging output is enabled.
+ * @return <tt>true</tt> if event debugging output is enabled.
+ */
+ static bool get_show_events();
+
+
+ /** Sets the screen for @a event to @a screen . The event must
+ * have been allocated by GTK+, for instance, by
+ * gdk_event_copy().
+ *
+ * Since: 2.2
+ * @param screen A Gdk::Screen.
+ */
+ void set_screen(const Glib::RefPtr<Screen>& screen);
+
+ /** Returns the screen for the event. The screen is
+ * typically the screen for <tt>event->any.window</tt>, but
+ * for events such as mouse events, it is the screen
+ * where the the pointer was when the event occurs -
+ * that is, the screen which has the root window
+ * to which <tt>event->motion.x_root</tt> and
+ * <tt>event->motion.y_root</tt> are relative.
+ * @return The screen for the event
+ *
+ * Since: 2.2.
+ */
+ Glib::RefPtr<Screen> get_screen();
+
+ /** Returns the screen for the event. The screen is
+ * typically the screen for <tt>event->any.window</tt>, but
+ * for events such as mouse events, it is the screen
+ * where the the pointer was when the event occurs -
+ * that is, the screen which has the root window
+ * to which <tt>event->motion.x_root</tt> and
+ * <tt>event->motion.y_root</tt> are relative.
+ * @return The screen for the event
+ *
+ * Since: 2.2.
+ */
+ Glib::RefPtr<const Screen> get_screen() const;
+
+
+ /** Sends an X ClientMessage event to a given window (which must be
+ * on the default Gdk::Display.)
+ * This could be used for communicating between different applications,
+ * though the amount of data is limited to 20 bytes.
+ * @param winid The window to send the X ClientMessage event to.
+ * @return Non-zero on success.
+ */
+ bool send_client_message(NativeWindow winid);
+ bool send_client_message(const Glib::RefPtr<Display>& display, NativeWindow winid);
+
+
+};
+
+} // namespace Gdk
+
+
+namespace Gdk
+{
+
+/** @relates Gdk::Event
+ * @param lhs The left-hand side
+ * @param rhs The right-hand side
+ */
+inline void swap(Event& lhs, Event& rhs)
+ { lhs.swap(rhs); }
+
+} // namespace Gdk
+
+namespace Glib
+{
+
+/** @relates Gdk::Event
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+Gdk::Event wrap(GdkEvent* object, bool take_copy = false);
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+template <>
+class Value<Gdk::Event> : public Glib::Value_Boxed<Gdk::Event>
+{};
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+} // namespace Glib
+
+#endif /* _GDKMM_EVENT_H */
+
diff --git a/libs/gtkmm2/gdk/gdkmm/gc.cc b/libs/gtkmm2/gdk/gdkmm/gc.cc
new file mode 100644
index 0000000000..456cad5f9e
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/gc.cc
@@ -0,0 +1,326 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gdkmm/gc.h>
+#include <gdkmm/private/gc_p.h>
+
+#include <gdk/gdkenumtypes.h>
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gdk/gdkgc.h>
+#include <gdkmm/color.h>
+//#include <gdkmm/font.h>
+//#include <gdkmm/pixmap.h>
+#include <gdkmm/bitmap.h>
+#include <gdkmm/colormap.h>
+
+namespace Gdk
+{
+
+GC::GC(const Glib::RefPtr<Drawable>& drawable)
+: Object( G_OBJECT( gdk_gc_new(drawable->gobj()) ) )
+{
+ //We need a construct function if we really want to use our own GClass. Bug #86867
+}
+
+
+}
+
+
+namespace
+{
+} // anonymous namespace
+
+// static
+GType Glib::Value<Gdk::LineStyle>::value_type()
+{
+ return gdk_line_style_get_type();
+}
+
+// static
+GType Glib::Value<Gdk::CapStyle>::value_type()
+{
+ return gdk_cap_style_get_type();
+}
+
+// static
+GType Glib::Value<Gdk::JoinStyle>::value_type()
+{
+ return gdk_join_style_get_type();
+}
+
+// static
+GType Glib::Value<Gdk::Fill>::value_type()
+{
+ return gdk_fill_get_type();
+}
+
+// static
+GType Glib::Value<Gdk::Function>::value_type()
+{
+ return gdk_function_get_type();
+}
+
+// static
+GType Glib::Value<Gdk::SubwindowMode>::value_type()
+{
+ return gdk_subwindow_mode_get_type();
+}
+
+// static
+GType Glib::Value<Gdk::GCValuesMask>::value_type()
+{
+ return gdk_gc_values_mask_get_type();
+}
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Gdk::GC> wrap(GdkGC* object, bool take_copy)
+{
+ return Glib::RefPtr<Gdk::GC>( dynamic_cast<Gdk::GC*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} /* namespace Glib */
+
+
+namespace Gdk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& GC_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &GC_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gdk_gc_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void GC_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* GC_Class::wrap_new(GObject* object)
+{
+ return new GC((GdkGC*)object);
+}
+
+
+/* The implementation: */
+
+GdkGC* GC::gobj_copy()
+{
+ reference();
+ return gobj();
+}
+
+GC::GC(const Glib::ConstructParams& construct_params)
+:
+ Glib::Object(construct_params)
+{}
+
+GC::GC(GdkGC* castitem)
+:
+ Glib::Object((GObject*)(castitem))
+{}
+
+GC::~GC()
+{}
+
+
+GC::CppClassType GC::gc_class_; // initialize static member
+
+GType GC::get_type()
+{
+ return gc_class_.init().get_type();
+}
+
+GType GC::get_base_type()
+{
+ return gdk_gc_get_type();
+}
+
+
+GC::GC()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Glib::Object(Glib::ConstructParams(gc_class_.init()))
+{
+ }
+
+Glib::RefPtr<GC> GC::create()
+{
+ return Glib::RefPtr<GC>( new GC() );
+}
+Glib::RefPtr<GC> GC::create(const Glib::RefPtr<Drawable>& drawable)
+{
+ return Glib::RefPtr<GC>( new GC(drawable) );
+}
+void GC::set_foreground(const Color& color)
+{
+ gdk_gc_set_foreground(gobj(), (color).gobj());
+}
+
+void GC::set_background(const Color& color)
+{
+ gdk_gc_set_background(gobj(), (color).gobj());
+}
+
+void GC::set_function(Function function)
+{
+ gdk_gc_set_function(gobj(), ((GdkFunction)(function)));
+}
+
+void GC::set_fill(Fill fill)
+{
+ gdk_gc_set_fill(gobj(), ((GdkFill)(fill)));
+}
+
+void GC::set_tile(const Glib::RefPtr<Pixmap>& tile)
+{
+ gdk_gc_set_tile(gobj(), Glib::unwrap(tile));
+}
+
+void GC::set_stipple(const Glib::RefPtr<Pixmap>& stipple)
+{
+ gdk_gc_set_stipple(gobj(), Glib::unwrap(stipple));
+}
+
+void GC::set_ts_origin(int x, int y)
+{
+ gdk_gc_set_ts_origin(gobj(), x, y);
+}
+
+void GC::set_clip_origin(int x, int y)
+{
+ gdk_gc_set_clip_origin(gobj(), x, y);
+}
+
+void GC::set_clip_mask(const Glib::RefPtr<Bitmap>& mask)
+{
+ gdk_gc_set_clip_mask(gobj(), Glib::unwrap(mask));
+}
+
+void GC::set_clip_rectangle(Rectangle& rectangle)
+{
+ gdk_gc_set_clip_rectangle(gobj(), (rectangle).gobj());
+}
+
+void GC::set_clip_region(const Region& region)
+{
+ gdk_gc_set_clip_region(gobj(), const_cast<GdkRegion*>((region).gobj()));
+}
+
+void GC::set_subwindow(SubwindowMode mode)
+{
+ gdk_gc_set_subwindow(gobj(), ((GdkSubwindowMode)(mode)));
+}
+
+void GC::set_exposures(bool exposures)
+{
+ gdk_gc_set_exposures(gobj(), static_cast<int>(exposures));
+}
+
+void GC::set_line_attributes(int line_width, LineStyle line_style, CapStyle cap_style, JoinStyle join_style)
+{
+ gdk_gc_set_line_attributes(gobj(), line_width, ((GdkLineStyle)(line_style)), ((GdkCapStyle)(cap_style)), ((GdkJoinStyle)(join_style)));
+}
+
+void GC::set_dashes(int dash_offset, gint8* dash_list, int n)
+{
+ gdk_gc_set_dashes(gobj(), dash_offset, dash_list, n);
+}
+
+void GC::offset(int x_offset, int y_offset)
+{
+ gdk_gc_offset(gobj(), x_offset, y_offset);
+}
+
+void GC::set_colormap(const Glib::RefPtr<Colormap>& colormap)
+{
+ gdk_gc_set_colormap(gobj(), Glib::unwrap(colormap));
+}
+
+Glib::RefPtr<Colormap> GC::get_colormap()
+{
+
+ Glib::RefPtr<Colormap> retvalue = Glib::wrap(gdk_gc_get_colormap(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+void GC::set_rgb_fg_color(const Color& color)
+{
+ gdk_gc_set_rgb_fg_color(gobj(), (color).gobj());
+}
+
+void GC::set_rgb_bg_color(const Color& color)
+{
+ gdk_gc_set_rgb_bg_color(gobj(), (color).gobj());
+}
+
+Glib::RefPtr<Screen> GC::get_screen()
+{
+
+ Glib::RefPtr<Screen> retvalue = Glib::wrap(gdk_gc_get_screen(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const Screen> GC::get_screen() const
+{
+
+ Glib::RefPtr<const Screen> retvalue = Glib::wrap(gdk_gc_get_screen(const_cast<GdkGC*>(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+
+} // namespace Gdk
+
+
diff --git a/libs/gtkmm2/gdk/gdkmm/gc.h b/libs/gtkmm2/gdk/gdkmm/gc.h
new file mode 100644
index 0000000000..854995eee5
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/gc.h
@@ -0,0 +1,617 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GDKMM_GC_H
+#define _GDKMM_GC_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* gc.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/object.h>
+#include <gdkmm/drawable.h>
+#include <gdkmm/types.h>
+#include <gdkmm/rectangle.h>
+#include <gdkmm/region.h>
+#include <gdkmm/screen.h>
+#include <gdk/gdkgc.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GdkGC GdkGC;
+typedef struct _GdkGCClass GdkGCClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gdk
+{ class GC_Class; } // namespace Gdk
+namespace Gdk
+{
+
+
+/** @addtogroup gdkmmEnums Enums and Flags */
+
+/**
+ * @ingroup gdkmmEnums
+ */
+enum LineStyle
+{
+ LINE_SOLID,
+ LINE_ON_OFF_DASH,
+ LINE_DOUBLE_DASH
+};
+
+} // namespace Gdk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gdk::LineStyle> : public Glib::Value_Enum<Gdk::LineStyle>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gdk
+{
+
+/**
+ * @ingroup gdkmmEnums
+ */
+enum CapStyle
+{
+ CAP_NOT_LAST,
+ CAP_BUTT,
+ CAP_ROUND,
+ CAP_PROJECTING
+};
+
+} // namespace Gdk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gdk::CapStyle> : public Glib::Value_Enum<Gdk::CapStyle>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gdk
+{
+
+/**
+ * @ingroup gdkmmEnums
+ */
+enum JoinStyle
+{
+ JOIN_MITER,
+ JOIN_ROUND,
+ JOIN_BEVEL
+};
+
+} // namespace Gdk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gdk::JoinStyle> : public Glib::Value_Enum<Gdk::JoinStyle>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gdk
+{
+
+/**
+ * @ingroup gdkmmEnums
+ */
+enum Fill
+{
+ SOLID,
+ TILED,
+ STIPPLED,
+ OPAQUE_STIPPLED
+};
+
+} // namespace Gdk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gdk::Fill> : public Glib::Value_Enum<Gdk::Fill>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gdk
+{
+
+/**
+ * @ingroup gdkmmEnums
+ */
+enum Function
+{
+ COPY,
+ INVERT,
+ XOR,
+ CLEAR,
+ AND,
+ AND_REVERSE,
+ AND_INVERT,
+ NOOP,
+ OR,
+ EQUIV,
+ OR_REVERSE,
+ COPY_INVERT,
+ OR_INVERT,
+ NAND,
+ NOR,
+ SET
+};
+
+} // namespace Gdk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gdk::Function> : public Glib::Value_Enum<Gdk::Function>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gdk
+{
+
+/**
+ * @ingroup gdkmmEnums
+ */
+enum SubwindowMode
+{
+ CLIP_BY_CHILDREN,
+ INCLUDE_INFERIORS
+};
+
+} // namespace Gdk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gdk::SubwindowMode> : public Glib::Value_Enum<Gdk::SubwindowMode>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gdk
+{
+
+/**
+ * @ingroup gdkmmEnums
+ * @par Bitwise operators:
+ * <tt>%GCValuesMask operator|(GCValuesMask, GCValuesMask)</tt><br>
+ * <tt>%GCValuesMask operator&(GCValuesMask, GCValuesMask)</tt><br>
+ * <tt>%GCValuesMask operator^(GCValuesMask, GCValuesMask)</tt><br>
+ * <tt>%GCValuesMask operator~(GCValuesMask)</tt><br>
+ * <tt>%GCValuesMask& operator|=(GCValuesMask&, GCValuesMask)</tt><br>
+ * <tt>%GCValuesMask& operator&=(GCValuesMask&, GCValuesMask)</tt><br>
+ * <tt>%GCValuesMask& operator^=(GCValuesMask&, GCValuesMask)</tt><br>
+ */
+enum GCValuesMask
+{
+ GC_FOREGROUND = 1 << 0,
+ GC_BACKGROUND = 1 << 1,
+ GC_FONT = 1 << 2,
+ GC_FUNCTION = 1 << 3,
+ GC_FILL = 1 << 4,
+ GC_TILE = 1 << 5,
+ GC_STIPPLE = 1 << 6,
+ GC_CLIP_MASK = 1 << 7,
+ GC_SUBWINDOW = 1 << 8,
+ GC_TS_X_ORIGIN = 1 << 9,
+ GC_TS_Y_ORIGIN = 1 << 10,
+ GC_CLIP_X_ORIGIN = 1 << 11,
+ GC_CLIP_Y_ORIGIN = 1 << 12,
+ GC_EXPOSURES = 1 << 13,
+ GC_LINE_WIDTH = 1 << 14,
+ GC_LINE_STYLE = 1 << 15,
+ GC_CAP_STYLE = 1 << 16,
+ GC_JOIN_STYLE = 1 << 17
+};
+
+/** @ingroup gdkmmEnums */
+inline GCValuesMask operator|(GCValuesMask lhs, GCValuesMask rhs)
+ { return static_cast<GCValuesMask>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
+
+/** @ingroup gdkmmEnums */
+inline GCValuesMask operator&(GCValuesMask lhs, GCValuesMask rhs)
+ { return static_cast<GCValuesMask>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
+
+/** @ingroup gdkmmEnums */
+inline GCValuesMask operator^(GCValuesMask lhs, GCValuesMask rhs)
+ { return static_cast<GCValuesMask>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
+
+/** @ingroup gdkmmEnums */
+inline GCValuesMask operator~(GCValuesMask flags)
+ { return static_cast<GCValuesMask>(~static_cast<unsigned>(flags)); }
+
+/** @ingroup gdkmmEnums */
+inline GCValuesMask& operator|=(GCValuesMask& lhs, GCValuesMask rhs)
+ { return (lhs = static_cast<GCValuesMask>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
+
+/** @ingroup gdkmmEnums */
+inline GCValuesMask& operator&=(GCValuesMask& lhs, GCValuesMask rhs)
+ { return (lhs = static_cast<GCValuesMask>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
+
+/** @ingroup gdkmmEnums */
+inline GCValuesMask& operator^=(GCValuesMask& lhs, GCValuesMask rhs)
+ { return (lhs = static_cast<GCValuesMask>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
+
+} // namespace Gdk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gdk::GCValuesMask> : public Glib::Value_Flags<Gdk::GCValuesMask>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gdk
+{
+
+
+class Drawable;
+
+/** All drawing operations in GDK take a graphics context (GC) argument.
+ * A graphics context encapsulates information about the way things are drawn, such as the foreground color or line width.
+ * By using graphics contexts, the number of arguments to each drawing call is greatly reduced, and communication overhead
+ * is minimized, since identical arguments do not need to be passed repeatedly.
+ */
+
+class GC : public Glib::Object
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef GC CppObjectType;
+ typedef GC_Class CppClassType;
+ typedef GdkGC BaseObjectType;
+ typedef GdkGCClass BaseClassType;
+
+private: friend class GC_Class;
+ static CppClassType gc_class_;
+
+private:
+ // noncopyable
+ GC(const GC&);
+ GC& operator=(const GC&);
+
+protected:
+ explicit GC(const Glib::ConstructParams& construct_params);
+ explicit GC(GdkGC* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~GC();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ GdkGC* gobj() { return reinterpret_cast<GdkGC*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const GdkGC* gobj() const { return reinterpret_cast<GdkGC*>(gobject_); }
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ GdkGC* gobj_copy();
+
+private:
+
+
+protected:
+ GC();
+ explicit GC(const Glib::RefPtr<Drawable>& drawable);
+
+public:
+
+ static Glib::RefPtr<GC> create();
+
+
+ static Glib::RefPtr<GC> create(const Glib::RefPtr<Drawable>& drawable);
+
+
+ // Custom wrap these?, maybe with a Gdk::GC::Value class. Need to do take care of refcounts of GdkGCValue's fields.
+ // Actually, I don't see the need for these methods. murrayc.
+ //_WRAP_METHOD(void get_values(GdkGCValues& values) const, gdk_gc_get_values)
+ //_WRAP_METHOD(void set_values(const GdkGCValues& values, GCValuesMask values_mask), gdk_gc_set_values)
+ //__IGNORE(gdk_gc_get_values, gdk_gc_set_values)
+
+
+ /** Sets the foreground color for a graphics context.
+ * Note that this function uses @a color -&gt;pixel, use
+ * set_rgb_fg_color() to specify the foreground
+ * color as red, green, blue components.
+ * @param color The new foreground color.
+ */
+ void set_foreground(const Color& color);
+
+ /** Sets the background color for a graphics context.
+ * Note that this function uses @a color -&gt;pixel, use
+ * set_rgb_bg_color() to specify the background
+ * color as red, green, blue components.
+ * @param color The new background color.
+ */
+ void set_background(const Color& color);
+
+ /** Determines how the current pixel values and the
+ * pixel values being drawn are combined to produce
+ * the final pixel values.
+ * @param function The Gdk::Function to use.
+ */
+ void set_function(Function function);
+
+ /** Set the fill mode for a graphics context.
+ * @param fill The new fill mode.
+ */
+ void set_fill(Fill fill);
+
+ /** Set a tile pixmap for a graphics context.
+ * This will only be used if the fill mode
+ * is Gdk::TILED.
+ * @param tile The new tile pixmap.
+ */
+ void set_tile(const Glib::RefPtr<Pixmap>& tile);
+
+ /** Set the stipple bitmap for a graphics context. The
+ * stipple will only be used if the fill mode is
+ * Gdk::STIPPLED or Gdk::OPAQUE_STIPPLED.
+ * @param stipple The new stipple bitmap.
+ */
+ void set_stipple(const Glib::RefPtr<Pixmap>& stipple);
+
+ /** Set the origin when using tiles or stipples with
+ * the GC. The tile or stipple will be aligned such
+ * that the upper left corner of the tile or stipple
+ * will coincide with this point.
+ * @param x The x-coordinate of the origin.
+ * @param y The y-coordinate of the origin.
+ */
+ void set_ts_origin(int x, int y);
+
+ /** Sets the origin of the clip mask. The coordinates are
+ * interpreted relative to the upper-left corner of
+ * the destination drawable of the current operation.
+ * @param x The x-coordinate of the origin.
+ * @param y The y-coordinate of the origin.
+ */
+ void set_clip_origin(int x, int y);
+
+ /** Sets the clip mask for a graphics context from a bitmap.
+ * The clip mask is interpreted relative to the clip
+ * origin. (See set_clip_origin()).
+ * @param mask A bitmap.
+ */
+ void set_clip_mask(const Glib::RefPtr<Bitmap>& mask);
+
+ /** Sets the clip mask for a graphics context from a
+ * rectangle. The clip mask is interpreted relative to the clip
+ * origin. (See set_clip_origin()).
+ * @param rectangle The rectangle to clip to.
+ */
+ void set_clip_rectangle(Rectangle& rectangle);
+
+ /** Sets the clip mask for a graphics context from a region structure.
+ * The clip mask is interpreted relative to the clip origin. (See
+ * set_clip_origin()).
+ * @param region The Gdk::Region.
+ */
+ void set_clip_region(const Region& region);
+
+ /** Sets how drawing with this GC on a window will affect child
+ * windows of that window.
+ * @param mode The subwindow mode.
+ */
+ void set_subwindow(SubwindowMode mode);
+
+ /** Sets whether copying non-visible portions of a drawable
+ * using this graphics context generate exposure events
+ * for the corresponding regions of the destination
+ * drawable. (See gdk_draw_drawable()).
+ * @param exposures If <tt>true</tt>, exposure events will be generated.
+ */
+ void set_exposures(bool exposures);
+
+ /** Sets various attributes of how lines are drawn. See
+ * the corresponding members of Gdk::GCValues for full
+ * explanations of the arguments.
+ * @param line_width The width of lines.
+ * @param line_style The dash-style for lines.
+ * @param cap_style The manner in which the ends of lines are drawn.
+ * @param join_style The in which lines are joined together.
+ */
+ void set_line_attributes(int line_width, LineStyle line_style, CapStyle cap_style, JoinStyle join_style);
+
+ /** Sets the way dashed-lines are drawn. Lines will be
+ * drawn with alternating on and off segments of the
+ * lengths specified in @a dash_list . The manner in
+ * which the on and off segments are drawn is determined
+ * by the @a line_style value of the GC. (This can
+ * be changed with set_line_attributes().)
+ *
+ * The @a dash_offset defines the phase of the pattern,
+ * specifying how many pixels into the dash-list the pattern
+ * should actually begin.
+ * @param dash_offset The phase of the dash pattern.
+ * @param dash_list An array of dash lengths.
+ * @param n The number of elements in @a dash_list .
+ */
+ void set_dashes(int dash_offset, gint8* dash_list, int n);
+
+ /** Offset attributes such as the clip and tile-stipple origins
+ * of the GC so that drawing at x - x_offset, y - y_offset with
+ * the offset GC has the same effect as drawing at x, y with the original
+ * GC.
+ * @param x_offset Amount by which to offset the GC in the X direction.
+ * @param y_offset Amount by which to offset the GC in the Y direction.
+ */
+ void offset(int x_offset, int y_offset);
+
+ /** Sets the colormap for the GC to the given colormap. The depth
+ * of the colormap's visual must match the depth of the drawable
+ * for which the GC was created.
+ * @param colormap A Gdk::Colormap.
+ */
+ void set_colormap(const Glib::RefPtr<Colormap>& colormap);
+
+ /** Retrieves the colormap for a given GC, if it exists.
+ * A GC will have a colormap if the drawable for which it was created
+ * has a colormap, or if a colormap was set explicitely with
+ * gdk_gc_set_colormap.
+ * @return The colormap of @a gc , or <tt>0</tt> if @a gc doesn't have one.
+ */
+ Glib::RefPtr<Colormap> get_colormap();
+
+ /** Set the foreground color of a GC using an unallocated color. The
+ * pixel value for the color will be determined using GdkRGB. If the
+ * colormap for the GC has not previously been initialized for GdkRGB,
+ * then for pseudo-color colormaps (colormaps with a small modifiable
+ * number of colors), a colorcube will be allocated in the colormap.
+ *
+ * Calling this function for a GC without a colormap is an error.
+ * @param color An unallocated Gdk::Color.
+ */
+ void set_rgb_fg_color(const Color& color);
+
+ /** Set the background color of a GC using an unallocated color. The
+ * pixel value for the color will be determined using GdkRGB. If the
+ * colormap for the GC has not previously been initialized for GdkRGB,
+ * then for pseudo-color colormaps (colormaps with a small modifiable
+ * number of colors), a colorcube will be allocated in the colormap.
+ *
+ * Calling this function for a GC without a colormap is an error.
+ * @param color An unallocated Gdk::Color.
+ */
+ void set_rgb_bg_color(const Color& color);
+
+
+ /** Gets the Gdk::Screen for which @a gc was created
+ * @return The Gdk::Screen for @a gc .
+ *
+ * Since: 2.2.
+ */
+ Glib::RefPtr<Screen> get_screen();
+
+ /** Gets the Gdk::Screen for which @a gc was created
+ * @return The Gdk::Screen for @a gc .
+ *
+ * Since: 2.2.
+ */
+ Glib::RefPtr<const Screen> get_screen() const;
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+};
+
+} /* namespace Gdk */
+
+
+namespace Glib
+{
+ /** @relates Gdk::GC
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Gdk::GC> wrap(GdkGC* object, bool take_copy = false);
+}
+
+
+#endif /* _GDKMM_GC_H */
+
diff --git a/libs/gtkmm2/gdk/gdkmm/general.cc b/libs/gtkmm2/gdk/gdkmm/general.cc
new file mode 100644
index 0000000000..f07cce2b14
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/general.cc
@@ -0,0 +1,54 @@
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gdkmm/general.h>
+#include <gdk/gdk.h>
+
+namespace Gdk
+{
+
+int screen_width()
+{
+ return gdk_screen_width();
+}
+
+int screen_height()
+{
+ return gdk_screen_height();
+}
+
+int screen_width_mm()
+{
+ return gdk_screen_width_mm();
+}
+
+int screen_height_mm()
+{
+ return gdk_screen_height_mm();
+}
+
+
+void flush()
+{
+ gdk_flush();
+}
+
+} //namespace Gdk
+
diff --git a/libs/gtkmm2/gdk/gdkmm/general.h b/libs/gtkmm2/gdk/gdkmm/general.h
new file mode 100644
index 0000000000..1d37ab0e3b
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/general.h
@@ -0,0 +1,37 @@
+/* $Id$ */
+
+/* Copyright 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef _GDKMM_GENERAL_H
+#define _GDKMM_GENERAL_H
+
+namespace Gdk
+{
+
+int screen_width();
+int screen_height();
+
+int screen_width_mm();
+int screen_height_mm();
+
+void flush();
+
+} //namespace Gdk
+
+#endif //_GDKMM_GENERAL_H
+
diff --git a/libs/gtkmm2/gdk/gdkmm/image.cc b/libs/gtkmm2/gdk/gdkmm/image.cc
new file mode 100644
index 0000000000..787124f36f
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/image.cc
@@ -0,0 +1,250 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gdkmm/image.h>
+#include <gdkmm/private/image_p.h>
+
+#include <gdk/gdkenumtypes.h>
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+namespace Gdk
+{
+
+Image::Image(ImageType type, const Glib::RefPtr<Visual>& visual, int width, int height)
+:
+ Object( G_OBJECT( gdk_image_new((GdkImageType)type, visual->gobj(), width, height) ) )
+{}
+
+} /* namespace Gdk */
+
+
+namespace
+{
+} // anonymous namespace
+
+// static
+GType Glib::Value<Gdk::ImageType>::value_type()
+{
+ return gdk_image_type_get_type();
+}
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Gdk::Image> wrap(GdkImage* object, bool take_copy)
+{
+ return Glib::RefPtr<Gdk::Image>( dynamic_cast<Gdk::Image*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} /* namespace Glib */
+
+
+namespace Gdk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Image_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Image_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gdk_image_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Image_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* Image_Class::wrap_new(GObject* object)
+{
+ return new Image((GdkImage*)object);
+}
+
+
+/* The implementation: */
+
+GdkImage* Image::gobj_copy()
+{
+ reference();
+ return gobj();
+}
+
+Image::Image(const Glib::ConstructParams& construct_params)
+:
+ Glib::Object(construct_params)
+{}
+
+Image::Image(GdkImage* castitem)
+:
+ Glib::Object((GObject*)(castitem))
+{}
+
+Image::~Image()
+{}
+
+
+Image::CppClassType Image::image_class_; // initialize static member
+
+GType Image::get_type()
+{
+ return image_class_.init().get_type();
+}
+
+GType Image::get_base_type()
+{
+ return gdk_image_get_type();
+}
+
+
+Glib::RefPtr<Image> Image::create(ImageType type, const Glib::RefPtr<Visual>& visual, int width, int height)
+{
+ return Glib::RefPtr<Image>( new Image(type, visual, width, height) );
+}
+void Image::put_pixel(int x, int y, guint32 pixel)
+{
+ gdk_image_put_pixel(gobj(), x, y, pixel);
+}
+
+guint32 Image::get_pixel(int x, int y) const
+{
+ return gdk_image_get_pixel(const_cast<GdkImage*>(gobj()), x, y);
+}
+
+void Image::set_colormap(const Glib::RefPtr<Colormap>& colormap)
+{
+ gdk_image_set_colormap(gobj(), Glib::unwrap(colormap));
+}
+
+Glib::RefPtr<Colormap> Image::get_colormap()
+{
+
+ Glib::RefPtr<Colormap> retvalue = Glib::wrap(gdk_image_get_colormap(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const Colormap> Image::get_colormap() const
+{
+
+ Glib::RefPtr<const Colormap> retvalue = Glib::wrap(gdk_image_get_colormap(const_cast<GdkImage*>(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+ImageType Image::get_image_type() const
+{
+ return ((ImageType)(gobj()->type));
+}
+
+Glib::RefPtr<Visual> Image::get_visual()
+{
+ Glib::RefPtr<Visual> ref_ptr(Glib::wrap(gobj()->visual));
+
+ if(ref_ptr)
+ ref_ptr->reference();
+
+ return ref_ptr;
+}
+
+Glib::RefPtr<const Visual> Image::get_visual() const
+{
+ Glib::RefPtr<const Visual> ref_ptr(Glib::wrap(gobj()->visual));
+
+ if(ref_ptr)
+ ref_ptr->reference();
+
+ return ref_ptr;
+}
+
+ByteOrder Image::get_byte_order() const
+{
+ return ((ByteOrder)(gobj()->byte_order));
+}
+
+int Image::get_width() const
+{
+ return gobj()->width;
+}
+
+int Image::get_height() const
+{
+ return gobj()->height;
+}
+
+guint16 Image::get_bpp() const
+{
+ return gobj()->bpp;
+}
+
+guint16 Image::get_bpl() const
+{
+ return gobj()->bpl;
+}
+
+guint16 Image::get_bits_per_pixel() const
+{
+ return gobj()->bits_per_pixel;
+}
+
+void* Image::get_mem()
+{
+ return gobj()->mem;
+}
+
+const void* Image::get_mem() const
+{
+ return (const void*)(gobj()->mem);
+}
+
+void* Image::get_windowing_data() const
+{
+ return gobj()->windowing_data;
+}
+
+
+} // namespace Gdk
+
+
diff --git a/libs/gtkmm2/gdk/gdkmm/image.h b/libs/gtkmm2/gdk/gdkmm/image.h
new file mode 100644
index 0000000000..7d5f8f6078
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/image.h
@@ -0,0 +1,231 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GDKMM_IMAGE_H
+#define _GDKMM_IMAGE_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* bitmap.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/object.h>
+#include <gdkmm/visual.h>
+#include <gdkmm/colormap.h>
+#include <gdkmm/types.h> //For ByteOrder.
+#include <gdk/gdkimage.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GdkImage GdkImage;
+typedef struct _GdkImageClass GdkImageClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gdk
+{ class Image_Class; } // namespace Gdk
+namespace Gdk
+{
+
+
+/** @addtogroup gdkmmEnums Enums and Flags */
+
+/**
+ * @ingroup gdkmmEnums
+ */
+enum ImageType
+{
+ IMAGE_NORMAL,
+ IMAGE_SHARED,
+ IMAGE_FASTEST
+};
+
+} // namespace Gdk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gdk::ImageType> : public Glib::Value_Enum<Gdk::ImageType>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gdk
+{
+
+
+/** This represents an area for drawing graphics. It has now been superceded to a large extent by the much more flexible
+ * Gdk::Drawable RGB functions.
+ * To create an image from part of a Gdk::Window use Gdk::Drawable::get_image().
+ *
+ * The image can be manipulated with get_pixel() and put_pixel(), or alternatively by changing the actual pixel data, though
+ * manipulating the pixel data requires complicated code to cope with the different formats that may be used.
+ * To draw a Gdk::Image in a Gdk::Window or Gdk::Pixmap use Gdk::Drawable::draw_image().
+ */
+
+class Image : public Glib::Object
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef Image CppObjectType;
+ typedef Image_Class CppClassType;
+ typedef GdkImage BaseObjectType;
+ typedef GdkImageClass BaseClassType;
+
+private: friend class Image_Class;
+ static CppClassType image_class_;
+
+private:
+ // noncopyable
+ Image(const Image&);
+ Image& operator=(const Image&);
+
+protected:
+ explicit Image(const Glib::ConstructParams& construct_params);
+ explicit Image(GdkImage* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~Image();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ GdkImage* gobj() { return reinterpret_cast<GdkImage*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const GdkImage* gobj() const { return reinterpret_cast<GdkImage*>(gobject_); }
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ GdkImage* gobj_copy();
+
+private:
+
+
+protected:
+
+ /** Instantiate a new Gdk::Image.
+ *
+ * @param type The type of the Gdk::Image. Gdk::IMAGE_FASTEST is probably the best choice, since it will try to create a Gdk::IMAGE_SHARED image first and if that fails it will then use Gdk::IMAGE_NORMAL.
+ * @param visual The Gdk::Visual to use for the image.
+ * @param width The width of the image in pixels.
+ * @param height The height of the image in pixels.
+ */
+ Image(ImageType type, const Glib::RefPtr<Visual>& visual, int width, int height);
+
+
+public:
+
+ static Glib::RefPtr<Image> create(ImageType type, const Glib::RefPtr<Visual>& visual, int width, int height);
+
+
+ //We ignore gdk_image_new_bitmap() because the documentation says that it is incredibly broken.
+
+
+ void put_pixel(int x, int y, guint32 pixel);
+
+ guint32 get_pixel(int x, int y) const;
+
+ /** Sets the colormap for the image to the given colormap. Normally
+ * there's no need to use this function, images are created with the
+ * correct colormap if you get the image from a drawable. If you
+ * create the image from scratch, use the colormap of the drawable you
+ * intend to render the image to.
+ * @param colormap A Gdk::Colormap.
+ */
+ void set_colormap(const Glib::RefPtr<Colormap>& colormap);
+
+ /** Retrieves the colormap for a given image, if it exists. An image
+ * will have a colormap if the drawable from which it was created has
+ * a colormap, or if a colormap was set explicitely with
+ * set_colormap().
+ * @return Colormap for the image.
+ */
+ Glib::RefPtr<Colormap> get_colormap();
+
+ /** Retrieves the colormap for a given image, if it exists. An image
+ * will have a colormap if the drawable from which it was created has
+ * a colormap, or if a colormap was set explicitely with
+ * set_colormap().
+ * @return Colormap for the image.
+ */
+ Glib::RefPtr<const Colormap> get_colormap() const;
+
+ ImageType get_image_type() const;
+ Glib::RefPtr<Visual> get_visual();
+ Glib::RefPtr<const Visual> get_visual() const;
+ ByteOrder get_byte_order() const;
+ int get_width() const;
+ int get_height() const;
+ guint16 get_bpp() const;
+ guint16 get_bpl() const;
+ guint16 get_bits_per_pixel() const;
+
+ //This memory block is not read-only, apparently:
+ void* get_mem();
+ const void* get_mem() const;
+
+ //TODO: This should be const really.
+ void* get_windowing_data() const;
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+};
+
+} /* namespace Gdk */
+
+
+namespace Glib
+{
+ /** @relates Gdk::Image
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Gdk::Image> wrap(GdkImage* object, bool take_copy = false);
+}
+
+
+#endif /* _GDKMM_IMAGE_H */
+
diff --git a/libs/gtkmm2/gdk/gdkmm/list.h b/libs/gtkmm2/gdk/gdkmm/list.h
new file mode 100644
index 0000000000..2c4da23bb7
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/list.h
@@ -0,0 +1,157 @@
+#ifndef _GDKMM_LIST_H_
+#define _GDKMM_LIST_H_
+
+namespace Gdk {
+
+#ifdef GTKMM_CXX_HAVE_PARTIAL_SPECIALIZATION
+// Dummy class to make it appear as though the user has the list.
+/*
+template<class Parent,class Iterator,class Access>
+ class List
+ {
+ public:
+ typedef List<Parent,Iterator,Access> List;
+ private:
+ Parent* parent;
+ public:
+ List(Parent& p):parent(p) {}
+ List():parent(0) {}
+ List(const List& list):parent(list.parent) {}
+
+ Iterator begin()
+ {
+ if (parent)
+ return Access::begin(parent);
+ return Iterator();
+ }
+ Iterator end();
+ {
+ if (parent)
+ return Access::end(parent);
+ return Iterator();
+ }
+ };
+*/
+
+// An iterator that caches the current object to C++ for speed
+template<class C_Obj, class Cpp_Obj>
+ class List_Iterator
+ {
+ public:
+ typedef List_Iterator<C_Obj,Cpp_Obj> self;
+
+ private:
+ GList *node;
+ Cpp_Obj cache;
+
+ public:
+ self& operator=(const self& x)
+ {
+ cache.free();
+ node=x.node;
+ }
+
+ bool operator==(const self& x) const
+ { return node == x.node; }
+ bool operator!=(const self& x) const
+ { return node != x.node; }
+
+ List_Iterator(GList *n) : node(n),cache(0)
+ {}
+ List_Iterator() :node(0),cache(0)
+ {}
+ List_Iterator(const self& x)
+ : node(x.node),cache(0)
+ {}
+
+ Cpp_Obj& operator*() const
+ {
+ if (node)
+ {if (cache.gobj()!=node->data)
+ cache=Cpp_Obj(node->data);
+ }
+ else
+ cache=Cpp_Obj(0);
+ cache=0;
+ return ;
+ }
+
+ Cpp_Obj* operator->() const
+ {
+ return &(operator*());
+ }
+
+ self& operator++()
+ {
+ cache.free();
+ if (node && node->next)
+ node = node->next;
+ return *this;
+ }
+
+ self operator++(int)
+ {
+ self tmp = *this;
+ ++*this;
+ return tmp;
+ }
+
+ self& operator--()
+ {
+ cache.free();
+ if (node && node->prev)
+ node=node->prev;
+ return *this;
+ }
+
+ self operator--(int)
+ {
+ self tmp = *this;
+ --*this;
+ return tmp;
+ }
+
+ };
+
+/*
+List_Iterator<GdkWidget*,Widget> iter;
+(*iter) should be a Widget
+
+Example usage:
+
+ class Foo()
+ {
+ public:
+ typedef List_Iterator<GdkWidget*,Widget> Iterator;
+ typedef List<Foo,Iterator,Child_Access) Child_List;
+ private:
+ struct Child_Access
+ {
+ static Iterator begin(Foo& foo)
+ {return foo.get_children_begin();}
+ static Iterator end(Foo& foo)
+ {return foo.get_children_end();}
+ };
+ public:
+// GList* get_children();
+ Iterator get_children_begin()
+ {return Iterator(gdk_foo_get_children(*this);}
+ Iterator get_children_end()
+ {
+ GList* list=gdk_foo_get_children(*this);
+ return Iterator(g_list_last(list);
+ }
+ Child_List get_children()
+ {
+ return Child_List(this);
+ }
+
+ };
+*/
+
+#endif
+
+} /* namespace Gdk */
+
+
+#endif // _GDKMM_LIST_H_
diff --git a/libs/gtkmm2/gdk/gdkmm/pixbuf.cc b/libs/gtkmm2/gdk/gdkmm/pixbuf.cc
new file mode 100644
index 0000000000..8a486d3cc9
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/pixbuf.cc
@@ -0,0 +1,503 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gdkmm/pixbuf.h>
+#include <gdkmm/private/pixbuf_p.h>
+
+#include <gdk-pixbuf/gdk-pixbuf-enum-types.h>
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gdk/gdkcolor.h>
+#include <gdk/gdkpixbuf.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
+
+
+namespace
+{
+
+void pixbuf_destroy_data_callback(guint8* pixels, void* user_data)
+{
+ Gdk::Pixbuf::SlotDestroyData *const slot = static_cast<Gdk::Pixbuf::SlotDestroyData*>(user_data);
+ g_return_if_fail(slot != 0);
+
+ try
+ {
+ (*slot)(pixels); // invoke callback
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+
+ delete slot;
+}
+
+} // anonymous namespace
+
+
+namespace Gdk
+{
+
+Pixbuf::Pixbuf(const Glib::RefPtr<Image>& src,
+ const Glib::RefPtr<Colormap>& cmap,
+ int src_x, int src_y,
+ int dest_x, int dest_y,
+ int width, int height)
+:
+ Object((GObject*) gdk_pixbuf_get_from_image(
+ 0, src->gobj(), cmap->gobj(), src_x, src_y, dest_x, dest_y, width, height))
+{}
+
+Pixbuf::Pixbuf(const Glib::RefPtr<Drawable>& src,
+ const Glib::RefPtr<Colormap>& cmap,
+ int src_x, int src_y,
+ int dest_x, int dest_y,
+ int width, int height)
+:
+ Object((GObject*) gdk_pixbuf_get_from_drawable(
+ 0, src->gobj(), cmap->gobj(), src_x, src_y, dest_x, dest_y, width, height))
+{}
+
+Glib::RefPtr<Pixbuf> Pixbuf::create_from_file(const std::string& filename)
+{
+ GError* error = 0;
+ GdkPixbuf *const pixbuf = gdk_pixbuf_new_from_file(filename.c_str(), &error);
+
+ if(error)
+ Glib::Error::throw_exception(error);
+
+ return Glib::wrap(pixbuf);
+}
+
+Glib::RefPtr<Pixbuf> Pixbuf::create_from_file(const std::string& filename, int width, int size, bool preserve_aspect_ratio)
+{
+ GError* error = 0;
+ GdkPixbuf *const pixbuf = gdk_pixbuf_new_from_file_at_scale(filename.c_str(), width, size, preserve_aspect_ratio, &error);
+ //gdk_pixbuf_new_from_file_at_size() just calls gdk_pixbuf_new_from_file_at_scale().
+
+ if(error)
+ Glib::Error::throw_exception(error);
+
+ return Glib::wrap(pixbuf);
+}
+
+Glib::RefPtr<Pixbuf> Pixbuf::create_from_data(const guint8* data, Colorspace colorspace,
+ bool has_alpha, int bits_per_sample,
+ int width, int height, int rowstride)
+{
+ GdkPixbuf *const pixbuf = gdk_pixbuf_new_from_data(
+ data, (GdkColorspace) colorspace, has_alpha, bits_per_sample, width, height, rowstride,
+ 0, 0);
+
+ return Glib::wrap(pixbuf);
+}
+
+Glib::RefPtr<Pixbuf> Pixbuf::create_from_data(const guint8* data, Colorspace colorspace,
+ bool has_alpha, int bits_per_sample,
+ int width, int height, int rowstride,
+ const Pixbuf::SlotDestroyData& destroy_slot)
+{
+ GdkPixbuf *const pixbuf = gdk_pixbuf_new_from_data(
+ data, (GdkColorspace) colorspace, has_alpha, bits_per_sample, width, height, rowstride,
+ &pixbuf_destroy_data_callback, new SlotDestroyData(destroy_slot));
+
+ return Glib::wrap(pixbuf);
+}
+
+Glib::RefPtr<Pixbuf> Pixbuf::create_from_inline(int data_length, const guint8* data, bool copy_pixels)
+{
+ GError* error = 0;
+ GdkPixbuf *const pixbuf = gdk_pixbuf_new_from_inline(data_length, data, copy_pixels, &error);
+
+ if(error)
+ Glib::Error::throw_exception(error);
+
+ return Glib::wrap(pixbuf);
+}
+
+void Pixbuf::render_pixmap_and_mask_for_colormap(const Glib::RefPtr<Colormap>& colormap,
+ Glib::RefPtr<Pixmap>& pixmap_return,
+ Glib::RefPtr<Bitmap>& mask_return,
+ int alpha_threshold)
+{
+ GdkPixmap* pPixmap = 0;
+ GdkBitmap* pBitmap = 0;
+
+ gdk_pixbuf_render_pixmap_and_mask_for_colormap(
+ gobj(), colormap->gobj(), &pPixmap, &pBitmap, alpha_threshold);
+
+ pixmap_return = Glib::wrap((GdkPixmapObject*) pPixmap);
+ mask_return = Glib::RefPtr<Gdk::Bitmap>::cast_dynamic(Glib::wrap((GdkPixmapObject*) pBitmap));
+}
+
+void Pixbuf::render_pixmap_and_mask(Glib::RefPtr<Pixmap>& pixmap_return,
+ Glib::RefPtr<Bitmap>& mask_return,
+ int alpha_threshold)
+{
+ GdkPixmap* pPixmap = 0;
+ GdkBitmap* pBitmap = 0;
+
+ gdk_pixbuf_render_pixmap_and_mask(gobj(), &pPixmap, &pBitmap, alpha_threshold);
+
+ pixmap_return = Glib::wrap((GdkPixmapObject*) pPixmap);
+ mask_return = Glib::RefPtr<Gdk::Bitmap>::cast_dynamic(Glib::wrap((GdkPixmapObject*) pBitmap));
+}
+
+void Pixbuf::save(const std::string& filename, const Glib::ustring& type)
+{
+ GError* error = 0;
+ gdk_pixbuf_savev(gobj(), filename.c_str(), type.c_str(), 0, 0, &error);
+
+ if(error)
+ Glib::Error::throw_exception(error);
+}
+
+void Pixbuf::save(const std::string& filename, const Glib::ustring& type,
+ const Glib::StringArrayHandle& option_keys,
+ const Glib::StringArrayHandle& option_values)
+{
+ GError* error = 0;
+
+ gdk_pixbuf_savev(
+ gobj(), filename.c_str(), type.c_str(),
+ const_cast<char**>(option_keys.data()), const_cast<char**>(option_values.data()),
+ &error);
+
+ if(error)
+ Glib::Error::throw_exception(error);
+}
+
+void Pixbuf::save_to_buffer(gchar*& buffer, gsize& buffer_size,
+ const Glib::ustring& type,
+ const Glib::StringArrayHandle& option_keys,
+ const Glib::StringArrayHandle& option_values)
+{
+ GError* error = 0;
+
+ gdk_pixbuf_save_to_bufferv(
+ gobj(), &buffer, &buffer_size,
+ type.c_str(),
+ const_cast<char**>(option_keys.data()), const_cast<char**>(option_values.data()),
+ &error);
+
+ if(error)
+ Glib::Error::throw_exception(error);
+}
+
+Pixbuf::SListHandle_PixbufFormat Pixbuf::get_formats()
+{
+ //TODO: Check that this ownership is appropriate. murrayc.
+ return SListHandle_PixbufFormat(gdk_pixbuf_get_formats(), Glib::OWNERSHIP_DEEP);
+}
+
+
+} // namespace Gdk
+
+
+namespace
+{
+} // anonymous namespace
+
+// static
+GType Glib::Value<Gdk::Colorspace>::value_type()
+{
+ return gdk_colorspace_get_type();
+}
+
+// static
+GType Glib::Value<Gdk::InterpType>::value_type()
+{
+ return gdk_interp_type_get_type();
+}
+
+// static
+GType Glib::Value<Gdk::PixbufAlphaMode>::value_type()
+{
+ return gdk_pixbuf_alpha_mode_get_type();
+}
+
+// static
+GType Glib::Value<Gdk::PixbufRotation>::value_type()
+{
+ return gdk_pixbuf_rotation_get_type();
+}
+
+
+Gdk::PixbufError::PixbufError(Gdk::PixbufError::Code error_code, const Glib::ustring& error_message)
+:
+ Glib::Error (GDK_PIXBUF_ERROR, error_code, error_message)
+{}
+
+Gdk::PixbufError::PixbufError(GError* gobject)
+:
+ Glib::Error (gobject)
+{}
+
+Gdk::PixbufError::Code Gdk::PixbufError::code() const
+{
+ return static_cast<Code>(Glib::Error::code());
+}
+
+void Gdk::PixbufError::throw_func(GError* gobject)
+{
+ throw Gdk::PixbufError(gobject);
+}
+
+// static
+GType Glib::Value<Gdk::PixbufError::Code>::value_type()
+{
+ return gdk_pixbuf_error_get_type();
+}
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Gdk::Pixbuf> wrap(GdkPixbuf* object, bool take_copy)
+{
+ return Glib::RefPtr<Gdk::Pixbuf>( dynamic_cast<Gdk::Pixbuf*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} /* namespace Glib */
+
+
+namespace Gdk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Pixbuf_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Pixbuf_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gdk_pixbuf_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Pixbuf_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* Pixbuf_Class::wrap_new(GObject* object)
+{
+ return new Pixbuf((GdkPixbuf*)object);
+}
+
+
+/* The implementation: */
+
+GdkPixbuf* Pixbuf::gobj_copy()
+{
+ reference();
+ return gobj();
+}
+
+Pixbuf::Pixbuf(const Glib::ConstructParams& construct_params)
+:
+ Glib::Object(construct_params)
+{}
+
+Pixbuf::Pixbuf(GdkPixbuf* castitem)
+:
+ Glib::Object((GObject*)(castitem))
+{}
+
+Pixbuf::~Pixbuf()
+{}
+
+
+Pixbuf::CppClassType Pixbuf::pixbuf_class_; // initialize static member
+
+GType Pixbuf::get_type()
+{
+ return pixbuf_class_.init().get_type();
+}
+
+GType Pixbuf::get_base_type()
+{
+ return gdk_pixbuf_get_type();
+}
+
+
+Glib::RefPtr<Pixbuf> Pixbuf::create(const Glib::RefPtr<Drawable>& src, const Glib::RefPtr<Colormap>& cmap, int src_x, int src_y, int dest_x, int dest_y, int width, int height)
+{
+ return Glib::RefPtr<Pixbuf>( new Pixbuf(src, cmap, src_x, src_y, dest_x, dest_y, width, height) );
+}
+Glib::RefPtr<Pixbuf> Pixbuf::create(const Glib::RefPtr<Image>& src, const Glib::RefPtr<Colormap>& cmap, int src_x, int src_y, int dest_x, int dest_y, int width, int height)
+{
+ return Glib::RefPtr<Pixbuf>( new Pixbuf(src, cmap, src_x, src_y, dest_x, dest_y, width, height) );
+}
+Glib::RefPtr<Pixbuf> Pixbuf::copy() const
+{
+ return Glib::wrap(gdk_pixbuf_copy(const_cast<GdkPixbuf*>(gobj())));
+}
+
+Glib::RefPtr<Pixbuf> Pixbuf::create(Colorspace colorspace, bool has_alpha, int bits_per_sample, int width, int height)
+{
+ return Glib::wrap(gdk_pixbuf_new(((GdkColorspace)(colorspace)), static_cast<int>(has_alpha), bits_per_sample, width, height));
+}
+
+Glib::RefPtr<Pixbuf> Pixbuf::create_subpixbuf(const Glib::RefPtr<Pixbuf>& src_pixbuf, int src_x, int src_y, int width, int height)
+{
+ return Glib::wrap(gdk_pixbuf_new_subpixbuf(Glib::unwrap(src_pixbuf), src_x, src_y, width, height));
+}
+
+Glib::RefPtr<Pixbuf> Pixbuf::create_from_xpm_data(const char *const * data)
+{
+ return Glib::wrap(gdk_pixbuf_new_from_xpm_data(const_cast<const char**>(data)));
+}
+
+Colorspace Pixbuf::get_colorspace() const
+{
+ return ((Colorspace)(gdk_pixbuf_get_colorspace(const_cast<GdkPixbuf*>(gobj()))));
+}
+
+int Pixbuf::get_n_channels() const
+{
+ return gdk_pixbuf_get_n_channels(const_cast<GdkPixbuf*>(gobj()));
+}
+
+bool Pixbuf::get_has_alpha() const
+{
+ return gdk_pixbuf_get_has_alpha(const_cast<GdkPixbuf*>(gobj()));
+}
+
+int Pixbuf::get_bits_per_sample() const
+{
+ return gdk_pixbuf_get_bits_per_sample(const_cast<GdkPixbuf*>(gobj()));
+}
+
+guint8* Pixbuf::get_pixels() const
+{
+ return gdk_pixbuf_get_pixels(const_cast<GdkPixbuf*>(gobj()));
+}
+
+int Pixbuf::get_width() const
+{
+ return gdk_pixbuf_get_width(const_cast<GdkPixbuf*>(gobj()));
+}
+
+int Pixbuf::get_height() const
+{
+ return gdk_pixbuf_get_height(const_cast<GdkPixbuf*>(gobj()));
+}
+
+int Pixbuf::get_rowstride() const
+{
+ return gdk_pixbuf_get_rowstride(const_cast<GdkPixbuf*>(gobj()));
+}
+
+void Pixbuf::fill(guint32 pixel)
+{
+ gdk_pixbuf_fill(gobj(), pixel);
+}
+
+Glib::RefPtr<Gdk::Pixbuf> Pixbuf::add_alpha(bool substitute_color, guint8 r, guint8 g, guint8 b) const
+{
+ return Glib::wrap(gdk_pixbuf_add_alpha(const_cast<GdkPixbuf*>(gobj()), static_cast<int>(substitute_color), r, g, b));
+}
+
+void Pixbuf::copy_area(int src_x, int src_y, int width, int height, const Glib::RefPtr<Gdk::Pixbuf>& dest_pixbuf, int dest_x, int dest_y) const
+{
+ gdk_pixbuf_copy_area(const_cast<GdkPixbuf*>(gobj()), src_x, src_y, width, height, Glib::unwrap(dest_pixbuf), dest_x, dest_y);
+}
+
+void Pixbuf::saturate_and_pixelate(const Glib::RefPtr<Gdk::Pixbuf>& dest, float saturation, bool pixelate) const
+{
+ gdk_pixbuf_saturate_and_pixelate(const_cast<GdkPixbuf*>(gobj()), Glib::unwrap(dest), saturation, static_cast<int>(pixelate));
+}
+
+void Pixbuf::scale(const Glib::RefPtr<Gdk::Pixbuf>& dest, int dest_x, int dest_y, int dest_width, int dest_height, double offset_x, double offset_y, double scale_x, double scale_y, InterpType interp_type) const
+{
+ gdk_pixbuf_scale(const_cast<GdkPixbuf*>(gobj()), Glib::unwrap(dest), dest_x, dest_y, dest_width, dest_height, offset_x, offset_y, scale_x, scale_y, ((GdkInterpType)(interp_type)));
+}
+
+void Pixbuf::composite(const Glib::RefPtr<Gdk::Pixbuf>& dest, int dest_x, int dest_y, int dest_width, int dest_height, double offset_x, double offset_y, double scale_x, double scale_y, InterpType interp_type, int overall_alpha) const
+{
+ gdk_pixbuf_composite(const_cast<GdkPixbuf*>(gobj()), Glib::unwrap(dest), dest_x, dest_y, dest_width, dest_height, offset_x, offset_y, scale_x, scale_y, ((GdkInterpType)(interp_type)), overall_alpha);
+}
+
+void Pixbuf::composite_color(const Glib::RefPtr<Gdk::Pixbuf>& dest, int dest_x, int dest_y, int dest_width, int dest_height, double offset_x, double offset_y, double scale_x, double scale_y, InterpType interp_type, int overall_alpha, int check_x, int check_y, int check_size, guint32 color1, guint32 color2) const
+{
+ gdk_pixbuf_composite_color(const_cast<GdkPixbuf*>(gobj()), Glib::unwrap(dest), dest_x, dest_y, dest_width, dest_height, offset_x, offset_y, scale_x, scale_y, ((GdkInterpType)(interp_type)), overall_alpha, check_x, check_y, check_size, color1, color2);
+}
+
+Glib::RefPtr<Gdk::Pixbuf> Pixbuf::scale_simple(int dest_width, int dest_height, InterpType interp_type) const
+{
+ return Glib::wrap(gdk_pixbuf_scale_simple(const_cast<GdkPixbuf*>(gobj()), dest_width, dest_height, ((GdkInterpType)(interp_type))));
+}
+
+Glib::RefPtr<Gdk::Pixbuf> Pixbuf::composite_color_simple(int dest_width, int dest_height, InterpType interp_type, int overall_alpha, int check_size, guint32 color1, guint32 color2) const
+{
+ return Glib::wrap(gdk_pixbuf_composite_color_simple(const_cast<GdkPixbuf*>(gobj()), dest_width, dest_height, ((GdkInterpType)(interp_type)), overall_alpha, check_size, color1, color2));
+}
+
+Glib::RefPtr<Gdk::Pixbuf> Pixbuf::rotate_simple(PixbufRotation angle) const
+{
+ return Glib::wrap(gdk_pixbuf_rotate_simple(const_cast<GdkPixbuf*>(gobj()), ((GdkPixbufRotation)(angle))));
+}
+
+Glib::RefPtr<Gdk::Pixbuf> Pixbuf::flip(bool horizontal) const
+{
+ return Glib::wrap(gdk_pixbuf_flip(const_cast<GdkPixbuf*>(gobj()), static_cast<int>(horizontal)));
+}
+
+void Pixbuf::render_threshold_alpha(const Glib::RefPtr<Gdk::Bitmap>& bitmap, int src_x, int src_y, int dest_x, int dest_y, int width, int height, int alpha_threshold)
+{
+ gdk_pixbuf_render_threshold_alpha(gobj(), Glib::unwrap(bitmap), src_x, src_y, dest_x, dest_y, width, height, alpha_threshold);
+}
+
+void Pixbuf::render_to_drawable(const Glib::RefPtr<Drawable>& drawable, const Glib::RefPtr<Gdk::GC>& gc, int src_x, int src_y, int dest_x, int dest_y, int width, int height, RgbDither dither, int x_dither, int y_dither)
+{
+ gdk_pixbuf_render_to_drawable(gobj(), Glib::unwrap(drawable), Glib::unwrap(gc), src_x, src_y, dest_x, dest_y, width, height, ((GdkRgbDither)(dither)), x_dither, y_dither);
+}
+
+void Pixbuf::render_to_drawable_alpha(const Glib::RefPtr<Drawable>& drawable, int src_x, int src_y, int dest_x, int dest_y, int width, int height, PixbufAlphaMode alpha_mode, int alpha_threshold, RgbDither dither, int x_dither, int y_dither)
+{
+ gdk_pixbuf_render_to_drawable_alpha(gobj(), Glib::unwrap(drawable), src_x, src_y, dest_x, dest_y, width, height, ((GdkPixbufAlphaMode)(alpha_mode)), alpha_threshold, ((GdkRgbDither)(dither)), x_dither, y_dither);
+}
+
+Glib::ustring Pixbuf::get_option(const Glib::ustring& key) const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(gdk_pixbuf_get_option(const_cast<GdkPixbuf*>(gobj()), key.c_str()));
+}
+
+
+} // namespace Gdk
+
+
diff --git a/libs/gtkmm2/gdk/gdkmm/pixbuf.h b/libs/gtkmm2/gdk/gdkmm/pixbuf.h
new file mode 100644
index 0000000000..712020a8b1
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/pixbuf.h
@@ -0,0 +1,884 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GDKMM_PIXBUF_H
+#define _GDKMM_PIXBUF_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gdkmm/drawable.h>
+#include <gdkmm/image.h>
+#include <gdkmm/pixmap.h>
+#include <gdkmm/bitmap.h>
+#include <gdkmm/pixbufformat.h>
+#include <gdkmm/types.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GdkPixbuf GdkPixbuf;
+typedef struct _GdkPixbufClass GdkPixbufClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gdk
+{ class Pixbuf_Class; } // namespace Gdk
+namespace Gdk
+{
+
+
+/** @addtogroup gdkmmEnums Enums and Flags */
+
+/**
+ * @ingroup gdkmmEnums
+ */
+enum Colorspace
+{
+ COLORSPACE_RGB
+};
+
+} // namespace Gdk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gdk::Colorspace> : public Glib::Value_Enum<Gdk::Colorspace>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gdk
+{
+
+/**
+ * @ingroup gdkmmEnums
+ */
+enum InterpType
+{
+ INTERP_NEAREST,
+ INTERP_TILES,
+ INTERP_BILINEAR,
+ INTERP_HYPER
+};
+
+} // namespace Gdk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gdk::InterpType> : public Glib::Value_Enum<Gdk::InterpType>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gdk
+{
+
+/**
+ * @ingroup gdkmmEnums
+ */
+enum PixbufAlphaMode
+{
+ PIXBUF_ALPHA_BILEVEL,
+ PIXBUF_ALPHA_FULL
+};
+
+} // namespace Gdk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gdk::PixbufAlphaMode> : public Glib::Value_Enum<Gdk::PixbufAlphaMode>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gdk
+{
+
+/**
+ * @ingroup gdkmmEnums
+ */
+enum PixbufRotation
+{
+ PIXBUF_ROTATE_NONE = 0,
+ PIXBUF_ROTATE_COUNTERCLOCKWISE = 90,
+ PIXBUF_ROTATE_UPSIDEDOWN = 180,
+ PIXBUF_ROTATE_CLOCKWISE = 270
+};
+
+} // namespace Gdk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gdk::PixbufRotation> : public Glib::Value_Enum<Gdk::PixbufRotation>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gdk
+{
+
+
+/** Exception class for Gdk::Pixbuf errors.
+ */
+class PixbufError : public Glib::Error
+{
+public:
+ enum Code
+ {
+ CORRUPT_IMAGE,
+ INSUFFICIENT_MEMORY,
+ BAD_OPTION,
+ UNKNOWN_TYPE,
+ UNSUPPORTED_OPERATION,
+ FAILED
+ };
+
+ PixbufError(Code error_code, const Glib::ustring& error_message);
+ explicit PixbufError(GError* gobject);
+ Code code() const;
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+private:
+ static void throw_func(GError* gobject);
+ friend void wrap_init(); // uses throw_func()
+#endif
+};
+
+} // namespace Gdk
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gdk::PixbufError::Code> : public Glib::Value_Enum<Gdk::PixbufError::Code>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gdk
+{
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+struct PixbufFormatTraits
+{
+ typedef PixbufFormat CppType;
+ typedef const GdkPixbufFormat* CType;
+ typedef GdkPixbufFormat* CTypeNonConst;
+
+ static CType to_c_type (const CppType& obj) { return obj.gobj(); }
+ static CType to_c_type (CType ptr) { return ptr; }
+ static CppType to_cpp_type (CType ptr) { return PixbufFormat(ptr); /* Does not take ownership */ }
+ static void release_c_type (CType /* ptr */) { /* Doesn't happen */ }
+};
+#endif //DOXYGEN_SHOULD_SKIP_THIS
+
+
+class Pixbuf : public Glib::Object
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef Pixbuf CppObjectType;
+ typedef Pixbuf_Class CppClassType;
+ typedef GdkPixbuf BaseObjectType;
+ typedef GdkPixbufClass BaseClassType;
+
+private: friend class Pixbuf_Class;
+ static CppClassType pixbuf_class_;
+
+private:
+ // noncopyable
+ Pixbuf(const Pixbuf&);
+ Pixbuf& operator=(const Pixbuf&);
+
+protected:
+ explicit Pixbuf(const Glib::ConstructParams& construct_params);
+ explicit Pixbuf(GdkPixbuf* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~Pixbuf();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ GdkPixbuf* gobj() { return reinterpret_cast<GdkPixbuf*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const GdkPixbuf* gobj() const { return reinterpret_cast<GdkPixbuf*>(gobject_); }
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ GdkPixbuf* gobj_copy();
+
+private:
+
+
+protected:
+
+ //TODO: Documente these, based on the docs for the C functions.
+ Pixbuf(const Glib::RefPtr<Drawable>& src, const Glib::RefPtr<Colormap>& cmap,
+ int src_x, int src_y, int dest_x, int dest_y, int width, int height);
+ Pixbuf(const Glib::RefPtr<Image>& src, const Glib::RefPtr<Colormap>& cmap,
+ int src_x, int src_y, int dest_x, int dest_y, int width, int height);
+
+public:
+ typedef sigc::slot<void, const guint8*> SlotDestroyData;
+
+
+ static Glib::RefPtr<Pixbuf> create(const Glib::RefPtr<Drawable>& src, const Glib::RefPtr<Colormap>& cmap, int src_x, int src_y, int dest_x, int dest_y, int width, int height);
+
+
+ static Glib::RefPtr<Pixbuf> create(const Glib::RefPtr<Image>& src, const Glib::RefPtr<Colormap>& cmap, int src_x, int src_y, int dest_x, int dest_y, int width, int height);
+
+
+ /** Creates a new Gdk::Pixbuf with a copy of the information in the specified
+ * @a pixbuf .
+ * @return A newly-created pixbuf with a reference count of 1, or <tt>0</tt> if
+ * not enough memory could be allocated.
+ */
+ Glib::RefPtr<Pixbuf> copy() const;
+
+
+ /** Creates a new Gdk::Pixbuf structure and allocates a buffer for it. The
+ * buffer has an optimal rowstride. Note that the buffer is not cleared;
+ * you will have to fill it completely yourself.
+ * @param colorspace Color space for image.
+ * @param has_alpha Whether the image should have transparency information.
+ * @param bits_per_sample Number of bits per color sample.
+ * @param width Width of image in pixels.
+ * @param height Height of image in pixels.
+ * @return A newly-created Gdk::Pixbuf with a reference count of 1, or
+ * <tt>0</tt> if not enough memory could be allocated for the image buffer.
+ */
+ static Glib::RefPtr<Pixbuf> create(
+ Colorspace colorspace, bool has_alpha,
+ int bits_per_sample, int width, int height);
+
+
+ /** Creates a new pixbuf which represents a sub-region of
+ * @a src_pixbuf . The new pixbuf shares its pixels with the
+ * original pixbuf, so writing to one affects both.
+ * The new pixbuf holds a reference to @a src_pixbuf , so
+ * @a src_pixbuf will not be finalized until the new pixbuf
+ * is finalized.
+ * @param src_pixbuf A Gdk::Pixbuf.
+ * @param src_x X coord in @a src_pixbuf .
+ * @param src_y Y coord in @a src_pixbuf .
+ * @param width Width of region in @a src_pixbuf .
+ * @param height Height of region in @a src_pixbuf .
+ * @return A new pixbuf.
+ */
+ static Glib::RefPtr<Pixbuf> create_subpixbuf(
+ const Glib::RefPtr<Pixbuf>& src_pixbuf,
+ int src_x, int src_y, int width, int height);
+
+ /** Creates a new pixbuf by loading an image from a file. The file format is detected automatically.
+ * @param filename The path to the pixbuf file.
+ *
+ * @throw Glib::FileError
+ * @throw Gdk::PixbufError
+ */
+ static Glib::RefPtr<Pixbuf> create_from_file(const std::string& filename);
+
+ /** Creates a new pixbuf by loading an image from a file. The file format is detected automatically.
+ * The image will be scaled to fit in the requested size.
+ * @param filename The path to the pixbuf file.
+ * @param width The desired width
+ * @param height The desired height
+ * @param preserve_aspect_ratio: Whether the image's aspect ratio will be preserved when scaling.
+ *
+ * @throw Glib::FileError
+ * @throw Gdk::PixbufError
+ */
+ static Glib::RefPtr<Pixbuf> create_from_file(const std::string& filename, int width, int height, bool preserve_aspect_ratio = true);
+
+
+ /** Creates a new Gdk::Pixbuf out of in-memory image data.
+ * Currently only RGB images with 8 bits per sample are supported.
+ *
+ * @param data %Image data in 8-bit/sample packed format.
+ * @param colorspace Colorspace for the image data.
+ * @param has_alpha Whether the data has an opacity channel.
+ * @param bits_per_sample Number of bits per sample.
+ * @param width Width of the image in pixels.
+ * @param height Height of the image in pixels.
+ * @param rowstride Distance in bytes between rows.
+ * @return A newly-created Gdk::Pixbuf object.
+ */
+ static Glib::RefPtr<Pixbuf> create_from_data(const guint8* data, Colorspace colorspace,
+ bool has_alpha, int bits_per_sample,
+ int width, int height, int rowstride);
+
+ /** Creates a new Gdk::Pixbuf out of in-memory image data.
+ * Currently only RGB images with 8 bits per sample are supported.
+ *
+ * @param data %Image data in 8-bit/sample packed format.
+ * @param colorspace Colorspace for the image data.
+ * @param has_alpha Whether the data has an opacity channel.
+ * @param bits_per_sample Number of bits per sample.
+ * @param width Width of the image in pixels.
+ * @param height Height of the image in pixels.
+ * @param rowstride Distance in bytes between rows.
+ * @param destroy_slot Slot used to free the data when the pixbuf's
+ * reference count drops to zero.
+ * @return A newly-created Gdk::Pixbuf object.
+ */
+ static Glib::RefPtr<Pixbuf> create_from_data(const guint8* data, Colorspace colorspace,
+ bool has_alpha, int bits_per_sample,
+ int width, int height, int rowstride,
+ const SlotDestroyData& destroy_slot);
+
+
+ /** Creates a new pixbuf by parsing XPM data in memory. This data is commonly
+ * the result of including an XPM file into a program's C source.
+ * @param data Pointer to inline XPM data.
+ * @return A newly-created pixbuf with a reference count of 1.
+ */
+ static Glib::RefPtr<Pixbuf> create_from_xpm_data(const char *const * data);
+
+ /** Create a Gdk::Pixbuf from a flat representation that is suitable for
+ * storing as inline data in a program. This is useful if you want to ship a
+ * program with images, but don't want to depend on any external files.
+ *
+ * GTK+ ships with a program called <tt>gdk-pixbuf-csource</tt> which allows
+ * for conversion of GdkPixbufs into such a inline representation. In almost
+ * all cases, you should pass the <tt>--raw</tt> flag to
+ * <tt>gdk-pixbuf-csource</tt>. A sample invocation would be:
+ *
+ * <tt>gdk-pixbuf-csource --raw --name=myimage_inline myimage.png</tt>
+ *
+ * For the typical case where the inline pixbuf is read-only static data, you
+ * don't need to copy the pixel data unless you intend to write to it, so you
+ * can pass <tt>false</tt> for @a copy_pixels. (If you pass <tt>--rle</tt> to
+ * <tt>gdk-pixbuf-csource</tt>, a copy will be made even if @a copy_pixels is
+ * <tt>false</tt>, so using this option is generally a bad idea.)
+ *
+ * If you create a pixbuf from const inline data compiled into your program,
+ * it's probably safe to ignore errors, since things will always succeed. For
+ * non-const inline data, you could get out of memory. For untrusted inline
+ * data located at runtime, you could have corrupt inline data in addition.
+ *
+ * @param data_length Length in bytes of the @a data argument.
+ * @param data Byte data containing a serialized GdkPixdata structure.
+ * @param copy_pixels Whether to copy the pixel data, or use direct pointers
+ * to @a data for the resulting pixbuf.
+ * @throw Gdk::PixbufError
+ */
+ static Glib::RefPtr<Pixbuf> create_from_inline(int data_length, const guint8* data,
+ bool copy_pixels = false);
+
+
+ /** Queries the color space of a pixbuf.
+ * @return Color space.
+ */
+ Colorspace get_colorspace() const;
+
+
+ /** Queries the number of channels of a pixbuf.
+ * @return Number of channels.
+ */
+ int get_n_channels() const;
+
+ /** Queries whether a pixbuf has an alpha channel (opacity information).
+ * @return <tt>true</tt> if it has an alpha channel, <tt>false</tt> otherwise.
+ */
+ bool get_has_alpha() const;
+
+ /** Queries the number of bits per color sample in a pixbuf.
+ * @return Number of bits per color sample.
+ */
+ int get_bits_per_sample() const;
+
+ /** Queries a pointer to the pixel data of a pixbuf.
+ * @return A pointer to the pixbuf's pixel data. Please see &lt;xref linkend="image-data"/&gt;
+ * for information about how the pixel data is stored in
+ * memory.
+ */
+ guint8* get_pixels() const;
+
+ /** Queries the width of a pixbuf.
+ * @return Width in pixels.
+ */
+ int get_width() const;
+
+ /** Queries the height of a pixbuf.
+ * @return Height in pixels.
+ */
+ int get_height() const;
+
+ /** Queries the rowstride of a pixbuf, which is the number of bytes between the start of a row
+ * and the start of the next row.
+ * @return Distance between row starts.
+ */
+ int get_rowstride() const;
+
+
+ /** Clears a pixbuf to the given RGBA value, converting the RGBA value into
+ * the pixbuf's pixel format. The alpha will be ignored if the pixbuf
+ * doesn't have an alpha channel.
+ * @param pixel RGBA pixel to clear to
+ * (0xffffffff is opaque white, 0x00000000 transparent black).
+ */
+ void fill(guint32 pixel);
+
+ /** Save an image file.
+ * @throw Glib::FileError
+ * @throw Gdk::PixbufError
+ */
+ void save(const std::string& filename, const Glib::ustring& type);
+
+
+ /** Save an image file.
+ * @throw Glib::FileError
+ * @throw Gdk::PixbufError
+ */
+ void save(const std::string& filename, const Glib::ustring& type,
+ const Glib::StringArrayHandle& option_keys,
+ const Glib::StringArrayHandle& option_values);
+
+
+/* TODO:
+typedef gboolean (*GdkPixbufSaveFunc) (const gchar *buf,
+ gsize count,
+ GError **error,
+ gpointer data);
+
+gboolean gdk_pixbuf_save_to_callback (GdkPixbuf *pixbuf,
+ GdkPixbufSaveFunc save_func,
+ gpointer user_data,
+ const char *type,
+ GError **error,
+ ...);
+
+gboolean gdk_pixbuf_save_to_callbackv (GdkPixbuf *pixbuf,
+ GdkPixbufSaveFunc save_func,
+ gpointer user_data,
+ const char *type,
+ char **option_keys,
+ char **option_values,
+ GError **error);
+
+*/
+
+ void save_to_buffer(gchar*& buffer, gsize& buffer_size,
+ const Glib::ustring& type,
+ const Glib::StringArrayHandle& option_keys,
+ const Glib::StringArrayHandle& option_values);
+
+
+ /** Takes an existing pixbuf and adds an alpha channel to it.
+ * If the existing pixbuf already had an alpha channel, the channel
+ * values are copied from the original; otherwise, the alpha channel
+ * is initialized to 255 (full opacity).
+ *
+ * If @a substitute_color is <tt>true</tt>, then the color specified by ( @a r , @a g , @a b ) will be
+ * assigned zero opacity. That is, if you pass (255, 255, 255) for the
+ * substitute color, all white pixels will become fully transparent.
+ * @param substitute_color Whether to set a color to zero opacity. If this
+ * is <tt>false</tt>, then the ( @a r , @a g , @a b ) arguments will be ignored.
+ * @param r Red value to substitute.
+ * @param g Green value to substitute.
+ * @param b Blue value to substitute.
+ * @return A newly-created pixbuf with a reference count of 1.
+ */
+ Glib::RefPtr<Gdk::Pixbuf> add_alpha(
+ bool substitute_color, guint8 r, guint8 g, guint8 b) const;
+
+
+ /** Copies a rectangular area from @a src_pixbuf to @a dest_pixbuf . Conversion of
+ * pixbuf formats is done automatically.
+ * @param src_x Source X coordinate within @a src_pixbuf .
+ * @param src_y Source Y coordinate within @a src_pixbuf .
+ * @param width Width of the area to copy.
+ * @param height Height of the area to copy.
+ * @param dest_pixbuf Destination pixbuf.
+ * @param dest_x X coordinate within @a dest_pixbuf .
+ * @param dest_y Y coordinate within @a dest_pixbuf .
+ */
+ void copy_area(
+ int src_x, int src_y, int width, int height,
+ const Glib::RefPtr<Gdk::Pixbuf>& dest_pixbuf,
+ int dest_x, int dest_y) const;
+
+
+ /** Modifies saturation and optionally pixelates @a src , placing the
+ * result in @a dest . @a src and @a dest may be the same pixbuf with no ill
+ * effects. If @a saturation is 1.0 then saturation is not changed. If
+ * it's less than 1.0, saturation is reduced (the image is darkened);
+ * if greater than 1.0, saturation is increased (the image is
+ * brightened). If @a pixelate is <tt>true</tt>, then pixels are faded in a
+ * checkerboard pattern to create a pixelated image. @a src and @a dest
+ * must have the same image format, size, and rowstride.
+ * @param dest Place to write modified version of @a src .
+ * @param saturation Saturation factor.
+ * @param pixelate Whether to pixelate.
+ */
+ void saturate_and_pixelate(
+ const Glib::RefPtr<Gdk::Pixbuf>& dest,
+ float saturation, bool pixelate) const;
+
+
+ /** Creates a transformation of the source image @a src by scaling by
+ * @a scale_x and @a scale_y then translating by @a offset_x and @a offset_y ,
+ * then renders the rectangle ( @a dest_x , @a dest_y , @a dest_width ,
+ * @a dest_height ) of the resulting image onto the destination image
+ * replacing the previous contents.
+ *
+ * Try to use scale_simple() first, this function is
+ * the industrial-strength power tool you can fall back to if
+ * scale_simple() isn't powerful enough.
+ * @param dest The Gdk::Pixbuf into which to render the results.
+ * @param dest_x The left coordinate for region to render.
+ * @param dest_y The top coordinate for region to render.
+ * @param dest_width The width of the region to render.
+ * @param dest_height The height of the region to render.
+ * @param offset_x The offset in the X direction (currently rounded to an integer).
+ * @param offset_y The offset in the Y direction (currently rounded to an integer).
+ * @param scale_x The scale factor in the X direction.
+ * @param scale_y The scale factor in the Y direction.
+ * @param interp_type The interpolation type for the transformation.
+ */
+ void scale(const Glib::RefPtr<Gdk::Pixbuf>& dest,
+ int dest_x, int dest_y,
+ int dest_width, int dest_height,
+ double offset_x, double offset_y,
+ double scale_x, double scale_y,
+ InterpType interp_type) const;
+
+
+ /** Creates a transformation of the source image @a src by scaling by
+ * @a scale_x and @a scale_y then translating by @a offset_x and @a offset_y .
+ * This gives an image in the coordinates of the destination pixbuf.
+ * The rectangle ( @a dest_x , @a dest_y , @a dest_width , @a dest_height )
+ * is then composited onto the corresponding rectangle of the
+ * original destination image.
+ *
+ * When the destination rectangle contains parts not in the source
+ * image, the data at the edges of the source image is replicated
+ * to infinity.
+ *
+ * &lt;figure id="pixbuf-composite-diagram"&gt;
+ * &lt;title&gt;Compositing of pixbufs&lt;/title&gt;
+ * &lt;graphic fileref="composite.png" format="PNG"/&gt;
+ * &lt;/figure&gt;
+ * @param dest The Gdk::Pixbuf into which to render the results.
+ * @param dest_x The left coordinate for region to render.
+ * @param dest_y The top coordinate for region to render.
+ * @param dest_width The width of the region to render.
+ * @param dest_height The height of the region to render.
+ * @param offset_x The offset in the X direction (currently rounded to an integer).
+ * @param offset_y The offset in the Y direction (currently rounded to an integer).
+ * @param scale_x The scale factor in the X direction.
+ * @param scale_y The scale factor in the Y direction.
+ * @param interp_type The interpolation type for the transformation.
+ * @param overall_alpha Overall alpha for source image (0..255).
+ */
+ void composite(const Glib::RefPtr<Gdk::Pixbuf>& dest,
+ int dest_x, int dest_y,
+ int dest_width, int dest_height,
+ double offset_x, double offset_y,
+ double scale_x, double scale_y,
+ InterpType interp_type,
+ int overall_alpha) const;
+
+
+ /** Creates a transformation of the source image @a src by scaling by
+ * @a scale_x and @a scale_y then translating by @a offset_x and @a offset_y ,
+ * then composites the rectangle ( @a dest_x , @a dest_y , @a dest_width ,
+ * @a dest_height ) of the resulting image with a checkboard of the
+ * colors @a color1 and @a color2 and renders it onto the destination
+ * image.
+ *
+ * See composite_color_simple() for a simpler variant of this
+ * function suitable for many tasks.
+ * @param dest The Gdk::Pixbuf into which to render the results.
+ * @param dest_x The left coordinate for region to render.
+ * @param dest_y The top coordinate for region to render.
+ * @param dest_width The width of the region to render.
+ * @param dest_height The height of the region to render.
+ * @param offset_x The offset in the X direction (currently rounded to an integer).
+ * @param offset_y The offset in the Y direction (currently rounded to an integer).
+ * @param scale_x The scale factor in the X direction.
+ * @param scale_y The scale factor in the Y direction.
+ * @param interp_type The interpolation type for the transformation.
+ * @param overall_alpha Overall alpha for source image (0..255).
+ * @param check_x The X offset for the checkboard (origin of checkboard is at - @a check_x , - @a check_y ).
+ * @param check_y The Y offset for the checkboard.
+ * @param check_size The size of checks in the checkboard (must be a power of two).
+ * @param color1 The color of check at upper left.
+ * @param color2 The color of the other check.
+ */
+ void composite_color(const Glib::RefPtr<Gdk::Pixbuf>& dest,
+ int dest_x, int dest_y,
+ int dest_width, int dest_height,
+ double offset_x, double offset_y,
+ double scale_x, double scale_y,
+ InterpType interp_type,
+ int overall_alpha,
+ int check_x, int check_y,
+ int check_size,
+ guint32 color1, guint32 color2) const;
+
+
+ /** Create a new Gdk::Pixbuf containing a copy of @a src scaled to
+ * @a dest_width x @a dest_height . Leaves @a src unaffected. @a interp_type
+ * should be Gdk::INTERP_NEAREST if you want maximum speed (but when
+ * scaling down Gdk::INTERP_NEAREST is usually unusably ugly). The
+ * default @a interp_type should be Gdk::INTERP_BILINEAR which offers
+ * reasonable quality and speed.
+ *
+ * You can scale a sub-portion of @a src by creating a sub-pixbuf
+ * pointing into @a src ; see new_subpixbuf().
+ *
+ * For more complicated scaling/compositing see scale()
+ * and composite().
+ * @param dest_width The width of destination image.
+ * @param dest_height The height of destination image.
+ * @param interp_type The interpolation type for the transformation.
+ * @return The new Gdk::Pixbuf, or <tt>0</tt> if not enough memory could be
+ * allocated for it.
+ */
+ Glib::RefPtr<Gdk::Pixbuf> scale_simple(
+ int dest_width, int dest_height,
+ InterpType interp_type) const;
+
+
+ /** Creates a new Gdk::Pixbuf by scaling @a src to @a dest_width x
+ * @a dest_height and compositing the result with a checkboard of colors
+ * @a color1 and @a color2 .
+ * @param dest_width The width of destination image.
+ * @param dest_height The height of destination image.
+ * @param interp_type The interpolation type for the transformation.
+ * @param overall_alpha Overall alpha for source image (0..255).
+ * @param check_size The size of checks in the checkboard (must be a power of two).
+ * @param color1 The color of check at upper left.
+ * @param color2 The color of the other check.
+ * @return The new Gdk::Pixbuf, or <tt>0</tt> if not enough memory could be
+ * allocated for it.
+ */
+ Glib::RefPtr<Gdk::Pixbuf> composite_color_simple(
+ int dest_width, int dest_height,
+ InterpType interp_type,
+ int overall_alpha, int check_size,
+ guint32 color1, guint32 color2) const;
+
+
+ /** Rotates a pixbuf by a multiple of 90 degrees, and returns the
+ * result in a new pixbuf.
+ * @param angle The angle to rotate by.
+ * @return A new pixbuf
+ *
+ * Since: 2.6.
+ */
+ Glib::RefPtr<Gdk::Pixbuf> rotate_simple(PixbufRotation angle) const;
+
+ /** Flips a pixbuf horizontally or vertically and returns the
+ * result in a new pixbuf.
+ * @param horizontal <tt>true</tt> to flip horizontally, <tt>false</tt> to flip vertically.
+ * @return A new pixbuf.
+ *
+ * Since: 2.6.
+ */
+ Glib::RefPtr<Gdk::Pixbuf> flip(bool horizontal = true) const;
+
+
+ /** Takes the opacity values in a rectangular portion of a pixbuf and thresholds
+ * them to produce a bi-level alpha mask that can be used as a clipping mask for
+ * a drawable.
+ * @param bitmap Bitmap where the bilevel mask will be painted to.
+ * @param src_x Source X coordinate.
+ * @param src_y Source Y coordinate.
+ * @param dest_x Destination X coordinate.
+ * @param dest_y Destination Y coordinate.
+ * @param width Width of region to threshold, or -1 to use pixbuf width.
+ * @param height Height of region to threshold, or -1 to use pixbuf height.
+ * @param alpha_threshold Opacity values below this will be painted as zero; all
+ * other values will be painted as one.
+ */
+ void render_threshold_alpha(const Glib::RefPtr<Gdk::Bitmap>& bitmap,
+ int src_x, int src_y,
+ int dest_x, int dest_y,
+ int width, int height,
+ int alpha_threshold);
+
+
+ /** Renders a rectangular portion of a pixbuf to a drawable while using the
+ * specified GC. This is done using GdkRGB, so the specified drawable must have
+ * the GdkRGB visual and colormap. Note that this function will ignore the
+ * opacity information for images with an alpha channel; the GC must already
+ * have the clipping mask set if you want transparent regions to show through.
+ *
+ * For an explanation of dither offsets, see the GdkRGB documentation. In
+ * brief, the dither offset is important when re-rendering partial regions of an
+ * image to a rendered version of the full image, or for when the offsets to a
+ * base position change, as in scrolling. The dither matrix has to be shifted
+ * for consistent visual results. If you do not have any of these cases, the
+ * dither offsets can be both zero.
+ *
+ * Deprecated: This function is obsolete. Use gdk_draw_pixbuf() instead.
+ * @param drawable Destination drawable.
+ * @param gc GC used for rendering.
+ * @param src_x Source X coordinate within pixbuf.
+ * @param src_y Source Y coordinate within pixbuf.
+ * @param dest_x Destination X coordinate within drawable.
+ * @param dest_y Destination Y coordinate within drawable.
+ * @param width Width of region to render, in pixels, or -1 to use pixbuf width.
+ * @param height Height of region to render, in pixels, or -1 to use pixbuf height.
+ * @param dither Dithering mode for GdkRGB.
+ * @param x_dither X offset for dither.
+ * @param y_dither Y offset for dither.
+ */
+ void render_to_drawable(const Glib::RefPtr<Drawable>& drawable,
+ const Glib::RefPtr<Gdk::GC>& gc,
+ int src_x, int src_y,
+ int dest_x, int dest_y,
+ int width, int height,
+ RgbDither dither,
+ int x_dither, int y_dither);
+
+ /** Renders a rectangular portion of a pixbuf to a drawable. The destination
+ * drawable must have a colormap. All windows have a colormap, however, pixmaps
+ * only have colormap by default if they were created with a non-<tt>0</tt> window argument.
+ * Otherwise a colormap must be set on them with gdk_drawable_set_colormap.
+ *
+ * On older X servers, rendering pixbufs with an alpha channel involves round trips
+ * to the X server, and may be somewhat slow.
+ *
+ * Deprecated: This function is obsolete. Use gdk_draw_pixbuf() instead.
+ * @param drawable Destination drawable.
+ * @param src_x Source X coordinate within pixbuf.
+ * @param src_y Source Y coordinates within pixbuf.
+ * @param dest_x Destination X coordinate within drawable.
+ * @param dest_y Destination Y coordinate within drawable.
+ * @param width Width of region to render, in pixels, or -1 to use pixbuf width.
+ * @param height Height of region to render, in pixels, or -1 to use pixbuf height.
+ * @param alpha_mode Ignored. Present for backwards compatibility.
+ * @param alpha_threshold Ignored. Present for backwards compatibility.
+ * @param dither Dithering mode for GdkRGB.
+ * @param x_dither X offset for dither.
+ * @param y_dither Y offset for dither.
+ */
+ void render_to_drawable_alpha(const Glib::RefPtr<Drawable>& drawable,
+ int src_x, int src_y,
+ int dest_x, int dest_y,
+ int width, int height,
+ PixbufAlphaMode alpha_mode,
+ int alpha_threshold,
+ RgbDither dither,
+ int x_dither, int y_dither);
+
+ void render_pixmap_and_mask_for_colormap(const Glib::RefPtr<Colormap>& colormap,
+ Glib::RefPtr<Pixmap>& pixmap_return,
+ Glib::RefPtr<Bitmap>& mask_return,
+ int alpha_threshold);
+
+ void render_pixmap_and_mask(Glib::RefPtr<Pixmap>& pixmap_return,
+ Glib::RefPtr<Bitmap>& mask_return, int alpha_threshold);
+
+
+ /** Looks up @a key in the list of options that may have been attached to the
+ * @a pixbuf when it was loaded.
+ * @param key A nul-terminated string.
+ * @return The value associated with @a key . This is a nul-terminated
+ * string that should not be freed or <tt>0</tt> if @a key was not found.
+ */
+ Glib::ustring get_option(const Glib::ustring& key) const;
+
+
+ typedef Glib::SListHandle< Glib::RefPtr<PixbufFormat>, PixbufFormatTraits > SListHandle_PixbufFormat;
+ static SListHandle_PixbufFormat get_formats();
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+};
+
+} // namespace Gdk
+
+
+namespace Glib
+{
+ /** @relates Gdk::Pixbuf
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Gdk::Pixbuf> wrap(GdkPixbuf* object, bool take_copy = false);
+}
+
+
+#endif /* _GDKMM_PIXBUF_H */
+
diff --git a/libs/gtkmm2/gdk/gdkmm/pixbufanimation.cc b/libs/gtkmm2/gdk/gdkmm/pixbufanimation.cc
new file mode 100644
index 0000000000..a558a55044
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/pixbufanimation.cc
@@ -0,0 +1,172 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gdkmm/pixbufanimation.h>
+#include <gdkmm/private/pixbufanimation_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gdk/gdkcolor.h>
+
+namespace Gdk
+{
+
+Glib::RefPtr<PixbufAnimation> PixbufAnimation::create_from_file(const Glib::ustring& filename)
+{
+ GError* pError = 0;
+ return Glib::wrap(gdk_pixbuf_animation_new_from_file(filename.c_str(), &pError));
+}
+
+} //Gdk
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Gdk::PixbufAnimation> wrap(GdkPixbufAnimation* object, bool take_copy)
+{
+ return Glib::RefPtr<Gdk::PixbufAnimation>( dynamic_cast<Gdk::PixbufAnimation*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} /* namespace Glib */
+
+
+namespace Gdk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& PixbufAnimation_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &PixbufAnimation_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gdk_pixbuf_animation_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void PixbufAnimation_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* PixbufAnimation_Class::wrap_new(GObject* object)
+{
+ return new PixbufAnimation((GdkPixbufAnimation*)object);
+}
+
+
+/* The implementation: */
+
+GdkPixbufAnimation* PixbufAnimation::gobj_copy()
+{
+ reference();
+ return gobj();
+}
+
+PixbufAnimation::PixbufAnimation(const Glib::ConstructParams& construct_params)
+:
+ Glib::Object(construct_params)
+{}
+
+PixbufAnimation::PixbufAnimation(GdkPixbufAnimation* castitem)
+:
+ Glib::Object((GObject*)(castitem))
+{}
+
+PixbufAnimation::~PixbufAnimation()
+{}
+
+
+PixbufAnimation::CppClassType PixbufAnimation::pixbufanimation_class_; // initialize static member
+
+GType PixbufAnimation::get_type()
+{
+ return pixbufanimation_class_.init().get_type();
+}
+
+GType PixbufAnimation::get_base_type()
+{
+ return gdk_pixbuf_animation_get_type();
+}
+
+
+int PixbufAnimation::get_width() const
+{
+ return gdk_pixbuf_animation_get_width(const_cast<GdkPixbufAnimation*>(gobj()));
+}
+
+int PixbufAnimation::get_height() const
+{
+ return gdk_pixbuf_animation_get_height(const_cast<GdkPixbufAnimation*>(gobj()));
+}
+
+bool PixbufAnimation::is_static_image() const
+{
+ return gdk_pixbuf_animation_is_static_image(const_cast<GdkPixbufAnimation*>(gobj()));
+}
+
+Glib::RefPtr<Pixbuf> PixbufAnimation::get_static_image()
+{
+
+ Glib::RefPtr<Pixbuf> retvalue = Glib::wrap(gdk_pixbuf_animation_get_static_image(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<PixbufAnimationIter> PixbufAnimation::get_iter(const GTimeVal* start_time)
+{
+
+ Glib::RefPtr<PixbufAnimationIter> retvalue = Glib::wrap(gdk_pixbuf_animation_get_iter(gobj(), start_time));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+
+} // namespace Gdk
+
+
diff --git a/libs/gtkmm2/gdk/gdkmm/pixbufanimation.h b/libs/gtkmm2/gdk/gdkmm/pixbufanimation.h
new file mode 100644
index 0000000000..dd5afec672
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/pixbufanimation.h
@@ -0,0 +1,194 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GDKMM_PIXBUFANIMATION_H
+#define _GDKMM_PIXBUFANIMATION_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* box.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/object.h>
+#include <gdkmm/pixbuf.h>
+#include <gdkmm/pixbufanimationiter.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GdkPixbufAnimation GdkPixbufAnimation;
+typedef struct _GdkPixbufAnimationClass GdkPixbufAnimationClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gdk
+{ class PixbufAnimation_Class; } // namespace Gdk
+namespace Gdk
+{
+
+
+class PixbufAnimation : public Glib::Object
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef PixbufAnimation CppObjectType;
+ typedef PixbufAnimation_Class CppClassType;
+ typedef GdkPixbufAnimation BaseObjectType;
+ typedef GdkPixbufAnimationClass BaseClassType;
+
+private: friend class PixbufAnimation_Class;
+ static CppClassType pixbufanimation_class_;
+
+private:
+ // noncopyable
+ PixbufAnimation(const PixbufAnimation&);
+ PixbufAnimation& operator=(const PixbufAnimation&);
+
+protected:
+ explicit PixbufAnimation(const Glib::ConstructParams& construct_params);
+ explicit PixbufAnimation(GdkPixbufAnimation* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~PixbufAnimation();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ GdkPixbufAnimation* gobj() { return reinterpret_cast<GdkPixbufAnimation*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const GdkPixbufAnimation* gobj() const { return reinterpret_cast<GdkPixbufAnimation*>(gobject_); }
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ GdkPixbufAnimation* gobj_copy();
+
+private:
+
+
+protected:
+
+public:
+
+ static Glib::RefPtr<PixbufAnimation> create_from_file(const Glib::ustring& filename);
+
+
+ /** Queries the width of the bounding box of a pixbuf animation.
+ * @return Width of the bounding box of the animation.
+ */
+ int get_width() const;
+
+ /** Queries the height of the bounding box of a pixbuf animation.
+ * @return Height of the bounding box of the animation.
+ */
+ int get_height() const;
+
+ /** If you load a file with new_from_file() and it turns
+ * out to be a plain, unanimated image, then this function will return
+ * <tt>true</tt>. Use get_static_image() to retrieve
+ * the image.
+ * @return <tt>true</tt> if the "animation" was really just an image.
+ */
+ bool is_static_image() const;
+
+ /** If an animation is really just a plain image (has only one frame),
+ * this function returns that image. If the animation is an animation,
+ * this function returns a reasonable thing to display as a static
+ * unanimated image, which might be the first frame, or something more
+ * sophisticated. If an animation hasn't loaded any frames yet, this
+ * function will return <tt>0</tt>.
+ * @return Unanimated image representing the animation.
+ */
+ Glib::RefPtr<Pixbuf> get_static_image();
+
+ /** Get an iterator for displaying an animation. The iterator provides
+ * the frames that should be displayed at a given time.
+ * It should be freed after use with Glib::object_unref().
+ *
+ * @a start_time would normally come from Glib::get_current_time(), and
+ * marks the beginning of animation playback. After creating an
+ * iterator, you should immediately display the pixbuf returned by
+ * Gdk::PixbufAnimationIter::get_pixbuf(). Then, you should install a
+ * timeout (with Glib::timeout_add()) or by some other mechanism ensure
+ * that you'll update the image after
+ * Gdk::PixbufAnimationIter::get_delay_time() milliseconds. Each time
+ * the image is updated, you should reinstall the timeout with the new,
+ * possibly-changed delay time.
+ *
+ * As a shortcut, if @a start_time is <tt>0</tt>, the result of
+ * Glib::get_current_time() will be used automatically.
+ *
+ * To update the image (i.e. possibly change the result of
+ * Gdk::PixbufAnimationIter::get_pixbuf() to a new frame of the animation),
+ * call Gdk::PixbufAnimationIter::advance().
+ *
+ * If you're using Gdk::PixbufLoader, in addition to updating the image
+ * after the delay time, you should also update it whenever you
+ * receive the area_updated signal and
+ * Gdk::PixbufAnimationIter::on_currently_loading_frame() returns
+ * <tt>true</tt>. In this case, the frame currently being fed into the loader
+ * has received new data, so needs to be refreshed. The delay time for
+ * a frame may also be modified after an area_updated signal, for
+ * example if the delay time for a frame is encoded in the data after
+ * the frame itself. So your timeout should be reinstalled after any
+ * area_updated signal.
+ *
+ * A delay time of -1 is possible, indicating "infinite."
+ * @param start_time Time when the animation starts playing.
+ * @return An iterator to move over the animation.
+ */
+ Glib::RefPtr<PixbufAnimationIter> get_iter(const GTimeVal* start_time);
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+};
+
+} /* namespace Gdk */
+
+
+namespace Glib
+{
+ /** @relates Gdk::PixbufAnimation
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Gdk::PixbufAnimation> wrap(GdkPixbufAnimation* object, bool take_copy = false);
+}
+
+
+#endif /* _GDKMM_PIXBUFANIMATION_H */
+
diff --git a/libs/gtkmm2/gdk/gdkmm/pixbufanimationiter.cc b/libs/gtkmm2/gdk/gdkmm/pixbufanimationiter.cc
new file mode 100644
index 0000000000..60046e4eff
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/pixbufanimationiter.cc
@@ -0,0 +1,123 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gdkmm/pixbufanimationiter.h>
+#include <gdkmm/private/pixbufanimationiter_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Gdk::PixbufAnimationIter> wrap(GdkPixbufAnimationIter* object, bool take_copy)
+{
+ return Glib::RefPtr<Gdk::PixbufAnimationIter>( dynamic_cast<Gdk::PixbufAnimationIter*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} /* namespace Glib */
+
+
+namespace Gdk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& PixbufAnimationIter_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &PixbufAnimationIter_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gdk_pixbuf_animation_iter_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void PixbufAnimationIter_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* PixbufAnimationIter_Class::wrap_new(GObject* object)
+{
+ return new PixbufAnimationIter((GdkPixbufAnimationIter*)object);
+}
+
+
+/* The implementation: */
+
+GdkPixbufAnimationIter* PixbufAnimationIter::gobj_copy()
+{
+ reference();
+ return gobj();
+}
+
+PixbufAnimationIter::PixbufAnimationIter(const Glib::ConstructParams& construct_params)
+:
+ Glib::Object(construct_params)
+{}
+
+PixbufAnimationIter::PixbufAnimationIter(GdkPixbufAnimationIter* castitem)
+:
+ Glib::Object((GObject*)(castitem))
+{}
+
+PixbufAnimationIter::~PixbufAnimationIter()
+{}
+
+
+PixbufAnimationIter::CppClassType PixbufAnimationIter::pixbufanimationiter_class_; // initialize static member
+
+GType PixbufAnimationIter::get_type()
+{
+ return pixbufanimationiter_class_.init().get_type();
+}
+
+GType PixbufAnimationIter::get_base_type()
+{
+ return gdk_pixbuf_animation_iter_get_type();
+}
+
+
+} // namespace Gdk
+
+
diff --git a/libs/gtkmm2/gdk/gdkmm/pixbufanimationiter.h b/libs/gtkmm2/gdk/gdkmm/pixbufanimationiter.h
new file mode 100644
index 0000000000..ceba0da1e9
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/pixbufanimationiter.h
@@ -0,0 +1,120 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GDKMM_PIXBUFANIMATIONITER_H
+#define _GDKMM_PIXBUFANIMATIONITER_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* pixbufanimationiter.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/object.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GdkPixbufAnimationIter GdkPixbufAnimationIter;
+typedef struct _GdkPixbufAnimationIterClass GdkPixbufAnimationIterClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gdk
+{ class PixbufAnimationIter_Class; } // namespace Gdk
+namespace Gdk
+{
+
+
+class PixbufAnimationIter : public Glib::Object
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef PixbufAnimationIter CppObjectType;
+ typedef PixbufAnimationIter_Class CppClassType;
+ typedef GdkPixbufAnimationIter BaseObjectType;
+ typedef GdkPixbufAnimationIterClass BaseClassType;
+
+private: friend class PixbufAnimationIter_Class;
+ static CppClassType pixbufanimationiter_class_;
+
+private:
+ // noncopyable
+ PixbufAnimationIter(const PixbufAnimationIter&);
+ PixbufAnimationIter& operator=(const PixbufAnimationIter&);
+
+protected:
+ explicit PixbufAnimationIter(const Glib::ConstructParams& construct_params);
+ explicit PixbufAnimationIter(GdkPixbufAnimationIter* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~PixbufAnimationIter();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ GdkPixbufAnimationIter* gobj() { return reinterpret_cast<GdkPixbufAnimationIter*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const GdkPixbufAnimationIter* gobj() const { return reinterpret_cast<GdkPixbufAnimationIter*>(gobject_); }
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ GdkPixbufAnimationIter* gobj_copy();
+
+private:
+
+protected:
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+};
+
+} /* namespace Gdk */
+
+
+namespace Glib
+{
+ /** @relates Gdk::PixbufAnimationIter
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Gdk::PixbufAnimationIter> wrap(GdkPixbufAnimationIter* object, bool take_copy = false);
+}
+
+
+#endif /* _GDKMM_PIXBUFANIMATIONITER_H */
+
diff --git a/libs/gtkmm2/gdk/gdkmm/pixbufformat.cc b/libs/gtkmm2/gdk/gdkmm/pixbufformat.cc
new file mode 100644
index 0000000000..63dc4c43a4
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/pixbufformat.cc
@@ -0,0 +1,118 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gdkmm/pixbufformat.h>
+#include <gdkmm/private/pixbufformat_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/utility.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
+
+namespace Gdk
+{
+
+PixbufFormat::PixbufFormat()
+: gobject_ (0)
+{}
+
+PixbufFormat::PixbufFormat(const GdkPixbufFormat* gobject)
+: gobject_ (gobject)
+{}
+
+PixbufFormat::~PixbufFormat()
+{
+ //We don't free anything because we did not take ownership of the underlying C instance
+ //(because we can't.)
+}
+
+PixbufFormat::PixbufFormat(const PixbufFormat& src)
+: gobject_(src.gobject_)
+{
+}
+
+PixbufFormat& PixbufFormat::operator=(const PixbufFormat& src)
+{
+ gobject_ = src.gobject_;
+ return *this;
+}
+
+
+} // namespace Gdk
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Gdk
+{
+
+
+Glib::ustring PixbufFormat::get_name() const
+{
+ return Glib::convert_return_gchar_ptr_to_ustring(gdk_pixbuf_format_get_name(const_cast<GdkPixbufFormat*>(gobj())));
+}
+
+Glib::ustring PixbufFormat::get_description() const
+{
+ return Glib::convert_return_gchar_ptr_to_ustring(gdk_pixbuf_format_get_description(const_cast<GdkPixbufFormat*>(gobj())));
+}
+
+Glib::StringArrayHandle PixbufFormat::get_mime_types() const
+{
+ return Glib::StringArrayHandle(gdk_pixbuf_format_get_mime_types(const_cast<GdkPixbufFormat*>(gobj())));
+}
+
+Glib::StringArrayHandle PixbufFormat::get_extensions() const
+{
+ return Glib::StringArrayHandle(gdk_pixbuf_format_get_extensions(const_cast<GdkPixbufFormat*>(gobj())));
+}
+
+bool PixbufFormat::is_writable() const
+{
+ return gdk_pixbuf_format_is_writable(const_cast<GdkPixbufFormat*>(gobj()));
+}
+
+bool PixbufFormat::is_scalable() const
+{
+ return gdk_pixbuf_format_is_scalable(const_cast<GdkPixbufFormat*>(gobj()));
+}
+
+bool PixbufFormat::is_disabled() const
+{
+ return gdk_pixbuf_format_is_disabled(const_cast<GdkPixbufFormat*>(gobj()));
+}
+
+void PixbufFormat::set_disabled(bool disabled)
+{
+ gdk_pixbuf_format_set_disabled(gobj(), static_cast<int>(disabled));
+}
+
+Glib::ustring PixbufFormat::get_license() const
+{
+ return Glib::convert_return_gchar_ptr_to_ustring(gdk_pixbuf_format_get_license(const_cast<GdkPixbufFormat*>(gobj())));
+}
+
+
+} // namespace Gdk
+
+
diff --git a/libs/gtkmm2/gdk/gdkmm/pixbufformat.h b/libs/gtkmm2/gdk/gdkmm/pixbufformat.h
new file mode 100644
index 0000000000..b9adddf08d
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/pixbufformat.h
@@ -0,0 +1,150 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GDKMM_PIXBUFFORMAT_H
+#define _GDKMM_PIXBUFFORMAT_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#include <gdkmmconfig.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C" { typedef struct _GdkPixbufFormat GdkPixbufFormat; }
+#endif
+
+namespace Gdk
+{
+
+class PixbufFormat
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef PixbufFormat CppObjectType;
+ typedef GdkPixbufFormat BaseObjectType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+private:
+
+
+public:
+ PixbufFormat();
+ explicit PixbufFormat(const GdkPixbufFormat* gobject);
+ virtual ~PixbufFormat();
+
+ PixbufFormat(const PixbufFormat& src);
+ PixbufFormat& operator=(const PixbufFormat& src);
+
+
+ /** Returns the name of the format.
+ * @return The name of the format.
+ *
+ * Since: 2.2.
+ */
+ Glib::ustring get_name() const;
+
+ /** Returns a description of the format.
+ * @return A description of the format.
+ *
+ * Since: 2.2.
+ */
+ Glib::ustring get_description() const;
+
+ /** Returns the mime types supported by the format.
+ * @return A <tt>0</tt>-terminated array of mime types which must be freed with
+ * Glib::strfreev() when it is no longer needed.
+ *
+ * Since: 2.2.
+ */
+ Glib::StringArrayHandle get_mime_types() const;
+
+ /** Returns the filename extensions typically used for files in the
+ * given format.
+ * @return A <tt>0</tt>-terminated array of filename extensions which must be
+ * freed with Glib::strfreev() when it is no longer needed.
+ *
+ * Since: 2.2.
+ */
+ Glib::StringArrayHandle get_extensions() const;
+
+ /** Returns whether pixbufs can be saved in the given format.
+ * @return Whether pixbufs can be saved in the given format.
+ *
+ * Since: 2.2.
+ */
+ bool is_writable() const;
+
+
+ /** Returns whether this image format is scalable. If a file is in a
+ * scalable format, it is preferable to load it at the desired size,
+ * rather than loading it at the default size and scaling the
+ * resulting pixbuf to the desired size.
+ * @return Whether this image format is scalable.
+ *
+ * Since: 2.6.
+ */
+ bool is_scalable() const;
+
+ /** Returns whether this image format is disabled. See
+ * gdk_pixbuf_format_set_disabled().
+ * @return Whether this image format is disabled.
+ *
+ * Since: 2.6.
+ */
+ bool is_disabled() const;
+
+ /** Disables or enables an image format. If a format is disabled,
+ * gdk-pixbuf won't use the image loader for this format to load
+ * images. Applications can use this to avoid using image loaders
+ * with an inappropriate license, see gdk_pixbuf_format_get_license().
+ *
+ * Since: 2.6
+ * @param disabled <tt>true</tt> to disable the format @a format .
+ */
+ void set_disabled(bool disabled = true);
+
+ /** Returns information about the license of the image loader
+ * for the format. The returned string should be a shorthand for
+ * a wellknown license, e.g. "LGPL", "GPL", "QPL", "GPL/QPL",
+ * or "other" to indicate some other license.
+ * @return A string describing the license of @a format .
+ *
+ * Since: 2.6.
+ */
+ Glib::ustring get_license() const;
+
+ /// Provides access to the underlying C GObject.
+ GdkPixbufFormat* gobj() { return const_cast<GdkPixbufFormat*>(gobject_); }
+ /// Provides access to the underlying C GObject.
+ const GdkPixbufFormat* gobj() const { return gobject_; }
+
+protected:
+ const GdkPixbufFormat* gobject_;
+
+
+};
+
+} // namespace Gdk
+
+
+#endif /* _GDKMM_PIXBUFFORMAT_H */
+
diff --git a/libs/gtkmm2/gdk/gdkmm/pixbufloader.cc b/libs/gtkmm2/gdk/gdkmm/pixbufloader.cc
new file mode 100644
index 0000000000..41af07e520
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/pixbufloader.cc
@@ -0,0 +1,465 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gdkmm/pixbufloader.h>
+#include <gdkmm/private/pixbufloader_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gdk/gdkcolor.h>
+#include <gdk-pixbuf/gdk-pixbuf.h>
+
+
+namespace
+{
+
+/* We use this helper function in the constructor to be able to throw
+ * before the base class' (Glib::Object) constructor is called.
+ */
+GdkPixbufLoader* pixbuf_loader_create_with_type(const Glib::ustring& image_type, bool mime_type)
+{
+ GError* error = 0;
+ GdkPixbufLoader *const loader = 0;
+
+ if(mime_type)
+ gdk_pixbuf_loader_new_with_mime_type(image_type.c_str(), &error);
+ else
+ gdk_pixbuf_loader_new_with_type(image_type.c_str(), &error);
+
+ if(error)
+ Glib::Error::throw_exception(error);
+
+ return loader;
+}
+
+} // anonymous namespace
+
+
+namespace Gdk
+{
+
+PixbufLoader::PixbufLoader(const Glib::ustring& image_type, bool mime_type)
+:
+ Glib::ObjectBase(0),
+ Glib::Object((GObject*) pixbuf_loader_create_with_type(image_type, mime_type))
+{}
+
+void PixbufLoader::write(const guint8* buf, gsize count)
+{
+ GError* error = 0;
+ gdk_pixbuf_loader_write(gobj(), buf, count, &error);
+
+ if(error)
+ Glib::Error::throw_exception(error);
+}
+
+void PixbufLoader::close()
+{
+ GError* error = 0;
+ gdk_pixbuf_loader_close(gobj(), &error);
+
+ if(error)
+ Glib::Error::throw_exception(error);
+}
+
+} // namespace Gdk
+
+
+namespace
+{
+
+const Glib::SignalProxyInfo PixbufLoader_signal_area_prepared_info =
+{
+ "area_prepared",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+
+void PixbufLoader_signal_area_updated_callback(GdkPixbufLoader* self, gint p0,gint p1,gint p2,gint p3,void* data)
+{
+ using namespace Gdk;
+ typedef sigc::slot< void,int,int,int,int > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(p0
+, p1
+, p2
+, p3
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo PixbufLoader_signal_area_updated_info =
+{
+ "area_updated",
+ (GCallback) &PixbufLoader_signal_area_updated_callback,
+ (GCallback) &PixbufLoader_signal_area_updated_callback
+};
+
+
+const Glib::SignalProxyInfo PixbufLoader_signal_closed_info =
+{
+ "closed",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+
+void PixbufLoader_signal_size_prepared_callback(GdkPixbufLoader* self, gint p0,gint p1,void* data)
+{
+ using namespace Gdk;
+ typedef sigc::slot< void,int,int > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(p0
+, p1
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo PixbufLoader_signal_size_prepared_info =
+{
+ "size_prepared",
+ (GCallback) &PixbufLoader_signal_size_prepared_callback,
+ (GCallback) &PixbufLoader_signal_size_prepared_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Gdk::PixbufLoader> wrap(GdkPixbufLoader* object, bool take_copy)
+{
+ return Glib::RefPtr<Gdk::PixbufLoader>( dynamic_cast<Gdk::PixbufLoader*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} /* namespace Glib */
+
+
+namespace Gdk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& PixbufLoader_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &PixbufLoader_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gdk_pixbuf_loader_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void PixbufLoader_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->area_prepared = &area_prepared_callback;
+ klass->area_updated = &area_updated_callback;
+ klass->closed = &closed_callback;
+}
+
+
+void PixbufLoader_Class::area_prepared_callback(GdkPixbufLoader* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_area_prepared();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->area_prepared)
+ (*base->area_prepared)(self);
+ }
+}
+
+void PixbufLoader_Class::area_updated_callback(GdkPixbufLoader* self, gint p0, gint p1, gint p2, gint p3)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_area_updated(p0
+, p1
+, p2
+, p3
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->area_updated)
+ (*base->area_updated)(self, p0, p1, p2, p3);
+ }
+}
+
+void PixbufLoader_Class::closed_callback(GdkPixbufLoader* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_closed();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->closed)
+ (*base->closed)(self);
+ }
+}
+
+
+Glib::ObjectBase* PixbufLoader_Class::wrap_new(GObject* object)
+{
+ return new PixbufLoader((GdkPixbufLoader*)object);
+}
+
+
+/* The implementation: */
+
+GdkPixbufLoader* PixbufLoader::gobj_copy()
+{
+ reference();
+ return gobj();
+}
+
+PixbufLoader::PixbufLoader(const Glib::ConstructParams& construct_params)
+:
+ Glib::Object(construct_params)
+{}
+
+PixbufLoader::PixbufLoader(GdkPixbufLoader* castitem)
+:
+ Glib::Object((GObject*)(castitem))
+{}
+
+PixbufLoader::~PixbufLoader()
+{}
+
+
+PixbufLoader::CppClassType PixbufLoader::pixbufloader_class_; // initialize static member
+
+GType PixbufLoader::get_type()
+{
+ return pixbufloader_class_.init().get_type();
+}
+
+GType PixbufLoader::get_base_type()
+{
+ return gdk_pixbuf_loader_get_type();
+}
+
+
+PixbufLoader::PixbufLoader()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Glib::Object(Glib::ConstructParams(pixbufloader_class_.init()))
+{
+ }
+
+Glib::RefPtr<PixbufLoader> PixbufLoader::create()
+{
+ return Glib::RefPtr<PixbufLoader>( new PixbufLoader() );
+}
+Glib::RefPtr<PixbufLoader> PixbufLoader::create(const Glib::ustring& image_type, bool mime_type)
+{
+ return Glib::RefPtr<PixbufLoader>( new PixbufLoader(image_type, mime_type) );
+}
+void PixbufLoader::set_size(int width, int height)
+{
+ gdk_pixbuf_loader_set_size(gobj(), width, height);
+}
+
+Glib::RefPtr<Gdk::Pixbuf> PixbufLoader::get_pixbuf()
+{
+
+ Glib::RefPtr<Gdk::Pixbuf> retvalue = Glib::wrap(gdk_pixbuf_loader_get_pixbuf(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<Gdk::PixbufAnimation> PixbufLoader::get_animation()
+{
+
+ Glib::RefPtr<Gdk::PixbufAnimation> retvalue = Glib::wrap(gdk_pixbuf_loader_get_animation(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+PixbufFormat PixbufLoader::get_format() const
+{
+ return PixbufFormat(gdk_pixbuf_loader_get_format(const_cast<GdkPixbufLoader*>(gobj())));
+}
+
+
+Glib::SignalProxy0< void > PixbufLoader::signal_area_prepared()
+{
+ return Glib::SignalProxy0< void >(this, &PixbufLoader_signal_area_prepared_info);
+}
+
+Glib::SignalProxy4< void,int,int,int,int > PixbufLoader::signal_area_updated()
+{
+ return Glib::SignalProxy4< void,int,int,int,int >(this, &PixbufLoader_signal_area_updated_info);
+}
+
+Glib::SignalProxy0< void > PixbufLoader::signal_closed()
+{
+ return Glib::SignalProxy0< void >(this, &PixbufLoader_signal_closed_info);
+}
+
+Glib::SignalProxy2< void,int,int > PixbufLoader::signal_size_prepared()
+{
+ return Glib::SignalProxy2< void,int,int >(this, &PixbufLoader_signal_size_prepared_info);
+}
+
+
+void Gdk::PixbufLoader::on_area_prepared()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->area_prepared)
+ (*base->area_prepared)(gobj());
+}
+
+void Gdk::PixbufLoader::on_area_updated(int x, int y, int width, int height)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->area_updated)
+ (*base->area_updated)(gobj(),x,y,width,height);
+}
+
+void Gdk::PixbufLoader::on_closed()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->closed)
+ (*base->closed)(gobj());
+}
+
+
+} // namespace Gdk
+
+
diff --git a/libs/gtkmm2/gdk/gdkmm/pixbufloader.h b/libs/gtkmm2/gdk/gdkmm/pixbufloader.h
new file mode 100644
index 0000000000..c89288740f
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/pixbufloader.h
@@ -0,0 +1,269 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GDKMM_PIXBUFLOADER_H
+#define _GDKMM_PIXBUFLOADER_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/object.h>
+#include <gdkmm/pixbuf.h>
+#include <gdkmm/pixbufanimation.h>
+#include <gdkmm/pixbufformat.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GdkPixbufLoader GdkPixbufLoader;
+typedef struct _GdkPixbufLoaderClass GdkPixbufLoaderClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gdk
+{ class PixbufLoader_Class; } // namespace Gdk
+namespace Gdk
+{
+
+
+class PixbufLoader : public Glib::Object
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef PixbufLoader CppObjectType;
+ typedef PixbufLoader_Class CppClassType;
+ typedef GdkPixbufLoader BaseObjectType;
+ typedef GdkPixbufLoaderClass BaseClassType;
+
+private: friend class PixbufLoader_Class;
+ static CppClassType pixbufloader_class_;
+
+private:
+ // noncopyable
+ PixbufLoader(const PixbufLoader&);
+ PixbufLoader& operator=(const PixbufLoader&);
+
+protected:
+ explicit PixbufLoader(const Glib::ConstructParams& construct_params);
+ explicit PixbufLoader(GdkPixbufLoader* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~PixbufLoader();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ GdkPixbufLoader* gobj() { return reinterpret_cast<GdkPixbufLoader*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const GdkPixbufLoader* gobj() const { return reinterpret_cast<GdkPixbufLoader*>(gobject_); }
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ GdkPixbufLoader* gobj_copy();
+
+private:
+
+protected:
+
+ /** Constructs a pixbuf loader object.
+ */
+ PixbufLoader();
+
+ /** Constructs a pixbuf loader object for a specific image type.
+ * Constructs a new pixbuf loader object that always attempts to parse image
+ * data as if it were an image of type @a image_type, instead of identifying
+ * the type automatically. Useful if you want an error if the image isn't the
+ * expected type, for loading image formats that can't be reliably identified
+ * by looking at the data, or if the user manually forces a specific type.
+ *
+ * The image_type can be one of the types returned by Gdk::Pixbuf::get_formats(), or a MIME type.
+ *
+ * Common MIME Types are listed here
+ * http://www.iana.org/assignments/media-types/
+ * and here:
+ * http://www.freedesktop.org/Software/shared-mime-info
+ *
+ * @param image_type Name of the image format to be loaded with the image.
+ * @param mime_type If this is true then the image_type is a MIME type.
+ * @throw Gdk::PixbufError
+ */
+ explicit PixbufLoader(const Glib::ustring& image_type, bool mime_type = false);
+ //TODO: What non-mime-types names are possible?
+
+public:
+
+ /** Creates a new pixbuf loader object.
+ * @return A newly-created pixbuf loader.
+ */
+
+ static Glib::RefPtr<PixbufLoader> create();
+
+
+ /** Constructs a pixbuf loader object for a specific image type.
+ * Constructs a new pixbuf loader object that always attempts to parse image
+ * data as if it were an image of type @a image_type, instead of identifying
+ * the type automatically. Useful if you want an error if the image isn't the
+ * expected type, for loading image formats that can't be reliably identified
+ * by looking at the data, or if the user manually forces a specific type.
+ *
+ * The image_type can be one of the types returned by Gdk::Pixbuf::get_formats(), or a MIME type.
+ *
+ * Common MIME Types are listed here
+ * http://www.iana.org/assignments/media-types/
+ * and here:
+ * http://www.freedesktop.org/Software/shared-mime-info
+ *
+ * @param image_type Name of the image format to be loaded with the image.
+ * @param mime_type If this is true then the image_type is a MIME type.
+ * @throw Gdk::PixbufError
+ */
+
+ static Glib::RefPtr<PixbufLoader> create(const Glib::ustring& image_type, bool mime_type = false);
+
+
+ /** Causes the image to be scaled while it is loaded. The desired
+ * image size can be determined relative to the original size of
+ * the image by calling set_size() from a
+ * signal handler for the ::size_prepared signal.
+ *
+ * Attempts to set the desired image size are ignored after the
+ * emission of the ::size_prepared signal.
+ *
+ * Since: 2.2
+ * @param width The desired width of the image being loaded.
+ * @param height The desired height of the image being loaded.
+ */
+ void set_size(int width, int height);
+
+ /** Causes the pixbuf loader to parse the next @a count bytes of an image.
+ * It will return if the data was loaded successfully, and throw an exception
+ * if an error occurred. In the latter case, the loader will be closed, and
+ * will not accept further writes.
+ * @param buf Pointer to image data.
+ * @param count Length of the @a buf buffer in bytes.
+ * @throw Gdk::PixbufError
+ * @throw Glib::FileError
+ */
+ void write(const guint8* buf, gsize count);
+
+
+ /** Informs a pixbuf loader that no further writes with PixbufLoader::write()
+ * will occur, so that it can free its internal loading structures. Also,
+ * tries to parse any data that hasn't yet been parsed; if the remaining data
+ * is partial or corrupt, an exception will be thrown. If you're just
+ * cancelling a load rather than expecting it to be finished, writing an
+ * empty <tt>catch()</tt> block to ignore errors is reasonable.
+ * @throw Gdk::PixbufError
+ * @throw Glib::FileError
+ */
+ void close();
+
+
+ /** Queries the Gdk::Pixbuf that a pixbuf loader is currently creating.
+ * In general it only makes sense to call this function after the
+ * "area_prepared" signal has been emitted by the loader; this means
+ * that enough data has been read to know the size of the image that
+ * will be allocated. If the loader has not received enough data via
+ * write(), then this function returns <tt>0</tt>. The
+ * returned pixbuf will be the same in all future calls to the loader,
+ * so simply calling Glib::object_ref() should be sufficient to continue
+ * using it. Additionally, if the loader is an animation, it will
+ * return the "static image" of the animation
+ * (see Gdk::PixbufAnimation::get_static_image()).
+ * @return The Gdk::Pixbuf that the loader is creating, or <tt>0</tt> if not
+ * enough data has been read to determine how to create the image buffer.
+ */
+ Glib::RefPtr<Gdk::Pixbuf> get_pixbuf();
+
+ /** Queries the Gdk::PixbufAnimation that a pixbuf loader is currently creating.
+ * In general it only makes sense to call this function after the "area_prepared"
+ * signal has been emitted by the loader. If the loader doesn't have enough
+ * bytes yet (hasn't emitted the "area_prepared" signal) this function will
+ * return <tt>0</tt>.
+ * @return The Gdk::PixbufAnimation that the loader is loading, or <tt>0</tt> if
+ * not enough data has been read to determine the information.
+ */
+ Glib::RefPtr<Gdk::PixbufAnimation> get_animation();
+
+
+ /** Obtains the available information about the format of the
+ * currently loading image file.
+ * @return A Gdk::PixbufFormat or <tt>0</tt>. The return value is owned
+ * by GdkPixbuf and should not be freed.
+ *
+ * Since: 2.2.
+ */
+ PixbufFormat get_format() const;
+
+
+ Glib::SignalProxy0< void > signal_area_prepared();
+
+
+ Glib::SignalProxy4< void,int,int,int,int > signal_area_updated();
+
+
+ Glib::SignalProxy0< void > signal_closed();
+
+
+ //We use no_default_handler for this, because we can not add a new vfunc to 2.5 without breaking ABI.
+ //TODO: Remove no_default_handler when we do an ABI-break-with-parallel-install.
+
+
+ Glib::SignalProxy2< void,int,int > signal_size_prepared();
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_area_prepared();
+ virtual void on_area_updated(int x, int y, int width, int height);
+ virtual void on_closed();
+
+
+};
+
+} // namespace Gdk
+
+
+namespace Glib
+{
+ /** @relates Gdk::PixbufLoader
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Gdk::PixbufLoader> wrap(GdkPixbufLoader* object, bool take_copy = false);
+}
+
+
+#endif /* _GDKMM_PIXBUFLOADER_H */
+
diff --git a/libs/gtkmm2/gdk/gdkmm/pixmap.cc b/libs/gtkmm2/gdk/gdkmm/pixmap.cc
new file mode 100644
index 0000000000..a64cfb6aed
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/pixmap.cc
@@ -0,0 +1,320 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gdkmm/pixmap.h>
+#include <gdkmm/private/pixmap_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gdkmm/window.h>
+#include <gdkmm/display.h>
+#include <gdk/gdkpixmap.h>
+
+
+namespace Gdk
+{
+
+Glib::ObjectBase* Pixmap_Class::wrap_new(GObject* object)
+{
+ GdkPixmapObject *const pixmap_object = GDK_PIXMAP_OBJECT(object);
+
+ g_return_val_if_fail(pixmap_object != 0, 0);
+
+ // GdkPixmap and GdkBitmap are actually both of type GdkPixmapObject.
+ // A Bitmap is is a Pixmap with a depth of 1. Since these are distinct
+ // types in gtkmm, we dynamically create either a Pixmap or a Bitmap,
+ // depending on the depth field.
+
+ if(pixmap_object->depth != 1)
+ return new Gdk::Pixmap((GdkPixmap*) pixmap_object);
+ else
+ return new Gdk::Bitmap((GdkBitmap*) pixmap_object);
+}
+
+
+Pixmap::Pixmap(const Glib::RefPtr<Drawable>& drawable, int width, int height, int depth)
+:
+ Drawable((GdkDrawable*) gdk_pixmap_new(Glib::unwrap(drawable), width, height, depth))
+{
+ //gdk_pixmap_new() is implemented differently for x11, win32, etc,
+ //so we can't really derived a new GType for GdkPixmap.
+}
+
+Pixmap::Pixmap(const Glib::RefPtr<Drawable>& drawable, const char* data, int width, int height, int depth,
+ const Color& fg, const Color& bg)
+:
+ Drawable((GdkDrawable*) gdk_pixmap_create_from_data(
+ Glib::unwrap(drawable), data, width, height, depth,
+ const_cast<GdkColor*>(fg.gobj()), const_cast<GdkColor*>(bg.gobj())))
+{
+ //gdk_pixmap_new() is implemented differently for x11, win32, etc,
+ //so we can't really derived a new GType for GdkPixmap.
+}
+
+Pixmap::Pixmap(const Glib::RefPtr<Display>& display, NativeWindow anid)
+:
+ Drawable( (GdkDrawable*) gdk_pixmap_foreign_new_for_display(display->gobj(), anid) )
+{
+ //gdk_pixmap_new() is implemented differently for x11, win32, etc,
+ //so we can't really derived a new GType for GdkPixmap.
+}
+
+Glib::RefPtr<Pixmap> Pixmap::create_from_data(const Glib::RefPtr<const Drawable>& drawable,
+ const char* data, int width, int height, int depth,
+ const Color& fg, const Color& bg)
+{
+ GdkPixmap *const pixmap = gdk_pixmap_create_from_data(
+ const_cast<GdkDrawable*>(Glib::unwrap<Drawable>(drawable)),
+ const_cast<char*>(data), width, height, depth,
+ const_cast<GdkColor*>(fg.gobj()),
+ const_cast<GdkColor*>(bg.gobj()));
+
+ return Glib::wrap((GdkPixmapObject*) pixmap);
+}
+
+
+Glib::RefPtr<Pixmap> Pixmap::create_from_xpm(const Glib::RefPtr<const Drawable>& drawable,
+ const Color& transparent_color,
+ const std::string& filename)
+{
+ GdkPixmap *const pixmap = gdk_pixmap_create_from_xpm(
+ const_cast<GdkDrawable*>(Glib::unwrap<Drawable>(drawable)), 0,
+ const_cast<GdkColor*>(transparent_color.gobj()),
+ const_cast<char*>(filename.c_str()));
+
+ return Glib::wrap((GdkPixmapObject*) pixmap);
+}
+
+Glib::RefPtr<Pixmap> Pixmap::create_from_xpm(const Glib::RefPtr<const Drawable>& drawable,
+ Glib::RefPtr<Bitmap>& mask,
+ const Color& transparent_color,
+ const std::string& filename)
+{
+ GdkBitmap* bitmap = 0;
+
+ GdkPixmap *const pixmap = gdk_pixmap_create_from_xpm(
+ const_cast<GdkDrawable*>(Glib::unwrap<Drawable>(drawable)), &bitmap,
+ const_cast<GdkColor*>(transparent_color.gobj()),
+ const_cast<char*>(filename.c_str()));
+
+ mask = Glib::RefPtr<Bitmap>::cast_dynamic(Glib::wrap((GdkPixmapObject*) bitmap));
+ return Glib::wrap((GdkPixmapObject*) pixmap);
+}
+
+Glib::RefPtr<Pixmap> Pixmap::create_from_xpm(const Glib::RefPtr<const Drawable>& drawable,
+ const Glib::RefPtr<Colormap>& colormap,
+ Glib::RefPtr<Bitmap>& mask,
+ const Color& transparent_color,
+ const std::string& filename)
+{
+ GdkBitmap* bitmap = 0;
+
+ GdkPixmap *const pixmap = gdk_pixmap_colormap_create_from_xpm(
+ const_cast<GdkDrawable*>(Glib::unwrap<Drawable>(drawable)),
+ Glib::unwrap(colormap), &bitmap,
+ const_cast<GdkColor*>(transparent_color.gobj()),
+ const_cast<char*>(filename.c_str()));
+
+ mask = Glib::RefPtr<Bitmap>::cast_dynamic(Glib::wrap((GdkPixmapObject*) bitmap));
+ return Glib::wrap((GdkPixmapObject*) pixmap);
+}
+
+
+Glib::RefPtr<Pixmap> Pixmap::create_from_xpm(const Glib::RefPtr<const Drawable>& drawable,
+ Glib::RefPtr<Bitmap>& mask,
+ const Color& transparent_color,
+ const char* const* data)
+{
+ GdkBitmap* bitmap = 0;
+
+ GdkPixmap *const pixmap = gdk_pixmap_create_from_xpm_d(
+ const_cast<GdkDrawable*>(Glib::unwrap<Drawable>(drawable)),
+ &bitmap,
+ const_cast<GdkColor*>(transparent_color.gobj()),
+ const_cast<char**>(data));
+
+ mask = Glib::RefPtr<Bitmap>::cast_dynamic(Glib::wrap((GdkPixmapObject*) bitmap));
+ return Glib::wrap((GdkPixmapObject*) pixmap);
+}
+
+Glib::RefPtr<Pixmap> Pixmap::create_from_xpm(const Glib::RefPtr<const Drawable>& drawable,
+ const Glib::RefPtr<Colormap>& colormap,
+ Glib::RefPtr<Bitmap>& mask,
+ const Color& transparent_color,
+ const char* const* data)
+{
+ GdkBitmap* bitmap = 0;
+
+ GdkPixmap *const pixmap = gdk_pixmap_colormap_create_from_xpm_d(
+ const_cast<GdkDrawable*>(Glib::unwrap<Drawable>(drawable)),
+ Glib::unwrap(colormap), &bitmap,
+ const_cast<GdkColor*>(transparent_color.gobj()),
+ const_cast<char**>(data));
+
+ mask = Glib::RefPtr<Bitmap>::cast_dynamic(Glib::wrap((GdkPixmapObject*) bitmap));
+ return Glib::wrap((GdkPixmapObject*) pixmap);
+}
+
+Glib::RefPtr<Pixmap> Pixmap::create_from_xpm(const Glib::RefPtr<Colormap>& colormap,
+ Glib::RefPtr<Bitmap>& mask,
+ const Color& transparent_color,
+ const char* const* data)
+{
+ GdkBitmap* bitmap = 0;
+
+ GdkPixmap *const pixmap = gdk_pixmap_colormap_create_from_xpm_d(
+ 0, // drawable
+ Glib::unwrap(colormap), &bitmap,
+ const_cast<GdkColor*>(transparent_color.gobj()),
+ const_cast<char**>(data));
+
+ mask = Glib::RefPtr<Bitmap>::cast_dynamic(Glib::wrap((GdkPixmapObject*) bitmap));
+ return Glib::wrap((GdkPixmapObject*) pixmap);
+}
+
+Glib::RefPtr<Pixmap> Pixmap::create_from_xpm(const Glib::RefPtr<Colormap>& colormap,
+ Glib::RefPtr<Bitmap>& mask,
+ const char* const* data)
+{
+ GdkBitmap* bitmap = 0;
+
+ GdkPixmap *const pixmap = gdk_pixmap_colormap_create_from_xpm_d(
+ 0, // drawable
+ Glib::unwrap(colormap), &bitmap,
+ 0, // transparent_color
+ const_cast<char**>(data));
+
+ mask = Glib::RefPtr<Bitmap>::cast_dynamic(Glib::wrap((GdkPixmapObject*) bitmap));
+ return Glib::wrap((GdkPixmapObject*) pixmap);
+}
+
+} // namespace Gdk
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Gdk::Pixmap> wrap(GdkPixmapObject* object, bool take_copy)
+{
+ return Glib::RefPtr<Gdk::Pixmap>( dynamic_cast<Gdk::Pixmap*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} /* namespace Glib */
+
+
+namespace Gdk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Pixmap_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Pixmap_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gdk_pixmap_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Pixmap_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+/* The implementation: */
+
+GdkPixmap* Pixmap::gobj_copy()
+{
+ reference();
+ return gobj();
+}
+
+Pixmap::Pixmap(const Glib::ConstructParams& construct_params)
+:
+ Gdk::Drawable(construct_params)
+{}
+
+Pixmap::Pixmap(GdkPixmap* castitem)
+:
+ Gdk::Drawable((GdkDrawable*)(castitem))
+{}
+
+Pixmap::~Pixmap()
+{}
+
+
+Pixmap::CppClassType Pixmap::pixmap_class_; // initialize static member
+
+GType Pixmap::get_type()
+{
+ return pixmap_class_.init().get_type();
+}
+
+GType Pixmap::get_base_type()
+{
+ return gdk_pixmap_get_type();
+}
+
+
+Pixmap::Pixmap()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gdk::Drawable(Glib::ConstructParams(pixmap_class_.init()))
+{
+ }
+
+Glib::RefPtr<Pixmap> Pixmap::create(const Glib::RefPtr<Drawable>& drawable, int width, int height, int depth)
+{
+ return Glib::RefPtr<Pixmap>( new Pixmap(drawable, width, height, depth) );
+}
+Glib::RefPtr<Pixmap> Pixmap::create(const Glib::RefPtr<Drawable>& drawable, const char* data, int width, int height, int depth, const Color& fg, const Color& bg)
+{
+ return Glib::RefPtr<Pixmap>( new Pixmap(drawable, data, width, height, depth, fg, bg) );
+}
+Glib::RefPtr<Pixmap> Pixmap::create(const Glib::RefPtr<Display>& display, NativeWindow anid)
+{
+ return Glib::RefPtr<Pixmap>( new Pixmap(display, anid) );
+}
+
+
+} // namespace Gdk
+
+
diff --git a/libs/gtkmm2/gdk/gdkmm/pixmap.h b/libs/gtkmm2/gdk/gdkmm/pixmap.h
new file mode 100644
index 0000000000..6a7a1d978d
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/pixmap.h
@@ -0,0 +1,202 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GDKMM_PIXMAP_H
+#define _GDKMM_PIXMAP_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gdkmm/drawable.h>
+#include <gdkmm/color.h>
+#include <gdkmm/colormap.h>
+#include <gdkmm/types.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C" {
+//Custom stuct prototypes, because they aren't what the code-generator expects:
+typedef struct _GdkDrawable GdkPixmap;
+typedef struct _GdkPixmapClass GdkPixmapClass;
+} // extern "C"
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gdk
+{ class Pixmap_Class; } // namespace Gdk
+namespace Gdk
+{
+
+class Window;
+
+/** Pixmaps are offscreen drawables. They can be drawn upon with the standard drawing primitives, then copied to another
+ * drawable (such as a Gdk::Window) with Gdk::Drawable::draw_drawable(). The depth of a pixmap is the number of bits per
+ * pixels.
+ * Bitmaps are simply pixmaps with a depth of 1. (That is, they are monochrome bitmaps - each pixel can be either on or off).
+ */
+
+class Pixmap : public Gdk::Drawable
+{
+ // GdkPixmap is a typedef to GdkDrawable, but it's actually a GdkPixmapObject.
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef Pixmap CppObjectType;
+ typedef Pixmap_Class CppClassType;
+ typedef GdkPixmap BaseObjectType;
+ typedef GdkPixmapObjectClass BaseClassType;
+
+private: friend class Pixmap_Class;
+ static CppClassType pixmap_class_;
+
+private:
+ // noncopyable
+ Pixmap(const Pixmap&);
+ Pixmap& operator=(const Pixmap&);
+
+protected:
+ explicit Pixmap(const Glib::ConstructParams& construct_params);
+ explicit Pixmap(GdkPixmap* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~Pixmap();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ GdkPixmap* gobj() { return reinterpret_cast<GdkPixmap*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const GdkPixmap* gobj() const { return reinterpret_cast<GdkPixmap*>(gobject_); }
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ GdkPixmap* gobj_copy();
+
+private:
+
+ // see wrap_new() implementation in pixmap.ccg
+
+
+protected:
+ Pixmap();
+
+ Pixmap(const Glib::RefPtr<Drawable>& drawable, int width, int height, int depth = -1);
+
+ /// Initialize a Pixmap from data.
+ Pixmap(const Glib::RefPtr<Drawable>& drawable,
+ const char* data, int width, int height, int depth,
+ const Color& fg, const Color& bg);
+
+ Pixmap(const Glib::RefPtr<Display>& display, NativeWindow anid);
+
+public:
+
+
+ static Glib::RefPtr<Pixmap> create(const Glib::RefPtr<Drawable>& drawable, int width, int height, int depth = -1);
+
+
+ static Glib::RefPtr<Pixmap> create(const Glib::RefPtr<Drawable>& drawable, const char* data, int width, int height, int depth, const Color& fg, const Color& bg);
+
+
+ static Glib::RefPtr<Pixmap> create(const Glib::RefPtr<Display>& display, NativeWindow anid);
+
+
+ static Glib::RefPtr<Pixmap> create_from_data(const Glib::RefPtr<const Drawable>& drawable,
+ const char* data, int width, int height, int depth,
+ const Color& fg, const Color& bg);
+
+ /// Create a Pixmap from a xpm file.
+ static Glib::RefPtr<Pixmap> create_from_xpm(const Glib::RefPtr<const Drawable>& drawable,
+ const Color& transparent_color,
+ const std::string& filename);
+
+ // Create a Pixmap from a xpm file.
+ static Glib::RefPtr<Pixmap> create_from_xpm(const Glib::RefPtr<const Drawable>& drawable,
+ Glib::RefPtr<Bitmap>& mask,
+ const Color& transparent_color,
+ const std::string& filename);
+
+ /// Create a Pixmap from a xpm file with colormap.
+ static Glib::RefPtr<Pixmap> create_from_xpm(const Glib::RefPtr<const Drawable>& drawable,
+ const Glib::RefPtr<Colormap>& colormap,
+ Glib::RefPtr<Bitmap>& mask,
+ const Color& transparent_color,
+ const std::string& filename);
+
+ static Glib::RefPtr<Pixmap> create_from_xpm(const Glib::RefPtr<const Drawable>& drawable,
+ Glib::RefPtr<Bitmap>& mask,
+ const Color& transparent_color,
+ const char* const* data);
+
+ static Glib::RefPtr<Pixmap> create_from_xpm(const Glib::RefPtr<const Drawable>& drawable,
+ const Glib::RefPtr<Colormap>& colormap,
+ Glib::RefPtr<Bitmap>& mask,
+ const Color& transparent_color,
+ const char* const* data);
+
+ static Glib::RefPtr<Pixmap> create_from_xpm(const Glib::RefPtr<Colormap>& colormap,
+ Glib::RefPtr<Bitmap>& mask,
+ const Color& transparent_color,
+ const char* const* data);
+
+ static Glib::RefPtr<Pixmap> create_from_xpm(const Glib::RefPtr<Colormap>& colormap,
+ Glib::RefPtr<Bitmap>& mask,
+ const char* const* data);
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+};
+
+} // namespace Gdk
+
+
+namespace Glib
+{
+ /** @relates Gdk::Pixmap
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Gdk::Pixmap> wrap(GdkPixmapObject* object, bool take_copy = false);
+}
+
+
+#endif /* _GDKMM_PIXMAP_H */
+
diff --git a/libs/gtkmm2/gdk/gdkmm/private/bitmap_p.h b/libs/gtkmm2/gdk/gdkmm/private/bitmap_p.h
new file mode 100644
index 0000000000..13a2e31932
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/private/bitmap_p.h
@@ -0,0 +1,7 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GDKMM_BITMAP_P_H
+#define _GDKMM_BITMAP_P_H
+#include <gdkmm/private/pixmap_p.h>
+#endif /* _GDKMM_BITMAP_P_H */
+
diff --git a/libs/gtkmm2/gdk/gdkmm/private/color_p.h b/libs/gtkmm2/gdk/gdkmm/private/color_p.h
new file mode 100644
index 0000000000..10e8370c05
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/private/color_p.h
@@ -0,0 +1,6 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GDKMM_COLOR_P_H
+#define _GDKMM_COLOR_P_H
+#endif /* _GDKMM_COLOR_P_H */
+
diff --git a/libs/gtkmm2/gdk/gdkmm/private/colormap_p.h b/libs/gtkmm2/gdk/gdkmm/private/colormap_p.h
new file mode 100644
index 0000000000..3ceb776d16
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/private/colormap_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GDKMM_COLORMAP_P_H
+#define _GDKMM_COLORMAP_P_H
+#include <glibmm/private/object_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gdk
+{
+
+class Colormap_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Colormap CppObjectType;
+ typedef GdkColormap BaseObjectType;
+ typedef GdkColormapClass BaseClassType;
+ typedef Glib::Object_Class CppClassParent;
+ typedef GObjectClass BaseClassParent;
+
+ friend class Colormap;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gdk
+
+#endif /* _GDKMM_COLORMAP_P_H */
+
diff --git a/libs/gtkmm2/gdk/gdkmm/private/cursor_p.h b/libs/gtkmm2/gdk/gdkmm/private/cursor_p.h
new file mode 100644
index 0000000000..5400e45e0a
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/private/cursor_p.h
@@ -0,0 +1,7 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GDKMM_CURSOR_P_H
+#define _GDKMM_CURSOR_P_H
+#include <glibmm/private/object_p.h>
+#endif /* _GDKMM_CURSOR_P_H */
+
diff --git a/libs/gtkmm2/gdk/gdkmm/private/device_p.h b/libs/gtkmm2/gdk/gdkmm/private/device_p.h
new file mode 100644
index 0000000000..f19b9c8ccd
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/private/device_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GDKMM_DEVICE_P_H
+#define _GDKMM_DEVICE_P_H
+#include <glibmm/private/object_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gdk
+{
+
+class Device_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Device CppObjectType;
+ typedef GdkDevice BaseObjectType;
+ typedef GdkDeviceClass BaseClassType;
+ typedef Glib::Object_Class CppClassParent;
+ typedef GObjectClass BaseClassParent;
+
+ friend class Device;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gdk
+
+#endif /* _GDKMM_DEVICE_P_H */
+
diff --git a/libs/gtkmm2/gdk/gdkmm/private/display_p.h b/libs/gtkmm2/gdk/gdkmm/private/display_p.h
new file mode 100644
index 0000000000..0b5ba089e0
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/private/display_p.h
@@ -0,0 +1,45 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GDKMM_DISPLAY_P_H
+#define _GDKMM_DISPLAY_P_H
+#include <glibmm/private/object_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gdk
+{
+
+class Display_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Display CppObjectType;
+ typedef GdkDisplay BaseObjectType;
+ typedef GdkDisplayClass BaseClassType;
+ typedef Glib::Object_Class CppClassParent;
+ typedef GObjectClass BaseClassParent;
+
+ friend class Display;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void closed_callback(GdkDisplay* self, gboolean p0);
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gdk
+
+#endif /* _GDKMM_DISPLAY_P_H */
+
diff --git a/libs/gtkmm2/gdk/gdkmm/private/displaymanager_p.h b/libs/gtkmm2/gdk/gdkmm/private/displaymanager_p.h
new file mode 100644
index 0000000000..25ff018c44
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/private/displaymanager_p.h
@@ -0,0 +1,45 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GDKMM_DISPLAYMANAGER_P_H
+#define _GDKMM_DISPLAYMANAGER_P_H
+#include <glibmm/private/object_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gdk
+{
+
+class DisplayManager_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef DisplayManager CppObjectType;
+ typedef GdkDisplayManager BaseObjectType;
+ typedef GdkDisplayManagerClass BaseClassType;
+ typedef Glib::Object_Class CppClassParent;
+ typedef GObjectClass BaseClassParent;
+
+ friend class DisplayManager;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void display_opened_callback(GdkDisplayManager* self, GdkDisplay* p0);
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gdk
+
+#endif /* _GDKMM_DISPLAYMANAGER_P_H */
+
diff --git a/libs/gtkmm2/gdk/gdkmm/private/dragcontext_p.h b/libs/gtkmm2/gdk/gdkmm/private/dragcontext_p.h
new file mode 100644
index 0000000000..13dfd57ccc
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/private/dragcontext_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GDKMM_DRAGCONTEXT_P_H
+#define _GDKMM_DRAGCONTEXT_P_H
+#include <glibmm/private/object_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gdk
+{
+
+class DragContext_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef DragContext CppObjectType;
+ typedef GdkDragContext BaseObjectType;
+ typedef GdkDragContextClass BaseClassType;
+ typedef Glib::Object_Class CppClassParent;
+ typedef GObjectClass BaseClassParent;
+
+ friend class DragContext;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gdk
+
+#endif /* _GDKMM_DRAGCONTEXT_P_H */
+
diff --git a/libs/gtkmm2/gdk/gdkmm/private/drawable_p.h b/libs/gtkmm2/gdk/gdkmm/private/drawable_p.h
new file mode 100644
index 0000000000..59e22d083e
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/private/drawable_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GDKMM_DRAWABLE_P_H
+#define _GDKMM_DRAWABLE_P_H
+#include <glibmm/private/object_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gdk
+{
+
+class Drawable_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Drawable CppObjectType;
+ typedef GdkDrawable BaseObjectType;
+ typedef GdkDrawableClass BaseClassType;
+ typedef Glib::Object_Class CppClassParent;
+ typedef GObjectClass BaseClassParent;
+
+ friend class Drawable;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gdk
+
+#endif /* _GDKMM_DRAWABLE_P_H */
+
diff --git a/libs/gtkmm2/gdk/gdkmm/private/event_p.h b/libs/gtkmm2/gdk/gdkmm/private/event_p.h
new file mode 100644
index 0000000000..999db9b7fc
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/private/event_p.h
@@ -0,0 +1,6 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GDKMM_EVENT_P_H
+#define _GDKMM_EVENT_P_H
+#endif /* _GDKMM_EVENT_P_H */
+
diff --git a/libs/gtkmm2/gdk/gdkmm/private/gc_p.h b/libs/gtkmm2/gdk/gdkmm/private/gc_p.h
new file mode 100644
index 0000000000..82725a3a1a
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/private/gc_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GDKMM_GC_P_H
+#define _GDKMM_GC_P_H
+#include <glibmm/private/object_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gdk
+{
+
+class GC_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef GC CppObjectType;
+ typedef GdkGC BaseObjectType;
+ typedef GdkGCClass BaseClassType;
+ typedef Glib::Object_Class CppClassParent;
+ typedef GObjectClass BaseClassParent;
+
+ friend class GC;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gdk
+
+#endif /* _GDKMM_GC_P_H */
+
diff --git a/libs/gtkmm2/gdk/gdkmm/private/image_p.h b/libs/gtkmm2/gdk/gdkmm/private/image_p.h
new file mode 100644
index 0000000000..2b6fe88d3d
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/private/image_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GDKMM_IMAGE_P_H
+#define _GDKMM_IMAGE_P_H
+#include <glibmm/private/object_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gdk
+{
+
+class Image_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Image CppObjectType;
+ typedef GdkImage BaseObjectType;
+ typedef GdkImageClass BaseClassType;
+ typedef Glib::Object_Class CppClassParent;
+ typedef GObjectClass BaseClassParent;
+
+ friend class Image;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gdk
+
+#endif /* _GDKMM_IMAGE_P_H */
+
diff --git a/libs/gtkmm2/gdk/gdkmm/private/pixbuf_p.h b/libs/gtkmm2/gdk/gdkmm/private/pixbuf_p.h
new file mode 100644
index 0000000000..659bd0d8d7
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/private/pixbuf_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GDKMM_PIXBUF_P_H
+#define _GDKMM_PIXBUF_P_H
+#include <glibmm/private/object_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gdk
+{
+
+class Pixbuf_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Pixbuf CppObjectType;
+ typedef GdkPixbuf BaseObjectType;
+ typedef GdkPixbufClass BaseClassType;
+ typedef Glib::Object_Class CppClassParent;
+ typedef GObjectClass BaseClassParent;
+
+ friend class Pixbuf;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gdk
+
+#endif /* _GDKMM_PIXBUF_P_H */
+
diff --git a/libs/gtkmm2/gdk/gdkmm/private/pixbufanimation_p.h b/libs/gtkmm2/gdk/gdkmm/private/pixbufanimation_p.h
new file mode 100644
index 0000000000..ca03e440c2
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/private/pixbufanimation_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GDKMM_PIXBUFANIMATION_P_H
+#define _GDKMM_PIXBUFANIMATION_P_H
+#include <glibmm/private/object_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gdk
+{
+
+class PixbufAnimation_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef PixbufAnimation CppObjectType;
+ typedef GdkPixbufAnimation BaseObjectType;
+ typedef GdkPixbufAnimationClass BaseClassType;
+ typedef Glib::Object_Class CppClassParent;
+ typedef GObjectClass BaseClassParent;
+
+ friend class PixbufAnimation;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gdk
+
+#endif /* _GDKMM_PIXBUFANIMATION_P_H */
+
diff --git a/libs/gtkmm2/gdk/gdkmm/private/pixbufanimationiter_p.h b/libs/gtkmm2/gdk/gdkmm/private/pixbufanimationiter_p.h
new file mode 100644
index 0000000000..f7de22ffd8
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/private/pixbufanimationiter_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GDKMM_PIXBUFANIMATIONITER_P_H
+#define _GDKMM_PIXBUFANIMATIONITER_P_H
+#include <glibmm/private/object_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gdk
+{
+
+class PixbufAnimationIter_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef PixbufAnimationIter CppObjectType;
+ typedef GdkPixbufAnimationIter BaseObjectType;
+ typedef GdkPixbufAnimationIterClass BaseClassType;
+ typedef Glib::Object_Class CppClassParent;
+ typedef GObjectClass BaseClassParent;
+
+ friend class PixbufAnimationIter;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gdk
+
+#endif /* _GDKMM_PIXBUFANIMATIONITER_P_H */
+
diff --git a/libs/gtkmm2/gdk/gdkmm/private/pixbufformat_p.h b/libs/gtkmm2/gdk/gdkmm/private/pixbufformat_p.h
new file mode 100644
index 0000000000..6a0b196620
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/private/pixbufformat_p.h
@@ -0,0 +1,6 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GDKMM_PIXBUFFORMAT_P_H
+#define _GDKMM_PIXBUFFORMAT_P_H
+#endif /* _GDKMM_PIXBUFFORMAT_P_H */
+
diff --git a/libs/gtkmm2/gdk/gdkmm/private/pixbufloader_p.h b/libs/gtkmm2/gdk/gdkmm/private/pixbufloader_p.h
new file mode 100644
index 0000000000..7bceceef72
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/private/pixbufloader_p.h
@@ -0,0 +1,47 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GDKMM_PIXBUFLOADER_P_H
+#define _GDKMM_PIXBUFLOADER_P_H
+#include <glibmm/private/object_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gdk
+{
+
+class PixbufLoader_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef PixbufLoader CppObjectType;
+ typedef GdkPixbufLoader BaseObjectType;
+ typedef GdkPixbufLoaderClass BaseClassType;
+ typedef Glib::Object_Class CppClassParent;
+ typedef GObjectClass BaseClassParent;
+
+ friend class PixbufLoader;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void area_prepared_callback(GdkPixbufLoader* self);
+ static void area_updated_callback(GdkPixbufLoader* self, gint p0, gint p1, gint p2, gint p3);
+ static void closed_callback(GdkPixbufLoader* self);
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gdk
+
+#endif /* _GDKMM_PIXBUFLOADER_P_H */
+
diff --git a/libs/gtkmm2/gdk/gdkmm/private/pixmap_p.h b/libs/gtkmm2/gdk/gdkmm/private/pixmap_p.h
new file mode 100644
index 0000000000..149ed76a07
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/private/pixmap_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GDKMM_PIXMAP_P_H
+#define _GDKMM_PIXMAP_P_H
+#include <gdkmm/private/drawable_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gdk
+{
+
+class Pixmap_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Pixmap CppObjectType;
+ typedef GdkPixmapObject BaseObjectType;
+ typedef GdkPixmapObjectClass BaseClassType;
+ typedef Gdk::Drawable_Class CppClassParent;
+ typedef GdkDrawableClass BaseClassParent;
+
+ friend class Pixmap;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gdk
+
+#endif /* _GDKMM_PIXMAP_P_H */
+
diff --git a/libs/gtkmm2/gdk/gdkmm/private/rectangle_p.h b/libs/gtkmm2/gdk/gdkmm/private/rectangle_p.h
new file mode 100644
index 0000000000..51088336bb
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/private/rectangle_p.h
@@ -0,0 +1,6 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GDKMM_RECTANGLE_P_H
+#define _GDKMM_RECTANGLE_P_H
+#endif /* _GDKMM_RECTANGLE_P_H */
+
diff --git a/libs/gtkmm2/gdk/gdkmm/private/region_p.h b/libs/gtkmm2/gdk/gdkmm/private/region_p.h
new file mode 100644
index 0000000000..b0a7f8cdf2
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/private/region_p.h
@@ -0,0 +1,6 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GDKMM_REGION_P_H
+#define _GDKMM_REGION_P_H
+#endif /* _GDKMM_REGION_P_H */
+
diff --git a/libs/gtkmm2/gdk/gdkmm/private/rgbcmap_p.h b/libs/gtkmm2/gdk/gdkmm/private/rgbcmap_p.h
new file mode 100644
index 0000000000..d5845141c4
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/private/rgbcmap_p.h
@@ -0,0 +1,6 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GDKMM_RGBCMAP_P_H
+#define _GDKMM_RGBCMAP_P_H
+#endif /* _GDKMM_RGBCMAP_P_H */
+
diff --git a/libs/gtkmm2/gdk/gdkmm/private/screen_p.h b/libs/gtkmm2/gdk/gdkmm/private/screen_p.h
new file mode 100644
index 0000000000..9888f6c9db
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/private/screen_p.h
@@ -0,0 +1,45 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GDKMM_SCREEN_P_H
+#define _GDKMM_SCREEN_P_H
+#include <glibmm/private/object_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gdk
+{
+
+class Screen_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Screen CppObjectType;
+ typedef GdkScreen BaseObjectType;
+ typedef GdkScreenClass BaseClassType;
+ typedef Glib::Object_Class CppClassParent;
+ typedef GObjectClass BaseClassParent;
+
+ friend class Screen;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void size_changed_callback(GdkScreen* self);
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gdk
+
+#endif /* _GDKMM_SCREEN_P_H */
+
diff --git a/libs/gtkmm2/gdk/gdkmm/private/types_p.h b/libs/gtkmm2/gdk/gdkmm/private/types_p.h
new file mode 100644
index 0000000000..474d473ad8
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/private/types_p.h
@@ -0,0 +1,6 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GDKMM_TYPES_P_H
+#define _GDKMM_TYPES_P_H
+#endif /* _GDKMM_TYPES_P_H */
+
diff --git a/libs/gtkmm2/gdk/gdkmm/private/visual_p.h b/libs/gtkmm2/gdk/gdkmm/private/visual_p.h
new file mode 100644
index 0000000000..b11005c9db
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/private/visual_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GDKMM_VISUAL_P_H
+#define _GDKMM_VISUAL_P_H
+#include <glibmm/private/object_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gdk
+{
+
+class Visual_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Visual CppObjectType;
+ typedef GdkVisual BaseObjectType;
+ typedef GdkVisualClass BaseClassType;
+ typedef Glib::Object_Class CppClassParent;
+ typedef GObjectClass BaseClassParent;
+
+ friend class Visual;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gdk
+
+#endif /* _GDKMM_VISUAL_P_H */
+
diff --git a/libs/gtkmm2/gdk/gdkmm/private/window_p.h b/libs/gtkmm2/gdk/gdkmm/private/window_p.h
new file mode 100644
index 0000000000..c9fc8a9e85
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/private/window_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GDKMM_WINDOW_P_H
+#define _GDKMM_WINDOW_P_H
+#include <gdkmm/private/drawable_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gdk
+{
+
+class Window_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Window CppObjectType;
+ typedef GdkWindowObject BaseObjectType;
+ typedef GdkWindowObjectClass BaseClassType;
+ typedef Gdk::Drawable_Class CppClassParent;
+ typedef GdkDrawableClass BaseClassParent;
+
+ friend class Window;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gdk
+
+#endif /* _GDKMM_WINDOW_P_H */
+
diff --git a/libs/gtkmm2/gdk/gdkmm/rectangle.cc b/libs/gtkmm2/gdk/gdkmm/rectangle.cc
new file mode 100644
index 0000000000..a59a22bd75
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/rectangle.cc
@@ -0,0 +1,160 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gdkmm/rectangle.h>
+#include <gdkmm/private/rectangle_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+namespace Gdk
+{
+
+Rectangle::Rectangle(int x, int y, int width, int height)
+{
+ gobject_.x = x;
+ gobject_.y = y;
+ gobject_.width = width;
+ gobject_.height = height;
+}
+
+// gdk_rectangle_union() and gdk_rectangle_intersect() work fine even if
+// the destination points to one of the input rectangles. The join() and
+// intersect() implementations rely on this ability.
+
+Rectangle& Rectangle::join(const Rectangle& src2)
+{
+ gdk_rectangle_union(
+ &gobject_, const_cast<GdkRectangle*>(&src2.gobject_), &gobject_);
+ return *this;
+}
+
+Rectangle& Rectangle::intersect(const Rectangle& src2)
+{
+ gdk_rectangle_intersect(
+ &gobject_, const_cast<GdkRectangle*>(&src2.gobject_), &gobject_);
+ return *this;
+}
+
+Rectangle& Rectangle::intersect(const Rectangle& src2, bool& rectangles_intersect)
+{
+ rectangles_intersect = gdk_rectangle_intersect(
+ &gobject_, const_cast<GdkRectangle*>(&src2.gobject_), &gobject_);
+ return *this;
+}
+
+bool Rectangle::has_zero_area() const
+{
+ return (gobject_.width == 0 || gobject_.height == 0);
+}
+
+} // namespace Gdk
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gdk::Rectangle& wrap(GdkRectangle* object)
+{
+ return *reinterpret_cast<Gdk::Rectangle*>(object);
+}
+
+const Gdk::Rectangle& wrap(const GdkRectangle* object)
+{
+ return *reinterpret_cast<const Gdk::Rectangle*>(object);
+}
+
+} // namespace Glib
+
+
+namespace Gdk
+{
+
+
+// static
+GType Rectangle::get_type()
+{
+ return gdk_rectangle_get_type();
+}
+
+Rectangle::Rectangle()
+{
+ GLIBMM_INITIALIZE_STRUCT(gobject_, GdkRectangle);
+}
+
+Rectangle::Rectangle(const GdkRectangle* gobject)
+{
+ if(gobject)
+ gobject_ = *gobject;
+ else
+ GLIBMM_INITIALIZE_STRUCT(gobject_, GdkRectangle);
+}
+
+
+int Rectangle::get_x() const
+{
+ return gobj()->x;
+}
+
+void Rectangle::set_x(const int& value)
+{
+ gobj()->x = value;
+}
+
+int Rectangle::get_y() const
+{
+ return gobj()->y;
+}
+
+void Rectangle::set_y(const int& value)
+{
+ gobj()->y = value;
+}
+
+int Rectangle::get_width() const
+{
+ return gobj()->width;
+}
+
+void Rectangle::set_width(const int& value)
+{
+ gobj()->width = value;
+}
+
+int Rectangle::get_height() const
+{
+ return gobj()->height;
+}
+
+void Rectangle::set_height(const int& value)
+{
+ gobj()->height = value;
+}
+
+
+} // namespace Gdk
+
+
diff --git a/libs/gtkmm2/gdk/gdkmm/rectangle.h b/libs/gtkmm2/gdk/gdkmm/rectangle.h
new file mode 100644
index 0000000000..5a92e1b22d
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/rectangle.h
@@ -0,0 +1,113 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GDKMM_RECTANGLE_H
+#define _GDKMM_RECTANGLE_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* rectangle.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gdk/gdk.h>
+
+
+namespace Gdk
+{
+
+/** Gdk::Rectangle is a structure holding the position and size of a rectangle.
+ * The intersection of two rectangles can be computed with intersect(). To find the union of two rectangles use union().
+ */
+class Rectangle
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Rectangle CppObjectType;
+ typedef GdkRectangle BaseObjectType;
+
+ static GType get_type() G_GNUC_CONST;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ Rectangle();
+
+ explicit Rectangle(const GdkRectangle* gobject); // always takes a copy
+
+ ///Provides access to the underlying C instance.
+ GdkRectangle* gobj() { return &gobject_; }
+
+ ///Provides access to the underlying C instance.
+ const GdkRectangle* gobj() const { return &gobject_; }
+
+protected:
+ GdkRectangle gobject_;
+
+private:
+
+public:
+//_CUSTOM_DEFAULT_CTOR
+//Rectangle();
+ Rectangle(int x, int y, int width, int height);
+
+ Rectangle& join(const Rectangle& src2);
+ Rectangle& intersect(const Rectangle& src2);
+ Rectangle& intersect(const Rectangle& src2, bool& rectangles_intersect);
+
+ bool has_zero_area() const;
+
+ int get_x() const;
+ void set_x(const int& value);
+ int get_y() const;
+ void set_y(const int& value);
+ int get_width() const;
+ void set_width(const int& value);
+ int get_height() const;
+ void set_height(const int& value);
+
+
+};
+
+} // namespace Gdk
+
+
+namespace Glib
+{
+
+/** @relates Gdk::Rectangle
+ * @param object The C instance
+ * @result A C++ instance that wraps this C instance.
+ */
+Gdk::Rectangle& wrap(GdkRectangle* object);
+
+/** @relates Gdk::Rectangle
+ * @param object The C instance
+ * @result A C++ instance that wraps this C instance.
+ */
+const Gdk::Rectangle& wrap(const GdkRectangle* object);
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+template <>
+class Value<Gdk::Rectangle> : public Glib::Value_Boxed<Gdk::Rectangle>
+{};
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+} // namespace Glib
+
+#endif /* _GDKMM_RECTANGLE_H */
+
diff --git a/libs/gtkmm2/gdk/gdkmm/region.cc b/libs/gtkmm2/gdk/gdkmm/region.cc
new file mode 100644
index 0000000000..7206c1e239
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/region.cc
@@ -0,0 +1,226 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gdkmm/region.h>
+#include <gdkmm/private/region_p.h>
+
+#include <gdk/gdkenumtypes.h>
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gdk/gdkregion.h>
+
+namespace Gdk
+{
+
+Region::Region(const Glib::ArrayHandle<Gdk::Point>& points, FillRule fill_rule)
+:
+ // The dangerous-looking cast to GdkPoint* works, because Gdk::Point
+ // has only one member variable of type GdkPoint, and no vtable. Please
+ // don't copy this code, casts like that won't work with most other types.
+
+ gobject_ (gdk_region_polygon(
+ reinterpret_cast<GdkPoint*>(const_cast<Gdk::Point*>(points.data())),
+ points.size(), (GdkFillRule)(fill_rule)))
+{}
+
+Region::Region(const Rectangle& rectangle)
+:
+ gobject_ (gdk_region_rectangle(const_cast<GdkRectangle*>(rectangle.gobj())))
+{}
+
+Glib::ArrayHandle<Rectangle> Region::get_rectangles() const
+{
+ GdkRectangle* rectangles = 0;
+ int n_rectangles = 0;
+
+ gdk_region_get_rectangles(gobject_, &rectangles, &n_rectangles);
+
+ // The dangerous-looking cast to Rectangle* works, because Gdk::Rectangle
+ // has only one member variable of type GdkRectangle, and no vtable. Please
+ // don't copy this code, casts like that won't work with most other types.
+
+ return Glib::ArrayHandle<Rectangle>(
+ reinterpret_cast<Rectangle*>(rectangles), n_rectangles, Glib::OWNERSHIP_SHALLOW);
+}
+
+} // namespace Gdk
+
+
+namespace
+{
+} // anonymous namespace
+
+// static
+GType Glib::Value<Gdk::FillRule>::value_type()
+{
+ return gdk_fill_rule_get_type();
+}
+
+// static
+GType Glib::Value<Gdk::OverlapType>::value_type()
+{
+ return gdk_overlap_type_get_type();
+}
+
+
+namespace Glib
+{
+
+Gdk::Region wrap(GdkRegion* object, bool take_copy /* = false */)
+{
+ return Gdk::Region(object, take_copy);
+}
+
+} // namespace Glib
+
+
+namespace Gdk
+{
+
+
+Region::Region()
+:
+ gobject_ (gdk_region_new())
+{}
+
+Region::Region(const Region& src)
+:
+ gobject_ ((src.gobject_) ? gdk_region_copy(src.gobject_) : 0)
+{}
+
+Region::Region(GdkRegion* castitem, bool make_a_copy /* = false */)
+{
+ if(!make_a_copy)
+ {
+ // It was given to us by a function which has already made a copy for us to keep.
+ gobject_ = castitem;
+ }
+ else
+ {
+ // We are probably getting it via direct access to a struct,
+ // so we can not just take it - we have to take a copy of it.
+ if(castitem)
+ gobject_ = gdk_region_copy(castitem);
+ else
+ gobject_ = 0;
+ }
+}
+
+Region& Region::operator=(const Region& src)
+{
+ GdkRegion *const new_gobject = (src.gobject_) ? gdk_region_copy(src.gobject_) : 0;
+
+ if(gobject_)
+ gdk_region_destroy(gobject_);
+
+ gobject_ = new_gobject;
+
+ return *this;
+}
+
+Region::~Region()
+{
+ if(gobject_)
+ gdk_region_destroy(gobject_);
+}
+
+GdkRegion* Region::gobj_copy() const
+{
+ return gdk_region_copy(gobject_);
+}
+
+
+void Region::get_clipbox(const Rectangle& rectangle)
+{
+ gdk_region_get_clipbox(gobj(), const_cast<GdkRectangle*>(rectangle.gobj()));
+}
+
+bool Region::empty()
+{
+ return gdk_region_empty(gobj());
+}
+
+bool Region::point_in(int x, int y)
+{
+ return gdk_region_point_in(gobj(), x, y);
+}
+
+OverlapType Region::rect_in(const Rectangle& rect)
+{
+ return ((OverlapType)(gdk_region_rect_in(gobj(), const_cast<GdkRectangle*>(rect.gobj()))));
+}
+
+void Region::offset(int dx, int dy)
+{
+ gdk_region_offset(gobj(), dx, dy);
+}
+
+void Region::shrink(int dx, int dy)
+{
+ gdk_region_shrink(gobj(), dx, dy);
+}
+
+void Region::union_with_rect(const Rectangle& rect)
+{
+ gdk_region_union_with_rect(gobj(), const_cast<GdkRectangle*>(rect.gobj()));
+}
+
+void Region::intersect(const Region& source2)
+{
+ gdk_region_intersect(gobj(), const_cast<GdkRegion*>((source2).gobj()));
+}
+
+void Region::union_(const Region& source2)
+{
+ gdk_region_union(gobj(), const_cast<GdkRegion*>((source2).gobj()));
+}
+
+void Region::subtract(const Region& source2)
+{
+ gdk_region_subtract(gobj(), const_cast<GdkRegion*>((source2).gobj()));
+}
+
+void Region::xor_(const Region& source2)
+{
+ gdk_region_xor(gobj(), const_cast<GdkRegion*>((source2).gobj()));
+}
+
+void Region::spans_intersect_foreach(GdkSpan* spans, int n_spans, bool sorted, GdkSpanFunc function, gpointer data)
+{
+ gdk_region_spans_intersect_foreach(gobj(), spans, n_spans, static_cast<int>(sorted), function, data);
+}
+
+
+bool operator==(const Region& lhs, const Region& rhs)
+{
+ return (gdk_region_equal(const_cast<GdkRegion*>(lhs.gobj()), const_cast<GdkRegion*>(rhs.gobj())) != 0);
+}
+
+bool operator!=(const Region& lhs, const Region& rhs)
+{
+ return (gdk_region_equal(const_cast<GdkRegion*>(lhs.gobj()), const_cast<GdkRegion*>(rhs.gobj())) == 0);
+}
+
+
+} // namespace Gdk
+
+
diff --git a/libs/gtkmm2/gdk/gdkmm/region.h b/libs/gtkmm2/gdk/gdkmm/region.h
new file mode 100644
index 0000000000..bcea009aa7
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/region.h
@@ -0,0 +1,234 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GDKMM_REGION_H
+#define _GDKMM_REGION_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* region.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+extern "C" { typedef struct _GdkRegion GdkRegion; }
+
+#include <glibmm/arrayhandle.h>
+#include <gdkmm/types.h>
+#include <gdkmm/rectangle.h>
+
+
+namespace Gdk
+{
+
+
+/** @addtogroup gdkmmEnums Enums and Flags */
+
+/**
+ * @ingroup gdkmmEnums
+ */
+enum FillRule
+{
+ EVEN_ODD_RULE,
+ WINDING_RULE
+};
+
+} // namespace Gdk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gdk::FillRule> : public Glib::Value_Enum<Gdk::FillRule>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gdk
+{
+
+/**
+ * @ingroup gdkmmEnums
+ */
+enum OverlapType
+{
+ OVERLAP_RECTANGLE_IN,
+ OVERLAP_RECTANGLE_OUT,
+ OVERLAP_RECTANGLE_PART
+};
+
+} // namespace Gdk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gdk::OverlapType> : public Glib::Value_Enum<Gdk::OverlapType>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gdk
+{
+
+
+/** This is an opaque data type holding a set of arbitrary pixels, and is usually used for clipping graphical operations
+ * (see Gdk::GC::set_clip_region()).
+ */
+class Region
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Region CppObjectType;
+ typedef GdkRegion BaseObjectType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ Region();
+
+ // Use make_a_copy=true when getting it directly from a struct.
+ explicit Region(GdkRegion* castitem, bool make_a_copy = false);
+
+ Region(const Region& src);
+ Region& operator=(const Region& src);
+
+ ~Region();
+
+ GdkRegion* gobj() { return gobject_; }
+ const GdkRegion* gobj() const { return gobject_; }
+
+ ///Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs.
+ GdkRegion* gobj_copy() const;
+
+protected:
+ GdkRegion* gobject_;
+
+private:
+
+
+public:
+
+ Region(const Glib::ArrayHandle<Gdk::Point>& points, FillRule fill_rule);
+ explicit Region(const Rectangle& rectangle);
+
+
+ void get_clipbox(const Rectangle& rectangle);
+ Glib::ArrayHandle<Rectangle> get_rectangles() const;
+
+
+ bool empty();
+
+ bool point_in(int x, int y);
+
+ OverlapType rect_in(const Rectangle& rect);
+
+
+ void offset(int dx, int dy);
+
+ void shrink(int dx, int dy);
+
+ /** Sets the area of @a region to the union of the areas of @a region and
+ * @a rect . The resulting area is the set of pixels contained in
+ * either @a region or @a rect .
+ * @param rect A Gdk::Rectangle.
+ */
+ void union_with_rect(const Rectangle& rect);
+
+ /** Sets the area of @a source1 to the intersection of the areas of @a source1
+ * and @a source2 . The resulting area is the set of pixels contained in
+ * both @a source1 and @a source2 .
+ * @param source2 Another Gdk::Region.
+ */
+ void intersect(const Region& source2);
+
+ /** Sets the area of @a source1 to the union of the areas of @a source1 and
+ * @a source2 . The resulting area is the set of pixels contained in
+ * either @a source1 or @a source2 .
+ * @param source2 A Gdk::Region.
+ */
+ void union_(const Region& source2); //union is a keyword.
+
+ /** Subtracts the area of @a source2 from the area @a source1 . The resulting
+ * area is the set of pixels contained in @a source1 but not in @a source2 .
+ * @param source2 Another Gdk::Region.
+ */
+ void subtract(const Region& source2);
+
+ /** Sets the area of @a source1 to the exclusive-OR of the areas of @a source1
+ * and @a source2 . The resulting area is the set of pixels contained in one
+ * or the other of the two sources but not in both.
+ * @param source2 Another Gdk::Region.
+ */
+ void xor_(const Region& source2); //xor is a keyword
+
+ void spans_intersect_foreach(GdkSpan* spans, int n_spans, bool sorted, GdkSpanFunc function, gpointer data);
+
+
+};
+
+} //namespace Gdk
+
+
+namespace Gdk
+{
+
+/** @relates Gdk::Region
+ * @param lhs The left-hand side
+ * @param rhs The right-hand side
+ * @result The result
+ */
+bool operator==(const Region& lhs, const Region& rhs);
+
+/** @relates Gdk::Region
+ * @param lhs The left-hand side
+ * @param rhs The right-hand side
+ * @result The result
+ */
+bool operator!=(const Region& lhs, const Region& rhs);
+
+
+} // namespace Gdk
+
+
+namespace Glib
+{
+
+ /** @relates Gdk::Region
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+Gdk::Region wrap(GdkRegion* object, bool take_copy = false);
+
+} // namespace Glib
+
+#endif /* _GDKMM_REGION_H */
+
diff --git a/libs/gtkmm2/gdk/gdkmm/rgb.cc b/libs/gtkmm2/gdk/gdkmm/rgb.cc
new file mode 100644
index 0000000000..08c8cd58a2
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/rgb.cc
@@ -0,0 +1,43 @@
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 2004 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gdkmm/rgb.h>
+#include <gdk/gdk.h>
+
+namespace Gdk
+{
+
+Glib::RefPtr<Colormap> rgb_get_colormap()
+{
+ return Glib::wrap( gdk_rgb_get_colormap() );
+}
+
+Glib::RefPtr<Visual> rgb_get_visual()
+{
+ return Glib::wrap( gdk_rgb_get_visual() );
+}
+
+bool rgb_ditherable()
+{
+ return gdk_rgb_ditherable();
+}
+
+} //namespace Gdk
+
diff --git a/libs/gtkmm2/gdk/gdkmm/rgb.h b/libs/gtkmm2/gdk/gdkmm/rgb.h
new file mode 100644
index 0000000000..fa504ae68c
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/rgb.h
@@ -0,0 +1,55 @@
+/* $Id$ */
+
+/* Copyright 2004 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef _GDKMM_RGB_H
+#define _GDKMM_RGB_H
+
+#include <gdkmm/colormap.h>
+#include <gdkmm/visual.h>
+
+namespace Gdk
+{
+
+/** Get the preferred colormap for rendering image data.
+ * Not a very useful function; historically, GDK could only render RGB image data to one colormap and visual,
+ * but in the current version it can render to any colormap and visual. So there's no need to call this function.
+ *
+ * @result The preferred colormap
+ */
+Glib::RefPtr<Colormap> rgb_get_colormap();
+
+/** Gets a "preferred visual" chosen by GdkRGB for rendering image data on the default screen.
+ * In previous versions of GDK, this was the only visual GdkRGB could use for rendering. In current versions,
+ * it's simply the visual GdkRGB would have chosen as the optimal one in those previous versions.
+ * GdkRGB can now render to drawables with any visual.
+ * @result The Gdk::Visual chosen by GdkRGB.
+ */
+Glib::RefPtr<Visual> rgb_get_visual();
+
+/** Determines whether the visual is ditherable.
+ * This function may be useful for presenting a user interface choice to the user about which dither mode is desired;
+ * if the display is not ditherable, it may make sense to gray out or hide the corresponding UI widget.
+ * result true if the visual is ditherable.
+ */
+bool rgb_ditherable();
+
+} //namespace Gdk
+
+#endif //_GDKMM_RGB_H
+
diff --git a/libs/gtkmm2/gdk/gdkmm/rgbcmap.cc b/libs/gtkmm2/gdk/gdkmm/rgbcmap.cc
new file mode 100644
index 0000000000..84a87d5439
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/rgbcmap.cc
@@ -0,0 +1,72 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gdkmm/rgbcmap.h>
+#include <gdkmm/private/rgbcmap_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/utility.h>
+#include <gdk/gdkrgb.h>
+
+namespace Gdk
+{
+
+RgbCmap::RgbCmap(const Glib::ArrayHandle<guint32>& colors)
+: gobject_ (gdk_rgb_cmap_new(const_cast<guint32*>(colors.data()), colors.size()))
+{}
+
+RgbCmap::~RgbCmap()
+{
+ if(gobject_)
+ gdk_rgb_cmap_free(gobject_);
+}
+
+guint32& RgbCmap::operator[](unsigned long index)
+{
+ return gobject_->colors[index];
+}
+
+const guint32& RgbCmap::operator[](unsigned long index) const
+{
+ return gobject_->colors[index];
+}
+
+
+unsigned long RgbCmap::size() const
+{
+ return gobject_->n_colors;
+}
+
+} // namespace Gdk
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Gdk
+{
+
+
+} // namespace Gdk
+
+
diff --git a/libs/gtkmm2/gdk/gdkmm/rgbcmap.h b/libs/gtkmm2/gdk/gdkmm/rgbcmap.h
new file mode 100644
index 0000000000..0f01f1e619
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/rgbcmap.h
@@ -0,0 +1,82 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GDKMM_RGBCMAP_H
+#define _GDKMM_RGBCMAP_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#include <gdkmmconfig.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C" { typedef struct _GdkRgbCmap GdkRgbCmap; }
+#endif
+
+namespace Gdk
+{
+
+class RgbCmap
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef RgbCmap CppObjectType;
+ typedef GdkRgbCmap BaseObjectType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+private:
+
+
+public:
+ explicit RgbCmap(const Glib::ArrayHandle<guint32>& colors);
+ virtual ~RgbCmap();
+
+ ///Number of colors.
+ unsigned long size() const;
+
+ ///Access the colors.
+ guint32& operator[](unsigned long index);
+
+ ///Access the colors.
+ const guint32& operator[](unsigned long index) const;
+
+ /// Provides access to the underlying C GObject.
+ GdkRgbCmap* gobj() { return gobject_; }
+ /// Provides access to the underlying C GObject.
+ const GdkRgbCmap* gobj() const { return gobject_; }
+
+protected:
+ GdkRgbCmap* gobject_;
+
+private:
+ // noncopyable
+ RgbCmap(const RgbCmap&);
+ RgbCmap& operator=(const RgbCmap&);
+
+
+};
+
+} // namespace Gdk
+
+
+#endif /* _GDKMM_RGBCMAP_H */
+
diff --git a/libs/gtkmm2/gdk/gdkmm/screen.cc b/libs/gtkmm2/gdk/gdkmm/screen.cc
new file mode 100644
index 0000000000..0b64a27a59
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/screen.cc
@@ -0,0 +1,416 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gdkmm/screen.h>
+#include <gdkmm/private/screen_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gdkmm/display.h>
+#include <gdkmm/visual.h>
+#include <gdkmm/window.h>
+#include <gdkmm/rectangle.h>
+#include <gdk/gdkscreen.h>
+
+namespace Gdk
+{
+
+} //Gdk
+
+
+namespace
+{
+
+const Glib::SignalProxyInfo Screen_signal_size_changed_info =
+{
+ "size-changed",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Gdk::Screen> wrap(GdkScreen* object, bool take_copy)
+{
+ return Glib::RefPtr<Gdk::Screen>( dynamic_cast<Gdk::Screen*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} /* namespace Glib */
+
+
+namespace Gdk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Screen_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Screen_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gdk_screen_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Screen_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->size_changed = &size_changed_callback;
+}
+
+
+void Screen_Class::size_changed_callback(GdkScreen* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_size_changed();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->size_changed)
+ (*base->size_changed)(self);
+ }
+}
+
+
+Glib::ObjectBase* Screen_Class::wrap_new(GObject* object)
+{
+ return new Screen((GdkScreen*)object);
+}
+
+
+/* The implementation: */
+
+GdkScreen* Screen::gobj_copy()
+{
+ reference();
+ return gobj();
+}
+
+Screen::Screen(const Glib::ConstructParams& construct_params)
+:
+ Glib::Object(construct_params)
+{}
+
+Screen::Screen(GdkScreen* castitem)
+:
+ Glib::Object((GObject*)(castitem))
+{}
+
+Screen::~Screen()
+{}
+
+
+Screen::CppClassType Screen::screen_class_; // initialize static member
+
+GType Screen::get_type()
+{
+ return screen_class_.init().get_type();
+}
+
+GType Screen::get_base_type()
+{
+ return gdk_screen_get_type();
+}
+
+
+Glib::RefPtr<Colormap> Screen::get_default_colormap()
+{
+
+ Glib::RefPtr<Colormap> retvalue = Glib::wrap(gdk_screen_get_default_colormap(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const Colormap> Screen::get_default_colormap() const
+{
+
+ Glib::RefPtr<const Colormap> retvalue = Glib::wrap(gdk_screen_get_default_colormap(const_cast<GdkScreen*>(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+void Screen::set_default_colormap(const Glib::RefPtr<const Colormap>& colormap)
+{
+ gdk_screen_set_default_colormap(gobj(), const_cast<GdkColormap*>(Glib::unwrap<Colormap>(colormap)));
+}
+
+Glib::RefPtr<Colormap> Screen::get_system_colormap()
+{
+
+ Glib::RefPtr<Colormap> retvalue = Glib::wrap(gdk_screen_get_system_colormap(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const Colormap> Screen::get_system_colormap() const
+{
+
+ Glib::RefPtr<const Colormap> retvalue = Glib::wrap(gdk_screen_get_system_colormap(const_cast<GdkScreen*>(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<Visual> Screen::get_system_visual()
+{
+
+ Glib::RefPtr<Visual> retvalue = Glib::wrap(gdk_screen_get_system_visual(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const Visual> Screen::get_system_visual() const
+{
+
+ Glib::RefPtr<const Visual> retvalue = Glib::wrap(gdk_screen_get_system_visual(const_cast<GdkScreen*>(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<Colormap> Screen::get_rgb_colormap()
+{
+
+ Glib::RefPtr<Colormap> retvalue = Glib::wrap(gdk_screen_get_rgb_colormap(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const Colormap> Screen::get_rgb_colormap() const
+{
+
+ Glib::RefPtr<const Colormap> retvalue = Glib::wrap(gdk_screen_get_rgb_colormap(const_cast<GdkScreen*>(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<Visual> Screen::get_rgb_visual()
+{
+
+ Glib::RefPtr<Visual> retvalue = Glib::wrap(gdk_screen_get_rgb_visual(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const Visual> Screen::get_rgb_visual() const
+{
+
+ Glib::RefPtr<const Visual> retvalue = Glib::wrap(gdk_screen_get_rgb_visual(const_cast<GdkScreen*>(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<Window> Screen::get_root_window()
+{
+
+ Glib::RefPtr<Window> retvalue = Glib::wrap((GdkWindowObject*)(gdk_screen_get_root_window(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const Window> Screen::get_root_window() const
+{
+
+ Glib::RefPtr<const Window> retvalue = Glib::wrap((GdkWindowObject*)(gdk_screen_get_root_window(const_cast<GdkScreen*>(gobj()))));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<Display> Screen::get_display()
+{
+
+ Glib::RefPtr<Display> retvalue = Glib::wrap(gdk_screen_get_display(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const Display> Screen::get_display() const
+{
+
+ Glib::RefPtr<const Display> retvalue = Glib::wrap(gdk_screen_get_display(const_cast<GdkScreen*>(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+int Screen::get_number() const
+{
+ return gdk_screen_get_number(const_cast<GdkScreen*>(gobj()));
+}
+
+int Screen::get_width() const
+{
+ return gdk_screen_get_width(const_cast<GdkScreen*>(gobj()));
+}
+
+int Screen::get_height() const
+{
+ return gdk_screen_get_height(const_cast<GdkScreen*>(gobj()));
+}
+
+int Screen::get_width_mm() const
+{
+ return gdk_screen_get_width_mm(const_cast<GdkScreen*>(gobj()));
+}
+
+int Screen::get_height_mm() const
+{
+ return gdk_screen_get_height_mm(const_cast<GdkScreen*>(gobj()));
+}
+
+Glib::ListHandle< Glib::RefPtr<Visual> > Screen::list_visuals()
+{
+ return Glib::ListHandle< Glib::RefPtr<Visual> >(gdk_screen_list_visuals(gobj()), Glib::OWNERSHIP_SHALLOW);
+}
+
+Glib::ListHandle< Glib::RefPtr<Window> > Screen::get_toplevel_windows()
+{
+ return Glib::ListHandle< Glib::RefPtr<Window> >(gdk_screen_get_toplevel_windows(gobj()), Glib::OWNERSHIP_SHALLOW);
+}
+
+Glib::ustring Screen::make_display_name()
+{
+ return Glib::convert_return_gchar_ptr_to_ustring(gdk_screen_make_display_name(gobj()));
+}
+
+int Screen::get_n_monitors() const
+{
+ return gdk_screen_get_n_monitors(const_cast<GdkScreen*>(gobj()));
+}
+
+void Screen::get_monitor_geometry(int monitor_num, Rectangle& dest) const
+{
+ gdk_screen_get_monitor_geometry(const_cast<GdkScreen*>(gobj()), monitor_num, (dest).gobj());
+}
+
+int Screen::get_monitor_at_point(int x, int y) const
+{
+ return gdk_screen_get_monitor_at_point(const_cast<GdkScreen*>(gobj()), x, y);
+}
+
+int Screen::get_monitor_at_window(const Glib::RefPtr<Window>& window) const
+{
+ return gdk_screen_get_monitor_at_window(const_cast<GdkScreen*>(gobj()), Glib::unwrap(window));
+}
+
+void Screen::broadcast_client_message(GdkEvent* event)
+{
+ gdk_screen_broadcast_client_message(gobj(), event);
+}
+
+Glib::RefPtr<Screen> Screen::get_default()
+{
+
+ Glib::RefPtr<Screen> retvalue = Glib::wrap(gdk_screen_get_default());
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+
+Glib::SignalProxy0< void > Screen::signal_size_changed()
+{
+ return Glib::SignalProxy0< void >(this, &Screen_signal_size_changed_info);
+}
+
+
+void Gdk::Screen::on_size_changed()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->size_changed)
+ (*base->size_changed)(gobj());
+}
+
+
+} // namespace Gdk
+
+
diff --git a/libs/gtkmm2/gdk/gdkmm/screen.h b/libs/gtkmm2/gdk/gdkmm/screen.h
new file mode 100644
index 0000000000..29ae15d54f
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/screen.h
@@ -0,0 +1,423 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GDKMM_SCREEN_H
+#define _GDKMM_SCREEN_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* screen.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+//#include <gdkmm/visual.h>
+//#include <gdkmm/window.h>
+#include <gdkmm/rectangle.h>
+#include <glibmm/object.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GdkScreen GdkScreen;
+typedef struct _GdkScreenClass GdkScreenClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gdk
+{ class Screen_Class; } // namespace Gdk
+namespace Gdk
+{
+
+class Display;
+class Colormap;
+class Visual;
+class Window;
+
+/** Object representing a physical screen
+ * Gdk::Screen objects are the GDK representation of a physical screen. It is used throughout GDK and GTK+ to specify
+ * which screen the top level windows are to be displayed on. It is also used to query the screen specification and
+ * default settings such as the default colormap (get_default_colormap()), the screen width (get_width()), etc.
+ * Note that a screen may consist of multiple monitors which are merged to form a large screen area.
+ */
+
+class Screen : public Glib::Object
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef Screen CppObjectType;
+ typedef Screen_Class CppClassType;
+ typedef GdkScreen BaseObjectType;
+ typedef GdkScreenClass BaseClassType;
+
+private: friend class Screen_Class;
+ static CppClassType screen_class_;
+
+private:
+ // noncopyable
+ Screen(const Screen&);
+ Screen& operator=(const Screen&);
+
+protected:
+ explicit Screen(const Glib::ConstructParams& construct_params);
+ explicit Screen(GdkScreen* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~Screen();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ GdkScreen* gobj() { return reinterpret_cast<GdkScreen*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const GdkScreen* gobj() const { return reinterpret_cast<GdkScreen*>(gobject_); }
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ GdkScreen* gobj_copy();
+
+private:
+
+protected:
+
+public:
+
+ /** Gets the default colormap for @a screen .
+ * @return The default Gdk::Colormap.
+ *
+ * Since: 2.2.
+ */
+ Glib::RefPtr<Colormap> get_default_colormap();
+
+ /** Gets the default colormap for @a screen .
+ * @return The default Gdk::Colormap.
+ *
+ * Since: 2.2.
+ */
+ Glib::RefPtr<const Colormap> get_default_colormap() const;
+
+
+ /** Sets the default @a colormap for @a screen .
+ *
+ * Since: 2.2
+ * @param colormap A Gdk::Colormap.
+ */
+ void set_default_colormap(const Glib::RefPtr<const Colormap>& colormap);
+
+ /** Gets the system's default colormap for @a screen
+ * @return The default colormap for @a screen .
+ *
+ * Since: 2.2.
+ */
+ Glib::RefPtr<Colormap> get_system_colormap();
+
+ /** Gets the system's default colormap for @a screen
+ * @return The default colormap for @a screen .
+ *
+ * Since: 2.2.
+ */
+ Glib::RefPtr<const Colormap> get_system_colormap() const;
+
+
+ /** Get the system's default visual for @a screen .
+ * This is the visual for the root window of the display.
+ * The return value should not be freed.
+ * @return The system visual
+ *
+ * Since: 2.2.
+ */
+ Glib::RefPtr<Visual> get_system_visual();
+
+ /** Get the system's default visual for @a screen .
+ * This is the visual for the root window of the display.
+ * The return value should not be freed.
+ * @return The system visual
+ *
+ * Since: 2.2.
+ */
+ Glib::RefPtr<const Visual> get_system_visual() const;
+
+
+ /** Gets the preferred colormap for rendering image data on @a screen .
+ * Not a very useful function; historically, GDK could only render RGB
+ * image data to one colormap and visual, but in the current version
+ * it can render to any colormap and visual. So there's no need to
+ * call this function.
+ * @return The preferred colormap
+ *
+ * Since: 2.2.
+ */
+ Glib::RefPtr<Colormap> get_rgb_colormap();
+
+ /** Gets the preferred colormap for rendering image data on @a screen .
+ * Not a very useful function; historically, GDK could only render RGB
+ * image data to one colormap and visual, but in the current version
+ * it can render to any colormap and visual. So there's no need to
+ * call this function.
+ * @return The preferred colormap
+ *
+ * Since: 2.2.
+ */
+ Glib::RefPtr<const Colormap> get_rgb_colormap() const;
+
+
+ /** Gets a "preferred visual" chosen by GdkRGB for rendering image data
+ * on @a screen . In previous versions of
+ * GDK, this was the only visual GdkRGB could use for rendering. In
+ * current versions, it's simply the visual GdkRGB would have chosen as
+ * the optimal one in those previous versions. GdkRGB can now render to
+ * drawables with any visual.
+ * @return The Gdk::Visual chosen by GdkRGB.
+ *
+ * Since: 2.2.
+ */
+ Glib::RefPtr<Visual> get_rgb_visual();
+
+ /** Gets a "preferred visual" chosen by GdkRGB for rendering image data
+ * on @a screen . In previous versions of
+ * GDK, this was the only visual GdkRGB could use for rendering. In
+ * current versions, it's simply the visual GdkRGB would have chosen as
+ * the optimal one in those previous versions. GdkRGB can now render to
+ * drawables with any visual.
+ * @return The Gdk::Visual chosen by GdkRGB.
+ *
+ * Since: 2.2.
+ */
+ Glib::RefPtr<const Visual> get_rgb_visual() const;
+
+
+ /** Gets the root window of @a screen .
+ * @return The root window
+ *
+ * Since: 2.2.
+ */
+ Glib::RefPtr<Window> get_root_window();
+
+ /** Gets the root window of @a screen .
+ * @return The root window
+ *
+ * Since: 2.2.
+ */
+ Glib::RefPtr<const Window> get_root_window() const;
+
+
+ /** Gets the display to which the @a screen belongs.
+ * @return The display to which @a screen belongs
+ *
+ * Since: 2.2.
+ */
+ Glib::RefPtr<Display> get_display();
+
+ /** Gets the display to which the @a screen belongs.
+ * @return The display to which @a screen belongs
+ *
+ * Since: 2.2.
+ */
+ Glib::RefPtr<const Display> get_display() const;
+
+
+ /** Gets the index of @a screen among the screens in the display
+ * to which it belongs. (See get_display())
+ * @return The index
+ *
+ * Since: 2.2.
+ */
+ int get_number() const;
+
+ /** Gets the width of @a screen in pixels
+ * @return The width of @a screen in pixels.
+ *
+ * Since: 2.2.
+ */
+ int get_width() const;
+
+ /** Gets the height of @a screen in pixels
+ * @return The height of @a screen in pixels.
+ *
+ * Since: 2.2.
+ */
+ int get_height() const;
+
+ /** Gets the width of @a screen in millimeters.
+ * Note that on some X servers this value will not be correct.
+ * @return The width of @a screen in pixels.
+ *
+ * Since: 2.2.
+ */
+ int get_width_mm() const;
+
+ /** Returns the height of @a screen in millimeters.
+ * Note that on some X servers this value will not be correct.
+ * @return The heigth of @a screen in pixels.
+ *
+ * Since: 2.2.
+ */
+ int get_height_mm() const;
+
+
+ /** Lists the available visuals for the specified @a screen .
+ * A visual describes a hardware image data format.
+ * For example, a visual might support 24-bit color, or 8-bit color,
+ * and might expect pixels to be in a certain format.
+ * @return A list of visuals.
+ *
+ * Since: 2.2.
+ */
+ Glib::ListHandle< Glib::RefPtr<Visual> > list_visuals();
+
+ /** Obtains a list of all toplevel windows known to GDK on the screen @a screen .
+ * A toplevel window is a child of the root window (see
+ * gdk_get_default_root_window()).
+ * @return List of toplevel windows.
+ *
+ * Since: 2.2.
+ */
+ Glib::ListHandle< Glib::RefPtr<Window> > get_toplevel_windows();
+
+ /** Determines the name to pass to Gdk::Display::open() to get
+ * a Gdk::Display with this screen as the default screen.
+ * @return The name.
+ *
+ * Since: 2.2.
+ */
+ Glib::ustring make_display_name();
+
+
+ /** Returns the number of monitors which @a screen consists of.
+ * @return Number of monitors which @a screen consists of.
+ *
+ * Since: 2.2.
+ */
+ int get_n_monitors() const;
+
+ /** Retrieves the Gdk::Rectangle representing the size and position of
+ * the individual monitor within the the entire screen area.
+ *
+ * Note that the size of the entire screen area can be retrieved via
+ * get_width() and get_height().
+ *
+ * Since: 2.2
+ * @param monitor_num The monitor number.
+ * @param dest A Gdk::Rectangle to be filled with the monitor geometry.
+ */
+ void get_monitor_geometry(int monitor_num, Rectangle& dest) const;
+
+ /** Returns the monitor number in which the point ( @a x , @a y ) is located.
+ * @param x The x coordinate in the virtual screen.
+ * @param y The y coordinate in the virtual screen.
+ * @return The monitor number in which the point ( @a x , @a y ) lies, or
+ * a monitor close to ( @a x , @a y ) if the point is not in any monitor.
+ *
+ * Since: 2.2.
+ */
+ int get_monitor_at_point(int x, int y) const;
+
+ /**
+ * @param window A Gdk::Window.
+ * @return The monitor number in which most of @a window is located,
+ * or if @a window does not intersect any monitors, a monitor,
+ * close to @a window .
+ * the number of the monitor in which the largest area of the
+ * bounding rectangle of @a window resides.
+ *
+ * Since: 2.2.
+ */
+ int get_monitor_at_window(const Glib::RefPtr<Window>& window) const;
+
+
+ /** On X11, sends an X ClientMessage event to all toplevel windows on
+ * @a screen .
+ *
+ * Toplevel windows are determined by checking for the WM_STATE property,
+ * as described in the Inter-Client Communication Conventions Manual (ICCCM).
+ * If no windows are found with the WM_STATE property set, the message is
+ * sent to all children of the root window.
+ *
+ * On Windows, broadcasts a message registered with the name
+ * GDK_WIN32_CLIENT_MESSAGE to all top-level windows. The amount of
+ * data is limited to one long, i.e. four bytes.
+ *
+ * Since: 2.2
+ * @param event The Gdk::Event.
+ */
+ void broadcast_client_message(GdkEvent* event);
+
+
+ /** Gets the default screen for the default display. (See
+ * Gdk::Display::get_default()).
+ * @return A Gdk::Screen, or <tt>0</tt> if there is no default display.
+ *
+ * Since: 2.2.
+ */
+ static Glib::RefPtr<Screen> get_default();
+
+ template <class ValueType>
+ bool get_setting(const Glib::ustring& name, ValueType& value) const;
+
+
+ Glib::SignalProxy0< void > signal_size_changed();
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_size_changed();
+
+
+};
+
+template <class ValueType>
+bool Screen::get_setting(const Glib::ustring& name, ValueType& value) const
+{
+ Glib::Value<ValueType> glibmmvalue;
+ glibmmvalue.init(Glib::Value<ValueType>::value_type());
+
+ gboolean result = gdk_screen_get_setting(const_cast<GdkScreen*>(gobj()), name.c_str(), glibmmvalue.gobj());
+
+ value = glibmmvalue.get();
+ return result;
+}
+
+} /* namespace Gdk */
+
+
+namespace Glib
+{
+ /** @relates Gdk::Screen
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Gdk::Screen> wrap(GdkScreen* object, bool take_copy = false);
+}
+
+
+#endif /* _GDKMM_SCREEN_H */
+
diff --git a/libs/gtkmm2/gdk/gdkmm/types.cc b/libs/gtkmm2/gdk/gdkmm/types.cc
new file mode 100644
index 0000000000..e15170aadb
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/types.cc
@@ -0,0 +1,116 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gdkmm/types.h>
+#include <gdkmm/private/types_p.h>
+
+#include <gdk/gdkenumtypes.h>
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+namespace Gdk
+{
+
+Point::Point()
+{
+ gobject_.x = 0;
+ gobject_.y = 0;
+}
+
+Point::Point(int x, int y)
+{
+ gobject_.x = x;
+ gobject_.y = y;
+}
+
+bool Point::equal(const Gdk::Point& rhs) const
+{
+ return (gobject_.x == rhs.gobject_.x) && (gobject_.y == rhs.gobject_.y);
+}
+
+// static
+GdkAtom AtomStringTraits::to_c_type(const std::string& atom_name)
+{
+ return gdk_atom_intern(atom_name.c_str(), 0);
+}
+
+// static
+std::string AtomStringTraits::to_cpp_type(GdkAtom atom)
+{
+ if(char *const atom_name = gdk_atom_name(atom))
+ return std::string(Glib::ScopedPtr<char>(atom_name).get());
+ else
+ return std::string();
+}
+
+} // namespace Gdk
+
+
+namespace Glib
+{
+
+Gdk::Point& wrap(GdkPoint* object)
+{
+ return *reinterpret_cast<Gdk::Point*>(object);
+}
+
+const Gdk::Point& wrap(const GdkPoint* object)
+{
+ return *reinterpret_cast<const Gdk::Point*>(object);
+}
+
+} // namespace Glib
+
+
+namespace
+{
+} // anonymous namespace
+
+// static
+GType Glib::Value<Gdk::ByteOrder>::value_type()
+{
+ return gdk_byte_order_get_type();
+}
+
+// static
+GType Glib::Value<Gdk::ModifierType>::value_type()
+{
+ return gdk_modifier_type_get_type();
+}
+
+// static
+GType Glib::Value<Gdk::Status>::value_type()
+{
+ return gdk_status_get_type();
+}
+
+// static
+GType Glib::Value<Gdk::InputCondition>::value_type()
+{
+ return gdk_input_condition_get_type();
+}
+
+
+namespace Gdk
+{
+
+
+} // namespace Gdk
+
+
diff --git a/libs/gtkmm2/gdk/gdkmm/types.h b/libs/gtkmm2/gdk/gdkmm/types.h
new file mode 100644
index 0000000000..1f0c0fafd4
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/types.h
@@ -0,0 +1,370 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GDKMM_TYPES_H
+#define _GDKMM_TYPES_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#include <gdk/gdk.h>
+#include <gdkmmconfig.h>
+
+/* Shadow ERROR macro (from wingdi.h).
+ */
+#if defined(ERROR) && !defined(GTKMM_MACRO_SHADOW_ERROR)
+enum { GTKMM_MACRO_DEFINITION_ERROR = ERROR };
+#undef ERROR
+enum { ERROR = GTKMM_MACRO_DEFINITION_ERROR };
+#define ERROR ERROR
+#define GTKMM_MACRO_SHADOW_ERROR 1
+#endif
+
+/*********************************************************************
+***** Version macros
+*********************************************************************/
+
+/* macro for controlling version numbers */
+#ifndef _GDK_VERSION
+
+#define GDK_VERSION_GT(major,minor) ((GTK_MAJOR_VERSION>major)||(GTK_MAJOR_VERSION==major)&&(GTK_MINOR_VERSION>minor))
+#define GDK_VERSION_GE(major,minor) ((GTK_MAJOR_VERSION>major)||(GTK_MAJOR_VERSION==major)&&(GTK_MINOR_VERSION>=minor))
+#define GDK_VERSION_EQ(major,minor) ((GTK_MAJOR_VERSION==major)&&(GTK_MINOR_VERSION==minor))
+#define GDK_VERSION_NE(major,minor) ((GTK_MAJOR_VERSION!=major)||(GTK_MINOR_VERSION!=minor))
+#define GDK_VERSION_LE(major,minor) ((GTK_MAJOR_VERSION<major)||(GTK_MAJOR_VERSION==major)&&(GTK_MINOR_VERSION<=minor))
+#define GDK_VERSION_LT(major,minor) ((GTK_MAJOR_VERSION<major)||(GTK_MAJOR_VERSION==major)&&(GTK_MINOR_VERSION<minor))
+
+//Note: Use GTK_CHECK_VERSION to check that a version is equal or more than (the micro version).
+
+#endif /* _GDK_VERSION */
+
+namespace Gdk
+{
+
+class Bitmap;
+class Colormap;
+class Pixmap;
+class Window;
+class Font;
+class GC;
+class Color;
+class Image;
+
+
+/** @addtogroup gdkmmEnums Enums and Flags */
+
+/**
+ * @ingroup gdkmmEnums
+ */
+enum ByteOrder
+{
+ LSB_FIRST,
+ MSB_FIRST
+};
+
+} // namespace Gdk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gdk::ByteOrder> : public Glib::Value_Enum<Gdk::ByteOrder>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gdk
+{
+
+/**
+ * @ingroup gdkmmEnums
+ * @par Bitwise operators:
+ * <tt>%ModifierType operator|(ModifierType, ModifierType)</tt><br>
+ * <tt>%ModifierType operator&(ModifierType, ModifierType)</tt><br>
+ * <tt>%ModifierType operator^(ModifierType, ModifierType)</tt><br>
+ * <tt>%ModifierType operator~(ModifierType)</tt><br>
+ * <tt>%ModifierType& operator|=(ModifierType&, ModifierType)</tt><br>
+ * <tt>%ModifierType& operator&=(ModifierType&, ModifierType)</tt><br>
+ * <tt>%ModifierType& operator^=(ModifierType&, ModifierType)</tt><br>
+ */
+enum ModifierType
+{
+ SHIFT_MASK = 1 << 0,
+ LOCK_MASK = 1 << 1,
+ CONTROL_MASK = 1 << 2,
+ MOD1_MASK = 1 << 3,
+ MOD2_MASK = 1 << 4,
+ MOD3_MASK = 1 << 5,
+ MOD4_MASK = 1 << 6,
+ MOD5_MASK = 1 << 7,
+ BUTTON1_MASK = 1 << 8,
+ BUTTON2_MASK = 1 << 9,
+ BUTTON3_MASK = 1 << 10,
+ BUTTON4_MASK = 1 << 11,
+ BUTTON5_MASK = 1 << 12,
+ RELEASE_MASK = 1 << 30,
+ MODIFIER_MASK = 0x40001FFF
+};
+
+/** @ingroup gdkmmEnums */
+inline ModifierType operator|(ModifierType lhs, ModifierType rhs)
+ { return static_cast<ModifierType>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
+
+/** @ingroup gdkmmEnums */
+inline ModifierType operator&(ModifierType lhs, ModifierType rhs)
+ { return static_cast<ModifierType>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
+
+/** @ingroup gdkmmEnums */
+inline ModifierType operator^(ModifierType lhs, ModifierType rhs)
+ { return static_cast<ModifierType>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
+
+/** @ingroup gdkmmEnums */
+inline ModifierType operator~(ModifierType flags)
+ { return static_cast<ModifierType>(~static_cast<unsigned>(flags)); }
+
+/** @ingroup gdkmmEnums */
+inline ModifierType& operator|=(ModifierType& lhs, ModifierType rhs)
+ { return (lhs = static_cast<ModifierType>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
+
+/** @ingroup gdkmmEnums */
+inline ModifierType& operator&=(ModifierType& lhs, ModifierType rhs)
+ { return (lhs = static_cast<ModifierType>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
+
+/** @ingroup gdkmmEnums */
+inline ModifierType& operator^=(ModifierType& lhs, ModifierType rhs)
+ { return (lhs = static_cast<ModifierType>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
+
+} // namespace Gdk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gdk::ModifierType> : public Glib::Value_Flags<Gdk::ModifierType>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gdk
+{
+
+/**
+ * @ingroup gdkmmEnums
+ */
+enum Status
+{
+ OK = 0,
+ ERROR = -1,
+ ERROR_PARAM = -2,
+ ERROR_FILE = -3,
+ ERROR_MEM = -4
+};
+
+} // namespace Gdk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gdk::Status> : public Glib::Value_Enum<Gdk::Status>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gdk
+{
+
+/**
+ * @ingroup gdkmmEnums
+ * @par Bitwise operators:
+ * <tt>%InputCondition operator|(InputCondition, InputCondition)</tt><br>
+ * <tt>%InputCondition operator&(InputCondition, InputCondition)</tt><br>
+ * <tt>%InputCondition operator^(InputCondition, InputCondition)</tt><br>
+ * <tt>%InputCondition operator~(InputCondition)</tt><br>
+ * <tt>%InputCondition& operator|=(InputCondition&, InputCondition)</tt><br>
+ * <tt>%InputCondition& operator&=(InputCondition&, InputCondition)</tt><br>
+ * <tt>%InputCondition& operator^=(InputCondition&, InputCondition)</tt><br>
+ */
+enum InputCondition
+{
+ INPUT_READ = 1 << 0,
+ INPUT_WRITE = 1 << 1,
+ INPUT_EXCEPTION = 1 << 2
+};
+
+/** @ingroup gdkmmEnums */
+inline InputCondition operator|(InputCondition lhs, InputCondition rhs)
+ { return static_cast<InputCondition>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
+
+/** @ingroup gdkmmEnums */
+inline InputCondition operator&(InputCondition lhs, InputCondition rhs)
+ { return static_cast<InputCondition>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
+
+/** @ingroup gdkmmEnums */
+inline InputCondition operator^(InputCondition lhs, InputCondition rhs)
+ { return static_cast<InputCondition>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
+
+/** @ingroup gdkmmEnums */
+inline InputCondition operator~(InputCondition flags)
+ { return static_cast<InputCondition>(~static_cast<unsigned>(flags)); }
+
+/** @ingroup gdkmmEnums */
+inline InputCondition& operator|=(InputCondition& lhs, InputCondition rhs)
+ { return (lhs = static_cast<InputCondition>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
+
+/** @ingroup gdkmmEnums */
+inline InputCondition& operator&=(InputCondition& lhs, InputCondition rhs)
+ { return (lhs = static_cast<InputCondition>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
+
+/** @ingroup gdkmmEnums */
+inline InputCondition& operator^=(InputCondition& lhs, InputCondition rhs)
+ { return (lhs = static_cast<InputCondition>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
+
+} // namespace Gdk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gdk::InputCondition> : public Glib::Value_Flags<Gdk::InputCondition>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gdk
+{
+
+
+typedef GdkGeometry Geometry; //It's not used enough to justify having a wrapper.
+typedef GdkNativeWindow NativeWindow;
+
+/** This is a simple structure containing an x and y coordinate of a point.
+ */
+class Point
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Point CppObjectType;
+ typedef GdkPoint BaseObjectType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+private:
+
+
+public:
+ Point();
+ Point(int x, int y);
+
+ void set_x(int x) { gobject_.x = x; }
+ void set_y(int y) { gobject_.y = y; }
+
+ int get_x() const { return gobject_.x; }
+ int get_y() const { return gobject_.y; }
+
+ bool equal(const Gdk::Point& rhs) const;
+
+ /// Provides access to the underlying C GObject.
+ GdkPoint* gobj() { return &gobject_; }
+ /// Provides access to the underlying C GObject.
+ const GdkPoint* gobj() const { return &gobject_; }
+
+protected:
+ GdkPoint gobject_;
+
+
+};
+
+/** @relates Gdk::Point */
+inline bool operator==(const Point& lhs, const Point& rhs)
+ { return lhs.equal(rhs); }
+
+/** @relates Gdk::Point */
+inline bool operator!=(const Point& lhs, const Point& rhs)
+ { return !lhs.equal(rhs); }
+
+
+struct AtomStringTraits
+{
+ typedef std::string CppType;
+ typedef GdkAtom CType;
+ typedef GdkAtom CTypeNonConst;
+
+ static GdkAtom to_c_type(GdkAtom atom) { return atom; }
+ static void release_c_type(GdkAtom) {}
+
+ // These aren't worth to be inlined since doing so
+ // would expose way too much of the implementation.
+ static GdkAtom to_c_type (const std::string& atom_name);
+ static std::string to_cpp_type(GdkAtom atom);
+};
+
+// I'm typedef'ing this because when we call to_c_type or to_c_type,
+// we don't want it to look like we're calling a template trait, but
+// a utility function. -Bryan
+typedef AtomStringTraits AtomString;
+
+typedef Glib::ArrayHandle<std::string,AtomStringTraits> ArrayHandle_AtomString;
+
+} // namespace Gdk
+
+
+namespace Glib
+{
+
+/** @relates Gdk::Point */
+Gdk::Point& wrap(GdkPoint* object);
+
+/** @relates Gdk::Point */
+const Gdk::Point& wrap(const GdkPoint* object);
+
+} // namespace Glib
+
+
+#endif /* _GDKMM_TYPES_H */
+
diff --git a/libs/gtkmm2/gdk/gdkmm/visual.cc b/libs/gtkmm2/gdk/gdkmm/visual.cc
new file mode 100644
index 0000000000..4d4e84774c
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/visual.cc
@@ -0,0 +1,226 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gdkmm/visual.h>
+#include <gdkmm/private/visual_p.h>
+
+#include <gdk/gdkenumtypes.h>
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gdk/gdkvisual.h>
+
+namespace Gdk
+{
+
+
+} //namespace
+
+
+namespace
+{
+} // anonymous namespace
+
+// static
+GType Glib::Value<Gdk::VisualType>::value_type()
+{
+ return gdk_visual_type_get_type();
+}
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Gdk::Visual> wrap(GdkVisual* object, bool take_copy)
+{
+ return Glib::RefPtr<Gdk::Visual>( dynamic_cast<Gdk::Visual*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} /* namespace Glib */
+
+
+namespace Gdk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Visual_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Visual_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gdk_visual_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Visual_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* Visual_Class::wrap_new(GObject* object)
+{
+ return new Visual((GdkVisual*)object);
+}
+
+
+/* The implementation: */
+
+GdkVisual* Visual::gobj_copy()
+{
+ reference();
+ return gobj();
+}
+
+Visual::Visual(const Glib::ConstructParams& construct_params)
+:
+ Glib::Object(construct_params)
+{}
+
+Visual::Visual(GdkVisual* castitem)
+:
+ Glib::Object((GObject*)(castitem))
+{}
+
+Visual::~Visual()
+{}
+
+
+Visual::CppClassType Visual::visual_class_; // initialize static member
+
+GType Visual::get_type()
+{
+ return visual_class_.init().get_type();
+}
+
+GType Visual::get_base_type()
+{
+ return gdk_visual_get_type();
+}
+
+
+Visual::Visual()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Glib::Object(Glib::ConstructParams(visual_class_.init()))
+{
+ }
+
+Glib::RefPtr<Visual> Visual::get_system()
+{
+
+ Glib::RefPtr<Visual> retvalue = Glib::wrap(gdk_visual_get_system());
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<Visual> Visual::get_best()
+{
+
+ Glib::RefPtr<Visual> retvalue = Glib::wrap(gdk_visual_get_best());
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<Visual> Visual::get_best(int depth)
+{
+
+ Glib::RefPtr<Visual> retvalue = Glib::wrap(gdk_visual_get_best_with_depth(depth));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<Visual> Visual::get_best(VisualType visual_type)
+{
+
+ Glib::RefPtr<Visual> retvalue = Glib::wrap(gdk_visual_get_best_with_type(((GdkVisualType)(visual_type))));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<Visual> Visual::get_best(int depth, VisualType visual_type)
+{
+
+ Glib::RefPtr<Visual> retvalue = Glib::wrap(gdk_visual_get_best_with_both(depth, ((GdkVisualType)(visual_type))));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+int Visual::get_best_depth()
+{
+ return gdk_visual_get_best_depth();
+}
+
+VisualType Visual::get_best_type()
+{
+ return ((VisualType)(gdk_visual_get_best_type()));
+}
+
+Glib::RefPtr<Screen> Visual::get_screen()
+{
+
+ Glib::RefPtr<Screen> retvalue = Glib::wrap(gdk_visual_get_screen(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const Screen> Visual::get_screen() const
+{
+
+ Glib::RefPtr<const Screen> retvalue = Glib::wrap(gdk_visual_get_screen(const_cast<GdkVisual*>(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+
+} // namespace Gdk
+
+
diff --git a/libs/gtkmm2/gdk/gdkmm/visual.h b/libs/gtkmm2/gdk/gdkmm/visual.h
new file mode 100644
index 0000000000..66f3cd5807
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/visual.h
@@ -0,0 +1,253 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GDKMM_VISUAL_H
+#define _GDKMM_VISUAL_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* bitmap.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/object.h>
+#include <gdkmm/screen.h>
+#include <gdk/gdkvisual.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GdkVisual GdkVisual;
+typedef struct _GdkVisualClass GdkVisualClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gdk
+{ class Visual_Class; } // namespace Gdk
+namespace Gdk
+{
+
+class Screen;
+
+
+/** @addtogroup gdkmmEnums Enums and Flags */
+
+/**
+ * @ingroup gdkmmEnums
+ */
+enum VisualType
+{
+ VISUAL_STATIC_GRAY,
+ VISUAL_GRAYSCALE,
+ VISUAL_STATIC_COLOR,
+ VISUAL_PSEUDO_COLOR,
+ VISUAL_TRUE_COLOR,
+ VISUAL_DIRECT_COLOR
+};
+
+} // namespace Gdk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gdk::VisualType> : public Glib::Value_Enum<Gdk::VisualType>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gdk
+{
+
+
+/** A Gdk::Visual describes a particular video hardware display format.
+ * It includes information about the number of bits used for each color, the way the bits are translated into an RGB value
+ * for display, and the way the bits are stored in memory. For example, a piece of display hardware might support 24-bit
+ * color, 16-bit color, or 8-bit color; meaning 24/16/8-bit pixel sizes. For a given pixel size, pixels can be in different
+ * formats; for example the "red" element of an RGB pixel may be in the top 8 bits of the pixel, or may be in the lower 4
+ * bits.
+ *
+ * Usually you can avoid thinking about visuals in GTK+. Visuals are useful to interpret the contents of a GdkImage, but
+ * you should avoid Gdk::Image precisely because its contents depend on the display hardware; use Gdk::Pixbuf instead, for
+ * all but the most low-level purposes. Also, anytime you provide a Gdk::Colormap, the visual is implied as part of the
+ * colormap (Gdk::Colormap::get_visual()), so you won't have to provide a visual in addition.
+ *
+ * There are several standard visuals. The visual returned by get_system() is the system's default visual. get_visual()
+ * returns the visual most suited to displaying full-color image data. If you use the calls in Gdk::RGB, you should create
+ * your windows using this visual (and the colormap returned by Gdk::Rgb::get_colormap()).
+ *
+ * A number of methods are provided for determining the "best" available visual. For the purposes of making this
+ * determination, higher bit depths are considered better, and for visuals of the same bit depth, GDK_VISUAL_PSEUDO_COLOR
+ * is preferred at 8bpp, otherwise, the visual types are ranked in the order of (highest to lowest) GDK_VISUAL_DIRECT_COLOR,
+ * GDK_VISUAL_TRUE_COLOR, GDK_VISUAL_PSEUDO_COLOR, GDK_VISUAL_STATIC_COLOR, GDK_VISUAL_GRAYSCALE, then
+ * GDK_VISUAL_STATIC_GRAY.
+ */
+
+class Visual : public Glib::Object
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef Visual CppObjectType;
+ typedef Visual_Class CppClassType;
+ typedef GdkVisual BaseObjectType;
+ typedef GdkVisualClass BaseClassType;
+
+private: friend class Visual_Class;
+ static CppClassType visual_class_;
+
+private:
+ // noncopyable
+ Visual(const Visual&);
+ Visual& operator=(const Visual&);
+
+protected:
+ explicit Visual(const Glib::ConstructParams& construct_params);
+ explicit Visual(GdkVisual* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~Visual();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ GdkVisual* gobj() { return reinterpret_cast<GdkVisual*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const GdkVisual* gobj() const { return reinterpret_cast<GdkVisual*>(gobject_); }
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ GdkVisual* gobj_copy();
+
+private:
+
+protected:
+
+ Visual();
+
+public:
+
+ /** Get the system'sdefault visual for the default GDK screen.
+ * This is the visual for the root window of the display.
+ * The return value should not be freed.
+ * @return System visual.
+ */
+ static Glib::RefPtr<Visual> get_system();
+
+ /** Get the visual with the most available colors for the default
+ * GDK screen. The return value should not be freed.
+ * @return Best visual.
+ */
+ static Glib::RefPtr<Visual> get_best();
+
+ /** Get the best visual with depth @a depth for the default GDK screen.
+ * Color visuals and visuals with mutable colormaps are preferred
+ * over grayscale or fixed-colormap visuals. The return value should not
+ * be freed. <tt>0</tt> may be returned if no visual supports @a depth .
+ * @param depth A bit depth.
+ * @return Best visual for the given depth.
+ */
+ static Glib::RefPtr<Visual> get_best(int depth);
+
+ /** Get the best visual of the given @a visual_type for the default GDK screen.
+ * Visuals with higher color depths are considered better. The return value
+ * should not be freed. <tt>0</tt> may be returned if no visual has type
+ * @a visual_type .
+ * @param visual_type A visual type.
+ * @return Best visual of the given type.
+ */
+ static Glib::RefPtr<Visual> get_best(VisualType visual_type);
+
+ /** Combines gdk_visual_get_best_with_depth() and gdk_visual_get_best_with_type().
+ * @param depth A bit depth.
+ * @param visual_type A visual type.
+ * @return Best visual with both @a depth and @a visual_type , or <tt>0</tt> if none.
+ */
+ static Glib::RefPtr<Visual> get_best(int depth, VisualType visual_type);
+
+
+ /** Get the best available depth for the default GDK screen. "Best"
+ * means "largest," i.e. 32 preferred over 24 preferred over 8 bits
+ * per pixel.
+ * @return Best available depth.
+ */
+ static int get_best_depth();
+
+ /** Return the best available visual type for the default GDK screen.
+ * @return Best visual type.
+ */
+ static VisualType get_best_type();
+
+
+ /** Gets the screen to which this visual belongs
+ * @return The screen to which this visual belongs.
+ *
+ * Since: 2.2.
+ */
+ Glib::RefPtr<Screen> get_screen();
+
+ /** Gets the screen to which this visual belongs
+ * @return The screen to which this visual belongs.
+ *
+ * Since: 2.2.
+ */
+ Glib::RefPtr<const Screen> get_screen() const;
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+};
+
+} //namespace Gdk
+
+
+namespace Glib
+{
+ /** @relates Gdk::Visual
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Gdk::Visual> wrap(GdkVisual* object, bool take_copy = false);
+}
+
+
+#endif /* _GDKMM_VISUAL_H */
+
diff --git a/libs/gtkmm2/gdk/gdkmm/window.cc b/libs/gtkmm2/gdk/gdkmm/window.cc
new file mode 100644
index 0000000000..9419c5b01b
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/window.cc
@@ -0,0 +1,769 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gdkmm/window.h>
+#include <gdkmm/private/window_p.h>
+
+#include <gdk/gdkenumtypes.h>
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gdk/gdkwindow.h>
+#include <gdkmm/pixmap.h>
+#include <gdkmm/cursor.h>
+#include <gdkmm/types.h>
+
+
+namespace Gdk
+{
+
+Window::Window(const Glib::RefPtr<Window>& parent, GdkWindowAttr* attributes, int attributes_mask)
+:
+ Drawable((GdkDrawable*) gdk_window_new(parent->gobj(), attributes, attributes_mask))
+{
+ //GdkWindow is X11/win32-specific, so we probably can't derived our own GType.
+}
+
+void Window::set_cursor()
+{
+ gdk_window_set_cursor(gobj(), 0);
+}
+
+GrabStatus Window::pointer_grab(bool owner_events, EventMask event_mask, const Cursor& cursor, guint32 timestamp)
+{
+ return ((GrabStatus)(gdk_pointer_grab(gobj(), static_cast<int>(owner_events), ((GdkEventMask)(event_mask)), 0, (cursor).gobj_copy(), timestamp)));
+}
+
+GrabStatus Window::pointer_grab(bool owner_events, EventMask event_mask, guint32 timestamp)
+{
+ return ((GrabStatus)(gdk_pointer_grab(gobj(), static_cast<int>(owner_events), ((GdkEventMask)(event_mask)), 0, 0, timestamp)));
+}
+
+//static
+void Window::unset_sm_client_id()
+{
+ gdk_set_sm_client_id(0 /* see GDK docs */);
+}
+
+void Window::set_icon(const Glib::RefPtr<Window>& icon_window, const Glib::RefPtr<Pixmap>& pixmap)
+{
+ gdk_window_set_icon(gobj(), icon_window->gobj(), pixmap->gobj(), 0); /* See GDK docs */
+}
+
+void Window::unset_icon()
+{
+ gdk_window_set_icon(gobj(), 0, 0, 0); /* See GDK docs */
+}
+
+void Window::unset_shape_combine_mask()
+{
+ gdk_window_shape_combine_mask(gobj(), 0, 0, 0); //See GDK docs.
+}
+
+void Window::get_internal_paint_info(Glib::RefPtr<Drawable>& real_drawable, int& x_offset, int& y_offset) const
+{
+ GdkDrawable* temp_drawable = 0;
+ gdk_window_get_internal_paint_info(const_cast<GdkWindow*>(gobj()), &temp_drawable, &x_offset, &y_offset);
+ real_drawable = Glib::wrap(temp_drawable);
+}
+
+} // namespace Gdk
+
+
+namespace
+{
+} // anonymous namespace
+
+// static
+GType Glib::Value<Gdk::EventMask>::value_type()
+{
+ return gdk_event_mask_get_type();
+}
+
+// static
+GType Glib::Value<Gdk::WindowState>::value_type()
+{
+ return gdk_window_state_get_type();
+}
+
+// static
+GType Glib::Value<Gdk::WindowType>::value_type()
+{
+ return gdk_window_type_get_type();
+}
+
+// static
+GType Glib::Value<Gdk::WindowAttributesType>::value_type()
+{
+ return gdk_window_attributes_type_get_type();
+}
+
+// static
+GType Glib::Value<Gdk::WindowHints>::value_type()
+{
+ return gdk_window_hints_get_type();
+}
+
+// static
+GType Glib::Value<Gdk::WindowTypeHint>::value_type()
+{
+ return gdk_window_type_hint_get_type();
+}
+
+// static
+GType Glib::Value<Gdk::WMDecoration>::value_type()
+{
+ return gdk_wm_decoration_get_type();
+}
+
+// static
+GType Glib::Value<Gdk::WMFunction>::value_type()
+{
+ return gdk_wm_function_get_type();
+}
+
+// static
+GType Glib::Value<Gdk::WindowEdge>::value_type()
+{
+ return gdk_window_edge_get_type();
+}
+
+// static
+GType Glib::Value<Gdk::Gravity>::value_type()
+{
+ return gdk_gravity_get_type();
+}
+
+// static
+GType Glib::Value<Gdk::GrabStatus>::value_type()
+{
+ return gdk_grab_status_get_type();
+}
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Gdk::Window> wrap(GdkWindowObject* object, bool take_copy)
+{
+ return Glib::RefPtr<Gdk::Window>( dynamic_cast<Gdk::Window*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} /* namespace Glib */
+
+
+namespace Gdk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Window_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Window_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gdk_window_object_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Window_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* Window_Class::wrap_new(GObject* object)
+{
+ return new Window((GdkWindow*)object);
+}
+
+
+/* The implementation: */
+
+GdkWindow* Window::gobj_copy()
+{
+ reference();
+ return gobj();
+}
+
+Window::Window(const Glib::ConstructParams& construct_params)
+:
+ Gdk::Drawable(construct_params)
+{}
+
+Window::Window(GdkWindow* castitem)
+:
+ Gdk::Drawable((GdkDrawable*)(castitem))
+{}
+
+Window::~Window()
+{}
+
+
+Window::CppClassType Window::window_class_; // initialize static member
+
+GType Window::get_type()
+{
+ return window_class_.init().get_type();
+}
+
+GType Window::get_base_type()
+{
+ return gdk_window_object_get_type();
+}
+
+
+Glib::RefPtr<Window> Window::create(const Glib::RefPtr<Window>& parent, GdkWindowAttr* attributes, int attributes_mask)
+{
+ return Glib::RefPtr<Window>( new Window(parent, attributes, attributes_mask) );
+}
+WindowType Window::get_window_type() const
+{
+ return ((WindowType)(gdk_window_get_window_type(const_cast<GdkWindow*>(gobj()))));
+}
+
+void Window::show()
+{
+ gdk_window_show(gobj());
+}
+
+void Window::hide()
+{
+ gdk_window_hide(gobj());
+}
+
+void Window::withdraw()
+{
+ gdk_window_withdraw(gobj());
+}
+
+void Window::show_unraised()
+{
+ gdk_window_show_unraised(gobj());
+}
+
+void Window::move(int x, int y)
+{
+ gdk_window_move(gobj(), x, y);
+}
+
+void Window::resize(int width, int height)
+{
+ gdk_window_resize(gobj(), width, height);
+}
+
+void Window::move_resize(int x, int y, int width, int height)
+{
+ gdk_window_move_resize(gobj(), x, y, width, height);
+}
+
+void Window::reparent(const Glib::RefPtr<Window>& new_parent, int x, int y)
+{
+ gdk_window_reparent(gobj(), Glib::unwrap(new_parent), x, y);
+}
+
+void Window::clear()
+{
+ gdk_window_clear(gobj());
+}
+
+void Window::clear_area(int x, int y, int width, int height)
+{
+ gdk_window_clear_area(gobj(), x, y, width, height);
+}
+
+void Window::clear_area_e(int x, int y, int width, int height)
+{
+ gdk_window_clear_area_e(gobj(), x, y, width, height);
+}
+
+void Window::raise()
+{
+ gdk_window_raise(gobj());
+}
+
+void Window::lower()
+{
+ gdk_window_lower(gobj());
+}
+
+void Window::focus(guint32 timestamp)
+{
+ gdk_window_focus(gobj(), timestamp);
+}
+
+void Window::set_user_data(gpointer user_data)
+{
+ gdk_window_set_user_data(gobj(), user_data);
+}
+
+void Window::set_override_redirect(bool override_redirect)
+{
+ gdk_window_set_override_redirect(gobj(), static_cast<int>(override_redirect));
+}
+
+void Window::add_filter(GdkFilterFunc function, gpointer data)
+{
+ gdk_window_add_filter(gobj(), function, data);
+}
+
+void Window::remove_filter(GdkFilterFunc function, gpointer data)
+{
+ gdk_window_remove_filter(gobj(), function, data);
+}
+
+void Window::scroll(int dx, int dy)
+{
+ gdk_window_scroll(gobj(), dx, dy);
+}
+
+void Window::shape_combine_mask(const Glib::RefPtr<Bitmap>& mask, int x, int y)
+{
+ gdk_window_shape_combine_mask(gobj(), Glib::unwrap(mask), x, y);
+}
+
+void Window::shape_combine_region(const Region& shape_region, int offset_x, int offset_y)
+{
+ gdk_window_shape_combine_region(gobj(), const_cast<GdkRegion*>((shape_region).gobj()), offset_x, offset_y);
+}
+
+void Window::set_child_shapes()
+{
+ gdk_window_set_child_shapes(gobj());
+}
+
+void Window::merge_child_shapes()
+{
+ gdk_window_merge_child_shapes(gobj());
+}
+
+bool Window::is_visible() const
+{
+ return gdk_window_is_visible(const_cast<GdkWindow*>(gobj()));
+}
+
+bool Window::is_viewable() const
+{
+ return gdk_window_is_viewable(const_cast<GdkWindow*>(gobj()));
+}
+
+WindowState Window::get_state() const
+{
+ return ((WindowState)(gdk_window_get_state(const_cast<GdkWindow*>(gobj()))));
+}
+
+bool Window::set_static_gravities(bool use_static)
+{
+ return gdk_window_set_static_gravities(gobj(), static_cast<int>(use_static));
+}
+
+void Window::set_type_hint(WindowTypeHint hint)
+{
+ gdk_window_set_type_hint(gobj(), ((GdkWindowTypeHint)(hint)));
+}
+
+void Window::set_modal_hint(bool modal)
+{
+ gdk_window_set_modal_hint(gobj(), static_cast<int>(modal));
+}
+
+void Window::set_geometry_hints(const Geometry& geometry, WindowHints geom_mask)
+{
+ gdk_window_set_geometry_hints(gobj(), const_cast<GdkGeometry*>(&(geometry)), ((GdkWindowHints)(geom_mask)));
+}
+
+void Window::set_sm_client_id(const Glib::ustring& sm_client_id)
+{
+ gdk_set_sm_client_id(sm_client_id.c_str());
+}
+
+void Window::begin_paint_rect(Rectangle& rectangle)
+{
+ gdk_window_begin_paint_rect(gobj(), (rectangle).gobj());
+}
+
+void Window::begin_paint_region(const Region& region)
+{
+ gdk_window_begin_paint_region(gobj(), const_cast<GdkRegion*>((region).gobj()));
+}
+
+void Window::end_paint()
+{
+ gdk_window_end_paint(gobj());
+}
+
+void Window::set_title(const Glib::ustring& title)
+{
+ gdk_window_set_title(gobj(), title.c_str());
+}
+
+void Window::set_role(const Glib::ustring& role)
+{
+ gdk_window_set_role(gobj(), role.c_str());
+}
+
+void Window::set_transient_for(const Glib::RefPtr<Window>& parent)
+{
+ gdk_window_set_transient_for(gobj(), Glib::unwrap(parent));
+}
+
+void Window::set_background(const Color& color)
+{
+ gdk_window_set_background(gobj(), (color).gobj());
+}
+
+void Window::set_back_pixmap(const Glib::RefPtr<Pixmap>& pixmap, bool parent_relative)
+{
+ gdk_window_set_back_pixmap(gobj(), Glib::unwrap(pixmap), static_cast<int>(parent_relative));
+}
+
+void Window::set_cursor(const Cursor& cursor)
+{
+ gdk_window_set_cursor(gobj(), (cursor).gobj_copy());
+}
+
+void Window::get_user_data(gpointer* data)
+{
+ gdk_window_get_user_data(gobj(), data);
+}
+
+void Window::get_geometry(int& x, int& y, int& width, int& height, int& depth) const
+{
+ gdk_window_get_geometry(const_cast<GdkWindow*>(gobj()), &x, &y, &width, &height, &depth);
+}
+
+void Window::get_position(int& x, int& y) const
+{
+ gdk_window_get_position(const_cast<GdkWindow*>(gobj()), &x, &y);
+}
+
+int Window::get_origin(int& x, int& y) const
+{
+ return gdk_window_get_origin(const_cast<GdkWindow*>(gobj()), &x, &y);
+}
+
+void Window::get_root_origin(int& x, int& y) const
+{
+ gdk_window_get_root_origin(const_cast<GdkWindow*>(gobj()), &x, &y);
+}
+
+void Window::get_frame_extents(Rectangle& rect)
+{
+ gdk_window_get_frame_extents(gobj(), (rect).gobj());
+}
+
+Glib::RefPtr<Window> Window::get_pointer(int& x, int& y, ModifierType& mask)
+{
+
+ Glib::RefPtr<Window> retvalue = Glib::wrap((GdkWindowObject*)(gdk_window_get_pointer(gobj(), &x, &y, ((GdkModifierType*) &(mask)))));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<Window> Window::get_parent()
+{
+
+ Glib::RefPtr<Window> retvalue = Glib::wrap((GdkWindowObject*)(gdk_window_get_parent(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const Window> Window::get_parent() const
+{
+
+ Glib::RefPtr<const Window> retvalue = Glib::wrap((GdkWindowObject*)(gdk_window_get_parent(const_cast<GdkWindow*>(gobj()))));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<Window> Window::get_toplevel()
+{
+
+ Glib::RefPtr<Window> retvalue = Glib::wrap((GdkWindowObject*)(gdk_window_get_toplevel(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const Window> Window::get_toplevel() const
+{
+
+ Glib::RefPtr<const Window> retvalue = Glib::wrap((GdkWindowObject*)(gdk_window_get_toplevel(const_cast<GdkWindow*>(gobj()))));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::ListHandle< Glib::RefPtr<Window> > Window::get_children()
+{
+ return Glib::ListHandle< Glib::RefPtr<Window> >(gdk_window_get_children(gobj()), Glib::OWNERSHIP_SHALLOW);
+}
+
+Glib::ListHandle< Glib::RefPtr<const Window> > Window::get_children() const
+{
+ return Glib::ListHandle< Glib::RefPtr<const Window> >(gdk_window_get_children(const_cast<GdkWindow*>(gobj())), Glib::OWNERSHIP_SHALLOW);
+}
+
+EventMask Window::get_events() const
+{
+ return ((EventMask)(gdk_window_get_events(const_cast<GdkWindow*>(gobj()))));
+}
+
+void Window::set_events(EventMask event_mask)
+{
+ gdk_window_set_events(gobj(), ((GdkEventMask)(event_mask)));
+}
+
+void Window::set_icon_list(const Glib::ListHandle< Glib::RefPtr<Gdk::Pixbuf> >& pixbufs)
+{
+ gdk_window_set_icon_list(gobj(), pixbufs.data());
+}
+
+void Window::set_icon(const Glib::RefPtr<Window>& icon_window, const Glib::RefPtr<Pixmap>& pixmap, const Glib::RefPtr<Bitmap>& mask)
+{
+ gdk_window_set_icon(gobj(), Glib::unwrap(icon_window), Glib::unwrap(pixmap), Glib::unwrap(mask));
+}
+
+void Window::set_icon_name(const Glib::ustring& name)
+{
+ gdk_window_set_icon_name(gobj(), name.c_str());
+}
+
+void Window::set_group(const Glib::RefPtr<Window>& leader)
+{
+ gdk_window_set_group(gobj(), Glib::unwrap(leader));
+}
+
+Glib::RefPtr<Window> Window::get_group()
+{
+ return Glib::wrap((GdkWindowObject*)(gdk_window_get_group(gobj())));
+}
+
+Glib::RefPtr<const Window> Window::get_group() const
+{
+ return Glib::wrap((GdkWindowObject*)(gdk_window_get_group(const_cast<GdkWindow*>(gobj()))));
+}
+
+void Window::set_decorations(WMDecoration decorations)
+{
+ gdk_window_set_decorations(gobj(), ((GdkWMDecoration)(decorations)));
+}
+
+bool Window::get_decorations(WMDecoration& decorations) const
+{
+ return gdk_window_get_decorations(const_cast<GdkWindow*>(gobj()), ((GdkWMDecoration*) &(decorations)));
+}
+
+void Window::set_functions(WMFunction functions)
+{
+ gdk_window_set_functions(gobj(), ((GdkWMFunction)(functions)));
+}
+
+Glib::ListHandle< Glib::RefPtr<Window> > Window::get_toplevels()
+{
+ return Glib::ListHandle< Glib::RefPtr<Window> >(gdk_window_get_toplevels(), Glib::OWNERSHIP_SHALLOW);
+}
+
+void Window::iconify()
+{
+ gdk_window_iconify(gobj());
+}
+
+void Window::deiconify()
+{
+ gdk_window_deiconify(gobj());
+}
+
+void Window::stick()
+{
+ gdk_window_stick(gobj());
+}
+
+void Window::unstick()
+{
+ gdk_window_unstick(gobj());
+}
+
+void Window::maximize()
+{
+ gdk_window_maximize(gobj());
+}
+
+void Window::unmaximize()
+{
+ gdk_window_unmaximize(gobj());
+}
+
+void Window::register_dnd()
+{
+ gdk_window_register_dnd(gobj());
+}
+
+void Window::begin_resize_drag(WindowEdge edge, int button, int root_x, int root_y, guint32 timestamp)
+{
+ gdk_window_begin_resize_drag(gobj(), ((GdkWindowEdge)(edge)), button, root_x, root_y, timestamp);
+}
+
+void Window::begin_move_drag(int button, int root_x, int root_y, guint32 timestamp)
+{
+ gdk_window_begin_move_drag(gobj(), button, root_x, root_y, timestamp);
+}
+
+void Window::invalidate_rect(const Rectangle& rect, bool invalidate_children)
+{
+ gdk_window_invalidate_rect(gobj(), const_cast<GdkRectangle*>(rect.gobj()), static_cast<int>(invalidate_children));
+}
+
+void Window::invalidate_region(const Region& region, bool invalidate_children)
+{
+ gdk_window_invalidate_region(gobj(), const_cast<GdkRegion*>((region).gobj()), static_cast<int>(invalidate_children));
+}
+
+Region Window::get_update_area()
+{
+ return Region(gdk_window_get_update_area(gobj()));
+}
+
+void Window::freeze_updates()
+{
+ gdk_window_freeze_updates(gobj());
+}
+
+void Window::thaw_updates()
+{
+ gdk_window_thaw_updates(gobj());
+}
+
+void Window::process_all_updates()
+{
+ gdk_window_process_all_updates();
+}
+
+void Window::process_updates(bool update_children)
+{
+ gdk_window_process_updates(gobj(), static_cast<int>(update_children));
+}
+
+void Window::set_debug_updates(bool setting)
+{
+ gdk_window_set_debug_updates(static_cast<int>(setting));
+}
+
+void Window::constrain_size(const Geometry& geometry, guint flags, int width, int height, int& new_width, int& new_height)
+{
+ gdk_window_constrain_size(const_cast<GdkGeometry*>(&(geometry)), flags, width, height, &new_width, &new_height);
+}
+
+void Window::enable_synchronized_configure()
+{
+ gdk_window_enable_synchronized_configure(gobj());
+}
+
+void Window::configure_finished()
+{
+ gdk_window_configure_finished(gobj());
+}
+
+void Window::set_skip_taskbar_hint(bool skips_taskbar)
+{
+ gdk_window_set_skip_taskbar_hint(gobj(), static_cast<int>(skips_taskbar));
+}
+
+void Window::set_skip_pager_hint(bool skips_pager)
+{
+ gdk_window_set_skip_pager_hint(gobj(), static_cast<int>(skips_pager));
+}
+
+void Window::fullscreen()
+{
+ gdk_window_fullscreen(gobj());
+}
+
+void Window::unfullscreen()
+{
+ gdk_window_unfullscreen(gobj());
+}
+
+GrabStatus Window::pointer_grab(bool owner_events, EventMask event_mask, const Glib::RefPtr<const Window>& confine_to, const Cursor& cursor, guint32 time_)
+{
+ return ((GrabStatus)(gdk_pointer_grab(gobj(), static_cast<int>(owner_events), ((GdkEventMask)(event_mask)), const_cast<GdkWindow*>(Glib::unwrap<Gdk::Window>(confine_to)), (cursor).gobj_copy(), time_)));
+}
+
+void Window::pointer_ungrab(guint32 timestamp)
+{
+ gdk_pointer_ungrab(timestamp);
+}
+
+GrabStatus Window::keyboard_grab(bool owner_events, guint32 timestamp)
+{
+ return ((GrabStatus)(gdk_keyboard_grab(gobj(), static_cast<int>(owner_events), timestamp)));
+}
+
+void Window::keyboard_ungrab(guint32 timestamp)
+{
+ gdk_keyboard_ungrab(timestamp);
+}
+
+void Window::set_keep_above(bool setting)
+{
+ gdk_window_set_keep_above(gobj(), static_cast<int>(setting));
+}
+
+void Window::set_keep_below(bool setting)
+{
+ gdk_window_set_keep_below(gobj(), static_cast<int>(setting));
+}
+
+void Window::set_accept_focus(bool accept_focus)
+{
+ gdk_window_set_accept_focus(gobj(), static_cast<int>(accept_focus));
+}
+
+void Window::set_focus_on_map(bool focus_on_map)
+{
+ gdk_window_set_focus_on_map(gobj(), static_cast<int>(focus_on_map));
+}
+
+
+} // namespace Gdk
+
+
diff --git a/libs/gtkmm2/gdk/gdkmm/window.h b/libs/gtkmm2/gdk/gdkmm/window.h
new file mode 100644
index 0000000000..7b8d9c614d
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/window.h
@@ -0,0 +1,1906 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GDKMM_WINDOW_H
+#define _GDKMM_WINDOW_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright(C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License or(at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not write to the Free
+ * Software Foundation Inc. 675 Mass Ave Cambridge MA 02139 USA.
+ */
+
+#include <gdkmm/drawable.h>
+#include <gdkmm/bitmap.h>
+//#include <gdkmm/cursor.h>
+#include <gdkmm/types.h>
+#include <gdkmm/region.h>
+#include <gdk/gdkwindow.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C" {
+// Custom struct prototype, because this isn't what the code-generator expects:
+typedef struct _GdkDrawable GdkWindow;
+} // extern "C"
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gdk
+{ class Window_Class; } // namespace Gdk
+namespace Gdk
+{
+
+
+/** @addtogroup gdkmmEnums Enums and Flags */
+
+/**
+ * @ingroup gdkmmEnums
+ * @par Bitwise operators:
+ * <tt>%EventMask operator|(EventMask, EventMask)</tt><br>
+ * <tt>%EventMask operator&(EventMask, EventMask)</tt><br>
+ * <tt>%EventMask operator^(EventMask, EventMask)</tt><br>
+ * <tt>%EventMask operator~(EventMask)</tt><br>
+ * <tt>%EventMask& operator|=(EventMask&, EventMask)</tt><br>
+ * <tt>%EventMask& operator&=(EventMask&, EventMask)</tt><br>
+ * <tt>%EventMask& operator^=(EventMask&, EventMask)</tt><br>
+ */
+enum EventMask
+{
+ EXPOSURE_MASK = 1 << 1,
+ POINTER_MOTION_MASK = 1 << 2,
+ POINTER_MOTION_HINT_MASK = 1 << 3,
+ BUTTON_MOTION_MASK = 1 << 4,
+ BUTTON1_MOTION_MASK = 1 << 5,
+ BUTTON2_MOTION_MASK = 1 << 6,
+ BUTTON3_MOTION_MASK = 1 << 7,
+ BUTTON_PRESS_MASK = 1 << 8,
+ BUTTON_RELEASE_MASK = 1 << 9,
+ KEY_PRESS_MASK = 1 << 10,
+ KEY_RELEASE_MASK = 1 << 11,
+ ENTER_NOTIFY_MASK = 1 << 12,
+ LEAVE_NOTIFY_MASK = 1 << 13,
+ FOCUS_CHANGE_MASK = 1 << 14,
+ STRUCTURE_MASK = 1 << 15,
+ PROPERTY_CHANGE_MASK = 1 << 16,
+ VISIBILITY_NOTIFY_MASK = 1 << 17,
+ PROXIMITY_IN_MASK = 1 << 18,
+ PROXIMITY_OUT_MASK = 1 << 19,
+ SUBSTRUCTURE_MASK = 1 << 20,
+ SCROLL_MASK = 1 << 21,
+ ALL_EVENTS_MASK = 0x3FFFFE
+};
+
+/** @ingroup gdkmmEnums */
+inline EventMask operator|(EventMask lhs, EventMask rhs)
+ { return static_cast<EventMask>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
+
+/** @ingroup gdkmmEnums */
+inline EventMask operator&(EventMask lhs, EventMask rhs)
+ { return static_cast<EventMask>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
+
+/** @ingroup gdkmmEnums */
+inline EventMask operator^(EventMask lhs, EventMask rhs)
+ { return static_cast<EventMask>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
+
+/** @ingroup gdkmmEnums */
+inline EventMask operator~(EventMask flags)
+ { return static_cast<EventMask>(~static_cast<unsigned>(flags)); }
+
+/** @ingroup gdkmmEnums */
+inline EventMask& operator|=(EventMask& lhs, EventMask rhs)
+ { return (lhs = static_cast<EventMask>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
+
+/** @ingroup gdkmmEnums */
+inline EventMask& operator&=(EventMask& lhs, EventMask rhs)
+ { return (lhs = static_cast<EventMask>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
+
+/** @ingroup gdkmmEnums */
+inline EventMask& operator^=(EventMask& lhs, EventMask rhs)
+ { return (lhs = static_cast<EventMask>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
+
+} // namespace Gdk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gdk::EventMask> : public Glib::Value_Flags<Gdk::EventMask>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gdk
+{
+
+/**
+ * @ingroup gdkmmEnums
+ * @par Bitwise operators:
+ * <tt>%WindowState operator|(WindowState, WindowState)</tt><br>
+ * <tt>%WindowState operator&(WindowState, WindowState)</tt><br>
+ * <tt>%WindowState operator^(WindowState, WindowState)</tt><br>
+ * <tt>%WindowState operator~(WindowState)</tt><br>
+ * <tt>%WindowState& operator|=(WindowState&, WindowState)</tt><br>
+ * <tt>%WindowState& operator&=(WindowState&, WindowState)</tt><br>
+ * <tt>%WindowState& operator^=(WindowState&, WindowState)</tt><br>
+ */
+enum WindowState
+{
+ WINDOW_STATE_WITHDRAWN = 1 << 0,
+ WINDOW_STATE_ICONIFIED = 1 << 1,
+ WINDOW_STATE_MAXIMIZED = 1 << 2,
+ WINDOW_STATE_STICKY = 1 << 3,
+ WINDOW_STATE_FULLSCREEN = 1 << 4,
+ WINDOW_STATE_ABOVE = 1 << 5,
+ WINDOW_STATE_BELOW = 1 << 6
+};
+
+/** @ingroup gdkmmEnums */
+inline WindowState operator|(WindowState lhs, WindowState rhs)
+ { return static_cast<WindowState>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
+
+/** @ingroup gdkmmEnums */
+inline WindowState operator&(WindowState lhs, WindowState rhs)
+ { return static_cast<WindowState>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
+
+/** @ingroup gdkmmEnums */
+inline WindowState operator^(WindowState lhs, WindowState rhs)
+ { return static_cast<WindowState>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
+
+/** @ingroup gdkmmEnums */
+inline WindowState operator~(WindowState flags)
+ { return static_cast<WindowState>(~static_cast<unsigned>(flags)); }
+
+/** @ingroup gdkmmEnums */
+inline WindowState& operator|=(WindowState& lhs, WindowState rhs)
+ { return (lhs = static_cast<WindowState>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
+
+/** @ingroup gdkmmEnums */
+inline WindowState& operator&=(WindowState& lhs, WindowState rhs)
+ { return (lhs = static_cast<WindowState>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
+
+/** @ingroup gdkmmEnums */
+inline WindowState& operator^=(WindowState& lhs, WindowState rhs)
+ { return (lhs = static_cast<WindowState>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
+
+} // namespace Gdk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gdk::WindowState> : public Glib::Value_Flags<Gdk::WindowState>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gdk
+{
+
+/**
+ * @ingroup gdkmmEnums
+ */
+enum WindowType
+{
+ WINDOW_ROOT,
+ WINDOW_TOPLEVEL,
+ WINDOW_CHILD,
+ WINDOW_DIALOG,
+ WINDOW_TEMP,
+ WINDOW_FOREIGN
+};
+
+} // namespace Gdk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gdk::WindowType> : public Glib::Value_Enum<Gdk::WindowType>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gdk
+{
+
+/**
+ * @ingroup gdkmmEnums
+ * @par Bitwise operators:
+ * <tt>%WindowAttributesType operator|(WindowAttributesType, WindowAttributesType)</tt><br>
+ * <tt>%WindowAttributesType operator&(WindowAttributesType, WindowAttributesType)</tt><br>
+ * <tt>%WindowAttributesType operator^(WindowAttributesType, WindowAttributesType)</tt><br>
+ * <tt>%WindowAttributesType operator~(WindowAttributesType)</tt><br>
+ * <tt>%WindowAttributesType& operator|=(WindowAttributesType&, WindowAttributesType)</tt><br>
+ * <tt>%WindowAttributesType& operator&=(WindowAttributesType&, WindowAttributesType)</tt><br>
+ * <tt>%WindowAttributesType& operator^=(WindowAttributesType&, WindowAttributesType)</tt><br>
+ */
+enum WindowAttributesType
+{
+ WA_TITLE = 1 << 1,
+ WA_X = 1 << 2,
+ WA_Y = 1 << 3,
+ WA_CURSOR = 1 << 4,
+ WA_COLORMAP = 1 << 5,
+ WA_VISUAL = 1 << 6,
+ WA_WMCLASS = 1 << 7,
+ WA_NOREDIR = 1 << 8
+};
+
+/** @ingroup gdkmmEnums */
+inline WindowAttributesType operator|(WindowAttributesType lhs, WindowAttributesType rhs)
+ { return static_cast<WindowAttributesType>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
+
+/** @ingroup gdkmmEnums */
+inline WindowAttributesType operator&(WindowAttributesType lhs, WindowAttributesType rhs)
+ { return static_cast<WindowAttributesType>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
+
+/** @ingroup gdkmmEnums */
+inline WindowAttributesType operator^(WindowAttributesType lhs, WindowAttributesType rhs)
+ { return static_cast<WindowAttributesType>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
+
+/** @ingroup gdkmmEnums */
+inline WindowAttributesType operator~(WindowAttributesType flags)
+ { return static_cast<WindowAttributesType>(~static_cast<unsigned>(flags)); }
+
+/** @ingroup gdkmmEnums */
+inline WindowAttributesType& operator|=(WindowAttributesType& lhs, WindowAttributesType rhs)
+ { return (lhs = static_cast<WindowAttributesType>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
+
+/** @ingroup gdkmmEnums */
+inline WindowAttributesType& operator&=(WindowAttributesType& lhs, WindowAttributesType rhs)
+ { return (lhs = static_cast<WindowAttributesType>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
+
+/** @ingroup gdkmmEnums */
+inline WindowAttributesType& operator^=(WindowAttributesType& lhs, WindowAttributesType rhs)
+ { return (lhs = static_cast<WindowAttributesType>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
+
+} // namespace Gdk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gdk::WindowAttributesType> : public Glib::Value_Flags<Gdk::WindowAttributesType>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gdk
+{
+
+/**
+ * @ingroup gdkmmEnums
+ * @par Bitwise operators:
+ * <tt>%WindowHints operator|(WindowHints, WindowHints)</tt><br>
+ * <tt>%WindowHints operator&(WindowHints, WindowHints)</tt><br>
+ * <tt>%WindowHints operator^(WindowHints, WindowHints)</tt><br>
+ * <tt>%WindowHints operator~(WindowHints)</tt><br>
+ * <tt>%WindowHints& operator|=(WindowHints&, WindowHints)</tt><br>
+ * <tt>%WindowHints& operator&=(WindowHints&, WindowHints)</tt><br>
+ * <tt>%WindowHints& operator^=(WindowHints&, WindowHints)</tt><br>
+ */
+enum WindowHints
+{
+ HINT_POS = 1 << 0,
+ HINT_MIN_SIZE = 1 << 1,
+ HINT_MAX_SIZE = 1 << 2,
+ HINT_BASE_SIZE = 1 << 3,
+ HINT_ASPECT = 1 << 4,
+ HINT_RESIZE_INC = 1 << 5,
+ HINT_WIN_GRAVITY = 1 << 6,
+ HINT_USER_POS = 1 << 7,
+ HINT_USER_SIZE = 1 << 8
+};
+
+/** @ingroup gdkmmEnums */
+inline WindowHints operator|(WindowHints lhs, WindowHints rhs)
+ { return static_cast<WindowHints>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
+
+/** @ingroup gdkmmEnums */
+inline WindowHints operator&(WindowHints lhs, WindowHints rhs)
+ { return static_cast<WindowHints>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
+
+/** @ingroup gdkmmEnums */
+inline WindowHints operator^(WindowHints lhs, WindowHints rhs)
+ { return static_cast<WindowHints>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
+
+/** @ingroup gdkmmEnums */
+inline WindowHints operator~(WindowHints flags)
+ { return static_cast<WindowHints>(~static_cast<unsigned>(flags)); }
+
+/** @ingroup gdkmmEnums */
+inline WindowHints& operator|=(WindowHints& lhs, WindowHints rhs)
+ { return (lhs = static_cast<WindowHints>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
+
+/** @ingroup gdkmmEnums */
+inline WindowHints& operator&=(WindowHints& lhs, WindowHints rhs)
+ { return (lhs = static_cast<WindowHints>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
+
+/** @ingroup gdkmmEnums */
+inline WindowHints& operator^=(WindowHints& lhs, WindowHints rhs)
+ { return (lhs = static_cast<WindowHints>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
+
+} // namespace Gdk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gdk::WindowHints> : public Glib::Value_Flags<Gdk::WindowHints>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gdk
+{
+
+/**
+ * @ingroup gdkmmEnums
+ */
+enum WindowTypeHint
+{
+ WINDOW_TYPE_HINT_NORMAL,
+ WINDOW_TYPE_HINT_DIALOG,
+ WINDOW_TYPE_HINT_MENU,
+ WINDOW_TYPE_HINT_TOOLBAR,
+ WINDOW_TYPE_HINT_SPLASHSCREEN,
+ WINDOW_TYPE_HINT_UTILITY,
+ WINDOW_TYPE_HINT_DOCK,
+ WINDOW_TYPE_HINT_DESKTOP
+};
+
+} // namespace Gdk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gdk::WindowTypeHint> : public Glib::Value_Enum<Gdk::WindowTypeHint>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gdk
+{
+
+/**
+ * @ingroup gdkmmEnums
+ * @par Bitwise operators:
+ * <tt>%WMDecoration operator|(WMDecoration, WMDecoration)</tt><br>
+ * <tt>%WMDecoration operator&(WMDecoration, WMDecoration)</tt><br>
+ * <tt>%WMDecoration operator^(WMDecoration, WMDecoration)</tt><br>
+ * <tt>%WMDecoration operator~(WMDecoration)</tt><br>
+ * <tt>%WMDecoration& operator|=(WMDecoration&, WMDecoration)</tt><br>
+ * <tt>%WMDecoration& operator&=(WMDecoration&, WMDecoration)</tt><br>
+ * <tt>%WMDecoration& operator^=(WMDecoration&, WMDecoration)</tt><br>
+ */
+enum WMDecoration
+{
+ DECOR_ALL = 1 << 0,
+ DECOR_BORDER = 1 << 1,
+ DECOR_RESIZEH = 1 << 2,
+ DECOR_TITLE = 1 << 3,
+ DECOR_MENU = 1 << 4,
+ DECOR_MINIMIZE = 1 << 5,
+ DECOR_MAXIMIZE = 1 << 6
+};
+
+/** @ingroup gdkmmEnums */
+inline WMDecoration operator|(WMDecoration lhs, WMDecoration rhs)
+ { return static_cast<WMDecoration>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
+
+/** @ingroup gdkmmEnums */
+inline WMDecoration operator&(WMDecoration lhs, WMDecoration rhs)
+ { return static_cast<WMDecoration>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
+
+/** @ingroup gdkmmEnums */
+inline WMDecoration operator^(WMDecoration lhs, WMDecoration rhs)
+ { return static_cast<WMDecoration>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
+
+/** @ingroup gdkmmEnums */
+inline WMDecoration operator~(WMDecoration flags)
+ { return static_cast<WMDecoration>(~static_cast<unsigned>(flags)); }
+
+/** @ingroup gdkmmEnums */
+inline WMDecoration& operator|=(WMDecoration& lhs, WMDecoration rhs)
+ { return (lhs = static_cast<WMDecoration>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
+
+/** @ingroup gdkmmEnums */
+inline WMDecoration& operator&=(WMDecoration& lhs, WMDecoration rhs)
+ { return (lhs = static_cast<WMDecoration>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
+
+/** @ingroup gdkmmEnums */
+inline WMDecoration& operator^=(WMDecoration& lhs, WMDecoration rhs)
+ { return (lhs = static_cast<WMDecoration>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
+
+} // namespace Gdk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gdk::WMDecoration> : public Glib::Value_Flags<Gdk::WMDecoration>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gdk
+{
+
+/**
+ * @ingroup gdkmmEnums
+ * @par Bitwise operators:
+ * <tt>%WMFunction operator|(WMFunction, WMFunction)</tt><br>
+ * <tt>%WMFunction operator&(WMFunction, WMFunction)</tt><br>
+ * <tt>%WMFunction operator^(WMFunction, WMFunction)</tt><br>
+ * <tt>%WMFunction operator~(WMFunction)</tt><br>
+ * <tt>%WMFunction& operator|=(WMFunction&, WMFunction)</tt><br>
+ * <tt>%WMFunction& operator&=(WMFunction&, WMFunction)</tt><br>
+ * <tt>%WMFunction& operator^=(WMFunction&, WMFunction)</tt><br>
+ */
+enum WMFunction
+{
+ FUNC_ALL = 1 << 0,
+ FUNC_RESIZE = 1 << 1,
+ FUNC_MOVE = 1 << 2,
+ FUNC_MINIMIZE = 1 << 3,
+ FUNC_MAXIMIZE = 1 << 4,
+ FUNC_CLOSE = 1 << 5
+};
+
+/** @ingroup gdkmmEnums */
+inline WMFunction operator|(WMFunction lhs, WMFunction rhs)
+ { return static_cast<WMFunction>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
+
+/** @ingroup gdkmmEnums */
+inline WMFunction operator&(WMFunction lhs, WMFunction rhs)
+ { return static_cast<WMFunction>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
+
+/** @ingroup gdkmmEnums */
+inline WMFunction operator^(WMFunction lhs, WMFunction rhs)
+ { return static_cast<WMFunction>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
+
+/** @ingroup gdkmmEnums */
+inline WMFunction operator~(WMFunction flags)
+ { return static_cast<WMFunction>(~static_cast<unsigned>(flags)); }
+
+/** @ingroup gdkmmEnums */
+inline WMFunction& operator|=(WMFunction& lhs, WMFunction rhs)
+ { return (lhs = static_cast<WMFunction>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
+
+/** @ingroup gdkmmEnums */
+inline WMFunction& operator&=(WMFunction& lhs, WMFunction rhs)
+ { return (lhs = static_cast<WMFunction>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
+
+/** @ingroup gdkmmEnums */
+inline WMFunction& operator^=(WMFunction& lhs, WMFunction rhs)
+ { return (lhs = static_cast<WMFunction>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
+
+} // namespace Gdk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gdk::WMFunction> : public Glib::Value_Flags<Gdk::WMFunction>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gdk
+{
+
+/**
+ * @ingroup gdkmmEnums
+ */
+enum WindowEdge
+{
+ WINDOW_EDGE_NORTH_WEST,
+ WINDOW_EDGE_NORTH,
+ WINDOW_EDGE_NORTH_EAST,
+ WINDOW_EDGE_WEST,
+ WINDOW_EDGE_EAST,
+ WINDOW_EDGE_SOUTH_WEST,
+ WINDOW_EDGE_SOUTH,
+ WINDOW_EDGE_SOUTH_EAST
+};
+
+} // namespace Gdk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gdk::WindowEdge> : public Glib::Value_Enum<Gdk::WindowEdge>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gdk
+{
+
+/**
+ * @ingroup gdkmmEnums
+ */
+enum Gravity
+{
+ GRAVITY_NORTH_WEST = 1,
+ GRAVITY_NORTH,
+ GRAVITY_NORTH_EAST,
+ GRAVITY_WEST,
+ GRAVITY_CENTER,
+ GRAVITY_EAST,
+ GRAVITY_SOUTH_WEST,
+ GRAVITY_SOUTH,
+ GRAVITY_SOUTH_EAST,
+ GRAVITY_STATIC
+};
+
+} // namespace Gdk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gdk::Gravity> : public Glib::Value_Enum<Gdk::Gravity>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gdk
+{
+
+/**
+ * @ingroup gdkmmEnums
+ */
+enum GrabStatus
+{
+ GRAB_SUCCESS,
+ GRAB_ALREADY_GRABBED,
+ GRAB_INVALID_TIME,
+ GRAB_NOT_VIEWABLE,
+ GRAB_FROZEN
+};
+
+} // namespace Gdk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gdk::GrabStatus> : public Glib::Value_Enum<Gdk::GrabStatus>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gdk
+{
+
+
+class Cursor;
+
+/** A Gdk::Window is a rectangular region on the screen. It's a low-level object, used to implement high-level objects such
+ * as Gtk::Widget and Gtk::Window on the GTK+ level. A Gtk::Window is a toplevel window, the thing a user might think of as
+ * a "window" with a titlebar and so on; a Gtk::Window may contain many Gdk::Windows. For example, each Gtk::Button has a
+ * Gdk::Window associated with it.
+ */
+
+class Window : public Gdk::Drawable
+{
+ // GdkWindow is a typedef to GdkDrawable, but it's actually a GdkWindowObject.
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef Window CppObjectType;
+ typedef Window_Class CppClassType;
+ typedef GdkWindow BaseObjectType;
+ typedef GdkWindowObjectClass BaseClassType;
+
+private: friend class Window_Class;
+ static CppClassType window_class_;
+
+private:
+ // noncopyable
+ Window(const Window&);
+ Window& operator=(const Window&);
+
+protected:
+ explicit Window(const Glib::ConstructParams& construct_params);
+ explicit Window(GdkWindow* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~Window();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ GdkWindow* gobj() { return reinterpret_cast<GdkWindow*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const GdkWindow* gobj() const { return reinterpret_cast<GdkWindow*>(gobject_); }
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ GdkWindow* gobj_copy();
+
+private:
+
+
+protected:
+ Window(const Glib::RefPtr<Window>& parent, GdkWindowAttr* attributes, int attributes_mask);
+
+public:
+
+ static Glib::RefPtr<Window> create(const Glib::RefPtr<Window>& parent, GdkWindowAttr* attributes, int attributes_mask);
+
+
+ /** Gets the type of the window. See Gdk::WindowType.
+ * @return Type of window.
+ */
+ WindowType get_window_type() const;
+
+ /** Like gdk_window_show_unraised(), but also raises the window to the
+ * top of the window stack (moves the window to the front of the
+ * Z-order).
+ *
+ * This function maps a window so it's visible onscreen. Its opposite
+ * is gdk_window_hide().
+ *
+ * When implementing a Gtk::Widget, you should call this function on the widget's
+ * Gdk::Window as part of the "map" method.
+ */
+ void show();
+
+ /** For toplevel windows, withdraws them, so they will no longer be
+ * known to the window manager; for all windows, unmaps them, so
+ * they won't be displayed. Normally done automatically as
+ * part of gtk_widget_hide().
+ */
+ void hide();
+
+ /** Withdraws a window (unmaps it and asks the window manager to forget about it).
+ * This function is not really useful as gdk_window_hide() automatically
+ * withdraws toplevel windows before hiding them.
+ */
+ void withdraw();
+
+ /** Shows a Gdk::Window onscreen, but does not modify its stacking
+ * order. In contrast, gdk_window_show() will raise the window
+ * to the top of the window stack.
+ *
+ * On the X11 platform, in Xlib terms, this function calls
+ * XMapWindow() (it also updates some internal GDK state, which means
+ * that you can't really use XMapWindow() directly on a GDK window).
+ */
+ void show_unraised();
+
+ /** Repositions a window relative to its parent window.
+ * For toplevel windows, window managers may ignore or modify the move;
+ * you should probably use gtk_window_move() on a Gtk::Window widget
+ * anyway, instead of using GDK functions. For child windows,
+ * the move will reliably succeed.
+ *
+ * If you're also planning to resize the window, use gdk_window_move_resize()
+ * to both move and resize simultaneously, for a nicer visual effect.
+ * @param x X coordinate relative to window's parent.
+ * @param y Y coordinate relative to window's parent.
+ */
+ void move(int x, int y);
+
+ /** Resizes @a window ; for toplevel windows, asks the window manager to resize
+ * the window. The window manager may not allow the resize. When using GTK+,
+ * use gtk_window_resize() instead of this low-level GDK function.
+ *
+ * Windows may not be resized below 1x1.
+ *
+ * If you're also planning to move the window, use gdk_window_move_resize()
+ * to both move and resize simultaneously, for a nicer visual effect.
+ * @param width New width of the window.
+ * @param height New height of the window.
+ */
+ void resize(int width, int height);
+
+ /** Equivalent to calling gdk_window_move() and gdk_window_resize(),
+ * except that both operations are performed at once, avoiding strange
+ * visual effects. (i.e. the user may be able to see the window first
+ * move, then resize, if you don't use gdk_window_move_resize().)
+ * @param x New X position relative to window's parent.
+ * @param y New Y position relative to window's parent.
+ * @param width New width.
+ * @param height New height.
+ */
+ void move_resize(int x, int y, int width, int height);
+
+ /** Reparents @a window into the given @a new_parent . The window being
+ * reparented will be unmapped as a side effect.
+ * @param new_parent New parent to move @a window into.
+ * @param x X location inside the new parent.
+ * @param y Y location inside the new parent.
+ */
+ void reparent(const Glib::RefPtr<Window>& new_parent, int x, int y);
+
+ /** Clears an entire @a window to the background color or background pixmap.
+ */
+ void clear();
+
+ /** Clears an area of @a window to the background color or background pixmap.
+ * @param x X coordinate of rectangle to clear.
+ * @param y Y coordinate of rectangle to clear.
+ * @param width Width of rectangle to clear.
+ * @param height Height of rectangle to clear.
+ */
+ void clear_area(int x, int y, int width, int height);
+
+ /** Like gdk_window_clear_area(), but also generates an expose event for
+ * the cleared area.
+ *
+ * This function has a stupid name because it dates back to the mists
+ * time, pre-GDK-1.0.
+ * @param x X coordinate of rectangle to clear.
+ * @param y Y coordinate of rectangle to clear.
+ * @param width Width of rectangle to clear.
+ * @param height Height of rectangle to clear.
+ */
+ void clear_area_e(int x, int y, int width, int height);
+
+ /** Raises @a window to the top of the Z-order (stacking order), so that
+ * other windows with the same parent window appear below @a window .
+ * This is true whether or not the windows are visible.
+ *
+ * If @a window is a toplevel, the window manager may choose to deny the
+ * request to move the window in the Z-order, gdk_window_raise() only
+ * requests the restack, does not guarantee it.
+ */
+ void raise();
+
+ /** Lowers @a window to the bottom of the Z-order (stacking order), so that
+ * other windows with the same parent window appear above @a window .
+ * This is true whether or not the other windows are visible.
+ *
+ * If @a window is a toplevel, the window manager may choose to deny the
+ * request to move the window in the Z-order, gdk_window_lower() only
+ * requests the restack, does not guarantee it.
+ *
+ * Note that gdk_window_show() raises the window again, so don't call this
+ * function before gdk_window_show(). (Try gdk_window_show_unraised().)
+ */
+ void lower();
+
+ /** Sets keyboard focus to @a window . If @a window is not onscreen this
+ * will not work. In most cases, gtk_window_present() should be used on
+ * a Gtk::Window, rather than calling this function.
+ * @param timestamp Timestamp of the event triggering the window focus.
+ */
+ void focus(guint32 timestamp);
+
+ /** For most purposes this function is deprecated in favor of
+ * Glib::object_set_data(). However, for historical reasons GTK+ stores
+ * the Gtk::Widget that owns a Gdk::Window as user data on the
+ * Gdk::Window. So, custom widget implementations should use
+ * this function for that. If GTK+ receives an event for a Gdk::Window,
+ * and the user data for the window is non-<tt>0</tt>, GTK+ will assume the
+ * user data is a Gtk::Widget, and forward the event to that widget.
+ * @param user_data User data.
+ */
+ void set_user_data(gpointer user_data);
+
+ /** An override redirect window is not under the control of the window manager.
+ * This means it won't have a titlebar, won't be minimizable, etc. - it will
+ * be entirely under the control of the application. The window manager
+ * can't see the override redirect window at all.
+ *
+ * Override redirect should only be used for short-lived temporary
+ * windows, such as popup menus. Gtk::Menu uses an override redirect
+ * window in its implementation, for example.
+ * @param override_redirect <tt>true</tt> if window should be override redirect.
+ */
+ void set_override_redirect(bool override_redirect = true);
+
+ //We could wrap these with a Slot instead of a C callback, but these methods are very low-level anyway.
+
+ /** Adds an event filter to @a window , allowing you to intercept events
+ * before they reach GDK. This is a low-level operation and makes it
+ * easy to break GDK and/or GTK+, so you have to know what you're
+ * doing. Pass <tt>0</tt> for @a window to get all events for all windows,
+ * instead of events for a specific window.
+ * @param function Filter callback.
+ * @param data Data to pass to filter callback.
+ */
+ void add_filter(GdkFilterFunc function, gpointer data);
+
+ /** Remove a filter previously added with gdk_window_add_filter().
+ * @param function Previously-added filter function.
+ * @param data User data for previously-added filter function.
+ */
+ void remove_filter(GdkFilterFunc function, gpointer data);
+
+
+ /** Scroll the contents of @a window , both pixels and children, by the given
+ * amount. @a window itself does not move. Portions of the window that the scroll
+ * operation brings in from offscreen areas are invalidated. The invalidated
+ * region may be bigger than what would strictly be necessary. (For X11, a
+ * minimum area will be invalidated if the window has no subwindows, or if the
+ * edges of the window's parent do not extend beyond the edges of the window. In
+ * other cases, a multi-step process is used to scroll the window which may
+ * produce temporary visual artifacts and unnecessary invalidations.)
+ * @param dx Amount to scroll in the X direction.
+ * @param dy Amount to scroll in the Y direction.
+ */
+ void scroll(int dx, int dy);
+
+ /** Applies a shape mask to @a window . Pixels in @a window corresponding to
+ * set bits in the @a mask will be visible; pixels in @a window
+ * corresponding to unset bits in the @a mask will be transparent. This
+ * gives a non-rectangular window.
+ *
+ * If @a mask is <tt>0</tt>, the shape mask will be unset, and the @a x / @a y
+ * parameters are not used.
+ *
+ * On the X11 platform, this uses an X server extension which is
+ * widely available on most common platforms, but not available on
+ * very old X servers, and occasionally the implementation will be
+ * buggy. On servers without the shape extension, this function
+ * will do nothing.
+ *
+ * This function works on both toplevel and child windows.
+ * @param mask Shape mask.
+ * @param x X position of shape mask with respect to @a window .
+ * @param y Y position of shape mask with respect to @a window .
+ */
+ void shape_combine_mask(const Glib::RefPtr<Bitmap>& mask, int x, int y);
+ void unset_shape_combine_mask();
+
+
+ /** Makes pixels in @a window outside @a shape_region be transparent,
+ * so that the window may be nonrectangular. See also
+ * gdk_window_shape_combine_mask() to use a bitmap as the mask.
+ *
+ * If @a shape_region is <tt>0</tt>, the shape will be unset, so the whole
+ * window will be opaque again. @a offset_x and @a offset_y are ignored
+ * if @a shape_region is <tt>0</tt>.
+ *
+ * On the X11 platform, this uses an X server extension which is
+ * widely available on most common platforms, but not available on
+ * very old X servers, and occasionally the implementation will be
+ * buggy. On servers without the shape extension, this function
+ * will do nothing.
+ *
+ * This function works on both toplevel and child windows.
+ * @param shape_region Region of window to be non-transparent.
+ * @param offset_x X position of @a shape_region in @a window coordinates.
+ * @param offset_y Y position of @a shape_region in @a window coordinates.
+ */
+ void shape_combine_region(const Region& shape_region, int offset_x, int offset_y);
+
+ /** Sets the shape mask of @a window to the union of shape masks
+ * for all children of @a window , ignoring the shape mask of @a window
+ * itself. Contrast with gdk_window_merge_child_shapes() which includes
+ * the shape mask of @a window in the masks to be merged.
+ */
+ void set_child_shapes();
+
+ /** Merges the shape masks for any child windows into the
+ * shape mask for @a window . i.e. the union of all masks
+ * for @a window and its children will become the new mask
+ * for @a window . See gdk_window_shape_combine_mask().
+ *
+ * This function is distinct from gdk_window_set_child_shapes()
+ * because it includes @a window 's shape mask in the set of shapes to
+ * be merged.
+ */
+ void merge_child_shapes();
+
+ /** Checks whether the window has been mapped (with gdk_window_show() or
+ * gdk_window_show_unraised()).
+ * @return <tt>true</tt> if the window is mapped.
+ */
+ bool is_visible() const;
+
+ /** Check if the window and all ancestors of the window are
+ * mapped. (This is not necessarily "viewable" in the X sense, since
+ * we only check as far as we have GDK window parents, not to the root
+ * window.)
+ * @return <tt>true</tt> if the window is viewable.
+ */
+ bool is_viewable() const;
+
+ /** Gets the bitwise OR of the currently active window state flags,
+ * from the Gdk::WindowState enumeration.
+ * @return Window state bitfield.
+ */
+ WindowState get_state() const;
+
+ /** Set the bit gravity of the given window to static, and flag it so
+ * all children get static subwindow gravity. This is used if you are
+ * implementing scary features that involve deep knowledge of the
+ * windowing system. Don't worry about it unless you have to.
+ * @param use_static <tt>true</tt> to turn on static gravity.
+ * @return <tt>true</tt> if the server supports static gravity.
+ */
+ bool set_static_gravities(bool use_static = true);
+
+ /** The application can use this call to provide a hint to the window
+ * manager about the functionality of a window. The window manager
+ * can use this information when determining the decoration and behaviour
+ * of the window.
+ *
+ * The hint must be set before the window is mapped.
+ * @param hint A hint of the function this window will have.
+ */
+ void set_type_hint(WindowTypeHint hint);
+
+ /** The application can use this hint to tell the window manager
+ * that a certain window has modal behaviour. The window manager
+ * can use this information to handle modal windows in a special
+ * way.
+ *
+ * You should only use this on windows for which you have
+ * previously called #gdk_window_set_transient_for()
+ * @param modal <tt>true</tt> if the window is modal, <tt>false</tt> otherwise.
+ */
+ void set_modal_hint(bool modal = true);
+
+ /** Sets the geometry hints for @a window . Hints flagged in @a geom_mask
+ * are set, hints not flagged in @a geom_mask are unset.
+ * To unset all hints, use a @a geom_mask of 0 and a @a geometry of <tt>0</tt>.
+ *
+ * This function provides hints to the windowing system about
+ * acceptable sizes for a toplevel window. The purpose of
+ * this is to constrain user resizing, but the windowing system
+ * will typically (but is not required to) also constrain the
+ * current size of the window to the provided values and
+ * constrain programatic resizing via gdk_window_resize() or
+ * gdk_window_move_resize().
+ *
+ * Note that on X11, this effect has no effect on windows
+ * of type GDK_WINDOW_TEMP or windows where override_redirect
+ * has been turned on via gdk_window_set_override_redirect()
+ * since these windows are not resizable by the user.
+ *
+ * Since you can't count on the windowing system doing the
+ * constraints for programmatic resizes, you should generally
+ * call gdk_window_constrain_size() yourself to determine
+ * appropriate sizes.
+ * @param geometry Geometry hints.
+ * @param geom_mask Bitmask indicating fields of @a geometry to pay attention to.
+ */
+ void set_geometry_hints(const Geometry& geometry, WindowHints geom_mask);
+
+ /** Sets the <tt>SM_CLIENT_ID</tt> property on the application's leader window so that
+ * the window manager can save the application's state using the X11R6 ICCCM
+ * session management protocol.
+ *
+ * See the X Session Management Library documentation for more information on
+ * session management and the Inter-Client Communication Conventions Manual
+ * (ICCCM) for information on the <tt>WM_CLIENT_LEADER</tt> property.
+ * (Both documents are part of the X&nbsp;%Window System distribution.)
+ * @param sm_client_id The client id assigned by the session manager when the
+ * connection was opened.
+ */
+ static void set_sm_client_id(const Glib::ustring& sm_client_id);
+ static void unset_sm_client_id();
+
+
+ /** A convenience wrapper around gdk_window_begin_paint_region() which
+ * creates a rectangular region for you. See
+ * gdk_window_begin_paint_region() for details.
+ * @param rectangle Rectangle you intend to draw to.
+ */
+ void begin_paint_rect(Rectangle&rectangle);
+
+ /** Indicates that you are beginning the process of redrawing @a region .
+ * A backing store (offscreen buffer) large enough to contain @a region
+ * will be created. The backing store will be initialized with the
+ * background color or background pixmap for @a window . Then, all
+ * drawing operations performed on @a window will be diverted to the
+ * backing store. When you call gdk_window_end_paint(), the backing
+ * store will be copied to @a window , making it visible onscreen. Only
+ * the part of @a window contained in @a region will be modified; that is,
+ * drawing operations are clipped to @a region .
+ *
+ * The net result of all this is to remove flicker, because the user
+ * sees the finished product appear all at once when you call
+ * gdk_window_end_paint(). If you draw to @a window directly without
+ * calling gdk_window_begin_paint_region(), the user may see flicker
+ * as individual drawing operations are performed in sequence. The
+ * clipping and background-initializing features of
+ * gdk_window_begin_paint_region() are conveniences for the
+ * programmer, so you can avoid doing that work yourself.
+ *
+ * When using GTK+, the widget system automatically places calls to
+ * gdk_window_begin_paint_region() and gdk_window_end_paint() around
+ * emissions of the expose_event signal. That is, if you're writing an
+ * expose event handler, you can assume that the exposed area in
+ * Gdk::EventExpose has already been cleared to the window background,
+ * is already set as the clip region, and already has a backing store.
+ * Therefore in most cases, application code need not call
+ * gdk_window_begin_paint_region(). (You can disable the automatic
+ * calls around expose events on a widget-by-widget basis by calling
+ * gtk_widget_set_double_buffered().)
+ *
+ * If you call this function multiple times before calling the
+ * matching gdk_window_end_paint(), the backing stores are pushed onto
+ * a stack. gdk_window_end_paint() copies the topmost backing store
+ * onscreen, subtracts the topmost region from all other regions in
+ * the stack, and pops the stack. All drawing operations affect only
+ * the topmost backing store in the stack. One matching call to
+ * gdk_window_end_paint() is required for each call to
+ * gdk_window_begin_paint_region().
+ * @param region Region you intend to draw to.
+ */
+ void begin_paint_region(const Region& region);
+
+ /** Indicates that the backing store created by the most recent call to
+ * gdk_window_begin_paint_region() should be copied onscreen and
+ * deleted, leaving the next-most-recent backing store or no backing
+ * store at all as the active paint region. See
+ * gdk_window_begin_paint_region() for full details. It is an error to
+ * call this function without a matching
+ * gdk_window_begin_paint_region() first.
+ */
+ void end_paint();
+
+ /** Sets the title of a toplevel window, to be displayed in the titlebar.
+ * If you haven't explicitly set the icon name for the window
+ * (using gdk_window_set_icon_name()), the icon name will be set to
+ * @a title as well. @a title must be in UTF-8 encoding (as with all
+ * user-readable strings in GDK/GTK+). @a title may not be <tt>0</tt>.
+ * @param title Title of @a window .
+ */
+ void set_title(const Glib::ustring& title);
+
+ /** When using GTK+, typically you should use gtk_window_set_role() instead
+ * of this low-level function.
+ *
+ * The window manager and session manager use a window's role to
+ * distinguish it from other kinds of window in the same application.
+ * When an application is restarted after being saved in a previous
+ * session, all windows with the same title and role are treated as
+ * interchangeable. So if you have two windows with the same title
+ * that should be distinguished for session management purposes, you
+ * should set the role on those windows. It doesn't matter what string
+ * you use for the role, as long as you have a different role for each
+ * non-interchangeable kind of window.
+ * @param role A string indicating its role.
+ */
+ void set_role(const Glib::ustring& role);
+
+ /** Indicates to the window manager that @a window is a transient dialog
+ * associated with the application window @a parent . This allows the
+ * window manager to do things like center @a window on @a parent and
+ * keep @a window above @a parent .
+ *
+ * See gtk_window_set_transient_for() if you're using Gtk::Window or
+ * Gtk::Dialog.
+ * @param parent Another toplevel Gdk::Window.
+ */
+ void set_transient_for(const Glib::RefPtr<Window>& parent);
+
+ /** Sets the background color of @a window . (However, when using GTK+,
+ * set the background of a widget with gtk_widget_modify_bg() - if
+ * you're an application - or gtk_style_set_background() - if you're
+ * implementing a custom widget.)
+ *
+ * The @a color must be allocated; gdk_rgb_find_color() is the best way
+ * to allocate a color.
+ *
+ * See also gdk_window_set_back_pixmap().
+ * @param color An allocated Gdk::Color.
+ */
+ void set_background(const Color& color);
+
+ /** Sets the background pixmap of @a window . May also be used to set a background of
+ * "None" on @a window , by setting a background pixmap of <tt>0</tt>.
+ * A background pixmap will be tiled, positioning the first tile at the origin of
+ * @a window , or if @a parent_relative is <tt>true</tt>, the tiling will be done based on the
+ * origin of the parent window (useful to align tiles in a parent with tiles
+ * in a child).
+ *
+ * A background pixmap of <tt>0</tt> means that the window will have no
+ * background. A window with no background will never have its
+ * background filled by the windowing system, instead the window will
+ * contain whatever pixels were already in the corresponding area of
+ * the display.
+ *
+ * The windowing system will normally fill a window with its background
+ * when the window is obscured then exposed, and when you call
+ * gdk_window_clear().
+ * @param pixmap A Gdk::Pixmap, or <tt>0</tt>.
+ * @param parent_relative Whether the tiling origin is at the origin of @a window 's parent.
+ */
+ void set_back_pixmap(const Glib::RefPtr<Pixmap>&pixmap, bool parent_relative);
+
+ /** Sets the mouse pointer for a Gdk::Window.
+ * To make the cursor invisible, use gdk_cursor_new_from_pixmap() to create
+ * a cursor with no pixels in it.
+ * @param cursor A cursor.
+ */
+ void set_cursor(const Cursor& cursor);
+
+ /** Use the parent window's cursor.
+ * For top-level windows this means that it will use the default cursor for the ROOT window.
+ */
+ void set_cursor();
+
+
+ /** Retrieves the user data for @a window , which is normally the widget
+ * that @a window belongs to. See gdk_window_set_user_data().
+ * @param data Return location for user data.
+ */
+ void get_user_data(gpointer* data);
+
+ /** Any of the return location arguments to this function may be <tt>0</tt>,
+ * if you aren't interested in getting the value of that field.
+ *
+ * The X and Y coordinates returned are relative to the parent window
+ * of @a window , which for toplevels usually means relative to the
+ * window decorations (titlebar, etc.) rather than relative to the
+ * root window (screen-size background window).
+ *
+ * On the X11 platform, the geometry is obtained from the X server,
+ * so reflects the latest position of @a window ; this may be out-of-sync
+ * with the position of @a window delivered in the most-recently-processed
+ * Gdk::EventConfigure. gdk_window_get_position() in contrast gets the
+ * position from the most recent configure event.
+ *
+ * &lt;note&gt;
+ * If @a window is not a toplevel, it is <em>much</em> better
+ * to call gdk_window_get_position() and Gdk::Drawable::get_size() instead,
+ * because it avoids the roundtrip to the X server and because
+ * Gdk::Drawable::get_size() supports the full 32-bit coordinate space,
+ * whereas gdk_window_get_geometry() is restricted to the 16-bit
+ * coordinates of X11.
+ * &lt;/note&gt;
+ * @param x Return location for X coordinate of window (relative to its parent).
+ * @param y Return location for Y coordinate of window (relative to its parent).
+ * @param width Return location for width of window.
+ * @param height Return location for height of window.
+ * @param depth Return location for bit depth of window.
+ */
+ void get_geometry(int& x, int& y, int& width, int& height, int& depth) const;
+
+ /** Obtains the position of the window as reported in the
+ * most-recently-processed Gdk::EventConfigure. Contrast with
+ * gdk_window_get_geometry() which queries the X server for the
+ * current window position, regardless of which events have been
+ * received or processed.
+ *
+ * The position coordinates are relative to the window's parent window.
+ * @param x X coordinate of window.
+ * @param y Y coordinate of window.
+ */
+ void get_position(int& x, int& y) const;
+
+ /** Obtains the position of a window in root window coordinates.
+ * (Compare with gdk_window_get_position() and
+ * gdk_window_get_geometry() which return the position of a window
+ * relative to its parent window.)
+ * @param x Return location for X coordinate.
+ * @param y Return location for Y coordinate.
+ * @return Not meaningful, ignore.
+ */
+ int get_origin(int& x, int& y) const;
+ //_WRAP_METHOD(bool get_deskrelative_origin(int& x, int& y), gdk_window_get_deskrelative_origin)
+
+ /** Obtains the top-left corner of the window manager frame in root
+ * window coordinates.
+ * @param x Return location for X position of window frame.
+ * @param y Return location for Y position of window frame.
+ */
+ void get_root_origin(int& x, int& y) const;
+
+ /** Obtains the bounding box of the window, including window manager
+ * titlebar/borders if any. The frame position is given in root window
+ * coordinates. To get the position of the window itself (rather than
+ * the frame) in root window coordinates, use gdk_window_get_origin().
+ * @param rect Rectangle to fill with bounding box of the window frame.
+ */
+ void get_frame_extents(Rectangle& rect);
+
+ /** Obtains the current pointer position and modifier state.
+ * The position is given in coordinates relative to @a window .
+ * @param x Return location for X coordinate of pointer.
+ * @param y Return location for Y coordinate of pointer.
+ * @param mask Return location for modifier mask.
+ * @return The window containing the pointer (as with
+ * gdk_window_at_pointer()), or <tt>0</tt> if the window containing the
+ * pointer isn't known to GDK.
+ */
+ Glib::RefPtr<Window> get_pointer(int& x, int& y, ModifierType& mask);
+
+ /** Obtains the parent of @a window , as known to GDK. Does not query the
+ * X server; thus this returns the parent as passed to gdk_window_new(),
+ * not the actual parent. This should never matter unless you're using
+ * Xlib calls mixed with GDK calls on the X11 platform. It may also
+ * matter for toplevel windows, because the window manager may choose
+ * to reparent them.
+ * @return Parent of @a window .
+ */
+ Glib::RefPtr<Window> get_parent();
+
+ /** Obtains the parent of @a window , as known to GDK. Does not query the
+ * X server; thus this returns the parent as passed to gdk_window_new(),
+ * not the actual parent. This should never matter unless you're using
+ * Xlib calls mixed with GDK calls on the X11 platform. It may also
+ * matter for toplevel windows, because the window manager may choose
+ * to reparent them.
+ * @return Parent of @a window .
+ */
+ Glib::RefPtr<const Window> get_parent() const;
+
+ /** Gets the toplevel window that's an ancestor of @a window .
+ * @return The toplevel window containing @a window .
+ */
+ Glib::RefPtr<Window> get_toplevel();
+
+ /** Gets the toplevel window that's an ancestor of @a window .
+ * @return The toplevel window containing @a window .
+ */
+ Glib::RefPtr<const Window> get_toplevel() const;
+
+
+ /** Gets the list of children of @a window known to GDK.
+ * This function only returns children created via GDK,
+ * so for example it's useless when used with the root window;
+ * it only returns windows an application created itself.
+ *
+ * The returned list must be freed, but the elements in the
+ * list need not be.
+ * @return List of child windows inside @a window .
+ */
+ Glib::ListHandle< Glib::RefPtr<Window> > get_children();
+
+ /** Gets the list of children of @a window known to GDK.
+ * This function only returns children created via GDK,
+ * so for example it's useless when used with the root window;
+ * it only returns windows an application created itself.
+ *
+ * The returned list must be freed, but the elements in the
+ * list need not be.
+ * @return List of child windows inside @a window .
+ */
+ Glib::ListHandle< Glib::RefPtr<const Window> > get_children() const;
+ //gdk_window_peek_children() is the same as gdk_window_get_children() with different memory mangement of the list.
+
+
+ /** Gets the event mask for @a window . See gdk_window_set_events().
+ * @return Event mask for @a window .
+ */
+ EventMask get_events() const;
+
+ /** The event mask for a window determines which events will be reported
+ * for that window. For example, an event mask including Gdk::BUTTON_PRESS_MASK
+ * means the window should report button press events. The event mask
+ * is the bitwise OR of values from the Gdk::EventMask enumeration.
+ * @param event_mask Event mask for @a window .
+ */
+ void set_events(EventMask event_mask);
+
+
+ /** Sets a list of icons for the window. One of these will be used
+ * to represent the window when it has been iconified. The icon is
+ * usually shown in an icon box or some sort of task bar. Which icon
+ * size is shown depends on the window manager. The window manager
+ * can scale the icon but setting several size icons can give better
+ * image quality since the window manager may only need to scale the
+ * icon by a small amount or not at all.
+ * @param pixbufs A list of pixbufs, of different sizes.
+ */
+ void set_icon_list(const Glib::ListHandle< Glib::RefPtr<Gdk::Pixbuf> >& pixbufs);
+
+ /** Sets the icon of @a window as a pixmap or window. If using GTK+, investigate
+ * gtk_window_set_default_icon_list() first, and then gtk_window_set_icon_list()
+ * and gtk_window_set_icon(). If those don't meet your needs, look at
+ * gdk_window_set_icon_list(). Only if all those are too high-level do you
+ * want to fall back to gdk_window_set_icon().
+ * @param icon_window A Gdk::Window to use for the icon.
+ * @param pixmap A Gdk::Pixmap to use as the icon,.
+ * @param mask A 1-bit pixmap (Gdk::Bitmap) to use as mask for @a pixmap .
+ */
+ void set_icon(const Glib::RefPtr<Window>& icon_window, const Glib::RefPtr<Pixmap>& pixmap, const Glib::RefPtr<Bitmap>& mask);
+ void set_icon(const Glib::RefPtr<Window>& icon_window, const Glib::RefPtr<Pixmap>& pixmap);
+ void unset_icon();
+
+ /** Windows may have a name used while minimized, distinct from the
+ * name they display in their titlebar. Most of the time this is a bad
+ * idea from a user interface standpoint. But you can set such a name
+ * with this function, if you like.
+ * @param name Name of window while iconified (minimized).
+ */
+ void set_icon_name(const Glib::ustring& name);
+
+
+ /** Sets the group leader window for @a window . By default,
+ * GDK sets the group leader for all toplevel windows
+ * to a global window implicitly created by GDK. With this function
+ * you can override this default.
+ *
+ * The group leader window allows the window manager to distinguish
+ * all windows that belong to a single application. It may for example
+ * allow users to minimize/unminimize all windows belonging to an
+ * application at once. You should only set a non-default group window
+ * if your application pretends to be multiple applications.
+ * @param leader Group leader window, or <tt>0</tt> to restore the default group leader window.
+ */
+ void set_group(const Glib::RefPtr<Window>& leader);
+
+ /** Returns the group leader window for @a window . See gdk_window_set_group().
+ * @return The group leader window for @a window
+ *
+ * Since: 2.4.
+ */
+ Glib::RefPtr<Window> get_group();
+
+ /** Returns the group leader window for @a window . See gdk_window_set_group().
+ * @return The group leader window for @a window
+ *
+ * Since: 2.4.
+ */
+ Glib::RefPtr<const Window> get_group() const;
+
+
+ /** "Decorations" are the features the window manager adds to a toplevel Gdk::Window.
+ * This function sets the traditional Motif window manager hints that tell the
+ * window manager which decorations you would like your window to have.
+ * Usually you should use gtk_window_set_decorated() on a Gtk::Window instead of
+ * using the GDK function directly.
+ *
+ * The @a decorations argument is the logical OR of the fields in
+ * the Gdk::WMDecoration enumeration. If Gdk::DECOR_ALL is included in the
+ * mask, the other bits indicate which decorations should be turned off.
+ * If Gdk::DECOR_ALL is not included, then the other bits indicate
+ * which decorations should be turned on.
+ *
+ * Most window managers honor a decorations hint of 0 to disable all decorations,
+ * but very few honor all possible combinations of bits.
+ * @param decorations Decoration hint mask.
+ */
+ void set_decorations(WMDecoration decorations);
+
+ /** Returns the decorations set on the GdkWindow with #gdk_window_set_decorations
+ * @param decorations The window decorations will be written here.
+ * @return <tt>true</tt> if the window has decorations set, <tt>false</tt> otherwise.
+ */
+ bool get_decorations(WMDecoration& decorations) const;
+
+ /** This function isn't really good for much. It sets the traditional
+ * Motif window manager hint for which operations the window manager
+ * should allow on a toplevel window. However, few window managers do
+ * anything reliable or interesting with this hint. Many ignore it
+ * entirely.
+ *
+ * The @a functions argument is the logical OR of values from the
+ * Gdk::WMFunction enumeration. If the bitmask includes Gdk::FUNC_ALL,
+ * then the other bits indicate which functions to disable; if
+ * it doesn't include Gdk::FUNC_ALL, it indicates which functions to
+ * enable.
+ * @param functions Bitmask of operations to allow on @a window .
+ */
+ void set_functions(WMFunction functions);
+
+
+ /** Obtains a list of all toplevel windows known to GDK on the default
+ * screen (see gdk_window_get_toplevels_for_screen()).
+ * A toplevel window is a child of the root window (see
+ * gdk_get_default_root_window()).
+ * @return List of toplevel windows.
+ */
+ static Glib::ListHandle< Glib::RefPtr<Window> > get_toplevels();
+
+
+ /** Asks to iconify (minimize) @a window . The window manager may choose
+ * to ignore the request, but normally will honor it. Using
+ * gtk_window_iconify() is preferred, if you have a Gtk::Window widget.
+ *
+ * This function only makes sense when @a window is a toplevel window.
+ */
+ void iconify();
+
+ /** Attempt to deiconify (unminimize) @a window . On X11 the window manager may
+ * choose to ignore the request to deiconify. When using GTK+,
+ * use gtk_window_deiconify() instead of the Gdk::Window variant. Or better yet,
+ * you probably want to use gtk_window_present(), which raises the window, focuses it,
+ * unminimizes it, and puts it on the current desktop.
+ */
+ void deiconify();
+
+ /** "Pins" a window such that it's on all workspaces and does not scroll
+ * with viewports, for window managers that have scrollable viewports.
+ * (When using Gtk::Window, gtk_window_stick() may be more useful.)
+ *
+ * On the X11 platform, this function depends on window manager
+ * support, so may have no effect with many window managers. However,
+ * GDK will do the best it can to convince the window manager to stick
+ * the window. For window managers that don't support this operation,
+ * there's nothing you can do to force it to happen.
+ */
+ void stick();
+
+ /** Reverse operation for gdk_window_stick(); see gdk_window_stick(),
+ * and gtk_window_unstick().
+ */
+ void unstick();
+
+ /** Maximizes the window. If the window was already maximized, then
+ * this function does nothing.
+ *
+ * On X11, asks the window manager to maximize @a window , if the window
+ * manager supports this operation. Not all window managers support
+ * this, and some deliberately ignore it or don't have a concept of
+ * "maximized"; so you can't rely on the maximization actually
+ * happening. But it will happen with most standard window managers,
+ * and GDK makes a best effort to get it to happen.
+ *
+ * On Windows, reliably maximizes the window.
+ */
+ void maximize();
+
+ /** Unmaximizes the window. If the window wasn't maximized, then this
+ * function does nothing.
+ *
+ * On X11, asks the window manager to unmaximize @a window , if the
+ * window manager supports this operation. Not all window managers
+ * support this, and some deliberately ignore it or don't have a
+ * concept of "maximized"; so you can't rely on the unmaximization
+ * actually happening. But it will happen with most standard window
+ * managers, and GDK makes a best effort to get it to happen.
+ *
+ * On Windows, reliably unmaximizes the window.
+ */
+ void unmaximize();
+
+ void register_dnd();
+
+ /** Begins a window resize operation (for a toplevel window).
+ * You might use this function to implement a "window resize grip," for
+ * example; in fact Gtk::Statusbar uses it. The function works best
+ * with window managers that support the Extended Window Manager Hints spec
+ * (see http://www.freedesktop.org), but has a fallback implementation
+ * for other window managers.
+ * @param edge The edge or corner from which the drag is started.
+ * @param button The button being used to drag.
+ * @param root_x Root window X coordinate of mouse click that began the drag.
+ * @param root_y Root window Y coordinate of mouse click that began the drag.
+ * @param timestamp Timestamp of mouse click that began the drag (use gdk_event_get_time()).
+ */
+ void begin_resize_drag(WindowEdge edge, int button, int root_x, int root_y, guint32 timestamp);
+
+ /** Begins a window move operation (for a toplevel window). You might
+ * use this function to implement a "window move grip," for
+ * example. The function works best with window managers that support
+ * the Extended Window Manager Hints spec (see
+ * http://www.freedesktop.org), but has a fallback implementation for
+ * other window managers.
+ * @param button The button being used to drag.
+ * @param root_x Root window X coordinate of mouse click that began the drag.
+ * @param root_y Root window Y coordinate of mouse click that began the drag.
+ * @param timestamp Timestamp of mouse click that began the drag.
+ */
+ void begin_move_drag(int button, int root_x, int root_y, guint32 timestamp);
+
+ /** A convenience wrapper around gdk_window_invalidate_region() which
+ * invalidates a rectangular region. See
+ * gdk_window_invalidate_region() for details.
+ * @param rect Rectangle to invalidate.
+ * @param invalidate_children Whether to also invalidate child windows.
+ */
+ void invalidate_rect(const Rectangle& rect, bool invalidate_children);
+
+
+ /** Adds @a region to the update area for @a window . The update area is the
+ * region that needs to be redrawn, or "dirty region." The call
+ * gdk_window_process_updates() sends one or more expose events to the
+ * window, which together cover the entire update area. An
+ * application would normally redraw the contents of @a window in
+ * response to those expose events.
+ *
+ * GDK will call gdk_window_process_all_updates() on your behalf
+ * whenever your program returns to the main loop and becomes idle, so
+ * normally there's no need to do that manually, you just need to
+ * invalidate regions that you know should be redrawn.
+ *
+ * The @a invalidate_children parameter controls whether the region of
+ * each child window that intersects @a region will also be invalidated.
+ * If <tt>false</tt>, then the update area for child windows will remain
+ * unaffected. See gdk_window_invalidate_maybe_recurse if you need
+ * fine grained control over which children are invalidated.
+ * @param region A Gdk::Region.
+ * @param invalidate_children <tt>true</tt> to also invalidate child windows.
+ */
+ void invalidate_region(const Region& region, bool invalidate_children = true);
+
+ //TODO: Rewrite the docs, to be more C++-like.
+
+ /** Transfers ownership of the update area from @a window to the caller
+ * of the function. That is, after calling this function, @a window will
+ * no longer have an invalid/dirty region; the update area is removed
+ * from @a window and handed to you. If a window has no update area,
+ * gdk_window_get_update_area() returns <tt>0</tt>. You are responsible for
+ * calling gdk_region_destroy() on the returned region if it's non-<tt>0</tt>.
+ * @return The update area for @a window .
+ */
+ Region get_update_area();
+ //This method should not have a const version - see the docs.
+
+
+ /** Temporarily freezes a window such that it won't receive expose
+ * events. The window will begin receiving expose events again when
+ * Gdk::Window::thaw_updates() is called. If Gdk::Window::freeze_updates()
+ * has been called more than once, Gdk::Window::thaw_updates() must be called
+ * an equal number of times to begin processing exposes.
+ */
+ void freeze_updates();
+
+ /** Thaws a window frozen with Gdk::Window::freeze_updates().
+ */
+ void thaw_updates();
+
+ /** Calls gdk_window_process_updates() for all windows (see Gdk::Window)
+ * in the application.
+ */
+ static void process_all_updates();
+
+ /** Sends one or more expose events to @a window . The areas in each
+ * expose event will cover the entire update area for the window (see
+ * gdk_window_invalidate_region() for details). Normally GDK calls
+ * gdk_window_process_all_updates() on your behalf, so there's no
+ * need to call this function unless you want to force expose events
+ * to be delivered immediately and synchronously (vs. the usual
+ * case, where GDK delivers them in an idle handler). Occasionally
+ * this is useful to produce nicer scrolling behavior, for example.
+ * @param update_children Whether to also process updates for child windows.
+ */
+ void process_updates(bool update_children);
+
+ /** With update debugging enabled, calls to
+ * gdk_window_invalidate_region() clear the invalidated region of the
+ * screen to a noticeable color, and GDK pauses for a short time
+ * before sending exposes to windows during
+ * gdk_window_process_updates(). The net effect is that you can see
+ * the invalid region for each window and watch redraws as they
+ * occur. This allows you to diagnose inefficiencies in your application.
+ *
+ * In essence, because the GDK rendering model prevents all flicker,
+ * if you are redrawing the same region 400 times you may never
+ * notice, aside from noticing a speed problem. Enabling update
+ * debugging causes GTK to flicker slowly and noticeably, so you can
+ * see exactly what's being redrawn when, in what order.
+ *
+ * The --gtk-debug=updates command line option passed to GTK+ programs
+ * enables this debug option at application startup time. That's
+ * usually more useful than calling gdk_window_set_debug_updates()
+ * yourself, though you might want to use this function to enable
+ * updates sometime after application startup time.
+ * @param setting <tt>true</tt> to turn on update debugging.
+ */
+ static void set_debug_updates(bool setting = true);
+
+ /** Constrains a desired width and height according to a
+ * set of geometry hints (such as minimum and maximum size).
+ * @param geometry A Gdk::Geometry structure.
+ * @param flags A mask indicating what portions of @a geometry are set.
+ * @param width Desired width of window.
+ * @param height Desired height of the window.
+ * @param new_width Location to store resulting width.
+ * @param new_height Location to store resulting height.
+ */
+ static void constrain_size(const Geometry& geometry, guint flags, int width, int height, int& new_width, int& new_height);
+ void get_internal_paint_info(Glib::RefPtr<Drawable>& real_drawable, int& x_offset, int& y_offset) const;
+
+
+ /** Indicates that the application will cooperate with the window
+ * system in synchronizing the window repaint with the window
+ * manager during resizing operations. After an application calls
+ * this function, it must call gdk_window_configure_finished() every
+ * time it has finished all processing associated with a set of
+ * Configure events. Toplevel GTK+ windows automatically use this
+ * protocol.
+ *
+ * On X, calling this function makes @a window participate in the
+ * _NET_WM_SYNC_REQUEST window manager protocol.
+ *
+ * Since: 2.6
+ */
+ void enable_synchronized_configure();
+
+ /** Signal to the window system that the application has finished
+ * handling Configure events it has received. Window Managers can
+ * use this to better synchronize the frame repaint with the
+ * application. GTK+ applications will automatically call this
+ * function when appropriate.
+ *
+ * This function can only be called if gdk_window_use_configure()
+ * was called previously.
+ *
+ * Since: 2.6
+ */
+ void configure_finished();
+
+
+ /** Toggles whether a window should appear in a task list or window
+ * list. If a window's semantic type as specified with
+ * gdk_window_set_type_hint() already fully describes the window, this
+ * function should NOT be called in addition, instead you should allow
+ * the window to be treated according to standard policy for its
+ * semantic type.
+ *
+ * Since: 2.2
+ * @param skips_taskbar <tt>true</tt> to skip the taskbar.
+ */
+ void set_skip_taskbar_hint(bool skips_taskbar = true);
+
+ /** Toggles whether a window should appear in a pager (workspace
+ * switcher, or other desktop utility program that displays a small
+ * thumbnail representation of the windows on the desktop). If a
+ * window's semantic type as specified with gdk_window_set_type_hint()
+ * already fully describes the window, this function should NOT be
+ * called in addition, instead you should allow the window to be
+ * treated according to standard policy for its semantic type.
+ *
+ * Since: 2.2
+ * @param skips_pager <tt>true</tt> to skip the pager.
+ */
+ void set_skip_pager_hint(bool skips_pager = true);
+
+
+ /** Moves the window into fullscreen mode. This means the
+ * window covers the entire screen and is above any panels
+ * or task bars.
+ *
+ * If the window was already fullscreen, then this function does nothing.
+ *
+ * On X11, asks the window manager to put @a window in a fullscreen
+ * state, if the window manager supports this operation. Not all
+ * window managers support this, and some deliberately ignore it or
+ * don't have a concept of "fullscreen"; so you can't rely on the
+ * fullscreenification actually happening. But it will happen with
+ * most standard window managers, and GDK makes a best effort to get
+ * it to happen.
+ *
+ * Since: 2.2
+ */
+ void fullscreen();
+
+ /** Moves the window out of fullscreen mode. If the window was not
+ * fullscreen, does nothing.
+ *
+ * On X11, asks the window manager to move @a window out of the fullscreen
+ * state, if the window manager supports this operation. Not all
+ * window managers support this, and some deliberately ignore it or
+ * don't have a concept of "fullscreen"; so you can't rely on the
+ * unfullscreenification actually happening. But it will happen with
+ * most standard window managers, and GDK makes a best effort to get
+ * it to happen.
+ *
+ * Since: 2.2
+ */
+ void unfullscreen();
+
+
+ GrabStatus pointer_grab(bool owner_events, EventMask event_mask, const Glib::RefPtr<const Window>& confine_to, const Cursor& cursor, guint32 time_);
+
+ /** Grabs the pointer to a specific window.
+ * Requires a corresponding call to pointer_ungrab().
+ *
+ * Arguments:
+ * @param owner_events Specifies whether events will be reported as is, or relative to the window.
+ * @param event_mask Masks only interesting events.
+ * @param cursor Changes the cursor for the duration of the grab.
+ * @param timestamp Specifies the time.
+ */
+ GrabStatus pointer_grab(bool owner_events, EventMask event_mask, const Cursor& cursor, guint32 timestamp);
+
+ /** Grabs the pointer to a specific window.
+ * Requires a corresponding call to pointer_ungrab().
+ *
+ * Arguments:
+ * @param owner_events Specifies whether events will be reported as is, or relative to the window.
+ * @param event_mask Masks only interesting events.
+ * @param timestamp Specifies the time.
+ */
+ GrabStatus pointer_grab(bool owner_events, EventMask event_mask, guint32 timestamp);
+
+
+ /** Ungrabs the pointer, if it is grabbed by this application.
+ * @param timestamp A timestamp from a Gdk::Event, or Gdk::CURRENT_TIME if no
+ * timestamp is available.
+ */
+ static void pointer_ungrab(guint32 timestamp);
+
+ GrabStatus keyboard_grab(bool owner_events, guint32 timestamp);
+
+ /** Ungrabs the keyboard, if it is grabbed by this application.
+ * @param timestamp A timestamp from a Gdk::Event, or Gdk::CURRENT_TIME if no
+ * timestamp is available.
+ */
+ static void keyboard_ungrab(guint32 timestamp);
+
+
+ /** Set if @a window must be kept above other windows. If the
+ * window was already above, then this function does nothing.
+ *
+ * On X11, asks the window manager to keep @a window above, if the window
+ * manager supports this operation. Not all window managers support
+ * this, and some deliberately ignore it or don't have a concept of
+ * "keep above"; so you can't rely on the window being kept above.
+ * But it will happen with most standard window managers,
+ * and GDK makes a best effort to get it to happen.
+ *
+ * Since: 2.4
+ * @param setting Whether to keep @a window above other windows.
+ */
+ void set_keep_above(bool setting = true);
+
+ /** Set if @a window must be kept below other windows. If the
+ * window was already below, then this function does nothing.
+ *
+ * On X11, asks the window manager to keep @a window below, if the window
+ * manager supports this operation. Not all window managers support
+ * this, and some deliberately ignore it or don't have a concept of
+ * "keep below"; so you can't rely on the window being kept below.
+ * But it will happen with most standard window managers,
+ * and GDK makes a best effort to get it to happen.
+ *
+ * Since: 2.4
+ * @param setting Whether to keep @a window below other windows.
+ */
+ void set_keep_below(bool setting = true);
+
+
+ /** Setting @a accept_focus to <tt>false</tt> hints the desktop environment that the
+ * window doesn't want to receive input focus.
+ *
+ * On X, it is the responsibility of the window manager to interpret this
+ * hint. ICCCM-compliant window manager usually respect it.
+ *
+ * Since: 2.4
+ * @param accept_focus <tt>true</tt> if the window should receive input focus.
+ */
+ void set_accept_focus(bool accept_focus = true);
+
+
+ /** Setting @a focus_on_map to <tt>false</tt> hints the desktop environment that the
+ * window doesn't want to receive input focus when it is mapped.
+ * focus_on_map should be turned off for windows that aren't triggered
+ * interactively (such as popups from network activity).
+ *
+ * On X, it is the responsibility of the window manager to interpret
+ * this hint. %Window managers following the freedesktop.org window
+ * manager extension specification should respect it.
+ *
+ * Since: 2.6
+ * @param focus_on_map <tt>true</tt> if the window should receive input focus when mapped.
+ */
+ void set_focus_on_map(bool focus_on_map);
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+};
+
+} /* namespace Gdk */
+
+
+namespace Glib
+{
+ /** @relates Gdk::Window
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Gdk::Window> wrap(GdkWindowObject* object, bool take_copy = false);
+}
+
+
+#endif /* _GDKMM_WINDOW_H */
+
diff --git a/libs/gtkmm2/gdk/gdkmm/wrap_init.cc b/libs/gtkmm2/gdk/gdkmm/wrap_init.cc
new file mode 100644
index 0000000000..e859fb7e76
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/wrap_init.cc
@@ -0,0 +1,135 @@
+
+#include <glib.h>
+
+// Disable the 'const' function attribute of the get_type() functions.
+// GCC would optimize them out because we don't use the return value.
+#undef G_GNUC_CONST
+#define G_GNUC_CONST /* empty */
+
+#include <gdkmm/wrap_init.h>
+#include <glibmm/error.h>
+#include <glibmm/object.h>
+
+// #include the widget headers so that we can call the get_type() static methods:
+
+#include "bitmap.h"
+#include "color.h"
+#include "colormap.h"
+#include "cursor.h"
+#include "device.h"
+#include "display.h"
+#include "displaymanager.h"
+#include "dragcontext.h"
+#include "drawable.h"
+#include "event.h"
+#include "gc.h"
+#include "image.h"
+#include "pixbuf.h"
+#include "pixbufanimation.h"
+#include "pixbufanimationiter.h"
+#include "pixmap.h"
+#include "pixbufformat.h"
+#include "pixbufloader.h"
+#include "rectangle.h"
+#include "region.h"
+#include "rgbcmap.h"
+#include "screen.h"
+#include "types.h"
+#include "visual.h"
+#include "window.h"
+
+extern "C"
+{
+
+//Declarations of the *_get_type() functions:
+
+GType gdk_colormap_get_type(void);
+GType gdk_device_get_type(void);
+GType gdk_display_get_type(void);
+GType gdk_display_manager_get_type(void);
+GType gdk_drag_context_get_type(void);
+GType gdk_drawable_get_type(void);
+GType gdk_gc_get_type(void);
+GType gdk_image_get_type(void);
+GType gdk_pixbuf_get_type(void);
+GType gdk_pixbuf_animation_get_type(void);
+GType gdk_pixbuf_animation_iter_get_type(void);
+GType gdk_pixbuf_loader_get_type(void);
+GType gdk_pixmap_get_type(void);
+GType gdk_screen_get_type(void);
+GType gdk_visual_get_type(void);
+GType gdk_window_object_get_type(void);
+
+//Declarations of the *_error_quark() functions:
+
+GQuark gdk_pixbuf_error_quark(void);
+} // extern "C"
+
+
+//Declarations of the *_Class::wrap_new() methods, instead of including all the private headers:
+
+namespace Gdk { class Colormap_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gdk { class Device_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gdk { class Display_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gdk { class DisplayManager_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gdk { class DragContext_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gdk { class Drawable_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gdk { class GC_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gdk { class Image_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gdk { class Pixbuf_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gdk { class PixbufAnimation_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gdk { class PixbufAnimationIter_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gdk { class PixbufLoader_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gdk { class Pixmap_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gdk { class Screen_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gdk { class Visual_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gdk { class Window_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+
+namespace Gdk {
+
+void wrap_init()
+{
+ // Register Error domains:
+ Glib::Error::register_domain(gdk_pixbuf_error_quark(), &Gdk::PixbufError::throw_func);
+
+// Map gtypes to gtkmm wrapper-creation functions:
+ Glib::wrap_register(gdk_colormap_get_type(), &Gdk::Colormap_Class::wrap_new);
+ Glib::wrap_register(gdk_device_get_type(), &Gdk::Device_Class::wrap_new);
+ Glib::wrap_register(gdk_display_get_type(), &Gdk::Display_Class::wrap_new);
+ Glib::wrap_register(gdk_display_manager_get_type(), &Gdk::DisplayManager_Class::wrap_new);
+ Glib::wrap_register(gdk_drag_context_get_type(), &Gdk::DragContext_Class::wrap_new);
+ Glib::wrap_register(gdk_drawable_get_type(), &Gdk::Drawable_Class::wrap_new);
+ Glib::wrap_register(gdk_gc_get_type(), &Gdk::GC_Class::wrap_new);
+ Glib::wrap_register(gdk_image_get_type(), &Gdk::Image_Class::wrap_new);
+ Glib::wrap_register(gdk_pixbuf_get_type(), &Gdk::Pixbuf_Class::wrap_new);
+ Glib::wrap_register(gdk_pixbuf_animation_get_type(), &Gdk::PixbufAnimation_Class::wrap_new);
+ Glib::wrap_register(gdk_pixbuf_animation_iter_get_type(), &Gdk::PixbufAnimationIter_Class::wrap_new);
+ Glib::wrap_register(gdk_pixbuf_loader_get_type(), &Gdk::PixbufLoader_Class::wrap_new);
+ Glib::wrap_register(gdk_pixmap_get_type(), &Gdk::Pixmap_Class::wrap_new);
+ Glib::wrap_register(gdk_screen_get_type(), &Gdk::Screen_Class::wrap_new);
+ Glib::wrap_register(gdk_visual_get_type(), &Gdk::Visual_Class::wrap_new);
+ Glib::wrap_register(gdk_window_object_get_type(), &Gdk::Window_Class::wrap_new);
+
+ // Register the gtkmm gtypes:
+ Gdk::Colormap::get_type();
+ Gdk::Device::get_type();
+ Gdk::Display::get_type();
+ Gdk::DisplayManager::get_type();
+ Gdk::DragContext::get_type();
+ Gdk::Drawable::get_type();
+ Gdk::GC::get_type();
+ Gdk::Image::get_type();
+ Gdk::Pixbuf::get_type();
+ Gdk::PixbufAnimation::get_type();
+ Gdk::PixbufAnimationIter::get_type();
+ Gdk::PixbufLoader::get_type();
+ Gdk::Pixmap::get_type();
+ Gdk::Screen::get_type();
+ Gdk::Visual::get_type();
+ Gdk::Window::get_type();
+
+} // wrap_init()
+
+} //Gdk
+
+
diff --git a/libs/gtkmm2/gdk/gdkmm/wrap_init.h b/libs/gtkmm2/gdk/gdkmm/wrap_init.h
new file mode 100644
index 0000000000..e27d2122a7
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmm/wrap_init.h
@@ -0,0 +1,32 @@
+#ifndef _GDKMM_WRAP_INIT_H
+#define _GDKMM_WRAP_INIT_H
+
+/* wrap_init.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+// wrap_init.cc is generated by tools/generate_wrap_init.pl
+
+namespace Gdk
+{
+
+void wrap_init();
+
+} /* namespace Gdk */
+
+#endif // _GDKMM_WRAP_INIT_H
diff --git a/libs/gtkmm2/gdk/gdkmmconfig.h b/libs/gtkmm2/gdk/gdkmmconfig.h
new file mode 100644
index 0000000000..cbfb1a34da
--- /dev/null
+++ b/libs/gtkmm2/gdk/gdkmmconfig.h
@@ -0,0 +1,8 @@
+/* gdk/gdkmmconfig.h. Generated by configure. */
+#ifndef _GDKMM_CONFIG_H
+#define _GDKMM_CONFIG_H 1
+
+#include <glibmmconfig.h>
+
+#endif /* _GDKMM_CONFIG_H */
+
diff --git a/libs/gtkmm2/gtk/SConscript b/libs/gtkmm2/gtk/SConscript
new file mode 100644
index 0000000000..ecf8417230
--- /dev/null
+++ b/libs/gtkmm2/gtk/SConscript
@@ -0,0 +1,10 @@
+import glob
+
+gtkmm2_files = glob.glob('gtkmm/*.cc')
+
+Import('env libraries')
+gtkmm2 = env.Copy()
+gtkmm2.Merge([libraries['glibmm2'], libraries['gtk2'], libraries['sigc2'], libraries['pangomm'], libraries['atkmm'], libraries['gdkmm2'] ])
+
+libgtkmm2 = gtkmm2.StaticLibrary('gtkmm2', gtkmm2_files)
+Default(libgtkmm2)
diff --git a/libs/gtkmm2/gtk/gtkmm.h b/libs/gtkmm2/gtk/gtkmm.h
new file mode 100644
index 0000000000..cb8411a3e3
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm.h
@@ -0,0 +1,156 @@
+/* $Id$ */
+/* gtkmm - a C++ wrapper for the Gtk toolkit
+ *
+ * Copyright 1999-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef _GTKMM_H
+#define _GTKMM_H
+
+/* Gtkmm version. */
+extern const int gtkmm_major_version;
+extern const int gtkmm_minor_version;
+extern const int gtkmm_micro_version;
+
+#include <glibmm.h>
+#include <gdkmm.h>
+
+#include <gtkmm/object.h>
+#include <gtkmm/aboutdialog.h>
+#include <gtkmm/accelkey.h>
+#include <gtkmm/accelgroup.h>
+#include <gtkmm/adjustment.h>
+#include <gtkmm/alignment.h>
+#include <gtkmm/arrow.h>
+#include <gtkmm/aspectframe.h>
+#include <gtkmm/base.h>
+#include <gtkmm/bin.h>
+#include <gtkmm/box.h>
+#include <gtkmm/button.h>
+#include <gtkmm/buttonbox.h>
+#include <gtkmm/checkbutton.h>
+#include <gtkmm/checkmenuitem.h>
+#include <gtkmm/cellrenderer.h>
+#include <gtkmm/cellrenderercombo.h>
+#include <gtkmm/cellrendererpixbuf.h>
+#include <gtkmm/cellrendererprogress.h>
+#include <gtkmm/cellrenderertext.h>
+#include <gtkmm/cellrenderertoggle.h>
+#include <gtkmm/colorbutton.h>
+#include <gtkmm/colorselection.h>
+#include <gtkmm/combo.h> //TODO: Deprecated.
+#include <gtkmm/combobox.h>
+#include <gtkmm/comboboxentry.h>
+#include <gtkmm/comboboxentrytext.h>
+#include <gtkmm/comboboxtext.h>
+#include <gtkmm/container.h>
+#include <gtkmm/curve.h>
+#include <gtkmm/dialog.h>
+#include <gtkmm/drawingarea.h>
+#include <gtkmm/editable.h>
+#include <gtkmm/entry.h>
+#include <gtkmm/expander.h>
+#include <gtkmm/enums.h>
+#include <gtkmm/eventbox.h>
+#include <gtkmm/filechooser.h>
+#include <gtkmm/filechooserbutton.h>
+#include <gtkmm/filechooserdialog.h>
+#include <gtkmm/filechooserwidget.h>
+#include <gtkmm/filefilter.h>
+#include <gtkmm/fileselection.h> //TODO: Deprecated.
+#include <gtkmm/fixed.h>
+#include <gtkmm/fontbutton.h>
+#include <gtkmm/fontselection.h>
+#include <gtkmm/frame.h>
+//#include <gtkmm/rc.h>
+#include <gtkmm/handlebox.h>
+#include <gtkmm/iconset.h>
+#include <gtkmm/iconfactory.h>
+#include <gtkmm/iconsource.h>
+#include <gtkmm/iconview.h>
+#include <gtkmm/image.h>
+#include <gtkmm/imagemenuitem.h>
+#include <gtkmm/inputdialog.h>
+#include <gtkmm/item.h>
+#include <gtkmm/calendar.h>
+#include <gtkmm/invisible.h>
+#include <gtkmm/label.h>
+#include <gtkmm/liststore.h>
+#include <gtkmm/main.h>
+#include <gtkmm/menu.h>
+#include <gtkmm/menu_elems.h>
+#include <gtkmm/menubar.h>
+#include <gtkmm/menuitem.h>
+#include <gtkmm/menushell.h>
+#include <gtkmm/messagedialog.h>
+#include <gtkmm/misc.h>
+#include <gtkmm/notebook.h>
+#include <gtkmm/object.h>
+#include <gtkmm/optionmenu.h>
+#include <gtkmm/paned.h>
+#include <gtkmm/progressbar.h>
+#include <gtkmm/radioaction.h>
+#include <gtkmm/radiobutton.h>
+#include <gtkmm/radiomenuitem.h>
+#include <gtkmm/radiotoolbutton.h>
+#include <gtkmm/range.h>
+#include <gtkmm/ruler.h>
+#include <gtkmm/scale.h>
+#include <gtkmm/scrollbar.h>
+#include <gtkmm/scrolledwindow.h>
+#include <gtkmm/separator.h>
+#include <gtkmm/separatormenuitem.h>
+#include <gtkmm/separatortoolitem.h>
+#include <gtkmm/settings.h>
+#include <gtkmm/sizegroup.h>
+#include <gtkmm/spinbutton.h>
+#include <gtkmm/statusbar.h>
+#include <gtkmm/stock.h>
+#include <gtkmm/stockid.h>
+#include <gtkmm/stockitem.h>
+#include <gtkmm/style.h>
+#include <gtkmm/table.h>
+#include <gtkmm/textbuffer.h>
+#include <gtkmm/textchildanchor.h>
+#include <gtkmm/textiter.h>
+#include <gtkmm/textmark.h>
+#include <gtkmm/texttag.h>
+#include <gtkmm/texttagtable.h>
+#include <gtkmm/textview.h>
+#include <gtkmm/toggleaction.h>
+#include <gtkmm/togglebutton.h>
+#include <gtkmm/toolbar.h>
+#include <gtkmm/toolitem.h>
+#include <gtkmm/toolbutton.h>
+#include <gtkmm/toggletoolbutton.h>
+#include <gtkmm/tooltips.h>
+#include <gtkmm/treemodel.h>
+#include <gtkmm/treemodelfilter.h>
+#include <gtkmm/treemodelsort.h>
+#include <gtkmm/treepath.h>
+#include <gtkmm/treerowreference.h>
+#include <gtkmm/treeselection.h>
+#include <gtkmm/treestore.h>
+#include <gtkmm/treeview.h>
+#include <gtkmm/treeviewcolumn.h>
+#include <gtkmm/uimanager.h>
+#include <gtkmm/viewport.h>
+#include <gtkmm/widget.h>
+#include <gtkmm/window.h>
+
+#endif /* #ifndef GTKMM_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/aboutdialog.cc b/libs/gtkmm2/gtk/gtkmm/aboutdialog.cc
new file mode 100644
index 0000000000..24b97e3b39
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/aboutdialog.cc
@@ -0,0 +1,477 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/aboutdialog.h>
+#include <gtkmm/private/aboutdialog_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 2004 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkaboutdialog.h>
+#include <gtk/gtklabel.h>
+
+
+namespace //anonymous
+{
+
+// This Signal Proxy allows the C++ coder to specify
+// a sigc::slot instead of a static function.
+class SignalProxy_ActivateLink
+{
+public:
+ typedef Gtk::AboutDialog::SlotActivateLink SlotType;
+
+ SignalProxy_ActivateLink(const SlotType& slot)
+ : slot_(slot) {}
+
+ ~SignalProxy_ActivateLink();
+
+ static void gtk_callback(GtkAboutDialog* about, const gchar* link, gpointer data);
+ static void gtk_callback_destroy(void* data);
+
+private:
+ SlotType slot_;
+};
+
+SignalProxy_ActivateLink::~SignalProxy_ActivateLink()
+{}
+
+void SignalProxy_ActivateLink::gtk_callback(GtkAboutDialog* about, const gchar* link, gpointer data)
+{
+ SignalProxy_ActivateLink *const self = static_cast<SignalProxy_ActivateLink*>(data);
+
+ try
+ {
+ Gtk::AboutDialog* pCppAbout = Glib::wrap(about);
+ (self->slot_)( *pCppAbout, Glib::convert_const_gchar_ptr_to_ustring(link) );
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+
+}
+
+void SignalProxy_ActivateLink::gtk_callback_destroy(void* data)
+{
+ delete static_cast<SignalProxy_ActivateLink*>(data);
+}
+
+} // anonymous namespace
+
+
+namespace Gtk
+{
+
+//static:
+void AboutDialog::set_email_hook(const SlotActivateLink& slot)
+{
+ // Create a signal proxy. A pointer to this will be passed
+ // through the callback's data parameter. It will be deleted
+ // when SignalProxy_ActivateLink::gtk_callback_destroy() is called.
+ SignalProxy_ActivateLink *const pSignalProxy = new SignalProxy_ActivateLink(slot);
+
+ gtk_about_dialog_set_email_hook(
+ &SignalProxy_ActivateLink::gtk_callback, pSignalProxy,
+ &SignalProxy_ActivateLink::gtk_callback_destroy);
+}
+
+//static:
+void AboutDialog::set_url_hook(const SlotActivateLink& slot)
+{
+ // Create a signal proxy. A pointer to this will be passed
+ // through the callback's data parameter. It will be deleted
+ // when SignalProxy_ActivateLink::gtk_callback_destroy() is called.
+ SignalProxy_ActivateLink *const pSignalProxy = new SignalProxy_ActivateLink(slot);
+
+ gtk_about_dialog_set_url_hook(
+ &SignalProxy_ActivateLink::gtk_callback, pSignalProxy,
+ &SignalProxy_ActivateLink::gtk_callback_destroy);
+}
+
+} // namespace Gtk
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::AboutDialog* wrap(GtkAboutDialog* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::AboutDialog *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& AboutDialog_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &AboutDialog_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_about_dialog_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void AboutDialog_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* AboutDialog_Class::wrap_new(GObject* o)
+{
+ return new AboutDialog((GtkAboutDialog*)(o)); //top-level windows can not be manage()ed.
+
+}
+
+
+/* The implementation: */
+
+AboutDialog::AboutDialog(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Dialog(construct_params)
+{
+ }
+
+AboutDialog::AboutDialog(GtkAboutDialog* castitem)
+:
+ Gtk::Dialog((GtkDialog*)(castitem))
+{
+ }
+
+AboutDialog::~AboutDialog()
+{
+ destroy_();
+}
+
+AboutDialog::CppClassType AboutDialog::aboutdialog_class_; // initialize static member
+
+GType AboutDialog::get_type()
+{
+ return aboutdialog_class_.init().get_type();
+}
+
+GType AboutDialog::get_base_type()
+{
+ return gtk_about_dialog_get_type();
+}
+
+
+AboutDialog::AboutDialog()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Dialog(Glib::ConstructParams(aboutdialog_class_.init()))
+{
+ }
+
+Glib::ustring AboutDialog::get_name() const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(gtk_about_dialog_get_name(const_cast<GtkAboutDialog*>(gobj())));
+}
+
+void AboutDialog::set_name(const Glib::ustring& name)
+{
+ gtk_about_dialog_set_name(gobj(), name.c_str());
+}
+
+Glib::ustring AboutDialog::get_version() const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(gtk_about_dialog_get_version(const_cast<GtkAboutDialog*>(gobj())));
+}
+
+void AboutDialog::set_version(const Glib::ustring& version)
+{
+ gtk_about_dialog_set_version(gobj(), version.c_str());
+}
+
+Glib::ustring AboutDialog::get_copyright() const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(gtk_about_dialog_get_copyright(const_cast<GtkAboutDialog*>(gobj())));
+}
+
+void AboutDialog::set_copyright(const Glib::ustring& copyright)
+{
+ gtk_about_dialog_set_copyright(gobj(), copyright.c_str());
+}
+
+Glib::ustring AboutDialog::get_comments() const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(gtk_about_dialog_get_comments(const_cast<GtkAboutDialog*>(gobj())));
+}
+
+void AboutDialog::set_comments(const Glib::ustring& comments)
+{
+ gtk_about_dialog_set_comments(gobj(), comments.c_str());
+}
+
+Glib::ustring AboutDialog::get_license() const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(gtk_about_dialog_get_license(const_cast<GtkAboutDialog*>(gobj())));
+}
+
+void AboutDialog::set_license(const Glib::ustring& license)
+{
+ gtk_about_dialog_set_license(gobj(), license.c_str());
+}
+
+Glib::ustring AboutDialog::get_website() const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(gtk_about_dialog_get_website(const_cast<GtkAboutDialog*>(gobj())));
+}
+
+void AboutDialog::set_website(const Glib::ustring& website)
+{
+ gtk_about_dialog_set_website(gobj(), website.c_str());
+}
+
+Glib::ustring AboutDialog::get_website_label() const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(gtk_about_dialog_get_website_label(const_cast<GtkAboutDialog*>(gobj())));
+}
+
+void AboutDialog::set_website_label(const Glib::ustring& website_label)
+{
+ gtk_about_dialog_set_website_label(gobj(), website_label.c_str());
+}
+
+Glib::StringArrayHandle AboutDialog::get_authors() const
+{
+ return Glib::StringArrayHandle(gtk_about_dialog_get_authors(const_cast<GtkAboutDialog*>(gobj())));
+}
+
+void AboutDialog::set_authors(const Glib::StringArrayHandle& authors) const
+{
+ gtk_about_dialog_set_authors(const_cast<GtkAboutDialog*>(gobj()), const_cast<const gchar**>((authors).data()));
+}
+
+Glib::StringArrayHandle AboutDialog::get_documenters() const
+{
+ return Glib::StringArrayHandle(gtk_about_dialog_get_documenters(const_cast<GtkAboutDialog*>(gobj())));
+}
+
+void AboutDialog::set_documenters(const Glib::StringArrayHandle& documenters)
+{
+ gtk_about_dialog_set_documenters(gobj(), const_cast<const gchar**>((documenters).data()));
+}
+
+Glib::StringArrayHandle AboutDialog::get_artists() const
+{
+ return Glib::StringArrayHandle(gtk_about_dialog_get_artists(const_cast<GtkAboutDialog*>(gobj())));
+}
+
+void AboutDialog::set_artists(const Glib::StringArrayHandle& artists)
+{
+ gtk_about_dialog_set_artists(gobj(), const_cast<const gchar**>((artists).data()));
+}
+
+Glib::ustring AboutDialog::get_translator_credits() const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(gtk_about_dialog_get_translator_credits(const_cast<GtkAboutDialog*>(gobj())));
+}
+
+void AboutDialog::set_translator_credits(const Glib::ustring& translator_credits)
+{
+ gtk_about_dialog_set_translator_credits(gobj(), translator_credits.c_str());
+}
+
+Glib::RefPtr<Gdk::Pixbuf> AboutDialog::get_logo()
+{
+ return Glib::wrap(gtk_about_dialog_get_logo(gobj()));
+}
+
+Glib::RefPtr<const Gdk::Pixbuf> AboutDialog::get_logo() const
+{
+ return Glib::wrap(gtk_about_dialog_get_logo(const_cast<GtkAboutDialog*>(gobj())));
+}
+
+void AboutDialog::set_logo(const Glib::RefPtr<Gdk::Pixbuf>& logo)
+{
+ gtk_about_dialog_set_logo(gobj(), Glib::unwrap(logo));
+}
+
+Glib::ustring AboutDialog::get_logo_icon_name() const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(gtk_about_dialog_get_logo_icon_name(const_cast<GtkAboutDialog*>(gobj())));
+}
+
+void AboutDialog::set_logo_icon_name(const Glib::ustring& icon_name)
+{
+ gtk_about_dialog_set_logo_icon_name(gobj(), icon_name.c_str());
+}
+
+
+Glib::PropertyProxy<Glib::ustring> AboutDialog::property_name()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "name");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> AboutDialog::property_name() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "name");
+}
+
+Glib::PropertyProxy<Glib::ustring> AboutDialog::property_version()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "version");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> AboutDialog::property_version() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "version");
+}
+
+Glib::PropertyProxy<Glib::ustring> AboutDialog::property_copyright()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "copyright");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> AboutDialog::property_copyright() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "copyright");
+}
+
+Glib::PropertyProxy<Glib::ustring> AboutDialog::property_comments()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "comments");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> AboutDialog::property_comments() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "comments");
+}
+
+Glib::PropertyProxy<Glib::ustring> AboutDialog::property_website()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "website");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> AboutDialog::property_website() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "website");
+}
+
+Glib::PropertyProxy<Glib::ustring> AboutDialog::property_website_label()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "website-label");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> AboutDialog::property_website_label() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "website-label");
+}
+
+Glib::PropertyProxy<Glib::ustring> AboutDialog::property_license()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "license");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> AboutDialog::property_license() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "license");
+}
+
+Glib::PropertyProxy<Glib::StringArrayHandle> AboutDialog::property_authors()
+{
+ return Glib::PropertyProxy<Glib::StringArrayHandle>(this, "authors");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::StringArrayHandle> AboutDialog::property_authors() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::StringArrayHandle>(this, "authors");
+}
+
+Glib::PropertyProxy<Glib::StringArrayHandle> AboutDialog::property_documenters()
+{
+ return Glib::PropertyProxy<Glib::StringArrayHandle>(this, "documenters");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::StringArrayHandle> AboutDialog::property_documenters() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::StringArrayHandle>(this, "documenters");
+}
+
+Glib::PropertyProxy<Glib::StringArrayHandle> AboutDialog::property_translator_credits()
+{
+ return Glib::PropertyProxy<Glib::StringArrayHandle>(this, "translator-credits");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::StringArrayHandle> AboutDialog::property_translator_credits() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::StringArrayHandle>(this, "translator-credits");
+}
+
+Glib::PropertyProxy<Glib::StringArrayHandle> AboutDialog::property_artists()
+{
+ return Glib::PropertyProxy<Glib::StringArrayHandle>(this, "artists");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::StringArrayHandle> AboutDialog::property_artists() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::StringArrayHandle>(this, "artists");
+}
+
+Glib::PropertyProxy< Glib::RefPtr<Gdk::Pixbuf> > AboutDialog::property_logo()
+{
+ return Glib::PropertyProxy< Glib::RefPtr<Gdk::Pixbuf> >(this, "logo");
+}
+
+Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Pixbuf> > AboutDialog::property_logo() const
+{
+ return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Pixbuf> >(this, "logo");
+}
+
+Glib::PropertyProxy<Glib::ustring> AboutDialog::property_logo_icon_name()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "logo-icon-name");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> AboutDialog::property_logo_icon_name() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "logo-icon-name");
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/aboutdialog.h b/libs/gtkmm2/gtk/gtkmm/aboutdialog.h
new file mode 100644
index 0000000000..d36c8b2326
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/aboutdialog.h
@@ -0,0 +1,591 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_ABOUTDIALOG_H
+#define _GTKMM_ABOUTDIALOG_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* aboutdialog.h
+ *
+ * Copyright (C) 2004 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/dialog.h>
+//#include <glibmm/listhandle.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkAboutDialog GtkAboutDialog;
+typedef struct _GtkAboutDialogClass GtkAboutDialogClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class AboutDialog_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** TODO
+ *
+ * @ingroup Dialogs
+ */
+
+class AboutDialog : public Dialog
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef AboutDialog CppObjectType;
+ typedef AboutDialog_Class CppClassType;
+ typedef GtkAboutDialog BaseObjectType;
+ typedef GtkAboutDialogClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~AboutDialog();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class AboutDialog_Class;
+ static CppClassType aboutdialog_class_;
+
+ // noncopyable
+ AboutDialog(const AboutDialog&);
+ AboutDialog& operator=(const AboutDialog&);
+
+protected:
+ explicit AboutDialog(const Glib::ConstructParams& construct_params);
+ explicit AboutDialog(GtkAboutDialog* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkAboutDialog* gobj() { return reinterpret_cast<GtkAboutDialog*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkAboutDialog* gobj() const { return reinterpret_cast<GtkAboutDialog*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+
+public:
+ AboutDialog();
+
+
+ /** Returns the program name displayed in the about dialog.
+ * @return The program name. The string is owned by the about
+ * dialog and must not be modified.
+ *
+ * Since: 2.6.
+ */
+ Glib::ustring get_name() const;
+
+ /** Sets the name to display in the about dialog.
+ * If this is not set, it defaults to Glib::get_application_name().
+ *
+ * Since: 2.6
+ * @param name The program name.
+ */
+ void set_name(const Glib::ustring& name);
+
+ /** Returns the version string.
+ * @return The version string. The string is owned by the about
+ * dialog and must not be modified.
+ *
+ * Since: 2.6.
+ */
+ Glib::ustring get_version() const;
+
+ /** Sets the version string to display in the about dialog.
+ *
+ * Since: 2.6
+ * @param version The version string.
+ */
+ void set_version(const Glib::ustring& version);
+
+ /** Returns the copyright string.
+ * @return The copyright string. The string is owned by the about
+ * dialog and must not be modified.
+ *
+ * Since: 2.6.
+ */
+ Glib::ustring get_copyright() const;
+
+ /** Sets the copyright string to display in the about dialog.
+ * This should be a short string of one or two lines.
+ *
+ * Since: 2.6
+ * @param copyright The copyright string.
+ */
+ void set_copyright(const Glib::ustring& copyright);
+
+ /** Returns the comments string.
+ * @return The comments. The string is owned by the about
+ * dialog and must not be modified.
+ *
+ * Since: 2.6.
+ */
+ Glib::ustring get_comments() const;
+
+ /** Sets the comments string to display in the about
+ * dialog. This should be a short string of one or
+ * two lines.
+ *
+ * Since: 2.6
+ * @param comments A comments string.
+ */
+ void set_comments(const Glib::ustring& comments);
+
+ /** Returns the license information.
+ * @return The license information. The string is owned by the about
+ * dialog and must not be modified.
+ *
+ * Since: 2.6.
+ */
+ Glib::ustring get_license() const;
+
+ /** Sets the license information to be displayed in the secondary
+ * license dialog. If @a license is <tt>0</tt>, the license button is
+ * hidden.
+ *
+ * Since: 2.6
+ * @param license The license information or <tt>0</tt>.
+ */
+ void set_license(const Glib::ustring& license);
+
+ /** Returns the website URL.
+ * @return The website URL. The string is owned by the about
+ * dialog and must not be modified.
+ *
+ * Since: 2.6.
+ */
+ Glib::ustring get_website() const;
+
+ /** Sets the URL to use for the website link.
+ *
+ * Since: 2.6
+ * @param website A URL string starting with "http://".
+ */
+ void set_website(const Glib::ustring& website);
+
+ /** Returns the label used for the website link.
+ * @return The label used for the website link. The string is owned by the about
+ * dialog and must not be modified.
+ *
+ * Since: 2.6.
+ */
+ Glib::ustring get_website_label() const;
+
+ /** Sets the label to be used for the website link.
+ * It defaults to the website URL.
+ *
+ * Since: 2.6
+ * @param website_label The label used for the website link.
+ */
+ void set_website_label(const Glib::ustring& website_label);
+
+
+ /** Returns the string which are displayed in the authors tab
+ * of the secondary credits dialog.
+ * @return A <tt>0</tt>-terminated string array containing
+ * the authors. The array is owned by the about dialog
+ * and must not be modified.
+ *
+ * Since: 2.6.
+ */
+ Glib::StringArrayHandle get_authors() const;
+
+
+ /** Sets the strings which are displayed in the authors tab
+ * of the secondary credits dialog.
+ *
+ * Since: 2.6
+ * @param authors A <tt>0</tt>-terminated array of strings.
+ */
+ void set_authors(const Glib::StringArrayHandle& authors) const;
+
+
+ /** Returns the string which are displayed in the documenters
+ * tab of the secondary credits dialog.
+ * @return A <tt>0</tt>-terminated string array containing
+ * the documenters. The array is owned by the about dialog
+ * and must not be modified.
+ *
+ * Since: 2.6.
+ */
+ Glib::StringArrayHandle get_documenters() const;
+
+
+ /** Sets the strings which are displayed in the documenters tab
+ * of the secondary credits dialog.
+ *
+ * Since: 2.6
+ * @param documenters A <tt>0</tt>-terminated array of strings.
+ */
+ void set_documenters(const Glib::StringArrayHandle& documenters);
+
+ /** Returns the string which are displayed in the artists tab
+ * of the secondary credits dialog.
+ * @return A <tt>0</tt>-terminated string array containing
+ * the artists. The array is owned by the about dialog
+ * and must not be modified.
+ *
+ * Since: 2.6.
+ */
+ Glib::StringArrayHandle get_artists() const;
+
+ /** Sets the strings which are displayed in the artists tab
+ * of the secondary credits dialog.
+ *
+ * Since: 2.6
+ * @param artists A <tt>0</tt>-terminated array of strings.
+ */
+ void set_artists(const Glib::StringArrayHandle& artists);
+
+ /** Returns the translator credits string which is displayed
+ * in the translators tab of the secondary credits dialog.
+ * @return The translator credits string. The string is
+ * owned by the about dialog and must not be modified.
+ *
+ * Since: 2.6.
+ */
+ Glib::ustring get_translator_credits() const;
+
+ /** Sets the translator credits string which is displayed in
+ * the translators tab of the secondary credits dialog.
+ *
+ * The intended use for this string is to display the translator
+ * of the language which is currently used in the user interface.
+ * Using gettext(), a simple way to achieve that is to mark the
+ * string for translation:
+ * @code
+ * gtk_about_dialog_set_translator_credits (about, _("translator-credits"));
+ * @endcode
+ * It is a good idea to use the customary msgid "translator-credits" for this
+ * purpose, since translators will already know the purpose of that msgid, and
+ * since Gtk::AboutDialog will detect if "translator-credits" is untranslated
+ * and hide the tab.
+ *
+ * Since: 2.6
+ * @param translator_credits The translator credits.
+ */
+ void set_translator_credits(const Glib::ustring& translator_credits);
+
+
+ /** Returns the pixbuf displayed as logo in the about dialog.
+ * @return The pixbuf displayed as logo. The pixbuf is
+ * owned by the about dialog. If you want to keep a reference
+ * to it, you have to call Glib::object_ref() on it.
+ *
+ * Since: 2.6.
+ */
+ Glib::RefPtr<Gdk::Pixbuf> get_logo();
+
+ /** Returns the pixbuf displayed as logo in the about dialog.
+ * @return The pixbuf displayed as logo. The pixbuf is
+ * owned by the about dialog. If you want to keep a reference
+ * to it, you have to call Glib::object_ref() on it.
+ *
+ * Since: 2.6.
+ */
+ Glib::RefPtr<const Gdk::Pixbuf> get_logo() const;
+
+
+ /** Sets the pixbuf to be displayed as logo in
+ * the about dialog. If it is <tt>0</tt>, the default
+ * window icon set with Gtk::Window::set_default_icon()
+ * will be used.
+ *
+ * Since: 2.6
+ * @param logo A Gdk::Pixbuf, or <tt>0</tt>.
+ */
+ void set_logo(const Glib::RefPtr<Gdk::Pixbuf>& logo);
+
+
+ /** Returns the icon name displayed as logo in the about dialog.
+ * @return The icon name displayed as logo. The string is
+ * owned by the about dialog. If you want to keep a reference
+ * to it, you have to call Glib::strdup() on it.
+ *
+ * Since: 2.6.
+ */
+ Glib::ustring get_logo_icon_name() const;
+
+ /** Sets the pixbuf to be displayed as logo in
+ * the about dialog. If it is <tt>0</tt>, the default
+ * window icon set with Gtk::Window::set_default_icon()
+ * will be used.
+ *
+ * Since: 2.6
+ * @param icon_name An icon name, or <tt>0</tt>.
+ */
+ void set_logo_icon_name(const Glib::ustring& icon_name);
+
+ /** For instance,
+ * void on_activate_link_url(AboutDialog& about_dialog, const Glib::ustring& link);
+ */
+ typedef sigc::slot<void, AboutDialog& /* about_dialog */, const Glib::ustring& /* link */> SlotActivateLink;
+
+ //TODO: Document these methods.
+ static void set_email_hook(const SlotActivateLink& slot);
+
+
+ static void set_url_hook(const SlotActivateLink& slot);
+
+
+ /** The name of the program. If this is not set
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_name() ;
+
+/** The name of the program. If this is not set
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_name() const;
+
+ /** The version of the program.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_version() ;
+
+/** The version of the program.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_version() const;
+
+ /** Copyright information for the program.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_copyright() ;
+
+/** Copyright information for the program.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_copyright() const;
+
+ /** Comments about the program.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_comments() ;
+
+/** Comments about the program.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_comments() const;
+
+ /** The URL for the link to the website of the program.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_website() ;
+
+/** The URL for the link to the website of the program.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_website() const;
+
+ /** The label for the link to the website of the program. If this is not set
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_website_label() ;
+
+/** The label for the link to the website of the program. If this is not set
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_website_label() const;
+
+ /** The license of the program.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_license() ;
+
+/** The license of the program.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_license() const;
+
+ /** List of authors of the program.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::StringArrayHandle> property_authors() ;
+
+/** List of authors of the program.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::StringArrayHandle> property_authors() const;
+
+ /** List of people documenting the program.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::StringArrayHandle> property_documenters() ;
+
+/** List of people documenting the program.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::StringArrayHandle> property_documenters() const;
+
+ /** Credits to the translators. This string should be marked as translatable.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::StringArrayHandle> property_translator_credits() ;
+
+/** Credits to the translators. This string should be marked as translatable.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::StringArrayHandle> property_translator_credits() const;
+
+ /** List of people who have contributed artwork to the program.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::StringArrayHandle> property_artists() ;
+
+/** List of people who have contributed artwork to the program.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::StringArrayHandle> property_artists() const;
+
+ /** A logo for the about box. If this is not set
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy< Glib::RefPtr<Gdk::Pixbuf> > property_logo() ;
+
+/** A logo for the about box. If this is not set
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Pixbuf> > property_logo() const;
+
+ /** A named icon to use as the logo for the about box.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_logo_icon_name() ;
+
+/** A named icon to use as the logo for the about box.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_logo_icon_name() const;
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::AboutDialog
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::AboutDialog* wrap(GtkAboutDialog* object, bool take_copy = false);
+}
+#endif /* _GTKMM_ABOUTDIALOG_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/accelgroup.cc b/libs/gtkmm2/gtk/gtkmm/accelgroup.cc
new file mode 100644
index 0000000000..edb7170bf4
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/accelgroup.cc
@@ -0,0 +1,347 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/accelgroup.h>
+#include <gtkmm/private/accelgroup_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkaccelgroup.h>
+
+
+namespace Gtk
+{
+
+bool AccelGroup::valid(guint keyval, Gdk::ModifierType modifiers)
+{
+ return gtk_accelerator_valid(keyval, (GdkModifierType) modifiers);
+}
+
+void AccelGroup::parse(const Glib::ustring& accelerator,
+ guint& accelerator_key,
+ Gdk::ModifierType& accelerator_mods)
+{
+ GdkModifierType mods = GdkModifierType(0);
+ gtk_accelerator_parse(accelerator.c_str(), &accelerator_key, &mods);
+
+ accelerator_mods = (Gdk::ModifierType) mods;
+}
+
+Glib::ustring AccelGroup::name(guint accelerator_key, Gdk::ModifierType accelerator_mods)
+{
+ return gtk_accelerator_name(accelerator_key, (GdkModifierType) accelerator_mods);
+}
+
+void AccelGroup::set_default_mod_mask(Gdk::ModifierType default_mod_mask)
+{
+ gtk_accelerator_set_default_mod_mask((GdkModifierType) default_mod_mask);
+}
+
+Gdk::ModifierType AccelGroup::get_default_mod_mask()
+{
+ return (Gdk::ModifierType) gtk_accelerator_get_default_mod_mask();
+}
+
+} // namespace Gtk
+
+
+namespace
+{
+
+gboolean AccelGroup_signal_accel_activate_callback(GtkAccelGroup* self, GObject* p0,guint p1,GdkModifierType p2,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< bool,const Glib::RefPtr<Glib::Object>&,guint,Gdk::ModifierType > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ return static_cast<int>((*static_cast<SlotType*>(slot))(Glib::wrap(p0, true)
+, p1, ((Gdk::ModifierType)(p2))
+));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean AccelGroup_signal_accel_activate_notify_callback(GtkAccelGroup* self, GObject* p0,guint p1,GdkModifierType p2, void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,const Glib::RefPtr<Glib::Object>&,guint,Gdk::ModifierType > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::wrap(p0, true)
+, p1, ((Gdk::ModifierType)(p2))
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+const Glib::SignalProxyInfo AccelGroup_signal_accel_activate_info =
+{
+ "accel_activate",
+ (GCallback) &AccelGroup_signal_accel_activate_callback,
+ (GCallback) &AccelGroup_signal_accel_activate_notify_callback
+};
+
+
+void AccelGroup_signal_accel_changed_callback(GtkAccelGroup* self, guint p0,GdkModifierType p1,GClosure* p2,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,guint,Gdk::ModifierType,GClosure* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(p0, ((Gdk::ModifierType)(p1))
+, p2);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo AccelGroup_signal_accel_changed_info =
+{
+ "accel_changed",
+ (GCallback) &AccelGroup_signal_accel_changed_callback,
+ (GCallback) &AccelGroup_signal_accel_changed_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Gtk::AccelGroup> wrap(GtkAccelGroup* object, bool take_copy)
+{
+ return Glib::RefPtr<Gtk::AccelGroup>( dynamic_cast<Gtk::AccelGroup*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} /* namespace Glib */
+
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& AccelGroup_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &AccelGroup_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_accel_group_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void AccelGroup_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->accel_changed = &accel_changed_callback;
+}
+
+
+void AccelGroup_Class::accel_changed_callback(GtkAccelGroup* self, guint p0, GdkModifierType p1, GClosure* p2)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_accel_changed(p0, ((Gdk::ModifierType)(p1))
+, p2);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->accel_changed)
+ (*base->accel_changed)(self, p0, p1, p2);
+ }
+}
+
+
+Glib::ObjectBase* AccelGroup_Class::wrap_new(GObject* object)
+{
+ return new AccelGroup((GtkAccelGroup*)object);
+}
+
+
+/* The implementation: */
+
+GtkAccelGroup* AccelGroup::gobj_copy()
+{
+ reference();
+ return gobj();
+}
+
+AccelGroup::AccelGroup(const Glib::ConstructParams& construct_params)
+:
+ Glib::Object(construct_params)
+{}
+
+AccelGroup::AccelGroup(GtkAccelGroup* castitem)
+:
+ Glib::Object((GObject*)(castitem))
+{}
+
+AccelGroup::~AccelGroup()
+{}
+
+
+AccelGroup::CppClassType AccelGroup::accelgroup_class_; // initialize static member
+
+GType AccelGroup::get_type()
+{
+ return accelgroup_class_.init().get_type();
+}
+
+GType AccelGroup::get_base_type()
+{
+ return gtk_accel_group_get_type();
+}
+
+
+AccelGroup::AccelGroup()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Glib::Object(Glib::ConstructParams(accelgroup_class_.init()))
+{
+ }
+
+Glib::RefPtr<AccelGroup> AccelGroup::create()
+{
+ return Glib::RefPtr<AccelGroup>( new AccelGroup() );
+}
+void AccelGroup::lock()
+{
+ gtk_accel_group_lock(gobj());
+}
+
+void AccelGroup::unlock()
+{
+ gtk_accel_group_unlock(gobj());
+}
+
+bool AccelGroup::disconnect_key(guint accel_key, Gdk::ModifierType accel_mods)
+{
+ return gtk_accel_group_disconnect_key(gobj(), accel_key, ((GdkModifierType)(accel_mods)));
+}
+
+Glib::ustring AccelGroup::get_label(guint accelerator_key, Gdk::ModifierType accelerator_mods)
+{
+ return Glib::convert_return_gchar_ptr_to_ustring(gtk_accelerator_get_label(accelerator_key, ((GdkModifierType)(accelerator_mods))));
+}
+
+bool AccelGroup::activate(GQuark accel_quark, const Glib::RefPtr<Glib::Object>& acceleratable, guint accel_key, Gdk::ModifierType accel_mods)
+{
+ return gtk_accel_group_activate(gobj(), accel_quark, Glib::unwrap(acceleratable), accel_key, ((GdkModifierType)(accel_mods)));
+}
+
+bool AccelGroup::activate(Gtk::Object& object, guint accel_key, Gdk::ModifierType accel_mods)
+{
+ return gtk_accel_groups_activate((object).Glib::Object::gobj(), accel_key, ((GdkModifierType)(accel_mods)));
+}
+
+
+Glib::SignalProxy3< bool,const Glib::RefPtr<Glib::Object>&,guint,Gdk::ModifierType > AccelGroup::signal_accel_activate()
+{
+ return Glib::SignalProxy3< bool,const Glib::RefPtr<Glib::Object>&,guint,Gdk::ModifierType >(this, &AccelGroup_signal_accel_activate_info);
+}
+
+Glib::SignalProxy3< void,guint,Gdk::ModifierType,GClosure* > AccelGroup::signal_accel_changed()
+{
+ return Glib::SignalProxy3< void,guint,Gdk::ModifierType,GClosure* >(this, &AccelGroup_signal_accel_changed_info);
+}
+
+
+void Gtk::AccelGroup::on_accel_changed(guint keyval, Gdk::ModifierType modifier, GClosure* accel_closure)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->accel_changed)
+ (*base->accel_changed)(gobj(),keyval,((GdkModifierType)(modifier)),accel_closure);
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/accelgroup.h b/libs/gtkmm2/gtk/gtkmm/accelgroup.h
new file mode 100644
index 0000000000..1a6a8adc4d
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/accelgroup.h
@@ -0,0 +1,249 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_ACCELGROUP_H
+#define _GTKMM_ACCELGROUP_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#include <gdkmm/types.h>
+#include <gtkmm/object.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkAccelGroup GtkAccelGroup;
+typedef struct _GtkAccelGroupClass GtkAccelGroupClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class AccelGroup_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** A Gtk::AccelGroup represents a group of keyboard accelerators, typically
+ * attached to a toplevel Gtk::Window (with Gtk::Window::add_accel_group()).
+ * Usually you won't need to create a Gtk::AccelGroup directly; instead, gtkmm
+ * automatically sets up the accelerators for your menus. Note that
+ * accelerators are different from mnemonics. Accelerators are shortcuts for
+ * activating a menu item; they appear alongside the menu item for which
+ * they're a shortcut. For example "Ctrl+Q" might appear alongside the "Quit"
+ * menu item. Mnemonics are shortcuts for GUI elements such as text entries or
+ * buttons; they appear as underlined characters. See the Gtk::Label
+ * constructor. Menu items can have both accelerators and mnemonics, of course.
+ *
+ * You can use Gtk::Window::get_accel_group() to get an accel group for that window,
+ * then use it with other widgets too.
+ */
+
+class AccelGroup : public Glib::Object
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef AccelGroup CppObjectType;
+ typedef AccelGroup_Class CppClassType;
+ typedef GtkAccelGroup BaseObjectType;
+ typedef GtkAccelGroupClass BaseClassType;
+
+private: friend class AccelGroup_Class;
+ static CppClassType accelgroup_class_;
+
+private:
+ // noncopyable
+ AccelGroup(const AccelGroup&);
+ AccelGroup& operator=(const AccelGroup&);
+
+protected:
+ explicit AccelGroup(const Glib::ConstructParams& construct_params);
+ explicit AccelGroup(GtkAccelGroup* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~AccelGroup();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ GtkAccelGroup* gobj() { return reinterpret_cast<GtkAccelGroup*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const GtkAccelGroup* gobj() const { return reinterpret_cast<GtkAccelGroup*>(gobject_); }
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ GtkAccelGroup* gobj_copy();
+
+private:
+
+
+protected:
+ AccelGroup();
+
+public:
+ /** Creates a new Gtk::AccelGroup object.
+ * @return A Glib::RefPtr<> to a newly created Gtk::AccelGroup object.
+ */
+
+ static Glib::RefPtr<AccelGroup> create();
+
+
+ /** Locks the given accelerator group.
+ *
+ * Locking an acelerator group prevents the accelerators contained
+ * within it to be changed during runtime. Refer to
+ * gtk_accel_map_change_entry() about runtime accelerator changes.
+ *
+ * If called more than once, @a accel_group remains locked until
+ * unlock() has been called an equivalent number
+ * of times.
+ */
+ void lock();
+
+ /** Undoes the last call to lock() on this @a accel_group .
+ */
+ void unlock();
+
+ /** Removes an accelerator previously installed through
+ * connect().
+ * @param accel_key Key value of the accelerator.
+ * @param accel_mods Modifier combination of the accelerator.
+ * @return <tt>true</tt> if there was an accelerator which could be
+ * removed, <tt>false</tt> otherwise.
+ */
+ bool disconnect_key(guint accel_key, Gdk::ModifierType accel_mods);
+
+ /** Determines whether a given keyval and modifier mask constitute
+ * a valid keyboard accelerator. For example, the 'a' keyval
+ * plus Gdk::CONTROL_MASK is valid - this is a "Ctrl+a" accelerator.
+ * But you can't, for instance, use the GDK_Control_L keyval
+ * as an accelerator.
+ */
+ static bool valid(guint keyval, Gdk::ModifierType modifiers);
+
+ /** Parse the accelerator string.
+ * @param accelerator See the Gtk::AccelKey constructor for the format.
+ * @param accelerator_key Output argument
+ * @param accelerator_mods Output argument
+ */
+ static void parse(const Glib::ustring& accelerator, guint& accelerator_key, Gdk::ModifierType& accelerator_mods);
+
+ /** Converts an accelerator keyval and modifier mask
+ * into a string parseable by parse().
+ * For example, if you pass in 'q' and Gdk::CONTROL_MASK, it returns "&lt;Control&gt;q".
+ */
+ static Glib::ustring name(guint accelerator_key, Gdk::ModifierType accelerator_mods);
+
+
+ /** Converts an accelerator keyval and modifier mask into a string
+ * which can be used to represent the accelerator to the user.
+ * @param accelerator_key Accelerator keyval.
+ * @param accelerator_mods Accelerator modifier mask.
+ * @return A newly-allocated string representing the accelerator.
+ *
+ * Since: 2.6.
+ */
+ static Glib::ustring get_label(guint accelerator_key, Gdk::ModifierType accelerator_mods);
+
+ /** Sets the modifiers that will be considered significant for keyboard
+ * accelerators. The default mod mask is Gdk::CONTROL_MASK |
+ * Gdk::SHIFT_MASK | Gdk::MOD1_MASK, that is, Control, Shift, and Alt.
+ * Other modifiers will ignored by default.
+ * You must include at least the three default modifiers in any
+ * value you pass to this function.
+ *
+ * The default mod mask should be changed on application startup,
+ * before using any accelerator groups.
+ */
+ static void set_default_mod_mask(Gdk::ModifierType default_mod_mask);
+
+ /// See set_default_mod_mask().
+ static Gdk::ModifierType get_default_mod_mask();
+
+ //TODO: This is undocumented in GTK+ at the moment. When would it be used and where does the quark come from? murrayc.
+
+ bool activate(GQuark accel_quark, const Glib::RefPtr<Glib::Object>& acceleratable, guint accel_key, Gdk::ModifierType accel_mods);
+
+
+ //Let's not wrap this, because the GtkAccelGroupFindFunc callback uses GClosures, and it's not clear that this is useful.
+ //AccelKey find(const SlotFind& slot);
+ //GtkAccelKey* gtk_accel_group_find(GtkAccelGroup* accel_group, GtkAccelGroupFindFunc find_func, gpointer data);
+
+
+ /** Finds the first accelerator in any Gtk::AccelGroup attached
+ * to @a object that matches @a accel_key and @a accel_mods , and
+ * activates that accelerator.
+ * If an accelerator was activated and handled this keypress, <tt>true</tt>
+ * is returned.
+ * @param object The G::Object, usually a Gtk::Window, on which
+ * to activate the accelerator.
+ * @param accel_key Accelerator keyval from a key event.
+ * @param accel_mods Keyboard state mask from a key event.
+ * @return <tt>true</tt> if the accelerator was handled, <tt>false</tt> otherwise.
+ */
+ static bool activate(Gtk::Object& object, guint accel_key, Gdk::ModifierType accel_mods);
+
+ //TODO: Discover real parameter names:
+
+
+ Glib::SignalProxy3< bool,const Glib::RefPtr<Glib::Object>&,guint,Gdk::ModifierType > signal_accel_activate();
+
+ //TODO: The C type is unpleasant:
+
+
+ Glib::SignalProxy3< void,guint,Gdk::ModifierType,GClosure* > signal_accel_changed();
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_accel_changed(guint keyval, Gdk::ModifierType modifier, GClosure* accel_closure);
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::AccelGroup
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Gtk::AccelGroup> wrap(GtkAccelGroup* object, bool take_copy = false);
+}
+
+
+#endif /* _GTKMM_ACCELGROUP_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/accelkey.cc b/libs/gtkmm2/gtk/gtkmm/accelkey.cc
new file mode 100644
index 0000000000..ffd734c423
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/accelkey.cc
@@ -0,0 +1,93 @@
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/accelkey.h>
+#include <gtkmm/accelgroup.h>
+
+namespace Gtk
+{
+
+AccelKey::AccelKey()
+: key_(GDK_VoidSymbol),
+ mod_((Gdk::ModifierType)0)
+{
+}
+
+AccelKey::AccelKey(guint accel_key, Gdk::ModifierType accel_mods,
+ const Glib::ustring& accel_path)
+: key_(accel_key),
+ mod_(accel_mods),
+ path_(accel_path)
+{
+}
+
+AccelKey::AccelKey(const Glib::ustring& accelerator, const Glib::ustring& accel_path)
+: path_(accel_path)
+{
+ //Get the key and mod by parsing the accelerator string:
+ AccelGroup::parse (accelerator, key_, mod_);
+}
+
+AccelKey::AccelKey(const AccelKey& src)
+{
+ key_ = src.key_;
+ mod_ = src.mod_;
+ path_ = src.path_;
+}
+
+AccelKey& AccelKey::operator=(const AccelKey& src)
+{
+ key_ = src.key_;
+ mod_ = src.mod_;
+ path_ = src.path_;
+
+ return *this;
+}
+
+guint AccelKey::get_key() const
+{
+ return key_;
+}
+
+Gdk::ModifierType AccelKey::get_mod() const
+{
+ return mod_;
+}
+
+Glib::ustring AccelKey::get_path() const
+{
+ return path_;
+}
+
+bool AccelKey::is_null() const
+{
+ return ( (key_ == GDK_VoidSymbol) || !(get_key() > 0) ); //both seem to be invalid.
+}
+
+Glib::ustring AccelKey::get_abbrev() const
+{
+ return AccelGroup::name (key_, mod_);
+}
+
+
+} // namespace
+
diff --git a/libs/gtkmm2/gtk/gtkmm/accelkey.h b/libs/gtkmm2/gtk/gtkmm/accelkey.h
new file mode 100644
index 0000000000..21841b1a8e
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/accelkey.h
@@ -0,0 +1,94 @@
+/* $Id$ */
+#ifndef _GTKMM_ACCELKEY_H
+#define _GTKMM_ACCELKEY_H
+
+/* menu_elems.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gdk/gdkkeysyms.h>
+#include <gdkmm/types.h>
+
+
+namespace Gtk
+{
+
+/** Defines accelerator key combinations.
+ * For instance, pressing Control-Q to activate the File|Quit menu item.
+ * Typedefed as Gtk::Menu::AccelKey
+ *
+ * By defining accelerator paths you can allow the user of your application
+ * to change accelerators himself. An example of an accelerator might be
+ * "<MainWindow>/File/Open". Modified accelerators may be saved
+ * @see Gtk::AccelMap
+ * @ingroup Menus
+ */
+class AccelKey
+{
+public:
+ AccelKey();
+
+ /** AccelKey constructor.
+ * @param accel_key For instance, 'q'
+ * @param accel_mods For instance, Gdk::CONTROL_MASK
+ * @param accel_path For instance, "<MainWindow>/File/Open"
+ */
+ AccelKey(guint accel_key, Gdk::ModifierType accel_mods,
+ const Glib::ustring& accel_path = "");
+
+ /** AccelKey constructor.
+ * @param accelerator For instance, &quot;&lt;control&gt;q&quot; - Use
+ * &lt;control&gt;, &lt;shift&gt;, &lt;alt&gt; and &lt;release&gt;.
+ * Use F1, F2, etc, for function keys.
+ * @param accel_path For instance, "<MainWindow>/File/Open"
+ */
+ AccelKey(const Glib::ustring& accelerator,
+ const Glib::ustring& accel_path = Glib::ustring());
+
+ AccelKey(const AccelKey& src);
+
+ AccelKey& operator=(const AccelKey& src);
+
+ bool is_null() const;
+
+ /**
+ * Gets the accelerator key.
+ */
+ guint get_key() const;
+ /**
+ * Gets the accelerator modifier.
+ */
+ Gdk::ModifierType get_mod() const;
+ /**
+ * Gets the accelerator path.
+ */
+ Glib::ustring get_path() const;
+ /**
+ * Gets the accelerator representation for labels.
+ */
+ Glib::ustring get_abbrev() const;
+
+protected:
+ guint key_;
+ Gdk::ModifierType mod_;
+ Glib::ustring path_;
+};
+
+} /* namespace Gtk */
+
+#endif //_GTKMM_ACCELKEY_H
diff --git a/libs/gtkmm2/gtk/gtkmm/accellabel.cc b/libs/gtkmm2/gtk/gtkmm/accellabel.cc
new file mode 100644
index 0000000000..d62bc75418
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/accellabel.cc
@@ -0,0 +1,188 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/accellabel.h>
+#include <gtkmm/private/accellabel_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkaccellabel.h>
+#include <glibmm/wrap.h>
+
+namespace Gtk
+{
+
+AccelLabel::AccelLabel(const Glib::ustring& label, bool mnemonic)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Label(Glib::ConstructParams(accellabel_class_.init(), (char*) 0))
+{
+ if(mnemonic)
+ set_text_with_mnemonic(label);
+ else
+ set_text(label);
+}
+
+void AccelLabel::unset_accel_widget()
+{
+ //Not documented, at the moment, but this is what the source does:
+ gtk_accel_label_set_accel_widget(gobj(), 0);
+}
+
+} // namespace Gtk
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::AccelLabel* wrap(GtkAccelLabel* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::AccelLabel *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& AccelLabel_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &AccelLabel_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_accel_label_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void AccelLabel_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* AccelLabel_Class::wrap_new(GObject* o)
+{
+ return manage(new AccelLabel((GtkAccelLabel*)(o)));
+
+}
+
+
+/* The implementation: */
+
+AccelLabel::AccelLabel(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Label(construct_params)
+{
+ }
+
+AccelLabel::AccelLabel(GtkAccelLabel* castitem)
+:
+ Gtk::Label((GtkLabel*)(castitem))
+{
+ }
+
+AccelLabel::~AccelLabel()
+{
+ destroy_();
+}
+
+AccelLabel::CppClassType AccelLabel::accellabel_class_; // initialize static member
+
+GType AccelLabel::get_type()
+{
+ return accellabel_class_.init().get_type();
+}
+
+GType AccelLabel::get_base_type()
+{
+ return gtk_accel_label_get_type();
+}
+
+
+AccelLabel::AccelLabel()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Label(Glib::ConstructParams(accellabel_class_.init()))
+{
+ }
+
+void AccelLabel::set_accel_widget(const Widget& accel_widget)
+{
+ gtk_accel_label_set_accel_widget(gobj(), const_cast<GtkWidget*>((accel_widget).gobj()));
+}
+
+Widget* AccelLabel::get_accel_widget()
+{
+ return Glib::wrap(gtk_accel_label_get_accel_widget(gobj()));
+}
+
+const Widget* AccelLabel::get_accel_widget() const
+{
+ return Glib::wrap(gtk_accel_label_get_accel_widget(const_cast<GtkAccelLabel*>(gobj())));
+}
+
+guint AccelLabel::get_accel_width() const
+{
+ return gtk_accel_label_get_accel_width(const_cast<GtkAccelLabel*>(gobj()));
+}
+
+bool AccelLabel::refetch()
+{
+ return gtk_accel_label_refetch(gobj());
+}
+
+
+Glib::PropertyProxy<Gtk::Widget*> AccelLabel::property_accel_widget()
+{
+ return Glib::PropertyProxy<Gtk::Widget*>(this, "accel-widget");
+}
+
+Glib::PropertyProxy_ReadOnly<Gtk::Widget*> AccelLabel::property_accel_widget() const
+{
+ return Glib::PropertyProxy_ReadOnly<Gtk::Widget*>(this, "accel-widget");
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/accellabel.h b/libs/gtkmm2/gtk/gtkmm/accellabel.h
new file mode 100644
index 0000000000..a4d6a32645
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/accellabel.h
@@ -0,0 +1,182 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_ACCELLABEL_H
+#define _GTKMM_ACCELLABEL_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* accellabel.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/label.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkAccelLabel GtkAccelLabel;
+typedef struct _GtkAccelLabelClass GtkAccelLabelClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class AccelLabel_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** A label which displays an accelerator key on the right of the text.
+ * Used for menu item labels, for instance.
+ *
+ * @ingroup Widgets
+ */
+
+class AccelLabel : public Label
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef AccelLabel CppObjectType;
+ typedef AccelLabel_Class CppClassType;
+ typedef GtkAccelLabel BaseObjectType;
+ typedef GtkAccelLabelClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~AccelLabel();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class AccelLabel_Class;
+ static CppClassType accellabel_class_;
+
+ // noncopyable
+ AccelLabel(const AccelLabel&);
+ AccelLabel& operator=(const AccelLabel&);
+
+protected:
+ explicit AccelLabel(const Glib::ConstructParams& construct_params);
+ explicit AccelLabel(GtkAccelLabel* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkAccelLabel* gobj() { return reinterpret_cast<GtkAccelLabel*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkAccelLabel* gobj() const { return reinterpret_cast<GtkAccelLabel*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+
+public:
+
+ //The default ctor doesn't correspond to any _new function, but gtkmenuitem.cc does a simple g_object_new() with no properties.
+ /** Default constructor to create an AccelLabel object
+ */
+ AccelLabel();
+
+ /** Constructor to create an AccelLabel object with a default label
+ * @param label The label string.
+ * @param mnemonic If true, characters preceded by an underscore (_) will be underlined and used as a keyboard accelerator.
+ */
+ explicit AccelLabel(const Glib::ustring& label, bool mnemonic = false);
+
+
+ /** Sets the widget to be monitored by this accelerator label.
+ * @param accel_widget The widget to be monitored.
+ */
+ void set_accel_widget(const Widget& accel_widget);
+ /// Forget the accel widget previously set by set_accel_widget().
+ void unset_accel_widget();
+
+
+ /** Fetches the widget monitored by this accelerator label. See
+ * set_accel_widget().
+ * @return The object monitored by the accelerator label,
+ * or <tt>0</tt>.
+ */
+ Widget* get_accel_widget();
+
+ /** Fetches the widget monitored by this accelerator label. See
+ * set_accel_widget().
+ * @return The object monitored by the accelerator label,
+ * or <tt>0</tt>.
+ */
+ const Widget* get_accel_widget() const;
+
+
+ /** Gets the width needed to display this accelerator label. This is used by menus to align all of the Gtk::MenuItem widgets, and shouldn't be needed by applications.
+ * @return Width of this accelerator label.
+ */
+ guint get_accel_width() const;
+
+ /** Recreates the string representing the accelerator keys.
+ * @return Always returns <tt>false</tt>.
+ */
+ bool refetch();
+
+ //_WRAP_PROPERTY("accel-closure", Glib::Object) //GClosure
+ /** The widget to be monitored for accelerator changes.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Gtk::Widget*> property_accel_widget() ;
+
+/** The widget to be monitored for accelerator changes.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Gtk::Widget*> property_accel_widget() const;
+
+
+};
+
+} /* namespace Gtk */
+
+
+namespace Glib
+{
+ /** @relates Gtk::AccelLabel
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::AccelLabel* wrap(GtkAccelLabel* object, bool take_copy = false);
+}
+#endif /* _GTKMM_ACCELLABEL_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/accelmap.cc b/libs/gtkmm2/gtk/gtkmm/accelmap.cc
new file mode 100644
index 0000000000..1d87a7cd64
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/accelmap.cc
@@ -0,0 +1,70 @@
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/accelmap.h>
+#include <gtk/gtkaccelmap.h>
+
+namespace Gtk
+{
+
+namespace AccelMap
+{
+
+void add_entry(const std::string& accel_path,
+ guint accel_key,
+ Gdk::ModifierType accel_mods)
+{
+ gtk_accel_map_add_entry(accel_path.c_str(), accel_key,
+ (GdkModifierType)accel_mods);
+}
+
+bool change_entry(const std::string& accel_path,
+ guint accel_key,
+ Gdk::ModifierType accel_mods,
+ bool replace)
+{
+ return gtk_accel_map_change_entry(accel_path.c_str(), accel_key,
+ (GdkModifierType)accel_mods, replace);
+}
+
+void load(const std::string& filename)
+{
+ gtk_accel_map_load(filename.c_str());
+}
+
+void save(const std::string& filename)
+{
+ gtk_accel_map_save(filename.c_str());
+}
+
+void lock_path(const std::string& accel_path)
+{
+ gtk_accel_map_lock_path(accel_path.c_str());
+}
+
+void unlock_path(const std::string& accel_path)
+{
+ gtk_accel_map_unlock_path(accel_path.c_str());
+}
+
+} // namespace AccelMap
+
+} // namespace Gtk
+
diff --git a/libs/gtkmm2/gtk/gtkmm/accelmap.h b/libs/gtkmm2/gtk/gtkmm/accelmap.h
new file mode 100644
index 0000000000..00dd8b9a1f
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/accelmap.h
@@ -0,0 +1,129 @@
+// -*- c++ -*-
+#ifndef _GTKMM_ACCELMAP_H
+#define _GTKMM_ACCELMAP_H
+
+/* $Id$ */
+
+/* accelmap.h
+ *
+ * Copyright (C) 2002 The Gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <string>
+
+#include <gdkmm/types.h>
+
+namespace Gtk
+{
+
+namespace AccelMap
+{
+
+//TODO: Why is the accel_path a std::string, instead of a Glib::ustring? murrayc.
+
+/** Registers a new accelerator with the global accelerator map.
+ * This function should only be called once per accel_path
+ * with the canonical accel_key and accel_mods for this path.
+ * To change the accelerator during runtime programatically, use
+ * change_entry().
+ * The accelerator path must consist of "&lt;WINDOWTYPE&gt;/Category1/Category2/.../Action",
+ * where &lt;WINDOWTYPE&gt; should be a unique application-specific identifier, that
+ * corresponds to the kind of window the accelerator is being used in, e.g. "Gimp-Image",
+ * "Abiword-Document" or "Gnumeric-Settings".
+ * The Category1/.../Action portion is most appropriately chosen by the action the
+ * accelerator triggers, i.e. for accelerators on menu items, choose the item's menu path,
+ * e.g. "File/Save As", "Image/View/Zoom" or "Edit/Select All".
+ * So a full valid accelerator path may look like:
+ * "&lt;Gimp-Toolbox&gt;/File/Dialogs/Tool Options...".
+ *
+ * @param accel_path valid accelerator path
+ * @param accel_key the accelerator key
+ * @param accel_mods the accelerator modifiers
+ *
+ */
+void add_entry(const std::string& accel_path,
+ guint accel_key,
+ Gdk::ModifierType accel_mods);
+
+/** Changes the accel_key and accel_mods currently associated with accel_path.
+ * Due to conflicts with other accelerators, a change may not always be possible,
+ * replace indicates whether other accelerators may be deleted to resolve such
+ * conflicts. A change will only occur if all conflicts could be resolved (which
+ * might not be the case if conflicting accelerators are locked). Successful
+ * changes are indicated by a true return value.
+ *
+ * @param accel_path a valid accelerator path
+ * @param accel_key the new accelerator key
+ * @param accel_mods the new accelerator modifiers
+ * @param replace true if other accelerators may be deleted upon conflicts
+ * @result true if the accelerator could be changed, false otherwise
+ */
+bool change_entry(const std::string& accel_path,
+ guint accel_key,
+ Gdk::ModifierType accel_mods,
+ bool replace);
+
+/** Parses a file previously saved with save() for
+ * accelerator specifications, and propagates them accordingly.
+ *
+ * @param filename a file containing accelerator specifications
+ */
+void load(const std::string& filename);
+
+/** Saves current accelerator specifications (accelerator path, key
+ * and modifiers) to filename.
+ * The file is written in a format suitable to be read back in by
+ * load().
+ *
+ * @param filename the file to contain accelerator specifications
+ */
+void save(const std::string& filename);
+
+/** Locks the given accelerator path.
+ *
+ * Locking an accelerator path prevents its accelerator from being changed
+ * during runtime. A locked accelerator path can be unlocked by
+ * unlock_path(). Refer to change_entry()
+ * about runtime accelerator changes.
+ *
+ * Note that locking of individual accelerator paths is independent from
+ * locking the #GtkAccelGroup containing them. For runtime accelerator
+ * changes to be possible both the accelerator path and its AccelGroup
+ * have to be unlocked.
+ *
+ * @param accel_path a valid accelerator path
+ *
+ * Since: 2.4
+ **/
+void lock_path(const std::string& accel_path);
+
+/** Unlocks the given accelerator path. Refer to gtk_accel_map_lock_path()
+ * about accelerator path locking.
+ *
+ * @param accel_path a valid accelerator path
+ *
+ * Since: 2.4
+ **/
+void unlock_path(const std::string& accel_path);
+
+} // namespace AccelMap
+
+} // namespace Gtk
+
+
+#endif /* _GTKMM_ACCELMAP_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/action.cc b/libs/gtkmm2/gtk/gtkmm/action.cc
new file mode 100644
index 0000000000..1504ee29c2
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/action.cc
@@ -0,0 +1,639 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/action.h>
+#include <gtkmm/private/action_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 2003 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkaction.h>
+
+#include <gtkmm/menuitem.h>
+#include <gtkmm/toolitem.h>
+#include <gtkmm/image.h>
+
+namespace Gtk
+{
+
+Action::Action(const Glib::ustring& name, const Gtk::StockID& stock_id, const Glib::ustring& label, const Glib::ustring& tooltip)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Glib::Object(Glib::ConstructParams(action_class_.init(), "name",name.c_str(),"stock_id",stock_id.get_c_str(),"label",(label.empty() ? 0 : label.c_str()),"tooltip",(tooltip.empty() ? 0 : tooltip.c_str()), (char*) 0))
+{}
+
+Glib::RefPtr<Action> Action::create(const Glib::ustring& name, const Glib::ustring& label, const Glib::ustring& tooltip)
+{
+ return Glib::RefPtr<Action>( new Action(name, Gtk::StockID(), label, tooltip) );
+}
+
+Glib::RefPtr<Action> Action::create(const Glib::ustring& name, const Gtk::StockID& stock_id, const Glib::ustring& label, const Glib::ustring& tooltip)
+{
+ return Glib::RefPtr<Action>( new Action(name, stock_id, label, tooltip) );
+}
+
+
+void Action::set_tooltip(const Glib::ustring& tooltip)
+{
+ property_tooltip() = tooltip;
+}
+
+
+} // namespace Gtk
+
+
+namespace
+{
+
+const Glib::SignalProxyInfo Action_signal_activate_info =
+{
+ "activate",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Gtk::Action> wrap(GtkAction* object, bool take_copy)
+{
+ return Glib::RefPtr<Gtk::Action>( dynamic_cast<Gtk::Action*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} /* namespace Glib */
+
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Action_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Action_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_action_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Action_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->create_menu_item = &create_menu_item_vfunc_callback;
+ klass->create_tool_item = &create_tool_item_vfunc_callback;
+ klass->connect_proxy = &connect_proxy_vfunc_callback;
+ klass->disconnect_proxy = &disconnect_proxy_vfunc_callback;
+ klass->activate = &activate_callback;
+}
+
+GtkWidget* Action_Class::create_menu_item_vfunc_callback(GtkAction* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return (GtkWidget*)Glib::unwrap(obj->create_menu_item_vfunc());
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->create_menu_item)
+ return (*base->create_menu_item)(self);
+ }
+
+ typedef GtkWidget* RType;
+ return RType();
+}
+
+GtkWidget* Action_Class::create_tool_item_vfunc_callback(GtkAction* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return (GtkWidget*)Glib::unwrap(obj->create_tool_item_vfunc());
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->create_tool_item)
+ return (*base->create_tool_item)(self);
+ }
+
+ typedef GtkWidget* RType;
+ return RType();
+}
+
+void Action_Class::connect_proxy_vfunc_callback(GtkAction* self, GtkWidget* proxy)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->connect_proxy_vfunc(Glib::wrap(proxy)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->connect_proxy)
+ (*base->connect_proxy)(self, proxy);
+ }
+}
+
+void Action_Class::disconnect_proxy_vfunc_callback(GtkAction* self, GtkWidget* proxy)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->disconnect_proxy_vfunc(Glib::wrap(proxy)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->disconnect_proxy)
+ (*base->disconnect_proxy)(self, proxy);
+ }
+}
+
+
+void Action_Class::activate_callback(GtkAction* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_activate();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->activate)
+ (*base->activate)(self);
+ }
+}
+
+
+Glib::ObjectBase* Action_Class::wrap_new(GObject* object)
+{
+ return new Action((GtkAction*)object);
+}
+
+
+/* The implementation: */
+
+GtkAction* Action::gobj_copy()
+{
+ reference();
+ return gobj();
+}
+
+Action::Action(const Glib::ConstructParams& construct_params)
+:
+ Glib::Object(construct_params)
+{}
+
+Action::Action(GtkAction* castitem)
+:
+ Glib::Object((GObject*)(castitem))
+{}
+
+Action::~Action()
+{}
+
+
+Action::CppClassType Action::action_class_; // initialize static member
+
+GType Action::get_type()
+{
+ return action_class_.init().get_type();
+}
+
+GType Action::get_base_type()
+{
+ return gtk_action_get_type();
+}
+
+
+Action::Action()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Glib::Object(Glib::ConstructParams(action_class_.init()))
+{
+ }
+
+Glib::RefPtr<Action> Action::create()
+{
+ return Glib::RefPtr<Action>( new Action() );
+}
+Glib::ustring Action::get_name() const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(gtk_action_get_name(const_cast<GtkAction*>(gobj())));
+}
+
+bool Action::is_sensitive() const
+{
+ return gtk_action_is_sensitive(const_cast<GtkAction*>(gobj()));
+}
+
+bool Action::get_sensitive() const
+{
+ return gtk_action_get_sensitive(const_cast<GtkAction*>(gobj()));
+}
+
+void Action::set_sensitive(bool sensitive)
+{
+ gtk_action_set_sensitive(gobj(), static_cast<int>(sensitive));
+}
+
+bool Action::is_visible() const
+{
+ return gtk_action_is_visible(const_cast<GtkAction*>(gobj()));
+}
+
+bool Action::get_visible() const
+{
+ return gtk_action_get_visible(const_cast<GtkAction*>(gobj()));
+}
+
+void Action::set_visible(bool visible)
+{
+ gtk_action_set_visible(gobj(), static_cast<int>(visible));
+}
+
+void Action::activate()
+{
+ gtk_action_activate(gobj());
+}
+
+Image* Action::create_icon(IconSize icon_size)
+{
+ return Glib::wrap((GtkImage*)(gtk_action_create_icon(gobj(), static_cast<GtkIconSize>(int(icon_size)))));
+}
+
+MenuItem* Action::create_menu_item()
+{
+ return Glib::wrap((GtkMenuItem*)(gtk_action_create_menu_item(gobj())));
+}
+
+ToolItem* Action::create_tool_item()
+{
+ return Glib::wrap((GtkToolItem*)(gtk_action_create_tool_item(gobj())));
+}
+
+void Action::connect_proxy(Widget& proxy)
+{
+ gtk_action_connect_proxy(gobj(), (proxy).gobj());
+}
+
+void Action::disconnect_proxy(Widget& proxy)
+{
+ gtk_action_disconnect_proxy(gobj(), (proxy).gobj());
+}
+
+Glib::SListHandle<Widget*> Action::get_proxies()
+{
+ return Glib::SListHandle<Widget*>(gtk_action_get_proxies(gobj()), Glib::OWNERSHIP_SHALLOW);
+}
+
+Glib::SListHandle<const Widget*> Action::get_proxies() const
+{
+ return Glib::SListHandle<const Widget*>(gtk_action_get_proxies(const_cast<GtkAction*>(gobj())), Glib::OWNERSHIP_SHALLOW);
+}
+
+void Action::connect_accelerator()
+{
+ gtk_action_connect_accelerator(gobj());
+}
+
+void Action::disconnect_accelerator()
+{
+ gtk_action_disconnect_accelerator(gobj());
+}
+
+Glib::ustring Action::get_accel_path() const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(gtk_action_get_accel_path(const_cast<GtkAction*>(gobj())));
+}
+
+void Action::set_accel_path(const Glib::ustring& accel_path)
+{
+ gtk_action_set_accel_path(gobj(), accel_path.c_str());
+}
+
+void Action::set_accel_group(const Glib::RefPtr<AccelGroup>& accel_group)
+{
+ gtk_action_set_accel_group(gobj(), Glib::unwrap(accel_group));
+}
+
+void Action::block_activate_from(Widget& proxy)
+{
+ gtk_action_block_activate_from(gobj(), (proxy).gobj());
+}
+
+void Action::unblock_activate_from(Widget& proxy)
+{
+ gtk_action_unblock_activate_from(gobj(), (proxy).gobj());
+}
+
+
+Glib::SignalProxy0< void > Action::signal_activate()
+{
+ return Glib::SignalProxy0< void >(this, &Action_signal_activate_info);
+}
+
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> Action::property_name() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "name");
+}
+
+Glib::PropertyProxy<Glib::ustring> Action::property_label()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "label");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> Action::property_label() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "label");
+}
+
+Glib::PropertyProxy<Glib::ustring> Action::property_short_label()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "short-label");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> Action::property_short_label() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "short-label");
+}
+
+Glib::PropertyProxy<Glib::ustring> Action::property_tooltip()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "tooltip");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> Action::property_tooltip() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "tooltip");
+}
+
+Glib::PropertyProxy<StockID> Action::property_stock_id()
+{
+ return Glib::PropertyProxy<StockID>(this, "stock-id");
+}
+
+Glib::PropertyProxy_ReadOnly<StockID> Action::property_stock_id() const
+{
+ return Glib::PropertyProxy_ReadOnly<StockID>(this, "stock-id");
+}
+
+Glib::PropertyProxy<bool> Action::property_visible_horizontal()
+{
+ return Glib::PropertyProxy<bool>(this, "visible-horizontal");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Action::property_visible_horizontal() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "visible-horizontal");
+}
+
+Glib::PropertyProxy<bool> Action::property_visible_vertical()
+{
+ return Glib::PropertyProxy<bool>(this, "visible-vertical");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Action::property_visible_vertical() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "visible-vertical");
+}
+
+Glib::PropertyProxy<bool> Action::property_is_important()
+{
+ return Glib::PropertyProxy<bool>(this, "is-important");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Action::property_is_important() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "is-important");
+}
+
+Glib::PropertyProxy<bool> Action::property_hide_if_empty()
+{
+ return Glib::PropertyProxy<bool>(this, "hide-if-empty");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Action::property_hide_if_empty() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "hide-if-empty");
+}
+
+Glib::PropertyProxy<bool> Action::property_sensitive()
+{
+ return Glib::PropertyProxy<bool>(this, "sensitive");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Action::property_sensitive() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "sensitive");
+}
+
+Glib::PropertyProxy<bool> Action::property_visible()
+{
+ return Glib::PropertyProxy<bool>(this, "visible");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Action::property_visible() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "visible");
+}
+
+
+void Gtk::Action::on_activate()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->activate)
+ (*base->activate)(gobj());
+}
+
+
+Widget* Gtk::Action::create_menu_item_vfunc()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->create_menu_item)
+ return Glib::wrap((*base->create_menu_item)(gobj()));
+
+ typedef Widget* RType;
+ return RType();
+}
+
+Widget* Gtk::Action::create_tool_item_vfunc()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->create_tool_item)
+ return Glib::wrap((*base->create_tool_item)(gobj()));
+
+ typedef Widget* RType;
+ return RType();
+}
+
+void Gtk::Action::connect_proxy_vfunc(Widget* proxy)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->connect_proxy)
+ (*base->connect_proxy)(gobj(),(GtkWidget*)Glib::unwrap(proxy));
+}
+
+void Gtk::Action::disconnect_proxy_vfunc(Widget* proxy)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->disconnect_proxy)
+ (*base->disconnect_proxy)(gobj(),(GtkWidget*)Glib::unwrap(proxy));
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/action.h b/libs/gtkmm2/gtk/gtkmm/action.h
new file mode 100644
index 0000000000..6c319c769a
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/action.h
@@ -0,0 +1,532 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_ACTION_H
+#define _GTKMM_ACTION_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 2003 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/widget.h>
+#include <gtkmm/accelgroup.h>
+#include <gtkmm/stockid.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkAction GtkAction;
+typedef struct _GtkActionClass GtkActionClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class Action_Class; } // namespace Gtk
+namespace Gtk
+{
+
+class MenuItem;
+class ToolItem;
+class Image;
+
+
+class Action : public Glib::Object
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef Action CppObjectType;
+ typedef Action_Class CppClassType;
+ typedef GtkAction BaseObjectType;
+ typedef GtkActionClass BaseClassType;
+
+private: friend class Action_Class;
+ static CppClassType action_class_;
+
+private:
+ // noncopyable
+ Action(const Action&);
+ Action& operator=(const Action&);
+
+protected:
+ explicit Action(const Glib::ConstructParams& construct_params);
+ explicit Action(GtkAction* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~Action();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ GtkAction* gobj() { return reinterpret_cast<GtkAction*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const GtkAction* gobj() const { return reinterpret_cast<GtkAction*>(gobject_); }
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ GtkAction* gobj_copy();
+
+private:
+
+
+protected:
+ Action();
+ explicit Action(const Glib::ustring& name, const StockID& stock_id, const Glib::ustring& label = Glib::ustring(), const Glib::ustring& tooltip = Glib::ustring());
+
+public:
+
+ static Glib::RefPtr<Action> create();
+
+ static Glib::RefPtr<Action> create(const Glib::ustring& name, const Glib::ustring& label = Glib::ustring(), const Glib::ustring& tooltip = Glib::ustring());
+ static Glib::RefPtr<Action> create(const Glib::ustring& name, const Gtk::StockID& stock_id, const Glib::ustring& label = Glib::ustring(), const Glib::ustring& tooltip = Glib::ustring());
+
+
+ /** Returns the name of the action.
+ * @return The name of the action. The string belongs to GTK+ and should not
+ * be freed.
+ *
+ * Since: 2.4.
+ */
+ Glib::ustring get_name() const;
+
+
+ /** Returns whether the action is effectively sensitive.
+ * @return <tt>true</tt> if the action and its associated action group
+ * are both sensitive.
+ *
+ * Since: 2.4.
+ */
+ bool is_sensitive() const;
+
+ /** Returns whether the action itself is sensitive. Note that this doesn't
+ * necessarily mean effective sensitivity. See is_sensitive()
+ * for that.
+ * @return <tt>true</tt> if the action itself is sensitive.
+ *
+ * Since: 2.4.
+ */
+ bool get_sensitive() const;
+
+ //TODO: Just wrap gtk_action_set_sensitive() when they put it in GTK+.
+ void set_tooltip(const Glib::ustring& tooltip);
+
+
+ /** Sets the ::sensitive property of the action to @a sensitive . Note that
+ * this doesn't necessarily mean effective sensitivity. See
+ * is_sensitive()
+ * for that.
+ *
+ * Since: 2.6
+ * @param sensitive <tt>true</tt> to make the action sensitive.
+ */
+ void set_sensitive(bool sensitive = true);
+
+
+ /** Returns whether the action is effectively visible.
+ * @return <tt>true</tt> if the action and its associated action group
+ * are both visible.
+ *
+ * Since: 2.4.
+ */
+ bool is_visible() const;
+
+ /** Returns whether the action itself is visible. Note that this doesn't
+ * necessarily mean effective visibility. See is_sensitive()
+ * for that.
+ * @return <tt>true</tt> if the action itself is visible.
+ *
+ * Since: 2.4.
+ */
+ bool get_visible() const;
+
+ /** Sets the ::visible property of the action to @a visible . Note that
+ * this doesn't necessarily mean effective visibility. See
+ * is_visible()
+ * for that.
+ *
+ * Since: 2.6
+ * @param visible <tt>true</tt> to make the action visible.
+ */
+ void set_visible(bool visible = true);
+
+
+ /** Emits the "activate" signal on the specified action, if it isn't
+ * insensitive. This gets called by the proxy widgets when they get
+ * activated.
+ *
+ * It can also be used to manually activate an action.
+ *
+ * Since: 2.4
+ */
+ void activate();
+
+ /** This function is intended for use by action implementations to
+ * create icons displayed in the proxy widgets.
+ * @param icon_size The size of the icon that should be created.
+ * @return A widget that displays the icon for this action.
+ *
+ * Since: 2.4.
+ */
+ Image* create_icon(IconSize icon_size);
+
+ /** Creates a menu item widget that proxies for the given action.
+ * @return A menu item connected to the action.
+ *
+ * Since: 2.4.
+ */
+ MenuItem* create_menu_item();
+
+ /** Creates a toolbar item widget that proxies for the given action.
+ * @return A toolbar item connected to the action.
+ *
+ * Since: 2.4.
+ */
+ ToolItem* create_tool_item();
+
+ /** Connects a widget to an action object as a proxy. Synchronises
+ * various properties of the action with the widget (such as label
+ * text, icon, tooltip, etc), and attaches a callback so that the
+ * action gets activated when the proxy widget does.
+ *
+ * If the widget is already connected to an action, it is disconnected
+ * first.
+ *
+ * Since: 2.4
+ * @param proxy The proxy widget.
+ */
+ void connect_proxy(Widget& proxy);
+
+ /** Disconnects a proxy widget from an action.
+ * Does <em>not</em> destroy the widget, however.
+ *
+ * Since: 2.4
+ * @param proxy The proxy widget.
+ */
+ void disconnect_proxy(Widget& proxy);
+
+ /** Returns the proxy widgets for an action.
+ * @return A G::SList of proxy widgets. The list is owned by the action and
+ * must not be modified.
+ *
+ * Since: 2.4.
+ */
+ Glib::SListHandle<Widget*> get_proxies();
+
+ /** Returns the proxy widgets for an action.
+ * @return A G::SList of proxy widgets. The list is owned by the action and
+ * must not be modified.
+ *
+ * Since: 2.4.
+ */
+ Glib::SListHandle<const Widget*> get_proxies() const;
+
+ /** Installs the accelerator for @a action if @a action has an
+ * accel path and group. See set_accel_path() and
+ * set_accel_group()
+ *
+ * Since multiple proxies may independently trigger the installation
+ * of the accelerator, the @a action counts the number of times this
+ * function has been called and doesn't remove the accelerator until
+ * disconnect_accelerator() has been called as many times.
+ *
+ * Since: 2.4
+ */
+ void connect_accelerator();
+
+ /** Undoes the effect of one call to connect_accelerator().
+ *
+ * Since: 2.4
+ */
+ void disconnect_accelerator();
+
+
+ /** Returns the accel path for this action.
+ *
+ * Since: 2.6
+ * @return The accel path for this action, or <tt>0</tt>
+ * if none is set. The returned string is owned by GTK+
+ * and must not be freed or modified.
+ */
+ Glib::ustring get_accel_path() const;
+
+ /// For instance, void on_activate();
+ typedef sigc::slot<void> SlotActivate;
+
+
+ Glib::SignalProxy0< void > signal_activate();
+
+
+ //Used by AccelGroup:
+
+ /** Sets the accel path for this action. All proxy widgets associated
+ * with the action will have this accel path, so that their
+ * accelerators are consistent.
+ *
+ * Since: 2.4
+ * @param accel_path The accelerator path.
+ */
+ void set_accel_path(const Glib::ustring& accel_path);
+
+ /** Sets the Gtk::AccelGroup in which the accelerator for this action
+ * will be installed.
+ *
+ * Since: 2.4
+ * @param accel_group A Gtk::AccelGroup or <tt>0</tt>.
+ */
+ void set_accel_group(const Glib::RefPtr<AccelGroup>& accel_group);
+
+ /** A unique name for the action.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_name() const;
+
+
+ /** The label used for menu items and buttons that activate this action.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_label() ;
+
+/** The label used for menu items and buttons that activate this action.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_label() const;
+
+ /** A shorter label that may be used on toolbar buttons.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_short_label() ;
+
+/** A shorter label that may be used on toolbar buttons.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_short_label() const;
+
+ /** A tooltip for this action.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_tooltip() ;
+
+/** A tooltip for this action.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_tooltip() const;
+
+ /** The stock icon displayed in widgets representing this action.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<StockID> property_stock_id() ;
+
+/** The stock icon displayed in widgets representing this action.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<StockID> property_stock_id() const;
+
+ /** Whether the toolbar item is visible when the toolbar is in a horizontal orientation.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_visible_horizontal() ;
+
+/** Whether the toolbar item is visible when the toolbar is in a horizontal orientation.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_visible_horizontal() const;
+
+ /** Whether the toolbar item is visible when the toolbar is in a vertical orientation.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_visible_vertical() ;
+
+/** Whether the toolbar item is visible when the toolbar is in a vertical orientation.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_visible_vertical() const;
+
+ /** Whether the action is considered important. When TRUE
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_is_important() ;
+
+/** Whether the action is considered important. When TRUE
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_is_important() const;
+
+ /** When TRUE
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_hide_if_empty() ;
+
+/** When TRUE
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_hide_if_empty() const;
+
+ /** Whether the action is enabled.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_sensitive() ;
+
+/** Whether the action is enabled.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_sensitive() const;
+
+ /** Whether the action is visible.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_visible() ;
+
+/** Whether the action is visible.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_visible() const;
+
+
+protected:
+ //For use by child actions:
+
+ /** Disables calls to the activate()
+ * function by signals on the given proxy widget. This is used to
+ * break notification loops for things like check or radio actions.
+ *
+ * This function is intended for use by action implementations.
+ *
+ * Since: 2.4
+ * @param proxy A proxy widget.
+ */
+ void block_activate_from(Widget& proxy);
+
+ /** Re-enables calls to the activate()
+ * function by signals on the given proxy widget. This undoes the
+ * blocking done by block_activate_from().
+ *
+ * This function is intended for use by action implementations.
+ *
+ * Since: 2.4
+ * @param proxy A proxy widget.
+ */
+ void unblock_activate_from(Widget& proxy);
+
+
+protected:
+ //Widget-creation routines:
+ virtual Widget* create_menu_item_vfunc();
+ virtual Widget* create_tool_item_vfunc();
+ virtual void connect_proxy_vfunc(Widget* proxy);
+ virtual void disconnect_proxy_vfunc(Widget* proxy);
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_activate();
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::Action
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Gtk::Action> wrap(GtkAction* object, bool take_copy = false);
+}
+
+
+#endif /* _GTKMM_ACTION_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/actiongroup.cc b/libs/gtkmm2/gtk/gtkmm/actiongroup.cc
new file mode 100644
index 0000000000..d539b9ab5e
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/actiongroup.cc
@@ -0,0 +1,419 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/actiongroup.h>
+#include <gtkmm/private/actiongroup_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 2003 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkactiongroup.h>
+#include <gtkmm/accelmap.h>
+
+
+namespace Gtk
+{
+
+void ActionGroup::add(const Glib::RefPtr<Action>& action)
+{
+ gtk_action_group_add_action_with_accel(gobj(), Glib::unwrap(action),
+ 0 /* accelerator=0 means use the stock accelerator if this is a stock item */ );
+}
+
+void ActionGroup::add(const Glib::RefPtr<Action>& action, const AccelKey& accel_key)
+{
+ // We need to half-duplicate the gtk_action_group_add_action_with_accel() implementation, because we want to
+ // use AccelKey, not just the accelerator string format that is _one_ of the ways to create an AccelKey. murrayc.
+
+ //The AccelKey might have been constructed from key+mod or from an accelerator string,
+ //but it the end that just produces a key+mod.
+ guint key = accel_key.get_key();
+ Gdk::ModifierType mod = accel_key.get_mod();
+ if(key)
+ {
+ // The AccelKey constructor can take an accel path, so I suppose we should not ignore it,
+ // but I can't imagine how it would be useful with the UIManager. murrayc.
+ Glib::ustring accel_path = accel_key.get_path();
+ if(accel_path.empty())
+ {
+ //Copied from the gtk_action_group_add_action_with_accel() implementation:
+ accel_path = "<Actions>/" + get_name() + "/" + action->property_name();
+ }
+
+ AccelMap::add_entry(accel_path, key, mod);
+
+ action->set_accel_path(accel_path);
+ }
+
+ gtk_action_group_add_action(gobj(), action->gobj());
+}
+
+
+void ActionGroup::add(const Glib::RefPtr<Action>& action, const Action::SlotActivate& slot)
+{
+ //This is meant to be similar to the gtk_action_group_add_actions() convenience method that is used from C.
+ //This also does the work of gtk_action_group_add_toggle_actions() and gtk_action_group_add_radio_actions_full(),
+ //because the extra stuff there is already done when the Action (or a derived type, such as ToggleAction) is create()ed.
+
+ action->signal_activate().connect(slot);
+
+ //We probably don't need to use translate_string(), because the label and tooltip will be regular translated strings in our C++ application code.
+ //But C needs it because gtk_action_group_add_actions() takes a static array of GtkActionEntrys whose fields
+ //can not be translated with gettext macros.
+ //But we should soon know if menus and toolbars are not translated in non-english locales. murrayc.
+
+ add(action);
+}
+
+void ActionGroup::add(const Glib::RefPtr<Action>& action, const AccelKey& accel_key, const Action::SlotActivate& slot)
+{
+ //This is meant to be similar to the gtk_action_group_add_actions() convenience method that is used from C.
+ //This also does the work of gtk_action_group_add_toggle_actions() and gtk_action_group_add_radio_actions_full(),
+ //because the extra stuff there is already done when the Action (or a derived type, such as ToggleAction) is create()ed.
+
+ action->signal_activate().connect(slot);
+ add(action, accel_key);
+
+ /*
+ //Create the accel path (a kind of unique key):
+ Glib::ustring accel_path = "<Actions>/" + get_name() + "/" + action->get_name();
+
+ //Register the accel path:
+ Gtk::AccelMap::add_entry(accel_path, accel_key.get_key(), accel_key.get_mod());
+
+ //USe the accel path:
+ action->set_accel_path(accel_path);
+ */
+}
+
+
+} // namespace Gtk
+
+
+namespace
+{
+
+void ActionGroup_signal_connect_proxy_callback(GtkActionGroup* self, GtkAction* p0,GtkWidget* p1,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,const Glib::RefPtr<Action>&,Widget* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::wrap(p0, true)
+, Glib::wrap(p1)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo ActionGroup_signal_connect_proxy_info =
+{
+ "connect_proxy",
+ (GCallback) &ActionGroup_signal_connect_proxy_callback,
+ (GCallback) &ActionGroup_signal_connect_proxy_callback
+};
+
+
+void ActionGroup_signal_disconnect_proxy_callback(GtkActionGroup* self, GtkAction* p0,GtkWidget* p1,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,const Glib::RefPtr<Action>&,Widget* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::wrap(p0, true)
+, Glib::wrap(p1)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo ActionGroup_signal_disconnect_proxy_info =
+{
+ "disconnect_proxy",
+ (GCallback) &ActionGroup_signal_disconnect_proxy_callback,
+ (GCallback) &ActionGroup_signal_disconnect_proxy_callback
+};
+
+
+void ActionGroup_signal_pre_activate_callback(GtkActionGroup* self, GtkAction* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,const Glib::RefPtr<Action>& > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::wrap(p0, true)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo ActionGroup_signal_pre_activate_info =
+{
+ "pre_activate",
+ (GCallback) &ActionGroup_signal_pre_activate_callback,
+ (GCallback) &ActionGroup_signal_pre_activate_callback
+};
+
+
+void ActionGroup_signal_post_activate_callback(GtkActionGroup* self, GtkAction* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,const Glib::RefPtr<Action>& > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::wrap(p0, true)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo ActionGroup_signal_post_activate_info =
+{
+ "post_activate",
+ (GCallback) &ActionGroup_signal_post_activate_callback,
+ (GCallback) &ActionGroup_signal_post_activate_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Gtk::ActionGroup> wrap(GtkActionGroup* object, bool take_copy)
+{
+ return Glib::RefPtr<Gtk::ActionGroup>( dynamic_cast<Gtk::ActionGroup*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} /* namespace Glib */
+
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& ActionGroup_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &ActionGroup_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_action_group_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void ActionGroup_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* ActionGroup_Class::wrap_new(GObject* object)
+{
+ return new ActionGroup((GtkActionGroup*)object);
+}
+
+
+/* The implementation: */
+
+GtkActionGroup* ActionGroup::gobj_copy()
+{
+ reference();
+ return gobj();
+}
+
+ActionGroup::ActionGroup(const Glib::ConstructParams& construct_params)
+:
+ Glib::Object(construct_params)
+{}
+
+ActionGroup::ActionGroup(GtkActionGroup* castitem)
+:
+ Glib::Object((GObject*)(castitem))
+{}
+
+ActionGroup::~ActionGroup()
+{}
+
+
+ActionGroup::CppClassType ActionGroup::actiongroup_class_; // initialize static member
+
+GType ActionGroup::get_type()
+{
+ return actiongroup_class_.init().get_type();
+}
+
+GType ActionGroup::get_base_type()
+{
+ return gtk_action_group_get_type();
+}
+
+
+ActionGroup::ActionGroup(const Glib::ustring& name)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Glib::Object(Glib::ConstructParams(actiongroup_class_.init(), "name", name.c_str(), (char*) 0))
+{
+ }
+
+Glib::RefPtr<ActionGroup> ActionGroup::create(const Glib::ustring& name)
+{
+ return Glib::RefPtr<ActionGroup>( new ActionGroup(name) );
+}
+Glib::ustring ActionGroup::get_name() const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(gtk_action_group_get_name(const_cast<GtkActionGroup*>(gobj())));
+}
+
+bool ActionGroup::get_sensitive() const
+{
+ return gtk_action_group_get_sensitive(const_cast<GtkActionGroup*>(gobj()));
+}
+
+void ActionGroup::set_sensitive(bool sensitive)
+{
+ gtk_action_group_set_sensitive(gobj(), static_cast<int>(sensitive));
+}
+
+bool ActionGroup::get_visible() const
+{
+ return gtk_action_group_get_visible(const_cast<GtkActionGroup*>(gobj()));
+}
+
+void ActionGroup::set_visible(bool visible)
+{
+ gtk_action_group_set_visible(gobj(), static_cast<int>(visible));
+}
+
+Glib::RefPtr<Action> ActionGroup::get_action(const Glib::ustring& action_name)
+{
+
+ Glib::RefPtr<Action> retvalue = Glib::wrap(gtk_action_group_get_action(gobj(), action_name.c_str()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const Action> ActionGroup::get_action(const Glib::ustring& action_name) const
+{
+
+ Glib::RefPtr<const Action> retvalue = Glib::wrap(gtk_action_group_get_action(const_cast<GtkActionGroup*>(gobj()), action_name.c_str()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::ListHandle< Glib::RefPtr<Action> > ActionGroup::get_actions()
+{
+ return Glib::ListHandle< Glib::RefPtr<Action> >(gtk_action_group_list_actions(gobj()), Glib::OWNERSHIP_SHALLOW);
+}
+
+Glib::ListHandle< Glib::RefPtr<const Action> > ActionGroup::get_actions() const
+{
+ return Glib::ListHandle< Glib::RefPtr<const Action> >(gtk_action_group_list_actions(const_cast<GtkActionGroup*>(gobj())), Glib::OWNERSHIP_SHALLOW);
+}
+
+void ActionGroup::remove(const Glib::RefPtr<Action>& action)
+{
+ gtk_action_group_remove_action(gobj(), Glib::unwrap(action));
+}
+
+Glib::ustring ActionGroup::translate_string(const Glib::ustring& str) const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(gtk_action_group_translate_string(const_cast<GtkActionGroup*>(gobj()), str.c_str()));
+}
+
+
+Glib::SignalProxy2< void,const Glib::RefPtr<Action>&,Widget* > ActionGroup::signal_connect_proxy()
+{
+ return Glib::SignalProxy2< void,const Glib::RefPtr<Action>&,Widget* >(this, &ActionGroup_signal_connect_proxy_info);
+}
+
+Glib::SignalProxy2< void,const Glib::RefPtr<Action>&,Widget* > ActionGroup::signal_disconnect_proxy()
+{
+ return Glib::SignalProxy2< void,const Glib::RefPtr<Action>&,Widget* >(this, &ActionGroup_signal_disconnect_proxy_info);
+}
+
+Glib::SignalProxy1< void,const Glib::RefPtr<Action>& > ActionGroup::signal_pre_activate()
+{
+ return Glib::SignalProxy1< void,const Glib::RefPtr<Action>& >(this, &ActionGroup_signal_pre_activate_info);
+}
+
+Glib::SignalProxy1< void,const Glib::RefPtr<Action>& > ActionGroup::signal_post_activate()
+{
+ return Glib::SignalProxy1< void,const Glib::RefPtr<Action>& >(this, &ActionGroup_signal_post_activate_info);
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/actiongroup.h b/libs/gtkmm2/gtk/gtkmm/actiongroup.h
new file mode 100644
index 0000000000..8db2b42e80
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/actiongroup.h
@@ -0,0 +1,250 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_ACTIONGROUP_H
+#define _GTKMM_ACTIONGROUP_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 2003 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/widget.h>
+#include <gtkmm/action.h>
+#include <gtkmm/accelkey.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkActionGroup GtkActionGroup;
+typedef struct _GtkActionGroupClass GtkActionGroupClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class ActionGroup_Class; } // namespace Gtk
+namespace Gtk
+{
+
+
+class ActionGroup : public Glib::Object
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef ActionGroup CppObjectType;
+ typedef ActionGroup_Class CppClassType;
+ typedef GtkActionGroup BaseObjectType;
+ typedef GtkActionGroupClass BaseClassType;
+
+private: friend class ActionGroup_Class;
+ static CppClassType actiongroup_class_;
+
+private:
+ // noncopyable
+ ActionGroup(const ActionGroup&);
+ ActionGroup& operator=(const ActionGroup&);
+
+protected:
+ explicit ActionGroup(const Glib::ConstructParams& construct_params);
+ explicit ActionGroup(GtkActionGroup* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~ActionGroup();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ GtkActionGroup* gobj() { return reinterpret_cast<GtkActionGroup*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const GtkActionGroup* gobj() const { return reinterpret_cast<GtkActionGroup*>(gobject_); }
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ GtkActionGroup* gobj_copy();
+
+private:
+
+
+protected:
+ explicit ActionGroup(const Glib::ustring& name = Glib::ustring());
+
+public:
+
+ static Glib::RefPtr<ActionGroup> create(const Glib::ustring& name = Glib::ustring());
+
+
+ /** Gets the name of the action group.
+ * @return The name of the action group.
+ *
+ * Since: 2.4.
+ */
+ Glib::ustring get_name() const;
+
+
+ /** Returns <tt>true</tt> if the group is sensitive. The constituent actions
+ * can only be logically sensitive (see is_sensitive()) if
+ * they are sensitive (see get_sensitive()) and their group
+ * is sensitive.
+ * @return <tt>true</tt> if the group is sensitive.
+ *
+ * Since: 2.4.
+ */
+ bool get_sensitive() const;
+
+ /** Changes the sensitivity of @a action_group
+ *
+ * Since: 2.4
+ * @param sensitive New sensitivity.
+ */
+ void set_sensitive(bool sensitive = true);
+
+ /** Returns <tt>true</tt> if the group is visible. The constituent actions
+ * can only be logically visible (see is_visible()) if
+ * they are visible (see get_visible()) and their group
+ * is visible.
+ * @return <tt>true</tt> if the group is visible.
+ *
+ * Since: 2.4.
+ */
+ bool get_visible() const;
+
+ /** Changes the visible of @a action_group .
+ *
+ * Since: 2.4
+ * @param visible New visiblity.
+ */
+ void set_visible(bool visible = true);
+
+
+ /** Looks up an action in the action group by name.
+ * @param action_name The name of the action.
+ * @return The action, or <tt>0</tt> if no action by that name exists
+ *
+ * Since: 2.4.
+ */
+ Glib::RefPtr<Action> get_action(const Glib::ustring& action_name);
+
+ /** Looks up an action in the action group by name.
+ * @param action_name The name of the action.
+ * @return The action, or <tt>0</tt> if no action by that name exists
+ *
+ * Since: 2.4.
+ */
+ Glib::RefPtr<const Action> get_action(const Glib::ustring& action_name) const;
+
+
+ /** Lists the actions in the action group.
+ * @return An allocated list of the action objects in the action group
+ *
+ * Since: 2.4.
+ */
+ Glib::ListHandle< Glib::RefPtr<Action> > get_actions();
+
+ /** Lists the actions in the action group.
+ * @return An allocated list of the action objects in the action group
+ *
+ * Since: 2.4.
+ */
+ Glib::ListHandle< Glib::RefPtr<const Action> > get_actions() const;
+
+ void add(const Glib::RefPtr<Action>& action);
+
+ //We want it to always try to use the stock accelerator,
+ //so we use gtk_action_group_add_action_with_accel(), instead of gtk_action_group_add_action(),
+ //passing null for the accelerator.
+
+ void add(const Glib::RefPtr<Action>& action, const AccelKey& accel_key);
+
+ //We need to duplicate the gtk_action_group_add_action_with_accel() implementation, because we want to
+ //use AccelKey, not just the accelerator string format that is _one_ of the ways to create an AccelKey.
+
+ //TODO: Could this whole class have an STL-style interface?
+ void add(const Glib::RefPtr<Action>& action, const Action::SlotActivate& slot);
+ void add(const Glib::RefPtr<Action>& action, const AccelKey& accel_key, const Action::SlotActivate& slot);
+
+ /** Removes an action object from the action group.
+ *
+ * Since: 2.4
+ * @param action An action.
+ */
+ void remove(const Glib::RefPtr<Action>& action);
+
+ //TODO: We probably need to use this in our add_actions() implementation:
+
+ /** Translates a string using the specified translate_func(). This
+ * is mainly intended for language bindings.
+ * @param string A string.
+ * @return The translation of @a string
+ *
+ * Since: 2.6.
+ */
+ Glib::ustring translate_string(const Glib::ustring& str) const;
+
+
+ //These are just C convenience methods:
+
+ //These are also just C convenience methods that are useless unless you are using the other convenience methods:
+
+
+ Glib::SignalProxy2< void,const Glib::RefPtr<Action>&,Widget* > signal_connect_proxy();
+
+
+ Glib::SignalProxy2< void,const Glib::RefPtr<Action>&,Widget* > signal_disconnect_proxy();
+
+
+ Glib::SignalProxy1< void,const Glib::RefPtr<Action>& > signal_pre_activate();
+
+
+ Glib::SignalProxy1< void,const Glib::RefPtr<Action>& > signal_post_activate();
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::ActionGroup
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Gtk::ActionGroup> wrap(GtkActionGroup* object, bool take_copy = false);
+}
+
+
+#endif /* _GTKMM_ACTIONGROUP_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/adjustment.cc b/libs/gtkmm2/gtk/gtkmm/adjustment.cc
new file mode 100644
index 0000000000..10b2e8815f
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/adjustment.cc
@@ -0,0 +1,343 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/adjustment.h>
+#include <gtkmm/private/adjustment_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#include <gtk/gtkadjustment.h>
+
+namespace Gtk
+{
+
+Adjustment::Adjustment(double value,
+ double lower, double upper,
+ double step_increment, double page_increment,
+ double page_size)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Object(Glib::ConstructParams(adjustment_class_.init(), (char*) 0))
+{
+ gobj()->lower = lower;
+ gobj()->upper = upper;
+ gobj()->step_increment = step_increment;
+ gobj()->page_increment = page_increment;
+ gobj()->page_size = page_size;
+ changed();
+
+ set_value(value);
+}
+
+void Adjustment::set_lower(double lower)
+{
+ gobj()->lower = lower;
+ changed();
+}
+
+void Adjustment::set_upper(double upper)
+{
+ gobj()->upper = upper;
+ changed();
+}
+
+void Adjustment::set_step_increment(double incr)
+{
+ gobj()->step_increment = incr;
+ changed();
+}
+
+void Adjustment::set_page_increment(double incr)
+{
+ gobj()->page_increment = incr;
+ changed();
+}
+
+void Adjustment::set_page_size(double size)
+{
+ gobj()->page_size = size;
+ changed();
+}
+
+} // namespace Gtk
+
+
+namespace
+{
+
+const Glib::SignalProxyInfo Adjustment_signal_changed_info =
+{
+ "changed",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+
+const Glib::SignalProxyInfo Adjustment_signal_value_changed_info =
+{
+ "value_changed",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::Adjustment* wrap(GtkAdjustment* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::Adjustment *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Adjustment_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Adjustment_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_adjustment_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Adjustment_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->changed = &changed_callback;
+ klass->value_changed = &value_changed_callback;
+}
+
+
+void Adjustment_Class::changed_callback(GtkAdjustment* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_changed();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->changed)
+ (*base->changed)(self);
+ }
+}
+
+void Adjustment_Class::value_changed_callback(GtkAdjustment* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_value_changed();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->value_changed)
+ (*base->value_changed)(self);
+ }
+}
+
+
+Glib::ObjectBase* Adjustment_Class::wrap_new(GObject* o)
+{
+ return manage(new Adjustment((GtkAdjustment*)(o)));
+
+}
+
+
+/* The implementation: */
+
+Adjustment::Adjustment(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Object(construct_params)
+{
+ }
+
+Adjustment::Adjustment(GtkAdjustment* castitem)
+:
+ Gtk::Object((GtkObject*)(castitem))
+{
+ }
+
+Adjustment::~Adjustment()
+{
+ destroy_();
+}
+
+Adjustment::CppClassType Adjustment::adjustment_class_; // initialize static member
+
+GType Adjustment::get_type()
+{
+ return adjustment_class_.init().get_type();
+}
+
+GType Adjustment::get_base_type()
+{
+ return gtk_adjustment_get_type();
+}
+
+
+void Adjustment::changed()
+{
+ gtk_adjustment_changed(gobj());
+}
+
+void Adjustment::value_changed()
+{
+ gtk_adjustment_value_changed(gobj());
+}
+
+void Adjustment::clamp_page(double lower, double upper)
+{
+ gtk_adjustment_clamp_page(gobj(), lower, upper);
+}
+
+void Adjustment::set_value(double value)
+{
+ gtk_adjustment_set_value(gobj(), value);
+}
+
+double Adjustment::get_value() const
+{
+ return gtk_adjustment_get_value(const_cast<GtkAdjustment*>(gobj()));
+}
+
+double Adjustment::get_lower() const
+{
+ return gobj()->lower;
+}
+
+double Adjustment::get_upper() const
+{
+ return gobj()->upper;
+}
+
+double Adjustment::get_step_increment() const
+{
+ return gobj()->step_increment;
+}
+
+double Adjustment::get_page_increment() const
+{
+ return gobj()->page_increment;
+}
+
+double Adjustment::get_page_size() const
+{
+ return gobj()->page_size;
+}
+
+
+Glib::SignalProxy0< void > Adjustment::signal_changed()
+{
+ return Glib::SignalProxy0< void >(this, &Adjustment_signal_changed_info);
+}
+
+Glib::SignalProxy0< void > Adjustment::signal_value_changed()
+{
+ return Glib::SignalProxy0< void >(this, &Adjustment_signal_value_changed_info);
+}
+
+
+void Gtk::Adjustment::on_changed()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->changed)
+ (*base->changed)(gobj());
+}
+
+void Gtk::Adjustment::on_value_changed()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->value_changed)
+ (*base->value_changed)(gobj());
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/adjustment.h b/libs/gtkmm2/gtk/gtkmm/adjustment.h
new file mode 100644
index 0000000000..2c45297cb4
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/adjustment.h
@@ -0,0 +1,236 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_ADJUSTMENT_H
+#define _GTKMM_ADJUSTMENT_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* adjustment.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/object.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkAdjustment GtkAdjustment;
+typedef struct _GtkAdjustmentClass GtkAdjustmentClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class Adjustment_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** A class representing an adjustable bounded value.
+ *
+ * The Gtk::Adjustment object represents a value which has an associated
+ * lower and upper bound, together with step and page increments, and a page
+ * size. It is used within several gtkmm widgets, including
+ * Gtk::SpinButton, Gtk::Viewport, and Gtk::Range (which is a base class for
+ * Gtk::HScrollbar, Gtk::VScrollbar, Gtk::HScale, and Gtk::VScale).
+ *
+ * The Gtk::Adjustment object does not update the value itself. Instead it
+ * is left up to the owner of the Gtk::Adjustment to control the value.
+ *
+ * The owner of the Gtk::Adjustment typically calls the value_changed() and
+ * changed() functions after changing the value and its bounds. This results
+ * in the emission of the "value_changed" or "changed" signal respectively.
+ *
+ */
+
+class Adjustment : public Object
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Adjustment CppObjectType;
+ typedef Adjustment_Class CppClassType;
+ typedef GtkAdjustment BaseObjectType;
+ typedef GtkAdjustmentClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~Adjustment();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class Adjustment_Class;
+ static CppClassType adjustment_class_;
+
+ // noncopyable
+ Adjustment(const Adjustment&);
+ Adjustment& operator=(const Adjustment&);
+
+protected:
+ explicit Adjustment(const Glib::ConstructParams& construct_params);
+ explicit Adjustment(GtkAdjustment* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkAdjustment* gobj() { return reinterpret_cast<GtkAdjustment*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkAdjustment* gobj() const { return reinterpret_cast<GtkAdjustment*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_changed();
+ virtual void on_value_changed();
+
+
+private:
+
+public:
+
+ friend class Range;
+ friend class HScrollbar;
+ friend class VScrollbar;
+
+ /** Constructor to create an Adjustment object.
+ * @param value The initial value
+ * @param lower The minimum value
+ * @param upper The maximum value
+ * @param step_increment The step increment
+ * @param page_increment The page increment
+ * @param page_size The page size
+ */
+ Adjustment(double value,
+ double lower, double upper,
+ double step_increment = 1, double page_increment = 10,
+ double page_size = 0);
+
+
+ /** Emits a "changed" signal from the Adjustment. This is typically called by the owner of the Adjustment after it has changed any of the Adjustment fields other than the value.
+ */
+ void changed();
+
+ /** Emits a "value_changed" signal from the Adjustment. This is typically called by the owner of the Adjustment after it has changed the Adjustment value field.
+ */
+ void value_changed();
+
+
+ /** Updates the Adjustment value to ensure that the range between the parameters @a lower and @a upper is in the current page (i.e.\ between @a value and @a value + @a page_size ). If this range is larger than the page size, then only the start of it will be in the current page. A "changed" signal will be emitted if the value is changed.
+ * @param upper The upper value.
+ * @param lower The lower value.
+ */
+ void clamp_page(double lower, double upper);
+
+
+ /** Sets the current value of the Adjustment
+ * @param value The new value of the Adjustment.
+ */
+ void set_value(double value);
+
+ /** Gets the current value of the adjustment. See
+ * set_value().
+ * @return The current value of the adjustment.
+ */
+ double get_value() const;
+
+ // Other internal fields accessors
+ /** Retrieve the @a lower member variable.
+ * @return The current value of @a lower.
+ */
+ double get_lower() const;
+
+ /** Retrieve the @a upper member variable.
+ * @return The current value of @a upper.
+ */
+ double get_upper() const;
+
+ /** Retrieve the @a step_increment variable.
+ * @return The current value of @a step_increment.
+ */
+ double get_step_increment() const;
+
+ /** Retrieve the @a page_increment variable.
+ * @return The current value of @a page_increment.
+ */
+ double get_page_increment() const;
+
+ /** Retrieve the @a page_size variable.
+ * @return The current value of @a page_size.
+ */
+ double get_page_size() const;
+
+ // TODO: This section needs changing. We must be able to set more at a time,
+ // emitting "changed" signal only once.
+ /** Sets the @a lower member variable
+ * @param lower The value to set the @a lower member variable to.
+ */
+ void set_lower(double lower);
+
+ /** Sets the @a upper member variable
+ * @param upper The value to set the @a upper member variable to.
+ */
+ void set_upper(double upper);
+
+ /** Sets the @a step_increment member variable
+ * @param incr The value to set the @a step_incrememnt member variable to.
+ */
+ void set_step_increment(double incr);
+
+ /** Sets the @a page_increment member variable
+ * @param incr The value to set the @a page_increment member variable to.
+ */
+ void set_page_increment(double incr);
+
+ /** Sets the @a page_size member variable
+ * @param size The value to set the @ page_size member varialbe to.
+ */
+ void set_page_size(double size);
+
+
+ Glib::SignalProxy0< void > signal_changed();
+
+
+ Glib::SignalProxy0< void > signal_value_changed();
+
+
+};
+
+} /* namespace Gtk */
+
+
+namespace Glib
+{
+ /** @relates Gtk::Adjustment
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::Adjustment* wrap(GtkAdjustment* object, bool take_copy = false);
+}
+#endif /* _GTKMM_ADJUSTMENT_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/alignment.cc b/libs/gtkmm2/gtk/gtkmm/alignment.cc
new file mode 100644
index 0000000000..56f5c58726
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/alignment.cc
@@ -0,0 +1,243 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/alignment.h>
+#include <gtkmm/private/alignment_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkalignment.h>
+
+namespace Gtk
+{
+
+
+} //namespace Gtk
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::Alignment* wrap(GtkAlignment* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::Alignment *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Alignment_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Alignment_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_alignment_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Alignment_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* Alignment_Class::wrap_new(GObject* o)
+{
+ return manage(new Alignment((GtkAlignment*)(o)));
+
+}
+
+
+/* The implementation: */
+
+Alignment::Alignment(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Bin(construct_params)
+{
+ }
+
+Alignment::Alignment(GtkAlignment* castitem)
+:
+ Gtk::Bin((GtkBin*)(castitem))
+{
+ }
+
+Alignment::~Alignment()
+{
+ destroy_();
+}
+
+Alignment::CppClassType Alignment::alignment_class_; // initialize static member
+
+GType Alignment::get_type()
+{
+ return alignment_class_.init().get_type();
+}
+
+GType Alignment::get_base_type()
+{
+ return gtk_alignment_get_type();
+}
+
+
+Alignment::Alignment(float xalign, float yalign, float xscale, float yscale)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Bin(Glib::ConstructParams(alignment_class_.init(), "xalign", xalign, "yalign", yalign, "xscale", xscale, "yscale", yscale, (char*) 0))
+{
+ }
+
+Alignment::Alignment(AlignmentEnum xalign, AlignmentEnum yalign, float xscale, float yscale)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Bin(Glib::ConstructParams(alignment_class_.init(), "xalign", _gtkmm_align_float_from_enum(xalign), "yalign", _gtkmm_align_float_from_enum(yalign), "xscale", xscale, "yscale", yscale, (char*) 0))
+{
+ }
+
+void Alignment::set(float xalign, float yalign, float xscale, float yscale)
+{
+ gtk_alignment_set(gobj(), xalign, yalign, xscale, yscale);
+}
+
+void Alignment::set(AlignmentEnum xalign, AlignmentEnum yalign, float xscale, float yscale)
+{
+ gtk_alignment_set(gobj(), _gtkmm_align_float_from_enum(xalign), _gtkmm_align_float_from_enum(yalign), xscale, yscale);
+}
+
+void Alignment::set_padding(guint padding_top, guint padding_bottom, guint padding_left, guint padding_right)
+{
+ gtk_alignment_set_padding(gobj(), padding_top, padding_bottom, padding_left, padding_right);
+}
+
+void Alignment::get_padding(guint& padding_top, guint& padding_bottom, guint& padding_left, guint& padding_right)
+{
+ gtk_alignment_get_padding(gobj(), &(padding_top), &(padding_bottom), &(padding_left), &(padding_right));
+}
+
+
+Glib::PropertyProxy<float> Alignment::property_xalign()
+{
+ return Glib::PropertyProxy<float>(this, "xalign");
+}
+
+Glib::PropertyProxy_ReadOnly<float> Alignment::property_xalign() const
+{
+ return Glib::PropertyProxy_ReadOnly<float>(this, "xalign");
+}
+
+Glib::PropertyProxy<float> Alignment::property_yalign()
+{
+ return Glib::PropertyProxy<float>(this, "yalign");
+}
+
+Glib::PropertyProxy_ReadOnly<float> Alignment::property_yalign() const
+{
+ return Glib::PropertyProxy_ReadOnly<float>(this, "yalign");
+}
+
+Glib::PropertyProxy<float> Alignment::property_xscale()
+{
+ return Glib::PropertyProxy<float>(this, "xscale");
+}
+
+Glib::PropertyProxy_ReadOnly<float> Alignment::property_xscale() const
+{
+ return Glib::PropertyProxy_ReadOnly<float>(this, "xscale");
+}
+
+Glib::PropertyProxy<float> Alignment::property_yscale()
+{
+ return Glib::PropertyProxy<float>(this, "yscale");
+}
+
+Glib::PropertyProxy_ReadOnly<float> Alignment::property_yscale() const
+{
+ return Glib::PropertyProxy_ReadOnly<float>(this, "yscale");
+}
+
+Glib::PropertyProxy<guint> Alignment::property_top_padding()
+{
+ return Glib::PropertyProxy<guint>(this, "top-padding");
+}
+
+Glib::PropertyProxy_ReadOnly<guint> Alignment::property_top_padding() const
+{
+ return Glib::PropertyProxy_ReadOnly<guint>(this, "top-padding");
+}
+
+Glib::PropertyProxy<guint> Alignment::property_bottom_padding()
+{
+ return Glib::PropertyProxy<guint>(this, "bottom-padding");
+}
+
+Glib::PropertyProxy_ReadOnly<guint> Alignment::property_bottom_padding() const
+{
+ return Glib::PropertyProxy_ReadOnly<guint>(this, "bottom-padding");
+}
+
+Glib::PropertyProxy<guint> Alignment::property_left_padding()
+{
+ return Glib::PropertyProxy<guint>(this, "left-padding");
+}
+
+Glib::PropertyProxy_ReadOnly<guint> Alignment::property_left_padding() const
+{
+ return Glib::PropertyProxy_ReadOnly<guint>(this, "left-padding");
+}
+
+Glib::PropertyProxy<guint> Alignment::property_right_padding()
+{
+ return Glib::PropertyProxy<guint>(this, "right-padding");
+}
+
+Glib::PropertyProxy_ReadOnly<guint> Alignment::property_right_padding() const
+{
+ return Glib::PropertyProxy_ReadOnly<guint>(this, "right-padding");
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/alignment.h b/libs/gtkmm2/gtk/gtkmm/alignment.h
new file mode 100644
index 0000000000..98130b9e2d
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/alignment.h
@@ -0,0 +1,318 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_ALIGNMENT_H
+#define _GTKMM_ALIGNMENT_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* alignment.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/bin.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkAlignment GtkAlignment;
+typedef struct _GtkAlignmentClass GtkAlignmentClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class Alignment_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** A widget which controls the alignment and size of its child.
+ *
+ * Normally, a widget is allocated at least as much size as it requests, and,
+ * most widgets expand to fill any extra allocated space, but sometimes
+ * this behavior is not desired. The alignment widget allows the
+ * programmer to specify how a widget should expand and position itself
+ * to fill the area it is allocated.
+ *
+ * It has four settings: xscale, yscale, xalign, and yalign:
+ * The scale settings specify how much the child widget should expand to fill the space allocated to the Gtk::Alignment. The values can range from 0 (meaning the child doesn't expand at all) to 1 (meaning the child expands to fill all of the available space).
+ * The align settings place the child widget within the available area. The values range from 0 (top or left) to 1 (bottom or right). Of course, if the scale settings are both set to 1, the alignment settings have no effect.
+ *
+ * @ingroup Widgets
+ * @ingroup Containers
+ */
+
+class Alignment : public Bin
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Alignment CppObjectType;
+ typedef Alignment_Class CppClassType;
+ typedef GtkAlignment BaseObjectType;
+ typedef GtkAlignmentClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~Alignment();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class Alignment_Class;
+ static CppClassType alignment_class_;
+
+ // noncopyable
+ Alignment(const Alignment&);
+ Alignment& operator=(const Alignment&);
+
+protected:
+ explicit Alignment(const Glib::ConstructParams& construct_params);
+ explicit Alignment(GtkAlignment* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkAlignment* gobj() { return reinterpret_cast<GtkAlignment*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkAlignment* gobj() const { return reinterpret_cast<GtkAlignment*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+public:
+
+ /** Constructor to create an Alignment object.
+ * @param xalign The initial horizontal alignment of the child.
+ * @param yalign The initial vertical alignment of the child.
+ * @param xscale The initial amount that the child expands horizontally to fill up unused space.
+ * @param yscale The initial amount that the child expands vertically to fill up unused space.
+ */
+ explicit Alignment(float xalign = 0.5, float yalign = 0.5, float xscale = 1.0, float yscale = 1.0);
+
+ /** Constructor to create an Alignment object.
+ * @param xalign A Gtk::AlignmentEnum describing the initial horizontal alignment of the child.
+ * @param yalign A Gtk::AlignmentEnum describing the initial vertical alignment of the child.
+ * @param xscale The initial amount that the child expands horizontally to fill up unused space.
+ * @param yscale The initial amount that the child expands vertically to fill up unused space.
+ */
+ explicit Alignment(AlignmentEnum xalign, AlignmentEnum yalign = Gtk::ALIGN_CENTER, float xscale = 1.0, float yscale = 1.0);
+
+
+ /** Sets the Alignment values.
+ * @param xalign The horizontal alignment of the child of this Alignment, from 0 (left) to 1 (right).
+ * @param yalign The vertical alignment of the child of this Alignment, from 0 (top) to 1 (bottom).
+ * @param xscale The amount that the child expands horizontally to fill up unused space, from 0 to 1. A value of 0 indicates that the child widget should never expand. A value of 1 indicates that the child widget will expand to fill all the space allocated for the Alignment.
+ * @param yscale The amount that the child widget expands vertically to fill up unused space from 0 to 1. The values are similar to @a xscale .
+ */
+ void set(float xalign = 0.5, float yalign = 0.5, float xscale = 1.0, float yscale= 1.0);
+
+ /** Sets the Alignment values.
+ * @param xalign The horizontal alignment of the child of this Alignment, from 0 (left) to 1 (right).
+ * @param yalign The vertical alignment of the child of this Alignment, from 0 (top) to 1 (bottom).
+ * @param xscale The amount that the child expands horizontally to fill up unused space, from 0 to 1. A value of 0 indicates that the child widget should never expand. A value of 1 indicates that the child widget will expand to fill all the space allocated for the Alignment.
+ * @param yscale The amount that the child widget expands vertically to fill up unused space from 0 to 1. The values are similar to @a xscale .
+ */
+ void set(AlignmentEnum xalign, AlignmentEnum yalign = Gtk::ALIGN_CENTER, float xscale = 1.0, float yscale= 1.0);
+
+ //New in GTK+ 2.4
+
+ /** Sets the padding on the different sides of the widget.
+ * The padding adds blank space to the sides of the widget. For instance,
+ * this can be used to indent the child widget towards the right by adding
+ * padding on the left.
+ *
+ * Since: 2.4
+ * @param padding_top The padding at the top of the widget.
+ * @param padding_bottom The padding at the bottom of the widget.
+ * @param padding_left The padding at the left of the widget.
+ * @param padding_right The padding at the right of the widget.
+ */
+ void set_padding(guint padding_top, guint padding_bottom, guint padding_left, guint padding_right);
+
+ /** Gets the padding on the different sides of the widget.
+ * See set_padding().
+ *
+ * Since: 2.4
+ * @param padding_top Location to store the padding for the top of the widget, or <tt>0</tt>.
+ * @param padding_bottom Location to store the padding for the bottom of the widget, or <tt>0</tt>.
+ * @param padding_left Location to store the padding for the left of the widget, or <tt>0</tt>.
+ * @param padding_right Location to store the padding for the right of the widget, or <tt>0</tt>.
+ */
+ void get_padding(guint& padding_top, guint& padding_bottom, guint& padding_left, guint& padding_right);
+
+ /** Horizontal position of child in available space. 0.0 is left aligned
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<float> property_xalign() ;
+
+/** Horizontal position of child in available space. 0.0 is left aligned
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<float> property_xalign() const;
+
+ /** Vertical position of child in available space. 0.0 is top aligned
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<float> property_yalign() ;
+
+/** Vertical position of child in available space. 0.0 is top aligned
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<float> property_yalign() const;
+
+ /** If available horizontal space is bigger than needed for the child
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<float> property_xscale() ;
+
+/** If available horizontal space is bigger than needed for the child
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<float> property_xscale() const;
+
+ /** If available vertical space is bigger than needed for the child
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<float> property_yscale() ;
+
+/** If available vertical space is bigger than needed for the child
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<float> property_yscale() const;
+
+
+ //New in GTK+ 2.4
+ /** The padding to insert at the top of the widget.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<guint> property_top_padding() ;
+
+/** The padding to insert at the top of the widget.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<guint> property_top_padding() const;
+
+ /** The padding to insert at the bottom of the widget.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<guint> property_bottom_padding() ;
+
+/** The padding to insert at the bottom of the widget.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<guint> property_bottom_padding() const;
+
+ /** The padding to insert at the left of the widget.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<guint> property_left_padding() ;
+
+/** The padding to insert at the left of the widget.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<guint> property_left_padding() const;
+
+ /** The padding to insert at the right of the widget.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<guint> property_right_padding() ;
+
+/** The padding to insert at the right of the widget.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<guint> property_right_padding() const;
+
+
+};
+
+} /* namespace Gtk */
+
+
+namespace Glib
+{
+ /** @relates Gtk::Alignment
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::Alignment* wrap(GtkAlignment* object, bool take_copy = false);
+}
+#endif /* _GTKMM_ALIGNMENT_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/arrow.cc b/libs/gtkmm2/gtk/gtkmm/arrow.cc
new file mode 100644
index 0000000000..681847cc02
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/arrow.cc
@@ -0,0 +1,177 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/arrow.h>
+#include <gtkmm/private/arrow_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#include <gtk/gtkarrow.h>
+
+namespace Gtk
+{
+
+/*
+#define MIN_ARROW_SIZE 11
+
+Arrow::Arrow(ArrowType arrow_type, ShadowType shadow_type)
+ _CONSTRUCT()
+{
+
+ GtkArrow *arrow=gobj();
+
+ GTK_WIDGET (arrow)->requisition.width = MIN_ARROW_SIZE + GTK_MISC (arrow)->xpad * 2;
+ GTK_WIDGET (arrow)->requisition.height = MIN_ARROW_SIZE + GTK_MISC (arrow)->ypad * 2;
+
+ arrow->arrow_type = arrow_type;
+ arrow->shadow_type = shadow_type;
+}
+
+*/
+
+} /* namespace Gtk */
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::Arrow* wrap(GtkArrow* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::Arrow *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Arrow_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Arrow_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_arrow_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Arrow_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* Arrow_Class::wrap_new(GObject* o)
+{
+ return manage(new Arrow((GtkArrow*)(o)));
+
+}
+
+
+/* The implementation: */
+
+Arrow::Arrow(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Misc(construct_params)
+{
+ }
+
+Arrow::Arrow(GtkArrow* castitem)
+:
+ Gtk::Misc((GtkMisc*)(castitem))
+{
+ }
+
+Arrow::~Arrow()
+{
+ destroy_();
+}
+
+Arrow::CppClassType Arrow::arrow_class_; // initialize static member
+
+GType Arrow::get_type()
+{
+ return arrow_class_.init().get_type();
+}
+
+GType Arrow::get_base_type()
+{
+ return gtk_arrow_get_type();
+}
+
+
+Arrow::Arrow(ArrowType arrow_type, ShadowType shadow_type)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Misc(Glib::ConstructParams(arrow_class_.init(), "arrow_type", ((GtkArrowType)(arrow_type)), "shadow_type", ((GtkShadowType)(shadow_type)), (char*) 0))
+{
+ }
+
+void Arrow::set(ArrowType arrow_type, ShadowType shadow_type)
+{
+ gtk_arrow_set(gobj(), ((GtkArrowType)(arrow_type)), ((GtkShadowType)(shadow_type)));
+}
+
+
+Glib::PropertyProxy<ArrowType> Arrow::property_arrow_type()
+{
+ return Glib::PropertyProxy<ArrowType>(this, "arrow-type");
+}
+
+Glib::PropertyProxy_ReadOnly<ArrowType> Arrow::property_arrow_type() const
+{
+ return Glib::PropertyProxy_ReadOnly<ArrowType>(this, "arrow-type");
+}
+
+Glib::PropertyProxy<ShadowType> Arrow::property_shadow_type()
+{
+ return Glib::PropertyProxy<ShadowType>(this, "shadow-type");
+}
+
+Glib::PropertyProxy_ReadOnly<ShadowType> Arrow::property_shadow_type() const
+{
+ return Glib::PropertyProxy_ReadOnly<ShadowType>(this, "shadow-type");
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/arrow.h b/libs/gtkmm2/gtk/gtkmm/arrow.h
new file mode 100644
index 0000000000..f34a744d3e
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/arrow.h
@@ -0,0 +1,177 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_ARROW_H
+#define _GTKMM_ARROW_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* arrow.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/misc.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkArrow GtkArrow;
+typedef struct _GtkArrowClass GtkArrowClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class Arrow_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** Produces an arrow pointing in one of the four cardinal directions.
+ *
+ * This is intended for use where a directional arrow (in one of the four
+ * cardinal directions) is desired. As such, it has very limited
+ * functionality and basically only draws itself in a particular direction
+ * and with a particular shadow type.
+ *
+ * Gtk::Arrow will fill any space alloted to it, but since it is inherited
+ * from Gtk::Misc, it can be padded and/or aligned, to fill exactly the
+ * space the programmer desires.
+ *
+ * @ingroup Widgets
+ */
+
+class Arrow : public Misc {
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Arrow CppObjectType;
+ typedef Arrow_Class CppClassType;
+ typedef GtkArrow BaseObjectType;
+ typedef GtkArrowClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~Arrow();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class Arrow_Class;
+ static CppClassType arrow_class_;
+
+ // noncopyable
+ Arrow(const Arrow&);
+ Arrow& operator=(const Arrow&);
+
+protected:
+ explicit Arrow(const Glib::ConstructParams& construct_params);
+ explicit Arrow(GtkArrow* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkArrow* gobj() { return reinterpret_cast<GtkArrow*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkArrow* gobj() const { return reinterpret_cast<GtkArrow*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+public:
+
+
+ /** Creates an arrow.
+ *
+ * @param arrow_type A Gtk::ArrowType enum describing the arrow direction.
+ * @param shadow_type A Gtk::ShadowType enum describing the shadow type of
+ * the arrow.
+ */
+ explicit Arrow(ArrowType arrow_type, ShadowType shadow_type);
+
+
+ // Changes the direction and shadow of an arrow.
+
+ /** Sets the direction and shadow of this Arrow.
+ * @param arrow_type A Gtk::ArrowType enum describing what arrow type to set this Arrow to.
+ * @param shadow_type A Gtk::ShadowType enum describing what shadow type to set this Arrow to.
+ */
+ void set(ArrowType arrow_type, ShadowType shadow_type);
+
+ /** The direction the arrow should point.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<ArrowType> property_arrow_type() ;
+
+/** The direction the arrow should point.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<ArrowType> property_arrow_type() const;
+
+ /** Appearance of the shadow surrounding the arrow.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<ShadowType> property_shadow_type() ;
+
+/** Appearance of the shadow surrounding the arrow.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<ShadowType> property_shadow_type() const;
+
+
+};
+
+
+} /* namespace Gtk */
+
+
+namespace Glib
+{
+ /** @relates Gtk::Arrow
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::Arrow* wrap(GtkArrow* object, bool take_copy = false);
+}
+#endif /* _GTKMM_ARROW_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/aspectframe.cc b/libs/gtkmm2/gtk/gtkmm/aspectframe.cc
new file mode 100644
index 0000000000..faf6a94286
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/aspectframe.cc
@@ -0,0 +1,187 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/aspectframe.h>
+#include <gtkmm/private/aspectframe_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkaspectframe.h>
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::AspectFrame* wrap(GtkAspectFrame* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::AspectFrame *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& AspectFrame_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &AspectFrame_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_aspect_frame_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void AspectFrame_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* AspectFrame_Class::wrap_new(GObject* o)
+{
+ return manage(new AspectFrame((GtkAspectFrame*)(o)));
+
+}
+
+
+/* The implementation: */
+
+AspectFrame::AspectFrame(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Frame(construct_params)
+{
+ }
+
+AspectFrame::AspectFrame(GtkAspectFrame* castitem)
+:
+ Gtk::Frame((GtkFrame*)(castitem))
+{
+ }
+
+AspectFrame::~AspectFrame()
+{
+ destroy_();
+}
+
+AspectFrame::CppClassType AspectFrame::aspectframe_class_; // initialize static member
+
+GType AspectFrame::get_type()
+{
+ return aspectframe_class_.init().get_type();
+}
+
+GType AspectFrame::get_base_type()
+{
+ return gtk_aspect_frame_get_type();
+}
+
+
+AspectFrame::AspectFrame(const Glib::ustring& label, AlignmentEnum xalign, AlignmentEnum yalign, float ratio, bool obey_child)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Frame(Glib::ConstructParams(aspectframe_class_.init(), "label", label.c_str(), "xalign", _gtkmm_align_float_from_enum(xalign), "yalign", _gtkmm_align_float_from_enum(yalign), "ratio", ratio, "obey_child", static_cast<int>(obey_child), (char*) 0))
+{
+ }
+
+AspectFrame::AspectFrame(const Glib::ustring& label, float xalign, float yalign, float ratio, bool obey_child)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Frame(Glib::ConstructParams(aspectframe_class_.init(), "label", label.c_str(), "xalign", xalign, "yalign", yalign, "ratio", ratio, "obey_child", static_cast<int>(obey_child), (char*) 0))
+{
+ }
+
+void AspectFrame::set(float xalign, float yalign, float ratio, bool obey_child)
+{
+ gtk_aspect_frame_set(gobj(), xalign, yalign, ratio, static_cast<int>(obey_child));
+}
+
+void AspectFrame::set(AlignmentEnum xalign, AlignmentEnum yalign, float ratio, bool obey_child)
+{
+ gtk_aspect_frame_set(gobj(), _gtkmm_align_float_from_enum(xalign), _gtkmm_align_float_from_enum(yalign), ratio, static_cast<int>(obey_child));
+}
+
+
+Glib::PropertyProxy<float> AspectFrame::property_xalign()
+{
+ return Glib::PropertyProxy<float>(this, "xalign");
+}
+
+Glib::PropertyProxy_ReadOnly<float> AspectFrame::property_xalign() const
+{
+ return Glib::PropertyProxy_ReadOnly<float>(this, "xalign");
+}
+
+Glib::PropertyProxy<float> AspectFrame::property_yalign()
+{
+ return Glib::PropertyProxy<float>(this, "yalign");
+}
+
+Glib::PropertyProxy_ReadOnly<float> AspectFrame::property_yalign() const
+{
+ return Glib::PropertyProxy_ReadOnly<float>(this, "yalign");
+}
+
+Glib::PropertyProxy<float> AspectFrame::property_ratio()
+{
+ return Glib::PropertyProxy<float>(this, "ratio");
+}
+
+Glib::PropertyProxy_ReadOnly<float> AspectFrame::property_ratio() const
+{
+ return Glib::PropertyProxy_ReadOnly<float>(this, "ratio");
+}
+
+Glib::PropertyProxy<bool> AspectFrame::property_obey_child()
+{
+ return Glib::PropertyProxy<bool>(this, "obey-child");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> AspectFrame::property_obey_child() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "obey-child");
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/aspectframe.h b/libs/gtkmm2/gtk/gtkmm/aspectframe.h
new file mode 100644
index 0000000000..4687417211
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/aspectframe.h
@@ -0,0 +1,242 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_ASPECTFRAME_H
+#define _GTKMM_ASPECTFRAME_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* aspectframe.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/frame.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkAspectFrame GtkAspectFrame;
+typedef struct _GtkAspectFrameClass GtkAspectFrameClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class AspectFrame_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** A frame that constrains its child to a particular aspect ratio.
+ *
+ * The Gtk::AspectFrame is useful when you want pack a widget so that it can
+ * resize but always retains the same aspect ratio. For instance, one might
+ * be drawing a small preview of a larger image. Because it derives from
+ * Gtk::Frame, it can draw a label and a frame around the child. The frame
+ * will be "shrink-wrapped" to the size of the child.
+ *
+ * @ingroup Widgets
+ * @ingroup Containers
+ */
+
+class AspectFrame : public Frame
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef AspectFrame CppObjectType;
+ typedef AspectFrame_Class CppClassType;
+ typedef GtkAspectFrame BaseObjectType;
+ typedef GtkAspectFrameClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~AspectFrame();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class AspectFrame_Class;
+ static CppClassType aspectframe_class_;
+
+ // noncopyable
+ AspectFrame(const AspectFrame&);
+ AspectFrame& operator=(const AspectFrame&);
+
+protected:
+ explicit AspectFrame(const Glib::ConstructParams& construct_params);
+ explicit AspectFrame(GtkAspectFrame* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkAspectFrame* gobj() { return reinterpret_cast<GtkAspectFrame*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkAspectFrame* gobj() const { return reinterpret_cast<GtkAspectFrame*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+
+public:
+
+ /** Constructor to create a new AspectFrame object.
+ * @param label Label text.
+ * @param xalign Horizontal alignment of the child within the allocation of this
+ * AspectFrame. For possible values, see Gtk::AlignmentEnum.
+ * @param yalign Vertical alignment of the child within the allocation of this
+ * AspectFrame. For possible values, see Gtk::AlignmentEnum.
+ * @param ratio The desired aspect ratio.
+ * @param obey_child If <tt>true</tt>, @a ratio is ignored and the aspect ratio
+ * is taken from the requisition of the child.
+ */
+ explicit AspectFrame(const Glib::ustring& label = Glib::ustring(),
+ AlignmentEnum xalign = Gtk::ALIGN_CENTER, AlignmentEnum yalign = Gtk::ALIGN_CENTER,
+ float ratio = 1.0, bool obey_child = false);
+
+ /** Constructor to create a new AspectFrame object.
+ * @param label Label text.
+ * @param xalign Horizontal alignment of the child within the allocation of this
+ * AspectFrame. This ranges from 0.0 (left aligned) to 1.0 (right aligned).
+ * @param yalign Vertical alignment of the child within the allocation of this
+ * AspectFrame. This ranges from 0.0 (top aligned) to 1.0 (bottom aligned).
+ * @param ratio The desired aspect ratio.
+ * @param obey_child If <tt>true</tt>, @a ratio is ignored and the aspect ratio
+ * is taken from the requisition of the child.
+ */
+ explicit AspectFrame(const Glib::ustring& label,
+ float xalign, float yalign,
+ float ratio = 1.0, bool obey_child = false);
+
+ //TODO: Is "obey_child = true" a good default?
+ /** Set the properties of this AspectFrame.
+ * @param xalign Horizontal alignment of the child within the allocation of this
+ * AspectFrame. This ranges from 0.0 (left aligned) to 1.0 (right aligned).
+ * @param yalign Vertical alignment of the child within the allocation of this
+ * AspectFrame. This ranges from 0.0 (top aligned) to 1.0 (bottom aligned).
+ * @param ratio The desired aspect ratio.
+ * @param obey_child If <tt>true</tt>, @a ratio is ignored and the aspect ratio
+ * is taken from the requisition of the child.
+ */
+
+ void set(float xalign, float yalign, float ratio, bool obey_child = true);
+ /** Set the properties of this AspectFrame.
+ * @param xalign Horizontal alignment of the child within the allocation of this
+ * AspectFrame. For possible values, see Gtk::AlignmentEnum.
+ * @param yalign Vertical alignment of the child within the allocation of this
+ * AspectFrame. For possible values, see Gtk::AlignmentEnum.
+ * @param ratio The desired aspect ratio.
+ * @param obey_child If <tt>true</tt>, @a ratio is ignored and the aspect ratio
+ * is taken from the requisition of the child.
+ */
+
+ void set(AlignmentEnum xalign, AlignmentEnum yalign, float ratio, bool obey_child = true);
+
+ /** X alignment of the child.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<float> property_xalign() ;
+
+/** X alignment of the child.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<float> property_xalign() const;
+
+ /** Y alignment of the child.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<float> property_yalign() ;
+
+/** Y alignment of the child.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<float> property_yalign() const;
+
+ /** Aspect ratio if obey_child is FALSE.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<float> property_ratio() ;
+
+/** Aspect ratio if obey_child is FALSE.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<float> property_ratio() const;
+
+ /** Force aspect ratio to match that of the frame's child.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_obey_child() ;
+
+/** Force aspect ratio to match that of the frame's child.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_obey_child() const;
+
+
+};
+
+} /* namespace Gtk */
+
+
+namespace Glib
+{
+ /** @relates Gtk::AspectFrame
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::AspectFrame* wrap(GtkAspectFrame* object, bool take_copy = false);
+}
+#endif /* _GTKMM_ASPECTFRAME_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/base.h b/libs/gtkmm2/gtk/gtkmm/base.h
new file mode 100644
index 0000000000..82bcdb2ab5
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/base.h
@@ -0,0 +1,53 @@
+// -*- c++ -*-
+#ifndef _GTKMM_BASE_H
+#define _GTKMM_BASE_H
+
+/* $Id$ */
+
+/* base.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/utility.h>
+#include <glibmm/ustring.h>
+
+namespace Gtk
+{
+ using Glib::unconst;
+
+}
+
+/* This aint pretty, but I don't know a better way to make
+ sure things work when the stl classes are defined in a namespace */
+
+// Gtk-- Base and other utility classes
+#define GTK_VERSION_GT(major,minor) ((GTK_MAJOR_VERSION>major)||(GTK_MAJOR_VERSION==major)&&(GTK_MINOR_VERSION>minor))
+#define GTK_VERSION_GE(major,minor) ((GTK_MAJOR_VERSION>major)||(GTK_MAJOR_VERSION==major)&&(GTK_MINOR_VERSION>=minor))
+#define GTK_VERSION_EQ(major,minor) ((GTK_MAJOR_VERSION==major)&&(GTK_MINOR_VERSION==minor))
+#define GTK_VERSION_NE(major,minor) ((GTK_MAJOR_VERSION!=major)||(GTK_MINOR_VERSION!=minor))
+#define GTK_VERSION_LE(major,minor) ((GTK_MAJOR_VERSION<major)||(GTK_MAJOR_VERSION==major)&&(GTK_MINOR_VERSION<=minor))
+#define GTK_VERSION_LT(major,minor) ((GTK_MAJOR_VERSION<major)||(GTK_MAJOR_VERSION==major)&&(GTK_MINOR_VERSION<minor))
+
+#define GTK_VERSION_GT_MICRO(major,minor,micro) \
+ ((GTK_MAJOR_VERSION>major)|| \
+ (GTK_MAJOR_VERSION==major)&&(GTK_MINOR_VERSION>minor)||\
+ (GTK_MAJOR_VERSION==major)&&(GTK_MINOR_VERSION==minor)&&(GTK_MICRO_VERSION>minor))
+
+
+#endif /* _GTKMM_BASE_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/bin.cc b/libs/gtkmm2/gtk/gtkmm/bin.cc
new file mode 100644
index 0000000000..2b58d2954c
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/bin.cc
@@ -0,0 +1,242 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/bin.h>
+#include <gtkmm/private/bin_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkbin.h>
+#include <gtkmm/adjustment.h>
+#include <gtkmm/label.h>
+#include <gtkmm/box.h>
+#include <gtkmm/image.h>
+
+namespace Gtk
+{
+
+
+void
+Bin::remove()
+{
+ if(gobj()->child)
+ {
+ Gtk::Widget* cppChild = Glib::wrap(gobj()->child);
+
+ //If this is a managed widget,
+ //then do an extra ref so that it will
+ //not be destroyed when adding to another container
+ //This should leave it in much the same state as when it was instantiated,
+ //before being added to the first container.
+ if(cppChild->is_managed_())
+ cppChild->reference();
+
+ gtk_container_remove(Container::gobj(), cppChild->gobj());
+ }
+}
+
+void
+Bin::add_label(const Glib::ustring& str, bool mnemonic /* = false */,
+ double x_align /* = 0.5 */, double y_align /* = 0.5 */)
+{
+ Label* label = manage(new Label(str, mnemonic, x_align, y_align));
+ add(*label);
+
+ //This might not always be appropriate:
+ //because maybe the mnemonic widget should be another child widget.
+ //if(mnemonic)
+ //label->set_mnemonic_widget(*this);
+
+ label->show();
+}
+
+void
+Bin::add_label(const Glib::ustring& str, bool mnemonic,
+ AlignmentEnum x_align, AlignmentEnum y_align /* = ALIGN_CENTER */)
+{
+ add_label(str, mnemonic,
+ _gtkmm_align_float_from_enum(x_align),
+ _gtkmm_align_float_from_enum(y_align));
+}
+
+void
+Bin::add_pixmap(const Glib::RefPtr<Gdk::Pixmap>& pixmap, const Glib::RefPtr<Gdk::Bitmap>& mask)
+{
+ Image* p = manage(new Image(pixmap, mask));
+ add(*p);
+ p->show();
+}
+
+void
+Bin::add_pixlabel (const Glib::RefPtr<Gdk::Pixmap>& pixmap,
+ const Glib::RefPtr<Gdk::Bitmap>& mask,
+ const Glib::ustring& str,
+ double x_align /* = 0.5 */, double y_align /* = 0.5 */)
+{
+ //Create Pixmap and Label widgets:
+ Image* pmap = manage(new Image(pixmap, mask));
+ Label* label = manage(new Label(str));
+ label->set_alignment (x_align, y_align);
+
+ //Put them in a VBox:
+ Box* box = manage(new HBox(false,5));
+ box->pack_start(*pmap, PACK_SHRINK);
+ box->pack_start(*label);
+ box->show_all();
+
+ //And put that VBox in this:
+ add(*box);
+}
+
+void
+Bin::add_pixlabel(const Glib::ustring& pixfile,
+ const Glib::ustring& str,
+ double x_align /* = 0.5 */, double y_align /* = 0.5 */)
+{
+ //Create Pixmap and Label widgets:
+ Image* pmap = manage(new Image(pixfile));
+ Label* label = manage(new Label(str));
+ label->set_alignment (x_align, y_align);
+
+ //Put them in a VBox:
+ Box* vbox = manage(new HBox(false, 5));
+ vbox->pack_start(*pmap, PACK_SHRINK);
+ vbox->pack_start(*label);
+ vbox->show_all();
+
+ //And put that VBox in this:
+ add(*vbox);
+}
+
+
+} /* namespace Gtk */
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::Bin* wrap(GtkBin* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::Bin *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Bin_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Bin_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_bin_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Bin_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* Bin_Class::wrap_new(GObject* o)
+{
+ return manage(new Bin((GtkBin*)(o)));
+
+}
+
+
+/* The implementation: */
+
+Bin::Bin(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Container(construct_params)
+{
+ }
+
+Bin::Bin(GtkBin* castitem)
+:
+ Gtk::Container((GtkContainer*)(castitem))
+{
+ }
+
+Bin::~Bin()
+{
+ destroy_();
+}
+
+Bin::CppClassType Bin::bin_class_; // initialize static member
+
+GType Bin::get_type()
+{
+ return bin_class_.init().get_type();
+}
+
+GType Bin::get_base_type()
+{
+ return gtk_bin_get_type();
+}
+
+
+Bin::Bin()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Container(Glib::ConstructParams(bin_class_.init()))
+{
+ }
+
+Widget* Bin::get_child()
+{
+ return Glib::wrap(gobj()->child);
+}
+
+const Widget* Bin::get_child() const
+{
+ return Glib::wrap(gobj()->child);
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/bin.h b/libs/gtkmm2/gtk/gtkmm/bin.h
new file mode 100644
index 0000000000..2100110f69
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/bin.h
@@ -0,0 +1,211 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_BIN_H
+#define _GTKMM_BIN_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* bin.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/container.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkBin GtkBin;
+typedef struct _GtkBinClass GtkBinClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class Bin_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** A container with just one child.
+ *
+ * This is an abstract base class from which all classes holding
+ * up to 1 widget inside of them derive. It provides access to methods
+ * relevent to a single object, such as add_label, add_pixmap, etc.
+ *
+ * @ingroup Widgets
+ */
+
+class Bin : public Container
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Bin CppObjectType;
+ typedef Bin_Class CppClassType;
+ typedef GtkBin BaseObjectType;
+ typedef GtkBinClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~Bin();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class Bin_Class;
+ static CppClassType bin_class_;
+
+ // noncopyable
+ Bin(const Bin&);
+ Bin& operator=(const Bin&);
+
+protected:
+ explicit Bin(const Glib::ConstructParams& construct_params);
+ explicit Bin(GtkBin* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkBin* gobj() { return reinterpret_cast<GtkBin*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkBin* gobj() const { return reinterpret_cast<GtkBin*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+protected:
+ Bin();
+public:
+
+
+ // get_child() is a convenience function to get a c++ wrapper of
+ // the contained widget. It may return NULL if such an item is not
+ // available.
+ Widget* get_child();
+ const Widget* get_child() const;
+
+ /** Remove the contained object
+ * Since this can only hold one object it is not necessary to
+ * specify which object to remove like other containers.
+ *
+ * When calling remove() on a Gtk::ScrolledWindow this might not remove the
+ * expected child directly, because Gtk::ScrolledWindow::add() sometimes creates a
+ * Gtk::ViewPort child and places the widget in that.
+ */
+ void remove();
+
+ //Convenience methods that don't correspond to GTK+ functions:
+
+ /** Add a Label object.
+ * This does not correspond to any GTK+ function and is provided purely for
+ * convenience.
+ * @param label The text for the label.
+ * @param mnemonic If <tt>true</tt>, characters preceded by an underscore
+ * (_) will be underlined and used as a keyboard accelerator (shortcut).
+ * @param x_align The horizontal alignment of the text. This ranges from
+ * 0.0 (left aligned) to 1.0 (right aligned).
+ * @param y_align The vertical alignment of the text. This ranges from
+ * 0.0 (top aligned) to 1.0 (bottom aligned).
+ */
+ void add_label(const Glib::ustring& label, bool mnemonic = false,
+ double x_align = 0.5, double y_align = 0.5);
+
+ /** Add a Label object.
+ * This does not correspond to any GTK+ function and is provided purely for
+ * convenience.
+ * @param label The label text.
+ * @param mnemonic If <tt>true</tt>, characters preceded by an underscore
+ * (_) will be underlined and used as a keyboard accelerator (shortcut).
+ * @param x_align The horizontal alignment of the text. For possible
+ * values, see Gtk::AlignmentEnum.
+ * @param y_align The vertical alignment of the text. For possible
+ * values, see Gtk::AlignmentEnum.
+ */
+ void add_label(const Glib::ustring& label, bool mnemonic,
+ AlignmentEnum x_align, AlignmentEnum y_align = ALIGN_CENTER);
+
+ /** Add an Image object.
+ * This does not correspond to any GTK+ function and is provided purely for
+ * convenience.
+ * This will create, manage, add, and show a new Image to this Bin.
+ * @param pixmap A Glib::RefPtr to a Gdk::Pixmap.
+ * @param mask A Glib::RefPtr to a Gdk::Bitmap.
+ */
+ void add_pixmap(const Glib::RefPtr<Gdk::Pixmap>& pixmap,
+ const Glib::RefPtr<Gdk::Bitmap>& mask);
+
+ /** Add Image and Label objects.
+ * This does not correspond to any GTK+ function and is provided purely for
+ * convenience.
+ * This will create, manage, add, and show a new Image and Label (within an
+ * HBox) to this Bin.
+ * @param pixmap A Glib::RefPtr to a Gdk::Pixmap.
+ * @param mask A Glib::RefPtr to a Gdk::Bitmap.
+ * @param label The text for the label.
+ * @param x_align The horizontal alignment of the text in the label.
+ * @param y_align The vertical alignment of the text in the label.
+ */
+ void add_pixlabel(const Glib::RefPtr<Gdk::Pixmap>& pixmap,
+ const Glib::RefPtr<Gdk::Bitmap>& mask,
+ const Glib::ustring& label,
+ double x_align = 0.5, double y_align = 0.5);
+
+ /** Add Image and Label objects.
+ * This does not correspond to any GTK+ function and is provided purely for
+ * convenience.
+ * This will create, manage, add, and show a new Image and Label (within an
+ * HBox) to this Bin.
+ * @param pixfile The path to a file to be displayed.
+ * @param label The text for the label.
+ * @param x_align The horizontal alignment of the text in the label.
+ * @param y_align The vertical alignment of the text in the label.
+ */
+ void add_pixlabel(const Glib::ustring& pixfile,
+ const Glib::ustring& label,
+ double x_align = 0.5, double y_align = 0.5);
+
+
+};
+
+} /* namespace Gtk */
+
+
+namespace Glib
+{
+ /** @relates Gtk::Bin
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::Bin* wrap(GtkBin* object, bool take_copy = false);
+}
+#endif /* _GTKMM_BIN_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/box.cc b/libs/gtkmm2/gtk/gtkmm/box.cc
new file mode 100644
index 0000000000..a67411b47b
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/box.cc
@@ -0,0 +1,572 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/box.h>
+#include <gtkmm/private/box_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkbox.h>
+#include <gtk/gtkvbox.h>
+#include <gtk/gtkhbox.h>
+#include <glibmm/wrap.h>
+
+namespace Gtk
+{
+
+namespace Box_Helpers
+{
+
+Widget* Child::get_widget() const
+{
+ return Glib::wrap(gobj()->widget);
+}
+
+void Child::set_options(PackOptions options, guint padding)
+{
+ const bool expand = (options == PACK_EXPAND_PADDING || options == PACK_EXPAND_WIDGET);
+ const bool fill = (options == PACK_EXPAND_WIDGET);
+
+ set_options(expand, fill, padding);
+}
+
+void Child::set_options(bool expand, bool fill, guint padding)
+{
+ gobj()->expand = expand;
+ gobj()->fill = fill;
+ gobj()->padding = padding;
+}
+
+void Child::set_pack(PackType pack)
+{
+ gobj()->pack = pack;
+}
+
+
+/**************************************************************************/
+
+
+typedef Box_Helpers::BoxList::iterator box_iterator;
+
+box_iterator BoxList::insert(box_iterator position, const Element& e)
+{
+ iterator i;
+ bool expand = (e.options_ == PACK_EXPAND_PADDING) || (e.options_ == PACK_EXPAND_WIDGET);
+ bool fill = (e.options_ == PACK_EXPAND_WIDGET);
+
+ if (e.pack_ == PACK_START)
+ gtk_box_pack_start(gparent(), (e.widget_? e.widget_->gobj() : 0),
+ (gboolean)expand, (gboolean)fill, e.padding_);
+ else
+ gtk_box_pack_end(gparent(), (e.widget_ ? e.widget_->gobj() : 0),
+ (gboolean)expand, (gboolean)fill, e.padding_);
+
+ i = --end();
+
+ if (position!=end())
+ reorder(i, position);
+
+ return i;
+}
+
+// Non-standard
+void BoxList::reorder(box_iterator loc, box_iterator pos)
+{
+ int position = g_list_position(glist(), pos.node_);
+ gtk_box_reorder_child(gparent(), loc->gobj()->widget, position);
+}
+
+} /* namespace Box_Helpers */
+
+Box::BoxList& Box::children()
+{
+ children_proxy_ = BoxList(gobj());
+ return children_proxy_;
+}
+
+const Box::BoxList& Box::children() const
+{
+ children_proxy_ = BoxList(const_cast<GtkBox*>(gobj()));
+ return children_proxy_;
+}
+
+void Box::pack_start(Widget& child, PackOptions options, guint padding)
+{
+ bool expand = (options == PACK_EXPAND_PADDING) || (options == PACK_EXPAND_WIDGET);
+ bool fill = (options == PACK_EXPAND_WIDGET);
+
+ gtk_box_pack_start(gobj(), child.gobj(), (gboolean)expand, (gboolean)fill, padding);
+}
+
+void Box::pack_end(Widget& child, PackOptions options, guint padding)
+{
+ bool expand = (options == PACK_EXPAND_PADDING) || (options == PACK_EXPAND_WIDGET);
+ bool fill = (options == PACK_EXPAND_WIDGET);
+
+ gtk_box_pack_end(gobj(), child.gobj(), (gboolean)expand, (gboolean)fill, padding);
+}
+
+
+} /* namespace Gtk */
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::Box* wrap(GtkBox* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::Box *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Box_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Box_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_box_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Box_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* Box_Class::wrap_new(GObject* o)
+{
+ return manage(new Box((GtkBox*)(o)));
+
+}
+
+
+/* The implementation: */
+
+Box::Box(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Container(construct_params)
+{
+ }
+
+Box::Box(GtkBox* castitem)
+:
+ Gtk::Container((GtkContainer*)(castitem))
+{
+ }
+
+Box::~Box()
+{
+ destroy_();
+}
+
+Box::CppClassType Box::box_class_; // initialize static member
+
+GType Box::get_type()
+{
+ return box_class_.init().get_type();
+}
+
+GType Box::get_base_type()
+{
+ return gtk_box_get_type();
+}
+
+
+namespace Box_Helpers
+{
+
+BoxList::iterator BoxList::find(const_reference w)
+{
+ iterator i = begin();
+ for(i = begin(); i != end() && (i->get_widget()->gobj() != w.get_widget()->gobj()); i++);
+ return i;
+}
+
+BoxList::iterator BoxList::find(Widget& w)
+{
+ iterator i;
+ for(i = begin(); i != end() && ((GtkWidget*)i->get_widget()->gobj() != w.gobj()); i++);
+ return i;
+}
+
+} /* namespace Box_Helpers */
+
+
+namespace Box_Helpers
+{
+
+void BoxList::remove(const_reference child)
+{
+ gtk_container_remove(GTK_CONTAINER(gparent_),
+ (GtkWidget*)(child.get_widget()->gobj()));
+}
+
+void BoxList::remove(Widget& widget)
+{
+ gtk_container_remove(GTK_CONTAINER(gparent_), (GtkWidget*)(widget.gobj()));
+}
+
+BoxList::iterator BoxList::erase(iterator position)
+{
+ //Check that it is a valid iterator, to a real item:
+ if ( !position.node_|| (position == end()) )
+ return end();
+
+ //Get an iterator the the next item, to return:
+ iterator next = position;
+ next++;
+
+ //Use GTK+ C function to remove it, by providing the GtkWidget*:
+ gtk_container_remove( GTK_CONTAINER(gparent_), (GtkWidget*)(position->get_widget()->gobj()) );
+ return next;
+}
+
+} /* namespace Box_Helpers */
+
+
+namespace Box_Helpers
+{
+
+BoxList::BoxList()
+{}
+
+BoxList::BoxList(GtkBox* gparent)
+: type_base((GObject*)gparent)
+{}
+
+BoxList::BoxList(const BoxList& src)
+:
+ type_base(src)
+{}
+
+BoxList& BoxList::operator=(const BoxList& src)
+{
+ type_base::operator=(src);
+ return *this;
+}
+
+GList*& BoxList::glist() const
+{
+ return ((GtkBox*)gparent_)->children;
+}
+
+void BoxList::erase(iterator start, iterator stop)
+{
+ type_base::erase(start, stop);
+}
+
+GtkBox* BoxList::gparent()
+{
+ return (GtkBox*)type_base::gparent();
+}
+
+const GtkBox* BoxList::gparent() const
+{
+ return (GtkBox*)type_base::gparent();
+}
+
+BoxList::reference BoxList::operator[](size_type l) const
+{
+ return type_base::operator[](l);
+}
+
+} /* namespace Box_Helpers */
+
+Box::Box()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Container(Glib::ConstructParams(box_class_.init()))
+{
+ }
+
+void Box::pack_start(Widget& child, bool expand, bool fill, guint padding)
+{
+ gtk_box_pack_start(gobj(), (child).gobj(), static_cast<int>(expand), static_cast<int>(fill), padding);
+}
+
+void Box::pack_end(Widget& child, bool expand, bool fill, guint padding)
+{
+ gtk_box_pack_end(gobj(), (child).gobj(), static_cast<int>(expand), static_cast<int>(fill), padding);
+}
+
+void Box::set_homogeneous(bool homogeneous)
+{
+ gtk_box_set_homogeneous(gobj(), static_cast<int>(homogeneous));
+}
+
+bool Box::get_homogeneous() const
+{
+ return gtk_box_get_homogeneous(const_cast<GtkBox*>(gobj()));
+}
+
+void Box::set_spacing(int spacing)
+{
+ gtk_box_set_spacing(gobj(), spacing);
+}
+
+int Box::get_spacing() const
+{
+ return gtk_box_get_spacing(const_cast<GtkBox*>(gobj()));
+}
+
+void Box::reorder_child(Widget& child, int pos)
+{
+ gtk_box_reorder_child(gobj(), (child).gobj(), pos);
+}
+
+
+Glib::PropertyProxy<int> Box::property_spacing()
+{
+ return Glib::PropertyProxy<int>(this, "spacing");
+}
+
+Glib::PropertyProxy_ReadOnly<int> Box::property_spacing() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "spacing");
+}
+
+Glib::PropertyProxy<bool> Box::property_homogeneous()
+{
+ return Glib::PropertyProxy<bool>(this, "homogeneous");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Box::property_homogeneous() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "homogeneous");
+}
+
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+
+Gtk::VBox* wrap(GtkVBox* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::VBox *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& VBox_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &VBox_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_vbox_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void VBox_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* VBox_Class::wrap_new(GObject* o)
+{
+ return manage(new VBox((GtkVBox*)(o)));
+
+}
+
+
+/* The implementation: */
+
+VBox::VBox(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Box(construct_params)
+{
+ }
+
+VBox::VBox(GtkVBox* castitem)
+:
+ Gtk::Box((GtkBox*)(castitem))
+{
+ }
+
+VBox::~VBox()
+{
+ destroy_();
+}
+
+VBox::CppClassType VBox::vbox_class_; // initialize static member
+
+GType VBox::get_type()
+{
+ return vbox_class_.init().get_type();
+}
+
+GType VBox::get_base_type()
+{
+ return gtk_vbox_get_type();
+}
+
+VBox::VBox(bool homogeneous, int spacing)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Box(Glib::ConstructParams(vbox_class_.init(), "homogeneous", static_cast<int>(homogeneous), "spacing", spacing, (char*) 0))
+{
+ }
+
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+
+Gtk::HBox* wrap(GtkHBox* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::HBox *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& HBox_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &HBox_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_hbox_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void HBox_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* HBox_Class::wrap_new(GObject* o)
+{
+ return manage(new HBox((GtkHBox*)(o)));
+
+}
+
+
+/* The implementation: */
+
+HBox::HBox(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Box(construct_params)
+{
+ }
+
+HBox::HBox(GtkHBox* castitem)
+:
+ Gtk::Box((GtkBox*)(castitem))
+{
+ }
+
+HBox::~HBox()
+{
+ destroy_();
+}
+
+HBox::CppClassType HBox::hbox_class_; // initialize static member
+
+GType HBox::get_type()
+{
+ return hbox_class_.init().get_type();
+}
+
+GType HBox::get_base_type()
+{
+ return gtk_hbox_get_type();
+}
+
+HBox::HBox(bool homogeneous, int spacing)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Box(Glib::ConstructParams(hbox_class_.init(), "homogeneous", static_cast<int>(homogeneous), "spacing", spacing, (char*) 0))
+{
+ }
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/box.h b/libs/gtkmm2/gtk/gtkmm/box.h
new file mode 100644
index 0000000000..3955273760
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/box.h
@@ -0,0 +1,587 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_BOX_H
+#define _GTKMM_BOX_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#include <gtkmm/container.h>
+#include <glibmm/helperlist.h>
+#include <gtk/gtkbox.h> /* For _GtkBoxChild */
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkBox GtkBox;
+typedef struct _GtkBoxClass GtkBoxClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class Box_Class; } // namespace Gtk
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkVBox GtkVBox;
+typedef struct _GtkVBoxClass GtkVBoxClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class VBox_Class; } // namespace Gtk
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkHBox GtkHBox;
+typedef struct _GtkHBoxClass GtkHBoxClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class HBox_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** Packing options for adding child widgets to a Box with pack_start() and pack_end().
+ * @ingroup gtkmmEnums
+ */
+enum PackOptions
+{
+ PACK_SHRINK, /**< Space is contracted to the child widget size. */
+ PACK_EXPAND_PADDING, /**< Space is expanded, with extra space filled with padding. */
+ PACK_EXPAND_WIDGET /**< Space is expanded, with extra space filled by increasing the child widget size. */
+};
+
+class Box;
+
+namespace Box_Helpers
+{
+
+//This may not have any data or virtual functions. See below.
+class Child : protected _GtkBoxChild
+{
+private:
+ Child& operator=(const Child&); //Not implemented.
+ Child(const Child&); //Not implemented.
+
+public:
+ /// Provides access to the underlying C GObject.
+ inline _GtkBoxChild* gobj() { return this; }
+ /// Provides access to the underlying C GObject.
+ inline const _GtkBoxChild* gobj() const { return this; }
+
+ Widget* get_widget() const;
+
+ inline guint16 get_padding() const { return (gobj()->padding); }
+ inline bool get_expand() const { return (gobj()->expand); }
+ inline bool get_fill() const { return (gobj()->fill); }
+ inline bool get_pack() const { return (gobj()->pack); }
+
+ void set_options(PackOptions options, guint padding = 0);
+ void set_options(bool expand, bool fill, guint padding = 0);
+
+ void set_pack(PackType pack);
+
+protected:
+ inline GtkBox* parent()
+ { return (GtkBox*) (gobj()->widget->parent); }
+
+ void redraw();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ friend class Dummy_; // silence the compiler (Child has only private ctors)
+#endif
+};
+
+class Element
+{
+public:
+ Element(Widget& widget,
+ PackOptions options = PACK_EXPAND_WIDGET,
+ guint padding = 0,
+ PackType pack = PACK_START)
+ : widget_(&widget), options_(options),
+ padding_(padding), pack_(pack)
+ {}
+
+ Widget* widget_;
+ PackOptions options_;
+ guint padding_;
+ PackType pack_;
+};
+
+typedef Element StartElem;
+
+struct EndElem : public Element
+{
+ EndElem(Widget& widget,
+ PackOptions options = PACK_EXPAND_WIDGET,
+ guint padding = 0)
+ : Element (widget, options, padding, PACK_END)
+ {}
+};
+
+
+class BoxList : public Glib::HelperList< Child, const Element, Glib::List_Iterator< Child > >
+{
+public:
+ BoxList();
+ explicit BoxList(GtkBox* gparent);
+ BoxList(const BoxList& src);
+ virtual ~BoxList() {}
+
+ BoxList& operator=(const BoxList& src);
+
+ typedef Glib::HelperList< Child, const Element, Glib::List_Iterator< Child > > type_base;
+
+ GtkBox* gparent();
+ const GtkBox* gparent() const;
+
+ virtual GList*& glist() const; // front of list
+
+ virtual void erase(iterator start, iterator stop);
+ virtual iterator erase(iterator); //Implented as custom or by LIST_CONTAINER_REMOVE
+ virtual void remove(const_reference); //Implented as custom or by LIST_CONTAINER_REMOVE
+
+ /// This is order n. (use at own risk)
+ reference operator[](size_type l) const;
+
+public:
+ iterator insert(iterator position, element_type& e); //custom-implemented.
+
+ template <class InputIterator>
+ inline void insert(iterator position, InputIterator first, InputIterator last)
+ {
+ for(;first != last; ++first)
+ position = insert(position, *first);
+ }
+
+ inline void push_front(element_type& e)
+ { insert(begin(), e); }
+ inline void push_back(element_type& e)
+ { insert(end(), e); }
+
+
+ //The standard iterator, instead of List_Cpp_Iterator,
+ //only works because Child is derived from _GtkBoxChild.
+
+
+ iterator find(const_reference c);
+ iterator find(Widget&);
+
+
+virtual void remove(Widget& w); //Implented as custom or by LIST_CONTAINER_REMOVE
+
+ // Non-standard
+ void reorder(iterator loc,iterator pos);
+ };
+
+
+} /* namespace Box_Helpers */
+
+
+/** A base class for box containers
+ *
+ * Abstract base class for horizontal and vertical boxes, which organize a
+ * variable number of widgets into a rectangular area. This is an abstract
+ * class and it defers choice of which way the widgets are packed to the screen
+ * to the derived classes. It provides a common interface for inserting
+ * widgets to a box indepenently of how it is shown in the screen.
+ *
+ * Gtk::Box uses a notion of packing. Packing refers to adding widgets with
+ * reference to a particular position in a Gtk::Container. There are two
+ * reference positions: the start and the end of the box. For a VBox, the start
+ * is defined as the top of the box and the end is defined as the bottom. For
+ * a HBox the start is defined as the left side and the end is defined as the
+ * right side. Use repeated calls to pack_start() to pack widgets into a
+ * Gtk::Box from start to end. Use pack_end() to add widgets from end to start.
+ * You may intersperse these calls and add widgets from both ends of the same
+ * Gtk::Box.
+ *
+ * Because Gtk::Box is a Gtk::Container, you may also use Gtk::Container::add()
+ * to insert widgets, and they will be packed as if with pack_start(). Use
+ * Gtk::Container::remove() to remove widgets.
+ *
+ * Use set_homogeneous() to specify whether or not all children of the Gtk::Box
+ * occupy the same amount of space. Use set_spacing() to determine the minimum
+ * space placed between all children in the Gtk::Box. Use reorder_child() to
+ * move a child widget to a different place in the box. Use
+ * set_child_packing() to reset the pack options and padding attributes of any
+ * Gtk::Box child. Use query_child_packing() to query these fields.
+ */
+
+class Box : public Container
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Box CppObjectType;
+ typedef Box_Class CppClassType;
+ typedef GtkBox BaseObjectType;
+ typedef GtkBoxClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~Box();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class Box_Class;
+ static CppClassType box_class_;
+
+ // noncopyable
+ Box(const Box&);
+ Box& operator=(const Box&);
+
+protected:
+ explicit Box(const Glib::ConstructParams& construct_params);
+ explicit Box(GtkBox* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkBox* gobj() { return reinterpret_cast<GtkBox*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkBox* gobj() const { return reinterpret_cast<GtkBox*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+
+public:
+ typedef Box_Helpers::BoxList BoxList;
+
+protected:
+ Box();
+public:
+
+
+ /** Left side insert a widget to a box.
+ * The expand argument to pack_start() or pack_end()
+ * controls whether the widgets are laid out in the box to fill in all
+ * the extra space in the box so the box is expanded to fill the area
+ * allocated to it (<tt>true</tt>). Or the box is shrunk to just fit the widgets
+ * (<tt>false</tt>). Setting @a expand to <tt>false</tt> will allow you to do right and left
+ * justifying of your widgets. Otherwise, they will all expand to fit in
+ * the box, and the same effect could be achieved by using only one of
+ * pack_start() or pack_end() functions.
+ *
+ * The @a fill argument to the pack_start()/pack_end() functions control whether the
+ * extra space is allocated to the objects themselves (<tt>true</tt>), or as extra
+ * padding in the box around these objects (<tt>false</tt>). It only has an effect
+ * if the @a expand argument is also <tt>true</tt>.
+ *
+ * The difference between spacing (set when the box is created)
+ * and padding (set when elements are packed) is, that spacing is added between
+ * objects, and padding is added on either side of an object.
+ */
+ void pack_start(Widget& child, bool expand, bool fill, guint padding = 0);
+
+ /** Left side insert a widget to a box.
+ * @param child A Widget to be added to box.
+ * @param options Controls how the widget expands to fill space, and how the space around them is used.
+ * @param padding Padding that is added on either side of the widget. This is different to spacing set when the box is created (or with set_spacing()) - spacing is added between objects, and padding is added on either side of an object.
+ */
+ void pack_start(Widget& child, PackOptions options = PACK_EXPAND_WIDGET, guint padding = 0);
+
+
+ void pack_end(Widget& child, bool expand, bool fill, guint padding = 0);
+
+ /** Right side insert a widget to a box.
+ * @param child A Widget to be added to box.
+ * @param options Controls how the widget expands to fill space, and how the space around them is used.
+ * @param padding Padding that is added on either side of the widget. This is different to spacing set when the box is created (or with set_spacing()) - spacing is added between objects, and padding is added on either side of an object.
+ */
+ void pack_end(Widget& child, PackOptions options = PACK_EXPAND_WIDGET, guint padding = 0);
+
+
+ void set_homogeneous(bool homogeneous = true);
+
+ /** Returns whether the box is homogeneous (all children are the
+ * same size). See set_homogeneous().
+ * @return <tt>true</tt> if the box is homogeneous.
+ */
+ bool get_homogeneous() const;
+
+
+ void set_spacing(int spacing);
+
+ /** Gets the value set by set_spacing().
+ * @return Spacing between children.
+ */
+ int get_spacing() const;
+
+
+ void reorder_child(Widget& child, int pos);
+
+ /* Get the child widgets.
+ * @result An STL-style container of pointers to the box's child widgets.
+ */
+ BoxList& children();
+
+ /* Get the child widgets.
+ * @result An STL-style container of pointers to the box's child widgets.
+ */
+ const BoxList& children() const;
+
+ /** The amount of space between children.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_spacing() ;
+
+/** The amount of space between children.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_spacing() const;
+
+ /** Whether the children should all be the same size.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_homogeneous() ;
+
+/** Whether the children should all be the same size.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_homogeneous() const;
+
+
+protected:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ mutable BoxList children_proxy_;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+};
+
+
+/** Vertical Box for laying widgets in a vertical row.
+ *
+ * You should create these objects, but it is more confortable to pass
+ * around pointers of Gtk::Box. All the methods that do anything are in
+ * class Gtk::Box and this allows you to later change the direction of the
+ * box, when there's no dependencies to HBox and VBox classes.
+ *
+ * @ingroup Widgets
+ * @ingroup Containers
+ */
+
+class VBox : public Box
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef VBox CppObjectType;
+ typedef VBox_Class CppClassType;
+ typedef GtkVBox BaseObjectType;
+ typedef GtkVBoxClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~VBox();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class VBox_Class;
+ static CppClassType vbox_class_;
+
+ // noncopyable
+ VBox(const VBox&);
+ VBox& operator=(const VBox&);
+
+protected:
+ explicit VBox(const Glib::ConstructParams& construct_params);
+ explicit VBox(GtkVBox* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkVBox* gobj() { return reinterpret_cast<GtkVBox*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkVBox* gobj() const { return reinterpret_cast<GtkVBox*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+public:
+
+ /** Creates a new vertical box.
+ * @param homogeneous Whether each widget in the VBox should have the same
+ * height. If set, a PACK_SHRINK argument to pack_start() or pack_end() is
+ * ignored.
+ * @param spacing Determines the space in pixels between child widgets.
+ */
+ explicit VBox(bool homogeneous = false, int spacing = 0);
+
+
+};
+
+/** Horizontal Box for laying widgets in a horizontal row.
+ *
+ * You should create these objects, but it is more confortable to pass
+ * around pointers of Gtk::Box. All the methods that do anything are in
+ * class Gtk::Box and this allows you to later change the direction of the
+ * box, when there's no dependencies to HBox and VBox classes.
+ *
+ * Use the Gtk::Box packing interface to determine the arrangement, spacing,
+ * width, and alignment of Gtk::HBox children.
+ *
+ * All children are allocated the same height.
+ *
+ * @ingroup Widgets
+ * @ingroup Containers
+ */
+
+class HBox : public Box
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef HBox CppObjectType;
+ typedef HBox_Class CppClassType;
+ typedef GtkHBox BaseObjectType;
+ typedef GtkHBoxClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~HBox();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class HBox_Class;
+ static CppClassType hbox_class_;
+
+ // noncopyable
+ HBox(const HBox&);
+ HBox& operator=(const HBox&);
+
+protected:
+ explicit HBox(const Glib::ConstructParams& construct_params);
+ explicit HBox(GtkHBox* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkHBox* gobj() { return reinterpret_cast<GtkHBox*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkHBox* gobj() const { return reinterpret_cast<GtkHBox*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+public:
+
+ /** Creates a new horizontal box.
+ * @param homogeneous Whether each widget in the HBox should have the same
+ * width. If set, a PACK_SHRINK argument to pack_start() or pack_end() is
+ * ignored.
+ * @param spacing Determines the space in pixels between child widgets.
+ */
+ explicit HBox(bool homogeneous = false, int spacing = 0);
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::Box
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::Box* wrap(GtkBox* object, bool take_copy = false);
+}
+namespace Glib
+{
+ /** @relates Gtk::VBox
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::VBox* wrap(GtkVBox* object, bool take_copy = false);
+}
+namespace Glib
+{
+ /** @relates Gtk::HBox
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::HBox* wrap(GtkHBox* object, bool take_copy = false);
+}
+#endif /* _GTKMM_BOX_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/button.cc b/libs/gtkmm2/gtk/gtkmm/button.cc
new file mode 100644
index 0000000000..01a3265d8c
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/button.cc
@@ -0,0 +1,682 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/button.h>
+#include <gtkmm/private/button_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtklabel.h>
+#include <gtk/gtkmisc.h>
+#include <gtk/gtkbutton.h>
+#include <gtkmm/stock.h>
+
+
+namespace Gtk
+{
+
+Button::Button(const Glib::ustring& label, bool mnemonic)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Bin(Glib::ConstructParams(button_class_.init(), "label",label.c_str(),"use_underline",gboolean(mnemonic), (char*) 0))
+{}
+
+Button::Button(const StockID& stock_id)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Bin(Glib::ConstructParams(button_class_.init(), "use_stock",1,"label",stock_id.get_c_str(), (char*) 0))
+{}
+
+} // namespace Gtk
+
+
+namespace
+{
+
+const Glib::SignalProxyInfo Button_signal_pressed_info =
+{
+ "pressed",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+
+const Glib::SignalProxyInfo Button_signal_released_info =
+{
+ "released",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+
+const Glib::SignalProxyInfo Button_signal_clicked_info =
+{
+ "clicked",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+
+const Glib::SignalProxyInfo Button_signal_enter_info =
+{
+ "enter",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+
+const Glib::SignalProxyInfo Button_signal_leave_info =
+{
+ "leave",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+
+const Glib::SignalProxyInfo Button_signal_activate_info =
+{
+ "activate",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::Button* wrap(GtkButton* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::Button *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Button_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Button_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_button_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Button_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->pressed = &pressed_callback;
+ klass->released = &released_callback;
+ klass->clicked = &clicked_callback;
+ klass->enter = &enter_callback;
+ klass->leave = &leave_callback;
+ klass->activate = &activate_callback;
+}
+
+
+void Button_Class::pressed_callback(GtkButton* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_pressed();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->pressed)
+ (*base->pressed)(self);
+ }
+}
+
+void Button_Class::released_callback(GtkButton* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_released();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->released)
+ (*base->released)(self);
+ }
+}
+
+void Button_Class::clicked_callback(GtkButton* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_clicked();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->clicked)
+ (*base->clicked)(self);
+ }
+}
+
+void Button_Class::enter_callback(GtkButton* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_enter();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->enter)
+ (*base->enter)(self);
+ }
+}
+
+void Button_Class::leave_callback(GtkButton* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_leave();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->leave)
+ (*base->leave)(self);
+ }
+}
+
+void Button_Class::activate_callback(GtkButton* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_activate();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->activate)
+ (*base->activate)(self);
+ }
+}
+
+
+Glib::ObjectBase* Button_Class::wrap_new(GObject* o)
+{
+ return manage(new Button((GtkButton*)(o)));
+
+}
+
+
+/* The implementation: */
+
+Button::Button(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Bin(construct_params)
+{
+ }
+
+Button::Button(GtkButton* castitem)
+:
+ Gtk::Bin((GtkBin*)(castitem))
+{
+ }
+
+Button::~Button()
+{
+ destroy_();
+}
+
+Button::CppClassType Button::button_class_; // initialize static member
+
+GType Button::get_type()
+{
+ return button_class_.init().get_type();
+}
+
+GType Button::get_base_type()
+{
+ return gtk_button_get_type();
+}
+
+
+Button::Button()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Bin(Glib::ConstructParams(button_class_.init()))
+{
+ }
+
+void Button::pressed()
+{
+ gtk_button_pressed(gobj());
+}
+
+void Button::released()
+{
+ gtk_button_released(gobj());
+}
+
+void Button::clicked()
+{
+ gtk_button_clicked(gobj());
+}
+
+void Button::enter()
+{
+ gtk_button_enter(gobj());
+}
+
+void Button::leave()
+{
+ gtk_button_leave(gobj());
+}
+
+void Button::set_relief(ReliefStyle newstyle)
+{
+ gtk_button_set_relief(gobj(), ((GtkReliefStyle)(newstyle)));
+}
+
+ReliefStyle Button::get_relief() const
+{
+ return ((ReliefStyle)(gtk_button_get_relief(const_cast<GtkButton*>(gobj()))));
+}
+
+void Button::set_label(const Glib::ustring& label)
+{
+ gtk_button_set_label(gobj(), label.c_str());
+}
+
+Glib::ustring Button::get_label() const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(gtk_button_get_label(const_cast<GtkButton*>(gobj())));
+}
+
+void Button::set_use_underline(bool use_underline)
+{
+ gtk_button_set_use_underline(gobj(), static_cast<int>(use_underline));
+}
+
+bool Button::get_use_underline() const
+{
+ return gtk_button_get_use_underline(const_cast<GtkButton*>(gobj()));
+}
+
+void Button::set_use_stock(bool use_stock)
+{
+ gtk_button_set_use_stock(gobj(), static_cast<int>(use_stock));
+}
+
+bool Button::get_use_stock() const
+{
+ return gtk_button_get_use_stock(const_cast<GtkButton*>(gobj()));
+}
+
+void Button::set_focus_on_click(bool focus_on_click)
+{
+ gtk_button_set_focus_on_click(gobj(), static_cast<int>(focus_on_click));
+}
+
+bool Button::get_focus_on_click() const
+{
+ return gtk_button_get_focus_on_click(const_cast<GtkButton*>(gobj()));
+}
+
+void Button::set_alignment(float xalign, float yalign)
+{
+ gtk_button_set_alignment(gobj(), xalign, yalign);
+}
+
+void Button::get_alignment(float& xalign, float& yalign)
+{
+ gtk_button_get_alignment(gobj(), &(xalign), &(yalign));
+}
+
+void Button::set_image(Widget& image)
+{
+ gtk_button_set_image(gobj(), (image).gobj());
+}
+
+Widget* Button::get_image()
+{
+ return Glib::wrap(gtk_button_get_image(gobj()));
+}
+
+const Widget* Button::get_image() const
+{
+ return Glib::wrap(gtk_button_get_image(const_cast<GtkButton*>(gobj())));
+}
+
+
+Glib::SignalProxy0< void > Button::signal_pressed()
+{
+ return Glib::SignalProxy0< void >(this, &Button_signal_pressed_info);
+}
+
+Glib::SignalProxy0< void > Button::signal_released()
+{
+ return Glib::SignalProxy0< void >(this, &Button_signal_released_info);
+}
+
+Glib::SignalProxy0< void > Button::signal_clicked()
+{
+ return Glib::SignalProxy0< void >(this, &Button_signal_clicked_info);
+}
+
+Glib::SignalProxy0< void > Button::signal_enter()
+{
+ return Glib::SignalProxy0< void >(this, &Button_signal_enter_info);
+}
+
+Glib::SignalProxy0< void > Button::signal_leave()
+{
+ return Glib::SignalProxy0< void >(this, &Button_signal_leave_info);
+}
+
+Glib::SignalProxy0< void > Button::signal_activate()
+{
+ return Glib::SignalProxy0< void >(this, &Button_signal_activate_info);
+}
+
+
+Glib::PropertyProxy<Glib::ustring> Button::property_label()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "label");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> Button::property_label() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "label");
+}
+
+Glib::PropertyProxy<ReliefStyle> Button::property_relief()
+{
+ return Glib::PropertyProxy<ReliefStyle>(this, "relief");
+}
+
+Glib::PropertyProxy_ReadOnly<ReliefStyle> Button::property_relief() const
+{
+ return Glib::PropertyProxy_ReadOnly<ReliefStyle>(this, "relief");
+}
+
+Glib::PropertyProxy<bool> Button::property_use_underline()
+{
+ return Glib::PropertyProxy<bool>(this, "use-underline");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Button::property_use_underline() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "use-underline");
+}
+
+Glib::PropertyProxy<bool> Button::property_use_stock()
+{
+ return Glib::PropertyProxy<bool>(this, "use-stock");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Button::property_use_stock() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "use-stock");
+}
+
+Glib::PropertyProxy<bool> Button::property_focus_on_click()
+{
+ return Glib::PropertyProxy<bool>(this, "focus-on-click");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Button::property_focus_on_click() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "focus-on-click");
+}
+
+Glib::PropertyProxy<float> Button::property_xalign()
+{
+ return Glib::PropertyProxy<float>(this, "xalign");
+}
+
+Glib::PropertyProxy_ReadOnly<float> Button::property_xalign() const
+{
+ return Glib::PropertyProxy_ReadOnly<float>(this, "xalign");
+}
+
+Glib::PropertyProxy<float> Button::property_yalign()
+{
+ return Glib::PropertyProxy<float>(this, "yalign");
+}
+
+Glib::PropertyProxy_ReadOnly<float> Button::property_yalign() const
+{
+ return Glib::PropertyProxy_ReadOnly<float>(this, "yalign");
+}
+
+Glib::PropertyProxy<Gtk::Widget*> Button::property_image()
+{
+ return Glib::PropertyProxy<Gtk::Widget*>(this, "image");
+}
+
+Glib::PropertyProxy_ReadOnly<Gtk::Widget*> Button::property_image() const
+{
+ return Glib::PropertyProxy_ReadOnly<Gtk::Widget*>(this, "image");
+}
+
+
+void Gtk::Button::on_pressed()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->pressed)
+ (*base->pressed)(gobj());
+}
+
+void Gtk::Button::on_released()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->released)
+ (*base->released)(gobj());
+}
+
+void Gtk::Button::on_clicked()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->clicked)
+ (*base->clicked)(gobj());
+}
+
+void Gtk::Button::on_enter()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->enter)
+ (*base->enter)(gobj());
+}
+
+void Gtk::Button::on_leave()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->leave)
+ (*base->leave)(gobj());
+}
+
+void Gtk::Button::on_activate()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->activate)
+ (*base->activate)(gobj());
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/button.h b/libs/gtkmm2/gtk/gtkmm/button.h
new file mode 100644
index 0000000000..1ba9920a0f
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/button.h
@@ -0,0 +1,432 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_BUTTON_H
+#define _GTKMM_BUTTON_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* box.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/bin.h>
+#include <gtkmm/stockid.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkButton GtkButton;
+typedef struct _GtkButtonClass GtkButtonClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class Button_Class; } // namespace Gtk
+namespace Gtk
+{
+
+namespace Stock { struct BuiltinStockID; }
+
+
+/** A widget that creates a signal when clicked on.
+ *
+ * This widget is generally used with a signal handler that is called when the button is pressed.
+ * It can hold any valid child widget. The most commonly used child is the Gtk::Label.
+ *
+ * @ingroup Widgets
+ */
+
+class Button : public Bin
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Button CppObjectType;
+ typedef Button_Class CppClassType;
+ typedef GtkButton BaseObjectType;
+ typedef GtkButtonClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~Button();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class Button_Class;
+ static CppClassType button_class_;
+
+ // noncopyable
+ Button(const Button&);
+ Button& operator=(const Button&);
+
+protected:
+ explicit Button(const Glib::ConstructParams& construct_params);
+ explicit Button(GtkButton* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkButton* gobj() { return reinterpret_cast<GtkButton*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkButton* gobj() const { return reinterpret_cast<GtkButton*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_pressed();
+ virtual void on_released();
+ virtual void on_clicked();
+ virtual void on_enter();
+ virtual void on_leave();
+ virtual void on_activate();
+
+
+private:
+
+public:
+
+ /** Create an empty button.
+ * With an empty button, you can Gtk::Button::add() a widget
+ * such as a Gtk::Pixmap or Gtk::Box.
+ *
+ * If you just wish to add a Gtk::Label,
+ * you may want to
+ * use the Gtk::Button(const Glib::ustring& label) ctor
+ * directly instead.
+ */
+ Button();
+
+
+ /** Simple Push Button with label.
+ * Create a button with the given label inside. You won't be able
+ * to add a widget in this button since it already has a Gtk::Label
+ * in it
+ */
+ explicit Button(const Glib::ustring& label, bool mnemonic = false);
+ explicit Button(const StockID& stock_id);
+
+
+ void pressed();
+
+ void released();
+
+ void clicked();
+
+ void enter();
+
+ void leave();
+
+
+ void set_relief(ReliefStyle newstyle);
+
+ ReliefStyle get_relief() const;
+
+
+ /** Sets the text of the label of the button to @a str . This text is
+ * also used to select the stock item if set_use_stock()
+ * is used.
+ *
+ * This will also clear any previously set labels.
+ * @param label A string.
+ */
+ void set_label(const Glib::ustring& label);
+
+ /** Fetches the text from the label of the button, as set by
+ * set_label(). If the label text has not
+ * been set the return value will be <tt>0</tt>. This will be the
+ * case if you create an empty button with new() to
+ * use as a container.
+ * @return The text of the label widget. This string is owned
+ * by the widget and must not be modified or freed.
+ */
+ Glib::ustring get_label() const;
+
+ /** If true, an underline in the text of the button label indicates
+ * the next character should be used for the mnemonic accelerator key.
+ * @param use_underline <tt>true</tt> if underlines in the text indicate mnemonics.
+ */
+ void set_use_underline(bool use_underline = true);
+
+ /** Returns whether an embedded underline in the button label indicates a
+ * mnemonic. See set_use_underline().
+ * @return <tt>true</tt> if an embedded underline in the button label
+ * indicates the mnemonic accelerator keys.
+ */
+ bool get_use_underline() const;
+
+ /** If true, the label set on the button is used as a
+ * stock id to select the stock item for the button.
+ * @param use_stock <tt>true</tt> if the button should use a stock item.
+ */
+ void set_use_stock(bool use_stock = true);
+
+ /** Returns whether the button label is a stock item.
+ * @return <tt>true</tt> if the button label is used to
+ * select a stock item instead of being
+ * used directly as the label text.
+ */
+ bool get_use_stock() const;
+
+
+ /** Sets whether the button will grab focus when it is clicked with the mouse.
+ * Making mouse clicks not grab focus is useful in places like toolbars where
+ * you don't want the keyboard focus removed from the main area of the
+ * application.
+ *
+ * Since: 2.4
+ * @param focus_on_click Whether the button grabs focus when clicked with the mouse.
+ */
+ void set_focus_on_click(bool focus_on_click = true);
+
+ /** Returns whether the button grabs focus when it is clicked with the mouse.
+ * See set_focus_on_click().
+ * @return <tt>true</tt> if the button grabs focus when it is clicked with
+ * the mouse.
+ *
+ * Since: 2.4.
+ */
+ bool get_focus_on_click() const;
+
+
+ /** Sets the alignment of the child. This property has no effect unless
+ * the child is a Gtk::Misc or a Gtk::Aligment.
+ *
+ * Since: 2.4
+ * @param xalign The horizontal position of the child, 0.0 is left aligned,
+ * 1.0 is right aligned.
+ * @param yalign The vertical position of the child, 0.0 is top aligned,
+ * 1.0 is bottom aligned.
+ */
+ void set_alignment(float xalign, float yalign);
+
+ /** Gets the alignment of the child in the button.
+ *
+ * Since: 2.4
+ * @param xalign Return location for horizontal alignment.
+ * @param yalign Return location for vertical alignment.
+ */
+ void get_alignment(float& xalign, float& yalign);
+
+
+ /** Set the image of @a button to the given widget. Note that
+ * it depends on the show-button-images setting whether the
+ * image will be displayed or not.
+ *
+ * Since: 2.6
+ * @param image A widget to set as the image for the button.
+ */
+ void set_image(Widget& image);
+
+ /** Gets the widget that is currenty set as the image of @a button .
+ * This may have been explicitly set by set_image()
+ * or constructed by new_from_stock().
+ *
+ * Since: 2.6
+ */
+ Widget* get_image();
+
+ /** Gets the widget that is currenty set as the image of @a button .
+ * This may have been explicitly set by set_image()
+ * or constructed by new_from_stock().
+ *
+ * Since: 2.6
+ */
+ const Widget* get_image() const;
+
+
+ Glib::SignalProxy0< void > signal_pressed();
+
+
+ Glib::SignalProxy0< void > signal_released();
+
+
+ Glib::SignalProxy0< void > signal_clicked();
+
+
+ Glib::SignalProxy0< void > signal_enter();
+
+
+ Glib::SignalProxy0< void > signal_leave();
+
+
+ Glib::SignalProxy0< void > signal_activate();
+
+
+ /** Text of the label widget inside the button
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_label() ;
+
+/** Text of the label widget inside the button
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_label() const;
+
+ /** The border relief style.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<ReliefStyle> property_relief() ;
+
+/** The border relief style.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<ReliefStyle> property_relief() const;
+
+ /** If set
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_use_underline() ;
+
+/** If set
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_use_underline() const;
+
+ /** If set
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_use_stock() ;
+
+/** If set
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_use_stock() const;
+
+ /** Whether the button grabs focus when it is clicked with the mouse.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_focus_on_click() ;
+
+/** Whether the button grabs focus when it is clicked with the mouse.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_focus_on_click() const;
+
+ /** Horizontal position of child in available space. 0.0 is left aligned
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<float> property_xalign() ;
+
+/** Horizontal position of child in available space. 0.0 is left aligned
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<float> property_xalign() const;
+
+ /** Vertical position of child in available space. 0.0 is top aligned
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<float> property_yalign() ;
+
+/** Vertical position of child in available space. 0.0 is top aligned
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<float> property_yalign() const;
+
+ /** Child widget to appear next to the button text.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Gtk::Widget*> property_image() ;
+
+/** Child widget to appear next to the button text.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Gtk::Widget*> property_image() const;
+
+
+};
+
+/*! A Gtk::Button example.
+ * Example 1: @link book/buttons/button/buttons.h @endlink
+ * Example 2: @link book/buttons/button/buttons.cc @endlink
+ * Example 3: @link book/buttons/button/main.cc @endlink
+ */
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::Button
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::Button* wrap(GtkButton* object, bool take_copy = false);
+}
+#endif /* _GTKMM_BUTTON_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/buttonbox.cc b/libs/gtkmm2/gtk/gtkmm/buttonbox.cc
new file mode 100644
index 0000000000..7fe9bd53f6
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/buttonbox.cc
@@ -0,0 +1,389 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/buttonbox.h>
+#include <gtkmm/private/buttonbox_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkhbbox.h>
+#include <gtk/gtkvbbox.h>
+
+namespace Gtk
+{
+
+VButtonBox::VButtonBox(ButtonBoxStyle layout, int spacing)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ ButtonBox(Glib::ConstructParams(vbuttonbox_class_.init(), (char*) 0))
+{
+ set_layout(layout);
+ set_spacing(spacing);
+}
+
+HButtonBox::HButtonBox(ButtonBoxStyle layout, int spacing)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ ButtonBox(Glib::ConstructParams(hbuttonbox_class_.init(), (char*) 0))
+{
+ set_layout(layout);
+ set_spacing(spacing);
+}
+
+} // namespace Gtk
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::ButtonBox* wrap(GtkButtonBox* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::ButtonBox *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& ButtonBox_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &ButtonBox_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_button_box_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void ButtonBox_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* ButtonBox_Class::wrap_new(GObject* o)
+{
+ return manage(new ButtonBox((GtkButtonBox*)(o)));
+
+}
+
+
+/* The implementation: */
+
+ButtonBox::ButtonBox(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Box(construct_params)
+{
+ }
+
+ButtonBox::ButtonBox(GtkButtonBox* castitem)
+:
+ Gtk::Box((GtkBox*)(castitem))
+{
+ }
+
+ButtonBox::~ButtonBox()
+{
+ destroy_();
+}
+
+ButtonBox::CppClassType ButtonBox::buttonbox_class_; // initialize static member
+
+GType ButtonBox::get_type()
+{
+ return buttonbox_class_.init().get_type();
+}
+
+GType ButtonBox::get_base_type()
+{
+ return gtk_button_box_get_type();
+}
+
+
+ButtonBoxStyle ButtonBox::get_layout() const
+{
+ return ((ButtonBoxStyle)(gtk_button_box_get_layout(const_cast<GtkButtonBox*>(gobj()))));
+}
+
+void ButtonBox::set_layout(ButtonBoxStyle layout_style)
+{
+ gtk_button_box_set_layout(gobj(), ((GtkButtonBoxStyle)(layout_style)));
+}
+
+void ButtonBox::set_child_secondary(Widget& child, bool is_secondary)
+{
+ gtk_button_box_set_child_secondary(gobj(), (child).gobj(), static_cast<int>(is_secondary));
+}
+
+bool ButtonBox::get_child_secondary(const Gtk::Widget& child) const
+{
+ return gtk_button_box_get_child_secondary(const_cast<GtkButtonBox*>(gobj()), const_cast<GtkWidget*>(child.gobj()));
+}
+
+int ButtonBox::get_child_min_width() const
+{
+ return gobj()->child_min_width;
+}
+
+void ButtonBox::set_child_min_width(const int& value)
+{
+ gobj()->child_min_width = value;
+}
+
+int ButtonBox::get_child_min_height() const
+{
+ return gobj()->child_min_height;
+}
+
+void ButtonBox::set_child_min_height(const int& value)
+{
+ gobj()->child_min_height = value;
+}
+
+int ButtonBox::get_child_ipadding_x() const
+{
+ return gobj()->child_ipad_x;
+}
+
+void ButtonBox::set_child_ipadding_x(const int& value)
+{
+ gobj()->child_ipad_x = value;
+}
+
+int ButtonBox::get_child_ipadding_y() const
+{
+ return gobj()->child_ipad_y;
+}
+
+void ButtonBox::set_child_ipadding_y(const int& value)
+{
+ gobj()->child_ipad_y = value;
+}
+
+
+Glib::PropertyProxy<ButtonBoxStyle> ButtonBox::property_layout_style()
+{
+ return Glib::PropertyProxy<ButtonBoxStyle>(this, "layout-style");
+}
+
+Glib::PropertyProxy_ReadOnly<ButtonBoxStyle> ButtonBox::property_layout_style() const
+{
+ return Glib::PropertyProxy_ReadOnly<ButtonBoxStyle>(this, "layout-style");
+}
+
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+
+Gtk::VButtonBox* wrap(GtkVButtonBox* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::VButtonBox *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& VButtonBox_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &VButtonBox_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_vbutton_box_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void VButtonBox_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* VButtonBox_Class::wrap_new(GObject* o)
+{
+ return manage(new VButtonBox((GtkVButtonBox*)(o)));
+
+}
+
+
+/* The implementation: */
+
+VButtonBox::VButtonBox(const Glib::ConstructParams& construct_params)
+:
+ Gtk::ButtonBox(construct_params)
+{
+ }
+
+VButtonBox::VButtonBox(GtkVButtonBox* castitem)
+:
+ Gtk::ButtonBox((GtkButtonBox*)(castitem))
+{
+ }
+
+VButtonBox::~VButtonBox()
+{
+ destroy_();
+}
+
+VButtonBox::CppClassType VButtonBox::vbuttonbox_class_; // initialize static member
+
+GType VButtonBox::get_type()
+{
+ return vbuttonbox_class_.init().get_type();
+}
+
+GType VButtonBox::get_base_type()
+{
+ return gtk_vbutton_box_get_type();
+}
+
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+
+Gtk::HButtonBox* wrap(GtkHButtonBox* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::HButtonBox *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& HButtonBox_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &HButtonBox_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_hbutton_box_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void HButtonBox_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* HButtonBox_Class::wrap_new(GObject* o)
+{
+ return manage(new HButtonBox((GtkHButtonBox*)(o)));
+
+}
+
+
+/* The implementation: */
+
+HButtonBox::HButtonBox(const Glib::ConstructParams& construct_params)
+:
+ Gtk::ButtonBox(construct_params)
+{
+ }
+
+HButtonBox::HButtonBox(GtkHButtonBox* castitem)
+:
+ Gtk::ButtonBox((GtkButtonBox*)(castitem))
+{
+ }
+
+HButtonBox::~HButtonBox()
+{
+ destroy_();
+}
+
+HButtonBox::CppClassType HButtonBox::hbuttonbox_class_; // initialize static member
+
+GType HButtonBox::get_type()
+{
+ return hbuttonbox_class_.init().get_type();
+}
+
+GType HButtonBox::get_base_type()
+{
+ return gtk_hbutton_box_get_type();
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/buttonbox.h b/libs/gtkmm2/gtk/gtkmm/buttonbox.h
new file mode 100644
index 0000000000..6f39c6aed9
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/buttonbox.h
@@ -0,0 +1,361 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_BUTTONBOX_H
+#define _GTKMM_BUTTONBOX_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* buttonbox.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/box.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkButtonBox GtkButtonBox;
+typedef struct _GtkButtonBoxClass GtkButtonBoxClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class ButtonBox_Class; } // namespace Gtk
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkVButtonBox GtkVButtonBox;
+typedef struct _GtkVButtonBoxClass GtkVButtonBoxClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class VButtonBox_Class; } // namespace Gtk
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkHButtonBox GtkHButtonBox;
+typedef struct _GtkHButtonBoxClass GtkHButtonBoxClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class HButtonBox_Class; } // namespace Gtk
+namespace Gtk
+{
+
+// This is a #define in GTK+, and unrelated to the GtkButtonBoxStyle enum.
+/** @ingroup gtkmmEnums */
+enum { BUTTONBOX_DEFAULT = -1 };
+
+
+/** Base class for Gtk::HButtonBox and Gtk::VButtonBox
+ *
+ * A button box should be used to provide a consistent layout of buttons
+ * throughout your application. There is one default layout and a default
+ * spacing value that are persistant across all ButtonBox widgets.
+ */
+
+class ButtonBox : public Box
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef ButtonBox CppObjectType;
+ typedef ButtonBox_Class CppClassType;
+ typedef GtkButtonBox BaseObjectType;
+ typedef GtkButtonBoxClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~ButtonBox();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class ButtonBox_Class;
+ static CppClassType buttonbox_class_;
+
+ // noncopyable
+ ButtonBox(const ButtonBox&);
+ ButtonBox& operator=(const ButtonBox&);
+
+protected:
+ explicit ButtonBox(const Glib::ConstructParams& construct_params);
+ explicit ButtonBox(GtkButtonBox* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkButtonBox* gobj() { return reinterpret_cast<GtkButtonBox*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkButtonBox* gobj() const { return reinterpret_cast<GtkButtonBox*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+
+public:
+
+ ButtonBoxStyle get_layout() const;
+
+ void set_layout(ButtonBoxStyle layout_style);
+
+
+ /** Sets whether @a child should appear in a secondary group of children.
+ * A typical use of a secondary child is the help button in a dialog.
+ *
+ * This group appears after the other children if the style
+ * is Gtk::BUTTONBOX_START, Gtk::BUTTONBOX_SPREAD or
+ * Gtk::BUTTONBOX_EDGE, and before the the other children if the style
+ * is Gtk::BUTTONBOX_END. For horizontal button boxes, the definition
+ * of before/after depends on direction of the widget (see
+ * Gtk::Widget::set_direction()). If the style is Gtk::BUTTONBOX_START
+ * or Gtk::BUTTONBOX_END, then the secondary children are aligned at
+ * the other end of the button box from the main children. For the
+ * other styles, they appear immediately next to the main children.
+ * @param child A child of @a widget .
+ * @param is_secondary If <tt>true</tt>, the @a child appears in a secondary group of the
+ * button box.
+ */
+ void set_child_secondary(Widget& child, bool is_secondary = true);
+
+ /** Returns whether @a child should appear in a secondary group of children.
+ * @param child A child of @a widget .
+ * @return Whether @a child should appear in a secondary group of children.
+ *
+ * Since: 2.4.
+ */
+ bool get_child_secondary(const Gtk::Widget& child) const;
+
+ int get_child_min_width() const;
+ void set_child_min_width(const int& value);
+
+ int get_child_min_height() const;
+ void set_child_min_height(const int& value);
+
+ int get_child_ipadding_x() const;
+ void set_child_ipadding_x(const int& value);
+
+ int get_child_ipadding_y() const;
+ void set_child_ipadding_y(const int& value);
+
+ /** How to layout the buttons in the box. Possible values are default
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<ButtonBoxStyle> property_layout_style() ;
+
+/** How to layout the buttons in the box. Possible values are default
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<ButtonBoxStyle> property_layout_style() const;
+
+
+};
+
+/** A container for arranging buttons vertically.
+ *
+ * A button box should be used to provide a consistent layout of buttons
+ * throughout your application. There is one default layout and a default spacing
+ * value that are persistant across all Gtk::VButtonBox widgets.
+ *
+ * The layout/spacing can then be altered by the programmer, or if desired,
+ * by the user to alter the 'feel' of a program to a small degree.
+ *
+ * @ingroup Widgets
+ * @ingroup Containers
+ */
+
+class VButtonBox : public ButtonBox
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef VButtonBox CppObjectType;
+ typedef VButtonBox_Class CppClassType;
+ typedef GtkVButtonBox BaseObjectType;
+ typedef GtkVButtonBoxClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~VButtonBox();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class VButtonBox_Class;
+ static CppClassType vbuttonbox_class_;
+
+ // noncopyable
+ VButtonBox(const VButtonBox&);
+ VButtonBox& operator=(const VButtonBox&);
+
+protected:
+ explicit VButtonBox(const Glib::ConstructParams& construct_params);
+ explicit VButtonBox(GtkVButtonBox* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkVButtonBox* gobj() { return reinterpret_cast<GtkVButtonBox*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkVButtonBox* gobj() const { return reinterpret_cast<GtkVButtonBox*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+public:
+ explicit VButtonBox(ButtonBoxStyle layout = BUTTONBOX_DEFAULT_STYLE, int spacing = BUTTONBOX_DEFAULT);
+
+
+};
+
+/** A container for arranging buttons horizontally.
+ *
+ * A button box should be used to provide a consistent layout of buttons
+ * throughout your application. There is one default layout and a default spacing
+ * value that are persistant across all Gtk::HButtonBox widgets.
+ *
+ * The layout/spacing can then be altered by the programmer, or if desired,
+ * by the user to alter the 'feel' of a program to a small degree.
+ *
+ * @ingroup Widgets
+ * @ingroup Containers
+ */
+
+class HButtonBox : public ButtonBox
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef HButtonBox CppObjectType;
+ typedef HButtonBox_Class CppClassType;
+ typedef GtkHButtonBox BaseObjectType;
+ typedef GtkHButtonBoxClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~HButtonBox();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class HButtonBox_Class;
+ static CppClassType hbuttonbox_class_;
+
+ // noncopyable
+ HButtonBox(const HButtonBox&);
+ HButtonBox& operator=(const HButtonBox&);
+
+protected:
+ explicit HButtonBox(const Glib::ConstructParams& construct_params);
+ explicit HButtonBox(GtkHButtonBox* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkHButtonBox* gobj() { return reinterpret_cast<GtkHButtonBox*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkHButtonBox* gobj() const { return reinterpret_cast<GtkHButtonBox*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+public:
+ explicit HButtonBox(ButtonBoxStyle layout = BUTTONBOX_DEFAULT_STYLE, int spacing = BUTTONBOX_DEFAULT);
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::ButtonBox
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::ButtonBox* wrap(GtkButtonBox* object, bool take_copy = false);
+}
+namespace Glib
+{
+ /** @relates Gtk::VButtonBox
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::VButtonBox* wrap(GtkVButtonBox* object, bool take_copy = false);
+}
+namespace Glib
+{
+ /** @relates Gtk::HButtonBox
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::HButtonBox* wrap(GtkHButtonBox* object, bool take_copy = false);
+}
+#endif /* _GTKMM_BUTTONBOX_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/calendar.cc b/libs/gtkmm2/gtk/gtkmm/calendar.cc
new file mode 100644
index 0000000000..66add813c7
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/calendar.cc
@@ -0,0 +1,605 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/calendar.h>
+#include <gtkmm/private/calendar_p.h>
+
+#include <gtk/gtktypebuiltins.h>
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkcalendar.h>
+
+namespace Gtk
+{
+
+}
+
+
+namespace
+{
+
+const Glib::SignalProxyInfo Calendar_signal_month_changed_info =
+{
+ "month_changed",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+
+const Glib::SignalProxyInfo Calendar_signal_day_selected_info =
+{
+ "day_selected",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+
+const Glib::SignalProxyInfo Calendar_signal_day_selected_double_click_info =
+{
+ "day_selected_double_click",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+
+const Glib::SignalProxyInfo Calendar_signal_prev_month_info =
+{
+ "prev_month",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+
+const Glib::SignalProxyInfo Calendar_signal_next_month_info =
+{
+ "next_month",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+
+const Glib::SignalProxyInfo Calendar_signal_prev_year_info =
+{
+ "prev_year",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+
+const Glib::SignalProxyInfo Calendar_signal_next_year_info =
+{
+ "next_year",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+} // anonymous namespace
+
+// static
+GType Glib::Value<Gtk::CalendarDisplayOptions>::value_type()
+{
+ return gtk_calendar_display_options_get_type();
+}
+
+
+namespace Glib
+{
+
+Gtk::Calendar* wrap(GtkCalendar* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::Calendar *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Calendar_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Calendar_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_calendar_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Calendar_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->month_changed = &month_changed_callback;
+ klass->day_selected = &day_selected_callback;
+ klass->day_selected_double_click = &day_selected_double_click_callback;
+ klass->prev_month = &prev_month_callback;
+ klass->next_month = &next_month_callback;
+ klass->prev_year = &prev_year_callback;
+ klass->next_year = &next_year_callback;
+}
+
+
+void Calendar_Class::month_changed_callback(GtkCalendar* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_month_changed();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->month_changed)
+ (*base->month_changed)(self);
+ }
+}
+
+void Calendar_Class::day_selected_callback(GtkCalendar* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_day_selected();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->day_selected)
+ (*base->day_selected)(self);
+ }
+}
+
+void Calendar_Class::day_selected_double_click_callback(GtkCalendar* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_day_selected_double_click();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->day_selected_double_click)
+ (*base->day_selected_double_click)(self);
+ }
+}
+
+void Calendar_Class::prev_month_callback(GtkCalendar* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_prev_month();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->prev_month)
+ (*base->prev_month)(self);
+ }
+}
+
+void Calendar_Class::next_month_callback(GtkCalendar* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_next_month();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->next_month)
+ (*base->next_month)(self);
+ }
+}
+
+void Calendar_Class::prev_year_callback(GtkCalendar* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_prev_year();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->prev_year)
+ (*base->prev_year)(self);
+ }
+}
+
+void Calendar_Class::next_year_callback(GtkCalendar* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_next_year();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->next_year)
+ (*base->next_year)(self);
+ }
+}
+
+
+Glib::ObjectBase* Calendar_Class::wrap_new(GObject* o)
+{
+ return manage(new Calendar((GtkCalendar*)(o)));
+
+}
+
+
+/* The implementation: */
+
+Calendar::Calendar(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Widget(construct_params)
+{
+ }
+
+Calendar::Calendar(GtkCalendar* castitem)
+:
+ Gtk::Widget((GtkWidget*)(castitem))
+{
+ }
+
+Calendar::~Calendar()
+{
+ destroy_();
+}
+
+Calendar::CppClassType Calendar::calendar_class_; // initialize static member
+
+GType Calendar::get_type()
+{
+ return calendar_class_.init().get_type();
+}
+
+GType Calendar::get_base_type()
+{
+ return gtk_calendar_get_type();
+}
+
+
+Calendar::Calendar()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Widget(Glib::ConstructParams(calendar_class_.init()))
+{
+ }
+
+int Calendar::select_month(guint month, guint year)
+{
+ return gtk_calendar_select_month(gobj(), month, year);
+}
+
+void Calendar::select_day(guint day)
+{
+ gtk_calendar_select_day(gobj(), day);
+}
+
+int Calendar::mark_day(guint day)
+{
+ return gtk_calendar_mark_day(gobj(), day);
+}
+
+int Calendar::unmark_day(guint day)
+{
+ return gtk_calendar_unmark_day(gobj(), day);
+}
+
+void Calendar::clear_marks()
+{
+ gtk_calendar_clear_marks(gobj());
+}
+
+void Calendar::display_options(CalendarDisplayOptions flags)
+{
+ gtk_calendar_display_options(gobj(), ((GtkCalendarDisplayOptions)(flags)));
+}
+
+void Calendar::set_display_options(CalendarDisplayOptions flags)
+{
+ gtk_calendar_set_display_options(gobj(), ((GtkCalendarDisplayOptions)(flags)));
+}
+
+CalendarDisplayOptions Calendar::get_display_options() const
+{
+ return ((CalendarDisplayOptions)(gtk_calendar_get_display_options(const_cast<GtkCalendar*>(gobj()))));
+}
+
+void Calendar::get_date(guint& year, guint& month, guint& day) const
+{
+ gtk_calendar_get_date(const_cast<GtkCalendar*>(gobj()), &(year), &(month), &(day));
+}
+
+void Calendar::freeze()
+{
+ gtk_calendar_freeze(gobj());
+}
+
+void Calendar::thaw()
+{
+ gtk_calendar_thaw(gobj());
+}
+
+
+Glib::SignalProxy0< void > Calendar::signal_month_changed()
+{
+ return Glib::SignalProxy0< void >(this, &Calendar_signal_month_changed_info);
+}
+
+Glib::SignalProxy0< void > Calendar::signal_day_selected()
+{
+ return Glib::SignalProxy0< void >(this, &Calendar_signal_day_selected_info);
+}
+
+Glib::SignalProxy0< void > Calendar::signal_day_selected_double_click()
+{
+ return Glib::SignalProxy0< void >(this, &Calendar_signal_day_selected_double_click_info);
+}
+
+Glib::SignalProxy0< void > Calendar::signal_prev_month()
+{
+ return Glib::SignalProxy0< void >(this, &Calendar_signal_prev_month_info);
+}
+
+Glib::SignalProxy0< void > Calendar::signal_next_month()
+{
+ return Glib::SignalProxy0< void >(this, &Calendar_signal_next_month_info);
+}
+
+Glib::SignalProxy0< void > Calendar::signal_prev_year()
+{
+ return Glib::SignalProxy0< void >(this, &Calendar_signal_prev_year_info);
+}
+
+Glib::SignalProxy0< void > Calendar::signal_next_year()
+{
+ return Glib::SignalProxy0< void >(this, &Calendar_signal_next_year_info);
+}
+
+
+void Gtk::Calendar::on_month_changed()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->month_changed)
+ (*base->month_changed)(gobj());
+}
+
+void Gtk::Calendar::on_day_selected()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->day_selected)
+ (*base->day_selected)(gobj());
+}
+
+void Gtk::Calendar::on_day_selected_double_click()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->day_selected_double_click)
+ (*base->day_selected_double_click)(gobj());
+}
+
+void Gtk::Calendar::on_prev_month()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->prev_month)
+ (*base->prev_month)(gobj());
+}
+
+void Gtk::Calendar::on_next_month()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->next_month)
+ (*base->next_month)(gobj());
+}
+
+void Gtk::Calendar::on_prev_year()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->prev_year)
+ (*base->prev_year)(gobj());
+}
+
+void Gtk::Calendar::on_next_year()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->next_year)
+ (*base->next_year)(gobj());
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/calendar.h b/libs/gtkmm2/gtk/gtkmm/calendar.h
new file mode 100644
index 0000000000..a026c941e6
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/calendar.h
@@ -0,0 +1,273 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_CALENDAR_H
+#define _GTKMM_CALENDAR_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* calendar.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/widget.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkCalendar GtkCalendar;
+typedef struct _GtkCalendarClass GtkCalendarClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class Calendar_Class; } // namespace Gtk
+namespace Gtk
+{
+
+
+/** @addtogroup gtkmmEnums Enums and Flags */
+
+/**
+ * @ingroup gtkmmEnums
+ * @par Bitwise operators:
+ * <tt>%CalendarDisplayOptions operator|(CalendarDisplayOptions, CalendarDisplayOptions)</tt><br>
+ * <tt>%CalendarDisplayOptions operator&(CalendarDisplayOptions, CalendarDisplayOptions)</tt><br>
+ * <tt>%CalendarDisplayOptions operator^(CalendarDisplayOptions, CalendarDisplayOptions)</tt><br>
+ * <tt>%CalendarDisplayOptions operator~(CalendarDisplayOptions)</tt><br>
+ * <tt>%CalendarDisplayOptions& operator|=(CalendarDisplayOptions&, CalendarDisplayOptions)</tt><br>
+ * <tt>%CalendarDisplayOptions& operator&=(CalendarDisplayOptions&, CalendarDisplayOptions)</tt><br>
+ * <tt>%CalendarDisplayOptions& operator^=(CalendarDisplayOptions&, CalendarDisplayOptions)</tt><br>
+ */
+enum CalendarDisplayOptions
+{
+ CALENDAR_SHOW_HEADING = 1 << 0,
+ CALENDAR_SHOW_DAY_NAMES = 1 << 1,
+ CALENDAR_NO_MONTH_CHANGE = 1 << 2,
+ CALENDAR_SHOW_WEEK_NUMBERS = 1 << 3,
+ CALENDAR_WEEK_START_MONDAY = 1 << 4
+};
+
+/** @ingroup gtkmmEnums */
+inline CalendarDisplayOptions operator|(CalendarDisplayOptions lhs, CalendarDisplayOptions rhs)
+ { return static_cast<CalendarDisplayOptions>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
+
+/** @ingroup gtkmmEnums */
+inline CalendarDisplayOptions operator&(CalendarDisplayOptions lhs, CalendarDisplayOptions rhs)
+ { return static_cast<CalendarDisplayOptions>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
+
+/** @ingroup gtkmmEnums */
+inline CalendarDisplayOptions operator^(CalendarDisplayOptions lhs, CalendarDisplayOptions rhs)
+ { return static_cast<CalendarDisplayOptions>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
+
+/** @ingroup gtkmmEnums */
+inline CalendarDisplayOptions operator~(CalendarDisplayOptions flags)
+ { return static_cast<CalendarDisplayOptions>(~static_cast<unsigned>(flags)); }
+
+/** @ingroup gtkmmEnums */
+inline CalendarDisplayOptions& operator|=(CalendarDisplayOptions& lhs, CalendarDisplayOptions rhs)
+ { return (lhs = static_cast<CalendarDisplayOptions>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
+
+/** @ingroup gtkmmEnums */
+inline CalendarDisplayOptions& operator&=(CalendarDisplayOptions& lhs, CalendarDisplayOptions rhs)
+ { return (lhs = static_cast<CalendarDisplayOptions>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
+
+/** @ingroup gtkmmEnums */
+inline CalendarDisplayOptions& operator^=(CalendarDisplayOptions& lhs, CalendarDisplayOptions rhs)
+ { return (lhs = static_cast<CalendarDisplayOptions>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::CalendarDisplayOptions> : public Glib::Value_Flags<Gtk::CalendarDisplayOptions>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+
+/** Display a calendar and/or allow the user to select a date.
+ *
+ * This is a widget that displays a calendar, one month at a time.
+ *
+ * The month and year currently displayed can be altered with
+ * select_month(). The exact day can be selected from the displayed month
+ * using select_day().
+ *
+ * The way in which the calendar itself is displayed can be altered using
+ * set_display_options().
+ *
+ * The selected date can be retrieved from a GtkCalendar using get_date().
+ *
+ * If performing many 'mark' operations, the calendar can be frozen to
+ * prevent flicker, using freeze(), and 'thawed' again using thaw().
+ *
+ * @ingroup Widgets
+ */
+
+class Calendar : public Widget
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Calendar CppObjectType;
+ typedef Calendar_Class CppClassType;
+ typedef GtkCalendar BaseObjectType;
+ typedef GtkCalendarClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~Calendar();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class Calendar_Class;
+ static CppClassType calendar_class_;
+
+ // noncopyable
+ Calendar(const Calendar&);
+ Calendar& operator=(const Calendar&);
+
+protected:
+ explicit Calendar(const Glib::ConstructParams& construct_params);
+ explicit Calendar(GtkCalendar* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkCalendar* gobj() { return reinterpret_cast<GtkCalendar*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkCalendar* gobj() const { return reinterpret_cast<GtkCalendar*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_month_changed();
+ virtual void on_day_selected();
+ virtual void on_day_selected_double_click();
+ virtual void on_prev_month();
+ virtual void on_next_month();
+ virtual void on_prev_year();
+ virtual void on_next_year();
+
+
+private:
+
+public:
+ Calendar();
+
+
+ int select_month(guint month, guint year);
+
+ void select_day(guint day);
+
+ int mark_day(guint day);
+
+ int unmark_day(guint day);
+
+ void clear_marks();
+
+ #ifndef GTKMM_DISABLE_DEPRECATED
+
+ void display_options(CalendarDisplayOptions flags);
+ #endif //GTKMM_DISABLE_DEPRECATED
+
+
+ /** Sets display options (whether to display the heading and the month
+ * headings).
+ *
+ * Since: 2.4
+ * @param flags The display options to set.
+ */
+ void set_display_options(CalendarDisplayOptions flags);
+
+ /** Returns the current display options of @a calendar .
+ * @return The display options.
+ *
+ * Since: 2.4.
+ */
+ CalendarDisplayOptions get_display_options() const;
+
+
+ void get_date(guint& year, guint& month, guint& day) const;
+
+ void freeze();
+
+ void thaw();
+
+
+ Glib::SignalProxy0< void > signal_month_changed();
+
+
+ Glib::SignalProxy0< void > signal_day_selected();
+
+
+ Glib::SignalProxy0< void > signal_day_selected_double_click();
+
+
+ Glib::SignalProxy0< void > signal_prev_month();
+
+
+ Glib::SignalProxy0< void > signal_next_month();
+
+
+ Glib::SignalProxy0< void > signal_prev_year();
+
+
+ Glib::SignalProxy0< void > signal_next_year();
+
+
+};
+
+} /* namespace Gtk */
+
+
+namespace Glib
+{
+ /** @relates Gtk::Calendar
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::Calendar* wrap(GtkCalendar* object, bool take_copy = false);
+}
+#endif /* _GTKMM_CALENDAR_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/celleditable.cc b/libs/gtkmm2/gtk/gtkmm/celleditable.cc
new file mode 100644
index 0000000000..2f0d2a5b1b
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/celleditable.cc
@@ -0,0 +1,307 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/celleditable.h>
+#include <gtkmm/private/celleditable_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkcelleditable.h>
+
+
+namespace
+{
+
+const Glib::SignalProxyInfo CellEditable_signal_editing_done_info =
+{
+ "editing_done",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+
+const Glib::SignalProxyInfo CellEditable_signal_remove_widget_info =
+{
+ "remove_widget",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Gtk::CellEditable> wrap(GtkCellEditable* object, bool take_copy)
+{
+ return Glib::RefPtr<Gtk::CellEditable>( dynamic_cast<Gtk::CellEditable*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} // namespace Glib
+
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Interface_Class& CellEditable_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Interface_Class has to know the interface init function
+ // in order to add interfaces to implementing types.
+ class_init_func_ = &CellEditable_Class::iface_init_function;
+
+ // We can not derive from another interface, and it is not necessary anyway.
+ gtype_ = gtk_cell_editable_get_type();
+ }
+
+ return *this;
+}
+
+void CellEditable_Class::iface_init_function(void* g_iface, void*)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_iface);
+
+ //This is just to avoid an "unused variable" warning when there are no vfuncs or signal handlers to connect.
+ //This is a temporary fix until I find out why I can not seem to derive a GtkFileChooser interface. murrayc
+ g_assert(klass != 0);
+
+ klass->start_editing = &start_editing_vfunc_callback;
+ klass->editing_done = &editing_done_callback;
+ klass->remove_widget = &remove_widget_callback;
+}
+
+void CellEditable_Class::start_editing_vfunc_callback(GtkCellEditable* self, GdkEvent* event)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->start_editing_vfunc(event);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->start_editing)
+ (*base->start_editing)(self, event);
+ }
+}
+
+
+void CellEditable_Class::editing_done_callback(GtkCellEditable* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_editing_done();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->editing_done)
+ (*base->editing_done)(self);
+ }
+}
+
+void CellEditable_Class::remove_widget_callback(GtkCellEditable* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_remove_widget();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->remove_widget)
+ (*base->remove_widget)(self);
+ }
+}
+
+
+Glib::ObjectBase* CellEditable_Class::wrap_new(GObject* object)
+{
+ return new CellEditable((GtkCellEditable*)(object));
+}
+
+
+/* The implementation: */
+
+CellEditable::CellEditable()
+:
+ Glib::Interface(celleditable_class_.init())
+{}
+
+CellEditable::CellEditable(GtkCellEditable* castitem)
+:
+ Glib::Interface((GObject*)(castitem))
+{}
+
+CellEditable::~CellEditable()
+{}
+
+// static
+void CellEditable::add_interface(GType gtype_implementer)
+{
+ celleditable_class_.init().add_interface(gtype_implementer);
+}
+
+CellEditable::CppClassType CellEditable::celleditable_class_; // initialize static member
+
+GType CellEditable::get_type()
+{
+ return celleditable_class_.init().get_type();
+}
+
+GType CellEditable::get_base_type()
+{
+ return gtk_cell_editable_get_type();
+}
+
+
+void CellEditable::start_editing(GdkEvent* event)
+{
+ gtk_cell_editable_start_editing(gobj(), event);
+}
+
+void CellEditable::editing_done()
+{
+ gtk_cell_editable_editing_done(gobj());
+}
+
+void CellEditable::remove_widget()
+{
+ gtk_cell_editable_remove_widget(gobj());
+}
+
+
+Glib::SignalProxy0< void > CellEditable::signal_editing_done()
+{
+ return Glib::SignalProxy0< void >(this, &CellEditable_signal_editing_done_info);
+}
+
+Glib::SignalProxy0< void > CellEditable::signal_remove_widget()
+{
+ return Glib::SignalProxy0< void >(this, &CellEditable_signal_remove_widget_info);
+}
+
+
+void Gtk::CellEditable::on_editing_done()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->editing_done)
+ (*base->editing_done)(gobj());
+}
+
+void Gtk::CellEditable::on_remove_widget()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->remove_widget)
+ (*base->remove_widget)(gobj());
+}
+
+
+void Gtk::CellEditable::start_editing_vfunc(GdkEvent* event)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->start_editing)
+ (*base->start_editing)(gobj(),event);
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/celleditable.h b/libs/gtkmm2/gtk/gtkmm/celleditable.h
new file mode 100644
index 0000000000..8d2bfdd6c5
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/celleditable.h
@@ -0,0 +1,158 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_CELLEDITABLE_H
+#define _GTKMM_CELLEDITABLE_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/interface.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C"
+{
+typedef struct _GtkCellEditableIface GtkCellEditableIface;
+typedef union _GdkEvent GdkEvent;
+}
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkCellEditable GtkCellEditable;
+typedef struct _GtkCellEditableClass GtkCellEditableClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class CellEditable_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** Interface for widgets which are used for editing cells.
+ * The CellEditable interface must be implemented for widgets to be usable when editing the contents of a TreeView cell.
+ */
+
+class CellEditable : public Glib::Interface
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef CellEditable CppObjectType;
+ typedef CellEditable_Class CppClassType;
+ typedef GtkCellEditable BaseObjectType;
+ typedef GtkCellEditableIface BaseClassType;
+
+private:
+ friend class CellEditable_Class;
+ static CppClassType celleditable_class_;
+
+ // noncopyable
+ CellEditable(const CellEditable&);
+ CellEditable& operator=(const CellEditable&);
+
+protected:
+ CellEditable(); // you must derive from this class
+ explicit CellEditable(GtkCellEditable* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~CellEditable();
+
+ static void add_interface(GType gtype_implementer);
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ GtkCellEditable* gobj() { return reinterpret_cast<GtkCellEditable*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const GtkCellEditable* gobj() const { return reinterpret_cast<GtkCellEditable*>(gobject_); }
+
+private:
+
+
+public:
+
+ /** Begins editing on a @a cell_editable . @a event is the Gdk::Event that began the
+ * editing process. It may be <tt>0</tt>, in the instance that editing was initiated
+ * through programatic means.
+ * @param event A Gdk::Event, or <tt>0</tt>.
+ */
+ void start_editing(GdkEvent* event);
+
+ /** Emits the "editing_done" signal. This signal is a sign for the cell renderer
+ * to update its value from the cell.
+ */
+ void editing_done();
+
+ /** Emits the "remove_widget" signal. This signal is meant to indicate that the
+ * cell is finished editing, and the widget may now be destroyed.
+ */
+ void remove_widget();
+
+
+ Glib::SignalProxy0< void > signal_editing_done();
+
+
+ Glib::SignalProxy0< void > signal_remove_widget();
+
+
+protected:
+ virtual void start_editing_vfunc(GdkEvent* event);
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_editing_done();
+ virtual void on_remove_widget();
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::CellEditable
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Gtk::CellEditable> wrap(GtkCellEditable* object, bool take_copy = false);
+
+} // namespace Glib
+
+#endif /* _GTKMM_CELLEDITABLE_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/celllayout.cc b/libs/gtkmm2/gtk/gtkmm/celllayout.cc
new file mode 100644
index 0000000000..474dea3e5b
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/celllayout.cc
@@ -0,0 +1,519 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/celllayout.h>
+#include <gtkmm/private/celllayout_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 2003 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkcelllayout.h>
+
+
+namespace //anonymous
+{
+
+// This Signal Proxy allows the C++ coder to specify
+// a sigc::slot instead of a static function.
+class SignalProxy_CellData
+{
+public:
+ typedef Gtk::CellLayout::SlotCellData SlotType;
+
+ SignalProxy_CellData(const SlotType& slot)
+ : slot_(slot) {}
+
+ ~SignalProxy_CellData();
+
+ static void gtk_callback(GtkCellLayout* cell_layout, GtkCellRenderer* cell, GtkTreeModel* tree_model, GtkTreeIter* iter, gpointer data);
+ static void gtk_callback_destroy(void* data);
+
+private:
+ SlotType slot_;
+};
+
+SignalProxy_CellData::~SignalProxy_CellData()
+{}
+
+void SignalProxy_CellData::gtk_callback(GtkCellLayout* /* cell_layout */, GtkCellRenderer* /* cell */, GtkTreeModel* tree_model, GtkTreeIter* iter, gpointer data)
+{
+ SignalProxy_CellData *const self = static_cast<SignalProxy_CellData*>(data);
+
+ try
+ {
+ //We ignore the cell, because that was given as an argument to the connecting method, so the caller should know which one it is already.
+ //And we ignore the tree_model because that can be obtained from the iter or from the CellLayout itself.
+ (self->slot_)(Gtk::TreeModel::const_iterator(tree_model, iter));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+
+}
+
+void SignalProxy_CellData::gtk_callback_destroy(void* data)
+{
+ delete static_cast<SignalProxy_CellData*>(data);
+}
+
+} // anonymous namespace
+
+
+namespace Gtk
+{
+
+void CellLayout::add_attribute(const Glib::PropertyProxy_Base& property, const TreeModelColumnBase& column)
+{
+ gtk_cell_layout_add_attribute(gobj(),
+ (GtkCellRenderer*) property.get_object()->gobj(), property.get_name(), column.index());
+}
+
+void CellLayout::set_cell_data_func(CellRenderer& cell, const SlotCellData& slot)
+{
+ // Create a signal proxy. A pointer to this will be passed
+ // through the callback's data parameter. It will be deleted
+ // when SignalProxy_CellData::gtk_callback_destroy() is called.
+ SignalProxy_CellData *const pSignalProxy = new SignalProxy_CellData(slot);
+
+ gtk_cell_layout_set_cell_data_func(gobj(), cell.gobj(),
+ &SignalProxy_CellData::gtk_callback, pSignalProxy,
+ &SignalProxy_CellData::gtk_callback_destroy);
+}
+
+
+} //namespace Gtk
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Gtk::CellLayout> wrap(GtkCellLayout* object, bool take_copy)
+{
+ return Glib::RefPtr<Gtk::CellLayout>( dynamic_cast<Gtk::CellLayout*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} // namespace Glib
+
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Interface_Class& CellLayout_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Interface_Class has to know the interface init function
+ // in order to add interfaces to implementing types.
+ class_init_func_ = &CellLayout_Class::iface_init_function;
+
+ // We can not derive from another interface, and it is not necessary anyway.
+ gtype_ = gtk_cell_layout_get_type();
+ }
+
+ return *this;
+}
+
+void CellLayout_Class::iface_init_function(void* g_iface, void*)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_iface);
+
+ //This is just to avoid an "unused variable" warning when there are no vfuncs or signal handlers to connect.
+ //This is a temporary fix until I find out why I can not seem to derive a GtkFileChooser interface. murrayc
+ g_assert(klass != 0);
+
+ klass->pack_start = &pack_start_vfunc_callback;
+ klass->pack_end = &pack_end_vfunc_callback;
+ klass->clear = &clear_vfunc_callback;
+ klass->add_attribute = &add_attribute_vfunc_callback;
+ klass->clear_attributes = &clear_attributes_vfunc_callback;
+ klass->reorder = &reorder_vfunc_callback;
+}
+
+void CellLayout_Class::pack_start_vfunc_callback(GtkCellLayout* self, GtkCellRenderer* cell, gboolean expand)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->pack_start_vfunc(Glib::wrap(cell)
+, expand
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->pack_start)
+ (*base->pack_start)(self, cell, expand);
+ }
+}
+
+void CellLayout_Class::pack_end_vfunc_callback(GtkCellLayout* self, GtkCellRenderer* cell, gboolean expand)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->pack_end_vfunc(Glib::wrap(cell)
+, expand
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->pack_end)
+ (*base->pack_end)(self, cell, expand);
+ }
+}
+
+void CellLayout_Class::clear_vfunc_callback(GtkCellLayout* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->clear_vfunc();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->clear)
+ (*base->clear)(self);
+ }
+}
+
+void CellLayout_Class::add_attribute_vfunc_callback(GtkCellLayout* self, GtkCellRenderer* cell, const gchar* attribute, gint column)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->add_attribute_vfunc(Glib::wrap(cell)
+, Glib::convert_const_gchar_ptr_to_ustring(attribute)
+, column
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->add_attribute)
+ (*base->add_attribute)(self, cell, attribute, column);
+ }
+}
+
+void CellLayout_Class::clear_attributes_vfunc_callback(GtkCellLayout* self, GtkCellRenderer* cell)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->clear_attributes_vfunc(Glib::wrap(cell)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->clear_attributes)
+ (*base->clear_attributes)(self, cell);
+ }
+}
+
+void CellLayout_Class::reorder_vfunc_callback(GtkCellLayout* self, GtkCellRenderer* cell, gint position)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->reorder_vfunc(Glib::wrap(cell)
+, position
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->reorder)
+ (*base->reorder)(self, cell, position);
+ }
+}
+
+
+Glib::ObjectBase* CellLayout_Class::wrap_new(GObject* object)
+{
+ return new CellLayout((GtkCellLayout*)(object));
+}
+
+
+/* The implementation: */
+
+CellLayout::CellLayout()
+:
+ Glib::Interface(celllayout_class_.init())
+{}
+
+CellLayout::CellLayout(GtkCellLayout* castitem)
+:
+ Glib::Interface((GObject*)(castitem))
+{}
+
+CellLayout::~CellLayout()
+{}
+
+// static
+void CellLayout::add_interface(GType gtype_implementer)
+{
+ celllayout_class_.init().add_interface(gtype_implementer);
+}
+
+CellLayout::CppClassType CellLayout::celllayout_class_; // initialize static member
+
+GType CellLayout::get_type()
+{
+ return celllayout_class_.init().get_type();
+}
+
+GType CellLayout::get_base_type()
+{
+ return gtk_cell_layout_get_type();
+}
+
+
+void CellLayout::pack_start(CellRenderer& cell, bool expand)
+{
+ gtk_cell_layout_pack_start(gobj(), (cell).gobj(), static_cast<int>(expand));
+}
+
+void CellLayout::pack_end(CellRenderer& cell, bool expand)
+{
+ gtk_cell_layout_pack_end(gobj(), (cell).gobj(), static_cast<int>(expand));
+}
+
+void CellLayout::clear()
+{
+ gtk_cell_layout_clear(gobj());
+}
+
+void CellLayout::add_attribute(CellRenderer& cell, const Glib::ustring& attribute, int column)
+{
+ gtk_cell_layout_add_attribute(gobj(), (cell).gobj(), attribute.c_str(), column);
+}
+
+void CellLayout::clear_attributes(CellRenderer& cell)
+{
+ gtk_cell_layout_clear_attributes(gobj(), (cell).gobj());
+}
+
+void CellLayout::reorder(CellRenderer& cell, int position)
+{
+ gtk_cell_layout_reorder(gobj(), (cell).gobj(), position);
+}
+
+
+void Gtk::CellLayout::pack_start_vfunc(CellRenderer* cell, bool expand)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->pack_start)
+ (*base->pack_start)(gobj(),(GtkCellRenderer*)Glib::unwrap(cell),static_cast<int>(expand));
+}
+
+void Gtk::CellLayout::pack_end_vfunc(CellRenderer* cell, bool expand)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->pack_end)
+ (*base->pack_end)(gobj(),(GtkCellRenderer*)Glib::unwrap(cell),static_cast<int>(expand));
+}
+
+void Gtk::CellLayout::clear_vfunc()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->clear)
+ (*base->clear)(gobj());
+}
+
+void Gtk::CellLayout::add_attribute_vfunc(CellRenderer* cell, const Glib::ustring& attribute, int column)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->add_attribute)
+ (*base->add_attribute)(gobj(),(GtkCellRenderer*)Glib::unwrap(cell),attribute.c_str(),column);
+}
+
+void Gtk::CellLayout::clear_attributes_vfunc(CellRenderer* cell)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->clear_attributes)
+ (*base->clear_attributes)(gobj(),(GtkCellRenderer*)Glib::unwrap(cell));
+}
+
+void Gtk::CellLayout::reorder_vfunc(CellRenderer* cell, int position)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->reorder)
+ (*base->reorder)(gobj(),(GtkCellRenderer*)Glib::unwrap(cell),position);
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/celllayout.h b/libs/gtkmm2/gtk/gtkmm/celllayout.h
new file mode 100644
index 0000000000..1fc7c8f6eb
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/celllayout.h
@@ -0,0 +1,226 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_CELLLAYOUT_H
+#define _GTKMM_CELLLAYOUT_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 2003 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/interface.h>
+#include <gtkmm/cellrenderer.h>
+#include <gtkmm/cellrenderer_generation.h>
+#include <gtkmm/treemodel.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C"
+{
+typedef struct _GtkCellLayoutIface GtkCellLayoutIface;
+}
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkCellLayout GtkCellLayout;
+typedef struct _GtkCellLayoutClass GtkCellLayoutClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class CellLayout_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** An interface for packing cells.
+ * CellLayout is an interface to be implemented by all objects which want to provide a TreeView::Column-like API
+ * for packing cells, setting attributes and data funcs.
+ */
+
+class CellLayout : public Glib::Interface
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef CellLayout CppObjectType;
+ typedef CellLayout_Class CppClassType;
+ typedef GtkCellLayout BaseObjectType;
+ typedef GtkCellLayoutIface BaseClassType;
+
+private:
+ friend class CellLayout_Class;
+ static CppClassType celllayout_class_;
+
+ // noncopyable
+ CellLayout(const CellLayout&);
+ CellLayout& operator=(const CellLayout&);
+
+protected:
+ CellLayout(); // you must derive from this class
+ explicit CellLayout(GtkCellLayout* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~CellLayout();
+
+ static void add_interface(GType gtype_implementer);
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ GtkCellLayout* gobj() { return reinterpret_cast<GtkCellLayout*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const GtkCellLayout* gobj() const { return reinterpret_cast<GtkCellLayout*>(gobject_); }
+
+private:
+
+
+public:
+
+ template <class ColumnType> inline
+ void pack_start(const TreeModelColumn<ColumnType>& model_column, bool expand = true);
+
+
+ /** Packs the @a cell into the beginning of @a cell_layout . If @a expand is <tt>false</tt>,
+ * then the @a cell is allocated no more space than it needs. Any unused space
+ * is divided evenly between cells for which @a expand is <tt>true</tt>.
+ *
+ * Since: 2.4
+ * @param cell A Gtk::CellRenderer.
+ * @param expand <tt>true</tt> if @a cell is to be given extra space allocated to @a cell_layout .
+ */
+ void pack_start(CellRenderer& cell, bool expand = true);
+
+ /** Adds the @a cell to the end of @a cell_layout . If @a expand is <tt>false</tt>, then the
+ * @a cell is allocated no more space than it needs. Any unused space is
+ * divided evenly between cells for which @a expand is <tt>true</tt>.
+ *
+ * Since: 2.4
+ * @param cell A Gtk::CellRenderer.
+ * @param expand <tt>true</tt> if @a cell is to be given extra space allocated to @a cell_layout .
+ */
+ void pack_end(CellRenderer& cell, bool expand = true);
+
+ /** Unsets all the mappings on all renderers on @a cell_layout and
+ * removes all renderers from @a cell_layout .
+ *
+ * Since: 2.4
+ */
+ void clear();
+
+ //I think this is just a convenience method, equivalent to clear() and multiple add_attribute()s. murrayc.
+
+
+ /** Adds an attribute mapping to the list in @a cell_layout . The @a column is the
+ * column of the model to get a value from, and the @a attribute is the
+ * parameter on @a cell to be set from the value. So for example if column 2
+ * of the model contains strings, you could have the "text" attribute of a
+ * Gtk::CellRendererText get its values from column 2.
+ *
+ * Since: 2.4
+ * @param cell A Gtk::CellRenderer.
+ * @param attribute An attribute on the renderer.
+ * @param column The column position on the model to get the attribute from.
+ */
+ void add_attribute(CellRenderer& cell, const Glib::ustring& attribute, int column);
+ void add_attribute(const Glib::PropertyProxy_Base& property, const TreeModelColumnBase& column);
+
+ //For instance, void on_cell_data(const TreeModel::const_iterator& iter)
+ typedef sigc::slot<void, const TreeModel::const_iterator&> SlotCellData;
+
+ void set_cell_data_func(CellRenderer& cell, const SlotCellData& slot);
+
+
+ /** Clears all existing attributes previously set with
+ * set_attributes().
+ *
+ * Since: 2.4
+ * @param cell A Gtk::CellRenderer to clear the attribute mapping on.
+ */
+ void clear_attributes(CellRenderer& cell);
+
+
+ /** Re-inserts @a cell at @a position . Note that @a cell has already to be packed
+ * into @a cell_layout for this to function properly.
+ *
+ * Since: 2.4
+ * @param cell A Gtk::CellRenderer to reorder.
+ * @param position New position to insert @a cell at.
+ */
+ void reorder(CellRenderer& cell, int position);
+
+protected:
+ virtual void pack_start_vfunc(CellRenderer* cell, bool expand);
+ virtual void pack_end_vfunc(CellRenderer* cell, bool expand);
+ virtual void clear_vfunc();
+ virtual void add_attribute_vfunc(CellRenderer* cell, const Glib::ustring& attribute, int column);
+//TODO: _WRAP_VFUNC(void set_cell_data_func(CellRenderer* cell, GtkCellLayoutDataFunc func, gpointer func_data, GDestroyNotify destroy), set_cell_data_func)
+ virtual void clear_attributes_vfunc(CellRenderer* cell);
+ virtual void reorder_vfunc(CellRenderer* cell, int position);
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+};
+
+template<class T_ModelColumnType>
+void CellLayout::pack_start(const TreeModelColumn<T_ModelColumnType>& column, bool expand)
+{
+ //Generate appropriate Renderer for the column:
+ CellRenderer* pCellRenderer = manage( CellRenderer_Generation::generate_cellrenderer<T_ModelColumnType>() );
+
+ //Use the renderer:
+ pack_start(*pCellRenderer, expand);
+
+ //Make the renderer render the column:
+ add_attribute(pCellRenderer->_property_renderable(), column);
+}
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::CellLayout
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Gtk::CellLayout> wrap(GtkCellLayout* object, bool take_copy = false);
+
+} // namespace Glib
+
+#endif /* _GTKMM_CELLLAYOUT_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/cellrenderer.cc b/libs/gtkmm2/gtk/gtkmm/cellrenderer.cc
new file mode 100644
index 0000000000..8cec8dc46f
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/cellrenderer.cc
@@ -0,0 +1,638 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/cellrenderer.h>
+#include <gtkmm/private/cellrenderer_p.h>
+
+#include <gtk/gtktypebuiltins.h>
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkcellrenderer.h>
+
+namespace Gtk
+{
+
+void CellRenderer::get_size(Widget& widget, int& x_offset, int& y_offset, int& width, int& height) const
+{
+ gtk_cell_renderer_get_size(const_cast<GtkCellRenderer*>(gobj()), widget.gobj(), 0, &x_offset, &y_offset, &width, &height);
+}
+
+Glib::PropertyProxy_Base CellRenderer::_property_renderable()
+{
+ g_assert_not_reached();
+ return Glib::PropertyProxy<int>(0, 0); // shut up warnings
+}
+
+} // namespace Gtk
+
+
+namespace
+{
+
+const Glib::SignalProxyInfo CellRenderer_signal_editing_canceled_info =
+{
+ "editing_canceled",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+
+void CellRenderer_signal_editing_started_callback(GtkCellRenderer* self, GtkCellEditable* p0,const gchar* p1,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,CellEditable*,const Glib::ustring& > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(dynamic_cast<CellEditable*>(Glib::wrap_auto((GObject*)(p0), false))
+, Glib::convert_const_gchar_ptr_to_ustring(p1)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo CellRenderer_signal_editing_started_info =
+{
+ "editing_started",
+ (GCallback) &CellRenderer_signal_editing_started_callback,
+ (GCallback) &CellRenderer_signal_editing_started_callback
+};
+
+} // anonymous namespace
+
+// static
+GType Glib::Value<Gtk::CellRendererState>::value_type()
+{
+ return gtk_cell_renderer_state_get_type();
+}
+
+// static
+GType Glib::Value<Gtk::CellRendererMode>::value_type()
+{
+ return gtk_cell_renderer_mode_get_type();
+}
+
+
+namespace Glib
+{
+
+Gtk::CellRenderer* wrap(GtkCellRenderer* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::CellRenderer *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& CellRenderer_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &CellRenderer_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_cell_renderer_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void CellRenderer_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->get_size = &get_size_vfunc_callback;
+ klass->render = &render_vfunc_callback;
+ klass->activate = &activate_vfunc_callback;
+ klass->start_editing = &start_editing_vfunc_callback;
+ klass->editing_canceled = &editing_canceled_callback;
+}
+
+void CellRenderer_Class::get_size_vfunc_callback(GtkCellRenderer* self, GtkWidget* widget, GdkRectangle* cell_area, gint* x_offset, gint* y_offset, gint* width, gint* height)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->get_size_vfunc(*Glib::wrap(widget)
+, &Glib::wrap(cell_area)
+, x_offset
+, y_offset
+, width
+, height
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->get_size)
+ (*base->get_size)(self, widget, cell_area, x_offset, y_offset, width, height);
+ }
+}
+
+void CellRenderer_Class::render_vfunc_callback(GtkCellRenderer* self, GdkDrawable* window, GtkWidget* widget, GdkRectangle* background_area, GdkRectangle* cell_area, GdkRectangle* expose_area, GtkCellRendererState flags)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->render_vfunc(Glib::wrap(window, true)
+, *Glib::wrap(widget)
+, Glib::wrap(background_area)
+, Glib::wrap(cell_area)
+, Glib::wrap(expose_area)
+, ((CellRendererState)(flags))
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->render)
+ (*base->render)(self, window, widget, background_area, cell_area, expose_area, flags);
+ }
+}
+
+gboolean CellRenderer_Class::activate_vfunc_callback(GtkCellRenderer* self, GdkEvent* event, GtkWidget* widget, const gchar* path, GdkRectangle* background_area, GdkRectangle* cell_area, GtkCellRendererState flags)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->activate_vfunc(event, *Glib::wrap(widget)
+, Glib::convert_const_gchar_ptr_to_ustring(path)
+, Glib::wrap(background_area)
+, Glib::wrap(cell_area)
+, ((CellRendererState)(flags))
+));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->activate)
+ return (*base->activate)(self, event, widget, path, background_area, cell_area, flags);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+GtkCellEditable* CellRenderer_Class::start_editing_vfunc_callback(GtkCellRenderer* self, GdkEvent* event, GtkWidget* widget, const gchar* path, GdkRectangle* background_area, GdkRectangle* cell_area, GtkCellRendererState flags)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(false) //obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return Glib::unwrap(obj->start_editing_vfunc(event, *Glib::wrap(widget)
+, Glib::convert_const_gchar_ptr_to_ustring(path)
+, Glib::wrap(background_area)
+, Glib::wrap(cell_area)
+, ((CellRendererState)(flags))
+));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->start_editing)
+ return (*base->start_editing)(self, event, widget, path, background_area, cell_area, flags);
+ }
+
+ typedef GtkCellEditable* RType;
+ return RType();
+}
+
+
+void CellRenderer_Class::editing_canceled_callback(GtkCellRenderer* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_editing_canceled();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->editing_canceled)
+ (*base->editing_canceled)(self);
+ }
+}
+
+
+Glib::ObjectBase* CellRenderer_Class::wrap_new(GObject* o)
+{
+ return manage(new CellRenderer((GtkCellRenderer*)(o)));
+
+}
+
+
+/* The implementation: */
+
+CellRenderer::CellRenderer(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Object(construct_params)
+{
+ }
+
+CellRenderer::CellRenderer(GtkCellRenderer* castitem)
+:
+ Gtk::Object((GtkObject*)(castitem))
+{
+ }
+
+CellRenderer::~CellRenderer()
+{
+ destroy_();
+}
+
+CellRenderer::CppClassType CellRenderer::cellrenderer_class_; // initialize static member
+
+GType CellRenderer::get_type()
+{
+ return cellrenderer_class_.init().get_type();
+}
+
+GType CellRenderer::get_base_type()
+{
+ return gtk_cell_renderer_get_type();
+}
+
+
+void CellRenderer::get_size(Widget& widget, const Gdk::Rectangle& cell_area, int& x_offset, int& y_offset, int& width, int& height) const
+{
+ gtk_cell_renderer_get_size(const_cast<GtkCellRenderer*>(gobj()), (widget).gobj(), const_cast<GdkRectangle*>(cell_area.gobj()), &x_offset, &y_offset, &width, &height);
+}
+
+void CellRenderer::render(const Glib::RefPtr<Gdk::Window>& window, Widget& widget, const Gdk::Rectangle& background_area, const Gdk::Rectangle& cell_area, const Gdk::Rectangle& expose_area, CellRendererState flags)
+{
+ gtk_cell_renderer_render(gobj(), Glib::unwrap(window), (widget).gobj(), const_cast<GdkRectangle*>(background_area.gobj()), const_cast<GdkRectangle*>(cell_area.gobj()), const_cast<GdkRectangle*>(expose_area.gobj()), ((GtkCellRendererState)(flags)));
+}
+
+bool CellRenderer::activate(GdkEvent* event, Widget& widget, const Glib::ustring& path, const Gdk::Rectangle& background_area, const Gdk::Rectangle& cell_area, CellRendererState flags)
+{
+ return gtk_cell_renderer_activate(gobj(), event, (widget).gobj(), path.c_str(), const_cast<GdkRectangle*>(background_area.gobj()), const_cast<GdkRectangle*>(cell_area.gobj()), ((GtkCellRendererState)(flags)));
+}
+
+CellEditable* CellRenderer::start_editing(GdkEvent* event, Widget& widget, const Glib::ustring& path, const Gdk::Rectangle& background_area, const Gdk::Rectangle& cell_area, CellRendererState flags)
+{
+ return dynamic_cast<CellEditable*>(Glib::wrap_auto((GObject*)(gtk_cell_renderer_start_editing(gobj(), event, (widget).gobj(), path.c_str(), const_cast<GdkRectangle*>(background_area.gobj()), const_cast<GdkRectangle*>(cell_area.gobj()), ((GtkCellRendererState)(flags)))), false));
+}
+
+void CellRenderer::set_fixed_size(int width, int height)
+{
+ gtk_cell_renderer_set_fixed_size(gobj(), width, height);
+}
+
+void CellRenderer::get_fixed_size(int& width, int& height) const
+{
+ gtk_cell_renderer_get_fixed_size(const_cast<GtkCellRenderer*>(gobj()), &width, &height);
+}
+
+void CellRenderer::editing_canceled()
+{
+ gtk_cell_renderer_editing_canceled(gobj());
+}
+
+void CellRenderer::stop_editing(bool canceled)
+{
+ gtk_cell_renderer_stop_editing(gobj(), static_cast<int>(canceled));
+}
+
+CellRenderer::CellRenderer()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Object(Glib::ConstructParams(cellrenderer_class_.init()))
+{
+ }
+
+
+Glib::SignalProxy0< void > CellRenderer::signal_editing_canceled()
+{
+ return Glib::SignalProxy0< void >(this, &CellRenderer_signal_editing_canceled_info);
+}
+
+Glib::SignalProxy2< void,CellEditable*,const Glib::ustring& > CellRenderer::signal_editing_started()
+{
+ return Glib::SignalProxy2< void,CellEditable*,const Glib::ustring& >(this, &CellRenderer_signal_editing_started_info);
+}
+
+
+Glib::PropertyProxy<CellRendererMode> CellRenderer::property_mode()
+{
+ return Glib::PropertyProxy<CellRendererMode>(this, "mode");
+}
+
+Glib::PropertyProxy_ReadOnly<CellRendererMode> CellRenderer::property_mode() const
+{
+ return Glib::PropertyProxy_ReadOnly<CellRendererMode>(this, "mode");
+}
+
+Glib::PropertyProxy<bool> CellRenderer::property_visible()
+{
+ return Glib::PropertyProxy<bool>(this, "visible");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> CellRenderer::property_visible() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "visible");
+}
+
+Glib::PropertyProxy<float> CellRenderer::property_xalign()
+{
+ return Glib::PropertyProxy<float>(this, "xalign");
+}
+
+Glib::PropertyProxy_ReadOnly<float> CellRenderer::property_xalign() const
+{
+ return Glib::PropertyProxy_ReadOnly<float>(this, "xalign");
+}
+
+Glib::PropertyProxy<float> CellRenderer::property_yalign()
+{
+ return Glib::PropertyProxy<float>(this, "yalign");
+}
+
+Glib::PropertyProxy_ReadOnly<float> CellRenderer::property_yalign() const
+{
+ return Glib::PropertyProxy_ReadOnly<float>(this, "yalign");
+}
+
+Glib::PropertyProxy<unsigned int> CellRenderer::property_xpad()
+{
+ return Glib::PropertyProxy<unsigned int>(this, "xpad");
+}
+
+Glib::PropertyProxy_ReadOnly<unsigned int> CellRenderer::property_xpad() const
+{
+ return Glib::PropertyProxy_ReadOnly<unsigned int>(this, "xpad");
+}
+
+Glib::PropertyProxy<unsigned int> CellRenderer::property_ypad()
+{
+ return Glib::PropertyProxy<unsigned int>(this, "ypad");
+}
+
+Glib::PropertyProxy_ReadOnly<unsigned int> CellRenderer::property_ypad() const
+{
+ return Glib::PropertyProxy_ReadOnly<unsigned int>(this, "ypad");
+}
+
+Glib::PropertyProxy<int> CellRenderer::property_width()
+{
+ return Glib::PropertyProxy<int>(this, "width");
+}
+
+Glib::PropertyProxy_ReadOnly<int> CellRenderer::property_width() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "width");
+}
+
+Glib::PropertyProxy<int> CellRenderer::property_height()
+{
+ return Glib::PropertyProxy<int>(this, "height");
+}
+
+Glib::PropertyProxy_ReadOnly<int> CellRenderer::property_height() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "height");
+}
+
+Glib::PropertyProxy<bool> CellRenderer::property_is_expander()
+{
+ return Glib::PropertyProxy<bool>(this, "is-expander");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> CellRenderer::property_is_expander() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "is-expander");
+}
+
+Glib::PropertyProxy<bool> CellRenderer::property_is_expanded()
+{
+ return Glib::PropertyProxy<bool>(this, "is-expanded");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> CellRenderer::property_is_expanded() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "is-expanded");
+}
+
+Glib::PropertyProxy_WriteOnly<Glib::ustring> CellRenderer::property_cell_background()
+{
+ return Glib::PropertyProxy_WriteOnly<Glib::ustring>(this, "cell-background");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> CellRenderer::property_cell_background() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "cell-background");
+}
+
+Glib::PropertyProxy<Gdk::Color> CellRenderer::property_cell_background_gdk()
+{
+ return Glib::PropertyProxy<Gdk::Color>(this, "cell-background-gdk");
+}
+
+Glib::PropertyProxy_ReadOnly<Gdk::Color> CellRenderer::property_cell_background_gdk() const
+{
+ return Glib::PropertyProxy_ReadOnly<Gdk::Color>(this, "cell-background-gdk");
+}
+
+Glib::PropertyProxy<bool> CellRenderer::property_cell_background_set()
+{
+ return Glib::PropertyProxy<bool>(this, "cell-background-set");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> CellRenderer::property_cell_background_set() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "cell-background-set");
+}
+
+
+void Gtk::CellRenderer::on_editing_canceled()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->editing_canceled)
+ (*base->editing_canceled)(gobj());
+}
+
+
+void Gtk::CellRenderer::get_size_vfunc(Widget& widget, const Gdk::Rectangle* cell_area, int* x_offset, int* y_offset, int* width, int* height) const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->get_size)
+ (*base->get_size)(const_cast<GtkCellRenderer*>(gobj()),(widget).gobj(),Glib::unwrap(const_cast<Gdk::Rectangle*>(cell_area)),x_offset,y_offset,width,height);
+}
+
+void Gtk::CellRenderer::render_vfunc(const Glib::RefPtr<Gdk::Drawable>& window, Widget& widget, const Gdk::Rectangle& background_area, const Gdk::Rectangle& cell_area, const Gdk::Rectangle& expose_area, CellRendererState flags)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->render)
+ (*base->render)(gobj(),Glib::unwrap(window),(widget).gobj(),const_cast<GdkRectangle*>(background_area.gobj()),const_cast<GdkRectangle*>(cell_area.gobj()),const_cast<GdkRectangle*>(expose_area.gobj()),((GtkCellRendererState)(flags)));
+}
+
+bool Gtk::CellRenderer::activate_vfunc(GdkEvent* event, Widget& widget, const Glib::ustring& path, const Gdk::Rectangle& background_area, const Gdk::Rectangle& cell_area, CellRendererState flags)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->activate)
+ return (*base->activate)(gobj(),event,(widget).gobj(),path.c_str(),const_cast<GdkRectangle*>(background_area.gobj()),const_cast<GdkRectangle*>(cell_area.gobj()),((GtkCellRendererState)(flags)));
+
+ typedef bool RType;
+ return RType();
+}
+
+CellEditable* Gtk::CellRenderer::start_editing_vfunc(GdkEvent* event, Widget& widget, const Glib::ustring& path, const Gdk::Rectangle& background_area, const Gdk::Rectangle& cell_area, CellRendererState flags)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->start_editing)
+ return dynamic_cast<CellEditable*>(Glib::wrap_auto((GObject*)((*base->start_editing)(gobj(),event,(widget).gobj(),path.c_str(),const_cast<GdkRectangle*>(background_area.gobj()),const_cast<GdkRectangle*>(cell_area.gobj()),((GtkCellRendererState)(flags)))), false));
+
+ typedef CellEditable* RType;
+ return RType();
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/cellrenderer.h b/libs/gtkmm2/gtk/gtkmm/cellrenderer.h
new file mode 100644
index 0000000000..7c382c44c5
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/cellrenderer.h
@@ -0,0 +1,610 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_CELLRENDERER_H
+#define _GTKMM_CELLRENDERER_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/object.h>
+#include <gtkmm/widget.h>
+#include <gtkmm/celleditable.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkCellRenderer GtkCellRenderer;
+typedef struct _GtkCellRendererClass GtkCellRendererClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class CellRenderer_Class; } // namespace Gtk
+namespace Gtk
+{
+
+
+/** @addtogroup gtkmmEnums Enums and Flags */
+
+/**
+ * @ingroup gtkmmEnums
+ * @par Bitwise operators:
+ * <tt>%CellRendererState operator|(CellRendererState, CellRendererState)</tt><br>
+ * <tt>%CellRendererState operator&(CellRendererState, CellRendererState)</tt><br>
+ * <tt>%CellRendererState operator^(CellRendererState, CellRendererState)</tt><br>
+ * <tt>%CellRendererState operator~(CellRendererState)</tt><br>
+ * <tt>%CellRendererState& operator|=(CellRendererState&, CellRendererState)</tt><br>
+ * <tt>%CellRendererState& operator&=(CellRendererState&, CellRendererState)</tt><br>
+ * <tt>%CellRendererState& operator^=(CellRendererState&, CellRendererState)</tt><br>
+ */
+enum CellRendererState
+{
+ CELL_RENDERER_SELECTED = 1 << 0,
+ CELL_RENDERER_PRELIT = 1 << 1,
+ CELL_RENDERER_INSENSITIVE = 1 << 2,
+ CELL_RENDERER_SORTED = 1 << 3,
+ CELL_RENDERER_FOCUSED = 1 << 4
+};
+
+/** @ingroup gtkmmEnums */
+inline CellRendererState operator|(CellRendererState lhs, CellRendererState rhs)
+ { return static_cast<CellRendererState>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
+
+/** @ingroup gtkmmEnums */
+inline CellRendererState operator&(CellRendererState lhs, CellRendererState rhs)
+ { return static_cast<CellRendererState>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
+
+/** @ingroup gtkmmEnums */
+inline CellRendererState operator^(CellRendererState lhs, CellRendererState rhs)
+ { return static_cast<CellRendererState>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
+
+/** @ingroup gtkmmEnums */
+inline CellRendererState operator~(CellRendererState flags)
+ { return static_cast<CellRendererState>(~static_cast<unsigned>(flags)); }
+
+/** @ingroup gtkmmEnums */
+inline CellRendererState& operator|=(CellRendererState& lhs, CellRendererState rhs)
+ { return (lhs = static_cast<CellRendererState>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
+
+/** @ingroup gtkmmEnums */
+inline CellRendererState& operator&=(CellRendererState& lhs, CellRendererState rhs)
+ { return (lhs = static_cast<CellRendererState>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
+
+/** @ingroup gtkmmEnums */
+inline CellRendererState& operator^=(CellRendererState& lhs, CellRendererState rhs)
+ { return (lhs = static_cast<CellRendererState>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::CellRendererState> : public Glib::Value_Flags<Gtk::CellRendererState>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+/**
+ * @ingroup gtkmmEnums
+ */
+enum CellRendererMode
+{
+ CELL_RENDERER_MODE_INERT,
+ CELL_RENDERER_MODE_ACTIVATABLE,
+ CELL_RENDERER_MODE_EDITABLE
+};
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::CellRendererMode> : public Glib::Value_Enum<Gtk::CellRendererMode>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+
+/** CellRenderers are used by Gtk::TreeView columns to render the Gtk::TreeModel column data appropriately.
+ * They display, and allow editing of, the values of their properties.
+ * In most cases, Gtk::TreeView::append_column() will automatically choose the appropriate renderer for the mode column's data type,
+ * so you will rarely need to worry about these classes.
+ *
+ * @ingroup TreeView
+ */
+
+class CellRenderer : public Gtk::Object
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef CellRenderer CppObjectType;
+ typedef CellRenderer_Class CppClassType;
+ typedef GtkCellRenderer BaseObjectType;
+ typedef GtkCellRendererClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~CellRenderer();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class CellRenderer_Class;
+ static CppClassType cellrenderer_class_;
+
+ // noncopyable
+ CellRenderer(const CellRenderer&);
+ CellRenderer& operator=(const CellRenderer&);
+
+protected:
+ explicit CellRenderer(const Glib::ConstructParams& construct_params);
+ explicit CellRenderer(GtkCellRenderer* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkCellRenderer* gobj() { return reinterpret_cast<GtkCellRenderer*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkCellRenderer* gobj() const { return reinterpret_cast<GtkCellRenderer*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_editing_canceled();
+
+
+private:
+
+public:
+
+
+ /** Obtains the width and height needed to render the cell. Used by view widgets
+ * to determine the appropriate size for the cell_area passed to
+ * render(). Fills in the x and y
+ * offsets of the cell relative to this location. Please note that the
+ * values set in @a width and @a height , as well as those in @a x_offset and @a y_offset
+ * are inclusive of the xpad and ypad properties.
+ * @param widget The widget the renderer is rendering to.
+ * @param cell_area The area a cell will be allocated.
+ * @param x_offset Location to return x offset of cell relative to @a cell_area .
+ * @param y_offset Location to return y offset of cell relative to @a cell_area .
+ * @param width Location to return width needed to render a cell.
+ * @param height Location to return height needed to render a cell.
+ */
+ void get_size(
+ Widget& widget,
+ const Gdk::Rectangle& cell_area,
+ int& x_offset, int& y_offset,
+ int& width, int& height) const;
+
+ /** Obtains the width and height needed to render the cell. Used by view widgets
+ * to determine the appropriate size for the cell_area passed to
+ * render(). Fills in the x and y
+ * offsets of the cell relative to this location. Please note that the
+ * values set in @a width and @a height , as well as those in @a x_offset and @a y_offset
+ * are inclusive of the xpad and ypad properties.
+ * @param widget The widget the renderer is rendering to.
+ * @param x_offset Location to return x offset of cell relative to @a cell_area.
+ * @param y_offset Location to return y offset of cell relative to @a cell_area.
+ * @param width Location to return width needed to render a cell.
+ * @param height Location to return height needed to render a cell.
+ */
+ void get_size(Widget& widget, int& x_offset, int& y_offset, int& width, int& height) const;
+
+
+ /** Invokes the virtual render function of the Gtk::CellRenderer. The three
+ * passed-in rectangles are areas of @a window . Most renderers will draw within
+ * @a cell_area ; the xalign, yalign, xpad, and ypad fields of the Gtk::CellRenderer
+ * should be honored with respect to @a cell_area . @a background_area includes the
+ * blank space around the cell, and also the area containing the tree expander;
+ * so the @a background_area rectangles for all cells tile to cover the entire
+ * @a window . @a expose_area is a clip rectangle.
+ * @param window A Gdk::Drawable to draw to.
+ * @param widget The widget owning @a window .
+ * @param background_area Entire cell area (including tree expanders and maybe padding on the sides).
+ * @param cell_area Area normally rendered by a cell renderer.
+ * @param expose_area Area that actually needs updating.
+ * @param flags Flags that affect rendering.
+ */
+ void render(
+ const Glib::RefPtr<Gdk::Window>& window,
+ Widget& widget,
+ const Gdk::Rectangle& background_area,
+ const Gdk::Rectangle& cell_area,
+ const Gdk::Rectangle& expose_area,
+ CellRendererState flags);
+
+
+ /** Passes an activate event to the cell renderer for possible processing. Some
+ * cell renderers may use events; for example, Gtk::CellRendererToggle toggles
+ * when it gets a mouse click.
+ * @param event A Gdk::Event.
+ * @param widget Widget that received the event.
+ * @param path Widget-dependent string representation of the event location; e.g. for Gtk::TreeView, a string representation of Gtk::TreePath.
+ * @param background_area Background area as passed to @a gtk_cell_renderer_render .
+ * @param cell_area Cell area as passed to @a gtk_cell_renderer_render .
+ * @param flags Render flags.
+ * @return <tt>true</tt> if the event was consumed/handled.
+ */
+ bool activate(
+ GdkEvent* event,
+ Widget& widget,
+ const Glib::ustring& path,
+ const Gdk::Rectangle& background_area,
+ const Gdk::Rectangle& cell_area,
+ CellRendererState flags);
+
+
+ /** Passes an activate event to the cell renderer for possible processing.
+ * @param event A Gdk::Event.
+ * @param widget Widget that received the event.
+ * @param path Widget-dependent string representation of the event location; e.g. for Gtk::TreeView, a string representation of Gtk::TreePath.
+ * @param background_area Background area as passed to @a gtk_cell_renderer_render .
+ * @param cell_area Cell area as passed to @a gtk_cell_renderer_render .
+ * @param flags Render flags.
+ * @return A new Gtk::CellEditable, or <tt>0</tt>.
+ */
+ CellEditable* start_editing(
+ GdkEvent* event, Widget& widget,
+ const Glib::ustring& path,
+ const Gdk::Rectangle& background_area,
+ const Gdk::Rectangle& cell_area,
+ CellRendererState flags = CellRendererState(0));
+
+
+ /** Sets the renderer size to be explicit, independent of the properties set.
+ * @param width The width of the cell renderer, or -1.
+ * @param height The height of the cell renderer, or -1.
+ */
+ void set_fixed_size(int width, int height);
+
+ /** Fills in @a width and @a height with the appropriate size of @a cell .
+ * @param width Location to fill in with the fixed width of the widget.
+ * @param height Location to fill in with the fixed height of the widget.
+ */
+ void get_fixed_size(int& width, int& height) const;
+
+ //TODO: Mark as @deprecated: See stop_editing().
+
+ /** Causes the cell renderer to emit the "editing-canceled" signal. This
+ * function is for use only by implementations of cell renderers that need to
+ * notify the client program that an editing process was canceled and the
+ * changes were not committed.
+ *
+ * Since: 2.4
+ * Deprecated: Use stop_editing() instead
+ */
+ void editing_canceled();
+
+
+ /** Informs the cell renderer that the editing is stopped.
+ * If @a canceled is <tt>true</tt>, the cell renderer will emit the "editing-canceled"
+ * signal. This function should be called by cell renderer implementations
+ * in response to the "editing-done" signal of Gtk::CellEditable.
+ *
+ * Since: 2.6
+ * @param canceled <tt>true</tt> if the editing has been canceled.
+ */
+ void stop_editing(bool canceled = false);
+
+ /** Returns the property that this CellRenderer renders.
+ * For instance, property_text for CellRendererText, and property_active for CellRendererToggle
+ * Needs to be overridden in derived classes.
+ */
+ virtual Glib::PropertyProxy_Base _property_renderable();
+
+
+ Glib::SignalProxy0< void > signal_editing_canceled();
+
+
+ //We use no_default_handler for this, because we can not add a new vfunc to 2.5 without breaking ABI.
+ //TODO: Remove no_default_handler when we do an ABI-break-with-parallel-install.
+
+
+ Glib::SignalProxy2< void,CellEditable*,const Glib::ustring& > signal_editing_started();
+
+
+ /** Editable mode of the CellRenderer.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<CellRendererMode> property_mode() ;
+
+/** Editable mode of the CellRenderer.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<CellRendererMode> property_mode() const;
+
+ /** Display the cell.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_visible() ;
+
+/** Display the cell.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_visible() const;
+
+ /** The x-align.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<float> property_xalign() ;
+
+/** The x-align.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<float> property_xalign() const;
+
+ /** The y-align.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<float> property_yalign() ;
+
+/** The y-align.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<float> property_yalign() const;
+
+ /** The xpad.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<unsigned int> property_xpad() ;
+
+/** The xpad.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<unsigned int> property_xpad() const;
+
+ /** The ypad.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<unsigned int> property_ypad() ;
+
+/** The ypad.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<unsigned int> property_ypad() const;
+
+ /** The fixed width.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_width() ;
+
+/** The fixed width.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_width() const;
+
+ /** The fixed height.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_height() ;
+
+/** The fixed height.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_height() const;
+
+ /** Row has children.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_is_expander() ;
+
+/** Row has children.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_is_expander() const;
+
+ /** Row is an expander row
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_is_expanded() ;
+
+/** Row is an expander row
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_is_expanded() const;
+
+ /** Cell background color as a string.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_WriteOnly<Glib::ustring> property_cell_background() ;
+
+/** Cell background color as a string.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_cell_background() const;
+
+ /** Cell background color as a GdkColor.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Gdk::Color> property_cell_background_gdk() ;
+
+/** Cell background color as a GdkColor.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Gdk::Color> property_cell_background_gdk() const;
+
+ /** Whether this tag affects the cell background color.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_cell_background_set() ;
+
+/** Whether this tag affects the cell background color.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_cell_background_set() const;
+
+
+protected:
+ CellRenderer();
+
+ /** Override this in derived CellRenderers.
+ *
+ * Obtains the width and height needed to render the cell. Used by view widgets
+ * to determine the appropriate size for the cell_area passed to
+ * render(). If @a cell_area is not 0, fills in the x and y
+ * offsets (if set) of the cell relative to this location. Please note that the
+ * values set in @a width and @a height, as well as those in @a x_offset and @a y_offset
+ * are inclusive of the xpad and ypad properties.
+ *
+ * @param widget The widget the renderer is rendering to.
+ * @param cell_area The area a cell will be allocated, or 0.
+ * @param x_offset x offset of cell relative to @a cell_area.
+ * @param y_offset y offset of cell relative to @a cell_area.
+ * @param width Width needed to render a cell.
+ * @param height Height needed to render a cell.
+ **/
+ virtual void get_size_vfunc(Widget& widget, const Gdk::Rectangle* cell_area, int* x_offset, int* y_offset, int* width, int* height) const;
+
+
+ virtual void render_vfunc(const Glib::RefPtr<Gdk::Drawable>& window, Widget& widget, const Gdk::Rectangle& background_area, const Gdk::Rectangle& cell_area, const Gdk::Rectangle& expose_area, CellRendererState flags);
+
+ virtual bool activate_vfunc(GdkEvent* event, Widget& widget, const Glib::ustring& path, const Gdk::Rectangle& background_area, const Gdk::Rectangle& cell_area, CellRendererState flags);
+
+ virtual CellEditable* start_editing_vfunc(GdkEvent* event, Widget& widget, const Glib::ustring& path, const Gdk::Rectangle& background_area, const Gdk::Rectangle& cell_area, CellRendererState flags);
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::CellRenderer
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::CellRenderer* wrap(GtkCellRenderer* object, bool take_copy = false);
+}
+#endif /* _GTKMM_CELLRENDERER_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/cellrenderer_generation.cc b/libs/gtkmm2/gtk/gtkmm/cellrenderer_generation.cc
new file mode 100644
index 0000000000..fc5a69c6bd
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/cellrenderer_generation.cc
@@ -0,0 +1,52 @@
+/* $Id$ */
+
+/* Copyright(C) 2003 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or(at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/cellrenderer_generation.h>
+
+
+//template specializations:
+
+namespace Gtk
+{
+
+namespace CellRenderer_Generation
+{
+
+template<>
+CellRenderer* generate_cellrenderer< Glib::RefPtr<Gdk::Pixbuf> >(bool /*editable*/)
+{
+ //Ignore editable because there is no way for the user to edit a Pixbuf.
+ return new CellRendererPixbuf();
+}
+
+template<>
+CellRenderer* generate_cellrenderer<bool>(bool editable)
+{
+ CellRendererToggle* pCellRenderer = new CellRendererToggle();
+
+ //GTK+'s "activatable" really means "editable":
+ pCellRenderer->property_activatable() = editable;
+
+ return pCellRenderer;
+}
+
+} //CellRenderer_Generation
+
+
+} //namespace Gtk
diff --git a/libs/gtkmm2/gtk/gtkmm/cellrenderer_generation.h b/libs/gtkmm2/gtk/gtkmm/cellrenderer_generation.h
new file mode 100644
index 0000000000..309fba4b07
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/cellrenderer_generation.h
@@ -0,0 +1,62 @@
+#ifndef _GTKMM_CELLRENDERER_GENERATION_H
+#define _GTKMM_CELLRENDERER_GENERATION_H
+/* $Id$ */
+
+/* cellrenderer_generation.h
+ *
+ * Copyright(C) 2003 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or(at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/cellrenderertext.h>
+#include <gtkmm/cellrendererpixbuf.h>
+#include <gtkmm/cellrenderertoggle.h>
+
+namespace Gtk
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace CellRenderer_Generation
+{
+
+template<class T_ModelColumnType> //e.g. bool or Glib::ustring.
+CellRenderer* generate_cellrenderer(bool editable = false)
+{
+ CellRendererText* pCellRenderer = new CellRendererText(); //the default - template specializations will use other renderers.
+ //CellRendererText can render both strings and numerical values.
+
+ pCellRenderer->property_editable() = editable;
+ return pCellRenderer;
+}
+
+#if !defined(__GNUC__) || __GNUC__ > 2
+// gcc 2.95.x fails in TreeView::append_column_editable if the
+// following specializations are declared in the header.
+template<>
+CellRenderer* generate_cellrenderer<bool>(bool editable);
+
+template<>
+CellRenderer* generate_cellrenderer< Glib::RefPtr<Gdk::Pixbuf> >(bool editable);
+
+#endif
+
+} //CellRenderer_Generation
+#endif //DOXYGEN_SHOULD_SKIP_THIS
+
+} // namespace Gtk
+
+
+#endif /* _GTKMM_CELLRENDERER_GENERATION_H */
diff --git a/libs/gtkmm2/gtk/gtkmm/cellrenderercombo.cc b/libs/gtkmm2/gtk/gtkmm/cellrenderercombo.cc
new file mode 100644
index 0000000000..7570da7fa1
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/cellrenderercombo.cc
@@ -0,0 +1,170 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/cellrenderercombo.h>
+#include <gtkmm/private/cellrenderercombo_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 2004 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkcellrenderercombo.h>
+
+namespace Gtk
+{
+
+Glib::PropertyProxy_Base CellRendererCombo::_property_renderable()
+{
+ return CellRendererText::_property_renderable();
+}
+
+} //namespace Gtk
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::CellRendererCombo* wrap(GtkCellRendererCombo* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::CellRendererCombo *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& CellRendererCombo_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &CellRendererCombo_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_cell_renderer_combo_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void CellRendererCombo_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* CellRendererCombo_Class::wrap_new(GObject* o)
+{
+ return manage(new CellRendererCombo((GtkCellRendererCombo*)(o)));
+
+}
+
+
+/* The implementation: */
+
+CellRendererCombo::CellRendererCombo(const Glib::ConstructParams& construct_params)
+:
+ Gtk::CellRendererText(construct_params)
+{
+ }
+
+CellRendererCombo::CellRendererCombo(GtkCellRendererCombo* castitem)
+:
+ Gtk::CellRendererText((GtkCellRendererText*)(castitem))
+{
+ }
+
+CellRendererCombo::~CellRendererCombo()
+{
+ destroy_();
+}
+
+CellRendererCombo::CppClassType CellRendererCombo::cellrenderercombo_class_; // initialize static member
+
+GType CellRendererCombo::get_type()
+{
+ return cellrenderercombo_class_.init().get_type();
+}
+
+GType CellRendererCombo::get_base_type()
+{
+ return gtk_cell_renderer_combo_get_type();
+}
+
+
+CellRendererCombo::CellRendererCombo()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::CellRendererText(Glib::ConstructParams(cellrenderercombo_class_.init()))
+{
+ }
+
+
+Glib::PropertyProxy< Glib::RefPtr<Gtk::TreeModel> > CellRendererCombo::property_model()
+{
+ return Glib::PropertyProxy< Glib::RefPtr<Gtk::TreeModel> >(this, "model");
+}
+
+Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gtk::TreeModel> > CellRendererCombo::property_model() const
+{
+ return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gtk::TreeModel> >(this, "model");
+}
+
+Glib::PropertyProxy<int> CellRendererCombo::property_text_column()
+{
+ return Glib::PropertyProxy<int>(this, "text-column");
+}
+
+Glib::PropertyProxy_ReadOnly<int> CellRendererCombo::property_text_column() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "text-column");
+}
+
+Glib::PropertyProxy<bool> CellRendererCombo::property_has_entry()
+{
+ return Glib::PropertyProxy<bool>(this, "has-entry");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> CellRendererCombo::property_has_entry() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "has-entry");
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/cellrenderercombo.h b/libs/gtkmm2/gtk/gtkmm/cellrenderercombo.h
new file mode 100644
index 0000000000..7e158bd106
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/cellrenderercombo.h
@@ -0,0 +1,180 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_CELLRENDERERCOMBO_H
+#define _GTKMM_CELLRENDERERCOMBO_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* cellrenderercombo.h
+ *
+ * Copyright (C) 2004 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/cellrenderertext.h>
+#include <gtkmm/treemodel.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkCellRendererCombo GtkCellRendererCombo;
+typedef struct _GtkCellRendererComboClass GtkCellRendererComboClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class CellRendererCombo_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** Renders a combobox in a cell.
+ * CellRendererCombo renders text in a cell like CellRendererText, from which it is derived. But while
+ * CellRendererText offers a simple entry to edit the text, CellRendererCombo offers a ComboBox or
+ * ComboBoxEntry widget to edit the text. The values to display in the combo box are taken from the
+ * tree model specified in the model property.
+ *
+ * The combo cell renderer takes care of adding a text cell renderer to the combo box and sets it to
+ * display the column specified by its text_column property. Further cell renderers can be added in a
+ * handler for the editing_started signal.
+ *
+ * @ingroup TreeView
+ */
+
+class CellRendererCombo : public CellRendererText
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef CellRendererCombo CppObjectType;
+ typedef CellRendererCombo_Class CppClassType;
+ typedef GtkCellRendererCombo BaseObjectType;
+ typedef GtkCellRendererComboClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~CellRendererCombo();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class CellRendererCombo_Class;
+ static CppClassType cellrenderercombo_class_;
+
+ // noncopyable
+ CellRendererCombo(const CellRendererCombo&);
+ CellRendererCombo& operator=(const CellRendererCombo&);
+
+protected:
+ explicit CellRendererCombo(const Glib::ConstructParams& construct_params);
+ explicit CellRendererCombo(GtkCellRendererCombo* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkCellRendererCombo* gobj() { return reinterpret_cast<GtkCellRendererCombo*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkCellRendererCombo* gobj() const { return reinterpret_cast<GtkCellRendererCombo*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+public:
+
+ CellRendererCombo();
+
+ /** The model containing the possible values for the combo box.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy< Glib::RefPtr<Gtk::TreeModel> > property_model() ;
+
+/** The model containing the possible values for the combo box.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gtk::TreeModel> > property_model() const;
+
+ /** A column in the data source model to get the strings from.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_text_column() ;
+
+/** A column in the data source model to get the strings from.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_text_column() const;
+
+ /** If FALSE
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_has_entry() ;
+
+/** If FALSE
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_has_entry() const;
+
+
+ virtual Glib::PropertyProxy_Base _property_renderable(); //override
+
+
+};
+
+} /* namespace Gtk */
+
+
+namespace Glib
+{
+ /** @relates Gtk::CellRendererCombo
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::CellRendererCombo* wrap(GtkCellRendererCombo* object, bool take_copy = false);
+}
+#endif /* _GTKMM_CELLRENDERERCOMBO_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/cellrendererpixbuf.cc b/libs/gtkmm2/gtk/gtkmm/cellrendererpixbuf.cc
new file mode 100644
index 0000000000..bbf363d011
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/cellrendererpixbuf.cc
@@ -0,0 +1,199 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/cellrendererpixbuf.h>
+#include <gtkmm/private/cellrendererpixbuf_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#include <gtk/gtkcellrendererpixbuf.h>
+
+namespace Gtk
+{
+
+Glib::PropertyProxy_Base CellRendererPixbuf::_property_renderable()
+{
+ return property_pixbuf();
+}
+
+} //namespace Gtk
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::CellRendererPixbuf* wrap(GtkCellRendererPixbuf* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::CellRendererPixbuf *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& CellRendererPixbuf_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &CellRendererPixbuf_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_cell_renderer_pixbuf_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void CellRendererPixbuf_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* CellRendererPixbuf_Class::wrap_new(GObject* o)
+{
+ return manage(new CellRendererPixbuf((GtkCellRendererPixbuf*)(o)));
+
+}
+
+
+/* The implementation: */
+
+CellRendererPixbuf::CellRendererPixbuf(const Glib::ConstructParams& construct_params)
+:
+ Gtk::CellRenderer(construct_params)
+{
+ }
+
+CellRendererPixbuf::CellRendererPixbuf(GtkCellRendererPixbuf* castitem)
+:
+ Gtk::CellRenderer((GtkCellRenderer*)(castitem))
+{
+ }
+
+CellRendererPixbuf::~CellRendererPixbuf()
+{
+ destroy_();
+}
+
+CellRendererPixbuf::CppClassType CellRendererPixbuf::cellrendererpixbuf_class_; // initialize static member
+
+GType CellRendererPixbuf::get_type()
+{
+ return cellrendererpixbuf_class_.init().get_type();
+}
+
+GType CellRendererPixbuf::get_base_type()
+{
+ return gtk_cell_renderer_pixbuf_get_type();
+}
+
+
+CellRendererPixbuf::CellRendererPixbuf()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::CellRenderer(Glib::ConstructParams(cellrendererpixbuf_class_.init()))
+{
+ }
+
+
+Glib::PropertyProxy< Glib::RefPtr<Gdk::Pixbuf> > CellRendererPixbuf::property_pixbuf()
+{
+ return Glib::PropertyProxy< Glib::RefPtr<Gdk::Pixbuf> >(this, "pixbuf");
+}
+
+Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Pixbuf> > CellRendererPixbuf::property_pixbuf() const
+{
+ return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Pixbuf> >(this, "pixbuf");
+}
+
+Glib::PropertyProxy< Glib::RefPtr<Gdk::Pixbuf> > CellRendererPixbuf::property_pixbuf_expander_open()
+{
+ return Glib::PropertyProxy< Glib::RefPtr<Gdk::Pixbuf> >(this, "pixbuf-expander-open");
+}
+
+Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Pixbuf> > CellRendererPixbuf::property_pixbuf_expander_open() const
+{
+ return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Pixbuf> >(this, "pixbuf-expander-open");
+}
+
+Glib::PropertyProxy< Glib::RefPtr<Gdk::Pixbuf> > CellRendererPixbuf::property_pixbuf_expander_closed()
+{
+ return Glib::PropertyProxy< Glib::RefPtr<Gdk::Pixbuf> >(this, "pixbuf-expander-closed");
+}
+
+Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Pixbuf> > CellRendererPixbuf::property_pixbuf_expander_closed() const
+{
+ return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Pixbuf> >(this, "pixbuf-expander-closed");
+}
+
+Glib::PropertyProxy<Glib::ustring> CellRendererPixbuf::property_stock_id()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "stock-id");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> CellRendererPixbuf::property_stock_id() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "stock-id");
+}
+
+Glib::PropertyProxy<guint> CellRendererPixbuf::property_stock_size()
+{
+ return Glib::PropertyProxy<guint>(this, "stock-size");
+}
+
+Glib::PropertyProxy_ReadOnly<guint> CellRendererPixbuf::property_stock_size() const
+{
+ return Glib::PropertyProxy_ReadOnly<guint>(this, "stock-size");
+}
+
+Glib::PropertyProxy<Glib::ustring> CellRendererPixbuf::property_stock_detail()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "stock-detail");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> CellRendererPixbuf::property_stock_detail() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "stock-detail");
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/cellrendererpixbuf.h b/libs/gtkmm2/gtk/gtkmm/cellrendererpixbuf.h
new file mode 100644
index 0000000000..8380c76492
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/cellrendererpixbuf.h
@@ -0,0 +1,226 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_CELLRENDERERPIXBUF_H
+#define _GTKMM_CELLRENDERERPIXBUF_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* cellrenderertext.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/cellrenderer.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkCellRendererPixbuf GtkCellRendererPixbuf;
+typedef struct _GtkCellRendererPixbufClass GtkCellRendererPixbufClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class CellRendererPixbuf_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** Renders a pixbuf in a cell.
+ * A CellRendererPixbuf can be used to render an image in a cell. It allows you to render either a
+ * given Pixbuf (set via the pixbuf property) or a stock icon (set via the stock_id property).
+ *
+ * To support the tree view, CellRendererPixbuf also supports rendering two alternative pixbufs, when
+ * the is_expanded property is true. If the is_expanded property is true and the pixbuf_expander_open
+ * property is set to a pixbuf, it renders that pixbuf. If the is_expanded property is false and the *
+ * pixbuf_expander_closed property is set to a pixbuf, it renders that one.
+ *
+ * @ingroup TreeView
+ */
+
+class CellRendererPixbuf : public CellRenderer
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef CellRendererPixbuf CppObjectType;
+ typedef CellRendererPixbuf_Class CppClassType;
+ typedef GtkCellRendererPixbuf BaseObjectType;
+ typedef GtkCellRendererPixbufClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~CellRendererPixbuf();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class CellRendererPixbuf_Class;
+ static CppClassType cellrendererpixbuf_class_;
+
+ // noncopyable
+ CellRendererPixbuf(const CellRendererPixbuf&);
+ CellRendererPixbuf& operator=(const CellRendererPixbuf&);
+
+protected:
+ explicit CellRendererPixbuf(const Glib::ConstructParams& construct_params);
+ explicit CellRendererPixbuf(GtkCellRendererPixbuf* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkCellRendererPixbuf* gobj() { return reinterpret_cast<GtkCellRendererPixbuf*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkCellRendererPixbuf* gobj() const { return reinterpret_cast<GtkCellRendererPixbuf*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+public:
+
+ CellRendererPixbuf();
+
+ /** The pixbuf to render.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy< Glib::RefPtr<Gdk::Pixbuf> > property_pixbuf() ;
+
+/** The pixbuf to render.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Pixbuf> > property_pixbuf() const;
+
+ /** Pixbuf for open expander.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy< Glib::RefPtr<Gdk::Pixbuf> > property_pixbuf_expander_open() ;
+
+/** Pixbuf for open expander.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Pixbuf> > property_pixbuf_expander_open() const;
+
+ /** Pixbuf for closed expander.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy< Glib::RefPtr<Gdk::Pixbuf> > property_pixbuf_expander_closed() ;
+
+/** Pixbuf for closed expander.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Pixbuf> > property_pixbuf_expander_closed() const;
+
+ /** The stock ID of the stock icon to render.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_stock_id() ;
+
+/** The stock ID of the stock icon to render.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_stock_id() const;
+
+ /** The GtkIconSize value that specifies the size of the rendered icon.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<guint> property_stock_size() ;
+
+/** The GtkIconSize value that specifies the size of the rendered icon.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<guint> property_stock_size() const;
+
+ /** Render detail to pass to the theme engine.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_stock_detail() ;
+
+/** Render detail to pass to the theme engine.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_stock_detail() const;
+
+
+ virtual Glib::PropertyProxy_Base _property_renderable(); //override
+
+
+};
+
+} /* namespace Gtk */
+
+
+namespace Glib
+{
+ /** @relates Gtk::CellRendererPixbuf
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::CellRendererPixbuf* wrap(GtkCellRendererPixbuf* object, bool take_copy = false);
+}
+#endif /* _GTKMM_CELLRENDERERPIXBUF_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/cellrendererprogress.cc b/libs/gtkmm2/gtk/gtkmm/cellrendererprogress.cc
new file mode 100644
index 0000000000..e3f3b0ed4f
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/cellrendererprogress.cc
@@ -0,0 +1,161 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/cellrendererprogress.h>
+#include <gtkmm/private/cellrendererprogress_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 2004 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkcellrendererprogress.h>
+
+namespace Gtk
+{
+
+Glib::PropertyProxy_Base CellRendererProgress::_property_renderable()
+{
+ return _property_renderable();
+}
+
+
+} // namespace Gtk
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::CellRendererProgress* wrap(GtkCellRendererProgress* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::CellRendererProgress *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& CellRendererProgress_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &CellRendererProgress_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_cell_renderer_progress_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void CellRendererProgress_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* CellRendererProgress_Class::wrap_new(GObject* o)
+{
+ return manage(new CellRendererProgress((GtkCellRendererProgress*)(o)));
+
+}
+
+
+/* The implementation: */
+
+CellRendererProgress::CellRendererProgress(const Glib::ConstructParams& construct_params)
+:
+ Gtk::CellRenderer(construct_params)
+{
+ }
+
+CellRendererProgress::CellRendererProgress(GtkCellRendererProgress* castitem)
+:
+ Gtk::CellRenderer((GtkCellRenderer*)(castitem))
+{
+ }
+
+CellRendererProgress::~CellRendererProgress()
+{
+ destroy_();
+}
+
+CellRendererProgress::CppClassType CellRendererProgress::cellrendererprogress_class_; // initialize static member
+
+GType CellRendererProgress::get_type()
+{
+ return cellrendererprogress_class_.init().get_type();
+}
+
+GType CellRendererProgress::get_base_type()
+{
+ return gtk_cell_renderer_progress_get_type();
+}
+
+
+CellRendererProgress::CellRendererProgress()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::CellRenderer(Glib::ConstructParams(cellrendererprogress_class_.init()))
+{
+ }
+
+
+Glib::PropertyProxy<int> CellRendererProgress::property_value()
+{
+ return Glib::PropertyProxy<int>(this, "value");
+}
+
+Glib::PropertyProxy_ReadOnly<int> CellRendererProgress::property_value() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "value");
+}
+
+Glib::PropertyProxy<Glib::ustring> CellRendererProgress::property_text()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "text");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> CellRendererProgress::property_text() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "text");
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/cellrendererprogress.h b/libs/gtkmm2/gtk/gtkmm/cellrendererprogress.h
new file mode 100644
index 0000000000..7ad6132715
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/cellrendererprogress.h
@@ -0,0 +1,152 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_CELLRENDERERPROGRESS_H
+#define _GTKMM_CELLRENDERERPROGRESS_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 2004 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/cellrenderer.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkCellRendererProgress GtkCellRendererProgress;
+typedef struct _GtkCellRendererProgressClass GtkCellRendererProgressClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class CellRendererProgress_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** Renders numbers as progress bars.
+ *
+ * @ingroup TreeView
+ */
+
+class CellRendererProgress : public CellRenderer
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef CellRendererProgress CppObjectType;
+ typedef CellRendererProgress_Class CppClassType;
+ typedef GtkCellRendererProgress BaseObjectType;
+ typedef GtkCellRendererProgressClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~CellRendererProgress();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class CellRendererProgress_Class;
+ static CppClassType cellrendererprogress_class_;
+
+ // noncopyable
+ CellRendererProgress(const CellRendererProgress&);
+ CellRendererProgress& operator=(const CellRendererProgress&);
+
+protected:
+ explicit CellRendererProgress(const Glib::ConstructParams& construct_params);
+ explicit CellRendererProgress(GtkCellRendererProgress* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkCellRendererProgress* gobj() { return reinterpret_cast<GtkCellRendererProgress*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkCellRendererProgress* gobj() const { return reinterpret_cast<GtkCellRendererProgress*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+public:
+ CellRendererProgress();
+
+ /** Value of the progress bar.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_value() ;
+
+/** Value of the progress bar.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_value() const;
+
+ /** Text on the progress bar.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_text() ;
+
+/** Text on the progress bar.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_text() const;
+
+
+ virtual Glib::PropertyProxy_Base _property_renderable(); //override
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::CellRendererProgress
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::CellRendererProgress* wrap(GtkCellRendererProgress* object, bool take_copy = false);
+}
+#endif /* _GTKMM_CELLRENDERERPROGRESS_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/cellrenderertext.cc b/libs/gtkmm2/gtk/gtkmm/cellrenderertext.cc
new file mode 100644
index 0000000000..3ffd88a287
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/cellrenderertext.cc
@@ -0,0 +1,624 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/cellrenderertext.h>
+#include <gtkmm/private/cellrenderertext_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#include <gtk/gtkcellrenderertext.h>
+
+namespace Gtk
+{
+
+Glib::PropertyProxy_Base CellRendererText::_property_renderable()
+{
+ return property_text();
+}
+
+void CellRendererText::edited(const Glib::ustring& path, const Glib::ustring& new_text)
+{
+ g_signal_emit_by_name(gobj(), "edited", path.c_str(), new_text.c_str());
+}
+
+} // namespace Gtk
+
+
+namespace
+{
+
+void CellRendererText_signal_edited_callback(GtkCellRendererText* self, const gchar* p0,const gchar* p1,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,const Glib::ustring&,const Glib::ustring& > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::convert_const_gchar_ptr_to_ustring(p0)
+, Glib::convert_const_gchar_ptr_to_ustring(p1)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo CellRendererText_signal_edited_info =
+{
+ "edited",
+ (GCallback) &CellRendererText_signal_edited_callback,
+ (GCallback) &CellRendererText_signal_edited_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::CellRendererText* wrap(GtkCellRendererText* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::CellRendererText *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& CellRendererText_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &CellRendererText_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_cell_renderer_text_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void CellRendererText_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->edited = &edited_callback;
+}
+
+
+void CellRendererText_Class::edited_callback(GtkCellRendererText* self, const gchar* p0, const gchar* p1)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_edited(Glib::convert_const_gchar_ptr_to_ustring(p0)
+, Glib::convert_const_gchar_ptr_to_ustring(p1)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->edited)
+ (*base->edited)(self, p0, p1);
+ }
+}
+
+
+Glib::ObjectBase* CellRendererText_Class::wrap_new(GObject* o)
+{
+ return manage(new CellRendererText((GtkCellRendererText*)(o)));
+
+}
+
+
+/* The implementation: */
+
+CellRendererText::CellRendererText(const Glib::ConstructParams& construct_params)
+:
+ Gtk::CellRenderer(construct_params)
+{
+ }
+
+CellRendererText::CellRendererText(GtkCellRendererText* castitem)
+:
+ Gtk::CellRenderer((GtkCellRenderer*)(castitem))
+{
+ }
+
+CellRendererText::~CellRendererText()
+{
+ destroy_();
+}
+
+CellRendererText::CppClassType CellRendererText::cellrenderertext_class_; // initialize static member
+
+GType CellRendererText::get_type()
+{
+ return cellrenderertext_class_.init().get_type();
+}
+
+GType CellRendererText::get_base_type()
+{
+ return gtk_cell_renderer_text_get_type();
+}
+
+
+CellRendererText::CellRendererText()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::CellRenderer(Glib::ConstructParams(cellrenderertext_class_.init()))
+{
+ }
+
+void CellRendererText::set_fixed_height_from_font(int number_of_rows)
+{
+ gtk_cell_renderer_text_set_fixed_height_from_font(gobj(), number_of_rows);
+}
+
+
+Glib::SignalProxy2< void,const Glib::ustring&,const Glib::ustring& > CellRendererText::signal_edited()
+{
+ return Glib::SignalProxy2< void,const Glib::ustring&,const Glib::ustring& >(this, &CellRendererText_signal_edited_info);
+}
+
+
+Glib::PropertyProxy<Glib::ustring> CellRendererText::property_text()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "text");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> CellRendererText::property_text() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "text");
+}
+
+Glib::PropertyProxy_WriteOnly<Glib::ustring> CellRendererText::property_markup()
+{
+ return Glib::PropertyProxy_WriteOnly<Glib::ustring>(this, "markup");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> CellRendererText::property_markup() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "markup");
+}
+
+Glib::PropertyProxy<Pango::AttrList> CellRendererText::property_attributes()
+{
+ return Glib::PropertyProxy<Pango::AttrList>(this, "attributes");
+}
+
+Glib::PropertyProxy_ReadOnly<Pango::AttrList> CellRendererText::property_attributes() const
+{
+ return Glib::PropertyProxy_ReadOnly<Pango::AttrList>(this, "attributes");
+}
+
+Glib::PropertyProxy_WriteOnly<Glib::ustring> CellRendererText::property_background()
+{
+ return Glib::PropertyProxy_WriteOnly<Glib::ustring>(this, "background");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> CellRendererText::property_background() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "background");
+}
+
+Glib::PropertyProxy_WriteOnly<Glib::ustring> CellRendererText::property_foreground()
+{
+ return Glib::PropertyProxy_WriteOnly<Glib::ustring>(this, "foreground");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> CellRendererText::property_foreground() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "foreground");
+}
+
+Glib::PropertyProxy<Gdk::Color> CellRendererText::property_background_gdk()
+{
+ return Glib::PropertyProxy<Gdk::Color>(this, "background-gdk");
+}
+
+Glib::PropertyProxy_ReadOnly<Gdk::Color> CellRendererText::property_background_gdk() const
+{
+ return Glib::PropertyProxy_ReadOnly<Gdk::Color>(this, "background-gdk");
+}
+
+Glib::PropertyProxy<Gdk::Color> CellRendererText::property_foreground_gdk()
+{
+ return Glib::PropertyProxy<Gdk::Color>(this, "foreground-gdk");
+}
+
+Glib::PropertyProxy_ReadOnly<Gdk::Color> CellRendererText::property_foreground_gdk() const
+{
+ return Glib::PropertyProxy_ReadOnly<Gdk::Color>(this, "foreground-gdk");
+}
+
+Glib::PropertyProxy<Glib::ustring> CellRendererText::property_font()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "font");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> CellRendererText::property_font() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "font");
+}
+
+Glib::PropertyProxy<Pango::FontDescription> CellRendererText::property_font_desc()
+{
+ return Glib::PropertyProxy<Pango::FontDescription>(this, "font-desc");
+}
+
+Glib::PropertyProxy_ReadOnly<Pango::FontDescription> CellRendererText::property_font_desc() const
+{
+ return Glib::PropertyProxy_ReadOnly<Pango::FontDescription>(this, "font-desc");
+}
+
+Glib::PropertyProxy<Glib::ustring> CellRendererText::property_family()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "family");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> CellRendererText::property_family() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "family");
+}
+
+Glib::PropertyProxy<Pango::Style> CellRendererText::property_style()
+{
+ return Glib::PropertyProxy<Pango::Style>(this, "style");
+}
+
+Glib::PropertyProxy_ReadOnly<Pango::Style> CellRendererText::property_style() const
+{
+ return Glib::PropertyProxy_ReadOnly<Pango::Style>(this, "style");
+}
+
+Glib::PropertyProxy<Pango::Variant> CellRendererText::property_variant()
+{
+ return Glib::PropertyProxy<Pango::Variant>(this, "variant");
+}
+
+Glib::PropertyProxy_ReadOnly<Pango::Variant> CellRendererText::property_variant() const
+{
+ return Glib::PropertyProxy_ReadOnly<Pango::Variant>(this, "variant");
+}
+
+Glib::PropertyProxy<int> CellRendererText::property_weight()
+{
+ return Glib::PropertyProxy<int>(this, "weight");
+}
+
+Glib::PropertyProxy_ReadOnly<int> CellRendererText::property_weight() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "weight");
+}
+
+Glib::PropertyProxy<Pango::Stretch> CellRendererText::property_stretch()
+{
+ return Glib::PropertyProxy<Pango::Stretch>(this, "stretch");
+}
+
+Glib::PropertyProxy_ReadOnly<Pango::Stretch> CellRendererText::property_stretch() const
+{
+ return Glib::PropertyProxy_ReadOnly<Pango::Stretch>(this, "stretch");
+}
+
+Glib::PropertyProxy<int> CellRendererText::property_size()
+{
+ return Glib::PropertyProxy<int>(this, "size");
+}
+
+Glib::PropertyProxy_ReadOnly<int> CellRendererText::property_size() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "size");
+}
+
+Glib::PropertyProxy<double> CellRendererText::property_size_points()
+{
+ return Glib::PropertyProxy<double>(this, "size-points");
+}
+
+Glib::PropertyProxy_ReadOnly<double> CellRendererText::property_size_points() const
+{
+ return Glib::PropertyProxy_ReadOnly<double>(this, "size-points");
+}
+
+Glib::PropertyProxy<double> CellRendererText::property_scale()
+{
+ return Glib::PropertyProxy<double>(this, "scale");
+}
+
+Glib::PropertyProxy_ReadOnly<double> CellRendererText::property_scale() const
+{
+ return Glib::PropertyProxy_ReadOnly<double>(this, "scale");
+}
+
+Glib::PropertyProxy<bool> CellRendererText::property_editable()
+{
+ return Glib::PropertyProxy<bool>(this, "editable");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> CellRendererText::property_editable() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "editable");
+}
+
+Glib::PropertyProxy<bool> CellRendererText::property_strikethrough()
+{
+ return Glib::PropertyProxy<bool>(this, "strikethrough");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> CellRendererText::property_strikethrough() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "strikethrough");
+}
+
+Glib::PropertyProxy<Pango::Underline> CellRendererText::property_underline()
+{
+ return Glib::PropertyProxy<Pango::Underline>(this, "underline");
+}
+
+Glib::PropertyProxy_ReadOnly<Pango::Underline> CellRendererText::property_underline() const
+{
+ return Glib::PropertyProxy_ReadOnly<Pango::Underline>(this, "underline");
+}
+
+Glib::PropertyProxy<int> CellRendererText::property_rise()
+{
+ return Glib::PropertyProxy<int>(this, "rise");
+}
+
+Glib::PropertyProxy_ReadOnly<int> CellRendererText::property_rise() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "rise");
+}
+
+Glib::PropertyProxy<Glib::ustring> CellRendererText::property_language()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "language");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> CellRendererText::property_language() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "language");
+}
+
+Glib::PropertyProxy<bool> CellRendererText::property_ellipsize()
+{
+ return Glib::PropertyProxy<bool>(this, "ellipsize");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> CellRendererText::property_ellipsize() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "ellipsize");
+}
+
+Glib::PropertyProxy<bool> CellRendererText::property_background_set()
+{
+ return Glib::PropertyProxy<bool>(this, "background-set");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> CellRendererText::property_background_set() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "background-set");
+}
+
+Glib::PropertyProxy<bool> CellRendererText::property_foreground_set()
+{
+ return Glib::PropertyProxy<bool>(this, "foreground-set");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> CellRendererText::property_foreground_set() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "foreground-set");
+}
+
+Glib::PropertyProxy<bool> CellRendererText::property_family_set()
+{
+ return Glib::PropertyProxy<bool>(this, "family-set");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> CellRendererText::property_family_set() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "family-set");
+}
+
+Glib::PropertyProxy<bool> CellRendererText::property_style_set()
+{
+ return Glib::PropertyProxy<bool>(this, "style-set");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> CellRendererText::property_style_set() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "style-set");
+}
+
+Glib::PropertyProxy<bool> CellRendererText::property_variant_set()
+{
+ return Glib::PropertyProxy<bool>(this, "variant-set");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> CellRendererText::property_variant_set() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "variant-set");
+}
+
+Glib::PropertyProxy<bool> CellRendererText::property_weight_set()
+{
+ return Glib::PropertyProxy<bool>(this, "weight-set");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> CellRendererText::property_weight_set() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "weight-set");
+}
+
+Glib::PropertyProxy<bool> CellRendererText::property_stretch_set()
+{
+ return Glib::PropertyProxy<bool>(this, "stretch-set");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> CellRendererText::property_stretch_set() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "stretch-set");
+}
+
+Glib::PropertyProxy<bool> CellRendererText::property_size_set()
+{
+ return Glib::PropertyProxy<bool>(this, "size-set");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> CellRendererText::property_size_set() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "size-set");
+}
+
+Glib::PropertyProxy<bool> CellRendererText::property_scale_set()
+{
+ return Glib::PropertyProxy<bool>(this, "scale-set");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> CellRendererText::property_scale_set() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "scale-set");
+}
+
+Glib::PropertyProxy<bool> CellRendererText::property_editable_set()
+{
+ return Glib::PropertyProxy<bool>(this, "editable-set");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> CellRendererText::property_editable_set() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "editable-set");
+}
+
+Glib::PropertyProxy<bool> CellRendererText::property_strikethrough_set()
+{
+ return Glib::PropertyProxy<bool>(this, "strikethrough-set");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> CellRendererText::property_strikethrough_set() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "strikethrough-set");
+}
+
+Glib::PropertyProxy<bool> CellRendererText::property_underline_set()
+{
+ return Glib::PropertyProxy<bool>(this, "underline-set");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> CellRendererText::property_underline_set() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "underline-set");
+}
+
+Glib::PropertyProxy<bool> CellRendererText::property_rise_set()
+{
+ return Glib::PropertyProxy<bool>(this, "rise-set");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> CellRendererText::property_rise_set() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "rise-set");
+}
+
+Glib::PropertyProxy<bool> CellRendererText::property_language_set()
+{
+ return Glib::PropertyProxy<bool>(this, "language-set");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> CellRendererText::property_language_set() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "language-set");
+}
+
+Glib::PropertyProxy<bool> CellRendererText::property_ellipsize_set()
+{
+ return Glib::PropertyProxy<bool>(this, "ellipsize-set");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> CellRendererText::property_ellipsize_set() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "ellipsize-set");
+}
+
+Glib::PropertyProxy<bool> CellRendererText::property_single_paragraph_mode()
+{
+ return Glib::PropertyProxy<bool>(this, "single-paragraph-mode");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> CellRendererText::property_single_paragraph_mode() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "single-paragraph-mode");
+}
+
+
+void Gtk::CellRendererText::on_edited(const Glib::ustring& path, const Glib::ustring& new_text)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->edited)
+ (*base->edited)(gobj(),path.c_str(),new_text.c_str());
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/cellrenderertext.h b/libs/gtkmm2/gtk/gtkmm/cellrenderertext.h
new file mode 100644
index 0000000000..9135cdf83a
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/cellrenderertext.h
@@ -0,0 +1,769 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_CELLRENDERERTEXT_H
+#define _GTKMM_CELLRENDERERTEXT_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/cellrenderer.h>
+#include <pangomm/attrlist.h>
+#include <pangomm/fontdescription.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkCellRendererText GtkCellRendererText;
+typedef struct _GtkCellRendererTextClass GtkCellRendererTextClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class CellRendererText_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** Renders text in a cell.
+ *
+ * @ingroup TreeView
+ */
+
+class CellRendererText : public CellRenderer
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef CellRendererText CppObjectType;
+ typedef CellRendererText_Class CppClassType;
+ typedef GtkCellRendererText BaseObjectType;
+ typedef GtkCellRendererTextClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~CellRendererText();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class CellRendererText_Class;
+ static CppClassType cellrenderertext_class_;
+
+ // noncopyable
+ CellRendererText(const CellRendererText&);
+ CellRendererText& operator=(const CellRendererText&);
+
+protected:
+ explicit CellRendererText(const Glib::ConstructParams& construct_params);
+ explicit CellRendererText(GtkCellRendererText* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkCellRendererText* gobj() { return reinterpret_cast<GtkCellRendererText*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkCellRendererText* gobj() const { return reinterpret_cast<GtkCellRendererText*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_edited(const Glib::ustring& path, const Glib::ustring& new_text);
+
+
+private:
+
+public:
+ CellRendererText();
+
+
+ /** Sets the height of a renderer to explicitly be determined by the "font" and
+ * "y_pad" property set on it. Further changes in these properties do not
+ * affect the height, so they must be accompanied by a subsequent call to this
+ * function. Using this function is unflexible, and should really only be used
+ * if calculating the size of a cell is too slow (ie, a massive number of cells
+ * displayed). If @a number_of_rows is -1, then the fixed height is unset, and
+ * the height is determined by the properties again.
+ * @param number_of_rows Number of rows of text each cell renderer is allocated, or -1.
+ */
+ void set_fixed_height_from_font(int number_of_rows);
+
+
+ Glib::SignalProxy2< void,const Glib::ustring&,const Glib::ustring& > signal_edited();
+
+
+ /** Text to render.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_text() ;
+
+/** Text to render.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_text() const;
+
+ /** Marked up text to render.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_WriteOnly<Glib::ustring> property_markup() ;
+
+/** Marked up text to render.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_markup() const;
+
+ /** A list of style attributes to apply to the text of the renderer.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Pango::AttrList> property_attributes() ;
+
+/** A list of style attributes to apply to the text of the renderer.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Pango::AttrList> property_attributes() const;
+
+ /** Background color as a string.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_WriteOnly<Glib::ustring> property_background() ;
+
+/** Background color as a string.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_background() const;
+
+ /** Foreground color as a string.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_WriteOnly<Glib::ustring> property_foreground() ;
+
+/** Foreground color as a string.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_foreground() const;
+
+ /** Background color as a GdkColor.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Gdk::Color> property_background_gdk() ;
+
+/** Background color as a GdkColor.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Gdk::Color> property_background_gdk() const;
+
+ /** Foreground color as a GdkColor.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Gdk::Color> property_foreground_gdk() ;
+
+/** Foreground color as a GdkColor.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Gdk::Color> property_foreground_gdk() const;
+
+ /** Font description as a string.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_font() ;
+
+/** Font description as a string.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_font() const;
+
+ /** Font description as a PangoFontDescription struct.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Pango::FontDescription> property_font_desc() ;
+
+/** Font description as a PangoFontDescription struct.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Pango::FontDescription> property_font_desc() const;
+
+ /** Name of the font family
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_family() ;
+
+/** Name of the font family
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_family() const;
+
+ /** Font style.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Pango::Style> property_style() ;
+
+/** Font style.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Pango::Style> property_style() const;
+
+ /** Font variant.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Pango::Variant> property_variant() ;
+
+/** Font variant.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Pango::Variant> property_variant() const;
+
+ /** Font weight.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_weight() ;
+
+/** Font weight.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_weight() const;
+
+ /** Font stretch.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Pango::Stretch> property_stretch() ;
+
+/** Font stretch.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Pango::Stretch> property_stretch() const;
+
+ /** Font size.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_size() ;
+
+/** Font size.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_size() const;
+
+ /** Font size in points.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<double> property_size_points() ;
+
+/** Font size in points.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<double> property_size_points() const;
+
+ /** Font scaling factor.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<double> property_scale() ;
+
+/** Font scaling factor.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<double> property_scale() const;
+
+ /** Whether the text can be modified by the user.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_editable() ;
+
+/** Whether the text can be modified by the user.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_editable() const;
+
+ /** Whether to strike through the text.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_strikethrough() ;
+
+/** Whether to strike through the text.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_strikethrough() const;
+
+ /** Style of underline for this text.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Pango::Underline> property_underline() ;
+
+/** Style of underline for this text.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Pango::Underline> property_underline() const;
+
+ /** Offset of text above the baseline (below the baseline if rise is negative).
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_rise() ;
+
+/** Offset of text above the baseline (below the baseline if rise is negative).
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_rise() const;
+
+ /** The language this text is in
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_language() ;
+
+/** The language this text is in
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_language() const;
+
+ /** The preferred place to ellipsize the string
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_ellipsize() ;
+
+/** The preferred place to ellipsize the string
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_ellipsize() const;
+
+ /** Whether this tag affects the background color.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_background_set() ;
+
+/** Whether this tag affects the background color.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_background_set() const;
+
+ /** Whether this tag affects the foreground color.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_foreground_set() ;
+
+/** Whether this tag affects the foreground color.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_foreground_set() const;
+
+ /** Whether this tag affects the font family.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_family_set() ;
+
+/** Whether this tag affects the font family.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_family_set() const;
+
+ /** Whether this tag affects the font style.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_style_set() ;
+
+/** Whether this tag affects the font style.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_style_set() const;
+
+ /** Whether this tag affects the font variant.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_variant_set() ;
+
+/** Whether this tag affects the font variant.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_variant_set() const;
+
+ /** Whether this tag affects the font weight.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_weight_set() ;
+
+/** Whether this tag affects the font weight.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_weight_set() const;
+
+ /** Whether this tag affects the font stretch.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_stretch_set() ;
+
+/** Whether this tag affects the font stretch.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_stretch_set() const;
+
+ /** Whether this tag affects the font size.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_size_set() ;
+
+/** Whether this tag affects the font size.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_size_set() const;
+
+ /** Whether this tag scales the font size by a factor.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_scale_set() ;
+
+/** Whether this tag scales the font size by a factor.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_scale_set() const;
+
+ /** Whether this tag affects text editability.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_editable_set() ;
+
+/** Whether this tag affects text editability.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_editable_set() const;
+
+ /** Whether this tag affects strikethrough.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_strikethrough_set() ;
+
+/** Whether this tag affects strikethrough.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_strikethrough_set() const;
+
+ /** Whether this tag affects underlining.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_underline_set() ;
+
+/** Whether this tag affects underlining.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_underline_set() const;
+
+ /** Whether this tag affects the rise.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_rise_set() ;
+
+/** Whether this tag affects the rise.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_rise_set() const;
+
+ /** Whether this tag affects the language the text is rendered as.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_language_set() ;
+
+/** Whether this tag affects the language the text is rendered as.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_language_set() const;
+
+ /** Whether this tag affects the ellipsize mode.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_ellipsize_set() ;
+
+/** Whether this tag affects the ellipsize mode.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_ellipsize_set() const;
+
+ /** Whether or not to keep all text in a single paragraph.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_single_paragraph_mode() ;
+
+/** Whether or not to keep all text in a single paragraph.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_single_paragraph_mode() const;
+
+
+ virtual Glib::PropertyProxy_Base _property_renderable(); //override
+
+protected:
+ /** Emits the "edited" signal.
+ * This is useful when implementing custom CellRenderers.
+ */
+ void edited(const Glib::ustring& path, const Glib::ustring& new_text);
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::CellRendererText
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::CellRendererText* wrap(GtkCellRendererText* object, bool take_copy = false);
+}
+#endif /* _GTKMM_CELLRENDERERTEXT_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/cellrenderertoggle.cc b/libs/gtkmm2/gtk/gtkmm/cellrenderertoggle.cc
new file mode 100644
index 0000000000..023c5382dd
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/cellrenderertoggle.cc
@@ -0,0 +1,273 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/cellrenderertoggle.h>
+#include <gtkmm/private/cellrenderertoggle_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkcellrenderertoggle.h>
+
+namespace Gtk
+{
+
+Glib::PropertyProxy_Base CellRendererToggle::_property_renderable()
+{
+ return property_active();
+}
+
+} //namespace Gtk
+
+
+namespace
+{
+
+void CellRendererToggle_signal_toggled_callback(GtkCellRendererToggle* self, const gchar* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,const Glib::ustring& > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::convert_const_gchar_ptr_to_ustring(p0)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo CellRendererToggle_signal_toggled_info =
+{
+ "toggled",
+ (GCallback) &CellRendererToggle_signal_toggled_callback,
+ (GCallback) &CellRendererToggle_signal_toggled_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::CellRendererToggle* wrap(GtkCellRendererToggle* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::CellRendererToggle *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& CellRendererToggle_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &CellRendererToggle_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_cell_renderer_toggle_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void CellRendererToggle_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->toggled = &toggled_callback;
+}
+
+
+void CellRendererToggle_Class::toggled_callback(GtkCellRendererToggle* self, const gchar* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_toggled(Glib::convert_const_gchar_ptr_to_ustring(p0)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->toggled)
+ (*base->toggled)(self, p0);
+ }
+}
+
+
+Glib::ObjectBase* CellRendererToggle_Class::wrap_new(GObject* o)
+{
+ return manage(new CellRendererToggle((GtkCellRendererToggle*)(o)));
+
+}
+
+
+/* The implementation: */
+
+CellRendererToggle::CellRendererToggle(const Glib::ConstructParams& construct_params)
+:
+ Gtk::CellRenderer(construct_params)
+{
+ }
+
+CellRendererToggle::CellRendererToggle(GtkCellRendererToggle* castitem)
+:
+ Gtk::CellRenderer((GtkCellRenderer*)(castitem))
+{
+ }
+
+CellRendererToggle::~CellRendererToggle()
+{
+ destroy_();
+}
+
+CellRendererToggle::CppClassType CellRendererToggle::cellrenderertoggle_class_; // initialize static member
+
+GType CellRendererToggle::get_type()
+{
+ return cellrenderertoggle_class_.init().get_type();
+}
+
+GType CellRendererToggle::get_base_type()
+{
+ return gtk_cell_renderer_toggle_get_type();
+}
+
+
+CellRendererToggle::CellRendererToggle()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::CellRenderer(Glib::ConstructParams(cellrenderertoggle_class_.init()))
+{
+ }
+
+bool CellRendererToggle::get_radio() const
+{
+ return gtk_cell_renderer_toggle_get_radio(const_cast<GtkCellRendererToggle*>(gobj()));
+}
+
+void CellRendererToggle::set_radio(bool radio)
+{
+ gtk_cell_renderer_toggle_set_radio(gobj(), static_cast<int>(radio));
+}
+
+bool CellRendererToggle::get_active() const
+{
+ return gtk_cell_renderer_toggle_get_active(const_cast<GtkCellRendererToggle*>(gobj()));
+}
+
+void CellRendererToggle::set_active(bool setting)
+{
+ gtk_cell_renderer_toggle_set_active(gobj(), static_cast<int>(setting));
+}
+
+
+Glib::SignalProxy1< void,const Glib::ustring& > CellRendererToggle::signal_toggled()
+{
+ return Glib::SignalProxy1< void,const Glib::ustring& >(this, &CellRendererToggle_signal_toggled_info);
+}
+
+
+Glib::PropertyProxy<bool> CellRendererToggle::property_activatable()
+{
+ return Glib::PropertyProxy<bool>(this, "activatable");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> CellRendererToggle::property_activatable() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "activatable");
+}
+
+Glib::PropertyProxy<bool> CellRendererToggle::property_active()
+{
+ return Glib::PropertyProxy<bool>(this, "active");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> CellRendererToggle::property_active() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "active");
+}
+
+Glib::PropertyProxy<bool> CellRendererToggle::property_radio()
+{
+ return Glib::PropertyProxy<bool>(this, "radio");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> CellRendererToggle::property_radio() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "radio");
+}
+
+
+void Gtk::CellRendererToggle::on_toggled(const Glib::ustring& path)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->toggled)
+ (*base->toggled)(gobj(),path.c_str());
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/cellrenderertoggle.h b/libs/gtkmm2/gtk/gtkmm/cellrenderertoggle.h
new file mode 100644
index 0000000000..293f4e7750
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/cellrenderertoggle.h
@@ -0,0 +1,206 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_CELLRENDERERTOGGLE_H
+#define _GTKMM_CELLRENDERERTOGGLE_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* cellrenderertoggle.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/cellrenderer.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkCellRendererToggle GtkCellRendererToggle;
+typedef struct _GtkCellRendererToggleClass GtkCellRendererToggleClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class CellRendererToggle_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** Renders a toggle button in a cell.
+ * The button is drawn as a radio- or checkbutton, depending on the radio property. When activated, it
+ * emits the toggled signal.
+ *
+ * @ingroup TreeView
+ */
+
+class CellRendererToggle : public CellRenderer
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef CellRendererToggle CppObjectType;
+ typedef CellRendererToggle_Class CppClassType;
+ typedef GtkCellRendererToggle BaseObjectType;
+ typedef GtkCellRendererToggleClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~CellRendererToggle();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class CellRendererToggle_Class;
+ static CppClassType cellrenderertoggle_class_;
+
+ // noncopyable
+ CellRendererToggle(const CellRendererToggle&);
+ CellRendererToggle& operator=(const CellRendererToggle&);
+
+protected:
+ explicit CellRendererToggle(const Glib::ConstructParams& construct_params);
+ explicit CellRendererToggle(GtkCellRendererToggle* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkCellRendererToggle* gobj() { return reinterpret_cast<GtkCellRendererToggle*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkCellRendererToggle* gobj() const { return reinterpret_cast<GtkCellRendererToggle*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_toggled(const Glib::ustring& path);
+
+
+private:
+
+public:
+
+ CellRendererToggle();
+
+
+ /** Returns wether we're rendering radio toggles rather than checkboxes.
+ * @return <tt>true</tt> if we're rendering radio toggles rather than checkboxes.
+ */
+ bool get_radio() const;
+
+ /** If @a radio is <tt>true</tt>, the cell renderer renders a radio toggle
+ * (i.e.\ a toggle in a group of mutually-exclusive toggles).
+ * If <tt>false</tt>, it renders a check toggle (a standalone boolean option).
+ * This can be set globally for the cell renderer, or changed just
+ * before rendering each cell in the model (for Gtk::TreeView, you set
+ * up a per-row setting using Gtk::TreeViewColumn to associate model
+ * columns with cell renderer properties).
+ * @param radio <tt>true</tt> to make the toggle look like a radio button.
+ */
+ void set_radio(bool radio = true);
+
+ /** Returns whether the cell renderer is active. See
+ * set_active().
+ * @return <tt>true</tt> if the cell renderer is active.
+ */
+ bool get_active() const;
+
+ /** Activates or deactivates a cell renderer.
+ * @param setting The value to set.
+ */
+ void set_active(bool setting = true);
+
+
+ Glib::SignalProxy1< void,const Glib::ustring& > signal_toggled();
+
+
+ /** The toggle button can be activated.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_activatable() ;
+
+/** The toggle button can be activated.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_activatable() const;
+
+ /** The toggle state of the button.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_active() ;
+
+/** The toggle state of the button.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_active() const;
+
+ /** Draw the toggle button as a radio button.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_radio() ;
+
+/** Draw the toggle button as a radio button.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_radio() const;
+
+
+ virtual Glib::PropertyProxy_Base _property_renderable(); //override
+
+
+};
+
+} /* namespace Gtk */
+
+
+namespace Glib
+{
+ /** @relates Gtk::CellRendererToggle
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::CellRendererToggle* wrap(GtkCellRendererToggle* object, bool take_copy = false);
+}
+#endif /* _GTKMM_CELLRENDERERTOGGLE_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/cellview.cc b/libs/gtkmm2/gtk/gtkmm/cellview.cc
new file mode 100644
index 0000000000..5b57ccf3a0
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/cellview.cc
@@ -0,0 +1,199 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/cellview.h>
+#include <gtkmm/private/cellview_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/cellrenderertext.h>
+#include <gtkmm/cellrendererpixbuf.h>
+#include <gtk/gtkcellview.h>
+
+namespace Gtk
+{
+
+CellView::CellView(const Glib::ustring& text, bool use_markup)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Widget(Glib::ConstructParams(cellview_class_.init(), (char*) 0))
+{
+ Gtk::CellRendererText* cell = Gtk::manage(new Gtk::CellRendererText());
+
+ if(use_markup)
+ cell->property_markup() = text;
+ else
+ cell->property_text() = text;
+
+ pack_start(*cell);
+}
+
+CellView::CellView(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Widget(Glib::ConstructParams(cellview_class_.init(), (char*) 0))
+{
+ Gtk::CellRendererPixbuf* cell = Gtk::manage(new Gtk::CellRendererPixbuf());
+ cell->property_pixbuf() = pixbuf;
+
+ pack_start(*cell);
+}
+
+
+} //namespace Gtk
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::CellView* wrap(GtkCellView* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::CellView *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& CellView_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &CellView_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_cell_view_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ CellLayout::add_interface(get_type());
+ }
+
+ return *this;
+}
+
+void CellView_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* CellView_Class::wrap_new(GObject* o)
+{
+ return manage(new CellView((GtkCellView*)(o)));
+
+}
+
+
+/* The implementation: */
+
+CellView::CellView(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Widget(construct_params)
+{
+ }
+
+CellView::CellView(GtkCellView* castitem)
+:
+ Gtk::Widget((GtkWidget*)(castitem))
+{
+ }
+
+CellView::~CellView()
+{
+ destroy_();
+}
+
+CellView::CppClassType CellView::cellview_class_; // initialize static member
+
+GType CellView::get_type()
+{
+ return cellview_class_.init().get_type();
+}
+
+GType CellView::get_base_type()
+{
+ return gtk_cell_view_get_type();
+}
+
+
+CellView::CellView()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Widget(Glib::ConstructParams(cellview_class_.init()))
+{
+ }
+
+void CellView::set_model(const Glib::RefPtr<TreeModel>& model)
+{
+ gtk_cell_view_set_model(gobj(), Glib::unwrap(model));
+}
+
+void CellView::set_displayed_row(const TreeModel::Path& path)
+{
+ gtk_cell_view_set_displayed_row(gobj(), const_cast<GtkTreePath*>((path).gobj()));
+}
+
+TreeModel::Path CellView::get_displayed_row() const
+{
+ return Gtk::TreePath(gtk_cell_view_get_displayed_row(const_cast<GtkCellView*>(gobj())), false);
+}
+
+bool CellView::get_size_of_row(const TreeModel::Path& path, Requisition& requisition) const
+{
+ return gtk_cell_view_get_size_of_row(const_cast<GtkCellView*>(gobj()), const_cast<GtkTreePath*>((path).gobj()), (GtkRequisition*)(&requisition));
+}
+
+void CellView::set_background_color(const Gdk::Color& color)
+{
+ gtk_cell_view_set_background_color(gobj(), (color).gobj());
+}
+
+Glib::ListHandle<CellRenderer*> CellView::get_cell_renderers()
+{
+ return Glib::ListHandle<CellRenderer*>(gtk_cell_view_get_cell_renderers(gobj()), Glib::OWNERSHIP_SHALLOW);
+}
+
+Glib::ListHandle<const CellRenderer*> CellView::get_cell_renderers() const
+{
+ return Glib::ListHandle<const CellRenderer*>(gtk_cell_view_get_cell_renderers(const_cast<GtkCellView*>(gobj())), Glib::OWNERSHIP_SHALLOW);
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/cellview.h b/libs/gtkmm2/gtk/gtkmm/cellview.h
new file mode 100644
index 0000000000..6e798c5f56
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/cellview.h
@@ -0,0 +1,210 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_CELLVIEW_H
+#define _GTKMM_CELLVIEW_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* cellview.h
+ *
+ * Copyright (C) 2004 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#include <gtkmm/widget.h>
+#include <gtkmm/celllayout.h>
+#include <gtkmm/treemodel.h>
+#include <gtkmm/treepath.h>
+#include <gtkmm/cellrenderer.h>
+#include <gdkmm/pixbuf.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkCellView GtkCellView;
+typedef struct _GtkCellViewClass GtkCellViewClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class CellView_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** A widget displaying a single row of a TreeModel.
+ * A CellView displays a single row of a TreeModel, using cell renderers just like TreeView. CellView doesn't support some of the more
+ * complex features of GtkTreeView, like cell editing and drag and drop.
+ *
+ * @ingroup Widgets
+ */
+
+class CellView :
+ public Widget,
+ public CellLayout
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef CellView CppObjectType;
+ typedef CellView_Class CppClassType;
+ typedef GtkCellView BaseObjectType;
+ typedef GtkCellViewClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~CellView();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class CellView_Class;
+ static CppClassType cellview_class_;
+
+ // noncopyable
+ CellView(const CellView&);
+ CellView& operator=(const CellView&);
+
+protected:
+ explicit CellView(const Glib::ConstructParams& construct_params);
+ explicit CellView(GtkCellView* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkCellView* gobj() { return reinterpret_cast<GtkCellView*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkCellView* gobj() const { return reinterpret_cast<GtkCellView*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+
+public:
+ CellView();
+
+ /** Creates a new CellView widget, adds a CellRendererText to it, and makes it show the text.
+ * Optionally, the text can be marked up with the Pango text markup language.
+ *
+ * @param text The text to display in the cell view
+ * @param markup Whether the @a text uses Pango text markup language.
+ */
+ explicit CellView(const Glib::ustring& text, bool use_markup = false);
+
+
+ /** Creates a new CellView widget, adds a CellRendererPixbuf to it, and makes it show the pixbuf.
+ *
+ * @param pixbuf The image to display in the cell view
+ * @param markup Whether the @a text uses Pango text markup language.
+ */
+ explicit CellView(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf);
+
+
+ //_WRAP_METHOD(void set_value(CellRenderer& renderer, const Glib::ustring& property, const Glib::ValueBase& value), gtk_cell_view_set_value)
+
+
+ /** Sets the model for @a cell_view . If @a cell_view already has a model
+ * set, it will remove it before setting the new model. If @a model is
+ * <tt>0</tt>, then it will unset the old model.
+ *
+ * Since: 2.6
+ * @param model A Gtk::TreeModel.
+ */
+ void set_model(const Glib::RefPtr<TreeModel>& model);
+
+ /** Sets the row of the model that is currently displayed
+ * by the Gtk::CellView. If the path is unset, then the
+ * contents of the cellview "stick" at their last value;
+ * this is not normally a desired result, but may be
+ * a needed intermediate state if say, the model for
+ * the Gtk::CellView becomes temporarily empty.
+ *
+ * Since: 2.6
+ * @param path A Gtk::TreePath or <tt>0</tt> to unset.
+ */
+ void set_displayed_row(const TreeModel::Path& path);
+
+ TreeModel::Path get_displayed_row() const;
+
+ /** Sets @a requisition to the size needed by @a cell_view to display
+ * the model row pointed to by @a path .
+ * @param path A Gtk::TreePath.
+ * @param requisition Return location for the size.
+ * @return <tt>true</tt>
+ *
+ * Since: 2.6.
+ */
+ bool get_size_of_row(const TreeModel::Path& path, Requisition& requisition) const;
+
+
+ /** Sets the background color of @a view .
+ *
+ * Since: 2.6
+ * @param color The new background color.
+ */
+ void set_background_color(const Gdk::Color& color);
+
+
+ /** Returns the cell renderers which have been added to @a cell_view .
+ * @return A list of cell renderers. The list, but not the
+ * renderers has been newly allocated and should be freed with
+ * Glib::list_free() when no longer needed.
+ *
+ * Since: 2.6.
+ */
+ Glib::ListHandle<CellRenderer*> get_cell_renderers();
+
+ /** Returns the cell renderers which have been added to @a cell_view .
+ * @return A list of cell renderers. The list, but not the
+ * renderers has been newly allocated and should be freed with
+ * Glib::list_free() when no longer needed.
+ *
+ * Since: 2.6.
+ */
+ Glib::ListHandle<const CellRenderer*> get_cell_renderers() const;
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::CellView
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::CellView* wrap(GtkCellView* object, bool take_copy = false);
+}
+#endif /* _GTKMM_CELLVIEW_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/checkbutton.cc b/libs/gtkmm2/gtk/gtkmm/checkbutton.cc
new file mode 100644
index 0000000000..110d0c5edc
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/checkbutton.cc
@@ -0,0 +1,186 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/checkbutton.h>
+#include <gtkmm/private/checkbutton_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkcheckbutton.h>
+
+namespace Gtk
+{
+
+CheckButton::CheckButton(const Glib::ustring& label, bool mnemonic)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::ToggleButton(Glib::ConstructParams(checkbutton_class_.init(), "label",label.c_str(),"use_underline",gboolean(mnemonic), (char*) 0))
+{}
+
+} // namespace Gtk
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::CheckButton* wrap(GtkCheckButton* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::CheckButton *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& CheckButton_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &CheckButton_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_check_button_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void CheckButton_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->draw_indicator = &draw_indicator_vfunc_callback;
+}
+
+void CheckButton_Class::draw_indicator_vfunc_callback(GtkCheckButton* self, GdkRectangle* area)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->draw_indicator_vfunc(area);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->draw_indicator)
+ (*base->draw_indicator)(self, area);
+ }
+}
+
+
+Glib::ObjectBase* CheckButton_Class::wrap_new(GObject* o)
+{
+ return manage(new CheckButton((GtkCheckButton*)(o)));
+
+}
+
+
+/* The implementation: */
+
+CheckButton::CheckButton(const Glib::ConstructParams& construct_params)
+:
+ Gtk::ToggleButton(construct_params)
+{
+ }
+
+CheckButton::CheckButton(GtkCheckButton* castitem)
+:
+ Gtk::ToggleButton((GtkToggleButton*)(castitem))
+{
+ }
+
+CheckButton::~CheckButton()
+{
+ destroy_();
+}
+
+CheckButton::CppClassType CheckButton::checkbutton_class_; // initialize static member
+
+GType CheckButton::get_type()
+{
+ return checkbutton_class_.init().get_type();
+}
+
+GType CheckButton::get_base_type()
+{
+ return gtk_check_button_get_type();
+}
+
+
+CheckButton::CheckButton()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::ToggleButton(Glib::ConstructParams(checkbutton_class_.init()))
+{
+ }
+
+
+void Gtk::CheckButton::draw_indicator_vfunc(GdkRectangle* area)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->draw_indicator)
+ (*base->draw_indicator)(gobj(),area);
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/checkbutton.h b/libs/gtkmm2/gtk/gtkmm/checkbutton.h
new file mode 100644
index 0000000000..bff262d400
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/checkbutton.h
@@ -0,0 +1,151 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_CHECKBUTTON_H
+#define _GTKMM_CHECKBUTTON_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* checkbutton.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/togglebutton.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkCheckButton GtkCheckButton;
+typedef struct _GtkCheckButtonClass GtkCheckButtonClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class CheckButton_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** Create widgets with a discrete toggle button.
+ *
+ * A Gtk::CheckButton places a discrete Gtk::ToggleButton next to a widget,
+ * (usually a Gtk::Label). See Gtk::ToggleButton widgets for more
+ * information about toggle/check buttons. The important signal,
+ * signal_toggled() is also inherited from Gtk::ToggleButton.
+ *
+ * @ingroup Widgets
+ */
+
+class CheckButton : public ToggleButton
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef CheckButton CppObjectType;
+ typedef CheckButton_Class CppClassType;
+ typedef GtkCheckButton BaseObjectType;
+ typedef GtkCheckButtonClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~CheckButton();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class CheckButton_Class;
+ static CppClassType checkbutton_class_;
+
+ // noncopyable
+ CheckButton(const CheckButton&);
+ CheckButton& operator=(const CheckButton&);
+
+protected:
+ explicit CheckButton(const Glib::ConstructParams& construct_params);
+ explicit CheckButton(GtkCheckButton* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkCheckButton* gobj() { return reinterpret_cast<GtkCheckButton*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkCheckButton* gobj() const { return reinterpret_cast<GtkCheckButton*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+public:
+
+ /** Create an empty check button.
+ * With an empty button, you can Gtk::Button::add() a widget such as a
+ * Gtk::Pixmap or Gtk::Box.
+ *
+ * If you just wish to add a Gtk::Label, you may want to use the
+ * Gtk::CheckButton(const Glib::ustring &label) constructor directly
+ * instead.
+ */
+ CheckButton();
+
+ /** Create a check button with a label.
+ * You won't be able to add a widget to this button since it already
+ * contains a Gtk::Label
+ */
+ explicit CheckButton(const Glib::ustring& label, bool mnemonic = false);
+
+
+protected:
+ /** Emited on button redraw to update indicator.
+ * Triggered when the button is redrawn (e.g.after being toggled)
+ * Overload this signal if you want to implement your own check button
+ * look. Otherwise, you most likely don't care about it.
+ * The GdkRectangle specifies the area of the widget which will get
+ * redrawn.
+ */
+ virtual void draw_indicator_vfunc(GdkRectangle* area);
+
+
+};
+
+
+} /* namespace Gtk */
+
+
+namespace Glib
+{
+ /** @relates Gtk::CheckButton
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::CheckButton* wrap(GtkCheckButton* object, bool take_copy = false);
+}
+#endif /* _GTKMM_CHECKBUTTON_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/checkmenuitem.cc b/libs/gtkmm2/gtk/gtkmm/checkmenuitem.cc
new file mode 100644
index 0000000000..2a1a6b4ac2
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/checkmenuitem.cc
@@ -0,0 +1,317 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/checkmenuitem.h>
+#include <gtkmm/private/checkmenuitem_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkcheckmenuitem.h>
+#include <gtkmm/misc.h>
+#include <gtkmm/label.h>
+
+namespace Gtk
+{
+
+CheckMenuItem::CheckMenuItem(const Glib::ustring& label, bool mnemonic)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::MenuItem(Glib::ConstructParams(checkmenuitem_class_.init(), (char*) 0))
+{
+ add_accel_label(label, mnemonic); /* Left-aligned label */
+}
+
+} // namespace Gtk
+
+
+namespace
+{
+
+const Glib::SignalProxyInfo CheckMenuItem_signal_toggled_info =
+{
+ "toggled",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::CheckMenuItem* wrap(GtkCheckMenuItem* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::CheckMenuItem *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& CheckMenuItem_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &CheckMenuItem_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_check_menu_item_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void CheckMenuItem_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->draw_indicator = &draw_indicator_vfunc_callback;
+ klass->toggled = &toggled_callback;
+}
+
+void CheckMenuItem_Class::draw_indicator_vfunc_callback(GtkCheckMenuItem* self, GdkRectangle* area)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->draw_indicator_vfunc(area);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->draw_indicator)
+ (*base->draw_indicator)(self, area);
+ }
+}
+
+
+void CheckMenuItem_Class::toggled_callback(GtkCheckMenuItem* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_toggled();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->toggled)
+ (*base->toggled)(self);
+ }
+}
+
+
+Glib::ObjectBase* CheckMenuItem_Class::wrap_new(GObject* o)
+{
+ return manage(new CheckMenuItem((GtkCheckMenuItem*)(o)));
+
+}
+
+
+/* The implementation: */
+
+CheckMenuItem::CheckMenuItem(const Glib::ConstructParams& construct_params)
+:
+ Gtk::MenuItem(construct_params)
+{
+ }
+
+CheckMenuItem::CheckMenuItem(GtkCheckMenuItem* castitem)
+:
+ Gtk::MenuItem((GtkMenuItem*)(castitem))
+{
+ }
+
+CheckMenuItem::~CheckMenuItem()
+{
+ destroy_();
+}
+
+CheckMenuItem::CppClassType CheckMenuItem::checkmenuitem_class_; // initialize static member
+
+GType CheckMenuItem::get_type()
+{
+ return checkmenuitem_class_.init().get_type();
+}
+
+GType CheckMenuItem::get_base_type()
+{
+ return gtk_check_menu_item_get_type();
+}
+
+
+CheckMenuItem::CheckMenuItem()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::MenuItem(Glib::ConstructParams(checkmenuitem_class_.init()))
+{
+ }
+
+void CheckMenuItem::set_active(bool state)
+{
+ gtk_check_menu_item_set_active(gobj(), static_cast<int>(state));
+}
+
+bool CheckMenuItem::get_active() const
+{
+ return gtk_check_menu_item_get_active(const_cast<GtkCheckMenuItem*>(gobj()));
+}
+
+void CheckMenuItem::toggled()
+{
+ gtk_check_menu_item_toggled(gobj());
+}
+
+void CheckMenuItem::set_inconsistent(bool setting)
+{
+ gtk_check_menu_item_set_inconsistent(gobj(), static_cast<int>(setting));
+}
+
+bool CheckMenuItem::get_inconsistent() const
+{
+ return gtk_check_menu_item_get_inconsistent(const_cast<GtkCheckMenuItem*>(gobj()));
+}
+
+void CheckMenuItem::set_draw_as_radio(bool draw_as_radio)
+{
+ gtk_check_menu_item_set_draw_as_radio(gobj(), static_cast<int>(draw_as_radio));
+}
+
+bool CheckMenuItem::get_draw_as_radio() const
+{
+ return gtk_check_menu_item_get_draw_as_radio(const_cast<GtkCheckMenuItem*>(gobj()));
+}
+
+
+Glib::SignalProxy0< void > CheckMenuItem::signal_toggled()
+{
+ return Glib::SignalProxy0< void >(this, &CheckMenuItem_signal_toggled_info);
+}
+
+
+Glib::PropertyProxy<bool> CheckMenuItem::property_active()
+{
+ return Glib::PropertyProxy<bool>(this, "active");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> CheckMenuItem::property_active() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "active");
+}
+
+Glib::PropertyProxy<bool> CheckMenuItem::property_inconsistent()
+{
+ return Glib::PropertyProxy<bool>(this, "inconsistent");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> CheckMenuItem::property_inconsistent() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "inconsistent");
+}
+
+Glib::PropertyProxy<bool> CheckMenuItem::property_draw_as_radio()
+{
+ return Glib::PropertyProxy<bool>(this, "draw-as-radio");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> CheckMenuItem::property_draw_as_radio() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "draw-as-radio");
+}
+
+
+void Gtk::CheckMenuItem::on_toggled()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->toggled)
+ (*base->toggled)(gobj());
+}
+
+
+void Gtk::CheckMenuItem::draw_indicator_vfunc(GdkRectangle* area)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->draw_indicator)
+ (*base->draw_indicator)(gobj(),area);
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/checkmenuitem.h b/libs/gtkmm2/gtk/gtkmm/checkmenuitem.h
new file mode 100644
index 0000000000..faa95d431f
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/checkmenuitem.h
@@ -0,0 +1,237 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_CHECKMENUITEM_H
+#define _GTKMM_CHECKMENUITEM_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* checkmenuitem.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/menuitem.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkCheckMenuItem GtkCheckMenuItem;
+typedef struct _GtkCheckMenuItemClass GtkCheckMenuItemClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class CheckMenuItem_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** A menu item that maintains the state of a boolean value in addition to a Gtk::MenuItem's usual role in activating application code.
+ * A check box indicating the state of the boolean value is displayed at the left side of the Gtk::MenuItem.
+ * Activating the Gtk::MenuItem toggles the value.
+ * @ingroup Widgets
+ * @ingroup Menus
+ */
+
+class CheckMenuItem : public MenuItem
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef CheckMenuItem CppObjectType;
+ typedef CheckMenuItem_Class CppClassType;
+ typedef GtkCheckMenuItem BaseObjectType;
+ typedef GtkCheckMenuItemClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~CheckMenuItem();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class CheckMenuItem_Class;
+ static CppClassType checkmenuitem_class_;
+
+ // noncopyable
+ CheckMenuItem(const CheckMenuItem&);
+ CheckMenuItem& operator=(const CheckMenuItem&);
+
+protected:
+ explicit CheckMenuItem(const Glib::ConstructParams& construct_params);
+ explicit CheckMenuItem(GtkCheckMenuItem* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkCheckMenuItem* gobj() { return reinterpret_cast<GtkCheckMenuItem*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkCheckMenuItem* gobj() const { return reinterpret_cast<GtkCheckMenuItem*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_toggled();
+
+
+private:
+
+
+public:
+
+ CheckMenuItem();
+ explicit CheckMenuItem(const Glib::ustring& label, bool mnemonic = false);
+
+
+ void set_active(bool state = true);
+
+ /** Returns whether the check menu item is active. See
+ * set_active().
+ * @return <tt>true</tt> if the menu item is checked.
+ */
+ bool get_active() const;
+
+
+ void toggled();
+
+
+ /** If the user has selected a range of elements (such as some text or
+ * spreadsheet cells) that are affected by a boolean setting, and the
+ * current values in that range are inconsistent, you may want to
+ * display the check in an "in between" state. This function turns on
+ * "in between" display. Normally you would turn off the inconsistent
+ * state again if the user explicitly selects a setting. This has to be
+ * done manually, set_inconsistent() only affects
+ * visual appearance, it doesn't affect the semantics of the widget.
+ * @param setting <tt>true</tt> to display an "inconsistent" third state check.
+ */
+ void set_inconsistent(bool setting = true);
+
+ /** Retrieves the value set by set_inconsistent().
+ * @return <tt>true</tt> if inconsistent.
+ */
+ bool get_inconsistent() const;
+
+
+ /** Sets whether @a check_menu_item is drawn like a Gtk::RadioMenuItem
+ *
+ * Since: 2.4
+ * @param draw_as_radio Whether @a check_menu_item is drawn like a Gtk::RadioMenuItem.
+ */
+ void set_draw_as_radio(bool draw_as_radio = true);
+
+ /** Returns whether @a check_menu_item looks like a Gtk::RadioMenuItem
+ * @return Whether @a check_menu_item looks like a Gtk::RadioMenuItem
+ *
+ * Since: 2.4.
+ */
+ bool get_draw_as_radio() const;
+
+ /** Triggered when the item changes state
+ * (Note : changing the item's state with set_active() will also trigger
+ * this signal)
+ */
+
+
+ Glib::SignalProxy0< void > signal_toggled();
+
+
+ /** Whether the menu item is checked.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_active() ;
+
+/** Whether the menu item is checked.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_active() const;
+
+ /** Whether to display an inconsistent state.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_inconsistent() ;
+
+/** Whether to display an inconsistent state.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_inconsistent() const;
+
+ /** Whether the menu item looks like a radio menu item.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_draw_as_radio() ;
+
+/** Whether the menu item looks like a radio menu item.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_draw_as_radio() const;
+
+
+protected:
+ /** Triggered when the item is redrawn (e.g.after being toggled)
+ * Overload this signal if you want to implement your own check item
+ * look. Otherwise, you most likely don't care about it.
+ * The GdkRectangle specifies the area of the widget which will get
+ * redrawn.
+ */
+ virtual void draw_indicator_vfunc(GdkRectangle* area);
+
+
+};
+
+} /* namespace Gtk */
+
+
+namespace Glib
+{
+ /** @relates Gtk::CheckMenuItem
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::CheckMenuItem* wrap(GtkCheckMenuItem* object, bool take_copy = false);
+}
+#endif /* _GTKMM_CHECKMENUITEM_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/clipboard.cc b/libs/gtkmm2/gtk/gtkmm/clipboard.cc
new file mode 100644
index 0000000000..e543bb8eee
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/clipboard.cc
@@ -0,0 +1,584 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/clipboard.h>
+#include <gtkmm/private/clipboard_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/selectiondata_private.h>
+#include <glibmm/utility.h> //For ScopedPtr<>.
+#include <gtk/gtkclipboard.h>
+
+namespace
+{
+
+// SignalProxy_GetClear:
+// This Signal Proxy allows the C++ coder to specify a sigc::slot instead of a static function.
+class SignalProxy_GetClear
+{
+public:
+ SignalProxy_GetClear(const Gtk::Clipboard::SlotGet& slot_get,
+ const Gtk::Clipboard::SlotClear& slot_clear);
+ ~SignalProxy_GetClear();
+
+ static void gtk_callback_get(GtkClipboard* clipboard, GtkSelectionData* selection_data,
+ unsigned int info, void* data);
+ static void gtk_callback_clear(GtkClipboard* clipboard, void* data);
+
+protected:
+ Gtk::Clipboard::SlotGet slot_get_;
+ Gtk::Clipboard::SlotClear slot_clear_;
+};
+
+SignalProxy_GetClear::SignalProxy_GetClear(const Gtk::Clipboard::SlotGet& slot_get,
+ const Gtk::Clipboard::SlotClear& slot_clear)
+:
+ slot_get_ (slot_get),
+ slot_clear_ (slot_clear)
+{}
+
+SignalProxy_GetClear::~SignalProxy_GetClear()
+{}
+
+void SignalProxy_GetClear::gtk_callback_get(GtkClipboard*, GtkSelectionData* selection_data,
+ unsigned int info, void* data)
+{
+ SignalProxy_GetClear *const self = static_cast<SignalProxy_GetClear*>(data);
+
+ try
+ {
+ Gtk::SelectionData_WithoutOwnership cppSelectionData(selection_data);
+ (self->slot_get_)(cppSelectionData, info);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+}
+
+void SignalProxy_GetClear::gtk_callback_clear(GtkClipboard*, void* data)
+{
+ SignalProxy_GetClear *const self = static_cast<SignalProxy_GetClear*>(data);
+
+ try
+ {
+ (self->slot_clear_)();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+
+ delete self; // After this callback has been called, none of the 2 callbacks will be called again.
+
+ //This might leak the last SignalProxy_GetClear(), but only the last one,
+ //because clear() is called when set() is called again.
+}
+
+
+// SignalProxy_Received:
+// This Signal Proxy allows the C++ coder to specify a sigc::slot instead of a static function.
+class SignalProxy_Received
+{
+public:
+ typedef Gtk::Clipboard::SlotReceived SlotType;
+
+ SignalProxy_Received(const SlotType& slot);
+ ~SignalProxy_Received();
+
+ static void gtk_callback(GtkClipboard* clipboard, GtkSelectionData* selection_data, gpointer data);
+
+protected:
+ SlotType slot_;
+};
+
+SignalProxy_Received::SignalProxy_Received(const SlotType& slot)
+:
+ slot_ (slot)
+{}
+
+SignalProxy_Received::~SignalProxy_Received()
+{}
+
+void SignalProxy_Received::gtk_callback(GtkClipboard*, GtkSelectionData* selection_data, void* data)
+{
+ SignalProxy_Received *const self = static_cast<SignalProxy_Received*>(data);
+
+ try
+ {
+ Gtk::SelectionData cppSelectionData(selection_data, true /*take_copy=true*/);
+ (self->slot_)(cppSelectionData);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+
+ delete self;
+}
+
+
+// SignalProxy_TargetsReceived:
+// This Signal Proxy allows the C++ coder to specify a sigc::slot instead of a static function.
+class SignalProxy_TargetsReceived
+{
+public:
+ typedef Gtk::Clipboard::SlotTargetsReceived SlotType;
+
+ SignalProxy_TargetsReceived(const SlotType& slot);
+ ~SignalProxy_TargetsReceived();
+
+ static void gtk_callback(GtkClipboard* clipboard, GdkAtom* atoms, gint n_atoms, gpointer data);
+
+protected:
+ SlotType slot_;
+};
+
+SignalProxy_TargetsReceived::SignalProxy_TargetsReceived(const SlotType& slot)
+:
+ slot_ (slot)
+{}
+
+SignalProxy_TargetsReceived::~SignalProxy_TargetsReceived()
+{}
+
+//This is not public API:
+typedef std::list<Glib::ustring> listStrings;
+static listStrings util_convert_atoms_to_strings(GdkAtom* targets, int n_targets)
+{
+ listStrings listTargets;
+
+ //Add the targets to the C++ container:
+ for(int i = 0; i < n_targets; i++)
+ {
+ //Convert the atom to a string:
+ Glib::ustring target = gdk_atom_name(targets[i]);
+ listTargets.push_back(target);
+ }
+
+ return listTargets;
+}
+
+void SignalProxy_TargetsReceived::gtk_callback(GtkClipboard*, GdkAtom* atoms, gint n_atoms, gpointer data)
+{
+ SignalProxy_TargetsReceived *const self = static_cast<SignalProxy_TargetsReceived*>(data);
+
+ try
+ {
+ listStrings listTargets = util_convert_atoms_to_strings(atoms, n_atoms);
+ (self->slot_)(listTargets);
+ //I guess that GTK+ does a g_free of the GdkAtoms* array itself, so we do not need to. murrayc.
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+
+ delete self; // the callback is only used once
+}
+
+
+// SignalProxy_TextReceived:
+// This Signal Proxy allows the C++ coder to specify a sigc::slot instead of a static function.
+class SignalProxy_TextReceived
+{
+public:
+ typedef Gtk::Clipboard::SlotTextReceived SlotType;
+
+ SignalProxy_TextReceived(const SlotType& slot);
+ ~SignalProxy_TextReceived();
+
+ static void gtk_callback(GtkClipboard* clipboard, const char* text, void* data);
+
+protected:
+ SlotType slot_;
+};
+
+SignalProxy_TextReceived::SignalProxy_TextReceived(const SlotType& slot)
+:
+ slot_ (slot)
+{}
+
+SignalProxy_TextReceived::~SignalProxy_TextReceived()
+{}
+
+void SignalProxy_TextReceived::gtk_callback(GtkClipboard*, const char* text, void* data)
+{
+ SignalProxy_TextReceived *const self = static_cast<SignalProxy_TextReceived*>(data);
+
+ try
+ {
+ (self->slot_)((text) ? Glib::ustring(text) : Glib::ustring());
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+
+ delete self; // the callback is only used once
+}
+
+
+// SignalProxy_ImageReceived:
+// This Signal Proxy allows the C++ coder to specify a sigc::slot instead of a static function.
+class SignalProxy_ImageReceived
+{
+public:
+ typedef Gtk::Clipboard::SlotImageReceived SlotType;
+
+ SignalProxy_ImageReceived(const SlotType& slot);
+ ~SignalProxy_ImageReceived();
+
+ static void gtk_callback(GtkClipboard* clipboard, GdkPixbuf* image, void* data);
+
+protected:
+ SlotType slot_;
+};
+
+SignalProxy_ImageReceived::SignalProxy_ImageReceived(const SlotType& slot)
+:
+ slot_ (slot)
+{}
+
+SignalProxy_ImageReceived::~SignalProxy_ImageReceived()
+{}
+
+void SignalProxy_ImageReceived::gtk_callback(GtkClipboard*, GdkPixbuf* image, void* data)
+{
+ SignalProxy_ImageReceived *const self = static_cast<SignalProxy_ImageReceived*>(data);
+
+ try
+ {
+ (self->slot_)(Glib::wrap(image, true /* take_ref */));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+
+ delete self; // the callback is only used once
+}
+
+} // anonymous namespace
+
+
+namespace Gtk
+{
+
+bool Clipboard::set(const ArrayHandle_TargetEntry& targets,
+ const SlotGet& slot_get, const SlotClear& slot_clear)
+{
+ // Create a signal proxy. A pointer to this will be passed through the callback's data parameter.
+ SignalProxy_GetClear *const pSignalProxy = new SignalProxy_GetClear(slot_get, slot_clear);
+
+ return gtk_clipboard_set_with_data(
+ gobj(), targets.data(), targets.size(),
+ &SignalProxy_GetClear::gtk_callback_get,
+ &SignalProxy_GetClear::gtk_callback_clear,
+ pSignalProxy);
+}
+
+void Clipboard::set_text(const Glib::ustring& text)
+{
+ gtk_clipboard_set_text(gobj(), text.c_str(), text.bytes());
+}
+
+
+void Clipboard::request_contents(const Glib::ustring& target, const SlotReceived& slot)
+{
+ // Create a signal proxy. A pointer to this will be passed through the callback's data parameter.
+ SignalProxy_Received *const pSignalProxy = new SignalProxy_Received(slot);
+
+ gtk_clipboard_request_contents(gobj(), gdk_atom_intern(target.c_str(), FALSE),
+ &SignalProxy_Received::gtk_callback, pSignalProxy);
+}
+
+void Clipboard::request_text(const SlotTextReceived& slot)
+{
+ // Create a signal proxy. A pointer to this will be passed through the callback's data parameter.
+ SignalProxy_TextReceived *const pSignalProxy = new SignalProxy_TextReceived(slot);
+
+ gtk_clipboard_request_text(gobj(),
+ &SignalProxy_TextReceived::gtk_callback, pSignalProxy);
+}
+
+void Clipboard::request_image(const SlotImageReceived& slot)
+{
+ // Create a signal proxy. A pointer to this will be passed through the callback's data parameter.
+ SignalProxy_ImageReceived *const pSignalProxy = new SignalProxy_ImageReceived(slot);
+
+ gtk_clipboard_request_image(gobj(),
+ &SignalProxy_ImageReceived::gtk_callback, pSignalProxy);
+}
+
+void Clipboard::request_targets(const SlotTargetsReceived& slot)
+{
+ // Create a signal proxy. A pointer to this will be passed through the callback's data parameter.
+ SignalProxy_TargetsReceived *const pSignalProxy = new SignalProxy_TargetsReceived(slot);
+
+ gtk_clipboard_request_targets(gobj(), &SignalProxy_TargetsReceived::gtk_callback, pSignalProxy);
+}
+
+SelectionData Clipboard::wait_for_contents(const Glib::ustring& target) const
+{
+ //gtk_clipboard_wait_for_contents returns a newly-allocated GtkSelectionData, or NULL.
+ GtkSelectionData* cData = gtk_clipboard_wait_for_contents( const_cast<GtkClipboard*>(gobj()), gdk_atom_intern(target.c_str(), FALSE) );
+ return SelectionData(cData, false /* take_copy */);
+}
+
+Glib::StringArrayHandle Clipboard::wait_for_targets() const
+{
+ std::list<Glib::ustring> listTargets;
+
+ //Get a newly-allocated array of atoms:
+ GdkAtom* targets = 0;
+ gint n_targets = 0;
+ gboolean test = gtk_clipboard_wait_for_targets( const_cast<GtkClipboard*>(gobj()), &targets, &n_targets );
+ if(!test)
+ n_targets = 0; //otherwise it will be -1.
+
+ //Add the targets to the C++ container:
+ for(int i = 0; i < n_targets; i++)
+ {
+ //Convert the atom to a string:
+ gchar* const atom_name = gdk_atom_name(targets[i]);
+
+ Glib::ustring target;
+ if(atom_name)
+ target = Glib::ScopedPtr<char>(atom_name).get(); //This frees the gchar*.
+
+ listTargets.push_back(target);
+ }
+
+ return listTargets;
+}
+
+void Clipboard::set_can_store(const ArrayHandle_TargetEntry& targets)
+{
+ gtk_clipboard_set_can_store( gobj(), targets.data(), targets.size() );
+}
+
+void Clipboard::set_can_store()
+{
+ gtk_clipboard_set_can_store( gobj(), 0, 0 /* See C docs */ );
+}
+
+} //namespace Gtk
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Gtk::Clipboard> wrap(GtkClipboard* object, bool take_copy)
+{
+ return Glib::RefPtr<Gtk::Clipboard>( dynamic_cast<Gtk::Clipboard*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} /* namespace Glib */
+
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Clipboard_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Clipboard_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_clipboard_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Clipboard_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* Clipboard_Class::wrap_new(GObject* object)
+{
+ return new Clipboard((GtkClipboard*)object);
+}
+
+
+/* The implementation: */
+
+GtkClipboard* Clipboard::gobj_copy()
+{
+ reference();
+ return gobj();
+}
+
+Clipboard::Clipboard(const Glib::ConstructParams& construct_params)
+:
+ Glib::Object(construct_params)
+{}
+
+Clipboard::Clipboard(GtkClipboard* castitem)
+:
+ Glib::Object((GObject*)(castitem))
+{}
+
+Clipboard::~Clipboard()
+{}
+
+
+Clipboard::CppClassType Clipboard::clipboard_class_; // initialize static member
+
+GType Clipboard::get_type()
+{
+ return clipboard_class_.init().get_type();
+}
+
+GType Clipboard::get_base_type()
+{
+ return gtk_clipboard_get_type();
+}
+
+
+Glib::RefPtr<Clipboard> Clipboard::get(GdkAtom selection)
+{
+
+ Glib::RefPtr<Clipboard> retvalue = Glib::wrap(gtk_clipboard_get(selection));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<Clipboard> Clipboard::get_for_display(const Glib::RefPtr<Gdk::Display>& display, GdkAtom selection)
+{
+
+ Glib::RefPtr<Clipboard> retvalue = Glib::wrap(gtk_clipboard_get_for_display(Glib::unwrap(display), selection));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<Gdk::Display> Clipboard::get_display()
+{
+
+ Glib::RefPtr<Gdk::Display> retvalue = Glib::wrap(gtk_clipboard_get_display(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const Gdk::Display> Clipboard::get_display() const
+{
+
+ Glib::RefPtr<const Gdk::Display> retvalue = Glib::wrap(gtk_clipboard_get_display(const_cast<GtkClipboard*>(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<Glib::Object> Clipboard::get_owner()
+{
+
+ Glib::RefPtr<Glib::Object> retvalue = Glib::wrap(gtk_clipboard_get_owner(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const Glib::Object> Clipboard::get_owner() const
+{
+
+ Glib::RefPtr<const Glib::Object> retvalue = Glib::wrap(gtk_clipboard_get_owner(const_cast<GtkClipboard*>(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+void Clipboard::clear()
+{
+ gtk_clipboard_clear(gobj());
+}
+
+void Clipboard::set_image(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf)
+{
+ gtk_clipboard_set_image(gobj(), Glib::unwrap(pixbuf));
+}
+
+Glib::ustring Clipboard::wait_for_text() const
+{
+ return Glib::convert_return_gchar_ptr_to_ustring(gtk_clipboard_wait_for_text(const_cast<GtkClipboard*>(gobj())));
+}
+
+Glib::RefPtr<Gdk::Pixbuf> Clipboard::wait_for_image() const
+{
+ return Glib::wrap(gtk_clipboard_wait_for_image(const_cast<GtkClipboard*>(gobj())));
+}
+
+bool Clipboard::wait_is_text_available() const
+{
+ return gtk_clipboard_wait_is_text_available(const_cast<GtkClipboard*>(gobj()));
+}
+
+bool Clipboard::wait_is_image_available() const
+{
+ return gtk_clipboard_wait_is_image_available(const_cast<GtkClipboard*>(gobj()));
+}
+
+bool Clipboard::wait_is_target_available(const Glib::ustring& target)
+{
+ return gtk_clipboard_wait_is_target_available(gobj(), Gdk::AtomString::to_c_type(target));
+}
+
+void Clipboard::store()
+{
+ gtk_clipboard_store(gobj());
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/clipboard.h b/libs/gtkmm2/gtk/gtkmm/clipboard.h
new file mode 100644
index 0000000000..193eae10cc
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/clipboard.h
@@ -0,0 +1,489 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_CLIPBOARD_H
+#define _GTKMM_CLIPBOARD_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* clipboard.h
+ *
+ * Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gdkmm/display.h>
+#include <gdkmm/pixbuf.h>
+#include <gtkmm/targetentry.h>
+#include <gtkmm/selectiondata.h>
+#include <glibmm/object.h>
+#include <glibmm/containers.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkClipboard GtkClipboard;
+typedef struct _GtkClipboardClass GtkClipboardClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class Clipboard_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** The Clipboard object represents a clipboard of data shared between different processes or between
+ * different widgets in the same process. Each clipboard is identified by a name encoded as a GdkAtom. *
+ * (Conversion to and from strings can be done with gdk_atom_intern() and gdk_atom_name().) The default
+ * clipboard corresponds to the "CLIPBOARD" atom; another commonly used clipboard is the "PRIMARY" clipboard,
+ * which, in X, traditionally contains the currently selected text.
+ *
+ * To support having a number of different formats on the clipboard at the same time, the clipboard mechanism
+ * allows providing callbacks instead of the actual data. When you set the contents of the clipboard, you can
+ * either supply the data directly (via functions like set_text()), or you can supply a callback
+ * to be called at a later time when the data is needed (via set().) Providing a callback also avoids having to
+ * make copies of the data when it is not needed.
+ *
+ * Requesting the data from the clipboard is essentially asynchronous. If the contents of the clipboard are
+ * provided within the same process, then a direct function call will be made to retrieve the data, but if they
+ * are provided by another process, then the data needs to be retrieved from the other process, which may take
+ * some time. To avoid blocking the user interface, the call to request the selection, request_contents() takes
+ * a callback that will be called when the contents are received (or when the request fails.) If you don't want
+ * to deal with providing a separate callback, you can also use wait_for_contents(). This runs the
+ * GLib main loop recursively waiting for the contents. This can simplify the code flow, but you still have to
+ * be aware that other callbacks in your program can be called while this recursive mainloop is running.
+ *
+ * Along with the functions to get the clipboard contents as an arbitrary data chunk, there are also functions
+ * to retrieve it as text, request_text() and wait_for_text(). These functions take
+ * care of determining which formats are advertised by the clipboard provider, asking for the clipboard in the
+ * best available format and converting the results into the UTF-8 encoding.
+ */
+
+class Clipboard : public Glib::Object
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef Clipboard CppObjectType;
+ typedef Clipboard_Class CppClassType;
+ typedef GtkClipboard BaseObjectType;
+ typedef GtkClipboardClass BaseClassType;
+
+private: friend class Clipboard_Class;
+ static CppClassType clipboard_class_;
+
+private:
+ // noncopyable
+ Clipboard(const Clipboard&);
+ Clipboard& operator=(const Clipboard&);
+
+protected:
+ explicit Clipboard(const Glib::ConstructParams& construct_params);
+ explicit Clipboard(GtkClipboard* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~Clipboard();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ GtkClipboard* gobj() { return reinterpret_cast<GtkClipboard*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const GtkClipboard* gobj() const { return reinterpret_cast<GtkClipboard*>(gobject_); }
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ GtkClipboard* gobj_copy();
+
+private:
+
+public:
+
+
+ /** Returns the clipboard object for the given selection.
+ * See gtk_clipboard_get_for_display() for complete details.
+ * @param selection A Gdk::Atom which identifies the clipboard
+ * to use.
+ * @return The appropriate clipboard object. If no
+ * clipboard already exists, a new one will
+ * be created. Once a clipboard object has
+ * been created, it is persistent and, since
+ * it is owned by GTK+, must not be freed or
+ * unrefd.
+ */
+ static Glib::RefPtr<Clipboard> get(GdkAtom selection = GDK_SELECTION_CLIPBOARD);
+
+ /** Returns the clipboard object for the given selection.
+ * Cut/copy/paste menu items and keyboard shortcuts should use
+ * the default clipboard, returned by passing Gdk::SELECTION_CLIPBOARD for @a selection .
+ * (Gdk::NONE is supported as a synonym for GDK_SELECTION_CLIPBOARD
+ * for backwards compatibility reasons.)
+ * The currently-selected object or text should be provided on the clipboard
+ * identified by Gdk::SELECTION_PRIMARY. Cut/copy/paste menu items
+ * conceptually copy the contents of the Gdk::SELECTION_PRIMARY clipboard
+ * to the default clipboard, i.e. they copy the selection to what the
+ * user sees as the clipboard.
+ *
+ * (Passing Gdk::NONE is the same as using <tt>gdk_atom_intern
+ * ("CLIPBOARD", <tt>false</tt>)</tt>. See
+ * http://www.freedesktop.org/standards/clipboards-spec/clipboards.txt
+ * for a detailed discussion of the "CLIPBOARD" vs. "PRIMARY"
+ * selections under the X window system. On Win32 the
+ * Gdk::SELECTION_PRIMARY clipboard is essentially ignored.)
+ *
+ * It's possible to have arbitrary named clipboards; if you do invent
+ * new clipboards, you should prefix the selection name with an
+ * underscore (because the ICCCM requires that nonstandard atoms are
+ * underscore-prefixed), and namespace it as well. For example,
+ * if your application called "Foo" has a special-purpose
+ * clipboard, you might call it "_FOO_SPECIAL_CLIPBOARD".
+ * @param display The display for which the clipboard is to be retrieved or created.
+ * @param selection A Gdk::Atom which identifies the clipboard
+ * to use.
+ * @return The appropriate clipboard object. If no
+ * clipboard already exists, a new one will
+ * be created. Once a clipboard object has
+ * been created, it is persistent and, since
+ * it is owned by GTK+, must not be freed or
+ * unrefd.
+ *
+ * Since: 2.2.
+ */
+ static Glib::RefPtr<Clipboard> get_for_display(const Glib::RefPtr<Gdk::Display>& display, GdkAtom selection = GDK_SELECTION_CLIPBOARD);
+
+
+ /** Gets the Gdk::Display associated with @a clipboard
+ * @return The Gdk::Display associated with @a clipboard
+ *
+ * Since: 2.2.
+ */
+ Glib::RefPtr<Gdk::Display> get_display();
+
+ /** Gets the Gdk::Display associated with @a clipboard
+ * @return The Gdk::Display associated with @a clipboard
+ *
+ * Since: 2.2.
+ */
+ Glib::RefPtr<const Gdk::Display> get_display() const;
+
+ /// For instance: void on_get(Gtk::SelectionData& selection_data, guint info);
+ typedef sigc::slot<void, SelectionData&, guint> SlotGet;
+
+ /// For instance: void on_clear();
+ typedef sigc::slot<void> SlotClear;
+
+ /** Virtually sets the contents of the specified clipboard by providing
+ * a list of supported formats for the clipboard data and a function
+ * to call to get the actual data when it is requested.
+ *
+ * @param targets Information about the available forms for the clipboard data.
+ * @param slot_get method to call to get the actual clipboard data.
+ * @param slot_clear When the clipboard contents are set again, this method will
+ * be called, and slot_get will not be subsequently called.
+ *
+ * @return true if setting the clipboard data succeeded. If setting
+ * the clipboard data failed then the provided callback methods
+ * will be ignored.
+ */
+ bool set(const ArrayHandle_TargetEntry& targets, const SlotGet& slot_get, const SlotClear& slot_clear);
+
+
+ /** If the clipboard contents callbacks were set with
+ * gtk_clipboard_set_with_owner(), and the gtk_clipboard_set_with_data() or
+ * gtk_clipboard_clear() has not subsequently called, returns the owner set
+ * by gtk_clipboard_set_with_owner().
+ * @return The owner of the clipboard, if any; otherwise <tt>0</tt>.
+ */
+ Glib::RefPtr<Glib::Object> get_owner();
+
+ /** If the clipboard contents callbacks were set with
+ * gtk_clipboard_set_with_owner(), and the gtk_clipboard_set_with_data() or
+ * gtk_clipboard_clear() has not subsequently called, returns the owner set
+ * by gtk_clipboard_set_with_owner().
+ * @return The owner of the clipboard, if any; otherwise <tt>0</tt>.
+ */
+ Glib::RefPtr<const Glib::Object> get_owner() const;
+
+ /**
+ * Clears the contents of the clipboard. Generally this should only
+ * be called between the time you call set()
+ * and when the slot_clear you supplied is called. Otherwise, the
+ * clipboard may be owned by someone else.
+ */
+
+ /** Clears the contents of the clipboard. Generally this should only
+ * be called between the time you call gtk_clipboard_set_with_owner()
+ * or gtk_clipboard_set_with_data(),
+ * and when the @a clear_func you supplied is called. Otherwise, the
+ * clipboard may be owned by someone else.
+ */
+ void clear();
+
+ /**
+ * Sets the contents of the clipboard to the given UTF-8 string. GTK+ will
+ * make a copy of the text and take responsibility for responding
+ * for requests for the text, and for converting the text into
+ * the requested format.
+ *
+ * @param text A UTF-8 string.
+ *
+ */
+ void set_text(const Glib::ustring& text);
+
+
+ /** Sets the contents of the clipboard to the given Gdk::Pixbuf.
+ * GTK+ will take responsibility for responding for requests
+ * for the image, and for converting the image into the
+ * requested format.
+ *
+ * Since: 2.6
+ * @param pixbuf A Gdk::Pixbuf.
+ */
+ void set_image(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf);
+
+ /// For instance: void on_received(const SelectionData& selection_data);
+ typedef sigc::slot<void, const SelectionData&> SlotReceived;
+
+ /** Requests the contents of clipboard as the given target.
+ * When the results of the result are later received the supplied callback
+ * will be called.
+ *
+ * @param target The form into which the clipboard
+ * owner should convert the selection.
+ * @param slot A function to call when the results are received
+ * (or the retrieval fails). If the retrieval fails
+ * the length field of selection_data will be
+ * negative.
+ **/
+ void request_contents(const Glib::ustring& target, const SlotReceived& slot);
+
+
+ /// For instance: void on_text_received(const Glib::ustring& text);
+ typedef sigc::slot<void, const Glib::ustring&> SlotTextReceived;
+
+ /** Requests the contents of the clipboard as text. When the text is
+ * later received, it will be converted to UTF-8 if necessary, and
+ * slot will be called.
+ *
+ * The text parameter to slot will contain the resulting text if
+ * the request succeeded, or will be empty if it failed. This could happen for
+ * various reasons, in particular if the clipboard was empty or if the
+ * contents of the clipboard could not be converted into text form.
+ *
+ * @param slot: a function to call when the text is received,
+ * or the retrieval fails. (It will always be called
+ * one way or the other.)
+ */
+ void request_text(const SlotTextReceived& slot);
+
+
+ /// For instance: void on_image_received(const Glib::RefPtr<Gdk::Pixbuf>& text);
+ typedef sigc::slot<void, const Glib::RefPtr<Gdk::Pixbuf>&> SlotImageReceived;
+
+ /** Requests the contents of the clipboard as image. When the image is
+ * later received, it will be converted to a Gdk::Pixbuf.
+ * This function waits for
+ * the data to be received using the main loop, so events,
+ * timeouts, etc, may be dispatched during the wait.
+ *
+ * The pixbuf parameter to slot will contain the resulting pixbuf if
+ * the request succeeded, or will be empty if it failed. This could happen for
+ * various reasons, in particular if the clipboard was empty or if the
+ * contents of the clipboard could not be converted into image form.
+ *
+ * @param slot: a function to call when the text is received,
+ * or the retrieval fails. (It will always be called
+ * one way or the other.)
+ */
+ void request_image(const SlotImageReceived& slot);
+
+
+ /// For instance: void on_targetsreceived(const Glib::StringArrayHandle& targets);
+ typedef sigc::slot<void, const Glib::StringArrayHandle&> SlotTargetsReceived;
+
+ /** Requests the contents of the clipboard as list of supported targets.
+ * When the list is later received, callback will be called.
+ *
+ * The targets parameter to slot will contain the resulting targets if
+ * the request succeeded.
+ *
+ * @param slot a function to call when the targets are received,
+ * or the retrieval fails. (It will always be called
+ * one way or the other.) Remember that Glib::StringArrayHandle
+ * is an intermediate type, so you should convert it to a
+ * standard C++ container.
+ *
+ * Since: 2.4
+ */
+ void request_targets(const SlotTargetsReceived& slot);
+
+
+ /**
+ * Requests the contents of the clipboard using the given target.
+ * This function waits for the data to be received using the main
+ * loop, so events, timeouts, etc, may be dispatched during the wait.
+ *
+ * @param target The form into which the clipboard owner should convert the selection.
+ *
+ * @return A SelectionData object, which will be invalid if retrieving the given target failed.
+ */
+ SelectionData wait_for_contents(const Glib::ustring& target) const;
+
+
+ /** Requests the contents of the clipboard as text and converts
+ * the result to UTF-8 if necessary. This function waits for
+ * the data to be received using the main loop, so events,
+ * timeouts, etc, may be dispatched during the wait.
+ * @return A UTF-8 string, which is empty if retrieving
+ * the selection data failed. (This could happen
+ * for various reasons, in particular if the
+ * clipboard was empty or if the contents of the
+ * clipboard could not be converted into text form.).
+ */
+ Glib::ustring wait_for_text() const;
+
+ //Maybe the result should be const, but constness is not so clear-cut here. murrayc
+
+ /** Requests the contents of the clipboard as image and converts
+ * the result to a Gdk::Pixbuf. This function waits for
+ * the data to be received using the main loop, so events,
+ * timeouts, etc, may be dispatched during the wait.
+ * @return A newly-allocated Gdk::Pixbuf object which must
+ * be disposed with Glib::object_unref(), or <tt>0</tt> if
+ * retrieving the selection data failed. (This
+ * could happen for various reasons, in particular
+ * if the clipboard was empty or if the contents of
+ * the clipboard could not be converted into an image.)
+ *
+ * Since: 2.6.
+ */
+ Glib::RefPtr<Gdk::Pixbuf> wait_for_image() const;
+
+
+ /** Test to see if there is text available to be pasted
+ * This is done by requesting the TARGETS atom and checking
+ * if it contains any of the supported text targets. This function
+ * waits for the data to be received using the main loop, so events,
+ * timeouts, etc, may be dispatched during the wait.
+ *
+ * This function is a little faster than calling
+ * gtk_clipboard_wait_for_text() since it doesn't need to retrieve
+ * the actual text.
+ * @return <tt>true</tt> is there is text available, <tt>false</tt> otherwise.
+ */
+ bool wait_is_text_available() const;
+
+ /** Test to see if there is an image available to be pasted
+ * This is done by requesting the TARGETS atom and checking
+ * if it contains any of the supported image targets. This function
+ * waits for the data to be received using the main loop, so events,
+ * timeouts, etc, may be dispatched during the wait.
+ *
+ * This function is a little faster than calling
+ * gtk_clipboard_wait_for_image() since it doesn't need to retrieve
+ * the actual image data.
+ * @return <tt>true</tt> is there is an image available, <tt>false</tt> otherwise.
+ *
+ * Since: 2.6.
+ */
+ bool wait_is_image_available() const;
+
+ /** Checks if a clipboard supports pasting data of a given type. This
+ * function can be used to determine if a "Paste" menu item should be
+ * insensitive or not.
+ *
+ * If you want to see if there's text available on the clipboard, use
+ * gtk_clipboard_wait_is_text_available() instead.
+ * @param target A Gdk::Atom indicating which target to look for.
+ * @return <tt>true</tt> if the target is available, <tt>false</tt> otherwise.
+ *
+ * Since: 2.6.
+ */
+ bool wait_is_target_available(const Glib::ustring& target);
+
+ /** Returns a list of targets that are present on the clipboard.
+ * This function waits for the data to be received using the main
+ * loop, so events, timeouts, etc, may be dispatched during the wait.
+ *
+ * @result targets: The targets.
+ *
+ * Since: 2.4
+ */
+ Glib::StringArrayHandle wait_for_targets() const;
+
+
+ /** Hints that the clipboard data should be stored somewhere when the application exits or when store()
+ * is called.
+ *
+ * This value is reset when the clipboard owner changes. Where the clipboard data is stored is platform
+ * dependent, see Gdk::Display::store_clipboard() for more information.
+ *
+ * @param targets Array containing information about which forms should be stored.
+ */
+ void set_can_store(const ArrayHandle_TargetEntry& targets);
+
+ /** Hints that all forms of clipboard data should be stored somewhere when the application exits or when store()
+ * is called.
+ *
+ * This value is reset when the clipboard owner changes. Where the clipboard data is stored is platform
+ * dependent, see Gdk::Display::store_clipboard() for more information.
+ */
+ void set_can_store();
+
+
+ /** Stores the current clipboard data somewhere so that it will stay
+ * around after the application has quit.
+ *
+ * Since: 2.6
+ */
+ void store();
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+};
+
+} /* namespace Gtk */
+
+
+namespace Glib
+{
+ /** @relates Gtk::Clipboard
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Gtk::Clipboard> wrap(GtkClipboard* object, bool take_copy = false);
+}
+
+
+#endif /* _GTKMM_CLIPBOARD_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/colorbutton.cc b/libs/gtkmm2/gtk/gtkmm/colorbutton.cc
new file mode 100644
index 0000000000..15b2f5ddd1
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/colorbutton.cc
@@ -0,0 +1,287 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/colorbutton.h>
+#include <gtkmm/private/colorbutton_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 2003 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkcolorbutton.h>
+#include <gdkmm/color.h>
+
+namespace Gtk
+{
+
+Gdk::Color ColorButton::get_color() const
+{
+ Gdk::Color color;
+ gtk_color_button_get_color(const_cast<GtkColorButton*>(gobj()), color.gobj());
+ return color;
+}
+
+
+} // namespace Gtk
+
+
+namespace
+{
+
+const Glib::SignalProxyInfo ColorButton_signal_color_set_info =
+{
+ "color-set",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::ColorButton* wrap(GtkColorButton* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::ColorButton *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& ColorButton_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &ColorButton_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_color_button_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void ColorButton_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->color_set = &color_set_callback;
+}
+
+
+void ColorButton_Class::color_set_callback(GtkColorButton* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_color_set();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->color_set)
+ (*base->color_set)(self);
+ }
+}
+
+
+Glib::ObjectBase* ColorButton_Class::wrap_new(GObject* o)
+{
+ return manage(new ColorButton((GtkColorButton*)(o)));
+
+}
+
+
+/* The implementation: */
+
+ColorButton::ColorButton(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Button(construct_params)
+{
+ }
+
+ColorButton::ColorButton(GtkColorButton* castitem)
+:
+ Gtk::Button((GtkButton*)(castitem))
+{
+ }
+
+ColorButton::~ColorButton()
+{
+ destroy_();
+}
+
+ColorButton::CppClassType ColorButton::colorbutton_class_; // initialize static member
+
+GType ColorButton::get_type()
+{
+ return colorbutton_class_.init().get_type();
+}
+
+GType ColorButton::get_base_type()
+{
+ return gtk_color_button_get_type();
+}
+
+
+ColorButton::ColorButton()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Button(Glib::ConstructParams(colorbutton_class_.init()))
+{
+ }
+
+ColorButton::ColorButton(const Gdk::Color& color)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Button(Glib::ConstructParams(colorbutton_class_.init(), "color", (color).gobj(), (char*) 0))
+{
+ }
+
+void ColorButton::set_color(const Gdk::Color& color)
+{
+ gtk_color_button_set_color(gobj(), (color).gobj());
+}
+
+void ColorButton::set_alpha(guint16 alpha)
+{
+ gtk_color_button_set_alpha(gobj(), alpha);
+}
+
+guint16 ColorButton::get_alpha() const
+{
+ return gtk_color_button_get_alpha(const_cast<GtkColorButton*>(gobj()));
+}
+
+void ColorButton::set_use_alpha(bool use_alpha)
+{
+ gtk_color_button_set_use_alpha(gobj(), static_cast<int>(use_alpha));
+}
+
+bool ColorButton::get_use_alpha() const
+{
+ return gtk_color_button_get_use_alpha(const_cast<GtkColorButton*>(gobj()));
+}
+
+void ColorButton::set_title(const Glib::ustring& title)
+{
+ gtk_color_button_set_title(gobj(), title.c_str());
+}
+
+Glib::ustring ColorButton::get_title() const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(gtk_color_button_get_title(const_cast<GtkColorButton*>(gobj())));
+}
+
+
+Glib::SignalProxy0< void > ColorButton::signal_color_set()
+{
+ return Glib::SignalProxy0< void >(this, &ColorButton_signal_color_set_info);
+}
+
+
+Glib::PropertyProxy<bool> ColorButton::property_use_alpha()
+{
+ return Glib::PropertyProxy<bool>(this, "use-alpha");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> ColorButton::property_use_alpha() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "use-alpha");
+}
+
+Glib::PropertyProxy<Glib::ustring> ColorButton::property_title()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "title");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> ColorButton::property_title() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "title");
+}
+
+Glib::PropertyProxy<Gdk::Color> ColorButton::property_color()
+{
+ return Glib::PropertyProxy<Gdk::Color>(this, "color");
+}
+
+Glib::PropertyProxy_ReadOnly<Gdk::Color> ColorButton::property_color() const
+{
+ return Glib::PropertyProxy_ReadOnly<Gdk::Color>(this, "color");
+}
+
+Glib::PropertyProxy<guint16> ColorButton::property_alpha()
+{
+ return Glib::PropertyProxy<guint16>(this, "alpha");
+}
+
+Glib::PropertyProxy_ReadOnly<guint16> ColorButton::property_alpha() const
+{
+ return Glib::PropertyProxy_ReadOnly<guint16>(this, "alpha");
+}
+
+
+void Gtk::ColorButton::on_color_set()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->color_set)
+ (*base->color_set)(gobj());
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/colorbutton.h b/libs/gtkmm2/gtk/gtkmm/colorbutton.h
new file mode 100644
index 0000000000..aea0bc1d16
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/colorbutton.h
@@ -0,0 +1,277 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_COLORBUTTON_H
+#define _GTKMM_COLORBUTTON_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* colorbutton.h
+ *
+ * Copyright (C) 2003 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/button.h>
+#include <gdkmm/color.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkColorButton GtkColorButton;
+typedef struct _GtkColorButtonClass GtkColorButtonClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class ColorButton_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** A button to launch a color selection dialog.
+ *
+ * The GtkColorButton is a button which displays the currently selected color an allows to
+ * open a color selection dialog to change the color. It is suitable widget for selecting a
+ * color in a preference dialog.
+ *
+ * @ingroup Widgets
+ */
+
+class ColorButton : public Button
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef ColorButton CppObjectType;
+ typedef ColorButton_Class CppClassType;
+ typedef GtkColorButton BaseObjectType;
+ typedef GtkColorButtonClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~ColorButton();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class ColorButton_Class;
+ static CppClassType colorbutton_class_;
+
+ // noncopyable
+ ColorButton(const ColorButton&);
+ ColorButton& operator=(const ColorButton&);
+
+protected:
+ explicit ColorButton(const Glib::ConstructParams& construct_params);
+ explicit ColorButton(GtkColorButton* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkColorButton* gobj() { return reinterpret_cast<GtkColorButton*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkColorButton* gobj() const { return reinterpret_cast<GtkColorButton*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_color_set();
+
+
+private:
+
+public:
+
+ /** Creates a new color button.
+ *
+ * This creates a widget in the form of a small button containing a swatch representing
+ * the current selected color. When the button is clicked, a color-selection dialog will
+ * open, allowing the user to select a color. The swatch will be updated to reflect the
+ * new color when the user finishes.
+ *
+ * Since: 2.4
+ */
+ ColorButton();
+
+
+ /** Creates a new color button with a predefined color.
+ *
+ * Same as Gtk::ColorButton::ColorButton(). Additionally takes a Gdk::Color and
+ * initializes the button with this color. Equivalent to calling set_color(@a color)
+ * after the default constructor.
+ *
+ * @param color A Gdk::Color to set the current color with.
+ *
+ * Since: 2.4
+ */
+ explicit ColorButton(const Gdk::Color& color);
+
+
+ /** Sets the current color to be @a color .
+ *
+ * Since: 2.4
+ * @param color A Gdk::Color to set the current color with.
+ */
+ void set_color(const Gdk::Color& color);
+
+ /** Sets the current opacity to be @a alpha .
+ *
+ * Since: 2.4
+ * @param alpha An integer between 0 and 65535.
+ */
+ void set_alpha(guint16 alpha);
+
+ /** Returns a copy of the the current color.
+ *
+ * Changes to the return value will have no effect on the Gtk::ColorButton.
+ *
+ * @return A Gdk::Color representing the current internal color of the Gtk::ColorButton.
+ *
+ * Since: 2.4
+ */
+ Gdk::Color get_color() const;
+
+
+ /** Returns the current alpha value.
+ * @return An integer between 0 and 65535.
+ *
+ * Since: 2.4.
+ */
+ guint16 get_alpha() const;
+
+ /** Sets whether or not the color button should use the alpha channel.
+ *
+ * Since: 2.4
+ * @param use_alpha <tt>true</tt> if color button should use alpha channel, <tt>false</tt> if not.
+ */
+ void set_use_alpha(bool use_alpha = true);
+
+ /** Does the color selection dialog use the alpha channel?
+ * @return <tt>true</tt> if the color sample uses alpha channel, <tt>false</tt> if not.
+ *
+ * Since: 2.4.
+ */
+ bool get_use_alpha() const;
+
+ /** Sets the title for the color selection dialog.
+ *
+ * Since: 2.4
+ * @param title String containing new window title.
+ */
+ void set_title(const Glib::ustring& title);
+
+ /** Gets the title of the color selection dialog.
+ * @return An internal string, do not free the return value
+ *
+ * Since: 2.4.
+ */
+ Glib::ustring get_title() const;
+
+ /** Whether or not to give the color an alpha value.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_use_alpha() ;
+
+/** Whether or not to give the color an alpha value.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_use_alpha() const;
+
+ /** The title of the color selection dialog.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_title() ;
+
+/** The title of the color selection dialog.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_title() const;
+
+ /** The selected color.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Gdk::Color> property_color() ;
+
+/** The selected color.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Gdk::Color> property_color() const;
+
+ /** The selected opacity value (0 fully transparent, 65535 fully opaque).
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<guint16> property_alpha() ;
+
+/** The selected opacity value (0 fully transparent, 65535 fully opaque).
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<guint16> property_alpha() const;
+
+
+ Glib::SignalProxy0< void > signal_color_set();
+
+
+};
+
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::ColorButton
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::ColorButton* wrap(GtkColorButton* object, bool take_copy = false);
+}
+#endif /* _GTKMM_COLORBUTTON_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/colorselection.cc b/libs/gtkmm2/gtk/gtkmm/colorselection.cc
new file mode 100644
index 0000000000..54525905bf
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/colorselection.cc
@@ -0,0 +1,538 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/colorselection.h>
+#include <gtkmm/private/colorselection_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkcolorsel.h>
+#include <gtk/gtkcolorseldialog.h>
+
+
+namespace
+{
+
+Gtk::ColorSelection::SlotChangePaletteHook* global_change_palette_hook = 0;
+
+void global_change_palette_hook_callback(GdkScreen* screen, const GdkColor* colors, int n_colors)
+{
+ g_return_if_fail(global_change_palette_hook != 0);
+
+ try
+ {
+ (*global_change_palette_hook)(
+ Glib::wrap(screen, true),
+ Gdk::ArrayHandle_Color(colors, n_colors, Glib::OWNERSHIP_NONE));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+}
+
+void old_change_palette_hook_callback(const Glib::RefPtr<Gdk::Screen>& screen,
+ const Gdk::ArrayHandle_Color& colors,
+ GtkColorSelectionChangePaletteWithScreenFunc func)
+{
+ g_return_if_fail(func != 0);
+
+ (*func)(Glib::unwrap(screen), colors.data(), colors.size());
+}
+
+} // anonymous namespace
+
+
+namespace Gtk
+{
+
+Gdk::Color ColorSelection::get_current_color() const
+{
+ Gdk::Color color; //GdkColor Just a simple struct.
+ gtk_color_selection_get_current_color(const_cast<GtkColorSelection*>(gobj()), color.gobj());
+ return color;
+}
+
+Gdk::Color ColorSelection::get_previous_color() const
+{
+ Gdk::Color color; //GdkColor Just a simple struct.
+ gtk_color_selection_get_previous_color(const_cast<GtkColorSelection*>(gobj()), color.gobj());
+ return color;
+}
+
+// static
+Gdk::ArrayHandle_Color ColorSelection::palette_from_string(const Glib::ustring& str)
+{
+ GdkColor* colors = 0;
+ int n_colors = 0;
+
+ gtk_color_selection_palette_from_string(str.c_str(), &colors, &n_colors);
+
+ return Gdk::ArrayHandle_Color(colors, n_colors, Glib::OWNERSHIP_SHALLOW);
+}
+
+// static
+Glib::ustring ColorSelection::palette_to_string(const Gdk::ArrayHandle_Color& colors)
+{
+ if(char *const str = gtk_color_selection_palette_to_string(colors.data(), colors.size()))
+ return Glib::ustring(Glib::ScopedPtr<char>(str).get());
+ else
+ return Glib::ustring();
+}
+
+// static
+ColorSelection::SlotChangePaletteHook
+ColorSelection::set_change_palette_hook(const ColorSelection::SlotChangePaletteHook& slot)
+{
+ GtkColorSelectionChangePaletteWithScreenFunc new_func = 0;
+ SlotChangePaletteHook* new_slot = 0;
+ SlotChangePaletteHook old_slot;
+
+ if(slot)
+ {
+ new_func = &global_change_palette_hook_callback;
+ new_slot = new SlotChangePaletteHook(slot);
+ }
+
+ const GtkColorSelectionChangePaletteWithScreenFunc old_func =
+ gtk_color_selection_set_change_palette_with_screen_hook(new_func);
+
+ if(old_func)
+ {
+ try
+ {
+ if(old_func != &global_change_palette_hook_callback)
+ old_slot = sigc::bind<-1>(sigc::ptr_fun(&old_change_palette_hook_callback), old_func);
+ else if(global_change_palette_hook)
+ old_slot = *global_change_palette_hook;
+ }
+ catch(...)
+ {
+ gtk_color_selection_set_change_palette_with_screen_hook(old_func);
+ delete new_slot;
+ throw;
+ }
+ }
+
+ delete global_change_palette_hook;
+ global_change_palette_hook = new_slot;
+
+ return old_slot;
+}
+
+} // namespace Gtk
+
+
+namespace
+{
+
+const Glib::SignalProxyInfo ColorSelection_signal_color_changed_info =
+{
+ "color_changed",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::ColorSelection* wrap(GtkColorSelection* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::ColorSelection *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& ColorSelection_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &ColorSelection_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_color_selection_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void ColorSelection_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->color_changed = &color_changed_callback;
+}
+
+
+void ColorSelection_Class::color_changed_callback(GtkColorSelection* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_color_changed();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->color_changed)
+ (*base->color_changed)(self);
+ }
+}
+
+
+Glib::ObjectBase* ColorSelection_Class::wrap_new(GObject* o)
+{
+ return manage(new ColorSelection((GtkColorSelection*)(o)));
+
+}
+
+
+/* The implementation: */
+
+ColorSelection::ColorSelection(const Glib::ConstructParams& construct_params)
+:
+ Gtk::VBox(construct_params)
+{
+ }
+
+ColorSelection::ColorSelection(GtkColorSelection* castitem)
+:
+ Gtk::VBox((GtkVBox*)(castitem))
+{
+ }
+
+ColorSelection::~ColorSelection()
+{
+ destroy_();
+}
+
+ColorSelection::CppClassType ColorSelection::colorselection_class_; // initialize static member
+
+GType ColorSelection::get_type()
+{
+ return colorselection_class_.init().get_type();
+}
+
+GType ColorSelection::get_base_type()
+{
+ return gtk_color_selection_get_type();
+}
+
+
+ColorSelection::ColorSelection()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::VBox(Glib::ConstructParams(colorselection_class_.init()))
+{
+ }
+
+bool ColorSelection::get_has_opacity_control() const
+{
+ return gtk_color_selection_get_has_opacity_control(const_cast<GtkColorSelection*>(gobj()));
+}
+
+void ColorSelection::set_has_opacity_control(bool has_opacity)
+{
+ gtk_color_selection_set_has_opacity_control(gobj(), static_cast<int>(has_opacity));
+}
+
+bool ColorSelection::get_has_palette() const
+{
+ return gtk_color_selection_get_has_palette(const_cast<GtkColorSelection*>(gobj()));
+}
+
+void ColorSelection::set_has_palette(bool has_palette)
+{
+ gtk_color_selection_set_has_palette(gobj(), static_cast<int>(has_palette));
+}
+
+void ColorSelection::set_current_color(const Gdk::Color& color)
+{
+ gtk_color_selection_set_current_color(gobj(), (color).gobj());
+}
+
+void ColorSelection::set_current_alpha(guint16 alpha)
+{
+ gtk_color_selection_set_current_alpha(gobj(), alpha);
+}
+
+guint16 ColorSelection::get_current_alpha() const
+{
+ return gtk_color_selection_get_current_alpha(const_cast<GtkColorSelection*>(gobj()));
+}
+
+void ColorSelection::set_previous_color(const Gdk::Color& color)
+{
+ gtk_color_selection_set_previous_color(gobj(), (color).gobj());
+}
+
+void ColorSelection::set_previous_alpha(guint16 alpha)
+{
+ gtk_color_selection_set_previous_alpha(gobj(), alpha);
+}
+
+guint16 ColorSelection::get_previous_alpha() const
+{
+ return gtk_color_selection_get_previous_alpha(const_cast<GtkColorSelection*>(gobj()));
+}
+
+bool ColorSelection::is_adjusting() const
+{
+ return gtk_color_selection_is_adjusting(const_cast<GtkColorSelection*>(gobj()));
+}
+
+
+Glib::SignalProxy0< void > ColorSelection::signal_color_changed()
+{
+ return Glib::SignalProxy0< void >(this, &ColorSelection_signal_color_changed_info);
+}
+
+
+Glib::PropertyProxy<bool> ColorSelection::property_has_palette()
+{
+ return Glib::PropertyProxy<bool>(this, "has-palette");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> ColorSelection::property_has_palette() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "has-palette");
+}
+
+Glib::PropertyProxy<bool> ColorSelection::property_has_opacity_control()
+{
+ return Glib::PropertyProxy<bool>(this, "has-opacity-control");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> ColorSelection::property_has_opacity_control() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "has-opacity-control");
+}
+
+Glib::PropertyProxy<Gdk::Color> ColorSelection::property_current_color()
+{
+ return Glib::PropertyProxy<Gdk::Color>(this, "current-color");
+}
+
+Glib::PropertyProxy_ReadOnly<Gdk::Color> ColorSelection::property_current_color() const
+{
+ return Glib::PropertyProxy_ReadOnly<Gdk::Color>(this, "current-color");
+}
+
+Glib::PropertyProxy<guint> ColorSelection::property_current_alpha()
+{
+ return Glib::PropertyProxy<guint>(this, "current-alpha");
+}
+
+Glib::PropertyProxy_ReadOnly<guint> ColorSelection::property_current_alpha() const
+{
+ return Glib::PropertyProxy_ReadOnly<guint>(this, "current-alpha");
+}
+
+
+void Gtk::ColorSelection::on_color_changed()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->color_changed)
+ (*base->color_changed)(gobj());
+}
+
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+
+Gtk::ColorSelectionDialog* wrap(GtkColorSelectionDialog* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::ColorSelectionDialog *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& ColorSelectionDialog_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &ColorSelectionDialog_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_color_selection_dialog_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void ColorSelectionDialog_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* ColorSelectionDialog_Class::wrap_new(GObject* o)
+{
+ return new ColorSelectionDialog((GtkColorSelectionDialog*)(o)); //top-level windows can not be manage()ed.
+
+}
+
+
+/* The implementation: */
+
+ColorSelectionDialog::ColorSelectionDialog(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Dialog(construct_params)
+{
+ }
+
+ColorSelectionDialog::ColorSelectionDialog(GtkColorSelectionDialog* castitem)
+:
+ Gtk::Dialog((GtkDialog*)(castitem))
+{
+ }
+
+ColorSelectionDialog::~ColorSelectionDialog()
+{
+ destroy_();
+}
+
+ColorSelectionDialog::CppClassType ColorSelectionDialog::colorselectiondialog_class_; // initialize static member
+
+GType ColorSelectionDialog::get_type()
+{
+ return colorselectiondialog_class_.init().get_type();
+}
+
+GType ColorSelectionDialog::get_base_type()
+{
+ return gtk_color_selection_dialog_get_type();
+}
+
+ColorSelectionDialog::ColorSelectionDialog()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Dialog(Glib::ConstructParams(colorselectiondialog_class_.init()))
+{
+ }
+
+ColorSelectionDialog::ColorSelectionDialog(const Glib::ustring& title)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Dialog(Glib::ConstructParams(colorselectiondialog_class_.init(), "title", title.c_str(), (char*) 0))
+{
+ }
+
+ColorSelection* ColorSelectionDialog::get_colorsel()
+{
+ return Glib::wrap((GtkColorSelection*)(gobj()->colorsel));
+}
+
+const ColorSelection* ColorSelectionDialog::get_colorsel() const
+{
+ return Glib::wrap((GtkColorSelection*)(gobj()->colorsel));
+}
+
+Button* ColorSelectionDialog::get_ok_button()
+{
+ return Glib::wrap((GtkButton*)(gobj()->ok_button));
+}
+
+const Button* ColorSelectionDialog::get_ok_button() const
+{
+ return Glib::wrap((GtkButton*)(gobj()->ok_button));
+}
+
+Button* ColorSelectionDialog::get_cancel_button()
+{
+ return Glib::wrap((GtkButton*)(gobj()->cancel_button));
+}
+
+const Button* ColorSelectionDialog::get_cancel_button() const
+{
+ return Glib::wrap((GtkButton*)(gobj()->cancel_button));
+}
+
+Button* ColorSelectionDialog::get_help_button()
+{
+ return Glib::wrap((GtkButton*)(gobj()->help_button));
+}
+
+const Button* ColorSelectionDialog::get_help_button() const
+{
+ return Glib::wrap((GtkButton*)(gobj()->help_button));
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/colorselection.h b/libs/gtkmm2/gtk/gtkmm/colorselection.h
new file mode 100644
index 0000000000..0d77feb43e
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/colorselection.h
@@ -0,0 +1,362 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_COLORSELECTION_H
+#define _GTKMM_COLORSELECTION_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#include <gtkmm/box.h>
+#include <gtkmm/dialog.h>
+#include <gtkmm/button.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkColorSelection GtkColorSelection;
+typedef struct _GtkColorSelectionClass GtkColorSelectionClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class ColorSelection_Class; } // namespace Gtk
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkColorSelectionDialog GtkColorSelectionDialog;
+typedef struct _GtkColorSelectionDialogClass GtkColorSelectionDialogClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class ColorSelectionDialog_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** A widget used to select a color.
+ *
+ * This widget is used to select a color. It
+ * consists of a color wheel and number of sliders and entry boxes for color
+ * parameters such as hue, saturation, value, red, green, blue, and opacity.
+ *
+ * It is found on the standard color selection dialog box
+ * Gtk::ColorSelectionDialog.
+ *
+ * @ingroup Widgets
+ */
+
+class ColorSelection : public VBox
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef ColorSelection CppObjectType;
+ typedef ColorSelection_Class CppClassType;
+ typedef GtkColorSelection BaseObjectType;
+ typedef GtkColorSelectionClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~ColorSelection();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class ColorSelection_Class;
+ static CppClassType colorselection_class_;
+
+ // noncopyable
+ ColorSelection(const ColorSelection&);
+ ColorSelection& operator=(const ColorSelection&);
+
+protected:
+ explicit ColorSelection(const Glib::ConstructParams& construct_params);
+ explicit ColorSelection(GtkColorSelection* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkColorSelection* gobj() { return reinterpret_cast<GtkColorSelection*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkColorSelection* gobj() const { return reinterpret_cast<GtkColorSelection*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_color_changed();
+
+
+private:
+
+
+public:
+ ColorSelection();
+
+
+ /** Determines whether the colorsel has an opacity control.
+ * @return <tt>true</tt> if the @a colorsel has an opacity control. <tt>false</tt> if it does't.
+ */
+ bool get_has_opacity_control() const;
+
+ /** Sets the @a colorsel to use or not use opacity.
+ * @param has_opacity <tt>true</tt> if @a colorsel can set the opacity, <tt>false</tt> otherwise.
+ */
+ void set_has_opacity_control(bool has_opacity = true);
+
+ /** Determines whether the color selector has a color palette.
+ * @return <tt>true</tt> if the selector has a palette. <tt>false</tt> if it hasn't.
+ */
+ bool get_has_palette() const;
+
+ /** Shows and hides the palette based upon the value of @a has_palette .
+ * @param has_palette <tt>true</tt> if palette is to be visible, <tt>false</tt> otherwise.
+ */
+ void set_has_palette(bool has_palette = true);
+
+ /** Sets the current color to be @a color . The first time this is called, it will
+ * also set the original color to be @a color too.
+ * @param color A Gdk::Color to set the current color with.
+ */
+ void set_current_color(const Gdk::Color& color);
+
+ /** Sets the current opacity to be @a alpha . The first time this is called, it will
+ * also set the original opacity to be @a alpha too.
+ * @param alpha An integer between 0 and 65535.
+ */
+ void set_current_alpha(guint16 alpha);
+ Gdk::Color get_current_color() const;
+
+ /** Returns the current alpha value.
+ * @return An integer between 0 and 65535.
+ */
+ guint16 get_current_alpha() const;
+
+ /** Sets the 'previous' color to be @a color . This function should be called with
+ * some hesitations, as it might seem confusing to have that color change.
+ * Calling set_current_color() will also set this color the first
+ * time it is called.
+ * @param color A Gdk::Color to set the previous color with.
+ */
+ void set_previous_color(const Gdk::Color& color);
+
+ /** Sets the 'previous' alpha to be @a alpha . This function should be called with
+ * some hesitations, as it might seem confusing to have that alpha change.
+ * @param alpha An integer between 0 and 65535.
+ */
+ void set_previous_alpha(guint16 alpha);
+ Gdk::Color get_previous_color() const;
+
+ /** Returns the previous alpha value.
+ * @return An integer between 0 and 65535.
+ */
+ guint16 get_previous_alpha() const;
+
+
+ /** Gets the current state of the @a colorsel .
+ * @return <tt>true</tt> if the user is currently dragging a color around, and <tt>false</tt>
+ * if the selection has stopped.
+ */
+ bool is_adjusting() const;
+
+ static Gdk::ArrayHandle_Color palette_from_string(const Glib::ustring& str);
+ static Glib::ustring palette_to_string(const Gdk::ArrayHandle_Color& colors);
+
+ typedef sigc::slot<void, const Glib::RefPtr<Gdk::Screen>&,
+ const Gdk::ArrayHandle_Color&> SlotChangePaletteHook;
+
+ static SlotChangePaletteHook set_change_palette_hook(const SlotChangePaletteHook& slot);
+
+
+ Glib::SignalProxy0< void > signal_color_changed();
+
+
+ /** Whether a palette should be used.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_has_palette() ;
+
+/** Whether a palette should be used.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_has_palette() const;
+
+ /** Whether the color selector should allow setting opacity.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_has_opacity_control() ;
+
+/** Whether the color selector should allow setting opacity.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_has_opacity_control() const;
+
+ /** The current color.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Gdk::Color> property_current_color() ;
+
+/** The current color.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Gdk::Color> property_current_color() const;
+
+ /** The current opacity value (0 fully transparent, 65535 fully opaque).
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<guint> property_current_alpha() ;
+
+/** The current opacity value (0 fully transparent, 65535 fully opaque).
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<guint> property_current_alpha() const;
+
+
+};
+
+/** This dialog allows the user to select a color.
+ * @ingroup Dialogs
+ */
+
+class ColorSelectionDialog : public Dialog
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef ColorSelectionDialog CppObjectType;
+ typedef ColorSelectionDialog_Class CppClassType;
+ typedef GtkColorSelectionDialog BaseObjectType;
+ typedef GtkColorSelectionDialogClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~ColorSelectionDialog();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class ColorSelectionDialog_Class;
+ static CppClassType colorselectiondialog_class_;
+
+ // noncopyable
+ ColorSelectionDialog(const ColorSelectionDialog&);
+ ColorSelectionDialog& operator=(const ColorSelectionDialog&);
+
+protected:
+ explicit ColorSelectionDialog(const Glib::ConstructParams& construct_params);
+ explicit ColorSelectionDialog(GtkColorSelectionDialog* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkColorSelectionDialog* gobj() { return reinterpret_cast<GtkColorSelectionDialog*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkColorSelectionDialog* gobj() const { return reinterpret_cast<GtkColorSelectionDialog*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+
+public:
+
+ ColorSelectionDialog();
+ explicit ColorSelectionDialog(const Glib::ustring& title);
+
+ ColorSelection* get_colorsel();
+ const ColorSelection* get_colorsel() const;
+ Button* get_ok_button();
+ const Button* get_ok_button() const;
+ Button* get_cancel_button();
+ const Button* get_cancel_button() const;
+ Button* get_help_button();
+ const Button* get_help_button() const;
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::ColorSelection
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::ColorSelection* wrap(GtkColorSelection* object, bool take_copy = false);
+}
+namespace Glib
+{
+ /** @relates Gtk::ColorSelectionDialog
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::ColorSelectionDialog* wrap(GtkColorSelectionDialog* object, bool take_copy = false);
+}
+#endif /* _GTKMM_COLORSELECTION_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/combo.cc b/libs/gtkmm2/gtk/gtkmm/combo.cc
new file mode 100644
index 0000000000..453c7ec39e
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/combo.cc
@@ -0,0 +1,993 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/combo.h>
+#include <gtkmm/private/combo_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+//These were deprecated between 1.2 and 2.0:
+#include <gtk/gtklistitem.h>
+#include <gtk/gtklist.h>
+
+#include <gtk/gtkcombo.h>
+#include <gtk/gtklabel.h>
+#include <gtkmm/entry.h>
+#include <gtkmm/button.h>
+#include <gtkmm/scrolledwindow.h>
+#include <gtkmm/window.h>
+#include <gtkmm/item.h>
+
+namespace Gtk
+{
+
+namespace ComboDropDown_Helpers
+{
+
+ComboDropDownList::iterator ComboDropDownList::insert(ComboDropDownList::iterator position, const Element& item)
+{
+ int pos = -1;
+
+ if(position.node_)
+ pos = g_list_position(glist(), position.node_);
+
+ // gtk+ inserts the GList node allocated by g_list_append into the list as is!
+ gtk_list_insert_items((GtkList*)gparent(), g_list_append(0, const_cast<GtkWidget*>(item.Widget::gobj())), pos);
+
+ return --position;
+}
+
+void ComboDropDownList::remove(const_reference child)
+{
+ GList child_list;
+ child_list.data = (gpointer)child.gobj();
+ child_list.next = child_list.prev = 0;
+ gtk_list_remove_items(GTK_LIST(gparent_), &child_list);
+}
+
+ComboDropDownList::iterator ComboDropDownList::erase(iterator position)
+{
+ //Check that it is a valid iterator, to a real item:
+ if ( !position.node_|| (position == end()) )
+ return end();
+
+ //Get an iterator the the next item, to return:
+ iterator next = position;
+ next++;
+
+ //Use GTK+ C function to remove it, by providing the GtkWidget*:
+ GList child_list;
+ child_list.data = (gpointer)position->gobj();
+ child_list.next = child_list.prev = 0;
+ gtk_list_remove_items(GTK_LIST(gparent_), &child_list);
+
+ return next;
+}
+
+} // namespace ComboList_Helpers
+
+ComboDropDown::ComboDropDownList& ComboDropDown::children()
+{
+ children_proxy_ = ComboDropDownList(gobj());
+ return children_proxy_;
+}
+
+const ComboDropDown::ComboDropDownList& ComboDropDown::children() const
+{
+ children_proxy_ = ComboDropDownList(const_cast<GtkList*>(gobj()));
+ return children_proxy_;
+}
+
+} // namespace Gtk
+
+
+namespace Gtk
+{
+
+void Combo::remove_item_string(Gtk::Item& item)
+{
+ gtk_combo_set_item_string(gobj(), item.gobj(), 0);
+}
+
+Glib::ListHandle<Glib::ustring> Combo::get_popdown_strings() const
+{
+ GList* popdown_strings = 0;
+
+ GList *const list_children =
+ gtk_container_get_children(reinterpret_cast<GtkContainer*>(gobj()->list));
+
+ for(const GList* node = list_children; node != 0; node = node->next)
+ {
+ GtkLabel *const label = reinterpret_cast<GtkLabel*>(
+ gtk_bin_get_child(static_cast<GtkBin*>(node->data)));
+
+ popdown_strings = g_list_prepend(
+ popdown_strings, const_cast<char*>(gtk_label_get_text(label)));
+ }
+
+ g_list_free(list_children);
+ popdown_strings = g_list_reverse(popdown_strings);
+
+ return Glib::ListHandle<Glib::ustring>(popdown_strings, Glib::OWNERSHIP_SHALLOW);
+}
+
+} // namespace Gtk
+
+
+namespace
+{
+
+void ComboDropDownItem_signal_scroll_horizontal_callback(GtkListItem* self, GtkScrollType p0,gfloat p1,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,ScrollType,float > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(((ScrollType)(p0))
+, p1
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo ComboDropDownItem_signal_scroll_horizontal_info =
+{
+ "scroll-horizontal",
+ (GCallback) &ComboDropDownItem_signal_scroll_horizontal_callback,
+ (GCallback) &ComboDropDownItem_signal_scroll_horizontal_callback
+};
+
+
+void ComboDropDownItem_signal_scroll_vertical_callback(GtkListItem* self, GtkScrollType p0,gfloat p1,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,ScrollType,float > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(((ScrollType)(p0))
+, p1
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo ComboDropDownItem_signal_scroll_vertical_info =
+{
+ "scroll-vertical",
+ (GCallback) &ComboDropDownItem_signal_scroll_vertical_callback,
+ (GCallback) &ComboDropDownItem_signal_scroll_vertical_callback
+};
+
+
+void ComboDropDown_signal_select_child_callback(GtkList* self, GtkWidget* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,Widget& > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(*Glib::wrap(p0)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo ComboDropDown_signal_select_child_info =
+{
+ "select_child",
+ (GCallback) &ComboDropDown_signal_select_child_callback,
+ (GCallback) &ComboDropDown_signal_select_child_callback
+};
+
+
+const Glib::SignalProxyInfo ComboDropDown_signal_selection_changed_info =
+{
+ "selection_changed",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+
+void ComboDropDown_signal_unselect_child_callback(GtkList* self, GtkWidget* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,Widget& > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(*Glib::wrap(p0)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo ComboDropDown_signal_unselect_child_info =
+{
+ "unselect_child",
+ (GCallback) &ComboDropDown_signal_unselect_child_callback,
+ (GCallback) &ComboDropDown_signal_unselect_child_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::ComboDropDownItem* wrap(GtkListItem* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::ComboDropDownItem *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& ComboDropDownItem_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &ComboDropDownItem_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_list_item_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void ComboDropDownItem_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->scroll_horizontal = &scroll_horizontal_callback;
+ klass->scroll_vertical = &scroll_vertical_callback;
+}
+
+
+void ComboDropDownItem_Class::scroll_horizontal_callback(GtkListItem* self, GtkScrollType p0, gfloat p1)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_scroll_horizontal(((ScrollType)(p0))
+, p1
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->scroll_horizontal)
+ (*base->scroll_horizontal)(self, p0, p1);
+ }
+}
+
+void ComboDropDownItem_Class::scroll_vertical_callback(GtkListItem* self, GtkScrollType p0, gfloat p1)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_scroll_vertical(((ScrollType)(p0))
+, p1
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->scroll_vertical)
+ (*base->scroll_vertical)(self, p0, p1);
+ }
+}
+
+
+Glib::ObjectBase* ComboDropDownItem_Class::wrap_new(GObject* o)
+{
+ return manage(new ComboDropDownItem((GtkListItem*)(o)));
+
+}
+
+
+/* The implementation: */
+
+ComboDropDownItem::ComboDropDownItem(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Item(construct_params)
+{
+ }
+
+ComboDropDownItem::ComboDropDownItem(GtkListItem* castitem)
+:
+ Gtk::Item((GtkItem*)(castitem))
+{
+ }
+
+ComboDropDownItem::~ComboDropDownItem()
+{
+ destroy_();
+}
+
+ComboDropDownItem::CppClassType ComboDropDownItem::combodropdownitem_class_; // initialize static member
+
+GType ComboDropDownItem::get_type()
+{
+ return combodropdownitem_class_.init().get_type();
+}
+
+GType ComboDropDownItem::get_base_type()
+{
+ return gtk_list_item_get_type();
+}
+
+
+ComboDropDownItem::ComboDropDownItem()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Item(Glib::ConstructParams(combodropdownitem_class_.init()))
+{
+ }
+
+
+Glib::SignalProxy2< void,ScrollType,float > ComboDropDownItem::signal_scroll_horizontal()
+{
+ return Glib::SignalProxy2< void,ScrollType,float >(this, &ComboDropDownItem_signal_scroll_horizontal_info);
+}
+
+Glib::SignalProxy2< void,ScrollType,float > ComboDropDownItem::signal_scroll_vertical()
+{
+ return Glib::SignalProxy2< void,ScrollType,float >(this, &ComboDropDownItem_signal_scroll_vertical_info);
+}
+
+
+void Gtk::ComboDropDownItem::on_scroll_horizontal(ScrollType scroll_type, float position)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->scroll_horizontal)
+ (*base->scroll_horizontal)(gobj(),((GtkScrollType)(scroll_type)),position);
+}
+
+void Gtk::ComboDropDownItem::on_scroll_vertical(ScrollType scroll_type, float position)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->scroll_vertical)
+ (*base->scroll_vertical)(gobj(),((GtkScrollType)(scroll_type)),position);
+}
+
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+
+Gtk::ComboDropDown* wrap(GtkList* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::ComboDropDown *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& ComboDropDown_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &ComboDropDown_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_list_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void ComboDropDown_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->select_child = &select_child_callback;
+ klass->selection_changed = &selection_changed_callback;
+ klass->unselect_child = &unselect_child_callback;
+}
+
+
+void ComboDropDown_Class::select_child_callback(GtkList* self, GtkWidget* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_select_child(*Glib::wrap(p0)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->select_child)
+ (*base->select_child)(self, p0);
+ }
+}
+
+void ComboDropDown_Class::selection_changed_callback(GtkList* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_selection_changed();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->selection_changed)
+ (*base->selection_changed)(self);
+ }
+}
+
+void ComboDropDown_Class::unselect_child_callback(GtkList* self, GtkWidget* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_unselect_child(*Glib::wrap(p0)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->unselect_child)
+ (*base->unselect_child)(self, p0);
+ }
+}
+
+
+Glib::ObjectBase* ComboDropDown_Class::wrap_new(GObject* o)
+{
+ return manage(new ComboDropDown((GtkList*)(o)));
+
+}
+
+
+/* The implementation: */
+
+ComboDropDown::ComboDropDown(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Container(construct_params)
+{
+ }
+
+ComboDropDown::ComboDropDown(GtkList* castitem)
+:
+ Gtk::Container((GtkContainer*)(castitem))
+{
+ }
+
+ComboDropDown::~ComboDropDown()
+{
+ destroy_();
+}
+
+ComboDropDown::CppClassType ComboDropDown::combodropdown_class_; // initialize static member
+
+GType ComboDropDown::get_type()
+{
+ return combodropdown_class_.init().get_type();
+}
+
+GType ComboDropDown::get_base_type()
+{
+ return gtk_list_get_type();
+}
+
+
+namespace ComboDropDown_Helpers
+{
+
+ComboDropDownList::iterator ComboDropDownList::find(const_reference w)
+{
+ iterator i = begin();
+ for(i = begin(); i != end() && (i->gobj() != w.gobj()); i++);
+ return i;
+}
+
+ComboDropDownList::iterator ComboDropDownList::find(Widget& w)
+{
+ iterator i;
+ for(i = begin(); i != end() && ((GtkWidget*)i->gobj() != w.gobj()); i++);
+ return i;
+}
+
+} /* namespace ComboDropDown_Helpers */
+
+
+namespace ComboDropDown_Helpers
+{
+
+ComboDropDownList::ComboDropDownList()
+{}
+
+ComboDropDownList::ComboDropDownList(GtkList* gparent)
+: type_base((GObject*)gparent)
+{}
+
+ComboDropDownList::ComboDropDownList(const ComboDropDownList& src)
+:
+ type_base(src)
+{}
+
+ComboDropDownList& ComboDropDownList::operator=(const ComboDropDownList& src)
+{
+ type_base::operator=(src);
+ return *this;
+}
+
+GList*& ComboDropDownList::glist() const
+{
+ return ((GtkList*)gparent_)->children;
+}
+
+void ComboDropDownList::erase(iterator start, iterator stop)
+{
+ type_base::erase(start, stop);
+}
+
+GtkList* ComboDropDownList::gparent()
+{
+ return (GtkList*)type_base::gparent();
+}
+
+const GtkList* ComboDropDownList::gparent() const
+{
+ return (GtkList*)type_base::gparent();
+}
+
+ComboDropDownList::reference ComboDropDownList::operator[](size_type l) const
+{
+ return type_base::operator[](l);
+}
+
+} /* namespace ComboDropDown_Helpers */
+
+ComboDropDown::ComboDropDown()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Container(Glib::ConstructParams(combodropdown_class_.init()))
+{
+ }
+
+void ComboDropDown::scroll_horizontal(ScrollType scroll_type, float position)
+{
+ gtk_list_scroll_horizontal(gobj(), ((GtkScrollType)(scroll_type)), position);
+}
+
+void ComboDropDown::scroll_vertical(ScrollType scroll_type, float position)
+{
+ gtk_list_scroll_vertical(gobj(), ((GtkScrollType)(scroll_type)), position);
+}
+
+
+Glib::SignalProxy1< void,Widget& > ComboDropDown::signal_select_child()
+{
+ return Glib::SignalProxy1< void,Widget& >(this, &ComboDropDown_signal_select_child_info);
+}
+
+Glib::SignalProxy0< void > ComboDropDown::signal_selection_changed()
+{
+ return Glib::SignalProxy0< void >(this, &ComboDropDown_signal_selection_changed_info);
+}
+
+Glib::SignalProxy1< void,Widget& > ComboDropDown::signal_unselect_child()
+{
+ return Glib::SignalProxy1< void,Widget& >(this, &ComboDropDown_signal_unselect_child_info);
+}
+
+
+void Gtk::ComboDropDown::on_select_child(Widget& item)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->select_child)
+ (*base->select_child)(gobj(),(item).gobj());
+}
+
+void Gtk::ComboDropDown::on_selection_changed()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->selection_changed)
+ (*base->selection_changed)(gobj());
+}
+
+void Gtk::ComboDropDown::on_unselect_child(Widget& item)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->unselect_child)
+ (*base->unselect_child)(gobj(),(item).gobj());
+}
+
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+
+Gtk::Combo* wrap(GtkCombo* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::Combo *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Combo_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Combo_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_combo_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Combo_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* Combo_Class::wrap_new(GObject* o)
+{
+ return manage(new Combo((GtkCombo*)(o)));
+
+}
+
+
+/* The implementation: */
+
+Combo::Combo(const Glib::ConstructParams& construct_params)
+:
+ Gtk::HBox(construct_params)
+{
+ }
+
+Combo::Combo(GtkCombo* castitem)
+:
+ Gtk::HBox((GtkHBox*)(castitem))
+{
+ }
+
+Combo::~Combo()
+{
+ destroy_();
+}
+
+Combo::CppClassType Combo::combo_class_; // initialize static member
+
+GType Combo::get_type()
+{
+ return combo_class_.init().get_type();
+}
+
+GType Combo::get_base_type()
+{
+ return gtk_combo_get_type();
+}
+
+Combo::Combo()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::HBox(Glib::ConstructParams(combo_class_.init()))
+{
+ }
+
+void Combo::set_value_in_list(bool value, bool empty)
+{
+ gtk_combo_set_value_in_list(gobj(), static_cast<int>(value), static_cast<int>(empty));
+}
+
+void Combo::set_use_arrows(bool arrows_on)
+{
+ gtk_combo_set_use_arrows(gobj(), static_cast<int>(arrows_on));
+}
+
+void Combo::set_use_arrows_always(bool arrows_always)
+{
+ gtk_combo_set_use_arrows_always(gobj(), static_cast<int>(arrows_always));
+}
+
+void Combo::set_case_sensitive(bool val)
+{
+ gtk_combo_set_case_sensitive(gobj(), static_cast<int>(val));
+}
+
+void Combo::set_item_string(Gtk::Item& item, const Glib::ustring& item_value)
+{
+ gtk_combo_set_item_string(gobj(), (item).gobj(), item_value.c_str());
+}
+
+void Combo::set_popdown_strings(const Glib::ListHandle<Glib::ustring>& strings)
+{
+ gtk_combo_set_popdown_strings(gobj(), strings.data());
+}
+
+void Combo::disable_activate()
+{
+ gtk_combo_disable_activate(gobj());
+}
+
+Entry* Combo::get_entry()
+{
+ return Glib::wrap((GtkEntry*)(gobj()->entry));
+}
+
+const Entry* Combo::get_entry() const
+{
+ return Glib::wrap((GtkEntry*)(gobj()->entry));
+}
+
+ComboDropDown* Combo::get_list()
+{
+ return Glib::wrap((GtkList*)(gobj()->list));
+}
+
+const ComboDropDown* Combo::get_list() const
+{
+ return Glib::wrap((GtkList*)(gobj()->list));
+}
+
+
+Glib::PropertyProxy<bool> Combo::property_enable_arrow_keys()
+{
+ return Glib::PropertyProxy<bool>(this, "enable-arrow-keys");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Combo::property_enable_arrow_keys() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "enable-arrow-keys");
+}
+
+Glib::PropertyProxy<bool> Combo::property_enable_arrows_always()
+{
+ return Glib::PropertyProxy<bool>(this, "enable-arrows-always");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Combo::property_enable_arrows_always() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "enable-arrows-always");
+}
+
+Glib::PropertyProxy<bool> Combo::property_case_sensitive()
+{
+ return Glib::PropertyProxy<bool>(this, "case-sensitive");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Combo::property_case_sensitive() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "case-sensitive");
+}
+
+Glib::PropertyProxy<bool> Combo::property_allow_empty()
+{
+ return Glib::PropertyProxy<bool>(this, "allow-empty");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Combo::property_allow_empty() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "allow-empty");
+}
+
+Glib::PropertyProxy<bool> Combo::property_value_in_list()
+{
+ return Glib::PropertyProxy<bool>(this, "value-in-list");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Combo::property_value_in_list() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "value-in-list");
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/combo.h b/libs/gtkmm2/gtk/gtkmm/combo.h
new file mode 100644
index 0000000000..d0c973204d
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/combo.h
@@ -0,0 +1,545 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_COMBO_H
+#define _GTKMM_COMBO_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* combo.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/listhandle.h>
+#include <glibmm/helperlist.h>
+#include <gtkmm/box.h>
+#include <gtkmm/button.h>
+#include <gtkmm/entry.h>
+#include <gtkmm/item.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkListItem GtkListItem;
+typedef struct _GtkListItemClass GtkListItemClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class ComboDropDownItem_Class; } // namespace Gtk
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkList GtkList;
+typedef struct _GtkListClass GtkListClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class ComboDropDown_Class; } // namespace Gtk
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkCombo GtkCombo;
+typedef struct _GtkComboClass GtkComboClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class Combo_Class; } // namespace Gtk
+namespace Gtk
+{
+
+
+/** An item in a ComboDropDownList.
+ *
+ * Items in a ComboDropDownList inherit Item. Two signals are added.
+ *
+ * @deprecated Use the ComboBox widget instead.
+ */
+
+class ComboDropDownItem : public Gtk::Item
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef ComboDropDownItem CppObjectType;
+ typedef ComboDropDownItem_Class CppClassType;
+ typedef GtkListItem BaseObjectType;
+ typedef GtkListItemClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~ComboDropDownItem();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class ComboDropDownItem_Class;
+ static CppClassType combodropdownitem_class_;
+
+ // noncopyable
+ ComboDropDownItem(const ComboDropDownItem&);
+ ComboDropDownItem& operator=(const ComboDropDownItem&);
+
+protected:
+ explicit ComboDropDownItem(const Glib::ConstructParams& construct_params);
+ explicit ComboDropDownItem(GtkListItem* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkListItem* gobj() { return reinterpret_cast<GtkListItem*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkListItem* gobj() const { return reinterpret_cast<GtkListItem*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_scroll_horizontal(ScrollType scroll_type, float position);
+ virtual void on_scroll_vertical(ScrollType scroll_type, float position);
+
+
+private:
+
+
+public:
+ ComboDropDownItem();
+
+
+ Glib::SignalProxy2< void,ScrollType,float > signal_scroll_horizontal();
+
+
+ Glib::SignalProxy2< void,ScrollType,float > signal_scroll_vertical();
+
+
+};
+
+
+namespace ComboDropDown_Helpers
+{
+
+typedef Gtk::ComboDropDownItem Element;
+
+
+class ComboDropDownList : public Glib::HelperList< ComboDropDownItem, const Element, Glib::List_Cpp_Iterator<GtkListItem,ComboDropDownItem> >
+{
+public:
+ ComboDropDownList();
+ explicit ComboDropDownList(GtkList* gparent);
+ ComboDropDownList(const ComboDropDownList& src);
+ virtual ~ComboDropDownList() {}
+
+ ComboDropDownList& operator=(const ComboDropDownList& src);
+
+ typedef Glib::HelperList< ComboDropDownItem, const Element, Glib::List_Cpp_Iterator<GtkListItem,ComboDropDownItem> > type_base;
+
+ GtkList* gparent();
+ const GtkList* gparent() const;
+
+ virtual GList*& glist() const; // front of list
+
+ virtual void erase(iterator start, iterator stop);
+ virtual iterator erase(iterator); //Implented as custom or by LIST_CONTAINER_REMOVE
+ virtual void remove(const_reference); //Implented as custom or by LIST_CONTAINER_REMOVE
+
+ /// This is order n. (use at own risk)
+ reference operator[](size_type l) const;
+
+public:
+ iterator insert(iterator position, element_type& e); //custom-implemented.
+
+ template <class InputIterator>
+ inline void insert(iterator position, InputIterator first, InputIterator last)
+ {
+ for(;first != last; ++first)
+ position = insert(position, *first);
+ }
+
+ inline void push_front(element_type& e)
+ { insert(begin(), e); }
+ inline void push_back(element_type& e)
+ { insert(end(), e); }
+
+
+ iterator find(const_reference c);
+ iterator find(Widget&);
+
+ };
+
+
+} /* namespace ComboDropDown_Helpers */
+
+
+class Combo;
+
+/** The dropdown list of a Combo.
+ *
+ * A combo is a compound widget which crosses a text entry area and a pull
+ * down list. The dropdown list is implemented with the deprecated GtkList
+ * widget on the gtk+ side. ComboDropDown is a thin wrapper around GtkList
+ * containing just the functionality necessary for a Combo's list. To add
+ * and remove items use the STL-style interface that is accessible through
+ * ComboDropDown::children().
+ *
+ * @deprecated Use the ComboBox widget instead.
+ */
+
+class ComboDropDown : public Gtk::Container
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef ComboDropDown CppObjectType;
+ typedef ComboDropDown_Class CppClassType;
+ typedef GtkList BaseObjectType;
+ typedef GtkListClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~ComboDropDown();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class ComboDropDown_Class;
+ static CppClassType combodropdown_class_;
+
+ // noncopyable
+ ComboDropDown(const ComboDropDown&);
+ ComboDropDown& operator=(const ComboDropDown&);
+
+protected:
+ explicit ComboDropDown(const Glib::ConstructParams& construct_params);
+ explicit ComboDropDown(GtkList* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkList* gobj() { return reinterpret_cast<GtkList*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkList* gobj() const { return reinterpret_cast<GtkList*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_select_child(Widget& item);
+ virtual void on_selection_changed();
+ virtual void on_unselect_child(Widget& item);
+
+
+private:
+
+
+public:
+ typedef ComboDropDown_Helpers::ComboDropDownList ComboDropDownList;
+
+protected:
+ ComboDropDown();
+ friend class Combo;
+public:
+
+
+ void scroll_horizontal(ScrollType scroll_type, float position);
+
+ void scroll_vertical(ScrollType scroll_type, float position);
+
+ ComboDropDownList& children();
+ const ComboDropDownList& children() const;
+
+
+ Glib::SignalProxy1< void,Widget& > signal_select_child();
+
+
+ Glib::SignalProxy0< void > signal_selection_changed();
+
+
+ Glib::SignalProxy1< void,Widget& > signal_unselect_child();
+
+
+protected:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ mutable ComboDropDownList children_proxy_;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+};
+
+
+class ScrolledWindow;
+class Window;
+
+/** A text entry field with a dropdown list.
+ *
+ * A combo is a compound widget which crosses a text entry area and a pull
+ * down list. It may allow text entry or it may just allow list
+ * values depending on the settings.
+ *
+ * Access members allow altering of the widget components.
+ *
+ * @deprecated Use the ComboBox widget instead.
+ */
+
+class Combo : public HBox
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Combo CppObjectType;
+ typedef Combo_Class CppClassType;
+ typedef GtkCombo BaseObjectType;
+ typedef GtkComboClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~Combo();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class Combo_Class;
+ static CppClassType combo_class_;
+
+ // noncopyable
+ Combo(const Combo&);
+ Combo& operator=(const Combo&);
+
+protected:
+ explicit Combo(const Glib::ConstructParams& construct_params);
+ explicit Combo(GtkCombo* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkCombo* gobj() { return reinterpret_cast<GtkCombo*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkCombo* gobj() const { return reinterpret_cast<GtkCombo*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+public:
+
+ Combo();
+
+
+ /** Allow direct text entry
+ * Whether the text in the entry must be or not be in the list.
+ *
+ * @param value Set to true if the value must be in list.
+ * @param empty Set to true if the text area is allowed to be empty.
+ */
+
+ void set_value_in_list(bool value = true, bool empty = false);
+
+ /** Set arrows keys to change value
+ * Up and down will scroll through the list items.
+ * Useful when there is a small list of value that the
+ * list must have.
+ *
+ * @param arrows_on true indicates the arrow keys scroll.
+ */
+
+ void set_use_arrows(bool arrows_on = true);
+
+ /** Set arrows keys to change if value not in list
+ * Up and down will scroll through the list items but only
+ * change the current value if the text does not match a list item..
+ * Useful when there is a small list of value that the
+ * list must have.
+ *
+ * @param arrows_always true indicates the value will change.
+ */
+
+ void set_use_arrows_always(bool arrows_always = true);
+
+ /** Sets list case sensitive
+ * Determines if the list items and text comparisons for
+ * set_use_arrows_always() should be case sensitive.
+ */
+
+ void set_case_sensitive(bool val = true);
+
+ /** Set the current entry Glib::ustring
+ * Call this function on an item if it isn't a label or you
+ * want it to have a different value to be displayed in the entry
+ */
+
+ void set_item_string(Gtk::Item& item, const Glib::ustring& item_value);
+ void remove_item_string(Gtk::Item& item);
+
+ /// Insert a list of items.
+
+ void set_popdown_strings(const Glib::ListHandle<Glib::ustring>& strings);
+
+ Glib::ListHandle<Glib::ustring> get_popdown_strings() const;
+
+
+ void disable_activate();
+
+ Entry* get_entry();
+ const Entry* get_entry() const;
+ ComboDropDown* get_list();
+ const ComboDropDown* get_list() const;
+
+ /** Whether the arrow keys move through the list of items.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_enable_arrow_keys() ;
+
+/** Whether the arrow keys move through the list of items.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_enable_arrow_keys() const;
+
+ /** Obsolete property
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_enable_arrows_always() ;
+
+/** Obsolete property
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_enable_arrows_always() const;
+
+ /** Whether list item matching is case sensitive.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_case_sensitive() ;
+
+/** Whether list item matching is case sensitive.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_case_sensitive() const;
+
+ /** Whether an empty value may be entered in this field.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_allow_empty() ;
+
+/** Whether an empty value may be entered in this field.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_allow_empty() const;
+
+ /** Whether entered values must already be present in the list.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_value_in_list() ;
+
+/** Whether entered values must already be present in the list.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_value_in_list() const;
+
+
+};
+
+
+} /* namespace Gtk */
+
+
+namespace Glib
+{
+ /** @relates Gtk::ComboDropDownItem
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::ComboDropDownItem* wrap(GtkListItem* object, bool take_copy = false);
+}
+namespace Glib
+{
+ /** @relates Gtk::ComboDropDown
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::ComboDropDown* wrap(GtkList* object, bool take_copy = false);
+}
+namespace Glib
+{
+ /** @relates Gtk::Combo
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::Combo* wrap(GtkCombo* object, bool take_copy = false);
+}
+#endif /* _GTKMM_COMBO_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/combobox.cc b/libs/gtkmm2/gtk/gtkmm/combobox.cc
new file mode 100644
index 0000000000..d16c27d274
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/combobox.cc
@@ -0,0 +1,452 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/combobox.h>
+#include <gtkmm/private/combobox_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 2003 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/liststore.h>
+#include <gtkmm/cellrenderertext.h>
+#include <gtkmm/treeview_private.h> //For SignalProxy_RowSeparator.
+#include <gtk/gtkcombobox.h>
+#include <gtk/gtkcelllayout.h>
+
+namespace Gtk
+{
+
+void ComboBox::unset_active()
+{
+ gtk_combo_box_set_active(gobj(), -1 /* see GTK+ docs */);
+}
+
+TreeModel::iterator ComboBox::get_active()
+{
+ Gtk::TreeModel::iterator iter;
+
+ Glib::RefPtr<Gtk::TreeModel> model = get_model();
+ if(model)
+ {
+ gtk_combo_box_get_active_iter(gobj(), iter.gobj());
+
+ //It must be given the model, because the C++ wrapper has extra information.
+ iter.set_model_gobject(model->gobj());
+ }
+
+ return iter;
+}
+
+TreeModel::const_iterator ComboBox::get_active() const
+{
+ Gtk::TreeModel::iterator iter;
+
+ Glib::RefPtr<const Gtk::TreeModel> model = get_model();
+ if(model)
+ {
+ gtk_combo_box_get_active_iter(const_cast<GtkComboBox*>(gobj()), iter.gobj());
+
+ //It must be given the model, because the C++ wrapper has extra information.
+ iter.set_model_gobject(const_cast<GtkTreeModel*>(model->gobj()));
+ }
+
+ return iter;
+}
+
+
+void ComboBox::set_row_separator_func(const SlotRowSeparator& slot)
+{
+ //Create a signal proxy. A pointer to this will be passed through the callback's data parameter.
+ //It will be deleted when SignalProxy_RowSeparator::gtk_callback_destroy() is called.
+ TreeView_Private::SignalProxy_RowSeparator *const pSignalProxy = new TreeView_Private::SignalProxy_RowSeparator(slot);
+
+ gtk_combo_box_set_row_separator_func(gobj(),
+ &TreeView_Private::SignalProxy_RowSeparator::gtk_callback, pSignalProxy,
+ &TreeView_Private::SignalProxy_RowSeparator::gtk_callback_destroy);
+}
+
+void ComboBox::unset_row_separator_func()
+{
+ gtk_combo_box_set_row_separator_func(gobj(), 0, 0, 0 /* See C docs. */);
+}
+
+} // namespace Gtk
+
+
+namespace
+{
+
+const Glib::SignalProxyInfo ComboBox_signal_changed_info =
+{
+ "changed",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::ComboBox* wrap(GtkComboBox* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::ComboBox *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& ComboBox_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &ComboBox_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_combo_box_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ CellLayout::add_interface(get_type());
+ }
+
+ return *this;
+}
+
+void ComboBox_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->changed = &changed_callback;
+}
+
+
+void ComboBox_Class::changed_callback(GtkComboBox* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_changed();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->changed)
+ (*base->changed)(self);
+ }
+}
+
+
+Glib::ObjectBase* ComboBox_Class::wrap_new(GObject* o)
+{
+ return manage(new ComboBox((GtkComboBox*)(o)));
+
+}
+
+
+/* The implementation: */
+
+ComboBox::ComboBox(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Bin(construct_params)
+{
+ }
+
+ComboBox::ComboBox(GtkComboBox* castitem)
+:
+ Gtk::Bin((GtkBin*)(castitem))
+{
+ }
+
+ComboBox::~ComboBox()
+{
+ destroy_();
+}
+
+ComboBox::CppClassType ComboBox::combobox_class_; // initialize static member
+
+GType ComboBox::get_type()
+{
+ return combobox_class_.init().get_type();
+}
+
+GType ComboBox::get_base_type()
+{
+ return gtk_combo_box_get_type();
+}
+
+
+ComboBox::ComboBox()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Bin(Glib::ConstructParams(combobox_class_.init()))
+{
+ }
+
+ComboBox::ComboBox(const Glib::RefPtr<TreeModel>& model)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Bin(Glib::ConstructParams(combobox_class_.init(), "model", Glib::unwrap(model), (char*) 0))
+{
+ }
+
+void ComboBox::set_wrap_width(int width)
+{
+ gtk_combo_box_set_wrap_width(gobj(), width);
+}
+
+int ComboBox::get_wrap_width() const
+{
+ return gtk_combo_box_get_wrap_width(const_cast<GtkComboBox*>(gobj()));
+}
+
+void ComboBox::set_row_span_column(int row_span)
+{
+ gtk_combo_box_set_row_span_column(gobj(), row_span);
+}
+
+int ComboBox::get_row_span_column() const
+{
+ return gtk_combo_box_get_row_span_column(const_cast<GtkComboBox*>(gobj()));
+}
+
+void ComboBox::set_column_span_column(int column_span)
+{
+ gtk_combo_box_set_column_span_column(gobj(), column_span);
+}
+
+int ComboBox::get_column_span_column() const
+{
+ return gtk_combo_box_get_column_span_column(const_cast<GtkComboBox*>(gobj()));
+}
+
+bool ComboBox::get_add_tearoffs() const
+{
+ return gtk_combo_box_get_add_tearoffs(const_cast<GtkComboBox*>(gobj()));
+}
+
+void ComboBox::set_add_tearoffs(bool add_tearoffs)
+{
+ gtk_combo_box_set_add_tearoffs(gobj(), static_cast<int>(add_tearoffs));
+}
+
+bool ComboBox::get_focus_on_click() const
+{
+ return gtk_combo_box_get_focus_on_click(const_cast<GtkComboBox*>(gobj()));
+}
+
+void ComboBox::set_focus_on_click(bool focus_on_click)
+{
+ gtk_combo_box_set_focus_on_click(gobj(), static_cast<int>(focus_on_click));
+}
+
+int ComboBox::get_active_row_number() const
+{
+ return gtk_combo_box_get_active(const_cast<GtkComboBox*>(gobj()));
+}
+
+void ComboBox::set_active(int index)
+{
+ gtk_combo_box_set_active(gobj(), index);
+}
+
+void ComboBox::set_active(const TreeModel::iterator& iter)
+{
+ gtk_combo_box_set_active_iter(gobj(), const_cast<GtkTreeIter*>((iter).gobj()));
+}
+
+Glib::RefPtr<TreeModel> ComboBox::get_model()
+{
+
+ Glib::RefPtr<TreeModel> retvalue = Glib::wrap(gtk_combo_box_get_model(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const TreeModel> ComboBox::get_model() const
+{
+
+ Glib::RefPtr<const TreeModel> retvalue = Glib::wrap(gtk_combo_box_get_model(const_cast<GtkComboBox*>(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+void ComboBox::set_model(const Glib::RefPtr<TreeModel>& model)
+{
+ gtk_combo_box_set_model(gobj(), Glib::unwrap(model));
+}
+
+void ComboBox::popup()
+{
+ gtk_combo_box_popup(gobj());
+}
+
+void ComboBox::popdown()
+{
+ gtk_combo_box_popdown(gobj());
+}
+
+Glib::RefPtr<Atk::Object> ComboBox::get_popup_accessible()
+{
+ return Glib::wrap(gtk_combo_box_get_popup_accessible(gobj()));
+}
+
+Glib::RefPtr<const Atk::Object> ComboBox::get_popup_accessible() const
+{
+ return Glib::wrap(gtk_combo_box_get_popup_accessible(const_cast<GtkComboBox*>(gobj())));
+}
+
+
+Glib::SignalProxy0< void > ComboBox::signal_changed()
+{
+ return Glib::SignalProxy0< void >(this, &ComboBox_signal_changed_info);
+}
+
+
+Glib::PropertyProxy< Glib::RefPtr<TreeModel> > ComboBox::property_model()
+{
+ return Glib::PropertyProxy< Glib::RefPtr<TreeModel> >(this, "model");
+}
+
+Glib::PropertyProxy_ReadOnly< Glib::RefPtr<TreeModel> > ComboBox::property_model() const
+{
+ return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<TreeModel> >(this, "model");
+}
+
+Glib::PropertyProxy<int> ComboBox::property_wrap_width()
+{
+ return Glib::PropertyProxy<int>(this, "wrap-width");
+}
+
+Glib::PropertyProxy_ReadOnly<int> ComboBox::property_wrap_width() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "wrap-width");
+}
+
+Glib::PropertyProxy<int> ComboBox::property_row_span_column()
+{
+ return Glib::PropertyProxy<int>(this, "row-span-column");
+}
+
+Glib::PropertyProxy_ReadOnly<int> ComboBox::property_row_span_column() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "row-span-column");
+}
+
+Glib::PropertyProxy<int> ComboBox::property_column_span_column()
+{
+ return Glib::PropertyProxy<int>(this, "column-span-column");
+}
+
+Glib::PropertyProxy_ReadOnly<int> ComboBox::property_column_span_column() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "column-span-column");
+}
+
+Glib::PropertyProxy<int> ComboBox::property_active()
+{
+ return Glib::PropertyProxy<int>(this, "active");
+}
+
+Glib::PropertyProxy_ReadOnly<int> ComboBox::property_active() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "active");
+}
+
+Glib::PropertyProxy<bool> ComboBox::property_add_tearoffs()
+{
+ return Glib::PropertyProxy<bool>(this, "add-tearoffs");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> ComboBox::property_add_tearoffs() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "add-tearoffs");
+}
+
+Glib::PropertyProxy<bool> ComboBox::property_has_frame()
+{
+ return Glib::PropertyProxy<bool>(this, "has-frame");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> ComboBox::property_has_frame() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "has-frame");
+}
+
+Glib::PropertyProxy<bool> ComboBox::property_focus_on_click()
+{
+ return Glib::PropertyProxy<bool>(this, "focus-on-click");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> ComboBox::property_focus_on_click() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "focus-on-click");
+}
+
+
+void Gtk::ComboBox::on_changed()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->changed)
+ (*base->changed)(gobj());
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/combobox.h b/libs/gtkmm2/gtk/gtkmm/combobox.h
new file mode 100644
index 0000000000..c143e59bc2
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/combobox.h
@@ -0,0 +1,492 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_COMBOBOX_H
+#define _GTKMM_COMBOBOX_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* combobox.h
+ *
+ * Copyright (C) 2003 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/bin.h>
+#include <gtkmm/celllayout.h>
+#include <gtkmm/treemodel.h>
+#include <gtkmm/cellrenderer.h>
+#include <gtkmm/treeview.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkComboBox GtkComboBox;
+typedef struct _GtkComboBoxClass GtkComboBoxClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class ComboBox_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** A widget used to choose from a list of items.
+ *
+ * A ComboBox is a widget that allows the user to choose from a list of valid choices. The ComboBox displays the
+ * selected choice. When activated, the ComboBox displays a popup which allows the user to make a new choice. The
+ * style in which the selected value is displayed, and the style of the popup is determined by the current theme.
+ * It may be similar to a OptionMenu, or similar to a Windows-style combo box.
+ *
+ * The ComboBox uses the model-view pattern; the list of valid choices is specified in the form of a tree model,
+ * and the display of the choices can be adapted to the data in the model by using cell renderers, as you would in
+ * a tree view. This is possible since ComboBox implements the CellLayout interface. The tree model holding the
+ * valid choices is not restricted to a flat list, it can be a real tree, and the popup will reflect the tree
+ * structure.
+ *
+ * See also ComboBoxText, which is specialised for a single text column.
+ *
+ * @ingroup Widgets
+ */
+
+class ComboBox
+: public Bin,
+ public CellLayout
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef ComboBox CppObjectType;
+ typedef ComboBox_Class CppClassType;
+ typedef GtkComboBox BaseObjectType;
+ typedef GtkComboBoxClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~ComboBox();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class ComboBox_Class;
+ static CppClassType combobox_class_;
+
+ // noncopyable
+ ComboBox(const ComboBox&);
+ ComboBox& operator=(const ComboBox&);
+
+protected:
+ explicit ComboBox(const Glib::ConstructParams& construct_params);
+ explicit ComboBox(GtkComboBox* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkComboBox* gobj() { return reinterpret_cast<GtkComboBox*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkComboBox* gobj() const { return reinterpret_cast<GtkComboBox*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_changed();
+
+
+private:
+
+
+public:
+ ComboBox();
+
+ /** Creates a new ComboBox with the model initialized to @a model.
+ */
+ explicit ComboBox(const Glib::RefPtr<TreeModel>& model);
+ //See ComboBoxText for an equivalent of gtk_combo_box_new_text().
+
+
+ /** Sets the wrap width of @a combo_box to be @a width . The wrap width is basically
+ * the preferred number of columns when you want the popup to be layed out
+ * in a table.
+ *
+ * Since: 2.4
+ * @param width Preferred number of columns.
+ */
+ void set_wrap_width(int width);
+
+ /** Returns the wrap width which is used to determine the number
+ * of columns for the popup menu. If the wrap width is larger than
+ * 1, the combo box is in table mode.
+ * @return The wrap width.
+ *
+ * Since: 2.6.
+ */
+ int get_wrap_width() const;
+
+
+ /** Sets the column with row span information for @a combo_box to be @a row_span .
+ * The row span column contains integers which indicate how many rows
+ * an item should span.
+ *
+ * Since: 2.4
+ * @param row_span A column in the model passed during construction.
+ */
+ void set_row_span_column(int row_span);
+
+ /** Returns the column with row span information for @a combo_box .
+ * @return The row span column.
+ *
+ * Since: 2.6.
+ */
+ int get_row_span_column() const;
+
+
+ /** Sets the column with column span information for @a combo_box to be
+ * @a column_span . The column span column contains integers which indicate
+ * how many columns an item should span.
+ *
+ * Since: 2.4
+ * @param column_span A column in the model passed during construction.
+ */
+ void set_column_span_column(int column_span);
+
+ /** Returns the column with column span information for @a combo_box .
+ * @return The column span column.
+ *
+ * Since: 2.6.
+ */
+ int get_column_span_column() const;
+
+
+ /** Gets the current value of the :add-tearoffs property.
+ * @return The current value of the :add-tearoffs property.
+ */
+ bool get_add_tearoffs() const;
+
+ /** Sets whether the popup menu should have a tearoff
+ * menu item.
+ *
+ * Since: 2.6
+ * @param add_tearoffs <tt>true</tt> to add tearoff menu items.
+ */
+ void set_add_tearoffs(bool add_tearoffs = true);
+
+
+ /** Returns whether the combo box grabs focus when it is clicked
+ * with the mouse. See set_focus_on_click().
+ * @return <tt>true</tt> if the combo box grabs focus when it is
+ * clicked with the mouse.
+ *
+ * Since: 2.6.
+ */
+ bool get_focus_on_click() const;
+
+ /** Sets whether the combo box will grab focus when it is clicked with
+ * the mouse. Making mouse clicks not grab focus is useful in places
+ * like toolbars where you don't want the keyboard focus removed from
+ * the main area of the application.
+ *
+ * Since: 2.6
+ * @param focus_on_click Whether the combo box grabs focus when clicked
+ * with the mouse.
+ */
+ void set_focus_on_click(bool focus_on_click = true);
+
+/* get/set active item */
+
+ /** Returns the index of the currently active item, or -1 if there's no
+ * active item. If the model is a non-flat treemodel, and the active item
+ * is not an immediate child of the root of the tree, this function returns
+ * <tt>gtk_tree_path_get_indices (path)[0]</tt>, where
+ * <tt>path</tt> is the Gtk::TreePath of the active item.
+ * @return An integer which is the index of the currently active item, or
+ * -1 if there's no active item.
+ *
+ * Since: 2.4.
+ */
+ int get_active_row_number() const;
+
+ /** Gets an iterator that points to the current active item, if it exists.
+ * @result The iterator.
+ */
+ TreeModel::iterator get_active();
+
+ /** Gets an iterator that points to the current active item, if it exists.
+ * @result The iterator.
+ */
+ TreeModel::const_iterator get_active() const;
+
+
+ /** Sets the active item of @a combo_box to be the item at @a index .
+ *
+ * Since: 2.4
+ * @param index An index in the model passed during construction, or -1 to have
+ * no active item.
+ */
+ void set_active(int index);
+
+ /** Sets the current active item to be the one referenced by @a iter .
+ * @a iter must correspond to a path of depth one.
+ *
+ * Since: 2.4
+ * @param iter The Gtk::TreeIter.
+ */
+ void set_active(const TreeModel::iterator& iter);
+
+ /** Causes no item to be active. See also set_active().
+ */
+ void unset_active();
+
+
+ /** Returns the Gtk::TreeModel which is acting as data source for @a combo_box .
+ * @return A Gtk::TreeModel which was passed during construction.
+ *
+ * Since: 2.4.
+ */
+ Glib::RefPtr<TreeModel> get_model();
+
+ /** Returns the Gtk::TreeModel which is acting as data source for @a combo_box .
+ * @return A Gtk::TreeModel which was passed during construction.
+ *
+ * Since: 2.4.
+ */
+ Glib::RefPtr<const TreeModel> get_model() const;
+
+ /** Sets the model used by @a combo_box to be @a model . Will unset a previously set
+ * model (if applicable). If model is <tt>0</tt>, then it will unset the model.
+ *
+ * Note that this function does not clear the cell renderers, you have to
+ * call gtk_combo_box_cell_layout_clear() yourself if you need to set up
+ * different cell renderers for the new model.
+ *
+ * Since: 2.4
+ * @param model A Gtk::TreeModel.
+ */
+ void set_model(const Glib::RefPtr<TreeModel>& model);
+
+ typedef TreeView::SlotRowSeparator SlotRowSeparator;
+
+ /** Sets the row separator function, which is used to determine whether a row should be drawn as a separator.
+ * See also unset_row_separator_func().
+ *
+ * @param slot The callback.
+ */
+ void set_row_separator_func(const SlotRowSeparator& slot);
+
+ /** Causes no separators to be drawn.
+ */
+ void unset_row_separator_func();
+
+
+ /** Pops up the menu or dropdown list of @a combo_box .
+ *
+ * This function is mostly intended for use by accessibility technologies;
+ * applications should have little use for it.
+ *
+ * Since: 2.4
+ */
+ void popup();
+
+ /** Hides the menu or dropdown list of @a combo_box .
+ *
+ * This function is mostly intended for use by accessibility technologies;
+ * applications should have little use for it.
+ *
+ * Since: 2.4
+ */
+ void popdown();
+
+
+ /** Gets the accessible object corresponding to the combo box's popup.
+ *
+ * This function is mostly intended for use by accessibility technologies;
+ * applications should have little use for it.
+ * @return The accessible object corresponding to the combo box's popup.
+ *
+ * Since: 2.6.
+ */
+ Glib::RefPtr<Atk::Object> get_popup_accessible();
+
+ /** Gets the accessible object corresponding to the combo box's popup.
+ *
+ * This function is mostly intended for use by accessibility technologies;
+ * applications should have little use for it.
+ * @return The accessible object corresponding to the combo box's popup.
+ *
+ * Since: 2.6.
+ */
+ Glib::RefPtr<const Atk::Object> get_popup_accessible() const;
+
+ //These are in ComboBoxText.
+
+ /** The model for the combo box.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy< Glib::RefPtr<TreeModel> > property_model() ;
+
+/** The model for the combo box.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly< Glib::RefPtr<TreeModel> > property_model() const;
+
+ /** Wrap width for layouting the items in a grid.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_wrap_width() ;
+
+/** Wrap width for layouting the items in a grid.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_wrap_width() const;
+
+ /** TreeModel column containing the row span values.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_row_span_column() ;
+
+/** TreeModel column containing the row span values.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_row_span_column() const;
+
+ /** TreeModel column containing the column span values.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_column_span_column() ;
+
+/** TreeModel column containing the column span values.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_column_span_column() const;
+
+ /** The item which is currently active.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_active() ;
+
+/** The item which is currently active.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_active() const;
+
+ /** Whether dropdowns should have a tearoff menu item.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_add_tearoffs() ;
+
+/** Whether dropdowns should have a tearoff menu item.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_add_tearoffs() const;
+
+ /** Whether the combo box draws a frame around the child.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_has_frame() ;
+
+/** Whether the combo box draws a frame around the child.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_has_frame() const;
+
+ /** Whether the combo box grabs focus when it is clicked with the mouse.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_focus_on_click() ;
+
+/** Whether the combo box grabs focus when it is clicked with the mouse.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_focus_on_click() const;
+
+
+ Glib::SignalProxy0< void > signal_changed();
+
+
+};
+
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::ComboBox
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::ComboBox* wrap(GtkComboBox* object, bool take_copy = false);
+}
+#endif /* _GTKMM_COMBOBOX_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/comboboxentry.cc b/libs/gtkmm2/gtk/gtkmm/comboboxentry.cc
new file mode 100644
index 0000000000..90a0bf6b39
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/comboboxentry.cc
@@ -0,0 +1,176 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/comboboxentry.h>
+#include <gtkmm/private/comboboxentry_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 2003 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkcomboboxentry.h>
+
+namespace Gtk
+{
+
+
+Entry* ComboBoxEntry::get_entry()
+{
+ return Glib::wrap((GtkEntry*)(gtk_bin_get_child((GtkBin*)gobj())));
+}
+
+const Entry* ComboBoxEntry::get_entry() const
+{
+ GtkBin* base = (GtkBin*)const_cast<GtkComboBoxEntry*>(gobj());
+ return Glib::wrap((GtkEntry*)(gtk_bin_get_child(base)));
+}
+
+
+} // namespace Gtk
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::ComboBoxEntry* wrap(GtkComboBoxEntry* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::ComboBoxEntry *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& ComboBoxEntry_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &ComboBoxEntry_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_combo_box_entry_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void ComboBoxEntry_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* ComboBoxEntry_Class::wrap_new(GObject* o)
+{
+ return manage(new ComboBoxEntry((GtkComboBoxEntry*)(o)));
+
+}
+
+
+/* The implementation: */
+
+ComboBoxEntry::ComboBoxEntry(const Glib::ConstructParams& construct_params)
+:
+ Gtk::ComboBox(construct_params)
+{
+ }
+
+ComboBoxEntry::ComboBoxEntry(GtkComboBoxEntry* castitem)
+:
+ Gtk::ComboBox((GtkComboBox*)(castitem))
+{
+ }
+
+ComboBoxEntry::~ComboBoxEntry()
+{
+ destroy_();
+}
+
+ComboBoxEntry::CppClassType ComboBoxEntry::comboboxentry_class_; // initialize static member
+
+GType ComboBoxEntry::get_type()
+{
+ return comboboxentry_class_.init().get_type();
+}
+
+GType ComboBoxEntry::get_base_type()
+{
+ return gtk_combo_box_entry_get_type();
+}
+
+
+ComboBoxEntry::ComboBoxEntry()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::ComboBox(Glib::ConstructParams(comboboxentry_class_.init()))
+{
+ }
+
+ComboBoxEntry::ComboBoxEntry(const Glib::RefPtr<TreeModel>& model, const TreeModelColumnBase& text_column)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::ComboBox(Glib::ConstructParams(comboboxentry_class_.init(), "model", Glib::unwrap(model), "text_column", (text_column).index(), (char*) 0))
+{
+ }
+
+ComboBoxEntry::ComboBoxEntry(const Glib::RefPtr<TreeModel>& model, int text_column)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::ComboBox(Glib::ConstructParams(comboboxentry_class_.init(), "model", Glib::unwrap(model), "text_column", text_column, (char*) 0))
+{
+ }
+
+void ComboBoxEntry::set_text_column(const TreeModelColumnBase& text_column) const
+{
+ gtk_combo_box_entry_set_text_column(const_cast<GtkComboBoxEntry*>(gobj()), (text_column).index());
+}
+
+void ComboBoxEntry::set_text_column(int text_column) const
+{
+ gtk_combo_box_entry_set_text_column(const_cast<GtkComboBoxEntry*>(gobj()), text_column);
+}
+
+int ComboBoxEntry::get_text_column() const
+{
+ return gtk_combo_box_entry_get_text_column(const_cast<GtkComboBoxEntry*>(gobj()));
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/comboboxentry.h b/libs/gtkmm2/gtk/gtkmm/comboboxentry.h
new file mode 100644
index 0000000000..dce4c67019
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/comboboxentry.h
@@ -0,0 +1,183 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_COMBOBOXENTRY_H
+#define _GTKMM_COMBOBOXENTRY_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* combobox.h
+ *
+ * Copyright (C) 2003 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/combobox.h>
+#include <gtkmm/entry.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkComboBoxEntry GtkComboBoxEntry;
+typedef struct _GtkComboBoxEntryClass GtkComboBoxEntryClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class ComboBoxEntry_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** A text entry field with a dropdown list
+ * A ComboBoxEntry is a widget that allows the user to choose from a list of valid choices or enter a different
+ * value. It is very similar to a ComboBox, but it displays the selected value in an entry to allow modifying it.
+ *
+ * In contrast to a ComboBox, the underlying model of a ComboBoxEntry must always have a text column (see
+ * set_text_column()), and the entry will show the content of the text column in the selected row.
+ *
+ * See also ComboBoxEntryText, , which is specialised for a single text column.
+ *
+ * To add and remove strings from the list, just modify the model using its data manipulation API. You can get the * Entry by using get_child().
+ *
+ * @ingroup Widgets
+ */
+
+class ComboBoxEntry : public ComboBox
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef ComboBoxEntry CppObjectType;
+ typedef ComboBoxEntry_Class CppClassType;
+ typedef GtkComboBoxEntry BaseObjectType;
+ typedef GtkComboBoxEntryClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~ComboBoxEntry();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class ComboBoxEntry_Class;
+ static CppClassType comboboxentry_class_;
+
+ // noncopyable
+ ComboBoxEntry(const ComboBoxEntry&);
+ ComboBoxEntry& operator=(const ComboBoxEntry&);
+
+protected:
+ explicit ComboBoxEntry(const Glib::ConstructParams& construct_params);
+ explicit ComboBoxEntry(GtkComboBoxEntry* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkComboBoxEntry* gobj() { return reinterpret_cast<GtkComboBoxEntry*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkComboBoxEntry* gobj() const { return reinterpret_cast<GtkComboBoxEntry*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+public:
+ ComboBoxEntry();
+ //See ComboBoxEntryText for an equivalent of gtk_combo_box_entry_new_text().
+
+ /** Creates a new ComboBoxEntry which has an Entry as child and a list of strings as popup. You can get the
+ * Entry from a ComboBoxEntry using get_entry(). To add and remove strings from the list, just modify @a model
+ * using its data manipulation API.
+ *
+ * @param model A TreeModel.
+ * @param text_column A column in @a model to get the strings from.
+ */
+ explicit ComboBoxEntry(const Glib::RefPtr<TreeModel>& model, const TreeModelColumnBase& text_column);
+
+ /** Creates a new ComboBoxEntry which has an Entry as child and a list of strings as popup. You can get the
+ * Entry from a ComboBoxEntry using get_entry(). To add and remove strings from the list, just modify @a model
+ * using its data manipulation API.
+ *
+ * @param model A TreeModel.
+ * @param text_column A column in @a model to get the strings from.
+ */
+ explicit ComboBoxEntry(const Glib::RefPtr<TreeModel>& model, int text_column = 0);
+
+
+ /** Sets the model column which @a entry_box should use to get strings from
+ * to be @a text_column .
+ *
+ * Since: 2.4.
+ * @param text_column A column in @a model to get the strings from.
+ */
+ void set_text_column(const TreeModelColumnBase& text_column) const;
+
+ /** Sets the model column which @a entry_box should use to get strings from
+ * to be @a text_column .
+ *
+ * Since: 2.4.
+ * @param text_column A column in @a model to get the strings from.
+ */
+ void set_text_column(int text_column) const;
+
+ /** Returns the column which @a entry_box is using to get the strings from.
+ * @return A column in the data source model of @a entry_box .
+ *
+ * Since: 2.4.
+ */
+ int get_text_column() const;
+
+ //The child is always an entry:
+
+ /** See Bin::get_entry().
+ */
+ Entry* get_entry();
+
+ /** See Bin::get_entry().
+ */
+ const Entry* get_entry() const;
+
+
+};
+
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::ComboBoxEntry
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::ComboBoxEntry* wrap(GtkComboBoxEntry* object, bool take_copy = false);
+}
+#endif /* _GTKMM_COMBOBOXENTRY_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/comboboxentrytext.cc b/libs/gtkmm2/gtk/gtkmm/comboboxentrytext.cc
new file mode 100644
index 0000000000..d74c01ae72
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/comboboxentrytext.cc
@@ -0,0 +1,134 @@
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 2003 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/comboboxentrytext.h>
+
+#include <gtkmm/liststore.h>
+#include <gtkmm/cellrenderertext.h>
+#include <gtk/gtkcombobox.h>
+#include <gtk/gtkcelllayout.h>
+
+namespace Gtk
+{
+
+ComboBoxEntryText::ComboBoxEntryText()
+{
+ set_model( Gtk::ListStore::create(m_text_columns) );
+ set_text_column(m_text_columns.m_column);
+}
+
+ComboBoxEntryText::ComboBoxEntryText(GtkComboBoxEntry* castitem)
+: Gtk::ComboBoxEntry(castitem)
+{
+ set_model( Gtk::ListStore::create(m_text_columns) );
+ set_text_column(m_text_columns.m_column);
+}
+
+void ComboBoxEntryText::append_text(const Glib::ustring& text)
+{
+ //We can not use gtk_combo_box_append_text() here, because that can only be used if gtk_combo_box_new_text() has been used.
+
+ //Ideally, we would just store the ListStore as a member variable, but we forgot to do that and not it would break the ABI.
+ Glib::RefPtr<Gtk::TreeModel> model = get_model();
+ Glib::RefPtr<Gtk::ListStore> list_model = Glib::RefPtr<ListStore>::cast_dynamic(model);
+
+ if(list_model)
+ {
+ Gtk::TreeModel::iterator iter = list_model->append();
+ Gtk::TreeModel::Row row = *iter;
+ row[m_text_columns.m_column] = text;
+ }
+}
+
+void ComboBoxEntryText::insert_text(int position, const Glib::ustring& text)
+{
+ //TODO: We should not use gtk_combo_box_insert_text() here, because that can only be used if gtk_combo_box_new_text() has been used.
+ gtk_combo_box_insert_text(GTK_COMBO_BOX(gobj()), position, text.c_str());
+}
+
+void ComboBoxEntryText::prepend_text(const Glib::ustring& text)
+{
+ //We can not use gtk_combo_box_prepend_text() here, because that can only be used if gtk_combo_box_new_text() has been used.
+
+ //Ideally, we would just store the ListStore as a member variable, but we forgot to do that and not it would break the ABI.
+ Glib::RefPtr<Gtk::TreeModel> model = get_model();
+ Glib::RefPtr<Gtk::ListStore> list_model = Glib::RefPtr<ListStore>::cast_dynamic(model);
+
+ if(list_model)
+ {
+ Gtk::TreeModel::iterator iter = list_model->prepend();
+ Gtk::TreeModel::Row row = *iter;
+ row[m_text_columns.m_column] = text;
+ }
+}
+
+void ComboBoxEntryText::clear()
+{
+ //Ideally, we would just store the ListStore as a member variable, but we forgot to do that and not it would break the ABI.
+ Glib::RefPtr<Gtk::TreeModel> model = get_model();
+ Glib::RefPtr<Gtk::ListStore> list_model = Glib::RefPtr<ListStore>::cast_dynamic(model);
+
+ if(list_model)
+ list_model->clear();
+}
+
+Glib::ustring ComboBoxEntryText::get_active_text() const
+{
+ Glib::ustring result;
+
+ //Get the active row:
+ TreeModel::iterator active_row = get_active();
+ if(active_row)
+ {
+ Gtk::TreeModel::Row row = *active_row;
+ result = row[m_text_columns.m_column];
+ }
+
+ return result;
+}
+
+void ComboBoxEntryText::set_active_text(const Glib::ustring& text)
+{
+ //Look for the row with this text, and activate it:
+ Glib::RefPtr<Gtk::TreeModel> model = get_model();
+ if(model)
+ {
+ for(Gtk::TreeModel::iterator iter = model->children().begin(); iter != model->children().end(); ++iter)
+ {
+ const Glib::ustring& this_text = (*iter)[m_text_columns.m_column];
+
+ if(this_text == text)
+ {
+ set_active(iter);
+ return; //success
+ }
+ }
+ }
+
+ //Not found, so mark it as blank:
+ unset_active();
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/comboboxentrytext.h b/libs/gtkmm2/gtk/gtkmm/comboboxentrytext.h
new file mode 100644
index 0000000000..fe9e6bbdf8
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/comboboxentrytext.h
@@ -0,0 +1,89 @@
+// -*- c++ -*-
+#ifndef _GTKMM_COMBOBOXENTRYTEXT_H
+#define _GTKMM_COMBOBOXENTRYTEXT_H
+
+/* comboboxentrytext.h
+ *
+ * Copyright (C) 2003 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/comboboxentry.h>
+
+namespace Gtk
+{
+
+//This is a C++ convenience class that is equivalent to the gtk_combo_box_entry_new_text() C convenience function.
+//This is copy/paste/search/replaced from ComboBoxText, but the only alternative I see is to use multiple inheritance.
+//murrayc.
+
+/** This is a specialisation of the ComboBoxEntry which has one column of text (a simple list),
+ * and appropriate methods for setting and getting the text.
+ *
+ * @ingroup Widgets
+ */
+
+class ComboBoxEntryText
+: public ComboBoxEntry
+{
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+private:
+ // noncopyable
+ ComboBoxEntryText(const ComboBoxEntryText&);
+ ComboBoxEntryText& operator=(const ComboBoxEntryText&);
+
+protected:
+ explicit ComboBoxEntryText(const Glib::ConstructParams& construct_params);
+ explicit ComboBoxEntryText(GtkComboBoxEntry* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ ComboBoxEntryText();
+
+ void append_text(const Glib::ustring& text);
+
+ void insert_text(int position, const Glib::ustring& text);
+
+ void prepend_text(const Glib::ustring& text);
+
+ Glib::ustring get_active_text() const;
+ void set_active_text(const Glib::ustring& text);
+
+ void clear();
+
+protected:
+
+ //Tree model columns:
+ //These columns are used by the model that is created by the default constructor
+ class TextModelColumns : public Gtk::TreeModel::ColumnRecord
+ {
+ public:
+ TextModelColumns()
+ { add(m_column); }
+
+ Gtk::TreeModelColumn<Glib::ustring> m_column;
+ };
+
+ TextModelColumns m_text_columns;
+};
+
+
+} // namespace Gtk
+
+
+#endif /* _GTKMM_COMBOBOXENTRYTEXT_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/comboboxtext.cc b/libs/gtkmm2/gtk/gtkmm/comboboxtext.cc
new file mode 100644
index 0000000000..a9c8d20d5f
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/comboboxtext.cc
@@ -0,0 +1,138 @@
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 2003 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/comboboxtext.h>
+
+#include <gtkmm/liststore.h>
+#include <gtkmm/cellrenderertext.h>
+#include <gtk/gtkcombobox.h>
+#include <gtk/gtkcelllayout.h>
+
+namespace Gtk
+{
+
+ComboBoxText::ComboBoxText()
+{
+ set_model( Gtk::ListStore::create(m_text_columns) );
+ pack_start(m_text_columns.m_column);
+}
+
+ComboBoxText::ComboBoxText(GtkComboBox* castitem)
+: Gtk::ComboBox(castitem)
+{
+ set_model( Gtk::ListStore::create(m_text_columns) );
+ pack_start(m_text_columns.m_column);
+}
+
+
+void ComboBoxText::append_text(const Glib::ustring& text)
+{
+ //We can not use gtk_combo_box_append_text() here, because that can only be used if gtk_combo_box_new_text() has been used.
+
+ //Ideally, we would just store the ListStore as a member variable, but we forgot to do that and not it would break the ABI.
+ Glib::RefPtr<Gtk::TreeModel> model = get_model();
+ Glib::RefPtr<Gtk::ListStore> list_model = Glib::RefPtr<ListStore>::cast_dynamic(model);
+
+ if(list_model)
+ {
+ Gtk::TreeModel::iterator iter = list_model->append();
+ Gtk::TreeModel::Row row = *iter;
+ row[m_text_columns.m_column] = text;
+ }
+}
+
+void ComboBoxText::insert_text(int position, const Glib::ustring& text)
+{
+ //TODO: We should not use gtk_combo_box_insert_text() here, because that can only be used if gtk_combo_box_new_text() has been used.
+ gtk_combo_box_insert_text(gobj(), position, text.c_str());
+}
+
+void ComboBoxText::prepend_text(const Glib::ustring& text)
+{
+ //We can not use gtk_combo_box_prepend_text() here, because that can only be used if gtk_combo_box_new_text() has been used.
+
+ //Ideally, we would just store the ListStore as a member variable, but we forgot to do that and not it would break the ABI.
+ Glib::RefPtr<Gtk::TreeModel> model = get_model();
+ Glib::RefPtr<Gtk::ListStore> list_model = Glib::RefPtr<ListStore>::cast_dynamic(model);
+
+ if(list_model)
+ {
+ Gtk::TreeModel::iterator iter = list_model->prepend();
+ Gtk::TreeModel::Row row = *iter;
+ row[m_text_columns.m_column] = text;
+ }
+}
+
+Glib::ustring ComboBoxText::get_active_text() const
+{
+ //We can not use gtk_combobox_get_active_text() here, because that can only be used if gtk_combo_box_new_text() has been used.
+
+ Glib::ustring result;
+
+ //Get the active row:
+ TreeModel::iterator active_row = get_active();
+ if(active_row)
+ {
+ Gtk::TreeModel::Row row = *active_row;
+ result = row[m_text_columns.m_column];
+ }
+
+ return result;
+}
+
+void ComboBoxText::clear()
+{
+ //Ideally, we would just store the ListStore as a member variable, but we forgot to do that and not it would break the ABI.
+ Glib::RefPtr<Gtk::TreeModel> model = get_model();
+ Glib::RefPtr<Gtk::ListStore> list_model = Glib::RefPtr<ListStore>::cast_dynamic(model);
+
+ if(list_model)
+ list_model->clear();
+}
+
+void ComboBoxText::set_active_text(const Glib::ustring& text)
+{
+ //Look for the row with this text, and activate it:
+ Glib::RefPtr<Gtk::TreeModel> model = get_model();
+ if(model)
+ {
+ for(Gtk::TreeModel::iterator iter = model->children().begin(); iter != model->children().end(); ++iter)
+ {
+ const Glib::ustring& this_text = (*iter)[m_text_columns.m_column];
+
+ if(this_text == text)
+ {
+ set_active(iter);
+ return; //success
+ }
+ }
+ }
+
+ //Not found, so mark it as blank:
+ unset_active();
+}
+
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/comboboxtext.h b/libs/gtkmm2/gtk/gtkmm/comboboxtext.h
new file mode 100644
index 0000000000..22b87f5f00
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/comboboxtext.h
@@ -0,0 +1,92 @@
+// -*- c++ -*-
+#ifndef _GTKMM_COMBOBOXTEXT_H
+#define _GTKMM_COMBOBOXTEXT_H
+
+/* comboboxtext.h
+ *
+ * Copyright (C) 2003 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/combobox.h>
+
+namespace Gtk
+{
+
+//This is a C++ convenience class that is equivalent to the gtk_combo_box_new_text() C convenience function.
+
+/** This is a specialisation of the ComboBox which has one column of text (a simple list),
+ * and appropriate methods for setting and getting the text.
+ *
+ * Note that you can not use this class with Gnome::Glade::Xml::get_widget_derived() to wrap a GtkComboBox added
+ * in the Glade user interface designer, because Glade adds its own TreeModel instead of using the TreeModel from
+ * this class. You could use a normal Gtk::ComboBox instead, though you can not use Glade to add rows to a TreeModel
+ * that is defined in your C++ code.
+ *
+ * @ingroup Widgets
+ */
+
+class ComboBoxText
+: public ComboBox
+{
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+private:
+ // noncopyable
+ ComboBoxText(const ComboBoxText&);
+ ComboBoxText& operator=(const ComboBoxText&);
+
+protected:
+ explicit ComboBoxText(const Glib::ConstructParams& construct_params);
+ explicit ComboBoxText(GtkComboBox* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ ComboBoxText();
+
+ void append_text(const Glib::ustring& text);
+
+ void insert_text(int position, const Glib::ustring& text);
+
+ void prepend_text(const Glib::ustring& text);
+
+ Glib::ustring get_active_text() const;
+ void set_active_text(const Glib::ustring& text);
+
+ void clear();
+
+protected:
+
+ //Tree model columns:
+ //These columns are used by the model that is created by the default constructor
+ class TextModelColumns : public Gtk::TreeModel::ColumnRecord
+ {
+ public:
+ TextModelColumns()
+ { add(m_column); }
+
+ Gtk::TreeModelColumn<Glib::ustring> m_column;
+ };
+
+ TextModelColumns m_text_columns;
+};
+
+
+} // namespace Gtk
+
+
+#endif /* _GTKMM_COMBOBOXTEXT_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/container.cc b/libs/gtkmm2/gtk/gtkmm/container.cc
new file mode 100644
index 0000000000..c3db4bd7ef
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/container.cc
@@ -0,0 +1,945 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/container.h>
+#include <gtkmm/private/container_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/adjustment.h>
+#include <gtk/gtkcontainer.h>
+
+
+namespace
+{
+
+
+void container_foreach_callback(GtkWidget* widget_gobj, void* data)
+{
+ try
+ {
+ Gtk::Container::ForeachSlot& slot = *static_cast<Gtk::Container::ForeachSlot*>(data);
+ Gtk::Widget *const widget = Glib::wrap(widget_gobj);
+
+ g_return_if_fail(widget != 0);
+
+ slot(*widget);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+}
+
+} // anonymous namespace
+
+
+namespace Gtk
+{
+
+void Container_Class::remove_callback_custom(GtkContainer* self, GtkWidget* p0)
+{
+ //GTKMM_LIFECYCLE
+
+#ifdef GLIBMM_DEBUG_REFCOUNTING
+ g_warning("Container_Class::remove_callback_custom() C self=%p: C child=%p\n", (void*)self, (void*)p0);
+ g_warning("gtypename self: %s\n, gtypename child: %s", G_OBJECT_TYPE_NAME(G_OBJECT(self)), G_OBJECT_TYPE_NAME(G_OBJECT(p0)));
+#endif
+
+ //Don't call wrap() on a GTK+ instance whose gtkmm instance has been deleted - just call the original C callback.
+ bool gtkmm_child_already_deleted = Glib::_gobject_cppinstance_already_deleted((GObject*)p0);
+
+ if(!gtkmm_child_already_deleted)
+ {
+ //Call the regular, generated callback:
+ Container_Class::remove_callback(self, p0);
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ //Call the original underlying C function:
+ if(base && base->remove)
+ (*base->remove)(self, p0);
+ }
+}
+
+void Container::foreach(const Container::ForeachSlot& slot)
+{
+ ForeachSlot slot_copy (slot);
+ gtk_container_foreach(gobj(), &container_foreach_callback, &slot_copy);
+}
+
+void Container::add(Widget& widget)
+{
+ gtk_container_add(gobj(), widget.gobj());
+}
+
+bool Container::has_focus_chain() const
+{
+ return gtk_container_get_focus_chain(const_cast<GtkContainer*>(gobj()), 0);
+}
+
+Glib::ListHandle<Widget*> Container::get_focus_chain()
+{
+ GList* list = 0;
+ gtk_container_get_focus_chain(gobj(), &list);
+
+ return Glib::ListHandle<Widget*>(list, Glib::OWNERSHIP_SHALLOW);
+}
+
+Glib::ListHandle<const Widget*> Container::get_focus_chain() const
+{
+ GList* list = 0;
+ gtk_container_get_focus_chain(const_cast<GtkContainer*>(gobj()), &list);
+
+ return Glib::ListHandle<const Widget*>(list, Glib::OWNERSHIP_SHALLOW);
+}
+
+
+void Container::show_all_children(bool recursive)
+{
+ // Plain C version if this turns out to be performance-critical:
+ //GtkCallback callback = (GtkCallback) ((recursive) ? &gtk_widget_show_all : &gtk_widget_show);
+ //gtk_container_foreach(gobj(), callback, 0);
+
+ // This could also be done with get_children() and an explicit loop,
+ // if any problems should arise. In gtkmm-1.2, foreach() is known to
+ // cause segfaults eventually, but it seems to work now.
+
+ foreach(sigc::mem_fun((recursive) ? &Widget::show_all : &Widget::show));
+}
+
+void Container::remove(Widget& widget)
+{
+ //If this is a managed widget,
+ //then do an extra ref so that it will
+ //not be destroyed when adding to another container
+ //This should leave it in much the same state as when it was instantiated,
+ //before being added to the first container.
+ if(widget.is_managed_())
+ widget.reference();
+
+ gtk_container_remove(gobj(), widget.gobj());
+}
+
+// static
+void Container_Class::destroy_callback(GtkObject* self)
+{
+#ifdef GLIBMM_DEBUG_REFCOUNTING
+ g_warning("Container_Class::destroy_callback() gobject_=%10X\n", self);
+ if(self)
+ g_warning("gtypename: %s\n", G_OBJECT_TYPE_NAME(G_OBJECT(self)));
+#endif
+
+ //Call the normal C destroy implementation, such as gtk_button_destroy:
+ //This will chain to gtk_container_destroy(), which will gtk_widget_destroy() any remaining child widgets.
+ GtkObjectClass *const base = static_cast<GtkObjectClass*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)));
+
+ if(base->destroy)
+ (*base->destroy)(self);
+}
+
+} // namespace Gtk
+
+
+namespace
+{
+
+void Container_signal_add_callback(GtkContainer* self, GtkWidget* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,Widget* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::wrap(p0)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo Container_signal_add_info =
+{
+ "add",
+ (GCallback) &Container_signal_add_callback,
+ (GCallback) &Container_signal_add_callback
+};
+
+
+void Container_signal_remove_callback(GtkContainer* self, GtkWidget* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,Widget* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::wrap(p0)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo Container_signal_remove_info =
+{
+ "remove",
+ (GCallback) &Container_signal_remove_callback,
+ (GCallback) &Container_signal_remove_callback
+};
+
+
+const Glib::SignalProxyInfo Container_signal_check_resize_info =
+{
+ "check_resize",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+
+void Container_signal_set_focus_child_callback(GtkContainer* self, GtkWidget* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,Widget* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::wrap(p0)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo Container_signal_set_focus_child_info =
+{
+ "set_focus_child",
+ (GCallback) &Container_signal_set_focus_child_callback,
+ (GCallback) &Container_signal_set_focus_child_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::Container* wrap(GtkContainer* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::Container *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Container_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Container_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_container_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Container_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->child_type = &child_type_vfunc_callback;
+ klass->forall = &forall_vfunc_callback;
+ klass->composite_name = &composite_name_vfunc_callback;
+ klass->set_child_property = &set_child_property_vfunc_callback;
+ klass->get_child_property = &get_child_property_vfunc_callback;
+ klass->add = &add_callback;
+ klass->remove = &remove_callback;
+ klass->check_resize = &check_resize_callback;
+ klass->set_focus_child = &set_focus_child_callback;
+ reinterpret_cast<GtkObjectClass*>(klass)->destroy = &destroy_callback;
+ klass->remove = &remove_callback_custom;
+
+ if(G_OBJECT_CLASS_TYPE(klass) == Gtk::Container::get_type())
+ {
+ //Remove the parent class's (GtkContainer) remove callback - it just prints a warning.
+ //This prevents that warning when people derive directly from Gtk::Container.
+ BaseClassType *const base = static_cast<BaseClassType*>( g_type_class_peek_parent(klass) );
+ base->remove = 0;
+ }
+
+ }
+
+GtkType Container_Class::child_type_vfunc_callback(GtkContainer* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return obj->child_type_vfunc();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->child_type)
+ return (*base->child_type)(self);
+ }
+
+ typedef GtkType RType;
+ return RType();
+}
+
+void Container_Class::forall_vfunc_callback(GtkContainer* self, gboolean include_internals, GtkCallback callback, gpointer callback_data)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->forall_vfunc(include_internals, callback, callback_data);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->forall)
+ (*base->forall)(self, include_internals, callback, callback_data);
+ }
+}
+
+gchar* Container_Class::composite_name_vfunc_callback(GtkContainer* self, GtkWidget* child)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return obj->composite_name_vfunc(child);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->composite_name)
+ return (*base->composite_name)(self, child);
+ }
+
+ typedef gchar* RType;
+ return RType();
+}
+
+void Container_Class::set_child_property_vfunc_callback(GtkContainer* self, GtkWidget* child, guint property_id, const GValue* value, GParamSpec* pspec)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->set_child_property_vfunc(child, property_id, value, pspec);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->set_child_property)
+ (*base->set_child_property)(self, child, property_id, value, pspec);
+ }
+}
+
+void Container_Class::get_child_property_vfunc_callback(GtkContainer* self, GtkWidget* child, guint property_id, GValue* value, GParamSpec* pspec)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->get_child_property_vfunc(child, property_id, value, pspec);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->get_child_property)
+ (*base->get_child_property)(self, child, property_id, value, pspec);
+ }
+}
+
+
+void Container_Class::add_callback(GtkContainer* self, GtkWidget* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_add(Glib::wrap(p0)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->add)
+ (*base->add)(self, p0);
+ }
+}
+
+void Container_Class::remove_callback(GtkContainer* self, GtkWidget* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_remove(Glib::wrap(p0)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->remove)
+ (*base->remove)(self, p0);
+ }
+}
+
+void Container_Class::check_resize_callback(GtkContainer* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_check_resize();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->check_resize)
+ (*base->check_resize)(self);
+ }
+}
+
+void Container_Class::set_focus_child_callback(GtkContainer* self, GtkWidget* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_set_focus_child(Glib::wrap(p0)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->set_focus_child)
+ (*base->set_focus_child)(self, p0);
+ }
+}
+
+
+Glib::ObjectBase* Container_Class::wrap_new(GObject* o)
+{
+ return manage(new Container((GtkContainer*)(o)));
+
+}
+
+
+/* The implementation: */
+
+Container::Container(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Widget(construct_params)
+{
+ }
+
+Container::Container(GtkContainer* castitem)
+:
+ Gtk::Widget((GtkWidget*)(castitem))
+{
+ }
+
+Container::~Container()
+{
+ destroy_();
+}
+
+Container::CppClassType Container::container_class_; // initialize static member
+
+GType Container::get_type()
+{
+ return container_class_.init().get_type();
+}
+
+GType Container::get_base_type()
+{
+ return gtk_container_get_type();
+}
+
+
+void Container::set_border_width(guint border_width)
+{
+ gtk_container_set_border_width(gobj(), border_width);
+}
+
+guint Container::get_border_width() const
+{
+ return gtk_container_get_border_width(const_cast<GtkContainer*>(gobj()));
+}
+
+void Container::set_resize_mode(ResizeMode resize_mode)
+{
+ gtk_container_set_resize_mode(gobj(), ((GtkResizeMode)(resize_mode)));
+}
+
+ResizeMode Container::get_resize_mode() const
+{
+ return ((ResizeMode)(gtk_container_get_resize_mode(const_cast<GtkContainer*>(gobj()))));
+}
+
+void Container::check_resize()
+{
+ gtk_container_check_resize(gobj());
+}
+
+Glib::ListHandle<Widget*> Container::get_children()
+{
+ return Glib::ListHandle<Widget*>(gtk_container_get_children(gobj()), Glib::OWNERSHIP_SHALLOW);
+}
+
+Glib::ListHandle<const Widget*> Container::get_children() const
+{
+ return Glib::ListHandle<const Widget*>(gtk_container_get_children(const_cast<GtkContainer*>(gobj())), Glib::OWNERSHIP_SHALLOW);
+}
+
+void Container::propagate_expose(Widget& child, GdkEventExpose* event)
+{
+ gtk_container_propagate_expose(gobj(), (child).gobj(), event);
+}
+
+void Container::set_focus_chain(const Glib::ListHandle<Widget*>& focusable_widgets)
+{
+ gtk_container_set_focus_chain(gobj(), focusable_widgets.data());
+}
+
+void Container::unset_focus_chain()
+{
+ gtk_container_unset_focus_chain(gobj());
+}
+
+void Container::set_reallocate_redraws(bool needs_redraws)
+{
+ gtk_container_set_reallocate_redraws(gobj(), static_cast<int>(needs_redraws));
+}
+
+void Container::set_focus_child(Widget& widget)
+{
+ gtk_container_set_focus_child(gobj(), (widget).gobj());
+}
+
+void Container::set_focus_vadjustment(Adjustment& adjustment)
+{
+ gtk_container_set_focus_vadjustment(gobj(), (adjustment).gobj());
+}
+
+Adjustment* Container::get_focus_vadjustment()
+{
+ return Glib::wrap(gtk_container_get_focus_vadjustment(gobj()));
+}
+
+const Adjustment* Container::get_focus_vadjustment() const
+{
+ return Glib::wrap(gtk_container_get_focus_vadjustment(const_cast<GtkContainer*>(gobj())));
+}
+
+void Container::set_focus_hadjustment(Adjustment& adjustment)
+{
+ gtk_container_set_focus_hadjustment(gobj(), (adjustment).gobj());
+}
+
+Adjustment* Container::get_focus_hadjustment()
+{
+ return Glib::wrap(gtk_container_get_focus_hadjustment(gobj()));
+}
+
+const Adjustment* Container::get_focus_hadjustment() const
+{
+ return Glib::wrap(gtk_container_get_focus_hadjustment(const_cast<GtkContainer*>(gobj())));
+}
+
+void Container::resize_children()
+{
+ gtk_container_resize_children(gobj());
+}
+
+GType Container::child_type() const
+{
+ return gtk_container_child_type(const_cast<GtkContainer*>(gobj()));
+}
+
+Container::Container()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Widget(Glib::ConstructParams(container_class_.init()))
+{
+ }
+
+
+Glib::SignalProxy1< void,Widget* > Container::signal_add()
+{
+ return Glib::SignalProxy1< void,Widget* >(this, &Container_signal_add_info);
+}
+
+Glib::SignalProxy1< void,Widget* > Container::signal_remove()
+{
+ return Glib::SignalProxy1< void,Widget* >(this, &Container_signal_remove_info);
+}
+
+Glib::SignalProxy0< void > Container::signal_check_resize()
+{
+ return Glib::SignalProxy0< void >(this, &Container_signal_check_resize_info);
+}
+
+Glib::SignalProxy1< void,Widget* > Container::signal_set_focus_child()
+{
+ return Glib::SignalProxy1< void,Widget* >(this, &Container_signal_set_focus_child_info);
+}
+
+
+Glib::PropertyProxy<guint> Container::property_border_width()
+{
+ return Glib::PropertyProxy<guint>(this, "border-width");
+}
+
+Glib::PropertyProxy_ReadOnly<guint> Container::property_border_width() const
+{
+ return Glib::PropertyProxy_ReadOnly<guint>(this, "border-width");
+}
+
+Glib::PropertyProxy<ResizeMode> Container::property_resize_mode()
+{
+ return Glib::PropertyProxy<ResizeMode>(this, "resize-mode");
+}
+
+Glib::PropertyProxy_ReadOnly<ResizeMode> Container::property_resize_mode() const
+{
+ return Glib::PropertyProxy_ReadOnly<ResizeMode>(this, "resize-mode");
+}
+
+Glib::PropertyProxy_WriteOnly<Widget*> Container::property_child()
+{
+ return Glib::PropertyProxy_WriteOnly<Widget*>(this, "child");
+}
+
+Glib::PropertyProxy_ReadOnly<Widget*> Container::property_child() const
+{
+ return Glib::PropertyProxy_ReadOnly<Widget*>(this, "child");
+}
+
+
+void Gtk::Container::on_add(Widget* widget)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->add)
+ (*base->add)(gobj(),(GtkWidget*)Glib::unwrap(widget));
+}
+
+void Gtk::Container::on_remove(Widget* widget)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->remove)
+ (*base->remove)(gobj(),(GtkWidget*)Glib::unwrap(widget));
+}
+
+void Gtk::Container::on_check_resize()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->check_resize)
+ (*base->check_resize)(gobj());
+}
+
+void Gtk::Container::on_set_focus_child(Widget* widget)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->set_focus_child)
+ (*base->set_focus_child)(gobj(),(GtkWidget*)Glib::unwrap(widget));
+}
+
+
+GtkType Gtk::Container::child_type_vfunc() const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->child_type)
+ return (*base->child_type)(const_cast<GtkContainer*>(gobj()));
+
+ typedef GtkType RType;
+ return RType();
+}
+
+void Gtk::Container::forall_vfunc(gboolean include_internals, GtkCallback callback, gpointer callback_data)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->forall)
+ (*base->forall)(gobj(),include_internals,callback,callback_data);
+}
+
+char* Gtk::Container::composite_name_vfunc(GtkWidget* child)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->composite_name)
+ return (*base->composite_name)(gobj(),child);
+
+ typedef char* RType;
+ return RType();
+}
+
+void Gtk::Container::set_child_property_vfunc(GtkWidget* child, guint property_id, const GValue* value, GParamSpec* pspec)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->set_child_property)
+ (*base->set_child_property)(gobj(),child,property_id,value,pspec);
+}
+
+void Gtk::Container::get_child_property_vfunc(GtkWidget* child, guint property_id, GValue* value, GParamSpec* pspec) const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->get_child_property)
+ (*base->get_child_property)(const_cast<GtkContainer*>(gobj()),child,property_id,value,pspec);
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/container.h b/libs/gtkmm2/gtk/gtkmm/container.h
new file mode 100644
index 0000000000..a555229bbf
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/container.h
@@ -0,0 +1,446 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_CONTAINER_H
+#define _GTKMM_CONTAINER_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/listhandle.h>
+#include <gtkmm/widget.h>
+
+
+/** @defgroup Containers Container Widgets
+ * These widgets can be used to group other widgets together.
+ */
+
+/* we'll include gtkfeatures because we dont want to include the whole
+ gtk/gtk.h - this file is used by almost ALL our widgets, so dependencies
+ in minimum - adding things here will increase compile times ALOT */
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkContainer GtkContainer;
+typedef struct _GtkContainerClass GtkContainerClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class Container_Class; } // namespace Gtk
+namespace Gtk
+{
+
+class Adjustment;
+class Label;
+
+/** Abstract container class
+ *
+ * This is the abstract container from which all gtk+ widgets which hold
+ * other items derive from. It mainly houses virtual functions
+ * used for inserting and removing children. Containers in gtk+
+ * may hold one item or many items depending on the implementation.
+ *
+ * This interface is used for all single item holding containers.
+ * Multi-item containers provide their own unique interface as their
+ * items are generally more complex. The methods of the derived
+ * classes should be prefered over these.
+ *
+ * @ingroup Widgets
+ */
+
+class Container : public Widget
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Container CppObjectType;
+ typedef Container_Class CppClassType;
+ typedef GtkContainer BaseObjectType;
+ typedef GtkContainerClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~Container();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class Container_Class;
+ static CppClassType container_class_;
+
+ // noncopyable
+ Container(const Container&);
+ Container& operator=(const Container&);
+
+protected:
+ explicit Container(const Glib::ConstructParams& construct_params);
+ explicit Container(GtkContainer* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkContainer* gobj() { return reinterpret_cast<GtkContainer*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkContainer* gobj() const { return reinterpret_cast<GtkContainer*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_add(Widget* widget);
+ virtual void on_remove(Widget* widget);
+ virtual void on_check_resize();
+ virtual void on_set_focus_child(Widget* widget);
+
+
+private:
+
+
+public:
+
+/* Application-level methods */
+
+
+ /** Sets the border width of the container.
+ *
+ * The border width of a container is the amount of space to leave
+ * around the outside of the container. The only exception to this is
+ * Gtk::Window; because toplevel windows can't leave space outside,
+ * they leave the space inside. The border is added on all sides of
+ * the container. To add space to only one side, one approach is to
+ * create a Gtk::Alignment widget, call Gtk::Widget::set_usize() to give
+ * it a size, and place it on the side of the container as a spacer.
+ * @param border_width Amount of blank space to leave <em>outside</em> the container.
+ * Valid values are in the range 0-65535 pixels.
+ */
+ void set_border_width(guint border_width);
+
+
+ /** Retrieves the border width of the container. See
+ * set_border_width().
+ * @return The current border width.
+ */
+ guint get_border_width() const;
+
+ //This is virtual so that we can override it in Gtk::ScrolledWindow:
+ virtual void add(Widget& widget);
+
+
+ /** Removes @a widget from @a container . @a widget must be inside @a container .
+ * Note that @a container will own a reference to @a widget , and that this
+ * may be the last reference held; so removing a widget from its
+ * container can destroy that widget. If you want to use @a widget
+ * again, you need to add a reference to it while it's not inside
+ * a container, using Glib::object_ref(). If you don't want to use @a widget
+ * again it's usually more efficient to simply destroy it directly
+ * using Gtk::Widget::destroy() since this will remove it from the
+ * container and help break any circular reference count cycles.
+ * @param widget A current child of @a container .
+ */
+
+ void remove(Widget& widget);
+
+
+ /** Sets the resize mode for the container.
+ *
+ * The resize mode of a container determines whether a resize request
+ * will be passed to the container's parent, queued for later execution
+ * or executed immediately.
+ * @param resize_mode The new resize mode.
+ */
+ void set_resize_mode(ResizeMode resize_mode);
+
+
+ /** Returns the resize mode for the container. See
+ * set_resize_mode().
+ * @return The current resize mode.
+ */
+ ResizeMode get_resize_mode() const;
+
+ /// Request that contained widgets check their size
+
+ void check_resize();
+
+ /** For instance,
+ * void on_foreach(Gtk::Widget* widget);
+ */
+ typedef sigc::slot<void, Widget&> ForeachSlot;
+
+ /** Operate on contained items
+ * This is largely an internal used mainly for things like
+ * creating duplicates of internal lists and other such
+ * operations. The result is lossy as it only gets the
+ * the main child and not its external pieces.
+ *
+ * For example notebook pages contain a page, a label, and
+ * a menu item. But this only operates on the pages.
+ */
+ void foreach(const ForeachSlot& slot);
+
+ /// (internal) Operate on contained items (see foreach())
+ //_WRAP_METHOD(void foreach_(GtkCallback callback,gpointer data),gtk_container_foreach)
+
+ /// (internal) Operate on contained items (see foreach())
+ //_WRAP_METHOD(void foreach_full_(GtkCallback callback,GtkCallbackMarshal marshal, gpointer data,GtkDestroyNotify notify),gtk_container_foreach_full)
+
+
+ /** Returns the the container's non-internal children. See
+ * forall() for details on what constitutes an "internal" child.
+ * @return A newly-allocated list of the container's non-internal children.
+ */
+ Glib::ListHandle<Widget*> get_children();
+
+ /** Returns the the container's non-internal children. See
+ * forall() for details on what constitutes an "internal" child.
+ * @return A newly-allocated list of the container's non-internal children.
+ */
+ Glib::ListHandle<const Widget*> get_children() const;
+
+
+ /** When a container receives an expose event, it must send synthetic
+ * expose events to all children that don't have their own Gdk::Windows.
+ * This function provides a convenient way of doing this. A container,
+ * when it receives an expose event, calls propagate_expose()
+ * once for each child, passing in the event the container received.
+ *
+ * propagate_expose() takes care of deciding whether
+ * an expose event needs to be sent to the child, intersecting
+ * the event's area with the child area, and sending the event.
+ *
+ * In most cases, a container can simply either simply inherit the
+ * ::expose implementation from Gtk::Container, or, do some drawing
+ * and then chain to the ::expose implementation from Gtk::Container.
+ * @param child A child of @a container .
+ * @param event A expose event sent to container.
+ */
+ void propagate_expose(Widget& child, GdkEventExpose* event);
+
+
+ /** Sets a focus chain, overriding the one computed automatically by GTK+.
+ *
+ * In principle each widget in the chain should be a descendant of the
+ * container, but this is not enforced by this method, since it's allowed
+ * to set the focus chain before you pack the widgets, or have a widget
+ * in the chain that isn't always packed. The necessary checks are done
+ * when the focus chain is actually traversed.
+ * @param focusable_widgets The new focus chain.
+ */
+ void set_focus_chain(const Glib::ListHandle<Widget*>& focusable_widgets);
+
+ // gtk_container_get_focus_chain() has been split up into two
+ // functions in order to make implicit container conversion possible.
+ bool has_focus_chain() const;
+ Glib::ListHandle<Widget*> get_focus_chain();
+ Glib::ListHandle<const Widget*> get_focus_chain() const;
+
+
+ /** Removes a focus chain explicitly set with set_focus_chain().
+ */
+ void unset_focus_chain();
+
+
+/* Widget-level methods */
+
+
+ /** Sets the @a reallocate_redraws flag of the container to the given value.
+ *
+ * Containers requesting reallocation redraws get automatically
+ * redrawn if any of their children changed allocation.
+ * @param needs_redraws The new value for the container's @a reallocate_redraws flag.
+ */
+ void set_reallocate_redraws(bool needs_redraws = true);
+
+ /// Sets the focus on a child
+
+ void set_focus_child(Widget& widget);
+
+
+ /** Hooks up an adjustment to focus handling in a container, so when a child of the
+ * container is focused, the adjustment is scrolled to show that widget. This function
+ * sets the vertical alignment. See Gtk::ScrolledWindow::get_vadjustment() for a typical
+ * way of obtaining the adjustment and set_focus_hadjustment() for setting
+ * the horizontal adjustment.
+ *
+ * The adjustments have to be in pixel units and in the same coordinate system as the
+ * allocation for immediate children of the container.
+ * @param adjustment An adjustment which should be adjusted when the focus is moved among the
+ * descendents of @a container .
+ */
+ void set_focus_vadjustment(Adjustment& adjustment);
+
+
+ /** Retrieves the vertical focus adjustment for the container. See
+ * set_focus_vadjustment().
+ * @return The vertical focus adjustment, or <tt>0</tt> if
+ * none has been set.
+ */
+ Adjustment* get_focus_vadjustment();
+
+ /** Retrieves the vertical focus adjustment for the container. See
+ * set_focus_vadjustment().
+ * @return The vertical focus adjustment, or <tt>0</tt> if
+ * none has been set.
+ */
+ const Adjustment* get_focus_vadjustment() const;
+
+
+ /** Hooks up an adjustment to focus handling in a container, so when a child of the
+ * container is focused, the adjustment is scrolled to show that widget. This function
+ * sets the horizontal alignment. See Gtk::ScrolledWindow::get_hadjustment() for a typical
+ * way of obtaining the adjustment and set_focus_vadjustment() for setting
+ * the vertical adjustment.
+ *
+ * The adjustments have to be in pixel units and in the same coordinate system as the
+ * allocation for immediate children of the container.
+ * @param adjustment An adjustment which should be adjusted when the focus is moved among the
+ * descendents of @a container .
+ */
+ void set_focus_hadjustment(Adjustment& adjustment);
+
+
+ /** Retrieves the horizontal focus adjustment for the container. See
+ * set_focus_hadjustment().
+ * @return The horizontal focus adjustment, or <tt>0</tt> if
+ * none has been set.
+ */
+ Adjustment* get_focus_hadjustment();
+
+ /** Retrieves the horizontal focus adjustment for the container. See
+ * set_focus_hadjustment().
+ * @return The horizontal focus adjustment, or <tt>0</tt> if
+ * none has been set.
+ */
+ const Adjustment* get_focus_hadjustment() const;
+
+
+ void resize_children();
+
+
+ /** Returns the type of the children supported by the container.
+ *
+ * Note that this may return G::TYPE_NONE to indicate that no more
+ * children can be added, e.g. for a Gtk::Paned which already has two
+ * children.
+ * @return A G::Type.
+ */
+ GType child_type() const;
+
+ // Ignore functions such as gtk_container_class_install_child_property(), which I think are for themes, like the GtkWidget style properties.
+
+
+ Glib::SignalProxy1< void,Widget* > signal_add();
+
+
+ Glib::SignalProxy1< void,Widget* > signal_remove();
+
+
+ Glib::SignalProxy0< void > signal_check_resize();
+
+
+ Glib::SignalProxy1< void,Widget* > signal_set_focus_child();
+
+
+ void show_all_children(bool recursive = true);
+
+protected:
+ Container();
+
+ virtual GtkType child_type_vfunc() const;
+ virtual void forall_vfunc(gboolean include_internals, GtkCallback callback, gpointer callback_data);
+ //TODO: What is this?
+ virtual char* composite_name_vfunc(GtkWidget* child);
+ virtual void set_child_property_vfunc(GtkWidget* child, guint property_id, const GValue* value, GParamSpec* pspec);
+ virtual void get_child_property_vfunc(GtkWidget* child, guint property_id, GValue* value, GParamSpec* pspec) const;
+
+ /** The width of the empty border outside the containers children.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<guint> property_border_width() ;
+
+/** The width of the empty border outside the containers children.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<guint> property_border_width() const;
+
+ /** Specify how resize events are handled.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<ResizeMode> property_resize_mode() ;
+
+/** Specify how resize events are handled.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<ResizeMode> property_resize_mode() const;
+
+ /** Can be used to add a new child to the container.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_WriteOnly<Widget*> property_child() ;
+
+/** Can be used to add a new child to the container.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Widget*> property_child() const;
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::Container
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::Container* wrap(GtkContainer* object, bool take_copy = false);
+}
+#endif /* _GTKMM_CONTAINER_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/curve.cc b/libs/gtkmm2/gtk/gtkmm/curve.cc
new file mode 100644
index 0000000000..ed6b949ea3
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/curve.cc
@@ -0,0 +1,378 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/curve.h>
+#include <gtkmm/private/curve_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkcurve.h>
+#include <gtk/gtkgamma.h>
+
+namespace Gtk
+{
+
+Glib::ArrayHandle<float> Curve::get_vector(int veclen) const
+{
+ float *const pdata = static_cast<float*>(g_malloc(veclen * sizeof(float)));
+ gtk_curve_get_vector(const_cast<GtkCurve*>(gobj()), veclen, pdata);
+
+ return Glib::ArrayHandle<float>(pdata, veclen, Glib::OWNERSHIP_SHALLOW);
+}
+
+void Curve::set_vector(const Glib::ArrayHandle<float>& array)
+{
+ gtk_curve_set_vector(gobj(), array.size(), const_cast<float*>(array.data()));
+}
+
+} /* namespace Gtk */
+
+
+namespace
+{
+
+const Glib::SignalProxyInfo Curve_signal_curve_type_changed_info =
+{
+ "curve_type_changed",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::Curve* wrap(GtkCurve* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::Curve *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Curve_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Curve_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_curve_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Curve_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->curve_type_changed = &curve_type_changed_callback;
+}
+
+
+void Curve_Class::curve_type_changed_callback(GtkCurve* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_curve_type_changed();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->curve_type_changed)
+ (*base->curve_type_changed)(self);
+ }
+}
+
+
+Glib::ObjectBase* Curve_Class::wrap_new(GObject* o)
+{
+ return manage(new Curve((GtkCurve*)(o)));
+
+}
+
+
+/* The implementation: */
+
+Curve::Curve(const Glib::ConstructParams& construct_params)
+:
+ Gtk::DrawingArea(construct_params)
+{
+ }
+
+Curve::Curve(GtkCurve* castitem)
+:
+ Gtk::DrawingArea((GtkDrawingArea*)(castitem))
+{
+ }
+
+Curve::~Curve()
+{
+ destroy_();
+}
+
+Curve::CppClassType Curve::curve_class_; // initialize static member
+
+GType Curve::get_type()
+{
+ return curve_class_.init().get_type();
+}
+
+GType Curve::get_base_type()
+{
+ return gtk_curve_get_type();
+}
+
+
+Curve::Curve()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::DrawingArea(Glib::ConstructParams(curve_class_.init()))
+{
+ }
+
+void Curve::reset()
+{
+ gtk_curve_reset(gobj());
+}
+
+void Curve::set_gamma(float gamma)
+{
+ gtk_curve_set_gamma(gobj(), gamma);
+}
+
+void Curve::set_range(float min_x, float max_x, float min_y, float max_y)
+{
+ gtk_curve_set_range(gobj(), min_x, max_x, min_y, max_y);
+}
+
+void Curve::get_vector(int veclen, float* data) const
+{
+ gtk_curve_get_vector(const_cast<GtkCurve*>(gobj()), veclen, data);
+}
+
+void Curve::set_curve_type(CurveType type)
+{
+ gtk_curve_set_curve_type(gobj(), ((GtkCurveType)(type)));
+}
+
+
+Glib::SignalProxy0< void > Curve::signal_curve_type_changed()
+{
+ return Glib::SignalProxy0< void >(this, &Curve_signal_curve_type_changed_info);
+}
+
+
+Glib::PropertyProxy<CurveType> Curve::property_curve_type()
+{
+ return Glib::PropertyProxy<CurveType>(this, "curve-type");
+}
+
+Glib::PropertyProxy_ReadOnly<CurveType> Curve::property_curve_type() const
+{
+ return Glib::PropertyProxy_ReadOnly<CurveType>(this, "curve-type");
+}
+
+Glib::PropertyProxy<float> Curve::property_min_x()
+{
+ return Glib::PropertyProxy<float>(this, "min-x");
+}
+
+Glib::PropertyProxy_ReadOnly<float> Curve::property_min_x() const
+{
+ return Glib::PropertyProxy_ReadOnly<float>(this, "min-x");
+}
+
+Glib::PropertyProxy<float> Curve::property_max_x()
+{
+ return Glib::PropertyProxy<float>(this, "max-x");
+}
+
+Glib::PropertyProxy_ReadOnly<float> Curve::property_max_x() const
+{
+ return Glib::PropertyProxy_ReadOnly<float>(this, "max-x");
+}
+
+Glib::PropertyProxy<float> Curve::property_min_y()
+{
+ return Glib::PropertyProxy<float>(this, "min-y");
+}
+
+Glib::PropertyProxy_ReadOnly<float> Curve::property_min_y() const
+{
+ return Glib::PropertyProxy_ReadOnly<float>(this, "min-y");
+}
+
+Glib::PropertyProxy<float> Curve::property_max_y()
+{
+ return Glib::PropertyProxy<float>(this, "max-y");
+}
+
+Glib::PropertyProxy_ReadOnly<float> Curve::property_max_y() const
+{
+ return Glib::PropertyProxy_ReadOnly<float>(this, "max-y");
+}
+
+
+void Gtk::Curve::on_curve_type_changed()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->curve_type_changed)
+ (*base->curve_type_changed)(gobj());
+}
+
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+
+Gtk::GammaCurve* wrap(GtkGammaCurve* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::GammaCurve *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& GammaCurve_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &GammaCurve_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_gamma_curve_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void GammaCurve_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* GammaCurve_Class::wrap_new(GObject* o)
+{
+ return manage(new GammaCurve((GtkGammaCurve*)(o)));
+
+}
+
+
+/* The implementation: */
+
+GammaCurve::GammaCurve(const Glib::ConstructParams& construct_params)
+:
+ Gtk::VBox(construct_params)
+{
+ }
+
+GammaCurve::GammaCurve(GtkGammaCurve* castitem)
+:
+ Gtk::VBox((GtkVBox*)(castitem))
+{
+ }
+
+GammaCurve::~GammaCurve()
+{
+ destroy_();
+}
+
+GammaCurve::CppClassType GammaCurve::gammacurve_class_; // initialize static member
+
+GType GammaCurve::get_type()
+{
+ return gammacurve_class_.init().get_type();
+}
+
+GType GammaCurve::get_base_type()
+{
+ return gtk_gamma_curve_get_type();
+}
+
+GammaCurve::GammaCurve()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::VBox(Glib::ConstructParams(gammacurve_class_.init()))
+{
+ }
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/curve.h b/libs/gtkmm2/gtk/gtkmm/curve.h
new file mode 100644
index 0000000000..eaddc1116b
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/curve.h
@@ -0,0 +1,303 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_CURVE_H
+#define _GTKMM_CURVE_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* curve.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/arrayhandle.h>
+#include <gtkmm/box.h>
+#include <gtkmm/drawingarea.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkCurve GtkCurve;
+typedef struct _GtkCurveClass GtkCurveClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class Curve_Class; } // namespace Gtk
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkGammaCurve GtkGammaCurve;
+typedef struct _GtkGammaCurveClass GtkGammaCurveClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class GammaCurve_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** Allows direct editing of a curve.
+ *
+ * @ingroup Widgets
+ */
+
+class Curve : public DrawingArea
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Curve CppObjectType;
+ typedef Curve_Class CppClassType;
+ typedef GtkCurve BaseObjectType;
+ typedef GtkCurveClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~Curve();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class Curve_Class;
+ static CppClassType curve_class_;
+
+ // noncopyable
+ Curve(const Curve&);
+ Curve& operator=(const Curve&);
+
+protected:
+ explicit Curve(const Glib::ConstructParams& construct_params);
+ explicit Curve(GtkCurve* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkCurve* gobj() { return reinterpret_cast<GtkCurve*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkCurve* gobj() const { return reinterpret_cast<GtkCurve*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_curve_type_changed();
+
+
+private:
+
+
+public:
+
+ Curve();
+
+
+ void reset();
+
+ void set_gamma(float gamma);
+
+ void set_range(float min_x, float max_x, float min_y, float max_y);
+
+ void get_vector(int veclen, float* data) const;
+
+ Glib::ArrayHandle<float> get_vector(int veclen) const;
+ void set_vector(const Glib::ArrayHandle<float>& array);
+
+
+ void set_curve_type(CurveType type);
+
+
+ Glib::SignalProxy0< void > signal_curve_type_changed();
+
+
+ /** Is this curve linear
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<CurveType> property_curve_type() ;
+
+/** Is this curve linear
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<CurveType> property_curve_type() const;
+
+ /** Minimum possible value for X.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<float> property_min_x() ;
+
+/** Minimum possible value for X.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<float> property_min_x() const;
+
+ /** Maximum possible X value.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<float> property_max_x() ;
+
+/** Maximum possible X value.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<float> property_max_x() const;
+
+ /** Minimum possible value for Y.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<float> property_min_y() ;
+
+/** Minimum possible value for Y.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<float> property_min_y() const;
+
+ /** Maximum possible value for Y.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<float> property_max_y() ;
+
+/** Maximum possible value for Y.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<float> property_max_y() const;
+
+
+};
+
+/** A subclass of Gtk::Curve for editing gamma curves.
+ *
+ * @ingroup Widgets
+ */
+
+class GammaCurve : public VBox
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef GammaCurve CppObjectType;
+ typedef GammaCurve_Class CppClassType;
+ typedef GtkGammaCurve BaseObjectType;
+ typedef GtkGammaCurveClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~GammaCurve();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class GammaCurve_Class;
+ static CppClassType gammacurve_class_;
+
+ // noncopyable
+ GammaCurve(const GammaCurve&);
+ GammaCurve& operator=(const GammaCurve&);
+
+protected:
+ explicit GammaCurve(const Glib::ConstructParams& construct_params);
+ explicit GammaCurve(GtkGammaCurve* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkGammaCurve* gobj() { return reinterpret_cast<GtkGammaCurve*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkGammaCurve* gobj() const { return reinterpret_cast<GtkGammaCurve*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+public:
+ GammaCurve();
+
+
+};
+
+} /* namespace Gtk */
+
+
+namespace Glib
+{
+ /** @relates Gtk::Curve
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::Curve* wrap(GtkCurve* object, bool take_copy = false);
+}
+namespace Glib
+{
+ /** @relates Gtk::GammaCurve
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::GammaCurve* wrap(GtkGammaCurve* object, bool take_copy = false);
+}
+#endif /* _GTKMM_CURVE_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/dialog.cc b/libs/gtkmm2/gtk/gtkmm/dialog.cc
new file mode 100644
index 0000000000..b55b84f645
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/dialog.cc
@@ -0,0 +1,331 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/dialog.h>
+#include <gtkmm/private/dialog_p.h>
+
+#include <gtk/gtktypebuiltins.h>
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkdialog.h>
+
+namespace Gtk
+{
+
+Dialog::Dialog(const Glib::ustring& title, Gtk::Window& parent, bool modal, bool use_separator)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Window(Glib::ConstructParams(dialog_class_.init(), "title",title.c_str(), (char*) 0))
+{
+ construct_(modal, use_separator);
+ set_transient_for(parent);
+}
+
+Dialog::Dialog(const Glib::ustring& title, bool modal, bool use_separator)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Window(Glib::ConstructParams(dialog_class_.init(), "title",title.c_str(), (char*) 0))
+{
+ construct_(modal, use_separator);
+}
+
+void Dialog::construct_(bool modal, bool use_separator)
+{
+ set_modal(modal);
+ set_has_separator(use_separator);
+}
+
+void Dialog::set_alternative_button_order_from_array(const Glib::ArrayHandle<int>& new_order)
+{
+ gtk_dialog_set_alternative_button_order_from_array(gobj(), new_order.size(), const_cast<int*>(new_order.data()));
+}
+
+} // namespace Gtk
+
+
+namespace
+{
+
+void Dialog_signal_response_callback(GtkDialog* self, gint p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,int > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(p0
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo Dialog_signal_response_info =
+{
+ "response",
+ (GCallback) &Dialog_signal_response_callback,
+ (GCallback) &Dialog_signal_response_callback
+};
+
+} // anonymous namespace
+
+// static
+GType Glib::Value<Gtk::ResponseType>::value_type()
+{
+ return gtk_response_type_get_type();
+}
+
+
+namespace Glib
+{
+
+Gtk::Dialog* wrap(GtkDialog* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::Dialog *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Dialog_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Dialog_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_dialog_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Dialog_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->response = &response_callback;
+}
+
+
+void Dialog_Class::response_callback(GtkDialog* self, gint p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_response(p0
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->response)
+ (*base->response)(self, p0);
+ }
+}
+
+
+Glib::ObjectBase* Dialog_Class::wrap_new(GObject* o)
+{
+ return new Dialog((GtkDialog*)(o)); //top-level windows can not be manage()ed.
+
+}
+
+
+/* The implementation: */
+
+Dialog::Dialog(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Window(construct_params)
+{
+ }
+
+Dialog::Dialog(GtkDialog* castitem)
+:
+ Gtk::Window((GtkWindow*)(castitem))
+{
+ }
+
+Dialog::~Dialog()
+{
+ destroy_();
+}
+
+Dialog::CppClassType Dialog::dialog_class_; // initialize static member
+
+GType Dialog::get_type()
+{
+ return dialog_class_.init().get_type();
+}
+
+GType Dialog::get_base_type()
+{
+ return gtk_dialog_get_type();
+}
+
+
+Dialog::Dialog()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Window(Glib::ConstructParams(dialog_class_.init()))
+{
+ }
+
+void Dialog::add_action_widget(Widget& child, int response_id)
+{
+ gtk_dialog_add_action_widget(gobj(), (child).gobj(), response_id);
+}
+
+Button* Dialog::add_button(const Glib::ustring& button_text, int response_id)
+{
+ return Glib::wrap((GtkButton*)(gtk_dialog_add_button(gobj(), button_text.c_str(), response_id)));
+}
+
+Button* Dialog::add_button(const Gtk::StockID& stock_id, int response_id)
+{
+ return Glib::wrap((GtkButton*)(gtk_dialog_add_button(gobj(), (stock_id).get_c_str(), response_id)));
+}
+
+void Dialog::set_response_sensitive(int response_id, bool setting)
+{
+ gtk_dialog_set_response_sensitive(gobj(), response_id, static_cast<int>(setting));
+}
+
+void Dialog::set_default_response(int response_id)
+{
+ gtk_dialog_set_default_response(gobj(), response_id);
+}
+
+void Dialog::set_has_separator(bool setting)
+{
+ gtk_dialog_set_has_separator(gobj(), static_cast<int>(setting));
+}
+
+bool Dialog::get_has_separator() const
+{
+ return gtk_dialog_get_has_separator(const_cast<GtkDialog*>(gobj()));
+}
+
+bool Dialog::alternative_button_order(const Glib::RefPtr<const Gdk::Screen>& screen)
+{
+ return gtk_alternative_dialog_button_order(const_cast<GdkScreen*>(Glib::unwrap<Gdk::Screen>(screen)));
+}
+
+void Dialog::response(int response_id)
+{
+ gtk_dialog_response(gobj(), response_id);
+}
+
+int Dialog::run()
+{
+ return gtk_dialog_run(gobj());
+}
+
+VBox* Dialog::get_vbox()
+{
+ return Glib::wrap((GtkVBox*)(gobj()->vbox));
+}
+
+const VBox* Dialog::get_vbox() const
+{
+ return Glib::wrap((GtkVBox*)(gobj()->vbox));
+}
+
+HButtonBox* Dialog::get_action_area()
+{
+ return Glib::wrap((GtkHButtonBox*)(gobj()->action_area));
+}
+
+const HButtonBox* Dialog::get_action_area() const
+{
+ return Glib::wrap((GtkHButtonBox*)(gobj()->action_area));
+}
+
+
+Glib::SignalProxy1< void,int > Dialog::signal_response()
+{
+ return Glib::SignalProxy1< void,int >(this, &Dialog_signal_response_info);
+}
+
+
+Glib::PropertyProxy<bool> Dialog::property_has_separator()
+{
+ return Glib::PropertyProxy<bool>(this, "has-separator");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Dialog::property_has_separator() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "has-separator");
+}
+
+
+void Gtk::Dialog::on_response(int response_id)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->response)
+ (*base->response)(gobj(),response_id);
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/dialog.h b/libs/gtkmm2/gtk/gtkmm/dialog.h
new file mode 100644
index 0000000000..2b4ae3f461
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/dialog.h
@@ -0,0 +1,346 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_DIALOG_H
+#define _GTKMM_DIALOG_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* dialog.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/window.h>
+#include <gtkmm/box.h>
+#include <gtkmm/button.h>
+#include <gtkmm/buttonbox.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkDialog GtkDialog;
+typedef struct _GtkDialogClass GtkDialogClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class Dialog_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** @defgroup Dialogs Dialogs
+ */
+
+
+/** @addtogroup gtkmmEnums Enums and Flags */
+
+/**
+ * @ingroup gtkmmEnums
+ */
+enum ResponseType
+{
+ RESPONSE_NONE = -1,
+ RESPONSE_REJECT = -2,
+ RESPONSE_ACCEPT = -3,
+ RESPONSE_DELETE_EVENT = -4,
+ RESPONSE_OK = -5,
+ RESPONSE_CANCEL = -6,
+ RESPONSE_CLOSE = -7,
+ RESPONSE_YES = -8,
+ RESPONSE_NO = -9,
+ RESPONSE_APPLY = -10,
+ RESPONSE_HELP = -11
+};
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::ResponseType> : public Glib::Value_Enum<Gtk::ResponseType>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+
+/** Create popup windows.
+ *
+ * Dialog boxes are a convenient way to prompt the user for a small amount
+ * of input, eg. to display a message, ask a question, or anything else that
+ * does not require extensive effort on the user's part.
+ *
+ * gtkmm treats a dialog as a window split vertically. The top section is a
+ * Gtk::VBox, and is where widgets such as a Gtk::Label or a Gtk::Entry should be
+ * packed. The bottom area is known as the action_area. This is generally
+ * used for packing buttons into the dialog which may perform functions such
+ * as cancel, ok, or apply. The two areas are separated by a Gtk::HSeparator.
+ *
+ * The dialog can be 'modal' (that is, one which freezes the rest of the
+ * application from user input) - this can be specified in the Gtk::Dialog
+ * constructor.
+ *
+ * When adding buttons using add_button(), clicking the button will emit
+ * signal_response() with a "response id" you specified. You are encouraged
+ * to use the Gtk::ResponseType enum. If a dialog receives a delete event,
+ * the "response" signal will be emitted with a response id of
+ * Gtk::RESPONSE_NONE.
+ *
+ * If you want to block waiting for a dialog to return before returning control
+ * flow to your code, you can call run(). This function enters a
+ * recursive main loop and waits for the user to respond to the dialog, returning
+ * the response ID corresponding to the button the user clicked.
+ *
+ * @ingroup Dialogs
+ */
+
+class Dialog : public Window
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Dialog CppObjectType;
+ typedef Dialog_Class CppClassType;
+ typedef GtkDialog BaseObjectType;
+ typedef GtkDialogClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~Dialog();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class Dialog_Class;
+ static CppClassType dialog_class_;
+
+ // noncopyable
+ Dialog(const Dialog&);
+ Dialog& operator=(const Dialog&);
+
+protected:
+ explicit Dialog(const Glib::ConstructParams& construct_params);
+ explicit Dialog(GtkDialog* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkDialog* gobj() { return reinterpret_cast<GtkDialog*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkDialog* gobj() const { return reinterpret_cast<GtkDialog*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_response(int response_id);
+
+
+private:
+
+
+public:
+ Dialog();
+ explicit Dialog(const Glib::ustring& title, bool modal = false, bool use_separator = false);
+ Dialog(const Glib::ustring& title, Gtk::Window& parent, bool modal = false, bool use_separator = false);
+
+
+ /** Adds an activatable widget to the action area of a Gtk::Dialog,
+ * connecting a signal handler that will emit the "response" signal on
+ * the dialog when the widget is activated. The widget is appended to
+ * the end of the dialog's action area. If you want to add a
+ * non-activatable widget, simply pack it into the
+ * <tt>action_area</tt> field of the Gtk::Dialog struct.
+ * @param child An activatable widget.
+ * @param response_id Response ID for @a child .
+ */
+ void add_action_widget(Widget& child, int response_id);
+
+ /** Adds a button with the given text (or a stock button, if @a button_text is a
+ * stock ID) and sets things up so that clicking the button will emit the
+ * "response" signal with the given @a response_id . The button is appended to the
+ * end of the dialog's action area. The button widget is returned, but usually
+ * you don't need it.
+ * @param button_text Text of button, or stock ID.
+ * @param response_id Response ID for the button.
+ * @return The button widget that was added.
+ */
+ Button* add_button(const Glib::ustring& button_text, int response_id);
+
+ /** Adds a button with the given text (or a stock button, if @a button_text is a
+ * stock ID) and sets things up so that clicking the button will emit the
+ * "response" signal with the given @a response_id . The button is appended to the
+ * end of the dialog's action area. The button widget is returned, but usually
+ * you don't need it.
+ * @param button_text Text of button, or stock ID.
+ * @param response_id Response ID for the button.
+ * @return The button widget that was added.
+ */
+ Button* add_button(const Gtk::StockID& stock_id, int response_id);
+
+ /** Calls <tt>gtk_widget_set_sensitive (widget, @a setting )</tt>
+ * for each widget in the dialog's action area with the given @a response_id .
+ * A convenient way to sensitize/desensitize dialog buttons.
+ * @param response_id A response ID.
+ * @param setting <tt>true</tt> for sensitive.
+ */
+ void set_response_sensitive(int response_id, bool setting = true);
+
+ /** Sets the last widget in the dialog's action area with the given @a response_id
+ * as the default widget for the dialog. Pressing "Enter" normally activates
+ * the default widget.
+ * @param response_id A response ID.
+ */
+ void set_default_response(int response_id);
+
+ /** Sets whether the dialog has a separator above the buttons.
+ * <tt>true</tt> by default.
+ * @param setting <tt>true</tt> to have a separator.
+ */
+ void set_has_separator(bool setting = true);
+
+ /** Accessor for whether the dialog has a separator.
+ * @return <tt>true</tt> if the dialog has a separator.
+ */
+ bool get_has_separator() const;
+
+
+ /** Returns <tt>true</tt> if dialogs are expected to use an alternative
+ * button order on the screen @a screen . See
+ * Gtk::Dialog::set_alternative_button_order() for more details
+ * about alternative button order.
+ *
+ * If you need to use this function, you should probably connect
+ * to the ::notify:gtk-alternative-button-order signal on the
+ * Gtk::Settings object associated to @a screen , in order to be
+ * notified if the button order setting changes.
+ * @param screen A Gdk::Screen, or <tt>0</tt> to use the default screen.
+ * @return Whether the alternative button order should be used
+ *
+ * Since: 2.6.
+ */
+ static bool alternative_button_order(const Glib::RefPtr<const Gdk::Screen>& screen);
+
+ //TODO: Document this:
+ void set_alternative_button_order_from_array(const Glib::ArrayHandle<int>& new_order);
+
+
+ /** Emits the "response" signal with the given response ID. Used to
+ * indicate that the user has responded to the dialog in some way;
+ * typically either you or run() will be monitoring the
+ * "response" signal and take appropriate action.
+ * @param response_id Response ID.
+ */
+ void response(int response_id);
+
+ /** Blocks in a recursive main loop until the @a dialog emits the
+ * response signal. It returns the response ID from the "response" signal emission.
+ * Before entering the recursive main loop, run() calls
+ * Gtk::Widget::show() on the dialog for you. Note that you still
+ * need to show any children of the dialog yourself.
+ *
+ * If the dialog receives "delete_event", Gtk::Dialog::run() will return
+ * Gtk::RESPONSE_DELETE_EVENT. Also, during Gtk::Dialog::run() the dialog will be
+ * modal. You can force Gtk::Dialog::run() to return at any time by
+ * calling Gtk::Dialog::response() to emit the "response"
+ * signal.
+ *
+ * After Gtk::Dialog::run() returns, you are responsible for hiding or
+ * destroying the dialog if you wish to do so.
+ *
+ * Typical usage of this function might be:
+ * @code
+ * <tt>int</tt> result = dialog.run();
+ * switch (result)
+ * {
+ * case GTK_RESPONSE_ACCEPT:
+ * do_application_specific_something (&lt;!-- --&gt;);
+ * break;
+ * default:
+ * do_nothing_since_dialog_was_cancelled (&lt;!-- --&gt;);
+ * break;
+ * }
+ * @endcode
+ * @return Response ID.
+ */
+ int run();
+
+ VBox* get_vbox();
+ const VBox* get_vbox() const;
+ HButtonBox* get_action_area();
+ const HButtonBox* get_action_area() const;
+
+ /** The dialog has a separator bar above its buttons.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_has_separator() ;
+
+/** The dialog has a separator bar above its buttons.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_has_separator() const;
+
+
+ Glib::SignalProxy1< void,int > signal_response();
+
+
+protected:
+ void construct_(bool modal, bool use_separator);
+
+
+};
+
+} /* namespace Gtk */
+
+
+namespace Glib
+{
+ /** @relates Gtk::Dialog
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::Dialog* wrap(GtkDialog* object, bool take_copy = false);
+}
+#endif /* _GTKMM_DIALOG_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/drawingarea.cc b/libs/gtkmm2/gtk/gtkmm/drawingarea.cc
new file mode 100644
index 0000000000..53c90ec888
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/drawingarea.cc
@@ -0,0 +1,129 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/drawingarea.h>
+#include <gtkmm/private/drawingarea_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkdrawingarea.h>
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::DrawingArea* wrap(GtkDrawingArea* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::DrawingArea *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& DrawingArea_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &DrawingArea_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_drawing_area_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void DrawingArea_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* DrawingArea_Class::wrap_new(GObject* o)
+{
+ return manage(new DrawingArea((GtkDrawingArea*)(o)));
+
+}
+
+
+/* The implementation: */
+
+DrawingArea::DrawingArea(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Widget(construct_params)
+{
+ }
+
+DrawingArea::DrawingArea(GtkDrawingArea* castitem)
+:
+ Gtk::Widget((GtkWidget*)(castitem))
+{
+ }
+
+DrawingArea::~DrawingArea()
+{
+ destroy_();
+}
+
+DrawingArea::CppClassType DrawingArea::drawingarea_class_; // initialize static member
+
+GType DrawingArea::get_type()
+{
+ return drawingarea_class_.init().get_type();
+}
+
+GType DrawingArea::get_base_type()
+{
+ return gtk_drawing_area_get_type();
+}
+
+
+DrawingArea::DrawingArea()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Widget(Glib::ConstructParams(drawingarea_class_.init()))
+{
+ }
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/drawingarea.h b/libs/gtkmm2/gtk/gtkmm/drawingarea.h
new file mode 100644
index 0000000000..3d3774deb6
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/drawingarea.h
@@ -0,0 +1,120 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_DRAWINGAREA_H
+#define _GTKMM_DRAWINGAREA_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* drawingarea.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/widget.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkDrawingArea GtkDrawingArea;
+typedef struct _GtkDrawingAreaClass GtkDrawingAreaClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class DrawingArea_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** A widget for custom user interface elements.
+ *
+ * @ingroup Widgets
+ */
+
+class DrawingArea : public Widget
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef DrawingArea CppObjectType;
+ typedef DrawingArea_Class CppClassType;
+ typedef GtkDrawingArea BaseObjectType;
+ typedef GtkDrawingAreaClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~DrawingArea();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class DrawingArea_Class;
+ static CppClassType drawingarea_class_;
+
+ // noncopyable
+ DrawingArea(const DrawingArea&);
+ DrawingArea& operator=(const DrawingArea&);
+
+protected:
+ explicit DrawingArea(const Glib::ConstructParams& construct_params);
+ explicit DrawingArea(GtkDrawingArea* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkDrawingArea* gobj() { return reinterpret_cast<GtkDrawingArea*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkDrawingArea* gobj() const { return reinterpret_cast<GtkDrawingArea*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+public:
+
+ DrawingArea();
+
+
+};
+
+} /* namespace Gtk */
+
+
+namespace Glib
+{
+ /** @relates Gtk::DrawingArea
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::DrawingArea* wrap(GtkDrawingArea* object, bool take_copy = false);
+}
+#endif /* _GTKMM_DRAWINGAREA_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/editable.cc b/libs/gtkmm2/gtk/gtkmm/editable.cc
new file mode 100644
index 0000000000..9109009a2f
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/editable.cc
@@ -0,0 +1,770 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/editable.h>
+#include <gtkmm/private/editable_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkeditable.h>
+
+
+namespace
+{
+
+void Editable_signal_insert_text_callback(GtkEditable* self, const gchar* text,gint length,gint* position,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,const Glib::ustring&,int* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))( Glib::ustring(text, text + length), position);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo Editable_signal_insert_text_info =
+{
+ "insert_text",
+ (GCallback) &Editable_signal_insert_text_callback,
+ (GCallback) &Editable_signal_insert_text_callback
+};
+
+
+void Editable_signal_delete_text_callback(GtkEditable* self, gint start_pos,gint end_pos,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,int,int > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(start_pos
+, end_pos
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo Editable_signal_delete_text_info =
+{
+ "delete_text",
+ (GCallback) &Editable_signal_delete_text_callback,
+ (GCallback) &Editable_signal_delete_text_callback
+};
+
+
+const Glib::SignalProxyInfo Editable_signal_changed_info =
+{
+ "changed",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Gtk::Editable> wrap(GtkEditable* object, bool take_copy)
+{
+ return Glib::RefPtr<Gtk::Editable>( dynamic_cast<Gtk::Editable*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} // namespace Glib
+
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Interface_Class& Editable_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Interface_Class has to know the interface init function
+ // in order to add interfaces to implementing types.
+ class_init_func_ = &Editable_Class::iface_init_function;
+
+ // We can not derive from another interface, and it is not necessary anyway.
+ gtype_ = gtk_editable_get_type();
+ }
+
+ return *this;
+}
+
+void Editable_Class::iface_init_function(void* g_iface, void*)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_iface);
+
+ //This is just to avoid an "unused variable" warning when there are no vfuncs or signal handlers to connect.
+ //This is a temporary fix until I find out why I can not seem to derive a GtkFileChooser interface. murrayc
+ g_assert(klass != 0);
+
+ klass->do_insert_text = &do_insert_text_vfunc_callback;
+ klass->do_delete_text = &do_delete_text_vfunc_callback;
+ klass->get_chars = &get_chars_vfunc_callback;
+ klass->set_selection_bounds = &set_selection_bounds_vfunc_callback;
+ klass->get_selection_bounds = &get_selection_bounds_vfunc_callback;
+ klass->set_position = &set_position_vfunc_callback;
+ klass->get_position = &get_position_vfunc_callback;
+ klass->insert_text = &insert_text_callback;
+ klass->delete_text = &delete_text_callback;
+ klass->changed = &changed_callback;
+}
+
+void Editable_Class::do_insert_text_vfunc_callback(GtkEditable* self, const gchar* text, gint length, gint* position)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*) self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->insert_text_vfunc( Glib::ustring(text, text + length), *position);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->do_insert_text)
+ (*base->do_insert_text)( self, text, length, position);
+ }
+}
+
+void Editable_Class::do_delete_text_vfunc_callback(GtkEditable* self, gint start_pos, gint end_pos)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->delete_text_vfunc(start_pos
+, end_pos
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->do_delete_text)
+ (*base->do_delete_text)(self, start_pos, end_pos);
+ }
+}
+
+gchar* Editable_Class::get_chars_vfunc_callback(GtkEditable* self, gint start_pos, gint end_pos)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return g_strdup((obj->get_chars_vfunc(start_pos
+, end_pos
+)).c_str());
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_chars)
+ return (*base->get_chars)(self, start_pos, end_pos);
+ }
+
+ typedef gchar* RType;
+ return RType();
+}
+
+void Editable_Class::set_selection_bounds_vfunc_callback(GtkEditable* self, gint start_pos, gint end_pos)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->select_region_vfunc(start_pos
+, end_pos
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->set_selection_bounds)
+ (*base->set_selection_bounds)(self, start_pos, end_pos);
+ }
+}
+
+gboolean Editable_Class::get_selection_bounds_vfunc_callback(GtkEditable* self, gint* start_pos, gint* end_pos)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->get_selection_bounds_vfunc(*(start_pos)
+, *(end_pos)
+));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_selection_bounds)
+ return (*base->get_selection_bounds)(self, start_pos, end_pos);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+void Editable_Class::set_position_vfunc_callback(GtkEditable* self, gint position)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->set_position_vfunc(position
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->set_position)
+ (*base->set_position)(self, position);
+ }
+}
+
+gint Editable_Class::get_position_vfunc_callback(GtkEditable* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return obj->get_position_vfunc();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_position)
+ return (*base->get_position)(self);
+ }
+
+ typedef gint RType;
+ return RType();
+}
+
+
+void Editable_Class::insert_text_callback(GtkEditable* self, const gchar* text, gint length, gint* position)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*) self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_insert_text( Glib::ustring(text, text + length), position);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->insert_text)
+ (*base->insert_text)( self, text, length, position);
+ }
+}
+
+void Editable_Class::delete_text_callback(GtkEditable* self, gint start_pos, gint end_pos)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_delete_text(start_pos
+, end_pos
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->delete_text)
+ (*base->delete_text)(self, start_pos, end_pos);
+ }
+}
+
+void Editable_Class::changed_callback(GtkEditable* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_changed();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->changed)
+ (*base->changed)(self);
+ }
+}
+
+
+Glib::ObjectBase* Editable_Class::wrap_new(GObject* object)
+{
+ return new Editable((GtkEditable*)(object));
+}
+
+
+/* The implementation: */
+
+Editable::Editable()
+:
+ Glib::Interface(editable_class_.init())
+{}
+
+Editable::Editable(GtkEditable* castitem)
+:
+ Glib::Interface((GObject*)(castitem))
+{}
+
+Editable::~Editable()
+{}
+
+// static
+void Editable::add_interface(GType gtype_implementer)
+{
+ editable_class_.init().add_interface(gtype_implementer);
+}
+
+Editable::CppClassType Editable::editable_class_; // initialize static member
+
+GType Editable::get_type()
+{
+ return editable_class_.init().get_type();
+}
+
+GType Editable::get_base_type()
+{
+ return gtk_editable_get_type();
+}
+
+
+void Editable::cut_clipboard()
+{
+ gtk_editable_cut_clipboard(gobj());
+}
+
+void Editable::copy_clipboard()
+{
+ gtk_editable_copy_clipboard(gobj());
+}
+
+void Editable::paste_clipboard()
+{
+ gtk_editable_paste_clipboard(gobj());
+}
+
+void Editable::delete_selection()
+{
+ gtk_editable_delete_selection(gobj());
+}
+
+void Editable::set_editable(bool is_editable)
+{
+ gtk_editable_set_editable(gobj(), static_cast<int>(is_editable));
+}
+
+bool Editable::get_editable() const
+{
+ return gtk_editable_get_editable(const_cast<GtkEditable*>(gobj()));
+}
+
+void Editable::insert_text(const Glib::ustring& text, int length, int& position)
+{
+ gtk_editable_insert_text(gobj(), text.c_str(), length, &position);
+}
+
+void Editable::delete_text(int start_pos, int end_pos)
+{
+ gtk_editable_delete_text(gobj(), start_pos, end_pos);
+}
+
+Glib::ustring Editable::get_chars(int start_pos, int end_pos) const
+{
+ return Glib::convert_return_gchar_ptr_to_ustring(gtk_editable_get_chars(const_cast<GtkEditable*>(gobj()), start_pos, end_pos));
+}
+
+void Editable::select_region(int start_pos, int end_pos)
+{
+ gtk_editable_select_region(gobj(), start_pos, end_pos);
+}
+
+bool Editable::get_selection_bounds(int& start_pos, int& end_pos) const
+{
+ return gtk_editable_get_selection_bounds(const_cast<GtkEditable*>(gobj()), &start_pos, &end_pos);
+}
+
+void Editable::set_position(int position)
+{
+ gtk_editable_set_position(gobj(), position);
+}
+
+int Editable::get_position() const
+{
+ return gtk_editable_get_position(const_cast<GtkEditable*>(gobj()));
+}
+
+
+Glib::SignalProxy2< void,const Glib::ustring&,int* > Editable::signal_insert_text()
+{
+ return Glib::SignalProxy2< void,const Glib::ustring&,int* >(this, &Editable_signal_insert_text_info);
+}
+
+Glib::SignalProxy2< void,int,int > Editable::signal_delete_text()
+{
+ return Glib::SignalProxy2< void,int,int >(this, &Editable_signal_delete_text_info);
+}
+
+Glib::SignalProxy0< void > Editable::signal_changed()
+{
+ return Glib::SignalProxy0< void >(this, &Editable_signal_changed_info);
+}
+
+
+void Gtk::Editable::on_insert_text(const Glib::ustring& text, int* position)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->insert_text)
+ (*base->insert_text)(gobj(),text.data(),text.bytes(),position);
+}
+
+void Gtk::Editable::on_delete_text(int start_pos, int end_pos)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->delete_text)
+ (*base->delete_text)(gobj(),start_pos,end_pos);
+}
+
+void Gtk::Editable::on_changed()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->changed)
+ (*base->changed)(gobj());
+}
+
+
+void Gtk::Editable::insert_text_vfunc(const Glib::ustring& text, int& position)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->do_insert_text)
+ (*base->do_insert_text)(gobj(),text.data(),text.bytes(),&position);
+}
+
+void Gtk::Editable::delete_text_vfunc(int start_pos, int end_pos)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->do_delete_text)
+ (*base->do_delete_text)(gobj(),start_pos,end_pos);
+}
+
+Glib::ustring Gtk::Editable::get_chars_vfunc(int start_pos, int end_pos) const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_chars)
+ return Glib::convert_const_gchar_ptr_to_ustring((*base->get_chars)(const_cast<GtkEditable*>(gobj()),start_pos,end_pos));
+
+ typedef Glib::ustring RType;
+ return RType();
+}
+
+void Gtk::Editable::select_region_vfunc(int start_pos, int end_pos)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->set_selection_bounds)
+ (*base->set_selection_bounds)(gobj(),start_pos,end_pos);
+}
+
+bool Gtk::Editable::get_selection_bounds_vfunc(int& start_pos, int& end_pos) const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_selection_bounds)
+ return (*base->get_selection_bounds)(const_cast<GtkEditable*>(gobj()),&start_pos,&end_pos);
+
+ typedef bool RType;
+ return RType();
+}
+
+void Gtk::Editable::set_position_vfunc(int position)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->set_position)
+ (*base->set_position)(gobj(),position);
+}
+
+int Gtk::Editable::get_position_vfunc() const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_position)
+ return (*base->get_position)(const_cast<GtkEditable*>(gobj()));
+
+ typedef int RType;
+ return RType();
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/editable.h b/libs/gtkmm2/gtk/gtkmm/editable.h
new file mode 100644
index 0000000000..89832dcba7
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/editable.h
@@ -0,0 +1,190 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_EDITABLE_H
+#define _GTKMM_EDITABLE_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/interface.h>
+#include <gtk/gtkeditable.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkEditable GtkEditable;
+typedef struct _GtkEditableClass GtkEditableClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class Editable_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** Base class for text-editing widgets.
+ *
+ * The Gtk::Editable class is a base class for widgets for editing text,
+ * such as Gtk::Entry. It cannot be instantiated by itself. The editable
+ * class contains functions for generically manipulating an editable widget,
+ * a large number of action signals used for key bindings, and several
+ * signals that an application can connect to to modify the behavior of a
+ * widget.
+ *
+ */
+
+class Editable : public Glib::Interface
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef Editable CppObjectType;
+ typedef Editable_Class CppClassType;
+ typedef GtkEditable BaseObjectType;
+ typedef GtkEditableClass BaseClassType;
+
+private:
+ friend class Editable_Class;
+ static CppClassType editable_class_;
+
+ // noncopyable
+ Editable(const Editable&);
+ Editable& operator=(const Editable&);
+
+protected:
+ Editable(); // you must derive from this class
+ explicit Editable(GtkEditable* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~Editable();
+
+ static void add_interface(GType gtype_implementer);
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ GtkEditable* gobj() { return reinterpret_cast<GtkEditable*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const GtkEditable* gobj() const { return reinterpret_cast<GtkEditable*>(gobject_); }
+
+private:
+
+
+public:
+
+ void cut_clipboard();
+
+ void copy_clipboard();
+
+ void paste_clipboard();
+
+ void delete_selection();
+
+ void set_editable(bool is_editable = true);
+
+ /** Retrieves whether @a editable is editable. See
+ * set_editable().
+ * @return <tt>true</tt> if @a editable is editable.
+ */
+ bool get_editable() const;
+
+
+ void insert_text(const Glib::ustring& text, int length, int& position);
+
+ void delete_text(int start_pos, int end_pos);
+
+
+ Glib::ustring get_chars(int start_pos, int end_pos) const;
+
+
+ void select_region(int start_pos, int end_pos);
+
+ bool get_selection_bounds(int& start_pos, int& end_pos) const;
+
+
+ void set_position(int position);
+
+ int get_position() const;
+
+
+ Glib::SignalProxy2< void,const Glib::ustring&,int* > signal_insert_text();
+
+
+ Glib::SignalProxy2< void,int,int > signal_delete_text();
+
+
+ Glib::SignalProxy0< void > signal_changed();
+
+
+protected:
+
+
+ virtual void delete_text_vfunc(int start_pos, int end_pos);
+
+
+ virtual Glib::ustring get_chars_vfunc(int start_pos, int end_pos) const;
+
+ virtual void select_region_vfunc(int start_pos, int end_pos);
+ virtual bool get_selection_bounds_vfunc(int& start_pos, int& end_pos) const;
+ virtual void set_position_vfunc(int position);
+ virtual int get_position_vfunc() const;
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+virtual void insert_text_vfunc(const Glib::ustring& text, int& position);
+
+
+ //Default Signal Handlers::
+ virtual void on_insert_text(const Glib::ustring& text, int* position);
+ virtual void on_delete_text(int start_pos, int end_pos);
+ virtual void on_changed();
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::Editable
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Gtk::Editable> wrap(GtkEditable* object, bool take_copy = false);
+
+} // namespace Glib
+
+#endif /* _GTKMM_EDITABLE_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/entry.cc b/libs/gtkmm2/gtk/gtkmm/entry.cc
new file mode 100644
index 0000000000..6b08e95c3b
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/entry.cc
@@ -0,0 +1,598 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/entry.h>
+#include <gtkmm/private/entry_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkentry.h>
+
+
+namespace
+{
+
+void Entry_signal_populate_popup_callback(GtkEntry* self, GtkMenu* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,Menu* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::wrap(p0)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo Entry_signal_populate_popup_info =
+{
+ "populate_popup",
+ (GCallback) &Entry_signal_populate_popup_callback,
+ (GCallback) &Entry_signal_populate_popup_callback
+};
+
+
+void Entry_signal_insert_at_cursor_callback(GtkEntry* self, const gchar* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,const Glib::ustring& > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::convert_const_gchar_ptr_to_ustring(p0)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo Entry_signal_insert_at_cursor_info =
+{
+ "insert_at_cursor",
+ (GCallback) &Entry_signal_insert_at_cursor_callback,
+ (GCallback) &Entry_signal_insert_at_cursor_callback
+};
+
+
+const Glib::SignalProxyInfo Entry_signal_activate_info =
+{
+ "activate",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::Entry* wrap(GtkEntry* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::Entry *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Entry_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Entry_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_entry_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ Editable::add_interface(get_type());
+ CellEditable::add_interface(get_type());
+ }
+
+ return *this;
+}
+
+void Entry_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->populate_popup = &populate_popup_callback;
+ klass->insert_at_cursor = &insert_at_cursor_callback;
+ klass->activate = &activate_callback;
+}
+
+
+void Entry_Class::populate_popup_callback(GtkEntry* self, GtkMenu* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_populate_popup(Glib::wrap(p0)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->populate_popup)
+ (*base->populate_popup)(self, p0);
+ }
+}
+
+void Entry_Class::insert_at_cursor_callback(GtkEntry* self, const gchar* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_insert_at_cursor(Glib::convert_const_gchar_ptr_to_ustring(p0)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->insert_at_cursor)
+ (*base->insert_at_cursor)(self, p0);
+ }
+}
+
+void Entry_Class::activate_callback(GtkEntry* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_activate();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->activate)
+ (*base->activate)(self);
+ }
+}
+
+
+Glib::ObjectBase* Entry_Class::wrap_new(GObject* o)
+{
+ return manage(new Entry((GtkEntry*)(o)));
+
+}
+
+
+/* The implementation: */
+
+Entry::Entry(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Widget(construct_params)
+{
+ }
+
+Entry::Entry(GtkEntry* castitem)
+:
+ Gtk::Widget((GtkWidget*)(castitem))
+{
+ }
+
+Entry::~Entry()
+{
+ destroy_();
+}
+
+Entry::CppClassType Entry::entry_class_; // initialize static member
+
+GType Entry::get_type()
+{
+ return entry_class_.init().get_type();
+}
+
+GType Entry::get_base_type()
+{
+ return gtk_entry_get_type();
+}
+
+
+Entry::Entry()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Widget(Glib::ConstructParams(entry_class_.init()))
+{
+ }
+
+void Entry::set_visibility(bool visible)
+{
+ gtk_entry_set_visibility(gobj(), static_cast<int>(visible));
+}
+
+bool Entry::get_visibility() const
+{
+ return gtk_entry_get_visibility(const_cast<GtkEntry*>(gobj()));
+}
+
+void Entry::set_invisible_char(gunichar ch)
+{
+ gtk_entry_set_invisible_char(gobj(), ch);
+}
+
+gunichar Entry::get_invisible_char() const
+{
+ return gtk_entry_get_invisible_char(const_cast<GtkEntry*>(gobj()));
+}
+
+void Entry::set_has_frame(bool setting)
+{
+ gtk_entry_set_has_frame(gobj(), static_cast<int>(setting));
+}
+
+bool Entry::get_has_frame() const
+{
+ return gtk_entry_get_has_frame(const_cast<GtkEntry*>(gobj()));
+}
+
+void Entry::set_max_length(int max)
+{
+ gtk_entry_set_max_length(gobj(), max);
+}
+
+int Entry::get_max_length() const
+{
+ return gtk_entry_get_max_length(const_cast<GtkEntry*>(gobj()));
+}
+
+void Entry::set_activates_default(bool setting)
+{
+ gtk_entry_set_activates_default(gobj(), static_cast<int>(setting));
+}
+
+gboolean Entry::get_activates_default() const
+{
+ return gtk_entry_get_activates_default(const_cast<GtkEntry*>(gobj()));
+}
+
+void Entry::set_width_chars(int n_chars)
+{
+ gtk_entry_set_width_chars(gobj(), n_chars);
+}
+
+int Entry::get_width_chars() const
+{
+ return gtk_entry_get_width_chars(const_cast<GtkEntry*>(gobj()));
+}
+
+void Entry::set_text(const Glib::ustring & text)
+{
+ gtk_entry_set_text(gobj(), text.c_str());
+}
+
+Glib::ustring Entry::get_text() const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(gtk_entry_get_text(const_cast<GtkEntry*>(gobj())));
+}
+
+Glib::RefPtr<Pango::Layout> Entry::get_layout()
+{
+
+ Glib::RefPtr<Pango::Layout> retvalue = Glib::wrap(gtk_entry_get_layout(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const Pango::Layout> Entry::get_layout() const
+{
+
+ Glib::RefPtr<const Pango::Layout> retvalue = Glib::wrap(gtk_entry_get_layout(const_cast<GtkEntry*>(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+void Entry::get_layout_offsets(int& x, int& y)
+{
+ gtk_entry_get_layout_offsets(gobj(), &x, &y);
+}
+
+int Entry::layout_index_to_text_index(int layout_index) const
+{
+ return gtk_entry_layout_index_to_text_index(const_cast<GtkEntry*>(gobj()), layout_index);
+}
+
+int Entry::text_index_to_layout_index(int text_index) const
+{
+ return gtk_entry_text_index_to_layout_index(const_cast<GtkEntry*>(gobj()), text_index);
+}
+
+void Entry::set_alignment(float xalign)
+{
+ gtk_entry_set_alignment(gobj(), xalign);
+}
+
+void Entry::set_alignment(AlignmentEnum xalign)
+{
+ gtk_entry_set_alignment(gobj(), _gtkmm_align_float_from_enum(xalign));
+}
+
+float Entry::get_alignment() const
+{
+ return gtk_entry_get_alignment(const_cast<GtkEntry*>(gobj()));
+}
+
+void Entry::set_completion(const Glib::RefPtr<EntryCompletion>& completion)
+{
+ gtk_entry_set_completion(gobj(), Glib::unwrap(completion));
+}
+
+Glib::RefPtr<EntryCompletion> Entry::get_completion()
+{
+
+ Glib::RefPtr<EntryCompletion> retvalue = Glib::wrap(gtk_entry_get_completion(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const EntryCompletion> Entry::get_completion() const
+{
+
+ Glib::RefPtr<const EntryCompletion> retvalue = Glib::wrap(gtk_entry_get_completion(const_cast<GtkEntry*>(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+guint16 Entry::get_text_length() const
+{
+ return gobj()->text_length;
+}
+
+
+Glib::SignalProxy1< void,Menu* > Entry::signal_populate_popup()
+{
+ return Glib::SignalProxy1< void,Menu* >(this, &Entry_signal_populate_popup_info);
+}
+
+Glib::SignalProxy1< void,const Glib::ustring& > Entry::signal_insert_at_cursor()
+{
+ return Glib::SignalProxy1< void,const Glib::ustring& >(this, &Entry_signal_insert_at_cursor_info);
+}
+
+Glib::SignalProxy0< void > Entry::signal_activate()
+{
+ return Glib::SignalProxy0< void >(this, &Entry_signal_activate_info);
+}
+
+
+Glib::PropertyProxy_ReadOnly<int> Entry::property_cursor_position() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "cursor-position");
+}
+
+Glib::PropertyProxy_ReadOnly<int> Entry::property_selection_bound() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "selection-bound");
+}
+
+Glib::PropertyProxy<bool> Entry::property_editable()
+{
+ return Glib::PropertyProxy<bool>(this, "editable");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Entry::property_editable() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "editable");
+}
+
+Glib::PropertyProxy<int> Entry::property_max_length()
+{
+ return Glib::PropertyProxy<int>(this, "max-length");
+}
+
+Glib::PropertyProxy_ReadOnly<int> Entry::property_max_length() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "max-length");
+}
+
+Glib::PropertyProxy<bool> Entry::property_visibility()
+{
+ return Glib::PropertyProxy<bool>(this, "visibility");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Entry::property_visibility() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "visibility");
+}
+
+Glib::PropertyProxy<bool> Entry::property_has_frame()
+{
+ return Glib::PropertyProxy<bool>(this, "has-frame");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Entry::property_has_frame() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "has-frame");
+}
+
+Glib::PropertyProxy<gunichar> Entry::property_invisible_char()
+{
+ return Glib::PropertyProxy<gunichar>(this, "invisible-char");
+}
+
+Glib::PropertyProxy_ReadOnly<gunichar> Entry::property_invisible_char() const
+{
+ return Glib::PropertyProxy_ReadOnly<gunichar>(this, "invisible-char");
+}
+
+Glib::PropertyProxy<bool> Entry::property_activates_default()
+{
+ return Glib::PropertyProxy<bool>(this, "activates-default");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Entry::property_activates_default() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "activates-default");
+}
+
+Glib::PropertyProxy<int> Entry::property_width_chars()
+{
+ return Glib::PropertyProxy<int>(this, "width-chars");
+}
+
+Glib::PropertyProxy_ReadOnly<int> Entry::property_width_chars() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "width-chars");
+}
+
+Glib::PropertyProxy_ReadOnly<int> Entry::property_scroll_offset() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "scroll-offset");
+}
+
+Glib::PropertyProxy<Glib::ustring> Entry::property_text()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "text");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> Entry::property_text() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "text");
+}
+
+
+void Gtk::Entry::on_populate_popup(Menu* menu)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->populate_popup)
+ (*base->populate_popup)(gobj(),(GtkMenu*)Glib::unwrap(menu));
+}
+
+void Gtk::Entry::on_insert_at_cursor(const Glib::ustring& str)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->insert_at_cursor)
+ (*base->insert_at_cursor)(gobj(),str.c_str());
+}
+
+void Gtk::Entry::on_activate()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->activate)
+ (*base->activate)(gobj());
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/entry.h b/libs/gtkmm2/gtk/gtkmm/entry.h
new file mode 100644
index 0000000000..d7b9a3fb3c
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/entry.h
@@ -0,0 +1,524 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_ENTRY_H
+#define _GTKMM_ENTRY_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* entry.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/widget.h>
+#include <gtkmm/editable.h>
+#include <gtkmm/menu.h>
+#include <gtkmm/celleditable.h>
+#include <gtkmm/entrycompletion.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkEntry GtkEntry;
+typedef struct _GtkEntryClass GtkEntryClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class Entry_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** A single line text entry field.
+ *
+ * The Gtk::Entry widget is a single line text entry widget. A fairly large
+ * set of key bindings are supported by default. If the entered text is
+ * longer than the allocation of the widget, the widget will scroll so that
+ * the cursor position is visible.
+ *
+ * @ingroup Widgets
+ */
+
+class Entry
+: public Widget,
+ public Editable,
+ public CellEditable
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Entry CppObjectType;
+ typedef Entry_Class CppClassType;
+ typedef GtkEntry BaseObjectType;
+ typedef GtkEntryClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~Entry();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class Entry_Class;
+ static CppClassType entry_class_;
+
+ // noncopyable
+ Entry(const Entry&);
+ Entry& operator=(const Entry&);
+
+protected:
+ explicit Entry(const Glib::ConstructParams& construct_params);
+ explicit Entry(GtkEntry* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkEntry* gobj() { return reinterpret_cast<GtkEntry*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkEntry* gobj() const { return reinterpret_cast<GtkEntry*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_populate_popup(Menu* menu);
+ virtual void on_insert_at_cursor(const Glib::ustring& str);
+ virtual void on_activate();
+
+
+private:
+
+
+public:
+
+ Entry();
+
+
+ void set_visibility(bool visible = true);
+
+ /** Retrieves whether the text in @a entry is visible. See
+ * set_visibility().
+ * @return <tt>true</tt> if the text is currently visible.
+ */
+ bool get_visibility() const;
+
+ /** Sets the character to use in place of the actual text when
+ * set_visibility() has been called to set text visibility
+ * to <tt>false</tt>. i.e. this is the character used in "password mode" to
+ * show the user how many characters have been typed. The default
+ * invisible char is an asterisk ('*'). If you set the invisible char
+ * to 0, then the user will get no feedback at all; there will be
+ * no text on the screen as they type.
+ * @param ch A Unicode character.
+ */
+ void set_invisible_char(gunichar ch);
+
+ /** Retrieves the character displayed in place of the real characters
+ * for entries with visisbility set to false. See set_invisible_char().
+ * @return The current invisible char, or 0, if the entry does not
+ * show invisible text at all.
+ */
+ gunichar get_invisible_char() const;
+
+ /** Sets whether the entry has a beveled frame around it.
+ * @param setting New value.
+ */
+ void set_has_frame(bool setting = true);
+
+ /** Gets the value set by set_has_frame().
+ * @return Whether the entry has a beveled frame.
+ */
+ bool get_has_frame() const;
+
+ /** Sets the maximum allowed length of the contents of the widget. If
+ * the current contents are longer than the given length, then they
+ * will be truncated to fit.
+ * @param max The maximum length of the entry, or 0 for no maximum.
+ * (other than the maximum length of entries.) The value passed in will
+ * be clamped to the range 0-65536.
+ */
+ void set_max_length(int max);
+
+ /** Retrieves the maximum allowed length of the text in
+ * @a entry . See set_max_length().
+ * @return The maximum allowed number of characters
+ * in Gtk::Entry, or 0 if there is no maximum.
+ */
+ int get_max_length() const;
+
+ /** If @a setting is <tt>true</tt>, pressing Enter in the @a entry will activate the default
+ * widget for the window containing the entry. This usually means that
+ * the dialog box containing the entry will be closed, since the default
+ * widget is usually one of the dialog buttons.
+ *
+ * (For experts: if @a setting is <tt>true</tt>, the entry calls
+ * Gtk::Window::activate_default() on the window containing the entry, in
+ * the default handler for the "activate" signal.)
+ * @param setting <tt>true</tt> to activate window's default widget on Enter keypress.
+ */
+ void set_activates_default(bool setting = true);
+
+ /** Retrieves the value set by set_activates_default().
+ * @return <tt>true</tt> if the entry will activate the default widget.
+ */
+ gboolean get_activates_default() const;
+
+ /** Changes the size request of the entry to be about the right size
+ * for @a n_chars characters. Note that it changes the size
+ * <em>request</em>, the size can still be affected by
+ * how you pack the widget into containers. If @a n_chars is -1, the
+ * size reverts to the default entry size.
+ * @param n_chars Width in chars.
+ */
+ void set_width_chars(int n_chars);
+
+ /** Gets the value set by set_width_chars().
+ * @return Number of chars to request space for, or negative if unset.
+ */
+ int get_width_chars() const;
+
+ void set_text(const Glib::ustring &text);
+
+ /** Retrieves the contents of the entry widget.
+ * See also Gtk::Editable::get_chars().
+ * @return A pointer to the contents of the widget as a
+ * string. This string points to internally allocated
+ * storage in the widget and must not be freed, modified or
+ * stored.
+ */
+ Glib::ustring get_text() const;
+
+ /** Gets the Pango::Layout used to display the entry.
+ * The layout is useful to e.g. convert text positions to
+ * pixel positions, in combination with get_layout_offsets().
+ * The returned layout is owned by the entry so need not be
+ * freed by the caller.
+ *
+ * Keep in mind that the layout text may contain a preedit string, so
+ * layout_index_to_text_index() and
+ * text_index_to_layout_index() are needed to convert byte
+ * indices in the layout to byte indices in the entry contents.
+ * @return The Pango::Layout for this entry.
+ */
+ Glib::RefPtr<Pango::Layout> get_layout();
+
+ /** Gets the Pango::Layout used to display the entry.
+ * The layout is useful to e.g. convert text positions to
+ * pixel positions, in combination with get_layout_offsets().
+ * The returned layout is owned by the entry so need not be
+ * freed by the caller.
+ *
+ * Keep in mind that the layout text may contain a preedit string, so
+ * layout_index_to_text_index() and
+ * text_index_to_layout_index() are needed to convert byte
+ * indices in the layout to byte indices in the entry contents.
+ * @return The Pango::Layout for this entry.
+ */
+ Glib::RefPtr<const Pango::Layout> get_layout() const;
+
+ /** Obtains the position of the Pango::Layout used to render text
+ * in the entry, in widget coordinates. Useful if you want to line
+ * up the text in an entry with some other text, e.g. when using the
+ * entry to implement editable cells in a sheet widget.
+ *
+ * Also useful to convert mouse events into coordinates inside the
+ * Pango::Layout, e.g. to take some action if some part of the entry text
+ * is clicked.
+ *
+ * Note that as the user scrolls around in the entry the offsets will
+ * change; you'll need to connect to the "notify::scroll-offset"
+ * signal to track this. Remember when using the Pango::Layout
+ * functions you need to convert to and from pixels using
+ * PANGO_PIXELS() or Pango::SCALE.
+ *
+ * Keep in mind that the layout text may contain a preedit string, so
+ * layout_index_to_text_index() and
+ * text_index_to_layout_index() are needed to convert byte
+ * indices in the layout to byte indices in the entry contents.
+ * @param x Location to store X offset of layout, or <tt>0</tt>.
+ * @param y Location to store Y offset of layout, or <tt>0</tt>.
+ */
+ void get_layout_offsets(int& x, int& y);
+
+
+ /** Converts from a position in the entry contents (returned
+ * by get_text()) to a position in the
+ * entry's Pango::Layout (returned by get_layout(),
+ * with text retrieved via pango_layout_get_text()).
+ * @param layout_index Byte index into the entry layout text.
+ * @return Byte index into the entry contents.
+ */
+ int layout_index_to_text_index(int layout_index) const;
+
+ /** Converts from a position in the entry's Pango::Layout (returned by
+ * get_layout()) to a position in the entry contents
+ * (returned by get_text()).
+ * @param text_index Byte index into the entry contents.
+ * @return Byte index into the entry layout text.
+ */
+ int text_index_to_layout_index(int text_index) const;
+
+
+ /** Sets the alignment for the contents of the entry. This controls
+ * the horizontal positioning of the contents when the displayed
+ * text is shorter than the width of the entry.
+ *
+ * Since: 2.4
+ * @param xalign The horizontal alignment, from 0 (left) to 1 (right).
+ * Reversed for RTL layouts.
+ */
+ void set_alignment(float xalign);
+
+ /** Sets the alignment for the contents of the entry. This controls
+ * the horizontal positioning of the contents when the displayed
+ * text is shorter than the width of the entry.
+ *
+ * Since: 2.4
+ * @param xalign The horizontal alignment, from 0 (left) to 1 (right).
+ * Reversed for RTL layouts.
+ */
+ void set_alignment(AlignmentEnum xalign);
+
+ /** Gets the value set by set_alignment().
+ * @return The alignment
+ *
+ * Since: 2.4.
+ */
+ float get_alignment() const;
+
+
+ /** Sets @a completion to be the auxiliary completion object to use with @a entry .
+ * All further configuration of the completion mechanism is done on
+ * @a completion using the Gtk::EntryCompletion API.
+ *
+ * Since: 2.4
+ * @param completion The Gtk::EntryCompletion.
+ */
+ void set_completion(const Glib::RefPtr<EntryCompletion>& completion);
+
+ /** Returns the auxiliary completion object currently in use by @a entry .
+ * @return The auxiliary completion object currently in use by @a entry .
+ *
+ * Since: 2.4.
+ */
+ Glib::RefPtr<EntryCompletion> get_completion();
+
+ /** Returns the auxiliary completion object currently in use by @a entry .
+ * @return The auxiliary completion object currently in use by @a entry .
+ *
+ * Since: 2.4.
+ */
+ Glib::RefPtr<const EntryCompletion> get_completion() const;
+
+ guint16 get_text_length() const;
+
+
+ Glib::SignalProxy1< void,Menu* > signal_populate_popup();
+
+
+ Glib::SignalProxy1< void,const Glib::ustring& > signal_insert_at_cursor();
+
+
+ //Key-binding signals:
+
+
+ Glib::SignalProxy0< void > signal_activate();
+ //TODO: ignore this too? It's used in an example.
+
+
+ /** The current position of the insertion cursor in chars.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_cursor_position() const;
+
+
+ /** The position of the opposite end of the selection from the cursor in chars.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_selection_bound() const;
+
+
+ /** Whether the entry contents can be edited.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_editable() ;
+
+/** Whether the entry contents can be edited.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_editable() const;
+
+ /** Maximum number of characters for this entry. Zero if no maximum.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_max_length() ;
+
+/** Maximum number of characters for this entry. Zero if no maximum.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_max_length() const;
+
+ /** FALSE displays the invisible char instead of the actual text (password mode).
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_visibility() ;
+
+/** FALSE displays the invisible char instead of the actual text (password mode).
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_visibility() const;
+
+ /** FALSE removes outside bevel from entry.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_has_frame() ;
+
+/** FALSE removes outside bevel from entry.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_has_frame() const;
+
+ /** The character to use when masking entry contents (in password mode).
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<gunichar> property_invisible_char() ;
+
+/** The character to use when masking entry contents (in password mode).
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<gunichar> property_invisible_char() const;
+
+ /** Whether to activate the default widget (such as the default button in a dialog) when Enter is pressed.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_activates_default() ;
+
+/** Whether to activate the default widget (such as the default button in a dialog) when Enter is pressed.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_activates_default() const;
+
+ /** Number of characters to leave space for in the entry.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_width_chars() ;
+
+/** Number of characters to leave space for in the entry.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_width_chars() const;
+
+ /** Number of pixels of the entry scrolled off the screen to the left.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_scroll_offset() const;
+
+
+ /** The contents of the entry.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_text() ;
+
+/** The contents of the entry.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_text() const;
+
+
+};
+
+} /* namespace Gtk */
+
+
+namespace Glib
+{
+ /** @relates Gtk::Entry
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::Entry* wrap(GtkEntry* object, bool take_copy = false);
+}
+#endif /* _GTKMM_ENTRY_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/entrycompletion.cc b/libs/gtkmm2/gtk/gtkmm/entrycompletion.cc
new file mode 100644
index 0000000000..4b7d15975d
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/entrycompletion.cc
@@ -0,0 +1,611 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/entrycompletion.h>
+#include <gtkmm/private/entrycompletion_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 2003 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/treeiter.h>
+#include <gtkmm/entry.h>
+#include <gtk/gtkentrycompletion.h>
+
+namespace //anonymous
+{
+
+// This Signal Proxy allows the C++ coder to specify
+// a sigc::slot instead of a static function.
+class SignalProxy_Match
+{
+public:
+ typedef Gtk::EntryCompletion::SlotMatch SlotType;
+
+ SignalProxy_Match(const SlotType& slot)
+ : slot_(slot) {}
+
+ ~SignalProxy_Match();
+
+ static gboolean gtk_callback(GtkEntryCompletion* completion, const gchar* key, GtkTreeIter* iter, gpointer user_data);
+ static void gtk_callback_destroy(void* data);
+
+private:
+ SlotType slot_;
+};
+
+SignalProxy_Match::~SignalProxy_Match()
+{}
+
+gboolean SignalProxy_Match::gtk_callback(GtkEntryCompletion* completion, const gchar* key, GtkTreeIter* iter, gpointer user_data)
+{
+ SignalProxy_Match *const self = static_cast<SignalProxy_Match*>(user_data);
+
+ try
+ {
+ GtkTreeModel* tree_model = gtk_entry_completion_get_model(completion);
+ return (self->slot_)(Glib::convert_const_gchar_ptr_to_ustring(key),
+ Gtk::TreeModel::const_iterator(tree_model, iter)
+ );
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+
+ return FALSE; //An arbitary default, just to avoid the compiler warning.
+}
+
+void SignalProxy_Match::gtk_callback_destroy(void* data)
+{
+ delete static_cast<SignalProxy_Match*>(data);
+}
+
+} // anonymous namespace
+
+
+namespace Gtk
+{
+
+void EntryCompletion::set_match_func(const SlotMatch& slot)
+{
+ // Create a signal proxy. A pointer to this will be passed
+ // through the callback's data parameter. It will be deleted
+ // when SignalProxy_Match::gtk_callback_destroy() is called.
+ SignalProxy_Match *const pSignalProxy = new SignalProxy_Match(slot);
+
+ gtk_entry_completion_set_match_func(gobj(),
+ &SignalProxy_Match::gtk_callback, pSignalProxy,
+ &SignalProxy_Match::gtk_callback_destroy);
+}
+
+void EntryCompletion::insert_action_text(const Glib::ustring& text, int index)
+{
+ gtk_entry_completion_insert_action_text(gobj(), index, text.c_str());
+}
+
+void EntryCompletion::insert_action_markup(const Glib::ustring& markup, int index)
+{
+ gtk_entry_completion_insert_action_markup(gobj(), index, markup.c_str());
+}
+
+void EntryCompletion::prepend_action_text(const Glib::ustring& text)
+{
+ //We know that gtk_entry_completion_insert_action_text() uses gtk_list_store_insert(),
+ //and we know that gtk_list_store_insert() prepends if the position is 0, though
+ //this is not actually documented.
+ gtk_entry_completion_insert_action_text(gobj(), 0, text.c_str());
+}
+
+void EntryCompletion::prepend_action_markup(const Glib::ustring& markup)
+{
+ //We know that gtk_entry_completion_insert_action_markup() uses gtk_list_store_insert(),
+ //and we know that gtk_list_store_insert() prepends if the position is 0, though
+ //this is not actually documented.
+ gtk_entry_completion_insert_action_markup(gobj(), 0 /* See C docs */, markup.c_str());
+}
+
+} //namespace Gtk
+
+
+namespace //anonymous
+{
+
+gboolean Widget_signal_match_selected_callback(GtkEntryCompletion* self, GtkTreeModel* c_model, GtkTreeIter* c_iter, void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< bool, const TreeModel::iterator& > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ {
+ //This conversion is the custom-written part:
+ Gtk::TreeModel::iterator cppIter(c_model, c_iter);
+
+ return static_cast<int>( (*static_cast<SlotType*>(slot))(cppIter) );
+ }
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Widget_signal_match_selected_notify_callback(GtkEntryCompletion* self, GtkTreeModel* c_model, GtkTreeIter* c_iter, void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void, const TreeModel::iterator& > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ {
+ //This conversion is the custom-written part:
+ Gtk::TreeModel::iterator cppIter(c_model, c_iter);
+
+ (*static_cast<SlotType*>(slot))(cppIter);
+ }
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+const Glib::SignalProxyInfo EntryCompletion_signal_match_selected_info =
+{
+ "match_selected",
+ (GCallback) &Widget_signal_match_selected_callback,
+ (GCallback) &Widget_signal_match_selected_notify_callback
+};
+
+} //anonymous namespace
+
+
+namespace Gtk
+{
+
+
+//Hand-coded signal wrapping:
+
+bool Gtk::EntryCompletion::on_match_selected(const TreeModel::iterator& iter)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->match_selected)
+ return (*base->match_selected)(gobj(), iter.get_model_gobject(), const_cast<GtkTreeIter*>(iter.gobj()));
+ else
+ {
+ typedef bool RType;
+ return RType(); //There should always be an implementation in the C object, so this will never happen.
+ }
+}
+
+gboolean EntryCompletion_Class::match_selected_callback_custom(GtkEntryCompletion* self, GtkTreeModel* c_model, GtkTreeIter* c_iter)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+
+ //This conversion is the custom-written part:
+ Gtk::TreeModel::iterator cppIter(c_model, c_iter);
+ return obj->on_match_selected(cppIter);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->match_selected)
+ return (*base->match_selected)(self, c_model, c_iter);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+Glib::SignalProxy1< bool, const TreeModel::iterator& > EntryCompletion::signal_match_selected()
+{
+ return Glib::SignalProxy1< bool, const TreeModel::iterator& >(this, &EntryCompletion_signal_match_selected_info);
+}
+
+
+} // namespace Gtk
+
+
+namespace
+{
+
+void EntryCompletion_signal_action_activated_callback(GtkEntryCompletion* self, gint p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,int > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(p0
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo EntryCompletion_signal_action_activated_info =
+{
+ "action_activated",
+ (GCallback) &EntryCompletion_signal_action_activated_callback,
+ (GCallback) &EntryCompletion_signal_action_activated_callback
+};
+
+
+gboolean EntryCompletion_signal_insert_prefix_callback(GtkEntryCompletion* self, const gchar* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< bool,const Glib::ustring& > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ return static_cast<int>((*static_cast<SlotType*>(slot))(Glib::convert_const_gchar_ptr_to_ustring(p0)
+));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean EntryCompletion_signal_insert_prefix_notify_callback(GtkEntryCompletion* self, const gchar* p0, void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,const Glib::ustring& > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::convert_const_gchar_ptr_to_ustring(p0)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+const Glib::SignalProxyInfo EntryCompletion_signal_insert_prefix_info =
+{
+ "insert_prefix",
+ (GCallback) &EntryCompletion_signal_insert_prefix_callback,
+ (GCallback) &EntryCompletion_signal_insert_prefix_notify_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Gtk::EntryCompletion> wrap(GtkEntryCompletion* object, bool take_copy)
+{
+ return Glib::RefPtr<Gtk::EntryCompletion>( dynamic_cast<Gtk::EntryCompletion*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} /* namespace Glib */
+
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& EntryCompletion_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &EntryCompletion_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_entry_completion_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void EntryCompletion_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->action_activated = &action_activated_callback;
+ klass->match_selected = &match_selected_callback_custom;
+ }
+
+
+void EntryCompletion_Class::action_activated_callback(GtkEntryCompletion* self, gint p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_action_activated(p0
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->action_activated)
+ (*base->action_activated)(self, p0);
+ }
+}
+
+
+Glib::ObjectBase* EntryCompletion_Class::wrap_new(GObject* object)
+{
+ return new EntryCompletion((GtkEntryCompletion*)object);
+}
+
+
+/* The implementation: */
+
+GtkEntryCompletion* EntryCompletion::gobj_copy()
+{
+ reference();
+ return gobj();
+}
+
+EntryCompletion::EntryCompletion(const Glib::ConstructParams& construct_params)
+:
+ Glib::Object(construct_params)
+{}
+
+EntryCompletion::EntryCompletion(GtkEntryCompletion* castitem)
+:
+ Glib::Object((GObject*)(castitem))
+{}
+
+EntryCompletion::~EntryCompletion()
+{}
+
+
+EntryCompletion::CppClassType EntryCompletion::entrycompletion_class_; // initialize static member
+
+GType EntryCompletion::get_type()
+{
+ return entrycompletion_class_.init().get_type();
+}
+
+GType EntryCompletion::get_base_type()
+{
+ return gtk_entry_completion_get_type();
+}
+
+
+EntryCompletion::EntryCompletion()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Glib::Object(Glib::ConstructParams(entrycompletion_class_.init()))
+{
+ }
+
+Glib::RefPtr<EntryCompletion> EntryCompletion::create()
+{
+ return Glib::RefPtr<EntryCompletion>( new EntryCompletion() );
+}
+Entry* EntryCompletion::get_entry()
+{
+ return Glib::wrap((GtkEntry*)(gtk_entry_completion_get_entry(gobj())));
+}
+
+const Entry* EntryCompletion::get_entry() const
+{
+ return Glib::wrap((GtkEntry*)(gtk_entry_completion_get_entry(const_cast<GtkEntryCompletion*>(gobj()))));
+}
+
+void EntryCompletion::set_model(const Glib::RefPtr<TreeModel>& model)
+{
+ gtk_entry_completion_set_model(gobj(), Glib::unwrap(model));
+}
+
+Glib::RefPtr<TreeModel> EntryCompletion::get_model()
+{
+
+ Glib::RefPtr<TreeModel> retvalue = Glib::wrap(gtk_entry_completion_get_model(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const TreeModel> EntryCompletion::get_model() const
+{
+
+ Glib::RefPtr<const TreeModel> retvalue = Glib::wrap(gtk_entry_completion_get_model(const_cast<GtkEntryCompletion*>(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+void EntryCompletion::set_minimum_key_length(int length)
+{
+ gtk_entry_completion_set_minimum_key_length(gobj(), length);
+}
+
+int EntryCompletion::get_minimum_key_length() const
+{
+ return gtk_entry_completion_get_minimum_key_length(const_cast<GtkEntryCompletion*>(gobj()));
+}
+
+void EntryCompletion::complete()
+{
+ gtk_entry_completion_complete(gobj());
+}
+
+void EntryCompletion::insert_prefix()
+{
+ gtk_entry_completion_insert_prefix(gobj());
+}
+
+void EntryCompletion::delete_action(int index)
+{
+ gtk_entry_completion_delete_action(gobj(), index);
+}
+
+void EntryCompletion::set_inline_completion(bool inline_completion)
+{
+ gtk_entry_completion_set_inline_completion(gobj(), static_cast<int>(inline_completion));
+}
+
+bool EntryCompletion::get_inline_completion() const
+{
+ return gtk_entry_completion_get_inline_completion(const_cast<GtkEntryCompletion*>(gobj()));
+}
+
+void EntryCompletion::set_popup_completion(bool popup_completion)
+{
+ gtk_entry_completion_set_popup_completion(gobj(), static_cast<int>(popup_completion));
+}
+
+bool EntryCompletion::get_popup_completion() const
+{
+ return gtk_entry_completion_get_popup_completion(const_cast<GtkEntryCompletion*>(gobj()));
+}
+
+void EntryCompletion::set_text_column(const TreeModelColumnBase& column)
+{
+ gtk_entry_completion_set_text_column(gobj(), (column).index());
+}
+
+void EntryCompletion::set_text_column(int column)
+{
+ gtk_entry_completion_set_text_column(gobj(), column);
+}
+
+int EntryCompletion::get_text_column()
+{
+ return gtk_entry_completion_get_text_column(gobj());
+}
+
+
+Glib::SignalProxy1< void,int > EntryCompletion::signal_action_activated()
+{
+ return Glib::SignalProxy1< void,int >(this, &EntryCompletion_signal_action_activated_info);
+}
+
+Glib::SignalProxy1< bool,const Glib::ustring& > EntryCompletion::signal_insert_prefix()
+{
+ return Glib::SignalProxy1< bool,const Glib::ustring& >(this, &EntryCompletion_signal_insert_prefix_info);
+}
+
+
+void Gtk::EntryCompletion::on_action_activated(int index)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->action_activated)
+ (*base->action_activated)(gobj(),index);
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/entrycompletion.h b/libs/gtkmm2/gtk/gtkmm/entrycompletion.h
new file mode 100644
index 0000000000..2d8e0c5bd0
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/entrycompletion.h
@@ -0,0 +1,323 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_ENTRYCOMPLETION_H
+#define _GTKMM_ENTRYCOMPLETION_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 2003 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/widget.h>
+#include <gtkmm/treemodel.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkEntryCompletion GtkEntryCompletion;
+typedef struct _GtkEntryCompletionClass GtkEntryCompletionClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class EntryCompletion_Class; } // namespace Gtk
+namespace Gtk
+{
+
+class Entry;
+
+
+class EntryCompletion : public Glib::Object
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef EntryCompletion CppObjectType;
+ typedef EntryCompletion_Class CppClassType;
+ typedef GtkEntryCompletion BaseObjectType;
+ typedef GtkEntryCompletionClass BaseClassType;
+
+private: friend class EntryCompletion_Class;
+ static CppClassType entrycompletion_class_;
+
+private:
+ // noncopyable
+ EntryCompletion(const EntryCompletion&);
+ EntryCompletion& operator=(const EntryCompletion&);
+
+protected:
+ explicit EntryCompletion(const Glib::ConstructParams& construct_params);
+ explicit EntryCompletion(GtkEntryCompletion* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~EntryCompletion();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ GtkEntryCompletion* gobj() { return reinterpret_cast<GtkEntryCompletion*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const GtkEntryCompletion* gobj() const { return reinterpret_cast<GtkEntryCompletion*>(gobject_); }
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ GtkEntryCompletion* gobj_copy();
+
+private:
+
+
+protected:
+ EntryCompletion();
+
+public:
+
+ static Glib::RefPtr<EntryCompletion> create();
+
+
+ //Careful, this actually returns a GtkWidget*, so it might not always be a GtkEntry in future GTK+ versions.
+
+ /** Gets the entry @a completion has been attached to.
+ * @return The entry @a completion has been attached to.
+ *
+ * Since: 2.4.
+ */
+ Entry* get_entry();
+
+ /** Gets the entry @a completion has been attached to.
+ * @return The entry @a completion has been attached to.
+ *
+ * Since: 2.4.
+ */
+ const Entry* get_entry() const;
+
+
+ /** Sets the model for a Gtk::EntryCompletion. If @a completion already has
+ * a model set, it will remove it before setting the new model.
+ * If model is <tt>0</tt>, then it will unset the model.
+ *
+ * Since: 2.4
+ * @param model The Gtk::TreeModel.
+ */
+ void set_model(const Glib::RefPtr<TreeModel>& model);
+
+ /** Returns the model the Gtk::EntryCompletion is using as data source.
+ * Returns <tt>0</tt> if the model is unset.
+ * @return A Gtk::TreeModel, or <tt>0</tt> if none is currently being used.
+ *
+ * Since: 2.4.
+ */
+ Glib::RefPtr<TreeModel> get_model();
+
+ /** Returns the model the Gtk::EntryCompletion is using as data source.
+ * Returns <tt>0</tt> if the model is unset.
+ * @return A Gtk::TreeModel, or <tt>0</tt> if none is currently being used.
+ *
+ * Since: 2.4.
+ */
+ Glib::RefPtr<const TreeModel> get_model() const;
+
+ /// For example, bool on_match(const Glib::ustring& key, const TreeModel::const_iterator& iter);
+ typedef sigc::slot<bool, const Glib::ustring&, const TreeModel::const_iterator&> SlotMatch;
+
+ void set_match_func(const SlotMatch& slot);
+
+
+ /** Requires the length of the search key for @a completion to be at least
+ * @a length . This is useful for long lists, where completing using a small
+ * key takes a lot of time and will come up with meaningless results anyway
+ * (ie, a too large dataset).
+ *
+ * Since: 2.4
+ * @param length The minimum length of the key in order to start completing.
+ */
+ void set_minimum_key_length(int length);
+
+ /** Returns the minimum key length as set for @a completion .
+ * @return The currently used minimum key length.
+ *
+ * Since: 2.4.
+ */
+ int get_minimum_key_length() const;
+
+ /** Requests a completion operation, or in other words a refiltering of the
+ * current list with completions, using the current key. The completion list
+ * view will be updated accordingly.
+ *
+ * Since: 2.4
+ */
+ void complete();
+
+
+ /** Requests a prefix insertion.
+ *
+ * Since: 2.6
+ */
+ void insert_prefix();
+
+ //We reordered the parameters, compared to the C version, so that we can have method overloads without the index.
+
+ // TODO: We would really like an insert() which before-inserts an iterator, like ListStore::insert(),
+ // but there is no EntryCompletion::insert_before() for us to use.
+ void insert_action_text(const Glib::ustring& text, int index);
+ void prepend_action_text(const Glib::ustring& text);
+ //TODO: Add append_action_text() somehow? It would be slow if we count the children each time. murrayc.
+
+ void insert_action_markup(const Glib::ustring& markup, int index);
+ void prepend_action_markup(const Glib::ustring& markup);
+
+
+ //TODO: Change default - it would be nicer to delete the last action instead of the first.
+
+ /** Deletes the action at @a index from @a completion 's action list.
+ *
+ * Since: 2.4
+ * @param index The index of the item to Delete.
+ */
+ void delete_action(int index = 0);
+
+
+ /** Sets whether the common prefix of the possible completions should
+ * be automatically inserted in the entry.
+ *
+ * Since: 2.6
+ * @param inline_completion <tt>true</tt> to do inline completion.
+ */
+ void set_inline_completion(bool inline_completion = true);
+
+ /** Returns whether the common prefix of the possible completions should
+ * be automatically inserted in the entry.
+ * @return <tt>true</tt> if inline completion is turned on
+ *
+ * Since: 2.6.
+ */
+ bool get_inline_completion() const;
+
+ /** Sets whether the completions should be presented in a popup window.
+ *
+ * Since: 2.6
+ * @param popup_completion <tt>true</tt> to do popup completion.
+ */
+ void set_popup_completion(bool popup_completion = true);
+
+ /** Returns whether the completions should be presented in a popup window.
+ * @return <tt>true</tt> if popup completion is turned on
+ *
+ * Since: 2.6.
+ */
+ bool get_popup_completion() const;
+
+
+ /** Convenience function for setting up the most used case of this code: a
+ * completion list with just strings. This function will set up @a completion
+ * to have a list displaying all (and just) strings in the completion list,
+ * and to get those strings from @a column in the model of @a completion .
+ *
+ * This functions creates and adds a Gtk::CellRendererText for the selected
+ * column. If you need to set the text column, but don't want the cell
+ * renderer, use Glib::object_set() to set the ::text_column property directly.
+ *
+ * Since: 2.4
+ * @param column The column in the model of @a completion to get strings from.
+ */
+ void set_text_column(const TreeModelColumnBase& column);
+
+ /** Convenience function for setting up the most used case of this code: a
+ * completion list with just strings. This function will set up @a completion
+ * to have a list displaying all (and just) strings in the completion list,
+ * and to get those strings from @a column in the model of @a completion .
+ *
+ * This functions creates and adds a Gtk::CellRendererText for the selected
+ * column. If you need to set the text column, but don't want the cell
+ * renderer, use Glib::object_set() to set the ::text_column property directly.
+ *
+ * Since: 2.4
+ * @param column The column in the model of @a completion to get strings from.
+ */
+ void set_text_column(int column);
+
+ /** Returns the column in the model of @a completion to get strings from.
+ * @return The column containing the strings
+ *
+ * Since: 2.6.
+ */
+ int get_text_column();
+
+
+ Glib::SignalProxy1< void,int > signal_action_activated();
+
+
+ //We completely hand-code this signal because we want to change how the parameters are wrapped,
+ //because we need both the iter and the model to make the C++ iter.
+
+
+ /**
+ * @par Prototype:
+ * <tt>bool %match_selected(const TreeModel::iterator& iter)</tt>
+ */
+ Glib::SignalProxy1< bool, const TreeModel::iterator& > signal_match_selected();
+
+
+ //We use no_default_handler for this, because we can not add a new vfunc to 2.5 without breaking ABI.
+ //TODO: Remove no_default_handler when we do an ABI-break-with-parallel-install.
+
+
+ Glib::SignalProxy1< bool,const Glib::ustring& > signal_insert_prefix();
+
+
+protected:
+
+ //Default Signal Handler:
+ virtual bool on_match_selected(const TreeModel::iterator& iter);
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_action_activated(int index);
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::EntryCompletion
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Gtk::EntryCompletion> wrap(GtkEntryCompletion* object, bool take_copy = false);
+}
+
+
+#endif /* _GTKMM_ENTRYCOMPLETION_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/enums.cc b/libs/gtkmm2/gtk/gtkmm/enums.cc
new file mode 100644
index 0000000000..a20f39360f
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/enums.cc
@@ -0,0 +1,283 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/enums.h>
+#include <gtkmm/private/enums_p.h>
+
+#include <gtk/gtktypebuiltins.h>
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/enums.h>
+
+// static
+GType Glib::Value<Gtk::IconSize>::value_type()
+{
+ return gtk_icon_size_get_type();
+}
+
+namespace Gtk
+{
+
+float _gtkmm_align_float_from_enum(AlignmentEnum value)
+{
+ //Choose the float alignment value appropriate for this human-readable enum value:
+ switch(value)
+ {
+ case ALIGN_LEFT:
+ return 0.0; break;
+ case ALIGN_CENTER:
+ return 0.5; break;
+ case ALIGN_RIGHT:
+ return 1.0; break;
+ case ALIGN_TOP:
+ return _gtkmm_align_float_from_enum(ALIGN_LEFT); break;
+ case ALIGN_BOTTOM:
+ return _gtkmm_align_float_from_enum(ALIGN_RIGHT); break;
+ default:
+ return _gtkmm_align_float_from_enum(ALIGN_LEFT); break;
+ }
+}
+
+} //namespace Gtk
+
+
+namespace
+{
+} // anonymous namespace
+
+// static
+GType Glib::Value<Gtk::AccelFlags>::value_type()
+{
+ return gtk_accel_flags_get_type();
+}
+
+// static
+GType Glib::Value<Gtk::AnchorType>::value_type()
+{
+ return gtk_anchor_type_get_type();
+}
+
+// static
+GType Glib::Value<Gtk::ArrowType>::value_type()
+{
+ return gtk_arrow_type_get_type();
+}
+
+// static
+GType Glib::Value<Gtk::AttachOptions>::value_type()
+{
+ return gtk_attach_options_get_type();
+}
+
+// static
+GType Glib::Value<Gtk::ButtonBoxStyle>::value_type()
+{
+ return gtk_button_box_style_get_type();
+}
+
+// static
+GType Glib::Value<Gtk::CurveType>::value_type()
+{
+ return gtk_curve_type_get_type();
+}
+
+// static
+GType Glib::Value<Gtk::DeleteType>::value_type()
+{
+ return gtk_delete_type_get_type();
+}
+
+// static
+GType Glib::Value<Gtk::DirectionType>::value_type()
+{
+ return gtk_direction_type_get_type();
+}
+
+// static
+GType Glib::Value<Gtk::ExpanderStyle>::value_type()
+{
+ return gtk_expander_style_get_type();
+}
+
+// static
+GType Glib::Value<Gtk::BuiltinIconSize>::value_type()
+{
+ return gtk_icon_size_get_type();
+}
+
+// static
+GType Glib::Value<Gtk::TextDirection>::value_type()
+{
+ return gtk_text_direction_get_type();
+}
+
+// static
+GType Glib::Value<Gtk::Justification>::value_type()
+{
+ return gtk_justification_get_type();
+}
+
+// static
+GType Glib::Value<Gtk::MenuDirectionType>::value_type()
+{
+ return gtk_menu_direction_type_get_type();
+}
+
+// static
+GType Glib::Value<Gtk::MetricType>::value_type()
+{
+ return gtk_metric_type_get_type();
+}
+
+// static
+GType Glib::Value<Gtk::MovementStep>::value_type()
+{
+ return gtk_movement_step_get_type();
+}
+
+// static
+GType Glib::Value<Gtk::Orientation>::value_type()
+{
+ return gtk_orientation_get_type();
+}
+
+// static
+GType Glib::Value<Gtk::CornerType>::value_type()
+{
+ return gtk_corner_type_get_type();
+}
+
+// static
+GType Glib::Value<Gtk::PackType>::value_type()
+{
+ return gtk_pack_type_get_type();
+}
+
+// static
+GType Glib::Value<Gtk::PathPriorityType>::value_type()
+{
+ return gtk_path_priority_type_get_type();
+}
+
+// static
+GType Glib::Value<Gtk::PathType>::value_type()
+{
+ return gtk_path_type_get_type();
+}
+
+// static
+GType Glib::Value<Gtk::PolicyType>::value_type()
+{
+ return gtk_policy_type_get_type();
+}
+
+// static
+GType Glib::Value<Gtk::PositionType>::value_type()
+{
+ return gtk_position_type_get_type();
+}
+
+// static
+GType Glib::Value<Gtk::ReliefStyle>::value_type()
+{
+ return gtk_relief_style_get_type();
+}
+
+// static
+GType Glib::Value<Gtk::ResizeMode>::value_type()
+{
+ return gtk_resize_mode_get_type();
+}
+
+// static
+GType Glib::Value<Gtk::ScrollType>::value_type()
+{
+ return gtk_scroll_type_get_type();
+}
+
+// static
+GType Glib::Value<Gtk::SelectionMode>::value_type()
+{
+ return gtk_selection_mode_get_type();
+}
+
+// static
+GType Glib::Value<Gtk::ShadowType>::value_type()
+{
+ return gtk_shadow_type_get_type();
+}
+
+// static
+GType Glib::Value<Gtk::StateType>::value_type()
+{
+ return gtk_state_type_get_type();
+}
+
+// static
+GType Glib::Value<Gtk::TargetFlags>::value_type()
+{
+ return gtk_target_flags_get_type();
+}
+
+// static
+GType Glib::Value<Gtk::ToolbarStyle>::value_type()
+{
+ return gtk_toolbar_style_get_type();
+}
+
+// static
+GType Glib::Value<Gtk::UpdateType>::value_type()
+{
+ return gtk_update_type_get_type();
+}
+
+// static
+GType Glib::Value<Gtk::Visibility>::value_type()
+{
+ return gtk_visibility_get_type();
+}
+
+// static
+GType Glib::Value<Gtk::WindowPosition>::value_type()
+{
+ return gtk_window_position_get_type();
+}
+
+// static
+GType Glib::Value<Gtk::WindowType>::value_type()
+{
+ return gtk_window_type_get_type();
+}
+
+// static
+GType Glib::Value<Gtk::WrapMode>::value_type()
+{
+ return gtk_wrap_mode_get_type();
+}
+
+// static
+GType Glib::Value<Gtk::SortType>::value_type()
+{
+ return gtk_sort_type_get_type();
+}
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/enums.h b/libs/gtkmm2/gtk/gtkmm/enums.h
new file mode 100644
index 0000000000..07d0830d40
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/enums.h
@@ -0,0 +1,1422 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_ENUMS_H
+#define _GTKMM_ENUMS_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* enums.h
+ *
+ * Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+namespace Gtk
+{
+
+
+/** @addtogroup gtkmmEnums Enums and Flags */
+
+/**
+ * @ingroup gtkmmEnums
+ * @par Bitwise operators:
+ * <tt>%AccelFlags operator|(AccelFlags, AccelFlags)</tt><br>
+ * <tt>%AccelFlags operator&(AccelFlags, AccelFlags)</tt><br>
+ * <tt>%AccelFlags operator^(AccelFlags, AccelFlags)</tt><br>
+ * <tt>%AccelFlags operator~(AccelFlags)</tt><br>
+ * <tt>%AccelFlags& operator|=(AccelFlags&, AccelFlags)</tt><br>
+ * <tt>%AccelFlags& operator&=(AccelFlags&, AccelFlags)</tt><br>
+ * <tt>%AccelFlags& operator^=(AccelFlags&, AccelFlags)</tt><br>
+ */
+enum AccelFlags
+{
+ ACCEL_VISIBLE = 1 << 0,
+ ACCEL_LOCKED = 1 << 1,
+ ACCEL_MASK = 0x07
+};
+
+/** @ingroup gtkmmEnums */
+inline AccelFlags operator|(AccelFlags lhs, AccelFlags rhs)
+ { return static_cast<AccelFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
+
+/** @ingroup gtkmmEnums */
+inline AccelFlags operator&(AccelFlags lhs, AccelFlags rhs)
+ { return static_cast<AccelFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
+
+/** @ingroup gtkmmEnums */
+inline AccelFlags operator^(AccelFlags lhs, AccelFlags rhs)
+ { return static_cast<AccelFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
+
+/** @ingroup gtkmmEnums */
+inline AccelFlags operator~(AccelFlags flags)
+ { return static_cast<AccelFlags>(~static_cast<unsigned>(flags)); }
+
+/** @ingroup gtkmmEnums */
+inline AccelFlags& operator|=(AccelFlags& lhs, AccelFlags rhs)
+ { return (lhs = static_cast<AccelFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
+
+/** @ingroup gtkmmEnums */
+inline AccelFlags& operator&=(AccelFlags& lhs, AccelFlags rhs)
+ { return (lhs = static_cast<AccelFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
+
+/** @ingroup gtkmmEnums */
+inline AccelFlags& operator^=(AccelFlags& lhs, AccelFlags rhs)
+ { return (lhs = static_cast<AccelFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::AccelFlags> : public Glib::Value_Flags<Gtk::AccelFlags>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+/**
+ * @ingroup gtkmmEnums
+ */
+enum AnchorType
+{
+ ANCHOR_CENTER,
+ ANCHOR_NORTH,
+ ANCHOR_NORTH_WEST,
+ ANCHOR_NORTH_EAST,
+ ANCHOR_SOUTH,
+ ANCHOR_SOUTH_WEST,
+ ANCHOR_SOUTH_EAST,
+ ANCHOR_WEST,
+ ANCHOR_EAST,
+ ANCHOR_N = ANCHOR_NORTH,
+ ANCHOR_NW = ANCHOR_NORTH_WEST,
+ ANCHOR_NE = ANCHOR_NORTH_EAST,
+ ANCHOR_S = ANCHOR_SOUTH,
+ ANCHOR_SW = ANCHOR_SOUTH_WEST,
+ ANCHOR_SE = ANCHOR_SOUTH_EAST,
+ ANCHOR_W = ANCHOR_WEST,
+ ANCHOR_E = ANCHOR_EAST
+};
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::AnchorType> : public Glib::Value_Enum<Gtk::AnchorType>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+
+/** Used to indicate the direction in which a Gtk::Arrow should point.
+ * @ingroup gtkmmEnums
+ */
+enum ArrowType
+{
+ ARROW_UP,
+ ARROW_DOWN,
+ ARROW_LEFT,
+ ARROW_RIGHT
+};
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::ArrowType> : public Glib::Value_Enum<Gtk::ArrowType>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+
+// TODO: There must be a better way to document the enum values.
+// Extract them from the GTK+ docs as well?
+
+/*! @var ArrowType ARROW_UP
+ * Represents an upward pointing arrow.
+ */
+/*! @var ArrowType ARROW_DOWN
+ * Represents a downward pointing arrow.
+ */
+/*! @var ArrowType ARROW_LEFT
+ * Represents a left pointing arrow.
+ */
+/*! @var ArrowType ARROW_RIGHT
+ * Represents a right pointing arrow.
+ */
+
+/** Denotes the expansion properties that a widget will have when it (or its parent) is resized.
+ * @ingroup gtkmmEnums
+ * @par Bitwise operators:
+ * <tt>%AttachOptions operator|(AttachOptions, AttachOptions)</tt><br>
+ * <tt>%AttachOptions operator&(AttachOptions, AttachOptions)</tt><br>
+ * <tt>%AttachOptions operator^(AttachOptions, AttachOptions)</tt><br>
+ * <tt>%AttachOptions operator~(AttachOptions)</tt><br>
+ * <tt>%AttachOptions& operator|=(AttachOptions&, AttachOptions)</tt><br>
+ * <tt>%AttachOptions& operator&=(AttachOptions&, AttachOptions)</tt><br>
+ * <tt>%AttachOptions& operator^=(AttachOptions&, AttachOptions)</tt><br>
+ */
+enum AttachOptions
+{
+ EXPAND = 1 << 0,
+ SHRINK = 1 << 1,
+ FILL = 1 << 2
+};
+
+/** @ingroup gtkmmEnums */
+inline AttachOptions operator|(AttachOptions lhs, AttachOptions rhs)
+ { return static_cast<AttachOptions>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
+
+/** @ingroup gtkmmEnums */
+inline AttachOptions operator&(AttachOptions lhs, AttachOptions rhs)
+ { return static_cast<AttachOptions>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
+
+/** @ingroup gtkmmEnums */
+inline AttachOptions operator^(AttachOptions lhs, AttachOptions rhs)
+ { return static_cast<AttachOptions>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
+
+/** @ingroup gtkmmEnums */
+inline AttachOptions operator~(AttachOptions flags)
+ { return static_cast<AttachOptions>(~static_cast<unsigned>(flags)); }
+
+/** @ingroup gtkmmEnums */
+inline AttachOptions& operator|=(AttachOptions& lhs, AttachOptions rhs)
+ { return (lhs = static_cast<AttachOptions>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
+
+/** @ingroup gtkmmEnums */
+inline AttachOptions& operator&=(AttachOptions& lhs, AttachOptions rhs)
+ { return (lhs = static_cast<AttachOptions>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
+
+/** @ingroup gtkmmEnums */
+inline AttachOptions& operator^=(AttachOptions& lhs, AttachOptions rhs)
+ { return (lhs = static_cast<AttachOptions>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::AttachOptions> : public Glib::Value_Flags<Gtk::AttachOptions>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+
+/*! @var AttachOptions EXPAND
+ * The widget should expand to take up any extra space in its container that has been allocated.
+ */
+/*! @var AttachOptions SHRINK
+ * The widget should shrink as and when possible.
+ */
+/*! @var AttachOptions FILL
+ * The widget should fill the space allocated to it.
+ */
+
+/**
+ * @ingroup gtkmmEnums
+ */
+enum ButtonBoxStyle
+{
+ BUTTONBOX_DEFAULT_STYLE,
+ BUTTONBOX_SPREAD,
+ BUTTONBOX_EDGE,
+ BUTTONBOX_START,
+ BUTTONBOX_END
+};
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::ButtonBoxStyle> : public Glib::Value_Enum<Gtk::ButtonBoxStyle>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+/**
+ * @ingroup gtkmmEnums
+ */
+enum CurveType
+{
+ CURVE_TYPE_LINEAR,
+ CURVE_TYPE_SPLINE,
+ CURVE_TYPE_FREE
+};
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::CurveType> : public Glib::Value_Enum<Gtk::CurveType>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+/**
+ * @ingroup gtkmmEnums
+ */
+enum DeleteType
+{
+ DELETE_CHARS,
+ DELETE_WORDS,
+ DELETE_DISPLAY_LINES,
+ DELETE_DISPLAY_LINE_ENDS,
+ DELETE_PARAGRAPH_ENDS,
+ DELETE_PARAGRAPHS,
+ DELETE_WHITESPACE
+};
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::DeleteType> : public Glib::Value_Enum<Gtk::DeleteType>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+/**
+ * @ingroup gtkmmEnums
+ */
+enum DirectionType
+{
+ DIR_TAB_FORWARD,
+ DIR_TAB_BACKWARD,
+ DIR_UP,
+ DIR_DOWN,
+ DIR_LEFT,
+ DIR_RIGHT
+};
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::DirectionType> : public Glib::Value_Enum<Gtk::DirectionType>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+/**
+ * @ingroup gtkmmEnums
+ */
+enum ExpanderStyle
+{
+ EXPANDER_COLLAPSED,
+ EXPANDER_SEMI_COLLAPSED,
+ EXPANDER_SEMI_EXPANDED,
+ EXPANDER_EXPANDED
+};
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::ExpanderStyle> : public Glib::Value_Enum<Gtk::ExpanderStyle>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+/**
+ * @ingroup gtkmmEnums
+ */
+enum BuiltinIconSize
+{
+ ICON_SIZE_INVALID,
+ ICON_SIZE_MENU,
+ ICON_SIZE_SMALL_TOOLBAR,
+ ICON_SIZE_LARGE_TOOLBAR,
+ ICON_SIZE_BUTTON,
+ ICON_SIZE_DND,
+ ICON_SIZE_DIALOG
+};
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::BuiltinIconSize> : public Glib::Value_Enum<Gtk::BuiltinIconSize>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+/**
+ * @ingroup gtkmmEnums
+ */
+enum TextDirection
+{
+ TEXT_DIR_NONE,
+ TEXT_DIR_LTR,
+ TEXT_DIR_RTL
+};
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::TextDirection> : public Glib::Value_Enum<Gtk::TextDirection>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+/**
+ * @ingroup gtkmmEnums
+ */
+enum Justification
+{
+ JUSTIFY_LEFT,
+ JUSTIFY_RIGHT,
+ JUSTIFY_CENTER,
+ JUSTIFY_FILL
+};
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::Justification> : public Glib::Value_Enum<Gtk::Justification>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+/**
+ * @ingroup gtkmmEnums
+ */
+enum MenuDirectionType
+{
+ MENU_DIR_PARENT,
+ MENU_DIR_CHILD,
+ MENU_DIR_NEXT,
+ MENU_DIR_PREV
+};
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::MenuDirectionType> : public Glib::Value_Enum<Gtk::MenuDirectionType>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+/**
+ * @ingroup gtkmmEnums
+ */
+enum MetricType
+{
+ PIXELS,
+ INCHES,
+ CENTIMETERS
+};
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::MetricType> : public Glib::Value_Enum<Gtk::MetricType>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+/**
+ * @ingroup gtkmmEnums
+ */
+enum MovementStep
+{
+ MOVEMENT_LOGICAL_POSITIONS,
+ MOVEMENT_VISUAL_POSITIONS,
+ MOVEMENT_WORDS,
+ MOVEMENT_DISPLAY_LINES,
+ MOVEMENT_DISPLAY_LINE_ENDS,
+ MOVEMENT_PARAGRAPHS,
+ MOVEMENT_PARAGRAPH_ENDS,
+ MOVEMENT_PAGES,
+ MOVEMENT_BUFFER_ENDS,
+ MOVEMENT_HORIZONTAL_PAGES
+};
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::MovementStep> : public Glib::Value_Enum<Gtk::MovementStep>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+/**
+ * @ingroup gtkmmEnums
+ */
+enum Orientation
+{
+ ORIENTATION_HORIZONTAL,
+ ORIENTATION_VERTICAL
+};
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::Orientation> : public Glib::Value_Enum<Gtk::Orientation>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+/**
+ * @ingroup gtkmmEnums
+ */
+enum CornerType
+{
+ CORNER_TOP_LEFT,
+ CORNER_BOTTOM_LEFT,
+ CORNER_TOP_RIGHT,
+ CORNER_BOTTOM_RIGHT
+};
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::CornerType> : public Glib::Value_Enum<Gtk::CornerType>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+/**
+ * @ingroup gtkmmEnums
+ */
+enum PackType
+{
+ PACK_START,
+ PACK_END
+};
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::PackType> : public Glib::Value_Enum<Gtk::PackType>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+/**
+ * @ingroup gtkmmEnums
+ */
+enum PathPriorityType
+{
+ PATH_PRIO_LOWEST = 0,
+ PATH_PRIO_GTK = 4,
+ PATH_PRIO_APPLICATION = 8,
+ PATH_PRIO_THEME = 10,
+ PATH_PRIO_RC = 12,
+ PATH_PRIO_HIGHEST = 15
+};
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::PathPriorityType> : public Glib::Value_Enum<Gtk::PathPriorityType>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+/**
+ * @ingroup gtkmmEnums
+ */
+enum PathType
+{
+ PATH_WIDGET,
+ PATH_WIDGET_CLASS,
+ PATH_CLASS
+};
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::PathType> : public Glib::Value_Enum<Gtk::PathType>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+/**
+ * @ingroup gtkmmEnums
+ */
+enum PolicyType
+{
+ POLICY_ALWAYS,
+ POLICY_AUTOMATIC,
+ POLICY_NEVER
+};
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::PolicyType> : public Glib::Value_Enum<Gtk::PolicyType>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+/**
+ * @ingroup gtkmmEnums
+ */
+enum PositionType
+{
+ POS_LEFT,
+ POS_RIGHT,
+ POS_TOP,
+ POS_BOTTOM
+};
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::PositionType> : public Glib::Value_Enum<Gtk::PositionType>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+/**
+ * @ingroup gtkmmEnums
+ */
+enum ReliefStyle
+{
+ RELIEF_NORMAL,
+ RELIEF_HALF,
+ RELIEF_NONE
+};
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::ReliefStyle> : public Glib::Value_Enum<Gtk::ReliefStyle>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+/**
+ * @ingroup gtkmmEnums
+ */
+enum ResizeMode
+{
+ RESIZE_PARENT,
+ RESIZE_QUEUE,
+ RESIZE_IMMEDIATE
+};
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::ResizeMode> : public Glib::Value_Enum<Gtk::ResizeMode>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+/**
+ * @ingroup gtkmmEnums
+ */
+enum ScrollType
+{
+ SCROLL_NONE,
+ SCROLL_JUMP,
+ SCROLL_STEP_BACKWARD,
+ SCROLL_STEP_FORWARD,
+ SCROLL_PAGE_BACKWARD,
+ SCROLL_PAGE_FORWARD,
+ SCROLL_STEP_UP,
+ SCROLL_STEP_DOWN,
+ SCROLL_PAGE_UP,
+ SCROLL_PAGE_DOWN,
+ SCROLL_STEP_LEFT,
+ SCROLL_STEP_RIGHT,
+ SCROLL_PAGE_LEFT,
+ SCROLL_PAGE_RIGHT,
+ SCROLL_START,
+ SCROLL_END
+};
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::ScrollType> : public Glib::Value_Enum<Gtk::ScrollType>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+/**
+ * @ingroup gtkmmEnums
+ */
+enum SelectionMode
+{
+ SELECTION_NONE,
+ SELECTION_SINGLE,
+ SELECTION_BROWSE,
+ SELECTION_MULTIPLE,
+ SELECTION_EXTENDED = SELECTION_MULTIPLE
+};
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::SelectionMode> : public Glib::Value_Enum<Gtk::SelectionMode>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+/**
+ * @ingroup gtkmmEnums
+ */
+enum ShadowType
+{
+ SHADOW_NONE,
+ SHADOW_IN,
+ SHADOW_OUT,
+ SHADOW_ETCHED_IN,
+ SHADOW_ETCHED_OUT
+};
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::ShadowType> : public Glib::Value_Enum<Gtk::ShadowType>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+/**
+ * @ingroup gtkmmEnums
+ */
+enum StateType
+{
+ STATE_NORMAL,
+ STATE_ACTIVE,
+ STATE_PRELIGHT,
+ STATE_SELECTED,
+ STATE_INSENSITIVE
+};
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::StateType> : public Glib::Value_Enum<Gtk::StateType>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+/**
+ * @ingroup gtkmmEnums
+ * @par Bitwise operators:
+ * <tt>%TargetFlags operator|(TargetFlags, TargetFlags)</tt><br>
+ * <tt>%TargetFlags operator&(TargetFlags, TargetFlags)</tt><br>
+ * <tt>%TargetFlags operator^(TargetFlags, TargetFlags)</tt><br>
+ * <tt>%TargetFlags operator~(TargetFlags)</tt><br>
+ * <tt>%TargetFlags& operator|=(TargetFlags&, TargetFlags)</tt><br>
+ * <tt>%TargetFlags& operator&=(TargetFlags&, TargetFlags)</tt><br>
+ * <tt>%TargetFlags& operator^=(TargetFlags&, TargetFlags)</tt><br>
+ */
+enum TargetFlags
+{
+ TARGET_SAME_APP = 1 << 0,
+ TARGET_SAME_WIDGET = 1 << 1
+};
+
+/** @ingroup gtkmmEnums */
+inline TargetFlags operator|(TargetFlags lhs, TargetFlags rhs)
+ { return static_cast<TargetFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
+
+/** @ingroup gtkmmEnums */
+inline TargetFlags operator&(TargetFlags lhs, TargetFlags rhs)
+ { return static_cast<TargetFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
+
+/** @ingroup gtkmmEnums */
+inline TargetFlags operator^(TargetFlags lhs, TargetFlags rhs)
+ { return static_cast<TargetFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
+
+/** @ingroup gtkmmEnums */
+inline TargetFlags operator~(TargetFlags flags)
+ { return static_cast<TargetFlags>(~static_cast<unsigned>(flags)); }
+
+/** @ingroup gtkmmEnums */
+inline TargetFlags& operator|=(TargetFlags& lhs, TargetFlags rhs)
+ { return (lhs = static_cast<TargetFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
+
+/** @ingroup gtkmmEnums */
+inline TargetFlags& operator&=(TargetFlags& lhs, TargetFlags rhs)
+ { return (lhs = static_cast<TargetFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
+
+/** @ingroup gtkmmEnums */
+inline TargetFlags& operator^=(TargetFlags& lhs, TargetFlags rhs)
+ { return (lhs = static_cast<TargetFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::TargetFlags> : public Glib::Value_Flags<Gtk::TargetFlags>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+/**
+ * @ingroup gtkmmEnums
+ */
+enum ToolbarStyle
+{
+ TOOLBAR_ICONS,
+ TOOLBAR_TEXT,
+ TOOLBAR_BOTH,
+ TOOLBAR_BOTH_HORIZ
+};
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::ToolbarStyle> : public Glib::Value_Enum<Gtk::ToolbarStyle>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+/**
+ * @ingroup gtkmmEnums
+ */
+enum UpdateType
+{
+ UPDATE_CONTINUOUS,
+ UPDATE_DISCONTINUOUS,
+ UPDATE_DELAYED
+};
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::UpdateType> : public Glib::Value_Enum<Gtk::UpdateType>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+/**
+ * @ingroup gtkmmEnums
+ */
+enum Visibility
+{
+ VISIBILITY_NONE,
+ VISIBILITY_PARTIAL,
+ VISIBILITY_FULL
+};
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::Visibility> : public Glib::Value_Enum<Gtk::Visibility>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+/**
+ * @ingroup gtkmmEnums
+ */
+enum WindowPosition
+{
+ WIN_POS_NONE,
+ WIN_POS_CENTER,
+ WIN_POS_MOUSE,
+ WIN_POS_CENTER_ALWAYS,
+ WIN_POS_CENTER_ON_PARENT
+};
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::WindowPosition> : public Glib::Value_Enum<Gtk::WindowPosition>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+/**
+ * @ingroup gtkmmEnums
+ */
+enum WindowType
+{
+ WINDOW_TOPLEVEL,
+ WINDOW_POPUP
+};
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::WindowType> : public Glib::Value_Enum<Gtk::WindowType>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+/**
+ * @ingroup gtkmmEnums
+ */
+enum WrapMode
+{
+ WRAP_NONE,
+ WRAP_CHAR,
+ WRAP_WORD,
+ WRAP_WORD_CHAR
+};
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::WrapMode> : public Glib::Value_Enum<Gtk::WrapMode>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+/**
+ * @ingroup gtkmmEnums
+ */
+enum SortType
+{
+ SORT_ASCENDING,
+ SORT_DESCENDING
+};
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::SortType> : public Glib::Value_Enum<Gtk::SortType>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+
+/* We use a class to implement the GtkIconSize enum, because you can register
+ * new "enum" values. The strict type rules of C++ don't allow using an enum
+ * like that. Gtk::BuiltinIconSize is the actual GtkIconSize wrapper enum.
+ */
+
+/**
+ * Represents registered icon sizes.
+ * You can also use a Gtk::BuiltinIconSize instead of an IconSize.
+ */
+class IconSize
+{
+private:
+ int size_;
+
+public:
+ IconSize() : size_ (0) {}
+ IconSize(BuiltinIconSize size) : size_ (size) {}
+
+ // Behave like an ordinary enum.
+ explicit IconSize(int size) : size_ (size) {}
+ operator int() const { return size_; }
+
+ // These static methods are implement in iconfactory.ccg.
+ static bool lookup(IconSize size, int& width, int& height);
+ static IconSize register_new(const Glib::ustring& name, int width, int height);
+ static void register_alias(const Glib::ustring& alias, IconSize target);
+ static IconSize from_name(const Glib::ustring& name);
+ static Glib::ustring get_name(IconSize size);
+};
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::IconSize> : public Glib::Value_Enum<Gtk::IconSize>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+namespace Gtk
+{
+
+ /** Methods are overriden so you can use these simple enums, or floats for more precision.
+ * @ingroup gtkmmEnums
+ */
+ enum AlignmentEnum
+ {
+ ALIGN_LEFT, /**< Same as 0.0 */
+ ALIGN_CENTER, /**< Same as 0.5 */
+ ALIGN_RIGHT, /**< Same as 1.0 */
+ ALIGN_TOP, /**< Same as ALIGN_LEFT */
+ ALIGN_BOTTOM /**< Same as ALIGN_RIGHT */
+ };
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+//We need this because we can't just use floats for enum value.
+float _gtkmm_align_float_from_enum(AlignmentEnum value);
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+} //namespace Gtk
+
+
+#endif /* _GTKMM_ENUMS_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/eventbox.cc b/libs/gtkmm2/gtk/gtkmm/eventbox.cc
new file mode 100644
index 0000000000..9b15790c9d
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/eventbox.cc
@@ -0,0 +1,170 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/eventbox.h>
+#include <gtkmm/private/eventbox_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkeventbox.h>
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::EventBox* wrap(GtkEventBox* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::EventBox *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& EventBox_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &EventBox_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_event_box_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void EventBox_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* EventBox_Class::wrap_new(GObject* o)
+{
+ return manage(new EventBox((GtkEventBox*)(o)));
+
+}
+
+
+/* The implementation: */
+
+EventBox::EventBox(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Bin(construct_params)
+{
+ }
+
+EventBox::EventBox(GtkEventBox* castitem)
+:
+ Gtk::Bin((GtkBin*)(castitem))
+{
+ }
+
+EventBox::~EventBox()
+{
+ destroy_();
+}
+
+EventBox::CppClassType EventBox::eventbox_class_; // initialize static member
+
+GType EventBox::get_type()
+{
+ return eventbox_class_.init().get_type();
+}
+
+GType EventBox::get_base_type()
+{
+ return gtk_event_box_get_type();
+}
+
+
+EventBox::EventBox()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Bin(Glib::ConstructParams(eventbox_class_.init()))
+{
+ }
+
+bool EventBox::get_visible_window() const
+{
+ return gtk_event_box_get_visible_window(const_cast<GtkEventBox*>(gobj()));
+}
+
+void EventBox::set_visible_window(bool visible_window)
+{
+ gtk_event_box_set_visible_window(gobj(), static_cast<int>(visible_window));
+}
+
+bool EventBox::get_above_child() const
+{
+ return gtk_event_box_get_above_child(const_cast<GtkEventBox*>(gobj()));
+}
+
+void EventBox::set_above_child(bool above_child)
+{
+ gtk_event_box_set_above_child(gobj(), static_cast<int>(above_child));
+}
+
+
+Glib::PropertyProxy<bool> EventBox::property_visible_window()
+{
+ return Glib::PropertyProxy<bool>(this, "visible-window");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> EventBox::property_visible_window() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "visible-window");
+}
+
+Glib::PropertyProxy<bool> EventBox::property_above_child()
+{
+ return Glib::PropertyProxy<bool>(this, "above-child");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> EventBox::property_above_child() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "above-child");
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/eventbox.h b/libs/gtkmm2/gtk/gtkmm/eventbox.h
new file mode 100644
index 0000000000..927f196888
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/eventbox.h
@@ -0,0 +1,232 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_EVENTBOX_H
+#define _GTKMM_EVENTBOX_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* eventbox.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/bin.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkEventBox GtkEventBox;
+typedef struct _GtkEventBoxClass GtkEventBoxClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class EventBox_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** Event capturing box.
+ *
+ * This widget adds an X Window where one does not
+ * normally appear, allowing you to capture events.
+ * It will receive any event which is specified
+ * with set_events().
+ *
+ * This widget is generally used to add Gtk::Tooltips, button presses,
+ * and clipping to widgets derived from Gtk::Misc.
+ *
+ * @ingroup Widgets
+ */
+
+class EventBox : public Bin
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef EventBox CppObjectType;
+ typedef EventBox_Class CppClassType;
+ typedef GtkEventBox BaseObjectType;
+ typedef GtkEventBoxClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~EventBox();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class EventBox_Class;
+ static CppClassType eventbox_class_;
+
+ // noncopyable
+ EventBox(const EventBox&);
+ EventBox& operator=(const EventBox&);
+
+protected:
+ explicit EventBox(const Glib::ConstructParams& construct_params);
+ explicit EventBox(GtkEventBox* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkEventBox* gobj() { return reinterpret_cast<GtkEventBox*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkEventBox* gobj() const { return reinterpret_cast<GtkEventBox*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+public:
+ EventBox();
+
+
+ /** Returns whether the event box has a visible window.
+ * See set_visible_window() for details.
+ * @return <tt>true</tt> if the event box window is visible
+ *
+ * Since: 2.4.
+ */
+ bool get_visible_window() const;
+
+ /** Set whether the event box uses a visible or invisible child
+ * window. The default is to use visible windows.
+ *
+ * In an invisible window event box, the window that that the
+ * event box creates is a Gdk::INPUT_ONLY window, which
+ * means that it is invisible and only serves to receive
+ * events.
+ *
+ * A visible window event box creates a visible (Gdk::INPUT_OUTPUT)
+ * window that acts as the parent window for all the widgets
+ * contained in the event box.
+ *
+ * You should generally make your event box invisible if
+ * you just want to trap events. Creating a visible window
+ * may cause artifacts that are visible to the user, especially
+ * if the user is using a theme with gradients or pixmaps.
+ *
+ * The main reason to create a non input-only event box is if
+ * you want to set the background to a different color or
+ * draw on it.
+ *
+ * &lt;note&gt;
+ * There is one unexpected issue for an invisible event box that has its
+ * window below the child. (See set_above_child().)
+ * Since the input-only window is not an ancestor window of any windows
+ * that descendent widgets of the event box create, events on these
+ * windows aren't propagated up by the windowing system, but only by GTK+.
+ * The practical effect of this is if an event isn't in the event
+ * mask for the descendant window (see Gtk::Widget::add_events()),
+ * it won't be received by the event box.
+ *
+ * This problem doesn't occur for visible event boxes, because in
+ * that case, the event box window is actually the ancestor of the
+ * descendant windows, not just at the same place on the screen.
+ * &lt;/note&gt;
+ *
+ * Since: 2.4
+ * @param visible_window Boolean value.
+ */
+ void set_visible_window(bool visible_window = true);
+
+ /** Returns whether the event box window is above or below the
+ * windows of its child. See set_above_child() for
+ * details.
+ * @return <tt>true</tt> if the event box window is above the window
+ * of its child.
+ *
+ * Since: 2.4.
+ */
+ bool get_above_child() const;
+
+ /** Set whether the event box window is positioned above the windows of its child,
+ * as opposed to below it. If the window is above, all events inside the
+ * event box will go to the event box. If the window is below, events
+ * in windows of child widgets will first got to that widget, and then
+ * to its parents.
+ *
+ * The default is to keep the window below the child.
+ *
+ * Since: 2.4
+ * @param above_child <tt>true</tt> if the event box window is above the windows of its child.
+ */
+ void set_above_child(bool above_child = true);
+
+ /** Whether the event box is visible
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_visible_window() ;
+
+/** Whether the event box is visible
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_visible_window() const;
+
+ /** Whether the event-trapping window of the eventbox is above the window of the child widget as opposed to below it.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_above_child() ;
+
+/** Whether the event-trapping window of the eventbox is above the window of the child widget as opposed to below it.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_above_child() const;
+
+
+};
+
+} /* namespace Gtk */
+
+
+namespace Glib
+{
+ /** @relates Gtk::EventBox
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::EventBox* wrap(GtkEventBox* object, bool take_copy = false);
+}
+#endif /* _GTKMM_EVENTBOX_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/expander.cc b/libs/gtkmm2/gtk/gtkmm/expander.cc
new file mode 100644
index 0000000000..e2c7f83908
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/expander.cc
@@ -0,0 +1,266 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/expander.h>
+#include <gtkmm/private/expander_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 2003 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkexpander.h>
+
+namespace Gtk
+{
+
+Expander::Expander(const Glib::ustring& label, bool mnemonic)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Bin(Glib::ConstructParams(expander_class_.init(), "label",label.c_str(),"use_underline",gboolean(mnemonic), (char*) 0))
+{}
+
+} // namespace Gtk
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::Expander* wrap(GtkExpander* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::Expander *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Expander_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Expander_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_expander_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Expander_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* Expander_Class::wrap_new(GObject* o)
+{
+ return manage(new Expander((GtkExpander*)(o)));
+
+}
+
+
+/* The implementation: */
+
+Expander::Expander(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Bin(construct_params)
+{
+ }
+
+Expander::Expander(GtkExpander* castitem)
+:
+ Gtk::Bin((GtkBin*)(castitem))
+{
+ }
+
+Expander::~Expander()
+{
+ destroy_();
+}
+
+Expander::CppClassType Expander::expander_class_; // initialize static member
+
+GType Expander::get_type()
+{
+ return expander_class_.init().get_type();
+}
+
+GType Expander::get_base_type()
+{
+ return gtk_expander_get_type();
+}
+
+
+Expander::Expander()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Bin(Glib::ConstructParams(expander_class_.init()))
+{
+ }
+
+void Expander::set_expanded(bool expanded)
+{
+ gtk_expander_set_expanded(gobj(), static_cast<int>(expanded));
+}
+
+bool Expander::get_expanded() const
+{
+ return gtk_expander_get_expanded(const_cast<GtkExpander*>(gobj()));
+}
+
+void Expander::set_spacing(int spacing)
+{
+ gtk_expander_set_spacing(gobj(), spacing);
+}
+
+int Expander::get_spacing() const
+{
+ return gtk_expander_get_spacing(const_cast<GtkExpander*>(gobj()));
+}
+
+void Expander::set_label(const Glib::ustring& label)
+{
+ gtk_expander_set_label(gobj(), label.c_str());
+}
+
+Glib::ustring Expander::get_label() const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(gtk_expander_get_label(const_cast<GtkExpander*>(gobj())));
+}
+
+void Expander::set_use_underline(bool use_underline)
+{
+ gtk_expander_set_use_underline(gobj(), static_cast<int>(use_underline));
+}
+
+bool Expander::get_use_underline() const
+{
+ return gtk_expander_get_use_underline(const_cast<GtkExpander*>(gobj()));
+}
+
+void Expander::set_use_markup(bool use_markup)
+{
+ gtk_expander_set_use_markup(gobj(), static_cast<int>(use_markup));
+}
+
+bool Expander::get_use_markup() const
+{
+ return gtk_expander_get_use_markup(const_cast<GtkExpander*>(gobj()));
+}
+
+void Expander::set_label_widget(Widget& label_widget)
+{
+ gtk_expander_set_label_widget(gobj(), (label_widget).gobj());
+}
+
+Widget* Expander::get_label_widget()
+{
+ return Glib::wrap(gtk_expander_get_label_widget(gobj()));
+}
+
+const Widget* Expander::get_label_widget() const
+{
+ return Glib::wrap(gtk_expander_get_label_widget(const_cast<GtkExpander*>(gobj())));
+}
+
+
+Glib::PropertyProxy<bool> Expander::property_expanded()
+{
+ return Glib::PropertyProxy<bool>(this, "expanded");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Expander::property_expanded() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "expanded");
+}
+
+Glib::PropertyProxy<Glib::ustring> Expander::property_label()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "label");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> Expander::property_label() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "label");
+}
+
+Glib::PropertyProxy<bool> Expander::property_use_underline()
+{
+ return Glib::PropertyProxy<bool>(this, "use-underline");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Expander::property_use_underline() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "use-underline");
+}
+
+Glib::PropertyProxy<bool> Expander::property_use_markup()
+{
+ return Glib::PropertyProxy<bool>(this, "use-markup");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Expander::property_use_markup() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "use-markup");
+}
+
+Glib::PropertyProxy<int> Expander::property_spacing()
+{
+ return Glib::PropertyProxy<int>(this, "spacing");
+}
+
+Glib::PropertyProxy_ReadOnly<int> Expander::property_spacing() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "spacing");
+}
+
+Glib::PropertyProxy<Widget*> Expander::property_label_widget()
+{
+ return Glib::PropertyProxy<Widget*>(this, "label-widget");
+}
+
+Glib::PropertyProxy_ReadOnly<Widget*> Expander::property_label_widget() const
+{
+ return Glib::PropertyProxy_ReadOnly<Widget*>(this, "label-widget");
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/expander.h b/libs/gtkmm2/gtk/gtkmm/expander.h
new file mode 100644
index 0000000000..8f4d52b425
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/expander.h
@@ -0,0 +1,362 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_EXPANDER_H
+#define _GTKMM_EXPANDER_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* expander.h
+ *
+ * Copyright (C) 2003 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/bin.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkExpander GtkExpander;
+typedef struct _GtkExpanderClass GtkExpanderClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class Expander_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** A container which can hide its child.
+ *
+ * A Expander allows the user to hide or show its child by clicking on an
+ * expander triangle similar to the triangles used in a Gtk::TreeView.
+ *
+ * @ingroup Widgets
+ */
+
+class Expander : public Bin
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Expander CppObjectType;
+ typedef Expander_Class CppClassType;
+ typedef GtkExpander BaseObjectType;
+ typedef GtkExpanderClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~Expander();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class Expander_Class;
+ static CppClassType expander_class_;
+
+ // noncopyable
+ Expander(const Expander&);
+ Expander& operator=(const Expander&);
+
+protected:
+ explicit Expander(const Glib::ConstructParams& construct_params);
+ explicit Expander(GtkExpander* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkExpander* gobj() { return reinterpret_cast<GtkExpander*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkExpander* gobj() const { return reinterpret_cast<GtkExpander*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+public:
+
+ /** Creates a new Expander.
+ *
+ * The Expander has an empty label.
+ *
+ * Since: 2.4
+ */
+ Expander();
+
+ /** Creates a new Expander with a label.
+ *
+ * Creates a new expander using label as the text of the label. Settin @a mnemonic to true
+ * will allow you to precede characters in the label with an underscore which will make them
+ * underlined. If you need a literal underscore character in a label, use '__' (two underscores).
+ * The first underlined character represents a keyboard accelerator called a mnemonic.
+ * Pressing Alt and that key activates the button.
+ *
+ * @param label The string for the label describing the Expander.
+ * @param mnemonic Wether the label may contain underscores to set up accelerators.
+
+ * Since: 2.4
+ */
+ explicit Expander(const Glib::ustring& label, bool mnemonic = false);
+
+
+ /** Sets the state of the expander. Set to <tt>true</tt>, if you want
+ * the child widget to be revealed, and <tt>false</tt> if you want the
+ * child widget to be hidden.
+ *
+ * Since: 2.4
+ * @param expanded Whether the child widget is revealed.
+ */
+ void set_expanded(bool expanded = true);
+
+ /** Queries a Gtk::Expander and returns its current state. Returns <tt>true</tt>
+ * if the child widget is revealed.
+ *
+ * See set_expanded().
+ * @return The current state of the expander.
+ *
+ * Since: 2.4.
+ */
+ bool get_expanded() const;
+
+
+ /** Sets the spacing field of @a expander , which is the number of pixels to
+ * place between expander and the child.
+ *
+ * Since: 2.4
+ * @param spacing Distance between the expander and child in pixels.
+ */
+ void set_spacing(int spacing);
+
+ /** Gets the value set by set_spacing().
+ * @return Spacing between the expander and child.
+ *
+ * Since: 2.4.
+ */
+ int get_spacing() const;
+
+
+ /** Sets the text of the label of the expander to @a label .
+ *
+ * This will also clear any previously set labels.
+ *
+ * Since: 2.4
+ * @param label A string.
+ */
+ void set_label(const Glib::ustring& label);
+
+ /** Fetches the text from the label of the expander, as set by
+ * set_label(). If the label text has not
+ * been set the return value will be <tt>0</tt>. This will be the
+ * case if you create an empty button with Gtk::Button::new() to
+ * use as a container.
+ * @return The text of the label widget. This string is owned
+ * by the widget and must not be modified or freed.
+ *
+ * Since: 2.4.
+ */
+ Glib::ustring get_label() const;
+
+
+ /** If true, an underline in the text of the expander label indicates
+ * the next character should be used for the mnemonic accelerator key.
+ *
+ * Since: 2.4
+ * @param use_underline <tt>true</tt> if underlines in the text indicate mnemonics.
+ */
+ void set_use_underline(bool use_underline = true);
+
+ /** Returns whether an embedded underline in the expander label indicates a
+ * mnemonic. See set_use_underline().
+ * @return <tt>true</tt> if an embedded underline in the expander label
+ * indicates the mnemonic accelerator keys.
+ *
+ * Since: 2.4.
+ */
+ bool get_use_underline() const;
+
+
+ /** Sets whether the text of the label contains markup in Pango's text markup
+ * language. See Gtk::Label::set_markup().
+ *
+ * Since: 2.4
+ * @param use_markup <tt>true</tt> if the label's text should be parsed for markup.
+ */
+ void set_use_markup(bool use_markup = true);
+
+ /** Returns whether the label's text is interpreted as marked up with
+ * the Pango text markup
+ * language. See set_use_markup().
+ * @return <tt>true</tt> if the label's text will be parsed for markup
+ *
+ * Since: 2.4.
+ */
+ bool get_use_markup() const;
+
+
+ /** Set the label widget for the expander. This is the widget
+ * that will appear embedded alongside the expander arrow.
+ *
+ * Since: 2.4
+ * @param label_widget The new label widget.
+ */
+ void set_label_widget(Widget& label_widget);
+
+ /** Retrieves the label widget for the frame. See
+ * set_label_widget().
+ * @return The label widget, or <tt>0</tt> if there is none.
+ *
+ * Since: 2.4.
+ */
+ Widget* get_label_widget();
+
+ /** Retrieves the label widget for the frame. See
+ * set_label_widget().
+ * @return The label widget, or <tt>0</tt> if there is none.
+ *
+ * Since: 2.4.
+ */
+ const Widget* get_label_widget() const;
+
+ //keybinding
+
+ /** Whether the expander has been opened to reveal the child widget.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_expanded() ;
+
+/** Whether the expander has been opened to reveal the child widget.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_expanded() const;
+
+ /** Text of the expander's label.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_label() ;
+
+/** Text of the expander's label.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_label() const;
+
+ /** If set
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_use_underline() ;
+
+/** If set
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_use_underline() const;
+
+ /** The text of the label includes XML markup. See pango_parse_markup.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_use_markup() ;
+
+/** The text of the label includes XML markup. See pango_parse_markup.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_use_markup() const;
+
+ /** Space to put between the label and the child.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_spacing() ;
+
+/** Space to put between the label and the child.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_spacing() const;
+
+ /** A widget to display in place of the usual expander label.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Widget*> property_label_widget() ;
+
+/** A widget to display in place of the usual expander label.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Widget*> property_label_widget() const;
+
+
+};
+
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::Expander
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::Expander* wrap(GtkExpander* object, bool take_copy = false);
+}
+#endif /* _GTKMM_EXPANDER_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/filechooser.cc b/libs/gtkmm2/gtk/gtkmm/filechooser.cc
new file mode 100644
index 0000000000..708a94365c
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/filechooser.cc
@@ -0,0 +1,581 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/filechooser.h>
+#include <gtkmm/private/filechooser_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 2003 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkfilechooser.h>
+//#include <gtk/gtkfilesystem.h> //We include this semi-private header just to get GTK_FILE_SYSTEM_ERROR.
+
+
+namespace
+{
+
+const Glib::SignalProxyInfo FileChooser_signal_current_folder_changed_info =
+{
+ "current_folder_changed",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+
+const Glib::SignalProxyInfo FileChooser_signal_selection_changed_info =
+{
+ "selection_changed",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+
+const Glib::SignalProxyInfo FileChooser_signal_update_preview_info =
+{
+ "update_preview",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+
+const Glib::SignalProxyInfo FileChooser_signal_file_activated_info =
+{
+ "file_activated",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+} // anonymous namespace
+
+// static
+GType Glib::Value<Gtk::FileChooserAction>::value_type()
+{
+ return gtk_file_chooser_action_get_type();
+}
+
+
+Gtk::FileChooserError::FileChooserError(Gtk::FileChooserError::Code error_code, const Glib::ustring& error_message)
+:
+ Glib::Error (GTK_FILE_CHOOSER_ERROR, error_code, error_message)
+{}
+
+Gtk::FileChooserError::FileChooserError(GError* gobject)
+:
+ Glib::Error (gobject)
+{}
+
+Gtk::FileChooserError::Code Gtk::FileChooserError::code() const
+{
+ return static_cast<Code>(Glib::Error::code());
+}
+
+void Gtk::FileChooserError::throw_func(GError* gobject)
+{
+ throw Gtk::FileChooserError(gobject);
+}
+
+// static
+GType Glib::Value<Gtk::FileChooserError::Code>::value_type()
+{
+ return gtk_file_chooser_error_get_type();
+}
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Gtk::FileChooser> wrap(GtkFileChooser* object, bool take_copy)
+{
+ return Glib::RefPtr<Gtk::FileChooser>( dynamic_cast<Gtk::FileChooser*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} // namespace Glib
+
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Interface_Class& FileChooser_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Interface_Class has to know the interface init function
+ // in order to add interfaces to implementing types.
+ class_init_func_ = &FileChooser_Class::iface_init_function;
+
+ // We can not derive from another interface, and it is not necessary anyway.
+ gtype_ = gtk_file_chooser_get_type();
+ }
+
+ return *this;
+}
+
+void FileChooser_Class::iface_init_function(void* g_iface, void*)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_iface);
+
+ //This is just to avoid an "unused variable" warning when there are no vfuncs or signal handlers to connect.
+ //This is a temporary fix until I find out why I can not seem to derive a GtkFileChooser interface. murrayc
+ g_assert(klass != 0);
+
+}
+
+
+Glib::ObjectBase* FileChooser_Class::wrap_new(GObject* object)
+{
+ return new FileChooser((GtkFileChooser*)(object));
+}
+
+
+/* The implementation: */
+
+FileChooser::FileChooser()
+:
+ Glib::Interface(filechooser_class_.init())
+{}
+
+FileChooser::FileChooser(GtkFileChooser* castitem)
+:
+ Glib::Interface((GObject*)(castitem))
+{}
+
+FileChooser::~FileChooser()
+{}
+
+// static
+void FileChooser::add_interface(GType gtype_implementer)
+{
+ filechooser_class_.init().add_interface(gtype_implementer);
+}
+
+FileChooser::CppClassType FileChooser::filechooser_class_; // initialize static member
+
+GType FileChooser::get_type()
+{
+ return filechooser_class_.init().get_type();
+}
+
+GType FileChooser::get_base_type()
+{
+ return gtk_file_chooser_get_type();
+}
+
+
+void FileChooser::set_action(FileChooserAction action)
+{
+ gtk_file_chooser_set_action(gobj(), ((GtkFileChooserAction)(action)));
+}
+
+FileChooserAction FileChooser::get_action() const
+{
+ return ((FileChooserAction)(gtk_file_chooser_get_action(const_cast<GtkFileChooser*>(gobj()))));
+}
+
+void FileChooser::set_local_only(bool local_only)
+{
+ gtk_file_chooser_set_local_only(gobj(), static_cast<int>(local_only));
+}
+
+bool FileChooser::get_local_only() const
+{
+ return gtk_file_chooser_get_local_only(const_cast<GtkFileChooser*>(gobj()));
+}
+
+void FileChooser::set_select_multiple(bool select_multiple)
+{
+ gtk_file_chooser_set_select_multiple(gobj(), static_cast<int>(select_multiple));
+}
+
+bool FileChooser::get_select_multiple() const
+{
+ return gtk_file_chooser_get_select_multiple(const_cast<GtkFileChooser*>(gobj()));
+}
+
+void FileChooser::set_show_hidden(bool show_hidden)
+{
+ gtk_file_chooser_set_show_hidden(gobj(), static_cast<int>(show_hidden));
+}
+
+bool FileChooser::get_show_hidden() const
+{
+ return gtk_file_chooser_get_show_hidden(const_cast<GtkFileChooser*>(gobj()));
+}
+
+void FileChooser::set_current_name(const Glib::ustring& name)
+{
+ gtk_file_chooser_set_current_name(gobj(), name.c_str());
+}
+
+Glib::ustring FileChooser::get_filename() const
+{
+ return Glib::convert_return_gchar_ptr_to_ustring(gtk_file_chooser_get_filename(const_cast<GtkFileChooser*>(gobj())));
+}
+
+bool FileChooser::set_filename(const Glib::ustring& filename)
+{
+ return gtk_file_chooser_set_filename(gobj(), filename.c_str());
+}
+
+bool FileChooser::select_filename(const Glib::ustring& filename)
+{
+ return gtk_file_chooser_select_filename(gobj(), filename.c_str());
+}
+
+void FileChooser::unselect_filename(const Glib::ustring& filename)
+{
+ gtk_file_chooser_unselect_filename(gobj(), filename.c_str());
+}
+
+void FileChooser::select_all()
+{
+ gtk_file_chooser_select_all(gobj());
+}
+
+void FileChooser::unselect_all()
+{
+ gtk_file_chooser_unselect_all(gobj());
+}
+
+Glib::SListHandle<Glib::ustring> FileChooser::get_filenames() const
+{
+ return Glib::SListHandle<Glib::ustring>(gtk_file_chooser_get_filenames(const_cast<GtkFileChooser*>(gobj())), Glib::OWNERSHIP_DEEP);
+}
+
+bool FileChooser::set_current_folder(const Glib::ustring& filename)
+{
+ return gtk_file_chooser_set_current_folder(gobj(), filename.c_str());
+}
+
+Glib::ustring FileChooser::get_current_folder() const
+{
+ return Glib::convert_return_gchar_ptr_to_ustring(gtk_file_chooser_get_current_folder(const_cast<GtkFileChooser*>(gobj())));
+}
+
+Glib::ustring FileChooser::get_uri() const
+{
+ return Glib::convert_return_gchar_ptr_to_ustring(gtk_file_chooser_get_uri(const_cast<GtkFileChooser*>(gobj())));
+}
+
+bool FileChooser::set_uri(const Glib::ustring& uri)
+{
+ return gtk_file_chooser_set_uri(gobj(), uri.c_str());
+}
+
+bool FileChooser::select_uri(const Glib::ustring& uri)
+{
+ return gtk_file_chooser_select_uri(gobj(), uri.c_str());
+}
+
+void FileChooser::unselect_uri(const Glib::ustring& uri)
+{
+ gtk_file_chooser_unselect_uri(gobj(), uri.c_str());
+}
+
+Glib::SListHandle<Glib::ustring> FileChooser::get_uris() const
+{
+ return Glib::SListHandle<Glib::ustring>(gtk_file_chooser_get_uris(const_cast<GtkFileChooser*>(gobj())), Glib::OWNERSHIP_DEEP);
+}
+
+bool FileChooser::set_current_folder_uri(const Glib::ustring& uri)
+{
+ return gtk_file_chooser_set_current_folder_uri(gobj(), uri.c_str());
+}
+
+Glib::ustring FileChooser::get_current_folder_uri() const
+{
+ return Glib::convert_return_gchar_ptr_to_ustring(gtk_file_chooser_get_current_folder_uri(const_cast<GtkFileChooser*>(gobj())));
+}
+
+void FileChooser::set_preview_widget(Gtk::Widget& preview_widget)
+{
+ gtk_file_chooser_set_preview_widget(gobj(), (preview_widget).gobj());
+}
+
+const Gtk::Widget* FileChooser::get_preview_widget() const
+{
+ return Glib::wrap(gtk_file_chooser_get_preview_widget(const_cast<GtkFileChooser*>(gobj())));
+}
+
+Gtk::Widget* FileChooser::get_preview_widget()
+{
+ return Glib::wrap(gtk_file_chooser_get_preview_widget(gobj()));
+}
+
+void FileChooser::set_preview_widget_active(bool active)
+{
+ gtk_file_chooser_set_preview_widget_active(gobj(), static_cast<int>(active));
+}
+
+bool FileChooser::get_preview_widget_active() const
+{
+ return gtk_file_chooser_get_preview_widget_active(const_cast<GtkFileChooser*>(gobj()));
+}
+
+void FileChooser::set_use_preview_label(bool use_label)
+{
+ gtk_file_chooser_set_use_preview_label(gobj(), static_cast<int>(use_label));
+}
+
+bool FileChooser::get_use_preview_label() const
+{
+ return gtk_file_chooser_get_use_preview_label(const_cast<GtkFileChooser*>(gobj()));
+}
+
+Glib::ustring FileChooser::get_preview_filename() const
+{
+ return Glib::convert_return_gchar_ptr_to_ustring(gtk_file_chooser_get_preview_filename(const_cast<GtkFileChooser*>(gobj())));
+}
+
+Glib::ustring FileChooser::get_preview_uri() const
+{
+ return Glib::convert_return_gchar_ptr_to_ustring(gtk_file_chooser_get_preview_uri(const_cast<GtkFileChooser*>(gobj())));
+}
+
+void FileChooser::set_extra_widget(Gtk::Widget& extra_widget)
+{
+ gtk_file_chooser_set_extra_widget(gobj(), (extra_widget).gobj());
+}
+
+Gtk::Widget* FileChooser::get_extra_widget()
+{
+ return Glib::wrap(gtk_file_chooser_get_extra_widget(gobj()));
+}
+
+const Gtk::Widget* FileChooser::get_extra_widget() const
+{
+ return Glib::wrap(gtk_file_chooser_get_extra_widget(const_cast<GtkFileChooser*>(gobj())));
+}
+
+void FileChooser::add_filter(const FileFilter& filter)
+{
+ gtk_file_chooser_add_filter(gobj(), const_cast<GtkFileFilter*>((filter).gobj()));
+}
+
+void FileChooser::remove_filter(const FileFilter& filter)
+{
+ gtk_file_chooser_remove_filter(gobj(), const_cast<GtkFileFilter*>((filter).gobj()));
+}
+
+Glib::SListHandle< FileFilter* > FileChooser::list_filters()
+{
+ return Glib::SListHandle< FileFilter* >(gtk_file_chooser_list_filters(gobj()), Glib::OWNERSHIP_SHALLOW);
+}
+
+Glib::SListHandle< const FileFilter* > FileChooser::list_filters() const
+{
+ return Glib::SListHandle< const FileFilter* >(gtk_file_chooser_list_filters(const_cast<GtkFileChooser*>(gobj())), Glib::OWNERSHIP_SHALLOW);
+}
+
+void FileChooser::set_filter(const FileFilter& filter)
+{
+ gtk_file_chooser_set_filter(gobj(), const_cast<GtkFileFilter*>((filter).gobj()));
+}
+
+FileFilter* FileChooser::get_filter()
+{
+
+ FileFilter* retvalue = Glib::wrap(gtk_file_chooser_get_filter(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+const FileFilter* FileChooser::get_filter() const
+{
+
+ const FileFilter* retvalue = Glib::wrap(gtk_file_chooser_get_filter(const_cast<GtkFileChooser*>(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+bool FileChooser::add_shortcut_folder(const Glib::ustring& folder)
+{
+ GError *error = 0;
+ bool retvalue = gtk_file_chooser_add_shortcut_folder(gobj(), folder.c_str(), &(error));
+ if(error) ::Glib::Error::throw_exception(error);
+ return retvalue;
+}
+
+bool FileChooser::remove_shortcut_folder(const Glib::ustring& folder)
+{
+ GError *error = 0;
+ bool retvalue = gtk_file_chooser_remove_shortcut_folder(gobj(), folder.c_str(), &(error));
+ if(error) ::Glib::Error::throw_exception(error);
+ return retvalue;
+}
+
+Glib::SListHandle<Glib::ustring> FileChooser::list_shortcut_folders() const
+{
+ return Glib::SListHandle<Glib::ustring>(gtk_file_chooser_list_shortcut_folders(const_cast<GtkFileChooser*>(gobj())), Glib::OWNERSHIP_DEEP);
+}
+
+bool FileChooser::add_shortcut_folder_uri(const Glib::ustring& uri)
+{
+ GError *error = 0;
+ bool retvalue = gtk_file_chooser_add_shortcut_folder_uri(gobj(), uri.c_str(), &(error));
+ if(error) ::Glib::Error::throw_exception(error);
+ return retvalue;
+}
+
+bool FileChooser::remove_shortcut_folder_uri(const Glib::ustring& uri)
+{
+ GError *error = 0;
+ bool retvalue = gtk_file_chooser_remove_shortcut_folder_uri(gobj(), uri.c_str(), &(error));
+ if(error) ::Glib::Error::throw_exception(error);
+ return retvalue;
+}
+
+Glib::SListHandle<Glib::ustring> FileChooser::list_shortcut_folder_uris() const
+{
+ return Glib::SListHandle<Glib::ustring>(gtk_file_chooser_list_shortcut_folder_uris(const_cast<GtkFileChooser*>(gobj())), Glib::OWNERSHIP_DEEP);
+}
+
+
+Glib::SignalProxy0< void > FileChooser::signal_current_folder_changed()
+{
+ return Glib::SignalProxy0< void >(this, &FileChooser_signal_current_folder_changed_info);
+}
+
+Glib::SignalProxy0< void > FileChooser::signal_selection_changed()
+{
+ return Glib::SignalProxy0< void >(this, &FileChooser_signal_selection_changed_info);
+}
+
+Glib::SignalProxy0< void > FileChooser::signal_update_preview()
+{
+ return Glib::SignalProxy0< void >(this, &FileChooser_signal_update_preview_info);
+}
+
+Glib::SignalProxy0< void > FileChooser::signal_file_activated()
+{
+ return Glib::SignalProxy0< void >(this, &FileChooser_signal_file_activated_info);
+}
+
+
+Glib::PropertyProxy<FileChooserAction> FileChooser::property_action()
+{
+ return Glib::PropertyProxy<FileChooserAction>(this, "action");
+}
+
+Glib::PropertyProxy_ReadOnly<FileChooserAction> FileChooser::property_action() const
+{
+ return Glib::PropertyProxy_ReadOnly<FileChooserAction>(this, "action");
+}
+
+Glib::PropertyProxy<FileFilter*> FileChooser::property_filter()
+{
+ return Glib::PropertyProxy<FileFilter*>(this, "filter");
+}
+
+Glib::PropertyProxy_ReadOnly<FileFilter*> FileChooser::property_filter() const
+{
+ return Glib::PropertyProxy_ReadOnly<FileFilter*>(this, "filter");
+}
+
+Glib::PropertyProxy<bool> FileChooser::property_folder_mode()
+{
+ return Glib::PropertyProxy<bool>(this, "folder-mode");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> FileChooser::property_folder_mode() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "folder-mode");
+}
+
+Glib::PropertyProxy<bool> FileChooser::property_local_only()
+{
+ return Glib::PropertyProxy<bool>(this, "local-only");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> FileChooser::property_local_only() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "local-only");
+}
+
+Glib::PropertyProxy<Widget*> FileChooser::property_preview_widget()
+{
+ return Glib::PropertyProxy<Widget*>(this, "preview-widget");
+}
+
+Glib::PropertyProxy_ReadOnly<Widget*> FileChooser::property_preview_widget() const
+{
+ return Glib::PropertyProxy_ReadOnly<Widget*>(this, "preview-widget");
+}
+
+Glib::PropertyProxy<bool> FileChooser::property_preview_widget_active()
+{
+ return Glib::PropertyProxy<bool>(this, "preview-widget-active");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> FileChooser::property_preview_widget_active() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "preview-widget-active");
+}
+
+Glib::PropertyProxy<bool> FileChooser::property_use_preview_label()
+{
+ return Glib::PropertyProxy<bool>(this, "use-preview-label");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> FileChooser::property_use_preview_label() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "use-preview-label");
+}
+
+Glib::PropertyProxy<Widget*> FileChooser::property_extra_widget()
+{
+ return Glib::PropertyProxy<Widget*>(this, "extra-widget");
+}
+
+Glib::PropertyProxy_ReadOnly<Widget*> FileChooser::property_extra_widget() const
+{
+ return Glib::PropertyProxy_ReadOnly<Widget*>(this, "extra-widget");
+}
+
+Glib::PropertyProxy<bool> FileChooser::property_select_multiple()
+{
+ return Glib::PropertyProxy<bool>(this, "select-multiple");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> FileChooser::property_select_multiple() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "select-multiple");
+}
+
+Glib::PropertyProxy<bool> FileChooser::property_show_hidden()
+{
+ return Glib::PropertyProxy<bool>(this, "show-hidden");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> FileChooser::property_show_hidden() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "show-hidden");
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/filechooser.h b/libs/gtkmm2/gtk/gtkmm/filechooser.h
new file mode 100644
index 0000000000..2bbc5954ab
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/filechooser.h
@@ -0,0 +1,935 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_FILECHOOSER_H
+#define _GTKMM_FILECHOOSER_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 2003 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/widget.h>
+#include <gtkmm/filefilter.h>
+#include <glibmm/interface.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkFileChooser GtkFileChooser;
+typedef struct _GtkFileChooserClass GtkFileChooserClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class FileChooser_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** @addtogroup gtkmmEnums Enums and Flags */
+
+/**
+ * @ingroup gtkmmEnums
+ */
+enum FileChooserAction
+{
+ FILE_CHOOSER_ACTION_OPEN,
+ FILE_CHOOSER_ACTION_SAVE,
+ FILE_CHOOSER_ACTION_SELECT_FOLDER,
+ FILE_CHOOSER_ACTION_CREATE_FOLDER
+};
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::FileChooserAction> : public Glib::Value_Enum<Gtk::FileChooserAction>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+
+//TODO: //Is GTK_FILE_SYSTEM_ERROR really part of the public API? For instance, do app writers ever need to check for it?.
+//If so, then it needs to have a generated get_type() function, like the others. murrayc.
+//_TODO_GERROR(FileSystemError,GtkFileSystemError,GTK_FILE_SYSTEM_ERROR)
+
+/** Exception class for Gdk::FileChooser errors.
+ */
+class FileChooserError : public Glib::Error
+{
+public:
+ enum Code
+ {
+ NONEXISTENT,
+ BAD_FILENAME
+ };
+
+ FileChooserError(Code error_code, const Glib::ustring& error_message);
+ explicit FileChooserError(GError* gobject);
+ Code code() const;
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+private:
+ static void throw_func(GError* gobject);
+ friend void wrap_init(); // uses throw_func()
+#endif
+};
+
+} // namespace Gtk
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::FileChooserError::Code> : public Glib::Value_Enum<Gtk::FileChooserError::Code>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+
+/**
+ * Gtk::FileChooser is an interface that can be implemented by file selection
+ * widgets. In gtkmm, the main objects that implement this interface are
+ * FileChooserWidget and FileChooserDialog. You do not need to write an
+ * object that implements the FileChooser interface unless you are trying to
+ * adapt an existing file selector to expose a standard programming interface.
+ *
+ * @par File Names and Encodings
+ * When the user is finished selecting files in a FileChooser, your program
+ * can get the selected names either as filenames or as URIs. For URIs, the
+ * normal escaping rules are applied if the URI contains non-ASCII characters.
+ * However, filenames are always returned in the character set specified by the
+ * G_FILENAME_ENCODING environment variable. Please see the Glib documentation
+ * for more details about this variable.
+ *
+ * @par Important
+ * This means that while you can pass the result of FileChooser::get_filename()
+ * to <tt>open(2)</tt> or <tt>fopen(3)</tt>, you may not be able to directly
+ * set it as the text of a Gtk::Label widget unless you convert it first to
+ * UTF-8, which all gtkmm widgets expect. You should use
+ * Glib::filename_to_utf8() to convert filenames into strings that can be
+ * passed to gtkmm widgets.
+ *
+ * @note
+ * The gtkmm FileChooser API is broken in that methods return Glib::ustring
+ * even though the returned string is not necessarily UTF-8 encoded. Any
+ * FileChooser method that takes or returns a filename (not a URI) should
+ * have std::string as parameter or return type. Fortunately this mistake
+ * doesn't prevent you from handling filenames correctly in your application.
+ * Just pretend that the API uses std::string and call Glib::filename_to_utf8()
+ * or Glib::filename_from_utf8() as appropriate.
+ *
+ * See http://bugzilla.gnome.org/show_bug.cgi?id=142138 for more information.
+ */
+
+class FileChooser : public Glib::Interface
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef FileChooser CppObjectType;
+ typedef FileChooser_Class CppClassType;
+ typedef GtkFileChooser BaseObjectType;
+ typedef GtkFileChooserClass BaseClassType;
+
+private:
+ friend class FileChooser_Class;
+ static CppClassType filechooser_class_;
+
+ // noncopyable
+ FileChooser(const FileChooser&);
+ FileChooser& operator=(const FileChooser&);
+
+protected:
+ FileChooser(); // you must derive from this class
+ explicit FileChooser(GtkFileChooser* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~FileChooser();
+
+ static void add_interface(GType gtype_implementer);
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ GtkFileChooser* gobj() { return reinterpret_cast<GtkFileChooser*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const GtkFileChooser* gobj() const { return reinterpret_cast<GtkFileChooser*>(gobject_); }
+
+private:
+
+public:
+
+
+ /** Sets the type of operation that that the chooser is performing; the
+ * user interface is adapted to suit the selected action. For example,
+ * an option to create a new folder might be shown if the action is
+ * Gtk::FILE_CHOOSER_ACTION_SAVE but not if the action is
+ * Gtk::FILE_CHOOSER_ACTION_OPEN.
+ *
+ * Since: 2.4
+ * @param action The action that the file selector is performing.
+ */
+ void set_action(FileChooserAction action);
+
+ /** Gets the type of operation that the file chooser is performing; see
+ * set_action().
+ * @return The action that the file selector is performing
+ *
+ * Since: 2.4.
+ */
+ FileChooserAction get_action() const;
+
+ /** Sets whether only local files can be selected in the
+ * file selector. If @a local_only is <tt>true</tt> (the default),
+ * then the selected file are files are guaranteed to be
+ * accessible through the operating systems native file
+ * file system and therefore the application only
+ * needs to worry about the filename functions in
+ * Gtk::FileChooser, like get_filename(),
+ * rather than the URI functions like
+ * get_uri(),
+ *
+ * Since: 2.4
+ * @param local_only <tt>true</tt> if only local files can be selected.
+ */
+ void set_local_only(bool local_only = true);
+
+ /** Gets whether only local files can be selected in the
+ * file selector. See set_local_only()
+ * @return <tt>true</tt> if only local files can be selected.
+ *
+ * Since: 2.4.
+ */
+ bool get_local_only() const;
+
+ /** Sets whether multiple files can be selected in the file selector. This is
+ * only relevant if the action is set to be GTK_FILE_CHOOSER_ACTION_OPEN or
+ * GTK_FILE_CHOOSER_ACTION_SAVE. It cannot be set with either of the folder
+ * actions.
+ *
+ * Since: 2.4
+ * @param select_multiple <tt>true</tt> if multiple files can be selected.
+ */
+ void set_select_multiple(bool select_multiple = true);
+
+ /** Gets whether multiple files can be selected in the file
+ * selector. See set_select_multiple().
+ * @return <tt>true</tt> if multiple files can be selected.
+ *
+ * Since: 2.4.
+ */
+ bool get_select_multiple() const;
+
+
+ /** Sets whether hidden files and folders are displayed in the file selector.
+ *
+ * Since: 2.6
+ * @param show_hidden <tt>true</tt> if hidden files and folders should be displayed.
+ */
+ void set_show_hidden(bool show_hidden = true);
+
+ /** Gets whether hidden files and folders are displayed in the file selector.
+ * See set_show_hidden().
+ * @return <tt>true</tt> if hidden files and folders are displayed.
+ *
+ * Since: 2.6.
+ */
+ bool get_show_hidden() const;
+
+
+ /** Sets the current name in the file selector, as if entered
+ * by the user. Note that the name passed in here is a UTF-8
+ * string rather than a filename. This function is meant for
+ * such uses as a suggested name in a "Save As..." dialog.
+ *
+ * If you want to preselect a particular existing file, you
+ * should use set_filename() instead.
+ *
+ * Since: 2.4
+ * @param name The filename to use, as a UTF-8 string.
+ */
+ void set_current_name(const Glib::ustring& name);
+
+ /** Gets the filename for the currently selected file in
+ * the file selector. If multiple files are selected,
+ * one of the filenames will be returned at random.
+ *
+ * If the file chooser is in folder mode, this function returns the selected
+ * folder.
+ * @return The currently selected filename, or an empty string
+ * if no file is selected, or the selected file can't
+ * be represented with a local filename.
+ */
+ Glib::ustring get_filename() const;
+
+ /** Sets @a filename as the current filename for the the file chooser;
+ * If the file name isn't in the current folder of @a chooser , then the
+ * current folder of @a chooser will be changed to the folder containing
+ * @a filename . This is equivalent to a sequence of
+ * unselect_all() followed by select_filename().
+ *
+ * Note that the file must exist, or nothing will be done except
+ * for the directory change. To pre-enter a filename for the user, as in
+ * a save-as dialog, use set_current_name()
+ * @param filename The filename to set as current.
+ * @return <tt>true</tt> if both the folder could be changed and the file was
+ * selected successfully, <tt>false</tt> otherwise.
+ *
+ * Since: 2.4.
+ */
+ bool set_filename(const Glib::ustring& filename);
+
+ /** Selects a filename. If the file name isn't in the current
+ * folder of @a chooser , then the current folder of @a chooser will
+ * be changed to the folder containing @a filename .
+ * @param filename The filename to select.
+ * @return <tt>true</tt> if both the folder could be changed and the file was
+ * selected successfully, <tt>false</tt> otherwise.
+ *
+ * Since: 2.4.
+ */
+ bool select_filename(const Glib::ustring& filename);
+
+ /** Unselects a currently selected filename. If the filename
+ * is not in the current directory, does not exist, or
+ * is otherwise not currently selected, does nothing.
+ *
+ * Since: 2.4
+ * @param filename The filename to unselect.
+ */
+ void unselect_filename(const Glib::ustring& filename);
+
+ /** Selects all the files in the current folder of a file chooser.
+ *
+ * Since: 2.4
+ */
+ void select_all();
+
+ /** Unselects all the files in the current folder of a file chooser.
+ *
+ * Since: 2.4
+ */
+ void unselect_all();
+
+ /** Lists all the selected files and subfolders in the current folder of
+ * @a chooser . The returned names are full absolute paths. If files in the current
+ * folder cannot be represented as local filenames they will be ignored. (See
+ * get_uris())
+ * @return A G::SList containing the filenames of all selected
+ * files and subfolders in the current folder. Free the returned list
+ * with Glib::slist_free(), and the filenames with Glib::free().
+ *
+ * Since: 2.4.
+ */
+ Glib::SListHandle<Glib::ustring> get_filenames() const;
+
+ /** Sets the current folder for @a chooser from a local filename.
+ * The user will be shown the full contents of the current folder,
+ * plus user interface elements for navigating to other folders.
+ * @param filename The full path of the new current folder.
+ * @return <tt>true</tt> if the folder could be changed successfully, <tt>false</tt>
+ * otherwise.
+ *
+ * Since: 2.4.
+ */
+ bool set_current_folder(const Glib::ustring& filename);
+
+ /** Gets the current folder of @a chooser as a local filename.
+ * See set_current_folder().
+ * @return The full path of the current folder, or <tt>0</tt>
+ * if the current path cannot be represented as a local filename.
+ * Free with Glib::free().
+ *
+ * Since: 2.4.
+ */
+ Glib::ustring get_current_folder() const;
+
+
+/* URI manipulation
+ */
+
+ /** Gets the URI for the currently selected file in
+ * the file selector. If multiple files are selected,
+ * one of the filenames will be returned at random.
+ *
+ * If the file chooser is in folder mode, this function returns the selected
+ * folder.
+ * @return The currently selected URI, or an empty string
+ * if no file is selected.
+ */
+ Glib::ustring get_uri() const;
+
+ /** Sets the file referred to by @a uri as the current file for the the
+ * file chooser; If the file name isn't in the current folder of @a chooser ,
+ * then the current folder of @a chooser will be changed to the folder containing
+ * @a uri . This is equivalent to a sequence of unselect_all()
+ * followed by select_uri().
+ *
+ * Note that the file must exist, or nothing will be done except
+ * for the directory change. To pre-enter a filename for the user, as in
+ * a save-as dialog, use set_current_name()
+ * @param uri The URI to set as current.
+ * @return <tt>true</tt> if both the folder could be changed and the URI was
+ * selected successfully, <tt>false</tt> otherwise.
+ *
+ * Since: 2.4.
+ */
+ bool set_uri(const Glib::ustring& uri);
+
+ /** Selects the file to by @a uri . If the URI doesn't refer to a
+ * file in the current folder of @a chooser , then the current folder of
+ * @a chooser will be changed to the folder containing @a filename .
+ * @param uri The URI to select.
+ * @return <tt>true</tt> if both the folder could be changed and the URI was
+ * selected successfully, <tt>false</tt> otherwise.
+ *
+ * Since: 2.4.
+ */
+ bool select_uri(const Glib::ustring& uri);
+
+ /** Unselects the file referred to by @a uri . If the file
+ * is not in the current directory, does not exist, or
+ * is otherwise not currently selected, does nothing.
+ *
+ * Since: 2.4
+ * @param uri The URI to unselect.
+ */
+ void unselect_uri(const Glib::ustring& uri);
+
+ /** Lists all the selected files and subfolders in the current folder of
+ * @a chooser . The returned names are full absolute URIs.
+ * @return A G::SList containing the URIs of all selected
+ * files and subfolders in the current folder. Free the returned list
+ * with Glib::slist_free(), and the filenames with Glib::free().
+ *
+ * Since: 2.4.
+ */
+ Glib::SListHandle<Glib::ustring> get_uris() const;
+
+
+ /** Sets the current folder for @a chooser from an URI.
+ * The user will be shown the full contents of the current folder,
+ * plus user interface elements for navigating to other folders.
+ * @param uri The URI for the new current folder.
+ * @return <tt>true</tt> if the folder could be changed successfully, <tt>false</tt>
+ * otherwise.
+ *
+ * Since: 2.4.
+ */
+ bool set_current_folder_uri(const Glib::ustring& uri);
+
+ /** Gets the current folder of @a chooser as an URI.
+ * See set_current_folder_uri().
+ * @return The URI for the current folder.
+ */
+ Glib::ustring get_current_folder_uri() const;
+
+/* Preview widget
+ */
+
+ /** Sets an application-supplied widget to use to display a custom preview
+ * of the currently selected file. To implement a preview, after setting the
+ * preview widget, you connect to the ::update-preview
+ * signal, and call get_preview_filename() or
+ * get_preview_uri() on each change. If you can
+ * display a preview of the new file, update your widget and
+ * set the preview active using set_preview_widget_active().
+ * Otherwise, set the preview inactive.
+ *
+ * When there is no application-supplied preview widget, or the
+ * application-supplied preview widget is not active, the file chooser
+ * may display an internally generated preview of the current file or
+ * it may display no preview at all.
+ *
+ * Since: 2.4
+ * @param preview_widget Widget for displaying preview.
+ */
+ void set_preview_widget(Gtk::Widget& preview_widget);
+
+ /** Gets the current preview widget; see
+ * set_preview_widget().
+ * @return The current preview widget, or <tt>0</tt>
+ *
+ * Since: 2.4.
+ */
+ const Gtk::Widget* get_preview_widget() const;
+
+ /** Gets the current preview widget; see
+ * set_preview_widget().
+ * @return The current preview widget, or <tt>0</tt>
+ *
+ * Since: 2.4.
+ */
+ Gtk::Widget* get_preview_widget();
+
+ /** Sets whether the preview widget set by
+ * set_preview_widget_active() should be shown for the
+ * current filename. When @a active is set to false, the file chooser
+ * may display an internally generated preview of the current file
+ * or it may display no preview at all. See
+ * set_preview_widget() for more details.
+ *
+ * Since: 2.4
+ * @param active Whether to display the user-specified preview widget.
+ */
+ void set_preview_widget_active(bool active = true);
+
+ /** Gets whether the preview widget set by set_preview_widget()
+ * should be shown for the current filename. See
+ * set_preview_widget_active().
+ * @return <tt>true</tt> if the preview widget is active for the current filename.
+ *
+ * Since: 2.4.
+ */
+ bool get_preview_widget_active() const;
+
+
+ /** Sets whether the file chooser should display a stock label with the name of
+ * the file that is being previewed; the default is <tt>true</tt>. Applications that
+ * want to draw the whole preview area themselves should set this to <tt>false</tt> and
+ * display the name themselves in their preview widget.
+ *
+ * See also: set_preview_widget()
+ *
+ * Since: 2.4
+ * @param use_label Whether to display a stock label with the name of the previewed file.
+ */
+ void set_use_preview_label(bool use_label = true);
+
+ /** Gets whether a stock label should be drawn with the name of the previewed
+ * file. See set_use_preview_label().
+ * @return <tt>true</tt> if the file chooser is set to display a label with the
+ * name of the previewed file, <tt>false</tt> otherwise.
+ */
+ bool get_use_preview_label() const;
+
+
+ /** Gets the filename that should be previewed in a custom preview
+ * widget. See set_preview_widget().
+ * @return The filename to preview, or an empty string if no file
+ * is selected, or if the selected file cannot be represented
+ * as a local filename.
+ */
+ Glib::ustring get_preview_filename() const;
+
+ /** Gets the URI that should be previewed in a custom preview
+ * widget. See set_preview_widget().
+ * @return The URI for the file to preview, or an empty string if no file is
+ * selected.
+ */
+ Glib::ustring get_preview_uri() const;
+
+/* Extra widget
+ */
+
+ /** Sets an application-supplied widget to provide extra options to the user.
+ *
+ * Since: 2.4
+ * @param extra_widget Widget for extra options.
+ */
+ void set_extra_widget(Gtk::Widget& extra_widget);
+
+ /** Gets the current preview widget; see
+ * set_extra_widget().
+ * @return The current extra widget, or <tt>0</tt>
+ *
+ * Since: 2.4.
+ */
+ Gtk::Widget* get_extra_widget();
+
+ /** Gets the current preview widget; see
+ * set_extra_widget().
+ * @return The current extra widget, or <tt>0</tt>
+ *
+ * Since: 2.4.
+ */
+ const Gtk::Widget* get_extra_widget() const;
+
+/* List of user selectable filters
+ */
+
+ /** Adds @a filter to the list of filters that the user can select between.
+ * When a filter is selected, only files that are passed by that
+ * filter are displayed.
+ *
+ * Since: 2.4
+ * @param filter A Gtk::FileFilter.
+ */
+ void add_filter(const FileFilter& filter);
+
+ /** Removes @a filter from the list of filters that the user can select between.
+ *
+ * Since: 2.4
+ * @param filter A Gtk::FileFilter.
+ */
+ void remove_filter (const FileFilter& filter);
+
+
+ /** Lists the current set of user-selectable filters; see
+ * add_filter(), remove_filter().
+ * @return A G::SList containing the current set of
+ * user selectable filters. The contents of the list are
+ * owned by GTK+, but you must free the list itself with
+ * Glib::slist_free() when you are done with it.
+ *
+ * Since: 2.4.
+ */
+ Glib::SListHandle< FileFilter* > list_filters();
+
+ /** Lists the current set of user-selectable filters; see
+ * add_filter(), remove_filter().
+ * @return A G::SList containing the current set of
+ * user selectable filters. The contents of the list are
+ * owned by GTK+, but you must free the list itself with
+ * Glib::slist_free() when you are done with it.
+ *
+ * Since: 2.4.
+ */
+ Glib::SListHandle< const FileFilter* > list_filters() const;
+
+/* Current filter
+ */
+
+ /** Sets the current filter; only the files that pass the
+ * filter will be displayed. If the user-selectable list of filters
+ * is non-empty, then the filter should be one of the filters
+ * in that list. Setting the current filter when the list of
+ * filters is empty is useful if you want to restrict the displayed
+ * set of files without letting the user change it.
+ *
+ * Since: 2.4
+ * @param filter A Gtk::FileFilter.
+ */
+ void set_filter(const FileFilter& filter);
+
+ /** Gets the current filter; see set_filter().
+ * @return The current filter, or <tt>0</tt>
+ *
+ * Since: 2.4.
+ */
+ FileFilter* get_filter();
+
+ /** Gets the current filter; see set_filter().
+ * @return The current filter, or <tt>0</tt>
+ *
+ * Since: 2.4.
+ */
+ const FileFilter* get_filter() const;
+
+/* Per-application shortcut folders */
+
+
+ /** Adds a folder to be displayed with the shortcut folders in a file chooser.
+ * Note that shortcut folders do not get saved, as they are provided by the
+ * application. For example, you can use this to add a
+ * "/usr/share/mydrawprogram/Clipart" folder to the volume list.
+ * @param folder Filename of the folder to add.
+ * @return <tt>true</tt> if the folder could be added successfully, <tt>false</tt>
+ * otherwise. In the latter case, the @a error will be set as appropriate.
+ *
+ * Since: 2.4.
+ */
+ bool add_shortcut_folder(const Glib::ustring& folder);
+
+ /** Removes a folder from a file chooser's list of shortcut folders.
+ * @param folder Filename of the folder to remove.
+ * @return <tt>true</tt> if the operation succeeds, <tt>false</tt> otherwise.
+ * In the latter case, the @a error will be set as appropriate.
+ *
+ * See also: add_shortcut_folder()
+ *
+ * Since: 2.4.
+ */
+ bool remove_shortcut_folder(const Glib::ustring& folder);
+
+ /** Queries the list of shortcut folders in the file chooser, as set by
+ * add_shortcut_folder().
+ * @return A list of folder filenames, or <tt>0</tt> if there are no shortcut
+ * folders. Free the returned list with Glib::slist_free(), and the filenames with
+ * Glib::free().
+ *
+ * Since: 2.4.
+ */
+ Glib::SListHandle<Glib::ustring> list_shortcut_folders() const;
+
+
+ /** Adds a folder URI to be displayed with the shortcut folders in a file
+ * chooser. Note that shortcut folders do not get saved, as they are provided
+ * by the application. For example, you can use this to add a
+ * "file:///usr/share/mydrawprogram/Clipart" folder to the volume list.
+ * @param uri URI of the folder to add.
+ * @return <tt>true</tt> if the folder could be added successfully, <tt>false</tt>
+ * otherwise. In the latter case, the @a error will be set as appropriate.
+ *
+ * Since: 2.4.
+ */
+ bool add_shortcut_folder_uri(const Glib::ustring& uri);
+
+ /** Removes a folder URI from a file chooser's list of shortcut folders.
+ * @param uri URI of the folder to remove.
+ * @return <tt>true</tt> if the operation succeeds, <tt>false</tt> otherwise.
+ * In the latter case, the @a error will be set as appropriate.
+ *
+ * See also: add_shortcut_folder_uri()
+ *
+ * Since: 2.4.
+ */
+ bool remove_shortcut_folder_uri(const Glib::ustring& uri);
+
+ /** Queries the list of shortcut folders in the file chooser, as set by
+ * add_shortcut_folder_uri().
+ * @return A list of folder URIs, or <tt>0</tt> if there are no shortcut
+ * folders. Free the returned list with Glib::slist_free(), and the URIs with
+ * Glib::free().
+ *
+ * Since: 2.4.
+ */
+ Glib::SListHandle<Glib::ustring> list_shortcut_folder_uris() const;
+
+
+ Glib::SignalProxy0< void > signal_current_folder_changed();
+
+
+ Glib::SignalProxy0< void > signal_selection_changed();
+
+
+ Glib::SignalProxy0< void > signal_update_preview();
+
+
+ Glib::SignalProxy0< void > signal_file_activated();
+
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<FileChooserAction> property_action() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<FileChooserAction> property_action() const;
+
+ //TODO: _WRAP_PROPERTY("file-system", FileSystem) //FileSystem is not really public API.
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<FileFilter*> property_filter() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<FileFilter*> property_filter() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_folder_mode() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_folder_mode() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_local_only() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_local_only() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Widget*> property_preview_widget() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Widget*> property_preview_widget() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_preview_widget_active() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_preview_widget_active() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_use_preview_label() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_use_preview_label() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Widget*> property_extra_widget() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Widget*> property_extra_widget() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_select_multiple() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_select_multiple() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_show_hidden() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_show_hidden() const;
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::FileChooser
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Gtk::FileChooser> wrap(GtkFileChooser* object, bool take_copy = false);
+
+} // namespace Glib
+
+#endif /* _GTKMM_FILECHOOSER_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/filechooserbutton.cc b/libs/gtkmm2/gtk/gtkmm/filechooserbutton.cc
new file mode 100644
index 0000000000..ebdc540ddd
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/filechooserbutton.cc
@@ -0,0 +1,203 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/filechooserbutton.h>
+#include <gtkmm/private/filechooserbutton_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 2003 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkfilechooserbutton.h>
+
+namespace Gtk
+{
+
+FileChooserButton::FileChooserButton(FileChooserAction action)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::HBox(Glib::ConstructParams(filechooserbutton_class_.init(), "action",action, (char*) 0))
+{
+}
+
+
+} // namespace Gtk
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::FileChooserButton* wrap(GtkFileChooserButton* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::FileChooserButton *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& FileChooserButton_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &FileChooserButton_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_file_chooser_button_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ FileChooser::add_interface(get_type());
+ }
+
+ return *this;
+}
+
+void FileChooserButton_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* FileChooserButton_Class::wrap_new(GObject* o)
+{
+ return manage(new FileChooserButton((GtkFileChooserButton*)(o)));
+
+}
+
+
+/* The implementation: */
+
+FileChooserButton::FileChooserButton(const Glib::ConstructParams& construct_params)
+:
+ Gtk::HBox(construct_params)
+{
+ }
+
+FileChooserButton::FileChooserButton(GtkFileChooserButton* castitem)
+:
+ Gtk::HBox((GtkHBox*)(castitem))
+{
+ }
+
+FileChooserButton::~FileChooserButton()
+{
+ destroy_();
+}
+
+FileChooserButton::CppClassType FileChooserButton::filechooserbutton_class_; // initialize static member
+
+GType FileChooserButton::get_type()
+{
+ return filechooserbutton_class_.init().get_type();
+}
+
+GType FileChooserButton::get_base_type()
+{
+ return gtk_file_chooser_button_get_type();
+}
+
+
+FileChooserButton::FileChooserButton(const Glib::ustring& title, FileChooserAction action)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::HBox(Glib::ConstructParams(filechooserbutton_class_.init(), "title", title.c_str(), "action", ((GtkFileChooserAction)(action)), (char*) 0))
+{
+ }
+
+FileChooserButton::FileChooserButton(const Glib::ustring& title, FileChooserAction action, const Glib::ustring& backend)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::HBox(Glib::ConstructParams(filechooserbutton_class_.init(), "title", title.c_str(), "action", ((GtkFileChooserAction)(action)), "backend", backend.c_str(), (char*) 0))
+{
+ }
+
+FileChooserButton::FileChooserButton(FileChooserDialog& dialog)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::HBox(Glib::ConstructParams(filechooserbutton_class_.init(), "dialog", (dialog).Gtk::Widget::gobj(), (char*) 0))
+{
+ }
+
+Glib::ustring FileChooserButton::get_title() const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(gtk_file_chooser_button_get_title(const_cast<GtkFileChooserButton*>(gobj())));
+}
+
+void FileChooserButton::set_title(const Glib::ustring& title)
+{
+ gtk_file_chooser_button_set_title(gobj(), title.c_str());
+}
+
+int FileChooserButton::get_width_chars() const
+{
+ return gtk_file_chooser_button_get_width_chars(const_cast<GtkFileChooserButton*>(gobj()));
+}
+
+void FileChooserButton::set_width_chars(int n_chars)
+{
+ gtk_file_chooser_button_set_width_chars(gobj(), n_chars);
+}
+
+
+Glib::PropertyProxy_ReadOnly<FileChooserDialog*> FileChooserButton::property_dialog() const
+{
+ return Glib::PropertyProxy_ReadOnly<FileChooserDialog*>(this, "dialog");
+}
+
+Glib::PropertyProxy<Glib::ustring> FileChooserButton::property_title()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "title");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> FileChooserButton::property_title() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "title");
+}
+
+Glib::PropertyProxy<int> FileChooserButton::property_width_chars()
+{
+ return Glib::PropertyProxy<int>(this, "width-chars");
+}
+
+Glib::PropertyProxy_ReadOnly<int> FileChooserButton::property_width_chars() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "width-chars");
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/filechooserbutton.h b/libs/gtkmm2/gtk/gtkmm/filechooserbutton.h
new file mode 100644
index 0000000000..0865ac58e6
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/filechooserbutton.h
@@ -0,0 +1,234 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_FILECHOOSERBUTTON_H
+#define _GTKMM_FILECHOOSERBUTTON_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* filechooserbutton.h
+ *
+ * Copyright (C) 2003 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/box.h>
+#include <gtkmm/filechooserdialog.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkFileChooserButton GtkFileChooserButton;
+typedef struct _GtkFileChooserButtonClass GtkFileChooserButtonClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class FileChooserButton_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** A button to launch a file chooser dialog.
+ *
+ * This widget lets the user select a file. It implements the FileChooser interface. Visually, it is a file name with a
+ * button to bring up a FileChooserDialog. The user can then use that dialog to change the file associated with that
+ * button. This widget does not support setting the "select_multiple" property to true.
+ *
+ * The FileChooserButton supports the FileChooserActions FILE_CHOOSER_ACTION_OPEN and FILE_CHOOSER_ACTION_SELECT_FOLDER.
+ *
+ * The FileChooserButton will ellipsize the label, and will thus request little horizontal space. To give the button more
+ * space, you should call size_request(), set_width_chars(), or pack the button in such a way that other interface
+ * elements give space to the widget.
+ *
+ * @ingroup Widgets
+ */
+
+class FileChooserButton
+ : public HBox,
+ public FileChooser
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef FileChooserButton CppObjectType;
+ typedef FileChooserButton_Class CppClassType;
+ typedef GtkFileChooserButton BaseObjectType;
+ typedef GtkFileChooserButtonClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~FileChooserButton();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class FileChooserButton_Class;
+ static CppClassType filechooserbutton_class_;
+
+ // noncopyable
+ FileChooserButton(const FileChooserButton&);
+ FileChooserButton& operator=(const FileChooserButton&);
+
+protected:
+ explicit FileChooserButton(const Glib::ConstructParams& construct_params);
+ explicit FileChooserButton(GtkFileChooserButton* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkFileChooserButton* gobj() { return reinterpret_cast<GtkFileChooserButton*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkFileChooserButton* gobj() const { return reinterpret_cast<GtkFileChooserButton*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+
+public:
+
+ /** Creates a new file-selecting button widget with the default title.
+ * @param title The title of the browse dialog.
+ * @param action The open mode for the widget.
+ * @param backend The name of the Gtk::FileSystem backend to use.
+ */
+ explicit FileChooserButton(FileChooserAction action = FILE_CHOOSER_ACTION_OPEN);
+
+ /** Creates a new file-selecting button widget.
+ *
+ * @param title The title of the browse dialog.
+ * @param action The open mode for the widget.
+ */
+ explicit FileChooserButton(const Glib::ustring& title, FileChooserAction action = FILE_CHOOSER_ACTION_OPEN);
+
+ /** Creates a new file-selecting button widget using backend.
+ *
+ * @param title The title of the browse dialog.
+ * @param action The open mode for the widget.
+ * @param backend The name of the Gtk::FileSystem backend to use.
+ */
+ explicit FileChooserButton(const Glib::ustring& title, FileChooserAction action, const Glib::ustring& backend);
+
+ /** Creates a new file-selecting button widget which uses dialog as its file-picking window.
+ *
+ * @param dialog The dialog to use.
+ */
+ explicit FileChooserButton(FileChooserDialog& dialog);
+
+
+ /** Retrieves the title of the browse dialog used by @a button . The returned value
+ * should not be modified or freed.
+ * @return A pointer to the browse dialog's title.
+ *
+ * Since: 2.6.
+ */
+ Glib::ustring get_title() const;
+
+ /** Modifies the @a title of the browse dialog used by @a button .
+ *
+ * Since: 2.6
+ * @param title The new browse dialog title.
+ */
+ void set_title(const Glib::ustring& title);
+
+
+ /** Retrieves the width in characters of the @a button widget's entry and/or label.
+ * @return An integer width (in characters) that the button will use to size itself.
+ *
+ * Since: 2.6.
+ */
+ int get_width_chars() const;
+
+ /** Sets the width (in characters) that @a button will use to @a n_chars .
+ *
+ * Since: 2.6
+ * @param n_chars The new width, in chracters.
+ */
+ void set_width_chars(int n_chars);
+
+
+ /** The file chooser dialog to use.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<FileChooserDialog*> property_dialog() const;
+
+
+ /** The title of the file chooser dialog.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_title() ;
+
+/** The title of the file chooser dialog.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_title() const;
+
+ /** The desired width of the button widget
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_width_chars() ;
+
+/** The desired width of the button widget
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_width_chars() const;
+
+
+};
+
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::FileChooserButton
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::FileChooserButton* wrap(GtkFileChooserButton* object, bool take_copy = false);
+}
+#endif /* _GTKMM_FILECHOOSERBUTTON_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/filechooserdialog.cc b/libs/gtkmm2/gtk/gtkmm/filechooserdialog.cc
new file mode 100644
index 0000000000..88dc4078e5
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/filechooserdialog.cc
@@ -0,0 +1,158 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/filechooserdialog.h>
+#include <gtkmm/private/filechooserdialog_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 2003 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkfilechooserdialog.h>
+
+
+namespace Gtk
+{
+
+FileChooserDialog::FileChooserDialog(Gtk::Window& parent, const Glib::ustring& title, FileChooserAction action)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Dialog(Glib::ConstructParams(filechooserdialog_class_.init(), "title",title.c_str(),"action",(GtkFileChooserAction)action, (char*) 0))
+{
+ set_transient_for(parent);
+}
+
+FileChooserDialog::FileChooserDialog(const Glib::ustring& title, FileChooserAction action)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Dialog(Glib::ConstructParams(filechooserdialog_class_.init(), "title",title.c_str(),"action",(GtkFileChooserAction)action, (char*) 0))
+{
+}
+
+FileChooserDialog::FileChooserDialog(const Glib::ustring& title, FileChooserAction action, const Glib::ustring& backend)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Dialog(Glib::ConstructParams(filechooserdialog_class_.init(), "title",title.c_str(),"action",(GtkFileChooserAction)action,"file-system-backend",backend.c_str(), (char*) 0))
+{
+}
+
+FileChooserDialog::FileChooserDialog(Gtk::Window& parent, const Glib::ustring& title, FileChooserAction action, const Glib::ustring& backend)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Dialog(Glib::ConstructParams(filechooserdialog_class_.init(), "title",title.c_str(),"action",(GtkFileChooserAction)action,"file-system-backend",backend.c_str(), (char*) 0))
+{
+ set_transient_for(parent);
+}
+
+} // namespace Gtk
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::FileChooserDialog* wrap(GtkFileChooserDialog* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::FileChooserDialog *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& FileChooserDialog_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &FileChooserDialog_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_file_chooser_dialog_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ FileChooser::add_interface(get_type());
+ }
+
+ return *this;
+}
+
+void FileChooserDialog_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* FileChooserDialog_Class::wrap_new(GObject* o)
+{
+ return new FileChooserDialog((GtkFileChooserDialog*)(o)); //top-level windows can not be manage()ed.
+
+}
+
+
+/* The implementation: */
+
+FileChooserDialog::FileChooserDialog(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Dialog(construct_params)
+{
+ }
+
+FileChooserDialog::FileChooserDialog(GtkFileChooserDialog* castitem)
+:
+ Gtk::Dialog((GtkDialog*)(castitem))
+{
+ }
+
+FileChooserDialog::~FileChooserDialog()
+{
+ destroy_();
+}
+
+FileChooserDialog::CppClassType FileChooserDialog::filechooserdialog_class_; // initialize static member
+
+GType FileChooserDialog::get_type()
+{
+ return filechooserdialog_class_.init().get_type();
+}
+
+GType FileChooserDialog::get_base_type()
+{
+ return gtk_file_chooser_dialog_get_type();
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/filechooserdialog.h b/libs/gtkmm2/gtk/gtkmm/filechooserdialog.h
new file mode 100644
index 0000000000..08ba746815
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/filechooserdialog.h
@@ -0,0 +1,129 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_FILECHOOSERDIALOG_H
+#define _GTKMM_FILECHOOSERDIALOG_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* filechooserdialog.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/dialog.h>
+#include <gtkmm/filechooser.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkFileChooserDialog GtkFileChooserDialog;
+typedef struct _GtkFileChooserDialogClass GtkFileChooserDialogClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class FileChooserDialog_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** Convenient file chooser window.
+ *
+ * @ingroup Dialogs
+ */
+
+class FileChooserDialog
+ : public Dialog,
+ public FileChooser
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef FileChooserDialog CppObjectType;
+ typedef FileChooserDialog_Class CppClassType;
+ typedef GtkFileChooserDialog BaseObjectType;
+ typedef GtkFileChooserDialogClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~FileChooserDialog();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class FileChooserDialog_Class;
+ static CppClassType filechooserdialog_class_;
+
+ // noncopyable
+ FileChooserDialog(const FileChooserDialog&);
+ FileChooserDialog& operator=(const FileChooserDialog&);
+
+protected:
+ explicit FileChooserDialog(const Glib::ConstructParams& construct_params);
+ explicit FileChooserDialog(GtkFileChooserDialog* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkFileChooserDialog* gobj() { return reinterpret_cast<GtkFileChooserDialog*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkFileChooserDialog* gobj() const { return reinterpret_cast<GtkFileChooserDialog*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+
+public:
+
+ explicit FileChooserDialog(Gtk::Window& parent, const Glib::ustring& title, FileChooserAction action = FILE_CHOOSER_ACTION_OPEN);
+ explicit FileChooserDialog(const Glib::ustring& title, FileChooserAction action = FILE_CHOOSER_ACTION_OPEN);
+
+
+ explicit FileChooserDialog(Gtk::Window& parent, const Glib::ustring& title, FileChooserAction action, const Glib::ustring& backend);
+ explicit FileChooserDialog(const Glib::ustring& title, FileChooserAction action, const Glib::ustring& backend);
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::FileChooserDialog
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::FileChooserDialog* wrap(GtkFileChooserDialog* object, bool take_copy = false);
+}
+#endif /* _GTKMM_FILECHOOSERDIALOG_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/filechooserwidget.cc b/libs/gtkmm2/gtk/gtkmm/filechooserwidget.cc
new file mode 100644
index 0000000000..db14e802eb
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/filechooserwidget.cc
@@ -0,0 +1,150 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/filechooserwidget.h>
+#include <gtkmm/private/filechooserwidget_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkfilechooserwidget.h>
+
+namespace Gtk
+{
+
+
+} // namespace Gtk
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::FileChooserWidget* wrap(GtkFileChooserWidget* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::FileChooserWidget *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& FileChooserWidget_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &FileChooserWidget_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_file_chooser_widget_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ FileChooser::add_interface(get_type());
+ }
+
+ return *this;
+}
+
+void FileChooserWidget_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* FileChooserWidget_Class::wrap_new(GObject* o)
+{
+ return manage(new FileChooserWidget((GtkFileChooserWidget*)(o)));
+
+}
+
+
+/* The implementation: */
+
+FileChooserWidget::FileChooserWidget(const Glib::ConstructParams& construct_params)
+:
+ Gtk::VBox(construct_params)
+{
+ }
+
+FileChooserWidget::FileChooserWidget(GtkFileChooserWidget* castitem)
+:
+ Gtk::VBox((GtkVBox*)(castitem))
+{
+ }
+
+FileChooserWidget::~FileChooserWidget()
+{
+ destroy_();
+}
+
+FileChooserWidget::CppClassType FileChooserWidget::filechooserwidget_class_; // initialize static member
+
+GType FileChooserWidget::get_type()
+{
+ return filechooserwidget_class_.init().get_type();
+}
+
+GType FileChooserWidget::get_base_type()
+{
+ return gtk_file_chooser_widget_get_type();
+}
+
+
+FileChooserWidget::FileChooserWidget()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::VBox(Glib::ConstructParams(filechooserwidget_class_.init()))
+{
+ }
+
+FileChooserWidget::FileChooserWidget(FileChooserAction action)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::VBox(Glib::ConstructParams(filechooserwidget_class_.init(), "action", ((GtkFileChooserAction)(action)), (char*) 0))
+{
+ }
+
+FileChooserWidget::FileChooserWidget(FileChooserAction action, const Glib::ustring& backend)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::VBox(Glib::ConstructParams(filechooserwidget_class_.init(), "action", ((GtkFileChooserAction)(action)), "backend", backend.c_str(), (char*) 0))
+{
+ }
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/filechooserwidget.h b/libs/gtkmm2/gtk/gtkmm/filechooserwidget.h
new file mode 100644
index 0000000000..fa8afffd6c
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/filechooserwidget.h
@@ -0,0 +1,140 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_FILECHOOSERWIDGET_H
+#define _GTKMM_FILECHOOSERWIDGET_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* box.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/box.h>
+#include <gtkmm/filechooser.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkFileChooserWidget GtkFileChooserWidget;
+typedef struct _GtkFileChooserWidgetClass GtkFileChooserWidgetClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class FileChooserWidget_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** File chooser widget that can be embedded in other widgets.
+ *
+ * FileChooserWidget is a widget suitable for selecting files. It is the main
+ * building block of a Gtk::FileChooserDialog. Most applications will only need to use
+ * the latter; you can use FileChooserWidget as part of a larger window if you have
+ * special needs.
+ *
+ * @ingroup Widgets
+ */
+
+class FileChooserWidget
+: public VBox,
+ public FileChooser
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef FileChooserWidget CppObjectType;
+ typedef FileChooserWidget_Class CppClassType;
+ typedef GtkFileChooserWidget BaseObjectType;
+ typedef GtkFileChooserWidgetClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~FileChooserWidget();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class FileChooserWidget_Class;
+ static CppClassType filechooserwidget_class_;
+
+ // noncopyable
+ FileChooserWidget(const FileChooserWidget&);
+ FileChooserWidget& operator=(const FileChooserWidget&);
+
+protected:
+ explicit FileChooserWidget(const Glib::ConstructParams& construct_params);
+ explicit FileChooserWidget(GtkFileChooserWidget* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkFileChooserWidget* gobj() { return reinterpret_cast<GtkFileChooserWidget*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkFileChooserWidget* gobj() const { return reinterpret_cast<GtkFileChooserWidget*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+
+public:
+ FileChooserWidget();
+
+ /** Creates a file chooser widget that can be embedded in other widgets.
+ *
+ * Creates a new FileChooserWidget. This is a file chooser widget that can be embedded in
+ * custom windows, and it is the same widget that is used by Gtk::FileChooserDialog.
+ *
+ * @param action Open or save mode for the widget
+ *
+ * Since: 2.4
+ */
+ explicit FileChooserWidget(FileChooserAction action);
+ explicit FileChooserWidget(FileChooserAction action, const Glib::ustring& backend);
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::FileChooserWidget
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::FileChooserWidget* wrap(GtkFileChooserWidget* object, bool take_copy = false);
+}
+#endif /* _GTKMM_FILECHOOSERWIDGET_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/filefilter.cc b/libs/gtkmm2/gtk/gtkmm/filefilter.cc
new file mode 100644
index 0000000000..72c921934d
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/filefilter.cc
@@ -0,0 +1,240 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/filefilter.h>
+#include <gtkmm/private/filefilter_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 2003 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkfilefilter.h>
+#include <gtk/gtktypebuiltins.h> //For gtk_file_filter_flags_get_type().
+
+namespace
+{
+
+//SignalProxy_Custom:
+
+//This Signal Proxy allows the C++ coder to specify a sigc::slot instead of a static function.
+class SignalProxy_Custom
+{
+public:
+ typedef Gtk::FileFilter::SlotCustom SlotType;
+
+ SignalProxy_Custom(const SlotType& slot);
+ ~SignalProxy_Custom();
+
+ static gboolean gtk_callback(const GtkFileFilterInfo* filter_info, gpointer data);
+ static void gtk_callback_destroy(void* data);
+
+protected:
+ SlotType slot_;
+};
+
+SignalProxy_Custom::SignalProxy_Custom(const SlotType& slot)
+:
+ slot_ (slot)
+{}
+
+SignalProxy_Custom::~SignalProxy_Custom()
+{}
+
+gboolean SignalProxy_Custom::gtk_callback(const GtkFileFilterInfo* filter_info, gpointer data)
+{
+ SignalProxy_Custom *const self = static_cast<SignalProxy_Custom*>(data);
+
+ try
+ {
+ //Create a suitable C++ instance to pass to the C++ method:
+ Gtk::FileFilter::Info cppInfo;
+ cppInfo.contains = (Gtk::FileFilterFlags)filter_info->contains;
+ cppInfo.filename = Glib::convert_const_gchar_ptr_to_ustring(filter_info->filename);
+ cppInfo.uri = Glib::convert_const_gchar_ptr_to_ustring(filter_info->uri);
+ cppInfo.display_name = Glib::convert_const_gchar_ptr_to_ustring(filter_info->display_name);
+ cppInfo.mime_type = Glib::convert_const_gchar_ptr_to_ustring(filter_info->mime_type);
+
+ return (self->slot_)(cppInfo);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ return false; //arbitrary default;
+ }
+}
+
+void SignalProxy_Custom::gtk_callback_destroy(void* data)
+{
+ delete static_cast<SignalProxy_Custom*>(data);
+}
+
+} //anonymous namespace
+
+namespace Gtk
+{
+
+void FileFilter::add_custom(FileFilterFlags needed, const SlotCustom& slot)
+{
+ //Create a signal proxy. A pointer to this will be passed through the callback's data parameter.
+ //It will be deleted when SignalProxy_Custom::gtk_callback_destroy() is called.
+ SignalProxy_Custom *const pSignalProxy = new SignalProxy_Custom(slot);
+
+ gtk_file_filter_add_custom(gobj(), (GtkFileFilterFlags)needed,
+ &SignalProxy_Custom::gtk_callback,
+ pSignalProxy,
+ &SignalProxy_Custom::gtk_callback_destroy);
+}
+
+} // namespace Gtk
+
+
+namespace
+{
+} // anonymous namespace
+
+// static
+GType Glib::Value<Gtk::FileFilterFlags>::value_type()
+{
+ return gtk_file_filter_flags_get_type();
+}
+
+
+namespace Glib
+{
+
+Gtk::FileFilter* wrap(GtkFileFilter* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::FileFilter *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& FileFilter_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &FileFilter_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_file_filter_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void FileFilter_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* FileFilter_Class::wrap_new(GObject* o)
+{
+ return manage(new FileFilter((GtkFileFilter*)(o)));
+
+}
+
+
+/* The implementation: */
+
+FileFilter::FileFilter(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Object(construct_params)
+{
+ }
+
+FileFilter::FileFilter(GtkFileFilter* castitem)
+:
+ Gtk::Object((GtkObject*)(castitem))
+{
+ }
+
+FileFilter::~FileFilter()
+{
+ destroy_();
+}
+
+FileFilter::CppClassType FileFilter::filefilter_class_; // initialize static member
+
+GType FileFilter::get_type()
+{
+ return filefilter_class_.init().get_type();
+}
+
+GType FileFilter::get_base_type()
+{
+ return gtk_file_filter_get_type();
+}
+
+
+FileFilter::FileFilter()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Object(Glib::ConstructParams(filefilter_class_.init()))
+{
+ }
+
+void FileFilter::set_name(const Glib::ustring& name)
+{
+ gtk_file_filter_set_name(gobj(), name.c_str());
+}
+
+Glib::ustring FileFilter::get_name() const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(gtk_file_filter_get_name(const_cast<GtkFileFilter*>(gobj())));
+}
+
+void FileFilter::add_mime_type(const Glib::ustring& mime_type)
+{
+ gtk_file_filter_add_mime_type(gobj(), mime_type.c_str());
+}
+
+void FileFilter::add_pattern(const Glib::ustring& pattern)
+{
+ gtk_file_filter_add_pattern(gobj(), pattern.c_str());
+}
+
+void FileFilter::add_pixbuf_formats()
+{
+ gtk_file_filter_add_pixbuf_formats(gobj());
+}
+
+FileFilterFlags FileFilter::get_needed() const
+{
+ return ((FileFilterFlags)(gtk_file_filter_get_needed(const_cast<GtkFileFilter*>(gobj()))));
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/filefilter.h b/libs/gtkmm2/gtk/gtkmm/filefilter.h
new file mode 100644
index 0000000000..1800856266
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/filefilter.h
@@ -0,0 +1,264 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_FILEFILTER_H
+#define _GTKMM_FILEFILTER_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 2003 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/object.h>
+
+
+//TODO: remove this if we wrap this in a C++ type:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+//typedef struct _GtkFileFilterInfo GtkFileFilterInfo;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkFileFilter GtkFileFilter;
+typedef struct _GtkFileFilterClass GtkFileFilterClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class FileFilter_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** @addtogroup gtkmmEnums Enums and Flags */
+
+/**
+ * @ingroup gtkmmEnums
+ * @par Bitwise operators:
+ * <tt>%FileFilterFlags operator|(FileFilterFlags, FileFilterFlags)</tt><br>
+ * <tt>%FileFilterFlags operator&(FileFilterFlags, FileFilterFlags)</tt><br>
+ * <tt>%FileFilterFlags operator^(FileFilterFlags, FileFilterFlags)</tt><br>
+ * <tt>%FileFilterFlags operator~(FileFilterFlags)</tt><br>
+ * <tt>%FileFilterFlags& operator|=(FileFilterFlags&, FileFilterFlags)</tt><br>
+ * <tt>%FileFilterFlags& operator&=(FileFilterFlags&, FileFilterFlags)</tt><br>
+ * <tt>%FileFilterFlags& operator^=(FileFilterFlags&, FileFilterFlags)</tt><br>
+ */
+enum FileFilterFlags
+{
+ FILE_FILTER_FILENAME = 1 << 0,
+ FILE_FILTER_URI = 1 << 1,
+ FILE_FILTER_DISPLAY_NAME = 1 << 2,
+ FILE_FILTER_MIME_TYPE = 1 << 3
+};
+
+/** @ingroup gtkmmEnums */
+inline FileFilterFlags operator|(FileFilterFlags lhs, FileFilterFlags rhs)
+ { return static_cast<FileFilterFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
+
+/** @ingroup gtkmmEnums */
+inline FileFilterFlags operator&(FileFilterFlags lhs, FileFilterFlags rhs)
+ { return static_cast<FileFilterFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
+
+/** @ingroup gtkmmEnums */
+inline FileFilterFlags operator^(FileFilterFlags lhs, FileFilterFlags rhs)
+ { return static_cast<FileFilterFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
+
+/** @ingroup gtkmmEnums */
+inline FileFilterFlags operator~(FileFilterFlags flags)
+ { return static_cast<FileFilterFlags>(~static_cast<unsigned>(flags)); }
+
+/** @ingroup gtkmmEnums */
+inline FileFilterFlags& operator|=(FileFilterFlags& lhs, FileFilterFlags rhs)
+ { return (lhs = static_cast<FileFilterFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
+
+/** @ingroup gtkmmEnums */
+inline FileFilterFlags& operator&=(FileFilterFlags& lhs, FileFilterFlags rhs)
+ { return (lhs = static_cast<FileFilterFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
+
+/** @ingroup gtkmmEnums */
+inline FileFilterFlags& operator^=(FileFilterFlags& lhs, FileFilterFlags rhs)
+ { return (lhs = static_cast<FileFilterFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::FileFilterFlags> : public Glib::Value_Flags<Gtk::FileFilterFlags>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+
+class FileFilter : public Gtk::Object
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef FileFilter CppObjectType;
+ typedef FileFilter_Class CppClassType;
+ typedef GtkFileFilter BaseObjectType;
+ typedef GtkFileFilterClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~FileFilter();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class FileFilter_Class;
+ static CppClassType filefilter_class_;
+
+ // noncopyable
+ FileFilter(const FileFilter&);
+ FileFilter& operator=(const FileFilter&);
+
+protected:
+ explicit FileFilter(const Glib::ConstructParams& construct_params);
+ explicit FileFilter(GtkFileFilter* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkFileFilter* gobj() { return reinterpret_cast<GtkFileFilter*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkFileFilter* gobj() const { return reinterpret_cast<GtkFileFilter*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+public:
+ FileFilter();
+
+
+ /** Sets the human-readable name of the filter; this is the string
+ * that will be displayed in the file selector user interface if
+ * there is a selectable list of filters.
+ *
+ * Since: 2.4
+ * @param name The human-readable-name for the filter, or <tt>0</tt>
+ * to remove any existing name.
+ */
+ void set_name(const Glib::ustring& name);
+
+ /** Gets the human-readable name for the filter. See gtk_file_filter_set_name().
+ * @return The human-readable name of the filter,
+ * or <tt>0</tt>. This value is owned by GTK+ and must not
+ * be modified or freed.
+ *
+ * Since: 2.4.
+ */
+ Glib::ustring get_name() const;
+
+
+ /** Adds a rule allowing a given mime type to @a filter .
+ *
+ * Since: 2.4
+ * @param mime_type Name of a MIME type.
+ */
+ void add_mime_type(const Glib::ustring& mime_type);
+
+ /** Adds a rule allowing a shell style glob to a filter.
+ *
+ * Since: 2.4
+ * @param pattern A shell style glob.
+ */
+ void add_pattern(const Glib::ustring& pattern);
+
+ /** Adds a rule allowing image files in the formats supported
+ * by GdkPixbuf.
+ *
+ * Since: 2.6
+ */
+ void add_pixbuf_formats();
+
+ class Info
+ {
+ public:
+ FileFilterFlags contains;
+ Glib::ustring filename;
+ Glib::ustring uri;
+ Glib::ustring display_name;
+ Glib::ustring mime_type;
+ };
+
+ /// For instance, bool on_custom(const Gtk::FileFilter::Info& filter_info);
+ typedef sigc::slot<bool, const Info&> SlotCustom;
+
+ void add_custom(FileFilterFlags needed, const SlotCustom& slot);
+
+
+ /** Gets the fields that need to be filled in for the structure
+ * passed to gtk_file_filter_filter()
+ *
+ * This function will not typically be used by applications; it
+ * is intended principally for use in the implementation of
+ * Gtk::FileChooser.
+ * @return Bitfield of flags indicating needed fields when
+ * calling gtk_file_filter_filter()
+ *
+ * Since: 2.4.
+ */
+ FileFilterFlags get_needed() const;
+
+ //TODO: This method is used by FileChooser implementors, so we don't need to wrap it.
+
+ //_WRAP_METHOD(bool filter(const GtkFileFilterInfo* filter_info), gtk_file_filter_filter)
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::FileFilter
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::FileFilter* wrap(GtkFileFilter* object, bool take_copy = false);
+}
+#endif /* _GTKMM_FILEFILTER_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/fileselection.cc b/libs/gtkmm2/gtk/gtkmm/fileselection.cc
new file mode 100644
index 0000000000..9379da1c9f
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/fileselection.cc
@@ -0,0 +1,324 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/fileselection.h>
+#include <gtkmm/private/fileselection_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkfilesel.h>
+#include <gtkmm/entry.h>
+#include <gtkmm/label.h>
+#include <gtkmm/box.h>
+#include <gtkmm/button.h>
+
+
+namespace Gtk
+{
+
+FileSelection::FileSelection()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Dialog(Glib::ConstructParams(fileselection_class_.init(), "title",(char*) 0, (char*) 0))
+{}
+
+} // namespace Gtk
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::FileSelection* wrap(GtkFileSelection* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::FileSelection *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& FileSelection_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &FileSelection_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_file_selection_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void FileSelection_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* FileSelection_Class::wrap_new(GObject* o)
+{
+ return new FileSelection((GtkFileSelection*)(o)); //top-level windows can not be manage()ed.
+
+}
+
+
+/* The implementation: */
+
+FileSelection::FileSelection(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Dialog(construct_params)
+{
+ }
+
+FileSelection::FileSelection(GtkFileSelection* castitem)
+:
+ Gtk::Dialog((GtkDialog*)(castitem))
+{
+ }
+
+FileSelection::~FileSelection()
+{
+ destroy_();
+}
+
+FileSelection::CppClassType FileSelection::fileselection_class_; // initialize static member
+
+GType FileSelection::get_type()
+{
+ return fileselection_class_.init().get_type();
+}
+
+GType FileSelection::get_base_type()
+{
+ return gtk_file_selection_get_type();
+}
+
+
+FileSelection::FileSelection(const Glib::ustring& title)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Dialog(Glib::ConstructParams(fileselection_class_.init(), "title", title.c_str(), (char*) 0))
+{
+ }
+
+void FileSelection::set_filename(const std::string& filename)
+{
+ gtk_file_selection_set_filename(gobj(), (filename).c_str());
+}
+
+std::string FileSelection::get_filename() const
+{
+ return std::string(gtk_file_selection_get_filename(const_cast<GtkFileSelection*>(gobj())));
+}
+
+void FileSelection::complete(const Glib::ustring& pattern)
+{
+ gtk_file_selection_complete(gobj(), pattern.c_str());
+}
+
+void FileSelection::show_fileop_buttons()
+{
+ gtk_file_selection_show_fileop_buttons(gobj());
+}
+
+void FileSelection::hide_fileop_buttons()
+{
+ gtk_file_selection_hide_fileop_buttons(gobj());
+}
+
+Glib::ArrayHandle<std::string> FileSelection::get_selections() const
+{
+ return Glib::ArrayHandle<std::string>(gtk_file_selection_get_selections(const_cast<GtkFileSelection*>(gobj())), Glib::OWNERSHIP_DEEP);
+}
+
+void FileSelection::set_select_multiple(bool select_multiple)
+{
+ gtk_file_selection_set_select_multiple(gobj(), static_cast<int>(select_multiple));
+}
+
+bool FileSelection::get_select_multiple() const
+{
+ return gtk_file_selection_get_select_multiple(const_cast<GtkFileSelection*>(gobj()));
+}
+
+TreeView* FileSelection::get_dir_list()
+{
+ return Glib::wrap((GtkTreeView*)(gobj()->dir_list));
+}
+
+const TreeView* FileSelection::get_dir_list() const
+{
+ return Glib::wrap((GtkTreeView*)(gobj()->dir_list));
+}
+
+TreeView* FileSelection::get_file_list()
+{
+ return Glib::wrap((GtkTreeView*)(gobj()->file_list));
+}
+
+const TreeView* FileSelection::get_file_list() const
+{
+ return Glib::wrap((GtkTreeView*)(gobj()->file_list));
+}
+
+OptionMenu* FileSelection::get_history_pulldown()
+{
+ return Glib::wrap((GtkOptionMenu*)(gobj()->history_pulldown));
+}
+
+const OptionMenu* FileSelection::get_history_pulldown() const
+{
+ return Glib::wrap((GtkOptionMenu*)(gobj()->history_pulldown));
+}
+
+Entry* FileSelection::get_selection_entry()
+{
+ return Glib::wrap((GtkEntry*)(gobj()->selection_entry));
+}
+
+const Entry* FileSelection::get_selection_entry() const
+{
+ return Glib::wrap((GtkEntry*)(gobj()->selection_entry));
+}
+
+Label* FileSelection::get_selection_text()
+{
+ return Glib::wrap((GtkLabel*)(gobj()->selection_text));
+}
+
+const Label* FileSelection::get_selection_text() const
+{
+ return Glib::wrap((GtkLabel*)(gobj()->selection_text));
+}
+
+VBox* FileSelection::get_main_vbox()
+{
+ return Glib::wrap((GtkVBox*)(gobj()->main_vbox));
+}
+
+const VBox* FileSelection::get_main_vbox() const
+{
+ return Glib::wrap((GtkVBox*)(gobj()->main_vbox));
+}
+
+Button* FileSelection::get_ok_button()
+{
+ return Glib::wrap((GtkButton*)(gobj()->ok_button));
+}
+
+const Button* FileSelection::get_ok_button() const
+{
+ return Glib::wrap((GtkButton*)(gobj()->ok_button));
+}
+
+Button* FileSelection::get_cancel_button()
+{
+ return Glib::wrap((GtkButton*)(gobj()->cancel_button));
+}
+
+const Button* FileSelection::get_cancel_button() const
+{
+ return Glib::wrap((GtkButton*)(gobj()->cancel_button));
+}
+
+Button* FileSelection::get_help_button()
+{
+ return Glib::wrap((GtkButton*)(gobj()->help_button));
+}
+
+const Button* FileSelection::get_help_button() const
+{
+ return Glib::wrap((GtkButton*)(gobj()->help_button));
+}
+
+HButtonBox* FileSelection::get_button_area()
+{
+ return Glib::wrap((GtkHButtonBox*)(gobj()->button_area));
+}
+
+const HButtonBox* FileSelection::get_button_area() const
+{
+ return Glib::wrap((GtkHButtonBox*)(gobj()->button_area));
+}
+
+HBox* FileSelection::get_action_area()
+{
+ return Glib::wrap((GtkHBox*)(gobj()->action_area));
+}
+
+const HBox* FileSelection::get_action_area() const
+{
+ return Glib::wrap((GtkHBox*)(gobj()->action_area));
+}
+
+
+Glib::PropertyProxy<bool> FileSelection::property_show_fileops()
+{
+ return Glib::PropertyProxy<bool>(this, "show-fileops");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> FileSelection::property_show_fileops() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "show-fileops");
+}
+
+Glib::PropertyProxy<std::string> FileSelection::property_filename()
+{
+ return Glib::PropertyProxy<std::string>(this, "filename");
+}
+
+Glib::PropertyProxy_ReadOnly<std::string> FileSelection::property_filename() const
+{
+ return Glib::PropertyProxy_ReadOnly<std::string>(this, "filename");
+}
+
+Glib::PropertyProxy<bool> FileSelection::property_select_multiple()
+{
+ return Glib::PropertyProxy<bool>(this, "select-multiple");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> FileSelection::property_select_multiple() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "select-multiple");
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/fileselection.h b/libs/gtkmm2/gtk/gtkmm/fileselection.h
new file mode 100644
index 0000000000..6a5e734362
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/fileselection.h
@@ -0,0 +1,270 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_FILESELECTION_H
+#define _GTKMM_FILESELECTION_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+
+/* fileselection.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/dialog.h>
+#include <gtkmm/button.h>
+#include <gtkmm/entry.h>
+#include <gtkmm/label.h>
+#include <gtkmm/box.h>
+#include <gtkmm/treeview.h>
+#include <gtkmm/buttonbox.h>
+#include <gtkmm/optionmenu.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkFileSelection GtkFileSelection;
+typedef struct _GtkFileSelectionClass GtkFileSelectionClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class FileSelection_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** Prompt the user for a file or directory name.
+ *
+ * Gtk::FileSelection should be used to retrieve file or directory names from
+ * the user. It will create a new dialog window containing a directory list,
+ * and a file list corresponding to the current working directory. The
+ * filesystem can be navigated using the directory list or the drop-down
+ * history menu. Alternatively, the TAB key can be used to navigate using
+ * filename completion - common in text based editors such as emacs and jed.
+ *
+ * @deprecated Use the FileChooserDialog instead.
+ */
+
+class FileSelection : public Dialog
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef FileSelection CppObjectType;
+ typedef FileSelection_Class CppClassType;
+ typedef GtkFileSelection BaseObjectType;
+ typedef GtkFileSelectionClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~FileSelection();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class FileSelection_Class;
+ static CppClassType fileselection_class_;
+
+ // noncopyable
+ FileSelection(const FileSelection&);
+ FileSelection& operator=(const FileSelection&);
+
+protected:
+ explicit FileSelection(const Glib::ConstructParams& construct_params);
+ explicit FileSelection(GtkFileSelection* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkFileSelection* gobj() { return reinterpret_cast<GtkFileSelection*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkFileSelection* gobj() const { return reinterpret_cast<GtkFileSelection*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+
+public:
+
+ FileSelection();
+ explicit FileSelection(const Glib::ustring& title);
+
+
+ /** Sets a default path for the file requestor. If @a filename includes a
+ * directory path, then the requestor will open with that path as its
+ * current working directory.
+ *
+ * This has the consequence that in order to open the requestor with a
+ * working directory and an empty filename, @a filename must have a trailing
+ * directory separator.
+ *
+ * The encoding of @a filename is preferred GLib file name encoding, which
+ * may not be UTF-8. See Glib::filename_from_utf8().
+ * @param filename A string to set as the default file name.
+ */
+ void set_filename(const std::string& filename);
+
+
+ /** This function returns the selected filename in the GLib file name
+ * encoding. To convert to UTF-8, call Glib::filename_to_utf8(). The
+ * returned string points to a statically allocated buffer and should
+ * be copied if you plan to keep it around.
+ *
+ * If no file is selected then the selected directory path is returned.
+ * @return Currently-selected filename in the on-disk encoding.
+ */
+ std::string get_filename() const;
+
+
+ void complete(const Glib::ustring& pattern);
+
+ void show_fileop_buttons();
+
+ void hide_fileop_buttons();
+
+
+ /** Retrieves the list of file selections the user has made in the dialog box.
+ * This function is intended for use when the user can select multiple files
+ * in the file list.
+ *
+ * The filenames are in the GLib file name encoding. To convert to
+ * UTF-8, call Glib::filename_to_utf8() on each string.
+ * @return A newly-allocated <tt>0</tt>-terminated array of strings. Use
+ * Glib::strfreev() to free it.
+ */
+ Glib::ArrayHandle<std::string> get_selections() const;
+
+
+ /** Sets whether the user is allowed to select multiple files in the file list.
+ * Use get_selections() to get the list of selected files.
+ * @param select_multiple Whether or not the user is allowed to select multiple
+ * files in the file list.
+ */
+ void set_select_multiple(bool select_multiple = true);
+
+ /** Determines whether or not the user is allowed to select multiple files in
+ * the file list. See set_select_multiple().
+ * @return <tt>true</tt> if the user is allowed to select multiple files in the
+ * file list.
+ */
+ bool get_select_multiple() const;
+
+ //: Accessors
+ TreeView* get_dir_list();
+ const TreeView* get_dir_list() const;
+ TreeView* get_file_list();
+ const TreeView* get_file_list() const;
+ OptionMenu* get_history_pulldown();
+ const OptionMenu* get_history_pulldown() const;
+ Entry* get_selection_entry();
+ const Entry* get_selection_entry() const;
+ Label* get_selection_text();
+ const Label* get_selection_text() const;
+ VBox* get_main_vbox();
+ const VBox* get_main_vbox() const;
+ Button* get_ok_button();
+ const Button* get_ok_button() const;
+ Button* get_cancel_button();
+ const Button* get_cancel_button() const;
+ Button* get_help_button();
+ const Button* get_help_button() const;
+ HButtonBox* get_button_area();
+ const HButtonBox* get_button_area() const;
+ HBox* get_action_area();
+ const HBox* get_action_area() const;
+
+ /** Whether buttons for creating/manipulating files should be displayed.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_show_fileops() ;
+
+/** Whether buttons for creating/manipulating files should be displayed.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_show_fileops() const;
+
+ /** The currently selected filename.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<std::string> property_filename() ;
+
+/** The currently selected filename.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<std::string> property_filename() const;
+
+ /** Whether to allow multiple files to be selected.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_select_multiple() ;
+
+/** Whether to allow multiple files to be selected.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_select_multiple() const;
+
+
+};
+
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::FileSelection
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::FileSelection* wrap(GtkFileSelection* object, bool take_copy = false);
+}
+#endif /* _GTKMM_FILESELECTION_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/fixed.cc b/libs/gtkmm2/gtk/gtkmm/fixed.cc
new file mode 100644
index 0000000000..9edbae969a
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/fixed.cc
@@ -0,0 +1,153 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/fixed.h>
+#include <gtkmm/private/fixed_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkfixed.h>
+
+namespace Gtk
+{
+}
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::Fixed* wrap(GtkFixed* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::Fixed *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Fixed_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Fixed_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_fixed_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Fixed_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* Fixed_Class::wrap_new(GObject* o)
+{
+ return manage(new Fixed((GtkFixed*)(o)));
+
+}
+
+
+/* The implementation: */
+
+Fixed::Fixed(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Container(construct_params)
+{
+ }
+
+Fixed::Fixed(GtkFixed* castitem)
+:
+ Gtk::Container((GtkContainer*)(castitem))
+{
+ }
+
+Fixed::~Fixed()
+{
+ destroy_();
+}
+
+Fixed::CppClassType Fixed::fixed_class_; // initialize static member
+
+GType Fixed::get_type()
+{
+ return fixed_class_.init().get_type();
+}
+
+GType Fixed::get_base_type()
+{
+ return gtk_fixed_get_type();
+}
+
+
+Fixed::Fixed()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Container(Glib::ConstructParams(fixed_class_.init()))
+{
+ }
+
+void Fixed::put(Widget& widget, int x, int y)
+{
+ gtk_fixed_put(gobj(), (widget).gobj(), x, y);
+}
+
+void Fixed::move(Widget& widget, int x, int y)
+{
+ gtk_fixed_move(gobj(), (widget).gobj(), x, y);
+}
+
+void Fixed::set_has_window(bool has_window)
+{
+ gtk_fixed_set_has_window(gobj(), static_cast<int>(has_window));
+}
+
+bool Fixed::get_has_window() const
+{
+ return gtk_fixed_get_has_window(const_cast<GtkFixed*>(gobj()));
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/fixed.h b/libs/gtkmm2/gtk/gtkmm/fixed.h
new file mode 100644
index 0000000000..c7b334a238
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/fixed.h
@@ -0,0 +1,149 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_FIXED_H
+#define _GTKMM_FIXED_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* fixed.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/container.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkFixed GtkFixed;
+typedef struct _GtkFixedClass GtkFixedClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class Fixed_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** A container which allows you to position widgets at fixed coordinates.
+ *
+ * The Gtk::Fixed widget is a container which can place child widgets at fixed positions and with fixed sizes, given in pixels. It performs no automatic layout management.
+ * For most applications, you should not use this container, because it will result in truncated text, overlapping widgets, and other display bugs:
+ * - Themes may change widget sizes.
+ * - Fonts other than the one you used to write the app will of course change the size of widgets containing text; keep in mind that users may use a larger font because of difficulty reading the default, or they may be using Windows or the framebuffer port of GTK+, where different fonts are available.
+ * - Translation of text into other languages changes its size. Also, display of non-English text will use a different font in many cases.
+ * In addition, the fixed widget can't properly be mirrored in right-to-left languages such as Hebrew and Arabic. i.e. normally GTK+ will flip the interface to put labels to the right of the thing they label, but it can't do that with Gtk::Fixed. So your application will not be usable in right-to-left languages.
+ * Finally, fixed positioning makes it kind of annoying to add/remove GUI elements, since you have to reposition all the other elements. This is a long-term maintenance problem for your application.
+ * If you know none of these things are an issue for your application, and prefer the simplicity of Gtk::Fixed, by all means use the widget. But you should be aware of the tradeoffs.
+ *
+ * @ingroup Widgets
+ * @ingroup Containers
+ */
+
+class Fixed : public Container
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Fixed CppObjectType;
+ typedef Fixed_Class CppClassType;
+ typedef GtkFixed BaseObjectType;
+ typedef GtkFixedClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~Fixed();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class Fixed_Class;
+ static CppClassType fixed_class_;
+
+ // noncopyable
+ Fixed(const Fixed&);
+ Fixed& operator=(const Fixed&);
+
+protected:
+ explicit Fixed(const Glib::ConstructParams& construct_params);
+ explicit Fixed(GtkFixed* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkFixed* gobj() { return reinterpret_cast<GtkFixed*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkFixed* gobj() const { return reinterpret_cast<GtkFixed*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+public:
+ Fixed();
+
+
+ void put(Widget& widget, int x, int y);
+
+ void move(Widget& widget, int x, int y);
+
+ /** Sets whether a Gtk::Fixed widget is created with a separate
+ * Gdk::Window for widget->window or not. (By default, it will be
+ * created with no separate Gdk::Window). This function must be called
+ * while the Gtk::Fixed is not realized, for instance, immediately after the
+ * window is created.
+ * @param has_window <tt>true</tt> if a separate window should be created.
+ */
+ void set_has_window(bool has_window = true);
+
+ /** Gets whether the Gtk::Fixed has its own Gdk::Window.
+ * See gdk_fixed_set_has_window().
+ * @return <tt>true</tt> if @a fixed has its own window.
+ */
+ bool get_has_window() const;
+
+
+};
+
+} /* namespace Gtk */
+
+
+namespace Glib
+{
+ /** @relates Gtk::Fixed
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::Fixed* wrap(GtkFixed* object, bool take_copy = false);
+}
+#endif /* _GTKMM_FIXED_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/fontbutton.cc b/libs/gtkmm2/gtk/gtkmm/fontbutton.cc
new file mode 100644
index 0000000000..4644534f21
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/fontbutton.cc
@@ -0,0 +1,324 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/fontbutton.h>
+#include <gtkmm/private/fontbutton_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 2003 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkfontbutton.h>
+
+namespace Gtk
+{
+
+
+} // namespace Gtk
+
+
+namespace
+{
+
+const Glib::SignalProxyInfo FontButton_signal_font_set_info =
+{
+ "font-set",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::FontButton* wrap(GtkFontButton* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::FontButton *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& FontButton_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &FontButton_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_font_button_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void FontButton_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->font_set = &font_set_callback;
+}
+
+
+void FontButton_Class::font_set_callback(GtkFontButton* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_font_set();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->font_set)
+ (*base->font_set)(self);
+ }
+}
+
+
+Glib::ObjectBase* FontButton_Class::wrap_new(GObject* o)
+{
+ return manage(new FontButton((GtkFontButton*)(o)));
+
+}
+
+
+/* The implementation: */
+
+FontButton::FontButton(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Button(construct_params)
+{
+ }
+
+FontButton::FontButton(GtkFontButton* castitem)
+:
+ Gtk::Button((GtkButton*)(castitem))
+{
+ }
+
+FontButton::~FontButton()
+{
+ destroy_();
+}
+
+FontButton::CppClassType FontButton::fontbutton_class_; // initialize static member
+
+GType FontButton::get_type()
+{
+ return fontbutton_class_.init().get_type();
+}
+
+GType FontButton::get_base_type()
+{
+ return gtk_font_button_get_type();
+}
+
+
+FontButton::FontButton()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Button(Glib::ConstructParams(fontbutton_class_.init()))
+{
+ }
+
+FontButton::FontButton(const Glib::ustring& fontname)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Button(Glib::ConstructParams(fontbutton_class_.init(), "fontname", fontname.c_str(), (char*) 0))
+{
+ }
+
+Glib::ustring FontButton::get_title() const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(gtk_font_button_get_title(const_cast<GtkFontButton*>(gobj())));
+}
+
+void FontButton::set_title(const Glib::ustring& title)
+{
+ gtk_font_button_set_title(gobj(), title.c_str());
+}
+
+bool FontButton::get_use_font() const
+{
+ return gtk_font_button_get_use_font(const_cast<GtkFontButton*>(gobj()));
+}
+
+void FontButton::set_use_font(bool use_font)
+{
+ gtk_font_button_set_use_font(gobj(), static_cast<int>(use_font));
+}
+
+bool FontButton::get_use_size() const
+{
+ return gtk_font_button_get_use_size(const_cast<GtkFontButton*>(gobj()));
+}
+
+void FontButton::set_use_size(bool use_size)
+{
+ gtk_font_button_set_use_size(gobj(), static_cast<int>(use_size));
+}
+
+Glib::ustring FontButton::get_font_name() const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(gtk_font_button_get_font_name(const_cast<GtkFontButton*>(gobj())));
+}
+
+bool FontButton::set_font_name(const Glib::ustring& fontname)
+{
+ return gtk_font_button_set_font_name(gobj(), fontname.c_str());
+}
+
+bool FontButton::get_show_style() const
+{
+ return gtk_font_button_get_show_style(const_cast<GtkFontButton*>(gobj()));
+}
+
+void FontButton::set_show_style(bool show_style)
+{
+ gtk_font_button_set_show_style(gobj(), static_cast<int>(show_style));
+}
+
+bool FontButton::get_show_size() const
+{
+ return gtk_font_button_get_show_size(const_cast<GtkFontButton*>(gobj()));
+}
+
+void FontButton::set_show_size(bool show_size)
+{
+ gtk_font_button_set_show_size(gobj(), static_cast<int>(show_size));
+}
+
+
+Glib::SignalProxy0< void > FontButton::signal_font_set()
+{
+ return Glib::SignalProxy0< void >(this, &FontButton_signal_font_set_info);
+}
+
+
+Glib::PropertyProxy<Glib::ustring> FontButton::property_title()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "title");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> FontButton::property_title() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "title");
+}
+
+Glib::PropertyProxy<Glib::ustring> FontButton::property_font_name()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "font-name");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> FontButton::property_font_name() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "font-name");
+}
+
+Glib::PropertyProxy<bool> FontButton::property_use_font()
+{
+ return Glib::PropertyProxy<bool>(this, "use-font");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> FontButton::property_use_font() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "use-font");
+}
+
+Glib::PropertyProxy<bool> FontButton::property_use_size()
+{
+ return Glib::PropertyProxy<bool>(this, "use-size");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> FontButton::property_use_size() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "use-size");
+}
+
+Glib::PropertyProxy<bool> FontButton::property_show_style()
+{
+ return Glib::PropertyProxy<bool>(this, "show-style");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> FontButton::property_show_style() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "show-style");
+}
+
+Glib::PropertyProxy<bool> FontButton::property_show_size()
+{
+ return Glib::PropertyProxy<bool>(this, "show-size");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> FontButton::property_show_size() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "show-size");
+}
+
+
+void Gtk::FontButton::on_font_set()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->font_set)
+ (*base->font_set)(gobj());
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/fontbutton.h b/libs/gtkmm2/gtk/gtkmm/fontbutton.h
new file mode 100644
index 0000000000..79edaa1d02
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/fontbutton.h
@@ -0,0 +1,311 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_FONTBUTTON_H
+#define _GTKMM_FONTBUTTON_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* fontbutton.h
+ *
+ * Copyright (C) 2003 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/button.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkFontButton GtkFontButton;
+typedef struct _GtkFontButtonClass GtkFontButtonClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class FontButton_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** A button to launch a font selection dialog.
+ *
+ * The Gtk::FontButton is a button which displays the currently selected font and
+ * allows to open a font selection dialog to change the font. It is suitable widget
+ * for selecting a font in a preference dialog.
+ * @ingroup Widgets
+ */
+
+class FontButton : public Button
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef FontButton CppObjectType;
+ typedef FontButton_Class CppClassType;
+ typedef GtkFontButton BaseObjectType;
+ typedef GtkFontButtonClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~FontButton();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class FontButton_Class;
+ static CppClassType fontbutton_class_;
+
+ // noncopyable
+ FontButton(const FontButton&);
+ FontButton& operator=(const FontButton&);
+
+protected:
+ explicit FontButton(const Glib::ConstructParams& construct_params);
+ explicit FontButton(GtkFontButton* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkFontButton* gobj() { return reinterpret_cast<GtkFontButton*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkFontButton* gobj() const { return reinterpret_cast<GtkFontButton*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_font_set();
+
+
+private:
+
+public:
+ FontButton();
+ explicit FontButton(const Glib::ustring& fontname);
+
+
+ /** Retrieves the title of the font selection dialog.
+ * @return An internal copy of the title string which must not be freed.
+ *
+ * Since: 2.4.
+ */
+ Glib::ustring get_title() const;
+
+ /** Sets the title for the font selection dialog.
+ *
+ * Since: 2.4
+ * @param title A string containing the font selection dialog title.
+ */
+ void set_title(const Glib::ustring& title);
+
+ /** Returns whether the selected font is used in the label.
+ * @return Whether the selected font is used in the label.
+ *
+ * Since: 2.4.
+ */
+ bool get_use_font() const;
+
+ /** If @a use_font is <tt>true</tt>, the font name will be written using the selected font.
+ *
+ * Since: 2.4
+ * @param use_font If <tt>true</tt>, font name will be written using font chosen.
+ */
+ void set_use_font(bool use_font = true);
+
+ /** Returns whether the selected size is used in the label.
+ * @return Whether the selected size is used in the label.
+ *
+ * Since: 2.4.
+ */
+ bool get_use_size() const;
+
+ /** If @a use_size is <tt>true</tt>, the font name will be written using the selected size.
+ *
+ * Since: 2.4
+ * @param use_size If <tt>true</tt>, font name will be written using the selected size.
+ */
+ void set_use_size(bool use_size = true);
+
+ /** Retrieves the name of the currently selected font.
+ * @return An internal copy of the font name which must not be freed.
+ *
+ * Since: 2.4.
+ */
+ Glib::ustring get_font_name() const;
+
+ /** Sets or updates the currently-displayed font in font picker dialog.
+ * @param fontname Name of font to display in font selection dialog.
+ * @return Return value of Gtk::FontSelectionDialog::set_font_name() if the
+ * font selection dialog exists, otherwise <tt>false</tt>.
+ *
+ * Since: 2.4.
+ */
+ bool set_font_name(const Glib::ustring& fontname);
+
+ /** Returns whether the name of the font style will be shown in the label.
+ * @return Whether the font style will be shown in the label.
+ *
+ * Since: 2.4.
+ */
+ bool get_show_style() const;
+
+ /** If @a show_style is <tt>true</tt>, the font style will be displayed along with name of the selected font.
+ *
+ * Since: 2.4
+ * @param show_style <tt>true</tt> if font style should be displayed in label.
+ */
+ void set_show_style(bool show_style = true);
+
+ /** Returns whether the font size will be shown in the label.
+ * @return Whether the font size will be shown in the label.
+ *
+ * Since: 2.4.
+ */
+ bool get_show_size() const;
+
+ /** If @a show_size is <tt>true</tt>, the font size will be displayed along with the name of the selected font.
+ *
+ * Since: 2.4
+ * @param show_size <tt>true</tt> if font size should be displayed in dialog.
+ */
+ void set_show_size(bool show_size = true);
+
+ /** The title of the font selection dialog.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_title() ;
+
+/** The title of the font selection dialog.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_title() const;
+
+ /** The name of the selected font.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_font_name() ;
+
+/** The name of the selected font.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_font_name() const;
+
+ /** Whether the label is drawn in the selected font.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_use_font() ;
+
+/** Whether the label is drawn in the selected font.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_use_font() const;
+
+ /** Whether the label is drawn with the selected font size.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_use_size() ;
+
+/** Whether the label is drawn with the selected font size.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_use_size() const;
+
+ /** Whether the selected font style is shown in the label.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_show_style() ;
+
+/** Whether the selected font style is shown in the label.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_show_style() const;
+
+ /** Whether selected font size is shown in the label.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_show_size() ;
+
+/** Whether selected font size is shown in the label.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_show_size() const;
+
+
+ Glib::SignalProxy0< void > signal_font_set();
+
+
+};
+
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::FontButton
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::FontButton* wrap(GtkFontButton* object, bool take_copy = false);
+}
+#endif /* _GTKMM_FONTBUTTON_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/fontselection.cc b/libs/gtkmm2/gtk/gtkmm/fontselection.cc
new file mode 100644
index 0000000000..45ccfcee76
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/fontselection.cc
@@ -0,0 +1,401 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/fontselection.h>
+#include <gtkmm/private/fontselection_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/button.h>
+#include <gtkmm/entry.h>
+#include <gtkmm/radiobutton.h>
+#include <gtk/gtkfontsel.h>
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::FontSelection* wrap(GtkFontSelection* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::FontSelection *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& FontSelection_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &FontSelection_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_font_selection_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void FontSelection_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* FontSelection_Class::wrap_new(GObject* o)
+{
+ return manage(new FontSelection((GtkFontSelection*)(o)));
+
+}
+
+
+/* The implementation: */
+
+FontSelection::FontSelection(const Glib::ConstructParams& construct_params)
+:
+ Gtk::VBox(construct_params)
+{
+ }
+
+FontSelection::FontSelection(GtkFontSelection* castitem)
+:
+ Gtk::VBox((GtkVBox*)(castitem))
+{
+ }
+
+FontSelection::~FontSelection()
+{
+ destroy_();
+}
+
+FontSelection::CppClassType FontSelection::fontselection_class_; // initialize static member
+
+GType FontSelection::get_type()
+{
+ return fontselection_class_.init().get_type();
+}
+
+GType FontSelection::get_base_type()
+{
+ return gtk_font_selection_get_type();
+}
+
+
+FontSelection::FontSelection()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::VBox(Glib::ConstructParams(fontselection_class_.init()))
+{
+ }
+
+Glib::ustring FontSelection::get_font_name() const
+{
+ return Glib::convert_return_gchar_ptr_to_ustring(gtk_font_selection_get_font_name(const_cast<GtkFontSelection*>(gobj())));
+}
+
+bool FontSelection::set_font_name(const Glib::ustring& fontname)
+{
+ return gtk_font_selection_set_font_name(gobj(), fontname.c_str());
+}
+
+Glib::ustring FontSelection::get_preview_text() const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(gtk_font_selection_get_preview_text(const_cast<GtkFontSelection*>(gobj())));
+}
+
+void FontSelection::set_preview_text(const Glib::ustring& fontname)
+{
+ gtk_font_selection_set_preview_text(gobj(), fontname.c_str());
+}
+
+Entry* FontSelection::get_font_entry()
+{
+ return Glib::wrap((GtkEntry*)(gobj()->font_entry));
+}
+
+const Entry* FontSelection::get_font_entry() const
+{
+ return Glib::wrap((GtkEntry*)(gobj()->font_entry));
+}
+
+Entry* FontSelection::get_font_style_entry()
+{
+ return Glib::wrap((GtkEntry*)(gobj()->font_style_entry));
+}
+
+const Entry* FontSelection::get_font_style_entry() const
+{
+ return Glib::wrap((GtkEntry*)(gobj()->font_style_entry));
+}
+
+Entry* FontSelection::get_size_entry()
+{
+ return Glib::wrap((GtkEntry*)(gobj()->size_entry));
+}
+
+const Entry* FontSelection::get_size_entry() const
+{
+ return Glib::wrap((GtkEntry*)(gobj()->size_entry));
+}
+
+RadioButton* FontSelection::get_pixels_button()
+{
+ return Glib::wrap((GtkRadioButton*)(gobj()->pixels_button));
+}
+
+const RadioButton* FontSelection::get_pixels_button() const
+{
+ return Glib::wrap((GtkRadioButton*)(gobj()->pixels_button));
+}
+
+RadioButton* FontSelection::get_points_button()
+{
+ return Glib::wrap((GtkRadioButton*)(gobj()->points_button));
+}
+
+const RadioButton* FontSelection::get_points_button() const
+{
+ return Glib::wrap((GtkRadioButton*)(gobj()->points_button));
+}
+
+Button* FontSelection::get_filter_button()
+{
+ return Glib::wrap((GtkButton*)(gobj()->filter_button));
+}
+
+const Button* FontSelection::get_filter_button() const
+{
+ return Glib::wrap((GtkButton*)(gobj()->filter_button));
+}
+
+Entry* FontSelection::get_preview_entry()
+{
+ return Glib::wrap((GtkEntry*)(gobj()->preview_entry));
+}
+
+const Entry* FontSelection::get_preview_entry() const
+{
+ return Glib::wrap((GtkEntry*)(gobj()->preview_entry));
+}
+
+
+Glib::PropertyProxy<Glib::ustring> FontSelection::property_font_name()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "font-name");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> FontSelection::property_font_name() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "font-name");
+}
+
+Glib::PropertyProxy<Glib::ustring> FontSelection::property_preview_text()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "preview-text");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> FontSelection::property_preview_text() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "preview-text");
+}
+
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+
+Gtk::FontSelectionDialog* wrap(GtkFontSelectionDialog* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::FontSelectionDialog *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& FontSelectionDialog_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &FontSelectionDialog_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_font_selection_dialog_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void FontSelectionDialog_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* FontSelectionDialog_Class::wrap_new(GObject* o)
+{
+ return new FontSelectionDialog((GtkFontSelectionDialog*)(o)); //top-level windows can not be manage()ed.
+
+}
+
+
+/* The implementation: */
+
+FontSelectionDialog::FontSelectionDialog(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Dialog(construct_params)
+{
+ }
+
+FontSelectionDialog::FontSelectionDialog(GtkFontSelectionDialog* castitem)
+:
+ Gtk::Dialog((GtkDialog*)(castitem))
+{
+ }
+
+FontSelectionDialog::~FontSelectionDialog()
+{
+ destroy_();
+}
+
+FontSelectionDialog::CppClassType FontSelectionDialog::fontselectiondialog_class_; // initialize static member
+
+GType FontSelectionDialog::get_type()
+{
+ return fontselectiondialog_class_.init().get_type();
+}
+
+GType FontSelectionDialog::get_base_type()
+{
+ return gtk_font_selection_dialog_get_type();
+}
+
+FontSelectionDialog::FontSelectionDialog()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Dialog(Glib::ConstructParams(fontselectiondialog_class_.init()))
+{
+ }
+
+FontSelectionDialog::FontSelectionDialog(const Glib::ustring& title)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Dialog(Glib::ConstructParams(fontselectiondialog_class_.init(), "title", title.c_str(), (char*) 0))
+{
+ }
+
+bool FontSelectionDialog::set_font_name(const Glib::ustring& fontname)
+{
+ return gtk_font_selection_dialog_set_font_name(gobj(), fontname.c_str());
+}
+
+Glib::ustring FontSelectionDialog::get_font_name() const
+{
+ return Glib::convert_return_gchar_ptr_to_ustring(gtk_font_selection_dialog_get_font_name(const_cast<GtkFontSelectionDialog*>(gobj())));
+}
+
+Glib::ustring FontSelectionDialog::get_preview_text() const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(gtk_font_selection_dialog_get_preview_text(const_cast<GtkFontSelectionDialog*>(gobj())));
+}
+
+void FontSelectionDialog::set_preview_text(const Glib::ustring& fontname)
+{
+ gtk_font_selection_dialog_set_preview_text(gobj(), fontname.c_str());
+}
+
+FontSelection* FontSelectionDialog::get_font_selection()
+{
+ return Glib::wrap((GtkFontSelection*)(gobj()->fontsel));
+}
+
+const FontSelection* FontSelectionDialog::get_font_selection() const
+{
+ return Glib::wrap((GtkFontSelection*)(gobj()->fontsel));
+}
+
+Button* FontSelectionDialog::get_ok_button()
+{
+ return Glib::wrap((GtkButton*)(gobj()->ok_button));
+}
+
+const Button* FontSelectionDialog::get_ok_button() const
+{
+ return Glib::wrap((GtkButton*)(gobj()->ok_button));
+}
+
+Button* FontSelectionDialog::get_apply_button()
+{
+ return Glib::wrap((GtkButton*)(gobj()->apply_button));
+}
+
+const Button* FontSelectionDialog::get_apply_button() const
+{
+ return Glib::wrap((GtkButton*)(gobj()->apply_button));
+}
+
+Button* FontSelectionDialog::get_cancel_button()
+{
+ return Glib::wrap((GtkButton*)(gobj()->cancel_button));
+}
+
+const Button* FontSelectionDialog::get_cancel_button() const
+{
+ return Glib::wrap((GtkButton*)(gobj()->cancel_button));
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/fontselection.h b/libs/gtkmm2/gtk/gtkmm/fontselection.h
new file mode 100644
index 0000000000..ae0b9045d6
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/fontselection.h
@@ -0,0 +1,292 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_FONTSELECTION_H
+#define _GTKMM_FONTSELECTION_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#include <gtkmm/dialog.h>
+#include <gtkmm/box.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkFontSelection GtkFontSelection;
+typedef struct _GtkFontSelectionClass GtkFontSelectionClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class FontSelection_Class; } // namespace Gtk
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkFontSelectionDialog GtkFontSelectionDialog;
+typedef struct _GtkFontSelectionDialogClass GtkFontSelectionDialogClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class FontSelectionDialog_Class; } // namespace Gtk
+namespace Gtk
+{
+
+class Button;
+class Entry;
+class RadioButton;
+
+
+/** A widget for selecting fonts.
+ *
+ * The Gtk::FontSelection widget lists the available fonts, styles and
+ * sizes, allowing the user to select a font. It is used in the
+ * Gtk::FontSelectionDialog widget to provide a dialog box for selecting
+ * fonts.
+ *
+ * @ingroup Widgets
+ */
+
+class FontSelection : public VBox
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef FontSelection CppObjectType;
+ typedef FontSelection_Class CppClassType;
+ typedef GtkFontSelection BaseObjectType;
+ typedef GtkFontSelectionClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~FontSelection();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class FontSelection_Class;
+ static CppClassType fontselection_class_;
+
+ // noncopyable
+ FontSelection(const FontSelection&);
+ FontSelection& operator=(const FontSelection&);
+
+protected:
+ explicit FontSelection(const Glib::ConstructParams& construct_params);
+ explicit FontSelection(GtkFontSelection* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkFontSelection* gobj() { return reinterpret_cast<GtkFontSelection*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkFontSelection* gobj() const { return reinterpret_cast<GtkFontSelection*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+
+public:
+ FontSelection();
+
+
+ Glib::ustring get_font_name() const;
+
+ bool set_font_name(const Glib::ustring& fontname);
+
+ Glib::ustring get_preview_text() const;
+
+ void set_preview_text(const Glib::ustring& fontname);
+
+ // Font page
+ Entry* get_font_entry();
+ const Entry* get_font_entry() const;
+ Entry* get_font_style_entry();
+ const Entry* get_font_style_entry() const;
+ Entry* get_size_entry();
+ const Entry* get_size_entry() const;
+
+ RadioButton* get_pixels_button();
+ const RadioButton* get_pixels_button() const;
+ RadioButton* get_points_button();
+ const RadioButton* get_points_button() const;
+ Button* get_filter_button();
+ const Button* get_filter_button() const;
+
+ Entry* get_preview_entry();
+ const Entry* get_preview_entry() const;
+
+ /** The X string that represents this font.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_font_name() ;
+
+/** The X string that represents this font.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_font_name() const;
+
+ /** The text to display in order to demonstrate the selected font.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_preview_text() ;
+
+/** The text to display in order to demonstrate the selected font.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_preview_text() const;
+
+
+};
+
+/** A dialog box for selecting fonts.
+ *
+ * The Gtk::FontSelectionDialog widget is a dialog box for selecting a font.
+ *
+ * @ingroup Dialogs
+ */
+
+class FontSelectionDialog : public Dialog
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef FontSelectionDialog CppObjectType;
+ typedef FontSelectionDialog_Class CppClassType;
+ typedef GtkFontSelectionDialog BaseObjectType;
+ typedef GtkFontSelectionDialogClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~FontSelectionDialog();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class FontSelectionDialog_Class;
+ static CppClassType fontselectiondialog_class_;
+
+ // noncopyable
+ FontSelectionDialog(const FontSelectionDialog&);
+ FontSelectionDialog& operator=(const FontSelectionDialog&);
+
+protected:
+ explicit FontSelectionDialog(const Glib::ConstructParams& construct_params);
+ explicit FontSelectionDialog(GtkFontSelectionDialog* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkFontSelectionDialog* gobj() { return reinterpret_cast<GtkFontSelectionDialog*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkFontSelectionDialog* gobj() const { return reinterpret_cast<GtkFontSelectionDialog*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+
+public:
+
+ FontSelectionDialog();
+ explicit FontSelectionDialog(const Glib::ustring& title);
+
+
+ bool set_font_name(const Glib::ustring& fontname);
+
+ Glib::ustring get_font_name() const;
+
+ Glib::ustring get_preview_text() const;
+
+ void set_preview_text(const Glib::ustring& fontname);
+
+ FontSelection* get_font_selection();
+ const FontSelection* get_font_selection() const;
+ Button* get_ok_button();
+ const Button* get_ok_button() const;
+ Button* get_apply_button();
+ const Button* get_apply_button() const;
+ Button* get_cancel_button();
+ const Button* get_cancel_button() const;
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::FontSelection
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::FontSelection* wrap(GtkFontSelection* object, bool take_copy = false);
+}
+namespace Glib
+{
+ /** @relates Gtk::FontSelectionDialog
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::FontSelectionDialog* wrap(GtkFontSelectionDialog* object, bool take_copy = false);
+}
+#endif /* _GTKMM_FONTSELECTION_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/frame.cc b/libs/gtkmm2/gtk/gtkmm/frame.cc
new file mode 100644
index 0000000000..d24fa422c7
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/frame.cc
@@ -0,0 +1,292 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/frame.h>
+#include <gtkmm/private/frame_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkframe.h>
+
+namespace Gtk
+{
+
+void Frame::unset_label()
+{
+ gtk_frame_set_label(gobj(), 0);
+}
+
+} // namespace Gtk
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::Frame* wrap(GtkFrame* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::Frame *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Frame_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Frame_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_frame_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Frame_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->compute_child_allocation = &compute_child_allocation_vfunc_callback;
+}
+
+void Frame_Class::compute_child_allocation_vfunc_callback(GtkFrame* self, GtkAllocation* allocation)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->compute_child_allocation_vfunc((Allocation&)(Glib::wrap(allocation))
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->compute_child_allocation)
+ (*base->compute_child_allocation)(self, allocation);
+ }
+}
+
+
+Glib::ObjectBase* Frame_Class::wrap_new(GObject* o)
+{
+ return manage(new Frame((GtkFrame*)(o)));
+
+}
+
+
+/* The implementation: */
+
+Frame::Frame(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Bin(construct_params)
+{
+ }
+
+Frame::Frame(GtkFrame* castitem)
+:
+ Gtk::Bin((GtkBin*)(castitem))
+{
+ }
+
+Frame::~Frame()
+{
+ destroy_();
+}
+
+Frame::CppClassType Frame::frame_class_; // initialize static member
+
+GType Frame::get_type()
+{
+ return frame_class_.init().get_type();
+}
+
+GType Frame::get_base_type()
+{
+ return gtk_frame_get_type();
+}
+
+
+Frame::Frame()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Bin(Glib::ConstructParams(frame_class_.init()))
+{
+ }
+
+Frame::Frame(const Glib::ustring& label)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Bin(Glib::ConstructParams(frame_class_.init(), "label", label.c_str(), (char*) 0))
+{
+ }
+
+void Frame::set_label(const Glib::ustring& label)
+{
+ gtk_frame_set_label(gobj(), label.c_str());
+}
+
+Glib::ustring Frame::get_label() const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(gtk_frame_get_label(const_cast<GtkFrame*>(gobj())));
+}
+
+void Frame::set_label_widget(Widget& label_widget)
+{
+ gtk_frame_set_label_widget(gobj(), (label_widget).gobj());
+}
+
+Widget* Frame::get_label_widget()
+{
+ return Glib::wrap(gtk_frame_get_label_widget(gobj()));
+}
+
+const Widget* Frame::get_label_widget() const
+{
+ return Glib::wrap(gtk_frame_get_label_widget(const_cast<GtkFrame*>(gobj())));
+}
+
+void Frame::set_label_align(float xalign, float yalign)
+{
+ gtk_frame_set_label_align(gobj(), xalign, yalign);
+}
+
+void Frame::set_label_align(AlignmentEnum xalign, AlignmentEnum yalign)
+{
+ gtk_frame_set_label_align(gobj(), _gtkmm_align_float_from_enum(xalign), _gtkmm_align_float_from_enum(yalign));
+}
+
+void Frame::get_label_align(float& xalign, float& yalign) const
+{
+ gtk_frame_get_label_align(const_cast<GtkFrame*>(gobj()), &(xalign), &(yalign));
+}
+
+void Frame::set_shadow_type(ShadowType type)
+{
+ gtk_frame_set_shadow_type(gobj(), ((GtkShadowType)(type)));
+}
+
+ShadowType Frame::get_shadow_type() const
+{
+ return ((ShadowType)(gtk_frame_get_shadow_type(const_cast<GtkFrame*>(gobj()))));
+}
+
+
+Glib::PropertyProxy<Glib::ustring> Frame::property_label()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "label");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> Frame::property_label() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "label");
+}
+
+Glib::PropertyProxy<double> Frame::property_label_xalign()
+{
+ return Glib::PropertyProxy<double>(this, "label-xalign");
+}
+
+Glib::PropertyProxy_ReadOnly<double> Frame::property_label_xalign() const
+{
+ return Glib::PropertyProxy_ReadOnly<double>(this, "label-xalign");
+}
+
+Glib::PropertyProxy<double> Frame::property_label_yalign()
+{
+ return Glib::PropertyProxy<double>(this, "label-yalign");
+}
+
+Glib::PropertyProxy_ReadOnly<double> Frame::property_label_yalign() const
+{
+ return Glib::PropertyProxy_ReadOnly<double>(this, "label-yalign");
+}
+
+Glib::PropertyProxy<ShadowType> Frame::property_shadow_type()
+{
+ return Glib::PropertyProxy<ShadowType>(this, "shadow-type");
+}
+
+Glib::PropertyProxy_ReadOnly<ShadowType> Frame::property_shadow_type() const
+{
+ return Glib::PropertyProxy_ReadOnly<ShadowType>(this, "shadow-type");
+}
+
+Glib::PropertyProxy<Widget*> Frame::property_label_widget()
+{
+ return Glib::PropertyProxy<Widget*>(this, "label-widget");
+}
+
+Glib::PropertyProxy_ReadOnly<Widget*> Frame::property_label_widget() const
+{
+ return Glib::PropertyProxy_ReadOnly<Widget*>(this, "label-widget");
+}
+
+
+void Gtk::Frame::compute_child_allocation_vfunc(Allocation& allocation)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->compute_child_allocation)
+ (*base->compute_child_allocation)(gobj(),(GtkAllocation*)(allocation.gobj()));
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/frame.h b/libs/gtkmm2/gtk/gtkmm/frame.h
new file mode 100644
index 0000000000..aaac3dd63c
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/frame.h
@@ -0,0 +1,305 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_FRAME_H
+#define _GTKMM_FRAME_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* frame.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#include <gtkmm/bin.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkFrame GtkFrame;
+typedef struct _GtkFrameClass GtkFrameClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class Frame_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** A Gtk::Bin with a decorative frame and optional label.
+ *
+ * The Frame widget surrounds its single child with a decorative frame and
+ * an optional label. If present, the label is drawn in a gap in the top
+ * side of the frame. The position of the label can be controlled with
+ * set_label_align().
+ *
+ * @ingroup Widgets
+ * @ingroup Containers
+ */
+
+class Frame : public Bin
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Frame CppObjectType;
+ typedef Frame_Class CppClassType;
+ typedef GtkFrame BaseObjectType;
+ typedef GtkFrameClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~Frame();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class Frame_Class;
+ static CppClassType frame_class_;
+
+ // noncopyable
+ Frame(const Frame&);
+ Frame& operator=(const Frame&);
+
+protected:
+ explicit Frame(const Glib::ConstructParams& construct_params);
+ explicit Frame(GtkFrame* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkFrame* gobj() { return reinterpret_cast<GtkFrame*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkFrame* gobj() const { return reinterpret_cast<GtkFrame*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+public:
+
+ Frame();
+ explicit Frame(const Glib::ustring& label);
+
+ //TODO: Add a bool use_markup arg to set_label() as a convenience - it would have to use set_label_widget().
+
+ /** Set the label to appear in the top edge of the frame.
+ * Label alignment defaults to the upper left corner of the frame.
+ */
+
+ /** Sets the text of the label. If @a label is <tt>0</tt>,
+ * the current label is removed.
+ * @param label The text to use as the label of the frame.
+ */
+ void set_label(const Glib::ustring& label);
+ void unset_label();
+
+ /** If the frame's label widget is a Gtk::Label, returns the
+ * text in the label widget. (The frame will have a Gtk::Label
+ * for the label widget if a non-<tt>0</tt> argument was passed
+ * to new().)
+ * @return The text in the label, or <tt>0</tt> if there
+ * was no label widget or the lable widget was not
+ * a Gtk::Label. This string is owned by GTK+ and
+ * must not be modified or freed.
+ */
+ Glib::ustring get_label() const;
+
+
+ /** Sets the label widget for the frame. This is the widget that
+ * will appear embedded in the top edge of the frame as a
+ * title.
+ * @param label_widget The new label widget.
+ */
+ void set_label_widget(Widget& label_widget);
+
+ /** Retrieves the label widget for the frame. See
+ * set_label_widget().
+ * @return The label widget, or <tt>0</tt> if there is none.
+ */
+ Widget* get_label_widget();
+
+ /** Retrieves the label widget for the frame. See
+ * set_label_widget().
+ * @return The label widget, or <tt>0</tt> if there is none.
+ */
+ const Widget* get_label_widget() const;
+
+ /** Set the alignment of the Frame's label.
+ * @param xalign The position of the label along the top edge of the widget.
+ * A value of 0.0 represents left alignment; 1.0 represents right alignment.
+ * The default value for a newly created Frame is 0.0.
+ * @param yalign The y alignment of the label. Currently ignored.
+ */
+
+ /** Sets the alignment of the frame widget's label. The
+ * default values for a newly created frame are 0.0 and 0.5.
+ * @param xalign The position of the label along the top edge
+ * of the widget. A value of 0.0 represents left alignment;
+ * 1.0 represents right alignment.
+ * @param yalign The y alignment of the label. A value of 0.0 aligns under
+ * the frame; 1.0 aligns above the frame.
+ */
+ void set_label_align(float xalign = 0.0, float yalign = 0.5);
+
+ /** Sets the alignment of the frame widget's label. The
+ * default values for a newly created frame are 0.0 and 0.5.
+ * @param xalign The position of the label along the top edge
+ * of the widget. A value of 0.0 represents left alignment;
+ * 1.0 represents right alignment.
+ * @param yalign The y alignment of the label. A value of 0.0 aligns under
+ * the frame; 1.0 aligns above the frame.
+ */
+ void set_label_align(AlignmentEnum xalign, AlignmentEnum yalign = Gtk::ALIGN_CENTER);
+
+
+ /** Retrieves the X and Y alignment of the frame's label. See
+ * set_label_align().
+ * @param xalign Location to store X alignment of frame's label, or <tt>0</tt>.
+ * @param yalign Location to store X alignment of frame's label, or <tt>0</tt>.
+ */
+ void get_label_align(float& xalign, float& yalign) const;
+
+ /** Sets shadow type of the frame.
+ */
+
+ /** Sets the shadow type for @a frame .
+ * @param type The new Gtk::ShadowType.
+ */
+ void set_shadow_type(ShadowType type);
+
+ /** Retrieves the shadow type of the frame. See
+ * set_shadow_type().
+ * @return The current shadow type of the frame.
+ */
+ ShadowType get_shadow_type() const;
+
+ /** Text of the frame's label.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_label() ;
+
+/** Text of the frame's label.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_label() const;
+
+ /** The horizontal alignment of the label.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<double> property_label_xalign() ;
+
+/** The horizontal alignment of the label.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<double> property_label_xalign() const;
+
+ /** The vertical alignment of the label.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<double> property_label_yalign() ;
+
+/** The vertical alignment of the label.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<double> property_label_yalign() const;
+
+ /** Appearance of the frame border.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<ShadowType> property_shadow_type() ;
+
+/** Appearance of the frame border.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<ShadowType> property_shadow_type() const;
+
+ /** A widget to display in place of the usual frame label.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Widget*> property_label_widget() ;
+
+/** A widget to display in place of the usual frame label.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Widget*> property_label_widget() const;
+
+
+protected:
+ virtual void compute_child_allocation_vfunc(Allocation& allocation);
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::Frame
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::Frame* wrap(GtkFrame* object, bool take_copy = false);
+}
+#endif /* _GTKMM_FRAME_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/handlebox.cc b/libs/gtkmm2/gtk/gtkmm/handlebox.cc
new file mode 100644
index 0000000000..86c2a0fe9c
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/handlebox.cc
@@ -0,0 +1,419 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/handlebox.h>
+#include <gtkmm/private/handlebox_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkhandlebox.h>
+#include <gdkmm/window.h>
+
+namespace Gtk
+{
+
+bool HandleBox::is_child_detached() const
+{
+ return gobj()->child_detached;
+}
+
+bool HandleBox::is_float_window_mapped() const
+{
+ return gobj()->float_window_mapped;
+}
+
+bool HandleBox::is_in_drag() const
+{
+ return gobj()->in_drag;
+}
+
+bool HandleBox::shrinks_on_detach() const
+{
+ return gobj()->shrink_on_detach;
+}
+
+} /* namespace Gtk */
+
+
+namespace
+{
+
+void HandleBox_signal_child_attached_callback(GtkHandleBox* self, GtkWidget* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,Widget* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::wrap(p0)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo HandleBox_signal_child_attached_info =
+{
+ "child_attached",
+ (GCallback) &HandleBox_signal_child_attached_callback,
+ (GCallback) &HandleBox_signal_child_attached_callback
+};
+
+
+void HandleBox_signal_child_detached_callback(GtkHandleBox* self, GtkWidget* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,Widget* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::wrap(p0)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo HandleBox_signal_child_detached_info =
+{
+ "child_detached",
+ (GCallback) &HandleBox_signal_child_detached_callback,
+ (GCallback) &HandleBox_signal_child_detached_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::HandleBox* wrap(GtkHandleBox* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::HandleBox *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& HandleBox_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &HandleBox_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_handle_box_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void HandleBox_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->child_attached = &child_attached_callback;
+ klass->child_detached = &child_detached_callback;
+}
+
+
+void HandleBox_Class::child_attached_callback(GtkHandleBox* self, GtkWidget* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_child_attached(Glib::wrap(p0)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->child_attached)
+ (*base->child_attached)(self, p0);
+ }
+}
+
+void HandleBox_Class::child_detached_callback(GtkHandleBox* self, GtkWidget* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_child_detached(Glib::wrap(p0)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->child_detached)
+ (*base->child_detached)(self, p0);
+ }
+}
+
+
+Glib::ObjectBase* HandleBox_Class::wrap_new(GObject* o)
+{
+ return manage(new HandleBox((GtkHandleBox*)(o)));
+
+}
+
+
+/* The implementation: */
+
+HandleBox::HandleBox(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Bin(construct_params)
+{
+ }
+
+HandleBox::HandleBox(GtkHandleBox* castitem)
+:
+ Gtk::Bin((GtkBin*)(castitem))
+{
+ }
+
+HandleBox::~HandleBox()
+{
+ destroy_();
+}
+
+HandleBox::CppClassType HandleBox::handlebox_class_; // initialize static member
+
+GType HandleBox::get_type()
+{
+ return handlebox_class_.init().get_type();
+}
+
+GType HandleBox::get_base_type()
+{
+ return gtk_handle_box_get_type();
+}
+
+
+HandleBox::HandleBox()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Bin(Glib::ConstructParams(handlebox_class_.init()))
+{
+ }
+
+void HandleBox::set_shadow_type(ShadowType type)
+{
+ gtk_handle_box_set_shadow_type(gobj(), ((GtkShadowType)(type)));
+}
+
+ShadowType HandleBox::get_shadow_type() const
+{
+ return ((ShadowType)(gtk_handle_box_get_shadow_type(const_cast<GtkHandleBox*>(gobj()))));
+}
+
+void HandleBox::set_handle_position(PositionType position)
+{
+ gtk_handle_box_set_handle_position(gobj(), ((GtkPositionType)(position)));
+}
+
+PositionType HandleBox::get_handle_position() const
+{
+ return ((PositionType)(gtk_handle_box_get_handle_position(const_cast<GtkHandleBox*>(gobj()))));
+}
+
+void HandleBox::set_snap_edge(PositionType edge)
+{
+ gtk_handle_box_set_snap_edge(gobj(), ((GtkPositionType)(edge)));
+}
+
+PositionType HandleBox::get_snap_edge() const
+{
+ return ((PositionType)(gtk_handle_box_get_snap_edge(const_cast<GtkHandleBox*>(gobj()))));
+}
+
+Glib::RefPtr<Gdk::Window> HandleBox::get_bin_window()
+{
+ Glib::RefPtr<Gdk::Window> ref_ptr(Glib::wrap((GdkWindowObject*)(gobj()->bin_window)));
+
+ if(ref_ptr)
+ ref_ptr->reference();
+
+ return ref_ptr;
+}
+
+Glib::RefPtr<const Gdk::Window> HandleBox::get_bin_window() const
+{
+ Glib::RefPtr<const Gdk::Window> ref_ptr(Glib::wrap((GdkWindowObject*)(gobj()->bin_window)));
+
+ if(ref_ptr)
+ ref_ptr->reference();
+
+ return ref_ptr;
+}
+
+Glib::RefPtr<Gdk::Window> HandleBox::get_float_window()
+{
+ Glib::RefPtr<Gdk::Window> ref_ptr(Glib::wrap((GdkWindowObject*)(gobj()->float_window)));
+
+ if(ref_ptr)
+ ref_ptr->reference();
+
+ return ref_ptr;
+}
+
+Glib::RefPtr<const Gdk::Window> HandleBox::get_float_window() const
+{
+ Glib::RefPtr<const Gdk::Window> ref_ptr(Glib::wrap((GdkWindowObject*)(gobj()->float_window)));
+
+ if(ref_ptr)
+ ref_ptr->reference();
+
+ return ref_ptr;
+}
+
+
+Glib::SignalProxy1< void,Widget* > HandleBox::signal_child_attached()
+{
+ return Glib::SignalProxy1< void,Widget* >(this, &HandleBox_signal_child_attached_info);
+}
+
+Glib::SignalProxy1< void,Widget* > HandleBox::signal_child_detached()
+{
+ return Glib::SignalProxy1< void,Widget* >(this, &HandleBox_signal_child_detached_info);
+}
+
+
+Glib::PropertyProxy<ShadowType> HandleBox::property_shadow_type()
+{
+ return Glib::PropertyProxy<ShadowType>(this, "shadow-type");
+}
+
+Glib::PropertyProxy_ReadOnly<ShadowType> HandleBox::property_shadow_type() const
+{
+ return Glib::PropertyProxy_ReadOnly<ShadowType>(this, "shadow-type");
+}
+
+Glib::PropertyProxy<PositionType> HandleBox::property_handle_position()
+{
+ return Glib::PropertyProxy<PositionType>(this, "handle-position");
+}
+
+Glib::PropertyProxy_ReadOnly<PositionType> HandleBox::property_handle_position() const
+{
+ return Glib::PropertyProxy_ReadOnly<PositionType>(this, "handle-position");
+}
+
+Glib::PropertyProxy<PositionType> HandleBox::property_snap_edge()
+{
+ return Glib::PropertyProxy<PositionType>(this, "snap-edge");
+}
+
+Glib::PropertyProxy_ReadOnly<PositionType> HandleBox::property_snap_edge() const
+{
+ return Glib::PropertyProxy_ReadOnly<PositionType>(this, "snap-edge");
+}
+
+
+void Gtk::HandleBox::on_child_attached(Widget* child)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->child_attached)
+ (*base->child_attached)(gobj(),(GtkWidget*)Glib::unwrap(child));
+}
+
+void Gtk::HandleBox::on_child_detached(Widget* child)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->child_detached)
+ (*base->child_detached)(gobj(),(GtkWidget*)Glib::unwrap(child));
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/handlebox.h b/libs/gtkmm2/gtk/gtkmm/handlebox.h
new file mode 100644
index 0000000000..89d4614bfc
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/handlebox.h
@@ -0,0 +1,220 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_HANDLEBOX_H
+#define _GTKMM_HANDLEBOX_H
+
+#include <glibmm.h>
+
+ /* $Id$ */
+
+/* handlebox.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/eventbox.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkHandleBox GtkHandleBox;
+typedef struct _GtkHandleBoxClass GtkHandleBoxClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class HandleBox_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** A widget for detachable window portions.
+ *
+ * The Gtk::HandleBox widget allows a portion of a window to be "torn off".
+ * It displays its child and a handle that the user can drag to tear off a separate window (the float window) containing the child widget. A thin ghost is drawn in the original location of the handlebox. By dragging the separate window back to its original location, it can be reattached.
+ * When reattaching, the ghost and float window must be aligned along one of the edges, the snap edge. This can be specified by the application programmer explicitely, or GTK+ will pick a reasonable default based on the handle position.
+ * To make detaching and reattaching the handlebox as minimally confusing as possible to the user, it is important to set the snap edge so that the snap edge does not move when the handlebox is deattached.
+ * For instance, if the handlebox is packed at the bottom of a VBox, then when the handlebox is detached, the bottom edge of the handlebox's allocation will remain fixed as the height of the handlebox shrinks, so the snap edge should be set to GTK_POS_BOTTOM.
+ *
+ * @ingroup Widgets
+ * @ingroup Containers
+ */
+
+class HandleBox : public Bin
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef HandleBox CppObjectType;
+ typedef HandleBox_Class CppClassType;
+ typedef GtkHandleBox BaseObjectType;
+ typedef GtkHandleBoxClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~HandleBox();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class HandleBox_Class;
+ static CppClassType handlebox_class_;
+
+ // noncopyable
+ HandleBox(const HandleBox&);
+ HandleBox& operator=(const HandleBox&);
+
+protected:
+ explicit HandleBox(const Glib::ConstructParams& construct_params);
+ explicit HandleBox(GtkHandleBox* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkHandleBox* gobj() { return reinterpret_cast<GtkHandleBox*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkHandleBox* gobj() const { return reinterpret_cast<GtkHandleBox*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_child_attached(Widget* child);
+ virtual void on_child_detached(Widget* child);
+
+
+private:
+
+public:
+ HandleBox();
+
+
+ void set_shadow_type(ShadowType type);
+
+ /** Gets the type of shadow drawn around the handle box. See
+ * set_shadow_type().
+ * @return The type of shadow currently drawn around the handle box.
+ */
+ ShadowType get_shadow_type() const;
+
+ void set_handle_position(PositionType position);
+
+ /** Gets the handle position of the handle box. See
+ * set_handle_position().
+ * @return The current handle position.
+ */
+ PositionType get_handle_position() const;
+
+ void set_snap_edge(PositionType edge);
+
+ /** Gets the edge used for determining reattachment of the handle box. See
+ * set_snap_edge().
+ * @return The edge used for determining reattachment, or (GtkPositionType)-1 if this
+ * is determined (as per default) from the handle position.
+ */
+ PositionType get_snap_edge() const;
+
+
+ Glib::SignalProxy1< void,Widget* > signal_child_attached();
+
+
+ Glib::SignalProxy1< void,Widget* > signal_child_detached();
+
+
+ Glib::RefPtr<Gdk::Window> get_bin_window();
+ Glib::RefPtr<const Gdk::Window> get_bin_window() const;
+ Glib::RefPtr<Gdk::Window> get_float_window();
+ Glib::RefPtr<const Gdk::Window> get_float_window() const;
+
+ bool is_child_detached() const;
+ bool is_float_window_mapped() const;
+ bool is_in_drag() const;
+ bool shrinks_on_detach() const;
+
+ //_WRAP_PROPERTY("shadow", ShadowType); //deprecated.
+ /** Appearance of the shadow that surrounds the container.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<ShadowType> property_shadow_type() ;
+
+/** Appearance of the shadow that surrounds the container.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<ShadowType> property_shadow_type() const;
+
+ /** Position of the handle relative to the child widget.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<PositionType> property_handle_position() ;
+
+/** Position of the handle relative to the child widget.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<PositionType> property_handle_position() const;
+
+ /** Side of the handlebox that's lined up with the docking point to dock the handlebox.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<PositionType> property_snap_edge() ;
+
+/** Side of the handlebox that's lined up with the docking point to dock the handlebox.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<PositionType> property_snap_edge() const;
+
+
+};
+
+} /* namespace Gtk */
+
+
+namespace Glib
+{
+ /** @relates Gtk::HandleBox
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::HandleBox* wrap(GtkHandleBox* object, bool take_copy = false);
+}
+#endif /* _GTKMM_HANDLEBOX_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/iconfactory.cc b/libs/gtkmm2/gtk/gtkmm/iconfactory.cc
new file mode 100644
index 0000000000..4a305d1291
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/iconfactory.cc
@@ -0,0 +1,189 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/iconfactory.h>
+#include <gtkmm/private/iconfactory_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkiconfactory.h>
+
+namespace Gtk
+{
+
+// static
+bool IconSize::lookup(IconSize size, int& width, int& height)
+{
+ return gtk_icon_size_lookup((GtkIconSize) int(size), &width, &height);
+}
+
+// static
+IconSize IconSize::register_new(const Glib::ustring& name, int width, int height)
+{
+ const int size = gtk_icon_size_register(name.c_str(), width, height);
+ return IconSize(size);
+}
+
+// static
+void IconSize::register_alias(const Glib::ustring& alias, IconSize target)
+{
+ gtk_icon_size_register_alias(alias.c_str(), (GtkIconSize) int(target));
+}
+
+// static
+IconSize IconSize::from_name(const Glib::ustring& name)
+{
+ const int size = gtk_icon_size_from_name(name.c_str());
+ return IconSize(size);
+}
+
+// static
+Glib::ustring IconSize::get_name(IconSize size)
+{
+ return gtk_icon_size_get_name((GtkIconSize) int(size));
+}
+
+} // namespace Gtk
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Gtk::IconFactory> wrap(GtkIconFactory* object, bool take_copy)
+{
+ return Glib::RefPtr<Gtk::IconFactory>( dynamic_cast<Gtk::IconFactory*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} /* namespace Glib */
+
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& IconFactory_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &IconFactory_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_icon_factory_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void IconFactory_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* IconFactory_Class::wrap_new(GObject* object)
+{
+ return new IconFactory((GtkIconFactory*)object);
+}
+
+
+/* The implementation: */
+
+GtkIconFactory* IconFactory::gobj_copy()
+{
+ reference();
+ return gobj();
+}
+
+IconFactory::IconFactory(const Glib::ConstructParams& construct_params)
+:
+ Glib::Object(construct_params)
+{}
+
+IconFactory::IconFactory(GtkIconFactory* castitem)
+:
+ Glib::Object((GObject*)(castitem))
+{}
+
+IconFactory::~IconFactory()
+{}
+
+
+IconFactory::CppClassType IconFactory::iconfactory_class_; // initialize static member
+
+GType IconFactory::get_type()
+{
+ return iconfactory_class_.init().get_type();
+}
+
+GType IconFactory::get_base_type()
+{
+ return gtk_icon_factory_get_type();
+}
+
+
+IconFactory::IconFactory()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Glib::Object(Glib::ConstructParams(iconfactory_class_.init()))
+{
+ }
+
+Glib::RefPtr<IconFactory> IconFactory::create()
+{
+ return Glib::RefPtr<IconFactory>( new IconFactory() );
+}
+void IconFactory::add(const Gtk::StockID& stock_id, const IconSet& icon_set)
+{
+ gtk_icon_factory_add(gobj(), (stock_id).get_c_str(), const_cast<GtkIconSet*>((icon_set).gobj()));
+}
+
+void IconFactory::add_default()
+{
+ gtk_icon_factory_add_default(gobj());
+}
+
+void IconFactory::remove_default()
+{
+ gtk_icon_factory_remove_default(gobj());
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/iconfactory.h b/libs/gtkmm2/gtk/gtkmm/iconfactory.h
new file mode 100644
index 0000000000..39b98e792f
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/iconfactory.h
@@ -0,0 +1,160 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_ICONFACTORY_H
+#define _GTKMM_ICONFACTORY_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#include <gtkmm/enums.h>
+#include <gtkmm/object.h>
+#include <gtkmm/enums.h>
+#include <gtkmm/iconset.h>
+#include <gtkmm/stockid.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkIconFactory GtkIconFactory;
+typedef struct _GtkIconFactoryClass GtkIconFactoryClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class IconFactory_Class; } // namespace Gtk
+namespace Gtk
+{
+
+
+class IconFactory : public Glib::Object
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef IconFactory CppObjectType;
+ typedef IconFactory_Class CppClassType;
+ typedef GtkIconFactory BaseObjectType;
+ typedef GtkIconFactoryClass BaseClassType;
+
+private: friend class IconFactory_Class;
+ static CppClassType iconfactory_class_;
+
+private:
+ // noncopyable
+ IconFactory(const IconFactory&);
+ IconFactory& operator=(const IconFactory&);
+
+protected:
+ explicit IconFactory(const Glib::ConstructParams& construct_params);
+ explicit IconFactory(GtkIconFactory* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~IconFactory();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ GtkIconFactory* gobj() { return reinterpret_cast<GtkIconFactory*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const GtkIconFactory* gobj() const { return reinterpret_cast<GtkIconFactory*>(gobject_); }
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ GtkIconFactory* gobj_copy();
+
+private:
+
+
+protected:
+
+ IconFactory();
+
+public:
+
+ static Glib::RefPtr<IconFactory> create();
+
+
+ /** Adds the given @a icon_set to the icon factory, under the name
+ * @a stock_id . @a stock_id should be namespaced for your application,
+ * e.g. "myapp-whatever-icon". Normally applications create a
+ * Gtk::IconFactory, then add it to the list of default factories with
+ * add_default(). Then they pass the @a stock_id to
+ * widgets such as Gtk::Image to display the icon. Themes can provide
+ * an icon with the same name (such as "myapp-whatever-icon") to
+ * override your application's default icons. If an icon already
+ * existed in @a factory for @a stock_id , it is unreferenced and replaced
+ * with the new @a icon_set .
+ * @param stock_id Icon name.
+ * @param icon_set Icon set.
+ */
+ void add(const Gtk::StockID& stock_id, const IconSet& icon_set);
+
+ /** Adds an icon factory to the list of icon factories searched by
+ * Gtk::Style::lookup_icon_set(). This means that, for example,
+ * Gtk::Image::new_from_stock() will be able to find icons in @a factory .
+ * There will normally be an icon factory added for each library or
+ * application that comes with icons. The default icon factories
+ * can be overridden by themes.
+ */
+ void add_default();
+
+ /** Removes an icon factory from the list of default icon
+ * factories. Not normally used; you might use it for a library that
+ * can be unloaded or shut down.
+ */
+ void remove_default();
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::IconFactory
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Gtk::IconFactory> wrap(GtkIconFactory* object, bool take_copy = false);
+}
+
+
+#endif /* _GTKMM_ICONFACTORY_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/iconinfo.cc b/libs/gtkmm2/gtk/gtkmm/iconinfo.cc
new file mode 100644
index 0000000000..7dfaa15c79
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/iconinfo.cc
@@ -0,0 +1,177 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/iconinfo.h>
+#include <gtkmm/private/iconinfo_p.h>
+
+/* Copyright 2003 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkicontheme.h>
+
+namespace Gtk
+{
+
+bool IconInfo::get_attach_points(Glib::ArrayHandle<Gdk::Point>& /* points */) const
+{
+ GdkPoint* c_attach_points = 0;
+ gint n_points = 0;
+ bool result = gtk_icon_info_get_attach_points (const_cast<GtkIconInfo*>(gobj()), &c_attach_points, &n_points);
+
+ if(c_attach_points)
+ {
+ //TODO: Why doesn't this compile?
+ //points = Glib::ArrayHandle<Gdk::Point>(c_attach_points, n_points, Glib::OWNERSHIP_SHALLOW); //We use OWNERSHIP_SHALLOW because we just need to g_free() the array and nothing more.
+ }
+ return result;
+}
+
+IconInfo::operator bool()
+{
+ return gobj() != 0;
+}
+
+
+} // namespace Gtk
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::IconInfo wrap(GtkIconInfo* object, bool take_copy)
+{
+ return Gtk::IconInfo(object, take_copy);
+}
+
+} // namespace Glib
+
+
+namespace Gtk
+{
+
+
+// static
+GType IconInfo::get_type()
+{
+ return gtk_icon_info_get_type();
+}
+
+IconInfo::IconInfo()
+:
+ gobject_ (0) // Allows creation of invalid wrapper, e.g. for output arguments to methods.
+{}
+
+IconInfo::IconInfo(const IconInfo& other)
+:
+ gobject_ ((other.gobject_) ? gtk_icon_info_copy(other.gobject_) : 0)
+{}
+
+IconInfo::IconInfo(GtkIconInfo* gobject, bool make_a_copy)
+:
+ // For BoxedType wrappers, make_a_copy is true by default. The static
+ // BoxedType wrappers must always take a copy, thus make_a_copy = true
+ // ensures identical behaviour if the default argument is used.
+ gobject_ ((make_a_copy && gobject) ? gtk_icon_info_copy(gobject) : gobject)
+{}
+
+IconInfo& IconInfo::operator=(const IconInfo& other)
+{
+ IconInfo temp (other);
+ swap(temp);
+ return *this;
+}
+
+IconInfo::~IconInfo()
+{
+ if(gobject_)
+ gtk_icon_info_free(gobject_);
+}
+
+void IconInfo::swap(IconInfo& other)
+{
+ GtkIconInfo *const temp = gobject_;
+ gobject_ = other.gobject_;
+ other.gobject_ = temp;
+}
+
+GtkIconInfo* IconInfo::gobj_copy() const
+{
+ return gtk_icon_info_copy(gobject_);
+}
+
+
+int IconInfo::get_base_size() const
+{
+ return gtk_icon_info_get_base_size(const_cast<GtkIconInfo*>(gobj()));
+}
+
+Glib::ustring IconInfo::get_filename() const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(gtk_icon_info_get_filename(const_cast<GtkIconInfo*>(gobj())));
+}
+
+Glib::RefPtr<Gdk::Pixbuf> IconInfo::get_builtin_pixbuf()
+{
+
+ Glib::RefPtr<Gdk::Pixbuf> retvalue = Glib::wrap(gtk_icon_info_get_builtin_pixbuf(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const Gdk::Pixbuf> IconInfo::get_builtin_pixbuf() const
+{
+
+ Glib::RefPtr<const Gdk::Pixbuf> retvalue = Glib::wrap(gtk_icon_info_get_builtin_pixbuf(const_cast<GtkIconInfo*>(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<Gdk::Pixbuf> IconInfo::load_icon() const
+{
+ GError *error = 0;
+ Glib::RefPtr<Gdk::Pixbuf> retvalue = Glib::wrap(gtk_icon_info_load_icon(const_cast<GtkIconInfo*>(gobj()), &(error)));
+ if(error) ::Glib::Error::throw_exception(error);
+ return retvalue;
+}
+
+void IconInfo::set_raw_coordinates(bool raw_coordinates)
+{
+ gtk_icon_info_set_raw_coordinates(gobj(), static_cast<int>(raw_coordinates));
+}
+
+bool IconInfo::get_embedded_rect(Gdk::Rectangle& rectangle) const
+{
+ return gtk_icon_info_get_embedded_rect(const_cast<GtkIconInfo*>(gobj()), (rectangle).gobj());
+}
+
+Glib::ustring IconInfo::get_display_name() const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(gtk_icon_info_get_display_name(const_cast<GtkIconInfo*>(gobj())));
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/iconinfo.h b/libs/gtkmm2/gtk/gtkmm/iconinfo.h
new file mode 100644
index 0000000000..73f36a2f6f
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/iconinfo.h
@@ -0,0 +1,227 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_ICONINFO_H
+#define _GTKMM_ICONINFO_H
+
+#include <glibmm.h>
+
+/* Copyright (C) 2003 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gdkmm/rectangle.h>
+#include <gdkmm/pixbuf.h>
+#include <gdkmm/types.h>
+
+//#include <gtk/gtkicontheme.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C" { typedef struct _GtkIconInfo GtkIconInfo; }
+#endif
+
+namespace Gtk
+{
+
+class IconInfo
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef IconInfo CppObjectType;
+ typedef GtkIconInfo BaseObjectType;
+
+ static GType get_type() G_GNUC_CONST;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ IconInfo();
+
+ explicit IconInfo(GtkIconInfo* gobject, bool make_a_copy = true);
+
+ IconInfo(const IconInfo& other);
+ IconInfo& operator=(const IconInfo& other);
+
+ ~IconInfo();
+
+ void swap(IconInfo& other);
+
+ ///Provides access to the underlying C instance.
+ GtkIconInfo* gobj() { return gobject_; }
+
+ ///Provides access to the underlying C instance.
+ const GtkIconInfo* gobj() const { return gobject_; }
+
+ ///Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs.
+ GtkIconInfo* gobj_copy() const;
+
+protected:
+ GtkIconInfo* gobject_;
+
+private:
+
+
+public:
+
+ ///Tests whether the IconInfo is valid.
+ operator bool();
+
+
+ /** Gets the base size for the icon. The base size
+ * is a size for the icon that was specified by
+ * the icon theme creator. This may be different
+ * than the actual size of image; an example of
+ * this is small emblem icons that can be attached
+ * to a larger icon. These icons will be given
+ * the same base size as the larger icons to which
+ * they are attached.
+ * @return The base size, or 0, if no base
+ * size is known for the icon.
+ *
+ * Since: 2.4.
+ */
+ int get_base_size() const;
+
+ /** Gets the filename for the icon. If the
+ * Gtk::ICON_LOOKUP_USE_BUILTIN flag was passed
+ * to Gtk::IconTheme::lookup_icon(), there may be
+ * no filename if a builtin icon is returned; in this
+ * case, you should use gtk_icon_info_get_builtin_pixbuf().
+ * @return The filename for the icon, or <tt>0</tt>
+ * if gtk_icon_info_get_builtin_pixbuf() should
+ * be used instead.
+ */
+ Glib::ustring get_filename() const;
+
+ /** Gets the built-in image for this icon, if any. To allow
+ * GTK+ to use built in icon images, you must pass the
+ * Gtk::ICON_LOOKUP_USE_BUILTIN to
+ * Gtk::IconTheme::lookup_icon().
+ * @return The built-in image pixbuf, or <tt>0</tt>.
+ * The returned image must not be modified.
+ */
+ Glib::RefPtr<Gdk::Pixbuf> get_builtin_pixbuf();
+
+ /** Gets the built-in image for this icon, if any. To allow
+ * GTK+ to use built in icon images, you must pass the
+ * Gtk::ICON_LOOKUP_USE_BUILTIN to
+ * Gtk::IconTheme::lookup_icon().
+ * @return The built-in image pixbuf, or <tt>0</tt>.
+ * The returned image must not be modified.
+ */
+ Glib::RefPtr<const Gdk::Pixbuf> get_builtin_pixbuf() const;
+
+ /** Renders an icon previously looked up in an icon theme using
+ * Gtk::IconTheme::lookup_icon(); the size will be based on the size
+ * passed to Gtk::IconTheme::lookup_icon(). Note that the resulting
+ * pixbuf may not be exactly this size; an icon theme may have icons
+ * that differ slightly from their nominal sizes, and in addition GTK+
+ * will avoid scaling icons that it considers sufficiently close to the
+ * requested size or for which the source image would have to be scaled
+ * up too far. (This maintains sharpness.)
+ * @return The rendered icon; this may be a newly created icon
+ * or a new reference to an internal icon, so you must not modify
+ * the icon. Use Glib::object_unref() to release your reference to the
+ * icon.
+ *
+ * Since: 2.4.
+ */
+ Glib::RefPtr<Gdk::Pixbuf> load_icon() const;
+
+ /** Sets whether the coordinates returned by gtk_icon_info_get_embedded_rect()
+ * and gtk_icon_info_get_attach_points() should be returned in their
+ * original form as specified in the icon theme, instead of scaled
+ * appropriately for the pixbuf returned by gtk_icon_info_load_icon().
+ *
+ * Raw coordinates are somewhat strange; they are specified to be with
+ * respect to the unscaled pixmap for PNG and XPM icons, but for SVG
+ * icons, they are in a 1000x1000 coordinate space that is scaled
+ * to the final size of the icon. You can determine if the icon is an SVG
+ * icon by using gtk_icon_info_get_filename(), and seeing if it is non-<tt>0</tt>
+ * and ends in '.svg'.
+ *
+ * This function is provided primarily to allow compatibility wrappers
+ * for older API's, and is not expected to be useful for applications.
+ *
+ * Since: 2.4
+ * @param raw_coordinates Whether the coordinates of embedded rectangles
+ * and attached points should be returned in their original
+ * (unscaled) form.
+ */
+ void set_raw_coordinates(bool raw_coordinates = true);
+
+ /** Gets the coordinates of a rectangle within the icon
+ * that can be used for display of information such
+ * as a preview of the contents of a text file.
+ * See gtk_icon_info_set_raw_coordinates() for further
+ * information about the coordinate system.
+ * @param rectangle Gdk::Rectangle in which to store embedded
+ * rectangle coordinates; coordinates are only stored
+ * when this function returns <tt>true</tt>.
+ * @return <tt>true</tt> if the icon has an embedded rectangle
+ *
+ * Since: 2.4.
+ */
+ bool get_embedded_rect(Gdk::Rectangle& rectangle) const;
+ bool get_attach_points(Glib::ArrayHandle<Gdk::Point>& points) const;
+
+ /** Gets the display name for an icon. A display name is a
+ * string to be used in place of the icon name in a user
+ * visible context like a list of icons.
+ * @return The display name for the icon or <tt>0</tt>, if
+ * the icon doesn't have a specified display name. This value
+ * is owned @a icon_info and must not be modified or free.
+ *
+ * Since: 2.4.
+ */
+ Glib::ustring get_display_name() const;
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Gtk
+{
+
+/** @relates Gtk::IconInfo
+ * @param lhs The left-hand side
+ * @param rhs The right-hand side
+ */
+inline void swap(IconInfo& lhs, IconInfo& rhs)
+ { lhs.swap(rhs); }
+
+} // namespace Gtk
+
+namespace Glib
+{
+
+/** @relates Gtk::IconInfo
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+Gtk::IconInfo wrap(GtkIconInfo* object, bool take_copy = false);
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+template <>
+class Value<Gtk::IconInfo> : public Glib::Value_Boxed<Gtk::IconInfo>
+{};
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+} // namespace Glib
+
+#endif /* _GTKMM_ICONINFO_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/iconset.cc b/libs/gtkmm2/gtk/gtkmm/iconset.cc
new file mode 100644
index 0000000000..7546b7d7d2
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/iconset.cc
@@ -0,0 +1,146 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/iconset.h>
+#include <gtkmm/private/iconset_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/widget.h>
+#include <gtkmm/style.h>
+#include <gtk/gtkiconfactory.h>
+
+namespace Gtk
+{
+
+IconSet::IconSet(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf)
+{
+ gobject_ = gtk_icon_set_new_from_pixbuf(pixbuf->gobj());
+}
+
+Glib::ArrayHandle<IconSize> IconSet::get_sizes() const
+{
+ GtkIconSize* pSizes = 0;
+ int n_sizes = 0;
+ gtk_icon_set_get_sizes(const_cast<GtkIconSet*>(gobj()), &pSizes, &n_sizes);
+
+ return Glib::ArrayHandle<IconSize>((IconSize*) pSizes, n_sizes, Glib::OWNERSHIP_SHALLOW);
+}
+
+IconSet IconSet::lookup_default(const Gtk::StockID& stock_id) //static
+{
+ GtkIconSet* pIconSet = gtk_icon_factory_lookup_default(stock_id.get_string().c_str());
+ return IconSet(pIconSet, true); //true = take_copy.
+}
+
+} /* namespace Gtk */
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::IconSet wrap(GtkIconSet* object, bool take_copy)
+{
+ return Gtk::IconSet(object, take_copy);
+}
+
+} // namespace Glib
+
+
+namespace Gtk
+{
+
+
+// static
+GType IconSet::get_type()
+{
+ return gtk_icon_set_get_type();
+}
+
+IconSet::IconSet()
+:
+ gobject_ (gtk_icon_set_new())
+{}
+
+IconSet::IconSet(const IconSet& other)
+:
+ gobject_ ((other.gobject_) ? gtk_icon_set_ref(other.gobject_) : 0)
+{}
+
+IconSet::IconSet(GtkIconSet* gobject, bool make_a_copy)
+:
+ // For BoxedType wrappers, make_a_copy is true by default. The static
+ // BoxedType wrappers must always take a copy, thus make_a_copy = true
+ // ensures identical behaviour if the default argument is used.
+ gobject_ ((make_a_copy && gobject) ? gtk_icon_set_ref(gobject) : gobject)
+{}
+
+IconSet& IconSet::operator=(const IconSet& other)
+{
+ IconSet temp (other);
+ swap(temp);
+ return *this;
+}
+
+IconSet::~IconSet()
+{
+ if(gobject_)
+ gtk_icon_set_unref(gobject_);
+}
+
+void IconSet::swap(IconSet& other)
+{
+ GtkIconSet *const temp = gobject_;
+ gobject_ = other.gobject_;
+ other.gobject_ = temp;
+}
+
+GtkIconSet* IconSet::gobj_copy() const
+{
+ return gtk_icon_set_ref(gobject_);
+}
+
+
+IconSet IconSet::copy() const
+{
+ return Glib::wrap(gtk_icon_set_copy(const_cast<GtkIconSet*>(gobj())));
+}
+
+Glib::RefPtr<Gdk::Pixbuf> IconSet::render_icon(const Glib::RefPtr<Style>& style, TextDirection direction, Gtk::StateType state, IconSize size, Widget& widget, const Glib::ustring& detail)
+{
+ return Glib::wrap(gtk_icon_set_render_icon(gobj(), Glib::unwrap(style), ((GtkTextDirection)(direction)), ((GtkStateType)(state)), static_cast<GtkIconSize>(int(size)), (widget).gobj(), detail.c_str()));
+}
+
+void IconSet::add_source(const IconSource& source)
+{
+ gtk_icon_set_add_source(gobj(), (source).gobj());
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/iconset.h b/libs/gtkmm2/gtk/gtkmm/iconset.h
new file mode 100644
index 0000000000..25ec3756ea
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/iconset.h
@@ -0,0 +1,188 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_ICONSET_H
+#define _GTKMM_ICONSET_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* iconset.h
+ *
+ * Copyright(C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software, ) you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation, ) either
+ * version 2 of the License, or(at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY, ) without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library, ) if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+//#include <gtkmm/style.h>
+#include <gdkmm/pixbuf.h>
+#include <gtkmm/iconsource.h>
+//#include <gtkmm/widget.h>
+#include <gtkmm/stockid.h>
+#include <glibmm/arrayhandle.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C" { typedef struct _GtkIconSet GtkIconSet; }
+#endif
+
+namespace Gtk
+{
+
+class Style;
+class Widget;
+
+class IconSet
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef IconSet CppObjectType;
+ typedef GtkIconSet BaseObjectType;
+
+ static GType get_type() G_GNUC_CONST;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ IconSet();
+
+ explicit IconSet(GtkIconSet* gobject, bool make_a_copy = true);
+
+ IconSet(const IconSet& other);
+ IconSet& operator=(const IconSet& other);
+
+ ~IconSet();
+
+ void swap(IconSet& other);
+
+ ///Provides access to the underlying C instance.
+ GtkIconSet* gobj() { return gobject_; }
+
+ ///Provides access to the underlying C instance.
+ const GtkIconSet* gobj() const { return gobject_; }
+
+ ///Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs.
+ GtkIconSet* gobj_copy() const;
+
+protected:
+ GtkIconSet* gobject_;
+
+private:
+
+
+public:
+ explicit IconSet(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf);
+
+
+ /** Copies @a icon_set by value.
+ * @return A new Gtk::IconSet identical to the first.
+ */
+ IconSet copy() const;
+
+ //Note that we use Gtk::StateType here instead of StateType, because there is an Atk::StateType too, and doxygen gets confused.
+
+ /** Renders an icon using Gtk::Style::render_icon(). In most cases,
+ * Gtk::Widget::render_icon() is better, since it automatically provides
+ * most of the arguments from the current widget settings. This
+ * function never returns <tt>0</tt>; if the icon can't be rendered
+ * (perhaps because an image file fails to load), a default "missing
+ * image" icon will be returned instead.
+ * @param style A Gtk::Style associated with @a widget , or <tt>0</tt>.
+ * @param direction Text direction.
+ * @param state Widget state.
+ * @param size Icon size. A size of (GtkIconSize)-1
+ * means render at the size of the source and don't scale.
+ * @param widget Widget that will display the icon, or <tt>0</tt>.
+ * The only use that is typically made of this
+ * is to determine the appropriate Gdk::Screen.
+ * @param detail Detail to pass to the theme engine, or <tt>0</tt>.
+ * Note that passing a detail of anything but <tt>0</tt>
+ * will disable caching.
+ * @return A Gdk::Pixbuf to be displayed.
+ */
+ Glib::RefPtr<Gdk::Pixbuf> render_icon(const Glib::RefPtr<Style>& style, TextDirection direction,
+ Gtk::StateType state, IconSize size,
+ Widget& widget, const Glib::ustring& detail);
+
+
+ /** Icon sets have a list of Gtk::IconSource, which they use as base
+ * icons for rendering icons in different states and sizes. Icons are
+ * scaled, made to look insensitive, etc. in
+ * gtk_icon_set_render_icon(), but Gtk::IconSet needs base images to
+ * work with. The base images and when to use them are described by
+ * a Gtk::IconSource.
+ *
+ * This function copies @a source , so you can reuse the same source immediately
+ * without affecting the icon set.
+ *
+ * An example of when you'd use this function: a web browser's "Back
+ * to Previous Page" icon might point in a different direction in
+ * Hebrew and in English; it might look different when insensitive;
+ * and it might change size depending on toolbar mode (small/large
+ * icons). So a single icon set would contain all those variants of
+ * the icon, and you might add a separate source for each one.
+ *
+ * You should nearly always add a "default" icon source with all
+ * fields wildcarded, which will be used as a fallback if no more
+ * specific source matches. Gtk::IconSet always prefers more specific
+ * icon sources to more generic icon sources. The order in which you
+ * add the sources to the icon set does not matter.
+ *
+ * gtk_icon_set_new_from_pixbuf() creates a new icon set with a
+ * default icon source based on the given pixbuf.
+ * @param source A Gtk::IconSource.
+ */
+ void add_source(const IconSource& source);
+
+ Glib::ArrayHandle<IconSize> get_sizes() const;
+
+ static IconSet lookup_default(const Gtk::StockID& stock_id);
+
+
+};
+
+} /* namespace Gtk */
+
+
+namespace Gtk
+{
+
+/** @relates Gtk::IconSet
+ * @param lhs The left-hand side
+ * @param rhs The right-hand side
+ */
+inline void swap(IconSet& lhs, IconSet& rhs)
+ { lhs.swap(rhs); }
+
+} // namespace Gtk
+
+namespace Glib
+{
+
+/** @relates Gtk::IconSet
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+Gtk::IconSet wrap(GtkIconSet* object, bool take_copy = false);
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+template <>
+class Value<Gtk::IconSet> : public Glib::Value_Boxed<Gtk::IconSet>
+{};
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+} // namespace Glib
+
+#endif /* _GTKMM_ICONSET_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/iconsource.cc b/libs/gtkmm2/gtk/gtkmm/iconsource.cc
new file mode 100644
index 0000000000..4ff332d9fd
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/iconsource.cc
@@ -0,0 +1,208 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/iconsource.h>
+#include <gtkmm/private/iconsource_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkiconfactory.h>
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::IconSource wrap(GtkIconSource* object, bool take_copy)
+{
+ return Gtk::IconSource(object, take_copy);
+}
+
+} // namespace Glib
+
+
+namespace Gtk
+{
+
+
+// static
+GType IconSource::get_type()
+{
+ return gtk_icon_source_get_type();
+}
+
+IconSource::IconSource()
+:
+ gobject_ (gtk_icon_source_new())
+{}
+
+IconSource::IconSource(const IconSource& other)
+:
+ gobject_ ((other.gobject_) ? gtk_icon_source_copy(other.gobject_) : 0)
+{}
+
+IconSource::IconSource(GtkIconSource* gobject, bool make_a_copy)
+:
+ // For BoxedType wrappers, make_a_copy is true by default. The static
+ // BoxedType wrappers must always take a copy, thus make_a_copy = true
+ // ensures identical behaviour if the default argument is used.
+ gobject_ ((make_a_copy && gobject) ? gtk_icon_source_copy(gobject) : gobject)
+{}
+
+IconSource& IconSource::operator=(const IconSource& other)
+{
+ IconSource temp (other);
+ swap(temp);
+ return *this;
+}
+
+IconSource::~IconSource()
+{
+ if(gobject_)
+ gtk_icon_source_free(gobject_);
+}
+
+void IconSource::swap(IconSource& other)
+{
+ GtkIconSource *const temp = gobject_;
+ gobject_ = other.gobject_;
+ other.gobject_ = temp;
+}
+
+GtkIconSource* IconSource::gobj_copy() const
+{
+ return gtk_icon_source_copy(gobject_);
+}
+
+
+void IconSource::set_filename(const Glib::ustring& filename)
+{
+ gtk_icon_source_set_filename(gobj(), filename.c_str());
+}
+
+void IconSource::set_pixbuf(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf)
+{
+ gtk_icon_source_set_pixbuf(gobj(), Glib::unwrap(pixbuf));
+}
+
+Glib::ustring IconSource::get_filename() const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(gtk_icon_source_get_filename(const_cast<GtkIconSource*>(gobj())));
+}
+
+Glib::RefPtr<Gdk::Pixbuf> IconSource::get_pixbuf()
+{
+
+ Glib::RefPtr<Gdk::Pixbuf> retvalue = Glib::wrap(gtk_icon_source_get_pixbuf(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const Gdk::Pixbuf> IconSource::get_pixbuf() const
+{
+
+ Glib::RefPtr<const Gdk::Pixbuf> retvalue = Glib::wrap(gtk_icon_source_get_pixbuf(const_cast<GtkIconSource*>(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+void IconSource::set_direction_wildcarded(bool setting)
+{
+ gtk_icon_source_set_direction_wildcarded(gobj(), static_cast<int>(setting));
+}
+
+void IconSource::set_state_wildcarded(bool setting)
+{
+ gtk_icon_source_set_state_wildcarded(gobj(), static_cast<int>(setting));
+}
+
+void IconSource::set_size_wildcarded(bool setting)
+{
+ gtk_icon_source_set_size_wildcarded(gobj(), static_cast<int>(setting));
+}
+
+bool IconSource::get_size_wildcarded() const
+{
+ return gtk_icon_source_get_size_wildcarded(const_cast<GtkIconSource*>(gobj()));
+}
+
+bool IconSource::get_state_wildcarded() const
+{
+ return gtk_icon_source_get_state_wildcarded(const_cast<GtkIconSource*>(gobj()));
+}
+
+bool IconSource::get_direction_wildcarded() const
+{
+ return gtk_icon_source_get_direction_wildcarded(const_cast<GtkIconSource*>(gobj()));
+}
+
+void IconSource::set_direction(TextDirection direction)
+{
+ gtk_icon_source_set_direction(gobj(), ((GtkTextDirection)(direction)));
+}
+
+void IconSource::set_state(Gtk::StateType state)
+{
+ gtk_icon_source_set_state(gobj(), ((GtkStateType)(state)));
+}
+
+void IconSource::set_size(IconSize size)
+{
+ gtk_icon_source_set_size(gobj(), static_cast<GtkIconSize>(int(size)));
+}
+
+TextDirection IconSource::get_direction() const
+{
+ return ((TextDirection)(gtk_icon_source_get_direction(const_cast<GtkIconSource*>(gobj()))));
+}
+
+Gtk::StateType IconSource::get_state() const
+{
+ return ((Gtk::StateType)(gtk_icon_source_get_state(const_cast<GtkIconSource*>(gobj()))));
+}
+
+IconSize IconSource::get_size() const
+{
+ return IconSize(static_cast<int>(gtk_icon_source_get_size(const_cast<GtkIconSource*>(gobj()))));
+}
+
+void IconSource::set_icon_name(const Glib::ustring& icon_name)
+{
+ gtk_icon_source_set_icon_name(gobj(), icon_name.c_str());
+}
+
+Glib::ustring IconSource::get_icon_name() const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(gtk_icon_source_get_icon_name(const_cast<GtkIconSource*>(gobj())));
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/iconsource.h b/libs/gtkmm2/gtk/gtkmm/iconsource.h
new file mode 100644
index 0000000000..67622aa2c7
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/iconsource.h
@@ -0,0 +1,288 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_ICONSOURCE_H
+#define _GTKMM_ICONSOURCE_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* iconsource.h
+ *
+ * Copyright(C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software, ) you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation, ) either
+ * version 2 of the License, or(at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY, ) without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library, ) if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gdkmm/pixbuf.h>
+#include <gtkmm/enums.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C" { typedef struct _GtkIconSource GtkIconSource; }
+#endif
+
+namespace Gtk
+{
+
+class IconSource
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef IconSource CppObjectType;
+ typedef GtkIconSource BaseObjectType;
+
+ static GType get_type() G_GNUC_CONST;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ IconSource();
+
+ explicit IconSource(GtkIconSource* gobject, bool make_a_copy = true);
+
+ IconSource(const IconSource& other);
+ IconSource& operator=(const IconSource& other);
+
+ ~IconSource();
+
+ void swap(IconSource& other);
+
+ ///Provides access to the underlying C instance.
+ GtkIconSource* gobj() { return gobject_; }
+
+ ///Provides access to the underlying C instance.
+ const GtkIconSource* gobj() const { return gobject_; }
+
+ ///Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs.
+ GtkIconSource* gobj_copy() const;
+
+protected:
+ GtkIconSource* gobject_;
+
+private:
+
+
+public:
+
+
+ /** Sets the name of an image file to use as a base image when creating
+ * icon variants for Gtk::IconSet. The filename must be absolute.
+ * @param filename Image file to use.
+ */
+ void set_filename(const Glib::ustring& filename);
+
+ /** Sets a pixbuf to use as a base image when creating icon variants
+ * for Gtk::IconSet.
+ * @param pixbuf Pixbuf to use as a source.
+ */
+ void set_pixbuf(const Glib::RefPtr<Gdk::Pixbuf>&pixbuf);
+
+
+ /** Retrieves the source filename, or <tt>0</tt> if none is set. The
+ * filename is not a copy, and should not be modified or expected to
+ * persist beyond the lifetime of the icon source.
+ * @return Image filename. This string must not be modified
+ * or freed.
+ */
+ Glib::ustring get_filename() const;
+
+ /** Retrieves the source pixbuf, or <tt>0</tt> if none is set.
+ * In addition, if a filename source is in use, this
+ * function in some cases will return the pixbuf from
+ * loaded from the filename. This is, for example, true
+ * for the GtkIconSource passed to the GtkStyle::render_icon()
+ * virtual function. The reference count on the pixbuf is
+ * not incremented.
+ * @return Source pixbuf.
+ */
+ Glib::RefPtr<Gdk::Pixbuf> get_pixbuf();
+
+ /** Retrieves the source pixbuf, or <tt>0</tt> if none is set.
+ * In addition, if a filename source is in use, this
+ * function in some cases will return the pixbuf from
+ * loaded from the filename. This is, for example, true
+ * for the GtkIconSource passed to the GtkStyle::render_icon()
+ * virtual function. The reference count on the pixbuf is
+ * not incremented.
+ * @return Source pixbuf.
+ */
+ Glib::RefPtr<const Gdk::Pixbuf> get_pixbuf() const;
+
+
+ /** If the text direction is wildcarded, this source can be used
+ * as the base image for an icon in any Gtk::TextDirection.
+ * If the text direction is not wildcarded, then the
+ * text direction the icon source applies to should be set
+ * with gtk_icon_source_set_direction(), and the icon source
+ * will only be used with that text direction.
+ *
+ * Gtk::IconSet prefers non-wildcarded sources (exact matches) over
+ * wildcarded sources, and will use an exact match when possible.
+ * @param setting <tt>true</tt> to wildcard the text direction.
+ */
+ void set_direction_wildcarded(bool setting = true);
+
+ /** If the widget state is wildcarded, this source can be used as the
+ * base image for an icon in any Gtk::StateType. If the widget state
+ * is not wildcarded, then the state the source applies to should be
+ * set with gtk_icon_source_set_state() and the icon source will
+ * only be used with that specific state.
+ *
+ * Gtk::IconSet prefers non-wildcarded sources (exact matches) over
+ * wildcarded sources, and will use an exact match when possible.
+ *
+ * Gtk::IconSet will normally transform wildcarded source images to
+ * produce an appropriate icon for a given state, for example
+ * lightening an image on prelight, but will not modify source images
+ * that match exactly.
+ * @param setting <tt>true</tt> to wildcard the widget state.
+ */
+ void set_state_wildcarded(bool setting = true);
+
+ /** If the icon size is wildcarded, this source can be used as the base
+ * image for an icon of any size. If the size is not wildcarded, then
+ * the size the source applies to should be set with
+ * gtk_icon_source_set_size() and the icon source will only be used
+ * with that specific size.
+ *
+ * Gtk::IconSet prefers non-wildcarded sources (exact matches) over
+ * wildcarded sources, and will use an exact match when possible.
+ *
+ * Gtk::IconSet will normally scale wildcarded source images to produce
+ * an appropriate icon at a given size, but will not change the size
+ * of source images that match exactly.
+ * @param setting <tt>true</tt> to wildcard the widget state.
+ */
+ void set_size_wildcarded (bool setting = true);
+
+ /** Gets the value set by gtk_icon_source_set_size_wildcarded().
+ * @return <tt>true</tt> if this icon source is a base for any icon size variant.
+ */
+ bool get_size_wildcarded() const;
+
+ /** Gets the value set by gtk_icon_source_set_state_wildcarded().
+ * @return <tt>true</tt> if this icon source is a base for any widget state variant.
+ */
+ bool get_state_wildcarded() const;
+
+ /** Gets the value set by gtk_icon_source_set_direction_wildcarded().
+ * @return <tt>true</tt> if this icon source is a base for any text direction variant.
+ */
+ bool get_direction_wildcarded() const;
+
+ /** Sets the text direction this icon source is intended to be used
+ * with.
+ *
+ * Setting the text direction on an icon source makes no difference
+ * if the text direction is wildcarded. Therefore, you should usually
+ * call gtk_icon_source_set_direction_wildcarded() to un-wildcard it
+ * in addition to calling this function.
+ * @param direction Text direction this source applies to.
+ */
+ void set_direction(TextDirection direction);
+
+ /** Sets the widget state this icon source is intended to be used
+ * with.
+ *
+ * Setting the widget state on an icon source makes no difference
+ * if the state is wildcarded. Therefore, you should usually
+ * call gtk_icon_source_set_state_wildcarded() to un-wildcard it
+ * in addition to calling this function.
+ * @param state Widget state this source applies to.
+ */
+ void set_state(Gtk::StateType state);
+
+ /** Sets the icon size this icon source is intended to be used
+ * with.
+ *
+ * Setting the icon size on an icon source makes no difference
+ * if the size is wildcarded. Therefore, you should usually
+ * call gtk_icon_source_set_size_wildcarded() to un-wildcard it
+ * in addition to calling this function.
+ * @param size Icon size this source applies to.
+ */
+ void set_size(IconSize size);
+
+ /** Obtains the text direction this icon source applies to. The return
+ * value is only useful/meaningful if the text direction is <em>not</em>
+ * wildcarded.
+ * @return Text direction this source matches.
+ */
+ TextDirection get_direction() const;
+
+ /** Obtains the widget state this icon source applies to. The return
+ * value is only useful/meaningful if the widget state is <em>not</em>
+ * wildcarded.
+ * @return Widget state this source matches.
+ */
+ Gtk::StateType get_state() const;
+
+ /** Obtains the icon size this source applies to. The return value
+ * is only useful/meaningful if the icon size is <em>not</em> wildcarded.
+ * @return Icon size this source matches.
+ */
+ IconSize get_size() const;
+
+
+ /** Sets the name of an icon to look up in the current icon theme
+ * to use as a base image when creating icon variants for Gtk::IconSet.
+ * @param icon_name Name of icon to use.
+ */
+ void set_icon_name(const Glib::ustring& icon_name);
+
+ /** Retrieves the source icon name, or <tt>0</tt> if none is set. The
+ * icon_name is not a copy, and should not be modified or expected to
+ * persist beyond the lifetime of the icon source.
+ * @return Icon name. This string must not be modified or freed.
+ */
+ Glib::ustring get_icon_name() const;
+
+
+};
+
+} /* namespace Gtk */
+
+
+namespace Gtk
+{
+
+/** @relates Gtk::IconSource
+ * @param lhs The left-hand side
+ * @param rhs The right-hand side
+ */
+inline void swap(IconSource& lhs, IconSource& rhs)
+ { lhs.swap(rhs); }
+
+} // namespace Gtk
+
+namespace Glib
+{
+
+/** @relates Gtk::IconSource
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+Gtk::IconSource wrap(GtkIconSource* object, bool take_copy = false);
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+template <>
+class Value<Gtk::IconSource> : public Glib::Value_Boxed<Gtk::IconSource>
+{};
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+} // namespace Glib
+
+#endif /* _GTKMM_ICONSOURCE_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/icontheme.cc b/libs/gtkmm2/gtk/gtkmm/icontheme.cc
new file mode 100644
index 0000000000..4403fe61f0
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/icontheme.cc
@@ -0,0 +1,327 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/icontheme.h>
+#include <gtkmm/private/icontheme_p.h>
+
+/* Copyright 2003 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkicontheme.h>
+#include <gtk/gtktypebuiltins.h> //For gtk_icon_theme_error_get_type().
+
+
+namespace Gtk
+{
+
+void IconTheme::set_search_path(const Glib::ArrayHandle<Glib::ustring>& path)
+{
+ gtk_icon_theme_set_search_path(gobj(), const_cast<const char**>(path.data()), path.size());
+}
+
+Glib::ArrayHandle<Glib::ustring> IconTheme::get_search_path() const
+{
+ int* temp_int = 0;
+ gchar*** temp_path = 0;
+ gtk_icon_theme_get_search_path(const_cast<GtkIconTheme*>(gobj()), temp_path, temp_int);
+ return Glib::ArrayHandle<Glib::ustring>((const char**)(*temp_path), *temp_int, Glib::OWNERSHIP_SHALLOW);
+}
+
+Glib::ArrayHandle<int> IconTheme::get_icon_sizes(const Glib::ustring& icon_name) const
+{
+ int* pArrayInts = gtk_icon_theme_get_icon_sizes(const_cast<GtkIconTheme*>(gobj()), icon_name.c_str());
+
+ //pArrayInts is null-terminated.
+ return Glib::ArrayHandle<int>(pArrayInts, Glib::OWNERSHIP_SHALLOW); //TODO: I'm not sure about the ownership. murrayc.
+}
+
+
+} // namespace Gtk
+
+
+namespace
+{
+
+const Glib::SignalProxyInfo IconTheme_signal_changed_info =
+{
+ "changed",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+} // anonymous namespace
+
+
+Gtk::IconThemeError::IconThemeError(Gtk::IconThemeError::Code error_code, const Glib::ustring& error_message)
+:
+ Glib::Error (GTK_ICON_THEME_ERROR, error_code, error_message)
+{}
+
+Gtk::IconThemeError::IconThemeError(GError* gobject)
+:
+ Glib::Error (gobject)
+{}
+
+Gtk::IconThemeError::Code Gtk::IconThemeError::code() const
+{
+ return static_cast<Code>(Glib::Error::code());
+}
+
+void Gtk::IconThemeError::throw_func(GError* gobject)
+{
+ throw Gtk::IconThemeError(gobject);
+}
+
+// static
+GType Glib::Value<Gtk::IconThemeError::Code>::value_type()
+{
+ return gtk_icon_theme_error_get_type();
+}
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Gtk::IconTheme> wrap(GtkIconTheme* object, bool take_copy)
+{
+ return Glib::RefPtr<Gtk::IconTheme>( dynamic_cast<Gtk::IconTheme*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} /* namespace Glib */
+
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& IconTheme_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &IconTheme_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_icon_theme_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void IconTheme_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->changed = &changed_callback;
+}
+
+
+void IconTheme_Class::changed_callback(GtkIconTheme* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_changed();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->changed)
+ (*base->changed)(self);
+ }
+}
+
+
+Glib::ObjectBase* IconTheme_Class::wrap_new(GObject* object)
+{
+ return new IconTheme((GtkIconTheme*)object);
+}
+
+
+/* The implementation: */
+
+GtkIconTheme* IconTheme::gobj_copy()
+{
+ reference();
+ return gobj();
+}
+
+IconTheme::IconTheme(const Glib::ConstructParams& construct_params)
+:
+ Glib::Object(construct_params)
+{}
+
+IconTheme::IconTheme(GtkIconTheme* castitem)
+:
+ Glib::Object((GObject*)(castitem))
+{}
+
+IconTheme::~IconTheme()
+{}
+
+
+IconTheme::CppClassType IconTheme::icontheme_class_; // initialize static member
+
+GType IconTheme::get_type()
+{
+ return icontheme_class_.init().get_type();
+}
+
+GType IconTheme::get_base_type()
+{
+ return gtk_icon_theme_get_type();
+}
+
+
+IconTheme::IconTheme()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Glib::Object(Glib::ConstructParams(icontheme_class_.init()))
+{
+ }
+
+Glib::RefPtr<IconTheme> IconTheme::create()
+{
+ return Glib::RefPtr<IconTheme>( new IconTheme() );
+}
+Glib::RefPtr<IconTheme> IconTheme::get_default()
+{
+
+ Glib::RefPtr<IconTheme> retvalue = Glib::wrap(gtk_icon_theme_get_default());
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<IconTheme> IconTheme::get_for_screen(const Glib::RefPtr<Gdk::Screen>& screen)
+{
+
+ Glib::RefPtr<IconTheme> retvalue = Glib::wrap(gtk_icon_theme_get_for_screen(Glib::unwrap(screen)));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+void IconTheme::set_screen(const Glib::RefPtr<Gdk::Screen>& screen)
+{
+ gtk_icon_theme_set_screen(gobj(), Glib::unwrap(screen));
+}
+
+void IconTheme::append_search_path(const Glib::ustring& path)
+{
+ gtk_icon_theme_append_search_path(gobj(), path.c_str());
+}
+
+void IconTheme::prepend_search_path(const Glib::ustring& path)
+{
+ gtk_icon_theme_prepend_search_path(gobj(), path.c_str());
+}
+
+void IconTheme::set_custom_theme(const Glib::ustring& theme_name)
+{
+ gtk_icon_theme_set_custom_theme(gobj(), theme_name.c_str());
+}
+
+bool IconTheme::has_icon(const Glib::ustring& icon_name) const
+{
+ return gtk_icon_theme_has_icon(const_cast<GtkIconTheme*>(gobj()), icon_name.c_str());
+}
+
+IconInfo IconTheme::lookup_icon(const Glib::ustring& icon_name, int size, IconLookupFlags flags) const
+{
+ return Glib::wrap(gtk_icon_theme_lookup_icon(const_cast<GtkIconTheme*>(gobj()), icon_name.c_str(), size, ((GtkIconLookupFlags)(flags))));
+}
+
+Glib::RefPtr<Gdk::Pixbuf> IconTheme::load_icon(const Glib::ustring& icon_name, int size, IconLookupFlags flags) const
+{
+ GError *error = 0;
+ Glib::RefPtr<Gdk::Pixbuf> retvalue = Glib::wrap(gtk_icon_theme_load_icon(const_cast<GtkIconTheme*>(gobj()), icon_name.c_str(), size, ((GtkIconLookupFlags)(flags)), &(error)));
+ if(error) ::Glib::Error::throw_exception(error);
+ return retvalue;
+}
+
+Glib::ListHandle<Glib::ustring> IconTheme::list_icons(const Glib::ustring& context) const
+{
+ return Glib::ListHandle<Glib::ustring>(gtk_icon_theme_list_icons(const_cast<GtkIconTheme*>(gobj()), context.c_str()), Glib::OWNERSHIP_SHALLOW);
+}
+
+Glib::ustring IconTheme::get_example_icon_name() const
+{
+ return Glib::convert_return_gchar_ptr_to_ustring(gtk_icon_theme_get_example_icon_name(const_cast<GtkIconTheme*>(gobj())));
+}
+
+bool IconTheme::rescan_if_needed()
+{
+ return gtk_icon_theme_rescan_if_needed(gobj());
+}
+
+void IconTheme::add_builtin_icon(const Glib::ustring& icon_name, int size, const Glib::RefPtr<Gdk::Pixbuf>& pixbuf)
+{
+ gtk_icon_theme_add_builtin_icon(icon_name.c_str(), size, Glib::unwrap(pixbuf));
+}
+
+
+Glib::SignalProxy0< void > IconTheme::signal_changed()
+{
+ return Glib::SignalProxy0< void >(this, &IconTheme_signal_changed_info);
+}
+
+
+void Gtk::IconTheme::on_changed()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->changed)
+ (*base->changed)(gobj());
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/icontheme.h b/libs/gtkmm2/gtk/gtkmm/icontheme.h
new file mode 100644
index 0000000000..450ad2f9ea
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/icontheme.h
@@ -0,0 +1,394 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_ICONTHEME_H
+#define _GTKMM_ICONTHEME_H
+
+#include <glibmm.h>
+
+/* Copyright (C) 2003 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gdkmm/pixbuf.h>
+#include <gdkmm/screen.h>
+
+#include <gtkmm/iconinfo.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkIconTheme GtkIconTheme;
+typedef struct _GtkIconThemeClass GtkIconThemeClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class IconTheme_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** @addtogroup gtkmmEnums Enums and Flags */
+
+/**
+ * @ingroup gtkmmEnums
+ * @par Bitwise operators:
+ * <tt>%IconLookupFlags operator|(IconLookupFlags, IconLookupFlags)</tt><br>
+ * <tt>%IconLookupFlags operator&(IconLookupFlags, IconLookupFlags)</tt><br>
+ * <tt>%IconLookupFlags operator^(IconLookupFlags, IconLookupFlags)</tt><br>
+ * <tt>%IconLookupFlags operator~(IconLookupFlags)</tt><br>
+ * <tt>%IconLookupFlags& operator|=(IconLookupFlags&, IconLookupFlags)</tt><br>
+ * <tt>%IconLookupFlags& operator&=(IconLookupFlags&, IconLookupFlags)</tt><br>
+ * <tt>%IconLookupFlags& operator^=(IconLookupFlags&, IconLookupFlags)</tt><br>
+ */
+enum IconLookupFlags
+{
+ ICON_LOOKUP_NO_SVG = 1 << 0,
+ ICON_LOOKUP_FORCE_SVG = 1 << 1,
+ ICON_LOOKUP_USE_BUILTIN = 1 << 2
+};
+
+/** @ingroup gtkmmEnums */
+inline IconLookupFlags operator|(IconLookupFlags lhs, IconLookupFlags rhs)
+ { return static_cast<IconLookupFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
+
+/** @ingroup gtkmmEnums */
+inline IconLookupFlags operator&(IconLookupFlags lhs, IconLookupFlags rhs)
+ { return static_cast<IconLookupFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
+
+/** @ingroup gtkmmEnums */
+inline IconLookupFlags operator^(IconLookupFlags lhs, IconLookupFlags rhs)
+ { return static_cast<IconLookupFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
+
+/** @ingroup gtkmmEnums */
+inline IconLookupFlags operator~(IconLookupFlags flags)
+ { return static_cast<IconLookupFlags>(~static_cast<unsigned>(flags)); }
+
+/** @ingroup gtkmmEnums */
+inline IconLookupFlags& operator|=(IconLookupFlags& lhs, IconLookupFlags rhs)
+ { return (lhs = static_cast<IconLookupFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
+
+/** @ingroup gtkmmEnums */
+inline IconLookupFlags& operator&=(IconLookupFlags& lhs, IconLookupFlags rhs)
+ { return (lhs = static_cast<IconLookupFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
+
+/** @ingroup gtkmmEnums */
+inline IconLookupFlags& operator^=(IconLookupFlags& lhs, IconLookupFlags rhs)
+ { return (lhs = static_cast<IconLookupFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
+
+
+/** Exception class for Gdk::IconTheme errors.
+ */
+class IconThemeError : public Glib::Error
+{
+public:
+ enum Code
+ {
+ ICON_THEME_NOT_FOUND,
+ ICON_THEME_FAILED
+ };
+
+ IconThemeError(Code error_code, const Glib::ustring& error_message);
+ explicit IconThemeError(GError* gobject);
+ Code code() const;
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+private:
+ static void throw_func(GError* gobject);
+ friend void wrap_init(); // uses throw_func()
+#endif
+};
+
+} // namespace Gtk
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::IconThemeError::Code> : public Glib::Value_Enum<Gtk::IconThemeError::Code>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+
+class IconTheme : public Glib::Object
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef IconTheme CppObjectType;
+ typedef IconTheme_Class CppClassType;
+ typedef GtkIconTheme BaseObjectType;
+ typedef GtkIconThemeClass BaseClassType;
+
+private: friend class IconTheme_Class;
+ static CppClassType icontheme_class_;
+
+private:
+ // noncopyable
+ IconTheme(const IconTheme&);
+ IconTheme& operator=(const IconTheme&);
+
+protected:
+ explicit IconTheme(const Glib::ConstructParams& construct_params);
+ explicit IconTheme(GtkIconTheme* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~IconTheme();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ GtkIconTheme* gobj() { return reinterpret_cast<GtkIconTheme*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const GtkIconTheme* gobj() const { return reinterpret_cast<GtkIconTheme*>(gobject_); }
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ GtkIconTheme* gobj_copy();
+
+private:
+
+
+protected:
+ IconTheme();
+public:
+
+ static Glib::RefPtr<IconTheme> create();
+
+
+ /** Gets the icon theme for the default screen. See
+ * get_for_screen().
+ * @return A unique Gtk::IconTheme associated with
+ * the default screen. This icon theme is associated with
+ * the screen and can be used as long as the screen
+ * is open.
+ *
+ * Since: 2.4.
+ */
+ static Glib::RefPtr<IconTheme> get_default();
+
+ /** Gets the icon theme object associated with @a screen ; if this
+ * function has not previously been called for the given
+ * screen, a new icon theme object will be created and
+ * associated with the screen. Icon theme objects are
+ * fairly expensive to create, so using this function
+ * is usually a better choice than calling than new()
+ * and setting the screen yourself; by using this function
+ * a single icon theme object will be shared between users.
+ * @param screen A Gdk::Screen.
+ * @return A unique Gtk::IconTheme associated with
+ * the given screen. This icon theme is associated with
+ * the screen and can be used as long as the screen
+ * is open.
+ *
+ * Since: 2.4.
+ */
+ static Glib::RefPtr<IconTheme> get_for_screen(const Glib::RefPtr<Gdk::Screen>& screen);
+
+ /** Sets the screen for an icon theme; the screen is used
+ * to track the user's currently configured icon theme,
+ * which might be different for different screens.
+ *
+ * Since: 2.4
+ * @param screen A Gdk::Screen.
+ */
+ void set_screen(const Glib::RefPtr<Gdk::Screen>& screen);
+ void set_search_path(const Glib::ArrayHandle<Glib::ustring>& path);
+ Glib::ArrayHandle<Glib::ustring> get_search_path() const;
+
+ /** Appends a directory to the search path.
+ * See set_search_path().
+ *
+ * Since: 2.4
+ * @param path Directory name to append to the icon path.
+ */
+ void append_search_path(const Glib::ustring& path);
+
+ /** Prepends a directory to the search path.
+ * See set_search_path().
+ *
+ * Since: 2.4
+ * @param path Directory name to prepend to the icon path.
+ */
+ void prepend_search_path(const Glib::ustring& path);
+
+ /** Sets the name of the icon theme that the Gtk::IconTheme object uses
+ * overriding system configuration. This function cannot be called
+ * on the icon theme objects returned from get_default()
+ * and get_default().
+ *
+ * Since: 2.4
+ * @param theme_name Name of icon theme to use instead of configured theme.
+ */
+ void set_custom_theme(const Glib::ustring& theme_name);
+
+ /** Checks whether an icon theme includes an icon
+ * for a particular name.
+ * @param icon_name The name of an icon.
+ * @return <tt>true</tt> if @a icon_theme includes an
+ * icon for @a icon_name .
+ *
+ * Since: 2.4.
+ */
+ bool has_icon(const Glib::ustring& icon_name) const;
+
+ Glib::ArrayHandle<int> get_icon_sizes(const Glib::ustring& icon_name) const;
+
+
+//TODO: Update the docs for this, to suggest use of IconInfo::operator bool() instead of saying that it returns null.
+
+ /** Looks up a named icon and returns a structure containing
+ * information such as the filename of the icon. The icon
+ * can then be rendered into a pixbuf using
+ * gtk_icon_info_load_icon(). (load_icon()
+ * combines these two steps if all you need is the pixbuf.)
+ * @param icon_name The name of the icon to lookup.
+ * @param size Desired icon size.
+ * @param flags Flags modifying the behavior of the icon lookup.
+ * @return A Gtk::IconInfo structure containing information
+ * about the icon, or <tt>0</tt> if the icon wasn't found. Free with
+ * gtk_icon_info_free()
+ *
+ * Since: 2.4.
+ */
+ IconInfo lookup_icon(const Glib::ustring& icon_name, int size, IconLookupFlags flags) const;
+
+
+ /** Looks up an icon in an icon theme, scales it to the given size
+ * and renders it into a pixbuf. This is a convenience function;
+ * if more details about the icon are needed, use
+ * lookup_icon() followed by gtk_icon_info_load_icon().
+ * @param icon_name The name of the icon to lookup.
+ * @param size The desired icon size. The resulting icon may not be exactly this size; see gtk_icon_info_load_icon().
+ * @param flags Flags modifying the behavior of the icon lookup.
+ * @return The rendered icon; this may be a newly created icon
+ * or a new reference to an internal icon, so you must not modify
+ * the icon. Use Glib::object_unref() to release your reference to the
+ * icon. <tt>0</tt> if the icon isn't found.
+ *
+ * Since: 2.4.
+ */
+ Glib::RefPtr<Gdk::Pixbuf> load_icon(const Glib::ustring& icon_name, int size, IconLookupFlags flags) const;
+
+
+ /** Lists the icons in the current icon theme. Only a subset
+ * of the icons can be listed by providing a context string.
+ * The set of values for the context string is system dependent,
+ * but will typically include such values as 'apps' and
+ * 'mimetypes'.
+ * @param context A string identifying a particular type of icon,
+ * or <tt>0</tt> to list all icons.
+ * @return A G::List list holding the names of all the
+ * icons in the theme. You must first free each element
+ * in the list with Glib::free(), then free the list itself
+ * with Glib::list_free().
+ *
+ * Since: 2.4.
+ */
+ Glib::ListHandle<Glib::ustring> list_icons(const Glib::ustring& context) const;
+
+ /** Gets the name of an icon that is representative of the
+ * current theme (for instance, to use when presenting
+ * a list of themes to the user.)
+ * @return The name of an example icon or <tt>0</tt>.
+ * Free with Glib::free().
+ *
+ * Since: 2.4.
+ */
+ Glib::ustring get_example_icon_name() const;
+
+ /** Checks to see if the icon theme has changed; if it has, any
+ * currently cached information is discarded and will be reloaded
+ * next time @a icon_theme is accessed.
+ * @return <tt>true</tt> if the icon theme has changed and needed
+ * to be reloaded.
+ *
+ * Since: 2.4.
+ */
+ bool rescan_if_needed();
+
+ /** Registers a built-in icon for icon theme lookups. The idea
+ * of built-in icons is to allow an application or library
+ * that uses themed icons to function requiring files to
+ * be present in the file system. For instance, the default
+ * images for all of GTK+'s stock icons are registered
+ * as built-icons.
+ *
+ * In general, if you use add_builtin_icon()
+ * you should also install the icon in the icon theme, so
+ * that the icon is generally available.
+ *
+ * This function will generally be used with pixbufs loaded
+ * via gdk_pixbuf_new_from_inline().
+ *
+ * Since: 2.4
+ * @param icon_name The name of the icon to register.
+ * @param size The size at which to register the icon (different
+ * images can be registered for the same icon name
+ * at different sizes.).
+ * @param pixbuf Gdk::Pixbuf that contains the image to use
+ * for @a icon_name .
+ */
+ static void add_builtin_icon(const Glib::ustring& icon_name, int size, const Glib::RefPtr<Gdk::Pixbuf>& pixbuf);
+
+
+ Glib::SignalProxy0< void > signal_changed();
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_changed();
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::IconTheme
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Gtk::IconTheme> wrap(GtkIconTheme* object, bool take_copy = false);
+}
+
+
+#endif /* _GTKMM_ICONTHEME_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/iconview.cc b/libs/gtkmm2/gtk/gtkmm/iconview.cc
new file mode 100644
index 0000000000..a053eae250
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/iconview.cc
@@ -0,0 +1,695 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/iconview.h>
+#include <gtkmm/private/iconview_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 1998-2004 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/adjustment.h>
+#include <gtk/gtkiconview.h>
+
+namespace //anonymous namespace
+{
+
+void proxy_foreach_callback(GtkIconView* /* icon_view */, GtkTreePath* path, void* data)
+{
+ typedef Gtk::IconView::SlotForeach SlotType;
+ SlotType& slot = *static_cast<SlotType*>(data);
+
+ try
+ {
+ slot(Gtk::TreeModel::Path(path, true));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+}
+
+} //anonymous namespace
+
+
+namespace Gtk
+{
+
+//Allow the generated code to work without the prefix:
+typedef IconView::ArrayHandle_TreePaths ArrayHandle_TreePaths;
+
+void IconView::selected_foreach(const SlotForeach& slot)
+{
+ SlotForeach slot_copy(slot);
+ gtk_icon_view_selected_foreach(const_cast<GtkIconView*>(gobj()), &proxy_foreach_callback, &slot_copy);
+}
+
+
+} // namespace Gtk
+
+
+namespace
+{
+
+void IconView_signal_set_scroll_adjustments_callback(GtkIconView* self, GtkAdjustment* p0,GtkAdjustment* p1,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,Adjustment*,Adjustment* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::wrap(p0)
+, Glib::wrap(p1)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo IconView_signal_set_scroll_adjustments_info =
+{
+ "set_scroll_adjustments",
+ (GCallback) &IconView_signal_set_scroll_adjustments_callback,
+ (GCallback) &IconView_signal_set_scroll_adjustments_callback
+};
+
+
+void IconView_signal_item_activated_callback(GtkIconView* self, GtkTreePath* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,const TreeModel::Path& > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Gtk::TreePath(p0, true)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo IconView_signal_item_activated_info =
+{
+ "item_activated",
+ (GCallback) &IconView_signal_item_activated_callback,
+ (GCallback) &IconView_signal_item_activated_callback
+};
+
+
+const Glib::SignalProxyInfo IconView_signal_selection_changed_info =
+{
+ "selection_changed",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::IconView* wrap(GtkIconView* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::IconView *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& IconView_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &IconView_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_icon_view_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void IconView_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->set_scroll_adjustments = &set_scroll_adjustments_callback;
+ klass->item_activated = &item_activated_callback;
+ klass->selection_changed = &selection_changed_callback;
+}
+
+
+void IconView_Class::set_scroll_adjustments_callback(GtkIconView* self, GtkAdjustment* p0, GtkAdjustment* p1)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_set_scroll_adjustments(Glib::wrap(p0)
+, Glib::wrap(p1)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->set_scroll_adjustments)
+ (*base->set_scroll_adjustments)(self, p0, p1);
+ }
+}
+
+void IconView_Class::item_activated_callback(GtkIconView* self, GtkTreePath* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_item_activated(Gtk::TreePath(p0, true)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->item_activated)
+ (*base->item_activated)(self, p0);
+ }
+}
+
+void IconView_Class::selection_changed_callback(GtkIconView* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_selection_changed();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->selection_changed)
+ (*base->selection_changed)(self);
+ }
+}
+
+
+Glib::ObjectBase* IconView_Class::wrap_new(GObject* o)
+{
+ return manage(new IconView((GtkIconView*)(o)));
+
+}
+
+
+/* The implementation: */
+
+IconView::IconView(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Container(construct_params)
+{
+ }
+
+IconView::IconView(GtkIconView* castitem)
+:
+ Gtk::Container((GtkContainer*)(castitem))
+{
+ }
+
+IconView::~IconView()
+{
+ destroy_();
+}
+
+IconView::CppClassType IconView::iconview_class_; // initialize static member
+
+GType IconView::get_type()
+{
+ return iconview_class_.init().get_type();
+}
+
+GType IconView::get_base_type()
+{
+ return gtk_icon_view_get_type();
+}
+
+
+IconView::IconView()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Container(Glib::ConstructParams(iconview_class_.init()))
+{
+ }
+
+IconView::IconView(const Glib::RefPtr<TreeModel>& model)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Container(Glib::ConstructParams(iconview_class_.init(), "model", Glib::unwrap(model), (char*) 0))
+{
+ }
+
+void IconView::set_model(const Glib::RefPtr<TreeModel>& model)
+{
+ gtk_icon_view_set_model(gobj(), Glib::unwrap(model));
+}
+
+Glib::RefPtr<TreeModel> IconView::get_model()
+{
+ return Glib::wrap(gtk_icon_view_get_model(gobj()));
+}
+
+Glib::RefPtr<const TreeModel> IconView::get_model() const
+{
+ return Glib::wrap(gtk_icon_view_get_model(const_cast<GtkIconView*>(gobj())));
+}
+
+void IconView::set_text_column(int column)
+{
+ gtk_icon_view_set_text_column(gobj(), column);
+}
+
+void IconView::set_text_column(const TreeModelColumnBase& model_column)
+{
+ gtk_icon_view_set_text_column(gobj(), (model_column).index());
+}
+
+int IconView::get_text_column() const
+{
+ return gtk_icon_view_get_text_column(const_cast<GtkIconView*>(gobj()));
+}
+
+void IconView::set_markup_column(int column)
+{
+ gtk_icon_view_set_markup_column(gobj(), column);
+}
+
+void IconView::set_markup_column(const TreeModelColumnBase& column)
+{
+ gtk_icon_view_set_markup_column(gobj(), (column).index());
+}
+
+int IconView::get_markup_column() const
+{
+ return gtk_icon_view_get_markup_column(const_cast<GtkIconView*>(gobj()));
+}
+
+void IconView::set_pixbuf_column(int column)
+{
+ gtk_icon_view_set_pixbuf_column(gobj(), column);
+}
+
+void IconView::set_pixbuf_column(const TreeModelColumnBase& column)
+{
+ gtk_icon_view_set_pixbuf_column(gobj(), (column).index());
+}
+
+int IconView::get_pixbuf_column() const
+{
+ return gtk_icon_view_get_pixbuf_column(const_cast<GtkIconView*>(gobj()));
+}
+
+void IconView::set_orientation(Orientation orientation)
+{
+ gtk_icon_view_set_orientation(gobj(), ((GtkOrientation)(orientation)));
+}
+
+Orientation IconView::get_orientation() const
+{
+ return ((Orientation)(gtk_icon_view_get_orientation(const_cast<GtkIconView*>(gobj()))));
+}
+
+void IconView::set_columns(int columns)
+{
+ gtk_icon_view_set_columns(gobj(), columns);
+}
+
+int IconView::get_columns() const
+{
+ return gtk_icon_view_get_columns(const_cast<GtkIconView*>(gobj()));
+}
+
+void IconView::set_item_width(int item_width)
+{
+ gtk_icon_view_set_item_width(gobj(), item_width);
+}
+
+int IconView::get_icon_width() const
+{
+ return gtk_icon_view_get_item_width(const_cast<GtkIconView*>(gobj()));
+}
+
+void IconView::set_spacing(int spacing)
+{
+ gtk_icon_view_set_spacing(gobj(), spacing);
+}
+
+int IconView::get_spacing() const
+{
+ return gtk_icon_view_get_spacing(const_cast<GtkIconView*>(gobj()));
+}
+
+void IconView::set_row_spacing(int row_spacing)
+{
+ gtk_icon_view_set_row_spacing(gobj(), row_spacing);
+}
+
+gint IconView::get_row_spacing() const
+{
+ return gtk_icon_view_get_row_spacing(const_cast<GtkIconView*>(gobj()));
+}
+
+void IconView::set_column_spacing(int column_spacing)
+{
+ gtk_icon_view_set_column_spacing(gobj(), column_spacing);
+}
+
+int IconView::get_column_spacing() const
+{
+ return gtk_icon_view_get_column_spacing(const_cast<GtkIconView*>(gobj()));
+}
+
+void IconView::set_margin(int margin)
+{
+ gtk_icon_view_set_margin(gobj(), margin);
+}
+
+int IconView::get_margin() const
+{
+ return gtk_icon_view_get_margin(const_cast<GtkIconView*>(gobj()));
+}
+
+TreeModel::Path IconView::get_path_at_pos(int x, int y) const
+{
+ return Gtk::TreePath(gtk_icon_view_get_path_at_pos(const_cast<GtkIconView*>(gobj()), x, y), false);
+}
+
+void IconView::set_selection_mode(SelectionMode mode)
+{
+ gtk_icon_view_set_selection_mode(gobj(), ((GtkSelectionMode)(mode)));
+}
+
+SelectionMode IconView::get_selection_mode() const
+{
+ return ((SelectionMode)(gtk_icon_view_get_selection_mode(const_cast<GtkIconView*>(gobj()))));
+}
+
+void IconView::select_path(const TreeModel::Path& path)
+{
+ gtk_icon_view_select_path(gobj(), const_cast<GtkTreePath*>((path).gobj()));
+}
+
+void IconView::unselect_path(const TreeModel::Path& path)
+{
+ gtk_icon_view_unselect_path(gobj(), const_cast<GtkTreePath*>((path).gobj()));
+}
+
+bool IconView::path_is_selected(const TreeModel::Path& path) const
+{
+ return gtk_icon_view_path_is_selected(const_cast<GtkIconView*>(gobj()), const_cast<GtkTreePath*>((path).gobj()));
+}
+
+ArrayHandle_TreePaths IconView::get_selected_items() const
+{
+ return ArrayHandle_TreePaths(gtk_icon_view_get_selected_items(const_cast<GtkIconView*>(gobj())), Glib::OWNERSHIP_SHALLOW);
+}
+
+void IconView::select_all()
+{
+ gtk_icon_view_select_all(gobj());
+}
+
+void IconView::unselect_all()
+{
+ gtk_icon_view_unselect_all(gobj());
+}
+
+void IconView::item_activated(const TreeModel::Path& path)
+{
+ gtk_icon_view_item_activated(gobj(), const_cast<GtkTreePath*>((path).gobj()));
+}
+
+
+Glib::SignalProxy2< void,Adjustment*,Adjustment* > IconView::signal_set_scroll_adjustments()
+{
+ return Glib::SignalProxy2< void,Adjustment*,Adjustment* >(this, &IconView_signal_set_scroll_adjustments_info);
+}
+
+Glib::SignalProxy1< void,const TreeModel::Path& > IconView::signal_item_activated()
+{
+ return Glib::SignalProxy1< void,const TreeModel::Path& >(this, &IconView_signal_item_activated_info);
+}
+
+Glib::SignalProxy0< void > IconView::signal_selection_changed()
+{
+ return Glib::SignalProxy0< void >(this, &IconView_signal_selection_changed_info);
+}
+
+
+Glib::PropertyProxy<int> IconView::property_pixbuf_column()
+{
+ return Glib::PropertyProxy<int>(this, "pixbuf-column");
+}
+
+Glib::PropertyProxy_ReadOnly<int> IconView::property_pixbuf_column() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "pixbuf-column");
+}
+
+Glib::PropertyProxy<int> IconView::property_text_column()
+{
+ return Glib::PropertyProxy<int>(this, "text-column");
+}
+
+Glib::PropertyProxy_ReadOnly<int> IconView::property_text_column() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "text-column");
+}
+
+Glib::PropertyProxy<int> IconView::property_markup_column()
+{
+ return Glib::PropertyProxy<int>(this, "markup-column");
+}
+
+Glib::PropertyProxy_ReadOnly<int> IconView::property_markup_column() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "markup-column");
+}
+
+Glib::PropertyProxy<SelectionMode> IconView::property_selection_mode()
+{
+ return Glib::PropertyProxy<SelectionMode>(this, "selection-mode");
+}
+
+Glib::PropertyProxy_ReadOnly<SelectionMode> IconView::property_selection_mode() const
+{
+ return Glib::PropertyProxy_ReadOnly<SelectionMode>(this, "selection-mode");
+}
+
+Glib::PropertyProxy<Orientation> IconView::property_orientation()
+{
+ return Glib::PropertyProxy<Orientation>(this, "orientation");
+}
+
+Glib::PropertyProxy_ReadOnly<Orientation> IconView::property_orientation() const
+{
+ return Glib::PropertyProxy_ReadOnly<Orientation>(this, "orientation");
+}
+
+Glib::PropertyProxy< Glib::RefPtr<TreeModel> > IconView::property_model()
+{
+ return Glib::PropertyProxy< Glib::RefPtr<TreeModel> >(this, "model");
+}
+
+Glib::PropertyProxy_ReadOnly< Glib::RefPtr<TreeModel> > IconView::property_model() const
+{
+ return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<TreeModel> >(this, "model");
+}
+
+Glib::PropertyProxy<int> IconView::property_columns()
+{
+ return Glib::PropertyProxy<int>(this, "columns");
+}
+
+Glib::PropertyProxy_ReadOnly<int> IconView::property_columns() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "columns");
+}
+
+Glib::PropertyProxy<int> IconView::property_item_width()
+{
+ return Glib::PropertyProxy<int>(this, "item-width");
+}
+
+Glib::PropertyProxy_ReadOnly<int> IconView::property_item_width() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "item-width");
+}
+
+Glib::PropertyProxy<int> IconView::property_spacing()
+{
+ return Glib::PropertyProxy<int>(this, "spacing");
+}
+
+Glib::PropertyProxy_ReadOnly<int> IconView::property_spacing() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "spacing");
+}
+
+Glib::PropertyProxy<int> IconView::property_row_spacing()
+{
+ return Glib::PropertyProxy<int>(this, "row-spacing");
+}
+
+Glib::PropertyProxy_ReadOnly<int> IconView::property_row_spacing() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "row-spacing");
+}
+
+Glib::PropertyProxy<int> IconView::property_column_spacing()
+{
+ return Glib::PropertyProxy<int>(this, "column-spacing");
+}
+
+Glib::PropertyProxy_ReadOnly<int> IconView::property_column_spacing() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "column-spacing");
+}
+
+Glib::PropertyProxy<int> IconView::property_margin()
+{
+ return Glib::PropertyProxy<int>(this, "margin");
+}
+
+Glib::PropertyProxy_ReadOnly<int> IconView::property_margin() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "margin");
+}
+
+
+void Gtk::IconView::on_set_scroll_adjustments(Adjustment* hadjustment, Adjustment* vadjustment)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->set_scroll_adjustments)
+ (*base->set_scroll_adjustments)(gobj(),(GtkAdjustment*)Glib::unwrap(hadjustment),(GtkAdjustment*)Glib::unwrap(vadjustment));
+}
+
+void Gtk::IconView::on_item_activated(const TreeModel::Path& path)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->item_activated)
+ (*base->item_activated)(gobj(),const_cast<GtkTreePath*>((path).gobj()));
+}
+
+void Gtk::IconView::on_selection_changed()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->selection_changed)
+ (*base->selection_changed)(gobj());
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/iconview.h b/libs/gtkmm2/gtk/gtkmm/iconview.h
new file mode 100644
index 0000000000..26fc442662
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/iconview.h
@@ -0,0 +1,596 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_ICONVIEW_H
+#define _GTKMM_ICONVIEW_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* iconview.h
+ *
+ * Copyright (C) 1998-2004 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#include <gtkmm/container.h>
+#include <gtkmm/treemodel.h>
+#include <gtkmm/treepath.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkIconView GtkIconView;
+typedef struct _GtkIconViewClass GtkIconViewClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class IconView_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** TODO
+ *
+ * @ingroup Widgets
+ * @ingroup Containers
+ */
+
+class IconView : public Container
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef IconView CppObjectType;
+ typedef IconView_Class CppClassType;
+ typedef GtkIconView BaseObjectType;
+ typedef GtkIconViewClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~IconView();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class IconView_Class;
+ static CppClassType iconview_class_;
+
+ // noncopyable
+ IconView(const IconView&);
+ IconView& operator=(const IconView&);
+
+protected:
+ explicit IconView(const Glib::ConstructParams& construct_params);
+ explicit IconView(GtkIconView* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkIconView* gobj() { return reinterpret_cast<GtkIconView*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkIconView* gobj() const { return reinterpret_cast<GtkIconView*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_set_scroll_adjustments(Adjustment* hadjustment, Adjustment* vadjustment);
+ virtual void on_item_activated(const TreeModel::Path& path);
+ virtual void on_selection_changed();
+
+
+private:
+
+public:
+
+ IconView();
+ explicit IconView(const Glib::RefPtr<TreeModel>& model);
+
+
+ /** Sets the model for a Gtk::IconView.
+ * If the @a icon_view already has a model set, it will remove
+ * it before setting the new model. If @a model is <tt>0</tt>, then
+ * it will unset the old model.
+ *
+ * Since: 2.6
+ * @param model The model.
+ */
+ void set_model(const Glib::RefPtr<TreeModel>& model);
+
+ /** Returns the model the Gtk::IconView is based on. Returns <tt>0</tt> if the
+ * model is unset.
+ * @return A Gtk::TreeModel, or <tt>0</tt> if none is currently being used.
+ *
+ * Since: 2.6.
+ */
+ Glib::RefPtr<TreeModel> get_model();
+
+ /** Returns the model the Gtk::IconView is based on. Returns <tt>0</tt> if the
+ * model is unset.
+ * @return A Gtk::TreeModel, or <tt>0</tt> if none is currently being used.
+ *
+ * Since: 2.6.
+ */
+ Glib::RefPtr<const TreeModel> get_model() const;
+
+
+ /** Sets the column with text for @a icon_view to be @a column . The text
+ * column must be of type G::TYPE_STRING.
+ *
+ * Since: 2.6
+ * @param column A column in the currently used model.
+ */
+ void set_text_column(int column);
+
+ /** Sets the column with text for @a icon_view to be @a column . The text
+ * column must be of type G::TYPE_STRING.
+ *
+ * Since: 2.6
+ * @param column A column in the currently used model.
+ */
+ void set_text_column(const TreeModelColumnBase& model_column);
+
+ /** Returns the column with text for @a icon_view .
+ * @return The text column, or -1 if it's unset.
+ *
+ * Since: 2.6.
+ */
+ int get_text_column() const;
+
+ /** Sets the column with markup information for @a icon_view to be
+ * @a column . The markup column must be of type G::TYPE_STRING.
+ * If the markup column is set to something, it overrides
+ * the text column set by set_text_column().
+ *
+ * Since: 2.6
+ * @param column A column in the currently used model.
+ */
+ void set_markup_column(int column);
+
+ /** Sets the column with markup information for @a icon_view to be
+ * @a column . The markup column must be of type G::TYPE_STRING.
+ * If the markup column is set to something, it overrides
+ * the text column set by set_text_column().
+ *
+ * Since: 2.6
+ * @param column A column in the currently used model.
+ */
+ void set_markup_column(const TreeModelColumnBase& column);
+
+ /** Returns the column with markup text for @a icon_view .
+ * @return The markup column, or -1 if it's unset.
+ *
+ * Since: 2.6.
+ */
+ int get_markup_column() const;
+
+ /** Sets the column with pixbufs for @a icon_view to be @a column . The pixbuf
+ * column must be of type Gdk::TYPE_PIXBUF
+ *
+ * Since: 2.6
+ * @param column A column in the currently used model.
+ */
+ void set_pixbuf_column(int column);
+
+ /** Sets the column with pixbufs for @a icon_view to be @a column . The pixbuf
+ * column must be of type Gdk::TYPE_PIXBUF
+ *
+ * Since: 2.6
+ * @param column A column in the currently used model.
+ */
+ void set_pixbuf_column(const TreeModelColumnBase& column);
+
+ /** Returns the column with pixbufs for @a icon_view .
+ * @return The pixbuf column, or -1 if it's unset.
+ *
+ * Since: 2.6.
+ */
+ int get_pixbuf_column() const;
+
+
+ /** Sets the ::orientation property which determines whether the labels
+ * are drawn beside the icons instead of below.
+ *
+ * Since: 2.6
+ * @param orientation The relative position of texts and icons.
+ */
+ void set_orientation(Orientation orientation);
+
+ /** Returns the value of the ::orientation property which determines
+ * whether the labels are drawn beside the icons instead of below.
+ * @return The relative position of texts and icons
+ *
+ * Since: 2.6.
+ */
+ Orientation get_orientation() const;
+
+
+ void set_columns(int columns);
+
+ int get_columns() const;
+
+ void set_item_width(int item_width);
+
+ int get_icon_width() const;
+
+ void set_spacing(int spacing);
+
+ int get_spacing() const;
+
+ void set_row_spacing(int row_spacing);
+
+ gint get_row_spacing() const;
+
+ void set_column_spacing(int column_spacing);
+
+ int get_column_spacing() const;
+
+
+ void set_margin(int margin);
+
+ int get_margin() const;
+
+
+ /** Finds the path at the point ( @a x , @a y ), relative to widget coordinates.
+ * @param x The x position to be identified.
+ * @param y The y position to be identified.
+ * @return The Gtk::TreePath corresponding to the icon or <tt>0</tt>
+ * if no icon exists at that position.
+ *
+ * Since: 2.6.
+ */
+ TreeModel::Path get_path_at_pos(int x, int y) const;
+
+ /** For instance,
+ * void on_foreach(const Gtk::TreeModel::Path& path);
+ */
+ typedef sigc::slot<void, const TreeModel::Path&> SlotForeach;
+
+ /** Calls a function for each selected icon. Note that the model or
+ * selection cannot be modified from within this function.
+ *
+ * @param slot The callback to call for each selected icon.
+ */
+ void selected_foreach(const SlotForeach& slot);
+
+
+//Default value?:
+
+ /** Sets the selection mode of the @a icon_view .
+ *
+ * Since: 2.6
+ * @param mode The selection mode.
+ */
+ void set_selection_mode(SelectionMode mode);
+
+ /** Gets the selection mode of the @a icon_view .
+ * @return The current selection mode
+ *
+ * Since: 2.6.
+ */
+ SelectionMode get_selection_mode() const;
+
+ /** Selects the row at @a path .
+ *
+ * Since: 2.6
+ * @param path The Gtk::TreePath to be selected.
+ */
+ void select_path(const TreeModel::Path& path);
+
+ /** Unselects the row at @a path .
+ *
+ * Since: 2.6
+ * @param path The Gtk::TreePath to be unselected.
+ */
+ void unselect_path(const TreeModel::Path& path);
+
+ /** Returns <tt>true</tt> if the icon pointed to by @a path is currently
+ * selected. If @a icon does not point to a valid location, <tt>false</tt> is returned.
+ * @param path A Gtk::TreePath to check selection on.
+ * @return <tt>true</tt> if @a path is selected.
+ *
+ * Since: 2.6.
+ */
+ bool path_is_selected(const TreeModel::Path& path) const;
+
+
+ #ifndef DOXYGEN_SHOULD_SKIP_THIS
+ //TODO: I'm not sure about these to_*() functions. murrayc.
+ struct TreePathTraits
+ {
+ typedef TreePath CppType;
+ typedef const GtkTreePath* CType;
+ typedef GtkTreePath* CTypeNonConst;
+
+ static CType to_c_type (const CppType& obj) { return obj.gobj(); }
+ static CType to_c_type (const CType& obj) { return obj; }
+ static CppType to_cpp_type (const CType& obj) { return CppType(const_cast<CTypeNonConst>(obj), true); }
+ static void release_c_type (const CType&) {}
+ };
+ #endif //DOXYGEN_SHOULD_SKIP_THIS
+
+ typedef Glib::ListHandle<TreePath, TreePathTraits> ArrayHandle_TreePaths;
+
+
+ /** Creates a list of paths of all selected items. Additionally, if you are
+ * planning on modifying the model after calling this function, you may
+ * want to convert the returned list into a list of Gtk::TreeRowReference&lt;!-- --&gt;s.
+ * To do this, you can use Gtk::Tree::row_reference_new().
+ *
+ * To free the return value, use:
+ * @code
+ * g_list_foreach (list, gtk_tree_path_free, <tt>0</tt>);
+ * g_list_free (list);
+ * @endcode
+ * @return A G::List containing a Gtk::TreePath for each selected row.
+ *
+ * Since: 2.6.
+ */
+ ArrayHandle_TreePaths get_selected_items() const;
+
+
+ /** Selects all the icons. @a icon_view must has its selection mode set
+ * to Gtk::SELECTION_MULTIPLE.
+ *
+ * Since: 2.6
+ */
+ void select_all();
+
+ /** Unselects all the icons.
+ *
+ * Since: 2.6
+ */
+ void unselect_all();
+
+ /** Activates the item determined by @a path .
+ *
+ * Since: 2.6
+ * @param path The Gtk::TreePath to be activated.
+ */
+ void item_activated(const TreeModel::Path& path);
+
+
+ Glib::SignalProxy2< void,Adjustment*,Adjustment* > signal_set_scroll_adjustments();
+
+
+ Glib::SignalProxy1< void,const TreeModel::Path& > signal_item_activated();
+
+
+ Glib::SignalProxy0< void > signal_selection_changed();
+
+
+ /* Key binding signals */
+
+
+ /** Model column used to retrieve the icon pixbuf from.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_pixbuf_column() ;
+
+/** Model column used to retrieve the icon pixbuf from.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_pixbuf_column() const;
+
+ /** Model column used to retrieve the text from.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_text_column() ;
+
+/** Model column used to retrieve the text from.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_text_column() const;
+
+ /** Model column used to retrieve the text if using Pango markup.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_markup_column() ;
+
+/** Model column used to retrieve the text if using Pango markup.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_markup_column() const;
+
+ /** The selection mode.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<SelectionMode> property_selection_mode() ;
+
+/** The selection mode.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<SelectionMode> property_selection_mode() const;
+
+ /** How the text and icon of each item are positioned relative to each other.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Orientation> property_orientation() ;
+
+/** How the text and icon of each item are positioned relative to each other.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Orientation> property_orientation() const;
+
+ /** The model for the icon view.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy< Glib::RefPtr<TreeModel> > property_model() ;
+
+/** The model for the icon view.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly< Glib::RefPtr<TreeModel> > property_model() const;
+
+ /** Number of columns to display.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_columns() ;
+
+/** Number of columns to display.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_columns() const;
+
+ /** The width used for each item.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_item_width() ;
+
+/** The width used for each item.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_item_width() const;
+
+ /** Space which is inserted between cells of an item.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_spacing() ;
+
+/** Space which is inserted between cells of an item.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_spacing() const;
+
+ /** Space which is inserted between grid rows.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_row_spacing() ;
+
+/** Space which is inserted between grid rows.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_row_spacing() const;
+
+ /** Space which is inserted between grid column.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_column_spacing() ;
+
+/** Space which is inserted between grid column.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_column_spacing() const;
+
+ /** Space which is inserted at the edges of the icon view.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_margin() ;
+
+/** Space which is inserted at the edges of the icon view.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_margin() const;
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::IconView
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::IconView* wrap(GtkIconView* object, bool take_copy = false);
+}
+#endif /* _GTKMM_ICONVIEW_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/image.cc b/libs/gtkmm2/gtk/gtkmm/image.cc
new file mode 100644
index 0000000000..8152af1f7e
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/image.cc
@@ -0,0 +1,446 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/image.h>
+#include <gtkmm/private/image_p.h>
+
+#include <gtk/gtktypebuiltins.h>
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkimage.h>
+#include <gdkmm/image.h>
+#include <gdkmm/bitmap.h>
+#include <gdkmm/pixmap.h>
+
+namespace Gtk
+{
+
+Image::Image(const Gtk::StockID& stock_id, IconSize size)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Misc(Glib::ConstructParams(image_class_.init(), "stock",stock_id.get_c_str(),"icon-size",(GtkIconSize) int(size), (char*) 0))
+{}
+
+Image::Image(IconSet& icon_set, IconSize size)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Misc(Glib::ConstructParams(image_class_.init(), "icon-set",icon_set.gobj(),"icon-size",(GtkIconSize) int(size), (char*) 0))
+{}
+
+Image::Image(const Glib::RefPtr<Gdk::PixbufAnimation>& animation)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Misc(Glib::ConstructParams(image_class_.init(), "pixbuf-animation",Glib::unwrap(animation), (char*) 0))
+{}
+
+void Image::get_pixmap(Glib::RefPtr<Gdk::Pixmap>& pixmap, Glib::RefPtr<Gdk::Bitmap>& mask) const
+{
+ GdkPixmap* pPixmap = 0;
+ GdkBitmap* pBitmap = 0;
+
+ gtk_image_get_pixmap(const_cast<GtkImage*>(gobj()), &pPixmap, &pBitmap);
+
+ pixmap = Glib::wrap((GdkPixmapObject*) pPixmap, true);
+ mask = Glib::RefPtr<Gdk::Bitmap>::cast_dynamic(Glib::wrap((GdkPixmapObject*) pBitmap, true));
+}
+
+void Image::get_image(Glib::RefPtr<Gdk::Image>& gdk_image, Glib::RefPtr<Gdk::Bitmap>& mask) const
+{
+ GdkImage* pImage = 0;
+ GdkBitmap* pBitmap = 0;
+
+ gtk_image_get_image(const_cast<GtkImage*>(gobj()), &pImage, &pBitmap);
+
+ gdk_image = Glib::wrap(pImage, true);
+ mask = Glib::RefPtr<Gdk::Bitmap>::cast_dynamic(Glib::wrap((GdkPixmapObject*) pBitmap, true));
+}
+
+void Image::get_stock(Gtk::StockID& stock_id, IconSize& size) const
+{
+ char* pStockID = 0; // GTK+ iconsistency: although not const, it should not be freed.
+ GtkIconSize icon_size = GTK_ICON_SIZE_INVALID;
+
+ gtk_image_get_stock(const_cast<GtkImage*>(gobj()), &pStockID, &icon_size);
+
+ size = IconSize(static_cast<int>(icon_size));
+ stock_id = Gtk::StockID(pStockID); // the StockID ctor checks for 0
+}
+
+void Image::get_icon_set(IconSet& icon_set, IconSize& size) const
+{
+ GtkIconSet* pIconSet = 0;
+ GtkIconSize icon_size = GTK_ICON_SIZE_INVALID;
+
+ gtk_image_get_icon_set(const_cast<GtkImage*>(gobj()), &pIconSet, &icon_size);
+
+ size = IconSize(static_cast<int>(icon_size));
+ icon_set = Glib::wrap(pIconSet, true); //true = take_copy.
+}
+
+void Image::clear()
+{
+ gtk_image_set_from_pixbuf(gobj(), 0);
+}
+
+Glib::ustring Image::get_icon_name() const
+{
+ const gchar* pchIconName = 0;
+ gtk_image_get_icon_name(const_cast<GtkImage*>(gobj()), &pchIconName, 0);
+ return Glib::convert_const_gchar_ptr_to_ustring(pchIconName);
+}
+
+Glib::ustring Image::get_icon_name(IconSize& size)
+{
+ const gchar* pchIconName = 0;
+ GtkIconSize cIconSize = GTK_ICON_SIZE_INVALID;
+ gtk_image_get_icon_name(const_cast<GtkImage*>(gobj()), &pchIconName, &cIconSize);
+ size = (IconSize)cIconSize;
+ return Glib::convert_const_gchar_ptr_to_ustring(pchIconName);
+}
+
+} // namespace Gtk
+
+
+namespace
+{
+} // anonymous namespace
+
+// static
+GType Glib::Value<Gtk::ImageType>::value_type()
+{
+ return gtk_image_type_get_type();
+}
+
+
+namespace Glib
+{
+
+Gtk::Image* wrap(GtkImage* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::Image *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Image_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Image_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_image_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Image_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* Image_Class::wrap_new(GObject* o)
+{
+ return manage(new Image((GtkImage*)(o)));
+
+}
+
+
+/* The implementation: */
+
+Image::Image(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Misc(construct_params)
+{
+ }
+
+Image::Image(GtkImage* castitem)
+:
+ Gtk::Misc((GtkMisc*)(castitem))
+{
+ }
+
+Image::~Image()
+{
+ destroy_();
+}
+
+Image::CppClassType Image::image_class_; // initialize static member
+
+GType Image::get_type()
+{
+ return image_class_.init().get_type();
+}
+
+GType Image::get_base_type()
+{
+ return gtk_image_get_type();
+}
+
+
+Image::Image()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Misc(Glib::ConstructParams(image_class_.init()))
+{
+ }
+
+Image::Image(const Glib::RefPtr<Gdk::Pixmap>& pixmap, const Glib::RefPtr<Gdk::Bitmap>& mask)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Misc(Glib::ConstructParams(image_class_.init(), "pixmap", Glib::unwrap(pixmap), "mask", Glib::unwrap(mask), (char*) 0))
+{
+ }
+
+Image::Image(const Glib::RefPtr<Gdk::Image>& image, const Glib::RefPtr<Gdk::Bitmap>& mask)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Misc(Glib::ConstructParams(image_class_.init(), "image", Glib::unwrap(image), "mask", Glib::unwrap(mask), (char*) 0))
+{
+ }
+
+Image::Image(const std::string& file)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Misc(Glib::ConstructParams(image_class_.init(), "file", file.c_str(), (char*) 0))
+{
+ }
+
+Image::Image(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Misc(Glib::ConstructParams(image_class_.init(), "pixbuf", Glib::unwrap(pixbuf), (char*) 0))
+{
+ }
+
+void Image::set(const Glib::RefPtr<Gdk::Pixmap>& pixmap, const Glib::RefPtr<Gdk::Bitmap>& mask)
+{
+ gtk_image_set_from_pixmap(gobj(), Glib::unwrap(pixmap), Glib::unwrap(mask));
+}
+
+void Image::set(const Glib::RefPtr<Gdk::Image>& gdk_image, const Glib::RefPtr<Gdk::Bitmap>& mask)
+{
+ gtk_image_set_from_image(gobj(), Glib::unwrap(gdk_image), Glib::unwrap(mask));
+}
+
+void Image::set(const std::string& filename)
+{
+ gtk_image_set_from_file(gobj(), filename.c_str());
+}
+
+void Image::set(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf)
+{
+ gtk_image_set_from_pixbuf(gobj(), Glib::unwrap(pixbuf));
+}
+
+void Image::set(const Gtk::StockID& stock_id, IconSize size)
+{
+ gtk_image_set_from_stock(gobj(), (stock_id).get_c_str(), static_cast<GtkIconSize>(int(size)));
+}
+
+void Image::set(IconSet& icon_set, IconSize size)
+{
+ gtk_image_set_from_icon_set(gobj(), (icon_set).gobj(), static_cast<GtkIconSize>(int(size)));
+}
+
+void Image::set(const Glib::RefPtr<Gdk::PixbufAnimation>& animation)
+{
+ gtk_image_set_from_animation(gobj(), Glib::unwrap(animation));
+}
+
+void Image::set_from_icon_name(const Glib::ustring& icon_name, IconSize size)
+{
+ gtk_image_set_from_icon_name(gobj(), icon_name.c_str(), static_cast<GtkIconSize>(int(size)));
+}
+
+ImageType Image::get_storage_type() const
+{
+ return ((ImageType)(gtk_image_get_storage_type(const_cast<GtkImage*>(gobj()))));
+}
+
+Glib::RefPtr<Gdk::Pixbuf> Image::get_pixbuf()
+{
+
+ Glib::RefPtr<Gdk::Pixbuf> retvalue = Glib::wrap(gtk_image_get_pixbuf(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const Gdk::Pixbuf> Image::get_pixbuf() const
+{
+
+ Glib::RefPtr<const Gdk::Pixbuf> retvalue = Glib::wrap(gtk_image_get_pixbuf(const_cast<GtkImage*>(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<Gdk::PixbufAnimation> Image::get_animation()
+{
+
+ Glib::RefPtr<Gdk::PixbufAnimation> retvalue = Glib::wrap(gtk_image_get_animation(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const Gdk::PixbufAnimation> Image::get_animation() const
+{
+
+ Glib::RefPtr<const Gdk::PixbufAnimation> retvalue = Glib::wrap(gtk_image_get_animation(const_cast<GtkImage*>(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+int Image::get_pixel_size() const
+{
+ return gtk_image_get_pixel_size(const_cast<GtkImage*>(gobj()));
+}
+
+void Image::set_pixel_size(int pixel_size)
+{
+ gtk_image_set_pixel_size(gobj(), pixel_size);
+}
+
+
+Glib::PropertyProxy< Glib::RefPtr<Gdk::Pixbuf> > Image::property_pixbuf()
+{
+ return Glib::PropertyProxy< Glib::RefPtr<Gdk::Pixbuf> >(this, "pixbuf");
+}
+
+Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Pixbuf> > Image::property_pixbuf() const
+{
+ return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Pixbuf> >(this, "pixbuf");
+}
+
+Glib::PropertyProxy< Glib::RefPtr<Gdk::Pixmap> > Image::property_pixmap()
+{
+ return Glib::PropertyProxy< Glib::RefPtr<Gdk::Pixmap> >(this, "pixmap");
+}
+
+Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Pixmap> > Image::property_pixmap() const
+{
+ return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Pixmap> >(this, "pixmap");
+}
+
+Glib::PropertyProxy< Glib::RefPtr<Gdk::Image> > Image::property_image()
+{
+ return Glib::PropertyProxy< Glib::RefPtr<Gdk::Image> >(this, "image");
+}
+
+Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Image> > Image::property_image() const
+{
+ return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Image> >(this, "image");
+}
+
+Glib::PropertyProxy< Glib::RefPtr<Gdk::Pixmap> > Image::property_mask()
+{
+ return Glib::PropertyProxy< Glib::RefPtr<Gdk::Pixmap> >(this, "mask");
+}
+
+Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Pixmap> > Image::property_mask() const
+{
+ return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Pixmap> >(this, "mask");
+}
+
+Glib::PropertyProxy_WriteOnly<Glib::ustring> Image::property_file()
+{
+ return Glib::PropertyProxy_WriteOnly<Glib::ustring>(this, "file");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> Image::property_file() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "file");
+}
+
+Glib::PropertyProxy<Glib::ustring> Image::property_stock()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "stock");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> Image::property_stock() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "stock");
+}
+
+Glib::PropertyProxy<Gtk::IconSet> Image::property_icon_set()
+{
+ return Glib::PropertyProxy<Gtk::IconSet>(this, "icon-set");
+}
+
+Glib::PropertyProxy_ReadOnly<Gtk::IconSet> Image::property_icon_set() const
+{
+ return Glib::PropertyProxy_ReadOnly<Gtk::IconSet>(this, "icon-set");
+}
+
+Glib::PropertyProxy<int> Image::property_icon_size()
+{
+ return Glib::PropertyProxy<int>(this, "icon-size");
+}
+
+Glib::PropertyProxy_ReadOnly<int> Image::property_icon_size() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "icon-size");
+}
+
+Glib::PropertyProxy< Glib::RefPtr<Gdk::PixbufAnimation> > Image::property_pixbuf_animation()
+{
+ return Glib::PropertyProxy< Glib::RefPtr<Gdk::PixbufAnimation> >(this, "pixbuf-animation");
+}
+
+Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::PixbufAnimation> > Image::property_pixbuf_animation() const
+{
+ return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::PixbufAnimation> >(this, "pixbuf-animation");
+}
+
+Glib::PropertyProxy_ReadOnly<ImageType> Image::property_storage_type() const
+{
+ return Glib::PropertyProxy_ReadOnly<ImageType>(this, "storage-type");
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/image.h b/libs/gtkmm2/gtk/gtkmm/image.h
new file mode 100644
index 0000000000..13775a2c92
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/image.h
@@ -0,0 +1,454 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_IMAGE_H
+#define _GTKMM_IMAGE_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* image.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/misc.h>
+#include <gtkmm/iconset.h>
+#include <gdkmm/pixbufanimation.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkImage GtkImage;
+typedef struct _GtkImageClass GtkImageClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class Image_Class; } // namespace Gtk
+namespace Gtk
+{
+
+
+/** @addtogroup gtkmmEnums Enums and Flags */
+
+/**
+ * @ingroup gtkmmEnums
+ */
+enum ImageType
+{
+ IMAGE_EMPTY,
+ IMAGE_PIXMAP,
+ IMAGE_IMAGE,
+ IMAGE_PIXBUF,
+ IMAGE_STOCK,
+ IMAGE_ICON_SET,
+ IMAGE_ANIMATION,
+ IMAGE_ICON_NAME
+};
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::ImageType> : public Glib::Value_Enum<Gtk::ImageType>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+
+/** A widget displaying an image.
+ *
+ * The Gtk::Image widget displays an image. Various kinds of object can be
+ * displayed as an image; most typically, you would load a Gdk::Pixbuf ("pixel
+ * buffer") from a file, and then display that.
+ *
+ * Gtk::Image is a subclass of Gtk::Misc, which implies that you can align it
+ * (center, left, right) and add padding to it, using Gtk::Misc methods.
+ *
+ * Gtk::Image is a "no window" widget (has no Gdk::Window of its own), so by
+ * default does not receive events. If you want to receive events on the
+ * image, such as button clicks, place the image inside a Gtk::EventBox, then
+ * connect to the event signals on the event box.
+ *
+ * @ingroup Widgets
+ */
+
+class Image : public Misc
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Image CppObjectType;
+ typedef Image_Class CppClassType;
+ typedef GtkImage BaseObjectType;
+ typedef GtkImageClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~Image();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class Image_Class;
+ static CppClassType image_class_;
+
+ // noncopyable
+ Image(const Image&);
+ Image& operator=(const Image&);
+
+protected:
+ explicit Image(const Glib::ConstructParams& construct_params);
+ explicit Image(GtkImage* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkImage* gobj() { return reinterpret_cast<GtkImage*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkImage* gobj() const { return reinterpret_cast<GtkImage*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+
+public:
+
+ Image();
+ explicit Image(const Glib::RefPtr<Gdk::Pixmap>& pixmap, const Glib::RefPtr<Gdk::Bitmap>& mask);
+ explicit Image(const Glib::RefPtr<Gdk::Image>& image, const Glib::RefPtr<Gdk::Bitmap>& mask);
+ explicit Image(const std::string& file);
+ explicit Image(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf);
+ Image(const Gtk::StockID& stock_id, IconSize size);
+ Image(IconSet& icon_set, IconSize size);
+ Image(const Glib::RefPtr<Gdk::PixbufAnimation>& animation);
+
+
+ /** See new_from_pixmap() for details.
+ * @param pixmap A Gdk::Pixmap or <tt>0</tt>.
+ * @param mask A Gdk::Bitmap or <tt>0</tt>.
+ */
+ void set(const Glib::RefPtr<Gdk::Pixmap>& pixmap, const Glib::RefPtr<Gdk::Bitmap>& mask);
+
+ /** See new_from_image() for details.
+ * @param gdk_image A Gdk::Image or <tt>0</tt>.
+ * @param mask A Gdk::Bitmap or <tt>0</tt>.
+ */
+ void set(const Glib::RefPtr<Gdk::Image>& gdk_image, const Glib::RefPtr<Gdk::Bitmap>& mask);
+
+ /** See new_from_file() for details.
+ * @param filename A filename or <tt>0</tt>.
+ */
+ void set(const std::string& filename);
+
+ /** See new_from_pixbuf() for details.
+ * @param pixbuf A Gdk::Pixbuf or <tt>0</tt>.
+ */
+ void set(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf);
+
+ /** See new_from_stock() for details.
+ * @param stock_id A stock icon name.
+ * @param size A stock icon size.
+ */
+ void set(const Gtk::StockID& stock_id, IconSize size);
+
+ /** See new_from_icon_set() for details.
+ * @param icon_set A Gtk::IconSet.
+ * @param size A stock icon size.
+ */
+ void set(IconSet& icon_set, IconSize size);
+
+ /** Causes the Gtk::Image to display the given animation (or display
+ * nothing, if you set the animation to <tt>0</tt>).
+ * @param animation The Gdk::PixbufAnimation.
+ */
+ void set(const Glib::RefPtr<Gdk::PixbufAnimation>& animation);
+
+ /** See new_from_icon_name() for details.
+ *
+ * Since: 2.6
+ * @param icon_name An icon name.
+ * @param size An icon size.
+ */
+ void set_from_icon_name(const Glib::ustring& icon_name, IconSize size);
+
+ void clear();
+
+
+ /** Gets the type of representation being used by the Gtk::Image
+ * to store image data. If the Gtk::Image has no image data,
+ * the return value will be Gtk::IMAGE_EMPTY.
+ * @return Image representation being used.
+ */
+ ImageType get_storage_type() const;
+
+ void get_pixmap(Glib::RefPtr<Gdk::Pixmap>& pixmap, Glib::RefPtr<Gdk::Bitmap>& mask) const;
+ void get_image(Glib::RefPtr<Gdk::Image>& gdk_image, Glib::RefPtr<Gdk::Bitmap>& mask) const;
+
+ /** Gets the Gdk::Pixbuf being displayed by the Gtk::Image.
+ * The storage type of the image must be Gtk::IMAGE_EMPTY or
+ * Gtk::IMAGE_PIXBUF (see get_storage_type()).
+ * The caller of this function does not own a reference to the
+ * returned pixbuf.
+ * @return The displayed pixbuf, or <tt>0</tt> if the image is empty.
+ */
+ Glib::RefPtr<Gdk::Pixbuf> get_pixbuf();
+
+ /** Gets the Gdk::Pixbuf being displayed by the Gtk::Image.
+ * The storage type of the image must be Gtk::IMAGE_EMPTY or
+ * Gtk::IMAGE_PIXBUF (see get_storage_type()).
+ * The caller of this function does not own a reference to the
+ * returned pixbuf.
+ * @return The displayed pixbuf, or <tt>0</tt> if the image is empty.
+ */
+ Glib::RefPtr<const Gdk::Pixbuf> get_pixbuf() const;
+ void get_stock(Gtk::StockID& stock_id, IconSize& size) const;
+ void get_icon_set(IconSet& icon_set, IconSize& size) const;
+
+ /** Gets the Gdk::PixbufAnimation being displayed by the Gtk::Image.
+ * The storage type of the image must be Gtk::IMAGE_EMPTY or
+ * Gtk::IMAGE_ANIMATION (see get_storage_type()).
+ * The caller of this function does not own a reference to the
+ * returned animation.
+ * @return The displayed animation, or <tt>0</tt> if the image is empty.
+ */
+ Glib::RefPtr<Gdk::PixbufAnimation> get_animation();
+
+ /** Gets the Gdk::PixbufAnimation being displayed by the Gtk::Image.
+ * The storage type of the image must be Gtk::IMAGE_EMPTY or
+ * Gtk::IMAGE_ANIMATION (see get_storage_type()).
+ * The caller of this function does not own a reference to the
+ * returned animation.
+ * @return The displayed animation, or <tt>0</tt> if the image is empty.
+ */
+ Glib::RefPtr<const Gdk::PixbufAnimation> get_animation() const;
+
+ Glib::ustring get_icon_name() const;
+ Glib::ustring get_icon_name(IconSize& size);
+
+
+ /** Gets the pixel size used for named icons.
+ * @return The pixel size used for named icons.
+ *
+ * Since: 2.6.
+ */
+ int get_pixel_size() const;
+
+ /** Sets the pixel size to use for named icons. If the pixel size is set
+ * to a value != -1, it is used instead of the icon size set by
+ * set_from_icon_name().
+ *
+ * Since: 2.6
+ * @param pixel_size The new pixel size.
+ */
+ void set_pixel_size(int pixel_size);
+
+ /** A GdkPixbuf to display.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy< Glib::RefPtr<Gdk::Pixbuf> > property_pixbuf() ;
+
+/** A GdkPixbuf to display.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Pixbuf> > property_pixbuf() const;
+
+ /** A GdkPixmap to display.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy< Glib::RefPtr<Gdk::Pixmap> > property_pixmap() ;
+
+/** A GdkPixmap to display.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Pixmap> > property_pixmap() const;
+
+ /** A GdkImage to display.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy< Glib::RefPtr<Gdk::Image> > property_image() ;
+
+/** A GdkImage to display.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Image> > property_image() const;
+
+ /** Mask bitmap to use with GdkImage or GdkPixmap.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy< Glib::RefPtr<Gdk::Pixmap> > property_mask() ;
+
+/** Mask bitmap to use with GdkImage or GdkPixmap.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Pixmap> > property_mask() const;
+
+ /** Filename to load and display.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_WriteOnly<Glib::ustring> property_file() ;
+
+/** Filename to load and display.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_file() const;
+
+ /** Stock ID for a stock image to display.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_stock() ;
+
+/** Stock ID for a stock image to display.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_stock() const;
+
+ /** Icon set to display.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Gtk::IconSet> property_icon_set() ;
+
+/** Icon set to display.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Gtk::IconSet> property_icon_set() const;
+
+ /** Symbolic size to use for stock icon
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_icon_size() ;
+
+/** Symbolic size to use for stock icon
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_icon_size() const;
+
+ /** GdkPixbufAnimation to display.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy< Glib::RefPtr<Gdk::PixbufAnimation> > property_pixbuf_animation() ;
+
+/** GdkPixbufAnimation to display.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::PixbufAnimation> > property_pixbuf_animation() const;
+
+ /** The representation being used for image data.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<ImageType> property_storage_type() const;
+
+
+};
+
+} /* namespace Gtk */
+
+
+namespace Glib
+{
+ /** @relates Gtk::Image
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::Image* wrap(GtkImage* object, bool take_copy = false);
+}
+#endif /* _GTKMM_IMAGE_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/imagemenuitem.cc b/libs/gtkmm2/gtk/gtkmm/imagemenuitem.cc
new file mode 100644
index 0000000000..61abd691cd
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/imagemenuitem.cc
@@ -0,0 +1,192 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/imagemenuitem.h>
+#include <gtkmm/private/imagemenuitem_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkimagemenuitem.h>
+
+#include <gtkmm/image.h>
+#include <gtkmm/stock.h>
+#include <gtkmm/accellabel.h>
+
+namespace Gtk
+{
+
+ImageMenuItem::ImageMenuItem(Widget& image,
+ const Glib::ustring& label, bool mnemonic)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::MenuItem(Glib::ConstructParams(imagemenuitem_class_.init(), (char*) 0))
+{
+ set_image(image);
+ add_accel_label(label, mnemonic);
+}
+
+ImageMenuItem::ImageMenuItem(const Glib::ustring& label, bool mnemonic)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::MenuItem(Glib::ConstructParams(imagemenuitem_class_.init(), (char*) 0))
+{
+ add_accel_label(label, mnemonic);
+}
+
+ImageMenuItem::ImageMenuItem(const Gtk::StockID& stock_id)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::MenuItem(Glib::ConstructParams(imagemenuitem_class_.init(), (char*) 0))
+{
+ Gtk::Image* image = new Gtk::Image(stock_id, ICON_SIZE_MENU);
+ image->show();
+ set_image( *(Gtk::manage(image)) );
+
+ Gtk::StockItem item;
+ if(Gtk::Stock::lookup(stock_id, item))
+ {
+ add_accel_label(item.get_label(), true); //true = use mnemonic.
+ set_accel_key( AccelKey(item.get_keyval(), item.get_modifier()) );
+ }
+ else
+ {
+ add_accel_label(stock_id.get_string(), false);
+ }
+}
+
+} // namespace Gtk
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::ImageMenuItem* wrap(GtkImageMenuItem* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::ImageMenuItem *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& ImageMenuItem_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &ImageMenuItem_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_image_menu_item_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void ImageMenuItem_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* ImageMenuItem_Class::wrap_new(GObject* o)
+{
+ return manage(new ImageMenuItem((GtkImageMenuItem*)(o)));
+
+}
+
+
+/* The implementation: */
+
+ImageMenuItem::ImageMenuItem(const Glib::ConstructParams& construct_params)
+:
+ Gtk::MenuItem(construct_params)
+{
+ }
+
+ImageMenuItem::ImageMenuItem(GtkImageMenuItem* castitem)
+:
+ Gtk::MenuItem((GtkMenuItem*)(castitem))
+{
+ }
+
+ImageMenuItem::~ImageMenuItem()
+{
+ destroy_();
+}
+
+ImageMenuItem::CppClassType ImageMenuItem::imagemenuitem_class_; // initialize static member
+
+GType ImageMenuItem::get_type()
+{
+ return imagemenuitem_class_.init().get_type();
+}
+
+GType ImageMenuItem::get_base_type()
+{
+ return gtk_image_menu_item_get_type();
+}
+
+
+ImageMenuItem::ImageMenuItem()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::MenuItem(Glib::ConstructParams(imagemenuitem_class_.init()))
+{
+ }
+
+void ImageMenuItem::set_image(Widget& image)
+{
+ gtk_image_menu_item_set_image(gobj(), (image).gobj());
+}
+
+Widget* ImageMenuItem::get_image()
+{
+ return Glib::wrap(gtk_image_menu_item_get_image(gobj()));
+}
+
+const Widget* ImageMenuItem::get_image() const
+{
+ return Glib::wrap(gtk_image_menu_item_get_image(const_cast<GtkImageMenuItem*>(gobj())));
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/imagemenuitem.h b/libs/gtkmm2/gtk/gtkmm/imagemenuitem.h
new file mode 100644
index 0000000000..f9f21f8002
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/imagemenuitem.h
@@ -0,0 +1,149 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_IMAGEMENUITEM_H
+#define _GTKMM_IMAGEMENUITEM_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* checkmenuitem.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/menuitem.h>
+#include <gtkmm/stockid.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkImageMenuItem GtkImageMenuItem;
+typedef struct _GtkImageMenuItemClass GtkImageMenuItemClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class ImageMenuItem_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** A menu item with an icon.
+ *
+ * A GtkImageMenuItem is a menu item which has an icon next to the text label. Note that the
+ * user can disable display of menu icons, so make sure to still fill in the text label.
+ *
+ * @ingroup Menus
+ * @ingroup Widgets S
+ */
+
+class ImageMenuItem : public MenuItem
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef ImageMenuItem CppObjectType;
+ typedef ImageMenuItem_Class CppClassType;
+ typedef GtkImageMenuItem BaseObjectType;
+ typedef GtkImageMenuItemClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~ImageMenuItem();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class ImageMenuItem_Class;
+ static CppClassType imagemenuitem_class_;
+
+ // noncopyable
+ ImageMenuItem(const ImageMenuItem&);
+ ImageMenuItem& operator=(const ImageMenuItem&);
+
+protected:
+ explicit ImageMenuItem(const Glib::ConstructParams& construct_params);
+ explicit ImageMenuItem(GtkImageMenuItem* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkImageMenuItem* gobj() { return reinterpret_cast<GtkImageMenuItem*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkImageMenuItem* gobj() const { return reinterpret_cast<GtkImageMenuItem*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+public:
+
+ ImageMenuItem();
+ explicit ImageMenuItem(Widget& image,
+ const Glib::ustring& label, bool mnemonic = false);
+ explicit ImageMenuItem(const Glib::ustring& label, bool mnemonic = false);
+ explicit ImageMenuItem(const StockID& id);
+
+
+ /** Sets the image of @a image_menu_item to the given widget.
+ * Note that it depends on the show-menu-images setting whether
+ * the image will be displayed or not.
+ * @param image A widget to set as the image for the menu item.
+ */
+ void set_image(Widget& image);
+
+ /** Gets the widget that is currently set as the image of @a image_menu_item .
+ * See set_image().
+ * @return The widget set as image of @a image_menu_item .
+ */
+ Widget* get_image();
+
+ /** Gets the widget that is currently set as the image of @a image_menu_item .
+ * See set_image().
+ * @return The widget set as image of @a image_menu_item .
+ */
+ const Widget* get_image() const;
+
+
+};
+
+} /* namespace Gtk */
+
+
+namespace Glib
+{
+ /** @relates Gtk::ImageMenuItem
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::ImageMenuItem* wrap(GtkImageMenuItem* object, bool take_copy = false);
+}
+#endif /* _GTKMM_IMAGEMENUITEM_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/inputdialog.cc b/libs/gtkmm2/gtk/gtkmm/inputdialog.cc
new file mode 100644
index 0000000000..9ccbf28a10
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/inputdialog.cc
@@ -0,0 +1,386 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/inputdialog.h>
+#include <gtkmm/private/inputdialog_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkinputdialog.h>
+#include <gtkmm/button.h>
+#include <gtkmm/optionmenu.h>
+#include <gtkmm/scrolledwindow.h>
+#include <gtkmm/table.h>
+
+
+namespace
+{
+
+void InputDialog_signal_enable_device_callback(GtkInputDialog* self, GdkDevice* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,const Glib::RefPtr<Gdk::Device>& > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::wrap(p0, true)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo InputDialog_signal_enable_device_info =
+{
+ "enable_device",
+ (GCallback) &InputDialog_signal_enable_device_callback,
+ (GCallback) &InputDialog_signal_enable_device_callback
+};
+
+
+void InputDialog_signal_disable_device_callback(GtkInputDialog* self, GdkDevice* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,const Glib::RefPtr<Gdk::Device>& > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::wrap(p0, true)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo InputDialog_signal_disable_device_info =
+{
+ "disable_device",
+ (GCallback) &InputDialog_signal_disable_device_callback,
+ (GCallback) &InputDialog_signal_disable_device_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::InputDialog* wrap(GtkInputDialog* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::InputDialog *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& InputDialog_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &InputDialog_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_input_dialog_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void InputDialog_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->enable_device = &enable_device_callback;
+ klass->disable_device = &disable_device_callback;
+}
+
+
+void InputDialog_Class::enable_device_callback(GtkInputDialog* self, GdkDevice* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_enable_device(Glib::wrap(p0, true)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->enable_device)
+ (*base->enable_device)(self, p0);
+ }
+}
+
+void InputDialog_Class::disable_device_callback(GtkInputDialog* self, GdkDevice* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_disable_device(Glib::wrap(p0, true)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->disable_device)
+ (*base->disable_device)(self, p0);
+ }
+}
+
+
+Glib::ObjectBase* InputDialog_Class::wrap_new(GObject* o)
+{
+ return new InputDialog((GtkInputDialog*)(o)); //top-level windows can not be manage()ed.
+
+}
+
+
+/* The implementation: */
+
+InputDialog::InputDialog(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Dialog(construct_params)
+{
+ }
+
+InputDialog::InputDialog(GtkInputDialog* castitem)
+:
+ Gtk::Dialog((GtkDialog*)(castitem))
+{
+ }
+
+InputDialog::~InputDialog()
+{
+ destroy_();
+}
+
+InputDialog::CppClassType InputDialog::inputdialog_class_; // initialize static member
+
+GType InputDialog::get_type()
+{
+ return inputdialog_class_.init().get_type();
+}
+
+GType InputDialog::get_base_type()
+{
+ return gtk_input_dialog_get_type();
+}
+
+
+InputDialog::InputDialog()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Dialog(Glib::ConstructParams(inputdialog_class_.init()))
+{
+ }
+
+Table* InputDialog::get_axis_list()
+{
+ return Glib::wrap((GtkTable*)(gobj()->axis_list));
+}
+
+const Table* InputDialog::get_axis_list() const
+{
+ return Glib::wrap((GtkTable*)(gobj()->axis_list));
+}
+
+ScrolledWindow* InputDialog::get_axis_box()
+{
+ return Glib::wrap((GtkScrolledWindow*)(gobj()->axis_listbox));
+}
+
+const ScrolledWindow* InputDialog::get_axis_box() const
+{
+ return Glib::wrap((GtkScrolledWindow*)(gobj()->axis_listbox));
+}
+
+OptionMenu* InputDialog::get_mode_optionmenu()
+{
+ return Glib::wrap((GtkOptionMenu*)(gobj()->mode_optionmenu));
+}
+
+const OptionMenu* InputDialog::get_mode_optionmenu() const
+{
+ return Glib::wrap((GtkOptionMenu*)(gobj()->mode_optionmenu));
+}
+
+Button* InputDialog::get_close_button()
+{
+ return Glib::wrap((GtkButton*)(gobj()->close_button));
+}
+
+const Button* InputDialog::get_close_button() const
+{
+ return Glib::wrap((GtkButton*)(gobj()->close_button));
+}
+
+Button* InputDialog::get_save_button()
+{
+ return Glib::wrap((GtkButton*)(gobj()->save_button));
+}
+
+const Button* InputDialog::get_save_button() const
+{
+ return Glib::wrap((GtkButton*)(gobj()->save_button));
+}
+
+Glib::RefPtr<Gdk::Device> InputDialog::get_current_device()
+{
+ Glib::RefPtr<Gdk::Device> ref_ptr(Glib::wrap(gobj()->current_device));
+
+ if(ref_ptr)
+ ref_ptr->reference();
+
+ return ref_ptr;
+}
+
+Glib::RefPtr<const Gdk::Device> InputDialog::get_current_device() const
+{
+ Glib::RefPtr<const Gdk::Device> ref_ptr(Glib::wrap(gobj()->current_device));
+
+ if(ref_ptr)
+ ref_ptr->reference();
+
+ return ref_ptr;
+}
+
+Table* InputDialog::get_keys_list()
+{
+ return Glib::wrap((GtkTable*)(gobj()->keys_list));
+}
+
+const Table* InputDialog::get_keys_list() const
+{
+ return Glib::wrap((GtkTable*)(gobj()->keys_list));
+}
+
+ScrolledWindow* InputDialog::get_keys_box()
+{
+ return Glib::wrap((GtkScrolledWindow*)(gobj()->keys_listbox));
+}
+
+const ScrolledWindow* InputDialog::get_keys_box() const
+{
+ return Glib::wrap((GtkScrolledWindow*)(gobj()->keys_listbox));
+}
+
+
+Glib::SignalProxy1< void,const Glib::RefPtr<Gdk::Device>& > InputDialog::signal_enable_device()
+{
+ return Glib::SignalProxy1< void,const Glib::RefPtr<Gdk::Device>& >(this, &InputDialog_signal_enable_device_info);
+}
+
+Glib::SignalProxy1< void,const Glib::RefPtr<Gdk::Device>& > InputDialog::signal_disable_device()
+{
+ return Glib::SignalProxy1< void,const Glib::RefPtr<Gdk::Device>& >(this, &InputDialog_signal_disable_device_info);
+}
+
+
+void Gtk::InputDialog::on_enable_device(const Glib::RefPtr<Gdk::Device>& device)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->enable_device)
+ (*base->enable_device)(gobj(),Glib::unwrap(device));
+}
+
+void Gtk::InputDialog::on_disable_device(const Glib::RefPtr<Gdk::Device>& device)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->disable_device)
+ (*base->disable_device)(gobj(),Glib::unwrap(device));
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/inputdialog.h b/libs/gtkmm2/gtk/gtkmm/inputdialog.h
new file mode 100644
index 0000000000..d5306cb778
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/inputdialog.h
@@ -0,0 +1,155 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_INPUTDIALOG_H
+#define _GTKMM_INPUTDIALOG_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* inputdialog.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/dialog.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkInputDialog GtkInputDialog;
+typedef struct _GtkInputDialogClass GtkInputDialogClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class InputDialog_Class; } // namespace Gtk
+namespace Gtk
+{
+
+class Button;
+class Table;
+class OptionMenu;
+class ScrolledWindow;
+
+// Don't list this in the documentation's Dialogs group because it isn't really useful
+// - see the GTK+ docs.
+
+class InputDialog : public Dialog
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef InputDialog CppObjectType;
+ typedef InputDialog_Class CppClassType;
+ typedef GtkInputDialog BaseObjectType;
+ typedef GtkInputDialogClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~InputDialog();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class InputDialog_Class;
+ static CppClassType inputdialog_class_;
+
+ // noncopyable
+ InputDialog(const InputDialog&);
+ InputDialog& operator=(const InputDialog&);
+
+protected:
+ explicit InputDialog(const Glib::ConstructParams& construct_params);
+ explicit InputDialog(GtkInputDialog* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkInputDialog* gobj() { return reinterpret_cast<GtkInputDialog*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkInputDialog* gobj() const { return reinterpret_cast<GtkInputDialog*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_enable_device(const Glib::RefPtr<Gdk::Device>& device);
+ virtual void on_disable_device(const Glib::RefPtr<Gdk::Device>& device);
+
+
+private:
+
+
+public:
+
+ InputDialog();
+
+
+ Table* get_axis_list();
+ const Table* get_axis_list() const;
+ ScrolledWindow* get_axis_box();
+ const ScrolledWindow* get_axis_box() const;
+ OptionMenu* get_mode_optionmenu();
+ const OptionMenu* get_mode_optionmenu() const;
+
+ Button* get_close_button();
+ const Button* get_close_button() const;
+ Button* get_save_button();
+ const Button* get_save_button() const;
+
+ //GtkWidget *axis_items[GDK_AXIS_LAST];
+
+ Glib::RefPtr<Gdk::Device> get_current_device();
+ Glib::RefPtr<const Gdk::Device> get_current_device() const;
+
+ Table* get_keys_list();
+ const Table* get_keys_list() const;
+ ScrolledWindow* get_keys_box();
+ const ScrolledWindow* get_keys_box() const;
+
+
+ Glib::SignalProxy1< void,const Glib::RefPtr<Gdk::Device>& > signal_enable_device();
+
+
+ Glib::SignalProxy1< void,const Glib::RefPtr<Gdk::Device>& > signal_disable_device();
+
+
+};
+
+} /* namespace Gtk */
+
+
+namespace Glib
+{
+ /** @relates Gtk::InputDialog
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::InputDialog* wrap(GtkInputDialog* object, bool take_copy = false);
+}
+#endif /* _GTKMM_INPUTDIALOG_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/invisible.cc b/libs/gtkmm2/gtk/gtkmm/invisible.cc
new file mode 100644
index 0000000000..3c54f190da
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/invisible.cc
@@ -0,0 +1,167 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/invisible.h>
+#include <gtkmm/private/invisible_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkinvisible.h>
+
+namespace Gtk
+{
+
+
+}
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::Invisible* wrap(GtkInvisible* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::Invisible *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Invisible_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Invisible_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_invisible_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Invisible_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* Invisible_Class::wrap_new(GObject* o)
+{
+ return manage(new Invisible((GtkInvisible*)(o)));
+
+}
+
+
+/* The implementation: */
+
+Invisible::Invisible(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Widget(construct_params)
+{
+ }
+
+Invisible::Invisible(GtkInvisible* castitem)
+:
+ Gtk::Widget((GtkWidget*)(castitem))
+{
+ }
+
+Invisible::~Invisible()
+{
+ destroy_();
+}
+
+Invisible::CppClassType Invisible::invisible_class_; // initialize static member
+
+GType Invisible::get_type()
+{
+ return invisible_class_.init().get_type();
+}
+
+GType Invisible::get_base_type()
+{
+ return gtk_invisible_get_type();
+}
+
+
+Invisible::Invisible()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Widget(Glib::ConstructParams(invisible_class_.init()))
+{
+ }
+
+Invisible::Invisible(const Glib::RefPtr<Gdk::Screen>& screen)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Widget(Glib::ConstructParams(invisible_class_.init(), "screen", Glib::unwrap(screen), (char*) 0))
+{
+ }
+
+Glib::RefPtr<Gdk::Screen> Invisible::get_screen()
+{
+
+ Glib::RefPtr<Gdk::Screen> retvalue = Glib::wrap(gtk_invisible_get_screen(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const Gdk::Screen> Invisible::get_screen() const
+{
+
+ Glib::RefPtr<const Gdk::Screen> retvalue = Glib::wrap(gtk_invisible_get_screen(const_cast<GtkInvisible*>(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+void Invisible::set_screen(const Glib::RefPtr<Gdk::Screen>& screen)
+{
+ gtk_invisible_set_screen(gobj(), Glib::unwrap(screen));
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/invisible.h b/libs/gtkmm2/gtk/gtkmm/invisible.h
new file mode 100644
index 0000000000..7e22cba573
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/invisible.h
@@ -0,0 +1,142 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_INVISIBLE_H
+#define _GTKMM_INVISIBLE_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* invisible.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/widget.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkInvisible GtkInvisible;
+typedef struct _GtkInvisibleClass GtkInvisibleClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class Invisible_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** This widget is used internally in GTK+, and is probably not useful for application developers.
+ * It is used for reliable pointer grabs and selection handling in the code for drag-and-drop.
+ * @ingroup Widgets
+ */
+
+class Invisible : public Widget
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Invisible CppObjectType;
+ typedef Invisible_Class CppClassType;
+ typedef GtkInvisible BaseObjectType;
+ typedef GtkInvisibleClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~Invisible();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class Invisible_Class;
+ static CppClassType invisible_class_;
+
+ // noncopyable
+ Invisible(const Invisible&);
+ Invisible& operator=(const Invisible&);
+
+protected:
+ explicit Invisible(const Glib::ConstructParams& construct_params);
+ explicit Invisible(GtkInvisible* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkInvisible* gobj() { return reinterpret_cast<GtkInvisible*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkInvisible* gobj() const { return reinterpret_cast<GtkInvisible*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+public:
+ Invisible();
+ explicit Invisible(const Glib::RefPtr<Gdk::Screen>& screen);
+
+
+ /** Returns the Gdk::Screen object associated with @a invisible
+ * @return The associated Gdk::Screen.
+ *
+ * Since: 2.2.
+ */
+ Glib::RefPtr<Gdk::Screen> get_screen();
+
+ /** Returns the Gdk::Screen object associated with @a invisible
+ * @return The associated Gdk::Screen.
+ *
+ * Since: 2.2.
+ */
+ Glib::RefPtr<const Gdk::Screen> get_screen() const;
+
+ /** Sets the Gdk::Screen where the Gtk::Invisible object will be displayed.
+ *
+ * Since: 2.2
+ * @param screen A Gdk::Screen.
+ */
+ void set_screen(const Glib::RefPtr<Gdk::Screen>& screen);
+
+
+};
+
+} /* namespace Gtk */
+
+
+namespace Glib
+{
+ /** @relates Gtk::Invisible
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::Invisible* wrap(GtkInvisible* object, bool take_copy = false);
+}
+#endif /* _GTKMM_INVISIBLE_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/item.cc b/libs/gtkmm2/gtk/gtkmm/item.cc
new file mode 100644
index 0000000000..45e28f6fbc
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/item.cc
@@ -0,0 +1,321 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/item.h>
+#include <gtkmm/private/item_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkitem.h>
+
+
+namespace
+{
+
+const Glib::SignalProxyInfo Item_signal_select_info =
+{
+ "select",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+
+const Glib::SignalProxyInfo Item_signal_deselect_info =
+{
+ "deselect",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+
+const Glib::SignalProxyInfo Item_signal_toggle_info =
+{
+ "toggle",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::Item* wrap(GtkItem* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::Item *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Item_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Item_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_item_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Item_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->select = &select_callback;
+ klass->deselect = &deselect_callback;
+ klass->toggle = &toggle_callback;
+}
+
+
+void Item_Class::select_callback(GtkItem* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_select();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->select)
+ (*base->select)(self);
+ }
+}
+
+void Item_Class::deselect_callback(GtkItem* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_deselect();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->deselect)
+ (*base->deselect)(self);
+ }
+}
+
+void Item_Class::toggle_callback(GtkItem* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_toggle();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->toggle)
+ (*base->toggle)(self);
+ }
+}
+
+
+Glib::ObjectBase* Item_Class::wrap_new(GObject* o)
+{
+ return manage(new Item((GtkItem*)(o)));
+
+}
+
+
+/* The implementation: */
+
+Item::Item(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Bin(construct_params)
+{
+ }
+
+Item::Item(GtkItem* castitem)
+:
+ Gtk::Bin((GtkBin*)(castitem))
+{
+ }
+
+Item::~Item()
+{
+ destroy_();
+}
+
+Item::CppClassType Item::item_class_; // initialize static member
+
+GType Item::get_type()
+{
+ return item_class_.init().get_type();
+}
+
+GType Item::get_base_type()
+{
+ return gtk_item_get_type();
+}
+
+
+void Item::select()
+{
+ gtk_item_select(gobj());
+}
+
+void Item::deselect()
+{
+ gtk_item_deselect(gobj());
+}
+
+void Item::toggle()
+{
+ gtk_item_toggle(gobj());
+}
+
+Item::Item()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Bin(Glib::ConstructParams(item_class_.init()))
+{
+ }
+
+
+Glib::SignalProxy0< void > Item::signal_select()
+{
+ return Glib::SignalProxy0< void >(this, &Item_signal_select_info);
+}
+
+Glib::SignalProxy0< void > Item::signal_deselect()
+{
+ return Glib::SignalProxy0< void >(this, &Item_signal_deselect_info);
+}
+
+Glib::SignalProxy0< void > Item::signal_toggle()
+{
+ return Glib::SignalProxy0< void >(this, &Item_signal_toggle_info);
+}
+
+
+void Gtk::Item::on_select()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->select)
+ (*base->select)(gobj());
+}
+
+void Gtk::Item::on_deselect()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->deselect)
+ (*base->deselect)(gobj());
+}
+
+void Gtk::Item::on_toggle()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->toggle)
+ (*base->toggle)(gobj());
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/item.h b/libs/gtkmm2/gtk/gtkmm/item.h
new file mode 100644
index 0000000000..08405b5dd0
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/item.h
@@ -0,0 +1,145 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_ITEM_H
+#define _GTKMM_ITEM_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* item.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/bin.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkItem GtkItem;
+typedef struct _GtkItemClass GtkItemClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class Item_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** This class should be considered as a virtual base class.
+ * Only the signals and methods it provides are of any interest.
+ * You don't want to instantiate any objects of that class.
+ *
+ * @ingroup Widgets
+ */
+
+class Item : public Bin
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Item CppObjectType;
+ typedef Item_Class CppClassType;
+ typedef GtkItem BaseObjectType;
+ typedef GtkItemClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~Item();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class Item_Class;
+ static CppClassType item_class_;
+
+ // noncopyable
+ Item(const Item&);
+ Item& operator=(const Item&);
+
+protected:
+ explicit Item(const Glib::ConstructParams& construct_params);
+ explicit Item(GtkItem* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkItem* gobj() { return reinterpret_cast<GtkItem*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkItem* gobj() const { return reinterpret_cast<GtkItem*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_select();
+ virtual void on_deselect();
+ virtual void on_toggle();
+
+
+private:
+
+public:
+
+
+ void select();
+
+
+ Glib::SignalProxy0< void > signal_select();
+
+
+ void deselect();
+
+
+ Glib::SignalProxy0< void > signal_deselect();
+
+
+ void toggle();
+
+
+ Glib::SignalProxy0< void > signal_toggle();
+
+
+protected:
+ Item();
+
+
+};
+
+} /* namespace Gtk */
+
+
+namespace Glib
+{
+ /** @relates Gtk::Item
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::Item* wrap(GtkItem* object, bool take_copy = false);
+}
+#endif /* _GTKMM_ITEM_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/label.cc b/libs/gtkmm2/gtk/gtkmm/label.cc
new file mode 100644
index 0000000000..0de70b9b64
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/label.cc
@@ -0,0 +1,603 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/label.h>
+#include <gtkmm/private/label_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtklabel.h>
+#include <gtkmm/menu.h>
+
+namespace Gtk
+{
+
+Label::Label()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Misc(Glib::ConstructParams(label_class_.init(), (char*) 0))
+{}
+
+Label::Label(const Glib::ustring& label, bool mnemonic)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Misc(Glib::ConstructParams(label_class_.init(), "label",label.c_str(),"use_underline",gboolean(mnemonic), (char*) 0))
+{}
+
+Label::Label(const Glib::ustring& label, float xalign, float yalign, bool mnemonic)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Misc(Glib::ConstructParams(label_class_.init(), "label",label.c_str(),"use_underline",gboolean(mnemonic), (char*) 0))
+{
+ set_alignment(xalign, yalign);
+}
+
+Label::Label(const Glib::ustring& label, AlignmentEnum xalign, AlignmentEnum yalign, bool mnemonic)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Misc(Glib::ConstructParams(label_class_.init(), "label",label.c_str(),"use_underline",gboolean(mnemonic), (char*) 0))
+{
+ set_alignment(xalign, yalign);
+}
+
+void Label::select_region(int start_offset)
+{
+ gtk_label_select_region(gobj(), start_offset, -1 /* See C docs */);
+}
+
+} // namespace Gtk
+
+
+namespace
+{
+
+void Label_signal_populate_popup_callback(GtkLabel* self, GtkMenu* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,Menu* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::wrap(p0)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo Label_signal_populate_popup_info =
+{
+ "populate_popup",
+ (GCallback) &Label_signal_populate_popup_callback,
+ (GCallback) &Label_signal_populate_popup_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::Label* wrap(GtkLabel* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::Label *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Label_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Label_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_label_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Label_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->populate_popup = &populate_popup_callback;
+}
+
+
+void Label_Class::populate_popup_callback(GtkLabel* self, GtkMenu* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_populate_popup(Glib::wrap(p0)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->populate_popup)
+ (*base->populate_popup)(self, p0);
+ }
+}
+
+
+Glib::ObjectBase* Label_Class::wrap_new(GObject* o)
+{
+ return manage(new Label((GtkLabel*)(o)));
+
+}
+
+
+/* The implementation: */
+
+Label::Label(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Misc(construct_params)
+{
+ }
+
+Label::Label(GtkLabel* castitem)
+:
+ Gtk::Misc((GtkMisc*)(castitem))
+{
+ }
+
+Label::~Label()
+{
+ destroy_();
+}
+
+Label::CppClassType Label::label_class_; // initialize static member
+
+GType Label::get_type()
+{
+ return label_class_.init().get_type();
+}
+
+GType Label::get_base_type()
+{
+ return gtk_label_get_type();
+}
+
+
+void Label::set_text(const Glib::ustring & str)
+{
+ gtk_label_set_text(gobj(), str.c_str());
+}
+
+Glib::ustring Label::get_text() const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(gtk_label_get_text(const_cast<GtkLabel*>(gobj())));
+}
+
+void Label::set_attributes(Pango::AttrList& attrs)
+{
+ gtk_label_set_attributes(gobj(), (attrs).gobj());
+}
+
+Pango::AttrList Label::get_attributes() const
+{
+ return Pango::AttrList((gtk_label_get_attributes(const_cast<GtkLabel*>(gobj()))));
+}
+
+void Label::set_label(const Glib::ustring& str)
+{
+ gtk_label_set_label(gobj(), str.c_str());
+}
+
+Glib::ustring Label::get_label() const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(gtk_label_get_label(const_cast<GtkLabel*>(gobj())));
+}
+
+void Label::set_markup(const Glib::ustring& str)
+{
+ gtk_label_set_markup(gobj(), str.c_str());
+}
+
+void Label::set_use_markup(bool setting)
+{
+ gtk_label_set_use_markup(gobj(), static_cast<int>(setting));
+}
+
+bool Label::get_use_markup() const
+{
+ return gtk_label_get_use_markup(const_cast<GtkLabel*>(gobj()));
+}
+
+void Label::set_use_underline(bool setting)
+{
+ gtk_label_set_use_underline(gobj(), static_cast<int>(setting));
+}
+
+bool Label::get_use_underline() const
+{
+ return gtk_label_get_use_underline(const_cast<GtkLabel*>(gobj()));
+}
+
+void Label::set_markup_with_mnemonic(const Glib::ustring& str)
+{
+ gtk_label_set_markup_with_mnemonic(gobj(), str.c_str());
+}
+
+guint Label::get_mnemonic_keyval() const
+{
+ return gtk_label_get_mnemonic_keyval(const_cast<GtkLabel*>(gobj()));
+}
+
+void Label::set_mnemonic_widget(Widget& widget)
+{
+ gtk_label_set_mnemonic_widget(gobj(), (widget).gobj());
+}
+
+Widget* Label::get_mnemonic_widget()
+{
+ return Glib::wrap(gtk_label_get_mnemonic_widget(gobj()));
+}
+
+const Widget* Label::get_mnemonic_widget() const
+{
+ return Glib::wrap(gtk_label_get_mnemonic_widget(const_cast<GtkLabel*>(gobj())));
+}
+
+void Label::set_text_with_mnemonic(const Glib::ustring& str)
+{
+ gtk_label_set_text_with_mnemonic(gobj(), str.c_str());
+}
+
+void Label::set_justify(Justification jtype)
+{
+ gtk_label_set_justify(gobj(), ((GtkJustification)(jtype)));
+}
+
+Justification Label::get_justify() const
+{
+ return ((Justification)(gtk_label_get_justify(const_cast<GtkLabel*>(gobj()))));
+}
+
+void Label::set_ellipsize(Pango::EllipsizeMode mode)
+{
+ gtk_label_set_ellipsize(gobj(), ((PangoEllipsizeMode)(mode)));
+}
+
+Pango::EllipsizeMode Label::get_ellipsize() const
+{
+ return ((Pango::EllipsizeMode)(gtk_label_get_ellipsize(const_cast<GtkLabel*>(gobj()))));
+}
+
+void Label::set_width_chars(int n_chars)
+{
+ gtk_label_set_width_chars(gobj(), n_chars);
+}
+
+int Label::get_width_chars() const
+{
+ return gtk_label_get_width_chars(const_cast<GtkLabel*>(gobj()));
+}
+
+void Label::set_max_width_chars(int n_chars)
+{
+ gtk_label_set_max_width_chars(gobj(), n_chars);
+}
+
+int Label::get_max_width_chars() const
+{
+ return gtk_label_get_max_width_chars(const_cast<GtkLabel*>(gobj()));
+}
+
+void Label::set_pattern(const Glib::ustring& pattern)
+{
+ gtk_label_set_pattern(gobj(), pattern.c_str());
+}
+
+void Label::set_line_wrap(bool wrap)
+{
+ gtk_label_set_line_wrap(gobj(), static_cast<int>(wrap));
+}
+
+bool Label::get_line_wrap() const
+{
+ return gtk_label_get_line_wrap(const_cast<GtkLabel*>(gobj()));
+}
+
+void Label::set_selectable(bool setting)
+{
+ gtk_label_set_selectable(gobj(), static_cast<int>(setting));
+}
+
+bool Label::get_selectable() const
+{
+ return gtk_label_get_selectable(const_cast<GtkLabel*>(gobj()));
+}
+
+void Label::set_angle(double angle)
+{
+ gtk_label_set_angle(gobj(), angle);
+}
+
+double Label::get_angle() const
+{
+ return gtk_label_get_angle(const_cast<GtkLabel*>(gobj()));
+}
+
+void Label::select_region(int start_offset, int end_offset)
+{
+ gtk_label_select_region(gobj(), start_offset, end_offset);
+}
+
+bool Label::get_selection_bounds(int& start, int& end) const
+{
+ return gtk_label_get_selection_bounds(const_cast<GtkLabel*>(gobj()), &start, &end);
+}
+
+Glib::RefPtr<Pango::Layout> Label::get_layout()
+{
+
+ Glib::RefPtr<Pango::Layout> retvalue = Glib::wrap(gtk_label_get_layout(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const Pango::Layout> Label::get_layout() const
+{
+
+ Glib::RefPtr<const Pango::Layout> retvalue = Glib::wrap(gtk_label_get_layout(const_cast<GtkLabel*>(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+void Label::get_layout_offsets(int& x, int& y) const
+{
+ gtk_label_get_layout_offsets(const_cast<GtkLabel*>(gobj()), &x, &y);
+}
+
+void Label::set_single_line_mode(bool single_line_mode)
+{
+ gtk_label_set_single_line_mode(gobj(), static_cast<int>(single_line_mode));
+}
+
+bool Label::get_single_line_mode() const
+{
+ return gtk_label_get_single_line_mode(const_cast<GtkLabel*>(gobj()));
+}
+
+
+Glib::SignalProxy1< void,Menu* > Label::signal_populate_popup()
+{
+ return Glib::SignalProxy1< void,Menu* >(this, &Label_signal_populate_popup_info);
+}
+
+
+Glib::PropertyProxy<Glib::ustring> Label::property_label()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "label");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> Label::property_label() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "label");
+}
+
+Glib::PropertyProxy<Pango::AttrList> Label::property_attributes()
+{
+ return Glib::PropertyProxy<Pango::AttrList>(this, "attributes");
+}
+
+Glib::PropertyProxy_ReadOnly<Pango::AttrList> Label::property_attributes() const
+{
+ return Glib::PropertyProxy_ReadOnly<Pango::AttrList>(this, "attributes");
+}
+
+Glib::PropertyProxy<bool> Label::property_use_markup()
+{
+ return Glib::PropertyProxy<bool>(this, "use-markup");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Label::property_use_markup() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "use-markup");
+}
+
+Glib::PropertyProxy<bool> Label::property_use_underline()
+{
+ return Glib::PropertyProxy<bool>(this, "use-underline");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Label::property_use_underline() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "use-underline");
+}
+
+Glib::PropertyProxy<Justification> Label::property_justify()
+{
+ return Glib::PropertyProxy<Justification>(this, "justify");
+}
+
+Glib::PropertyProxy_ReadOnly<Justification> Label::property_justify() const
+{
+ return Glib::PropertyProxy_ReadOnly<Justification>(this, "justify");
+}
+
+Glib::PropertyProxy_WriteOnly<Glib::ustring> Label::property_pattern()
+{
+ return Glib::PropertyProxy_WriteOnly<Glib::ustring>(this, "pattern");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> Label::property_pattern() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "pattern");
+}
+
+Glib::PropertyProxy<bool> Label::property_wrap()
+{
+ return Glib::PropertyProxy<bool>(this, "wrap");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Label::property_wrap() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "wrap");
+}
+
+Glib::PropertyProxy<bool> Label::property_selectable()
+{
+ return Glib::PropertyProxy<bool>(this, "selectable");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Label::property_selectable() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "selectable");
+}
+
+Glib::PropertyProxy_ReadOnly<guint> Label::property_mnemonic_keyval() const
+{
+ return Glib::PropertyProxy_ReadOnly<guint>(this, "mnemonic-keyval");
+}
+
+Glib::PropertyProxy<Widget*> Label::property_mnemonic_widget()
+{
+ return Glib::PropertyProxy<Widget*>(this, "mnemonic-widget");
+}
+
+Glib::PropertyProxy_ReadOnly<Widget*> Label::property_mnemonic_widget() const
+{
+ return Glib::PropertyProxy_ReadOnly<Widget*>(this, "mnemonic-widget");
+}
+
+Glib::PropertyProxy_ReadOnly<int> Label::property_cursor_position() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "cursor-position");
+}
+
+Glib::PropertyProxy_ReadOnly<int> Label::property_selection_bound() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "selection-bound");
+}
+
+Glib::PropertyProxy<Pango::EllipsizeMode> Label::property_ellipsize()
+{
+ return Glib::PropertyProxy<Pango::EllipsizeMode>(this, "ellipsize");
+}
+
+Glib::PropertyProxy_ReadOnly<Pango::EllipsizeMode> Label::property_ellipsize() const
+{
+ return Glib::PropertyProxy_ReadOnly<Pango::EllipsizeMode>(this, "ellipsize");
+}
+
+Glib::PropertyProxy<int> Label::property_width_chars()
+{
+ return Glib::PropertyProxy<int>(this, "width-chars");
+}
+
+Glib::PropertyProxy_ReadOnly<int> Label::property_width_chars() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "width-chars");
+}
+
+Glib::PropertyProxy<bool> Label::property_single_line_mode()
+{
+ return Glib::PropertyProxy<bool>(this, "single-line-mode");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Label::property_single_line_mode() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "single-line-mode");
+}
+
+Glib::PropertyProxy<double> Label::property_angle()
+{
+ return Glib::PropertyProxy<double>(this, "angle");
+}
+
+Glib::PropertyProxy_ReadOnly<double> Label::property_angle() const
+{
+ return Glib::PropertyProxy_ReadOnly<double>(this, "angle");
+}
+
+Glib::PropertyProxy<int> Label::property_max_width_chars()
+{
+ return Glib::PropertyProxy<int>(this, "max-width-chars");
+}
+
+Glib::PropertyProxy_ReadOnly<int> Label::property_max_width_chars() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "max-width-chars");
+}
+
+
+void Gtk::Label::on_populate_popup(Menu* menu)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->populate_popup)
+ (*base->populate_popup)(gobj(),(GtkMenu*)Glib::unwrap(menu));
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/label.h b/libs/gtkmm2/gtk/gtkmm/label.h
new file mode 100644
index 0000000000..83d3b68bf0
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/label.h
@@ -0,0 +1,742 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_LABEL_H
+#define _GTKMM_LABEL_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright(C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or(at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#include <gtkmm/misc.h>
+#include <pangomm/attrlist.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkLabel GtkLabel;
+typedef struct _GtkLabelClass GtkLabelClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class Label_Class; } // namespace Gtk
+namespace Gtk
+{
+
+class Menu;
+
+/** A widget that displays a small to medium amount of text.
+ *
+ * A simple setable widget for holding a Glib::ustring.
+ * @ingroup Widgets
+ */
+
+class Label : public Misc
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Label CppObjectType;
+ typedef Label_Class CppClassType;
+ typedef GtkLabel BaseObjectType;
+ typedef GtkLabelClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~Label();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class Label_Class;
+ static CppClassType label_class_;
+
+ // noncopyable
+ Label(const Label&);
+ Label& operator=(const Label&);
+
+protected:
+ explicit Label(const Glib::ConstructParams& construct_params);
+ explicit Label(GtkLabel* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkLabel* gobj() { return reinterpret_cast<GtkLabel*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkLabel* gobj() const { return reinterpret_cast<GtkLabel*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_populate_popup(Menu* menu);
+
+
+private:
+
+
+public:
+ Label();
+ explicit Label(const Glib::ustring& label, bool mnemonic = false);
+
+ /** This constructor is a shortcut for often used code
+ * when you want to create a label with alignment different
+ * than default one.
+ * @code
+ * Gtk::Label label(text, x, y, mnemonic);
+ * @endcode
+ * is equivalent to:
+ * @code
+ * Gtk::Label label(text, mnemonic);
+ * label.set_alignment(x, y);
+ * @endcode
+ */
+ Label(const Glib::ustring& label, float xalign, float yalign, bool mnemonic = false);
+
+ /** This constructor is a shortcut for often used code
+ * when you want to create a label with alignment different
+ * than default one.
+ * @code
+ * Gtk::Label label(text, x, y, mnemonic);
+ * @endcode
+ * is equivalent to:
+ * @code
+ * Gtk::Label label(text, mnemonic);
+ * label.set_alignment(x, y);
+ * @endcode
+ */
+ Label(const Glib::ustring& label, AlignmentEnum xalign, AlignmentEnum yalign = ALIGN_CENTER, bool mnemonic = false);
+
+
+ /// Doesn't use markup.
+
+ /** Sets the text within the Gtk::Label widget. It overwrites any text that
+ * was there before.
+ *
+ * This will also clear any previously set mnemonic accelerators.
+ * @param str The text you want to set.
+ */
+ void set_text(const Glib::ustring &str);
+
+ /** Fetches the text from a label widget, as displayed on the
+ * screen. This does not include any embedded underlines
+ * indicating mnemonics or Pango markup. (See get_label())
+ * @return The text in the label widget.
+ */
+ Glib::ustring get_text() const;
+
+
+ /** Sets a Pango::AttrList; the attributes in the list are applied to the
+ * label text. The attributes set with this function will be ignored
+ * if the "use_underline" property or the "use_markup" property
+ * is <tt>true</tt>.
+ * @param attrs A Pango::AttrList.
+ */
+ void set_attributes(Pango::AttrList& attrs);
+
+ /** Gets the attribute list that was set on the label using
+ * set_attributes(), if any. This function does
+ * not reflect attributes that come from the labels markup
+ * (see set_markup()). If you want to get the
+ * effective attributes for the label, use
+ * pango_layout_get_attribute (gtk_label_get_layout (label)).
+ * @return The attribute list, or <tt>0</tt> if none was set.
+ */
+ Pango::AttrList get_attributes() const;
+
+
+ /** Sets the text of the label. The label is interpreted as
+ * including embedded underlines and/or Pango markup depending
+ * on the values of label->use_underline and label->use_markup.
+ * @param str The new text to set for the label.
+ */
+ void set_label(const Glib::ustring& str);
+
+ /** Fetches the text from a label widget including any embedded
+ * underlines indicating mnemonics and Pango markup. (See
+ * get_text()).
+ * @return The text of the label widget..
+ */
+ Glib::ustring get_label() const;
+
+ /** Parses @a str which is marked up with the Pango text markup language, setting the
+ * label's text and attribute list based on the parse results. If the @a str is
+ * external data, you may need to escape it with Glib::markup_escape_text() or
+ * Glib::markup_printf_escaped()&lt;!-- --&gt;:
+ * @code
+ * char *markup;
+ * &lt;!-- --&gt;
+ * markup = g_markup_printf_escaped ("&lt;span style=\"italic\"&gt;%s&lt;/span&gt;", str);
+ * gtk_label_set_markup (GTK_LABEL (label), markup);
+ * g_free (markup);
+ * @endcode
+ * @param str A markup string (see Pango markup format).
+ */
+ void set_markup(const Glib::ustring& str);
+
+ /** Sets whether the text of the label contains markup in Pango's text markup
+ * language. See set_markup().
+ * @param setting <tt>true</tt> if the label's text should be parsed for markup.
+ */
+ void set_use_markup(bool setting = true);
+
+ /** Returns whether the label's text is interpreted as marked up with
+ * the Pango text markup
+ * language. See set_use_markup().
+ * @return <tt>true</tt> if the label's text will be parsed for markup.
+ */
+ bool get_use_markup() const;
+
+ /** If true, an underline in the text indicates the next character should be
+ * used for the mnemonic accelerator key.
+ * @param setting <tt>true</tt> if underlines in the text indicate mnemonics.
+ */
+ void set_use_underline(bool setting = true);
+
+ /** Returns whether an embedded underline in the label indicates a
+ * mnemonic. See set_use_underline().
+ * @return <tt>true</tt> whether an embedded underline in the label indicates
+ * the mnemonic accelerator keys.
+ */
+ bool get_use_underline() const;
+
+
+ /** Parses @a str which is marked up with the Pango text markup language,
+ * setting the label's text and attribute list based on the parse results.
+ * If characters in @a str are preceded by an underscore, they are underlined
+ * indicating that they represent a keyboard accelerator called a mnemonic.
+ *
+ * The mnemonic key can be used to activate another widget, chosen automatically,
+ * or explicitly using set_mnemonic_widget().
+ * @param str A markup string (see Pango markup format).
+ */
+ void set_markup_with_mnemonic(const Glib::ustring& str);
+
+ /** If the label has been set so that it has an mnemonic key this function
+ * returns the keyval used for the mnemonic accelerator. If there is no
+ * mnemonic set up it returns #GDK_VoidSymbol.
+ * @return GDK keyval usable for accelerators, or #GDK_VoidSymbol.
+ */
+ guint get_mnemonic_keyval() const;
+
+ /** If the label has been set so that it has an mnemonic key (using
+ * i.e.\ set_markup_with_mnemonic(),
+ * set_text_with_mnemonic(), new_with_mnemonic()
+ * or the "use_underline" property) the label can be associated with a
+ * widget that is the target of the mnemonic. When the label is inside
+ * a widget (like a Gtk::Button or a Gtk::Notebook tab) it is
+ * automatically associated with the correct widget, but sometimes
+ * (i.e. when the target is a Gtk::Entry next to the label) you need to
+ * set it explicitly using this function.
+ *
+ * The target widget will be accelerated by emitting "mnemonic_activate" on it.
+ * The default handler for this signal will activate the widget if there are no
+ * mnemonic collisions and toggle focus between the colliding widgets otherwise.
+ * @param widget The target Gtk::Widget.
+ */
+ void set_mnemonic_widget(Widget& widget);
+
+ /** Retrieves the target of the mnemonic (keyboard shortcut) of this
+ * label. See set_mnemonic_widget().
+ * @return The target of the label's mnemonic, or <tt>0</tt> if none
+ * has been set and the default algorithm will be used.
+ */
+ Widget* get_mnemonic_widget();
+
+ /** Retrieves the target of the mnemonic (keyboard shortcut) of this
+ * label. See set_mnemonic_widget().
+ * @return The target of the label's mnemonic, or <tt>0</tt> if none
+ * has been set and the default algorithm will be used.
+ */
+ const Widget* get_mnemonic_widget() const;
+
+ /** Sets the label's text from the string @a str .
+ * If characters in @a str are preceded by an underscore, they are underlined
+ * indicating that they represent a keyboard accelerator called a mnemonic.
+ * The mnemonic key can be used to activate another widget, chosen automatically,
+ * or explicitly using set_mnemonic_widget().
+ * @param str A string.
+ */
+ void set_text_with_mnemonic(const Glib::ustring& str);
+
+ /** Sets the alignment of the lines in the text of the label relative to
+ * each other. Gtk::JUSTIFY_LEFT is the default value when the
+ * widget is first created with new(). If you instead want
+ * to set the alignment of the label as a whole, use
+ * Gtk::Misc::set_alignment() instead. set_justify() has no
+ * effect on labels containing only a single line.
+ * @param jtype A Gtk::Justification.
+ */
+ void set_justify(Justification jtype);
+
+ /** Returns the justification of the label. See set_justify().
+ * @return Gtk::Justification.
+ */
+ Justification get_justify() const;
+
+//TODO: Default value?:
+
+ /** Sets the mode used to ellipsize (add an ellipsis: "...") to the text if there
+ * is not enough space to render the entire string.
+ *
+ * Since: 2.6
+ * @param mode A Pango::EllipsizeMode.
+ */
+ void set_ellipsize(Pango::EllipsizeMode mode);
+
+ /** Returns the ellipsizing position of the label. See set_ellipsize().
+ * @return Pango::EllipsizeMode
+ *
+ * Since: 2.6.
+ */
+ Pango::EllipsizeMode get_ellipsize() const;
+
+
+ /** Sets the desired width in characters of @a label to @a n_chars .
+ *
+ * Since: 2.6
+ * @param n_chars The new desired width, in characters.
+ */
+ void set_width_chars(int n_chars);
+
+ /** Retrieves the desired width of @a label , in characters. See
+ * set_width_chars().
+ * @return The width of the label in characters.
+ *
+ * Since: 2.6.
+ */
+ int get_width_chars() const;
+
+
+ /** Sets the desired maximum width in characters of @a label to @a n_chars .
+ *
+ * Since: 2.6
+ * @param n_chars The new desired maximum width, in characters.
+ */
+ void set_max_width_chars(int n_chars);
+
+ /** Retrieves the desired maximum width of @a label , in characters. See
+ * set_width_chars().
+ * @return The maximum width of the label in characters.
+ *
+ * Since: 2.6.
+ */
+ int get_max_width_chars() const;
+
+
+ void set_pattern(const Glib::ustring& pattern);
+
+ /** Toggles line wrapping within the Gtk::Label widget. <tt>true</tt> makes it break
+ * lines if text exceeds the widget's size. <tt>false</tt> lets the text get cut off
+ * by the edge of the widget if it exceeds the widget size.
+ * @param wrap The setting.
+ */
+ void set_line_wrap(bool wrap = true);
+
+ /** Returns whether lines in the label are automatically wrapped. See set_line_wrap().
+ * @return <tt>true</tt> if the lines of the label are automatically wrapped.
+ */
+ bool get_line_wrap() const;
+
+ /** Selectable labels allow the user to select text from the label, for
+ * copy-and-paste.
+ * @param setting <tt>true</tt> to allow selecting text in the label.
+ */
+ void set_selectable(bool setting = true);
+
+ /** Gets the value set by set_selectable().
+ * @return <tt>true</tt> if the user can copy text from the label.
+ */
+ bool get_selectable() const;
+
+ /** Sets the angle of rotation for the label. An angle of 90 reads from
+ * from bottom to top, an angle of 270, from top to bottom. The angle
+ * setting for the label is ignored if the label is selectable,
+ * wrapped, or ellipsized.
+ *
+ * Since: 2.6
+ * @param angle The angle that the baseline of the label makes with
+ * the horizontal, in degrees, measured counterclockwise.
+ */
+ void set_angle(double angle);
+
+ /** Gets the angle of rotation for the label. See
+ * gtk_label_set_angle.
+ * @return The angle of rotation for the label
+ *
+ * Since: 2.6.
+ */
+ double get_angle() const;
+
+ /** Selects a range of characters in the label, if the label is selectable.
+ * See set_selectable(). If the label is not selectable,
+ * this function has no effect. If @a start_offset or
+ * @a end_offset are -1, then the end of the label will be substituted.
+ * @param start_offset Start offset (in characters not bytes).
+ * @param end_offset End offset (in characters not bytes).
+ */
+ void select_region(int start_offset, int end_offset);
+
+ /** Selects a range of characters in the label, from @a start_offset to the end,
+ * if the label is selectable.
+ * See gtk_label_set_selectable(). If the label is not selectable,
+ * this function has no effect.
+ *
+ * @param start_offset Start offset (in characters not bytes)
+ */
+ void select_region(int start_offset);
+
+
+ /** Gets the selected range of characters in the label, returning <tt>true</tt>
+ * if there's a selection.
+ * @param start Return location for start of selection, as a character offset.
+ * @param end Return location for end of selection, as a character offset.
+ * @return <tt>true</tt> if selection is non-empty.
+ */
+ bool get_selection_bounds(int& start, int& end) const;
+
+
+ /** Gets the Pango::Layout used to display the label.
+ * The layout is useful to e.g. convert text positions to
+ * pixel positions, in combination with get_layout_offsets().
+ * @return The Pango::Layout for this label.
+ */
+ Glib::RefPtr<Pango::Layout> get_layout();
+
+ /** Gets the Pango::Layout used to display the label.
+ * The layout is useful to e.g. convert text positions to
+ * pixel positions, in combination with get_layout_offsets().
+ * @return The Pango::Layout for this label.
+ */
+ Glib::RefPtr<const Pango::Layout> get_layout() const;
+
+ /** Obtains the coordinates where the label will draw the Pango::Layout
+ * representing the text in the label; useful to convert mouse events
+ * into coordinates inside the Pango::Layout, e.g.\ to take some action
+ * if some part of the label is clicked. Of course you will need to
+ * create a Gtk::EventBox to receive the events, and pack the label
+ * inside it, since labels are a Gtk::NO_WINDOW widget. Remember
+ * when using the Pango::Layout functions you need to convert to
+ * and from pixels using PANGO_PIXELS() or Pango::SCALE.
+ * @param x Location to store X offset of layout, or <tt>0</tt>.
+ * @param y Location to store Y offset of layout, or <tt>0</tt>.
+ */
+ void get_layout_offsets(int& x, int& y) const;
+
+
+ /** Sets whether the label is in single line mode.
+ *
+ * Since: 2.6
+ * @param single_line_mode <tt>true</tt> if the label should be in single line mode.
+ */
+ void set_single_line_mode(bool single_line_mode = true);
+
+ /** Returns whether the label is in single line mode.
+ * @return <tt>true</tt> when the label is in single line mode.
+ *
+ * Since: 2.6.
+ */
+ bool get_single_line_mode() const;
+
+
+ Glib::SignalProxy1< void,Menu* > signal_populate_popup();
+
+
+ //Keybinding signals:
+
+
+ /** The text of the label.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_label() ;
+
+/** The text of the label.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_label() const;
+
+ /** A list of style attributes to apply to the text of the label.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Pango::AttrList> property_attributes() ;
+
+/** A list of style attributes to apply to the text of the label.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Pango::AttrList> property_attributes() const;
+
+ /** The text of the label includes XML markup. See pango_parse_markup.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_use_markup() ;
+
+/** The text of the label includes XML markup. See pango_parse_markup.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_use_markup() const;
+
+ /** If set
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_use_underline() ;
+
+/** If set
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_use_underline() const;
+
+ /** The alignment of the lines in the text of the label relative to each other. This does NOT affect the alignment of the label within its allocation. See GtkMisc::xalign for that.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Justification> property_justify() ;
+
+/** The alignment of the lines in the text of the label relative to each other. This does NOT affect the alignment of the label within its allocation. See GtkMisc::xalign for that.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Justification> property_justify() const;
+
+ /** A string with _ characters in positions correspond to characters in the text to underline.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_WriteOnly<Glib::ustring> property_pattern() ;
+
+/** A string with _ characters in positions correspond to characters in the text to underline.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_pattern() const;
+
+ /** If set
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_wrap() ;
+
+/** If set
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_wrap() const;
+
+ /** Whether the label text can be selected with the mouse.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_selectable() ;
+
+/** Whether the label text can be selected with the mouse.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_selectable() const;
+
+ /** The mnemonic accelerator key for this label.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<guint> property_mnemonic_keyval() const;
+
+
+ /** The widget to be activated when the label's mnemonic key is pressed.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Widget*> property_mnemonic_widget() ;
+
+/** The widget to be activated when the label's mnemonic key is pressed.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Widget*> property_mnemonic_widget() const;
+
+ /** The current position of the insertion cursor in chars.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_cursor_position() const;
+
+
+ /** The position of the opposite end of the selection from the cursor in chars.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_selection_bound() const;
+
+
+ /** The preferred place to ellipsize the string
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Pango::EllipsizeMode> property_ellipsize() ;
+
+/** The preferred place to ellipsize the string
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Pango::EllipsizeMode> property_ellipsize() const;
+
+ /** The desired width of the label
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_width_chars() ;
+
+/** The desired width of the label
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_width_chars() const;
+
+ /** Whether the label is in single line mode.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_single_line_mode() ;
+
+/** Whether the label is in single line mode.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_single_line_mode() const;
+
+ /** Angle at which the label is rotated.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<double> property_angle() ;
+
+/** Angle at which the label is rotated.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<double> property_angle() const;
+
+ /** The desired maximum width of the label
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_max_width_chars() ;
+
+/** The desired maximum width of the label
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_max_width_chars() const;
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::Label
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::Label* wrap(GtkLabel* object, bool take_copy = false);
+}
+#endif /* _GTKMM_LABEL_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/layout.cc b/libs/gtkmm2/gtk/gtkmm/layout.cc
new file mode 100644
index 0000000000..366df0ea6f
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/layout.cc
@@ -0,0 +1,371 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/layout.h>
+#include <gtkmm/private/layout_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtklayout.h>
+
+namespace Gtk
+{
+
+/* layout.cc
+ *
+ * Copyright (C) 1998 EMC Capital Management Inc.
+ * Developed by Havoc Pennington <hp@pobox.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+Layout::Layout()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Container(Glib::ConstructParams(layout_class_.init(), (char*) 0))
+{
+ set_hadjustment();
+ set_vadjustment();
+}
+
+Layout::Layout(Adjustment& hadjustment, Adjustment& vadjustment)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Container(Glib::ConstructParams(layout_class_.init(), (char*) 0))
+{
+ set_hadjustment(hadjustment);
+ set_vadjustment(vadjustment);
+}
+
+void Layout::set_hadjustment()
+{
+ gtk_layout_set_hadjustment(gobj(), 0);
+}
+
+void Layout::set_vadjustment()
+{
+ gtk_layout_set_vadjustment(gobj(), 0);
+}
+
+} // namespace Gtk
+
+
+namespace
+{
+
+void Layout_signal_set_scroll_adjustments_callback(GtkLayout* self, GtkAdjustment* p0,GtkAdjustment* p1,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,Adjustment*,Adjustment* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::wrap(p0)
+, Glib::wrap(p1)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo Layout_signal_set_scroll_adjustments_info =
+{
+ "set_scroll_adjustments",
+ (GCallback) &Layout_signal_set_scroll_adjustments_callback,
+ (GCallback) &Layout_signal_set_scroll_adjustments_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::Layout* wrap(GtkLayout* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::Layout *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Layout_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Layout_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_layout_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Layout_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->set_scroll_adjustments = &set_scroll_adjustments_callback;
+}
+
+
+void Layout_Class::set_scroll_adjustments_callback(GtkLayout* self, GtkAdjustment* p0, GtkAdjustment* p1)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_set_scroll_adjustments(Glib::wrap(p0)
+, Glib::wrap(p1)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->set_scroll_adjustments)
+ (*base->set_scroll_adjustments)(self, p0, p1);
+ }
+}
+
+
+Glib::ObjectBase* Layout_Class::wrap_new(GObject* o)
+{
+ return manage(new Layout((GtkLayout*)(o)));
+
+}
+
+
+/* The implementation: */
+
+Layout::Layout(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Container(construct_params)
+{
+ }
+
+Layout::Layout(GtkLayout* castitem)
+:
+ Gtk::Container((GtkContainer*)(castitem))
+{
+ }
+
+Layout::~Layout()
+{
+ destroy_();
+}
+
+Layout::CppClassType Layout::layout_class_; // initialize static member
+
+GType Layout::get_type()
+{
+ return layout_class_.init().get_type();
+}
+
+GType Layout::get_base_type()
+{
+ return gtk_layout_get_type();
+}
+
+
+void Layout::put(Widget& child_widget, int x, int y)
+{
+ gtk_layout_put(gobj(), (child_widget).gobj(), x, y);
+}
+
+void Layout::move(Widget& child_widget, int x, int y)
+{
+ gtk_layout_move(gobj(), (child_widget).gobj(), x, y);
+}
+
+void Layout::set_size(guint width, guint height)
+{
+ gtk_layout_set_size(gobj(), width, height);
+}
+
+void Layout::get_size(guint& width, guint& height) const
+{
+ gtk_layout_get_size(const_cast<GtkLayout*>(gobj()), &(width), &(height));
+}
+
+void Layout::set_hadjustment(Adjustment& adjustment)
+{
+ gtk_layout_set_hadjustment(gobj(), (adjustment).gobj());
+}
+
+Adjustment* Layout::get_hadjustment()
+{
+ return Glib::wrap(gtk_layout_get_hadjustment(gobj()));
+}
+
+const Adjustment* Layout::get_hadjustment() const
+{
+ return Glib::wrap(gtk_layout_get_hadjustment(const_cast<GtkLayout*>(gobj())));
+}
+
+void Layout::set_vadjustment(Adjustment& adjustment)
+{
+ gtk_layout_set_vadjustment(gobj(), (adjustment).gobj());
+}
+
+Adjustment* Layout::get_vadjustment()
+{
+ return Glib::wrap(gtk_layout_get_vadjustment(gobj()));
+}
+
+const Adjustment* Layout::get_vadjustment() const
+{
+ return Glib::wrap(gtk_layout_get_vadjustment(const_cast<GtkLayout*>(gobj())));
+}
+
+Glib::RefPtr<Gdk::Window> Layout::get_bin_window()
+{
+ Glib::RefPtr<Gdk::Window> ref_ptr(Glib::wrap((GdkWindowObject*)(gobj()->bin_window)));
+
+ if(ref_ptr)
+ ref_ptr->reference();
+
+ return ref_ptr;
+}
+
+Glib::RefPtr<const Gdk::Window> Layout::get_bin_window() const
+{
+ Glib::RefPtr<const Gdk::Window> ref_ptr(Glib::wrap((GdkWindowObject*)(gobj()->bin_window)));
+
+ if(ref_ptr)
+ ref_ptr->reference();
+
+ return ref_ptr;
+}
+
+
+Glib::SignalProxy2< void,Adjustment*,Adjustment* > Layout::signal_set_scroll_adjustments()
+{
+ return Glib::SignalProxy2< void,Adjustment*,Adjustment* >(this, &Layout_signal_set_scroll_adjustments_info);
+}
+
+
+Glib::PropertyProxy<Adjustment*> Layout::property_hadjustment()
+{
+ return Glib::PropertyProxy<Adjustment*>(this, "hadjustment");
+}
+
+Glib::PropertyProxy_ReadOnly<Adjustment*> Layout::property_hadjustment() const
+{
+ return Glib::PropertyProxy_ReadOnly<Adjustment*>(this, "hadjustment");
+}
+
+Glib::PropertyProxy<Adjustment*> Layout::property_vadjustment()
+{
+ return Glib::PropertyProxy<Adjustment*>(this, "vadjustment");
+}
+
+Glib::PropertyProxy_ReadOnly<Adjustment*> Layout::property_vadjustment() const
+{
+ return Glib::PropertyProxy_ReadOnly<Adjustment*>(this, "vadjustment");
+}
+
+Glib::PropertyProxy<guint> Layout::property_width()
+{
+ return Glib::PropertyProxy<guint>(this, "width");
+}
+
+Glib::PropertyProxy_ReadOnly<guint> Layout::property_width() const
+{
+ return Glib::PropertyProxy_ReadOnly<guint>(this, "width");
+}
+
+Glib::PropertyProxy<guint> Layout::property_height()
+{
+ return Glib::PropertyProxy<guint>(this, "height");
+}
+
+Glib::PropertyProxy_ReadOnly<guint> Layout::property_height() const
+{
+ return Glib::PropertyProxy_ReadOnly<guint>(this, "height");
+}
+
+
+void Gtk::Layout::on_set_scroll_adjustments(Adjustment* hadj, Adjustment* vadj)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->set_scroll_adjustments)
+ (*base->set_scroll_adjustments)(gobj(),(GtkAdjustment*)Glib::unwrap(hadj),(GtkAdjustment*)Glib::unwrap(vadj));
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/layout.h b/libs/gtkmm2/gtk/gtkmm/layout.h
new file mode 100644
index 0000000000..107cf725ff
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/layout.h
@@ -0,0 +1,300 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_LAYOUT_H
+#define _GTKMM_LAYOUT_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* layout.h
+ *
+ * Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/container.h>
+#include <gtkmm/adjustment.h>
+#include <gdkmm/window.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkLayout GtkLayout;
+typedef struct _GtkLayoutClass GtkLayoutClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class Layout_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** Infinite scrollable area containing child widgets and/or custom drawing.
+ *
+ * Gtk::Layout is similar to Gtk::DrawingArea in that it's a "blank slate"
+ * and doesn't do anything but paint a blank background by default. It's
+ * different in that it supports scrolling natively (You can add it directly
+ * to a Gtk::ScrolledWindow), and it can contain child widgets, since it's a
+ * Gtk::Container. However if you're just going to draw, a Gtk::DrawingArea
+ * is a better choice since it has lower overhead.
+ *
+ * When handling expose_event signals, you must draw to the bin_window
+ * Gdk::Window - see get_bin_window() - rather than the normal Gdk::Window -
+ * see get_window() - as you would for a drawing area.
+ *
+ * @ingroup Widgets
+ * @ingroup Containers
+ */
+
+class Layout : public Container
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Layout CppObjectType;
+ typedef Layout_Class CppClassType;
+ typedef GtkLayout BaseObjectType;
+ typedef GtkLayoutClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~Layout();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class Layout_Class;
+ static CppClassType layout_class_;
+
+ // noncopyable
+ Layout(const Layout&);
+ Layout& operator=(const Layout&);
+
+protected:
+ explicit Layout(const Glib::ConstructParams& construct_params);
+ explicit Layout(GtkLayout* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkLayout* gobj() { return reinterpret_cast<GtkLayout*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkLayout* gobj() const { return reinterpret_cast<GtkLayout*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_set_scroll_adjustments(Adjustment* hadj, Adjustment* vadj);
+
+
+private:
+
+
+public:
+ Layout();
+ Layout(Adjustment& hadjustment, Adjustment& vadjustment);
+
+
+ /** Adds @a child_widget to @a layout , at position ( @a x , @a y ).
+ * @a layout becomes the new parent container of @a child_widget .
+ * @param child_widget Child widget.
+ * @param x X position of child widget.
+ * @param y Y position of child widget.
+ */
+ void put(Widget& child_widget, int x, int y);
+
+ /** Moves a current child of @a layout to a new position.
+ * @param child_widget A current child of @a layout .
+ * @param x X position to move to.
+ * @param y Y position to move to.
+ */
+ void move(Widget& child_widget, int x, int y);
+
+ /** Sets the size of the scrollable area of the layout.
+ * @param width Width of entire scrollable area.
+ * @param height Height of entire scrollable area.
+ */
+ void set_size(guint width, guint height);
+
+ /** Gets the size that has been set on the layout, and that determines
+ * the total extents of the layout's scrollbar area. See
+ * set_size().
+ * @param width Location to store the width set on @a layout , or <tt>0</tt>.
+ * @param height Location to store the height set on @a layout , or <tt>0</tt>.
+ */
+ void get_size(guint& width, guint& height) const;
+
+
+ /** Sets the horizontal scroll adjustment for the layout.
+ *
+ * See Gtk::ScrolledWindow, Gtk::Scrollbar, Gtk::Adjustment for details.
+ * @param adjustment New scroll adjustment.
+ */
+ void set_hadjustment(Adjustment& adjustment);
+
+ /// Creates the Adjustment.
+ void set_hadjustment();
+
+ /** This function should only be called after the layout has been
+ * placed in a Gtk::ScrolledWindow or otherwise configured for
+ * scrolling. It returns the Gtk::Adjustment used for communication
+ * between the horizontal scrollbar and @a layout .
+ *
+ * See Gtk::ScrolledWindow, Gtk::Scrollbar, Gtk::Adjustment for details.
+ * @return Horizontal scroll adjustment.
+ */
+ Adjustment* get_hadjustment();
+
+ /** This function should only be called after the layout has been
+ * placed in a Gtk::ScrolledWindow or otherwise configured for
+ * scrolling. It returns the Gtk::Adjustment used for communication
+ * between the horizontal scrollbar and @a layout .
+ *
+ * See Gtk::ScrolledWindow, Gtk::Scrollbar, Gtk::Adjustment for details.
+ * @return Horizontal scroll adjustment.
+ */
+ const Adjustment* get_hadjustment() const;
+
+ /** Sets the vertical scroll adjustment for the layout.
+ *
+ * See Gtk::ScrolledWindow, Gtk::Scrollbar, Gtk::Adjustment for details.
+ * @param adjustment New scroll adjustment.
+ */
+ void set_vadjustment(Adjustment& adjustment);
+
+ /// Creates the Adjustment.
+ void set_vadjustment();
+
+ /** This function should only be called after the layout has been
+ * placed in a Gtk::ScrolledWindow or otherwise configured for
+ * scrolling. It returns the Gtk::Adjustment used for communication
+ * between the vertical scrollbar and @a layout .
+ *
+ * See Gtk::ScrolledWindow, Gtk::Scrollbar, Gtk::Adjustment for details.
+ * @return Vertical scroll adjustment.
+ */
+ Adjustment* get_vadjustment();
+
+ /** This function should only be called after the layout has been
+ * placed in a Gtk::ScrolledWindow or otherwise configured for
+ * scrolling. It returns the Gtk::Adjustment used for communication
+ * between the vertical scrollbar and @a layout .
+ *
+ * See Gtk::ScrolledWindow, Gtk::Scrollbar, Gtk::Adjustment for details.
+ * @return Vertical scroll adjustment.
+ */
+ const Adjustment* get_vadjustment() const;
+
+ Glib::RefPtr<Gdk::Window> get_bin_window();
+ Glib::RefPtr<const Gdk::Window> get_bin_window() const;
+
+ // See Gtk::Widget::set_scroll_adjustments()
+
+
+ Glib::SignalProxy2< void,Adjustment*,Adjustment* > signal_set_scroll_adjustments();
+
+
+ /** The GtkAdjustment for the horizontal position.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Adjustment*> property_hadjustment() ;
+
+/** The GtkAdjustment for the horizontal position.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Adjustment*> property_hadjustment() const;
+
+ /** The GtkAdjustment for the vertical position.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Adjustment*> property_vadjustment() ;
+
+/** The GtkAdjustment for the vertical position.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Adjustment*> property_vadjustment() const;
+
+ /** The width of the layout.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<guint> property_width() ;
+
+/** The width of the layout.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<guint> property_width() const;
+
+ /** The height of the layout.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<guint> property_height() ;
+
+/** The height of the layout.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<guint> property_height() const;
+
+
+};
+
+} /* namespace Gtk */
+
+
+namespace Glib
+{
+ /** @relates Gtk::Layout
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::Layout* wrap(GtkLayout* object, bool take_copy = false);
+}
+#endif /* _GTKMM_LAYOUT_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/liststore.cc b/libs/gtkmm2/gtk/gtkmm/liststore.cc
new file mode 100644
index 0000000000..dadeb5f4f5
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/liststore.cc
@@ -0,0 +1,264 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/liststore.h>
+#include <gtkmm/private/liststore_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkliststore.h>
+
+
+namespace Gtk
+{
+
+ListStore::ListStore(const TreeModelColumnRecord& columns)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Glib::Object(Glib::ConstructParams(liststore_class_.init(), (char*) 0))
+{
+ gtk_list_store_set_column_types(gobj(), columns.size(), const_cast<GType*>(columns.types()));
+}
+
+void ListStore::set_column_types(const TreeModelColumnRecord& columns)
+{
+ gtk_list_store_set_column_types(gobj(), columns.size(), const_cast<GType*>(columns.types()));
+}
+
+
+TreeModel::iterator ListStore::erase(const iterator& iter)
+{
+ g_assert(iter.get_gobject_if_not_end() != 0);
+
+ iterator next(iter);
+ ++next;
+
+ GtkTreeIter tmp = *iter.gobj();
+ gtk_list_store_remove(gobj(), &tmp);
+
+ return next;
+}
+
+TreeModel::iterator ListStore::insert(const iterator& iter)
+{
+ iterator new_pos(this);
+
+ // get_gobject_if_not_end() returns 0 if iter is an end iterator, which
+ // is in turn interpreted by gtk_list_store_insert_before() as a request to
+ // insert at the end of the list.
+
+ gtk_list_store_insert_before(
+ gobj(), new_pos.gobj(),
+ const_cast<GtkTreeIter*>(iter.get_gobject_if_not_end()));
+
+ // GtkTreeIter::stamp should always have a value if it's valid.
+ // For end iterators, we need to remember the iter's parent, and
+ // this is what setup_end_iterator() does.
+
+ if(new_pos.gobj()->stamp == 0)
+ new_pos.setup_end_iterator(iter);
+
+ return new_pos;
+}
+
+TreeModel::iterator ListStore::insert_after(const iterator& iter)
+{
+ iterator new_pos(this);
+
+ // get_gobject_if_not_end() returns 0 if iter is an end iterator, which
+ // is in turn interpreted by gtk_list_store_insert_after() as a request to
+ // insert at the beginning of the list.
+
+ gtk_list_store_insert_after(
+ gobj(), new_pos.gobj(),
+ const_cast<GtkTreeIter*>(iter.get_gobject_if_not_end()));
+
+ // GtkTreeIter::stamp should always have a value if it's valid.
+ // For end iterators, we need to remember the iter's parent, and
+ // this is what setup_end_iterator() does.
+
+ if(new_pos.gobj()->stamp == 0)
+ new_pos.setup_end_iterator(iter);
+
+ return new_pos;
+}
+
+TreeModel::iterator ListStore::prepend()
+{
+ iterator new_pos(this);
+ gtk_list_store_prepend(gobj(), new_pos.gobj());
+ return new_pos;
+}
+
+TreeModel::iterator ListStore::append()
+{
+ iterator new_pos(this);
+ gtk_list_store_append(gobj(), new_pos.gobj());
+ return new_pos;
+}
+
+void ListStore::move(const iterator& source, const iterator& destination)
+{
+ gtk_list_store_move_before(gobj(),
+ const_cast<GtkTreeIter*>(source.get_gobject_if_not_end()),
+ const_cast<GtkTreeIter*>(destination.get_gobject_if_not_end()));
+}
+
+void ListStore::reorder(const Glib::ArrayHandle<int>& new_order)
+{
+ gtk_list_store_reorder(gobj(), const_cast<int*>(new_order.data()));
+}
+
+void ListStore::set_value_impl(const iterator& row, int column, const Glib::ValueBase& value)
+{
+ gtk_list_store_set_value(
+ gobj(), const_cast<GtkTreeIter*>(row.gobj()),
+ column, const_cast<GValue*>(value.gobj()));
+}
+
+} // namespace Gtk
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Gtk::ListStore> wrap(GtkListStore* object, bool take_copy)
+{
+ return Glib::RefPtr<Gtk::ListStore>( dynamic_cast<Gtk::ListStore*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} /* namespace Glib */
+
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& ListStore_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &ListStore_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_list_store_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ TreeModel::add_interface(get_type());
+ TreeSortable::add_interface(get_type());
+ TreeDragSource::add_interface(get_type());
+ TreeDragDest::add_interface(get_type());
+ }
+
+ return *this;
+}
+
+void ListStore_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* ListStore_Class::wrap_new(GObject* object)
+{
+ return new ListStore((GtkListStore*)object);
+}
+
+
+/* The implementation: */
+
+GtkListStore* ListStore::gobj_copy()
+{
+ reference();
+ return gobj();
+}
+
+ListStore::ListStore(const Glib::ConstructParams& construct_params)
+:
+ Glib::Object(construct_params)
+{}
+
+ListStore::ListStore(GtkListStore* castitem)
+:
+ Glib::Object((GObject*)(castitem))
+{}
+
+ListStore::~ListStore()
+{}
+
+
+ListStore::CppClassType ListStore::liststore_class_; // initialize static member
+
+GType ListStore::get_type()
+{
+ return liststore_class_.init().get_type();
+}
+
+GType ListStore::get_base_type()
+{
+ return gtk_list_store_get_type();
+}
+
+
+ListStore::ListStore()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Glib::Object(Glib::ConstructParams(liststore_class_.init()))
+{
+ }
+
+Glib::RefPtr<ListStore> ListStore::create(const TreeModelColumnRecord& columns)
+{
+ return Glib::RefPtr<ListStore>( new ListStore(columns) );
+}
+void ListStore::iter_swap(const iterator& a, const iterator& b)
+{
+ gtk_list_store_swap(gobj(), const_cast<GtkTreeIter*>((a).gobj()), const_cast<GtkTreeIter*>((b).gobj()));
+}
+
+void ListStore::clear()
+{
+ gtk_list_store_clear(gobj());
+}
+
+bool ListStore::iter_is_valid(const iterator& iter) const
+{
+ return gtk_list_store_iter_is_valid(const_cast<GtkListStore*>(gobj()), const_cast<GtkTreeIter*>((iter).gobj()));
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/liststore.h b/libs/gtkmm2/gtk/gtkmm/liststore.h
new file mode 100644
index 0000000000..9d2fe355e2
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/liststore.h
@@ -0,0 +1,246 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_LISTSTORE_H
+#define _GTKMM_LISTSTORE_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright(C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or(at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/treeiter.h>
+#include <gtkmm/treemodel.h>
+#include <gtkmm/treesortable.h>
+#include <gtkmm/treedragdest.h>
+#include <gtkmm/treedragsource.h>
+// We couldn't include it in treemodel.h, but doing it here makes it easier for people.
+#include <gtkmm/treepath.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkListStore GtkListStore;
+typedef struct _GtkListStoreClass GtkListStoreClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class ListStore_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** Thist is a list model for use with a Gtk::TreeView widget.
+ * @ingroup TreeView
+ * It implements the Gtk::TreeModel interface, and also implements the
+ * Gtk::TreeSortable interface so you can sort the list using the view.
+ * Finally, it also implements the tree drag and drop interfaces.
+ */
+
+class ListStore :
+ public Glib::Object,
+ public TreeModel,
+ public TreeSortable,
+ public TreeDragSource,
+ public TreeDragDest
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef ListStore CppObjectType;
+ typedef ListStore_Class CppClassType;
+ typedef GtkListStore BaseObjectType;
+ typedef GtkListStoreClass BaseClassType;
+
+private: friend class ListStore_Class;
+ static CppClassType liststore_class_;
+
+private:
+ // noncopyable
+ ListStore(const ListStore&);
+ ListStore& operator=(const ListStore&);
+
+protected:
+ explicit ListStore(const Glib::ConstructParams& construct_params);
+ explicit ListStore(GtkListStore* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~ListStore();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ GtkListStore* gobj() { return reinterpret_cast<GtkListStore*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const GtkListStore* gobj() const { return reinterpret_cast<GtkListStore*>(gobject_); }
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ GtkListStore* gobj_copy();
+
+private:
+
+
+protected:
+ /** When using this constructor, you must use set_column_types() immediately afterwards.
+ * This can be useful when deriving from this class, with a fixed TreeModelColumnRecord
+ * that is a member of the class.
+ * There is no create() method that corresponds to this constructor, because this
+ * constructor should only be used by derived classes.
+ */
+ ListStore();
+
+ explicit ListStore(const TreeModelColumnRecord& columns);
+
+public:
+
+ /** Instantiate a new ListStore.
+ * @param columns The column types for this tree model.
+ * @result The new ListStore.
+ */
+
+ static Glib::RefPtr<ListStore> create(const TreeModelColumnRecord& columns);
+
+
+ void set_column_types(const TreeModelColumnRecord& columns);
+
+
+ /** Removes the given row from the list store.
+ * @param iter The iterator to the row to be removed.
+ * @result An iterator to the next row, or end() if there is none.
+ */
+ iterator erase(const iterator& iter);
+
+
+ //TODO: Make this documentation similar to documentation for Standard C++ insert methods.
+ /** Creates a new row before the position.
+ * If iter is end() then a new row will be appended to the list.
+ * The row will be empty - to fill in values, you need to dereference the returned iterator and use Row::operator[] or Row::set_value().
+ * See also prepend() and append().
+ *
+ * @param iter An iterator to the row before which the new row will be inserted.
+ * @result An iterator to the new row.
+ */
+ iterator insert(const iterator& iter);
+
+
+ //TODO: Docs. This one is apparently faster.
+ /** Creates a new row after the position.
+ * If iter is end() then a new row will be prepended to the list.
+ * The row will be empty - to fill in values, you need to dereference the returned iterator and use Row::operator[] or Row::set_value().
+ * See also insert(), prepend() and append().
+ *
+ * @param iter An iterator to the row after which the new row will be inserted.
+ * @result An iterator to the new row.
+ */
+ iterator insert_after(const iterator& iter);
+
+
+ /** Creates a new row at the start.
+ * The row will be empty - to fill in values, you need to dereference the returned iterator and use Row::operator[] or Row::set_value().
+ * See also insert() and append().
+ *
+ * @result An iterator to the new row.
+ */
+ iterator prepend();
+
+ /** Creates a new row at the end.
+ * The row will be empty - to fill in values, you need to dereference the returned iterator and use Row::operator[] or Row::set_value().
+ * See also insert() and prepend().
+ *
+ * @result An iterator to the new row.
+ */
+ iterator append();
+
+
+ /** Swaps @a a and @a b in @a store . Note that this function only works with
+ * unsorted stores.
+ *
+ * Since: 2.2
+ * @param a A Gtk::TreeIter.
+ * @param b Another Gtk::TreeIter.
+ */
+ void iter_swap(const iterator& a, const iterator& b);
+
+ /** Moves @a source to the position at @a destination.
+ * Note that this function only works with unsorted stores.
+ * @param source The row that should be moved.
+ * @param destination The position to move to.
+ */
+ void move(const iterator& source, const iterator& destination);
+
+ /** Reorders the list store to follow the order indicated by @a new_order.
+ * Note that this function only works with unsorted stores.
+ */
+ void reorder(const Glib::ArrayHandle<int>& new_order);
+
+
+ /** Removes all rows from the list store.
+ */
+ void clear();
+
+
+ /** &lt;warning&gt;This function is slow. Only use it for debugging and/or testing
+ * purposes.&lt;/warning&gt;
+ *
+ * Checks if the given iter is a valid iter for this Gtk::ListStore.
+ * @param iter A Gtk::TreeIter.
+ * @return <tt>true</tt> if the iter is valid, <tt>false</tt> if the iter is invalid.
+ *
+ * Since: 2.2.
+ */
+ bool iter_is_valid(const iterator& iter) const;
+
+protected:
+ virtual void set_value_impl(const iterator& row, int column, const Glib::ValueBase& value);
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::ListStore
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Gtk::ListStore> wrap(GtkListStore* object, bool take_copy = false);
+}
+
+
+#endif /* _GTKMM_LISTSTORE_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/main.cc b/libs/gtkmm2/gtk/gtkmm/main.cc
new file mode 100644
index 0000000000..9ff2be9aa7
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/main.cc
@@ -0,0 +1,538 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/main.h>
+#include <gtkmm/private/main_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glib.h>
+#include <gtkmmconfig.h>
+#include <gtkmm/main.h>
+#include <gtkmm/window.h>
+#include <glibmm/init.h>
+#include <pangomm/wrap_init.h>
+#include <atkmm/wrap_init.h>
+#include <gdkmm/wrap_init.h>
+#include <gtkmm/wrap_init.h>
+
+namespace
+{
+
+/* This class tells sigc++ how to break GTK+ main signal connections. Since
+ * the gtk_*_remove() functions have the same signature, all main signals can
+ * be handled by a single class. Special handling is needed for signals that
+ * don't support destroy notification; see the comment on connection_list_.
+ */
+class GtkMainConnectionNode
+{
+public:
+ // A function taking a connection id, e.g. gtk_timeout_remove().
+ typedef void (*RemoveFunc) (guint);
+
+ explicit GtkMainConnectionNode(const sigc::slot_base& slot);
+
+ static void* notify(void* data);
+ static void destroy_notify_handler(void* data);
+
+ // Call this after installing the GTK+ callback.
+ void install(guint conn_id, RemoveFunc remove_func, bool has_destroy_notify);
+
+ inline sigc::slot_base* get_slot();
+
+ static bool list_remove(GtkMainConnectionNode* conn_node);
+ static void list_notify_all();
+
+private:
+ sigc::slot_base slot_;
+ static GSList* connection_list_;
+
+ guint conn_id_;
+ RemoveFunc remove_func_;
+ bool has_destroy_notify_;
+ bool destroyed_;
+};
+
+
+/* The global connection_list_ is needed to deal with GTK+ main signals
+ * that don't support destroy notification. This applies only to
+ * gtk_key_snooper_install() and gtk_init_add().
+ *
+ * The list is static and not a member of Gtk::Main, in order to support
+ * connection to Gtk::Main::signal_run() before Gtk::Main is instantiated.
+ * Thus, it's possible to install initialization hooks in global constructors,
+ * for instance.
+ */
+// static
+GSList* GtkMainConnectionNode::connection_list_ = 0;
+
+GtkMainConnectionNode::GtkMainConnectionNode(const sigc::slot_base& slot)
+:
+ slot_(slot),
+ conn_id_ (0),
+ remove_func_ (0),
+ has_destroy_notify_ (false),
+ destroyed_ (false)
+{
+ slot_.set_parent(this, &GtkMainConnectionNode::notify);
+}
+
+//static:
+void* GtkMainConnectionNode::notify(void* data)
+{
+ // notification from the sigc++ side ...
+
+ GtkMainConnectionNode *const self = static_cast<GtkMainConnectionNode*>(data);
+
+ // this call might be triggered from destroy_notify_handler().
+ if(!self->destroyed_)
+ {
+ // during (*remove_func_)() destroy_notify_handler() might get called.
+ // This must not lead to the destruction of the object!
+ self->destroyed_ = true;
+
+ // disconnect from the gtk+ side.
+ (*(self->remove_func_))(self->conn_id_);
+
+ // remove self from global list.
+ if (!self->has_destroy_notify_)
+ list_remove(self);
+
+ // destruction of slot_ notifies all objects referring to it.
+ delete self;
+ }
+
+ return 0;
+}
+
+// static
+void GtkMainConnectionNode::destroy_notify_handler(void* data)
+{
+ // notification from the gtk+ side ...
+
+ GtkMainConnectionNode *const self = static_cast<GtkMainConnectionNode*>(data);
+
+ // this call might be triggered from notify().
+ if(!self->destroyed_)
+ {
+ self->destroyed_ = true;
+
+ // The GTK+ side is disconnected now, thus the ID is no longer valid.
+ self->conn_id_ = 0;
+
+ // remove self from global list.
+ if (!self->has_destroy_notify_)
+ list_remove(self);
+
+ // destruction of slot_ notifies all objects referring to it.
+ delete self;
+ }
+}
+
+void GtkMainConnectionNode::install(
+ guint conn_id, GtkMainConnectionNode::RemoveFunc remove_func, bool has_destroy_notify)
+{
+ conn_id_ = conn_id;
+ remove_func_ = remove_func;
+ has_destroy_notify_ = has_destroy_notify;
+
+ if (!has_destroy_notify_)
+ connection_list_ = g_slist_prepend(connection_list_, this);
+}
+
+inline
+sigc::slot_base* GtkMainConnectionNode::get_slot()
+{
+ return &slot_;
+}
+
+// static
+bool GtkMainConnectionNode::list_remove(GtkMainConnectionNode* conn_node)
+{
+ // The conn_node pointer is only valid if we still hold
+ // a reference of the ConnectionNode in our global list.
+ //
+ if(GSList *const link = g_slist_find(connection_list_, conn_node))
+ {
+ connection_list_ = g_slist_delete_link(connection_list_, link);
+ return true;
+ }
+
+ return false;
+}
+
+/* Cleanup function to be called by the Gtk::Main destructor. The elements
+ * are removed prior to notification, in order to avoid invalid elements in
+ * the container.
+ */
+// static
+void GtkMainConnectionNode::list_notify_all()
+{
+ while(connection_list_ != 0)
+ {
+ GtkMainConnectionNode *const conn_node =
+ static_cast<GtkMainConnectionNode*>(connection_list_->data);
+
+ connection_list_ = g_slist_delete_link(connection_list_, connection_list_);
+
+ // no need to search the list in notify().
+ conn_node->has_destroy_notify_ = true;
+
+ // conn_node gets destroyed from notify().
+ notify(conn_node);
+ }
+}
+
+} // anonymous namespace
+
+
+namespace Gtk
+{
+
+/**** Gtk::RunSig **********************************************************/
+
+sigc::connection RunSig::connect(const RunSig::SlotType& slot)
+{
+ GtkMainConnectionNode *const conn_node = new GtkMainConnectionNode(slot);
+ const sigc::connection connection(*conn_node->get_slot());
+
+ // The callback will be invoked the next time gtk_main() is called.
+ gtk_init_add(&RunSig::gtk_callback, conn_node);
+
+ conn_node->install(0, 0, false); // there's no gtk_init_remove()
+ return connection;
+}
+
+// static
+gboolean RunSig::gtk_callback(gpointer data)
+{
+ GtkMainConnectionNode *const conn_node =
+ static_cast<GtkMainConnectionNode*>(data);
+
+ if(GtkMainConnectionNode::list_remove(conn_node))
+ {
+ try
+ {
+ // Recreate the specific SlotType from the generic slot_base.
+ SlotType* pSlot = static_cast<SlotType*>(conn_node->get_slot());
+ (*pSlot)();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+
+ // We don't need it anymore, since RunSig is a one-shot signal.
+ GtkMainConnectionNode::destroy_notify_handler(conn_node);
+ }
+
+ return 0;
+}
+
+
+/**** Gtk::QuitSig *********************************************************/
+
+sigc::connection QuitSig::connect(const QuitSig::SlotType& slot, guint main_level)
+{
+ GtkMainConnectionNode *const conn_node = new GtkMainConnectionNode(slot);
+ const sigc::connection connection(*conn_node->get_slot());
+
+ const guint conn_id = gtk_quit_add_full(
+ main_level, &QuitSig::gtk_callback, 0 /* marshaller */,
+ conn_node, &GtkMainConnectionNode::destroy_notify_handler);
+
+ conn_node->install(conn_id, &gtk_quit_remove, true);
+ return connection;
+}
+
+// static
+gboolean QuitSig::gtk_callback(gpointer data)
+{
+ try
+ {
+ // Call the slot:
+ GtkMainConnectionNode* node = static_cast<GtkMainConnectionNode*>(data);
+ SlotType* pSlot = static_cast<SlotType*>(node->get_slot());
+ (*pSlot)();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ return 0;
+}
+
+
+/**** Gtk::KeySnooperSig ***************************************************/
+
+sigc::connection KeySnooperSig::connect(const KeySnooperSig::SlotType& slot)
+{
+ GtkMainConnectionNode *const conn_node = new GtkMainConnectionNode(slot);
+ const sigc::connection connection(*conn_node->get_slot());
+
+ const guint conn_id = gtk_key_snooper_install(&KeySnooperSig::gtk_callback, conn_node);
+
+ conn_node->install(conn_id, &gtk_key_snooper_remove, false);
+ return connection;
+}
+
+// static
+gint KeySnooperSig::gtk_callback(GtkWidget* widget, GdkEventKey* event, gpointer data)
+{
+ try
+ {
+ // Recreate the specific SlotType from the generic slot node.
+ GtkMainConnectionNode* conn_node = static_cast<GtkMainConnectionNode*>(data);
+ SlotType* pSlot = static_cast<SlotType*>(conn_node->get_slot());
+ return (*pSlot)(Glib::wrap(widget), event);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ return 0;
+}
+
+
+/**** Gtk::Main -- static data *********************************************/
+
+RunSig Main::signal_run_;
+QuitSig Main::signal_quit_;
+KeySnooperSig Main::signal_key_snooper_;
+Main* Main::instance_ = 0;
+
+
+/**** Gtk::Main -- construction/destruction ********************************/
+
+Main::Main(int& argc, char**& argv, bool set_locale)
+{
+ init(&argc, &argv, set_locale);
+}
+
+Main::Main(int* argc, char*** argv, bool set_locale)
+{
+ init(argc, argv, set_locale);
+}
+
+/*Main::Main(int* argc, char*** argv, const std::string& parameter_string, const Glib::ArrayHandle<const Glib::OptionEntry&>& entries, const std::string& translation_domain)
+{
+ init(argc, argv, parameter_string, entries, translation_domain);
+}*/
+
+// Default ctor only used by subclasses:
+Main::Main()
+{
+ if(instance_ == 0)
+ {
+ init_gtkmm_internals();
+ instance_ = this;
+ }
+ else
+ {
+ g_warning("Gtk::Main instantiated twice");
+ }
+}
+
+Main::~Main()
+{
+ // A second Gtk::Main will produce a warning, but
+ // Main::~Main would still run. So this prevents the crash.
+ if(instance_ == this)
+ {
+ instance_ = 0;
+ GtkMainConnectionNode::list_notify_all();
+
+ Glib::init();
+ }
+}
+
+// protected
+void Main::init(int* argc, char*** argv, bool set_locale)
+{
+ if(instance_)
+ {
+ g_warning("Gtk::Main::init() called twice");
+ }
+ else
+ {
+ if(!set_locale)
+ gtk_disable_setlocale();
+
+ //TODO: Add support for gtk_init_check().
+ gtk_init(argc, argv);
+
+ init_gtkmm_internals();
+ instance_ = this;
+ }
+}
+
+Main::Main(int& argc, char**& argv, Glib::OptionContext& option_context)
+{
+ if(instance_)
+ {
+ g_warning("Gtk::Main::init() called twice");
+ }
+ else
+ {
+ init_gtkmm_internals();
+ instance_ = this;
+
+ //This reimplements some stuff from gtk_init_with_options(),
+ //without calling check_setugid(), because that is not public API.
+
+ add_gtk_option_group(option_context);
+ option_context.parse(argc, argv);
+ }
+}
+
+// This is a static method so that it can be used before Main is instantiated,
+// for instance in Gnome::canvas_init(). But if you use this method, you
+// _must_ have a Gtk::Main, so that Main::~Main() is called to clean this up
+// later. Of course I can't imagine any situation in which you wouldn't have
+// a Gtk::Main.
+//
+void Main::init_gtkmm_internals()
+{
+ static bool init_done = false;
+
+ if(!init_done)
+ {
+ Glib::init();
+
+ // Populate the map of GTypes to C++ wrap_new() functions.
+ Pango::wrap_init();
+ Atk::wrap_init();
+ Gdk::wrap_init();
+ Gtk::wrap_init();
+
+ init_done = true;
+ }
+}
+
+void Main::add_gtk_option_group(Glib::OptionContext& option_context, bool open_default_display)
+{
+ //Get the option group:
+ Glib::OptionGroup gtkgroup( gtk_get_option_group(open_default_display) ); //Takes ownership of the GOptionGroup.
+
+ //Give it to the option_context, which will also then own the underlying GOptionGroup, deleting it when necessary:
+ option_context.add_group(gtkgroup);
+}
+
+
+/**** Gtk::Main -- static forwarder methods ********************************/
+
+Main* Main::instance()
+{
+ return instance_;
+}
+
+void Main::run()
+{
+ instance_->run_impl();
+}
+
+void Main::run(Gtk::Window& window)
+{
+ window.show();
+ window.signal_hide().connect(sigc::mem_fun(*instance_, &Main::on_window_hide));
+ instance_->run_impl();
+}
+
+void Main::quit()
+{
+ instance_->quit_impl();
+}
+
+guint Main::level()
+{
+ return instance_->level_impl();
+}
+
+bool Main::iteration(bool blocking)
+{
+ return instance_->iteration_impl(blocking);
+}
+
+bool Main::events_pending()
+{
+ return instance_->events_pending_impl();
+}
+
+
+/**** Gtk::Main -- static signal accessors *********************************/
+
+RunSig& Main::signal_run()
+{
+ return signal_run_;
+}
+
+QuitSig& Main::signal_quit()
+{
+ return signal_quit_;
+}
+
+KeySnooperSig& Main::signal_key_snooper()
+{
+ return signal_key_snooper_;
+}
+
+
+/**** Gtk::Main -- protected virtuals **************************************/
+
+void Main::run_impl()
+{
+ gtk_main();
+}
+
+void Main::quit_impl()
+{
+ gtk_main_quit();
+}
+
+guint Main::level_impl()
+{
+ return gtk_main_level();
+}
+
+bool Main::iteration_impl(bool blocking)
+{
+ return gtk_main_iteration_do(blocking);
+}
+
+bool Main::events_pending_impl()
+{
+ return gtk_events_pending();
+}
+
+void Main::on_window_hide()
+{
+ quit_impl();
+}
+
+} /* namespace Gtk */
+
+
+namespace
+{
+} // anonymous namespace
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/main.h b/libs/gtkmm2/gtk/gtkmm/main.h
new file mode 100644
index 0000000000..027cbeff07
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/main.h
@@ -0,0 +1,284 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_MAIN_H
+#define _GTKMM_MAIN_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* main.h
+ *
+ * Copyright (C) 1998-2003 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#include <gtk/gtkmain.h>
+
+#include <sigc++/sigc++.h>
+#include <gdkmm/types.h>
+
+
+namespace Gtk
+{
+
+class Widget;
+class Window;
+
+//**********************************************************************
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+//Actually, I'd like to just keep these out of the alphabetical list. murrayc.
+
+/// Run Signal Class (internal)
+class RunSig
+{
+public:
+ typedef sigc::slot<void> SlotType;
+
+ sigc::connection connect(const SlotType& slot);
+
+protected:
+ static gboolean gtk_callback(gpointer data);
+};
+
+
+/// Quit Signal Class (internal)
+class QuitSig
+{
+public:
+ typedef sigc::slot<bool> SlotType;
+
+ sigc::connection connect(const SlotType& slot, guint main_level = 0);
+
+protected:
+ static gboolean gtk_callback(gpointer data); //gtk+ calls this, which then calls our slot.
+};
+
+
+/// KeySnooper Signal Class (internal)
+class KeySnooperSig
+{
+public:
+ typedef sigc::slot<int, Widget*, GdkEventKey*> SlotType;
+
+ sigc::connection connect(const SlotType& slot);
+
+protected:
+ static int gtk_callback(GtkWidget* widget, GdkEventKey* event, gpointer data);
+};
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+//**********************************************************************
+
+/** Main application class
+ * Every application must have one of these objects.
+ * It may not be global and must be the first Gtk object created.
+ * It is a singleton so declaring more than one will simply access the first
+ * created.
+ *
+ * Normal use of this class is in the main() function to give argc and argv
+ * to the gtk initialization. Widgets can use Gtk::Main::quit()
+ * to exit from the application.
+ *
+ * The internals of the widget have been disguised as signals
+ * so that the user can easily connect using the same methods
+ * used throughout the widget interface.
+ *
+ * Minimal gtkmm application is something like this:
+ * @code
+ * int main(int argc, char *argv[]) {
+ * Gtk::Main kit(argc, argv);
+ * ... create some widgets ...
+ * kit.run();
+ * }
+ * @endcode
+ */
+class Main : public sigc::trackable
+{
+public:
+
+ //This offers the same functionality as gtk_init_with_args():
+ /** Scans the argument vector, and strips off all parameters parsed by GTK+ or your @a option_context.
+ * Add a Glib::OptionGroup to the Glib::OptionContext to parse your own command-line arguments.
+ *
+ * Note: The argument strings themselves won't be modified, although the
+ * pointers to them might change. This makes it possible to create your
+ * own argv of string literals, which have the type 'const char[]' in
+ * standard C++. (You might need to use const_cast<>, though.)
+ *
+ * This function automatically generates nicely formatted
+ * <option>--help</option> output. Note that your program will
+ * be terminated after writing out the help output.
+ *
+ * @param argc a reference to the number of command line arguments.
+ * @param argv a reference to the array of command line arguments.
+ * @parameter_string a string which is displayed in the first line of <option>--help</option> output,
+ * after <literal><replaceable>programname</replaceable> [OPTION...]</literal>
+ * @param option_context A Glib::OptionContext containing Glib::OptionGroups which described the command-line arguments taken by your program.
+ *
+ * @throw Glib::OptionError
+ */
+ Main(int& argc, char**& argv, Glib::OptionContext& option_context);
+
+ /** Scans the argument vector, and strips off all parameters known to GTK+.
+ * Your application may then handle the remaining arguments.
+ *
+ * Note: The argument strings themself won't be modified, although the
+ * pointers to them might change. This makes it possible to create your
+ * own argv of string literals, which have the type 'const char[]' in
+ * standard C++. (You might need to use const_cast<>, though.)
+ */
+ Main(int* argc, char*** argv, bool set_locale = true);
+
+ /// See Main(int* argc, char*** argv, bool set_locale).
+ Main(int& argc, char**& argv, bool set_locale = true);
+
+
+ virtual ~Main();
+
+ /// Access to the one global instance of Gtk::Main.
+ static Gtk::Main* instance();
+
+ /** Start the event loop.
+ * This begins the event loop which handles events. No
+ * events propagate until this has been called. It may be
+ * called recursively to popup dialogs
+ */
+ static void run();
+
+ /** Returns from the main loop when the window is closed.
+ * When using this override, you should not use Gtk::Main::quit() to close
+ * the application, but just call hide() on your Window class.
+ *
+ * @param window The window to show. This method will return when the window is hidden.
+ */
+ static void run(Window& window);
+
+ /** Makes the innermost invocation of the main loop return when it regains control.
+ */
+ static void quit();
+
+ static guint level();
+
+ //This attempts to provide the same functionality as gtk_get_option_group():
+ /** Add a Glib::OptionGroup, for the commandline arguments recognized
+ * by GTK+ and GDK, to a Glib::OptionContext, so that these commandline arguments will
+ * be processed in addition to the existing commandline arguments specified by the Glib::OptionContext.
+ *
+ * You do not need to use this method if you pass your Glib::OptionContext to the Main constructor, because
+ * it adds the gtk option group automatically.
+ *
+ * @param option_context Option Context to which the group will be added.
+ * @param open_default_display Whether to open the default display when parsing the commandline arguments.
+ */
+ static void add_gtk_option_group(Glib::OptionContext& option_context, bool open_default_display = true);
+
+ /** Runs a single iteration of the main loop.
+ * If no events are waiting to be processed GTK+ will block until the next event is noticed.
+ * If you don't want to block then pass false for @a blocking or check if any events are pending with
+ * pending() first.
+ *
+ * @param blocking Whether the caller must wait until the next event is noticed, or return immediately if there are no events.
+ * @result true if quit() has been called for the innermost main loop.
+ */
+ static bool iteration(bool blocking = true);
+
+ /** Checks if any events are pending. This can be used to update the GUI and invoke timeouts etc. while doing some time intensive computation.
+ *
+ * Example: Updating the GUI during a long computation.
+ * @code
+ * // computation going on
+ * while( Gtk::Main::events_pending() )
+ * Gtk::Main::iteration();
+ *
+ * // computation continued
+ * @endcode
+ *
+ * @result true if any events are pending, false otherwise.
+ */
+ static bool events_pending();
+
+ /** Run signal
+ * @return void
+ */
+ static RunSig& signal_run();
+
+ /** Quit signal
+ * You can connect signal handlers to invoke actions when Gtk::Main::quit()
+ * has been called. Note that main loops can be nested by calling
+ * Gtk::Main::run() recursively, therefore receiving this signal doesn't
+ * necessarily mean the application is about to be terminated. If you want
+ * to receive a signal only when the last main loop quits, call connect()
+ * with <tt>main_level&nbsp;=&nbsp;1</tt>.
+ * @code
+ * bool thisclass::mymethod() { return false; }
+ * Gtk::Main::signal_quit().connect(sigc::mem_fun(this, &thisclass::mymethod));
+ * @endcode
+ * @return bool - @c false means callback is removed, @c true means
+ * it'll be called again the next the main loop quits.
+ */
+ static QuitSig& signal_quit();
+
+ /** KeySnooper signal
+ * Allows you to channel keypresses to a signal handler
+ * without registering with the widget.
+ *
+ * @return KeySnooperSig A Signal to which you can connect a sigc::slot< int, Widget *, GdkEventKey * >
+ *
+ * It is the responsibility of the snooper to pass the keypress
+ * to the widget, however, care must be taken that the keypress is
+ * not passed twice.
+ */
+ static KeySnooperSig& signal_key_snooper();
+
+ // Initialize table of wrap_new functions.
+ // Doesn't need an instance of Gtk::Main.
+ static void init_gtkmm_internals();
+
+protected:
+ Main();
+
+ void init(int* argc, char*** argv, bool set_locale);
+ // TODO: implement this to use the new Glib::OptionEntry argument parsing classes.
+ //void init(int* argc, char*** argv, const std::string& parameter_string, const Glib::ArrayHandle<const Glib::OptionEntry&>& entries, const std::string& translation_domain);
+
+ virtual void run_impl();
+ virtual void quit_impl();
+ virtual guint level_impl();
+ virtual bool iteration_impl(bool blocking);
+ virtual bool events_pending_impl();
+
+ // Signal handlers:
+ virtual void on_window_hide();
+
+ // Signal proxies:
+ static RunSig signal_run_;
+ static QuitSig signal_quit_;
+ static KeySnooperSig signal_key_snooper_;
+
+private:
+ static Main* instance_;
+};
+
+} // namespace Gtk
+
+
+#endif /* _GTKMM_MAIN_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/menu.cc b/libs/gtkmm2/gtk/gtkmm/menu.cc
new file mode 100644
index 0000000000..9fdc254a21
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/menu.cc
@@ -0,0 +1,348 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/menu.h>
+#include <gtkmm/private/menu_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkdnd.h>
+#include <gtk/gtkmenu.h>
+#include <gtkmm/accelgroup.h>
+
+
+namespace
+{
+
+// This Signal Proxy allows the C++ coder to specify a sigc::slot instead of a static function.
+class SignalProxy_PopupPosition
+{
+public:
+ typedef Gtk::Menu::SlotPositionCalc SlotType;
+
+ SignalProxy_PopupPosition(const SlotType& slot);
+ ~SignalProxy_PopupPosition();
+
+ static void gtk_callback(GtkMenu* menu, int* x, int* y, gboolean* push_in, void* data);
+
+protected:
+ SlotType slot_;
+};
+
+SignalProxy_PopupPosition::SignalProxy_PopupPosition(const SlotType& slot)
+:
+ slot_ (slot)
+{}
+
+SignalProxy_PopupPosition::~SignalProxy_PopupPosition()
+{}
+
+void SignalProxy_PopupPosition::gtk_callback(GtkMenu*, int* x, int* y, gboolean* push_in, void* data)
+{
+ SignalProxy_PopupPosition *const self = static_cast<SignalProxy_PopupPosition*>(data);
+
+ int temp_x = (x) ? *x : 0;
+ int temp_y = (y) ? *y : 0;
+ bool temp_push_in = (push_in) ? bool(*push_in) : false;
+
+ try
+ {
+ (self->slot_)(temp_x, temp_y, temp_push_in);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+
+ if(x) *x = temp_x;
+ if(y) *y = temp_y;
+ if(push_in) *push_in = temp_push_in;
+}
+
+} // anonymous namespace
+
+
+namespace Gtk
+{
+
+void Menu::popup(const SlotPositionCalc& position_calc_slot, guint button, guint32 activate_time)
+{
+ SignalProxy_PopupPosition proxy(position_calc_slot);
+
+ // Tell GTK+ to call the static function with Proxy's address as the extra
+ // data, so that the static function can then call the sigc::slot:
+ gtk_menu_popup(gobj(), 0, 0, &SignalProxy_PopupPosition::gtk_callback, &proxy, button, activate_time);
+}
+
+void Menu::popup(MenuShell& parent_menu_shell, MenuItem& parent_menu_item, const SlotPositionCalc& position_calc_slot, guint button, guint32 activate_time)
+{
+ SignalProxy_PopupPosition proxy(position_calc_slot);
+
+ // Tell GTK+ to call the static function with Proxy's address as the extra
+ // data, so that the static function can then call the sigc::slot:
+ gtk_menu_popup(gobj(), parent_menu_shell.Gtk::Widget::gobj(), parent_menu_item.Gtk::Widget::gobj(), &SignalProxy_PopupPosition::gtk_callback, &proxy, button, activate_time);
+}
+
+void Menu::popup(guint button, guint32 activate_time)
+{
+ gtk_menu_popup(gobj(), 0, 0, 0, 0, button, activate_time);
+}
+
+void Menu::reorder_child(const MenuItem& child, int position)
+{
+ gtk_menu_reorder_child(
+ gobj(),
+ const_cast<GtkWidget*>(child.Gtk::Widget::gobj()),
+ position);
+}
+
+void Menu::unset_accel_group()
+{
+ gtk_menu_set_accel_group(gobj(), 0);
+}
+
+void Menu::unset_title()
+{
+ gtk_menu_set_title(gobj(), 0);
+}
+
+} // namespace Gtk
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::Menu* wrap(GtkMenu* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::Menu *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Menu_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Menu_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_menu_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Menu_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* Menu_Class::wrap_new(GObject* o)
+{
+ return manage(new Menu((GtkMenu*)(o)));
+
+}
+
+
+/* The implementation: */
+
+Menu::Menu(const Glib::ConstructParams& construct_params)
+:
+ Gtk::MenuShell(construct_params)
+{
+ }
+
+Menu::Menu(GtkMenu* castitem)
+:
+ Gtk::MenuShell((GtkMenuShell*)(castitem))
+{
+ }
+
+Menu::~Menu()
+{
+ destroy_();
+}
+
+Menu::CppClassType Menu::menu_class_; // initialize static member
+
+GType Menu::get_type()
+{
+ return menu_class_.init().get_type();
+}
+
+GType Menu::get_base_type()
+{
+ return gtk_menu_get_type();
+}
+
+
+Menu::Menu()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::MenuShell(Glib::ConstructParams(menu_class_.init()))
+{
+ }
+
+void Menu::reposition()
+{
+ gtk_menu_reposition(gobj());
+}
+
+void Menu::popdown()
+{
+ gtk_menu_popdown(gobj());
+}
+
+MenuItem* Menu::get_active()
+{
+ return Glib::wrap((GtkMenuItem*)(gtk_menu_get_active(gobj())));
+}
+
+const MenuItem* Menu::get_active() const
+{
+ return Glib::wrap((GtkMenuItem*)(gtk_menu_get_active(const_cast<GtkMenu*>(gobj()))));
+}
+
+void Menu::set_active(guint index)
+{
+ gtk_menu_set_active(gobj(), index);
+}
+
+void Menu::set_accel_group(const Glib::RefPtr<AccelGroup>& accel_group)
+{
+ gtk_menu_set_accel_group(gobj(), Glib::unwrap(accel_group));
+}
+
+Glib::RefPtr<AccelGroup> Menu::get_accel_group()
+{
+
+ Glib::RefPtr<AccelGroup> retvalue = Glib::wrap(gtk_menu_get_accel_group(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const AccelGroup> Menu::get_accel_group() const
+{
+
+ Glib::RefPtr<const AccelGroup> retvalue = Glib::wrap(gtk_menu_get_accel_group(const_cast<GtkMenu*>(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+void Menu::set_accel_path(const Glib::ustring& accel_path)
+{
+ gtk_menu_set_accel_path(gobj(), accel_path.c_str());
+}
+
+void Menu::detach()
+{
+ gtk_menu_detach(gobj());
+}
+
+Widget* Menu::get_attach_widget()
+{
+ return Glib::wrap(gtk_menu_get_attach_widget(gobj()));
+}
+
+const Widget* Menu::get_attach_widget() const
+{
+ return Glib::wrap(gtk_menu_get_attach_widget(const_cast<GtkMenu*>(gobj())));
+}
+
+void Menu::set_tearoff_state(bool torn_off)
+{
+ gtk_menu_set_tearoff_state(gobj(), static_cast<int>(torn_off));
+}
+
+bool Menu::get_tearoff_state() const
+{
+ return gtk_menu_get_tearoff_state(const_cast<GtkMenu*>(gobj()));
+}
+
+void Menu::set_title(const Glib::ustring& title)
+{
+ gtk_menu_set_title(gobj(), title.c_str());
+}
+
+Glib::ustring Menu::get_title() const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(gtk_menu_get_title(const_cast<GtkMenu*>(gobj())));
+}
+
+void Menu::set_screen(const Glib::RefPtr<Gdk::Screen>& screen)
+{
+ gtk_menu_set_screen(gobj(), Glib::unwrap(screen));
+}
+
+void Menu::attach(Gtk::Widget& child, guint left_attach, guint right_attach, guint top_attach, guint bottom_attach)
+{
+ gtk_menu_attach(gobj(), (child).gobj(), left_attach, right_attach, top_attach, bottom_attach);
+}
+
+void Menu::set_monitor(int monitor_num)
+{
+ gtk_menu_set_monitor(gobj(), monitor_num);
+}
+
+void Menu::attach_to_widget(Widget& widget, GtkMenuDetachFunc detacher)
+{
+ gtk_menu_attach_to_widget(gobj(), (widget).gobj(), detacher);
+}
+
+
+Glib::PropertyProxy<Glib::ustring> Menu::property_tearoff_title()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "tearoff-title");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> Menu::property_tearoff_title() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "tearoff-title");
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/menu.h b/libs/gtkmm2/gtk/gtkmm/menu.h
new file mode 100644
index 0000000000..26e78721be
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/menu.h
@@ -0,0 +1,304 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_MENU_H
+#define _GTKMM_MENU_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+//#include <gtk/gtkmenu.h>
+#include <gtkmm/menushell.h>
+#include <gtkmm/menuitem.h>
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkMenu GtkMenu;
+typedef struct _GtkMenuClass GtkMenuClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class Menu_Class; } // namespace Gtk
+namespace Gtk
+{
+
+class AccelGroup;
+
+/** @defgroup Menus Menu classes
+ */
+
+/** A drop-down menu consisting of Gtk::MenuItem objects which can be navigated and activated by the user to perform application functions.
+ * Menus are normally placed inside a Gtk::MenuBar or another MenuItem as a sub menu.
+ * A Menu can also be popped up, for instance as a right-click context menu, by calling the popup() method.
+ * See also Gtk::OptionMenu.
+ * @ingroup Widgets
+ * @ingroup Menus
+ */
+
+class Menu : public MenuShell
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Menu CppObjectType;
+ typedef Menu_Class CppClassType;
+ typedef GtkMenu BaseObjectType;
+ typedef GtkMenuClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~Menu();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class Menu_Class;
+ static CppClassType menu_class_;
+
+ // noncopyable
+ Menu(const Menu&);
+ Menu& operator=(const Menu&);
+
+protected:
+ explicit Menu(const Glib::ConstructParams& construct_params);
+ explicit Menu(GtkMenu* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkMenu* gobj() { return reinterpret_cast<GtkMenu*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkMenu* gobj() const { return reinterpret_cast<GtkMenu*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+
+ //deprecated.
+public:
+ Menu();
+
+/* append, prepend, and insert are defined in MenuShell */
+
+ /** For instance,
+ * void on_popup_menu_position(int& x, int& y, bool& push_in);
+ */
+ typedef sigc::slot<void, int&, int&, bool&> SlotPositionCalc;
+
+ void popup(MenuShell& parent_menu_shell, MenuItem& parent_menu_item, const SlotPositionCalc& slot, guint button, guint32 activate_time);
+
+
+ /** Displays a menu and makes it available for selection. Applications can use
+ * this function to display context-sensitive menus.
+ *
+ * The @a button parameter should be the mouse button pressed to initiate
+ * the menu popup. If the menu popup was initiated by something other than
+ * a mouse button press, such as a mouse button release or a keypress,
+ * @a button should be 0.
+ *
+ * The @a activate_time parameter should be the time stamp of the event that
+ * initiated the popup. If such an event is not available, use
+ * gtk_get_current_event_time() instead.
+ * @param func A position_calc_slot supplied function used to position the menu, or <tt>0</tt>.
+ * @param button The mouse button which was pressed to initiate the event.
+ * @param activate_time The time at which the activation event occurred.
+ */
+ void popup(const SlotPositionCalc& position_calc_slot, guint button, guint32 activate_time);
+
+ /** Displays a menu and makes it available for selection.
+ * Applications can use this function to display context-sensitive menus, at the current pointer position.
+ * @param button The button which was pressed to initiate the event.
+ * @param activate_time The time at which the activation event occurred.
+ */
+ void popup(guint button, guint32 activate_time);
+
+
+ void reposition();
+
+
+ void popdown();
+
+
+ MenuItem* get_active();
+
+ const MenuItem* get_active() const;
+
+ void set_active(guint index);
+
+
+ void set_accel_group(const Glib::RefPtr<AccelGroup>& accel_group);
+ void unset_accel_group();
+
+ Glib::RefPtr<AccelGroup> get_accel_group();
+
+ Glib::RefPtr<const AccelGroup> get_accel_group() const;
+
+
+ /** Sets an accelerator path for this menu from which accelerator paths
+ * for its immediate children, its menu items, can be constructed.
+ * The main purpose of this function is to spare the programmer the
+ * inconvenience of having to call Gtk::MenuItem::set_accel_path() on
+ * each menu item that should support runtime user changable accelerators.
+ * Instead, by just calling set_accel_path() on their parent,
+ * each menu item of this menu, that contains a label describing its purpose,
+ * automatically gets an accel path assigned. For example, a menu containing
+ * menu items "New" and "Exit", will, after
+ * <tt>gtk_menu_set_accel_path (menu, "&lt;Gnumeric-Sheet&gt;/File");</tt>
+ * has been called, assign its items the accel paths:
+ * <tt>"&lt;Gnumeric-Sheet&gt;/File/New"</tt> and <tt>"&lt;Gnumeric-Sheet&gt;/File/Exit"</tt>.
+ * Assigning accel paths to menu items then enables the user to change
+ * their accelerators at runtime. More details about accelerator paths
+ * and their default setups can be found at gtk_accel_map_add_entry().
+ * @param accel_path A valid accelerator path.
+ */
+ void set_accel_path(const Glib::ustring& accel_path);
+
+
+ void detach();
+
+ Widget* get_attach_widget();
+
+ const Widget* get_attach_widget() const;
+
+
+ void set_tearoff_state(bool torn_off = true);
+
+ /** Returns whether the menu is torn off. See
+ * set_tearoff_state().
+ * @return <tt>true</tt> if the menu is currently torn off.
+ */
+ bool get_tearoff_state() const;
+
+
+ /** Sets the title string for the menu. The title is displayed when the menu
+ * is shown as a tearoff menu.
+ * @param title A string containing the title for the menu.
+ */
+ void set_title(const Glib::ustring& title);
+ void unset_title();
+
+ /** Returns the title of the menu. See set_title().
+ * @return The title of the menu, or <tt>0</tt> if the menu has no
+ * title set on it. This string is owned by the widget and should
+ * not be modified or freed.
+ */
+ Glib::ustring get_title() const;
+
+ /** Sets the Gdk::Screen on which the menu will be displayed.
+ *
+ * Since: 2.2
+ * @param screen A Gdk::Screen, or <tt>0</tt> if the screen should be
+ * determined by the widget the menu is attached to.
+ */
+ void set_screen(const Glib::RefPtr<Gdk::Screen>& screen);
+
+
+ /** Adds a new Gtk::MenuItem to a (table) menu. The number of 'cells' that
+ * an item will occupy is specified by @a left_attach , @a right_attach ,
+ * @a top_attach and @a bottom_attach . These each represent the leftmost,
+ * rightmost, uppermost and lower column and row numbers of the table.
+ * (Columns and rows are indexed from zero).
+ *
+ * Note that this function is not related to detach().
+ *
+ * Since: 2.4
+ * @param child A Gtk::MenuItem.
+ * @param left_attach The column number to attach the left side of the item to.
+ * @param right_attach The column number to attach the right side of the item to.
+ * @param top_attach The row number to attach the top of the item to.
+ * @param bottom_attach The row number to attach the bottom of the item to.
+ */
+ void attach(Gtk::Widget& child, guint left_attach, guint right_attach, guint top_attach, guint bottom_attach);
+
+
+ /** Informs GTK+ on which monitor a menu should be popped up.
+ * See gdk_screen_get_monitor_geometry().
+ *
+ * This function should be called from a Gtk::MenuPositionFunc if the
+ * menu should not appear on the same monitor as the pointer. This
+ * information can't be reliably inferred from the coordinates returned
+ * by a Gtk::MenuPositionFunc, since, for very long menus, these coordinates
+ * may extend beyond the monitor boundaries or even the screen boundaries.
+ *
+ * Since: 2.4
+ * @param monitor_num The number of the monitor on which the menu should
+ * be popped up.
+ */
+ void set_monitor(int monitor_num);
+
+ void reorder_child(const MenuItem& child, int position);
+
+
+ /** A title that may be displayed by the window manager when this menu is torn-off.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_tearoff_title() ;
+
+/** A title that may be displayed by the window manager when this menu is torn-off.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_tearoff_title() const;
+
+
+protected:
+
+ //We can not wrap this as a slot because there is no data parameter, and no destroy callback to destroy that data.
+ typedef void (*GtkMenuDetachFunc) (GtkWidget *attach_widget, GtkMenu *menu);
+
+ void attach_to_widget(Widget& widget, GtkMenuDetachFunc detacher);
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::Menu
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::Menu* wrap(GtkMenu* object, bool take_copy = false);
+}
+#endif /* _GTKMM_MENU_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/menu_elems.cc b/libs/gtkmm2/gtk/gtkmm/menu_elems.cc
new file mode 100644
index 0000000000..251113ffcf
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/menu_elems.cc
@@ -0,0 +1,286 @@
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkimagemenuitem.h>
+
+#include <gtkmm/menu_elems.h>
+#include <gtkmm/label.h>
+
+#ifndef GLIBMM_WIN32
+#include <strings.h>
+#endif // GLIBMM_WIN32
+
+namespace Gtk
+{
+
+namespace Menu_Helpers
+{
+
+Element::Element()
+{
+}
+
+Element::Element(MenuItem& child)
+{
+ //TODO: Can't we avoid using RefPtr<> with a widget. It's not what it's meant for, and apparently it doesn't work well. murrayc.
+ child_ = Glib::RefPtr<MenuItem>(&child);
+ child_->reference(); //It's normally used with a create(), which starts with a refcount of 1.
+}
+
+Element::~Element()
+{}
+
+void Element::set_child(MenuItem* pChild)
+{
+ child_ = Glib::RefPtr<MenuItem>(pChild);
+ child_->reference(); //TODO. We used to use the old RefPtr::operator=(), and this is what it did.
+}
+
+void Element::set_accel_key(const AccelKey& accel_key)
+{
+ if(child_)
+ child_->set_accel_key(accel_key);
+}
+
+const Glib::RefPtr<MenuItem>& Element::get_child() const
+{
+ return child_;
+}
+
+MenuElem::MenuElem(MenuItem& child)
+: Element(child)
+{}
+
+MenuElem::MenuElem(const Glib::ustring& label,
+ const CallSlot& slot)
+{
+ set_child( manage(new MenuItem(label, true)) );
+ if(slot)
+ child_->signal_activate().connect(slot);
+ child_->show();
+}
+
+MenuElem::MenuElem(const Glib::ustring& label,
+ const AccelKey& accel_key,
+ const CallSlot& slot)
+{
+ set_child( manage(new MenuItem(label, true)) );
+ if(slot)
+ child_->signal_activate().connect(slot);
+ set_accel_key(accel_key);
+ child_->show();
+}
+
+MenuElem::MenuElem(const Glib::ustring& label, Menu& submenu)
+{
+ set_child( manage(new MenuItem(label, true)) );
+ child_->set_submenu(submenu);
+ child_->show();
+}
+
+MenuElem::MenuElem(const Glib::ustring& label,
+ const AccelKey& accel_key,
+ Gtk::Menu& submenu)
+{
+ set_child( manage(new MenuItem(label, true)) );
+ child_->set_submenu(submenu);
+ set_accel_key(accel_key);
+ child_->show();
+}
+
+SeparatorElem::SeparatorElem()
+{
+ set_child( manage(new SeparatorMenuItem()) );
+ child_->show();
+}
+
+ImageMenuElem::ImageMenuElem(ImageMenuItem& child)
+: Element(child)
+{}
+
+ImageMenuElem::ImageMenuElem(const Glib::ustring& label,
+ Gtk::Widget& image_widget,
+ const CallSlot& slot)
+{
+ image_widget.show(); //We assume that the coder wants to actually show the widget.
+ set_child( manage(new ImageMenuItem(image_widget, label, true)) );
+ if(slot)
+ child_->signal_activate().connect(slot);
+ child_->show();
+}
+
+ImageMenuElem::ImageMenuElem(const Glib::ustring& label,
+ const AccelKey& accel_key,
+ Gtk::Widget& image_widget,
+ const CallSlot& slot)
+{
+ image_widget.show(); //We assume that the coder wants to actually show the widget.
+ set_child( manage(new ImageMenuItem(image_widget, label, true)) );
+ if(slot)
+ child_->signal_activate().connect(slot);
+ set_accel_key(accel_key);
+ child_->show();
+}
+
+ImageMenuElem::ImageMenuElem(const Glib::ustring& label,
+ Gtk::Widget& image_widget,
+ Gtk::Menu& submenu)
+{
+ image_widget.show(); //We assume that the coder wants to actually show the widget.
+ set_child( manage(new ImageMenuItem(image_widget, label, true)) );
+ child_->set_submenu(submenu);
+ child_->show();
+}
+
+ImageMenuElem::ImageMenuElem(const Glib::ustring& label,
+ const AccelKey& accel_key,
+ Gtk::Widget& image_widget,
+ Gtk::Menu& submenu)
+{
+ image_widget.show(); //We assume that the coder wants to actually show the widget.
+ set_child( manage(new ImageMenuItem(image_widget, label, true)) );
+ set_accel_key(accel_key);
+ child_->set_submenu(submenu);
+ child_->show();
+}
+
+StockMenuElem::StockMenuElem(const Gtk::StockID& stock_id,
+ const CallSlot& slot)
+{
+ set_child( manage(new ImageMenuItem(stock_id)) );
+ if(slot)
+ child_->signal_activate().connect(slot);
+ child_->show();
+}
+
+StockMenuElem::StockMenuElem(const Gtk::StockID& stock_id,
+ const AccelKey& accel_key,
+ const CallSlot& slot)
+{
+ set_child( manage(new ImageMenuItem(stock_id)) );
+ if(slot)
+ child_->signal_activate().connect(slot);
+ set_accel_key(accel_key);
+ child_->show();
+}
+
+StockMenuElem::StockMenuElem(const Gtk::StockID& stock_id,
+ Gtk::Menu& submenu)
+{
+ set_child( manage(new ImageMenuItem(stock_id)) );
+ child_->set_submenu(submenu);
+ child_->show();
+}
+
+StockMenuElem::StockMenuElem(const Gtk::StockID& stock_id,
+ const AccelKey& accel_key,
+ Gtk::Menu& submenu)
+{
+ set_child( manage(new ImageMenuItem(stock_id)) );
+ set_accel_key(accel_key);
+ child_->set_submenu(submenu);
+ child_->show();
+}
+
+CheckMenuElem::CheckMenuElem(CheckMenuItem& child)
+: Element(child)
+{}
+
+CheckMenuElem::CheckMenuElem(const Glib::ustring& label,
+ const CallSlot& slot)
+{
+ CheckMenuItem* item = manage(new CheckMenuItem(label, true));
+ set_child( item );
+ if(slot)
+ item->signal_toggled().connect(slot);
+ child_->show();
+}
+
+CheckMenuElem::CheckMenuElem(const Glib::ustring& label,
+ const AccelKey& accel_key,
+ const CallSlot& slot)
+{
+ CheckMenuItem* item = manage(new CheckMenuItem(label, true));
+ set_child( item );
+ set_accel_key(accel_key);
+ if(slot)
+ item->signal_toggled().connect(slot);
+ child_->show();
+}
+
+
+RadioMenuElem::RadioMenuElem(RadioMenuItem& child)
+: Element(child), gr_(0)
+{}
+
+RadioMenuElem::RadioMenuElem(RadioMenuItem::Group& group,
+ const Glib::ustring& label,
+ const CallSlot& slot)
+ : gr_(&group)
+{
+ CheckMenuItem* item = manage(new RadioMenuItem(*gr_, label, true));
+ set_child( item );
+ if(slot)
+ item->signal_toggled().connect(slot);
+ child_->show();
+}
+
+RadioMenuElem::RadioMenuElem(RadioMenuItem::Group& gr,
+ const Glib::ustring& label,
+ const AccelKey& accel_key,
+ const CallSlot& slot)
+ : gr_(&gr)
+{
+ CheckMenuItem* item = manage(new RadioMenuItem(*gr_, label, true));
+ set_child( item );
+ set_accel_key(accel_key);
+ if(slot)
+ item->signal_toggled().connect(slot);
+ child_->show();
+}
+
+TearoffMenuElem::TearoffMenuElem(TearoffMenuItem& child)
+: Element(child)
+{}
+
+TearoffMenuElem::TearoffMenuElem(const CallSlot& slot)
+{
+ set_child( manage(new TearoffMenuItem()) );
+ if(slot)
+ child_->signal_activate().connect(slot);
+ child_->show();
+}
+
+TearoffMenuElem::TearoffMenuElem(const AccelKey& accel_key,
+ const CallSlot& slot)
+{
+ set_child( manage(new TearoffMenuItem()) );
+ set_accel_key(accel_key);
+ if(slot)
+ child_->signal_activate().connect(slot);
+ child_->show();
+}
+
+} /* namespace Menu_Helpers */
+
+} /* namespace Gtk */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/menu_elems.h b/libs/gtkmm2/gtk/gtkmm/menu_elems.h
new file mode 100644
index 0000000000..b443e94bbd
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/menu_elems.h
@@ -0,0 +1,266 @@
+/* $Id$ */
+#ifndef _GTKMM_MENU_ELEMS_H
+#define _GTKMM_MENU_ELEMS_H
+/* menu_elems.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gdk/gdkkeysyms.h>
+
+#include <gtkmm/container.h>
+#include <gtkmm/menuitem.h>
+#include <gtkmm/imagemenuitem.h>
+#include <gtkmm/radiomenuitem.h>
+#include <gtkmm/checkmenuitem.h>
+#include <gtkmm/tearoffmenuitem.h>
+#include <gtkmm/separatormenuitem.h>
+#include <gtkmm/accelgroup.h>
+#include <gtkmm/accelkey.h>
+
+namespace Gtk
+{
+
+class Menu;
+
+namespace Menu_Helpers
+{
+
+// input class (MenuItem-Factory)
+
+class Element
+{
+public:
+ typedef sigc::slot<void> CallSlot;
+
+ Element();
+ Element(MenuItem& child);
+ ~Element();
+
+ const Glib::RefPtr<MenuItem>& get_child() const;
+
+protected:
+
+ void set_child(MenuItem* pChild);
+ void set_accel_key(const AccelKey& accel_key);
+
+ //We use a RefPtr to avoid leaks when the manage()d widget never gets added to a container.
+ //TODO: RefPtr is probably meant only for use with a create() method - see the extra reference() in set_child().
+ Glib::RefPtr<MenuItem> child_;
+};
+
+/** Use this class and its subclasses to build menu items.
+ * For example,
+ * @code
+ * m_Menu_File.items().push_back( Gtk::Menu_Helpers::MenuElem("_New",
+ * sigc::mem_fun(*this, &ExampleWindow::on_menu_file_new) ) );
+ * @endcode
+ *
+ * @ingroup Menus
+ */
+class MenuElem : public Element
+{
+public:
+
+ MenuElem(MenuItem& child);
+
+ /** Create a labeled, non-accelerated MenuItem with a sigc::slot
+ * @param label The menu item's name
+ * @param slot Use sigc::mem_fun() to specify a signal handler
+ */
+ MenuElem(const Glib::ustring& label, const CallSlot& slot = CallSlot());
+
+ /** Create a labeled, accelerated MenuItem with a sigc::slot
+ * @param label The menu item's name
+ * @param key The accelerator key combination
+ * @param slot Use sigc::mem_fun() to specify a signal handler
+ */
+ MenuElem(const Glib::ustring& label, const AccelKey& key,
+ const CallSlot& slot = CallSlot());
+
+ /** Create a labeled, non-accelerated MenuItem with a submenu
+ * @param label The menu item's name
+ * @param submenu The sub menu
+ */
+ MenuElem(const Glib::ustring& label, Gtk::Menu& submenu);
+
+ /** Create a labeled, accelerated MenuItem with a submenu
+ * @param label The menu item's name
+ * @param key The accelerator key combination
+ * @param submenu The sub menu
+ */
+ MenuElem(const Glib::ustring& label,
+ const AccelKey& key,
+ Gtk::Menu& submenu);
+};
+
+class SeparatorElem : public Element
+{
+public:
+ SeparatorElem();
+};
+
+class ImageMenuElem : public Element
+{
+public:
+ ImageMenuElem(ImageMenuItem& child);
+
+ /** Create a labeled, non-accelerated MenuItem with a sigc::slot
+ * @param label The menu item's name
+ * @param image_widget The image
+ * @param slot Use sigc::mem_fun() to specify a signal handler
+ */
+ ImageMenuElem(const Glib::ustring& label,
+ Gtk::Widget& image_widget,
+ const CallSlot& slot = CallSlot());
+
+ /** Create a labeled, accelerated MenuItem with a sigc::slot
+ * @param label The menu item's name
+ * @param key The accelerator key combination
+ * @param image_widget The image
+ * @param slot Use sigc::mem_fun() to specify a signal handler
+ */
+ ImageMenuElem(const Glib::ustring& label, const AccelKey& key,
+ Gtk::Widget& image_widget,
+ const CallSlot& slot = CallSlot());
+
+ /** Create a labeled, non-accelerated MenuItem with a submenu
+ * @param label The menu item's name
+ * @param image_widget The image
+ * @param submenu The sub menu
+ */
+ ImageMenuElem(const Glib::ustring& label,
+ Gtk::Widget& image_widget,
+ Gtk::Menu& submenu);
+
+ /** Create a labeled, accelerated MenuItem with a submenu
+ * @param label The menu item's name
+ * @param key The accelerator key combination
+ * @param image_widget The image
+ * @param submenu The sub menu
+ */
+ ImageMenuElem(const Glib::ustring& label, const AccelKey& key,
+ Gtk::Widget& image_widget,
+ Gtk::Menu& submenu);
+};
+
+class StockMenuElem : public Element
+{
+public:
+ /** Create a non-accelerated MenuItem from a stock item
+ * @param stock_id The ID of the stock item
+ * @param slot Use sigc::mem_fun() to specify a signal handler
+ */
+ StockMenuElem(const Gtk::StockID& stock_id,
+ const CallSlot& slot = CallSlot());
+
+ /** Create an accelerated MenuItem from a stock item
+ * @param stock_id The ID of the stock item
+ * @param key The accelerator key combination
+ * @param slot Use sigc::mem_fun() to specify a signal handler
+ */
+ StockMenuElem(const Gtk::StockID& stock_id,
+ const AccelKey& key,
+ const CallSlot& slot = CallSlot());
+
+ /** Create a non-accelerated MenuItem from a stock item with a submenu
+ * @param stock_id The ID of the stock item
+ * @param submenu The sub menu
+ */
+ StockMenuElem(const Gtk::StockID& stock_id,
+ Gtk::Menu& submenu);
+
+ /** Create an accelerated MenuItem from a stock item with a submenu
+ * @param stock_id The ID of the stock item
+ * @param key The accelerator key combination
+ * @param submenu The sub menu
+ */
+ StockMenuElem(const Gtk::StockID& stock_id,
+ const AccelKey& key,
+ Gtk::Menu& submenu);
+};
+
+class CheckMenuElem : public Element
+{
+public:
+ CheckMenuElem(CheckMenuItem& child);
+
+ /** Create a labeled, non-accelerated MenuItem with a sigc::slot
+ * @param label The menu item's name
+ * @param slot Use sigc::mem_fun() to specify a signal handler
+ */
+ CheckMenuElem(const Glib::ustring& label, const CallSlot& slot = CallSlot());
+
+ /** Create a labeled, accelerated CheckMenuItem with a sigc::slot
+ * @param label The menu item's name
+ * @param key The accelerator key combination
+ * @param slot Use sigc::mem_fun() to specify a signal handler
+ */
+ CheckMenuElem(const Glib::ustring& label, const AccelKey& key,
+ const CallSlot& slot = CallSlot());
+};
+
+
+class RadioMenuElem : public Element
+{
+public:
+ RadioMenuElem(RadioMenuItem& child);
+
+ /** Create a labeled, non-accelerated MenuItem with a sigc::slot
+ * @param label The menu item's name
+ * @param slot Use sigc::mem_fun() to specify a signal handler
+ */
+ RadioMenuElem(RadioMenuItem::Group&, const Glib::ustring& label,
+ const CallSlot& slot = CallSlot());
+
+ /** Create a labeled, accelerated CheckMenuItem with a sigc::slot
+ * @param group The RadioMenuItem group in which to put this.
+ * @param label The menu item's name
+ * @param key The accelerator key combination
+ * @param slot Use sigc::mem_fun() to specify a signal handler
+ */
+ RadioMenuElem(RadioMenuItem::Group& group, const Glib::ustring& label,
+ const AccelKey& key,
+ const CallSlot& slot = CallSlot());
+
+protected:
+ RadioMenuItem::Group* gr_;
+};
+
+class TearoffMenuElem : public Element
+{
+public:
+ TearoffMenuElem(TearoffMenuItem& child);
+
+ /** Create a non-accelerated TearoffMenuItem with a sigc::slot
+ * @param slot Use sigc::mem_fun() to specify a signal handler
+ */
+ TearoffMenuElem(const CallSlot& slot = CallSlot());
+
+ /** Create accelerated TearoffMenuItem with a sigc::slot
+ * @param key The accelerator key combination
+ * @param slot Use sigc::mem_fun() to specify a signal handler
+ */
+ TearoffMenuElem(const AccelKey& key,
+ const CallSlot& slot = CallSlot());
+};
+
+} /* namespace Menu_Helpers */
+
+} /* namespace Gtk */
+
+#endif //_GTKMM_MENU_ELEMS_H
diff --git a/libs/gtkmm2/gtk/gtkmm/menubar.cc b/libs/gtkmm2/gtk/gtkmm/menubar.cc
new file mode 100644
index 0000000000..8b5ef04bbc
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/menubar.cc
@@ -0,0 +1,147 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/menubar.h>
+#include <gtkmm/private/menubar_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkmenubar.h>
+
+namespace Gtk
+{
+
+MenuBar::MenuBar()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::MenuShell(Glib::ConstructParams(menubar_class_.init(), (char*) 0))
+{
+ // Connect to the signal instead of overriding the on_hierarchy_changed()
+ // method because invocation of C++ default signal handlers is skipped
+ // for gtkmmproc-generated classes (a gtkmm-wide optimization).
+
+ signal_realize().connect(sigc::mem_fun(*this, &MenuBar::init_accels_handler_));
+}
+
+void MenuBar::init_accels_handler_()
+{
+ if(gobj())
+ {
+ if(Window *const toplevel = dynamic_cast<Window*>(get_toplevel()))
+ {
+ accelerate(*toplevel);
+ }
+ }
+}
+
+} // namespace Gtk
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::MenuBar* wrap(GtkMenuBar* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::MenuBar *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& MenuBar_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &MenuBar_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_menu_bar_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void MenuBar_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* MenuBar_Class::wrap_new(GObject* o)
+{
+ return manage(new MenuBar((GtkMenuBar*)(o)));
+
+}
+
+
+/* The implementation: */
+
+MenuBar::MenuBar(const Glib::ConstructParams& construct_params)
+:
+ Gtk::MenuShell(construct_params)
+{
+ }
+
+MenuBar::MenuBar(GtkMenuBar* castitem)
+:
+ Gtk::MenuShell((GtkMenuShell*)(castitem))
+{
+ }
+
+MenuBar::~MenuBar()
+{
+ destroy_();
+}
+
+MenuBar::CppClassType MenuBar::menubar_class_; // initialize static member
+
+GType MenuBar::get_type()
+{
+ return menubar_class_.init().get_type();
+}
+
+GType MenuBar::get_base_type()
+{
+ return gtk_menu_bar_get_type();
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/menubar.h b/libs/gtkmm2/gtk/gtkmm/menubar.h
new file mode 100644
index 0000000000..f7d8dea03e
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/menubar.h
@@ -0,0 +1,128 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_MENUBAR_H
+#define _GTKMM_MENUBAR_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+
+/* menubar.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/menushell.h>
+#include <gtkmm/menuitem.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkMenuBar GtkMenuBar;
+typedef struct _GtkMenuBarClass GtkMenuBarClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class MenuBar_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** A standard menu bar which usually holds Gtk::Menu submenu items.
+ * The useful methods are in the base class - Gtk::MenuShell.
+ * @ingroup Widgets
+ * @ingroup Menus
+ */
+
+class MenuBar : public MenuShell
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef MenuBar CppObjectType;
+ typedef MenuBar_Class CppClassType;
+ typedef GtkMenuBar BaseObjectType;
+ typedef GtkMenuBarClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~MenuBar();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class MenuBar_Class;
+ static CppClassType menubar_class_;
+
+ // noncopyable
+ MenuBar(const MenuBar&);
+ MenuBar& operator=(const MenuBar&);
+
+protected:
+ explicit MenuBar(const Glib::ConstructParams& construct_params);
+ explicit MenuBar(GtkMenuBar* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkMenuBar* gobj() { return reinterpret_cast<GtkMenuBar*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkMenuBar* gobj() const { return reinterpret_cast<GtkMenuBar*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+
+public:
+ MenuBar();
+
+ // append, prepend and insert are defined in menushell
+
+private:
+ void init_accels_handler_(void);
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::MenuBar
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::MenuBar* wrap(GtkMenuBar* object, bool take_copy = false);
+}
+#endif /* _GTKMM_MENUBAR_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/menuitem.cc b/libs/gtkmm2/gtk/gtkmm/menuitem.cc
new file mode 100644
index 0000000000..44f86a9204
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/menuitem.cc
@@ -0,0 +1,552 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/menuitem.h>
+#include <gtkmm/private/menuitem_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkmenuitem.h>
+#include <gtk/gtkaccelmap.h>
+#include <gtkmm/label.h>
+#include <gtkmm/misc.h>
+#include <gtkmm/menu.h>
+#include <gtkmm/box.h>
+#include <gtkmm/window.h>
+#include <gtkmm/menubar.h>
+#include <gtkmm/accelmap.h>
+
+// gtk_menu_item_(de)select are just a wrapper for gtk_item_(de)select
+// and defined in Gtk_Item, so they do not be redefined here
+
+namespace Gtk
+{
+
+
+MenuItem::MenuItem(Widget& widget)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Item(Glib::ConstructParams(menuitem_class_.init(), (char*) 0))
+{
+ add(widget);
+}
+
+MenuItem::MenuItem(const Glib::ustring& label, bool mnemonic)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Item(Glib::ConstructParams(menuitem_class_.init(), (char*) 0))
+{
+ add_accel_label(label, mnemonic); /* Left-aligned label */
+}
+
+void MenuItem::add_accel_label(const Glib::ustring& label, bool mnemonic)
+{
+ AccelLabel* pLabel = manage(new AccelLabel(label, mnemonic));
+ //Labels are centered by default, but in menus they should be left-aligned.
+ pLabel->property_xalign() = 0.0;
+
+ add(*pLabel);
+
+ //Note that we have to unset the accel_widget in MenuList::remove() to avoid
+ //a memory leak due to the extra reference:
+ pLabel->set_accel_widget(*this);
+ pLabel->show();
+}
+
+void MenuItem::set_accel_key(const AccelKey& accel_key)
+{
+ accel_key_ = accel_key;
+}
+
+bool MenuItem::has_submenu() const
+{
+ return get_submenu() != 0;
+}
+
+void MenuItem::accelerate(Window& window)
+{
+ if(!accel_key_.is_null())
+ {
+ if(accel_key_.get_path().empty())
+ {
+ add_accelerator("activate", window.get_accel_group(),
+ accel_key_.get_key(), accel_key_.get_mod(), ACCEL_VISIBLE);
+ }
+ else
+ {
+ AccelMap::add_entry(accel_key_.get_path(),
+ accel_key_.get_key(),
+ accel_key_.get_mod());
+
+ Item::set_accel_path(accel_key_.get_path(), window.get_accel_group());
+ }
+ }
+
+ if(has_submenu())
+ get_submenu()->accelerate(window);
+}
+
+void MenuItem::unset_accel_path()
+{
+ gtk_menu_item_set_accel_path(gobj(), 0);
+}
+
+
+} // namespace Gtk
+
+
+namespace
+{
+
+const Glib::SignalProxyInfo MenuItem_signal_activate_info =
+{
+ "activate",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+
+const Glib::SignalProxyInfo MenuItem_signal_activate_item_info =
+{
+ "activate_item",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+
+void MenuItem_signal_toggle_size_request_callback(GtkMenuItem* self, int* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,int* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(p0);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo MenuItem_signal_toggle_size_request_info =
+{
+ "toggle_size_request",
+ (GCallback) &MenuItem_signal_toggle_size_request_callback,
+ (GCallback) &MenuItem_signal_toggle_size_request_callback
+};
+
+
+void MenuItem_signal_toggle_size_allocate_callback(GtkMenuItem* self, gint p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,int > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(p0
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo MenuItem_signal_toggle_size_allocate_info =
+{
+ "toggle_size_allocate",
+ (GCallback) &MenuItem_signal_toggle_size_allocate_callback,
+ (GCallback) &MenuItem_signal_toggle_size_allocate_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::MenuItem* wrap(GtkMenuItem* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::MenuItem *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& MenuItem_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &MenuItem_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_menu_item_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void MenuItem_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->activate = &activate_callback;
+ klass->activate_item = &activate_item_callback;
+ klass->toggle_size_request = &toggle_size_request_callback;
+ klass->toggle_size_allocate = &toggle_size_allocate_callback;
+}
+
+
+void MenuItem_Class::activate_callback(GtkMenuItem* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_activate();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->activate)
+ (*base->activate)(self);
+ }
+}
+
+void MenuItem_Class::activate_item_callback(GtkMenuItem* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_activate_item();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->activate_item)
+ (*base->activate_item)(self);
+ }
+}
+
+void MenuItem_Class::toggle_size_request_callback(GtkMenuItem* self, int* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_toggle_size_request(p0);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->toggle_size_request)
+ (*base->toggle_size_request)(self, p0);
+ }
+}
+
+void MenuItem_Class::toggle_size_allocate_callback(GtkMenuItem* self, gint p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_toggle_size_allocate(p0
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->toggle_size_allocate)
+ (*base->toggle_size_allocate)(self, p0);
+ }
+}
+
+
+Glib::ObjectBase* MenuItem_Class::wrap_new(GObject* o)
+{
+ return manage(new MenuItem((GtkMenuItem*)(o)));
+
+}
+
+
+/* The implementation: */
+
+MenuItem::MenuItem(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Item(construct_params)
+{
+ }
+
+MenuItem::MenuItem(GtkMenuItem* castitem)
+:
+ Gtk::Item((GtkItem*)(castitem))
+{
+ }
+
+MenuItem::~MenuItem()
+{
+ destroy_();
+}
+
+MenuItem::CppClassType MenuItem::menuitem_class_; // initialize static member
+
+GType MenuItem::get_type()
+{
+ return menuitem_class_.init().get_type();
+}
+
+GType MenuItem::get_base_type()
+{
+ return gtk_menu_item_get_type();
+}
+
+
+MenuItem::MenuItem()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Item(Glib::ConstructParams(menuitem_class_.init()))
+{
+ }
+
+void MenuItem::set_submenu(Menu& submenu)
+{
+ gtk_menu_item_set_submenu(gobj(), (submenu).Gtk::Widget::gobj());
+}
+
+Menu* MenuItem::get_submenu()
+{
+ return Glib::wrap((GtkMenu*)(gtk_menu_item_get_submenu(gobj())));
+}
+
+const Menu* MenuItem::get_submenu() const
+{
+ return Glib::wrap((GtkMenu*)(gtk_menu_item_get_submenu(const_cast<GtkMenuItem*>(gobj()))));
+}
+
+void MenuItem::remove_submenu()
+{
+ gtk_menu_item_remove_submenu(gobj());
+}
+
+void MenuItem::select()
+{
+ gtk_menu_item_select(gobj());
+}
+
+void MenuItem::deselect()
+{
+ gtk_menu_item_deselect(gobj());
+}
+
+void MenuItem::activate()
+{
+ gtk_menu_item_activate(gobj());
+}
+
+void MenuItem::toggle_size_request(int& requisition)
+{
+ gtk_menu_item_toggle_size_request(gobj(), &requisition);
+}
+
+void MenuItem::toggle_size_allocate(int allocation)
+{
+ gtk_menu_item_toggle_size_allocate(gobj(), allocation);
+}
+
+void MenuItem::set_right_justified(bool right_justified)
+{
+ gtk_menu_item_set_right_justified(gobj(), static_cast<int>(right_justified));
+}
+
+bool MenuItem::get_right_justified() const
+{
+ return gtk_menu_item_get_right_justified(const_cast<GtkMenuItem*>(gobj()));
+}
+
+void MenuItem::set_accel_path(const Glib::ustring& accel_path)
+{
+ gtk_menu_item_set_accel_path(gobj(), accel_path.c_str());
+}
+
+
+Glib::SignalProxy0< void > MenuItem::signal_activate()
+{
+ return Glib::SignalProxy0< void >(this, &MenuItem_signal_activate_info);
+}
+
+Glib::SignalProxy0< void > MenuItem::signal_activate_item()
+{
+ return Glib::SignalProxy0< void >(this, &MenuItem_signal_activate_item_info);
+}
+
+Glib::SignalProxy1< void,int* > MenuItem::signal_toggle_size_request()
+{
+ return Glib::SignalProxy1< void,int* >(this, &MenuItem_signal_toggle_size_request_info);
+}
+
+Glib::SignalProxy1< void,int > MenuItem::signal_toggle_size_allocate()
+{
+ return Glib::SignalProxy1< void,int >(this, &MenuItem_signal_toggle_size_allocate_info);
+}
+
+
+void Gtk::MenuItem::on_activate()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->activate)
+ (*base->activate)(gobj());
+}
+
+void Gtk::MenuItem::on_activate_item()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->activate_item)
+ (*base->activate_item)(gobj());
+}
+
+void Gtk::MenuItem::on_toggle_size_request(int* requisition)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->toggle_size_request)
+ (*base->toggle_size_request)(gobj(),requisition);
+}
+
+void Gtk::MenuItem::on_toggle_size_allocate(int allocation)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->toggle_size_allocate)
+ (*base->toggle_size_allocate)(gobj(),allocation);
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/menuitem.h b/libs/gtkmm2/gtk/gtkmm/menuitem.h
new file mode 100644
index 0000000000..50e2ccc610
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/menuitem.h
@@ -0,0 +1,233 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_MENUITEM_H
+#define _GTKMM_MENUITEM_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+
+/* menuitem.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/item.h>
+#include <gtkmm/accelkey.h>
+#include <gtkmm/accellabel.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkMenuItem GtkMenuItem;
+typedef struct _GtkMenuItemClass GtkMenuItemClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class MenuItem_Class; } // namespace Gtk
+namespace Gtk
+{
+
+class Menu;
+namespace Menu_Helpers { class Element; }
+
+/** Child item for menus.
+ * Handle highlighting, alignment, events and submenus.
+ * As it derives from Gtk::Bin it can hold any valid child widget, altough only a few are really useful.
+ * @ingroup Widgets
+ * @ingroup Menus
+ */
+
+class MenuItem : public Item
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef MenuItem CppObjectType;
+ typedef MenuItem_Class CppClassType;
+ typedef GtkMenuItem BaseObjectType;
+ typedef GtkMenuItemClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~MenuItem();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class MenuItem_Class;
+ static CppClassType menuitem_class_;
+
+ // noncopyable
+ MenuItem(const MenuItem&);
+ MenuItem& operator=(const MenuItem&);
+
+protected:
+ explicit MenuItem(const Glib::ConstructParams& construct_params);
+ explicit MenuItem(GtkMenuItem* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkMenuItem* gobj() { return reinterpret_cast<GtkMenuItem*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkMenuItem* gobj() const { return reinterpret_cast<GtkMenuItem*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_activate();
+ virtual void on_activate_item();
+ virtual void on_toggle_size_request(int* requisition);
+ virtual void on_toggle_size_allocate(int allocation);
+
+
+private:
+
+public:
+
+ /// Create an empty menu item
+ MenuItem();
+
+ /// Create a menu item with widget
+ explicit MenuItem(Widget& widget);
+
+ /// Create a menu item with label
+ explicit MenuItem(const Glib::ustring& label, bool mnemonic = false);
+
+
+ void set_submenu(Menu& submenu);
+
+ /** Gets the submenu underneath this menu item, if any. See
+ * set_submenu().
+ * @return Submenu for this menu item, or <tt>0</tt> if none.
+ */
+ Menu* get_submenu();
+
+ /** Gets the submenu underneath this menu item, if any. See
+ * set_submenu().
+ * @return Submenu for this menu item, or <tt>0</tt> if none.
+ */
+ const Menu* get_submenu() const;
+ bool has_submenu() const;
+
+
+ void remove_submenu();
+
+ void select();
+
+ void deselect();
+
+ void activate();
+
+ void toggle_size_request(int& requisition);
+
+ void toggle_size_allocate(int allocation);
+
+ /** Sets whether the menu item appears justified at the right
+ * side of a menu bar. This was traditionally done for "Help" menu
+ * items, but is now considered a bad idea. (If the widget
+ * layout is reversed for a right-to-left language like Hebrew
+ * or Arabic, right-justified-menu-items appear at the left.)
+ * @param right_justified If <tt>true</tt> the menu item will appear at the
+ * far right if added to a menu bar.
+ */
+ void set_right_justified(bool right_justified = true);
+
+ /** Gets whether the menu item appears justified at the right
+ * side of the menu bar.
+ * @return <tt>true</tt> if the menu item will appear at the
+ * far right if added to a menu bar.
+ */
+ bool get_right_justified() const;
+
+ /** Set the accelerator path on @a menu_item , through which runtime changes of the
+ * menu item's accelerator caused by the user can be identified and saved to
+ * persistant storage (see gtk_accel_map_save() on this).
+ * To setup a default accelerator for this menu item, call
+ * gtk_accel_map_add_entry() with the same @a accel_path .
+ * See also gtk_accel_map_add_entry() on the specifics of accelerator paths,
+ * and set_accel_path() for a more convenient variant of this function.
+ *
+ * This function is basically a convenience wrapper that handles calling
+ * Gtk::Widget::set_accel_path() with the appropriate accelerator group for
+ * the menu item.
+ *
+ * Note that you do need to set an accelerator on the parent menu with
+ * set_accel_group() for this to work.
+ * @param accel_path Accelerator path, corresponding to this menu item's
+ * functionality.
+ */
+ void set_accel_path(const Glib::ustring& accel_path);
+ void unset_accel_path();
+
+
+ Glib::SignalProxy0< void > signal_activate();
+
+
+ Glib::SignalProxy0< void > signal_activate_item();
+
+
+ Glib::SignalProxy1< void,int* > signal_toggle_size_request();
+
+
+ Glib::SignalProxy1< void,int > signal_toggle_size_allocate();
+
+
+ void accelerate(Window& window);
+
+protected:
+
+ void add_accel_label(const Glib::ustring& label, bool mnemonic = true);
+
+ void set_accel_key(const AccelKey& accel_key);
+
+private:
+
+ friend class Menu_Helpers::Element;
+
+ //This data is set by MenuElem, and will be used in on_realize(), in the call to add_accelerator().
+ AccelKey accel_key_;
+
+
+};
+
+} /* namespace Gtk */
+
+
+namespace Glib
+{
+ /** @relates Gtk::MenuItem
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::MenuItem* wrap(GtkMenuItem* object, bool take_copy = false);
+}
+#endif /* _GTKMM_MENUITEM_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/menushell.cc b/libs/gtkmm2/gtk/gtkmm/menushell.cc
new file mode 100644
index 0000000000..60cc879572
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/menushell.cc
@@ -0,0 +1,492 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/menushell.h>
+#include <gtkmm/private/menushell_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkmenuitem.h>
+#include <gtk/gtkaccellabel.h>
+
+
+namespace Gtk
+{
+
+// All ctors are manually implemented just to initialize accel_window_.
+
+MenuShell::MenuShell()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Container(Glib::ConstructParams(menushell_class_.init(), (char*) 0)),
+ items_proxy_ (gobj()),
+ accel_window_ (0)
+{}
+
+MenuShell::MenuShell(const Glib::ConstructParams& construct_params)
+:
+ Glib::ObjectBase(0),
+ Gtk::Container (construct_params),
+ items_proxy_ (gobj()),
+ accel_window_ (0)
+{}
+
+MenuShell::MenuShell(GtkMenuShell* castitem)
+:
+ Gtk::Container((GtkContainer*) castitem),
+ items_proxy_ (gobj()),
+ accel_window_ (0)
+{}
+
+// TODO: Why do we need a custom dtor?
+MenuShell::~MenuShell()
+{}
+
+void MenuShell::accelerate(Window& window)
+{
+ // accel_window_ is used by menuitems that are added to the menushell
+ // after it has been accelerated.
+ accel_window_ = &window;
+
+ const MenuList::iterator items_end = items().end();
+
+ for(MenuList::iterator iter = items().begin(); iter != items_end; ++iter)
+ iter->accelerate(window);
+}
+
+void MenuShell::accelerate(Widget& parent)
+{
+ Gtk::Window* toplevel_window
+ = dynamic_cast<Gtk::Window*>(parent.get_toplevel());
+ if(toplevel_window)
+ accelerate(*toplevel_window);
+}
+
+MenuShell::MenuList& MenuShell::items()
+{
+ return items_proxy_;
+}
+
+const MenuShell::MenuList& MenuShell::items() const
+{
+ return items_proxy_;
+}
+
+void MenuShell_Class::insert_vfunc_callback(GtkMenuShell* self, GtkWidget* child, int position)
+{
+ try
+ {
+ MenuShell *const obj = dynamic_cast<MenuShell*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*) self));
+
+ // If MenuShell is accelerated initialize accelerators of new MenuItem.
+ if(obj && obj->accel_window_ && GTK_IS_MENU_ITEM(child))
+ {
+ Glib::wrap((GtkMenuItem*) child)->accelerate(*obj->accel_window_);
+ }
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+
+ GtkMenuShellClass *const base = static_cast<GtkMenuShellClass*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)));
+
+ if(base && base->insert)
+ (*base->insert)(self, child, position);
+}
+
+
+namespace Menu_Helpers
+{
+
+// List implementation:
+
+
+MenuList::iterator MenuList::insert(MenuList::iterator position, const Element& element)
+{
+ const Glib::RefPtr<Gtk::MenuItem> item = element.get_child();
+
+ g_return_val_if_fail(item != 0, position);
+ g_return_val_if_fail(gparent() != 0, position);
+
+ int pos = -1;
+
+ if(position.node_)
+ pos = g_list_position(glist(), position.node_);
+
+ gtk_menu_shell_insert(gparent(), item->Widget::gobj(), pos);
+
+ return --position;
+}
+
+void MenuList::remove(const_reference child)
+{
+ const Widget& widget = child;
+ remove(const_cast<Widget&>(widget));
+}
+
+void MenuList::remove(Widget& widget)
+{
+ //This is the same as the standard implementation,
+ //but we also unset the accel_label to avoid leaking its reference.
+
+ //If it is a Bin, (actually we're looking for a MenuItem):
+ if(GTK_IS_BIN(widget.gobj()))
+ {
+ //TODO: There is duplication here, with erase().
+ //If the child's child is an AccelLabel then unset its accel widget:
+ //This can't catch every possible AccelLabel in the hierarchy, but it
+ //will catch the ones that we create in MenuItem::MenuItem() without
+ //people being aware of it. People can take care of their own ones themselves.
+ Gtk::AccelLabel* pAccelLabel = dynamic_cast<Gtk::AccelLabel*>(dynamic_cast<Gtk::Bin&>(widget).get_child());
+ if(pAccelLabel) //If the child is an AccelLabel.
+ {
+ //The unset_accel_widget() method is not implemented in gtkmm until 2.4:
+ gtk_accel_label_set_accel_widget(pAccelLabel->gobj(), 0);
+ }
+ }
+
+ gtk_container_remove(GTK_CONTAINER(gparent_),
+ (GtkWidget*)(widget.gobj()));
+}
+
+MenuList::iterator MenuList::erase(iterator position)
+{
+ //Check that it is a valid iterator, to a real item:
+ if ( !position.node_|| (position == end()) )
+ return end();
+
+ //Get an iterator the the next item, to return:
+ iterator next = position;
+ next++;
+
+ GtkWidget* pChild = (GtkWidget*)(position->gobj());
+ if(GTK_IS_BIN(pChild)) //A MenuItem is a Bin.
+ {
+ //If the child's child is an AccelLabel then unset it's accel widget:
+ //This can't catch every possible AccelLabel in the hierarchy, but it
+ //will catch the ones that we create in MenuItem::MenuItem() without
+ //people being aware of it. People can take care of their own ones themselves.
+ GtkWidget* pChildOfChild = (GtkWidget*)gtk_bin_get_child(GTK_BIN(pChild));
+ if(GTK_IS_ACCEL_LABEL(pChildOfChild))
+ gtk_accel_label_set_accel_widget(GTK_ACCEL_LABEL(pChildOfChild), 0);
+ }
+
+ //Use GTK+ C function to remove it, by providing the GtkWidget*:
+ gtk_container_remove( GTK_CONTAINER(gparent_), pChild );
+
+ return next;
+}
+
+} // namespace Menu_Helpers
+
+} // namespace Gtk
+
+
+namespace
+{
+
+const Glib::SignalProxyInfo MenuShell_signal_deactivate_info =
+{
+ "deactivate",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+
+const Glib::SignalProxyInfo MenuShell_signal_selection_done_info =
+{
+ "selection_done",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::MenuShell* wrap(GtkMenuShell* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::MenuShell *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& MenuShell_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &MenuShell_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_menu_shell_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void MenuShell_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->insert = &insert_vfunc_callback;
+ klass->deactivate = &deactivate_callback;
+ klass->selection_done = &selection_done_callback;
+}
+
+
+void MenuShell_Class::deactivate_callback(GtkMenuShell* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_deactivate();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->deactivate)
+ (*base->deactivate)(self);
+ }
+}
+
+void MenuShell_Class::selection_done_callback(GtkMenuShell* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_selection_done();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->selection_done)
+ (*base->selection_done)(self);
+ }
+}
+
+
+Glib::ObjectBase* MenuShell_Class::wrap_new(GObject* o)
+{
+ return manage(new MenuShell((GtkMenuShell*)(o)));
+
+}
+
+
+/* The implementation: */
+
+MenuShell::CppClassType MenuShell::menushell_class_; // initialize static member
+
+GType MenuShell::get_type()
+{
+ return menushell_class_.init().get_type();
+}
+
+GType MenuShell::get_base_type()
+{
+ return gtk_menu_shell_get_type();
+}
+
+
+namespace Menu_Helpers
+{
+
+MenuList::MenuList()
+{}
+
+MenuList::MenuList(GtkMenuShell* gparent)
+: type_base((GObject*)gparent)
+{}
+
+MenuList::MenuList(const MenuList& src)
+:
+ type_base(src)
+{}
+
+MenuList& MenuList::operator=(const MenuList& src)
+{
+ type_base::operator=(src);
+ return *this;
+}
+
+GList*& MenuList::glist() const
+{
+ return ((GtkMenuShell*)gparent_)->children;
+}
+
+void MenuList::erase(iterator start, iterator stop)
+{
+ type_base::erase(start, stop);
+}
+
+GtkMenuShell* MenuList::gparent()
+{
+ return (GtkMenuShell*)type_base::gparent();
+}
+
+const GtkMenuShell* MenuList::gparent() const
+{
+ return (GtkMenuShell*)type_base::gparent();
+}
+
+MenuList::reference MenuList::operator[](size_type l) const
+{
+ return type_base::operator[](l);
+}
+
+} /* namespace Menu_Helpers */
+
+void MenuShell::append(MenuItem& menu_item)
+{
+ gtk_menu_shell_append(gobj(), (menu_item).Gtk::Widget::gobj());
+}
+
+void MenuShell::prepend(MenuItem& menu_item)
+{
+ gtk_menu_shell_prepend(gobj(), (menu_item).Gtk::Widget::gobj());
+}
+
+void MenuShell::insert(MenuItem& menu_item, int position)
+{
+ gtk_menu_shell_insert(gobj(), (menu_item).Gtk::Widget::gobj(), position);
+}
+
+void MenuShell::select_item(MenuItem& menu_item)
+{
+ gtk_menu_shell_select_item(gobj(), (menu_item).Gtk::Widget::gobj());
+}
+
+void MenuShell::deselect()
+{
+ gtk_menu_shell_deselect(gobj());
+}
+
+void MenuShell::activate_item(MenuItem& menu_item, bool force_deactivate)
+{
+ gtk_menu_shell_activate_item(gobj(), (menu_item).Gtk::Widget::gobj(), static_cast<int>(force_deactivate));
+}
+
+void MenuShell::select_first(bool search_sensitive)
+{
+ gtk_menu_shell_select_first(gobj(), static_cast<int>(search_sensitive));
+}
+
+void MenuShell::deactivate()
+{
+ gtk_menu_shell_deactivate(gobj());
+}
+
+void MenuShell::cancel()
+{
+ gtk_menu_shell_cancel(gobj());
+}
+
+
+Glib::SignalProxy0< void > MenuShell::signal_deactivate()
+{
+ return Glib::SignalProxy0< void >(this, &MenuShell_signal_deactivate_info);
+}
+
+Glib::SignalProxy0< void > MenuShell::signal_selection_done()
+{
+ return Glib::SignalProxy0< void >(this, &MenuShell_signal_selection_done_info);
+}
+
+
+void Gtk::MenuShell::on_deactivate()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->deactivate)
+ (*base->deactivate)(gobj());
+}
+
+void Gtk::MenuShell::on_selection_done()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->selection_done)
+ (*base->selection_done)(gobj());
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/menushell.h b/libs/gtkmm2/gtk/gtkmm/menushell.h
new file mode 100644
index 0000000000..c5ad744828
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/menushell.h
@@ -0,0 +1,288 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_MENUSHELL_H
+#define _GTKMM_MENUSHELL_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gdk/gdkkeysyms.h>
+
+
+#include <gtkmm/container.h>
+#include <gtkmm/menu_elems.h>
+#include <glibmm/helperlist.h>
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkMenuShell GtkMenuShell;
+typedef struct _GtkMenuShellClass GtkMenuShellClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class MenuShell_Class; } // namespace Gtk
+namespace Gtk
+{
+
+class Menu;
+class MenuShell;
+class Window;
+
+namespace Menu_Helpers
+{
+
+/*********************************************************************
+***** List properties
+*********************************************************************/
+
+
+class MenuList : public Glib::HelperList< MenuItem, const Element, Glib::List_Cpp_Iterator<GtkMenuItem,MenuItem> >
+{
+public:
+ MenuList();
+ explicit MenuList(GtkMenuShell* gparent);
+ MenuList(const MenuList& src);
+ virtual ~MenuList() {}
+
+ MenuList& operator=(const MenuList& src);
+
+ typedef Glib::HelperList< MenuItem, const Element, Glib::List_Cpp_Iterator<GtkMenuItem,MenuItem> > type_base;
+
+ GtkMenuShell* gparent();
+ const GtkMenuShell* gparent() const;
+
+ virtual GList*& glist() const; // front of list
+
+ virtual void erase(iterator start, iterator stop);
+ virtual iterator erase(iterator); //Implented as custom or by LIST_CONTAINER_REMOVE
+ virtual void remove(const_reference); //Implented as custom or by LIST_CONTAINER_REMOVE
+
+ /// This is order n. (use at own risk)
+ reference operator[](size_type l) const;
+
+public:
+ iterator insert(iterator position, element_type& e); //custom-implemented.
+
+ template <class InputIterator>
+ inline void insert(iterator position, InputIterator first, InputIterator last)
+ {
+ for(;first != last; ++first)
+ position = insert(position, *first);
+ }
+
+ inline void push_front(element_type& e)
+ { insert(begin(), e); }
+ inline void push_back(element_type& e)
+ { insert(end(), e); }
+
+
+ virtual void remove(Widget& widget); //custom
+ };
+
+
+} // namespace Menu_Helpers
+
+
+/** The abstract base class for Gtk::Menu and Gtk::MenuBar.
+ * It is a container of Gtk::MenuItem objects arranged in a list which can be navigated, selected, and activated by the user to perform application functions.
+ * It can have a submenu associated with it, allowing for nested hierarchical menus.
+ * You can use append(), prepend() and insert() to add Gtk::MenuItem widgets,
+ * but you will probably find it more convenient to use the STL-style items() interface with the Gtk::Menu_Helpers::MenuElem() class.
+ * @ingroup Widgets
+ * @ingroup Containers
+ * @ingroup Menus
+ */
+
+class MenuShell : public Container
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef MenuShell CppObjectType;
+ typedef MenuShell_Class CppClassType;
+ typedef GtkMenuShell BaseObjectType;
+ typedef GtkMenuShellClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~MenuShell();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class MenuShell_Class;
+ static CppClassType menushell_class_;
+
+ // noncopyable
+ MenuShell(const MenuShell&);
+ MenuShell& operator=(const MenuShell&);
+
+protected:
+ explicit MenuShell(const Glib::ConstructParams& construct_params);
+ explicit MenuShell(GtkMenuShell* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkMenuShell* gobj() { return reinterpret_cast<GtkMenuShell*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkMenuShell* gobj() const { return reinterpret_cast<GtkMenuShell*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_deactivate();
+ virtual void on_selection_done();
+
+
+private:
+
+
+public:
+
+
+ typedef Menu_Helpers::MenuList MenuList;
+ friend class Menu_Helpers::MenuList;
+
+
+ void append(MenuItem& menu_item);
+
+ void prepend(MenuItem& menu_item);
+
+ void insert(MenuItem& menu_item, int position);
+
+
+ void select_item(MenuItem& menu_item);
+
+ void deselect();
+
+ //TODO: Is force_deactivate = false a good default?
+
+ void activate_item(MenuItem& menu_item, bool force_deactivate = false);
+
+ /** Select the first visible or selectable child of the menu shell;
+ * don't select tearoff items unless the only item is a tearoff
+ * item.
+ *
+ * Since: 2.2
+ * @param search_sensitive If <tt>true</tt>, search for the first selectable
+ * menu item, otherwise select nothing if
+ * the first item isn't sensitive. This
+ * should be <tt>false</tt> if the menu is being
+ * popped up initially.
+ */
+ void select_first(bool search_sensitive = true);
+
+ void deactivate();
+
+ /** Cancels the selection within the menu shell.
+ *
+ * Since: 2.4
+ */
+ void cancel();
+
+
+ Glib::SignalProxy0< void > signal_deactivate();
+
+
+ Glib::SignalProxy0< void > signal_selection_done();
+
+
+ //Keybinding signals:
+
+
+ MenuList& items();
+ const MenuList& items() const;
+
+ /**
+ * Initializes menu accelerators.
+ * This method initializes the menu accelerators. Therefore an
+ * AccelGroup object is needed which is stored in each Window object
+ * in the Gtkmm library implementation.
+ *
+ * When using MenuBar and OptionMenu objects this method is called
+ * automatically when the menus are realized. Because most likely the
+ * MenuBar and OptionMenu is attached to a window at this time and
+ * the window object can be found automatically.
+ *
+ * Important note when using popup menus:
+ * If you are using accelerated menu entries inside a popup
+ * menu you have to call the accelerate() method manually. This is
+ * because the popup menu is not connected to any window and the
+ * accelerators should be initialized even before the popup menu is
+ * shown. The right place to call the accelerate() method is right
+ * after the popup menu has been build.
+ *
+ * @param window Window where the menu is shown. Inside this window
+ * the AccelGroup object is stored that will be used to initialize
+ * the accelerators.
+ */
+ void accelerate(Window& window);
+
+ /**
+ * Initializes menu accelerators.
+ * Does the same as the accelerate(Window& window) method. But you can
+ * use any parent widget where the menu is used. This method then gets
+ * the toplevel window using Widget::get_toplevel() and uses this
+ * window for registering the menu accelerators.
+ *
+ * @param parent Parent widget used as starting point for searching
+ * the toplevel window.
+ */
+ void accelerate(Widget& parent);
+
+protected:
+ MenuShell();
+
+
+private:
+
+
+ MenuList items_proxy_;
+ Gtk::Window* accel_window_;
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::MenuShell
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::MenuShell* wrap(GtkMenuShell* object, bool take_copy = false);
+}
+#endif /* _GTKMM_MENUSHELL_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/menutoolbutton.cc b/libs/gtkmm2/gtk/gtkmm/menutoolbutton.cc
new file mode 100644
index 0000000000..8cb38dca61
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/menutoolbutton.cc
@@ -0,0 +1,247 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/menutoolbutton.h>
+#include <gtkmm/private/menutoolbutton_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 2003 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkmenutoolbutton.h>
+
+namespace Gtk
+{
+
+MenuToolButton::MenuToolButton(const Glib::ustring& label)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::ToolButton(Glib::ConstructParams(menutoolbutton_class_.init(), "label", label.c_str(), (char*) 0))
+{
+}
+
+MenuToolButton::MenuToolButton(Widget& icon_widget, const Glib::ustring& label)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::ToolButton(Glib::ConstructParams(menutoolbutton_class_.init(), "icon_widget", (icon_widget).gobj(), "label", label.c_str(), (char*) 0))
+{
+}
+
+} // namespace Gtk
+
+
+namespace
+{
+
+const Glib::SignalProxyInfo MenuToolButton_signal_show_menu_info =
+{
+ "show_menu",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::MenuToolButton* wrap(GtkMenuToolButton* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::MenuToolButton *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& MenuToolButton_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &MenuToolButton_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_menu_tool_button_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void MenuToolButton_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->show_menu = &show_menu_callback;
+}
+
+
+void MenuToolButton_Class::show_menu_callback(GtkMenuToolButton* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_show_menu();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->show_menu)
+ (*base->show_menu)(self);
+ }
+}
+
+
+Glib::ObjectBase* MenuToolButton_Class::wrap_new(GObject* o)
+{
+ return manage(new MenuToolButton((GtkMenuToolButton*)(o)));
+
+}
+
+
+/* The implementation: */
+
+MenuToolButton::MenuToolButton(const Glib::ConstructParams& construct_params)
+:
+ Gtk::ToolButton(construct_params)
+{
+ }
+
+MenuToolButton::MenuToolButton(GtkMenuToolButton* castitem)
+:
+ Gtk::ToolButton((GtkToolButton*)(castitem))
+{
+ }
+
+MenuToolButton::~MenuToolButton()
+{
+ destroy_();
+}
+
+MenuToolButton::CppClassType MenuToolButton::menutoolbutton_class_; // initialize static member
+
+GType MenuToolButton::get_type()
+{
+ return menutoolbutton_class_.init().get_type();
+}
+
+GType MenuToolButton::get_base_type()
+{
+ return gtk_menu_tool_button_get_type();
+}
+
+
+MenuToolButton::MenuToolButton()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::ToolButton(Glib::ConstructParams(menutoolbutton_class_.init()))
+{
+ }
+
+MenuToolButton::MenuToolButton(const Gtk::StockID& stock_id)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::ToolButton(Glib::ConstructParams(menutoolbutton_class_.init(), "stock_id", (stock_id).get_c_str(), (char*) 0))
+{
+ }
+
+void MenuToolButton::set_menu(Menu& menu)
+{
+ gtk_menu_tool_button_set_menu(gobj(), (menu).Gtk::Widget::gobj());
+}
+
+Menu* MenuToolButton::get_menu()
+{
+ return Glib::wrap((GtkMenu*)(gtk_menu_tool_button_get_menu(gobj())));
+}
+
+const Menu* MenuToolButton::get_menu() const
+{
+ return Glib::wrap((GtkMenu*)(gtk_menu_tool_button_get_menu(const_cast<GtkMenuToolButton*>(gobj()))));
+}
+
+void MenuToolButton::set_arrow_tooltip(Tooltips& tooltips, const Glib::ustring& tip_text, const Glib::ustring& tip_private)
+{
+ gtk_menu_tool_button_set_arrow_tooltip(gobj(), (tooltips).gobj(), tip_text.c_str(), tip_private.c_str());
+}
+
+
+Glib::SignalProxy0< void > MenuToolButton::signal_show_menu()
+{
+ return Glib::SignalProxy0< void >(this, &MenuToolButton_signal_show_menu_info);
+}
+
+
+Glib::PropertyProxy<Menu*> MenuToolButton::property_menu()
+{
+ return Glib::PropertyProxy<Menu*>(this, "menu");
+}
+
+Glib::PropertyProxy_ReadOnly<Menu*> MenuToolButton::property_menu() const
+{
+ return Glib::PropertyProxy_ReadOnly<Menu*>(this, "menu");
+}
+
+
+void Gtk::MenuToolButton::on_show_menu()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->show_menu)
+ (*base->show_menu)(gobj());
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/menutoolbutton.h b/libs/gtkmm2/gtk/gtkmm/menutoolbutton.h
new file mode 100644
index 0000000000..a8d6be8055
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/menutoolbutton.h
@@ -0,0 +1,196 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_MENUTOOLBUTTON_H
+#define _GTKMM_MENUTOOLBUTTON_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* box.h
+ *
+ * Copyright (C) 2003 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/toolbutton.h>
+#include <gtkmm/menu.h>
+#include <gtkmm/tooltips.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkMenuToolButton GtkMenuToolButton;
+typedef struct _GtkMenuToolButtonClass GtkMenuToolButtonClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class MenuToolButton_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** A Gtk::ToolItem containing a toggle button.
+ *
+ * A MenuToolButton is a Gtk::ToolItem that contains a menu.
+ * @ingroup Widgets
+ */
+
+class MenuToolButton : public ToolButton
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef MenuToolButton CppObjectType;
+ typedef MenuToolButton_Class CppClassType;
+ typedef GtkMenuToolButton BaseObjectType;
+ typedef GtkMenuToolButtonClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~MenuToolButton();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class MenuToolButton_Class;
+ static CppClassType menutoolbutton_class_;
+
+ // noncopyable
+ MenuToolButton(const MenuToolButton&);
+ MenuToolButton& operator=(const MenuToolButton&);
+
+protected:
+ explicit MenuToolButton(const Glib::ConstructParams& construct_params);
+ explicit MenuToolButton(GtkMenuToolButton* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkMenuToolButton* gobj() { return reinterpret_cast<GtkMenuToolButton*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkMenuToolButton* gobj() const { return reinterpret_cast<GtkMenuToolButton*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_show_menu();
+
+
+private:
+
+public:
+
+ /** Creates a new MenuToolButton.
+ */
+ MenuToolButton();
+
+ /** Creates a new MenuToolButton from a StockID.
+ *
+ * The MenuToolButton will be created according to the @a stock_id properties.
+ *
+ * @param stock_id The StockID which determines the look of the MenuToolButton.
+ */
+ explicit MenuToolButton(const Gtk::StockID& stock_id);
+
+ /** Creates a new MenuToolButton with a label.
+ *
+ * The MenuToolButton will have the label @a label.
+ *
+ * @param label The string used to display the label for this MenuToolButton.
+ */
+ explicit MenuToolButton(const Glib::ustring& label);
+
+ /** Creates a new MenuToolButton with an image.
+ *
+ * The MenuToolButton will have the label @a label and an image widget @a icon_widget.
+ *
+ * @param icon_widget The widget placed as the MenuToolButton's icon.
+ * @param label The string used to display the label for this MenuToolButton.
+ */
+ explicit MenuToolButton(Widget& icon_widget, const Glib::ustring& label = Glib::ustring());
+
+
+ /** Sets the Gtk::Menu that is popped up when the user clicks on the arrow.
+ * If @a menu is <tt>0</tt>, the arrow button becomes insensitive.
+ *
+ * Since: 2.6
+ * @param menu The Gtk::Menu associated with Gtk::MenuToolButton.
+ */
+ void set_menu(Menu& menu);
+
+ /** Gets the Gtk::Menu associated with Gtk::MenuToolButton.
+ * @return The Gtk::Menu associated with Gtk::MenuToolButton
+ *
+ * Since: 2.6.
+ */
+ Menu* get_menu();
+
+ /** Gets the Gtk::Menu associated with Gtk::MenuToolButton.
+ * @return The Gtk::Menu associated with Gtk::MenuToolButton
+ *
+ * Since: 2.6.
+ */
+ const Menu* get_menu() const;
+
+
+ void set_arrow_tooltip(Tooltips& tooltips, const Glib::ustring& tip_text, const Glib::ustring& tip_private);
+
+
+ Glib::SignalProxy0< void > signal_show_menu();
+
+ /** The dropdown menu.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Menu*> property_menu() ;
+
+/** The dropdown menu.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Menu*> property_menu() const;
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::MenuToolButton
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::MenuToolButton* wrap(GtkMenuToolButton* object, bool take_copy = false);
+}
+#endif /* _GTKMM_MENUTOOLBUTTON_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/messagedialog.cc b/libs/gtkmm2/gtk/gtkmm/messagedialog.cc
new file mode 100644
index 0000000000..4a86cc5f1f
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/messagedialog.cc
@@ -0,0 +1,189 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/messagedialog.h>
+#include <gtkmm/private/messagedialog_p.h>
+
+#include <gtk/gtktypebuiltins.h>
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkmessagedialog.h>
+#include <gtk/gtklabel.h>
+
+
+namespace Gtk
+{
+
+MessageDialog::MessageDialog(const Glib::ustring& message, bool use_markup,
+ MessageType type, ButtonsType buttons,
+ bool modal)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Dialog(Glib::ConstructParams(messagedialog_class_.init(), "message_type",(GtkMessageType)type,"buttons",(GtkButtonsType)buttons, (char*) 0))
+{
+ set_modal(modal);
+ set_message(message, use_markup);
+}
+
+MessageDialog::MessageDialog(Gtk::Window& parent, const Glib::ustring& message, bool use_markup,
+ MessageType type, ButtonsType buttons,
+ bool modal)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Dialog(Glib::ConstructParams(messagedialog_class_.init(), "message_type",(GtkMessageType)type,"buttons",(GtkButtonsType)buttons, (char*) 0))
+{
+ set_modal(modal);
+ set_transient_for(parent);
+ set_message(message, use_markup);
+}
+
+void MessageDialog::set_message(const Glib::ustring& message, bool use_markup)
+{
+ // TODO: GTK+ bug: The label widget is really a <private> struct field.
+ // There should really be a message property.
+
+ if(use_markup)
+ gtk_message_dialog_set_markup(gobj(), message.c_str());
+ else
+ gtk_label_set_text(GTK_LABEL(gobj()->label), message.c_str());
+}
+
+void MessageDialog::set_secondary_text(const Glib::ustring& text, bool use_markup)
+{
+ if(use_markup)
+ gtk_message_dialog_format_secondary_markup(gobj(), text.c_str());
+ else
+ gtk_message_dialog_format_secondary_text(gobj(), text.c_str());
+}
+
+} // namespace Gtk
+
+
+namespace
+{
+} // anonymous namespace
+
+// static
+GType Glib::Value<Gtk::MessageType>::value_type()
+{
+ return gtk_message_type_get_type();
+}
+
+// static
+GType Glib::Value<Gtk::ButtonsType>::value_type()
+{
+ return gtk_buttons_type_get_type();
+}
+
+
+namespace Glib
+{
+
+Gtk::MessageDialog* wrap(GtkMessageDialog* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::MessageDialog *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& MessageDialog_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &MessageDialog_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_message_dialog_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void MessageDialog_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* MessageDialog_Class::wrap_new(GObject* o)
+{
+ return new MessageDialog((GtkMessageDialog*)(o)); //top-level windows can not be manage()ed.
+
+}
+
+
+/* The implementation: */
+
+MessageDialog::MessageDialog(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Dialog(construct_params)
+{
+ }
+
+MessageDialog::MessageDialog(GtkMessageDialog* castitem)
+:
+ Gtk::Dialog((GtkDialog*)(castitem))
+{
+ }
+
+MessageDialog::~MessageDialog()
+{
+ destroy_();
+}
+
+MessageDialog::CppClassType MessageDialog::messagedialog_class_; // initialize static member
+
+GType MessageDialog::get_type()
+{
+ return messagedialog_class_.init().get_type();
+}
+
+GType MessageDialog::get_base_type()
+{
+ return gtk_message_dialog_get_type();
+}
+
+
+void MessageDialog::set_markup(const Glib::ustring& str)
+{
+ gtk_message_dialog_set_markup(gobj(), str.c_str());
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/messagedialog.h b/libs/gtkmm2/gtk/gtkmm/messagedialog.h
new file mode 100644
index 0000000000..68519df606
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/messagedialog.h
@@ -0,0 +1,228 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_MESSAGEDIALOG_H
+#define _GTKMM_MESSAGEDIALOG_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* messagedialog.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/dialog.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkMessageDialog GtkMessageDialog;
+typedef struct _GtkMessageDialogClass GtkMessageDialogClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class MessageDialog_Class; } // namespace Gtk
+namespace Gtk
+{
+
+
+/** @addtogroup gtkmmEnums Enums and Flags */
+
+/**
+ * @ingroup gtkmmEnums
+ */
+enum MessageType
+{
+ MESSAGE_INFO,
+ MESSAGE_WARNING,
+ MESSAGE_QUESTION,
+ MESSAGE_ERROR
+};
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::MessageType> : public Glib::Value_Enum<Gtk::MessageType>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+/**
+ * @ingroup gtkmmEnums
+ */
+enum ButtonsType
+{
+ BUTTONS_NONE,
+ BUTTONS_OK,
+ BUTTONS_CLOSE,
+ BUTTONS_CANCEL,
+ BUTTONS_YES_NO,
+ BUTTONS_OK_CANCEL
+};
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::ButtonsType> : public Glib::Value_Enum<Gtk::ButtonsType>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+
+/** Convenient message window.
+ *
+ * Gtk::MessageDialog presents a dialog with an image representing the type
+ * of message (Error, Question, etc.) alongside some message text. It's
+ * simply a convenience widget; you could construct the equivalent of
+ * Gtk::MessageDialog from Gtk::Dialog without too much effort, but
+ * Gtk::MessageDialog saves typing.
+ *
+ * @ingroup Dialogs
+ */
+
+class MessageDialog : public Dialog
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef MessageDialog CppObjectType;
+ typedef MessageDialog_Class CppClassType;
+ typedef GtkMessageDialog BaseObjectType;
+ typedef GtkMessageDialogClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~MessageDialog();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class MessageDialog_Class;
+ static CppClassType messagedialog_class_;
+
+ // noncopyable
+ MessageDialog(const MessageDialog&);
+ MessageDialog& operator=(const MessageDialog&);
+
+protected:
+ explicit MessageDialog(const Glib::ConstructParams& construct_params);
+ explicit MessageDialog(GtkMessageDialog* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkMessageDialog* gobj() { return reinterpret_cast<GtkMessageDialog*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkMessageDialog* gobj() const { return reinterpret_cast<GtkMessageDialog*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+
+public:
+ explicit MessageDialog(const Glib::ustring& message, bool use_markup = false, MessageType type = MESSAGE_INFO, ButtonsType buttons = BUTTONS_OK, bool modal = false);
+ MessageDialog(Gtk::Window& parent, const Glib::ustring& message, bool use_markup = false, MessageType type = MESSAGE_INFO, ButtonsType buttons = BUTTONS_OK, bool modal = false);
+
+
+ /** @deprecated Use set_message(string, true);
+ */
+
+ /** Sets the text of the message dialog to be @a str , which is marked
+ * up with the Pango text markup
+ * language.
+ *
+ * Since: 2.4
+ * @param str Markup string (see Pango markup format).
+ */
+ void set_markup(const Glib::ustring& str);
+
+ /** Sets the primary text of the message dialog.
+ *
+ * @param text The message.
+ * @param use_markup Whether @a message contains pango markup.
+ */
+ void set_message(const Glib::ustring& message, bool use_markup = false);
+
+
+ /** Sets the secondary text of the message dialog.
+ * Note that setting a secondary text makes the primary text become bold, unless you have provided explicit markup.
+ *
+ * Since 2.6.
+ *
+ * @param text The message.
+ * @param use_markup Whether @a message contains pango markup.
+ */
+ void set_secondary_text(const Glib::ustring& text, bool use_markup = false);
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::MessageDialog
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::MessageDialog* wrap(GtkMessageDialog* object, bool take_copy = false);
+}
+#endif /* _GTKMM_MESSAGEDIALOG_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/misc.cc b/libs/gtkmm2/gtk/gtkmm/misc.cc
new file mode 100644
index 0000000000..e3b73f70c9
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/misc.cc
@@ -0,0 +1,200 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/misc.h>
+#include <gtkmm/private/misc_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkmisc.h>
+
+namespace Gtk
+{
+
+} //namespace Gtk
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::Misc* wrap(GtkMisc* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::Misc *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Misc_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Misc_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_misc_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Misc_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* Misc_Class::wrap_new(GObject* o)
+{
+ return manage(new Misc((GtkMisc*)(o)));
+
+}
+
+
+/* The implementation: */
+
+Misc::Misc(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Widget(construct_params)
+{
+ }
+
+Misc::Misc(GtkMisc* castitem)
+:
+ Gtk::Widget((GtkWidget*)(castitem))
+{
+ }
+
+Misc::~Misc()
+{
+ destroy_();
+}
+
+Misc::CppClassType Misc::misc_class_; // initialize static member
+
+GType Misc::get_type()
+{
+ return misc_class_.init().get_type();
+}
+
+GType Misc::get_base_type()
+{
+ return gtk_misc_get_type();
+}
+
+
+Misc::Misc()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Widget(Glib::ConstructParams(misc_class_.init()))
+{
+ }
+
+void Misc::set_alignment(float xalign, float yalign)
+{
+ gtk_misc_set_alignment(gobj(), xalign, yalign);
+}
+
+void Misc::set_alignment(AlignmentEnum xalign, AlignmentEnum yalign)
+{
+ gtk_misc_set_alignment(gobj(), _gtkmm_align_float_from_enum(xalign), _gtkmm_align_float_from_enum(yalign));
+}
+
+void Misc::get_alignment(float& xalign, float& yalign) const
+{
+ gtk_misc_get_alignment(const_cast<GtkMisc*>(gobj()), &(xalign), &(yalign));
+}
+
+void Misc::set_padding(int xpad, int ypad)
+{
+ gtk_misc_set_padding(gobj(), xpad, ypad);
+}
+
+void Misc::get_padding(int& xpad, int& ypad) const
+{
+ gtk_misc_get_padding(const_cast<GtkMisc*>(gobj()), &xpad, &ypad);
+}
+
+
+Glib::PropertyProxy<float> Misc::property_xalign()
+{
+ return Glib::PropertyProxy<float>(this, "xalign");
+}
+
+Glib::PropertyProxy_ReadOnly<float> Misc::property_xalign() const
+{
+ return Glib::PropertyProxy_ReadOnly<float>(this, "xalign");
+}
+
+Glib::PropertyProxy<float> Misc::property_yalign()
+{
+ return Glib::PropertyProxy<float>(this, "yalign");
+}
+
+Glib::PropertyProxy_ReadOnly<float> Misc::property_yalign() const
+{
+ return Glib::PropertyProxy_ReadOnly<float>(this, "yalign");
+}
+
+Glib::PropertyProxy<int> Misc::property_xpad()
+{
+ return Glib::PropertyProxy<int>(this, "xpad");
+}
+
+Glib::PropertyProxy_ReadOnly<int> Misc::property_xpad() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "xpad");
+}
+
+Glib::PropertyProxy<int> Misc::property_ypad()
+{
+ return Glib::PropertyProxy<int>(this, "ypad");
+}
+
+Glib::PropertyProxy_ReadOnly<int> Misc::property_ypad() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "ypad");
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/misc.h b/libs/gtkmm2/gtk/gtkmm/misc.h
new file mode 100644
index 0000000000..1d1a32d794
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/misc.h
@@ -0,0 +1,212 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_MISC_H
+#define _GTKMM_MISC_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* misc.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/widget.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkMisc GtkMisc;
+typedef struct _GtkMiscClass GtkMiscClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class Misc_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** A base class for widgets with alignments and padding.
+ *
+ * This is an abstract for a set of utility widgets
+ * that lack a physical window. They do have
+ * alignment and padding within their defined space.
+ *
+ * Without a window, widgets of this type cannot capture events.
+ * To capture events place in Gtk::EventBox.
+ *
+ */
+
+class Misc : public Widget
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Misc CppObjectType;
+ typedef Misc_Class CppClassType;
+ typedef GtkMisc BaseObjectType;
+ typedef GtkMiscClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~Misc();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class Misc_Class;
+ static CppClassType misc_class_;
+
+ // noncopyable
+ Misc(const Misc&);
+ Misc& operator=(const Misc&);
+
+protected:
+ explicit Misc(const Glib::ConstructParams& construct_params);
+ explicit Misc(GtkMisc* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkMisc* gobj() { return reinterpret_cast<GtkMisc*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkMisc* gobj() const { return reinterpret_cast<GtkMisc*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+protected:
+ Misc();
+public:
+
+
+ void set_alignment(float xalign = 0.0, float yalign = 0.5);
+
+ void set_alignment(AlignmentEnum xalign = Gtk::ALIGN_LEFT, AlignmentEnum yalign = Gtk::ALIGN_CENTER);
+
+
+ /** Gets the X and Y alignment of the widget within its allocation. See
+ * set_alignment().
+ * @param xalign Location to store X alignment of @a misc , or <tt>0</tt>.
+ * @param yalign Location to store Y alignment of @a misc , or <tt>0</tt>.
+ */
+ void get_alignment(float& xalign, float& yalign) const;
+
+
+ void set_padding(int xpad, int ypad);
+
+ /** Gets the padding in the X and Y directions of the widget. See set_padding().
+ * @param xpad Location to store padding in the X direction, or <tt>0</tt>.
+ * @param ypad Location to store padding in the Y direction, or <tt>0</tt>.
+ */
+ void get_padding(int& xpad, int& ypad) const;
+
+ /** The horizontal alignment
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<float> property_xalign() ;
+
+/** The horizontal alignment
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<float> property_xalign() const;
+
+ /** The vertical alignment
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<float> property_yalign() ;
+
+/** The vertical alignment
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<float> property_yalign() const;
+
+ /** The amount of space to add on the left and right of the widget
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_xpad() ;
+
+/** The amount of space to add on the left and right of the widget
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_xpad() const;
+
+ /** The amount of space to add on the top and bottom of the widget
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_ypad() ;
+
+/** The amount of space to add on the top and bottom of the widget
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_ypad() const;
+
+
+};
+
+} /* namespace Gtk */
+
+
+namespace Glib
+{
+ /** @relates Gtk::Misc
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::Misc* wrap(GtkMisc* object, bool take_copy = false);
+}
+#endif /* _GTKMM_MISC_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/notebook.cc b/libs/gtkmm2/gtk/gtkmm/notebook.cc
new file mode 100644
index 0000000000..7ff83da6d1
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/notebook.cc
@@ -0,0 +1,910 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/notebook.h>
+#include <gtkmm/private/notebook_p.h>
+
+#include <gtk/gtktypebuiltins.h>
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtknotebook.h>
+#include <gtkmm/label.h>
+
+
+namespace Gtk
+{
+
+namespace Notebook_Helpers
+{
+
+/**** Gtk::Notebook_Helpers::PageIterator **********************************/
+
+bool PageIterator::equal(const PageIterator& other) const
+{
+ return (node_ == other.node_);
+}
+
+PageIterator::operator bool() const
+{
+ return (node_ != 0);
+}
+
+PageIterator& PageIterator::operator++()
+{
+ g_return_val_if_fail(node_ != 0, *this);
+
+ node_ = node_->next;
+ return *this;
+}
+
+const PageIterator PageIterator::operator++(int)
+{
+ const PageIterator tmp (*this);
+ this->operator++();
+ return tmp;
+}
+
+PageIterator& PageIterator::operator--()
+{
+ if(node_)
+ node_ = node_->prev;
+ else
+ node_ = g_list_last(parent_->gobj()->children);
+
+ return *this;
+}
+
+const PageIterator PageIterator::operator--(int)
+{
+ const PageIterator tmp (*this);
+ this->operator--();
+ return tmp;
+}
+
+
+/*********************************************************************
+***** Page Properties
+*********************************************************************/
+
+int Page::get_page_num() const
+{
+ return g_list_position(parent_->gobj()->children, node_);
+}
+
+Widget* Page::get_child() const
+{
+ return parent_->get_nth_page(get_page_num());
+}
+
+Widget* Page::get_tab_label() const
+{
+ return parent_->get_tab_label(*get_child());
+}
+
+void Page::set_tab_label(Widget& tab_label)
+{
+ parent_->set_tab_label(*get_child(), tab_label);
+}
+
+void Page::set_tab_label_text(const Glib::ustring& tab_text)
+{
+ parent_->set_tab_label_text(*get_child(), tab_text);
+}
+
+Glib::ustring Page::get_tab_label_text() const
+{
+ return parent_->get_tab_label_text(*get_child());
+}
+
+Widget* Page::get_menu_label() const
+{
+ return parent_->get_menu_label(*get_child());
+}
+
+void Page::set_menu_label(Widget& menu_label)
+{
+ parent_->set_menu_label(*get_child(), menu_label);
+}
+
+void Page::set_menu_label_text(const Glib::ustring& menu_text)
+{
+ parent_->set_menu_label_text(*get_child(), menu_text);
+}
+
+Glib::ustring Page::get_menu_label_text() const
+{
+ return parent_->get_menu_label_text(*get_child());
+}
+
+void Page::query_tab_label_packing(bool& expand, bool& fill, PackType& pack_type)
+{
+ parent_->query_tab_label_packing(*get_child(), expand, fill, pack_type);
+}
+
+void Page::set_tab_label_packing(bool expand, bool fill, PackType pack_type)
+{
+ parent_->set_tab_label_packing(*get_child(), expand, fill, pack_type);
+}
+
+/*********************************************************************
+***** List properties
+*********************************************************************/
+PageList::PageList()
+:
+ gparent_ (0)
+{}
+
+PageList::PageList(GtkNotebook* gparent)
+:
+ gparent_ (gparent)
+{}
+
+PageList::PageList(const PageList& src)
+{
+ operator=(src);
+}
+
+PageList& PageList::operator=(const PageList& src)
+{
+ gparent_ = src.gparent_;
+ return *this;
+}
+
+PageList::size_type PageList::max_size() const
+{
+ return G_MAXINT;
+}
+
+bool PageList::empty() const
+{
+ return (gparent_->children == 0);
+}
+
+PageList::size_type PageList::size() const
+{
+ return g_list_length(gparent_->children);
+}
+
+PageList::value_type PageList::front() const
+{
+ return *begin();
+}
+
+PageList::value_type PageList::back() const
+{
+ iterator pend (end());
+ return *--pend;
+}
+
+PageList::value_type PageList::operator[](size_type index) const
+{
+ GList *const node = g_list_nth(gparent_->children, index);
+ g_assert(node != 0);
+
+ return *iterator(Glib::wrap(gparent_), node);
+}
+
+PageList::iterator PageList::insert(PageList::iterator position, const Element& elem)
+{
+ // Get the iterator index, or -1 for end().
+ const int index = (position) ? position->get_page_num() : -1;
+
+ // Give item to GTK+.
+ gtk_notebook_insert_page_menu(gparent_,
+ Glib::unwrap(elem.child_),
+ Glib::unwrap(elem.tab_),
+ Glib::unwrap(elem.menu_),
+ index);
+
+ // Return an iterator pointing to the inserted element.
+ return --position;
+}
+
+void PageList::erase(PageList::iterator start, PageList::iterator stop)
+{
+ while(start != stop)
+ start = erase(start);
+}
+
+PageList::iterator PageList::erase(PageList::iterator position)
+{
+ iterator next (position);
+
+ if(position)
+ {
+ ++next;
+ gtk_container_remove(GTK_CONTAINER(gparent_), position->get_child()->gobj());
+ }
+
+ return next;
+}
+
+void PageList::remove(const_reference child)
+{
+// g_return_if_fail(child.parent_ != 0);
+ gtk_container_remove(GTK_CONTAINER(gparent_), child.get_child()->gobj());
+}
+
+void PageList::remove(Widget& widget)
+{
+ gtk_container_remove(GTK_CONTAINER(gparent_), widget.gobj());
+}
+
+void PageList::reorder(PageList::iterator position, PageList::iterator page)
+{
+ gtk_notebook_reorder_child(gparent(), page->get_child()->gobj(), position->get_page_num());
+}
+
+PageList::iterator PageList::find(int num)
+{
+ if(num < 0) return end();
+ int j = 0;
+ iterator i;
+ for(i = begin(), j = 0; i != end(), j < num; ++i, ++j);
+ return i;
+}
+
+PageList::iterator PageList::find(const_reference c)
+{
+ iterator i = begin();
+ for(i = begin(); i != end() && ((*i).get_child() != c.get_child()); i++);
+ return i;
+}
+
+PageList::iterator PageList::find(Widget& widget)
+{
+ iterator i;
+ for(i = begin(); i != end() && ((*i).get_child() != &widget); i++);
+ return i;
+}
+
+PageList::iterator PageList::find(GtkNotebookPage* page)
+{
+ GList* node = gparent_->children;
+
+ while(node && node->data != page)
+ node = node->next;
+
+ return (node) ? iterator(Glib::wrap(gparent_), node) : end();
+}
+
+void PageList::clear()
+{
+ erase(begin(), end());
+}
+
+PageList::iterator PageList::begin_() const
+{
+ return iterator(Glib::wrap(gparent_), gparent_->children);
+}
+
+PageList::iterator PageList::end_() const
+{
+ return iterator(Glib::wrap(gparent_), 0);
+}
+
+Element::Element(Widget* child, Widget* tab, Widget* menu)
+:
+ child_ (child),
+ tab_ (tab),
+ menu_ (menu)
+{}
+
+Element::Element(Widget& child, Widget& tab, Widget& menu)
+:
+ child_ (&child),
+ tab_ (&tab),
+ menu_ (&menu)
+{}
+
+Element::Element(Widget& child)
+:
+ child_ (&child),
+ tab_ (0),
+ menu_ (0)
+{}
+
+TabElem::TabElem(Widget& child, Widget& tab)
+:
+ Element(&child, &tab, 0)
+{}
+
+TabElem::TabElem(Widget& child, const Glib::ustring& label, bool mnemonic)
+:
+ Element(&child, manage(new Label(label, mnemonic)), 0)
+{}
+
+MenuElem::MenuElem(Widget& child, Widget& menu)
+:
+ Element(&child, 0, &menu)
+{}
+
+} /* namespace Notebook_Helpers */
+
+
+Notebook::PageList::iterator Notebook::get_current()
+{
+ return pages().find(get_current_page());
+}
+
+Notebook::PageList& Notebook::pages()
+{
+ pages_proxy_ = PageList(gobj());
+ return pages_proxy_;
+}
+
+const Notebook::PageList& Notebook::pages() const
+{
+ pages_proxy_ = PageList(const_cast<GtkNotebook*>(gobj()));
+ return pages_proxy_;
+}
+
+/*Widget* Notebook::get_current_page()
+{
+ return get_nth_page(get_current_page_num());
+}*/
+
+int Notebook::prepend_page(Widget& child, const Glib::ustring& tab_label, bool use_mnemonic)
+{
+ Label* pLabel = Gtk::manage( new Label(tab_label, use_mnemonic) );
+ return prepend_page(child, *pLabel);
+}
+
+int Notebook::prepend_page(Widget& child, const Glib::ustring& tab_label, const Glib::ustring& menu_label, bool use_mnemonic)
+{
+ Label* pLabel = Gtk::manage( new Label(tab_label, use_mnemonic) );
+ Label* pLabelMenu = Gtk::manage( new Label(menu_label, use_mnemonic) );
+ return prepend_page(child, *pLabel, *pLabelMenu);
+}
+
+int Notebook::append_page(Widget& child, const Glib::ustring& tab_label, bool use_mnemonic)
+{
+ Label* pLabel = Gtk::manage( new Label(tab_label, use_mnemonic) );
+ return append_page(child, *pLabel);
+}
+
+int Notebook::append_page(Widget& child, const Glib::ustring& tab_label, const Glib::ustring& menu_label, bool use_mnemonic)
+{
+ Label* pLabel = Gtk::manage( new Label(tab_label, use_mnemonic) );
+ Label* pLabelMenu = Gtk::manage( new Label(menu_label, use_mnemonic) );
+ return append_page(child, *pLabel, *pLabelMenu);
+}
+
+int Notebook::insert_page(Widget& child, const Glib::ustring& tab_label, int position, bool use_mnemonic)
+{
+ Label* pLabel = Gtk::manage( new Label(tab_label, use_mnemonic) );
+ return insert_page(child, *pLabel, position);
+}
+
+int Notebook::insert_page(Widget& child, const Glib::ustring& tab_label, const Glib::ustring& menu_label, int position, bool use_mnemonic)
+{
+ Label* pLabel = Gtk::manage( new Label(tab_label, use_mnemonic) );
+ Label* pLabelMenu = Gtk::manage( new Label(menu_label, use_mnemonic) );
+ return insert_page(child, *pLabel, *pLabelMenu, position);
+}
+
+void Notebook::remove_page(Widget& child)
+{
+ int pos = page_num(child);
+ if(pos != -1)
+ remove_page(pos);
+}
+
+void Notebook::query_tab_label_packing(Widget& child, bool& expand, bool& fill, PackType& pack_type)
+{
+ gboolean gexpand = false;
+ gboolean gfill = false;
+ GtkPackType gpack_type = GTK_PACK_START;
+ gtk_notebook_query_tab_label_packing(gobj(), child.gobj(), &gexpand, &gfill, &gpack_type);
+ expand = gexpand;
+ fill = gfill;
+ pack_type = (PackType)gpack_type;
+}
+
+int Notebook::prepend_page(Widget& child)
+{
+ return gtk_notebook_prepend_page(gobj(), child.gobj(), 0 /* see GTK+ docs */);
+}
+
+int Notebook::append_page(Widget& child)
+{
+ return gtk_notebook_append_page(gobj(), child.gobj(), 0 /* see GTK+ docs */);
+}
+
+int Notebook::insert_page(Widget& child, int position)
+{
+ return gtk_notebook_insert_page(gobj(), child.gobj(), 0 /* see GTK+ docs */, position);
+}
+
+} //namespace Gtk
+
+
+namespace
+{
+
+void Notebook_signal_switch_page_callback(GtkNotebook* self, GtkNotebookPage* p0,guint p1,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,GtkNotebookPage*,guint > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(p0, p1);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo Notebook_signal_switch_page_info =
+{
+ "switch_page",
+ (GCallback) &Notebook_signal_switch_page_callback,
+ (GCallback) &Notebook_signal_switch_page_callback
+};
+
+} // anonymous namespace
+
+// static
+GType Glib::Value<Gtk::NotebookTab>::value_type()
+{
+ return gtk_notebook_tab_get_type();
+}
+
+
+namespace Glib
+{
+
+Gtk::Notebook* wrap(GtkNotebook* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::Notebook *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Notebook_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Notebook_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_notebook_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Notebook_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->switch_page = &switch_page_callback;
+}
+
+
+void Notebook_Class::switch_page_callback(GtkNotebook* self, GtkNotebookPage* p0, guint p1)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_switch_page(p0, p1);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->switch_page)
+ (*base->switch_page)(self, p0, p1);
+ }
+}
+
+
+Glib::ObjectBase* Notebook_Class::wrap_new(GObject* o)
+{
+ return manage(new Notebook((GtkNotebook*)(o)));
+
+}
+
+
+/* The implementation: */
+
+Notebook::Notebook(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Container(construct_params)
+{
+ }
+
+Notebook::Notebook(GtkNotebook* castitem)
+:
+ Gtk::Container((GtkContainer*)(castitem))
+{
+ }
+
+Notebook::~Notebook()
+{
+ destroy_();
+}
+
+Notebook::CppClassType Notebook::notebook_class_; // initialize static member
+
+GType Notebook::get_type()
+{
+ return notebook_class_.init().get_type();
+}
+
+GType Notebook::get_base_type()
+{
+ return gtk_notebook_get_type();
+}
+
+
+Notebook::Notebook()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Container(Glib::ConstructParams(notebook_class_.init()))
+{
+ }
+
+int Notebook::prepend_page(Widget& child, Widget& tab_label)
+{
+ return gtk_notebook_prepend_page(gobj(), (child).gobj(), (tab_label).gobj());
+}
+
+int Notebook::prepend_page(Widget& child, Widget& tab_label, Widget& menu_label)
+{
+ return gtk_notebook_prepend_page_menu(gobj(), (child).gobj(), (tab_label).gobj(), (menu_label).gobj());
+}
+
+int Notebook::append_page(Widget& child, Widget& tab_label)
+{
+ return gtk_notebook_append_page(gobj(), (child).gobj(), (tab_label).gobj());
+}
+
+int Notebook::append_page(Widget& child, Widget& tab_label, Widget& menu_label)
+{
+ return gtk_notebook_append_page_menu(gobj(), (child).gobj(), (tab_label).gobj(), (menu_label).gobj());
+}
+
+int Notebook::insert_page(Widget& child, Widget& tab_label, int position)
+{
+ return gtk_notebook_insert_page(gobj(), (child).gobj(), (tab_label).gobj(), position);
+}
+
+int Notebook::insert_page(Widget& child, Widget& tab_label, Widget& menu_label, int position)
+{
+ return gtk_notebook_insert_page_menu(gobj(), (child).gobj(), (tab_label).gobj(), (menu_label).gobj(), position);
+}
+
+void Notebook::remove_page(int page_num)
+{
+ gtk_notebook_remove_page(gobj(), page_num);
+}
+
+int Notebook::get_current_page() const
+{
+ return gtk_notebook_get_current_page(const_cast<GtkNotebook*>(gobj()));
+}
+
+Widget* Notebook::get_nth_page(int page_num)
+{
+ return Glib::wrap(gtk_notebook_get_nth_page(gobj(), page_num));
+}
+
+const Widget* Notebook::get_nth_page(int page_num) const
+{
+ return Glib::wrap(gtk_notebook_get_nth_page(const_cast<GtkNotebook*>(gobj()), page_num));
+}
+
+int Notebook::get_n_pages()
+{
+ return gtk_notebook_get_n_pages(gobj());
+}
+
+int Notebook::page_num(const Widget& child)
+{
+ return gtk_notebook_page_num(gobj(), const_cast<GtkWidget*>((child).gobj()));
+}
+
+void Notebook::set_current_page(int page_num)
+{
+ gtk_notebook_set_current_page(gobj(), page_num);
+}
+
+void Notebook::next_page()
+{
+ gtk_notebook_next_page(gobj());
+}
+
+void Notebook::prev_page()
+{
+ gtk_notebook_prev_page(gobj());
+}
+
+void Notebook::set_show_border(bool show_border)
+{
+ gtk_notebook_set_show_border(gobj(), static_cast<int>(show_border));
+}
+
+bool Notebook::get_show_border() const
+{
+ return gtk_notebook_get_show_border(const_cast<GtkNotebook*>(gobj()));
+}
+
+void Notebook::set_show_tabs(bool show_tabs)
+{
+ gtk_notebook_set_show_tabs(gobj(), static_cast<int>(show_tabs));
+}
+
+bool Notebook::get_show_tabs() const
+{
+ return gtk_notebook_get_show_tabs(const_cast<GtkNotebook*>(gobj()));
+}
+
+void Notebook::set_tab_pos(PositionType pos)
+{
+ gtk_notebook_set_tab_pos(gobj(), ((GtkPositionType)(pos)));
+}
+
+PositionType Notebook::get_tab_pos() const
+{
+ return ((PositionType)(gtk_notebook_get_tab_pos(const_cast<GtkNotebook*>(gobj()))));
+}
+
+void Notebook::set_scrollable(bool scrollable)
+{
+ gtk_notebook_set_scrollable(gobj(), static_cast<int>(scrollable));
+}
+
+bool Notebook::get_scrollable() const
+{
+ return gtk_notebook_get_scrollable(const_cast<GtkNotebook*>(gobj()));
+}
+
+void Notebook::popup_enable()
+{
+ gtk_notebook_popup_enable(gobj());
+}
+
+void Notebook::popup_disable()
+{
+ gtk_notebook_popup_disable(gobj());
+}
+
+Widget* Notebook::get_tab_label(Widget& child)
+{
+ return Glib::wrap(gtk_notebook_get_tab_label(gobj(), (child).gobj()));
+}
+
+const Widget* Notebook::get_tab_label(Widget& child) const
+{
+ return Glib::wrap(gtk_notebook_get_tab_label(const_cast<GtkNotebook*>(gobj()), (child).gobj()));
+}
+
+void Notebook::set_tab_label(Widget& child, Widget& tab_label)
+{
+ gtk_notebook_set_tab_label(gobj(), (child).gobj(), (tab_label).gobj());
+}
+
+void Notebook::set_tab_label_text(Widget& child, const Glib::ustring& tab_text)
+{
+ gtk_notebook_set_tab_label_text(gobj(), (child).gobj(), tab_text.c_str());
+}
+
+Glib::ustring Notebook::get_tab_label_text(Widget& child) const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(gtk_notebook_get_tab_label_text(const_cast<GtkNotebook*>(gobj()), (child).gobj()));
+}
+
+Widget* Notebook::get_menu_label(Widget& child)
+{
+ return Glib::wrap(gtk_notebook_get_menu_label(gobj(), (child).gobj()));
+}
+
+const Widget* Notebook::get_menu_label(Widget& child) const
+{
+ return Glib::wrap(gtk_notebook_get_menu_label(const_cast<GtkNotebook*>(gobj()), (child).gobj()));
+}
+
+void Notebook::set_menu_label(Widget& child, Widget& menu_label)
+{
+ gtk_notebook_set_menu_label(gobj(), (child).gobj(), (menu_label).gobj());
+}
+
+void Notebook::set_menu_label_text(Widget& child, const Glib::ustring& menu_text)
+{
+ gtk_notebook_set_menu_label_text(gobj(), (child).gobj(), menu_text.c_str());
+}
+
+Glib::ustring Notebook::get_menu_label_text(Widget& child) const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(gtk_notebook_get_menu_label_text(const_cast<GtkNotebook*>(gobj()), (child).gobj()));
+}
+
+void Notebook::set_tab_label_packing(Widget& child, bool expand, bool fill, PackType pack_type)
+{
+ gtk_notebook_set_tab_label_packing(gobj(), (child).gobj(), static_cast<int>(expand), static_cast<int>(fill), ((GtkPackType)(pack_type)));
+}
+
+void Notebook::reorder_child(Widget& child, int position)
+{
+ gtk_notebook_reorder_child(gobj(), (child).gobj(), position);
+}
+
+
+Glib::SignalProxy2< void,GtkNotebookPage*,guint > Notebook::signal_switch_page()
+{
+ return Glib::SignalProxy2< void,GtkNotebookPage*,guint >(this, &Notebook_signal_switch_page_info);
+}
+
+
+Glib::PropertyProxy<PositionType> Notebook::property_tab_pos()
+{
+ return Glib::PropertyProxy<PositionType>(this, "tab-pos");
+}
+
+Glib::PropertyProxy_ReadOnly<PositionType> Notebook::property_tab_pos() const
+{
+ return Glib::PropertyProxy_ReadOnly<PositionType>(this, "tab-pos");
+}
+
+Glib::PropertyProxy<bool> Notebook::property_show_tabs()
+{
+ return Glib::PropertyProxy<bool>(this, "show-tabs");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Notebook::property_show_tabs() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "show-tabs");
+}
+
+Glib::PropertyProxy<bool> Notebook::property_show_border()
+{
+ return Glib::PropertyProxy<bool>(this, "show-border");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Notebook::property_show_border() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "show-border");
+}
+
+Glib::PropertyProxy<bool> Notebook::property_scrollable()
+{
+ return Glib::PropertyProxy<bool>(this, "scrollable");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Notebook::property_scrollable() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "scrollable");
+}
+
+Glib::PropertyProxy_WriteOnly<guint> Notebook::property_tab_border()
+{
+ return Glib::PropertyProxy_WriteOnly<guint>(this, "tab-border");
+}
+
+Glib::PropertyProxy_ReadOnly<guint> Notebook::property_tab_border() const
+{
+ return Glib::PropertyProxy_ReadOnly<guint>(this, "tab-border");
+}
+
+Glib::PropertyProxy<guint> Notebook::property_tab_hborder()
+{
+ return Glib::PropertyProxy<guint>(this, "tab-hborder");
+}
+
+Glib::PropertyProxy_ReadOnly<guint> Notebook::property_tab_hborder() const
+{
+ return Glib::PropertyProxy_ReadOnly<guint>(this, "tab-hborder");
+}
+
+Glib::PropertyProxy<guint> Notebook::property_tab_vborder()
+{
+ return Glib::PropertyProxy<guint>(this, "tab-vborder");
+}
+
+Glib::PropertyProxy_ReadOnly<guint> Notebook::property_tab_vborder() const
+{
+ return Glib::PropertyProxy_ReadOnly<guint>(this, "tab-vborder");
+}
+
+Glib::PropertyProxy<int> Notebook::property_page()
+{
+ return Glib::PropertyProxy<int>(this, "page");
+}
+
+Glib::PropertyProxy_ReadOnly<int> Notebook::property_page() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "page");
+}
+
+Glib::PropertyProxy<bool> Notebook::property_enable_popup()
+{
+ return Glib::PropertyProxy<bool>(this, "enable-popup");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Notebook::property_enable_popup() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "enable-popup");
+}
+
+Glib::PropertyProxy<bool> Notebook::property_homogeneous()
+{
+ return Glib::PropertyProxy<bool>(this, "homogeneous");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Notebook::property_homogeneous() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "homogeneous");
+}
+
+
+void Gtk::Notebook::on_switch_page(GtkNotebookPage* page, guint page_num)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->switch_page)
+ (*base->switch_page)(gobj(),page,page_num);
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/notebook.h b/libs/gtkmm2/gtk/gtkmm/notebook.h
new file mode 100644
index 0000000000..47378df9ed
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/notebook.h
@@ -0,0 +1,903 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_NOTEBOOK_H
+#define _GTKMM_NOTEBOOK_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* notebook.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/container.h>
+#include <gtkmm/label.h>
+//#include <gtk/gtknotebook.h>
+#include <glibmm/helperlist.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C"
+{
+ typedef struct _GtkNotebookPage GtkNotebookPage;
+}
+#endif //DOXYGEN_SHOULD_SKIP_THIS
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkNotebook GtkNotebook;
+typedef struct _GtkNotebookClass GtkNotebookClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class Notebook_Class; } // namespace Gtk
+namespace Gtk
+{
+
+
+/** @addtogroup gtkmmEnums Enums and Flags */
+
+/**
+ * @ingroup gtkmmEnums
+ */
+enum NotebookTab
+{
+ NOTEBOOK_TAB_FIRST,
+ NOTEBOOK_TAB_LAST
+};
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::NotebookTab> : public Glib::Value_Enum<Gtk::NotebookTab>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+
+class Notebook;
+
+namespace Notebook_Helpers
+{
+/*********************************************************************
+***** Elem classes
+*********************************************************************/
+
+class Page;
+
+/* Since the data stored in GtkNotebook's GList is inaccessible
+ * the iterator "PageIterator" has to hold a pointer to the Notebook
+ * that owns the list. "Page" (the value_type of "PageList")
+ * inherits "PageIterator" privately and uses Notebook-API-functions
+ * to retrieve and manipulate data.
+ *
+ * Note that PageIterator uses g_list_* functions just to step through
+ * the children and test for iterator equality instead of simply using
+ * the child index number. This is done because even if you use a
+ * child index number, you would still have to use g_list_length() to
+ * retrieve the number of elements. And using an element index results
+ * in iterators not staying valid on insertion/removal. This would only
+ * lead to fragile and unexpected behaviour.
+ * (Thanks for this explanation, Daniel!)
+ */
+class PageIterator
+{
+public:
+ typedef std::bidirectional_iterator_tag iterator_category;
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+
+ typedef Page value_type;
+ typedef const Page* pointer;
+ typedef const Page& reference;
+
+ PageIterator(Gtk::Notebook* parent, GList* node) : node_(node), parent_(parent) {}
+ PageIterator() : node_(0), parent_(0) {}
+
+ bool equal(const PageIterator& other) const;
+ operator bool() const;
+
+ PageIterator& operator++();
+ const PageIterator operator++(int);
+
+ PageIterator& operator--();
+ const PageIterator operator--(int);
+
+ inline reference operator*() const;
+ inline pointer operator->() const;
+
+protected:
+ GList* node_;
+ Gtk::Notebook* parent_;
+
+ friend class Gtk::Notebook_Helpers::Page;
+};
+
+/** @relates Gtk::Notebook_Helpers::PageIterator */
+inline bool operator==(const PageIterator& lhs, const PageIterator& rhs)
+ { return lhs.equal(rhs); }
+
+/** @relates Gtk::Notebook_Helpers::PageIterator */
+inline bool operator!=(const PageIterator& lhs, const PageIterator& rhs)
+ { return !lhs.equal(rhs); }
+
+
+// Page is the output class
+class Page : public PageIterator
+{
+protected:
+ Page();
+private:
+ Page& operator=(const Page&);
+
+public:
+ int get_page_num() const;
+ Widget* get_child() const;
+ Widget* get_tab_label() const;
+ void set_tab_label(Widget& tab_label);
+ void set_tab_label_text(const Glib::ustring& tab_text);
+ Glib::ustring get_tab_label_text() const;
+ Widget* get_menu_label() const;
+ void set_menu_label(Widget& menu_label);
+ void set_menu_label_text(const Glib::ustring& menu_text);
+ Glib::ustring get_menu_label_text() const;
+ void query_tab_label_packing(bool& expand, bool& fill, PackType& pack_type);
+ void set_tab_label_packing(bool expand, bool fill, PackType pack_type);
+};
+
+
+// Element is the input class
+class PageList;
+
+class Element
+{
+public:
+ Element(Widget* child, Widget* tab, Widget* menu);
+ Element(Widget& child, Widget& tab, Widget& menu);
+ explicit Element(Widget& child);
+
+protected:
+ friend class PageList;
+ Widget* child_;
+ Widget* tab_;
+ Widget* menu_;
+};
+
+// Just a widget without a tab
+typedef Element WidgetElem;
+
+struct TabElem : public Element
+{
+ TabElem(Widget& child, Widget& tab);
+ TabElem(Widget& child, const Glib::ustring& label, bool mnemonic = false);
+};
+
+struct MenuElem : public Element
+{
+ MenuElem(Widget& child, Widget& menu);
+};
+
+/*********************************************************************
+***** List properties
+*********************************************************************/
+
+/** An STL-style container for pages in a Gtk::Notebook.
+ *
+ */
+class PageList
+{
+public:
+ PageList();
+ explicit PageList(GtkNotebook* gparent);
+ PageList(const PageList& src);
+
+ PageList& operator=(const PageList& src);
+
+ typedef Page value_type;
+ typedef Page& reference;
+ typedef const Page& const_reference;
+
+ typedef PageIterator iterator;
+ typedef Glib::List_ConstIterator<iterator> const_iterator;
+ typedef Glib::List_ReverseIterator<iterator> reverse_iterator;
+ typedef Glib::List_ConstIterator<reverse_iterator> const_reverse_iterator;
+
+ typedef const Element element_type;
+
+ typedef size_t difference_type;
+ typedef size_t size_type;
+
+ inline GtkNotebook* gparent()
+ { return gparent_; }
+ inline const GtkNotebook* gparent() const
+ { return gparent_; }
+
+ size_type size() const;
+
+ size_type max_size() const;
+ bool empty() const;
+
+ inline iterator begin()
+ { return begin_(); }
+ inline iterator end()
+ { return end_(); }
+
+ inline const_iterator begin() const
+ { return const_iterator(begin_()); }
+ inline const_iterator end() const
+ { return const_iterator(end_()); }
+
+ inline reverse_iterator rbegin()
+ { return reverse_iterator(end_()); }
+ inline reverse_iterator rend()
+ { return reverse_iterator(begin_()); }
+
+ inline const_reverse_iterator rbegin() const
+ { return const_reverse_iterator(reverse_iterator(end_())); }
+ inline const_reverse_iterator rend() const
+ { return const_reverse_iterator(reverse_iterator(begin_())); }
+
+ value_type front() const;
+ value_type back() const;
+
+ value_type operator[](size_type l) const;
+
+ iterator insert(iterator position, element_type& e); //custom-implemented.
+
+ template <class InputIterator>
+ inline void insert(iterator position, InputIterator first, InputIterator last)
+ {
+ for(;first != last; ++first)
+ position = insert(position, *first);
+ }
+
+ inline void push_front(element_type& e)
+ { insert(begin(), e); }
+ inline void push_back(element_type& e)
+ { insert(end(), e); }
+
+ void erase(iterator start, iterator stop);
+ iterator erase(iterator);
+ void remove(const_reference child);
+ void remove(Widget& w);
+
+ void reorder(iterator loc, iterator page); // Non-standard
+
+ iterator find(int num);
+ iterator find(const_reference c);
+ iterator find(Widget& w);
+ iterator find(GtkNotebookPage* t);
+
+ inline void pop_front()
+ { erase(begin()); }
+ inline void pop_back()
+ { erase(--end()); }
+
+ void clear();
+
+protected:
+ iterator begin_() const;
+ iterator end_() const;
+
+ GtkNotebook* gparent_;
+};
+
+} /* Notebook_Helpers */
+
+/** Container which shows one of its children at a time, in tabbed windows.
+ *
+ * The Gtk::Notebook widget is a Gtk::Container whose children are pages that
+ * can be switched between using tab labels along one edge.
+ *
+ * You can use the PageList returned by pages() as any normal STL container
+ * to manipulate the pages.
+ *
+ * @ingroup Widgets
+ * @ingroup Containers
+ */
+
+class Notebook : public Container
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Notebook CppObjectType;
+ typedef Notebook_Class CppClassType;
+ typedef GtkNotebook BaseObjectType;
+ typedef GtkNotebookClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~Notebook();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class Notebook_Class;
+ static CppClassType notebook_class_;
+
+ // noncopyable
+ Notebook(const Notebook&);
+ Notebook& operator=(const Notebook&);
+
+protected:
+ explicit Notebook(const Glib::ConstructParams& construct_params);
+ explicit Notebook(GtkNotebook* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkNotebook* gobj() { return reinterpret_cast<GtkNotebook*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkNotebook* gobj() const { return reinterpret_cast<GtkNotebook*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_switch_page(GtkNotebookPage* page, guint page_num);
+
+
+private:
+
+
+public:
+ typedef Notebook_Helpers::PageList PageList;
+
+ Notebook();
+
+
+ /** Prepends a page to @a notebook .
+ * @param child The Gtk::Widget to use as the contents of the page.
+ * @param tab_label The Gtk::Widget to be used as the label for the page.
+ */
+ int prepend_page(Widget& child, Widget& tab_label);
+ int prepend_page(Widget& child);
+
+ int prepend_page(Widget& child, const Glib::ustring& tab_label, bool use_mnemonic = false);
+
+ /** Prepends a page to @a notebook , specifying the widget to use as the
+ * label in the popup menu.
+ * @param child The Gtk::Widget to use as the contents of the page.
+ * @param tab_label The Gtk::Widget to be used as the label for the page.
+ * @param menu_label The widget to use as a label for the page-switch
+ * menu.
+ */
+ int prepend_page(Widget& child, Widget& tab_label, Widget& menu_label);
+ //Ignore the possible-0 menu_label version of this method. It would have the same signature as another method.
+
+ int prepend_page(Widget& child, const Glib::ustring& tab_label, const Glib::ustring& menu_label, bool use_mnemonic);
+
+
+ /** Appends a page to @a notebook .
+ * @param child The Gtk::Widget to use as the contents of the page.
+ * @param tab_label The Gtk::Widget to be used as the label for the page.
+ */
+ int append_page(Widget& child, Widget& tab_label);
+ int append_page(Widget& child);
+ int append_page(Widget& child, const Glib::ustring& tab_label, bool use_mnemonic = false);
+
+
+ /** Appends a page to @a notebook , specifying the widget to use as the
+ * label in the popup menu.
+ * @param child The Gtk::Widget to use as the contents of the page.
+ * @param tab_label The Gtk::Widget to be used as the label for the page.
+ * @param menu_label The widget to use as a label for the page-switch
+ * menu.
+ */
+ int append_page(Widget& child, Widget& tab_label, Widget& menu_label);
+ //Ignore the possible-0 menu_label version of this method. It would have the same signature as another method.
+
+ int append_page(Widget& child, const Glib::ustring& tab_label, const Glib::ustring& menu_label, bool use_mnemonic = false);
+
+
+ /** Insert a page into @a notebook at the given position
+ * @param child The Gtk::Widget to use as the contents of the page.
+ * @param tab_label The Gtk::Widget to be used as the label for the page.
+ * @param position The index (starting at 0) at which to insert the page,
+ * or -1 to append the page after all other pages.
+ */
+ int insert_page(Widget& child, Widget& tab_label, int position);
+ int insert_page(Widget& child, int position);
+
+ int insert_page(Widget& child, const Glib::ustring& tab_label, int position, bool use_mnemonic = false);
+
+ /** Insert a page into @a notebook at the given position, specifying
+ * the widget to use as the label in the popup menu.
+ * @param child The Gtk::Widget to use as the contents of the page.
+ * @param tab_label The Gtk::Widget to be used as the label for the page..
+ * @param menu_label The widget to use as a label for the page-switch
+ * menu.
+ * @param position The index (starting at 0) at which to insert the page,
+ * or -1 to append the page after all other pages.
+ */
+ int insert_page(Widget& child, Widget& tab_label, Widget& menu_label, int position);
+ //Ignore the possible-0 menu_label version of this method. It would have the same signature as another method.
+
+ int insert_page(Widget& child, const Glib::ustring& tab_label, const Glib::ustring& menu_label, int position, bool use_mnemonic = false);
+
+
+ /** Removes a page from the notebook given its index
+ * in the notebook.
+ * @param page_num The index of a notebook page, starting
+ * from 0. If -1, the last page will
+ * be removed.
+ */
+ void remove_page(int page_num = 0);
+ void remove_page(Widget& child);
+
+
+ /** Returns the page number of the current page.
+ * @return The index (starting from 0) of the current
+ * page in the notebook. If the notebook has no pages, then
+ * -1 will be returned.
+ */
+ int get_current_page() const;
+
+ /** Returns the child widget contained in page number @a page_num .
+ * @param page_num The index of a page in the noteobok, or -1
+ * to get the last page.
+ * @return The child widget, or <tt>0</tt> if @a page_num is
+ * out of bounds.
+ */
+ Widget* get_nth_page(int page_num);
+
+ /** Returns the child widget contained in page number @a page_num .
+ * @param page_num The index of a page in the noteobok, or -1
+ * to get the last page.
+ * @return The child widget, or <tt>0</tt> if @a page_num is
+ * out of bounds.
+ */
+ const Widget* get_nth_page(int page_num) const;
+
+ /** Gets the number of pages in a notebook.
+ * @return The number of pages in the notebook.
+ *
+ * Since: 2.2.
+ */
+ int get_n_pages();
+ /*Widget* get_current_page();*/ /*inconsistency with set_current_page*/
+
+ /** Finds the index of the page which contains the given child
+ * widget.
+ * @param child A Gtk::Widget.
+ * @return The index of the page containing @a child , or
+ * -1 if @a child is not in the notebook.
+ */
+ int page_num(const Widget& child);
+
+
+ /** Switches to the page number @a page_num .
+ * @param page_num Index of the page to switch to, starting from 0.
+ * If negative, the last page will be used. If greater
+ * than the number of pages in the notebook, nothing
+ * will be done.
+ */
+ void set_current_page(int page_num);
+
+ /** Switches to the next page. Nothing happens if the current page is
+ * the last page.
+ */
+ void next_page();
+
+ /** Switches to the previous page. Nothing happens if the current page
+ * is the first page.
+ */
+ void prev_page();
+
+
+ /** Sets whether a bevel will be drawn around the notebook pages.
+ * This only has a visual effect when the tabs are not shown.
+ * See set_show_tabs().
+ * @param show_border <tt>true</tt> if a bevel should be drawn around the notebook.
+ */
+ void set_show_border(bool show_border = true);
+
+
+ /** Returns whether a bevel will be drawn around the notebook pages. See
+ * set_show_border().
+ * @return <tt>true</tt> if the bevel is drawn.
+ */
+ bool get_show_border() const;
+
+ /** Sets whether to show the tabs for the notebook or not.
+ * @param show_tabs <tt>true</tt> if the tabs should be shown.
+ */
+ void set_show_tabs(bool show_tabs = true);
+
+ /** Returns whether the tabs of the notebook are shown. See
+ * set_show_tabs().
+ * @return <tt>true</tt> if the tabs are shown.
+ */
+ bool get_show_tabs() const;
+
+
+ /** Sets the edge at which the tabs for switching pages in the
+ * notebook are drawn.
+ * @param pos The edge to draw the tabs at.
+ */
+ void set_tab_pos(PositionType pos);
+
+ /** Gets the edge at which the tabs for switching pages in the
+ * notebook are drawn.
+ * @return The edge at which the tabs are drawn.
+ */
+ PositionType get_tab_pos() const;
+
+
+ /** Sets whether the tab label area will have arrows for scrolling if
+ * there are too many tabs to fit in the area.
+ * @param scrollable <tt>true</tt> if scroll arrows should be added.
+ */
+ void set_scrollable(bool scrollable = true);
+
+ /** Returns whether the tab label area has arrows for scrolling. See
+ * set_scrollable().
+ * @return <tt>true</tt> if arrows for scrolling are present.
+ */
+ bool get_scrollable() const;
+
+
+ /** Enables the popup menu: if the user clicks with the right mouse button on
+ * the bookmarks, a menu with all the pages will be popped up.
+ */
+ void popup_enable();
+
+
+ /** Disables the popup menu.
+ */
+ void popup_disable();
+
+
+ /** Returns the tab label widget for the page @a child . <tt>0</tt> is returned
+ * if @a child is not in @a notebook or if no tab label has specifically
+ * been set for @a child .
+ * @param child The page.
+ * @return The tab label.
+ */
+ Widget* get_tab_label(Widget& child);
+
+ /** Returns the tab label widget for the page @a child . <tt>0</tt> is returned
+ * if @a child is not in @a notebook or if no tab label has specifically
+ * been set for @a child .
+ * @param child The page.
+ * @return The tab label.
+ */
+ const Widget* get_tab_label(Widget& child) const;
+
+ /** Changes the tab label for @a child . If <tt>0</tt> is specified
+ * for @a tab_label , then the page will have the label 'page N'.
+ * @param child The page.
+ * @param tab_label The tab label widget to use, or <tt>0</tt> for default tab
+ * label.
+ */
+ void set_tab_label(Widget& child, Widget& tab_label);
+
+ /** Creates a new label and sets it as the tab label for the page
+ * containing @a child .
+ * @param child The page.
+ * @param tab_text The label text.
+ */
+ void set_tab_label_text(Widget& child, const Glib::ustring& tab_text);
+
+ /** Retrieves the text of the tab label for the page containing
+ * @a child .
+ * @param child A widget contained in a page of @a notebook .
+ * @return Value: the text of the tab label.
+ */
+ Glib::ustring get_tab_label_text(Widget& child) const;
+
+ /** Retrieves the menu label widget of the page containing @a child .
+ * @param child A widget contained in a page of @a notebook .
+ * @return The menu label, or <tt>0</tt> if the
+ * notebook page does not have a menu label other
+ * than the default (the tab label).
+ */
+ Widget* get_menu_label(Widget& child);
+
+ /** Retrieves the menu label widget of the page containing @a child .
+ * @param child A widget contained in a page of @a notebook .
+ * @return The menu label, or <tt>0</tt> if the
+ * notebook page does not have a menu label other
+ * than the default (the tab label).
+ */
+ const Widget* get_menu_label(Widget& child) const;
+
+ /** Changes the menu label for the page containing @a child .
+ * @param child The child widget.
+ * @param menu_label The menu label, or <tt>0</tt> for default.
+ */
+ void set_menu_label(Widget& child, Widget& menu_label);
+
+ /** Creates a new label and sets it as the menu label of @a child .
+ * @param child The child widget.
+ * @param menu_text The label text.
+ */
+ void set_menu_label_text(Widget& child, const Glib::ustring& menu_text);
+
+ /** Retrieves the text of the menu label for the page containing
+ * @a child .
+ * @param child The child widget of a page of the notebook.
+ * @return Value: the text of the tab label.
+ */
+ Glib::ustring get_menu_label_text(Widget& child) const;
+ void query_tab_label_packing(Widget& child, bool& expand, bool& fill, PackType& pack_type);
+
+
+ /** Sets the packing parameters for the tab label of the page
+ * containing @a child . See Gtk::Box::pack_start() for the exact meaning
+ * of the parameters.
+ * @param child The child widget.
+ * @param expand Whether to expand the bookmark or not.
+ * @param fill Whether the bookmark should fill the allocated area or not.
+ * @param pack_type The position of the bookmark.
+ */
+ void set_tab_label_packing(Widget& child, bool expand, bool fill, PackType pack_type);
+
+ /** Reorders the page containing @a child , so that it appears in position
+ * @a position . If @a position is greater than or equal to the number of
+ * children in the list or negative, @a child will be moved to the end
+ * of the list.
+ * @param child The child to move.
+ * @param position The new position, or -1 to move to the end.
+ */
+ void reorder_child(Widget& child, int position);
+
+
+ PageList::iterator get_current();
+
+ PageList& pages();
+ const PageList& pages() const;
+
+
+ Glib::SignalProxy2< void,GtkNotebookPage*,guint > signal_switch_page();
+
+
+ //Key-binding signals:
+
+
+ /** Which side of the notebook holds the tabs.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<PositionType> property_tab_pos() ;
+
+/** Which side of the notebook holds the tabs.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<PositionType> property_tab_pos() const;
+
+ /** Whether tabs should be shown or not.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_show_tabs() ;
+
+/** Whether tabs should be shown or not.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_show_tabs() const;
+
+ /** Whether the border should be shown or not.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_show_border() ;
+
+/** Whether the border should be shown or not.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_show_border() const;
+
+ /** If TRUE
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_scrollable() ;
+
+/** If TRUE
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_scrollable() const;
+
+ /** Width of the border around the tab labels.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_WriteOnly<guint> property_tab_border() ;
+
+/** Width of the border around the tab labels.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<guint> property_tab_border() const;
+
+ /** Width of the horizontal border of tab labels.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<guint> property_tab_hborder() ;
+
+/** Width of the horizontal border of tab labels.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<guint> property_tab_hborder() const;
+
+ /** Width of the vertical border of tab labels.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<guint> property_tab_vborder() ;
+
+/** Width of the vertical border of tab labels.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<guint> property_tab_vborder() const;
+
+ /** The index of the current page.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_page() ;
+
+/** The index of the current page.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_page() const;
+
+ /** If TRUE
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_enable_popup() ;
+
+/** If TRUE
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_enable_popup() const;
+
+ /** Whether tabs should have homogeneous sizes.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_homogeneous() ;
+
+/** Whether tabs should have homogeneous sizes.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_homogeneous() const;
+
+
+protected:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ mutable PageList pages_proxy_;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+};
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+namespace Notebook_Helpers
+{
+
+/**** PageIterator **************************************************/
+
+inline
+PageIterator::reference PageIterator::operator*() const
+{
+ return static_cast<const Page&>(*this);
+}
+
+inline
+PageIterator::pointer PageIterator::operator->() const
+{
+ return static_cast<const Page*>(this);
+}
+
+} /* Notebook_Helpers */
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+} /* namespace Gtk */
+
+
+namespace Glib
+{
+ /** @relates Gtk::Notebook
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::Notebook* wrap(GtkNotebook* object, bool take_copy = false);
+}
+#endif /* _GTKMM_NOTEBOOK_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/object.cc b/libs/gtkmm2/gtk/gtkmm/object.cc
new file mode 100644
index 0000000000..b61a028949
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/object.cc
@@ -0,0 +1,407 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/object.h>
+#include <gtkmm/private/object_p.h>
+
+/* $Id$ */
+
+/* Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/quark.h>
+#include <gtk/gtkobject.h>
+
+
+namespace Gtk
+{
+
+Object::Object(const Glib::ConstructParams& construct_params)
+:
+ Glib::Object(construct_params)
+{
+ gobject_disposed_ = false;
+
+ _init_unmanage(); //We don't like the GTK+ default memory management - we want to be in control._)
+}
+
+Object::Object(GtkObject* castitem)
+:
+ Glib::Object((GObject*) castitem)
+{
+ gobject_disposed_ = false;
+
+ _init_unmanage(); //We don't like the GTK+ default memory management - we want to be in control.
+}
+
+void Object::_init_unmanage(bool /* is_toplevel = false */)
+{
+ //GTKMM_LIFECYCLE
+
+ if(gobject_)
+ {
+ //Glib::Object::Object has already stored a pointer to this C++ instance in the underlying C instance,
+ //and connected a callback which will, in turn, call our destroy_notify_(),
+ //so will will know if GTK+ disposes of the underlying instance.
+
+ // Most GTK+ objects are floating, by default. This means that the container widget controls their lifetime.
+ // We'll change this:
+ if(GTK_OBJECT_FLOATING (gobject_)) //Top-level Windows and Dialogs can not be manag()ed, so there is no need to do this.
+ {
+ GLIBMM_DEBUG_REFERENCE(this, gobject_);
+ g_object_ref(gobject_); //Increase ref by 1 so that it doesn't get deleted when we sink() it (sink()ing does an unref)
+ gtk_object_sink((GtkObject*)gobject_); //Stops it from being floating - we will make this optional ( see Gtk::manage() ),
+
+ #ifdef GLIBMM_DEBUG_REFCOUNTING
+ g_warning("gtkmm after sink: C++ instance: %p, C instance: %p, refcount=%d\n", (void*)(Glib::ObjectBase*)this, (void*)gobject_, G_OBJECT(gobject_)->ref_count);
+ g_warning(" c instance gtype: %s\n", G_OBJECT_TYPE_NAME(gobject_));
+ #endif
+
+ referenced_ = true; //Not managed.
+ }
+ else
+ {
+ //This widget is already not floating. It's probably already been added to a GTK+ container, and has just had Glib::wrap() called on it.
+ //It's not floating because containers call gtk_object_sink() on child widgets to take control of them.
+ //We just ref() it so that we can unref it later.
+ //GLIBMM_DEBUG_REFERENCE(this, gobject_);
+ //g_object_ref(gobject_);
+
+ //Alternatively, it might be a top-level window (e.g. a Dialog). We would then be doing one too-many refs(),
+ //We do an extra unref() in Window::_destroy_c_instance() to take care of that.
+
+ referenced_ = false; //Managed. We should not try to unfloat GtkObjects that we did not instantiate.
+ }
+ }
+}
+
+void Object::_destroy_c_instance()
+{
+ #ifdef GLIBMM_DEBUG_REFCOUNTING
+ g_warning("Gtk::Object::_destroy_c_instance() this=%10X, gobject_=%10X\n", this, gobject_);
+ if(gobject_)
+ g_warning(" gtypename: %s\n", G_OBJECT_TYPE_NAME(gobject_));
+ #endif
+
+ cpp_destruction_in_progress_ = true;
+
+ // remove our hook.
+ GtkObject* object = gobj();
+
+ if (object)
+ {
+ g_assert(GTK_IS_OBJECT(object));
+
+ disconnect_cpp_wrapper();
+ //Unfortunately this means that our dispose callback will not be called, because the qdata has been removed.
+ //So we'll connect the callback again, just so that gobject_disposed_ gets set for use later in this same method.
+ //See below:
+
+
+ //This probably isn't a problem now:
+ //If we are killing the C++ instance before the C instance, then this might lead to strange behaviour.
+ //If this is a problem, then you'll have to use a managed() object, which will die only upon GTK+'s request.
+
+ //We can't do anything with the gobject_ if it's already been disposed.
+ //This prevents us from unref-ing it again, or destroying it again after GTK+ has told us that it has been disposed.
+ if (!gobject_disposed_)
+ {
+ if(referenced_)
+ {
+ //It's not manage()ed so we just unref to destroy it
+ #ifdef GLIBMM_DEBUG_REFCOUNTING
+ g_warning("final unref: gtypename: %s, refcount: %d\n", G_OBJECT_TYPE_NAME(object), ((GObject*)object)->ref_count);
+ #endif
+
+ //Because we called disconnect_cpp_wrapper() our dispose callback will not be called, because the qdata has been removed.
+ //So we'll connect a callback again, just so that gobject_disposed_ gets set for use later in this same method.
+ gulong connection_id_destroy = g_signal_connect (object, "destroy", G_CALLBACK (&callback_destroy_), this);
+
+ GLIBMM_DEBUG_UNREFERENCE(this, object);
+ g_object_unref(object);
+
+ if(!gobject_disposed_) //or if(g_signal_handler_is_connected(object, connection_id_destroy))
+ g_signal_handler_disconnect(object, connection_id_destroy);
+
+ //destroy_notify() should have been called after the final g_object_unref() or gtk_object_destroy(), so gobject_disposed_ should now be true.
+
+ //If the C instance still isn't dead then insist, by calling gtk_object_destroy().
+ //This is necessary because even a manage()d widget is refed when added to a container.
+ // <danielk> That's simply not true. But references might be taken elsewhere,
+ // and gtk_object_destroy() just tells everyone "drop your refs, please!".
+ if (!gobject_disposed_)
+ {
+ #ifdef GLIBMM_DEBUG_REFCOUNTING
+ g_warning("Gtk::Object::_destroy_c_instance(): Calling gtk_object_destroy(): gobject_=%10X, gtypename=%s\n", object, G_OBJECT_TYPE_NAME(object));
+ #endif
+
+ g_assert(GTK_IS_OBJECT(object));
+ gtk_object_destroy(object); //Container widgets can respond to this.
+ }
+ }
+ else
+ {
+ //It's manag()ed, but the coder decided to delete it before deleting its parent.
+ //That should be OK because the Container can respond to that.
+ #ifdef GLIBMM_DEBUG_REFCOUNTING
+ g_warning("Gtk::Object::_destroy_c_instance(): Calling gtk_object_destroy(): gobject_=%10X\n", gobject_);
+ #endif
+
+ if (!gobject_disposed_)
+ {
+ g_assert(GTK_IS_OBJECT(object));
+ gtk_object_destroy(object);
+ }
+ }
+ }
+
+ //Glib::Object::~Object() will not g_object_unref() it too. because gobject_ is now 0.
+ }
+}
+
+Object::~Object()
+{
+ #ifdef GLIBMM_DEBUG_REFCOUNTING
+ g_warning("Gtk::Object::~Object() gobject_=%10X\n", gobject_);
+ #endif
+
+ //This has probably been called already from Gtk::Object::_destroy(), which is called from derived destructors.
+ _destroy_c_instance();
+}
+
+void Object::disconnect_cpp_wrapper()
+{
+ //GTKMM_LIFECYCLE:
+
+ #ifdef GLIBMM_DEBUG_REFCOUNTING
+ g_warning("Gtk::Object::disconnect_cpp_wrapper() this=%10X, gobject_=%10X\n", this, gobject_);
+ if(gobject_)
+ g_warning(" gtypename: %s\n", G_OBJECT_TYPE_NAME(gobject_));
+ #endif
+
+ if(gobj())
+ {
+ //Prevent gtk vfuncs and default signal handlers from calling our instance methods:
+ g_object_steal_qdata((GObject*)gobj(), Glib::quark_); //It will no longer be possible to get the C++ instance from the C instance.
+
+ //Allow us to prevent generation of a new C++ wrapper during destruction:
+ g_object_set_qdata((GObject*)gobj(), Glib::quark_cpp_wrapper_deleted_, (gpointer)true);
+
+ //Prevent C++ instance from using GTK+ object:
+ gobject_ = 0;
+
+ //TODO: Disconnect any signals, using gtk methods.
+ //We'll have to keep a record of all the connections.
+ }
+}
+
+void Object::destroy_notify_()
+{
+ //Overriden.
+ //GTKMM_LIFECYCLE
+
+ #ifdef GLIBMM_DEBUG_REFCOUNTING
+ g_warning("Gtk::Object::destroy_notify_: this=%10X, gobject_=%10X\n", this, gobject_);
+ if(gobject_)
+ g_warning(" gtypename=%s\n", G_OBJECT_TYPE_NAME(gobject_));
+ #endif
+
+ //Remember that it's been disposed (which only happens once):
+ //This also stops us from destroying it again in the destructor when it calls destroy_().
+ gobject_disposed_ = true;
+
+ if(!cpp_destruction_in_progress_) //This function might have been called as a side-effect of destroy() when it called gtk_object_destroy().
+ {
+ if (!referenced_) //If it's manage()ed.
+ {
+ #ifdef GLIBMM_DEBUG_REFCOUNTING
+ g_warning("Gtk::Object::destroy_notify_: before delete this.\n");
+ #endif
+ delete this; //Free the C++ instance.
+ }
+ else //It's not managed, but the C gobject_ just died before the C++ instance..
+ {
+ #ifdef GLIBMM_DEBUG_REFCOUNTING
+ g_warning("Gtk::Object::destroy_notify_: setting gobject_ to 0\n");
+ #endif
+ gobject_ = 0;
+ }
+ }
+
+}
+
+void Object::destroy_()
+{
+ //Called from destructors.
+ //GTKMM_LIFECYCLE
+
+ #ifdef GLIBMM_DEBUG_REFCOUNTING
+ g_warning("Gtk::Object::destroy_(): gobject_: %10X\n", gobject_);
+ if(gobject_)
+ g_warning(" gtypename: %s\n", G_OBJECT_TYPE_NAME(gobject_));
+ #endif
+
+ if ( !cpp_destruction_in_progress_ ) //see comment below.
+ {
+ //Prevent destroy_notify_() from running as a possible side-effect of gtk_object_destroy.
+ //We can't predict whether destroy_notify_() will really be run, so we'll disconnect the C++ instance here.
+ cpp_destruction_in_progress_ = true;
+
+ //destroy the C instance:
+ _destroy_c_instance();
+ }
+
+ //The C++ destructor will be reached later. This function was called by a destructor.
+}
+
+void Object::set_manage()
+{
+ //GTKMM_LIFECYCLE
+ //This object will not be unref()ed by gtkmm, though it could be destroyed if the coder deletes the C++ instance early.
+ //This method is overriden in Gtk::Window because they can not be manage()ed.
+
+ if (!referenced_) return; //It's already managed.
+
+ // remove our reference
+ if (gobject_->ref_count >= 1) //This should only happen just after creation. We don't use "==1" because GtkButton starts with a refcount of 2 when using a mnemonic.
+ {
+ //g_warning("Object::set_manage(), making object floating: %s\n", G_OBJECT_TYPE_NAME(gobject_));
+
+ // Cowardly refuse to remove last reference make floating instead. //TODO: What does that comment mean?
+ #ifdef GLIBMM_DEBUG_REFCOUNTING
+ g_warning("Object::set_manage(): setting GTK_FLOATING: gobject_ = %p", (void*) gobj());
+ g_warning(" gtypename=%s\n", G_OBJECT_TYPE_NAME(gobj()));
+ #endif
+ GTK_OBJECT_SET_FLAGS(gobj(), GTK_FLOATING);
+ }
+ else
+ {
+ g_warning("Object::set_manage(). Refcount seems to be 0. %s\n", G_OBJECT_TYPE_NAME(gobject_));
+
+ //DEF_GLIBMM_DEBUG_UNREF(this, gobj())
+ //g_object_unref(gobj());
+ }
+
+ //g_warning("Object::set_manage(): end: %s", G_OBJECT_TYPE_NAME(gobject_));
+ //g_warning(" refcount=%d", G_OBJECT(gobj())->ref_count);
+
+ referenced_ = false;
+}
+
+void Object::callback_destroy_(GObject*, void* data) //static
+{
+ //This is only used for a short time, then disconnected.
+
+ Object* cppObject = static_cast<Object*>(data);
+ if(cppObject) //This will be 0 if the C++ destructor has already run.
+ {
+ cppObject->gobject_disposed_ = true;
+ }
+}
+
+bool Object::is_managed_() const
+{
+ return !referenced_;
+}
+
+} // namespace Gtk
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::Object* wrap(GtkObject* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::Object *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Object_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Object_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_object_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Object_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* Object_Class::wrap_new(GObject* o)
+{
+ return manage(new Object((GtkObject*)(o)));
+
+}
+
+
+/* The implementation: */
+
+Object::CppClassType Object::object_class_; // initialize static member
+
+GType Object::get_type()
+{
+ return object_class_.init().get_type();
+}
+
+GType Object::get_base_type()
+{
+ return gtk_object_get_type();
+}
+
+
+Glib::PropertyProxy<void*> Object::property_user_data()
+{
+ return Glib::PropertyProxy<void*>(this, "user-data");
+}
+
+Glib::PropertyProxy_ReadOnly<void*> Object::property_user_data() const
+{
+ return Glib::PropertyProxy_ReadOnly<void*>(this, "user-data");
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/object.h b/libs/gtkmm2/gtk/gtkmm/object.h
new file mode 100644
index 0000000000..3ca724d358
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/object.h
@@ -0,0 +1,168 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_OBJECT_H
+#define _GTKMM_OBJECT_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/object.h>
+#include <gtkmm/base.h>
+#include <gtkmmconfig.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkObject GtkObject;
+typedef struct _GtkObjectClass GtkObjectClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class Object_Class; } // namespace Gtk
+namespace Gtk
+{
+
+class Object;
+
+template<class T>
+T* manage(T* obj)
+{
+ obj->set_manage();
+ return obj;
+}
+
+
+class Object : public Glib::Object
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Object CppObjectType;
+ typedef Object_Class CppClassType;
+ typedef GtkObject BaseObjectType;
+ typedef GtkObjectClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~Object();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class Object_Class;
+ static CppClassType object_class_;
+
+ // noncopyable
+ Object(const Object&);
+ Object& operator=(const Object&);
+
+protected:
+ explicit Object(const Glib::ConstructParams& construct_params);
+ explicit Object(GtkObject* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkObject* gobj() { return reinterpret_cast<GtkObject*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkObject* gobj() const { return reinterpret_cast<GtkObject*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+
+public:
+ //void shutdown(); //We probably don't need this.
+ //void finalize(); //We probably don't need this.
+
+ //void set_user_data(gpointer data);
+ //gpointer get_user_data();
+
+ virtual void set_manage();
+
+ /** Anonymous User Data Pointer.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<void*> property_user_data() ;
+
+/** Anonymous User Data Pointer.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<void*> property_user_data() const;
+
+
+ bool is_managed_() const;
+
+protected:
+
+ void destroy_();
+
+ // If you need it, give me an example. murrayc. -- Me too. daniel.
+ //_WRAP_SIGNAL(void destroy(), "destroy")
+
+
+ void _init_unmanage(bool is_toplevel = false);
+ virtual void destroy_notify_(); //override.
+ void disconnect_cpp_wrapper();
+ void _destroy_c_instance();
+ static void callback_destroy_(GObject* gobject, void* data); //only connected for a short time.
+
+ // set if flags used by derived classes.
+ bool referenced_; // = not managed.
+ bool gobject_disposed_;
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::Object
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::Object* wrap(GtkObject* object, bool take_copy = false);
+}
+#endif /* _GTKMM_OBJECT_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/optionmenu.cc b/libs/gtkmm2/gtk/gtkmm/optionmenu.cc
new file mode 100644
index 0000000000..6985768688
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/optionmenu.cc
@@ -0,0 +1,252 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/optionmenu.h>
+#include <gtkmm/private/optionmenu_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/menu.h>
+#include <gtkmm/window.h>
+#include <gtk/gtkoptionmenu.h>
+
+namespace Gtk
+{
+
+
+OptionMenu::OptionMenu()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Button(Glib::ConstructParams(optionmenu_class_.init(), (char*) 0))
+{
+ // Connect to the signal instead of overriding the on_hierarchy_changed()
+ // method because invocation of C++ default signal handlers is skipped
+ // for gtkmmproc-generated classes (a gtkmm-wide optimization).
+
+ signal_realize().connect(sigc::mem_fun(*this, &OptionMenu::init_accels_handler_));
+}
+
+OptionMenu::~OptionMenu()
+{
+ //GTKMM_LIFECYCLE
+ //Remove the menu so that the Menu forgets about this OptionMenu.
+ //Normally the GtkOptionMenu just destroys the Menu (see gtk_option_menu_destroy),
+ //but we prevent premature destruction in general for all widgets,
+ //so the Menu would survive and remember a dead GtkOptionMenu.
+ remove_menu();
+
+ destroy_();
+}
+
+void OptionMenu::init_accels_handler_()
+{
+ if(gobj())
+ {
+ Window *const toplevel = dynamic_cast<Window*>(get_toplevel());
+ if(toplevel && get_menu())
+ {
+ get_menu()->accelerate(*toplevel);
+ }
+ }
+}
+
+} /* namespace Gtk */
+
+
+namespace
+{
+
+const Glib::SignalProxyInfo OptionMenu_signal_changed_info =
+{
+ "changed",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::OptionMenu* wrap(GtkOptionMenu* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::OptionMenu *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& OptionMenu_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &OptionMenu_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_option_menu_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void OptionMenu_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->changed = &changed_callback;
+}
+
+
+void OptionMenu_Class::changed_callback(GtkOptionMenu* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_changed();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->changed)
+ (*base->changed)(self);
+ }
+}
+
+
+Glib::ObjectBase* OptionMenu_Class::wrap_new(GObject* o)
+{
+ return manage(new OptionMenu((GtkOptionMenu*)(o)));
+
+}
+
+
+/* The implementation: */
+
+OptionMenu::OptionMenu(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Button(construct_params)
+{
+ }
+
+OptionMenu::OptionMenu(GtkOptionMenu* castitem)
+:
+ Gtk::Button((GtkButton*)(castitem))
+{
+ }
+
+OptionMenu::CppClassType OptionMenu::optionmenu_class_; // initialize static member
+
+GType OptionMenu::get_type()
+{
+ return optionmenu_class_.init().get_type();
+}
+
+GType OptionMenu::get_base_type()
+{
+ return gtk_option_menu_get_type();
+}
+
+
+void OptionMenu::set_menu(Menu& menu)
+{
+ gtk_option_menu_set_menu(gobj(), (menu).Gtk::Widget::gobj());
+}
+
+Menu* OptionMenu::get_menu()
+{
+ return Glib::wrap((GtkMenu*)(gtk_option_menu_get_menu(gobj())));
+}
+
+const Menu* OptionMenu::get_menu() const
+{
+ return Glib::wrap((GtkMenu*)(gtk_option_menu_get_menu(const_cast<GtkOptionMenu*>(gobj()))));
+}
+
+void OptionMenu::remove_menu()
+{
+ gtk_option_menu_remove_menu(gobj());
+}
+
+int OptionMenu::get_history() const
+{
+ return gtk_option_menu_get_history(const_cast<GtkOptionMenu*>(gobj()));
+}
+
+void OptionMenu::set_history(guint index)
+{
+ gtk_option_menu_set_history(gobj(), index);
+}
+
+
+Glib::SignalProxy0< void > OptionMenu::signal_changed()
+{
+ return Glib::SignalProxy0< void >(this, &OptionMenu_signal_changed_info);
+}
+
+
+void Gtk::OptionMenu::on_changed()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->changed)
+ (*base->changed)(gobj());
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/optionmenu.h b/libs/gtkmm2/gtk/gtkmm/optionmenu.h
new file mode 100644
index 0000000000..6f9633a256
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/optionmenu.h
@@ -0,0 +1,153 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_OPTIONMENU_H
+#define _GTKMM_OPTIONMENU_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* optionmenu.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/button.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkOptionMenu GtkOptionMenu;
+typedef struct _GtkOptionMenuClass GtkOptionMenuClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class OptionMenu_Class; } // namespace Gtk
+namespace Gtk
+{
+
+class Menu;
+
+/** A widget used to choose from a list of valid choices.
+ *
+ * A Gtk::OptionMenu is a widget that allows the user to choose from a list
+ * of valid choices. The Gtk::OptionMenu displays the selected choice. When
+ * activated the GtkOptionMenu displays a popup Gtk::Menu which allows the
+ * user to make a new choice.
+ *
+ * @deprecated Use the ComboBox widget instead.
+ */
+
+class OptionMenu : public Button
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef OptionMenu CppObjectType;
+ typedef OptionMenu_Class CppClassType;
+ typedef GtkOptionMenu BaseObjectType;
+ typedef GtkOptionMenuClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~OptionMenu();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class OptionMenu_Class;
+ static CppClassType optionmenu_class_;
+
+ // noncopyable
+ OptionMenu(const OptionMenu&);
+ OptionMenu& operator=(const OptionMenu&);
+
+protected:
+ explicit OptionMenu(const Glib::ConstructParams& construct_params);
+ explicit OptionMenu(GtkOptionMenu* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkOptionMenu* gobj() { return reinterpret_cast<GtkOptionMenu*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkOptionMenu* gobj() const { return reinterpret_cast<GtkOptionMenu*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_changed();
+
+
+private:
+
+public:
+
+ OptionMenu();
+
+
+ void set_menu(Menu& menu);
+
+ Menu* get_menu();
+
+ const Menu* get_menu() const;
+
+ void remove_menu();
+
+ /** Retrieves the index of the currently selected menu item. The menu
+ * items are numbered from top to bottom, starting with 0.
+ * @return Index of the selected menu item, or -1 if there are no menu items
+ * Deprecated: Use Gtk::ComboBox instead.
+ */
+ int get_history() const;
+
+ void set_history(guint index);
+
+
+ Glib::SignalProxy0< void > signal_changed();
+
+
+private:
+ void init_accels_handler_();
+
+
+};
+
+} /* namespace Gtk */
+
+
+namespace Glib
+{
+ /** @relates Gtk::OptionMenu
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::OptionMenu* wrap(GtkOptionMenu* object, bool take_copy = false);
+}
+#endif /* _GTKMM_OPTIONMENU_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/paned.cc b/libs/gtkmm2/gtk/gtkmm/paned.cc
new file mode 100644
index 0000000000..4b160994bc
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/paned.cc
@@ -0,0 +1,419 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/paned.h>
+#include <gtkmm/private/paned_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkpaned.h>
+#include <gtk/gtkhpaned.h>
+#include <gtk/gtkvpaned.h>
+
+namespace Gtk
+{
+
+void Paned::pack1(Widget& child, AttachOptions options)
+{
+ const gboolean resize = ((options & EXPAND) != 0);
+ const gboolean shrink = ((options & SHRINK) != 0);
+
+ gtk_paned_pack1(gobj(), child.gobj(), resize, shrink);
+}
+
+void Paned::pack2(Widget& child, AttachOptions options)
+{
+ const gboolean resize = ((options & EXPAND) != 0);
+ const gboolean shrink = ((options & SHRINK) != 0);
+
+ gtk_paned_pack2(gobj(), child.gobj(), resize, shrink);
+}
+
+} // namespace Gtk
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::Paned* wrap(GtkPaned* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::Paned *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Paned_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Paned_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_paned_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Paned_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* Paned_Class::wrap_new(GObject* o)
+{
+ return manage(new Paned((GtkPaned*)(o)));
+
+}
+
+
+/* The implementation: */
+
+Paned::Paned(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Container(construct_params)
+{
+ }
+
+Paned::Paned(GtkPaned* castitem)
+:
+ Gtk::Container((GtkContainer*)(castitem))
+{
+ }
+
+Paned::~Paned()
+{
+ destroy_();
+}
+
+Paned::CppClassType Paned::paned_class_; // initialize static member
+
+GType Paned::get_type()
+{
+ return paned_class_.init().get_type();
+}
+
+GType Paned::get_base_type()
+{
+ return gtk_paned_get_type();
+}
+
+
+Paned::Paned()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Container(Glib::ConstructParams(paned_class_.init()))
+{
+ }
+
+void Paned::add1(Widget& child)
+{
+ gtk_paned_add1(gobj(), (child).gobj());
+}
+
+void Paned::add2(Widget& child)
+{
+ gtk_paned_add2(gobj(), (child).gobj());
+}
+
+void Paned::pack1(Widget& child, bool resize, bool shrink)
+{
+ gtk_paned_pack1(gobj(), (child).gobj(), static_cast<int>(resize), static_cast<int>(shrink));
+}
+
+void Paned::pack2(Widget& child, bool resize, bool shrink)
+{
+ gtk_paned_pack2(gobj(), (child).gobj(), static_cast<int>(resize), static_cast<int>(shrink));
+}
+
+int Paned::get_position() const
+{
+ return gtk_paned_get_position(const_cast<GtkPaned*>(gobj()));
+}
+
+void Paned::set_position(int position)
+{
+ gtk_paned_set_position(gobj(), position);
+}
+
+Widget* Paned::get_child1()
+{
+ return Glib::wrap(gtk_paned_get_child1(gobj()));
+}
+
+const Widget* Paned::get_child1() const
+{
+ return Glib::wrap(gtk_paned_get_child1(const_cast<GtkPaned*>(gobj())));
+}
+
+Widget* Paned::get_child2()
+{
+ return Glib::wrap(gtk_paned_get_child2(gobj()));
+}
+
+const Widget* Paned::get_child2() const
+{
+ return Glib::wrap(gtk_paned_get_child2(const_cast<GtkPaned*>(gobj())));
+}
+
+
+Glib::PropertyProxy<int> Paned::property_position()
+{
+ return Glib::PropertyProxy<int>(this, "position");
+}
+
+Glib::PropertyProxy_ReadOnly<int> Paned::property_position() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "position");
+}
+
+Glib::PropertyProxy<bool> Paned::property_position_set()
+{
+ return Glib::PropertyProxy<bool>(this, "position-set");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Paned::property_position_set() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "position-set");
+}
+
+Glib::PropertyProxy_ReadOnly<int> Paned::property_min_position() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "min-position");
+}
+
+Glib::PropertyProxy_ReadOnly<int> Paned::property_max_position() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "max-position");
+}
+
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+
+Gtk::HPaned* wrap(GtkHPaned* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::HPaned *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& HPaned_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &HPaned_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_hpaned_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void HPaned_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* HPaned_Class::wrap_new(GObject* o)
+{
+ return manage(new HPaned((GtkHPaned*)(o)));
+
+}
+
+
+/* The implementation: */
+
+HPaned::HPaned(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Paned(construct_params)
+{
+ }
+
+HPaned::HPaned(GtkHPaned* castitem)
+:
+ Gtk::Paned((GtkPaned*)(castitem))
+{
+ }
+
+HPaned::~HPaned()
+{
+ destroy_();
+}
+
+HPaned::CppClassType HPaned::hpaned_class_; // initialize static member
+
+GType HPaned::get_type()
+{
+ return hpaned_class_.init().get_type();
+}
+
+GType HPaned::get_base_type()
+{
+ return gtk_hpaned_get_type();
+}
+
+HPaned::HPaned()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Paned(Glib::ConstructParams(hpaned_class_.init()))
+{
+ }
+
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+
+Gtk::VPaned* wrap(GtkVPaned* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::VPaned *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& VPaned_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &VPaned_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_vpaned_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void VPaned_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* VPaned_Class::wrap_new(GObject* o)
+{
+ return manage(new VPaned((GtkVPaned*)(o)));
+
+}
+
+
+/* The implementation: */
+
+VPaned::VPaned(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Paned(construct_params)
+{
+ }
+
+VPaned::VPaned(GtkVPaned* castitem)
+:
+ Gtk::Paned((GtkPaned*)(castitem))
+{
+ }
+
+VPaned::~VPaned()
+{
+ destroy_();
+}
+
+VPaned::CppClassType VPaned::vpaned_class_; // initialize static member
+
+GType VPaned::get_type()
+{
+ return vpaned_class_.init().get_type();
+}
+
+GType VPaned::get_base_type()
+{
+ return gtk_vpaned_get_type();
+}
+
+VPaned::VPaned()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Paned(Glib::ConstructParams(vpaned_class_.init()))
+{
+ }
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/paned.h b/libs/gtkmm2/gtk/gtkmm/paned.h
new file mode 100644
index 0000000000..5616d261c5
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/paned.h
@@ -0,0 +1,417 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_PANED_H
+#define _GTKMM_PANED_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+
+/* paned.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/container.h>
+#include <gtkmm/enums.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkPaned GtkPaned;
+typedef struct _GtkPanedClass GtkPanedClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class Paned_Class; } // namespace Gtk
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkHPaned GtkHPaned;
+typedef struct _GtkHPanedClass GtkHPanedClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class HPaned_Class; } // namespace Gtk
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkVPaned GtkVPaned;
+typedef struct _GtkVPanedClass GtkVPanedClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class VPaned_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** This is the base class for widgets with two panes, arranged either
+ * horizontally (Gtk::HPaned) or vertically (Gtk::VPaned).
+ *
+ * Child widgets are added to the panes of the widget with pack1() and pack2().
+ * The division beween the two children is set by default from the size
+ * requests of the children, but it can be adjusted by the user.
+ *
+ * A paned widget draws a separator between the two child widgets and a small
+ * handle that the user can drag to adjust the division. It does not draw any
+ * relief around the children or around the separator. Often, it is useful to
+ * put each child inside a Gtk::Frame with the shadow type set to Gtk::SHADOW_IN
+ * so that the gutter appears as a ridge.
+ *
+ * Each child has two options that can be set - resize and shrink. If resize is
+ * true, then when the GtkPaned is resized, that child will expand or shrink
+ * along with the paned widget. If shrink is true, then when that child can be
+ * made smaller than it's requisition. Setting shrink to false allows the
+ * application to set a minimum size. If resize is false for both children,
+ * then this is treated as if resize is true for both children.
+ *
+ * The application can set the position of the slider as if it were set by the
+ * user, by calling set_position().
+ *
+ * @ingroup Widgets
+ * @ingroup Containers
+ */
+
+class Paned : public Container
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Paned CppObjectType;
+ typedef Paned_Class CppClassType;
+ typedef GtkPaned BaseObjectType;
+ typedef GtkPanedClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~Paned();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class Paned_Class;
+ static CppClassType paned_class_;
+
+ // noncopyable
+ Paned(const Paned&);
+ Paned& operator=(const Paned&);
+
+protected:
+ explicit Paned(const Glib::ConstructParams& construct_params);
+ explicit Paned(GtkPaned* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkPaned* gobj() { return reinterpret_cast<GtkPaned*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkPaned* gobj() const { return reinterpret_cast<GtkPaned*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+
+public:
+ Paned();
+
+
+ void add1(Widget& child);
+
+ void add2(Widget& child);
+
+
+ void pack1(Widget& child, bool resize, bool shrink);
+ void pack1(Widget& child, AttachOptions options = Gtk::EXPAND);
+
+
+ void pack2(Widget& child, bool resize, bool shrink);
+ void pack2(Widget& child, AttachOptions options = Gtk::EXPAND);
+
+
+ /** Obtains the position of the divider between the two panes.
+ * @return Position of the divider.
+ */
+ int get_position() const;
+
+ /** Sets the position of the divider between the two panes.
+ * @param position Pixel position of divider, a negative value means that the position
+ * is unset.
+ */
+ void set_position(int position);
+
+
+ /** Obtains the first child of the paned widget.
+ * @return First child, or <tt>0</tt> if it is not set.
+ *
+ * Since: 2.4.
+ */
+ Widget* get_child1();
+
+ /** Obtains the first child of the paned widget.
+ * @return First child, or <tt>0</tt> if it is not set.
+ *
+ * Since: 2.4.
+ */
+ const Widget* get_child1() const;
+
+
+ /** Obtains the second child of the paned widget.
+ * @return Second child, or <tt>0</tt> if it is not set.
+ *
+ * Since: 2.4.
+ */
+ Widget* get_child2();
+
+ /** Obtains the second child of the paned widget.
+ * @return Second child, or <tt>0</tt> if it is not set.
+ *
+ * Since: 2.4.
+ */
+ const Widget* get_child2() const;
+
+ //Keybinding signals:
+
+
+ /** Position of paned separator in pixels (0 means all the way to the left/top).
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_position() ;
+
+/** Position of paned separator in pixels (0 means all the way to the left/top).
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_position() const;
+
+ /** TRUE if the Position property should be used.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_position_set() ;
+
+/** TRUE if the Position property should be used.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_position_set() const;
+
+ /** Smallest possible value for the position property.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_min_position() const;
+
+
+ /** Largest possible value for the position property.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_max_position() const;
+
+
+};
+
+/**
+ * The Gtk::HPaned widget is a container widget with two children arranged
+ * horizontally. The division between the two panes is adjustable by the
+ * user by dragging a handle. See Gtk::Paned for details.
+ *
+ * @ingroup Widgets
+ */
+
+class HPaned : public Paned
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef HPaned CppObjectType;
+ typedef HPaned_Class CppClassType;
+ typedef GtkHPaned BaseObjectType;
+ typedef GtkHPanedClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~HPaned();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class HPaned_Class;
+ static CppClassType hpaned_class_;
+
+ // noncopyable
+ HPaned(const HPaned&);
+ HPaned& operator=(const HPaned&);
+
+protected:
+ explicit HPaned(const Glib::ConstructParams& construct_params);
+ explicit HPaned(GtkHPaned* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkHPaned* gobj() { return reinterpret_cast<GtkHPaned*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkHPaned* gobj() const { return reinterpret_cast<GtkHPaned*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+public:
+ HPaned();
+
+
+};
+
+/**
+ * The Gtk::VPaned widget is a container widget with two children arranged
+ * horizontally. The division between the two panes is adjustable by the
+ * user by dragging a handle. See Gtk::Paned for details.
+ *
+ * @ingroup Widgets
+ */
+
+class VPaned : public Paned
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef VPaned CppObjectType;
+ typedef VPaned_Class CppClassType;
+ typedef GtkVPaned BaseObjectType;
+ typedef GtkVPanedClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~VPaned();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class VPaned_Class;
+ static CppClassType vpaned_class_;
+
+ // noncopyable
+ VPaned(const VPaned&);
+ VPaned& operator=(const VPaned&);
+
+protected:
+ explicit VPaned(const Glib::ConstructParams& construct_params);
+ explicit VPaned(GtkVPaned* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkVPaned* gobj() { return reinterpret_cast<GtkVPaned*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkVPaned* gobj() const { return reinterpret_cast<GtkVPaned*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+public:
+ VPaned();
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::Paned
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::Paned* wrap(GtkPaned* object, bool take_copy = false);
+}
+namespace Glib
+{
+ /** @relates Gtk::HPaned
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::HPaned* wrap(GtkHPaned* object, bool take_copy = false);
+}
+namespace Glib
+{
+ /** @relates Gtk::VPaned
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::VPaned* wrap(GtkVPaned* object, bool take_copy = false);
+}
+#endif /* _GTKMM_PANED_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/plug.cc b/libs/gtkmm2/gtk/gtkmm/plug.cc
new file mode 100644
index 0000000000..befa8a4307
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/plug.cc
@@ -0,0 +1,217 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/plug.h>
+#include <gtkmm/private/plug_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkplug.h>
+
+namespace Gtk
+{
+
+Plug::Plug()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Window(Glib::ConstructParams(plug_class_.init(), (char*) 0))
+{
+ gtk_plug_construct(gobj(), 0);
+}
+
+Plug::Plug(GdkNativeWindow socket_id)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Window(Glib::ConstructParams(plug_class_.init(), (char*) 0))
+{
+ gtk_plug_construct(gobj(), socket_id);
+}
+
+Plug::Plug(const Glib::RefPtr<Gdk::Display>& display, GdkNativeWindow socket_id)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Window(Glib::ConstructParams(plug_class_.init(), (char*) 0))
+{
+ gtk_plug_construct_for_display(gobj(), Glib::unwrap(display), socket_id);
+}
+
+} // namespace Gtk
+
+
+namespace
+{
+
+const Glib::SignalProxyInfo Plug_signal_embedded_info =
+{
+ "embedded",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::Plug* wrap(GtkPlug* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::Plug *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Plug_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Plug_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_plug_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Plug_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->embedded = &embedded_callback;
+}
+
+
+void Plug_Class::embedded_callback(GtkPlug* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_embedded();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->embedded)
+ (*base->embedded)(self);
+ }
+}
+
+
+Glib::ObjectBase* Plug_Class::wrap_new(GObject* o)
+{
+ return manage(new Plug((GtkPlug*)(o)));
+
+}
+
+
+/* The implementation: */
+
+Plug::Plug(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Window(construct_params)
+{
+ }
+
+Plug::Plug(GtkPlug* castitem)
+:
+ Gtk::Window((GtkWindow*)(castitem))
+{
+ }
+
+Plug::~Plug()
+{
+ destroy_();
+}
+
+Plug::CppClassType Plug::plug_class_; // initialize static member
+
+GType Plug::get_type()
+{
+ return plug_class_.init().get_type();
+}
+
+GType Plug::get_base_type()
+{
+ return gtk_plug_get_type();
+}
+
+
+GdkNativeWindow Plug::get_id() const
+{
+ return gtk_plug_get_id(const_cast<GtkPlug*>(gobj()));
+}
+
+
+Glib::SignalProxy0< void > Plug::signal_embedded()
+{
+ return Glib::SignalProxy0< void >(this, &Plug_signal_embedded_info);
+}
+
+
+void Gtk::Plug::on_embedded()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->embedded)
+ (*base->embedded)(gobj());
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/plug.h b/libs/gtkmm2/gtk/gtkmm/plug.h
new file mode 100644
index 0000000000..030bdc63c5
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/plug.h
@@ -0,0 +1,132 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_PLUG_H
+#define _GTKMM_PLUG_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/window.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkPlug GtkPlug;
+typedef struct _GtkPlugClass GtkPlugClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class Plug_Class; } // namespace Gtk
+namespace Gtk
+{
+
+
+class Plug : public Window
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Plug CppObjectType;
+ typedef Plug_Class CppClassType;
+ typedef GtkPlug BaseObjectType;
+ typedef GtkPlugClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~Plug();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class Plug_Class;
+ static CppClassType plug_class_;
+
+ // noncopyable
+ Plug(const Plug&);
+ Plug& operator=(const Plug&);
+
+protected:
+ explicit Plug(const Glib::ConstructParams& construct_params);
+ explicit Plug(GtkPlug* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkPlug* gobj() { return reinterpret_cast<GtkPlug*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkPlug* gobj() const { return reinterpret_cast<GtkPlug*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_embedded();
+
+
+private:
+
+
+ //This is not available in on Win32.
+//This source file will not be compiled,
+//and the class will not be registered in wrap_init.h or wrap_init.cc
+
+public:
+ Plug();
+ explicit Plug(GdkNativeWindow socket_id);
+ explicit Plug(const Glib::RefPtr<Gdk::Display>& display, GdkNativeWindow socket_id);
+
+
+ /** Gets the window ID of a Gtk::Plug widget, which can then
+ * be used to embed this window inside another window, for
+ * instance with Gtk::Socket::add_id().
+ * @return The window ID for the plug.
+ */
+ GdkNativeWindow get_id() const;
+
+
+ Glib::SignalProxy0< void > signal_embedded();
+
+
+};
+
+} /* namespace Gtk */
+
+
+namespace Glib
+{
+ /** @relates Gtk::Plug
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::Plug* wrap(GtkPlug* object, bool take_copy = false);
+}
+#endif /* _GTKMM_PLUG_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/aboutdialog_p.h b/libs/gtkmm2/gtk/gtkmm/private/aboutdialog_p.h
new file mode 100644
index 0000000000..60a53a69ba
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/aboutdialog_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_ABOUTDIALOG_P_H
+#define _GTKMM_ABOUTDIALOG_P_H
+#include <gtkmm/private/dialog_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class AboutDialog_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef AboutDialog CppObjectType;
+ typedef GtkAboutDialog BaseObjectType;
+ typedef GtkAboutDialogClass BaseClassType;
+ typedef Gtk::Dialog_Class CppClassParent;
+ typedef GtkDialogClass BaseClassParent;
+
+ friend class AboutDialog;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_ABOUTDIALOG_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/accelgroup_p.h b/libs/gtkmm2/gtk/gtkmm/private/accelgroup_p.h
new file mode 100644
index 0000000000..6caa6d52e4
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/accelgroup_p.h
@@ -0,0 +1,45 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_ACCELGROUP_P_H
+#define _GTKMM_ACCELGROUP_P_H
+#include <glibmm/private/object_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class AccelGroup_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef AccelGroup CppObjectType;
+ typedef GtkAccelGroup BaseObjectType;
+ typedef GtkAccelGroupClass BaseClassType;
+ typedef Glib::Object_Class CppClassParent;
+ typedef GObjectClass BaseClassParent;
+
+ friend class AccelGroup;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void accel_changed_callback(GtkAccelGroup* self, guint p0, GdkModifierType p1, GClosure* p2);
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_ACCELGROUP_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/accellabel_p.h b/libs/gtkmm2/gtk/gtkmm/private/accellabel_p.h
new file mode 100644
index 0000000000..fea48d72d6
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/accellabel_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_ACCELLABEL_P_H
+#define _GTKMM_ACCELLABEL_P_H
+#include <gtkmm/private/label_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class AccelLabel_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef AccelLabel CppObjectType;
+ typedef GtkAccelLabel BaseObjectType;
+ typedef GtkAccelLabelClass BaseClassType;
+ typedef Gtk::Label_Class CppClassParent;
+ typedef GtkLabelClass BaseClassParent;
+
+ friend class AccelLabel;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_ACCELLABEL_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/action_p.h b/libs/gtkmm2/gtk/gtkmm/private/action_p.h
new file mode 100644
index 0000000000..b143a7e57d
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/action_p.h
@@ -0,0 +1,49 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_ACTION_P_H
+#define _GTKMM_ACTION_P_H
+#include <glibmm/private/object_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class Action_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Action CppObjectType;
+ typedef GtkAction BaseObjectType;
+ typedef GtkActionClass BaseClassType;
+ typedef Glib::Object_Class CppClassParent;
+ typedef GObjectClass BaseClassParent;
+
+ friend class Action;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void activate_callback(GtkAction* self);
+
+ //Callbacks (virtual functions):
+ static GtkWidget* create_menu_item_vfunc_callback(GtkAction* self);
+ static GtkWidget* create_tool_item_vfunc_callback(GtkAction* self);
+ static void connect_proxy_vfunc_callback(GtkAction* self, GtkWidget* proxy);
+ static void disconnect_proxy_vfunc_callback(GtkAction* self, GtkWidget* proxy);
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_ACTION_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/actiongroup_p.h b/libs/gtkmm2/gtk/gtkmm/private/actiongroup_p.h
new file mode 100644
index 0000000000..468723aa92
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/actiongroup_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_ACTIONGROUP_P_H
+#define _GTKMM_ACTIONGROUP_P_H
+#include <glibmm/private/object_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class ActionGroup_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef ActionGroup CppObjectType;
+ typedef GtkActionGroup BaseObjectType;
+ typedef GtkActionGroupClass BaseClassType;
+ typedef Glib::Object_Class CppClassParent;
+ typedef GObjectClass BaseClassParent;
+
+ friend class ActionGroup;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_ACTIONGROUP_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/adjustment_p.h b/libs/gtkmm2/gtk/gtkmm/private/adjustment_p.h
new file mode 100644
index 0000000000..4a13ed8c2b
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/adjustment_p.h
@@ -0,0 +1,46 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_ADJUSTMENT_P_H
+#define _GTKMM_ADJUSTMENT_P_H
+#include <gtkmm/private/object_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class Adjustment_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Adjustment CppObjectType;
+ typedef GtkAdjustment BaseObjectType;
+ typedef GtkAdjustmentClass BaseClassType;
+ typedef Gtk::Object_Class CppClassParent;
+ typedef GtkObjectClass BaseClassParent;
+
+ friend class Adjustment;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void changed_callback(GtkAdjustment* self);
+ static void value_changed_callback(GtkAdjustment* self);
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_ADJUSTMENT_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/alignment_p.h b/libs/gtkmm2/gtk/gtkmm/private/alignment_p.h
new file mode 100644
index 0000000000..debf6ee966
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/alignment_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_ALIGNMENT_P_H
+#define _GTKMM_ALIGNMENT_P_H
+#include <gtkmm/private/bin_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class Alignment_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Alignment CppObjectType;
+ typedef GtkAlignment BaseObjectType;
+ typedef GtkAlignmentClass BaseClassType;
+ typedef Gtk::Bin_Class CppClassParent;
+ typedef GtkBinClass BaseClassParent;
+
+ friend class Alignment;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_ALIGNMENT_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/arrow_p.h b/libs/gtkmm2/gtk/gtkmm/private/arrow_p.h
new file mode 100644
index 0000000000..7e3e5dd4b7
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/arrow_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_ARROW_P_H
+#define _GTKMM_ARROW_P_H
+#include <gtkmm/private/misc_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class Arrow_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Arrow CppObjectType;
+ typedef GtkArrow BaseObjectType;
+ typedef GtkArrowClass BaseClassType;
+ typedef Gtk::Misc_Class CppClassParent;
+ typedef GtkMiscClass BaseClassParent;
+
+ friend class Arrow;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_ARROW_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/aspectframe_p.h b/libs/gtkmm2/gtk/gtkmm/private/aspectframe_p.h
new file mode 100644
index 0000000000..6e5e3ec8b9
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/aspectframe_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_ASPECTFRAME_P_H
+#define _GTKMM_ASPECTFRAME_P_H
+#include <gtkmm/private/frame_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class AspectFrame_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef AspectFrame CppObjectType;
+ typedef GtkAspectFrame BaseObjectType;
+ typedef GtkAspectFrameClass BaseClassType;
+ typedef Gtk::Frame_Class CppClassParent;
+ typedef GtkFrameClass BaseClassParent;
+
+ friend class AspectFrame;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_ASPECTFRAME_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/bin_p.h b/libs/gtkmm2/gtk/gtkmm/private/bin_p.h
new file mode 100644
index 0000000000..b81931b19e
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/bin_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_BIN_P_H
+#define _GTKMM_BIN_P_H
+#include <gtkmm/private/container_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class Bin_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Bin CppObjectType;
+ typedef GtkBin BaseObjectType;
+ typedef GtkBinClass BaseClassType;
+ typedef Gtk::Container_Class CppClassParent;
+ typedef GtkContainerClass BaseClassParent;
+
+ friend class Bin;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_BIN_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/box_p.h b/libs/gtkmm2/gtk/gtkmm/private/box_p.h
new file mode 100644
index 0000000000..bf26cdbf7d
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/box_p.h
@@ -0,0 +1,118 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_BOX_P_H
+#define _GTKMM_BOX_P_H
+#include <gtkmm/private/container_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class Box_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Box CppObjectType;
+ typedef GtkBox BaseObjectType;
+ typedef GtkBoxClass BaseClassType;
+ typedef Gtk::Container_Class CppClassParent;
+ typedef GtkContainerClass BaseClassParent;
+
+ friend class Box;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class VBox_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef VBox CppObjectType;
+ typedef GtkVBox BaseObjectType;
+ typedef GtkVBoxClass BaseClassType;
+ typedef Gtk::Box_Class CppClassParent;
+ typedef GtkBoxClass BaseClassParent;
+
+ friend class VBox;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class HBox_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef HBox CppObjectType;
+ typedef GtkHBox BaseObjectType;
+ typedef GtkHBoxClass BaseClassType;
+ typedef Gtk::Box_Class CppClassParent;
+ typedef GtkBoxClass BaseClassParent;
+
+ friend class HBox;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_BOX_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/button_p.h b/libs/gtkmm2/gtk/gtkmm/private/button_p.h
new file mode 100644
index 0000000000..7fe15f9a48
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/button_p.h
@@ -0,0 +1,50 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_BUTTON_P_H
+#define _GTKMM_BUTTON_P_H
+#include <gtkmm/private/bin_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class Button_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Button CppObjectType;
+ typedef GtkButton BaseObjectType;
+ typedef GtkButtonClass BaseClassType;
+ typedef Gtk::Bin_Class CppClassParent;
+ typedef GtkBinClass BaseClassParent;
+
+ friend class Button;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void pressed_callback(GtkButton* self);
+ static void released_callback(GtkButton* self);
+ static void clicked_callback(GtkButton* self);
+ static void enter_callback(GtkButton* self);
+ static void leave_callback(GtkButton* self);
+ static void activate_callback(GtkButton* self);
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_BUTTON_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/buttonbox_p.h b/libs/gtkmm2/gtk/gtkmm/private/buttonbox_p.h
new file mode 100644
index 0000000000..59a656dbb5
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/buttonbox_p.h
@@ -0,0 +1,118 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_BUTTONBOX_P_H
+#define _GTKMM_BUTTONBOX_P_H
+#include <gtkmm/private/box_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class ButtonBox_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef ButtonBox CppObjectType;
+ typedef GtkButtonBox BaseObjectType;
+ typedef GtkButtonBoxClass BaseClassType;
+ typedef Gtk::Box_Class CppClassParent;
+ typedef GtkBoxClass BaseClassParent;
+
+ friend class ButtonBox;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class VButtonBox_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef VButtonBox CppObjectType;
+ typedef GtkVButtonBox BaseObjectType;
+ typedef GtkVButtonBoxClass BaseClassType;
+ typedef Gtk::ButtonBox_Class CppClassParent;
+ typedef GtkButtonBoxClass BaseClassParent;
+
+ friend class VButtonBox;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class HButtonBox_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef HButtonBox CppObjectType;
+ typedef GtkHButtonBox BaseObjectType;
+ typedef GtkHButtonBoxClass BaseClassType;
+ typedef Gtk::ButtonBox_Class CppClassParent;
+ typedef GtkButtonBoxClass BaseClassParent;
+
+ friend class HButtonBox;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_BUTTONBOX_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/calendar_p.h b/libs/gtkmm2/gtk/gtkmm/private/calendar_p.h
new file mode 100644
index 0000000000..f138739966
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/calendar_p.h
@@ -0,0 +1,51 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_CALENDAR_P_H
+#define _GTKMM_CALENDAR_P_H
+#include <gtkmm/private/widget_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class Calendar_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Calendar CppObjectType;
+ typedef GtkCalendar BaseObjectType;
+ typedef GtkCalendarClass BaseClassType;
+ typedef Gtk::Widget_Class CppClassParent;
+ typedef GtkWidgetClass BaseClassParent;
+
+ friend class Calendar;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void month_changed_callback(GtkCalendar* self);
+ static void day_selected_callback(GtkCalendar* self);
+ static void day_selected_double_click_callback(GtkCalendar* self);
+ static void prev_month_callback(GtkCalendar* self);
+ static void next_month_callback(GtkCalendar* self);
+ static void prev_year_callback(GtkCalendar* self);
+ static void next_year_callback(GtkCalendar* self);
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_CALENDAR_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/celleditable_p.h b/libs/gtkmm2/gtk/gtkmm/private/celleditable_p.h
new file mode 100644
index 0000000000..31250f561b
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/celleditable_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_CELLEDITABLE_P_H
+#define _GTKMM_CELLEDITABLE_P_H
+#include <glibmm/private/interface_p.h>
+
+#include <glibmm/private/interface_p.h>
+
+namespace Gtk
+{
+
+class CellEditable_Class : public Glib::Interface_Class
+{
+public:
+ typedef CellEditable CppObjectType;
+ typedef GtkCellEditable BaseObjectType;
+ typedef GtkCellEditableIface BaseClassType;
+ typedef Glib::Interface_Class CppClassParent;
+
+ friend class CellEditable;
+
+ const Glib::Interface_Class& init();
+
+ static void iface_init_function(void* g_iface, void* iface_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void editing_done_callback(GtkCellEditable* self);
+ static void remove_widget_callback(GtkCellEditable* self);
+
+ //Callbacks (virtual functions):
+ static void start_editing_vfunc_callback(GtkCellEditable* self, GdkEvent* event);
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_CELLEDITABLE_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/celllayout_p.h b/libs/gtkmm2/gtk/gtkmm/private/celllayout_p.h
new file mode 100644
index 0000000000..1af5318448
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/celllayout_p.h
@@ -0,0 +1,47 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_CELLLAYOUT_P_H
+#define _GTKMM_CELLLAYOUT_P_H
+#include <glibmm/private/interface_p.h>
+
+#include <glibmm/private/interface_p.h>
+
+namespace Gtk
+{
+
+class CellLayout_Class : public Glib::Interface_Class
+{
+public:
+ typedef CellLayout CppObjectType;
+ typedef GtkCellLayout BaseObjectType;
+ typedef GtkCellLayoutIface BaseClassType;
+ typedef Glib::Interface_Class CppClassParent;
+
+ friend class CellLayout;
+
+ const Glib::Interface_Class& init();
+
+ static void iface_init_function(void* g_iface, void* iface_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+ static void pack_start_vfunc_callback(GtkCellLayout* self, GtkCellRenderer* cell, gboolean expand);
+ static void pack_end_vfunc_callback(GtkCellLayout* self, GtkCellRenderer* cell, gboolean expand);
+ static void clear_vfunc_callback(GtkCellLayout* self);
+ static void add_attribute_vfunc_callback(GtkCellLayout* self, GtkCellRenderer* cell, const gchar* attribute, gint column);
+ static void clear_attributes_vfunc_callback(GtkCellLayout* self, GtkCellRenderer* cell);
+ static void reorder_vfunc_callback(GtkCellLayout* self, GtkCellRenderer* cell, gint position);
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_CELLLAYOUT_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/cellrenderer_p.h b/libs/gtkmm2/gtk/gtkmm/private/cellrenderer_p.h
new file mode 100644
index 0000000000..c7fac80cb6
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/cellrenderer_p.h
@@ -0,0 +1,50 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_CELLRENDERER_P_H
+#define _GTKMM_CELLRENDERER_P_H
+#include <gtkmm/private/object_p.h>
+#include <gtk/gtkcellrenderer.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class CellRenderer_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef CellRenderer CppObjectType;
+ typedef GtkCellRenderer BaseObjectType;
+ typedef GtkCellRendererClass BaseClassType;
+ typedef Gtk::Object_Class CppClassParent;
+ typedef GtkObjectClass BaseClassParent;
+
+ friend class CellRenderer;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void editing_canceled_callback(GtkCellRenderer* self);
+
+ //Callbacks (virtual functions):
+ static void get_size_vfunc_callback(GtkCellRenderer* self, GtkWidget* widget, GdkRectangle* cell_area, gint* x_offset, gint* y_offset, gint* width, gint* height);
+ static void render_vfunc_callback(GtkCellRenderer* self, GdkDrawable* window, GtkWidget* widget, GdkRectangle* background_area, GdkRectangle* cell_area, GdkRectangle* expose_area, GtkCellRendererState flags);
+ static gboolean activate_vfunc_callback(GtkCellRenderer* self, GdkEvent* event, GtkWidget* widget, const gchar* path, GdkRectangle* background_area, GdkRectangle* cell_area, GtkCellRendererState flags);
+ static GtkCellEditable* start_editing_vfunc_callback(GtkCellRenderer* self, GdkEvent* event, GtkWidget* widget, const gchar* path, GdkRectangle* background_area, GdkRectangle* cell_area, GtkCellRendererState flags);
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_CELLRENDERER_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/cellrenderercombo_p.h b/libs/gtkmm2/gtk/gtkmm/private/cellrenderercombo_p.h
new file mode 100644
index 0000000000..af5eda9c5f
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/cellrenderercombo_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_CELLRENDERERCOMBO_P_H
+#define _GTKMM_CELLRENDERERCOMBO_P_H
+#include <gtkmm/private/cellrenderertext_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class CellRendererCombo_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef CellRendererCombo CppObjectType;
+ typedef GtkCellRendererCombo BaseObjectType;
+ typedef GtkCellRendererComboClass BaseClassType;
+ typedef Gtk::CellRendererText_Class CppClassParent;
+ typedef GtkCellRendererTextClass BaseClassParent;
+
+ friend class CellRendererCombo;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_CELLRENDERERCOMBO_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/cellrendererpixbuf_p.h b/libs/gtkmm2/gtk/gtkmm/private/cellrendererpixbuf_p.h
new file mode 100644
index 0000000000..5bf100b376
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/cellrendererpixbuf_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_CELLRENDERERPIXBUF_P_H
+#define _GTKMM_CELLRENDERERPIXBUF_P_H
+#include <gtkmm/private/cellrenderer_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class CellRendererPixbuf_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef CellRendererPixbuf CppObjectType;
+ typedef GtkCellRendererPixbuf BaseObjectType;
+ typedef GtkCellRendererPixbufClass BaseClassType;
+ typedef Gtk::CellRenderer_Class CppClassParent;
+ typedef GtkCellRendererClass BaseClassParent;
+
+ friend class CellRendererPixbuf;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_CELLRENDERERPIXBUF_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/cellrendererprogress_p.h b/libs/gtkmm2/gtk/gtkmm/private/cellrendererprogress_p.h
new file mode 100644
index 0000000000..f95a9f133b
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/cellrendererprogress_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_CELLRENDERERPROGRESS_P_H
+#define _GTKMM_CELLRENDERERPROGRESS_P_H
+#include <gtkmm/private/cellrenderer_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class CellRendererProgress_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef CellRendererProgress CppObjectType;
+ typedef GtkCellRendererProgress BaseObjectType;
+ typedef GtkCellRendererProgressClass BaseClassType;
+ typedef Gtk::CellRenderer_Class CppClassParent;
+ typedef GtkCellRendererClass BaseClassParent;
+
+ friend class CellRendererProgress;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_CELLRENDERERPROGRESS_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/cellrenderertext_p.h b/libs/gtkmm2/gtk/gtkmm/private/cellrenderertext_p.h
new file mode 100644
index 0000000000..1505a568f9
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/cellrenderertext_p.h
@@ -0,0 +1,45 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_CELLRENDERERTEXT_P_H
+#define _GTKMM_CELLRENDERERTEXT_P_H
+#include <gtkmm/private/cellrenderer_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class CellRendererText_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef CellRendererText CppObjectType;
+ typedef GtkCellRendererText BaseObjectType;
+ typedef GtkCellRendererTextClass BaseClassType;
+ typedef Gtk::CellRenderer_Class CppClassParent;
+ typedef GtkCellRendererClass BaseClassParent;
+
+ friend class CellRendererText;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void edited_callback(GtkCellRendererText* self, const gchar* p0, const gchar* p1);
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_CELLRENDERERTEXT_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/cellrenderertoggle_p.h b/libs/gtkmm2/gtk/gtkmm/private/cellrenderertoggle_p.h
new file mode 100644
index 0000000000..6566624b9d
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/cellrenderertoggle_p.h
@@ -0,0 +1,45 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_CELLRENDERERTOGGLE_P_H
+#define _GTKMM_CELLRENDERERTOGGLE_P_H
+#include <gtkmm/private/cellrenderer_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class CellRendererToggle_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef CellRendererToggle CppObjectType;
+ typedef GtkCellRendererToggle BaseObjectType;
+ typedef GtkCellRendererToggleClass BaseClassType;
+ typedef Gtk::CellRenderer_Class CppClassParent;
+ typedef GtkCellRendererClass BaseClassParent;
+
+ friend class CellRendererToggle;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void toggled_callback(GtkCellRendererToggle* self, const gchar* p0);
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_CELLRENDERERTOGGLE_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/cellview_p.h b/libs/gtkmm2/gtk/gtkmm/private/cellview_p.h
new file mode 100644
index 0000000000..6046537896
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/cellview_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_CELLVIEW_P_H
+#define _GTKMM_CELLVIEW_P_H
+#include <gtkmm/private/widget_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class CellView_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef CellView CppObjectType;
+ typedef GtkCellView BaseObjectType;
+ typedef GtkCellViewClass BaseClassType;
+ typedef Gtk::Widget_Class CppClassParent;
+ typedef GtkWidgetClass BaseClassParent;
+
+ friend class CellView;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_CELLVIEW_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/checkbutton_p.h b/libs/gtkmm2/gtk/gtkmm/private/checkbutton_p.h
new file mode 100644
index 0000000000..1e579d79b9
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/checkbutton_p.h
@@ -0,0 +1,45 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_CHECKBUTTON_P_H
+#define _GTKMM_CHECKBUTTON_P_H
+#include <gtkmm/private/togglebutton_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class CheckButton_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef CheckButton CppObjectType;
+ typedef GtkCheckButton BaseObjectType;
+ typedef GtkCheckButtonClass BaseClassType;
+ typedef Gtk::ToggleButton_Class CppClassParent;
+ typedef GtkToggleButtonClass BaseClassParent;
+
+ friend class CheckButton;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+ static void draw_indicator_vfunc_callback(GtkCheckButton* self, GdkRectangle* area);
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_CHECKBUTTON_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/checkmenuitem_p.h b/libs/gtkmm2/gtk/gtkmm/private/checkmenuitem_p.h
new file mode 100644
index 0000000000..8ae77c14b7
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/checkmenuitem_p.h
@@ -0,0 +1,46 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_CHECKMENUITEM_P_H
+#define _GTKMM_CHECKMENUITEM_P_H
+#include <gtkmm/private/menuitem_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class CheckMenuItem_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef CheckMenuItem CppObjectType;
+ typedef GtkCheckMenuItem BaseObjectType;
+ typedef GtkCheckMenuItemClass BaseClassType;
+ typedef Gtk::MenuItem_Class CppClassParent;
+ typedef GtkMenuItemClass BaseClassParent;
+
+ friend class CheckMenuItem;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void toggled_callback(GtkCheckMenuItem* self);
+
+ //Callbacks (virtual functions):
+ static void draw_indicator_vfunc_callback(GtkCheckMenuItem* self, GdkRectangle* area);
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_CHECKMENUITEM_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/clipboard_p.h b/libs/gtkmm2/gtk/gtkmm/private/clipboard_p.h
new file mode 100644
index 0000000000..1bad952a67
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/clipboard_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_CLIPBOARD_P_H
+#define _GTKMM_CLIPBOARD_P_H
+#include <glibmm/private/object_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class Clipboard_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Clipboard CppObjectType;
+ typedef GtkClipboard BaseObjectType;
+ typedef GtkClipboardClass BaseClassType;
+ typedef Glib::Object_Class CppClassParent;
+ typedef GObjectClass BaseClassParent;
+
+ friend class Clipboard;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_CLIPBOARD_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/colorbutton_p.h b/libs/gtkmm2/gtk/gtkmm/private/colorbutton_p.h
new file mode 100644
index 0000000000..20b2dfb9e6
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/colorbutton_p.h
@@ -0,0 +1,45 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_COLORBUTTON_P_H
+#define _GTKMM_COLORBUTTON_P_H
+#include <gtkmm/private/button_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class ColorButton_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef ColorButton CppObjectType;
+ typedef GtkColorButton BaseObjectType;
+ typedef GtkColorButtonClass BaseClassType;
+ typedef Gtk::Button_Class CppClassParent;
+ typedef GtkButtonClass BaseClassParent;
+
+ friend class ColorButton;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void color_set_callback(GtkColorButton* self);
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_COLORBUTTON_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/colorselection_p.h b/libs/gtkmm2/gtk/gtkmm/private/colorselection_p.h
new file mode 100644
index 0000000000..662aca3486
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/colorselection_p.h
@@ -0,0 +1,83 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_COLORSELECTION_P_H
+#define _GTKMM_COLORSELECTION_P_H
+#include <gtkmm/private/box_p.h>
+#include <gtkmm/private/dialog_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class ColorSelection_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef ColorSelection CppObjectType;
+ typedef GtkColorSelection BaseObjectType;
+ typedef GtkColorSelectionClass BaseClassType;
+ typedef Gtk::VBox_Class CppClassParent;
+ typedef GtkVBoxClass BaseClassParent;
+
+ friend class ColorSelection;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void color_changed_callback(GtkColorSelection* self);
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class ColorSelectionDialog_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef ColorSelectionDialog CppObjectType;
+ typedef GtkColorSelectionDialog BaseObjectType;
+ typedef GtkColorSelectionDialogClass BaseClassType;
+ typedef Gtk::Dialog_Class CppClassParent;
+ typedef GtkDialogClass BaseClassParent;
+
+ friend class ColorSelectionDialog;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_COLORSELECTION_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/combo_p.h b/libs/gtkmm2/gtk/gtkmm/private/combo_p.h
new file mode 100644
index 0000000000..c272fe4afa
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/combo_p.h
@@ -0,0 +1,124 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_COMBO_P_H
+#define _GTKMM_COMBO_P_H
+#include <gtkmm/private/box_p.h>
+#include <gtkmm/private/item_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class ComboDropDownItem_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef ComboDropDownItem CppObjectType;
+ typedef GtkListItem BaseObjectType;
+ typedef GtkListItemClass BaseClassType;
+ typedef Gtk::Item_Class CppClassParent;
+ typedef GtkItemClass BaseClassParent;
+
+ friend class ComboDropDownItem;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void scroll_horizontal_callback(GtkListItem* self, GtkScrollType p0, gfloat p1);
+ static void scroll_vertical_callback(GtkListItem* self, GtkScrollType p0, gfloat p1);
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class ComboDropDown_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef ComboDropDown CppObjectType;
+ typedef GtkList BaseObjectType;
+ typedef GtkListClass BaseClassType;
+ typedef Gtk::Container_Class CppClassParent;
+ typedef GtkContainerClass BaseClassParent;
+
+ friend class ComboDropDown;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void select_child_callback(GtkList* self, GtkWidget* p0);
+ static void selection_changed_callback(GtkList* self);
+ static void unselect_child_callback(GtkList* self, GtkWidget* p0);
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class Combo_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Combo CppObjectType;
+ typedef GtkCombo BaseObjectType;
+ typedef GtkComboClass BaseClassType;
+ typedef Gtk::HBox_Class CppClassParent;
+ typedef GtkHBoxClass BaseClassParent;
+
+ friend class Combo;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_COMBO_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/combobox_p.h b/libs/gtkmm2/gtk/gtkmm/private/combobox_p.h
new file mode 100644
index 0000000000..242c755f70
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/combobox_p.h
@@ -0,0 +1,45 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_COMBOBOX_P_H
+#define _GTKMM_COMBOBOX_P_H
+#include <gtkmm/private/bin_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class ComboBox_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef ComboBox CppObjectType;
+ typedef GtkComboBox BaseObjectType;
+ typedef GtkComboBoxClass BaseClassType;
+ typedef Gtk::Bin_Class CppClassParent;
+ typedef GtkBinClass BaseClassParent;
+
+ friend class ComboBox;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void changed_callback(GtkComboBox* self);
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_COMBOBOX_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/comboboxentry_p.h b/libs/gtkmm2/gtk/gtkmm/private/comboboxentry_p.h
new file mode 100644
index 0000000000..bbc8a5028a
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/comboboxentry_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_COMBOBOXENTRY_P_H
+#define _GTKMM_COMBOBOXENTRY_P_H
+#include <gtkmm/private/combobox_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class ComboBoxEntry_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef ComboBoxEntry CppObjectType;
+ typedef GtkComboBoxEntry BaseObjectType;
+ typedef GtkComboBoxEntryClass BaseClassType;
+ typedef Gtk::ComboBox_Class CppClassParent;
+ typedef GtkComboBoxClass BaseClassParent;
+
+ friend class ComboBoxEntry;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_COMBOBOXENTRY_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/container_p.h b/libs/gtkmm2/gtk/gtkmm/private/container_p.h
new file mode 100644
index 0000000000..3f1b158887
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/container_p.h
@@ -0,0 +1,55 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_CONTAINER_P_H
+#define _GTKMM_CONTAINER_P_H
+#include <gtkmm/private/widget_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class Container_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Container CppObjectType;
+ typedef GtkContainer BaseObjectType;
+ typedef GtkContainerClass BaseClassType;
+ typedef Gtk::Widget_Class CppClassParent;
+ typedef GtkWidgetClass BaseClassParent;
+
+ friend class Container;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void add_callback(GtkContainer* self, GtkWidget* p0);
+ static void remove_callback(GtkContainer* self, GtkWidget* p0);
+ static void check_resize_callback(GtkContainer* self);
+ static void set_focus_child_callback(GtkContainer* self, GtkWidget* p0);
+ static void destroy_callback(GtkObject* self);
+ static void remove_callback_custom(GtkContainer* self, GtkWidget* p0);
+
+ //Callbacks (virtual functions):
+ static GtkType child_type_vfunc_callback(GtkContainer* self);
+ static void forall_vfunc_callback(GtkContainer* self, gboolean include_internals, GtkCallback callback, gpointer callback_data);
+ static gchar* composite_name_vfunc_callback(GtkContainer* self, GtkWidget* child);
+ static void set_child_property_vfunc_callback(GtkContainer* self, GtkWidget* child, guint property_id, const GValue* value, GParamSpec* pspec);
+ static void get_child_property_vfunc_callback(GtkContainer* self, GtkWidget* child, guint property_id, GValue* value, GParamSpec* pspec);
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_CONTAINER_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/curve_p.h b/libs/gtkmm2/gtk/gtkmm/private/curve_p.h
new file mode 100644
index 0000000000..dc07066521
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/curve_p.h
@@ -0,0 +1,83 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_CURVE_P_H
+#define _GTKMM_CURVE_P_H
+#include <gtkmm/private/drawingarea_p.h>
+#include <gtkmm/private/box_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class Curve_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Curve CppObjectType;
+ typedef GtkCurve BaseObjectType;
+ typedef GtkCurveClass BaseClassType;
+ typedef Gtk::DrawingArea_Class CppClassParent;
+ typedef GtkDrawingAreaClass BaseClassParent;
+
+ friend class Curve;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void curve_type_changed_callback(GtkCurve* self);
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class GammaCurve_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef GammaCurve CppObjectType;
+ typedef GtkGammaCurve BaseObjectType;
+ typedef GtkGammaCurveClass BaseClassType;
+ typedef Gtk::VBox_Class CppClassParent;
+ typedef GtkVBoxClass BaseClassParent;
+
+ friend class GammaCurve;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_CURVE_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/dialog_p.h b/libs/gtkmm2/gtk/gtkmm/private/dialog_p.h
new file mode 100644
index 0000000000..9eeef1e8fe
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/dialog_p.h
@@ -0,0 +1,45 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_DIALOG_P_H
+#define _GTKMM_DIALOG_P_H
+#include <gtkmm/private/window_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class Dialog_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Dialog CppObjectType;
+ typedef GtkDialog BaseObjectType;
+ typedef GtkDialogClass BaseClassType;
+ typedef Gtk::Window_Class CppClassParent;
+ typedef GtkWindowClass BaseClassParent;
+
+ friend class Dialog;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void response_callback(GtkDialog* self, gint p0);
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_DIALOG_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/drawingarea_p.h b/libs/gtkmm2/gtk/gtkmm/private/drawingarea_p.h
new file mode 100644
index 0000000000..cd639999b3
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/drawingarea_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_DRAWINGAREA_P_H
+#define _GTKMM_DRAWINGAREA_P_H
+#include <gtkmm/private/widget_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class DrawingArea_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef DrawingArea CppObjectType;
+ typedef GtkDrawingArea BaseObjectType;
+ typedef GtkDrawingAreaClass BaseClassType;
+ typedef Gtk::Widget_Class CppClassParent;
+ typedef GtkWidgetClass BaseClassParent;
+
+ friend class DrawingArea;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_DRAWINGAREA_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/editable_p.h b/libs/gtkmm2/gtk/gtkmm/private/editable_p.h
new file mode 100644
index 0000000000..caf727830a
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/editable_p.h
@@ -0,0 +1,51 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_EDITABLE_P_H
+#define _GTKMM_EDITABLE_P_H
+#include <glibmm/private/interface_p.h>
+
+#include <glibmm/private/interface_p.h>
+
+namespace Gtk
+{
+
+class Editable_Class : public Glib::Interface_Class
+{
+public:
+ typedef Editable CppObjectType;
+ typedef GtkEditable BaseObjectType;
+ typedef GtkEditableClass BaseClassType;
+ typedef Glib::Interface_Class CppClassParent;
+
+ friend class Editable;
+
+ const Glib::Interface_Class& init();
+
+ static void iface_init_function(void* g_iface, void* iface_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void insert_text_callback(GtkEditable* self, const gchar* text, gint length, gint* position);
+ static void delete_text_callback(GtkEditable* self, gint start_pos, gint end_pos);
+ static void changed_callback(GtkEditable* self);
+
+ //Callbacks (virtual functions):
+ static void do_insert_text_vfunc_callback(GtkEditable* self, const gchar* text, gint length, gint* position);
+ static void do_delete_text_vfunc_callback(GtkEditable* self, gint start_pos, gint end_pos);
+ static gchar* get_chars_vfunc_callback(GtkEditable* self, gint start_pos, gint end_pos);
+ static void set_selection_bounds_vfunc_callback(GtkEditable* self, gint start_pos, gint end_pos);
+ static gboolean get_selection_bounds_vfunc_callback(GtkEditable* self, gint* start_pos, gint* end_pos);
+ static void set_position_vfunc_callback(GtkEditable* self, gint position);
+ static gint get_position_vfunc_callback(GtkEditable* self);
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_EDITABLE_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/entry_p.h b/libs/gtkmm2/gtk/gtkmm/private/entry_p.h
new file mode 100644
index 0000000000..5d25b64902
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/entry_p.h
@@ -0,0 +1,47 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_ENTRY_P_H
+#define _GTKMM_ENTRY_P_H
+#include <gtkmm/private/widget_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class Entry_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Entry CppObjectType;
+ typedef GtkEntry BaseObjectType;
+ typedef GtkEntryClass BaseClassType;
+ typedef Gtk::Widget_Class CppClassParent;
+ typedef GtkWidgetClass BaseClassParent;
+
+ friend class Entry;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void populate_popup_callback(GtkEntry* self, GtkMenu* p0);
+ static void insert_at_cursor_callback(GtkEntry* self, const gchar* p0);
+ static void activate_callback(GtkEntry* self);
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_ENTRY_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/entrycompletion_p.h b/libs/gtkmm2/gtk/gtkmm/private/entrycompletion_p.h
new file mode 100644
index 0000000000..2a9b97a3ad
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/entrycompletion_p.h
@@ -0,0 +1,46 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_ENTRYCOMPLETION_P_H
+#define _GTKMM_ENTRYCOMPLETION_P_H
+#include <glibmm/private/object_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class EntryCompletion_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef EntryCompletion CppObjectType;
+ typedef GtkEntryCompletion BaseObjectType;
+ typedef GtkEntryCompletionClass BaseClassType;
+ typedef Glib::Object_Class CppClassParent;
+ typedef GObjectClass BaseClassParent;
+
+ friend class EntryCompletion;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void action_activated_callback(GtkEntryCompletion* self, gint p0);
+ static gboolean match_selected_callback_custom(GtkEntryCompletion* self, GtkTreeModel* c_model, GtkTreeIter* c_iter);
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_ENTRYCOMPLETION_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/enums_p.h b/libs/gtkmm2/gtk/gtkmm/private/enums_p.h
new file mode 100644
index 0000000000..68c26cc900
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/enums_p.h
@@ -0,0 +1,6 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_ENUMS_P_H
+#define _GTKMM_ENUMS_P_H
+#endif /* _GTKMM_ENUMS_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/eventbox_p.h b/libs/gtkmm2/gtk/gtkmm/private/eventbox_p.h
new file mode 100644
index 0000000000..91b3303f1f
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/eventbox_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_EVENTBOX_P_H
+#define _GTKMM_EVENTBOX_P_H
+#include <gtkmm/private/bin_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class EventBox_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef EventBox CppObjectType;
+ typedef GtkEventBox BaseObjectType;
+ typedef GtkEventBoxClass BaseClassType;
+ typedef Gtk::Bin_Class CppClassParent;
+ typedef GtkBinClass BaseClassParent;
+
+ friend class EventBox;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_EVENTBOX_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/expander_p.h b/libs/gtkmm2/gtk/gtkmm/private/expander_p.h
new file mode 100644
index 0000000000..674bf038cd
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/expander_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_EXPANDER_P_H
+#define _GTKMM_EXPANDER_P_H
+#include <gtkmm/private/bin_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class Expander_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Expander CppObjectType;
+ typedef GtkExpander BaseObjectType;
+ typedef GtkExpanderClass BaseClassType;
+ typedef Gtk::Bin_Class CppClassParent;
+ typedef GtkBinClass BaseClassParent;
+
+ friend class Expander;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_EXPANDER_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/filechooser_p.h b/libs/gtkmm2/gtk/gtkmm/private/filechooser_p.h
new file mode 100644
index 0000000000..9b864a7dda
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/filechooser_p.h
@@ -0,0 +1,41 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_FILECHOOSER_P_H
+#define _GTKMM_FILECHOOSER_P_H
+#include <glibmm/private/interface_p.h>
+
+#include <glibmm/private/interface_p.h>
+
+namespace Gtk
+{
+
+class FileChooser_Class : public Glib::Interface_Class
+{
+public:
+ typedef FileChooser CppObjectType;
+ typedef GtkFileChooser BaseObjectType;
+ typedef GtkFileChooserClass BaseClassType;
+ typedef Glib::Interface_Class CppClassParent;
+
+ friend class FileChooser;
+
+ const Glib::Interface_Class& init();
+
+ static void iface_init_function(void* g_iface, void* iface_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_FILECHOOSER_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/filechooserbutton_p.h b/libs/gtkmm2/gtk/gtkmm/private/filechooserbutton_p.h
new file mode 100644
index 0000000000..60aa6eff06
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/filechooserbutton_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_FILECHOOSERBUTTON_P_H
+#define _GTKMM_FILECHOOSERBUTTON_P_H
+#include <gtkmm/private/box_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class FileChooserButton_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef FileChooserButton CppObjectType;
+ typedef GtkFileChooserButton BaseObjectType;
+ typedef GtkFileChooserButtonClass BaseClassType;
+ typedef Gtk::HBox_Class CppClassParent;
+ typedef GtkHBoxClass BaseClassParent;
+
+ friend class FileChooserButton;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_FILECHOOSERBUTTON_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/filechooserdialog_p.h b/libs/gtkmm2/gtk/gtkmm/private/filechooserdialog_p.h
new file mode 100644
index 0000000000..38e4d9aa12
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/filechooserdialog_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_FILECHOOSERDIALOG_P_H
+#define _GTKMM_FILECHOOSERDIALOG_P_H
+#include <gtkmm/private/dialog_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class FileChooserDialog_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef FileChooserDialog CppObjectType;
+ typedef GtkFileChooserDialog BaseObjectType;
+ typedef GtkFileChooserDialogClass BaseClassType;
+ typedef Gtk::Dialog_Class CppClassParent;
+ typedef GtkDialogClass BaseClassParent;
+
+ friend class FileChooserDialog;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_FILECHOOSERDIALOG_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/filechooserwidget_p.h b/libs/gtkmm2/gtk/gtkmm/private/filechooserwidget_p.h
new file mode 100644
index 0000000000..09e093dca1
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/filechooserwidget_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_FILECHOOSERWIDGET_P_H
+#define _GTKMM_FILECHOOSERWIDGET_P_H
+#include <gtkmm/private/box_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class FileChooserWidget_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef FileChooserWidget CppObjectType;
+ typedef GtkFileChooserWidget BaseObjectType;
+ typedef GtkFileChooserWidgetClass BaseClassType;
+ typedef Gtk::VBox_Class CppClassParent;
+ typedef GtkVBoxClass BaseClassParent;
+
+ friend class FileChooserWidget;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_FILECHOOSERWIDGET_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/filefilter_p.h b/libs/gtkmm2/gtk/gtkmm/private/filefilter_p.h
new file mode 100644
index 0000000000..cfc5b84d36
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/filefilter_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_FILEFILTER_P_H
+#define _GTKMM_FILEFILTER_P_H
+#include <gtkmm/private/object_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class FileFilter_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef FileFilter CppObjectType;
+ typedef GtkFileFilter BaseObjectType;
+ typedef GtkFileFilterClass BaseClassType;
+ typedef Gtk::Object_Class CppClassParent;
+ typedef GtkObjectClass BaseClassParent;
+
+ friend class FileFilter;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_FILEFILTER_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/fileselection_p.h b/libs/gtkmm2/gtk/gtkmm/private/fileselection_p.h
new file mode 100644
index 0000000000..9ab7fc7c1f
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/fileselection_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_FILESELECTION_P_H
+#define _GTKMM_FILESELECTION_P_H
+#include <gtkmm/private/dialog_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class FileSelection_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef FileSelection CppObjectType;
+ typedef GtkFileSelection BaseObjectType;
+ typedef GtkFileSelectionClass BaseClassType;
+ typedef Gtk::Dialog_Class CppClassParent;
+ typedef GtkDialogClass BaseClassParent;
+
+ friend class FileSelection;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_FILESELECTION_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/fixed_p.h b/libs/gtkmm2/gtk/gtkmm/private/fixed_p.h
new file mode 100644
index 0000000000..b1c4abe756
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/fixed_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_FIXED_P_H
+#define _GTKMM_FIXED_P_H
+#include <gtkmm/private/container_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class Fixed_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Fixed CppObjectType;
+ typedef GtkFixed BaseObjectType;
+ typedef GtkFixedClass BaseClassType;
+ typedef Gtk::Container_Class CppClassParent;
+ typedef GtkContainerClass BaseClassParent;
+
+ friend class Fixed;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_FIXED_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/fontbutton_p.h b/libs/gtkmm2/gtk/gtkmm/private/fontbutton_p.h
new file mode 100644
index 0000000000..746f160914
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/fontbutton_p.h
@@ -0,0 +1,45 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_FONTBUTTON_P_H
+#define _GTKMM_FONTBUTTON_P_H
+#include <gtkmm/private/button_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class FontButton_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef FontButton CppObjectType;
+ typedef GtkFontButton BaseObjectType;
+ typedef GtkFontButtonClass BaseClassType;
+ typedef Gtk::Button_Class CppClassParent;
+ typedef GtkButtonClass BaseClassParent;
+
+ friend class FontButton;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void font_set_callback(GtkFontButton* self);
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_FONTBUTTON_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/fontselection_p.h b/libs/gtkmm2/gtk/gtkmm/private/fontselection_p.h
new file mode 100644
index 0000000000..50da4e3401
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/fontselection_p.h
@@ -0,0 +1,82 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_FONTSELECTION_P_H
+#define _GTKMM_FONTSELECTION_P_H
+#include <gtkmm/private/box_p.h>
+#include <gtkmm/private/dialog_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class FontSelection_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef FontSelection CppObjectType;
+ typedef GtkFontSelection BaseObjectType;
+ typedef GtkFontSelectionClass BaseClassType;
+ typedef Gtk::VBox_Class CppClassParent;
+ typedef GtkVBoxClass BaseClassParent;
+
+ friend class FontSelection;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class FontSelectionDialog_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef FontSelectionDialog CppObjectType;
+ typedef GtkFontSelectionDialog BaseObjectType;
+ typedef GtkFontSelectionDialogClass BaseClassType;
+ typedef Gtk::Dialog_Class CppClassParent;
+ typedef GtkDialogClass BaseClassParent;
+
+ friend class FontSelectionDialog;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_FONTSELECTION_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/frame_p.h b/libs/gtkmm2/gtk/gtkmm/private/frame_p.h
new file mode 100644
index 0000000000..297c7efbe7
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/frame_p.h
@@ -0,0 +1,45 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_FRAME_P_H
+#define _GTKMM_FRAME_P_H
+#include <gtkmm/private/bin_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class Frame_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Frame CppObjectType;
+ typedef GtkFrame BaseObjectType;
+ typedef GtkFrameClass BaseClassType;
+ typedef Gtk::Bin_Class CppClassParent;
+ typedef GtkBinClass BaseClassParent;
+
+ friend class Frame;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+ static void compute_child_allocation_vfunc_callback(GtkFrame* self, GtkAllocation* allocation);
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_FRAME_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/handlebox_p.h b/libs/gtkmm2/gtk/gtkmm/private/handlebox_p.h
new file mode 100644
index 0000000000..d1e0b3c30d
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/handlebox_p.h
@@ -0,0 +1,46 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_HANDLEBOX_P_H
+#define _GTKMM_HANDLEBOX_P_H
+#include <gtkmm/private/bin_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class HandleBox_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef HandleBox CppObjectType;
+ typedef GtkHandleBox BaseObjectType;
+ typedef GtkHandleBoxClass BaseClassType;
+ typedef Gtk::Bin_Class CppClassParent;
+ typedef GtkBinClass BaseClassParent;
+
+ friend class HandleBox;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void child_attached_callback(GtkHandleBox* self, GtkWidget* p0);
+ static void child_detached_callback(GtkHandleBox* self, GtkWidget* p0);
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_HANDLEBOX_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/iconfactory_p.h b/libs/gtkmm2/gtk/gtkmm/private/iconfactory_p.h
new file mode 100644
index 0000000000..8840e8abde
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/iconfactory_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_ICONFACTORY_P_H
+#define _GTKMM_ICONFACTORY_P_H
+#include <glibmm/private/object_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class IconFactory_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef IconFactory CppObjectType;
+ typedef GtkIconFactory BaseObjectType;
+ typedef GtkIconFactoryClass BaseClassType;
+ typedef Glib::Object_Class CppClassParent;
+ typedef GObjectClass BaseClassParent;
+
+ friend class IconFactory;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_ICONFACTORY_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/iconinfo_p.h b/libs/gtkmm2/gtk/gtkmm/private/iconinfo_p.h
new file mode 100644
index 0000000000..e391510843
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/iconinfo_p.h
@@ -0,0 +1,6 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_ICONINFO_P_H
+#define _GTKMM_ICONINFO_P_H
+#endif /* _GTKMM_ICONINFO_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/iconset_p.h b/libs/gtkmm2/gtk/gtkmm/private/iconset_p.h
new file mode 100644
index 0000000000..1e861df94c
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/iconset_p.h
@@ -0,0 +1,6 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_ICONSET_P_H
+#define _GTKMM_ICONSET_P_H
+#endif /* _GTKMM_ICONSET_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/iconsource_p.h b/libs/gtkmm2/gtk/gtkmm/private/iconsource_p.h
new file mode 100644
index 0000000000..304da67691
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/iconsource_p.h
@@ -0,0 +1,6 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_ICONSOURCE_P_H
+#define _GTKMM_ICONSOURCE_P_H
+#endif /* _GTKMM_ICONSOURCE_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/icontheme_p.h b/libs/gtkmm2/gtk/gtkmm/private/icontheme_p.h
new file mode 100644
index 0000000000..a54fdbc17e
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/icontheme_p.h
@@ -0,0 +1,45 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_ICONTHEME_P_H
+#define _GTKMM_ICONTHEME_P_H
+#include <glibmm/private/object_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class IconTheme_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef IconTheme CppObjectType;
+ typedef GtkIconTheme BaseObjectType;
+ typedef GtkIconThemeClass BaseClassType;
+ typedef Glib::Object_Class CppClassParent;
+ typedef GObjectClass BaseClassParent;
+
+ friend class IconTheme;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void changed_callback(GtkIconTheme* self);
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_ICONTHEME_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/iconview_p.h b/libs/gtkmm2/gtk/gtkmm/private/iconview_p.h
new file mode 100644
index 0000000000..beed996eda
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/iconview_p.h
@@ -0,0 +1,47 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_ICONVIEW_P_H
+#define _GTKMM_ICONVIEW_P_H
+#include <gtkmm/private/container_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class IconView_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef IconView CppObjectType;
+ typedef GtkIconView BaseObjectType;
+ typedef GtkIconViewClass BaseClassType;
+ typedef Gtk::Container_Class CppClassParent;
+ typedef GtkContainerClass BaseClassParent;
+
+ friend class IconView;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void set_scroll_adjustments_callback(GtkIconView* self, GtkAdjustment* p0, GtkAdjustment* p1);
+ static void item_activated_callback(GtkIconView* self, GtkTreePath* p0);
+ static void selection_changed_callback(GtkIconView* self);
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_ICONVIEW_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/image_p.h b/libs/gtkmm2/gtk/gtkmm/private/image_p.h
new file mode 100644
index 0000000000..c01599d6c7
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/image_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_IMAGE_P_H
+#define _GTKMM_IMAGE_P_H
+#include <gtkmm/private/misc_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class Image_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Image CppObjectType;
+ typedef GtkImage BaseObjectType;
+ typedef GtkImageClass BaseClassType;
+ typedef Gtk::Misc_Class CppClassParent;
+ typedef GtkMiscClass BaseClassParent;
+
+ friend class Image;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_IMAGE_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/imagemenuitem_p.h b/libs/gtkmm2/gtk/gtkmm/private/imagemenuitem_p.h
new file mode 100644
index 0000000000..4099489f25
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/imagemenuitem_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_IMAGEMENUITEM_P_H
+#define _GTKMM_IMAGEMENUITEM_P_H
+#include <gtkmm/private/menuitem_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class ImageMenuItem_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef ImageMenuItem CppObjectType;
+ typedef GtkImageMenuItem BaseObjectType;
+ typedef GtkImageMenuItemClass BaseClassType;
+ typedef Gtk::MenuItem_Class CppClassParent;
+ typedef GtkMenuItemClass BaseClassParent;
+
+ friend class ImageMenuItem;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_IMAGEMENUITEM_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/inputdialog_p.h b/libs/gtkmm2/gtk/gtkmm/private/inputdialog_p.h
new file mode 100644
index 0000000000..3197f6efb5
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/inputdialog_p.h
@@ -0,0 +1,46 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_INPUTDIALOG_P_H
+#define _GTKMM_INPUTDIALOG_P_H
+#include <gtkmm/private/dialog_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class InputDialog_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef InputDialog CppObjectType;
+ typedef GtkInputDialog BaseObjectType;
+ typedef GtkInputDialogClass BaseClassType;
+ typedef Gtk::Dialog_Class CppClassParent;
+ typedef GtkDialogClass BaseClassParent;
+
+ friend class InputDialog;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void enable_device_callback(GtkInputDialog* self, GdkDevice* p0);
+ static void disable_device_callback(GtkInputDialog* self, GdkDevice* p0);
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_INPUTDIALOG_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/invisible_p.h b/libs/gtkmm2/gtk/gtkmm/private/invisible_p.h
new file mode 100644
index 0000000000..0709dc8989
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/invisible_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_INVISIBLE_P_H
+#define _GTKMM_INVISIBLE_P_H
+#include <gtkmm/private/widget_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class Invisible_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Invisible CppObjectType;
+ typedef GtkInvisible BaseObjectType;
+ typedef GtkInvisibleClass BaseClassType;
+ typedef Gtk::Widget_Class CppClassParent;
+ typedef GtkWidgetClass BaseClassParent;
+
+ friend class Invisible;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_INVISIBLE_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/item_p.h b/libs/gtkmm2/gtk/gtkmm/private/item_p.h
new file mode 100644
index 0000000000..2baa4fa0de
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/item_p.h
@@ -0,0 +1,47 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_ITEM_P_H
+#define _GTKMM_ITEM_P_H
+#include <gtkmm/private/bin_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class Item_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Item CppObjectType;
+ typedef GtkItem BaseObjectType;
+ typedef GtkItemClass BaseClassType;
+ typedef Gtk::Bin_Class CppClassParent;
+ typedef GtkBinClass BaseClassParent;
+
+ friend class Item;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void select_callback(GtkItem* self);
+ static void deselect_callback(GtkItem* self);
+ static void toggle_callback(GtkItem* self);
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_ITEM_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/label_p.h b/libs/gtkmm2/gtk/gtkmm/private/label_p.h
new file mode 100644
index 0000000000..5254aba319
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/label_p.h
@@ -0,0 +1,46 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_LABEL_P_H
+#define _GTKMM_LABEL_P_H
+#include <gtkmm/private/misc_p.h>
+#include <gtk/gtkmenu.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class Label_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Label CppObjectType;
+ typedef GtkLabel BaseObjectType;
+ typedef GtkLabelClass BaseClassType;
+ typedef Gtk::Misc_Class CppClassParent;
+ typedef GtkMiscClass BaseClassParent;
+
+ friend class Label;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void populate_popup_callback(GtkLabel* self, GtkMenu* p0);
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_LABEL_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/layout_p.h b/libs/gtkmm2/gtk/gtkmm/private/layout_p.h
new file mode 100644
index 0000000000..1c4c2773c5
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/layout_p.h
@@ -0,0 +1,45 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_LAYOUT_P_H
+#define _GTKMM_LAYOUT_P_H
+#include <gtkmm/private/container_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class Layout_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Layout CppObjectType;
+ typedef GtkLayout BaseObjectType;
+ typedef GtkLayoutClass BaseClassType;
+ typedef Gtk::Container_Class CppClassParent;
+ typedef GtkContainerClass BaseClassParent;
+
+ friend class Layout;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void set_scroll_adjustments_callback(GtkLayout* self, GtkAdjustment* p0, GtkAdjustment* p1);
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_LAYOUT_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/liststore_p.h b/libs/gtkmm2/gtk/gtkmm/private/liststore_p.h
new file mode 100644
index 0000000000..522ec0b0ca
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/liststore_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_LISTSTORE_P_H
+#define _GTKMM_LISTSTORE_P_H
+#include <glibmm/private/object_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class ListStore_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef ListStore CppObjectType;
+ typedef GtkListStore BaseObjectType;
+ typedef GtkListStoreClass BaseClassType;
+ typedef Glib::Object_Class CppClassParent;
+ typedef GObjectClass BaseClassParent;
+
+ friend class ListStore;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_LISTSTORE_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/main_p.h b/libs/gtkmm2/gtk/gtkmm/private/main_p.h
new file mode 100644
index 0000000000..a911a52b39
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/main_p.h
@@ -0,0 +1,6 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_MAIN_P_H
+#define _GTKMM_MAIN_P_H
+#endif /* _GTKMM_MAIN_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/menu_p.h b/libs/gtkmm2/gtk/gtkmm/private/menu_p.h
new file mode 100644
index 0000000000..97d6e21f30
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/menu_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_MENU_P_H
+#define _GTKMM_MENU_P_H
+#include <gtkmm/private/menushell_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class Menu_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Menu CppObjectType;
+ typedef GtkMenu BaseObjectType;
+ typedef GtkMenuClass BaseClassType;
+ typedef Gtk::MenuShell_Class CppClassParent;
+ typedef GtkMenuShellClass BaseClassParent;
+
+ friend class Menu;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_MENU_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/menubar_p.h b/libs/gtkmm2/gtk/gtkmm/private/menubar_p.h
new file mode 100644
index 0000000000..e36353f8c6
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/menubar_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_MENUBAR_P_H
+#define _GTKMM_MENUBAR_P_H
+#include <gtkmm/private/menushell_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class MenuBar_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef MenuBar CppObjectType;
+ typedef GtkMenuBar BaseObjectType;
+ typedef GtkMenuBarClass BaseClassType;
+ typedef Gtk::MenuShell_Class CppClassParent;
+ typedef GtkMenuShellClass BaseClassParent;
+
+ friend class MenuBar;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_MENUBAR_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/menuitem_p.h b/libs/gtkmm2/gtk/gtkmm/private/menuitem_p.h
new file mode 100644
index 0000000000..c900ddc67f
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/menuitem_p.h
@@ -0,0 +1,48 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_MENUITEM_P_H
+#define _GTKMM_MENUITEM_P_H
+#include <gtkmm/private/item_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class MenuItem_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef MenuItem CppObjectType;
+ typedef GtkMenuItem BaseObjectType;
+ typedef GtkMenuItemClass BaseClassType;
+ typedef Gtk::Item_Class CppClassParent;
+ typedef GtkItemClass BaseClassParent;
+
+ friend class MenuItem;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void activate_callback(GtkMenuItem* self);
+ static void activate_item_callback(GtkMenuItem* self);
+ static void toggle_size_request_callback(GtkMenuItem* self, int* p0);
+ static void toggle_size_allocate_callback(GtkMenuItem* self, gint p0);
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_MENUITEM_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/menushell_p.h b/libs/gtkmm2/gtk/gtkmm/private/menushell_p.h
new file mode 100644
index 0000000000..676e85d40e
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/menushell_p.h
@@ -0,0 +1,50 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_MENUSHELL_P_H
+#define _GTKMM_MENUSHELL_P_H
+#include <gtkmm/private/container_p.h>
+#include <gtkmm/menu.h>
+#include <gtkmm/menubar.h>
+#include <gtkmm/window.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class MenuShell_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef MenuShell CppObjectType;
+ typedef GtkMenuShell BaseObjectType;
+ typedef GtkMenuShellClass BaseClassType;
+ typedef Gtk::Container_Class CppClassParent;
+ typedef GtkContainerClass BaseClassParent;
+
+ friend class MenuShell;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void deactivate_callback(GtkMenuShell* self);
+ static void selection_done_callback(GtkMenuShell* self);
+
+ //Callbacks (virtual functions):
+ static void insert_vfunc_callback(GtkMenuShell* self, GtkWidget* child, int position);
+ };
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_MENUSHELL_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/menutoolbutton_p.h b/libs/gtkmm2/gtk/gtkmm/private/menutoolbutton_p.h
new file mode 100644
index 0000000000..401e1b5242
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/menutoolbutton_p.h
@@ -0,0 +1,45 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_MENUTOOLBUTTON_P_H
+#define _GTKMM_MENUTOOLBUTTON_P_H
+#include <gtkmm/private/toolbutton_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class MenuToolButton_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef MenuToolButton CppObjectType;
+ typedef GtkMenuToolButton BaseObjectType;
+ typedef GtkMenuToolButtonClass BaseClassType;
+ typedef Gtk::ToolButton_Class CppClassParent;
+ typedef GtkToolButtonClass BaseClassParent;
+
+ friend class MenuToolButton;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void show_menu_callback(GtkMenuToolButton* self);
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_MENUTOOLBUTTON_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/messagedialog_p.h b/libs/gtkmm2/gtk/gtkmm/private/messagedialog_p.h
new file mode 100644
index 0000000000..829b79c77e
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/messagedialog_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_MESSAGEDIALOG_P_H
+#define _GTKMM_MESSAGEDIALOG_P_H
+#include <gtkmm/private/dialog_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class MessageDialog_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef MessageDialog CppObjectType;
+ typedef GtkMessageDialog BaseObjectType;
+ typedef GtkMessageDialogClass BaseClassType;
+ typedef Gtk::Dialog_Class CppClassParent;
+ typedef GtkDialogClass BaseClassParent;
+
+ friend class MessageDialog;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_MESSAGEDIALOG_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/misc_p.h b/libs/gtkmm2/gtk/gtkmm/private/misc_p.h
new file mode 100644
index 0000000000..adeb898dfe
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/misc_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_MISC_P_H
+#define _GTKMM_MISC_P_H
+#include <gtkmm/private/widget_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class Misc_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Misc CppObjectType;
+ typedef GtkMisc BaseObjectType;
+ typedef GtkMiscClass BaseClassType;
+ typedef Gtk::Widget_Class CppClassParent;
+ typedef GtkWidgetClass BaseClassParent;
+
+ friend class Misc;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_MISC_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/notebook_p.h b/libs/gtkmm2/gtk/gtkmm/private/notebook_p.h
new file mode 100644
index 0000000000..de761d21c9
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/notebook_p.h
@@ -0,0 +1,45 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_NOTEBOOK_P_H
+#define _GTKMM_NOTEBOOK_P_H
+#include <gtkmm/private/container_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class Notebook_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Notebook CppObjectType;
+ typedef GtkNotebook BaseObjectType;
+ typedef GtkNotebookClass BaseClassType;
+ typedef Gtk::Container_Class CppClassParent;
+ typedef GtkContainerClass BaseClassParent;
+
+ friend class Notebook;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void switch_page_callback(GtkNotebook* self, GtkNotebookPage* p0, guint p1);
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_NOTEBOOK_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/object_p.h b/libs/gtkmm2/gtk/gtkmm/private/object_p.h
new file mode 100644
index 0000000000..dc4ba98bef
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/object_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_OBJECT_P_H
+#define _GTKMM_OBJECT_P_H
+#include <glibmm/private/object_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class Object_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Object CppObjectType;
+ typedef GtkObject BaseObjectType;
+ typedef GtkObjectClass BaseClassType;
+ typedef Glib::Object_Class CppClassParent;
+ typedef GObjectClass BaseClassParent;
+
+ friend class Object;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_OBJECT_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/optionmenu_p.h b/libs/gtkmm2/gtk/gtkmm/private/optionmenu_p.h
new file mode 100644
index 0000000000..414d3e631d
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/optionmenu_p.h
@@ -0,0 +1,45 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_OPTIONMENU_P_H
+#define _GTKMM_OPTIONMENU_P_H
+#include <gtkmm/private/button_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class OptionMenu_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef OptionMenu CppObjectType;
+ typedef GtkOptionMenu BaseObjectType;
+ typedef GtkOptionMenuClass BaseClassType;
+ typedef Gtk::Button_Class CppClassParent;
+ typedef GtkButtonClass BaseClassParent;
+
+ friend class OptionMenu;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void changed_callback(GtkOptionMenu* self);
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_OPTIONMENU_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/paned_p.h b/libs/gtkmm2/gtk/gtkmm/private/paned_p.h
new file mode 100644
index 0000000000..8d8af1f20d
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/paned_p.h
@@ -0,0 +1,118 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_PANED_P_H
+#define _GTKMM_PANED_P_H
+#include <gtkmm/private/container_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class Paned_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Paned CppObjectType;
+ typedef GtkPaned BaseObjectType;
+ typedef GtkPanedClass BaseClassType;
+ typedef Gtk::Container_Class CppClassParent;
+ typedef GtkContainerClass BaseClassParent;
+
+ friend class Paned;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class HPaned_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef HPaned CppObjectType;
+ typedef GtkHPaned BaseObjectType;
+ typedef GtkHPanedClass BaseClassType;
+ typedef Gtk::Paned_Class CppClassParent;
+ typedef GtkPanedClass BaseClassParent;
+
+ friend class HPaned;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class VPaned_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef VPaned CppObjectType;
+ typedef GtkVPaned BaseObjectType;
+ typedef GtkVPanedClass BaseClassType;
+ typedef Gtk::Paned_Class CppClassParent;
+ typedef GtkPanedClass BaseClassParent;
+
+ friend class VPaned;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_PANED_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/plug_p.h b/libs/gtkmm2/gtk/gtkmm/private/plug_p.h
new file mode 100644
index 0000000000..86c6e9b3f6
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/plug_p.h
@@ -0,0 +1,45 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_PLUG_P_H
+#define _GTKMM_PLUG_P_H
+#include <gtkmm/private/window_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class Plug_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Plug CppObjectType;
+ typedef GtkPlug BaseObjectType;
+ typedef GtkPlugClass BaseClassType;
+ typedef Gtk::Window_Class CppClassParent;
+ typedef GtkWindowClass BaseClassParent;
+
+ friend class Plug;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void embedded_callback(GtkPlug* self);
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_PLUG_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/progressbar_p.h b/libs/gtkmm2/gtk/gtkmm/private/progressbar_p.h
new file mode 100644
index 0000000000..783de015ea
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/progressbar_p.h
@@ -0,0 +1,45 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_PROGRESSBAR_P_H
+#define _GTKMM_PROGRESSBAR_P_H
+#include <gtkmm/private/widget_p.h>
+#include <gtk/gtkprogress.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class ProgressBar_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef ProgressBar CppObjectType;
+ typedef GtkProgressBar BaseObjectType;
+ typedef GtkProgressBarClass BaseClassType;
+ typedef Gtk::Widget_Class CppClassParent;
+ typedef GtkProgressClass BaseClassParent;
+
+ friend class ProgressBar;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_PROGRESSBAR_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/radioaction_p.h b/libs/gtkmm2/gtk/gtkmm/private/radioaction_p.h
new file mode 100644
index 0000000000..ab9ae13b95
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/radioaction_p.h
@@ -0,0 +1,45 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_RADIOACTION_P_H
+#define _GTKMM_RADIOACTION_P_H
+#include <gtkmm/private/toggleaction_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class RadioAction_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef RadioAction CppObjectType;
+ typedef GtkRadioAction BaseObjectType;
+ typedef GtkRadioActionClass BaseClassType;
+ typedef Gtk::ToggleAction_Class CppClassParent;
+ typedef GtkToggleActionClass BaseClassParent;
+
+ friend class RadioAction;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void changed_callback(GtkRadioAction* self, GtkRadioAction* p0);
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_RADIOACTION_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/radiobutton_p.h b/libs/gtkmm2/gtk/gtkmm/private/radiobutton_p.h
new file mode 100644
index 0000000000..bb0797be6c
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/radiobutton_p.h
@@ -0,0 +1,45 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_RADIOBUTTON_P_H
+#define _GTKMM_RADIOBUTTON_P_H
+#include <gtkmm/private/checkbutton_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class RadioButton_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef RadioButton CppObjectType;
+ typedef GtkRadioButton BaseObjectType;
+ typedef GtkRadioButtonClass BaseClassType;
+ typedef Gtk::CheckButton_Class CppClassParent;
+ typedef GtkCheckButtonClass BaseClassParent;
+
+ friend class RadioButton;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void group_changed_callback(GtkRadioButton* self);
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_RADIOBUTTON_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/radiomenuitem_p.h b/libs/gtkmm2/gtk/gtkmm/private/radiomenuitem_p.h
new file mode 100644
index 0000000000..aa49592fc7
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/radiomenuitem_p.h
@@ -0,0 +1,45 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_RADIOMENUITEM_P_H
+#define _GTKMM_RADIOMENUITEM_P_H
+#include <gtkmm/private/checkmenuitem_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class RadioMenuItem_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef RadioMenuItem CppObjectType;
+ typedef GtkRadioMenuItem BaseObjectType;
+ typedef GtkRadioMenuItemClass BaseClassType;
+ typedef Gtk::CheckMenuItem_Class CppClassParent;
+ typedef GtkCheckMenuItemClass BaseClassParent;
+
+ friend class RadioMenuItem;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void group_changed_callback(GtkRadioMenuItem* self);
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_RADIOMENUITEM_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/radiotoolbutton_p.h b/libs/gtkmm2/gtk/gtkmm/private/radiotoolbutton_p.h
new file mode 100644
index 0000000000..034902a829
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/radiotoolbutton_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_RADIOTOOLBUTTON_P_H
+#define _GTKMM_RADIOTOOLBUTTON_P_H
+#include <gtkmm/private/toggletoolbutton_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class RadioToolButton_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef RadioToolButton CppObjectType;
+ typedef GtkRadioToolButton BaseObjectType;
+ typedef GtkRadioToolButtonClass BaseClassType;
+ typedef Gtk::ToggleToolButton_Class CppClassParent;
+ typedef GtkToggleToolButtonClass BaseClassParent;
+
+ friend class RadioToolButton;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_RADIOTOOLBUTTON_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/range_p.h b/libs/gtkmm2/gtk/gtkmm/private/range_p.h
new file mode 100644
index 0000000000..78c6b0c5a3
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/range_p.h
@@ -0,0 +1,48 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_RANGE_P_H
+#define _GTKMM_RANGE_P_H
+#include <gtkmm/private/widget_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class Range_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Range CppObjectType;
+ typedef GtkRange BaseObjectType;
+ typedef GtkRangeClass BaseClassType;
+ typedef Gtk::Widget_Class CppClassParent;
+ typedef GtkWidgetClass BaseClassParent;
+
+ friend class Range;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void value_changed_callback(GtkRange* self);
+ static void adjust_bounds_callback(GtkRange* self, gdouble p0);
+ static void move_slider_callback(GtkRange* self, GtkScrollType p0);
+
+ //Callbacks (virtual functions):
+ static void get_range_border_vfunc_callback(GtkRange* self, GtkBorder* border);
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_RANGE_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/rc_p.h b/libs/gtkmm2/gtk/gtkmm/private/rc_p.h
new file mode 100644
index 0000000000..963495fb4f
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/rc_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_RC_P_H
+#define _GTKMM_RC_P_H
+#include <glibmm/private/object_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class RcStyle_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef RcStyle CppObjectType;
+ typedef GtkRcStyle BaseObjectType;
+ typedef GtkRcStyleClass BaseClassType;
+ typedef Glib::Object_Class CppClassParent;
+ typedef GObjectClass BaseClassParent;
+
+ friend class RcStyle;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_RC_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/ruler_p.h b/libs/gtkmm2/gtk/gtkmm/private/ruler_p.h
new file mode 100644
index 0000000000..9c44986646
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/ruler_p.h
@@ -0,0 +1,120 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_RULER_P_H
+#define _GTKMM_RULER_P_H
+#include <gtkmm/private/widget_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class Ruler_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Ruler CppObjectType;
+ typedef GtkRuler BaseObjectType;
+ typedef GtkRulerClass BaseClassType;
+ typedef Gtk::Widget_Class CppClassParent;
+ typedef GtkWidgetClass BaseClassParent;
+
+ friend class Ruler;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+ static void draw_ticks_vfunc_callback(GtkRuler* self);
+ static void draw_pos_vfunc_callback(GtkRuler* self);
+};
+
+
+} // namespace Gtk
+
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class VRuler_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef VRuler CppObjectType;
+ typedef GtkVRuler BaseObjectType;
+ typedef GtkVRulerClass BaseClassType;
+ typedef Gtk::Ruler_Class CppClassParent;
+ typedef GtkRulerClass BaseClassParent;
+
+ friend class VRuler;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class HRuler_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef HRuler CppObjectType;
+ typedef GtkHRuler BaseObjectType;
+ typedef GtkHRulerClass BaseClassType;
+ typedef Gtk::Ruler_Class CppClassParent;
+ typedef GtkRulerClass BaseClassParent;
+
+ friend class HRuler;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_RULER_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/scale_p.h b/libs/gtkmm2/gtk/gtkmm/private/scale_p.h
new file mode 100644
index 0000000000..aa5dddf050
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/scale_p.h
@@ -0,0 +1,120 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_SCALE_P_H
+#define _GTKMM_SCALE_P_H
+#include <gtkmm/private/range_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class Scale_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Scale CppObjectType;
+ typedef GtkScale BaseObjectType;
+ typedef GtkScaleClass BaseClassType;
+ typedef Gtk::Range_Class CppClassParent;
+ typedef GtkRangeClass BaseClassParent;
+
+ friend class Scale;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static gchar* format_value_callback(GtkScale* self, gdouble p0);
+
+ //Callbacks (virtual functions):
+ static void draw_value_vfunc_callback(GtkScale* self);
+};
+
+
+} // namespace Gtk
+
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class VScale_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef VScale CppObjectType;
+ typedef GtkVScale BaseObjectType;
+ typedef GtkVScaleClass BaseClassType;
+ typedef Gtk::Scale_Class CppClassParent;
+ typedef GtkScaleClass BaseClassParent;
+
+ friend class VScale;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class HScale_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef HScale CppObjectType;
+ typedef GtkHScale BaseObjectType;
+ typedef GtkHScaleClass BaseClassType;
+ typedef Gtk::Scale_Class CppClassParent;
+ typedef GtkScaleClass BaseClassParent;
+
+ friend class HScale;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_SCALE_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/scrollbar_p.h b/libs/gtkmm2/gtk/gtkmm/private/scrollbar_p.h
new file mode 100644
index 0000000000..4781e3f466
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/scrollbar_p.h
@@ -0,0 +1,118 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_SCROLLBAR_P_H
+#define _GTKMM_SCROLLBAR_P_H
+#include <gtkmm/private/range_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class Scrollbar_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Scrollbar CppObjectType;
+ typedef GtkScrollbar BaseObjectType;
+ typedef GtkScrollbarClass BaseClassType;
+ typedef Gtk::Range_Class CppClassParent;
+ typedef GtkRangeClass BaseClassParent;
+
+ friend class Scrollbar;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class VScrollbar_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef VScrollbar CppObjectType;
+ typedef GtkVScrollbar BaseObjectType;
+ typedef GtkVScrollbarClass BaseClassType;
+ typedef Gtk::Scrollbar_Class CppClassParent;
+ typedef GtkScrollbarClass BaseClassParent;
+
+ friend class VScrollbar;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class HScrollbar_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef HScrollbar CppObjectType;
+ typedef GtkHScrollbar BaseObjectType;
+ typedef GtkHScrollbarClass BaseClassType;
+ typedef Gtk::Scrollbar_Class CppClassParent;
+ typedef GtkScrollbarClass BaseClassParent;
+
+ friend class HScrollbar;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_SCROLLBAR_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/scrolledwindow_p.h b/libs/gtkmm2/gtk/gtkmm/private/scrolledwindow_p.h
new file mode 100644
index 0000000000..f66dde8f03
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/scrolledwindow_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_SCROLLEDWINDOW_P_H
+#define _GTKMM_SCROLLEDWINDOW_P_H
+#include <gtkmm/private/bin_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class ScrolledWindow_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef ScrolledWindow CppObjectType;
+ typedef GtkScrolledWindow BaseObjectType;
+ typedef GtkScrolledWindowClass BaseClassType;
+ typedef Gtk::Bin_Class CppClassParent;
+ typedef GtkBinClass BaseClassParent;
+
+ friend class ScrolledWindow;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_SCROLLEDWINDOW_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/selectiondata_p.h b/libs/gtkmm2/gtk/gtkmm/private/selectiondata_p.h
new file mode 100644
index 0000000000..cb52061df2
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/selectiondata_p.h
@@ -0,0 +1,6 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_SELECTIONDATA_P_H
+#define _GTKMM_SELECTIONDATA_P_H
+#endif /* _GTKMM_SELECTIONDATA_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/separator_p.h b/libs/gtkmm2/gtk/gtkmm/private/separator_p.h
new file mode 100644
index 0000000000..a82c02557d
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/separator_p.h
@@ -0,0 +1,118 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_SEPARATOR_P_H
+#define _GTKMM_SEPARATOR_P_H
+#include <gtkmm/private/widget_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class Separator_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Separator CppObjectType;
+ typedef GtkSeparator BaseObjectType;
+ typedef GtkSeparatorClass BaseClassType;
+ typedef Gtk::Widget_Class CppClassParent;
+ typedef GtkWidgetClass BaseClassParent;
+
+ friend class Separator;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class VSeparator_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef VSeparator CppObjectType;
+ typedef GtkVSeparator BaseObjectType;
+ typedef GtkVSeparatorClass BaseClassType;
+ typedef Gtk::Separator_Class CppClassParent;
+ typedef GtkSeparatorClass BaseClassParent;
+
+ friend class VSeparator;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class HSeparator_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef HSeparator CppObjectType;
+ typedef GtkHSeparator BaseObjectType;
+ typedef GtkHSeparatorClass BaseClassType;
+ typedef Gtk::Separator_Class CppClassParent;
+ typedef GtkSeparatorClass BaseClassParent;
+
+ friend class HSeparator;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_SEPARATOR_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/separatormenuitem_p.h b/libs/gtkmm2/gtk/gtkmm/private/separatormenuitem_p.h
new file mode 100644
index 0000000000..1987425009
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/separatormenuitem_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_SEPARATORMENUITEM_P_H
+#define _GTKMM_SEPARATORMENUITEM_P_H
+#include <gtkmm/private/menuitem_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class SeparatorMenuItem_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef SeparatorMenuItem CppObjectType;
+ typedef GtkSeparatorMenuItem BaseObjectType;
+ typedef GtkSeparatorMenuItemClass BaseClassType;
+ typedef Gtk::MenuItem_Class CppClassParent;
+ typedef GtkMenuItemClass BaseClassParent;
+
+ friend class SeparatorMenuItem;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_SEPARATORMENUITEM_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/separatortoolitem_p.h b/libs/gtkmm2/gtk/gtkmm/private/separatortoolitem_p.h
new file mode 100644
index 0000000000..5de5fc7e88
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/separatortoolitem_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_SEPARATORTOOLITEM_P_H
+#define _GTKMM_SEPARATORTOOLITEM_P_H
+#include <gtkmm/private/toolitem_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class SeparatorToolItem_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef SeparatorToolItem CppObjectType;
+ typedef GtkSeparatorToolItem BaseObjectType;
+ typedef GtkSeparatorToolItemClass BaseClassType;
+ typedef Gtk::ToolItem_Class CppClassParent;
+ typedef GtkToolItemClass BaseClassParent;
+
+ friend class SeparatorToolItem;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_SEPARATORTOOLITEM_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/settings_p.h b/libs/gtkmm2/gtk/gtkmm/private/settings_p.h
new file mode 100644
index 0000000000..72e13b447a
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/settings_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_SETTINGS_P_H
+#define _GTKMM_SETTINGS_P_H
+#include <glibmm/private/object_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class Settings_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Settings CppObjectType;
+ typedef GtkSettings BaseObjectType;
+ typedef GtkSettingsClass BaseClassType;
+ typedef Glib::Object_Class CppClassParent;
+ typedef GObjectClass BaseClassParent;
+
+ friend class Settings;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_SETTINGS_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/sizegroup_p.h b/libs/gtkmm2/gtk/gtkmm/private/sizegroup_p.h
new file mode 100644
index 0000000000..f33b8bdf58
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/sizegroup_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_SIZEGROUP_P_H
+#define _GTKMM_SIZEGROUP_P_H
+#include <glibmm/private/object_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class SizeGroup_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef SizeGroup CppObjectType;
+ typedef GtkSizeGroup BaseObjectType;
+ typedef GtkSizeGroupClass BaseClassType;
+ typedef Glib::Object_Class CppClassParent;
+ typedef GObjectClass BaseClassParent;
+
+ friend class SizeGroup;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_SIZEGROUP_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/socket_p.h b/libs/gtkmm2/gtk/gtkmm/private/socket_p.h
new file mode 100644
index 0000000000..5689897e40
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/socket_p.h
@@ -0,0 +1,46 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_SOCKET_P_H
+#define _GTKMM_SOCKET_P_H
+#include <gtkmm/private/container_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class Socket_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Socket CppObjectType;
+ typedef GtkSocket BaseObjectType;
+ typedef GtkSocketClass BaseClassType;
+ typedef Gtk::Container_Class CppClassParent;
+ typedef GtkContainerClass BaseClassParent;
+
+ friend class Socket;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void plug_added_callback(GtkSocket* self);
+ static gboolean plug_removed_callback(GtkSocket* self);
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_SOCKET_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/spinbutton_p.h b/libs/gtkmm2/gtk/gtkmm/private/spinbutton_p.h
new file mode 100644
index 0000000000..f69aee70cf
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/spinbutton_p.h
@@ -0,0 +1,47 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_SPINBUTTON_P_H
+#define _GTKMM_SPINBUTTON_P_H
+#include <gtkmm/private/entry_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class SpinButton_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef SpinButton CppObjectType;
+ typedef GtkSpinButton BaseObjectType;
+ typedef GtkSpinButtonClass BaseClassType;
+ typedef Gtk::Entry_Class CppClassParent;
+ typedef GtkEntryClass BaseClassParent;
+
+ friend class SpinButton;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static gint input_callback(GtkSpinButton* self, gdouble* p0);
+ static gboolean output_callback(GtkSpinButton* self);
+ static void value_changed_callback(GtkSpinButton* self);
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_SPINBUTTON_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/statusbar_p.h b/libs/gtkmm2/gtk/gtkmm/private/statusbar_p.h
new file mode 100644
index 0000000000..23efc95695
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/statusbar_p.h
@@ -0,0 +1,46 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_STATUSBAR_P_H
+#define _GTKMM_STATUSBAR_P_H
+#include <gtkmm/private/box_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class Statusbar_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Statusbar CppObjectType;
+ typedef GtkStatusbar BaseObjectType;
+ typedef GtkStatusbarClass BaseClassType;
+ typedef Gtk::HBox_Class CppClassParent;
+ typedef GtkHBoxClass BaseClassParent;
+
+ friend class Statusbar;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void text_pushed_callback(GtkStatusbar* self, guint p0, const gchar* p1);
+ static void text_popped_callback(GtkStatusbar* self, guint p0, const gchar* p1);
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_STATUSBAR_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/stockitem_p.h b/libs/gtkmm2/gtk/gtkmm/private/stockitem_p.h
new file mode 100644
index 0000000000..0ac19c3f37
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/stockitem_p.h
@@ -0,0 +1,6 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_STOCKITEM_P_H
+#define _GTKMM_STOCKITEM_P_H
+#endif /* _GTKMM_STOCKITEM_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/style_p.h b/libs/gtkmm2/gtk/gtkmm/private/style_p.h
new file mode 100644
index 0000000000..8c10fca392
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/style_p.h
@@ -0,0 +1,75 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_STYLE_P_H
+#define _GTKMM_STYLE_P_H
+#include <glibmm/private/object_p.h>
+#include <gtk/gtkrc.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class Style_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Style CppObjectType;
+ typedef GtkStyle BaseObjectType;
+ typedef GtkStyleClass BaseClassType;
+ typedef Glib::Object_Class CppClassParent;
+ typedef GObjectClass BaseClassParent;
+
+ friend class Style;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void realize_callback(GtkStyle* self);
+ static void unrealize_callback(GtkStyle* self);
+
+ //Callbacks (virtual functions):
+ static void realize_vfunc_callback(GtkStyle* self);
+ static void unrealize_vfunc_callback(GtkStyle* self);
+ static void copy_vfunc_callback(GtkStyle* self, GtkStyle* src);
+ static GtkStyle* clone_vfunc_callback(GtkStyle* self);
+ static void init_from_rc_vfunc_callback(GtkStyle* self, GtkRcStyle* rc_style);
+ static void set_background_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type);
+ static GdkPixbuf* render_icon_vfunc_callback(GtkStyle* self, const GtkIconSource* source, GtkTextDirection direction, GtkStateType state, GtkIconSize size, GtkWidget* widget, const gchar* detail);
+ static void draw_hline_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, gint x1, gint x2, gint y);
+ static void draw_vline_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, gint y1, gint y2, gint x);
+ static void draw_shadow_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GtkShadowType shadow_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, gint x, gint y, gint width, gint height);
+ static void draw_polygon_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GtkShadowType shadow_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, GdkPoint* point, gint npoints, gboolean fill);
+ static void draw_arrow_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GtkShadowType shadow_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, GtkArrowType arrow_type, gboolean fill, gint x, gint y, gint width, gint height);
+ static void draw_diamond_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GtkShadowType shadow_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, gint x, gint y, gint width, gint height);
+ static void draw_string_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, gint x, gint y, const gchar* string);
+ static void draw_box_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GtkShadowType shadow_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, gint x, gint y, gint width, gint height);
+ static void draw_flat_box_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GtkShadowType shadow_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, gint x, gint y, gint width, gint height);
+ static void draw_check_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GtkShadowType shadow_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, gint x, gint y, gint width, gint height);
+ static void draw_option_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GtkShadowType shadow_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, gint x, gint y, gint width, gint height);
+ static void draw_tab_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GtkShadowType shadow_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, gint x, gint y, gint width, gint height);
+ static void draw_shadow_gap_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GtkShadowType shadow_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, gint x, gint y, gint width, gint height, GtkPositionType gap_side, gint gap_x, gint gap_width);
+ static void draw_box_gap_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GtkShadowType shadow_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, gint x, gint y, gint width, gint height, GtkPositionType gap_side, gint gap_x, gint gap_width);
+ static void draw_extension_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GtkShadowType shadow_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, gint x, gint y, gint width, gint height, GtkPositionType gap_side);
+ static void draw_focus_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, gint x, gint y, gint width, gint height);
+ static void draw_slider_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GtkShadowType shadow_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, gint x, gint y, gint width, gint height, GtkOrientation orientation);
+ static void draw_handle_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GtkShadowType shadow_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, gint x, gint y, gint width, gint height, GtkOrientation orientation);
+ static void draw_expander_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, gint x, gint y, GtkExpanderStyle expander_style);
+ static void draw_layout_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, gboolean use_text, GdkRectangle* area, GtkWidget* widget, const gchar* detail, gint x, gint y, PangoLayout* layout);
+ static void draw_resize_grip_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, GdkWindowEdge edge, gint x, gint y, gint width, gint height);
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_STYLE_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/table_p.h b/libs/gtkmm2/gtk/gtkmm/private/table_p.h
new file mode 100644
index 0000000000..8fae19b7cf
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/table_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TABLE_P_H
+#define _GTKMM_TABLE_P_H
+#include <gtkmm/private/container_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class Table_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Table CppObjectType;
+ typedef GtkTable BaseObjectType;
+ typedef GtkTableClass BaseClassType;
+ typedef Gtk::Container_Class CppClassParent;
+ typedef GtkContainerClass BaseClassParent;
+
+ friend class Table;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_TABLE_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/targetlist_p.h b/libs/gtkmm2/gtk/gtkmm/private/targetlist_p.h
new file mode 100644
index 0000000000..508f488cfd
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/targetlist_p.h
@@ -0,0 +1,6 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TARGETLIST_P_H
+#define _GTKMM_TARGETLIST_P_H
+#endif /* _GTKMM_TARGETLIST_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/tearoffmenuitem_p.h b/libs/gtkmm2/gtk/gtkmm/private/tearoffmenuitem_p.h
new file mode 100644
index 0000000000..e6378ac638
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/tearoffmenuitem_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TEAROFFMENUITEM_P_H
+#define _GTKMM_TEAROFFMENUITEM_P_H
+#include <gtkmm/private/menuitem_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class TearoffMenuItem_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef TearoffMenuItem CppObjectType;
+ typedef GtkTearoffMenuItem BaseObjectType;
+ typedef GtkTearoffMenuItemClass BaseClassType;
+ typedef Gtk::MenuItem_Class CppClassParent;
+ typedef GtkMenuItemClass BaseClassParent;
+
+ friend class TearoffMenuItem;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_TEAROFFMENUITEM_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/textattributes_p.h b/libs/gtkmm2/gtk/gtkmm/private/textattributes_p.h
new file mode 100644
index 0000000000..4b922c4c44
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/textattributes_p.h
@@ -0,0 +1,6 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TEXTATTRIBUTES_P_H
+#define _GTKMM_TEXTATTRIBUTES_P_H
+#endif /* _GTKMM_TEXTATTRIBUTES_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/textbuffer_p.h b/libs/gtkmm2/gtk/gtkmm/private/textbuffer_p.h
new file mode 100644
index 0000000000..59db070205
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/textbuffer_p.h
@@ -0,0 +1,56 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TEXTBUFFER_P_H
+#define _GTKMM_TEXTBUFFER_P_H
+#include <glibmm/private/object_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class TextBuffer_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef TextBuffer CppObjectType;
+ typedef GtkTextBuffer BaseObjectType;
+ typedef GtkTextBufferClass BaseClassType;
+ typedef Glib::Object_Class CppClassParent;
+ typedef GObjectClass BaseClassParent;
+
+ friend class TextBuffer;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void insert_text_callback(GtkTextBuffer* self, GtkTextIter* p0, const gchar* p1, gint p2);
+ static void insert_pixbuf_callback(GtkTextBuffer* self, GtkTextIter* p0, GdkPixbuf* p1);
+ static void insert_child_anchor_callback(GtkTextBuffer* self, GtkTextIter* p0, GtkTextChildAnchor* p1);
+ static void delete_range_callback(GtkTextBuffer* self, GtkTextIter* p0, GtkTextIter* p1);
+ static void changed_callback(GtkTextBuffer* self);
+ static void modified_changed_callback(GtkTextBuffer* self);
+ static void mark_set_callback(GtkTextBuffer* self, const GtkTextIter* p0, GtkTextMark* p1);
+ static void mark_deleted_callback(GtkTextBuffer* self, GtkTextMark* p0);
+ static void apply_tag_callback(GtkTextBuffer* self, GtkTextTag* p0, const GtkTextIter* p1, const GtkTextIter* p2);
+ static void remove_tag_callback(GtkTextBuffer* self, GtkTextTag* p0, const GtkTextIter* p1, const GtkTextIter* p2);
+ static void begin_user_action_callback(GtkTextBuffer* self);
+ static void end_user_action_callback(GtkTextBuffer* self);
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_TEXTBUFFER_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/textchildanchor_p.h b/libs/gtkmm2/gtk/gtkmm/private/textchildanchor_p.h
new file mode 100644
index 0000000000..a3a9822c45
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/textchildanchor_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TEXTCHILDANCHOR_P_H
+#define _GTKMM_TEXTCHILDANCHOR_P_H
+#include <glibmm/private/object_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class TextChildAnchor_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef TextChildAnchor CppObjectType;
+ typedef GtkTextChildAnchor BaseObjectType;
+ typedef GtkTextChildAnchorClass BaseClassType;
+ typedef Glib::Object_Class CppClassParent;
+ typedef GObjectClass BaseClassParent;
+
+ friend class TextChildAnchor;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_TEXTCHILDANCHOR_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/textiter_p.h b/libs/gtkmm2/gtk/gtkmm/private/textiter_p.h
new file mode 100644
index 0000000000..b234c358b0
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/textiter_p.h
@@ -0,0 +1,6 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TEXTITER_P_H
+#define _GTKMM_TEXTITER_P_H
+#endif /* _GTKMM_TEXTITER_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/textmark_p.h b/libs/gtkmm2/gtk/gtkmm/private/textmark_p.h
new file mode 100644
index 0000000000..bba46d8c62
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/textmark_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TEXTMARK_P_H
+#define _GTKMM_TEXTMARK_P_H
+#include <glibmm/private/object_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class TextMark_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef TextMark CppObjectType;
+ typedef GtkTextMark BaseObjectType;
+ typedef GtkTextMarkClass BaseClassType;
+ typedef Glib::Object_Class CppClassParent;
+ typedef GObjectClass BaseClassParent;
+
+ friend class TextMark;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_TEXTMARK_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/texttag_p.h b/libs/gtkmm2/gtk/gtkmm/private/texttag_p.h
new file mode 100644
index 0000000000..8cab5dac5b
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/texttag_p.h
@@ -0,0 +1,46 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TEXTTAG_P_H
+#define _GTKMM_TEXTTAG_P_H
+#include <glibmm/private/object_p.h>
+#include <gtk/gtktexttag.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class TextTag_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef TextTag CppObjectType;
+ typedef GtkTextTag BaseObjectType;
+ typedef GtkTextTagClass BaseClassType;
+ typedef Glib::Object_Class CppClassParent;
+ typedef GObjectClass BaseClassParent;
+
+ friend class TextTag;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static gboolean event_callback(GtkTextTag* self, GObject* p0, GdkEvent* p1, const GtkTextIter* p2);
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_TEXTTAG_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/texttagtable_p.h b/libs/gtkmm2/gtk/gtkmm/private/texttagtable_p.h
new file mode 100644
index 0000000000..19964742d5
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/texttagtable_p.h
@@ -0,0 +1,47 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TEXTTAGTABLE_P_H
+#define _GTKMM_TEXTTAGTABLE_P_H
+#include <glibmm/private/object_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class TextTagTable_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef TextTagTable CppObjectType;
+ typedef GtkTextTagTable BaseObjectType;
+ typedef GtkTextTagTableClass BaseClassType;
+ typedef Glib::Object_Class CppClassParent;
+ typedef GObjectClass BaseClassParent;
+
+ friend class TextTagTable;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void tag_changed_callback(GtkTextTagTable* self, GtkTextTag* p0, gboolean p1);
+ static void tag_added_callback(GtkTextTagTable* self, GtkTextTag* p0);
+ static void tag_removed_callback(GtkTextTagTable* self, GtkTextTag* p0);
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_TEXTTAGTABLE_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/textview_p.h b/libs/gtkmm2/gtk/gtkmm/private/textview_p.h
new file mode 100644
index 0000000000..328d08f8d2
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/textview_p.h
@@ -0,0 +1,48 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TEXTVIEW_P_H
+#define _GTKMM_TEXTVIEW_P_H
+#include <gtkmm/private/container_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class TextView_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef TextView CppObjectType;
+ typedef GtkTextView BaseObjectType;
+ typedef GtkTextViewClass BaseClassType;
+ typedef Gtk::Container_Class CppClassParent;
+ typedef GtkContainerClass BaseClassParent;
+
+ friend class TextView;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void set_scroll_adjustments_callback(GtkTextView* self, GtkAdjustment* p0, GtkAdjustment* p1);
+ static void populate_popup_callback(GtkTextView* self, GtkMenu* p0);
+ static void set_anchor_callback(GtkTextView* self);
+ static void insert_at_cursor_callback(GtkTextView* self, const gchar* p0);
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_TEXTVIEW_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/toggleaction_p.h b/libs/gtkmm2/gtk/gtkmm/private/toggleaction_p.h
new file mode 100644
index 0000000000..61de249561
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/toggleaction_p.h
@@ -0,0 +1,45 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TOGGLEACTION_P_H
+#define _GTKMM_TOGGLEACTION_P_H
+#include <gtkmm/private/action_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class ToggleAction_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef ToggleAction CppObjectType;
+ typedef GtkToggleAction BaseObjectType;
+ typedef GtkToggleActionClass BaseClassType;
+ typedef Gtk::Action_Class CppClassParent;
+ typedef GtkActionClass BaseClassParent;
+
+ friend class ToggleAction;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void toggled_callback(GtkToggleAction* self);
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_TOGGLEACTION_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/togglebutton_p.h b/libs/gtkmm2/gtk/gtkmm/private/togglebutton_p.h
new file mode 100644
index 0000000000..73b571158f
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/togglebutton_p.h
@@ -0,0 +1,45 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TOGGLEBUTTON_P_H
+#define _GTKMM_TOGGLEBUTTON_P_H
+#include <gtkmm/private/button_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class ToggleButton_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef ToggleButton CppObjectType;
+ typedef GtkToggleButton BaseObjectType;
+ typedef GtkToggleButtonClass BaseClassType;
+ typedef Gtk::Button_Class CppClassParent;
+ typedef GtkButtonClass BaseClassParent;
+
+ friend class ToggleButton;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void toggled_callback(GtkToggleButton* self);
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_TOGGLEBUTTON_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/toggletoolbutton_p.h b/libs/gtkmm2/gtk/gtkmm/private/toggletoolbutton_p.h
new file mode 100644
index 0000000000..9ed1cd4da0
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/toggletoolbutton_p.h
@@ -0,0 +1,45 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TOGGLETOOLBUTTON_P_H
+#define _GTKMM_TOGGLETOOLBUTTON_P_H
+#include <gtkmm/private/toolbutton_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class ToggleToolButton_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef ToggleToolButton CppObjectType;
+ typedef GtkToggleToolButton BaseObjectType;
+ typedef GtkToggleToolButtonClass BaseClassType;
+ typedef Gtk::ToolButton_Class CppClassParent;
+ typedef GtkToolButtonClass BaseClassParent;
+
+ friend class ToggleToolButton;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void toggled_callback(GtkToggleToolButton* self);
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_TOGGLETOOLBUTTON_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/toolbar_p.h b/libs/gtkmm2/gtk/gtkmm/private/toolbar_p.h
new file mode 100644
index 0000000000..f2bb20e0d3
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/toolbar_p.h
@@ -0,0 +1,47 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TOOLBAR_P_H
+#define _GTKMM_TOOLBAR_P_H
+#include <gtkmm/private/container_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class Toolbar_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Toolbar CppObjectType;
+ typedef GtkToolbar BaseObjectType;
+ typedef GtkToolbarClass BaseClassType;
+ typedef Gtk::Container_Class CppClassParent;
+ typedef GtkContainerClass BaseClassParent;
+
+ friend class Toolbar;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void orientation_changed_callback(GtkToolbar* self, GtkOrientation p0);
+ static void style_changed_callback(GtkToolbar* self, GtkToolbarStyle p0);
+ static gboolean popup_context_menu_callback(GtkToolbar* self, gint p0, gint p1, gint p2);
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_TOOLBAR_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/toolbutton_p.h b/libs/gtkmm2/gtk/gtkmm/private/toolbutton_p.h
new file mode 100644
index 0000000000..2cac2dda6b
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/toolbutton_p.h
@@ -0,0 +1,45 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TOOLBUTTON_P_H
+#define _GTKMM_TOOLBUTTON_P_H
+#include <gtkmm/private/toolitem_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class ToolButton_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef ToolButton CppObjectType;
+ typedef GtkToolButton BaseObjectType;
+ typedef GtkToolButtonClass BaseClassType;
+ typedef Gtk::ToolItem_Class CppClassParent;
+ typedef GtkToolItemClass BaseClassParent;
+
+ friend class ToolButton;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void clicked_callback(GtkToolButton* self);
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_TOOLBUTTON_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/toolitem_p.h b/libs/gtkmm2/gtk/gtkmm/private/toolitem_p.h
new file mode 100644
index 0000000000..a35fb73560
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/toolitem_p.h
@@ -0,0 +1,46 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TOOLITEM_P_H
+#define _GTKMM_TOOLITEM_P_H
+#include <gtkmm/private/bin_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class ToolItem_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef ToolItem CppObjectType;
+ typedef GtkToolItem BaseObjectType;
+ typedef GtkToolItemClass BaseClassType;
+ typedef Gtk::Bin_Class CppClassParent;
+ typedef GtkBinClass BaseClassParent;
+
+ friend class ToolItem;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static gboolean create_menu_proxy_callback(GtkToolItem* self);
+ static void toolbar_reconfigured_callback(GtkToolItem* self);
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_TOOLITEM_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/tooltips_p.h b/libs/gtkmm2/gtk/gtkmm/private/tooltips_p.h
new file mode 100644
index 0000000000..1872000504
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/tooltips_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TOOLTIPS_P_H
+#define _GTKMM_TOOLTIPS_P_H
+#include <gtkmm/private/object_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class Tooltips_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Tooltips CppObjectType;
+ typedef GtkTooltips BaseObjectType;
+ typedef GtkTooltipsClass BaseClassType;
+ typedef Gtk::Object_Class CppClassParent;
+ typedef GtkObjectClass BaseClassParent;
+
+ friend class Tooltips;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_TOOLTIPS_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/treedragdest_p.h b/libs/gtkmm2/gtk/gtkmm/private/treedragdest_p.h
new file mode 100644
index 0000000000..0486146e02
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/treedragdest_p.h
@@ -0,0 +1,43 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TREEDRAGDEST_P_H
+#define _GTKMM_TREEDRAGDEST_P_H
+#include <glibmm/private/interface_p.h>
+
+#include <glibmm/private/interface_p.h>
+
+namespace Gtk
+{
+
+class TreeDragDest_Class : public Glib::Interface_Class
+{
+public:
+ typedef TreeDragDest CppObjectType;
+ typedef GtkTreeDragDest BaseObjectType;
+ typedef GtkTreeDragDestIface BaseClassType;
+ typedef Glib::Interface_Class CppClassParent;
+
+ friend class TreeDragDest;
+
+ const Glib::Interface_Class& init();
+
+ static void iface_init_function(void* g_iface, void* iface_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+ static gboolean drag_data_received_vfunc_callback(GtkTreeDragDest* self, GtkTreePath* dest, GtkSelectionData* selection_data);
+ static gboolean row_drop_possible_vfunc_callback(GtkTreeDragDest* self, GtkTreePath* dest_path, GtkSelectionData* selection_data);
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_TREEDRAGDEST_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/treedragsource_p.h b/libs/gtkmm2/gtk/gtkmm/private/treedragsource_p.h
new file mode 100644
index 0000000000..07f02f964f
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/treedragsource_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TREEDRAGSOURCE_P_H
+#define _GTKMM_TREEDRAGSOURCE_P_H
+#include <glibmm/private/interface_p.h>
+
+#include <glibmm/private/interface_p.h>
+
+namespace Gtk
+{
+
+class TreeDragSource_Class : public Glib::Interface_Class
+{
+public:
+ typedef TreeDragSource CppObjectType;
+ typedef GtkTreeDragSource BaseObjectType;
+ typedef GtkTreeDragSourceIface BaseClassType;
+ typedef Glib::Interface_Class CppClassParent;
+
+ friend class TreeDragSource;
+
+ const Glib::Interface_Class& init();
+
+ static void iface_init_function(void* g_iface, void* iface_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+ static gboolean drag_data_get_vfunc_callback(GtkTreeDragSource* self, GtkTreePath* path, GtkSelectionData* selection_data);
+ static gboolean row_draggable_vfunc_callback(GtkTreeDragSource* self, GtkTreePath* path);
+ static gboolean drag_data_delete_vfunc_callback(GtkTreeDragSource* self, GtkTreePath* path);
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_TREEDRAGSOURCE_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/treeiter_p.h b/libs/gtkmm2/gtk/gtkmm/private/treeiter_p.h
new file mode 100644
index 0000000000..bc45469e97
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/treeiter_p.h
@@ -0,0 +1,6 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TREEITER_P_H
+#define _GTKMM_TREEITER_P_H
+#endif /* _GTKMM_TREEITER_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/treemodel_p.h b/libs/gtkmm2/gtk/gtkmm/private/treemodel_p.h
new file mode 100644
index 0000000000..401d707834
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/treemodel_p.h
@@ -0,0 +1,60 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TREEMODEL_P_H
+#define _GTKMM_TREEMODEL_P_H
+#include <glibmm/private/interface_p.h>
+
+#include <glibmm/private/interface_p.h>
+
+namespace Gtk
+{
+
+class TreeModel_Class : public Glib::Interface_Class
+{
+public:
+ typedef TreeModel CppObjectType;
+ typedef GtkTreeModel BaseObjectType;
+ typedef GtkTreeModelIface BaseClassType;
+ typedef Glib::Interface_Class CppClassParent;
+
+ friend class TreeModel;
+
+ const Glib::Interface_Class& init();
+
+ static void iface_init_function(void* g_iface, void* iface_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void row_changed_callback(GtkTreeModel* self, GtkTreePath* path, GtkTreeIter* iter);
+ static void row_inserted_callback(GtkTreeModel* self, GtkTreePath* path, GtkTreeIter* iter);
+ static void row_has_child_toggled_callback(GtkTreeModel* self, GtkTreePath* path, GtkTreeIter* iter);
+ static void row_deleted_callback(GtkTreeModel* self, GtkTreePath* path);
+ static void rows_reordered_callback(GtkTreeModel* self, GtkTreePath* path, GtkTreeIter* iter, gint* new_order);
+
+ //Callbacks (virtual functions):
+ static GtkTreeModelFlags get_flags_vfunc_callback(GtkTreeModel* self);
+ static gint get_n_columns_vfunc_callback(GtkTreeModel* self);
+ static GType get_column_type_vfunc_callback(GtkTreeModel* self, gint index);
+ static gboolean iter_next_vfunc_callback(GtkTreeModel* self, GtkTreeIter* iter);
+ static gboolean get_iter_vfunc_callback(GtkTreeModel* self, GtkTreeIter* iter, GtkTreePath* path);
+ static gboolean iter_children_vfunc_callback(GtkTreeModel* self, GtkTreeIter* iter, GtkTreeIter* parent);
+ static gboolean iter_parent_vfunc_callback(GtkTreeModel* self, GtkTreeIter* iter, GtkTreeIter* child);
+ static gboolean iter_nth_child_vfunc_callback(GtkTreeModel* self, GtkTreeIter* iter, GtkTreeIter* parent, int n);
+ static int iter_n_children_vfunc_callback(GtkTreeModel* self, GtkTreeIter* iter);
+ static gboolean iter_has_child_vfunc_callback(GtkTreeModel* self, GtkTreeIter* iter);
+ static void ref_node_vfunc_callback(GtkTreeModel* self, GtkTreeIter* iter);
+ static void unref_node_vfunc_callback(GtkTreeModel* self, GtkTreeIter* iter);
+ static GtkTreePath* get_path_vfunc_callback(GtkTreeModel* self, GtkTreeIter* iter);
+ static void get_value_vfunc_callback(GtkTreeModel* self, GtkTreeIter* iter, gint column, GValue* value);
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_TREEMODEL_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/treemodelfilter_p.h b/libs/gtkmm2/gtk/gtkmm/private/treemodelfilter_p.h
new file mode 100644
index 0000000000..cd4f27a229
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/treemodelfilter_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TREEMODELFILTER_P_H
+#define _GTKMM_TREEMODELFILTER_P_H
+#include <glibmm/private/object_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class TreeModelFilter_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef TreeModelFilter CppObjectType;
+ typedef GtkTreeModelFilter BaseObjectType;
+ typedef GtkTreeModelFilterClass BaseClassType;
+ typedef Glib::Object_Class CppClassParent;
+ typedef GObjectClass BaseClassParent;
+
+ friend class TreeModelFilter;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_TREEMODELFILTER_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/treemodelsort_p.h b/libs/gtkmm2/gtk/gtkmm/private/treemodelsort_p.h
new file mode 100644
index 0000000000..ce050925cb
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/treemodelsort_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TREEMODELSORT_P_H
+#define _GTKMM_TREEMODELSORT_P_H
+#include <glibmm/private/object_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class TreeModelSort_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef TreeModelSort CppObjectType;
+ typedef GtkTreeModelSort BaseObjectType;
+ typedef GtkTreeModelSortClass BaseClassType;
+ typedef Glib::Object_Class CppClassParent;
+ typedef GObjectClass BaseClassParent;
+
+ friend class TreeModelSort;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_TREEMODELSORT_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/treepath_p.h b/libs/gtkmm2/gtk/gtkmm/private/treepath_p.h
new file mode 100644
index 0000000000..829820cfe5
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/treepath_p.h
@@ -0,0 +1,6 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TREEPATH_P_H
+#define _GTKMM_TREEPATH_P_H
+#endif /* _GTKMM_TREEPATH_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/treerowreference_p.h b/libs/gtkmm2/gtk/gtkmm/private/treerowreference_p.h
new file mode 100644
index 0000000000..00bcc4b2fe
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/treerowreference_p.h
@@ -0,0 +1,6 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TREEROWREFERENCE_P_H
+#define _GTKMM_TREEROWREFERENCE_P_H
+#endif /* _GTKMM_TREEROWREFERENCE_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/treeselection_p.h b/libs/gtkmm2/gtk/gtkmm/private/treeselection_p.h
new file mode 100644
index 0000000000..ee7fcce1e7
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/treeselection_p.h
@@ -0,0 +1,45 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TREESELECTION_P_H
+#define _GTKMM_TREESELECTION_P_H
+#include <glibmm/private/object_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class TreeSelection_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef TreeSelection CppObjectType;
+ typedef GtkTreeSelection BaseObjectType;
+ typedef GtkTreeSelectionClass BaseClassType;
+ typedef Glib::Object_Class CppClassParent;
+ typedef GObjectClass BaseClassParent;
+
+ friend class TreeSelection;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void changed_callback(GtkTreeSelection* self);
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_TREESELECTION_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/treesortable_p.h b/libs/gtkmm2/gtk/gtkmm/private/treesortable_p.h
new file mode 100644
index 0000000000..f93f94c10d
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/treesortable_p.h
@@ -0,0 +1,48 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TREESORTABLE_P_H
+#define _GTKMM_TREESORTABLE_P_H
+#include <glibmm/private/interface_p.h>
+
+#include <glibmm/private/interface_p.h>
+
+namespace Gtk
+{
+
+class TreeSortable_Class : public Glib::Interface_Class
+{
+public:
+ typedef TreeSortable CppObjectType;
+ typedef GtkTreeSortable BaseObjectType;
+ typedef GtkTreeSortableIface BaseClassType;
+ typedef Glib::Interface_Class CppClassParent;
+
+ friend class TreeSortable;
+
+ const Glib::Interface_Class& init();
+
+ static void iface_init_function(void* g_iface, void* iface_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void sort_column_changed_callback(GtkTreeSortable* self);
+
+ //Callbacks (virtual functions):
+ static gboolean get_sort_column_id_vfunc_callback(GtkTreeSortable* self, int* sort_column_id, GtkSortType* order);
+ static void set_sort_column_id_vfunc_callback(GtkTreeSortable* self, int sort_column_id, GtkSortType order);
+ static void set_sort_func_vfunc_callback(GtkTreeSortable* self, int sort_column_id, GtkTreeIterCompareFunc func, gpointer data, GtkDestroyNotify destroy);
+ static void set_default_sort_func_vfunc_callback(GtkTreeSortable* self, GtkTreeIterCompareFunc func, gpointer data, GtkDestroyNotify destroy);
+ static gboolean has_default_sort_func_vfunc_callback(GtkTreeSortable* self);
+ static void sort_column_changed_vfunc_callback(GtkTreeSortable* self);
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_TREESORTABLE_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/treestore_p.h b/libs/gtkmm2/gtk/gtkmm/private/treestore_p.h
new file mode 100644
index 0000000000..fb1c7bc681
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/treestore_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TREESTORE_P_H
+#define _GTKMM_TREESTORE_P_H
+#include <glibmm/private/object_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class TreeStore_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef TreeStore CppObjectType;
+ typedef GtkTreeStore BaseObjectType;
+ typedef GtkTreeStoreClass BaseClassType;
+ typedef Glib::Object_Class CppClassParent;
+ typedef GObjectClass BaseClassParent;
+
+ friend class TreeStore;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_TREESTORE_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/treeview_p.h b/libs/gtkmm2/gtk/gtkmm/private/treeview_p.h
new file mode 100644
index 0000000000..127465f857
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/treeview_p.h
@@ -0,0 +1,52 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TREEVIEW_P_H
+#define _GTKMM_TREEVIEW_P_H
+#include <gtkmm/private/container_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class TreeView_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef TreeView CppObjectType;
+ typedef GtkTreeView BaseObjectType;
+ typedef GtkTreeViewClass BaseClassType;
+ typedef Gtk::Container_Class CppClassParent;
+ typedef GtkContainerClass BaseClassParent;
+
+ friend class TreeView;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void set_scroll_adjustments_callback(GtkTreeView* self, GtkAdjustment* p0, GtkAdjustment* p1);
+ static void row_activated_callback(GtkTreeView* self, GtkTreePath* p0, GtkTreeViewColumn* p1);
+ static gboolean test_expand_row_callback(GtkTreeView* self, GtkTreeIter* p0, GtkTreePath* p1);
+ static gboolean test_collapse_row_callback(GtkTreeView* self, GtkTreeIter* p0, GtkTreePath* p1);
+ static void row_expanded_callback(GtkTreeView* self, GtkTreeIter* p0, GtkTreePath* p1);
+ static void row_collapsed_callback(GtkTreeView* self, GtkTreeIter* p0, GtkTreePath* p1);
+ static void cursor_changed_callback(GtkTreeView* self);
+ static void columns_changed_callback(GtkTreeView* self);
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_TREEVIEW_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/treeviewcolumn_p.h b/libs/gtkmm2/gtk/gtkmm/private/treeviewcolumn_p.h
new file mode 100644
index 0000000000..f47a4a3279
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/treeviewcolumn_p.h
@@ -0,0 +1,45 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TREEVIEWCOLUMN_P_H
+#define _GTKMM_TREEVIEWCOLUMN_P_H
+#include <gtkmm/private/object_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class TreeViewColumn_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef TreeViewColumn CppObjectType;
+ typedef GtkTreeViewColumn BaseObjectType;
+ typedef GtkTreeViewColumnClass BaseClassType;
+ typedef Gtk::Object_Class CppClassParent;
+ typedef GtkObjectClass BaseClassParent;
+
+ friend class TreeViewColumn;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void clicked_callback(GtkTreeViewColumn* self);
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_TREEVIEWCOLUMN_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/uimanager_p.h b/libs/gtkmm2/gtk/gtkmm/private/uimanager_p.h
new file mode 100644
index 0000000000..6932d4f791
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/uimanager_p.h
@@ -0,0 +1,46 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_UIMANAGER_P_H
+#define _GTKMM_UIMANAGER_P_H
+#include <glibmm/private/object_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class UIManager_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef UIManager CppObjectType;
+ typedef GtkUIManager BaseObjectType;
+ typedef GtkUIManagerClass BaseClassType;
+ typedef Glib::Object_Class CppClassParent;
+ typedef GObjectClass BaseClassParent;
+
+ friend class UIManager;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void add_widget_callback(GtkUIManager* self, GtkWidget* p0);
+ static void actions_changed_callback(GtkUIManager* self);
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_UIMANAGER_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/viewport_p.h b/libs/gtkmm2/gtk/gtkmm/private/viewport_p.h
new file mode 100644
index 0000000000..18fce1d06c
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/viewport_p.h
@@ -0,0 +1,45 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_VIEWPORT_P_H
+#define _GTKMM_VIEWPORT_P_H
+#include <gtkmm/private/bin_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class Viewport_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Viewport CppObjectType;
+ typedef GtkViewport BaseObjectType;
+ typedef GtkViewportClass BaseClassType;
+ typedef Gtk::Bin_Class CppClassParent;
+ typedef GtkBinClass BaseClassParent;
+
+ friend class Viewport;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void set_scroll_adjustments_callback(GtkViewport* self, GtkAdjustment* p0, GtkAdjustment* p1);
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_VIEWPORT_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/widget_p.h b/libs/gtkmm2/gtk/gtkmm/private/widget_p.h
new file mode 100644
index 0000000000..ce8df67d36
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/widget_p.h
@@ -0,0 +1,107 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_WIDGET_P_H
+#define _GTKMM_WIDGET_P_H
+#include <gtkmm/private/object_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class Widget_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Widget CppObjectType;
+ typedef GtkWidget BaseObjectType;
+ typedef GtkWidgetClass BaseClassType;
+ typedef Gtk::Object_Class CppClassParent;
+ typedef GtkObjectClass BaseClassParent;
+
+ friend class Widget;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void show_callback(GtkWidget* self);
+ static void hide_callback(GtkWidget* self);
+ static void map_callback(GtkWidget* self);
+ static void unmap_callback(GtkWidget* self);
+ static void realize_callback(GtkWidget* self);
+ static void unrealize_callback(GtkWidget* self);
+ static void size_request_callback(GtkWidget* self, GtkRequisition* p0);
+ static void size_allocate_callback(GtkWidget* self, GtkAllocation* p0);
+ static void state_changed_callback(GtkWidget* self, GtkStateType p0);
+ static void parent_set_callback(GtkWidget* self, GtkWidget* p0);
+ static void hierarchy_changed_callback(GtkWidget* self, GtkWidget* p0);
+ static void style_set_callback(GtkWidget* self, GtkStyle* p0);
+ static void direction_changed_callback(GtkWidget* self, GtkTextDirection p0);
+ static void grab_notify_callback(GtkWidget* self, gboolean p0);
+ static void child_notify_callback(GtkWidget* self, GParamSpec* p0);
+ static gboolean mnemonic_activate_callback(GtkWidget* self, gboolean p0);
+ static void grab_focus_callback(GtkWidget* self);
+ static gboolean focus_callback(GtkWidget* self, GtkDirectionType p0);
+ static gboolean event_callback(GtkWidget* self, GdkEvent* p0);
+ static gboolean button_press_event_callback(GtkWidget* self, GdkEventButton* p0);
+ static gboolean button_release_event_callback(GtkWidget* self, GdkEventButton* p0);
+ static gboolean scroll_event_callback(GtkWidget* self, GdkEventScroll* p0);
+ static gboolean motion_notify_event_callback(GtkWidget* self, GdkEventMotion* p0);
+ static gboolean delete_event_callback(GtkWidget* self, GdkEventAny* p0);
+ static gboolean expose_event_callback(GtkWidget* self, GdkEventExpose* p0);
+ static gboolean key_press_event_callback(GtkWidget* self, GdkEventKey* p0);
+ static gboolean key_release_event_callback(GtkWidget* self, GdkEventKey* p0);
+ static gboolean enter_notify_event_callback(GtkWidget* self, GdkEventCrossing* p0);
+ static gboolean leave_notify_event_callback(GtkWidget* self, GdkEventCrossing* p0);
+ static gboolean configure_event_callback(GtkWidget* self, GdkEventConfigure* p0);
+ static gboolean focus_in_event_callback(GtkWidget* self, GdkEventFocus* p0);
+ static gboolean focus_out_event_callback(GtkWidget* self, GdkEventFocus* p0);
+ static gboolean map_event_callback(GtkWidget* self, GdkEventAny* p0);
+ static gboolean unmap_event_callback(GtkWidget* self, GdkEventAny* p0);
+ static gboolean property_notify_event_callback(GtkWidget* self, GdkEventProperty* p0);
+ static gboolean selection_clear_event_callback(GtkWidget* self, GdkEventSelection* p0);
+ static gboolean selection_request_event_callback(GtkWidget* self, GdkEventSelection* p0);
+ static gboolean selection_notify_event_callback(GtkWidget* self, GdkEventSelection* p0);
+ static gboolean proximity_in_event_callback(GtkWidget* self, GdkEventProximity* p0);
+ static gboolean proximity_out_event_callback(GtkWidget* self, GdkEventProximity* p0);
+ static gboolean visibility_notify_event_callback(GtkWidget* self, GdkEventVisibility* p0);
+ static gboolean client_event_callback(GtkWidget* self, GdkEventClient* p0);
+ static gboolean no_expose_event_callback(GtkWidget* self, GdkEventAny* p0);
+ static gboolean window_state_event_callback(GtkWidget* self, GdkEventWindowState* p0);
+ static void selection_get_callback(GtkWidget* self, GtkSelectionData* p0, guint p1, guint p2);
+ static void selection_received_callback(GtkWidget* self, GtkSelectionData* p0, guint p1);
+ static void drag_begin_callback(GtkWidget* self, GdkDragContext* p0);
+ static void drag_end_callback(GtkWidget* self, GdkDragContext* p0);
+ static void drag_data_get_callback(GtkWidget* self, GdkDragContext* p0, GtkSelectionData* p1, guint p2, guint p3);
+ static void drag_data_delete_callback(GtkWidget* self, GdkDragContext* p0);
+ static void drag_leave_callback(GtkWidget* self, GdkDragContext* p0, guint p1);
+ static gboolean drag_motion_callback(GtkWidget* self, GdkDragContext* p0, gint p1, gint p2, guint p3);
+ static gboolean drag_drop_callback(GtkWidget* self, GdkDragContext* p0, gint p1, gint p2, guint p3);
+ static void drag_data_received_callback(GtkWidget* self, GdkDragContext* p0, gint p1, gint p2, GtkSelectionData* p3, guint p4, guint p5);
+ static AtkObject* get_accessible_callback(GtkWidget* self);
+ static void screen_changed_callback(GtkWidget* self, GdkScreen* p0);
+ static void hierarchy_changed_callback_custom(GtkWidget* self, GtkWidget* p0);
+ static void parent_set_callback_custom(GtkWidget* self, GtkWidget* p0);
+
+ //Callbacks (virtual functions):
+ static void dispose_vfunc_callback(GObject* self);
+ static void dispatch_child_properties_changed_vfunc_callback(GtkWidget* self, guint n_pspecs, GParamSpec** pspecs);
+ static void show_all_vfunc_callback(GtkWidget* self);
+ static void hide_all_vfunc_callback(GtkWidget* self);
+ static AtkObject* get_accessible_vfunc_callback(GtkWidget* self);
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_WIDGET_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/private/window_p.h b/libs/gtkmm2/gtk/gtkmm/private/window_p.h
new file mode 100644
index 0000000000..5413a7284a
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/private/window_p.h
@@ -0,0 +1,84 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_WINDOW_P_H
+#define _GTKMM_WINDOW_P_H
+#include <gtkmm/private/bin_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class Window_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Window CppObjectType;
+ typedef GtkWindow BaseObjectType;
+ typedef GtkWindowClass BaseClassType;
+ typedef Gtk::Bin_Class CppClassParent;
+ typedef GtkBinClass BaseClassParent;
+
+ friend class Window;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void set_focus_callback(GtkWindow* self, GtkWidget* p0);
+ static gboolean frame_event_callback(GtkWindow* self, GdkEvent* p0);
+
+ //Callbacks (virtual functions):
+ static void dispose_vfunc_callback(GObject* self);
+ };
+
+
+} // namespace Gtk
+
+
+#include <glibmm/class.h>
+
+namespace Gtk
+{
+
+class WindowGroup_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef WindowGroup CppObjectType;
+ typedef GtkWindowGroup BaseObjectType;
+ typedef GtkWindowGroupClass BaseClassType;
+ typedef Glib::Object_Class CppClassParent;
+ typedef GObjectClass BaseClassParent;
+
+ friend class WindowGroup;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Gtk
+
+#endif /* _GTKMM_WINDOW_P_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/progressbar.cc b/libs/gtkmm2/gtk/gtkmm/progressbar.cc
new file mode 100644
index 0000000000..fb515e88ad
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/progressbar.cc
@@ -0,0 +1,249 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/progressbar.h>
+#include <gtkmm/private/progressbar_p.h>
+
+#include <gtk/gtktypebuiltins.h>
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/adjustment.h>
+#include <gtk/gtkprogressbar.h>
+
+
+namespace
+{
+} // anonymous namespace
+
+// static
+GType Glib::Value<Gtk::ProgressBarStyle>::value_type()
+{
+ return gtk_progress_bar_style_get_type();
+}
+
+// static
+GType Glib::Value<Gtk::ProgressBarOrientation>::value_type()
+{
+ return gtk_progress_bar_orientation_get_type();
+}
+
+
+namespace Glib
+{
+
+Gtk::ProgressBar* wrap(GtkProgressBar* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::ProgressBar *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& ProgressBar_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &ProgressBar_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_progress_bar_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void ProgressBar_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* ProgressBar_Class::wrap_new(GObject* o)
+{
+ return manage(new ProgressBar((GtkProgressBar*)(o)));
+
+}
+
+
+/* The implementation: */
+
+ProgressBar::ProgressBar(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Widget(construct_params)
+{
+ }
+
+ProgressBar::ProgressBar(GtkProgressBar* castitem)
+:
+ Gtk::Widget((GtkWidget*)(castitem))
+{
+ }
+
+ProgressBar::~ProgressBar()
+{
+ destroy_();
+}
+
+ProgressBar::CppClassType ProgressBar::progressbar_class_; // initialize static member
+
+GType ProgressBar::get_type()
+{
+ return progressbar_class_.init().get_type();
+}
+
+GType ProgressBar::get_base_type()
+{
+ return gtk_progress_bar_get_type();
+}
+
+
+ProgressBar::ProgressBar()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Widget(Glib::ConstructParams(progressbar_class_.init()))
+{
+ }
+
+void ProgressBar::pulse()
+{
+ gtk_progress_bar_pulse(gobj());
+}
+
+Glib::ustring ProgressBar::get_text() const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(gtk_progress_bar_get_text(const_cast<GtkProgressBar*>(gobj())));
+}
+
+void ProgressBar::set_text(const Glib::ustring& text)
+{
+ gtk_progress_bar_set_text(gobj(), text.c_str());
+}
+
+double ProgressBar::get_fraction() const
+{
+ return gtk_progress_bar_get_fraction(const_cast<GtkProgressBar*>(gobj()));
+}
+
+void ProgressBar::set_fraction(double fraction)
+{
+ gtk_progress_bar_set_fraction(gobj(), fraction);
+}
+
+double ProgressBar::get_pulse_step() const
+{
+ return gtk_progress_bar_get_pulse_step(const_cast<GtkProgressBar*>(gobj()));
+}
+
+void ProgressBar::set_pulse_step(double fraction)
+{
+ gtk_progress_bar_set_pulse_step(gobj(), fraction);
+}
+
+void ProgressBar::set_orientation(ProgressBarOrientation orientation)
+{
+ gtk_progress_bar_set_orientation(gobj(), ((GtkProgressBarOrientation)(orientation)));
+}
+
+ProgressBarOrientation ProgressBar::get_orientation() const
+{
+ return ((ProgressBarOrientation)(gtk_progress_bar_get_orientation(const_cast<GtkProgressBar*>(gobj()))));
+}
+
+void ProgressBar::set_ellipsize(Pango::EllipsizeMode mode)
+{
+ gtk_progress_bar_set_ellipsize(gobj(), ((PangoEllipsizeMode)(mode)));
+}
+
+Pango::EllipsizeMode ProgressBar::get_ellipsize() const
+{
+ return ((Pango::EllipsizeMode)(gtk_progress_bar_get_ellipsize(const_cast<GtkProgressBar*>(gobj()))));
+}
+
+
+Glib::PropertyProxy<double> ProgressBar::property_fraction()
+{
+ return Glib::PropertyProxy<double>(this, "fraction");
+}
+
+Glib::PropertyProxy_ReadOnly<double> ProgressBar::property_fraction() const
+{
+ return Glib::PropertyProxy_ReadOnly<double>(this, "fraction");
+}
+
+Glib::PropertyProxy<double> ProgressBar::property_pulse_step()
+{
+ return Glib::PropertyProxy<double>(this, "pulse-step");
+}
+
+Glib::PropertyProxy_ReadOnly<double> ProgressBar::property_pulse_step() const
+{
+ return Glib::PropertyProxy_ReadOnly<double>(this, "pulse-step");
+}
+
+Glib::PropertyProxy<ProgressBarOrientation> ProgressBar::property_orientation()
+{
+ return Glib::PropertyProxy<ProgressBarOrientation>(this, "orientation");
+}
+
+Glib::PropertyProxy_ReadOnly<ProgressBarOrientation> ProgressBar::property_orientation() const
+{
+ return Glib::PropertyProxy_ReadOnly<ProgressBarOrientation>(this, "orientation");
+}
+
+Glib::PropertyProxy<Glib::ustring> ProgressBar::property_text()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "text");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> ProgressBar::property_text() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "text");
+}
+
+Glib::PropertyProxy<bool> ProgressBar::property_ellipsize()
+{
+ return Glib::PropertyProxy<bool>(this, "ellipsize");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> ProgressBar::property_ellipsize() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "ellipsize");
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/progressbar.h b/libs/gtkmm2/gtk/gtkmm/progressbar.h
new file mode 100644
index 0000000000..d79db97633
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/progressbar.h
@@ -0,0 +1,361 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_PROGRESSBAR_H
+#define _GTKMM_PROGRESSBAR_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* progressbar.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/widget.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkProgressBar GtkProgressBar;
+typedef struct _GtkProgressBarClass GtkProgressBarClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class ProgressBar_Class; } // namespace Gtk
+namespace Gtk
+{
+
+
+/** @addtogroup gtkmmEnums Enums and Flags */
+
+/**
+ * @ingroup gtkmmEnums
+ */
+enum ProgressBarStyle
+{
+ PROGRESS_CONTINUOUS,
+ PROGRESS_DISCRETE
+};
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::ProgressBarStyle> : public Glib::Value_Enum<Gtk::ProgressBarStyle>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+/**
+ * @ingroup gtkmmEnums
+ */
+enum ProgressBarOrientation
+{
+ PROGRESS_LEFT_TO_RIGHT,
+ PROGRESS_RIGHT_TO_LEFT,
+ PROGRESS_BOTTOM_TO_TOP,
+ PROGRESS_TOP_TO_BOTTOM
+};
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::ProgressBarOrientation> : public Glib::Value_Enum<Gtk::ProgressBarOrientation>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+
+/** A widget which indicates progress visually.
+ *
+ * The Gtk::ProgressBar is typically used to display the progress of a long
+ * running operation. It provides a visual clue that processing is underway.
+ * The Gtk::ProgressBar can be used in two different modes: percentage mode
+ * and activity mode.
+ *
+ * When an application can determine how much work needs to take place (e.g.
+ * read a fixed number of bytes from a file) and can monitor its progress,
+ * it can use the Gtk::ProgressBar in percentage mode and the user sees a
+ * growing bar indicating the percentage of the work that has been
+ * completed. In this mode, the application is required to call
+ * set_fraction() periodically to update the progress bar.
+ *
+ * When an application has no accurate way of knowing the amount of work to
+ * do, it can use the Gtk::ProgressBar in activity mode, which shows
+ * activity by a block moving back and forth within the progress area. In
+ * this mode, the application is required to call pulse() perodically to
+ * update the progress bar.
+ *
+ * There is quite a bit of flexibility provided to control the appearance of
+ * the Gtk::ProgressBar. Functions are provided to control the orientation of
+ * the bar, optional text can be displayed along with the bar, and the step
+ * size used in activity mode can be set.
+ *
+ * @ingroup Widgets
+ */
+
+class ProgressBar : public Widget
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef ProgressBar CppObjectType;
+ typedef ProgressBar_Class CppClassType;
+ typedef GtkProgressBar BaseObjectType;
+ typedef GtkProgressBarClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~ProgressBar();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class ProgressBar_Class;
+ static CppClassType progressbar_class_;
+
+ // noncopyable
+ ProgressBar(const ProgressBar&);
+ ProgressBar& operator=(const ProgressBar&);
+
+protected:
+ explicit ProgressBar(const Glib::ConstructParams& construct_params);
+ explicit ProgressBar(GtkProgressBar* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkProgressBar* gobj() { return reinterpret_cast<GtkProgressBar*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkProgressBar* gobj() const { return reinterpret_cast<GtkProgressBar*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+
+public:
+ ProgressBar();
+
+
+ /** Indicates that some progress is made, but you don't know how much.
+ * Causes the progress bar to enter "activity mode," where a block
+ * bounces back and forth. Each call to pulse()
+ * causes the block to move by a little bit (the amount of movement
+ * per pulse is determined by set_pulse_step()).
+ */
+ void pulse();
+
+
+ /** Retrieves the text displayed superimposed on the progress bar,
+ * if any, otherwise <tt>0</tt>. The return value is a reference
+ * to the text, not a copy of it, so will become invalid
+ * if you change the text in the progress bar.
+ * @return Text, or <tt>0</tt>; this string is owned by the widget
+ * and should not be modified or freed.
+ */
+ Glib::ustring get_text() const;
+
+ /** Causes the given @a text to appear superimposed on the progress bar.
+ * @param text A UTF-8 string.
+ */
+ void set_text(const Glib::ustring& text);
+
+
+ /** Returns the current fraction of the task that's been completed.
+ * @return A fraction from 0.0 to 1.0.
+ */
+ double get_fraction() const;
+
+ /** Causes the progress bar to "fill in" the given fraction
+ * of the bar. The fraction should be between 0.0 and 1.0,
+ * inclusive.
+ * @param fraction Fraction of the task that's been completed.
+ */
+ void set_fraction(double fraction);
+
+
+ /** Retrieves the pulse step set with set_pulse_step()
+ * @return A fraction from 0.0 to 1.0.
+ */
+ double get_pulse_step() const;
+
+ /** Sets the fraction of total progress bar length to move the
+ * bouncing block for each call to pulse().
+ * @param fraction Fraction between 0.0 and 1.0.
+ */
+ void set_pulse_step(double fraction);
+
+
+ /** Causes the progress bar to switch to a different orientation
+ * (left-to-right, right-to-left, top-to-bottom, or bottom-to-top).
+ * @param orientation Orientation of the progress bar.
+ */
+ void set_orientation(ProgressBarOrientation orientation = PROGRESS_LEFT_TO_RIGHT);
+
+ /** Retrieves the current progress bar orientation.
+ * @return Orientation of the progress bar.
+ */
+ ProgressBarOrientation get_orientation() const;
+
+
+ /** Sets the mode used to ellipsize (add an ellipsis: "...") the text
+ * if there is not enough space to render the entire string.
+ *
+ * Since: 2.6
+ * @param mode A Pango::EllipsizeMode.
+ */
+ void set_ellipsize(Pango::EllipsizeMode mode);
+
+ Pango::EllipsizeMode get_ellipsize() const;
+
+ /** The fraction of total work that has been completed.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<double> property_fraction() ;
+
+/** The fraction of total work that has been completed.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<double> property_fraction() const;
+
+ /** The fraction of total progress to move the bouncing block when pulsed.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<double> property_pulse_step() ;
+
+/** The fraction of total progress to move the bouncing block when pulsed.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<double> property_pulse_step() const;
+
+ /** Orientation and growth direction of the progress bar.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<ProgressBarOrientation> property_orientation() ;
+
+/** Orientation and growth direction of the progress bar.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<ProgressBarOrientation> property_orientation() const;
+
+ /** Text to be displayed in the progress bar.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_text() ;
+
+/** Text to be displayed in the progress bar.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_text() const;
+
+ /** The preferred place to ellipsize the string
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_ellipsize() ;
+
+/** The preferred place to ellipsize the string
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_ellipsize() const;
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::ProgressBar
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::ProgressBar* wrap(GtkProgressBar* object, bool take_copy = false);
+}
+#endif /* _GTKMM_PROGRESSBAR_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/radioaction.cc b/libs/gtkmm2/gtk/gtkmm/radioaction.cc
new file mode 100644
index 0000000000..bac64f9dc4
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/radioaction.cc
@@ -0,0 +1,274 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/radioaction.h>
+#include <gtkmm/private/radioaction_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 2003 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkradioaction.h>
+
+
+typedef Gtk::RadioAction::Group Group; //So that the generate get_group return type is parsed.
+
+namespace Gtk
+{
+
+RadioAction::RadioAction(Group& group, const Glib::ustring& name, const Gtk::StockID& stock_id, const Glib::ustring& label, const Glib::ustring& tooltip)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::ToggleAction(Glib::ConstructParams(radioaction_class_.init(), "name",name.c_str(),"stock_id",stock_id.get_c_str(),"label",(label.empty() ? 0 : label.c_str()),"tooltip",(tooltip.empty() ? 0 : tooltip.c_str()), (char*) 0))
+{
+ set_group(group);
+}
+
+Glib::RefPtr<RadioAction> RadioAction::create(Group& group, const Glib::ustring& name, const Glib::ustring& label, const Glib::ustring& tooltip)
+{
+ return Glib::RefPtr<RadioAction>( new RadioAction(group, name, Gtk::StockID(), label, tooltip) );
+}
+
+Glib::RefPtr<RadioAction> RadioAction::create(Group& group, const Glib::ustring& name, const Gtk::StockID& stock_id, const Glib::ustring& label, const Glib::ustring& tooltip)
+{
+ return Glib::RefPtr<RadioAction>( new RadioAction(group, name, stock_id, label, tooltip) );
+}
+
+void RadioAction::set_group(Group& group)
+{
+ gtk_radio_action_set_group(gobj(), group.group_);
+
+ //The group will be updated, ready for use with the next radio action:
+ group = get_group();
+}
+
+
+} // namespace Gtk
+
+
+namespace
+{
+
+void RadioAction_signal_changed_callback(GtkRadioAction* self, GtkRadioAction* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,const Glib::RefPtr<RadioAction>& > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::wrap(p0)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo RadioAction_signal_changed_info =
+{
+ "changed",
+ (GCallback) &RadioAction_signal_changed_callback,
+ (GCallback) &RadioAction_signal_changed_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Gtk::RadioAction> wrap(GtkRadioAction* object, bool take_copy)
+{
+ return Glib::RefPtr<Gtk::RadioAction>( dynamic_cast<Gtk::RadioAction*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} /* namespace Glib */
+
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& RadioAction_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &RadioAction_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_radio_action_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void RadioAction_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->changed = &changed_callback;
+}
+
+
+void RadioAction_Class::changed_callback(GtkRadioAction* self, GtkRadioAction* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_changed(Glib::wrap(p0)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->changed)
+ (*base->changed)(self, p0);
+ }
+}
+
+
+Glib::ObjectBase* RadioAction_Class::wrap_new(GObject* object)
+{
+ return new RadioAction((GtkRadioAction*)object);
+}
+
+
+/* The implementation: */
+
+GtkRadioAction* RadioAction::gobj_copy()
+{
+ reference();
+ return gobj();
+}
+
+RadioAction::RadioAction(const Glib::ConstructParams& construct_params)
+:
+ Gtk::ToggleAction(construct_params)
+{}
+
+RadioAction::RadioAction(GtkRadioAction* castitem)
+:
+ Gtk::ToggleAction((GtkToggleAction*)(castitem))
+{}
+
+RadioAction::~RadioAction()
+{}
+
+
+RadioAction::CppClassType RadioAction::radioaction_class_; // initialize static member
+
+GType RadioAction::get_type()
+{
+ return radioaction_class_.init().get_type();
+}
+
+GType RadioAction::get_base_type()
+{
+ return gtk_radio_action_get_type();
+}
+
+
+RadioAction::RadioAction()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::ToggleAction(Glib::ConstructParams(radioaction_class_.init()))
+{
+ }
+
+Glib::RefPtr<RadioAction> RadioAction::create()
+{
+ return Glib::RefPtr<RadioAction>( new RadioAction() );
+}
+Group RadioAction::get_group()
+{
+ return Group(gtk_radio_action_get_group(gobj()));
+}
+
+int RadioAction::get_current_value() const
+{
+ return gtk_radio_action_get_current_value(const_cast<GtkRadioAction*>(gobj()));
+}
+
+
+Glib::SignalProxy1< void,const Glib::RefPtr<RadioAction>& > RadioAction::signal_changed()
+{
+ return Glib::SignalProxy1< void,const Glib::RefPtr<RadioAction>& >(this, &RadioAction_signal_changed_info);
+}
+
+
+Glib::PropertyProxy<int> RadioAction::property_value()
+{
+ return Glib::PropertyProxy<int>(this, "value");
+}
+
+Glib::PropertyProxy_ReadOnly<int> RadioAction::property_value() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "value");
+}
+
+
+void Gtk::RadioAction::on_changed(const Glib::RefPtr<RadioAction>& current)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->changed)
+ (*base->changed)(gobj(),Glib::unwrap(current));
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/radioaction.h b/libs/gtkmm2/gtk/gtkmm/radioaction.h
new file mode 100644
index 0000000000..7c4366c123
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/radioaction.h
@@ -0,0 +1,169 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_RADIOACTION_H
+#define _GTKMM_RADIOACTION_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 2003 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/toggleaction.h>
+#include <gtkmm/radiobuttongroup.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkRadioAction GtkRadioAction;
+typedef struct _GtkRadioActionClass GtkRadioActionClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class RadioAction_Class; } // namespace Gtk
+namespace Gtk
+{
+
+
+class RadioAction : public Gtk::ToggleAction
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef RadioAction CppObjectType;
+ typedef RadioAction_Class CppClassType;
+ typedef GtkRadioAction BaseObjectType;
+ typedef GtkRadioActionClass BaseClassType;
+
+private: friend class RadioAction_Class;
+ static CppClassType radioaction_class_;
+
+private:
+ // noncopyable
+ RadioAction(const RadioAction&);
+ RadioAction& operator=(const RadioAction&);
+
+protected:
+ explicit RadioAction(const Glib::ConstructParams& construct_params);
+ explicit RadioAction(GtkRadioAction* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~RadioAction();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ GtkRadioAction* gobj() { return reinterpret_cast<GtkRadioAction*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const GtkRadioAction* gobj() const { return reinterpret_cast<GtkRadioAction*>(gobject_); }
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ GtkRadioAction* gobj_copy();
+
+private:
+
+public:
+ typedef RadioButtonGroup Group;
+
+protected:
+ RadioAction();
+ explicit RadioAction(Group& group, const Glib::ustring& name, const StockID& stock_id, const Glib::ustring& label = Glib::ustring(), const Glib::ustring& tooltip = Glib::ustring());
+
+public:
+
+ static Glib::RefPtr<RadioAction> create();
+
+ static Glib::RefPtr<RadioAction> create(Group& group, const Glib::ustring& name, const Glib::ustring& label = Glib::ustring(), const Glib::ustring& tooltip = Glib::ustring());
+ static Glib::RefPtr<RadioAction> create(Group& group, const Glib::ustring& name, const Gtk::StockID& stock_id, const Glib::ustring& label = Glib::ustring(), const Glib::ustring& tooltip = Glib::ustring());
+
+
+ /** Returns the list representing the radio group for this object
+ * @return The list representing the radio group for this object
+ *
+ * Since: 2.4.
+ */
+ Group get_group();
+ void set_group(Group& group);
+
+
+ /** Obtains the value property of the the currently active member of
+ * the group to which @a action belongs.
+ * @return The value of the currently active group member
+ *
+ * Since: 2.4.
+ */
+ int get_current_value() const;
+
+
+ Glib::SignalProxy1< void,const Glib::RefPtr<RadioAction>& > signal_changed();
+
+
+ /** The value returned by gtk_radio_action_get_current_value when this action is the current action of its group.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_value() ;
+
+/** The value returned by gtk_radio_action_get_current_value when this action is the current action of its group.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_value() const;
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_changed(const Glib::RefPtr<RadioAction>& current);
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::RadioAction
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Gtk::RadioAction> wrap(GtkRadioAction* object, bool take_copy = false);
+}
+
+
+#endif /* _GTKMM_RADIOACTION_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/radiobutton.cc b/libs/gtkmm2/gtk/gtkmm/radiobutton.cc
new file mode 100644
index 0000000000..6fb1b2985f
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/radiobutton.cc
@@ -0,0 +1,236 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/radiobutton.h>
+#include <gtkmm/private/radiobutton_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkradiobutton.h>
+
+typedef Gtk::RadioButton::Group Group; //So that the generate get_group return type is parsed.
+
+namespace Gtk
+{
+
+RadioButton::RadioButton()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::CheckButton(Glib::ConstructParams(radiobutton_class_.init(), (char*) 0))
+{}
+
+RadioButton::RadioButton(const Glib::ustring& label, bool mnemonic)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::CheckButton(Glib::ConstructParams(radiobutton_class_.init(), "label",label.c_str(),"use_underline",gboolean(mnemonic), (char*) 0))
+{}
+
+RadioButton::RadioButton(Group& group)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::CheckButton(Glib::ConstructParams(radiobutton_class_.init(), (char*) 0))
+{
+ group.add(*this);
+}
+
+RadioButton::RadioButton(Group& group, const Glib::ustring& label, bool mnemonic)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::CheckButton(Glib::ConstructParams(radiobutton_class_.init(), "label",label.c_str(),"use_underline",gboolean(mnemonic), (char*) 0))
+{
+ group.add(*this);
+}
+
+void RadioButton::set_group(Group& group)
+{
+ gtk_radio_button_set_group(gobj(), group.group_);
+
+ //The group will be updated, ready for use with the next radiobutton:
+ group = get_group();
+}
+
+void RadioButton::reset_group()
+{
+ gtk_radio_button_set_group(gobj(), 0);
+}
+
+} //namespace Gtk
+
+
+namespace
+{
+
+const Glib::SignalProxyInfo RadioButton_signal_group_changed_info =
+{
+ "group_changed",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::RadioButton* wrap(GtkRadioButton* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::RadioButton *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& RadioButton_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &RadioButton_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_radio_button_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void RadioButton_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->group_changed = &group_changed_callback;
+}
+
+
+void RadioButton_Class::group_changed_callback(GtkRadioButton* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_group_changed();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->group_changed)
+ (*base->group_changed)(self);
+ }
+}
+
+
+Glib::ObjectBase* RadioButton_Class::wrap_new(GObject* o)
+{
+ return manage(new RadioButton((GtkRadioButton*)(o)));
+
+}
+
+
+/* The implementation: */
+
+RadioButton::RadioButton(const Glib::ConstructParams& construct_params)
+:
+ Gtk::CheckButton(construct_params)
+{
+ }
+
+RadioButton::RadioButton(GtkRadioButton* castitem)
+:
+ Gtk::CheckButton((GtkCheckButton*)(castitem))
+{
+ }
+
+RadioButton::~RadioButton()
+{
+ destroy_();
+}
+
+RadioButton::CppClassType RadioButton::radiobutton_class_; // initialize static member
+
+GType RadioButton::get_type()
+{
+ return radiobutton_class_.init().get_type();
+}
+
+GType RadioButton::get_base_type()
+{
+ return gtk_radio_button_get_type();
+}
+
+
+Group RadioButton::get_group()
+{
+ return Group(gtk_radio_button_get_group(gobj()));
+}
+
+
+Glib::SignalProxy0< void > RadioButton::signal_group_changed()
+{
+ return Glib::SignalProxy0< void >(this, &RadioButton_signal_group_changed_info);
+}
+
+
+void Gtk::RadioButton::on_group_changed()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->group_changed)
+ (*base->group_changed)(gobj());
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/radiobutton.h b/libs/gtkmm2/gtk/gtkmm/radiobutton.h
new file mode 100644
index 0000000000..f81a6e624f
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/radiobutton.h
@@ -0,0 +1,151 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_RADIOBUTTON_H
+#define _GTKMM_RADIOBUTTON_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* radiobutton.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/checkbutton.h>
+#include <gtkmm/radiobuttongroup.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkRadioButton GtkRadioButton;
+typedef struct _GtkRadioButtonClass GtkRadioButtonClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class RadioButton_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** A single radio button performs the same basic function as a Gtk::CheckButton, as its position in the object hierarchy reflects. It is only when multiple radio buttons are grouped together that they become a different user interface component in their own right.
+ * Every radio button is a member of some group of radio buttons. When one is selected, all other radio buttons in the same group are deselected. A Gtk::RadioButton gives the user a choice from many options.
+ * After constructing the first RadioButton in a group, use get_group() and provide this Group to the constructors ot the other RadioButtons in the same group.
+ * To remove a Gtk::RadioButton from one group and make it part of a new one, use set_group().
+ *
+ * @ingroup Widgets
+ */
+
+class RadioButton : public CheckButton
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef RadioButton CppObjectType;
+ typedef RadioButton_Class CppClassType;
+ typedef GtkRadioButton BaseObjectType;
+ typedef GtkRadioButtonClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~RadioButton();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class RadioButton_Class;
+ static CppClassType radiobutton_class_;
+
+ // noncopyable
+ RadioButton(const RadioButton&);
+ RadioButton& operator=(const RadioButton&);
+
+protected:
+ explicit RadioButton(const Glib::ConstructParams& construct_params);
+ explicit RadioButton(GtkRadioButton* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkRadioButton* gobj() { return reinterpret_cast<GtkRadioButton*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkRadioButton* gobj() const { return reinterpret_cast<GtkRadioButton*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_group_changed();
+
+
+private:
+
+
+public:
+ typedef RadioButtonGroup Group;
+
+ RadioButton();
+ explicit RadioButton(const Glib::ustring& label, bool mnemonic = false);
+
+ /** Create an empty RadioButton belonging to the specified group,
+ * into which you can add() a widget.
+ * If you wish to add a Gtk::Label,
+ * you may want to
+ * use the Gtk::RadioButton(const Group& group, const Glib::ustring& label, bool mnemonic)
+ * constructor directly instead.
+ */
+ explicit RadioButton(Group& group);
+
+ /** Create a button belonging to the specified group, with a label inside.
+ * You won't be able to add a widget to this button
+ * since it already contains a Gtk::Label.
+ */
+ RadioButton(Group& group, const Glib::ustring& label, bool mnemonic = false);
+
+
+ Group get_group();
+ void set_group(Group& group);
+ void reset_group();
+
+
+ Glib::SignalProxy0< void > signal_group_changed();
+
+
+};
+
+} /* namespace Gtk */
+
+
+namespace Glib
+{
+ /** @relates Gtk::RadioButton
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::RadioButton* wrap(GtkRadioButton* object, bool take_copy = false);
+}
+#endif /* _GTKMM_RADIOBUTTON_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/radiobuttongroup.cc b/libs/gtkmm2/gtk/gtkmm/radiobuttongroup.cc
new file mode 100644
index 0000000000..d70d06616e
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/radiobuttongroup.cc
@@ -0,0 +1,86 @@
+/* $Id$ */
+
+/* Copyright(C) 2003 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or(at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/radiobuttongroup.h>
+
+#include <gtkmm/radiobutton.h>
+#include <gtkmm/radiomenuitem.h>
+#include <gtkmm/radioaction.h>
+#include <gtkmm/radiotoolbutton.h>
+#include <gtk/gtkradiobutton.h>
+#include <gtk/gtkradioaction.h>
+#include <gtk/gtkradiomenuitem.h>
+#include <gtk/gtkradiotoolbutton.h>
+
+namespace Gtk
+{
+
+RadioButtonGroup::RadioButtonGroup()
+: group_(0)
+{}
+
+RadioButtonGroup::RadioButtonGroup(GSList* group)
+ : group_(group)
+{
+}
+
+RadioButtonGroup::RadioButtonGroup(const RadioButtonGroup& src)
+ : group_(src.group_)
+{
+}
+
+RadioButtonGroup& RadioButtonGroup::operator=(const RadioButtonGroup& src)
+{
+ group_ = src.group_;
+ return *this;
+}
+
+void RadioButtonGroup::add(RadioButton& item)
+{
+ item.set_group(*this);
+
+ //probably not necessary:
+ group_ = gtk_radio_button_get_group(item.gobj());
+}
+
+void RadioButtonGroup::add(RadioMenuItem& item)
+{
+ item.set_group(*this);
+
+ //probably not necessary:
+ group_ = item.gobj()->group;
+}
+
+void RadioButtonGroup::add(const Glib::RefPtr<RadioAction>& item)
+{
+ item->set_group(*this);
+
+ //probably not necessary:
+ group_ = gtk_radio_action_get_group(item->gobj());
+}
+
+void RadioButtonGroup::add(RadioToolButton& item)
+{
+ item.set_group(*this);
+
+ //probably not necessary:
+ group_ = gtk_radio_tool_button_get_group(item.gobj());
+}
+
+} //namespace Gtk
diff --git a/libs/gtkmm2/gtk/gtkmm/radiobuttongroup.h b/libs/gtkmm2/gtk/gtkmm/radiobuttongroup.h
new file mode 100644
index 0000000000..8a9e044293
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/radiobuttongroup.h
@@ -0,0 +1,80 @@
+#ifndef _GTKMM_RADIOBUTTONGROUP_H
+#define _GTKMM_RADIOBUTTONGROUP_H
+/* $Id$ */
+
+/* radiobuttongroup.h
+ *
+ * Copyright(C) 2001-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or(at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/object.h> //For RefPtr<> and size_t
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C"
+{
+ typedef struct _GSList GSList;
+}
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+namespace Gtk
+{
+
+class RadioButton;
+class RadioMenuItem;
+class RadioAction;
+class RadioToolButton;
+
+/** RadioButtonGroup identifier for RadioButtons
+ * To set up this RadioButtonGroup, construct a RadioButtonGroup and then pass it
+ * to the constructor of all radio items. You do not need
+ * to keep the RadioButtonGroup beyond the initial construction.
+ * It should not be instantiated with new, and it will be invalid after the RadioButtons have been deleted.
+ */
+class RadioButtonGroup
+{
+public:
+ RadioButtonGroup();
+ RadioButtonGroup(const RadioButtonGroup& src);
+
+ RadioButtonGroup& operator=(const RadioButtonGroup& src);
+
+protected:
+ explicit RadioButtonGroup(GSList* group);
+
+ friend class Gtk::RadioButton;
+ friend class Gtk::RadioMenuItem;
+ friend class Gtk::RadioAction;
+ friend class Gtk::RadioToolButton;
+
+
+ //These all have similar interfaces.
+ //TODO: Add a common multiply-inherited base class, with set_group()=0?
+ // Would that anything useful other than being tidy? murrayc
+ void add(RadioButton& item);
+ void add(RadioMenuItem& item);
+ void add(const Glib::RefPtr<RadioAction>& item);
+ void add(RadioToolButton& item);
+
+ void* operator new(size_t); // not implemented
+
+ GSList* group_;
+};
+
+} // namespace Gtk
+
+
+#endif /* _GTKMM_RADIOBUTTONGROUP_H */
diff --git a/libs/gtkmm2/gtk/gtkmm/radiomenuitem.cc b/libs/gtkmm2/gtk/gtkmm/radiomenuitem.cc
new file mode 100644
index 0000000000..15bff44cc2
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/radiomenuitem.cc
@@ -0,0 +1,228 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/radiomenuitem.h>
+#include <gtkmm/private/radiomenuitem_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/misc.h>
+#include <gtkmm/label.h>
+#include <gtk/gtkradiomenuitem.h>
+
+typedef Gtk::RadioMenuItem::Group Group; //So that the generate get_group return type is parsed.
+
+namespace Gtk
+{
+
+RadioMenuItem::RadioMenuItem(Group& groupx)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::CheckMenuItem(Glib::ConstructParams(radiomenuitem_class_.init(), (char*) 0))
+{
+ groupx.add(*this);
+}
+
+RadioMenuItem::RadioMenuItem(Group& groupx, const Glib::ustring &label, bool mnemonic)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::CheckMenuItem(Glib::ConstructParams(radiomenuitem_class_.init(), (char*) 0))
+{
+ groupx.add(*this);
+ add_accel_label(label, mnemonic);
+}
+
+void RadioMenuItem::set_group(Group& group)
+{
+ gtk_radio_menu_item_set_group(gobj(), group.group_);
+
+ //The group will be updated, ready for use with the next radiomenuitem:
+ group = get_group();
+}
+
+void RadioMenuItem::reset_group()
+{
+ gtk_radio_menu_item_set_group(gobj(), 0);
+}
+
+
+} // namespace Gtk
+
+
+namespace
+{
+
+const Glib::SignalProxyInfo RadioMenuItem_signal_group_changed_info =
+{
+ "group_changed",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::RadioMenuItem* wrap(GtkRadioMenuItem* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::RadioMenuItem *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& RadioMenuItem_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &RadioMenuItem_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_radio_menu_item_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void RadioMenuItem_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->group_changed = &group_changed_callback;
+}
+
+
+void RadioMenuItem_Class::group_changed_callback(GtkRadioMenuItem* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_group_changed();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->group_changed)
+ (*base->group_changed)(self);
+ }
+}
+
+
+Glib::ObjectBase* RadioMenuItem_Class::wrap_new(GObject* o)
+{
+ return manage(new RadioMenuItem((GtkRadioMenuItem*)(o)));
+
+}
+
+
+/* The implementation: */
+
+RadioMenuItem::RadioMenuItem(const Glib::ConstructParams& construct_params)
+:
+ Gtk::CheckMenuItem(construct_params)
+{
+ }
+
+RadioMenuItem::RadioMenuItem(GtkRadioMenuItem* castitem)
+:
+ Gtk::CheckMenuItem((GtkCheckMenuItem*)(castitem))
+{
+ }
+
+RadioMenuItem::~RadioMenuItem()
+{
+ destroy_();
+}
+
+RadioMenuItem::CppClassType RadioMenuItem::radiomenuitem_class_; // initialize static member
+
+GType RadioMenuItem::get_type()
+{
+ return radiomenuitem_class_.init().get_type();
+}
+
+GType RadioMenuItem::get_base_type()
+{
+ return gtk_radio_menu_item_get_type();
+}
+
+
+Group RadioMenuItem::get_group()
+{
+ return Group(gtk_radio_menu_item_get_group(gobj()));
+}
+
+
+Glib::SignalProxy0< void > RadioMenuItem::signal_group_changed()
+{
+ return Glib::SignalProxy0< void >(this, &RadioMenuItem_signal_group_changed_info);
+}
+
+
+void Gtk::RadioMenuItem::on_group_changed()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->group_changed)
+ (*base->group_changed)(gobj());
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/radiomenuitem.h b/libs/gtkmm2/gtk/gtkmm/radiomenuitem.h
new file mode 100644
index 0000000000..364a088131
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/radiomenuitem.h
@@ -0,0 +1,145 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_RADIOMENUITEM_H
+#define _GTKMM_RADIOMENUITEM_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* radiomenuitem.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/checkmenuitem.h>
+#include <gtkmm/radiobutton.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkRadioMenuItem GtkRadioMenuItem;
+typedef struct _GtkRadioMenuItemClass GtkRadioMenuItemClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class RadioMenuItem_Class; } // namespace Gtk
+namespace Gtk
+{
+
+class RadioMenuItem;
+
+/** A CheckMenuItem that belongs to a group.
+ * At each instant exactly one of the menu items from a group is selected.
+ * @ingroup Menus
+ * @ingroup Widgets
+ */
+
+class RadioMenuItem : public CheckMenuItem
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef RadioMenuItem CppObjectType;
+ typedef RadioMenuItem_Class CppClassType;
+ typedef GtkRadioMenuItem BaseObjectType;
+ typedef GtkRadioMenuItemClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~RadioMenuItem();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class RadioMenuItem_Class;
+ static CppClassType radiomenuitem_class_;
+
+ // noncopyable
+ RadioMenuItem(const RadioMenuItem&);
+ RadioMenuItem& operator=(const RadioMenuItem&);
+
+protected:
+ explicit RadioMenuItem(const Glib::ConstructParams& construct_params);
+ explicit RadioMenuItem(GtkRadioMenuItem* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkRadioMenuItem* gobj() { return reinterpret_cast<GtkRadioMenuItem*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkRadioMenuItem* gobj() const { return reinterpret_cast<GtkRadioMenuItem*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_group_changed();
+
+
+private:
+
+public:
+
+ typedef RadioButtonGroup Group;
+
+ RadioMenuItem(Group& groupx);
+
+ RadioMenuItem(Group& groupx, const Glib::ustring& label, bool mnemonic = false);
+
+
+ //We ignore the _new_*_from_widget() functions because they are just the same as calling get_group() and set_group() ourselves.
+
+
+ Group get_group();
+
+ void set_group(Group& group);
+ void reset_group();
+
+
+ Glib::SignalProxy0< void > signal_group_changed();
+
+
+protected:
+ void constructor(const Group& group);
+
+
+};
+
+} /* namspace Gtk */
+
+
+namespace Glib
+{
+ /** @relates Gtk::RadioMenuItem
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::RadioMenuItem* wrap(GtkRadioMenuItem* object, bool take_copy = false);
+}
+#endif /* _GTKMM_RADIOMENUITEM_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/radiotoolbutton.cc b/libs/gtkmm2/gtk/gtkmm/radiotoolbutton.cc
new file mode 100644
index 0000000000..19f716a33b
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/radiotoolbutton.cc
@@ -0,0 +1,183 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/radiotoolbutton.h>
+#include <gtkmm/private/radiotoolbutton_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkradiotoolbutton.h>
+
+typedef Gtk::RadioToolButton::Group Group; //So that the generate get_group return type is parsed.
+
+namespace Gtk
+{
+
+RadioToolButton::RadioToolButton(Group& group, const Glib::ustring& label)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::ToggleToolButton(Glib::ConstructParams(radiotoolbutton_class_.init(), "label", label.c_str(), (char*) 0))
+{
+ set_group(group);
+}
+
+RadioToolButton::RadioToolButton(Group& group, const Gtk::StockID& stock_id)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::ToggleToolButton(Glib::ConstructParams(radiotoolbutton_class_.init(), "stock_id", (stock_id).get_c_str(), (char*) 0))
+{
+ //Based on the source of gtk_radio_tool_button_new_from_stock():
+ set_group(group);
+}
+
+/* This would look too much like a copy constructor:
+RadioToolButton::RadioToolButton(RadioToolButton& group, const Gtk::StockID& stock_id)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::ToggleToolButton(Glib::ConstructParams(radiotoolbutton_class_.init(), "stock_id", (stock_id).get_c_str(), (char*) 0))
+{
+ //Based on the source of gtk_radio_tool_button_new_with_stock_from_widget():
+ Gtk::RadioButtonGroup radiogroup = group.get_group();
+ set_group(radiogroup);
+}
+*/
+
+RadioToolButton::RadioToolButton(Widget& icon_widget, const Glib::ustring& label)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::ToggleToolButton(Glib::ConstructParams(radiotoolbutton_class_.init(), "icon_widget", (icon_widget).gobj(), "label", label.c_str(), (char*) 0))
+{
+}
+
+
+} // namespace Gtk
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::RadioToolButton* wrap(GtkRadioToolButton* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::RadioToolButton *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& RadioToolButton_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &RadioToolButton_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_radio_tool_button_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void RadioToolButton_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* RadioToolButton_Class::wrap_new(GObject* o)
+{
+ return manage(new RadioToolButton((GtkRadioToolButton*)(o)));
+
+}
+
+
+/* The implementation: */
+
+RadioToolButton::RadioToolButton(const Glib::ConstructParams& construct_params)
+:
+ Gtk::ToggleToolButton(construct_params)
+{
+ }
+
+RadioToolButton::RadioToolButton(GtkRadioToolButton* castitem)
+:
+ Gtk::ToggleToolButton((GtkToggleToolButton*)(castitem))
+{
+ }
+
+RadioToolButton::~RadioToolButton()
+{
+ destroy_();
+}
+
+RadioToolButton::CppClassType RadioToolButton::radiotoolbutton_class_; // initialize static member
+
+GType RadioToolButton::get_type()
+{
+ return radiotoolbutton_class_.init().get_type();
+}
+
+GType RadioToolButton::get_base_type()
+{
+ return gtk_radio_tool_button_get_type();
+}
+
+
+RadioToolButton::RadioToolButton()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::ToggleToolButton(Glib::ConstructParams(radiotoolbutton_class_.init()))
+{
+ }
+
+Group RadioToolButton::get_group()
+{
+ return Group(gtk_radio_tool_button_get_group(gobj()));
+}
+
+void RadioToolButton::set_group(Group& group)
+{
+ gtk_radio_tool_button_set_group(gobj(), group.group_);
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/radiotoolbutton.h b/libs/gtkmm2/gtk/gtkmm/radiotoolbutton.h
new file mode 100644
index 0000000000..02eec24f74
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/radiotoolbutton.h
@@ -0,0 +1,195 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_RADIOTOOLBUTTON_H
+#define _GTKMM_RADIOTOOLBUTTON_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* box.h
+ *
+ * Copyright (C) 2003 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/toggletoolbutton.h>
+#include <gtkmm/radiobuttongroup.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkRadioToolButton GtkRadioToolButton;
+typedef struct _GtkRadioToolButtonClass GtkRadioToolButtonClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class RadioToolButton_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** A toolbar item that contains a radio button.
+ *
+ * A Gtk::RadioToolButton is a Gtk::ToolItem that contains a radio button, that is,
+ * a button that is part of a group of toggle buttons where only one button can be
+ * active at a time.
+ *
+ * @ingroup Widgets
+ */
+
+class RadioToolButton : public ToggleToolButton
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef RadioToolButton CppObjectType;
+ typedef RadioToolButton_Class CppClassType;
+ typedef GtkRadioToolButton BaseObjectType;
+ typedef GtkRadioToolButtonClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~RadioToolButton();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class RadioToolButton_Class;
+ static CppClassType radiotoolbutton_class_;
+
+ // noncopyable
+ RadioToolButton(const RadioToolButton&);
+ RadioToolButton& operator=(const RadioToolButton&);
+
+protected:
+ explicit RadioToolButton(const Glib::ConstructParams& construct_params);
+ explicit RadioToolButton(GtkRadioToolButton* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkRadioToolButton* gobj() { return reinterpret_cast<GtkRadioToolButton*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkRadioToolButton* gobj() const { return reinterpret_cast<GtkRadioToolButton*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+public:
+ typedef RadioButtonGroup Group;
+
+ /** Creates a new Gtk::RadioToolButton and a new group.
+ *
+ * The RadioToolButton will have an empty label and will reside in an newly created Group.
+ * Use get_group() to retrieve this group and pass it to other radio buttons to assign
+ * them to this group.
+ *
+ * Since: 2.4
+ */
+ RadioToolButton();
+
+ /** Creates a new Gtk::RadioToolButton in an existing group.
+ *
+ * The RadioToolButton will have the label @a label and will be put into the Group
+ * @a group.
+ *
+ * @param group The existing group which will be used for this RadioButton.
+ * @param label The string used to display the label for this RadioToolButton.
+ *
+ * Since: 2.4
+ */
+ explicit RadioToolButton(Group& group, const Glib::ustring& label = Glib::ustring());
+
+
+ /** Creates a new Gtk::RadioToolButton in an existing group.
+ *
+ * The RadioToolButton will be created according to the StockID properties and put into
+ * the Group @a group.
+ *
+ * @param group The existing group which will be used for this RadioButton.
+ * @param stock_id The StockID which determines the look of the RadioToolButton.
+ *
+ * Since: 2.4
+ */
+ RadioToolButton(Group& group, const Gtk::StockID& stock_id);
+
+
+ //This would look to much like a copy constructor:
+ //People should use second.set_group(first.get_group()) instead.
+ //explicit RadioToolButton(RadioToolButton& group, const Gtk::StockID& stock_id = Gtk::StockID());
+
+
+ //This does not correspond to any gtk_radio_tool_button_*_new() function,
+ //but it should work (it just sets properties), and it makes this class consistent with the
+ //other ToolButton classes.
+
+ /** Creates a new Gtk::RadioToolButton with an image and a new group.
+ *
+ * The RadioToolButton will have the label @a label and an image widget @a icon_widget.
+ *
+ * @param icon_widget The widget placed as the RadioToolButton's icon.
+ * @param label The string used to display the label for this RadioToolButton.
+ *
+ * Since: 2.4
+ */
+ explicit RadioToolButton(Widget& icon_widget, const Glib::ustring& label = Glib::ustring());
+
+
+ /** Returns the radio button group @a button belongs to.
+ * @return The group @a button belongs to.
+ *
+ * Since: 2.4.
+ */
+ Group get_group();
+
+ /** Adds @a button to @a group , removing it from the group it belonged to before.
+ *
+ * Since: 2.4
+ * @param group An existing radio button group.
+ */
+ void set_group(Group& group);
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::RadioToolButton
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::RadioToolButton* wrap(GtkRadioToolButton* object, bool take_copy = false);
+}
+#endif /* _GTKMM_RADIOTOOLBUTTON_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/range.cc b/libs/gtkmm2/gtk/gtkmm/range.cc
new file mode 100644
index 0000000000..f7bf958b2e
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/range.cc
@@ -0,0 +1,554 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/range.h>
+#include <gtkmm/private/range_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkrange.h>
+#include <gtkmm/adjustment.h>
+
+namespace Gtk
+{
+
+void Range::unset_adjustment()
+{
+ gtk_range_set_adjustment(gobj(), 0);
+}
+
+} // namespace Gtk
+
+
+namespace
+{
+
+const Glib::SignalProxyInfo Range_signal_value_changed_info =
+{
+ "value_changed",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+
+void Range_signal_adjust_bounds_callback(GtkRange* self, gdouble p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,double > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(p0
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo Range_signal_adjust_bounds_info =
+{
+ "adjust_bounds",
+ (GCallback) &Range_signal_adjust_bounds_callback,
+ (GCallback) &Range_signal_adjust_bounds_callback
+};
+
+
+void Range_signal_move_slider_callback(GtkRange* self, GtkScrollType p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,ScrollType > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(((ScrollType)(p0))
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo Range_signal_move_slider_info =
+{
+ "move_slider",
+ (GCallback) &Range_signal_move_slider_callback,
+ (GCallback) &Range_signal_move_slider_callback
+};
+
+
+gboolean Range_signal_change_value_callback(GtkRange* self, GtkScrollType p0,gdouble p1,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< bool,ScrollType,double > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ return static_cast<int>((*static_cast<SlotType*>(slot))(((ScrollType)(p0))
+, p1
+));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Range_signal_change_value_notify_callback(GtkRange* self, GtkScrollType p0,gdouble p1, void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,ScrollType,double > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(((ScrollType)(p0))
+, p1
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+const Glib::SignalProxyInfo Range_signal_change_value_info =
+{
+ "change_value",
+ (GCallback) &Range_signal_change_value_callback,
+ (GCallback) &Range_signal_change_value_notify_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::Range* wrap(GtkRange* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::Range *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Range_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Range_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_range_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Range_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->get_range_border = &get_range_border_vfunc_callback;
+ klass->value_changed = &value_changed_callback;
+ klass->adjust_bounds = &adjust_bounds_callback;
+ klass->move_slider = &move_slider_callback;
+}
+
+void Range_Class::get_range_border_vfunc_callback(GtkRange* self, GtkBorder* border)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->get_range_border_vfunc(border);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->get_range_border)
+ (*base->get_range_border)(self, border);
+ }
+}
+
+
+void Range_Class::value_changed_callback(GtkRange* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_value_changed();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->value_changed)
+ (*base->value_changed)(self);
+ }
+}
+
+void Range_Class::adjust_bounds_callback(GtkRange* self, gdouble p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_adjust_bounds(p0
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->adjust_bounds)
+ (*base->adjust_bounds)(self, p0);
+ }
+}
+
+void Range_Class::move_slider_callback(GtkRange* self, GtkScrollType p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_move_slider(((ScrollType)(p0))
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->move_slider)
+ (*base->move_slider)(self, p0);
+ }
+}
+
+
+Glib::ObjectBase* Range_Class::wrap_new(GObject* o)
+{
+ return manage(new Range((GtkRange*)(o)));
+
+}
+
+
+/* The implementation: */
+
+Range::Range(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Widget(construct_params)
+{
+ }
+
+Range::Range(GtkRange* castitem)
+:
+ Gtk::Widget((GtkWidget*)(castitem))
+{
+ }
+
+Range::~Range()
+{
+ destroy_();
+}
+
+Range::CppClassType Range::range_class_; // initialize static member
+
+GType Range::get_type()
+{
+ return range_class_.init().get_type();
+}
+
+GType Range::get_base_type()
+{
+ return gtk_range_get_type();
+}
+
+
+Range::Range()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Widget(Glib::ConstructParams(range_class_.init()))
+{
+ }
+
+void Range::set_update_policy(UpdateType policy)
+{
+ gtk_range_set_update_policy(gobj(), ((GtkUpdateType)(policy)));
+}
+
+UpdateType Range::get_update_policy() const
+{
+ return ((UpdateType)(gtk_range_get_update_policy(const_cast<GtkRange*>(gobj()))));
+}
+
+void Range::set_adjustment(Gtk::Adjustment& adjustment)
+{
+ gtk_range_set_adjustment(gobj(), (adjustment).gobj());
+}
+
+Gtk::Adjustment* Range::get_adjustment()
+{
+ return Glib::wrap(gtk_range_get_adjustment(gobj()));
+}
+
+const Gtk::Adjustment* Range::get_adjustment() const
+{
+ return Glib::wrap(gtk_range_get_adjustment(const_cast<GtkRange*>(gobj())));
+}
+
+void Range::set_inverted(bool setting)
+{
+ gtk_range_set_inverted(gobj(), static_cast<int>(setting));
+}
+
+bool Range::get_inverted() const
+{
+ return gtk_range_get_inverted(const_cast<GtkRange*>(gobj()));
+}
+
+void Range::set_increments(double step, double page)
+{
+ gtk_range_set_increments(gobj(), step, page);
+}
+
+void Range::set_range(double min, double max)
+{
+ gtk_range_set_range(gobj(), min, max);
+}
+
+void Range::set_value(double value)
+{
+ gtk_range_set_value(gobj(), value);
+}
+
+double Range::get_value() const
+{
+ return gtk_range_get_value(const_cast<GtkRange*>(gobj()));
+}
+
+
+Glib::SignalProxy0< void > Range::signal_value_changed()
+{
+ return Glib::SignalProxy0< void >(this, &Range_signal_value_changed_info);
+}
+
+Glib::SignalProxy1< void,double > Range::signal_adjust_bounds()
+{
+ return Glib::SignalProxy1< void,double >(this, &Range_signal_adjust_bounds_info);
+}
+
+Glib::SignalProxy1< void,ScrollType > Range::signal_move_slider()
+{
+ return Glib::SignalProxy1< void,ScrollType >(this, &Range_signal_move_slider_info);
+}
+
+Glib::SignalProxy2< bool,ScrollType,double > Range::signal_change_value()
+{
+ return Glib::SignalProxy2< bool,ScrollType,double >(this, &Range_signal_change_value_info);
+}
+
+
+Glib::PropertyProxy<UpdateType> Range::property_update_policy()
+{
+ return Glib::PropertyProxy<UpdateType>(this, "update-policy");
+}
+
+Glib::PropertyProxy_ReadOnly<UpdateType> Range::property_update_policy() const
+{
+ return Glib::PropertyProxy_ReadOnly<UpdateType>(this, "update-policy");
+}
+
+Glib::PropertyProxy<Adjustment*> Range::property_adjustment()
+{
+ return Glib::PropertyProxy<Adjustment*>(this, "adjustment");
+}
+
+Glib::PropertyProxy_ReadOnly<Adjustment*> Range::property_adjustment() const
+{
+ return Glib::PropertyProxy_ReadOnly<Adjustment*>(this, "adjustment");
+}
+
+Glib::PropertyProxy<bool> Range::property_inverted()
+{
+ return Glib::PropertyProxy<bool>(this, "inverted");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Range::property_inverted() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "inverted");
+}
+
+
+void Gtk::Range::on_value_changed()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->value_changed)
+ (*base->value_changed)(gobj());
+}
+
+void Gtk::Range::on_adjust_bounds(double new_value)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->adjust_bounds)
+ (*base->adjust_bounds)(gobj(),new_value);
+}
+
+void Gtk::Range::on_move_slider(ScrollType scroll)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->move_slider)
+ (*base->move_slider)(gobj(),((GtkScrollType)(scroll)));
+}
+
+
+void Gtk::Range::get_range_border_vfunc(GtkBorder* border) const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->get_range_border)
+ (*base->get_range_border)(const_cast<GtkRange*>(gobj()),border);
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/range.h b/libs/gtkmm2/gtk/gtkmm/range.h
new file mode 100644
index 0000000000..f84118bb65
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/range.h
@@ -0,0 +1,282 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_RANGE_H
+#define _GTKMM_RANGE_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/widget.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkRange GtkRange;
+typedef struct _GtkRangeClass GtkRangeClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class Range_Class; } // namespace Gtk
+namespace Gtk
+{
+
+class Adjustment;
+
+/** Base class for widgets which visualize an adjustment.
+ *
+ * @ingroup Widgets
+ */
+
+class Range : public Widget
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Range CppObjectType;
+ typedef Range_Class CppClassType;
+ typedef GtkRange BaseObjectType;
+ typedef GtkRangeClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~Range();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class Range_Class;
+ static CppClassType range_class_;
+
+ // noncopyable
+ Range(const Range&);
+ Range& operator=(const Range&);
+
+protected:
+ explicit Range(const Glib::ConstructParams& construct_params);
+ explicit Range(GtkRange* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkRange* gobj() { return reinterpret_cast<GtkRange*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkRange* gobj() const { return reinterpret_cast<GtkRange*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_value_changed();
+ virtual void on_adjust_bounds(double new_value);
+ virtual void on_move_slider(ScrollType scroll);
+
+
+private:
+
+protected:
+ Range();
+public:
+
+
+ /** Sets the update policy for the range. Gtk::UPDATE_CONTINUOUS means that
+ * anytime the range slider is moved, the range value will change and the
+ * value_changed signal will be emitted. Gtk::UPDATE_DELAYED means that
+ * the value will be updated after a brief timeout where no slider motion
+ * occurs, so updates are spaced by a short time rather than
+ * continuous. Gtk::UPDATE_DISCONTINUOUS means that the value will only
+ * be updated when the user releases the button and ends the slider
+ * drag operation.
+ * @param policy Update policy.
+ */
+ void set_update_policy(UpdateType policy);
+
+ /** Gets the update policy of @a range . See set_update_policy().
+ * @return The current update policy.
+ */
+ UpdateType get_update_policy() const;
+
+ /** Sets the adjustment to be used as the "model" object for this range
+ * widget. The adjustment indicates the current range value, the
+ * minimum and maximum range values, the step/page increments used
+ * for keybindings and scrolling, and the page size. The page size
+ * is normally 0 for Gtk::Scale and nonzero for Gtk::Scrollbar, and
+ * indicates the size of the visible area of the widget being scrolled.
+ * The page size affects the size of the scrollbar slider.
+ * @param adjustment A Gtk::Adjustment.
+ */
+ void set_adjustment(Gtk::Adjustment& adjustment);
+ void unset_adjustment();
+
+
+ /** Get the Gtk::Adjustment which is the "model" object for Gtk::Range.
+ * See set_adjustment() for details.
+ * The return value does not have a reference added, so should not
+ * be unreferenced.
+ * @return A Gtk::Adjustment.
+ */
+ Gtk::Adjustment* get_adjustment();
+
+ /** Get the Gtk::Adjustment which is the "model" object for Gtk::Range.
+ * See set_adjustment() for details.
+ * The return value does not have a reference added, so should not
+ * be unreferenced.
+ * @return A Gtk::Adjustment.
+ */
+ const Gtk::Adjustment* get_adjustment() const;
+
+ /** Ranges normally move from lower to higher values as the
+ * slider moves from top to bottom or left to right. Inverted
+ * ranges have higher values at the top or on the right rather than
+ * on the bottom or left.
+ * @param setting <tt>true</tt> to invert the range.
+ */
+ void set_inverted(bool setting = true);
+
+ /** Gets the value set by set_inverted().
+ * @return <tt>true</tt> if the range is inverted.
+ */
+ bool get_inverted() const;
+
+ /** Sets the step and page sizes for the range.
+ * The step size is used when the user clicks the Gtk::Scrollbar
+ * arrows or moves Gtk::Scale via arrow keys. The page size
+ * is used for example when moving via Page Up or Page Down keys.
+ * @param step Step size.
+ * @param page Page size.
+ */
+ void set_increments(double step, double page);
+
+ /** Sets the allowable values in the Gtk::Range, and clamps the range
+ * value to be between @a min and @a max . (If the range has a non-zero
+ * page size, it is clamped between @a min and @a max - page-size.)
+ * @param min Minimum range value.
+ * @param max Maximum range value.
+ */
+ void set_range(double min, double max);
+
+ /** Sets the current value of the range; if the value is outside the
+ * minimum or maximum range values, it will be clamped to fit inside
+ * them. The range emits the "value_changed" signal if the value
+ * changes.
+ * @param value New value of the range.
+ */
+ void set_value(double value);
+
+ /** Gets the current value of the range.
+ * @return Current value of the range.
+ */
+ double get_value() const;
+
+
+ Glib::SignalProxy0< void > signal_value_changed();
+
+
+ Glib::SignalProxy1< void,double > signal_adjust_bounds();
+
+
+ Glib::SignalProxy1< void,ScrollType > signal_move_slider();
+
+
+ //We use no_default_handler for this, because we can not add a new vfunc to 2.5 without breaking ABI.
+ //TODO: Remove no_default_handler when we do an ABI-break-with-parallel-install.
+
+
+ Glib::SignalProxy2< bool,ScrollType,double > signal_change_value();
+
+
+ /** How the range should be updated on the screen.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<UpdateType> property_update_policy() ;
+
+/** How the range should be updated on the screen.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<UpdateType> property_update_policy() const;
+
+ /** The GtkAdjustment that contains the current value of this range object.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Adjustment*> property_adjustment() ;
+
+/** The GtkAdjustment that contains the current value of this range object.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Adjustment*> property_adjustment() const;
+
+ /** Invert direction slider moves to increase range value.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_inverted() ;
+
+/** Invert direction slider moves to increase range value.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_inverted() const;
+
+
+protected:
+ virtual void get_range_border_vfunc(GtkBorder* border) const;
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::Range
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::Range* wrap(GtkRange* object, bool take_copy = false);
+}
+#endif /* _GTKMM_RANGE_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/rc.cc b/libs/gtkmm2/gtk/gtkmm/rc.cc
new file mode 100644
index 0000000000..7fcb207764
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/rc.cc
@@ -0,0 +1,357 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/rc.h>
+#include <gtkmm/private/rc_p.h>
+
+#include <gtk/gtktypebuiltins.h>
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/utility.h>
+#include <gtkmm/settings.h>
+#include <gtkmm/widget.h>
+#include <gtkmm/style.h>
+#include <gtk/gtkrc.h>
+
+
+namespace Gtk
+{
+
+void RcStyle::set_name(const Glib::ustring& name)
+{
+ const Glib::ScopedPtr<char> old_name (gobj()->name);
+ gobj()->name = g_strdup(name.c_str());
+}
+
+void RcStyle::set_bg_pixmap_name(StateType state, const Glib::ustring& name)
+{
+ const Glib::ScopedPtr<char> old_name (gobj()->bg_pixmap_name[state]);
+ gobj()->bg_pixmap_name[state] = g_strdup(name.c_str());
+}
+
+Glib::ustring RcStyle::get_bg_pixmap_name(StateType state) const
+{
+ if(const char *const name = gobj()->bg_pixmap_name[state])
+ return Glib::ustring(name);
+ else
+ return Glib::ustring();
+}
+
+void RcStyle::set_font(const Pango::FontDescription& font_desc)
+{
+ g_return_if_fail(font_desc.gobj() != 0);
+
+ const Pango::FontDescription old_font_desc (gobj()->font_desc, false);
+ gobj()->font_desc = font_desc.gobj_copy();
+}
+
+Pango::FontDescription RcStyle::get_font() const
+{
+ return Pango::FontDescription(gobj()->font_desc, true);
+}
+
+void RcStyle::set_color_flags(StateType state, RcFlags flags)
+{
+ gobj()->color_flags[state] = static_cast<GtkRcFlags>(gobj()->color_flags[state] | flags);
+}
+
+void RcStyle::unset_color_flags(StateType state, RcFlags flags)
+{
+ gobj()->color_flags[state] = static_cast<GtkRcFlags>(gobj()->color_flags[state] & ~flags);
+}
+
+RcFlags RcStyle::get_color_flags(StateType state) const
+{
+ return static_cast<RcFlags>(unsigned(gobj()->color_flags[state]));
+}
+
+void RcStyle::set_xthickness(int xthickness)
+{
+ gobj()->xthickness = xthickness;
+}
+
+void RcStyle::set_ythickness(int ythickness)
+{
+ gobj()->ythickness = ythickness;
+}
+
+
+RC::RC(const Glib::ustring& filename)
+{
+ //gtk_rc_init();
+ gtk_rc_parse(filename.c_str());
+}
+
+Glib::RefPtr<Style>
+RC::get_style(const Widget &widget)
+{
+ return Glib::wrap(gtk_rc_get_style(const_cast<GtkWidget*>(widget.gobj())));
+}
+
+void
+RC::parse_string(const Glib::ustring& rc_string)
+{
+ gtk_rc_parse_string(const_cast<char*>(rc_string.c_str()));
+}
+
+
+void
+RC::add_default_file(const Glib::ustring& filename)
+{
+ gtk_rc_add_default_file(const_cast<char*>(filename.c_str()));
+}
+
+void
+RC::set_default_files(const Glib::ArrayHandle<Glib::ustring>& filenames)
+{
+ gtk_rc_set_default_files(const_cast<char**>(filenames.data()));
+}
+
+Glib::ArrayHandle<Glib::ustring>
+RC::get_default_files()
+{
+ return Glib::ArrayHandle<Glib::ustring>(
+ const_cast<const char**>(gtk_rc_get_default_files()), Glib::OWNERSHIP_NONE);
+}
+
+bool RC::reparse_all()
+{
+ return gtk_rc_reparse_all();
+}
+
+bool RC::reparse_all(const Glib::RefPtr<Settings>& settings, bool force_load)
+{
+ return gtk_rc_reparse_all_for_settings(settings->gobj(), force_load);
+}
+
+void RC::reset_styles(const Glib::RefPtr<Settings>& settings)
+{
+ gtk_rc_reset_styles(settings->gobj());
+}
+
+Glib::ustring
+RC::find_pixmap_in_path(const Glib::RefPtr<Settings>& context, GScanner *scanner, const Glib::ustring& pixmap_file)
+{
+ return Glib::convert_return_gchar_ptr_to_ustring(
+ gtk_rc_find_pixmap_in_path(context->gobj(), scanner, const_cast<char*>(pixmap_file.c_str())));
+}
+
+Glib::ustring
+RC::find_pixmap_in_path(const Glib::RefPtr<Settings>& context, const Glib::ustring& pixmap_file)
+{
+ return Glib::convert_return_gchar_ptr_to_ustring(
+ gtk_rc_find_pixmap_in_path(context->gobj(), 0 /* see C docs */, const_cast<char*>(pixmap_file.c_str())));
+}
+
+Glib::ustring
+RC::find_module_in_path(const Glib::ustring& module_file)
+{
+ return Glib::convert_return_gchar_ptr_to_ustring(
+ gtk_rc_find_module_in_path(const_cast<char*>(module_file.c_str())));
+}
+
+Glib::ustring
+RC::get_theme_dir()
+{
+ return Glib::convert_return_gchar_ptr_to_ustring(gtk_rc_get_theme_dir());
+}
+
+Glib::ustring
+RC::get_module_dir()
+{
+ return Glib::convert_return_gchar_ptr_to_ustring(gtk_rc_get_module_dir());
+}
+
+}
+
+
+namespace
+{
+} // anonymous namespace
+
+// static
+GType Glib::Value<Gtk::RcFlags>::value_type()
+{
+ return gtk_rc_flags_get_type();
+}
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Gtk::RcStyle> wrap(GtkRcStyle* object, bool take_copy)
+{
+ return Glib::RefPtr<Gtk::RcStyle>( dynamic_cast<Gtk::RcStyle*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} /* namespace Glib */
+
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& RcStyle_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &RcStyle_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_rc_style_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void RcStyle_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* RcStyle_Class::wrap_new(GObject* object)
+{
+ return new RcStyle((GtkRcStyle*)object);
+}
+
+
+/* The implementation: */
+
+GtkRcStyle* RcStyle::gobj_copy()
+{
+ reference();
+ return gobj();
+}
+
+RcStyle::RcStyle(const Glib::ConstructParams& construct_params)
+:
+ Glib::Object(construct_params)
+{}
+
+RcStyle::RcStyle(GtkRcStyle* castitem)
+:
+ Glib::Object((GObject*)(castitem))
+{}
+
+RcStyle::~RcStyle()
+{}
+
+
+RcStyle::CppClassType RcStyle::rcstyle_class_; // initialize static member
+
+GType RcStyle::get_type()
+{
+ return rcstyle_class_.init().get_type();
+}
+
+GType RcStyle::get_base_type()
+{
+ return gtk_rc_style_get_type();
+}
+
+
+RcStyle::RcStyle()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Glib::Object(Glib::ConstructParams(rcstyle_class_.init()))
+{
+ }
+
+Glib::RefPtr<RcStyle> RcStyle::create()
+{
+ return Glib::RefPtr<RcStyle>( new RcStyle() );
+}
+Glib::RefPtr<RcStyle> RcStyle::copy() const
+{
+ return Glib::wrap(gtk_rc_style_copy(const_cast<GtkRcStyle*>(gobj())));
+}
+
+Glib::ustring RcStyle::get_name() const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(gobj()->name);
+}
+
+void RcStyle::set_fg(StateType state, const Gdk::Color& color)
+{
+ gobj()->fg[state] = *color.gobj();
+}
+
+Gdk::Color RcStyle::get_fg(StateType state) const
+{
+ return Gdk::Color(const_cast<GdkColor*>(&gobj()->fg[state]), true);
+}
+
+void RcStyle::set_bg(StateType state, const Gdk::Color& color)
+{
+ gobj()->bg[state] = *color.gobj();
+}
+
+Gdk::Color RcStyle::get_bg(StateType state) const
+{
+ return Gdk::Color(const_cast<GdkColor*>(&gobj()->bg[state]), true);
+}
+
+void RcStyle::set_text(StateType state, const Gdk::Color& color)
+{
+ gobj()->text[state] = *color.gobj();
+}
+
+Gdk::Color RcStyle::get_text(StateType state) const
+{
+ return Gdk::Color(const_cast<GdkColor*>(&gobj()->text[state]), true);
+}
+
+void RcStyle::set_base(StateType state, const Gdk::Color& color)
+{
+ gobj()->base[state] = *color.gobj();
+}
+
+Gdk::Color RcStyle::get_base(StateType state) const
+{
+ return Gdk::Color(const_cast<GdkColor*>(&gobj()->base[state]), true);
+}
+
+int RcStyle::get_xthickness() const
+{
+ return gobj()->xthickness;
+}
+
+int RcStyle::get_ythickness() const
+{
+ return gobj()->ythickness;
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/rc.h b/libs/gtkmm2/gtk/gtkmm/rc.h
new file mode 100644
index 0000000000..003fd91c15
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/rc.h
@@ -0,0 +1,352 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_RC_H
+#define _GTKMM_RC_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+//#include <gtkmm/settings.h>
+#include <gtkmm/style.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkRcStyle GtkRcStyle;
+typedef struct _GtkRcStyleClass GtkRcStyleClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class RcStyle_Class; } // namespace Gtk
+namespace Gtk
+{
+
+class Widget;
+class Settings;
+class Style;
+
+
+/** @addtogroup gtkmmEnums Enums and Flags */
+
+/**
+ * @ingroup gtkmmEnums
+ * @par Bitwise operators:
+ * <tt>%RcFlags operator|(RcFlags, RcFlags)</tt><br>
+ * <tt>%RcFlags operator&(RcFlags, RcFlags)</tt><br>
+ * <tt>%RcFlags operator^(RcFlags, RcFlags)</tt><br>
+ * <tt>%RcFlags operator~(RcFlags)</tt><br>
+ * <tt>%RcFlags& operator|=(RcFlags&, RcFlags)</tt><br>
+ * <tt>%RcFlags& operator&=(RcFlags&, RcFlags)</tt><br>
+ * <tt>%RcFlags& operator^=(RcFlags&, RcFlags)</tt><br>
+ */
+enum RcFlags
+{
+ RC_FG = 1 << 0,
+ RC_BG = 1 << 1,
+ RC_TEXT = 1 << 2,
+ RC_BASE = 1 << 3
+};
+
+/** @ingroup gtkmmEnums */
+inline RcFlags operator|(RcFlags lhs, RcFlags rhs)
+ { return static_cast<RcFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
+
+/** @ingroup gtkmmEnums */
+inline RcFlags operator&(RcFlags lhs, RcFlags rhs)
+ { return static_cast<RcFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
+
+/** @ingroup gtkmmEnums */
+inline RcFlags operator^(RcFlags lhs, RcFlags rhs)
+ { return static_cast<RcFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
+
+/** @ingroup gtkmmEnums */
+inline RcFlags operator~(RcFlags flags)
+ { return static_cast<RcFlags>(~static_cast<unsigned>(flags)); }
+
+/** @ingroup gtkmmEnums */
+inline RcFlags& operator|=(RcFlags& lhs, RcFlags rhs)
+ { return (lhs = static_cast<RcFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
+
+/** @ingroup gtkmmEnums */
+inline RcFlags& operator&=(RcFlags& lhs, RcFlags rhs)
+ { return (lhs = static_cast<RcFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
+
+/** @ingroup gtkmmEnums */
+inline RcFlags& operator^=(RcFlags& lhs, RcFlags rhs)
+ { return (lhs = static_cast<RcFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::RcFlags> : public Glib::Value_Flags<Gtk::RcFlags>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+
+class RcStyle : public Glib::Object
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef RcStyle CppObjectType;
+ typedef RcStyle_Class CppClassType;
+ typedef GtkRcStyle BaseObjectType;
+ typedef GtkRcStyleClass BaseClassType;
+
+private: friend class RcStyle_Class;
+ static CppClassType rcstyle_class_;
+
+private:
+ // noncopyable
+ RcStyle(const RcStyle&);
+ RcStyle& operator=(const RcStyle&);
+
+protected:
+ explicit RcStyle(const Glib::ConstructParams& construct_params);
+ explicit RcStyle(GtkRcStyle* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~RcStyle();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ GtkRcStyle* gobj() { return reinterpret_cast<GtkRcStyle*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const GtkRcStyle* gobj() const { return reinterpret_cast<GtkRcStyle*>(gobject_); }
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ GtkRcStyle* gobj_copy();
+
+private:
+
+
+protected:
+ RcStyle();
+
+public:
+
+ static Glib::RefPtr<RcStyle> create();
+
+
+ /** Makes a copy of the specified Gtk::RcStyle. This function
+ * will correctly copy an RC style that is a member of a class
+ * derived from Gtk::RcStyle.
+ * @return The resulting Gtk::RcStyle.
+ */
+ Glib::RefPtr<RcStyle> copy() const;
+
+ void set_name(const Glib::ustring& name);
+ Glib::ustring get_name() const;
+
+ void set_bg_pixmap_name(Gtk::StateType state, const Glib::ustring& name);
+ Glib::ustring get_bg_pixmap_name(Gtk::StateType state) const;
+
+ void set_font(const Pango::FontDescription& font_desc);
+ Pango::FontDescription get_font() const;
+
+ void set_color_flags(Gtk::StateType state, RcFlags flags);
+ void unset_color_flags(Gtk::StateType state, RcFlags flags);
+ RcFlags get_color_flags(Gtk::StateType state) const;
+
+ void set_fg(Gtk::StateType state, const Gdk::Color& color);
+ Gdk::Color get_fg(Gtk::StateType state) const;
+
+ void set_bg(Gtk::StateType state, const Gdk::Color& color);
+ Gdk::Color get_bg(Gtk::StateType state) const;
+
+ void set_text(Gtk::StateType state, const Gdk::Color& color);
+ Gdk::Color get_text(Gtk::StateType state) const;
+
+ void set_base(Gtk::StateType state, const Gdk::Color& color);
+ Gdk::Color get_base(Gtk::StateType state) const;
+
+
+ void set_xthickness(int xthickness);
+ int get_xthickness() const;
+
+ void set_ythickness(int ythickness);
+ int get_ythickness() const;
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+};
+
+
+class RC
+{
+public:
+ explicit RC(const Glib::ustring& filename);
+
+ /** Finds all matching RC styles for a given widget,
+ * composites them together, and then creates a
+ * Gtk::Style representing the composite appearance.
+ *
+ * @param widget a Gtk::Widget.
+ * @result the resulting style.
+ */
+ static Glib::RefPtr<Style> get_style(const Widget& widget);
+
+ static void parse_string(const Glib::ustring &rc_string);
+
+ /** Adds a file to the list of files to be parsed at the end of gtk_init().
+ *
+ * @param filename the pathname to the file. If @a filename is not absolute, it is searched in the current directory.
+ */
+ static void add_default_file(const Glib::ustring& filename);
+
+ /** Sets the list of files that GTK+ will read at the end of gtk_init().
+ *
+ * @param filenames A list of filenames.
+ */
+ static void set_default_files(const Glib::StringArrayHandle& filenames);
+
+ /** Retrieves the current list of RC files that will be parsed
+ * at the end of gtk_init().
+ *
+ * @result An array of filenames.
+ */
+ static Glib::StringArrayHandle get_default_files();
+
+ /** If the modification time on any previously read file for the
+ * default Gtk::Settings has changed, discard all style information
+ * and then reread all previously read RC files.
+ *
+ * @result true if the files were reread.
+ */
+ static bool reparse_all();
+
+ /** If the modification time on any previously read file
+ * for the given Gtk::Settings has changed, discard all style information
+ * and then reread all previously read RC files.
+ *
+ * @param settings a Gtk::Settings
+ * @param force_load load whether or not anything changed
+ * @result true if the files were reread.
+ */
+ static bool reparse_all(const Glib::RefPtr<Settings>& settings, bool force_load = true);
+
+ /** This method recomputes the styles for all widgets that use a
+ * particular Gtk::Settings object. (There is one Gtk::Settings object
+ * per Gdk::Screen - see Gtk::Settings::get_for_screen()); It is useful
+ * when some global parameter has changed that affects the appearance
+ * of all widgets, because when a widget gets a new style, it will
+ * both redraw and recompute any cached information about its
+ * appearance. As an example, it is used when the default font size
+ * set by the operating system changes. Note that this function
+ * doesn't affect widgets that have a style set explicitely on them
+ * with Gtk::Widget::set_style().
+ *
+ * @param settings a Gtk::Settings
+ *
+ * Since: 2.4
+ */
+ static void reset_styles(const Glib::RefPtr<Settings>& settings);
+
+ /** Looks up a file in pixmap path for the specified Gtk::Settings.
+ * If the file is not found, it outputs a warning message using
+ * g_warning() and returns an empty string.
+ *
+ * @param settings a Gtk::Settings
+ * @param scanner Scanner used to get line number information for the warning message.
+ * @param pixmap_file name of the pixmap file to locate.
+ * @result the filename.
+ */
+ static Glib::ustring find_pixmap_in_path(const Glib::RefPtr<Settings>& settings, GScanner* scanner, const Glib::ustring& pixmap_file);
+
+ /** Looks up a file in pixmap path for the specified Gtk::Settings.
+ * If the file is not found, it outputs a warning message using
+ * g_warning() and returns an empty string.
+ *
+ * @param settings a Gtk::Settings
+ * @param pixmap_file name of the pixmap file to locate.
+ * @result the filename.
+ */
+ static Glib::ustring find_pixmap_in_path(const Glib::RefPtr<Settings>& settings, const Glib::ustring& pixmap_file);
+
+ /** Searches for a theme engine in the GTK+ search path. This function
+ * is not useful for applications and should not be used.
+ *
+ * @param pixmap_file name of a theme engine.
+ * @result The filename, if found, otherwise an empty string.
+ **/
+ static Glib::ustring find_module_in_path(const Glib::ustring& pixmap_file);
+
+ static Glib::ustring get_theme_dir();
+
+ /** Returns a directory in which GTK+ looks for theme engines.
+ * For full information about the search for theme engines,
+ * see the GTK+ docs.
+ *
+ * @result the directory.
+ **/
+ static Glib::ustring get_module_dir();
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::RcStyle
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Gtk::RcStyle> wrap(GtkRcStyle* object, bool take_copy = false);
+}
+
+
+#endif /* _GTKMM_RC_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/ruler.cc b/libs/gtkmm2/gtk/gtkmm/ruler.cc
new file mode 100644
index 0000000000..0983eb0210
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/ruler.cc
@@ -0,0 +1,506 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/ruler.h>
+#include <gtkmm/private/ruler_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkruler.h>
+#include <gtk/gtkhruler.h>
+#include <gtk/gtkvruler.h>
+#include <cstring>
+
+
+namespace Gtk
+{
+
+MetricType Ruler::get_metric() const
+{
+ MetricType metric = PIXELS;
+
+ if (strcmp(gobj()->metric->abbrev, "In") == 0) metric = INCHES;
+ else if(strcmp(gobj()->metric->abbrev, "Cn") == 0) metric = CENTIMETERS;
+
+ return metric;
+}
+
+} // namespace Gtk
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::Ruler* wrap(GtkRuler* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::Ruler *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Ruler_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Ruler_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_ruler_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Ruler_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->draw_ticks = &draw_ticks_vfunc_callback;
+ klass->draw_pos = &draw_pos_vfunc_callback;
+}
+
+void Ruler_Class::draw_ticks_vfunc_callback(GtkRuler* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->draw_ticks_vfunc();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->draw_ticks)
+ (*base->draw_ticks)(self);
+ }
+}
+
+void Ruler_Class::draw_pos_vfunc_callback(GtkRuler* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->draw_pos_vfunc();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->draw_pos)
+ (*base->draw_pos)(self);
+ }
+}
+
+
+Glib::ObjectBase* Ruler_Class::wrap_new(GObject* o)
+{
+ return manage(new Ruler((GtkRuler*)(o)));
+
+}
+
+
+/* The implementation: */
+
+Ruler::Ruler(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Widget(construct_params)
+{
+ }
+
+Ruler::Ruler(GtkRuler* castitem)
+:
+ Gtk::Widget((GtkWidget*)(castitem))
+{
+ }
+
+Ruler::~Ruler()
+{
+ destroy_();
+}
+
+Ruler::CppClassType Ruler::ruler_class_; // initialize static member
+
+GType Ruler::get_type()
+{
+ return ruler_class_.init().get_type();
+}
+
+GType Ruler::get_base_type()
+{
+ return gtk_ruler_get_type();
+}
+
+
+Ruler::Ruler()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Widget(Glib::ConstructParams(ruler_class_.init()))
+{
+ }
+
+void Ruler::set_metric(MetricType metric)
+{
+ gtk_ruler_set_metric(gobj(), ((GtkMetricType)(metric)));
+}
+
+MetricType Ruler::get_metric()
+{
+ return ((MetricType)(gtk_ruler_get_metric(gobj())));
+}
+
+double Ruler::get_range_lower() const
+{
+ return gobj()->lower;
+}
+
+double Ruler::get_range_upper() const
+{
+ return gobj()->upper;
+}
+
+void Ruler::set_range(double lower, double upper, double position, double max_size)
+{
+ gtk_ruler_set_range(gobj(), lower, upper, position, max_size);
+}
+
+void Ruler::get_range(double& lower, double& upper, double& position, double& max_size)
+{
+ gtk_ruler_get_range(gobj(), &(lower), &(upper), &(position), &(max_size));
+}
+
+void Ruler::draw_ticks()
+{
+ gtk_ruler_draw_ticks(gobj());
+}
+
+void Ruler::draw_pos()
+{
+ gtk_ruler_draw_pos(gobj());
+}
+
+
+Glib::PropertyProxy<double> Ruler::property_lower()
+{
+ return Glib::PropertyProxy<double>(this, "lower");
+}
+
+Glib::PropertyProxy_ReadOnly<double> Ruler::property_lower() const
+{
+ return Glib::PropertyProxy_ReadOnly<double>(this, "lower");
+}
+
+Glib::PropertyProxy<double> Ruler::property_upper()
+{
+ return Glib::PropertyProxy<double>(this, "upper");
+}
+
+Glib::PropertyProxy_ReadOnly<double> Ruler::property_upper() const
+{
+ return Glib::PropertyProxy_ReadOnly<double>(this, "upper");
+}
+
+Glib::PropertyProxy<double> Ruler::property_position()
+{
+ return Glib::PropertyProxy<double>(this, "position");
+}
+
+Glib::PropertyProxy_ReadOnly<double> Ruler::property_position() const
+{
+ return Glib::PropertyProxy_ReadOnly<double>(this, "position");
+}
+
+Glib::PropertyProxy<double> Ruler::property_max_size()
+{
+ return Glib::PropertyProxy<double>(this, "max-size");
+}
+
+Glib::PropertyProxy_ReadOnly<double> Ruler::property_max_size() const
+{
+ return Glib::PropertyProxy_ReadOnly<double>(this, "max-size");
+}
+
+
+void Gtk::Ruler::draw_ticks_vfunc()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->draw_ticks)
+ (*base->draw_ticks)(gobj());
+}
+
+void Gtk::Ruler::draw_pos_vfunc()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->draw_pos)
+ (*base->draw_pos)(gobj());
+}
+
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+
+Gtk::VRuler* wrap(GtkVRuler* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::VRuler *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& VRuler_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &VRuler_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_vruler_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void VRuler_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* VRuler_Class::wrap_new(GObject* o)
+{
+ return manage(new VRuler((GtkVRuler*)(o)));
+
+}
+
+
+/* The implementation: */
+
+VRuler::VRuler(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Ruler(construct_params)
+{
+ }
+
+VRuler::VRuler(GtkVRuler* castitem)
+:
+ Gtk::Ruler((GtkRuler*)(castitem))
+{
+ }
+
+VRuler::~VRuler()
+{
+ destroy_();
+}
+
+VRuler::CppClassType VRuler::vruler_class_; // initialize static member
+
+GType VRuler::get_type()
+{
+ return vruler_class_.init().get_type();
+}
+
+GType VRuler::get_base_type()
+{
+ return gtk_vruler_get_type();
+}
+
+VRuler::VRuler()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Ruler(Glib::ConstructParams(vruler_class_.init()))
+{
+ }
+
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+
+Gtk::HRuler* wrap(GtkHRuler* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::HRuler *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& HRuler_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &HRuler_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_hruler_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void HRuler_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* HRuler_Class::wrap_new(GObject* o)
+{
+ return manage(new HRuler((GtkHRuler*)(o)));
+
+}
+
+
+/* The implementation: */
+
+HRuler::HRuler(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Ruler(construct_params)
+{
+ }
+
+HRuler::HRuler(GtkHRuler* castitem)
+:
+ Gtk::Ruler((GtkRuler*)(castitem))
+{
+ }
+
+HRuler::~HRuler()
+{
+ destroy_();
+}
+
+HRuler::CppClassType HRuler::hruler_class_; // initialize static member
+
+GType HRuler::get_type()
+{
+ return hruler_class_.init().get_type();
+}
+
+GType HRuler::get_base_type()
+{
+ return gtk_hruler_get_type();
+}
+
+HRuler::HRuler()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Ruler(Glib::ConstructParams(hruler_class_.init()))
+{
+ }
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/ruler.h b/libs/gtkmm2/gtk/gtkmm/ruler.h
new file mode 100644
index 0000000000..510df8c7b4
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/ruler.h
@@ -0,0 +1,403 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_RULER_H
+#define _GTKMM_RULER_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* ruler.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/widget.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkRuler GtkRuler;
+typedef struct _GtkRulerClass GtkRulerClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class Ruler_Class; } // namespace Gtk
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkVRuler GtkVRuler;
+typedef struct _GtkVRulerClass GtkVRulerClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class VRuler_Class; } // namespace Gtk
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkHRuler GtkHRuler;
+typedef struct _GtkHRulerClass GtkHRulerClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class HRuler_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** Base class for horizontal or vertical rulers.
+ *
+ * NOTE this widget is considered too specialized/little-used for GTK+, and will in the future be moved to some other package. If your application needs this widget, feel free to use it, as the widget does work and is useful in some applications; it's just not of general interest. However, we are not accepting new features for the widget, and it will eventually move out of the GTK+ distribution.
+ * Rulers are used to show the mouse pointer's location in a window. The ruler can either be horizontal or vertical. Within the ruler a small triangle indicates the location of the mouse relative to the horixontal or vertical ruler.
+
+ * This is an abstract base for Gtk::HRuler and
+ * Gtk::VRuler. Users should only instantiate those types.
+ *
+ * @ingroup Widgets
+ */
+
+class Ruler : public Widget
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Ruler CppObjectType;
+ typedef Ruler_Class CppClassType;
+ typedef GtkRuler BaseObjectType;
+ typedef GtkRulerClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~Ruler();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class Ruler_Class;
+ static CppClassType ruler_class_;
+
+ // noncopyable
+ Ruler(const Ruler&);
+ Ruler& operator=(const Ruler&);
+
+protected:
+ explicit Ruler(const Glib::ConstructParams& construct_params);
+ explicit Ruler(GtkRuler* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkRuler* gobj() { return reinterpret_cast<GtkRuler*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkRuler* gobj() const { return reinterpret_cast<GtkRuler*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+protected:
+ Ruler();
+
+public:
+
+
+ MetricType get_metric() const;
+
+ /** Sets the desired metric of the ruler. The possible choices are:
+ * <ul><li>Gtk::PIXELS
+ * <li>Gtk::INCHES
+ * <li>Gtk::CENTIMETERS
+ * </ul>The default metric is Gtk::PIXELS.
+ */
+
+ void set_metric(MetricType metric = PIXELS);
+
+ /** Gets the units used for a Gtk::Ruler. See set_metric().
+ * @return The units currently used for @a ruler .
+ */
+ MetricType get_metric();
+
+ double get_range_lower() const;
+ double get_range_upper() const;
+
+ /** sets the range of the ruler.
+ * <i>upper</i> and <i>lower</i> arguments denote the extents of the Ruler.
+ * <i>max_size</i> is the largest number displayed by the ruler.
+ * <i>position</i> gives the initial value of the ruler.
+ * Rulers do not have sane defaults so this function should always be called.
+ */
+
+ void set_range(double lower, double upper, double position, double max_size);
+
+ /** Retrieves values indicating the range and current position of a Gtk::Ruler.
+ * See set_range().
+ * @param lower Location to store lower limit of the ruler, or <tt>0</tt>.
+ * @param upper Location to store upper limit of the ruler, or <tt>0</tt>.
+ * @param position Location to store the current position of the mark on the ruler, or <tt>0</tt>.
+ * @param max_size Location to store the maximum size of the ruler used when calculating
+ * the space to leave for the text, or <tt>0</tt>.
+ */
+ void get_range(double& lower, double& upper, double& position, double& max_size);
+
+ /// draw tick marks on the ruler
+
+ void draw_ticks();
+
+ /// draw a position indicator on the ruler
+
+ void draw_pos();
+
+ virtual void draw_ticks_vfunc();
+ virtual void draw_pos_vfunc();
+
+ /** Lower limit of ruler.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<double> property_lower() ;
+
+/** Lower limit of ruler.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<double> property_lower() const;
+
+ /** Upper limit of ruler.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<double> property_upper() ;
+
+/** Upper limit of ruler.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<double> property_upper() const;
+
+ /** Position of mark on the ruler.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<double> property_position() ;
+
+/** Position of mark on the ruler.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<double> property_position() const;
+
+ /** Maximum size of the ruler.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<double> property_max_size() ;
+
+/** Maximum size of the ruler.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<double> property_max_size() const;
+
+
+};
+
+
+/** Vertical Ruler
+ *
+ * @ingroup Widgets
+ */
+
+class VRuler : public Ruler
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef VRuler CppObjectType;
+ typedef VRuler_Class CppClassType;
+ typedef GtkVRuler BaseObjectType;
+ typedef GtkVRulerClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~VRuler();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class VRuler_Class;
+ static CppClassType vruler_class_;
+
+ // noncopyable
+ VRuler(const VRuler&);
+ VRuler& operator=(const VRuler&);
+
+protected:
+ explicit VRuler(const Glib::ConstructParams& construct_params);
+ explicit VRuler(GtkVRuler* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkVRuler* gobj() { return reinterpret_cast<GtkVRuler*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkVRuler* gobj() const { return reinterpret_cast<GtkVRuler*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+public:
+ VRuler();
+
+
+};
+
+
+/** Horizontal Ruler
+ *
+ * @ingroup Widgets
+ */
+
+class HRuler : public Ruler
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef HRuler CppObjectType;
+ typedef HRuler_Class CppClassType;
+ typedef GtkHRuler BaseObjectType;
+ typedef GtkHRulerClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~HRuler();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class HRuler_Class;
+ static CppClassType hruler_class_;
+
+ // noncopyable
+ HRuler(const HRuler&);
+ HRuler& operator=(const HRuler&);
+
+protected:
+ explicit HRuler(const Glib::ConstructParams& construct_params);
+ explicit HRuler(GtkHRuler* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkHRuler* gobj() { return reinterpret_cast<GtkHRuler*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkHRuler* gobj() const { return reinterpret_cast<GtkHRuler*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+public:
+ HRuler();
+
+
+};
+
+} /* namespace Gtk */
+
+
+namespace Glib
+{
+ /** @relates Gtk::Ruler
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::Ruler* wrap(GtkRuler* object, bool take_copy = false);
+}
+namespace Glib
+{
+ /** @relates Gtk::VRuler
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::VRuler* wrap(GtkVRuler* object, bool take_copy = false);
+}
+namespace Glib
+{
+ /** @relates Gtk::HRuler
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::HRuler* wrap(GtkHRuler* object, bool take_copy = false);
+}
+#endif /* _GTKMM_RULER_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/scale.cc b/libs/gtkmm2/gtk/gtkmm/scale.cc
new file mode 100644
index 0000000000..6b7042daa7
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/scale.cc
@@ -0,0 +1,640 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/scale.h>
+#include <gtkmm/private/scale_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/adjustment.h>
+
+#include <gtk/gtkscale.h>
+#include <gtk/gtkhscale.h>
+#include <gtk/gtkvscale.h>
+#include <math.h>
+
+namespace Gtk
+{
+
+int Scale::calc_digits_(double step) const
+{
+ int digits = 0;
+
+ //Copied from gtk_[h|v]scale_new_with_range():
+ if (fabs (step) >= 1.0 || step == 0.0)
+ digits = 0;
+ else {
+ digits = abs ((int) floor (log10 (fabs (step))));
+ if (digits > 5)
+ digits = 5;
+ }
+
+ return digits;
+}
+
+VScale::VScale(double min, double max, double step)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Scale(Glib::ConstructParams(vscale_class_.init(), (char*) 0))
+{
+ Adjustment* adjustment = manage(new Adjustment(min, min, max, step, 10 * step, step));
+ // The adjustment will be destroyed along with the object
+ set_adjustment(*adjustment);
+
+ set_digits( calc_digits_(step) );
+}
+
+VScale::VScale(Adjustment& adjustment)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Scale(Glib::ConstructParams(vscale_class_.init(), (char*) 0))
+{
+ set_adjustment(adjustment);
+}
+
+VScale::VScale()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Scale(Glib::ConstructParams(vscale_class_.init(), (char*) 0))
+{
+ Adjustment* adjustment = manage(new Adjustment(0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0));
+ // The adjustment will be destroyed along with the object
+ set_adjustment(*adjustment);
+}
+
+
+HScale::HScale(double min, double max, double step)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Scale(Glib::ConstructParams(hscale_class_.init(), (char*) 0))
+{
+ Adjustment* adjustment = manage(new Adjustment(min, min, max, step, 10 * step, step));
+ // The adjustment will be destroyed along with the object
+ set_adjustment(*adjustment);
+
+ set_digits( calc_digits_(step) );
+}
+
+HScale::HScale()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Scale(Glib::ConstructParams(hscale_class_.init(), (char*) 0))
+{
+ Adjustment* adjustment = manage(new Adjustment(0.0, 0.0, 0.0,
+ 0.0, 0.0, 0.0));
+ // The adjustment will be destroyed along with the object
+ set_adjustment(*adjustment);
+}
+
+HScale::HScale(Adjustment& adjustment)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Scale(Glib::ConstructParams(hscale_class_.init(), (char*) 0))
+{
+ set_adjustment(adjustment);
+}
+
+} // namespace Gtk
+
+
+namespace
+{
+
+gchar* Scale_signal_format_value_callback(GtkScale* self, gdouble p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< Glib::ustring,double > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ return (strlen((*static_cast<SlotType*>(slot))(p0
+).c_str()) ? g_strdup((*static_cast<SlotType*>(slot))(p0
+).c_str()) : 0);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gchar* RType;
+ return RType();
+}
+
+gchar* Scale_signal_format_value_notify_callback(GtkScale* self, gdouble p0, void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,double > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(p0
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gchar* RType;
+ return RType();
+}
+
+const Glib::SignalProxyInfo Scale_signal_format_value_info =
+{
+ "format_value",
+ (GCallback) &Scale_signal_format_value_callback,
+ (GCallback) &Scale_signal_format_value_notify_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::Scale* wrap(GtkScale* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::Scale *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Scale_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Scale_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_scale_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Scale_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->draw_value = &draw_value_vfunc_callback;
+ klass->format_value = &format_value_callback;
+}
+
+void Scale_Class::draw_value_vfunc_callback(GtkScale* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->draw_value_vfunc();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->draw_value)
+ (*base->draw_value)(self);
+ }
+}
+
+
+gchar* Scale_Class::format_value_callback(GtkScale* self, gdouble p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return (strlen(obj->on_format_value(p0
+).c_str()) ? g_strdup(obj->on_format_value(p0
+).c_str()) : 0);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->format_value)
+ return (*base->format_value)(self, p0);
+ }
+
+ typedef gchar* RType;
+ return RType();
+}
+
+
+Glib::ObjectBase* Scale_Class::wrap_new(GObject* o)
+{
+ return manage(new Scale((GtkScale*)(o)));
+
+}
+
+
+/* The implementation: */
+
+Scale::Scale(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Range(construct_params)
+{
+ }
+
+Scale::Scale(GtkScale* castitem)
+:
+ Gtk::Range((GtkRange*)(castitem))
+{
+ }
+
+Scale::~Scale()
+{
+ destroy_();
+}
+
+Scale::CppClassType Scale::scale_class_; // initialize static member
+
+GType Scale::get_type()
+{
+ return scale_class_.init().get_type();
+}
+
+GType Scale::get_base_type()
+{
+ return gtk_scale_get_type();
+}
+
+
+Scale::Scale()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Range(Glib::ConstructParams(scale_class_.init()))
+{
+ }
+
+void Scale::set_digits(int digits)
+{
+ gtk_scale_set_digits(gobj(), digits);
+}
+
+int Scale::get_digits() const
+{
+ return gtk_scale_get_digits(const_cast<GtkScale*>(gobj()));
+}
+
+void Scale::set_draw_value(bool draw_value)
+{
+ gtk_scale_set_draw_value(gobj(), static_cast<int>(draw_value));
+}
+
+bool Scale::get_draw_value() const
+{
+ return gtk_scale_get_draw_value(const_cast<GtkScale*>(gobj()));
+}
+
+void Scale::set_value_pos(PositionType pos)
+{
+ gtk_scale_set_value_pos(gobj(), ((GtkPositionType)(pos)));
+}
+
+PositionType Scale::get_value_pos() const
+{
+ return ((PositionType)(gtk_scale_get_value_pos(const_cast<GtkScale*>(gobj()))));
+}
+
+Glib::RefPtr<Pango::Layout> Scale::get_layout()
+{
+
+ Glib::RefPtr<Pango::Layout> retvalue = Glib::wrap(gtk_scale_get_layout(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const Pango::Layout> Scale::get_layout() const
+{
+
+ Glib::RefPtr<const Pango::Layout> retvalue = Glib::wrap(gtk_scale_get_layout(const_cast<GtkScale*>(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+void Scale::get_layout_offsets(int& x, int& y) const
+{
+ gtk_scale_get_layout_offsets(const_cast<GtkScale*>(gobj()), &x, &y);
+}
+
+
+Glib::SignalProxy1< Glib::ustring,double > Scale::signal_format_value()
+{
+ return Glib::SignalProxy1< Glib::ustring,double >(this, &Scale_signal_format_value_info);
+}
+
+
+Glib::PropertyProxy<int> Scale::property_digits()
+{
+ return Glib::PropertyProxy<int>(this, "digits");
+}
+
+Glib::PropertyProxy_ReadOnly<int> Scale::property_digits() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "digits");
+}
+
+Glib::PropertyProxy<bool> Scale::property_draw_value()
+{
+ return Glib::PropertyProxy<bool>(this, "draw-value");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Scale::property_draw_value() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "draw-value");
+}
+
+Glib::PropertyProxy<PositionType> Scale::property_value_pos()
+{
+ return Glib::PropertyProxy<PositionType>(this, "value-pos");
+}
+
+Glib::PropertyProxy_ReadOnly<PositionType> Scale::property_value_pos() const
+{
+ return Glib::PropertyProxy_ReadOnly<PositionType>(this, "value-pos");
+}
+
+
+Glib::ustring Gtk::Scale::on_format_value(double value)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->format_value)
+ return Glib::convert_const_gchar_ptr_to_ustring((*base->format_value)(gobj(),value));
+
+ typedef Glib::ustring RType;
+ return RType();
+}
+
+
+void Gtk::Scale::draw_value_vfunc()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->draw_value)
+ (*base->draw_value)(gobj());
+}
+
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+
+Gtk::VScale* wrap(GtkVScale* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::VScale *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& VScale_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &VScale_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_vscale_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void VScale_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* VScale_Class::wrap_new(GObject* o)
+{
+ return manage(new VScale((GtkVScale*)(o)));
+
+}
+
+
+/* The implementation: */
+
+VScale::VScale(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Scale(construct_params)
+{
+ }
+
+VScale::VScale(GtkVScale* castitem)
+:
+ Gtk::Scale((GtkScale*)(castitem))
+{
+ }
+
+VScale::~VScale()
+{
+ destroy_();
+}
+
+VScale::CppClassType VScale::vscale_class_; // initialize static member
+
+GType VScale::get_type()
+{
+ return vscale_class_.init().get_type();
+}
+
+GType VScale::get_base_type()
+{
+ return gtk_vscale_get_type();
+}
+
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+
+Gtk::HScale* wrap(GtkHScale* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::HScale *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& HScale_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &HScale_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_hscale_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void HScale_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* HScale_Class::wrap_new(GObject* o)
+{
+ return manage(new HScale((GtkHScale*)(o)));
+
+}
+
+
+/* The implementation: */
+
+HScale::HScale(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Scale(construct_params)
+{
+ }
+
+HScale::HScale(GtkHScale* castitem)
+:
+ Gtk::Scale((GtkScale*)(castitem))
+{
+ }
+
+HScale::~HScale()
+{
+ destroy_();
+}
+
+HScale::CppClassType HScale::hscale_class_; // initialize static member
+
+GType HScale::get_type()
+{
+ return hscale_class_.init().get_type();
+}
+
+GType HScale::get_base_type()
+{
+ return gtk_hscale_get_type();
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/scale.h b/libs/gtkmm2/gtk/gtkmm/scale.h
new file mode 100644
index 0000000000..fb4d39dbad
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/scale.h
@@ -0,0 +1,460 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_SCALE_H
+#define _GTKMM_SCALE_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* scale.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/range.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkScale GtkScale;
+typedef struct _GtkScaleClass GtkScaleClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class Scale_Class; } // namespace Gtk
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkVScale GtkVScale;
+typedef struct _GtkVScaleClass GtkVScaleClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class VScale_Class; } // namespace Gtk
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkHScale GtkHScale;
+typedef struct _GtkHScaleClass GtkHScaleClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class HScale_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** Abstract base clase for Gtk::HScale and Gtk::VScale.
+ *
+ * A Gtk::Scale is a slider control used to select a numeric value. To use it,
+ * you'll probably want to investigate the methods on its base class,
+ * Gtk::Range, in addition to the methods for Gtk::Scale itself. To set the
+ * value of a scale, you would normally use set_value(). To detect
+ * changes to the value, you would normally use signal_value_changed().
+ *
+ * The Gtk::Scale widget is an abstract class, used only for deriving the
+ * subclasses Gtk::HScale and Gtk::VScale, so you should instantiate them
+ * instead.
+ *
+ * @ingroup Widgets
+ */
+
+class Scale : public Range
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Scale CppObjectType;
+ typedef Scale_Class CppClassType;
+ typedef GtkScale BaseObjectType;
+ typedef GtkScaleClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~Scale();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class Scale_Class;
+ static CppClassType scale_class_;
+
+ // noncopyable
+ Scale(const Scale&);
+ Scale& operator=(const Scale&);
+
+protected:
+ explicit Scale(const Glib::ConstructParams& construct_params);
+ explicit Scale(GtkScale* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkScale* gobj() { return reinterpret_cast<GtkScale*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkScale* gobj() const { return reinterpret_cast<GtkScale*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual Glib::ustring on_format_value(double value);
+
+
+private:
+
+protected:
+ Scale();
+public:
+
+ /** Set the number of decimal digits.
+ *
+ * This also causes the adjustment to be rounded off so the retrieved value
+ * matches the value the user sees. Setting digits to 1 gives for example
+ * 1.0, 2 gives 1.00, etc.
+ */
+
+ void set_digits(int digits);
+
+ /** Get the number of decimal digits.
+ */
+
+ int get_digits() const;
+
+ /** Set whether the current value is displayed as a string next to the slider.
+ */
+
+ void set_draw_value(bool draw_value = true);
+
+ /** Get whether the current value is displayed as a string next to the slider.
+ */
+
+ bool get_draw_value() const;
+
+
+ /** Set the position in which the value is displayed.
+ */
+
+ void set_value_pos(PositionType pos);
+
+ /** Get the position in which the value is displayed.
+ */
+
+ PositionType get_value_pos() const;
+
+
+ /** Gets the Pango::Layout used to display the scale. The returned object
+ * is owned by the scale so does not need to be freed by the caller.
+ * @return The Pango::Layout for this scale, or <tt>0</tt> if the draw_value property
+ * is <tt>false</tt>.
+ *
+ * Since: 2.4.
+ */
+ Glib::RefPtr<Pango::Layout> get_layout();
+
+ /** Gets the Pango::Layout used to display the scale. The returned object
+ * is owned by the scale so does not need to be freed by the caller.
+ * @return The Pango::Layout for this scale, or <tt>0</tt> if the draw_value property
+ * is <tt>false</tt>.
+ *
+ * Since: 2.4.
+ */
+ Glib::RefPtr<const Pango::Layout> get_layout() const;
+
+ /** Obtains the coordinates where the scale will draw the Pango::Layout
+ * representing the text in the scale. Remember
+ * when using the Pango::Layout function you need to convert to
+ * and from pixels using PANGO_PIXELS() or Pango::SCALE.
+ *
+ * If the draw_value property is <tt>false</tt>, the return values are
+ * undefined.
+ *
+ * Since: 2.4
+ * @param x Location to store X offset of layout, or <tt>0</tt>.
+ * @param y Location to store Y offset of layout, or <tt>0</tt>.
+ */
+ void get_layout_offsets(int& x, int& y) const;
+
+
+ /** Determines how the value is formatted.
+ *
+ * This can be used to connect a custom function for determining how the
+ * value is formatted. The function (or function object) is given a the value
+ * as a double and should return the representation of it as a Glib::ustring.
+ */
+
+
+ Glib::SignalProxy1< Glib::ustring,double > signal_format_value();
+
+ // TODO: When we can break ABI, this signal needs to be
+ // Glib::ustring format_value(double value, bool& use_default_formatting),
+ // where use_default_formatting specifies whether the return value will actually be a null char*.
+
+ /** Number of displayed decimal digits.
+ */
+ /** The number of decimal places that are displayed in the value.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_digits() ;
+
+/** The number of decimal places that are displayed in the value.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_digits() const;
+
+
+ /** Whether to draw the value as a string next to slider.
+ */
+ /** Whether the current value is displayed as a string next to the slider.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_draw_value() ;
+
+/** Whether the current value is displayed as a string next to the slider.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_draw_value() const;
+
+
+ /** The position in which the value is displayed.
+ */
+ /** The position in which the current value is displayed.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<PositionType> property_value_pos() ;
+
+/** The position in which the current value is displayed.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<PositionType> property_value_pos() const;
+
+
+protected:
+
+ virtual void draw_value_vfunc();
+
+ virtual int calc_digits_(double step) const;
+
+
+};
+
+/** A vertical slider for selecting values.
+ *
+ * The Gtk::VScale widget is used to allow the user to select a value using a
+ * vertical slider. See the Gtk::Scale documentation for more information
+ * on how to use a Gtk::VScale.
+ *
+ * @ingroup Widgets
+ */
+
+class VScale : public Scale
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef VScale CppObjectType;
+ typedef VScale_Class CppClassType;
+ typedef GtkVScale BaseObjectType;
+ typedef GtkVScaleClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~VScale();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class VScale_Class;
+ static CppClassType vscale_class_;
+
+ // noncopyable
+ VScale(const VScale&);
+ VScale& operator=(const VScale&);
+
+protected:
+ explicit VScale(const Glib::ConstructParams& construct_params);
+ explicit VScale(GtkVScale* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkVScale* gobj() { return reinterpret_cast<GtkVScale*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkVScale* gobj() const { return reinterpret_cast<GtkVScale*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+public:
+ VScale();
+
+ /**
+ * Construct a VScale with the given minimum and maximum. The step size is the
+ * distance the slider moves when the arrow keys are used to adjust the scale
+ * value.
+ */
+ VScale(double min, double max, double step);
+ explicit VScale(Adjustment& adjustment);
+
+
+};
+
+/** A horizontal slider for selecting values.
+ *
+ * The Gtk::HScale widget is used to allow the user to select a value using a
+ * horizontal slider. See the Gtk::Scale documentation for more information
+ * on how to use a Gtk::HScale.
+ *
+ * @ingroup Widgets
+ */
+
+class HScale : public Scale
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef HScale CppObjectType;
+ typedef HScale_Class CppClassType;
+ typedef GtkHScale BaseObjectType;
+ typedef GtkHScaleClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~HScale();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class HScale_Class;
+ static CppClassType hscale_class_;
+
+ // noncopyable
+ HScale(const HScale&);
+ HScale& operator=(const HScale&);
+
+protected:
+ explicit HScale(const Glib::ConstructParams& construct_params);
+ explicit HScale(GtkHScale* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkHScale* gobj() { return reinterpret_cast<GtkHScale*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkHScale* gobj() const { return reinterpret_cast<GtkHScale*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+public:
+ HScale();
+ /**
+ * Construct a HScale with the given minimum and maximum. The step size is the
+ * distance the slider moves when the arrow keys are used to adjust the scale
+ * value.
+ */
+ HScale(double min, double max, double step);
+ explicit HScale(Adjustment& adjustment);
+
+
+};
+
+} /* namespace Gtk */
+
+
+namespace Glib
+{
+ /** @relates Gtk::Scale
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::Scale* wrap(GtkScale* object, bool take_copy = false);
+}
+namespace Glib
+{
+ /** @relates Gtk::VScale
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::VScale* wrap(GtkVScale* object, bool take_copy = false);
+}
+namespace Glib
+{
+ /** @relates Gtk::HScale
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::HScale* wrap(GtkHScale* object, bool take_copy = false);
+}
+#endif /* _GTKMM_SCALE_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/scrollbar.cc b/libs/gtkmm2/gtk/gtkmm/scrollbar.cc
new file mode 100644
index 0000000000..1bf19b3cb8
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/scrollbar.cc
@@ -0,0 +1,341 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/scrollbar.h>
+#include <gtkmm/private/scrollbar_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/adjustment.h>
+
+#include <gtk/gtkscrollbar.h>
+#include <gtk/gtkhscrollbar.h>
+#include <gtk/gtkvscrollbar.h>
+
+namespace Gtk
+{
+
+VScrollbar::VScrollbar(Adjustment& adjustment)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Scrollbar(Glib::ConstructParams(vscrollbar_class_.init(), (char*) 0))
+{
+ set_adjustment(adjustment);
+}
+
+VScrollbar::VScrollbar()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Scrollbar(Glib::ConstructParams(vscrollbar_class_.init(), (char*) 0))
+{
+ Adjustment* adjustment = manage(new Adjustment(0.0, 0.0, 0.0, 0.0, 0.0, 0.0));
+
+ // The adjustment will be destroyed along with the object
+ set_adjustment(*adjustment);
+}
+
+
+HScrollbar::HScrollbar()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Scrollbar(Glib::ConstructParams(hscrollbar_class_.init(), (char*) 0))
+{
+ Adjustment* adjustment = manage(new Adjustment(0.0, 0.0, 0.0, 0.0, 0.0, 0.0));
+
+ // The adjustment will be destroyed along with the object
+ set_adjustment(*adjustment);
+}
+
+HScrollbar::HScrollbar(Adjustment& adjustment)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Scrollbar(Glib::ConstructParams(hscrollbar_class_.init(), (char*) 0))
+{
+ set_adjustment(adjustment);
+}
+
+} // namespace Gtk
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::Scrollbar* wrap(GtkScrollbar* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::Scrollbar *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Scrollbar_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Scrollbar_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_scrollbar_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Scrollbar_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* Scrollbar_Class::wrap_new(GObject* o)
+{
+ return manage(new Scrollbar((GtkScrollbar*)(o)));
+
+}
+
+
+/* The implementation: */
+
+Scrollbar::Scrollbar(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Range(construct_params)
+{
+ }
+
+Scrollbar::Scrollbar(GtkScrollbar* castitem)
+:
+ Gtk::Range((GtkRange*)(castitem))
+{
+ }
+
+Scrollbar::~Scrollbar()
+{
+ destroy_();
+}
+
+Scrollbar::CppClassType Scrollbar::scrollbar_class_; // initialize static member
+
+GType Scrollbar::get_type()
+{
+ return scrollbar_class_.init().get_type();
+}
+
+GType Scrollbar::get_base_type()
+{
+ return gtk_scrollbar_get_type();
+}
+
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+
+Gtk::VScrollbar* wrap(GtkVScrollbar* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::VScrollbar *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& VScrollbar_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &VScrollbar_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_vscrollbar_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void VScrollbar_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* VScrollbar_Class::wrap_new(GObject* o)
+{
+ return manage(new VScrollbar((GtkVScrollbar*)(o)));
+
+}
+
+
+/* The implementation: */
+
+VScrollbar::VScrollbar(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Scrollbar(construct_params)
+{
+ }
+
+VScrollbar::VScrollbar(GtkVScrollbar* castitem)
+:
+ Gtk::Scrollbar((GtkScrollbar*)(castitem))
+{
+ }
+
+VScrollbar::~VScrollbar()
+{
+ destroy_();
+}
+
+VScrollbar::CppClassType VScrollbar::vscrollbar_class_; // initialize static member
+
+GType VScrollbar::get_type()
+{
+ return vscrollbar_class_.init().get_type();
+}
+
+GType VScrollbar::get_base_type()
+{
+ return gtk_vscrollbar_get_type();
+}
+
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+
+Gtk::HScrollbar* wrap(GtkHScrollbar* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::HScrollbar *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& HScrollbar_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &HScrollbar_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_hscrollbar_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void HScrollbar_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* HScrollbar_Class::wrap_new(GObject* o)
+{
+ return manage(new HScrollbar((GtkHScrollbar*)(o)));
+
+}
+
+
+/* The implementation: */
+
+HScrollbar::HScrollbar(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Scrollbar(construct_params)
+{
+ }
+
+HScrollbar::HScrollbar(GtkHScrollbar* castitem)
+:
+ Gtk::Scrollbar((GtkScrollbar*)(castitem))
+{
+ }
+
+HScrollbar::~HScrollbar()
+{
+ destroy_();
+}
+
+HScrollbar::CppClassType HScrollbar::hscrollbar_class_; // initialize static member
+
+GType HScrollbar::get_type()
+{
+ return hscrollbar_class_.init().get_type();
+}
+
+GType HScrollbar::get_base_type()
+{
+ return gtk_hscrollbar_get_type();
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/scrollbar.h b/libs/gtkmm2/gtk/gtkmm/scrollbar.h
new file mode 100644
index 0000000000..36c7d1b8f8
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/scrollbar.h
@@ -0,0 +1,307 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_SCROLLBAR_H
+#define _GTKMM_SCROLLBAR_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* scrollbar.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/range.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkScrollbar GtkScrollbar;
+typedef struct _GtkScrollbarClass GtkScrollbarClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class Scrollbar_Class; } // namespace Gtk
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkVScrollbar GtkVScrollbar;
+typedef struct _GtkVScrollbarClass GtkVScrollbarClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class VScrollbar_Class; } // namespace Gtk
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkHScrollbar GtkHScrollbar;
+typedef struct _GtkHScrollbarClass GtkHScrollbarClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class HScrollbar_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/**
+ * The Gtk::Scrollbar widget is an abstract base class for Gtk::HScrollbar
+ * and Gtk::VScrollbar. It is not very useful in itself.
+ *
+ * The position of the thumb in a scrollbar is controlled by the scroll
+ * adjustments. See Gtk::Adjustment for the fields in an adjustment - for
+ * Gtk::Scrollbar, the "value" field represents the position of the scrollbar,
+ * which must be between the "lower" field and "upper - page_size." The
+ * "page_size" field represents the size of the visible scrollable area. The
+ * "step_increment" and "page_increment" fields are used when the user asks
+ * to step down (using the small stepper arrows) or page down (using for
+ * example the PageDown key).
+ *
+ * @ingroup Widgets
+ */
+
+class Scrollbar : public Range
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Scrollbar CppObjectType;
+ typedef Scrollbar_Class CppClassType;
+ typedef GtkScrollbar BaseObjectType;
+ typedef GtkScrollbarClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~Scrollbar();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class Scrollbar_Class;
+ static CppClassType scrollbar_class_;
+
+ // noncopyable
+ Scrollbar(const Scrollbar&);
+ Scrollbar& operator=(const Scrollbar&);
+
+protected:
+ explicit Scrollbar(const Glib::ConstructParams& construct_params);
+ explicit Scrollbar(GtkScrollbar* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkScrollbar* gobj() { return reinterpret_cast<GtkScrollbar*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkScrollbar* gobj() const { return reinterpret_cast<GtkScrollbar*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+
+protected:
+
+
+};
+
+/** A vertical scrollbar.
+ *
+ * The Gtk::VScrollbar widget is a widget arranged vertically creating a
+ * scrollbar. See Gtk::Scrollbar for details on scrollbars.
+ *
+ * A Gtk::Adjustment may may be passed to the constructor to handle the
+ * adjustment of the scrollbar. If not specified, one will be created for
+ * you. See Gtk::Adjustment for details.
+ *
+ * @ingroup Widgets
+ */
+
+class VScrollbar : public Scrollbar
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef VScrollbar CppObjectType;
+ typedef VScrollbar_Class CppClassType;
+ typedef GtkVScrollbar BaseObjectType;
+ typedef GtkVScrollbarClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~VScrollbar();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class VScrollbar_Class;
+ static CppClassType vscrollbar_class_;
+
+ // noncopyable
+ VScrollbar(const VScrollbar&);
+ VScrollbar& operator=(const VScrollbar&);
+
+protected:
+ explicit VScrollbar(const Glib::ConstructParams& construct_params);
+ explicit VScrollbar(GtkVScrollbar* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkVScrollbar* gobj() { return reinterpret_cast<GtkVScrollbar*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkVScrollbar* gobj() const { return reinterpret_cast<GtkVScrollbar*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+public:
+ VScrollbar();
+ explicit VScrollbar(Adjustment& gtkadjustment);
+
+
+};
+
+/** A horizontal scrollbar.
+ *
+ * The Gtk::HScrollbar widget is a widget arranged horizontally creating a
+ * scrollbar. See Gtk::Scrollbar for details on scrollbars.
+ *
+ * A Gtk::Adjustment may may be passed to the constructor to handle the
+ * adjustment of the scrollbar. If not specified, one will be created for
+ * you. See Gtk::Adjustment for details.
+ *
+ * @ingroup Widgets
+ */
+
+class HScrollbar : public Scrollbar
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef HScrollbar CppObjectType;
+ typedef HScrollbar_Class CppClassType;
+ typedef GtkHScrollbar BaseObjectType;
+ typedef GtkHScrollbarClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~HScrollbar();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class HScrollbar_Class;
+ static CppClassType hscrollbar_class_;
+
+ // noncopyable
+ HScrollbar(const HScrollbar&);
+ HScrollbar& operator=(const HScrollbar&);
+
+protected:
+ explicit HScrollbar(const Glib::ConstructParams& construct_params);
+ explicit HScrollbar(GtkHScrollbar* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkHScrollbar* gobj() { return reinterpret_cast<GtkHScrollbar*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkHScrollbar* gobj() const { return reinterpret_cast<GtkHScrollbar*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+public:
+ HScrollbar();
+ explicit HScrollbar(Adjustment& gtkadjustment);
+
+
+};
+
+
+} /* namespace Gtk */
+
+
+namespace Glib
+{
+ /** @relates Gtk::Scrollbar
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::Scrollbar* wrap(GtkScrollbar* object, bool take_copy = false);
+}
+namespace Glib
+{
+ /** @relates Gtk::VScrollbar
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::VScrollbar* wrap(GtkVScrollbar* object, bool take_copy = false);
+}
+namespace Glib
+{
+ /** @relates Gtk::HScrollbar
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::HScrollbar* wrap(GtkHScrollbar* object, bool take_copy = false);
+}
+#endif /* _GTKMM_SCROLLBAR_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/scrolledwindow.cc b/libs/gtkmm2/gtk/gtkmm/scrolledwindow.cc
new file mode 100644
index 0000000000..aa297a6daa
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/scrolledwindow.cc
@@ -0,0 +1,323 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/scrolledwindow.h>
+#include <gtkmm/private/scrolledwindow_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/scrollbar.h>
+#include <gtkmm/viewport.h>
+#include <gtkmm/adjustment.h>
+#include <gtk/gtkscrolledwindow.h>
+
+
+namespace Gtk
+{
+
+void ScrolledWindow::add(Gtk::Widget& widget)
+{
+ GtkWidget* gwidget = widget.gobj();
+
+ //This check is courtesy of James Henstridge on gtk-devel-list@gnome.org.
+ if( GTK_WIDGET_GET_CLASS(gwidget)->set_scroll_adjustments_signal == 0)
+ {
+ //It doesn't have native scrolling capability, so it should be put inside a viewport first:
+ gtk_scrolled_window_add_with_viewport(gobj(), gwidget);
+ }
+ else
+ {
+ //It can work directly with a GtkScrolledWindow, so just use the Container::add():
+ Bin::add(widget);
+ }
+}
+
+} //namespace Gtk
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::ScrolledWindow* wrap(GtkScrolledWindow* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::ScrolledWindow *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& ScrolledWindow_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &ScrolledWindow_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_scrolled_window_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void ScrolledWindow_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* ScrolledWindow_Class::wrap_new(GObject* o)
+{
+ return manage(new ScrolledWindow((GtkScrolledWindow*)(o)));
+
+}
+
+
+/* The implementation: */
+
+ScrolledWindow::ScrolledWindow(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Bin(construct_params)
+{
+ }
+
+ScrolledWindow::ScrolledWindow(GtkScrolledWindow* castitem)
+:
+ Gtk::Bin((GtkBin*)(castitem))
+{
+ }
+
+ScrolledWindow::~ScrolledWindow()
+{
+ destroy_();
+}
+
+ScrolledWindow::CppClassType ScrolledWindow::scrolledwindow_class_; // initialize static member
+
+GType ScrolledWindow::get_type()
+{
+ return scrolledwindow_class_.init().get_type();
+}
+
+GType ScrolledWindow::get_base_type()
+{
+ return gtk_scrolled_window_get_type();
+}
+
+
+ScrolledWindow::ScrolledWindow()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Bin(Glib::ConstructParams(scrolledwindow_class_.init()))
+{
+ }
+
+ScrolledWindow::ScrolledWindow(Adjustment& hadjustment, Adjustment& vadjustment)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Bin(Glib::ConstructParams(scrolledwindow_class_.init(), "hadjustment", (hadjustment).gobj(), "vadjustment", (vadjustment).gobj(), (char*) 0))
+{
+ }
+
+void ScrolledWindow::set_hadjustment(Gtk::Adjustment* hadjustment)
+{
+ gtk_scrolled_window_set_hadjustment(gobj(), (GtkAdjustment*)Glib::unwrap(hadjustment));
+}
+
+void ScrolledWindow::set_vadjustment(Gtk::Adjustment* vadjustment)
+{
+ gtk_scrolled_window_set_vadjustment(gobj(), (GtkAdjustment*)Glib::unwrap(vadjustment));
+}
+
+void ScrolledWindow::set_hadjustment(Gtk::Adjustment& hadjustment)
+{
+ gtk_scrolled_window_set_hadjustment(gobj(), (hadjustment).gobj());
+}
+
+void ScrolledWindow::set_vadjustment(Gtk::Adjustment& vadjustment)
+{
+ gtk_scrolled_window_set_vadjustment(gobj(), (vadjustment).gobj());
+}
+
+Gtk::Adjustment* ScrolledWindow::get_hadjustment()
+{
+ return Glib::wrap(gtk_scrolled_window_get_hadjustment(gobj()));
+}
+
+const Gtk::Adjustment* ScrolledWindow::get_hadjustment() const
+{
+ return Glib::wrap(gtk_scrolled_window_get_hadjustment(const_cast<GtkScrolledWindow*>(gobj())));
+}
+
+Gtk::Adjustment* ScrolledWindow::get_vadjustment()
+{
+ return Glib::wrap(gtk_scrolled_window_get_vadjustment(gobj()));
+}
+
+const Gtk::Adjustment* ScrolledWindow::get_vadjustment() const
+{
+ return Glib::wrap(gtk_scrolled_window_get_vadjustment(const_cast<GtkScrolledWindow*>(gobj())));
+}
+
+void ScrolledWindow::set_policy(PolicyType hscrollbar_policy, PolicyType vscrollbar_policy)
+{
+ gtk_scrolled_window_set_policy(gobj(), ((GtkPolicyType)(hscrollbar_policy)), ((GtkPolicyType)(vscrollbar_policy)));
+}
+
+void ScrolledWindow::get_policy(PolicyType& hscrollbar_policy, PolicyType& vscrollbar_policy) const
+{
+ gtk_scrolled_window_get_policy(const_cast<GtkScrolledWindow*>(gobj()), ((GtkPolicyType*) &(hscrollbar_policy)), ((GtkPolicyType*) &(vscrollbar_policy)));
+}
+
+void ScrolledWindow::set_placement(CornerType window_placement)
+{
+ gtk_scrolled_window_set_placement(gobj(), ((GtkCornerType)(window_placement)));
+}
+
+CornerType ScrolledWindow::get_placement() const
+{
+ return ((CornerType)(gtk_scrolled_window_get_placement(const_cast<GtkScrolledWindow*>(gobj()))));
+}
+
+void ScrolledWindow::set_shadow_type(ShadowType type)
+{
+ gtk_scrolled_window_set_shadow_type(gobj(), ((GtkShadowType)(type)));
+}
+
+ShadowType ScrolledWindow::get_shadow_type() const
+{
+ return ((ShadowType)(gtk_scrolled_window_get_shadow_type(const_cast<GtkScrolledWindow*>(gobj()))));
+}
+
+bool ScrolledWindow::get_vscrollbar_visible() const
+{
+ return gobj()->hscrollbar_visible;
+}
+
+bool ScrolledWindow::get_hscrollbar_visible() const
+{
+ return gobj()->vscrollbar_visible;
+}
+
+Gtk::HScrollbar* ScrolledWindow::get_hscrollbar()
+{
+ return Glib::wrap((GtkHScrollbar*)(gobj()->hscrollbar));
+}
+
+const Gtk::HScrollbar* ScrolledWindow::get_hscrollbar() const
+{
+ return Glib::wrap((GtkHScrollbar*)(gobj()->hscrollbar));
+}
+
+Gtk::VScrollbar* ScrolledWindow::get_vscrollbar()
+{
+ return Glib::wrap((GtkVScrollbar*)(gobj()->vscrollbar));
+}
+
+const Gtk::VScrollbar* ScrolledWindow::get_vscrollbar() const
+{
+ return Glib::wrap((GtkVScrollbar*)(gobj()->vscrollbar));
+}
+
+
+Glib::PropertyProxy<Gtk::Adjustment*> ScrolledWindow::property_hadjustment()
+{
+ return Glib::PropertyProxy<Gtk::Adjustment*>(this, "hadjustment");
+}
+
+Glib::PropertyProxy_ReadOnly<Gtk::Adjustment*> ScrolledWindow::property_hadjustment() const
+{
+ return Glib::PropertyProxy_ReadOnly<Gtk::Adjustment*>(this, "hadjustment");
+}
+
+Glib::PropertyProxy<Gtk::Adjustment*> ScrolledWindow::property_vadjustment()
+{
+ return Glib::PropertyProxy<Gtk::Adjustment*>(this, "vadjustment");
+}
+
+Glib::PropertyProxy_ReadOnly<Gtk::Adjustment*> ScrolledWindow::property_vadjustment() const
+{
+ return Glib::PropertyProxy_ReadOnly<Gtk::Adjustment*>(this, "vadjustment");
+}
+
+Glib::PropertyProxy<PolicyType> ScrolledWindow::property_hscrollbar_policy()
+{
+ return Glib::PropertyProxy<PolicyType>(this, "hscrollbar-policy");
+}
+
+Glib::PropertyProxy_ReadOnly<PolicyType> ScrolledWindow::property_hscrollbar_policy() const
+{
+ return Glib::PropertyProxy_ReadOnly<PolicyType>(this, "hscrollbar-policy");
+}
+
+Glib::PropertyProxy<PolicyType> ScrolledWindow::property_vscrollbar_policy()
+{
+ return Glib::PropertyProxy<PolicyType>(this, "vscrollbar-policy");
+}
+
+Glib::PropertyProxy_ReadOnly<PolicyType> ScrolledWindow::property_vscrollbar_policy() const
+{
+ return Glib::PropertyProxy_ReadOnly<PolicyType>(this, "vscrollbar-policy");
+}
+
+Glib::PropertyProxy<CornerType> ScrolledWindow::property_window_placement()
+{
+ return Glib::PropertyProxy<CornerType>(this, "window-placement");
+}
+
+Glib::PropertyProxy_ReadOnly<CornerType> ScrolledWindow::property_window_placement() const
+{
+ return Glib::PropertyProxy_ReadOnly<CornerType>(this, "window-placement");
+}
+
+Glib::PropertyProxy<ShadowType> ScrolledWindow::property_shadow_type()
+{
+ return Glib::PropertyProxy<ShadowType>(this, "shadow-type");
+}
+
+Glib::PropertyProxy_ReadOnly<ShadowType> ScrolledWindow::property_shadow_type() const
+{
+ return Glib::PropertyProxy_ReadOnly<ShadowType>(this, "shadow-type");
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/scrolledwindow.h b/libs/gtkmm2/gtk/gtkmm/scrolledwindow.h
new file mode 100644
index 0000000000..8bb8c66230
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/scrolledwindow.h
@@ -0,0 +1,298 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_SCROLLEDWINDOW_H
+#define _GTKMM_SCROLLEDWINDOW_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* scrolledwindow.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/bin.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkScrolledWindow GtkScrolledWindow;
+typedef struct _GtkScrolledWindowClass GtkScrolledWindowClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class ScrolledWindow_Class; } // namespace Gtk
+namespace Gtk
+{
+
+class Adjustment;
+class HScrollbar;
+class VScrollbar;
+
+/** Adds scrollbars to its child widget.
+ *
+ * This container accepts a single child widget. It adds scrollbars to the child widget and optionally draws a beveled frame around the child widget.
+ * The scrolled window can work in two ways:
+ * 1) Some widgets have native scrolling support; these widgets handle certain Gtk::Adjustment signals. Widgets with native scroll support include Gtk::TreeView, Gtk::TextView, and Gtk::Layout.
+ * 2) For widgets that lack native scrolling support, such as Gtk::Table, Gtk::Box, and so on, the widget will be placed inside a Gtk::Viewport.
+ *
+ * The position of the scrollbars is controlled by the scroll adjustments. See Gtk::Adjustment for the fields in an adjustment - for Gtk::Scrollbar, used by Gtk::ScrolledWindow,
+ * the "value" field represents the position of the scrollbar, which must be between the "lower" field and "upper - page_size."
+ * The "page_size" field represents the size of the visible scrollable area.
+ * The "step_increment" and "page_increment" fields are used when the user asks to step down (using the small stepper arrows) or page down (using for example the PageDown key).
+ *
+ * If a Gtk::ScrolledWindow doesn't behave quite as you would like, or doesn't have exactly the right layout, it's very possible to set up your own scrolling with Gtk::Scrollbar and, for example, a Gtk::Table.
+ *
+ * @ingroup Widgets
+ * @ingroup Containers
+ */
+
+class ScrolledWindow : public Bin
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef ScrolledWindow CppObjectType;
+ typedef ScrolledWindow_Class CppClassType;
+ typedef GtkScrolledWindow BaseObjectType;
+ typedef GtkScrolledWindowClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~ScrolledWindow();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class ScrolledWindow_Class;
+ static CppClassType scrolledwindow_class_;
+
+ // noncopyable
+ ScrolledWindow(const ScrolledWindow&);
+ ScrolledWindow& operator=(const ScrolledWindow&);
+
+protected:
+ explicit ScrolledWindow(const Glib::ConstructParams& construct_params);
+ explicit ScrolledWindow(GtkScrolledWindow* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkScrolledWindow* gobj() { return reinterpret_cast<GtkScrolledWindow*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkScrolledWindow* gobj() const { return reinterpret_cast<GtkScrolledWindow*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+
+public:
+ ScrolledWindow();
+ explicit ScrolledWindow(Adjustment& hadjustment, Adjustment& vadjustment);
+
+
+ void set_hadjustment(Gtk::Adjustment* hadjustment = 0);
+
+ void set_vadjustment(Gtk::Adjustment* vadjustment = 0);
+
+ void set_hadjustment(Gtk::Adjustment& hadjustment);
+
+ void set_vadjustment(Gtk::Adjustment& vadjustment);
+
+
+ Gtk::Adjustment* get_hadjustment();
+
+ const Gtk::Adjustment* get_hadjustment() const;
+
+ Gtk::Adjustment* get_vadjustment();
+
+ const Gtk::Adjustment* get_vadjustment() const;
+
+
+ void set_policy(PolicyType hscrollbar_policy, PolicyType vscrollbar_policy);
+
+ /** Retrieves the current policy values for the horizontal and vertical
+ * scrollbars. See set_policy().
+ * @param hscrollbar_policy Location to store the policy for the horizontal scrollbar, or <tt>0</tt>.
+ * @param vscrollbar_policy Location to store the policy for the horizontal scrollbar, or <tt>0</tt>.
+ */
+ void get_policy(PolicyType& hscrollbar_policy, PolicyType& vscrollbar_policy) const;
+
+
+ void set_placement(CornerType window_placement);
+
+ /** Gets the placement of the scrollbars for the scrolled window. See
+ * set_placement().
+ * @return The current placement value.
+ */
+ CornerType get_placement() const;
+
+
+ /** Changes the type of shadow drawn around the contents of
+ * @a scrolled_window .
+ * @param type Kind of shadow to draw around scrolled window contents.
+ */
+ void set_shadow_type(ShadowType type);
+
+ /** Gets the shadow type of the scrolled window. See
+ * set_shadow_type().
+ * @return The current shadow type.
+ */
+ ShadowType get_shadow_type() const;
+
+ ///Puts the child inside a Gtk::Viewport if it doesn't have native scrolling capability.
+ virtual void add(Gtk::Widget& widget);
+
+
+ bool get_vscrollbar_visible() const;
+ bool get_hscrollbar_visible() const;
+ Gtk::HScrollbar* get_hscrollbar();
+ const Gtk::HScrollbar* get_hscrollbar() const;
+ Gtk::VScrollbar* get_vscrollbar();
+ const Gtk::VScrollbar* get_vscrollbar() const;
+
+ //Keybinding signals:
+
+
+ /** The GtkAdjustment for the horizontal position.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Gtk::Adjustment*> property_hadjustment() ;
+
+/** The GtkAdjustment for the horizontal position.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Gtk::Adjustment*> property_hadjustment() const;
+
+ /** The GtkAdjustment for the vertical position.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Gtk::Adjustment*> property_vadjustment() ;
+
+/** The GtkAdjustment for the vertical position.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Gtk::Adjustment*> property_vadjustment() const;
+
+ /** When the horizontal scrollbar is displayed.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<PolicyType> property_hscrollbar_policy() ;
+
+/** When the horizontal scrollbar is displayed.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<PolicyType> property_hscrollbar_policy() const;
+
+ /** When the vertical scrollbar is displayed.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<PolicyType> property_vscrollbar_policy() ;
+
+/** When the vertical scrollbar is displayed.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<PolicyType> property_vscrollbar_policy() const;
+
+ /** Where the contents are located with respect to the scrollbars.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<CornerType> property_window_placement() ;
+
+/** Where the contents are located with respect to the scrollbars.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<CornerType> property_window_placement() const;
+
+ /** Style of bevel around the contents.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<ShadowType> property_shadow_type() ;
+
+/** Style of bevel around the contents.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<ShadowType> property_shadow_type() const;
+
+
+};
+
+} /* namespace Gtk */
+
+
+namespace Glib
+{
+ /** @relates Gtk::ScrolledWindow
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::ScrolledWindow* wrap(GtkScrolledWindow* object, bool take_copy = false);
+}
+#endif /* _GTKMM_SCROLLEDWINDOW_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/selectiondata.cc b/libs/gtkmm2/gtk/gtkmm/selectiondata.cc
new file mode 100644
index 0000000000..4770c896fc
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/selectiondata.cc
@@ -0,0 +1,261 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/selectiondata.h>
+#include <gtkmm/private/selectiondata_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gdkmm/pixbuf.h>
+#include <glibmm/utility.h> //For ScopedPtr<>.
+#include <gtk/gtkselection.h>
+
+
+namespace Gtk
+{
+
+void SelectionData::set(const std::string& type, int format, const guint8* data, int length)
+{
+ gtk_selection_data_set(gobj(), gdk_atom_intern(type.c_str(), 0), format, data, length);
+}
+
+void SelectionData::set(int format, const guint8* data, int length)
+{
+ //The C examples do this - that's why I added this method overload. murrayc.
+ set(get_target(), format, data, length);
+}
+
+void SelectionData::set(const std::string& type, const std::string& data)
+{
+ gtk_selection_data_set(gobj(), gdk_atom_intern(type.c_str(), 0),
+ sizeof(char) * 8, // format is 8 bits per unit
+ reinterpret_cast<const guint8*>(data.data()), data.size());
+}
+
+bool SelectionData::set_text(const Glib::ustring& data)
+{
+ return gtk_selection_data_set_text(gobj(), data.data(), data.bytes());
+}
+
+Glib::ustring SelectionData::get_text() const
+{
+ return Glib::convert_return_gchar_ptr_to_ustring(
+ reinterpret_cast<char*>(gtk_selection_data_get_text(const_cast<GtkSelectionData*>(gobj()))));
+}
+
+std::string SelectionData::get_data_as_string() const
+{
+ if(gobj()->data && gobj()->length > 0)
+ return std::string(reinterpret_cast<char*>(gobj()->data), gobj()->length);
+ else
+ return std::string();
+}
+
+std::string SelectionData::get_target() const
+{
+ return Glib::convert_return_gchar_ptr_to_stdstring(
+ gdk_atom_name(const_cast<GtkSelectionData*>(gobj())->target));
+}
+
+Glib::StringArrayHandle SelectionData::get_targets() const
+{
+ GdkAtom* targets = 0;
+ int n_targets = 0;
+
+ if(!gtk_selection_data_get_targets(const_cast<GtkSelectionData*>(gobj()), &targets, &n_targets))
+ n_targets = 0; // it's set to -1 otherwise
+
+ //Build a C++ list containing the target names:
+ std::list<Glib::ustring> listTargets;
+ for(int i = 0; i < n_targets; n_targets++)
+ {
+ //Convert the atom to a string:
+ gchar* const atom_name = gdk_atom_name(targets[i]);
+
+ Glib::ustring target;
+ if(atom_name)
+ target = Glib::ScopedPtr<char>(atom_name).get(); //This frees the gchar*.
+
+ listTargets.push_back(target);
+ }
+
+ g_free(targets);
+
+ return listTargets;
+}
+
+std::string SelectionData::get_data_type() const
+{
+ return Glib::convert_return_gchar_ptr_to_stdstring(
+ gdk_atom_name(const_cast<GtkSelectionData*>(gobj())->type));
+}
+
+} // namespace Gtk
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::SelectionData wrap(GtkSelectionData* object, bool take_copy)
+{
+ return Gtk::SelectionData(object, take_copy);
+}
+
+} // namespace Glib
+
+
+namespace Gtk
+{
+
+
+// static
+GType SelectionData::get_type()
+{
+ return gtk_selection_data_get_type();
+}
+
+SelectionData::SelectionData()
+:
+ gobject_ (0) // Allows creation of invalid wrapper, e.g. for output arguments to methods.
+{}
+
+SelectionData::SelectionData(const SelectionData& other)
+:
+ gobject_ ((other.gobject_) ? gtk_selection_data_copy(other.gobject_) : 0)
+{}
+
+SelectionData::SelectionData(GtkSelectionData* gobject, bool make_a_copy)
+:
+ // For BoxedType wrappers, make_a_copy is true by default. The static
+ // BoxedType wrappers must always take a copy, thus make_a_copy = true
+ // ensures identical behaviour if the default argument is used.
+ gobject_ ((make_a_copy && gobject) ? gtk_selection_data_copy(gobject) : gobject)
+{}
+
+SelectionData& SelectionData::operator=(const SelectionData& other)
+{
+ SelectionData temp (other);
+ swap(temp);
+ return *this;
+}
+
+SelectionData::~SelectionData()
+{
+ if(gobject_)
+ gtk_selection_data_free(gobject_);
+}
+
+void SelectionData::swap(SelectionData& other)
+{
+ GtkSelectionData *const temp = gobject_;
+ gobject_ = other.gobject_;
+ other.gobject_ = temp;
+}
+
+GtkSelectionData* SelectionData::gobj_copy() const
+{
+ return gtk_selection_data_copy(gobject_);
+}
+
+
+bool SelectionData::set_pixbuf(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf)
+{
+ return gtk_selection_data_set_pixbuf(gobj(), Glib::unwrap(pixbuf));
+}
+
+Glib::RefPtr<Gdk::Pixbuf> SelectionData::get_pixbuf()
+{
+ return Glib::wrap(gtk_selection_data_get_pixbuf(gobj()));
+}
+
+Glib::RefPtr<const Gdk::Pixbuf> SelectionData::get_pixbuf() const
+{
+ return Glib::wrap(gtk_selection_data_get_pixbuf(const_cast<GtkSelectionData*>(gobj())));
+}
+
+bool SelectionData::set_uris(const Glib::StringArrayHandle& uris)
+{
+ return gtk_selection_data_set_uris(gobj(), const_cast<char**>((uris).data()));
+}
+
+Glib::StringArrayHandle SelectionData::get_uris() const
+{
+ return Glib::StringArrayHandle(gtk_selection_data_get_uris(const_cast<GtkSelectionData*>(gobj())));
+}
+
+const guint8* SelectionData::get_data() const
+{
+ return gobj()->data;
+}
+
+int SelectionData::get_length() const
+{
+ return gobj()->length;
+}
+
+GdkAtom SelectionData::get_selection() const
+{
+ return gobj()->selection;
+}
+
+int SelectionData::get_format() const
+{
+ return gobj()->format;
+}
+
+Glib::RefPtr<Gdk::Display> SelectionData::get_display()
+{
+ Glib::RefPtr<Gdk::Display> ref_ptr(Glib::wrap(gobj()->display));
+
+ if(ref_ptr)
+ ref_ptr->reference();
+
+ return ref_ptr;
+}
+
+Glib::RefPtr<const Gdk::Display> SelectionData::get_display() const
+{
+ Glib::RefPtr<const Gdk::Display> ref_ptr(Glib::wrap(gobj()->display));
+
+ if(ref_ptr)
+ ref_ptr->reference();
+
+ return ref_ptr;
+}
+
+bool SelectionData::targets_include_text() const
+{
+ return gtk_selection_data_targets_include_text(const_cast<GtkSelectionData*>(gobj()));
+}
+
+bool SelectionData::targets_include_image(bool writable) const
+{
+ return gtk_selection_data_targets_include_image(const_cast<GtkSelectionData*>(gobj()), static_cast<int>(writable));
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/selectiondata.h b/libs/gtkmm2/gtk/gtkmm/selectiondata.h
new file mode 100644
index 0000000000..b76bda790a
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/selectiondata.h
@@ -0,0 +1,253 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_SELECTIONDATA_H
+#define _GTKMM_SELECTIONDATA_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright(C) 2002 The gtkmm Development Team
+ *
+ * This library is free software, ) you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation, ) either
+ * version 2 of the License, or(at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY, ) without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library, ) if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#include <gdkmm/display.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C" { typedef struct _GtkSelectionData GtkSelectionData; }
+#endif
+
+namespace Gtk
+{
+
+class SelectionData
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef SelectionData CppObjectType;
+ typedef GtkSelectionData BaseObjectType;
+
+ static GType get_type() G_GNUC_CONST;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ SelectionData();
+
+ explicit SelectionData(GtkSelectionData* gobject, bool make_a_copy = true);
+
+ SelectionData(const SelectionData& other);
+ SelectionData& operator=(const SelectionData& other);
+
+ ~SelectionData();
+
+ void swap(SelectionData& other);
+
+ ///Provides access to the underlying C instance.
+ GtkSelectionData* gobj() { return gobject_; }
+
+ ///Provides access to the underlying C instance.
+ const GtkSelectionData* gobj() const { return gobject_; }
+
+ ///Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs.
+ GtkSelectionData* gobj_copy() const;
+
+protected:
+ GtkSelectionData* gobject_;
+
+private:
+
+
+public:
+
+ //TODO : document this. It's like the other set(), but it uses this SelectionData's target type.
+ //Why would you ever want to use any other type?
+ void set(int format, const guint8* data, int length);
+
+ /** Assign a memory block of raw data.
+ * Store new data into the Gtk::SelectionData object. Should _only_ by called
+ * from a selection handler callback. A 0-byte terminates the stored data.
+ * @param type The type of the selection.
+ * @param format The data format, i.e. the number of bits in a unit.
+ * @param data Pointer to the data (will be copied).
+ * @param length The length of the data block in bytes.
+ */
+ void set(const std::string& type, int format, const guint8* data, int length);
+
+ /** Assign a string of raw data.
+ * Store new data into the Gtk::SelectionData object. Should _only_ by called
+ * from a selection handler callback.
+ * @param type The type of the selection.
+ * @param data A string that contains the data (does not have to be text).
+ */
+ void set(const std::string& type, const std::string& data);
+
+
+ /** Assign UTF-8 encoded text.
+ * Sets the contents of the selection from a UTF-8 encoded string.
+ * The string is converted to the form determined by get_target().
+ * @param data A UTF-8 encoded string.
+ * @return <tt>true</tt> if the selection was successfully set,
+ * otherwise <tt>false</tt>.
+ */
+ bool set_text(const Glib::ustring& data);
+
+
+ /** Gets the contents of the selection data as a UTF-8 string.
+ * @return If the selection data contained a recognized text type and
+ * it could be converted to UTF-8, a string containing the converted text,
+ * otherwise an empty string.
+ */
+ Glib::ustring get_text() const;
+
+
+ /** Sets the contents of the selection from a Gdk::Pixbuf
+ * The pixbuf is converted to the form determined by
+ * @a selection_data -&gt;target.
+ * @param pixbuf A Gdk::Pixbuf.
+ * @return <tt>true</tt> if the selection was successfully set,
+ * otherwise <tt>false</tt>.
+ *
+ * Since: 2.6.
+ */
+ bool set_pixbuf(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf);
+
+ /** Gets the contents of the selection data as a Gdk::Pixbuf.
+ * @return If the selection data contained a recognized
+ * image type and it could be converted to a Gdk::Pixbuf, a
+ * newly allocated pixbuf is returned, otherwise <tt>0</tt>.
+ * If the result is non-<tt>0</tt> it must be freed with Glib::object_unref().
+ *
+ * Since: 2.6.
+ */
+ Glib::RefPtr<Gdk::Pixbuf> get_pixbuf();
+
+ /** Gets the contents of the selection data as a Gdk::Pixbuf.
+ * @return If the selection data contained a recognized
+ * image type and it could be converted to a Gdk::Pixbuf, a
+ * newly allocated pixbuf is returned, otherwise <tt>0</tt>.
+ * If the result is non-<tt>0</tt> it must be freed with Glib::object_unref().
+ *
+ * Since: 2.6.
+ */
+ Glib::RefPtr<const Gdk::Pixbuf> get_pixbuf() const;
+
+#
+
+
+ /** Sets the contents of the selection from a list of URIs.
+ * The string is converted to the form determined by
+ * @a selection_data -&gt;target.
+ * @param uris A <tt>0</tt>-terminated array of strings hilding URIs.
+ * @return <tt>true</tt> if the selection was successfully set,
+ * otherwise <tt>false</tt>.
+ *
+ * Since: 2.6.
+ */
+ bool set_uris(const Glib::StringArrayHandle& uris);
+
+ /** Gets the contents of the selection data as array of URIs.
+ * @return If the selection data contains a list of
+ * URIs, a newly allocated <tt>0</tt>-terminated string array
+ * containing the URIs, otherwise <tt>0</tt>. If the result is
+ * non-<tt>0</tt> it must be freed with Glib::strfreev().
+ *
+ * Since: 2.6.
+ */
+ Glib::StringArrayHandle get_uris() const;
+
+ const guint8* get_data() const;
+ int get_length() const;
+
+ std::string get_data_as_string() const;
+
+ std::string get_target() const;
+
+ /// See also Gtk::Clipboard::request_targets()
+ Glib::StringArrayHandle get_targets() const;
+
+
+ /** Returns the ID of the selection.
+ */
+ GdkAtom get_selection() const;
+
+ /** Returns the type of the data as set by SelectionData::set().
+ */
+ std::string get_data_type() const; // get_type() already exists
+
+ int get_format() const;
+ Glib::RefPtr<Gdk::Display> get_display();
+ Glib::RefPtr<const Gdk::Display> get_display() const;
+
+
+ /** Given a Gtk::SelectionData object holding a list of targets,
+ * determines if any of the targets in @a targets can be used to
+ * provide text.
+ * @return <tt>true</tt> if @a selection_data holds a list of targets,
+ * and a suitable target for text is included, otherwise <tt>false</tt>.
+ */
+ bool targets_include_text() const;
+
+ /** Given a Gtk::SelectionData object holding a list of targets,
+ * determines if any of the targets in @a targets can be used to
+ * provide a Gdk::Pixbuf.
+ * @param writable Whether to accept only targets for which GTK+ knows
+ * how to convert a pixbuf into the format.
+ * @return <tt>true</tt> if @a selection_data holds a list of targets,
+ * and a suitable target for images is included, otherwise <tt>false</tt>.
+ *
+ * Since: 2.6.
+ */
+ bool targets_include_image(bool writable = true) const;
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Gtk
+{
+
+/** @relates Gtk::SelectionData
+ * @param lhs The left-hand side
+ * @param rhs The right-hand side
+ */
+inline void swap(SelectionData& lhs, SelectionData& rhs)
+ { lhs.swap(rhs); }
+
+} // namespace Gtk
+
+namespace Glib
+{
+
+/** @relates Gtk::SelectionData
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+Gtk::SelectionData wrap(GtkSelectionData* object, bool take_copy = false);
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+template <>
+class Value<Gtk::SelectionData> : public Glib::Value_Boxed<Gtk::SelectionData>
+{};
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+} // namespace Glib
+
+#endif /* _GTKMM_SELECTIONDATA_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/selectiondata_private.cc b/libs/gtkmm2/gtk/gtkmm/selectiondata_private.cc
new file mode 100644
index 0000000000..3be6f7f413
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/selectiondata_private.cc
@@ -0,0 +1,40 @@
+// -*- c++ -*-
+
+/*
+ *
+ * Copyright 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/selectiondata_private.h>
+
+namespace Gtk
+{
+
+SelectionData_WithoutOwnership::SelectionData_WithoutOwnership(GtkSelectionData* gobject)
+: SelectionData(gobject, false /* take_copy */)
+{
+}
+
+SelectionData_WithoutOwnership::~SelectionData_WithoutOwnership()
+{
+ //Prevent the base class's destructor from free-ing the underlying gobject:
+ gobject_ = 0;
+}
+
+} //namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/selectiondata_private.h b/libs/gtkmm2/gtk/gtkmm/selectiondata_private.h
new file mode 100644
index 0000000000..b27c5481d1
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/selectiondata_private.h
@@ -0,0 +1,49 @@
+// -*- c++ -*-
+
+/* sectiondata_private.h
+ *
+ * Copyright(C) 2002 The gtkmm Development Team
+ *
+ * This library is free software, ) you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation, ) either
+ * version 2 of the License, or(at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY, ) without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library, ) if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef _GTKMM_SELECTIONDATA_PRIVATE_H
+#define _GTKMM_SELECTIONDATA_PRIVATE_H
+
+#include <gtkmm/selectiondata.h>
+
+
+namespace Gtk
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+/** This class allows GtkSelectionData to be manipulated via a C++ API, but doesn't take a copy
+ * or try to free the underlying instance in its destructor.
+ * So far it's only used by gtkmm internally.
+ */
+class SelectionData_WithoutOwnership : public SelectionData
+{
+public:
+ explicit SelectionData_WithoutOwnership(GtkSelectionData* gobject);
+ ~SelectionData_WithoutOwnership();
+};
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+} // namespace Gtk
+
+#endif /* _GTKMM_SELECTIONDATA_PRIVATE_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/separator.cc b/libs/gtkmm2/gtk/gtkmm/separator.cc
new file mode 100644
index 0000000000..8f2b72cba6
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/separator.cc
@@ -0,0 +1,317 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/separator.h>
+#include <gtkmm/private/separator_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkseparator.h>
+#include <gtk/gtkhseparator.h>
+#include <gtk/gtkvseparator.h>
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::Separator* wrap(GtkSeparator* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::Separator *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Separator_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Separator_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_separator_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Separator_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* Separator_Class::wrap_new(GObject* o)
+{
+ return manage(new Separator((GtkSeparator*)(o)));
+
+}
+
+
+/* The implementation: */
+
+Separator::Separator(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Widget(construct_params)
+{
+ }
+
+Separator::Separator(GtkSeparator* castitem)
+:
+ Gtk::Widget((GtkWidget*)(castitem))
+{
+ }
+
+Separator::~Separator()
+{
+ destroy_();
+}
+
+Separator::CppClassType Separator::separator_class_; // initialize static member
+
+GType Separator::get_type()
+{
+ return separator_class_.init().get_type();
+}
+
+GType Separator::get_base_type()
+{
+ return gtk_separator_get_type();
+}
+
+
+Separator::Separator()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Widget(Glib::ConstructParams(separator_class_.init()))
+{
+ }
+
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+
+Gtk::VSeparator* wrap(GtkVSeparator* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::VSeparator *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& VSeparator_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &VSeparator_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_vseparator_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void VSeparator_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* VSeparator_Class::wrap_new(GObject* o)
+{
+ return manage(new VSeparator((GtkVSeparator*)(o)));
+
+}
+
+
+/* The implementation: */
+
+VSeparator::VSeparator(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Separator(construct_params)
+{
+ }
+
+VSeparator::VSeparator(GtkVSeparator* castitem)
+:
+ Gtk::Separator((GtkSeparator*)(castitem))
+{
+ }
+
+VSeparator::~VSeparator()
+{
+ destroy_();
+}
+
+VSeparator::CppClassType VSeparator::vseparator_class_; // initialize static member
+
+GType VSeparator::get_type()
+{
+ return vseparator_class_.init().get_type();
+}
+
+GType VSeparator::get_base_type()
+{
+ return gtk_vseparator_get_type();
+}
+
+VSeparator::VSeparator()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Separator(Glib::ConstructParams(vseparator_class_.init()))
+{
+ }
+
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+
+Gtk::HSeparator* wrap(GtkHSeparator* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::HSeparator *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& HSeparator_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &HSeparator_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_hseparator_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void HSeparator_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* HSeparator_Class::wrap_new(GObject* o)
+{
+ return manage(new HSeparator((GtkHSeparator*)(o)));
+
+}
+
+
+/* The implementation: */
+
+HSeparator::HSeparator(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Separator(construct_params)
+{
+ }
+
+HSeparator::HSeparator(GtkHSeparator* castitem)
+:
+ Gtk::Separator((GtkSeparator*)(castitem))
+{
+ }
+
+HSeparator::~HSeparator()
+{
+ destroy_();
+}
+
+HSeparator::CppClassType HSeparator::hseparator_class_; // initialize static member
+
+GType HSeparator::get_type()
+{
+ return hseparator_class_.init().get_type();
+}
+
+GType HSeparator::get_base_type()
+{
+ return gtk_hseparator_get_type();
+}
+
+HSeparator::HSeparator()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Separator(Glib::ConstructParams(hseparator_class_.init()))
+{
+ }
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/separator.h b/libs/gtkmm2/gtk/gtkmm/separator.h
new file mode 100644
index 0000000000..914fe80308
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/separator.h
@@ -0,0 +1,286 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_SEPARATOR_H
+#define _GTKMM_SEPARATOR_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* separator.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/widget.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkSeparator GtkSeparator;
+typedef struct _GtkSeparatorClass GtkSeparatorClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class Separator_Class; } // namespace Gtk
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkVSeparator GtkVSeparator;
+typedef struct _GtkVSeparatorClass GtkVSeparatorClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class VSeparator_Class; } // namespace Gtk
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkHSeparator GtkHSeparator;
+typedef struct _GtkHSeparatorClass GtkHSeparatorClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class HSeparator_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** Separator base class.
+ * Abstract base class for Gtk::VSeperator and Gtk::HSeperator.
+ */
+
+class Separator : public Widget
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Separator CppObjectType;
+ typedef Separator_Class CppClassType;
+ typedef GtkSeparator BaseObjectType;
+ typedef GtkSeparatorClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~Separator();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class Separator_Class;
+ static CppClassType separator_class_;
+
+ // noncopyable
+ Separator(const Separator&);
+ Separator& operator=(const Separator&);
+
+protected:
+ explicit Separator(const Glib::ConstructParams& construct_params);
+ explicit Separator(GtkSeparator* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkSeparator* gobj() { return reinterpret_cast<GtkSeparator*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkSeparator* gobj() const { return reinterpret_cast<GtkSeparator*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+public:
+
+
+protected:
+ Separator();
+
+
+};
+
+/** Vertical line widget.
+ * Filler widget used to separate widgets with a visible line.
+ * This widget has no window and receives no configuration events.
+ * It should be considered a leaf widget.
+ * @ingroup Widgets
+ */
+
+class VSeparator : public Separator
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef VSeparator CppObjectType;
+ typedef VSeparator_Class CppClassType;
+ typedef GtkVSeparator BaseObjectType;
+ typedef GtkVSeparatorClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~VSeparator();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class VSeparator_Class;
+ static CppClassType vseparator_class_;
+
+ // noncopyable
+ VSeparator(const VSeparator&);
+ VSeparator& operator=(const VSeparator&);
+
+protected:
+ explicit VSeparator(const Glib::ConstructParams& construct_params);
+ explicit VSeparator(GtkVSeparator* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkVSeparator* gobj() { return reinterpret_cast<GtkVSeparator*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkVSeparator* gobj() const { return reinterpret_cast<GtkVSeparator*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+public:
+ VSeparator();
+
+
+};
+
+
+/** Horizontal line widget.
+ * Filler widget used to separate widgets with a visible line.
+ * This widget has no window and receives no configuration events.
+ * It should be considered a leaf widget.
+ * @ingroup Widgets
+ */
+
+class HSeparator : public Separator
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef HSeparator CppObjectType;
+ typedef HSeparator_Class CppClassType;
+ typedef GtkHSeparator BaseObjectType;
+ typedef GtkHSeparatorClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~HSeparator();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class HSeparator_Class;
+ static CppClassType hseparator_class_;
+
+ // noncopyable
+ HSeparator(const HSeparator&);
+ HSeparator& operator=(const HSeparator&);
+
+protected:
+ explicit HSeparator(const Glib::ConstructParams& construct_params);
+ explicit HSeparator(GtkHSeparator* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkHSeparator* gobj() { return reinterpret_cast<GtkHSeparator*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkHSeparator* gobj() const { return reinterpret_cast<GtkHSeparator*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+public:
+ HSeparator();
+
+
+};
+
+} /* namespace Gtk */
+
+
+namespace Glib
+{
+ /** @relates Gtk::Separator
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::Separator* wrap(GtkSeparator* object, bool take_copy = false);
+}
+namespace Glib
+{
+ /** @relates Gtk::VSeparator
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::VSeparator* wrap(GtkVSeparator* object, bool take_copy = false);
+}
+namespace Glib
+{
+ /** @relates Gtk::HSeparator
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::HSeparator* wrap(GtkHSeparator* object, bool take_copy = false);
+}
+#endif /* _GTKMM_SEPARATOR_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/separatormenuitem.cc b/libs/gtkmm2/gtk/gtkmm/separatormenuitem.cc
new file mode 100644
index 0000000000..1b06d797c6
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/separatormenuitem.cc
@@ -0,0 +1,129 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/separatormenuitem.h>
+#include <gtkmm/private/separatormenuitem_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkseparatormenuitem.h>
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::SeparatorMenuItem* wrap(GtkSeparatorMenuItem* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::SeparatorMenuItem *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& SeparatorMenuItem_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &SeparatorMenuItem_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_separator_menu_item_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void SeparatorMenuItem_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* SeparatorMenuItem_Class::wrap_new(GObject* o)
+{
+ return manage(new SeparatorMenuItem((GtkSeparatorMenuItem*)(o)));
+
+}
+
+
+/* The implementation: */
+
+SeparatorMenuItem::SeparatorMenuItem(const Glib::ConstructParams& construct_params)
+:
+ Gtk::MenuItem(construct_params)
+{
+ }
+
+SeparatorMenuItem::SeparatorMenuItem(GtkSeparatorMenuItem* castitem)
+:
+ Gtk::MenuItem((GtkMenuItem*)(castitem))
+{
+ }
+
+SeparatorMenuItem::~SeparatorMenuItem()
+{
+ destroy_();
+}
+
+SeparatorMenuItem::CppClassType SeparatorMenuItem::separatormenuitem_class_; // initialize static member
+
+GType SeparatorMenuItem::get_type()
+{
+ return separatormenuitem_class_.init().get_type();
+}
+
+GType SeparatorMenuItem::get_base_type()
+{
+ return gtk_separator_menu_item_get_type();
+}
+
+
+SeparatorMenuItem::SeparatorMenuItem()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::MenuItem(Glib::ConstructParams(separatormenuitem_class_.init()))
+{
+ }
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/separatormenuitem.h b/libs/gtkmm2/gtk/gtkmm/separatormenuitem.h
new file mode 100644
index 0000000000..614bb98d78
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/separatormenuitem.h
@@ -0,0 +1,121 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_SEPARATORMENUITEM_H
+#define _GTKMM_SEPARATORMENUITEM_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+
+/* separator.h
+ *
+ * Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/menuitem.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkSeparatorMenuItem GtkSeparatorMenuItem;
+typedef struct _GtkSeparatorMenuItemClass GtkSeparatorMenuItemClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class SeparatorMenuItem_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** A separator used to group items within a menu.
+ * It displays a horizontal line with a shadow to make it appear sunken into the interface.
+ * @ingroup Widgets
+ * @ingroup Menus
+ */
+
+class SeparatorMenuItem : public MenuItem
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef SeparatorMenuItem CppObjectType;
+ typedef SeparatorMenuItem_Class CppClassType;
+ typedef GtkSeparatorMenuItem BaseObjectType;
+ typedef GtkSeparatorMenuItemClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~SeparatorMenuItem();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class SeparatorMenuItem_Class;
+ static CppClassType separatormenuitem_class_;
+
+ // noncopyable
+ SeparatorMenuItem(const SeparatorMenuItem&);
+ SeparatorMenuItem& operator=(const SeparatorMenuItem&);
+
+protected:
+ explicit SeparatorMenuItem(const Glib::ConstructParams& construct_params);
+ explicit SeparatorMenuItem(GtkSeparatorMenuItem* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkSeparatorMenuItem* gobj() { return reinterpret_cast<GtkSeparatorMenuItem*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkSeparatorMenuItem* gobj() const { return reinterpret_cast<GtkSeparatorMenuItem*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+public:
+ SeparatorMenuItem();
+
+
+};
+
+} /* namespace Gtk */
+
+
+namespace Glib
+{
+ /** @relates Gtk::SeparatorMenuItem
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::SeparatorMenuItem* wrap(GtkSeparatorMenuItem* object, bool take_copy = false);
+}
+#endif /* _GTKMM_SEPARATORMENUITEM_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/separatortoolitem.cc b/libs/gtkmm2/gtk/gtkmm/separatortoolitem.cc
new file mode 100644
index 0000000000..4949789d2e
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/separatortoolitem.cc
@@ -0,0 +1,134 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/separatortoolitem.h>
+#include <gtkmm/private/separatortoolitem_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkseparatortoolitem.h>
+
+namespace Gtk
+{
+
+} // namespace Gtk
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::SeparatorToolItem* wrap(GtkSeparatorToolItem* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::SeparatorToolItem *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& SeparatorToolItem_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &SeparatorToolItem_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_separator_tool_item_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void SeparatorToolItem_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* SeparatorToolItem_Class::wrap_new(GObject* o)
+{
+ return manage(new SeparatorToolItem((GtkSeparatorToolItem*)(o)));
+
+}
+
+
+/* The implementation: */
+
+SeparatorToolItem::SeparatorToolItem(const Glib::ConstructParams& construct_params)
+:
+ Gtk::ToolItem(construct_params)
+{
+ }
+
+SeparatorToolItem::SeparatorToolItem(GtkSeparatorToolItem* castitem)
+:
+ Gtk::ToolItem((GtkToolItem*)(castitem))
+{
+ }
+
+SeparatorToolItem::~SeparatorToolItem()
+{
+ destroy_();
+}
+
+SeparatorToolItem::CppClassType SeparatorToolItem::separatortoolitem_class_; // initialize static member
+
+GType SeparatorToolItem::get_type()
+{
+ return separatortoolitem_class_.init().get_type();
+}
+
+GType SeparatorToolItem::get_base_type()
+{
+ return gtk_separator_tool_item_get_type();
+}
+
+
+SeparatorToolItem::SeparatorToolItem()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::ToolItem(Glib::ConstructParams(separatortoolitem_class_.init()))
+{
+ }
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/separatortoolitem.h b/libs/gtkmm2/gtk/gtkmm/separatortoolitem.h
new file mode 100644
index 0000000000..00f27cc12e
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/separatortoolitem.h
@@ -0,0 +1,125 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_SEPARATORTOOLITEM_H
+#define _GTKMM_SEPARATORTOOLITEM_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* separatortoolitem.h
+ *
+ * Copyright (C) 2003 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/toolitem.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkSeparatorToolItem GtkSeparatorToolItem;
+typedef struct _GtkSeparatorToolItemClass GtkSeparatorToolItemClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class SeparatorToolItem_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** A toolbar item that separates groups of other toolbar items.
+ *
+ * A Gtk::SeparatorToolItem is a Gtk::ToolItem that separates groups of other Gtk::ToolItems.
+ * Depending on the theme, it will often look like a vertical line on
+ * horizontally docked toolbars. If the property "expand" is <tt>true</tt> and the property "draw"
+ * is <tt>false</tt>, a Gtk::SeparatorToolItem will act as a "spring" that forces other items to the
+ * ends of the toolbar.
+ *
+ * @ingroup Widgets
+ */
+
+class SeparatorToolItem : public ToolItem
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef SeparatorToolItem CppObjectType;
+ typedef SeparatorToolItem_Class CppClassType;
+ typedef GtkSeparatorToolItem BaseObjectType;
+ typedef GtkSeparatorToolItemClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~SeparatorToolItem();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class SeparatorToolItem_Class;
+ static CppClassType separatortoolitem_class_;
+
+ // noncopyable
+ SeparatorToolItem(const SeparatorToolItem&);
+ SeparatorToolItem& operator=(const SeparatorToolItem&);
+
+protected:
+ explicit SeparatorToolItem(const Glib::ConstructParams& construct_params);
+ explicit SeparatorToolItem(GtkSeparatorToolItem* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkSeparatorToolItem* gobj() { return reinterpret_cast<GtkSeparatorToolItem*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkSeparatorToolItem* gobj() const { return reinterpret_cast<GtkSeparatorToolItem*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+public:
+ SeparatorToolItem();
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::SeparatorToolItem
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::SeparatorToolItem* wrap(GtkSeparatorToolItem* object, bool take_copy = false);
+}
+#endif /* _GTKMM_SEPARATORTOOLITEM_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/settings.cc b/libs/gtkmm2/gtk/gtkmm/settings.cc
new file mode 100644
index 0000000000..7cf9c0738a
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/settings.cc
@@ -0,0 +1,380 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/settings.h>
+#include <gtkmm/private/settings_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtksettings.h>
+
+namespace Gtk
+{
+
+Glib::RefPtr<Settings> Settings::get_default()
+{
+ Glib::RefPtr<Settings> result = Glib::RefPtr<Settings>( new Settings( gtk_settings_get_default() ) );
+ result->reference(); //gtk_settings_get_default() does not give a reference, so we take one.
+ return result;
+}
+
+
+} //namespace Gtk
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Gtk::Settings> wrap(GtkSettings* object, bool take_copy)
+{
+ return Glib::RefPtr<Gtk::Settings>( dynamic_cast<Gtk::Settings*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} /* namespace Glib */
+
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Settings_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Settings_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_settings_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Settings_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* Settings_Class::wrap_new(GObject* object)
+{
+ return new Settings((GtkSettings*)object);
+}
+
+
+/* The implementation: */
+
+GtkSettings* Settings::gobj_copy()
+{
+ reference();
+ return gobj();
+}
+
+Settings::Settings(const Glib::ConstructParams& construct_params)
+:
+ Glib::Object(construct_params)
+{}
+
+Settings::Settings(GtkSettings* castitem)
+:
+ Glib::Object((GObject*)(castitem))
+{}
+
+Settings::~Settings()
+{}
+
+
+Settings::CppClassType Settings::settings_class_; // initialize static member
+
+GType Settings::get_type()
+{
+ return settings_class_.init().get_type();
+}
+
+GType Settings::get_base_type()
+{
+ return gtk_settings_get_type();
+}
+
+
+Glib::RefPtr<Settings> Settings::get_for_screen(const Glib::RefPtr<Gdk::Screen>& screen)
+{
+
+ Glib::RefPtr<Settings> retvalue = Glib::wrap(gtk_settings_get_for_screen(Glib::unwrap(screen)));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+
+Glib::PropertyProxy<int> Settings::property_gtk_double_click_time()
+{
+ return Glib::PropertyProxy<int>(this, "gtk-double-click-time");
+}
+
+Glib::PropertyProxy_ReadOnly<int> Settings::property_gtk_double_click_time() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "gtk-double-click-time");
+}
+
+Glib::PropertyProxy<int> Settings::property_gtk_double_click_distance()
+{
+ return Glib::PropertyProxy<int>(this, "gtk-double-click-distance");
+}
+
+Glib::PropertyProxy_ReadOnly<int> Settings::property_gtk_double_click_distance() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "gtk-double-click-distance");
+}
+
+Glib::PropertyProxy<bool> Settings::property_gtk_cursor_blink()
+{
+ return Glib::PropertyProxy<bool>(this, "gtk-cursor-blink");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Settings::property_gtk_cursor_blink() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "gtk-cursor-blink");
+}
+
+Glib::PropertyProxy<int> Settings::property_gtk_cursor_blink_time()
+{
+ return Glib::PropertyProxy<int>(this, "gtk-cursor-blink-time");
+}
+
+Glib::PropertyProxy_ReadOnly<int> Settings::property_gtk_cursor_blink_time() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "gtk-cursor-blink-time");
+}
+
+Glib::PropertyProxy<bool> Settings::property_gtk_split_cursor()
+{
+ return Glib::PropertyProxy<bool>(this, "gtk-split-cursor");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Settings::property_gtk_split_cursor() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "gtk-split-cursor");
+}
+
+Glib::PropertyProxy<Glib::ustring> Settings::property_gtk_theme_name()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "gtk-theme-name");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> Settings::property_gtk_theme_name() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "gtk-theme-name");
+}
+
+Glib::PropertyProxy<Glib::ustring> Settings::property_gtk_key_theme_name()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "gtk-key-theme-name");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> Settings::property_gtk_key_theme_name() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "gtk-key-theme-name");
+}
+
+Glib::PropertyProxy<Glib::ustring> Settings::property_gtk_menu_bar_accel()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "gtk-menu-bar-accel");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> Settings::property_gtk_menu_bar_accel() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "gtk-menu-bar-accel");
+}
+
+Glib::PropertyProxy<int> Settings::property_gtk_dnd_drag_threshold()
+{
+ return Glib::PropertyProxy<int>(this, "gtk-dnd-drag-threshold");
+}
+
+Glib::PropertyProxy_ReadOnly<int> Settings::property_gtk_dnd_drag_threshold() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "gtk-dnd-drag-threshold");
+}
+
+Glib::PropertyProxy<Glib::ustring> Settings::property_gtk_font_name()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "gtk-font-name");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> Settings::property_gtk_font_name() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "gtk-font-name");
+}
+
+Glib::PropertyProxy<int> Settings::property_gtk_xft_antialias()
+{
+ return Glib::PropertyProxy<int>(this, "gtk-xft-antialias");
+}
+
+Glib::PropertyProxy_ReadOnly<int> Settings::property_gtk_xft_antialias() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "gtk-xft-antialias");
+}
+
+Glib::PropertyProxy<int> Settings::property_gtk_xft_hinting()
+{
+ return Glib::PropertyProxy<int>(this, "gtk-xft-hinting");
+}
+
+Glib::PropertyProxy_ReadOnly<int> Settings::property_gtk_xft_hinting() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "gtk-xft-hinting");
+}
+
+Glib::PropertyProxy<Glib::ustring> Settings::property_gtk_xft_hintstyle()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "gtk-xft-hintstyle");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> Settings::property_gtk_xft_hintstyle() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "gtk-xft-hintstyle");
+}
+
+Glib::PropertyProxy<Glib::ustring> Settings::property_gtk_xft_rgba()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "gtk-xft-rgba");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> Settings::property_gtk_xft_rgba() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "gtk-xft-rgba");
+}
+
+Glib::PropertyProxy<int> Settings::property_gtk_xft_dpi()
+{
+ return Glib::PropertyProxy<int>(this, "gtk-xft-dpi");
+}
+
+Glib::PropertyProxy_ReadOnly<int> Settings::property_gtk_xft_dpi() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "gtk-xft-dpi");
+}
+
+Glib::PropertyProxy<ToolbarStyle> Settings::property_gtk_toolbar_style()
+{
+ return Glib::PropertyProxy<ToolbarStyle>(this, "gtk-toolbar-style");
+}
+
+Glib::PropertyProxy_ReadOnly<ToolbarStyle> Settings::property_gtk_toolbar_style() const
+{
+ return Glib::PropertyProxy_ReadOnly<ToolbarStyle>(this, "gtk-toolbar-style");
+}
+
+Glib::PropertyProxy<IconSize> Settings::property_gtk_toolbar_icon_size()
+{
+ return Glib::PropertyProxy<IconSize>(this, "gtk-toolbar-icon-size");
+}
+
+Glib::PropertyProxy_ReadOnly<IconSize> Settings::property_gtk_toolbar_icon_size() const
+{
+ return Glib::PropertyProxy_ReadOnly<IconSize>(this, "gtk-toolbar-icon-size");
+}
+
+Glib::PropertyProxy<bool> Settings::property_gtk_can_change_accels()
+{
+ return Glib::PropertyProxy<bool>(this, "gtk-can-change-accels");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Settings::property_gtk_can_change_accels() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "gtk-can-change-accels");
+}
+
+Glib::PropertyProxy<bool> Settings::property_gtk_entry_select_on_focus()
+{
+ return Glib::PropertyProxy<bool>(this, "gtk-entry-select-on-focus");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Settings::property_gtk_entry_select_on_focus() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "gtk-entry-select-on-focus");
+}
+
+Glib::PropertyProxy<Glib::ustring> Settings::property_gtk_color_palette()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "gtk-color-palette");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> Settings::property_gtk_color_palette() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "gtk-color-palette");
+}
+
+Glib::PropertyProxy<bool> Settings::property_gtk_button_images()
+{
+ return Glib::PropertyProxy<bool>(this, "gtk-button-images");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Settings::property_gtk_button_images() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "gtk-button-images");
+}
+
+Glib::PropertyProxy<Glib::ustring> Settings::property_gtk_icon_theme_name()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "gtk-icon-theme-name");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> Settings::property_gtk_icon_theme_name() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "gtk-icon-theme-name");
+}
+
+Glib::PropertyProxy<Glib::ustring> Settings::property_gtk_icon_sizes()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "gtk-icon-sizes");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> Settings::property_gtk_icon_sizes() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "gtk-icon-sizes");
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/settings.h b/libs/gtkmm2/gtk/gtkmm/settings.h
new file mode 100644
index 0000000000..08cd78d90d
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/settings.h
@@ -0,0 +1,515 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_SETTINGS_H
+#define _GTKMM_SETTINGS_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* settings.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#include <gtkmm/toolbar.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkSettings GtkSettings;
+typedef struct _GtkSettingsClass GtkSettingsClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class Settings_Class; } // namespace Gtk
+namespace Gtk
+{
+
+
+class Settings : public Glib::Object
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef Settings CppObjectType;
+ typedef Settings_Class CppClassType;
+ typedef GtkSettings BaseObjectType;
+ typedef GtkSettingsClass BaseClassType;
+
+private: friend class Settings_Class;
+ static CppClassType settings_class_;
+
+private:
+ // noncopyable
+ Settings(const Settings&);
+ Settings& operator=(const Settings&);
+
+protected:
+ explicit Settings(const Glib::ConstructParams& construct_params);
+ explicit Settings(GtkSettings* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~Settings();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ GtkSettings* gobj() { return reinterpret_cast<GtkSettings*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const GtkSettings* gobj() const { return reinterpret_cast<GtkSettings*>(gobject_); }
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ GtkSettings* gobj_copy();
+
+private:
+
+
+protected:
+
+
+public:
+
+ static Glib::RefPtr<Settings> get_default();
+
+
+ /** Gets the Gtk::Settings object for @a screen , creating it if necessary.
+ * @param screen A Gdk::Screen.
+ * @return A Gtk::Settings object.
+ *
+ * Since: 2.2.
+ */
+ static Glib::RefPtr<Settings> get_for_screen(const Glib::RefPtr<Gdk::Screen>& screen);
+
+ /** Maximum time allowed between two clicks for them to be considered a double click (in milliseconds).
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_gtk_double_click_time() ;
+
+/** Maximum time allowed between two clicks for them to be considered a double click (in milliseconds).
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_gtk_double_click_time() const;
+
+ /** Maximum distance allowed between two clicks for them to be considered a double click (in pixels).
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_gtk_double_click_distance() ;
+
+/** Maximum distance allowed between two clicks for them to be considered a double click (in pixels).
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_gtk_double_click_distance() const;
+
+ /** Whether the cursor should blink.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_gtk_cursor_blink() ;
+
+/** Whether the cursor should blink.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_gtk_cursor_blink() const;
+
+ /** Length of the cursor blink cycle
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_gtk_cursor_blink_time() ;
+
+/** Length of the cursor blink cycle
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_gtk_cursor_blink_time() const;
+
+ /** Whether two cursors should be displayed for mixed left-to-right and right-to-left text.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_gtk_split_cursor() ;
+
+/** Whether two cursors should be displayed for mixed left-to-right and right-to-left text.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_gtk_split_cursor() const;
+
+ /** Name of theme RC file to load.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_gtk_theme_name() ;
+
+/** Name of theme RC file to load.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_gtk_theme_name() const;
+
+ /** Name of key theme RC file to load.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_gtk_key_theme_name() ;
+
+/** Name of key theme RC file to load.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_gtk_key_theme_name() const;
+
+ /** Keybinding to activate the menu bar.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_gtk_menu_bar_accel() ;
+
+/** Keybinding to activate the menu bar.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_gtk_menu_bar_accel() const;
+
+ /** Number of pixels the cursor can move before dragging.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_gtk_dnd_drag_threshold() ;
+
+/** Number of pixels the cursor can move before dragging.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_gtk_dnd_drag_threshold() const;
+
+ /** Name of default font to use.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_gtk_font_name() ;
+
+/** Name of default font to use.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_gtk_font_name() const;
+
+ /** Whether to antialias Xft fonts; 0=no
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_gtk_xft_antialias() ;
+
+/** Whether to antialias Xft fonts; 0=no
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_gtk_xft_antialias() const;
+
+ /** Whether to hint Xft fonts; 0=no
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_gtk_xft_hinting() ;
+
+/** Whether to hint Xft fonts; 0=no
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_gtk_xft_hinting() const;
+
+ /** What degree of hinting to use; none
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_gtk_xft_hintstyle() ;
+
+/** What degree of hinting to use; none
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_gtk_xft_hintstyle() const;
+
+ /** Type of subpixel antialiasing; none
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_gtk_xft_rgba() ;
+
+/** Type of subpixel antialiasing; none
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_gtk_xft_rgba() const;
+
+ /** Resolution for Xft
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_gtk_xft_dpi() ;
+
+/** Resolution for Xft
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_gtk_xft_dpi() const;
+
+
+ // from GtkToolbar
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<ToolbarStyle> property_gtk_toolbar_style() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<ToolbarStyle> property_gtk_toolbar_style() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<IconSize> property_gtk_toolbar_icon_size() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<IconSize> property_gtk_toolbar_icon_size() const;
+
+
+ // from GtkMenu
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_gtk_can_change_accels() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_gtk_can_change_accels() const;
+
+
+ // from GtkEntry
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_gtk_entry_select_on_focus() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_gtk_entry_select_on_focus() const;
+
+
+ // from GtkColorSelection
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_gtk_color_palette() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_gtk_color_palette() const;
+
+
+ // from GtkButton
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_gtk_button_images() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_gtk_button_images() const;
+
+
+ // from GtkIconTheme
+ /** Name of icon theme to use.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_gtk_icon_theme_name() ;
+
+/** Name of icon theme to use.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_gtk_icon_theme_name() const;
+
+ /** List of icon sizes gtk-menu=16
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_gtk_icon_sizes() ;
+
+/** List of icon sizes gtk-menu=16
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_gtk_icon_sizes() const;
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+};
+
+} /* namespace Gtk */
+
+
+namespace Glib
+{
+ /** @relates Gtk::Settings
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Gtk::Settings> wrap(GtkSettings* object, bool take_copy = false);
+}
+
+
+#endif /* _GTKMM_SETTINGS_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/sizegroup.cc b/libs/gtkmm2/gtk/gtkmm/sizegroup.cc
new file mode 100644
index 0000000000..40c350749f
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/sizegroup.cc
@@ -0,0 +1,179 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/sizegroup.h>
+#include <gtkmm/private/sizegroup_p.h>
+
+#include <gtk/gtktypebuiltins.h>
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtksizegroup.h>
+
+namespace Gtk
+{
+
+SizeGroup::SizeGroup(SizeGroupMode mode)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Glib::Object(Glib::ConstructParams(sizegroup_class_.init(), "mode",(GtkSizeGroupMode) mode, (char*) 0))
+{}
+
+} // namespace Gtk
+
+
+namespace
+{
+} // anonymous namespace
+
+// static
+GType Glib::Value<Gtk::SizeGroupMode>::value_type()
+{
+ return gtk_size_group_mode_get_type();
+}
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Gtk::SizeGroup> wrap(GtkSizeGroup* object, bool take_copy)
+{
+ return Glib::RefPtr<Gtk::SizeGroup>( dynamic_cast<Gtk::SizeGroup*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} /* namespace Glib */
+
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& SizeGroup_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &SizeGroup_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_size_group_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void SizeGroup_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* SizeGroup_Class::wrap_new(GObject* object)
+{
+ return new SizeGroup((GtkSizeGroup*)object);
+}
+
+
+/* The implementation: */
+
+GtkSizeGroup* SizeGroup::gobj_copy()
+{
+ reference();
+ return gobj();
+}
+
+SizeGroup::SizeGroup(const Glib::ConstructParams& construct_params)
+:
+ Glib::Object(construct_params)
+{}
+
+SizeGroup::SizeGroup(GtkSizeGroup* castitem)
+:
+ Glib::Object((GObject*)(castitem))
+{}
+
+SizeGroup::~SizeGroup()
+{}
+
+
+SizeGroup::CppClassType SizeGroup::sizegroup_class_; // initialize static member
+
+GType SizeGroup::get_type()
+{
+ return sizegroup_class_.init().get_type();
+}
+
+GType SizeGroup::get_base_type()
+{
+ return gtk_size_group_get_type();
+}
+
+
+Glib::RefPtr<SizeGroup> SizeGroup::create(SizeGroupMode mode)
+{
+ return Glib::RefPtr<SizeGroup>( new SizeGroup(mode) );
+}
+void SizeGroup::set_mode(SizeGroupMode mode)
+{
+ gtk_size_group_set_mode(gobj(), ((GtkSizeGroupMode)(mode)));
+}
+
+SizeGroupMode SizeGroup::get_mode() const
+{
+ return ((SizeGroupMode)(gtk_size_group_get_mode(const_cast<GtkSizeGroup*>(gobj()))));
+}
+
+void SizeGroup::add_widget(Widget& widget)
+{
+ gtk_size_group_add_widget(gobj(), (widget).gobj());
+}
+
+void SizeGroup::remove_widget(Widget& widget)
+{
+ gtk_size_group_remove_widget(gobj(), (widget).gobj());
+}
+
+
+Glib::PropertyProxy<SizeGroupMode> SizeGroup::property_mode()
+{
+ return Glib::PropertyProxy<SizeGroupMode>(this, "mode");
+}
+
+Glib::PropertyProxy_ReadOnly<SizeGroupMode> SizeGroup::property_mode() const
+{
+ return Glib::PropertyProxy_ReadOnly<SizeGroupMode>(this, "mode");
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/sizegroup.h b/libs/gtkmm2/gtk/gtkmm/sizegroup.h
new file mode 100644
index 0000000000..d3fb6991eb
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/sizegroup.h
@@ -0,0 +1,207 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_SIZEGROUP_H
+#define _GTKMM_SIZEGROUP_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* box.h
+ *
+ * Copyright 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/object.h>
+#include <gtkmm/widget.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkSizeGroup GtkSizeGroup;
+typedef struct _GtkSizeGroupClass GtkSizeGroupClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class SizeGroup_Class; } // namespace Gtk
+namespace Gtk
+{
+
+
+/** @addtogroup gtkmmEnums Enums and Flags */
+
+/**
+ * @ingroup gtkmmEnums
+ */
+enum SizeGroupMode
+{
+ SIZE_GROUP_NONE,
+ SIZE_GROUP_HORIZONTAL,
+ SIZE_GROUP_VERTICAL,
+ SIZE_GROUP_BOTH
+};
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::SizeGroupMode> : public Glib::Value_Enum<Gtk::SizeGroupMode>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+
+class SizeGroup : public Glib::Object
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef SizeGroup CppObjectType;
+ typedef SizeGroup_Class CppClassType;
+ typedef GtkSizeGroup BaseObjectType;
+ typedef GtkSizeGroupClass BaseClassType;
+
+private: friend class SizeGroup_Class;
+ static CppClassType sizegroup_class_;
+
+private:
+ // noncopyable
+ SizeGroup(const SizeGroup&);
+ SizeGroup& operator=(const SizeGroup&);
+
+protected:
+ explicit SizeGroup(const Glib::ConstructParams& construct_params);
+ explicit SizeGroup(GtkSizeGroup* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~SizeGroup();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ GtkSizeGroup* gobj() { return reinterpret_cast<GtkSizeGroup*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const GtkSizeGroup* gobj() const { return reinterpret_cast<GtkSizeGroup*>(gobject_); }
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ GtkSizeGroup* gobj_copy();
+
+private:
+
+protected:
+ explicit SizeGroup(SizeGroupMode mode);
+
+public:
+
+
+ static Glib::RefPtr<SizeGroup> create(SizeGroupMode mode);
+
+
+ /** Sets the Gtk::SizeGroupMode of the size group. The mode of the size
+ * group determines whether the widgets in the size group should
+ * all have the same horizontal requisition (Gtk::SIZE_GROUP_MODE_HORIZONTAL)
+ * all have the same vertical requisition (Gtk::SIZE_GROUP_MODE_VERTICAL),
+ * or should all have the same requisition in both directions
+ * (Gtk::SIZE_GROUP_MODE_BOTH).
+ * @param mode The mode to set for the size group.
+ */
+ void set_mode(SizeGroupMode mode);
+
+ /** Gets the current mode of the size group. See set_mode().
+ * @return The current mode of the size group.
+ */
+ SizeGroupMode get_mode() const;
+
+ /** Adds a widget to a Gtk::SizeGroup. In the future, the requisition
+ * of the widget will be determined as the maximum of its requisition
+ * and the requisition of the other widgets in the size group.
+ * Whether this applies horizontally, vertically, or in both directions
+ * depends on the mode of the size group. See set_mode().
+ * @param widget The Gtk::Widget to add.
+ */
+ void add_widget(Widget& widget);
+
+ /** Removes a widget from a Gtk::SizeGroup.
+ * @param widget The Gtk::Widget to remove.
+ */
+ void remove_widget(Widget& widget);
+
+ /** The directions in which the size group effects the requested sizes of its component widgets.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<SizeGroupMode> property_mode() ;
+
+/** The directions in which the size group effects the requested sizes of its component widgets.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<SizeGroupMode> property_mode() const;
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+};
+
+} /* namespace Gtk */
+
+
+namespace Glib
+{
+ /** @relates Gtk::SizeGroup
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Gtk::SizeGroup> wrap(GtkSizeGroup* object, bool take_copy = false);
+}
+
+
+#endif /* _GTKMM_SIZEGROUP_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/socket.cc b/libs/gtkmm2/gtk/gtkmm/socket.cc
new file mode 100644
index 0000000000..050d5a2dcd
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/socket.cc
@@ -0,0 +1,308 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/socket.h>
+#include <gtkmm/private/socket_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtksocket.h>
+
+
+namespace
+{
+
+const Glib::SignalProxyInfo Socket_signal_plug_added_info =
+{
+ "plug_added",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+
+gboolean Socket_signal_plug_removed_callback(GtkSocket* self, void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< bool > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ return static_cast<int>((*static_cast<SlotType*>(slot))());
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Socket_signal_plug_removed_notify_callback(GtkSocket* self, void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+const Glib::SignalProxyInfo Socket_signal_plug_removed_info =
+{
+ "plug_removed",
+ (GCallback) &Socket_signal_plug_removed_callback,
+ (GCallback) &Socket_signal_plug_removed_notify_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::Socket* wrap(GtkSocket* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::Socket *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Socket_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Socket_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_socket_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Socket_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->plug_added = &plug_added_callback;
+ klass->plug_removed = &plug_removed_callback;
+}
+
+
+void Socket_Class::plug_added_callback(GtkSocket* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_plug_added();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->plug_added)
+ (*base->plug_added)(self);
+ }
+}
+
+gboolean Socket_Class::plug_removed_callback(GtkSocket* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->on_plug_removed());
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->plug_removed)
+ return (*base->plug_removed)(self);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+
+Glib::ObjectBase* Socket_Class::wrap_new(GObject* o)
+{
+ return manage(new Socket((GtkSocket*)(o)));
+
+}
+
+
+/* The implementation: */
+
+Socket::Socket(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Container(construct_params)
+{
+ }
+
+Socket::Socket(GtkSocket* castitem)
+:
+ Gtk::Container((GtkContainer*)(castitem))
+{
+ }
+
+Socket::~Socket()
+{
+ destroy_();
+}
+
+Socket::CppClassType Socket::socket_class_; // initialize static member
+
+GType Socket::get_type()
+{
+ return socket_class_.init().get_type();
+}
+
+GType Socket::get_base_type()
+{
+ return gtk_socket_get_type();
+}
+
+
+Socket::Socket()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Container(Glib::ConstructParams(socket_class_.init()))
+{
+ }
+
+void Socket::add_id(Gdk::NativeWindow window_id)
+{
+ gtk_socket_add_id(gobj(), (GdkNativeWindow)(window_id));
+}
+
+Gdk::NativeWindow Socket::get_id() const
+{
+ return (Gdk::NativeWindow)(gtk_socket_get_id(const_cast<GtkSocket*>(gobj())));
+}
+
+
+Glib::SignalProxy0< void > Socket::signal_plug_added()
+{
+ return Glib::SignalProxy0< void >(this, &Socket_signal_plug_added_info);
+}
+
+Glib::SignalProxy0< bool > Socket::signal_plug_removed()
+{
+ return Glib::SignalProxy0< bool >(this, &Socket_signal_plug_removed_info);
+}
+
+
+void Gtk::Socket::on_plug_added()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->plug_added)
+ (*base->plug_added)(gobj());
+}
+
+bool Gtk::Socket::on_plug_removed()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->plug_removed)
+ return (*base->plug_removed)(gobj());
+
+ typedef bool RType;
+ return RType();
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/socket.h b/libs/gtkmm2/gtk/gtkmm/socket.h
new file mode 100644
index 0000000000..3b6d58aa96
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/socket.h
@@ -0,0 +1,200 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_SOCKET_H
+#define _GTKMM_SOCKET_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/container.h>
+#include <gdkmm/types.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkSocket GtkSocket;
+typedef struct _GtkSocketClass GtkSocketClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class Socket_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** Container for widgets from other processes.
+ * Together with Gtk::Plug, Gtk::Socket provides the ability to embed
+ * widgets from one process into another process in a fashion that is
+ * transparent to the user. One process creates a Gtk::Socket widget and,
+ * passes the that widget's window ID to the other process, which then
+ * creates a Gtk::Plug with that window ID. Any widgets contained in the
+ * Gtk::Plug then will appear inside the first applications window.
+ *
+ * The socket's window ID is obtained by using get_id(). Before using this
+ * function, the socket must have been realized, and for hence, have been
+ * added to its parent.
+ *
+ * @code
+ * Gtk::Socket socket;
+ * parent.add(socket);
+ *
+ * // The following call is only necessary if one of the ancestors of the
+ * // socket is not yet visible
+ * socket.realize();
+ *
+ * cout << "The ID of the sockets window is: " << socket.get_id() << endl;
+ *
+ * @endcode
+ *
+ * Note that if you pass the window ID of the socket to another process that
+ * will create a plug in the socket, you must make sure that the socket
+ * widget is not destroyed until that plug is created. Violating this rule
+ * will cause unpredictable consequences, the most likely consequence being
+ * that the plug will appear as a separate toplevel window. You can check if
+ * the plug has been created by examining the plug_window member of the
+ * GtkSocket structure returned by gobj(). If this field is non-NULL, then
+ * the plug has been successfully created inside of the socket.
+ *
+ * When gtkmm is notified that the embedded window has been destroyed, then
+ * it will destroy the socket as well. You should always, therefore, be
+ * prepared for your sockets to be destroyed at any time when the main event
+ * loop is running.
+ *
+ * The communication between a Gtk::Socket and a Gtk::Plug follows the
+ * XEmbed protocol. This protocol has also been implemented in other
+ * toolkits, e.g. Qt, allowing the same level of integration when embedding
+ * a Qt widget in gtkmm or vice versa.
+ *
+ * @ingroup Widgets
+ * @ingroup Containers
+ */
+
+class Socket : public Container
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Socket CppObjectType;
+ typedef Socket_Class CppClassType;
+ typedef GtkSocket BaseObjectType;
+ typedef GtkSocketClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~Socket();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class Socket_Class;
+ static CppClassType socket_class_;
+
+ // noncopyable
+ Socket(const Socket&);
+ Socket& operator=(const Socket&);
+
+protected:
+ explicit Socket(const Glib::ConstructParams& construct_params);
+ explicit Socket(GtkSocket* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkSocket* gobj() { return reinterpret_cast<GtkSocket*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkSocket* gobj() const { return reinterpret_cast<GtkSocket*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_plug_added();
+ virtual bool on_plug_removed();
+
+
+private:
+
+
+ //This is not available in on Win32.
+//This source file will not be compiled,
+//and the class will not be registered in wrap_init.h or wrap_init.cc
+
+public:
+ Socket();
+
+
+ /** Adds an XEMBED client, such as a Gtk::Plug, to the Gtk::Socket. The
+ * client may be in the same process or in a different process.
+ *
+ * To embed a Gtk::Plug in a Gtk::Socket, you can either create the
+ * Gtk::Plug with <tt>gtk_plug_new (0)</tt>, call
+ * Gtk::Plug::get_id() to get the window ID of the plug, and then pass that to the
+ * add_id(), or you can call get_id() to get the
+ * window ID for the socket, and call Gtk::Plug::new() passing in that
+ * ID.
+ *
+ * The Gtk::Socket must have already be added into a toplevel window
+ * before you can make this call.
+ * @param window_id The window ID of a client participating in the XEMBED protocol.
+ */
+ void add_id(Gdk::NativeWindow window_id);
+
+ /** Gets the window ID of a Gtk::Socket widget, which can then
+ * be used to create a client embedded inside the socket, for
+ * instance with Gtk::Plug::new().
+ *
+ * The Gtk::Socket must have already be added into a toplevel window
+ * before you can make this call.
+ * @return The window ID for the socket.
+ */
+ Gdk::NativeWindow get_id() const;
+
+
+ Glib::SignalProxy0< void > signal_plug_added();
+
+
+ Glib::SignalProxy0< bool > signal_plug_removed();
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::Socket
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::Socket* wrap(GtkSocket* object, bool take_copy = false);
+}
+#endif /* _GTKMM_SOCKET_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/spinbutton.cc b/libs/gtkmm2/gtk/gtkmm/spinbutton.cc
new file mode 100644
index 0000000000..d82f8baab4
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/spinbutton.cc
@@ -0,0 +1,638 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/spinbutton.h>
+#include <gtkmm/private/spinbutton_p.h>
+
+#include <gtk/gtktypebuiltins.h>
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/adjustment.h>
+#include <gtk/gtkspinbutton.h>
+
+namespace Gtk
+{
+
+SpinButton::SpinButton(double climb_rate, guint digits)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Entry(Glib::ConstructParams(spinbutton_class_.init(), "climb_rate",climb_rate,"digits",digits, (char*) 0))
+{}
+
+void SpinButton::unset_adjustment()
+{
+ gtk_spin_button_set_adjustment(gobj(), 0);
+}
+
+} // namespace Gtk
+
+
+namespace
+{
+
+gint SpinButton_signal_input_callback(GtkSpinButton* self, gdouble* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< int,double* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ return (*static_cast<SlotType*>(slot))(p0
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gint RType;
+ return RType();
+}
+
+gint SpinButton_signal_input_notify_callback(GtkSpinButton* self, gdouble* p0, void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,double* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(p0
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gint RType;
+ return RType();
+}
+
+const Glib::SignalProxyInfo SpinButton_signal_input_info =
+{
+ "input",
+ (GCallback) &SpinButton_signal_input_callback,
+ (GCallback) &SpinButton_signal_input_notify_callback
+};
+
+
+gboolean SpinButton_signal_output_callback(GtkSpinButton* self, void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< bool > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ return static_cast<int>((*static_cast<SlotType*>(slot))());
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean SpinButton_signal_output_notify_callback(GtkSpinButton* self, void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+const Glib::SignalProxyInfo SpinButton_signal_output_info =
+{
+ "output",
+ (GCallback) &SpinButton_signal_output_callback,
+ (GCallback) &SpinButton_signal_output_notify_callback
+};
+
+
+const Glib::SignalProxyInfo SpinButton_signal_value_changed_info =
+{
+ "value_changed",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+} // anonymous namespace
+
+// static
+GType Glib::Value<Gtk::SpinButtonUpdatePolicy>::value_type()
+{
+ return gtk_spin_button_update_policy_get_type();
+}
+
+// static
+GType Glib::Value<Gtk::SpinType>::value_type()
+{
+ return gtk_spin_type_get_type();
+}
+
+
+namespace Glib
+{
+
+Gtk::SpinButton* wrap(GtkSpinButton* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::SpinButton *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& SpinButton_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &SpinButton_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_spin_button_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ Editable::add_interface(get_type());
+ }
+
+ return *this;
+}
+
+void SpinButton_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->input = &input_callback;
+ klass->output = &output_callback;
+ klass->value_changed = &value_changed_callback;
+}
+
+
+gint SpinButton_Class::input_callback(GtkSpinButton* self, gdouble* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return obj->on_input(p0
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->input)
+ return (*base->input)(self, p0);
+ }
+
+ typedef gint RType;
+ return RType();
+}
+
+gboolean SpinButton_Class::output_callback(GtkSpinButton* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->on_output());
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->output)
+ return (*base->output)(self);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+void SpinButton_Class::value_changed_callback(GtkSpinButton* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_value_changed();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->value_changed)
+ (*base->value_changed)(self);
+ }
+}
+
+
+Glib::ObjectBase* SpinButton_Class::wrap_new(GObject* o)
+{
+ return manage(new SpinButton((GtkSpinButton*)(o)));
+
+}
+
+
+/* The implementation: */
+
+SpinButton::SpinButton(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Entry(construct_params)
+{
+ }
+
+SpinButton::SpinButton(GtkSpinButton* castitem)
+:
+ Gtk::Entry((GtkEntry*)(castitem))
+{
+ }
+
+SpinButton::~SpinButton()
+{
+ destroy_();
+}
+
+SpinButton::CppClassType SpinButton::spinbutton_class_; // initialize static member
+
+GType SpinButton::get_type()
+{
+ return spinbutton_class_.init().get_type();
+}
+
+GType SpinButton::get_base_type()
+{
+ return gtk_spin_button_get_type();
+}
+
+
+SpinButton::SpinButton(Adjustment& adjustment, double climb_rate, guint digits)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Entry(Glib::ConstructParams(spinbutton_class_.init(), "adjustment", (adjustment).gobj(), "climb_rate", climb_rate, "digits", digits, (char*) 0))
+{
+ }
+
+void SpinButton::configure(Adjustment& adjustment, double climb_rate, guint digits)
+{
+ gtk_spin_button_configure(gobj(), (adjustment).gobj(), climb_rate, digits);
+}
+
+void SpinButton::set_adjustment(Adjustment& adjustment)
+{
+ gtk_spin_button_set_adjustment(gobj(), (adjustment).gobj());
+}
+
+Gtk::Adjustment* SpinButton::get_adjustment()
+{
+ return Glib::wrap(gtk_spin_button_get_adjustment(gobj()));
+}
+
+const Gtk::Adjustment* SpinButton::get_adjustment() const
+{
+ return Glib::wrap(gtk_spin_button_get_adjustment(const_cast<GtkSpinButton*>(gobj())));
+}
+
+void SpinButton::set_digits(guint digits)
+{
+ gtk_spin_button_set_digits(gobj(), digits);
+}
+
+guint SpinButton::get_digits() const
+{
+ return gtk_spin_button_get_digits(const_cast<GtkSpinButton*>(gobj()));
+}
+
+void SpinButton::set_increments(double step, double page)
+{
+ gtk_spin_button_set_increments(gobj(), step, page);
+}
+
+void SpinButton::get_increments(double& step, double& page) const
+{
+ gtk_spin_button_get_increments(const_cast<GtkSpinButton*>(gobj()), &(step), &(page));
+}
+
+void SpinButton::set_range(double min, double max)
+{
+ gtk_spin_button_set_range(gobj(), min, max);
+}
+
+void SpinButton::get_range(double& min, double& max) const
+{
+ gtk_spin_button_get_range(const_cast<GtkSpinButton*>(gobj()), &(min), &(max));
+}
+
+double SpinButton::get_value() const
+{
+ return gtk_spin_button_get_value(const_cast<GtkSpinButton*>(gobj()));
+}
+
+int SpinButton::get_value_as_int() const
+{
+ return gtk_spin_button_get_value_as_int(const_cast<GtkSpinButton*>(gobj()));
+}
+
+void SpinButton::set_value(double value)
+{
+ gtk_spin_button_set_value(gobj(), value);
+}
+
+void SpinButton::set_update_policy(SpinButtonUpdatePolicy policy)
+{
+ gtk_spin_button_set_update_policy(gobj(), ((GtkSpinButtonUpdatePolicy)(policy)));
+}
+
+SpinButtonUpdatePolicy SpinButton::get_update_policy() const
+{
+ return ((SpinButtonUpdatePolicy)(gtk_spin_button_get_update_policy(const_cast<GtkSpinButton*>(gobj()))));
+}
+
+void SpinButton::set_numeric(bool numeric)
+{
+ gtk_spin_button_set_numeric(gobj(), static_cast<int>(numeric));
+}
+
+bool SpinButton::get_numeric() const
+{
+ return gtk_spin_button_get_numeric(const_cast<GtkSpinButton*>(gobj()));
+}
+
+void SpinButton::spin(SpinType direction, double increment)
+{
+ gtk_spin_button_spin(gobj(), ((GtkSpinType)(direction)), increment);
+}
+
+void SpinButton::set_wrap(bool wrap)
+{
+ gtk_spin_button_set_wrap(gobj(), static_cast<int>(wrap));
+}
+
+bool SpinButton::get_wrap() const
+{
+ return gtk_spin_button_get_wrap(const_cast<GtkSpinButton*>(gobj()));
+}
+
+void SpinButton::set_snap_to_ticks(bool snap_to_ticks)
+{
+ gtk_spin_button_set_snap_to_ticks(gobj(), static_cast<int>(snap_to_ticks));
+}
+
+bool SpinButton::get_snap_to_ticks() const
+{
+ return gtk_spin_button_get_snap_to_ticks(const_cast<GtkSpinButton*>(gobj()));
+}
+
+void SpinButton::update()
+{
+ gtk_spin_button_update(gobj());
+}
+
+
+Glib::SignalProxy1< int,double* > SpinButton::signal_input()
+{
+ return Glib::SignalProxy1< int,double* >(this, &SpinButton_signal_input_info);
+}
+
+Glib::SignalProxy0< bool > SpinButton::signal_output()
+{
+ return Glib::SignalProxy0< bool >(this, &SpinButton_signal_output_info);
+}
+
+Glib::SignalProxy0< void > SpinButton::signal_value_changed()
+{
+ return Glib::SignalProxy0< void >(this, &SpinButton_signal_value_changed_info);
+}
+
+
+Glib::PropertyProxy<Gtk::Adjustment*> SpinButton::property_adjustment()
+{
+ return Glib::PropertyProxy<Gtk::Adjustment*>(this, "adjustment");
+}
+
+Glib::PropertyProxy_ReadOnly<Gtk::Adjustment*> SpinButton::property_adjustment() const
+{
+ return Glib::PropertyProxy_ReadOnly<Gtk::Adjustment*>(this, "adjustment");
+}
+
+Glib::PropertyProxy<double> SpinButton::property_climb_rate()
+{
+ return Glib::PropertyProxy<double>(this, "climb-rate");
+}
+
+Glib::PropertyProxy_ReadOnly<double> SpinButton::property_climb_rate() const
+{
+ return Glib::PropertyProxy_ReadOnly<double>(this, "climb-rate");
+}
+
+Glib::PropertyProxy<guint> SpinButton::property_digits()
+{
+ return Glib::PropertyProxy<guint>(this, "digits");
+}
+
+Glib::PropertyProxy_ReadOnly<guint> SpinButton::property_digits() const
+{
+ return Glib::PropertyProxy_ReadOnly<guint>(this, "digits");
+}
+
+Glib::PropertyProxy<bool> SpinButton::property_snap_to_ticks()
+{
+ return Glib::PropertyProxy<bool>(this, "snap-to-ticks");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> SpinButton::property_snap_to_ticks() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "snap-to-ticks");
+}
+
+Glib::PropertyProxy<bool> SpinButton::property_numeric()
+{
+ return Glib::PropertyProxy<bool>(this, "numeric");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> SpinButton::property_numeric() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "numeric");
+}
+
+Glib::PropertyProxy<bool> SpinButton::property_wrap()
+{
+ return Glib::PropertyProxy<bool>(this, "wrap");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> SpinButton::property_wrap() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "wrap");
+}
+
+Glib::PropertyProxy<SpinButtonUpdatePolicy> SpinButton::property_update_policy()
+{
+ return Glib::PropertyProxy<SpinButtonUpdatePolicy>(this, "update-policy");
+}
+
+Glib::PropertyProxy_ReadOnly<SpinButtonUpdatePolicy> SpinButton::property_update_policy() const
+{
+ return Glib::PropertyProxy_ReadOnly<SpinButtonUpdatePolicy>(this, "update-policy");
+}
+
+Glib::PropertyProxy<double> SpinButton::property_value()
+{
+ return Glib::PropertyProxy<double>(this, "value");
+}
+
+Glib::PropertyProxy_ReadOnly<double> SpinButton::property_value() const
+{
+ return Glib::PropertyProxy_ReadOnly<double>(this, "value");
+}
+
+
+int Gtk::SpinButton::on_input(double* new_value)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->input)
+ return (*base->input)(gobj(),new_value);
+
+ typedef int RType;
+ return RType();
+}
+
+bool Gtk::SpinButton::on_output()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->output)
+ return (*base->output)(gobj());
+
+ typedef bool RType;
+ return RType();
+}
+
+void Gtk::SpinButton::on_value_changed()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->value_changed)
+ (*base->value_changed)(gobj());
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/spinbutton.h b/libs/gtkmm2/gtk/gtkmm/spinbutton.h
new file mode 100644
index 0000000000..d679054425
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/spinbutton.h
@@ -0,0 +1,503 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_SPINBUTTON_H
+#define _GTKMM_SPINBUTTON_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/entry.h>
+#include <gtkmm/editable.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkSpinButton GtkSpinButton;
+typedef struct _GtkSpinButtonClass GtkSpinButtonClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class SpinButton_Class; } // namespace Gtk
+namespace Gtk
+{
+
+
+/** @addtogroup gtkmmEnums Enums and Flags */
+
+/**
+ * @ingroup gtkmmEnums
+ */
+enum SpinButtonUpdatePolicy
+{
+ UPDATE_ALWAYS,
+ UPDATE_IF_VALID
+};
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::SpinButtonUpdatePolicy> : public Glib::Value_Enum<Gtk::SpinButtonUpdatePolicy>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+/**
+ * @ingroup gtkmmEnums
+ */
+enum SpinType
+{
+ SPIN_STEP_FORWARD,
+ SPIN_STEP_BACKWARD,
+ SPIN_PAGE_FORWARD,
+ SPIN_PAGE_BACKWARD,
+ SPIN_HOME,
+ SPIN_END,
+ SPIN_USER_DEFINED
+};
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::SpinType> : public Glib::Value_Enum<Gtk::SpinType>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+
+/** @ingroup gtkmmEnums */
+enum { INPUT_ERROR = -1 };
+
+class Adjustment;
+
+/** numeric Entry with up/down buttons
+ * Slightly misnamed, this should be called a SpinEntry.
+ *
+ * @ingroup Widgets
+ */
+
+class SpinButton : public Entry
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef SpinButton CppObjectType;
+ typedef SpinButton_Class CppClassType;
+ typedef GtkSpinButton BaseObjectType;
+ typedef GtkSpinButtonClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~SpinButton();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class SpinButton_Class;
+ static CppClassType spinbutton_class_;
+
+ // noncopyable
+ SpinButton(const SpinButton&);
+ SpinButton& operator=(const SpinButton&);
+
+protected:
+ explicit SpinButton(const Glib::ConstructParams& construct_params);
+ explicit SpinButton(GtkSpinButton* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkSpinButton* gobj() { return reinterpret_cast<GtkSpinButton*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkSpinButton* gobj() const { return reinterpret_cast<GtkSpinButton*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual int on_input(double* new_value);
+ virtual bool on_output();
+ virtual void on_value_changed();
+
+
+private:
+
+
+public:
+
+ //: create instance
+ // adjustment: see Gtk::Adjustment
+ // climb_rate:
+ // digits: number of decimal digits (has to be < 6)
+ SpinButton(double climb_rate = 0.0, guint digits = 0);
+ explicit SpinButton(Adjustment& adjustment, double climb_rate = 0.0, guint digits = 0);
+
+
+ void configure(Adjustment& adjustment, double climb_rate, guint digits);
+
+
+ /** Replaces the Gtk::Adjustment associated with @a spin_button .
+ * @param adjustment A Gtk::Adjustment to replace the existing adjustment.
+ */
+ void set_adjustment(Adjustment& adjustment);
+ void unset_adjustment();
+
+ /** Get the adjustment associated with a Gtk::SpinButton
+ * @return The Gtk::Adjustment of @a spin_button .
+ */
+ Gtk::Adjustment* get_adjustment();
+
+ /** Get the adjustment associated with a Gtk::SpinButton
+ * @return The Gtk::Adjustment of @a spin_button .
+ */
+ const Gtk::Adjustment* get_adjustment() const;
+
+
+ /** Set the precision to be displayed by @a spin_button . Up to 20 digit precision
+ * is allowed.
+ * @param digits The number of digits after the decimal point to be displayed for the spin button's value.
+ */
+ void set_digits(guint digits);
+
+ /** Fetches the precision of @a spin_button . See set_digits().
+ * @return The current precision.
+ */
+ guint get_digits() const;
+
+
+ /** Sets the step and page increments for spin_button. This affects how
+ * quickly the value changes when the spin button's arrows are activated.
+ * @param step Increment applied for a button 1 press.
+ * @param page Increment applied for a button 2 press.
+ */
+ void set_increments(double step, double page);
+
+ /** Gets the current step and page the increments used by @a spin_button . See
+ * set_increments().
+ * @param step Location to store step increment, or <tt>0</tt>.
+ * @param page Location to store page increment, or <tt>0</tt>.
+ */
+ void get_increments(double& step, double& page) const;
+
+
+ /** Sets the minimum and maximum allowable values for @a spin_button
+ * @param min Minimum allowable value.
+ * @param max Maximum allowable value.
+ */
+ void set_range(double min, double max);
+
+ /** Gets the range allowed for @a spin_button . See
+ * set_range().
+ * @param min Location to store minimum allowed value, or <tt>0</tt>.
+ * @param max Location to store maximum allowed value, or <tt>0</tt>.
+ */
+ void get_range(double& min, double& max) const;
+
+
+ /** Get the value in the @a spin_button .
+ * @return The value of @a spin_button .
+ */
+ double get_value() const;
+
+ /** Get the value @a spin_button represented as an integer.
+ * @return The value of @a spin_button .
+ */
+ int get_value_as_int() const;
+
+ /** Set the value of @a spin_button .
+ * @param value The new value.
+ */
+ void set_value(double value);
+
+
+ /** Sets the update behavior of a spin button. This determines whether the
+ * spin button is always updated or only when a valid value is set.
+ * @param policy A Gtk::SpinButtonUpdatePolicy value.
+ */
+ void set_update_policy(SpinButtonUpdatePolicy policy);
+
+ /** Gets the update behavior of a spin button. See
+ * set_update_policy().
+ * @return The current update policy.
+ */
+ SpinButtonUpdatePolicy get_update_policy() const;
+
+
+ /** Sets the flag that determines if non-numeric text can be typed into
+ * the spin button.
+ * @param numeric Flag indicating if only numeric entry is allowed.
+ */
+ void set_numeric(bool numeric = true);
+
+ /** Returns whether non-numeric text can be typed into the spin button.
+ * See set_numeric().
+ * @return <tt>true</tt> if only numeric text can be entered.
+ */
+ bool get_numeric() const;
+
+
+ /** Increment or decrement a spin button's value in a specified direction
+ * by a specified amount.
+ * @param direction A Gtk::SpinType indicating the direction to spin.
+ * @param increment Step increment to apply in the specified direction.
+ */
+ void spin(SpinType direction, double increment);
+
+
+ /** Sets the flag that determines if a spin button value wraps around to the
+ * opposite limit when the upper or lower limit of the range is exceeded.
+ * @param wrap A flag indicating if wrapping behavior is performed.
+ */
+ void set_wrap(bool wrap = true);
+
+ /** Returns whether the spin button's value wraps around to the
+ * opposite limit when the upper or lower limit of the range is
+ * exceeded. See set_wrap().
+ * @return <tt>true</tt> if the spin button wraps around.
+ */
+ bool get_wrap() const;
+
+
+ /** Sets the policy as to whether values are corrected to the nearest step
+ * increment when a spin button is activated after providing an invalid value.
+ * @param snap_to_ticks A flag indicating if invalid values should be corrected.
+ */
+ void set_snap_to_ticks(bool snap_to_ticks = true);
+
+ /** Returns whether the values are corrected to the nearest step. See
+ * set_snap_to_ticks().
+ * @return <tt>true</tt> if values are snapped to the nearest step.
+ */
+ bool get_snap_to_ticks() const;
+
+
+ /** Manually force an update of the spin button.
+ */
+ void update();
+
+ /** Convert the Entry text to a number.
+ * The computed number should be written to <tt>*new_value</tt>.
+ * @return
+ * @li <tt>false</tt>: No conversion done, continue with default handler.
+ * @li <tt>true</tt>: Conversion successful, don't call default handler.
+ * @li <tt>Gtk::INPUT_ERROR</tt>: Conversion failed, don't call default handler.
+ */
+
+
+ Glib::SignalProxy1< int,double* > signal_input();
+
+
+ /** Convert the Adjustment position to text.
+ * The computed text should be written via Gtk::Entry::set_text().
+ * @return
+ * @li <tt>false</tt>: No conversion done, continue with default handler.
+ * @li <tt>true</tt>: Conversion successful, don't call default handler.
+ */
+
+
+ Glib::SignalProxy0< bool > signal_output();
+
+
+ Glib::SignalProxy0< void > signal_value_changed();
+
+
+ //Keybinding signals:
+
+
+ /** The adjustment that holds the value of the spinbutton.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Gtk::Adjustment*> property_adjustment() ;
+
+/** The adjustment that holds the value of the spinbutton.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Gtk::Adjustment*> property_adjustment() const;
+
+ /** The acceleration rate when you hold down a button.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<double> property_climb_rate() ;
+
+/** The acceleration rate when you hold down a button.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<double> property_climb_rate() const;
+
+ /** The number of decimal places to display.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<guint> property_digits() ;
+
+/** The number of decimal places to display.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<guint> property_digits() const;
+
+ /** Whether erroneous values are automatically changed to a spin button's nearest step increment.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_snap_to_ticks() ;
+
+/** Whether erroneous values are automatically changed to a spin button's nearest step increment.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_snap_to_ticks() const;
+
+ /** Whether non-numeric characters should be ignored.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_numeric() ;
+
+/** Whether non-numeric characters should be ignored.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_numeric() const;
+
+ /** Whether a spin button should wrap upon reaching its limits.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_wrap() ;
+
+/** Whether a spin button should wrap upon reaching its limits.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_wrap() const;
+
+ /** Whether the spin button should update always
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<SpinButtonUpdatePolicy> property_update_policy() ;
+
+/** Whether the spin button should update always
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<SpinButtonUpdatePolicy> property_update_policy() const;
+
+ /** Reads the current value
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<double> property_value() ;
+
+/** Reads the current value
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<double> property_value() const;
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::SpinButton
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::SpinButton* wrap(GtkSpinButton* object, bool take_copy = false);
+}
+#endif /* _GTKMM_SPINBUTTON_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/statusbar.cc b/libs/gtkmm2/gtk/gtkmm/statusbar.cc
new file mode 100644
index 0000000000..1e6e28071e
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/statusbar.cc
@@ -0,0 +1,338 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/statusbar.h>
+#include <gtkmm/private/statusbar_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkstatusbar.h>
+
+namespace Gtk
+{
+
+guint Statusbar::push(const Glib::ustring& text, guint context_id /* = 0 */)
+{
+ return gtk_statusbar_push(gobj(), context_id, text.c_str());
+}
+
+void Statusbar::remove_message(guint message_id, guint context_id /* = 0 */)
+{
+ return gtk_statusbar_remove(gobj(), context_id, message_id);
+}
+
+} /* namespace Gtk */
+
+
+namespace
+{
+
+void Statusbar_signal_text_pushed_callback(GtkStatusbar* self, guint p0,const gchar* p1,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,guint,const Glib::ustring& > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(p0, Glib::convert_const_gchar_ptr_to_ustring(p1)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo Statusbar_signal_text_pushed_info =
+{
+ "text_pushed",
+ (GCallback) &Statusbar_signal_text_pushed_callback,
+ (GCallback) &Statusbar_signal_text_pushed_callback
+};
+
+
+void Statusbar_signal_text_popped_callback(GtkStatusbar* self, guint p0,const gchar* p1,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,guint,const Glib::ustring& > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(p0, Glib::convert_const_gchar_ptr_to_ustring(p1)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo Statusbar_signal_text_popped_info =
+{
+ "text_popped",
+ (GCallback) &Statusbar_signal_text_popped_callback,
+ (GCallback) &Statusbar_signal_text_popped_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::Statusbar* wrap(GtkStatusbar* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::Statusbar *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Statusbar_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Statusbar_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_statusbar_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Statusbar_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->text_pushed = &text_pushed_callback;
+ klass->text_popped = &text_popped_callback;
+}
+
+
+void Statusbar_Class::text_pushed_callback(GtkStatusbar* self, guint p0, const gchar* p1)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_text_pushed(p0, Glib::convert_const_gchar_ptr_to_ustring(p1)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->text_pushed)
+ (*base->text_pushed)(self, p0, p1);
+ }
+}
+
+void Statusbar_Class::text_popped_callback(GtkStatusbar* self, guint p0, const gchar* p1)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_text_popped(p0, Glib::convert_const_gchar_ptr_to_ustring(p1)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->text_popped)
+ (*base->text_popped)(self, p0, p1);
+ }
+}
+
+
+Glib::ObjectBase* Statusbar_Class::wrap_new(GObject* o)
+{
+ return manage(new Statusbar((GtkStatusbar*)(o)));
+
+}
+
+
+/* The implementation: */
+
+Statusbar::Statusbar(const Glib::ConstructParams& construct_params)
+:
+ Gtk::HBox(construct_params)
+{
+ }
+
+Statusbar::Statusbar(GtkStatusbar* castitem)
+:
+ Gtk::HBox((GtkHBox*)(castitem))
+{
+ }
+
+Statusbar::~Statusbar()
+{
+ destroy_();
+}
+
+Statusbar::CppClassType Statusbar::statusbar_class_; // initialize static member
+
+GType Statusbar::get_type()
+{
+ return statusbar_class_.init().get_type();
+}
+
+GType Statusbar::get_base_type()
+{
+ return gtk_statusbar_get_type();
+}
+
+
+Statusbar::Statusbar()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::HBox(Glib::ConstructParams(statusbar_class_.init()))
+{
+ }
+
+guint Statusbar::get_context_id(const Glib::ustring& context_description)
+{
+ return gtk_statusbar_get_context_id(gobj(), context_description.c_str());
+}
+
+void Statusbar::pop(guint context_id)
+{
+ gtk_statusbar_pop(gobj(), context_id);
+}
+
+void Statusbar::set_has_resize_grip(bool setting)
+{
+ gtk_statusbar_set_has_resize_grip(gobj(), static_cast<int>(setting));
+}
+
+bool Statusbar::get_has_resize_grip() const
+{
+ return gtk_statusbar_get_has_resize_grip(const_cast<GtkStatusbar*>(gobj()));
+}
+
+
+Glib::SignalProxy2< void,guint,const Glib::ustring& > Statusbar::signal_text_pushed()
+{
+ return Glib::SignalProxy2< void,guint,const Glib::ustring& >(this, &Statusbar_signal_text_pushed_info);
+}
+
+Glib::SignalProxy2< void,guint,const Glib::ustring& > Statusbar::signal_text_popped()
+{
+ return Glib::SignalProxy2< void,guint,const Glib::ustring& >(this, &Statusbar_signal_text_popped_info);
+}
+
+
+Glib::PropertyProxy<bool> Statusbar::property_has_resize_grip()
+{
+ return Glib::PropertyProxy<bool>(this, "has-resize-grip");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Statusbar::property_has_resize_grip() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "has-resize-grip");
+}
+
+
+void Gtk::Statusbar::on_text_pushed(guint context_id, const Glib::ustring& text)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->text_pushed)
+ (*base->text_pushed)(gobj(),context_id,text.c_str());
+}
+
+void Gtk::Statusbar::on_text_popped(guint context_id, const Glib::ustring& text)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->text_popped)
+ (*base->text_popped)(gobj(),context_id,text.c_str());
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/statusbar.h b/libs/gtkmm2/gtk/gtkmm/statusbar.h
new file mode 100644
index 0000000000..6bade10932
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/statusbar.h
@@ -0,0 +1,163 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_STATUSBAR_H
+#define _GTKMM_STATUSBAR_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* statusbar.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/box.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkStatusbar GtkStatusbar;
+typedef struct _GtkStatusbarClass GtkStatusbarClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class Statusbar_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** Text status indicator
+ * This widget is used to display status information.
+ * Messages are pushed and poped onto a message stack.
+ * When text is pushed it replaces the old contents.
+ * The old text is restored when popped.
+ *
+ * It derives from Gtk::HBox so that additional information can be added
+ * easily.
+ *
+ * @ingroup Widgets
+ */
+
+class Statusbar : public HBox
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Statusbar CppObjectType;
+ typedef Statusbar_Class CppClassType;
+ typedef GtkStatusbar BaseObjectType;
+ typedef GtkStatusbarClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~Statusbar();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class Statusbar_Class;
+ static CppClassType statusbar_class_;
+
+ // noncopyable
+ Statusbar(const Statusbar&);
+ Statusbar& operator=(const Statusbar&);
+
+protected:
+ explicit Statusbar(const Glib::ConstructParams& construct_params);
+ explicit Statusbar(GtkStatusbar* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkStatusbar* gobj() { return reinterpret_cast<GtkStatusbar*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkStatusbar* gobj() const { return reinterpret_cast<GtkStatusbar*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_text_pushed(guint context_id, const Glib::ustring& text);
+ virtual void on_text_popped(guint context_id, const Glib::ustring& text);
+
+
+private:
+
+
+public:
+ Statusbar();
+
+
+ guint get_context_id(const Glib::ustring& context_description);
+ guint push(const Glib::ustring& text, guint context_id = 0);
+
+ void pop(guint context_id = 0);
+ void remove_message(guint message_id, guint context_id = 0);
+
+ void set_has_resize_grip(bool setting = true);
+
+ bool get_has_resize_grip() const;
+
+
+ Glib::SignalProxy2< void,guint,const Glib::ustring& > signal_text_pushed();
+
+
+ Glib::SignalProxy2< void,guint,const Glib::ustring& > signal_text_popped();
+
+
+ /** Whether the statusbar has a grip for resizing the toplevel.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_has_resize_grip() ;
+
+/** Whether the statusbar has a grip for resizing the toplevel.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_has_resize_grip() const;
+
+
+};
+
+} /* namespace Gtk */
+
+
+namespace Glib
+{
+ /** @relates Gtk::Statusbar
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::Statusbar* wrap(GtkStatusbar* object, bool take_copy = false);
+}
+#endif /* _GTKMM_STATUSBAR_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/stock.cc b/libs/gtkmm2/gtk/gtkmm/stock.cc
new file mode 100644
index 0000000000..eb13cc0ef8
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/stock.cc
@@ -0,0 +1,160 @@
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/stock.h>
+#include <gtkmm/stockitem.h>
+#include <gtk/gtkstock.h>
+
+// Get rid of macro DELETE (from winnt.h). We have some macro
+// shadowing magic in stock.h, but it's safer to get rid of it
+// entirely in the .cc file.
+#undef DELETE
+
+
+namespace Gtk
+{
+
+namespace Stock
+{
+
+const Gtk::BuiltinStockID DIALOG_AUTHENTICATION = { GTK_STOCK_DIALOG_AUTHENTICATION };
+const Gtk::BuiltinStockID DIALOG_INFO = { GTK_STOCK_DIALOG_INFO };
+const Gtk::BuiltinStockID DIALOG_WARNING = { GTK_STOCK_DIALOG_WARNING };
+const Gtk::BuiltinStockID DIALOG_ERROR = { GTK_STOCK_DIALOG_ERROR };
+const Gtk::BuiltinStockID DIALOG_QUESTION = { GTK_STOCK_DIALOG_QUESTION };
+const Gtk::BuiltinStockID DND = { GTK_STOCK_DND };
+const Gtk::BuiltinStockID DND_MULTIPLE = { GTK_STOCK_DND_MULTIPLE };
+const Gtk::BuiltinStockID ABOUT = { GTK_STOCK_ABOUT };
+const Gtk::BuiltinStockID ADD = { GTK_STOCK_ADD };
+const Gtk::BuiltinStockID APPLY= { GTK_STOCK_APPLY };
+const Gtk::BuiltinStockID BOLD= { GTK_STOCK_BOLD };
+const Gtk::BuiltinStockID CANCEL = { GTK_STOCK_CANCEL };
+const Gtk::BuiltinStockID CDROM = { GTK_STOCK_CDROM };
+const Gtk::BuiltinStockID CLEAR = { GTK_STOCK_CLEAR };
+const Gtk::BuiltinStockID CLOSE = { GTK_STOCK_CLOSE };
+const Gtk::BuiltinStockID COLOR_PICKER = { GTK_STOCK_COLOR_PICKER };
+const Gtk::BuiltinStockID CONVERT = { GTK_STOCK_CONVERT };
+const Gtk::BuiltinStockID CONNECT = { GTK_STOCK_CONNECT };
+const Gtk::BuiltinStockID COPY = { GTK_STOCK_COPY };
+const Gtk::BuiltinStockID CUT = { GTK_STOCK_CUT };
+const Gtk::BuiltinStockID DELETE = { GTK_STOCK_DELETE };
+const Gtk::BuiltinStockID DIRECTORY = { GTK_STOCK_DIRECTORY };
+const Gtk::BuiltinStockID DISCONNECT = { GTK_STOCK_DISCONNECT };
+const Gtk::BuiltinStockID EDIT = { GTK_STOCK_EDIT };
+const Gtk::BuiltinStockID EXECUTE = { GTK_STOCK_EXECUTE };
+const Gtk::BuiltinStockID FILE = { GTK_STOCK_FILE };
+const Gtk::BuiltinStockID FIND = { GTK_STOCK_FIND };
+const Gtk::BuiltinStockID FIND_AND_REPLACE = { GTK_STOCK_FIND_AND_REPLACE };
+const Gtk::BuiltinStockID FLOPPY = { GTK_STOCK_FLOPPY };
+const Gtk::BuiltinStockID GOTO_BOTTOM = { GTK_STOCK_GOTO_BOTTOM };
+const Gtk::BuiltinStockID GOTO_FIRST = { GTK_STOCK_GOTO_FIRST };
+const Gtk::BuiltinStockID GOTO_LAST = { GTK_STOCK_GOTO_LAST };
+const Gtk::BuiltinStockID GOTO_TOP = { GTK_STOCK_GOTO_TOP };
+const Gtk::BuiltinStockID GO_BACK = { GTK_STOCK_GO_BACK };
+const Gtk::BuiltinStockID GO_DOWN = { GTK_STOCK_GO_DOWN };
+const Gtk::BuiltinStockID GO_FORWARD = { GTK_STOCK_GO_FORWARD };
+const Gtk::BuiltinStockID GO_UP = { GTK_STOCK_GO_UP };
+const Gtk::BuiltinStockID HARDDISK = { GTK_STOCK_HARDDISK };
+const Gtk::BuiltinStockID HELP = { GTK_STOCK_HELP };
+const Gtk::BuiltinStockID HOME = { GTK_STOCK_HOME };
+const Gtk::BuiltinStockID INDEX = { GTK_STOCK_INDEX };
+const Gtk::BuiltinStockID INDENT = { GTK_STOCK_INDENT };
+const Gtk::BuiltinStockID UNINDENT = { GTK_STOCK_UNINDENT };
+const Gtk::BuiltinStockID ITALIC = { GTK_STOCK_ITALIC };
+const Gtk::BuiltinStockID JUMP_TO = { GTK_STOCK_JUMP_TO };
+const Gtk::BuiltinStockID JUSTIFY_CENTER = { GTK_STOCK_JUSTIFY_CENTER };
+const Gtk::BuiltinStockID JUSTIFY_FILL = { GTK_STOCK_JUSTIFY_FILL };
+const Gtk::BuiltinStockID JUSTIFY_LEFT = { GTK_STOCK_JUSTIFY_LEFT };
+const Gtk::BuiltinStockID JUSTIFY_RIGHT = { GTK_STOCK_JUSTIFY_RIGHT };
+const Gtk::BuiltinStockID MISSING_IMAGE = { GTK_STOCK_MISSING_IMAGE };
+const Gtk::BuiltinStockID MEDIA_FORWARD = { GTK_STOCK_MEDIA_FORWARD };
+const Gtk::BuiltinStockID MEDIA_NEXT = { GTK_STOCK_MEDIA_NEXT };
+const Gtk::BuiltinStockID MEDIA_PAUSE = { GTK_STOCK_MEDIA_PAUSE };
+const Gtk::BuiltinStockID MEDIA_PLAY = { GTK_STOCK_MEDIA_PLAY };
+const Gtk::BuiltinStockID MEDIA_PREVIOUS = { GTK_STOCK_MEDIA_PREVIOUS };
+const Gtk::BuiltinStockID MEDIA_RECORD = { GTK_STOCK_MEDIA_RECORD };
+const Gtk::BuiltinStockID MEDIA_REWIND = { GTK_STOCK_MEDIA_REWIND };
+const Gtk::BuiltinStockID MEDIA_STOP = { GTK_STOCK_MEDIA_STOP };
+const Gtk::BuiltinStockID NETWORK = { GTK_STOCK_NETWORK };
+const Gtk::BuiltinStockID NEW = { GTK_STOCK_NEW };
+const Gtk::BuiltinStockID NO = { GTK_STOCK_NO };
+const Gtk::BuiltinStockID OK = { GTK_STOCK_OK };
+const Gtk::BuiltinStockID OPEN = { GTK_STOCK_OPEN };
+const Gtk::BuiltinStockID PASTE = { GTK_STOCK_PASTE };
+const Gtk::BuiltinStockID PREFERENCES = { GTK_STOCK_PREFERENCES };
+const Gtk::BuiltinStockID PRINT = { GTK_STOCK_PRINT };
+const Gtk::BuiltinStockID PRINT_PREVIEW = { GTK_STOCK_PRINT_PREVIEW };
+const Gtk::BuiltinStockID PROPERTIES = { GTK_STOCK_PROPERTIES };
+const Gtk::BuiltinStockID QUIT = { GTK_STOCK_QUIT };
+const Gtk::BuiltinStockID REDO = { GTK_STOCK_REDO };
+const Gtk::BuiltinStockID REFRESH = { GTK_STOCK_REFRESH };
+const Gtk::BuiltinStockID REMOVE = { GTK_STOCK_REMOVE };
+const Gtk::BuiltinStockID REVERT_TO_SAVED = { GTK_STOCK_REVERT_TO_SAVED };
+const Gtk::BuiltinStockID SAVE = { GTK_STOCK_SAVE };
+const Gtk::BuiltinStockID SAVE_AS = { GTK_STOCK_SAVE_AS };
+const Gtk::BuiltinStockID SELECT_COLOR = { GTK_STOCK_SELECT_COLOR };
+const Gtk::BuiltinStockID SELECT_FONT = { GTK_STOCK_SELECT_FONT };
+const Gtk::BuiltinStockID SORT_ASCENDING = { GTK_STOCK_SORT_ASCENDING };
+const Gtk::BuiltinStockID SORT_DESCENDING = { GTK_STOCK_SORT_DESCENDING };
+const Gtk::BuiltinStockID SPELL_CHECK = { GTK_STOCK_SPELL_CHECK };
+const Gtk::BuiltinStockID STOP = { GTK_STOCK_STOP };
+const Gtk::BuiltinStockID STRIKETHROUGH = { GTK_STOCK_STRIKETHROUGH };
+const Gtk::BuiltinStockID UNDELETE = { GTK_STOCK_UNDELETE };
+const Gtk::BuiltinStockID UNDERLINE = { GTK_STOCK_UNDERLINE };
+const Gtk::BuiltinStockID UNDO = { GTK_STOCK_UNDO };
+const Gtk::BuiltinStockID YES = { GTK_STOCK_YES };
+const Gtk::BuiltinStockID ZOOM_100 = { GTK_STOCK_ZOOM_100 };
+const Gtk::BuiltinStockID ZOOM_FIT = { GTK_STOCK_ZOOM_FIT };
+const Gtk::BuiltinStockID ZOOM_IN = { GTK_STOCK_ZOOM_IN };
+const Gtk::BuiltinStockID ZOOM_OUT = { GTK_STOCK_ZOOM_OUT };
+
+
+void add(const Gtk::StockItem& item)
+{
+ gtk_stock_add(item.gobj(), 1);
+}
+
+bool lookup(const Gtk::StockID& stock_id, Gtk::StockItem& item)
+{
+ return Gtk::StockItem::lookup(stock_id, item);
+}
+
+bool lookup(const Gtk::StockID& stock_id, Gtk::IconSet& iconset)
+{
+ iconset = Gtk::IconSet::lookup_default(stock_id);
+ return (iconset.gobj() != 0);
+}
+
+bool lookup(const Gtk::StockID& stock_id, Gtk::IconSize size, Gtk::Image& image)
+{
+ image.set(stock_id, size);
+ return (image.gobj() != 0);
+}
+
+Glib::SListHandle<Gtk::StockID,Gtk::StockID_Traits> get_ids()
+{
+ return Glib::SListHandle<Gtk::StockID,Gtk::StockID_Traits>(
+ gtk_stock_list_ids(), Glib::OWNERSHIP_DEEP);
+}
+
+} // namespace Stock
+
+} // namespace Gtk
+
diff --git a/libs/gtkmm2/gtk/gtkmm/stock.h b/libs/gtkmm2/gtk/gtkmm/stock.h
new file mode 100644
index 0000000000..e7f3888241
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/stock.h
@@ -0,0 +1,166 @@
+// -*- c++ -*-
+#ifndef _GTKMM_STOCK_H
+#define _GTKMM_STOCK_H
+
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/stockitem.h>
+#include <gtkmm/stockid.h>
+#include <gtkmm/iconset.h>
+#include <gtkmm/image.h>
+
+/* Shadow DELETE macro (from winnt.h).
+ */
+#if defined(DELETE) && !defined(GTKMM_MACRO_SHADOW_DELETE)
+enum { GTKMM_MACRO_DEFINITION_DELETE = DELETE };
+#undef DELETE
+enum { DELETE = GTKMM_MACRO_DEFINITION_DELETE };
+#define DELETE DELETE
+#define GTKMM_MACRO_SHADOW_DELETE 1
+#endif
+
+
+namespace Gtk
+{
+
+// Created like so:
+// const BuiltinStockID DIALOG_INFO = { GTK_STOCK_DIALOG_INFO }
+
+/** See the list of pre-defined stock items, in the Stock namespace.
+ */
+struct BuiltinStockID
+{
+ const char* id;
+};
+
+namespace Stock
+{
+
+extern GTKMM_API const Gtk::BuiltinStockID DIALOG_AUTHENTICATION; /*!< @image html stock_dialog_authentication_48.png */
+
+extern GTKMM_API const Gtk::BuiltinStockID DIALOG_INFO; /*!< @image html stock_dialog_info_48.png */
+extern GTKMM_API const Gtk::BuiltinStockID DIALOG_WARNING; /*!< @image html stock_dialog_warning_48.png */
+extern GTKMM_API const Gtk::BuiltinStockID DIALOG_ERROR; /*!< @image html stock_dialog_error_48.png */
+extern GTKMM_API const Gtk::BuiltinStockID DIALOG_QUESTION; /*!< @image html stock_dialog_question_48.png */
+
+// These aren't real stock items, because they provide only an icon.
+extern GTKMM_API const Gtk::BuiltinStockID DND; /*!< @image html stock_dnd_32.png */
+extern GTKMM_API const Gtk::BuiltinStockID DND_MULTIPLE; /*!< @image html stock_dnd_multiple_32.png */
+
+extern GTKMM_API const Gtk::BuiltinStockID ABOUT; /*!< @image html stock_about_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID ADD; /*!< @image html stock_add_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID APPLY; /*!< @image html stock_apply_20.png */
+extern GTKMM_API const Gtk::BuiltinStockID BOLD; /*!< @image html stock_text_bold_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID CANCEL; /*!< @image html stock_cancel_20.png */
+extern GTKMM_API const Gtk::BuiltinStockID CDROM; /*!< @image html stock_cdrom_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID CLEAR; /*!< @image html stock_clear_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID CLOSE; /*!< @image html stock_close_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID COLOR_PICKER; /*!< @image html stock_color_picker_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID CONVERT; /*!< @image html stock_convert_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID CONNECT; /*!< @image html stock_connect_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID COPY; /*!< @image html stock_copy_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID CUT; /*!< @image html stock_cut_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID DELETE; /*!< @image html stock_trash_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID DIRECTORY; /*!< @image html stock_directory_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID DISCONNECT; /*!< @image html stock_disconnect_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID EDIT; /*!< @image html stock_edit_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID EXECUTE; /*!< @image html stock_exec_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID FILE; /*!< @image html stock_file_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID FIND; /*!< @image html stock_search_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID FIND_AND_REPLACE; /*!< @image html stock_search_replace_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID FLOPPY; /*!< @image html stock_save_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID GOTO_BOTTOM; /*!< @image html stock_bottom_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID GOTO_FIRST; /*!< @image html stock_first_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID GOTO_LAST; /*!< @image html stock_last_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID GOTO_TOP; /*!< @image html stock_top_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID GO_BACK; /*!< @image html stock_left_arrow_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID GO_DOWN; /*!< @image html stock_down_arrow_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID GO_FORWARD; /*!< @image html stock_right_arrow_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID GO_UP; /*!< @image html stock_up_arrow_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID HARDDISK; /*!< @image html stock_harddisk_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID HELP; /*!< @image html stock_help_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID HOME; /*!< @image html stock_home_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID INDEX; /*!< @image html stock_index_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID INDENT; /*!< @image html stock_indent_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID UNINDENT; /*!< @image html stock_unindent_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID ITALIC; /*!< @image html stock_text_italic_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID JUMP_TO; /*!< @image html stock_jump_to_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID JUSTIFY_CENTER; /*!< @image html stock_align_center_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID JUSTIFY_FILL; /*!< @image html stock_align_justify_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID JUSTIFY_LEFT; /*!< @image html stock_align_left_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID JUSTIFY_RIGHT; /*!< @image html stock_align_right_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID MISSING_IMAGE; /*!< @image html stock_broken_image_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID MEDIA_FORWARD; /*!< @image html stock_media_forward_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID MEDIA_NEXT; /*!< @image html stock_media_next_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID MEDIA_PAUSE; /*!< @image html stock_media_pause_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID MEDIA_PLAY; /*!< @image html stock_media_play_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID MEDIA_PREVIOUS; /*!< @image html stock_media_previous_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID MEDIA_RECORD; /*!< @image html stock_media_record_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID MEDIA_REWIND; /*!< @image html stock_media_rewind_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID MEDIA_STOP; /*!< @image html stock_media_stop_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID NETWORK; /*!< @image html stock_network_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID NEW; /*!< @image html stock_new_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID NO; /*!< @image html stock_no_20.png */
+extern GTKMM_API const Gtk::BuiltinStockID OK; /*!< @image html stock_ok_20.png */
+extern GTKMM_API const Gtk::BuiltinStockID OPEN; /*!< @image html stock_open_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID PASTE; /*!< @image html stock_paste_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID PREFERENCES; /*!< @image html stock_preferences_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID PRINT; /*!< @image html stock_print_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID PRINT_PREVIEW; /*!< @image html stock_print_preview_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID PROPERTIES; /*!< @image html stock_properties_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID QUIT; /*!< @image html stock_exit_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID REDO; /*!< @image html stock_redo_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID REFRESH; /*!< @image html stock_refresh_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID REMOVE; /*!< @image html stock_remove_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID REVERT_TO_SAVED; /*!< @image html stock_revert_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID SAVE; /*!< @image html stock_save_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID SAVE_AS; /*!< @image html stock_save_as_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID SELECT_COLOR; /*!< @image html stock_colorselector_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID SELECT_FONT; /*!< @image html stock_font_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID SORT_ASCENDING; /*!< @image html stock_sort_ascending_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID SORT_DESCENDING; /*!< @image html stock_sort_descending_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID SPELL_CHECK; /*!< @image html stock_spellcheck_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID STOP; /*!< @image html stock_stop_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID STRIKETHROUGH; /*!< @image html stock_text_strikethrough_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID UNDELETE; /*!< @image html stock_undelete_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID UNDERLINE; /*!< @image html stock_text_underline_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID UNDO; /*!< @image html stock_undo_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID YES; /*!< @image html stock_yes_20.png */
+extern GTKMM_API const Gtk::BuiltinStockID ZOOM_100; /*!< @image html stock_zoom_1_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID ZOOM_FIT; /*!< @image html stock_zoom_fit_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID ZOOM_IN; /*!< @image html stock_zoom_in_24.png */
+extern GTKMM_API const Gtk::BuiltinStockID ZOOM_OUT; /*!< @image html stock_zoom_out_24.png */
+
+
+void add(const Gtk::StockItem& item);
+
+bool lookup(const Gtk::StockID& stock_id, Gtk::StockItem& item);
+bool lookup(const Gtk::StockID& stock_id, Gtk::IconSet& iconset);
+bool lookup(const Gtk::StockID& stock_id, Gtk::IconSize size, Gtk::Image& image);
+
+Glib::SListHandle<Gtk::StockID,Gtk::StockID_Traits> get_ids();
+
+} // namespace Stock
+
+} // namespace Gtk
+
+
+#endif /* _GTKMM_STOCK_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/stockid.cc b/libs/gtkmm2/gtk/gtkmm/stockid.cc
new file mode 100644
index 0000000000..93c50a1c2e
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/stockid.cc
@@ -0,0 +1,80 @@
+// -*- c++ -*-
+/* $Id$ */
+
+/* stockid.cc
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/stockid.h>
+#include <gtkmm/stock.h>
+
+
+namespace Gtk
+{
+
+StockID::StockID()
+{}
+
+StockID::StockID(const BuiltinStockID& id)
+:
+ id_ (id.id)
+{}
+
+StockID::StockID(const Glib::ustring& id)
+:
+ id_ (id)
+{}
+
+StockID::StockID(const char* id)
+:
+ id_ ((id) ? id : "")
+{}
+
+StockID::~StockID()
+{}
+
+StockID::StockID(const StockID& other)
+:
+ id_ (other.id_)
+{}
+
+StockID& StockID::operator=(const StockID& other)
+{
+ id_ = other.id_;
+ return *this;
+}
+
+bool StockID::equal(const StockID& rhs) const
+{
+ // Do an exact per-byte comparison:
+ // Locale-dependent collation is probably not appropriate for stock IDs.
+ return (id_.raw() == rhs.id_.raw());
+}
+
+Glib::ustring StockID::get_string() const
+{
+ return id_;
+}
+
+const char* StockID::get_c_str() const
+{
+ return id_.c_str();
+}
+
+} // namespace Gtk
+
diff --git a/libs/gtkmm2/gtk/gtkmm/stockid.h b/libs/gtkmm2/gtk/gtkmm/stockid.h
new file mode 100644
index 0000000000..fac665dea4
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/stockid.h
@@ -0,0 +1,97 @@
+// -*- c++ -*-
+#ifndef _GTKMM_STOCKID_H
+#define _GTKMM_STOCKID_H
+
+/* $Id$ */
+
+/* stockid.h
+ *
+ * Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm.h>
+
+namespace Gtk
+{
+
+struct BuiltinStockID;
+
+/** See also Gtk::BuiltinStockID.
+ */
+class StockID
+{
+public:
+ StockID(); //TODO: This was added for Action::Action, but there might be a better way to do this.
+ StockID(const BuiltinStockID& id);
+ explicit StockID(const Glib::ustring& id);
+ explicit StockID(const char* id); // id can be 0
+ ~StockID();
+
+ StockID(const StockID& other);
+ StockID& operator=(const StockID& other);
+
+ bool equal(const StockID& rhs) const;
+
+ Glib::ustring get_string() const;
+ const char* get_c_str() const;
+
+protected:
+ Glib::ustring id_;
+};
+
+/** @relates Gtk::StockID */
+inline bool operator==(const StockID& lhs, const StockID& rhs)
+ { return lhs.equal(rhs); }
+
+/** @relates Gtk::StockID */
+inline bool operator!=(const StockID& lhs, const StockID& rhs)
+ { return !lhs.equal(rhs); }
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+struct StockID_Traits : public Glib::Container_Helpers::TypeTraits<Glib::ustring>
+{
+ typedef Gtk::StockID CppType;
+
+ static const char* to_c_type(const StockID& id) { return id.get_c_str(); }
+ static StockID to_cpp_type(const char* str) { return StockID(str); }
+};
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::StockID> : public Glib::ValueBase_String
+{
+public:
+ typedef Gtk::StockID CppType;
+
+ void set(const Gtk::StockID& data) { set_cstring(data.get_c_str()); }
+ Gtk::StockID get() const { return Gtk::StockID(get_cstring()); }
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+#endif /* _GTKMM_STOCKID_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/stockitem.cc b/libs/gtkmm2/gtk/gtkmm/stockitem.cc
new file mode 100644
index 0000000000..3a2c10687e
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/stockitem.cc
@@ -0,0 +1,166 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/stockitem.h>
+#include <gtkmm/private/stockitem_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkstock.h>
+
+namespace Gtk
+{
+
+StockItem::StockItem(const Gtk::StockID& stock_id,
+ const Glib::ustring& label,
+ Gdk::ModifierType modifier,
+ unsigned int keyval,
+ const Glib::ustring& translation_domain)
+{
+ const GtkStockItem stock_item =
+ {
+ const_cast<char*>(stock_id.get_c_str()),
+ const_cast<char*>(label.c_str()),
+ static_cast<GdkModifierType>(unsigned(modifier)),
+ keyval,
+ (translation_domain.empty()) ? 0 : const_cast<char*>(translation_domain.c_str())
+ };
+
+ gobject_ = gtk_stock_item_copy(&stock_item);
+}
+
+// static
+bool StockItem::lookup(const Gtk::StockID& stock_id, Gtk::StockItem& item)
+{
+ GtkStockItem item_gobj = { 0, 0, GdkModifierType(0), 0, 0, };
+ const bool known_id = gtk_stock_lookup(stock_id.get_c_str(), &item_gobj);
+
+ if(item.gobject_)
+ gtk_stock_item_free(item.gobject_);
+
+ item.gobject_ = (known_id) ? gtk_stock_item_copy(&item_gobj) : 0;
+
+ return known_id;
+}
+
+} // namespace Gtk
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::StockItem wrap(GtkStockItem* object, bool take_copy /* = false */)
+{
+ return Gtk::StockItem(object, take_copy);
+}
+
+} // namespace Glib
+
+
+namespace Gtk
+{
+
+
+StockItem::StockItem()
+:
+ gobject_ (0) // Allows creation of invalid wrapper, e.g. for output arguments to methods.
+{}
+
+StockItem::StockItem(const StockItem& src)
+:
+ gobject_ ((src.gobject_) ? gtk_stock_item_copy(src.gobject_) : 0)
+{}
+
+StockItem::StockItem(GtkStockItem* castitem, bool make_a_copy /* = false */)
+{
+ if(!make_a_copy)
+ {
+ // It was given to us by a function which has already made a copy for us to keep.
+ gobject_ = castitem;
+ }
+ else
+ {
+ // We are probably getting it via direct access to a struct,
+ // so we can not just take it - we have to take a copy of it.
+ if(castitem)
+ gobject_ = gtk_stock_item_copy(castitem);
+ else
+ gobject_ = 0;
+ }
+}
+
+StockItem& StockItem::operator=(const StockItem& src)
+{
+ GtkStockItem *const new_gobject = (src.gobject_) ? gtk_stock_item_copy(src.gobject_) : 0;
+
+ if(gobject_)
+ gtk_stock_item_free(gobject_);
+
+ gobject_ = new_gobject;
+
+ return *this;
+}
+
+StockItem::~StockItem()
+{
+ if(gobject_)
+ gtk_stock_item_free(gobject_);
+}
+
+GtkStockItem* StockItem::gobj_copy() const
+{
+ return gtk_stock_item_copy(gobject_);
+}
+
+
+StockID StockItem::get_stock_id() const
+{
+ return StockID(gobj()->stock_id);
+}
+
+Glib::ustring StockItem::get_label() const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(gobj()->label);
+}
+
+Gdk::ModifierType StockItem::get_modifier() const
+{
+ return ((Gdk::ModifierType)(gobj()->modifier));
+}
+
+guint StockItem::get_keyval() const
+{
+ return gobj()->keyval;
+}
+
+Glib::ustring StockItem::get_translation_domain() const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(gobj()->translation_domain);
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/stockitem.h b/libs/gtkmm2/gtk/gtkmm/stockitem.h
new file mode 100644
index 0000000000..f500c0f12a
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/stockitem.h
@@ -0,0 +1,103 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_STOCKITEM_H
+#define _GTKMM_STOCKITEM_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright(C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software, ) you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation, ) either
+ * version 2 of the License, or(at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY, ) without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library, ) if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gdkmm/types.h>
+#include <gtkmm/stockid.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C"
+{
+ typedef struct _GtkStockItem GtkStockItem;
+}
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+namespace Gtk
+{
+
+class StockItem
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef StockItem CppObjectType;
+ typedef GtkStockItem BaseObjectType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ StockItem();
+
+ // Use make_a_copy=true when getting it directly from a struct.
+ explicit StockItem(GtkStockItem* castitem, bool make_a_copy = false);
+
+ StockItem(const StockItem& src);
+ StockItem& operator=(const StockItem& src);
+
+ ~StockItem();
+
+ GtkStockItem* gobj() { return gobject_; }
+ const GtkStockItem* gobj() const { return gobject_; }
+
+ ///Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs.
+ GtkStockItem* gobj_copy() const;
+
+protected:
+ GtkStockItem* gobject_;
+
+private:
+
+
+public:
+ StockItem(const Gtk::StockID& stock_id, const Glib::ustring& label,
+ Gdk::ModifierType modifier = Gdk::ModifierType(0), unsigned int keyval = 0,
+ const Glib::ustring& translation_domain = Glib::ustring());
+
+ StockID get_stock_id() const;
+ Glib::ustring get_label() const;
+ Gdk::ModifierType get_modifier() const;
+ guint get_keyval() const;
+ Glib::ustring get_translation_domain() const;
+
+ static bool lookup(const Gtk::StockID& stock_id, Gtk::StockItem& item);
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+
+ /** @relates Gtk::StockItem
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+Gtk::StockItem wrap(GtkStockItem* object, bool take_copy = false);
+
+} // namespace Glib
+
+#endif /* _GTKMM_STOCKITEM_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/style.cc b/libs/gtkmm2/gtk/gtkmm/style.cc
new file mode 100644
index 0000000000..ed4d97fcbc
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/style.cc
@@ -0,0 +1,2208 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/style.h>
+#include <gtkmm/private/style_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/widget.h>
+#include <gtkmm/rc.h>
+#include <gtk/gtkstyle.h>
+
+
+namespace Gtk
+{
+
+/*
+Design notes:
+
+Okay these are my notes on how a GtkStyle works.
+They are not meant to be taken as documentation as I didn't
+write the code.
+
+styles keeps a copy of itself for each color depth. Thus
+changing a style after it has been attached wont work!
+
+At allocation time a Gtk Style has
+ - all GC set to 0 as they will be allocated later
+ - has all color values set to default values.
+ - a ref count of 1 and an attach count of 0 (floating?)
+ - a properly referenced font.
+ - colormap and depth are invalid.
+ - The style list and rcstyle are 0. (??? styles wasn't set explicitly!)
+
+It returns to this state if the style is detatched from
+all widgets.
+
+Attach acts to sink the object removing it from the floating state.
+
+attaching a style for the first time initializes it.
+Initializing a style
+ - sets the colormap and depth.
+ - sets the mid colors. (thus allowing user to set these would be pointless)
+ - gets black and white from the colormap.
+ - allocates all the colors.
+ - uses gtk_gc_get to share a gc if there is a matching one.
+
+Conclusions, we need to rework the concept of Gdk to allow
+for const objects.
+
+*/
+
+void Style::set_font(const Pango::FontDescription& font_desc)
+{
+ g_return_if_fail(font_desc.gobj() != 0);
+
+ // It will be freed when it goes out of scope.
+ const Pango::FontDescription fontBefore (gobj()->font_desc, false);
+
+ gobj()->font_desc = font_desc.gobj_copy();
+}
+
+Pango::FontDescription Style::get_font() const
+{
+ // Direct struct access seems the only way.
+ return Pango::FontDescription(gobj()->font_desc, true); // true = make a copy.
+}
+
+Glib::RefPtr<Gdk::GC> Style::get_fg_gc(StateType state_type)
+{
+ return Glib::wrap(gobj()->fg_gc[state_type], true);
+}
+
+Glib::RefPtr<const Gdk::GC> Style::get_fg_gc(StateType state_type) const
+{
+ return Glib::wrap(gobj()->fg_gc[state_type], true);
+}
+
+Glib::RefPtr<Gdk::GC> Style::get_bg_gc(StateType state_type)
+{
+ return Glib::wrap(gobj()->bg_gc[state_type], true);
+}
+
+Glib::RefPtr<const Gdk::GC> Style::get_bg_gc(StateType state_type) const
+{
+ return Glib::wrap(gobj()->bg_gc[state_type], true);
+}
+
+Glib::RefPtr<Gdk::GC> Style::get_light_gc(StateType state_type)
+{
+ return Glib::wrap(gobj()->light_gc[state_type], true);
+}
+
+Glib::RefPtr<const Gdk::GC> Style::get_light_gc(StateType state_type) const
+{
+ return Glib::wrap(gobj()->light_gc[state_type], true);
+}
+
+Glib::RefPtr<Gdk::GC> Style::get_dark_gc(StateType state_type)
+{
+ return Glib::wrap(gobj()->dark_gc[state_type], true);
+}
+
+Glib::RefPtr<const Gdk::GC> Style::get_dark_gc(StateType state_type) const
+{
+ return Glib::wrap(gobj()->dark_gc[state_type], true);
+}
+
+Glib::RefPtr<Gdk::GC> Style::get_mid_gc(StateType state_type)
+{
+ return Glib::wrap(gobj()->mid_gc[state_type], true);
+}
+
+Glib::RefPtr<const Gdk::GC> Style::get_mid_gc(StateType state_type) const
+{
+ return Glib::wrap(gobj()->mid_gc[state_type], true);
+}
+
+Glib::RefPtr<Gdk::GC> Style::get_text_gc(StateType state_type)
+{
+ return Glib::wrap(gobj()->text_gc[state_type], true);
+}
+
+Glib::RefPtr<const Gdk::GC> Style::get_text_gc(StateType state_type) const
+{
+ return Glib::wrap(gobj()->text_gc[state_type], true);
+}
+
+Glib::RefPtr<Gdk::GC> Style::get_base_gc(StateType state_type)
+{
+ return Glib::wrap(gobj()->base_gc[state_type], true);
+}
+
+Glib::RefPtr<const Gdk::GC> Style::get_base_gc(StateType state_type) const
+{
+ return Glib::wrap(gobj()->base_gc[state_type], true);
+}
+
+Gdk::Color Style::get_background(StateType state_type) const
+{
+ GdkColor* pGdkColor = const_cast<GdkColor*>(&(gobj()->bg[state_type]));
+ return Glib::wrap(pGdkColor, true); //true = take_copy.
+}
+
+Glib::RefPtr<Gdk::Pixmap> Style::get_background_pixmap(StateType state_type)
+{
+ return Glib::wrap((GdkPixmapObject*) (gobj()->bg_pixmap[state_type]), true); //true = take_copy.
+}
+
+void Style::set_bg_pixmap(StateType state_type, const Glib::RefPtr<Gdk::Pixmap>& pixmap)
+{
+ GdkPixmap *const old_pixmap = gobj()->bg_pixmap[state_type];
+ gobj()->bg_pixmap[state_type] = Glib::unwrap_copy(pixmap);
+
+ if(old_pixmap)
+ g_object_unref(old_pixmap);
+}
+
+Glib::RefPtr<Gdk::Pixmap> Style::get_bg_pixmap(StateType state_type)
+{
+ return Glib::wrap((GdkPixmapObject*) (gobj()->bg_pixmap[state_type]), true); // true = take_copy
+}
+
+Glib::RefPtr<const Gdk::Pixmap> Style::get_bg_pixmap(StateType state_type) const
+{
+ return Glib::wrap((GdkPixmapObject*) (gobj()->bg_pixmap[state_type]), true); // true = take_copy
+}
+
+void Style::set_xthickness(int xthickness)
+{
+ gobj()->xthickness = xthickness;
+}
+
+void Style::set_ythickness(int ythickness)
+{
+ gobj()->ythickness = ythickness;
+}
+
+void Style::paint_polygon(const Glib::RefPtr<Gdk::Window>& window,
+ StateType state_type,
+ ShadowType shadow_type,
+ const Gdk::Rectangle& area,
+ Widget& widget,
+ const Glib::ustring& detail,
+ const Glib::ArrayHandle<Gdk::Point>& points,
+ bool fill) const
+{
+ gtk_paint_polygon(
+ const_cast<GtkStyle*>(gobj()),
+ Glib::unwrap(window),
+ (GtkStateType) state_type,
+ (GtkShadowType) shadow_type,
+ const_cast<GdkRectangle*>(area.gobj()),
+ widget.gobj(),
+ detail.c_str(),
+ reinterpret_cast<GdkPoint*>(const_cast<Gdk::Point*>(points.data())),
+ points.size(),
+ fill);
+}
+
+} // namespace Gtk
+
+
+namespace
+{
+
+const Glib::SignalProxyInfo Style_signal_realize_info =
+{
+ "realize",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+
+const Glib::SignalProxyInfo Style_signal_unrealize_info =
+{
+ "unrealize",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Gtk::Style> wrap(GtkStyle* object, bool take_copy)
+{
+ return Glib::RefPtr<Gtk::Style>( dynamic_cast<Gtk::Style*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} /* namespace Glib */
+
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Style_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Style_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_style_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Style_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->realize = &realize_vfunc_callback;
+ klass->unrealize = &unrealize_vfunc_callback;
+ klass->copy = &copy_vfunc_callback;
+ klass->clone = &clone_vfunc_callback;
+ klass->init_from_rc = &init_from_rc_vfunc_callback;
+ klass->set_background = &set_background_vfunc_callback;
+ klass->render_icon = &render_icon_vfunc_callback;
+ klass->draw_hline = &draw_hline_vfunc_callback;
+ klass->draw_vline = &draw_vline_vfunc_callback;
+ klass->draw_shadow = &draw_shadow_vfunc_callback;
+ klass->draw_polygon = &draw_polygon_vfunc_callback;
+ klass->draw_arrow = &draw_arrow_vfunc_callback;
+ klass->draw_diamond = &draw_diamond_vfunc_callback;
+ klass->draw_string = &draw_string_vfunc_callback;
+ klass->draw_box = &draw_box_vfunc_callback;
+ klass->draw_flat_box = &draw_flat_box_vfunc_callback;
+ klass->draw_check = &draw_check_vfunc_callback;
+ klass->draw_option = &draw_option_vfunc_callback;
+ klass->draw_tab = &draw_tab_vfunc_callback;
+ klass->draw_shadow_gap = &draw_shadow_gap_vfunc_callback;
+ klass->draw_box_gap = &draw_box_gap_vfunc_callback;
+ klass->draw_extension = &draw_extension_vfunc_callback;
+ klass->draw_focus = &draw_focus_vfunc_callback;
+ klass->draw_slider = &draw_slider_vfunc_callback;
+ klass->draw_handle = &draw_handle_vfunc_callback;
+ klass->draw_expander = &draw_expander_vfunc_callback;
+ klass->draw_layout = &draw_layout_vfunc_callback;
+ klass->draw_resize_grip = &draw_resize_grip_vfunc_callback;
+ klass->realize = &realize_callback;
+ klass->unrealize = &unrealize_callback;
+}
+
+void Style_Class::realize_vfunc_callback(GtkStyle* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->realize_vfunc();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->realize)
+ (*base->realize)(self);
+ }
+}
+
+void Style_Class::unrealize_vfunc_callback(GtkStyle* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->unrealize_vfunc();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->unrealize)
+ (*base->unrealize)(self);
+ }
+}
+
+void Style_Class::copy_vfunc_callback(GtkStyle* self, GtkStyle* src)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->copy_vfunc(Glib::wrap(src, true)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->copy)
+ (*base->copy)(self, src);
+ }
+}
+
+GtkStyle* Style_Class::clone_vfunc_callback(GtkStyle* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return Glib::unwrap(obj->clone_vfunc());
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->clone)
+ return (*base->clone)(self);
+ }
+
+ typedef GtkStyle* RType;
+ return RType();
+}
+
+void Style_Class::init_from_rc_vfunc_callback(GtkStyle* self, GtkRcStyle* rc_style)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->init_from_rc_vfunc(Glib::wrap(rc_style)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->init_from_rc)
+ (*base->init_from_rc)(self, rc_style);
+ }
+}
+
+void Style_Class::set_background_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->set_background_vfunc(Glib::wrap((GdkWindowObject*)(window), true)
+, ((Gtk::StateType)(state_type))
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->set_background)
+ (*base->set_background)(self, window, state_type);
+ }
+}
+
+GdkPixbuf* Style_Class::render_icon_vfunc_callback(GtkStyle* self, const GtkIconSource* source, GtkTextDirection direction, GtkStateType state, GtkIconSize size, GtkWidget* widget, const gchar* detail)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return Glib::unwrap(obj->render_icon_vfunc(Glib::wrap(const_cast<GtkIconSource*>(source), true)
+, ((TextDirection)(direction))
+, ((Gtk::StateType)(state))
+, IconSize(static_cast<int>(size))
+, Glib::wrap(widget)
+, Glib::convert_const_gchar_ptr_to_ustring(detail)
+));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->render_icon)
+ return (*base->render_icon)(self, source, direction, state, size, widget, detail);
+ }
+
+ typedef GdkPixbuf* RType;
+ return RType();
+}
+
+void Style_Class::draw_hline_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, gint x1, gint x2, gint y)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->draw_hline_vfunc(Glib::wrap((GdkWindowObject*)(window), true)
+, ((Gtk::StateType)(state_type))
+, Glib::wrap(area)
+, Glib::wrap(widget)
+, Glib::convert_const_gchar_ptr_to_ustring(detail)
+, x1
+, x2
+, y
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->draw_hline)
+ (*base->draw_hline)(self, window, state_type, area, widget, detail, x1, x2, y);
+ }
+}
+
+void Style_Class::draw_vline_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, gint y1, gint y2, gint x)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->draw_vline_vfunc(Glib::wrap((GdkWindowObject*)(window), true)
+, ((Gtk::StateType)(state_type))
+, Glib::wrap(area)
+, Glib::wrap(widget)
+, Glib::convert_const_gchar_ptr_to_ustring(detail)
+, y1
+, y2
+, x
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->draw_vline)
+ (*base->draw_vline)(self, window, state_type, area, widget, detail, y1, y2, x);
+ }
+}
+
+void Style_Class::draw_shadow_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GtkShadowType shadow_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, gint x, gint y, gint width, gint height)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->draw_shadow_vfunc(Glib::wrap((GdkWindowObject*)(window), true)
+, ((Gtk::StateType)(state_type))
+, ((ShadowType)(shadow_type))
+, Glib::wrap(area)
+, Glib::wrap(widget)
+, Glib::convert_const_gchar_ptr_to_ustring(detail)
+, x
+, y
+, width
+, height
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->draw_shadow)
+ (*base->draw_shadow)(self, window, state_type, shadow_type, area, widget, detail, x, y, width, height);
+ }
+}
+
+void Style_Class::draw_polygon_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GtkShadowType shadow_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, GdkPoint* point, gint npoints, gboolean fill)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->draw_polygon_vfunc(Glib::wrap((GdkWindowObject*)(window), true)
+, ((Gtk::StateType)(state_type))
+, ((ShadowType)(shadow_type))
+, Glib::wrap(area)
+, Glib::wrap(widget)
+, Glib::convert_const_gchar_ptr_to_ustring(detail)
+, point, npoints
+, fill
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->draw_polygon)
+ (*base->draw_polygon)(self, window, state_type, shadow_type, area, widget, detail, point, npoints, fill);
+ }
+}
+
+void Style_Class::draw_arrow_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GtkShadowType shadow_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, GtkArrowType arrow_type, gboolean fill, gint x, gint y, gint width, gint height)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->draw_arrow_vfunc(Glib::wrap((GdkWindowObject*)(window), true)
+, ((Gtk::StateType)(state_type))
+, ((ShadowType)(shadow_type))
+, Glib::wrap(area)
+, Glib::wrap(widget)
+, Glib::convert_const_gchar_ptr_to_ustring(detail)
+, ((Gtk::ArrowType)(arrow_type))
+, fill
+, x
+, y
+, width
+, height
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->draw_arrow)
+ (*base->draw_arrow)(self, window, state_type, shadow_type, area, widget, detail, arrow_type, fill, x, y, width, height);
+ }
+}
+
+void Style_Class::draw_diamond_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GtkShadowType shadow_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, gint x, gint y, gint width, gint height)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->draw_diamond_vfunc(Glib::wrap((GdkWindowObject*)(window), true)
+, ((Gtk::StateType)(state_type))
+, ((ShadowType)(shadow_type))
+, Glib::wrap(area)
+, Glib::wrap(widget)
+, Glib::convert_const_gchar_ptr_to_ustring(detail)
+, x
+, y
+, width
+, height
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->draw_diamond)
+ (*base->draw_diamond)(self, window, state_type, shadow_type, area, widget, detail, x, y, width, height);
+ }
+}
+
+void Style_Class::draw_string_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, gint x, gint y, const gchar* string)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->draw_string_vfunc(Glib::wrap((GdkWindowObject*)(window), true)
+, ((Gtk::StateType)(state_type))
+, Glib::wrap(area)
+, Glib::wrap(widget)
+, Glib::convert_const_gchar_ptr_to_ustring(detail)
+, x
+, y
+, Glib::convert_const_gchar_ptr_to_ustring(string)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->draw_string)
+ (*base->draw_string)(self, window, state_type, area, widget, detail, x, y, string);
+ }
+}
+
+void Style_Class::draw_box_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GtkShadowType shadow_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, gint x, gint y, gint width, gint height)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->draw_box_vfunc(Glib::wrap((GdkWindowObject*)(window), true)
+, ((Gtk::StateType)(state_type))
+, ((ShadowType)(shadow_type))
+, Glib::wrap(area)
+, Glib::wrap(widget)
+, Glib::convert_const_gchar_ptr_to_ustring(detail)
+, x
+, y
+, width
+, height
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->draw_box)
+ (*base->draw_box)(self, window, state_type, shadow_type, area, widget, detail, x, y, width, height);
+ }
+}
+
+void Style_Class::draw_flat_box_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GtkShadowType shadow_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, gint x, gint y, gint width, gint height)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->draw_flat_box_vfunc(Glib::wrap((GdkWindowObject*)(window), true)
+, ((Gtk::StateType)(state_type))
+, ((ShadowType)(shadow_type))
+, Glib::wrap(area)
+, Glib::wrap(widget)
+, Glib::convert_const_gchar_ptr_to_ustring(detail)
+, x
+, y
+, width
+, height
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->draw_flat_box)
+ (*base->draw_flat_box)(self, window, state_type, shadow_type, area, widget, detail, x, y, width, height);
+ }
+}
+
+void Style_Class::draw_check_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GtkShadowType shadow_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, gint x, gint y, gint width, gint height)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->draw_check_vfunc(Glib::wrap((GdkWindowObject*)(window), true)
+, ((Gtk::StateType)(state_type))
+, ((ShadowType)(shadow_type))
+, Glib::wrap(area)
+, Glib::wrap(widget)
+, Glib::convert_const_gchar_ptr_to_ustring(detail)
+, x
+, y
+, width
+, height
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->draw_check)
+ (*base->draw_check)(self, window, state_type, shadow_type, area, widget, detail, x, y, width, height);
+ }
+}
+
+void Style_Class::draw_option_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GtkShadowType shadow_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, gint x, gint y, gint width, gint height)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->draw_option_vfunc(Glib::wrap((GdkWindowObject*)(window), true)
+, ((Gtk::StateType)(state_type))
+, ((ShadowType)(shadow_type))
+, Glib::wrap(area)
+, Glib::wrap(widget)
+, Glib::convert_const_gchar_ptr_to_ustring(detail)
+, x
+, y
+, width
+, height
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->draw_option)
+ (*base->draw_option)(self, window, state_type, shadow_type, area, widget, detail, x, y, width, height);
+ }
+}
+
+void Style_Class::draw_tab_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GtkShadowType shadow_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, gint x, gint y, gint width, gint height)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->draw_tab_vfunc(Glib::wrap((GdkWindowObject*)(window), true)
+, ((Gtk::StateType)(state_type))
+, ((ShadowType)(shadow_type))
+, Glib::wrap(area)
+, Glib::wrap(widget)
+, Glib::convert_const_gchar_ptr_to_ustring(detail)
+, x
+, y
+, width
+, height
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->draw_tab)
+ (*base->draw_tab)(self, window, state_type, shadow_type, area, widget, detail, x, y, width, height);
+ }
+}
+
+void Style_Class::draw_shadow_gap_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GtkShadowType shadow_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, gint x, gint y, gint width, gint height, GtkPositionType gap_side, gint gap_x, gint gap_width)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->draw_shadow_gap_vfunc(Glib::wrap((GdkWindowObject*)(window), true)
+, ((Gtk::StateType)(state_type))
+, ((ShadowType)(shadow_type))
+, Glib::wrap(area)
+, Glib::wrap(widget)
+, Glib::convert_const_gchar_ptr_to_ustring(detail)
+, x
+, y
+, width
+, height
+, ((Gtk::PositionType)(gap_side))
+, gap_x
+, gap_width
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->draw_shadow_gap)
+ (*base->draw_shadow_gap)(self, window, state_type, shadow_type, area, widget, detail, x, y, width, height, gap_side, gap_x, gap_width);
+ }
+}
+
+void Style_Class::draw_box_gap_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GtkShadowType shadow_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, gint x, gint y, gint width, gint height, GtkPositionType gap_side, gint gap_x, gint gap_width)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->draw_box_gap_vfunc(Glib::wrap((GdkWindowObject*)(window), true)
+, ((Gtk::StateType)(state_type))
+, ((ShadowType)(shadow_type))
+, Glib::wrap(area)
+, Glib::wrap(widget)
+, Glib::convert_const_gchar_ptr_to_ustring(detail)
+, x
+, y
+, width
+, height
+, ((Gtk::PositionType)(gap_side))
+, gap_x
+, gap_width
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->draw_box_gap)
+ (*base->draw_box_gap)(self, window, state_type, shadow_type, area, widget, detail, x, y, width, height, gap_side, gap_x, gap_width);
+ }
+}
+
+void Style_Class::draw_extension_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GtkShadowType shadow_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, gint x, gint y, gint width, gint height, GtkPositionType gap_side)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->draw_extension_vfunc(Glib::wrap((GdkWindowObject*)(window), true)
+, ((Gtk::StateType)(state_type))
+, ((ShadowType)(shadow_type))
+, Glib::wrap(area)
+, Glib::wrap(widget)
+, Glib::convert_const_gchar_ptr_to_ustring(detail)
+, x
+, y
+, width
+, height
+, ((PositionType)(gap_side))
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->draw_extension)
+ (*base->draw_extension)(self, window, state_type, shadow_type, area, widget, detail, x, y, width, height, gap_side);
+ }
+}
+
+void Style_Class::draw_focus_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, gint x, gint y, gint width, gint height)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->draw_focus_vfunc(Glib::wrap((GdkWindowObject*)(window), true)
+, ((Gtk::StateType)(state_type))
+, Glib::wrap(area)
+, Glib::wrap(widget)
+, Glib::convert_const_gchar_ptr_to_ustring(detail)
+, x
+, y
+, width
+, height
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->draw_focus)
+ (*base->draw_focus)(self, window, state_type, area, widget, detail, x, y, width, height);
+ }
+}
+
+void Style_Class::draw_slider_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GtkShadowType shadow_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, gint x, gint y, gint width, gint height, GtkOrientation orientation)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->draw_slider_vfunc(Glib::wrap((GdkWindowObject*)(window), true)
+, ((Gtk::StateType)(state_type))
+, ((ShadowType)(shadow_type))
+, Glib::wrap(area)
+, Glib::wrap(widget)
+, Glib::convert_const_gchar_ptr_to_ustring(detail)
+, x
+, y
+, width
+, height
+, ((Orientation)(orientation))
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->draw_slider)
+ (*base->draw_slider)(self, window, state_type, shadow_type, area, widget, detail, x, y, width, height, orientation);
+ }
+}
+
+void Style_Class::draw_handle_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GtkShadowType shadow_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, gint x, gint y, gint width, gint height, GtkOrientation orientation)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->draw_handle_vfunc(Glib::wrap((GdkWindowObject*)(window), true)
+, ((Gtk::StateType)(state_type))
+, ((ShadowType)(shadow_type))
+, Glib::wrap(area)
+, Glib::wrap(widget)
+, Glib::convert_const_gchar_ptr_to_ustring(detail)
+, x
+, y
+, width
+, height
+, ((Orientation)(orientation))
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->draw_handle)
+ (*base->draw_handle)(self, window, state_type, shadow_type, area, widget, detail, x, y, width, height, orientation);
+ }
+}
+
+void Style_Class::draw_expander_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, gint x, gint y, GtkExpanderStyle expander_style)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->draw_expander_vfunc(Glib::wrap((GdkWindowObject*)(window), true)
+, ((Gtk::StateType)(state_type))
+, Glib::wrap(area)
+, Glib::wrap(widget)
+, Glib::convert_const_gchar_ptr_to_ustring(detail)
+, x
+, y
+, ((ExpanderStyle)(expander_style))
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->draw_expander)
+ (*base->draw_expander)(self, window, state_type, area, widget, detail, x, y, expander_style);
+ }
+}
+
+void Style_Class::draw_layout_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, gboolean use_text, GdkRectangle* area, GtkWidget* widget, const gchar* detail, gint x, gint y, PangoLayout* layout)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->draw_layout_vfunc(Glib::wrap((GdkWindowObject*)(window), true)
+, ((Gtk::StateType)(state_type))
+, use_text
+, Glib::wrap(area)
+, Glib::wrap(widget)
+, Glib::convert_const_gchar_ptr_to_ustring(detail)
+, x
+, y
+, Glib::wrap(layout)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->draw_layout)
+ (*base->draw_layout)(self, window, state_type, use_text, area, widget, detail, x, y, layout);
+ }
+}
+
+void Style_Class::draw_resize_grip_vfunc_callback(GtkStyle* self, GdkWindow* window, GtkStateType state_type, GdkRectangle* area, GtkWidget* widget, const gchar* detail, GdkWindowEdge edge, gint x, gint y, gint width, gint height)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->draw_resize_grip_vfunc(Glib::wrap((GdkWindowObject*)(window), true)
+, ((Gtk::StateType)(state_type))
+, Glib::wrap(area)
+, Glib::wrap(widget)
+, Glib::convert_const_gchar_ptr_to_ustring(detail)
+, ((Gdk::WindowEdge)(edge))
+, x
+, y
+, width
+, height
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->draw_resize_grip)
+ (*base->draw_resize_grip)(self, window, state_type, area, widget, detail, edge, x, y, width, height);
+ }
+}
+
+
+void Style_Class::realize_callback(GtkStyle* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_realize();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->realize)
+ (*base->realize)(self);
+ }
+}
+
+void Style_Class::unrealize_callback(GtkStyle* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_unrealize();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->unrealize)
+ (*base->unrealize)(self);
+ }
+}
+
+
+Glib::ObjectBase* Style_Class::wrap_new(GObject* object)
+{
+ return new Style((GtkStyle*)object);
+}
+
+
+/* The implementation: */
+
+GtkStyle* Style::gobj_copy()
+{
+ reference();
+ return gobj();
+}
+
+Style::Style(const Glib::ConstructParams& construct_params)
+:
+ Glib::Object(construct_params)
+{}
+
+Style::Style(GtkStyle* castitem)
+:
+ Glib::Object((GObject*)(castitem))
+{}
+
+Style::~Style()
+{}
+
+
+Style::CppClassType Style::style_class_; // initialize static member
+
+GType Style::get_type()
+{
+ return style_class_.init().get_type();
+}
+
+GType Style::get_base_type()
+{
+ return gtk_style_get_type();
+}
+
+
+Style::Style()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Glib::Object(Glib::ConstructParams(style_class_.init()))
+{
+ }
+
+Glib::RefPtr<Style> Style::create()
+{
+ return Glib::RefPtr<Style>( new Style() );
+}
+void Style::set_fg(StateType state, const Gdk::Color& color)
+{
+ gobj()->fg[state] = *color.gobj();
+}
+
+Gdk::Color Style::get_fg(StateType state) const
+{
+ return Gdk::Color(const_cast<GdkColor*>(&gobj()->fg[state]), true);
+}
+
+void Style::set_bg(StateType state, const Gdk::Color& color)
+{
+ gobj()->bg[state] = *color.gobj();
+}
+
+Gdk::Color Style::get_bg(StateType state) const
+{
+ return Gdk::Color(const_cast<GdkColor*>(&gobj()->bg[state]), true);
+}
+
+void Style::set_light(StateType state, const Gdk::Color& color)
+{
+ gobj()->light[state] = *color.gobj();
+}
+
+Gdk::Color Style::get_light(StateType state) const
+{
+ return Gdk::Color(const_cast<GdkColor*>(&gobj()->light[state]), true);
+}
+
+void Style::set_dark(StateType state, const Gdk::Color& color)
+{
+ gobj()->dark[state] = *color.gobj();
+}
+
+Gdk::Color Style::get_dark(StateType state) const
+{
+ return Gdk::Color(const_cast<GdkColor*>(&gobj()->dark[state]), true);
+}
+
+void Style::set_mid(StateType state, const Gdk::Color& color)
+{
+ gobj()->mid[state] = *color.gobj();
+}
+
+Gdk::Color Style::get_mid(StateType state) const
+{
+ return Gdk::Color(const_cast<GdkColor*>(&gobj()->mid[state]), true);
+}
+
+void Style::set_text(StateType state, const Gdk::Color& color)
+{
+ gobj()->text[state] = *color.gobj();
+}
+
+Gdk::Color Style::get_text(StateType state) const
+{
+ return Gdk::Color(const_cast<GdkColor*>(&gobj()->text[state]), true);
+}
+
+void Style::set_base(StateType state, const Gdk::Color& color)
+{
+ gobj()->base[state] = *color.gobj();
+}
+
+Gdk::Color Style::get_base(StateType state) const
+{
+ return Gdk::Color(const_cast<GdkColor*>(&gobj()->base[state]), true);
+}
+
+void Style::set_text_aa(StateType state, const Gdk::Color& color)
+{
+ gobj()->text_aa[state] = *color.gobj();
+}
+
+Gdk::Color Style::get_text_aa(StateType state) const
+{
+ return Gdk::Color(const_cast<GdkColor*>(&gobj()->text_aa[state]), true);
+}
+
+void Style::set_black(const Gdk::Color& value)
+{
+ gobj()->black = (*(value).gobj());
+}
+
+Gdk::Color Style::get_black() const
+{
+ return Gdk::Color(const_cast<GdkColor*>(&(gobj()->black)), true);
+}
+
+void Style::set_white(const Gdk::Color& value)
+{
+ gobj()->white = (*(value).gobj());
+}
+
+Gdk::Color Style::get_white() const
+{
+ return Gdk::Color(const_cast<GdkColor*>(&(gobj()->white)), true);
+}
+
+int Style::get_xthickness() const
+{
+ return gobj()->xthickness;
+}
+
+int Style::get_ythickness() const
+{
+ return gobj()->ythickness;
+}
+
+Glib::RefPtr<Gdk::GC> Style::get_black_gc()
+{
+ Glib::RefPtr<Gdk::GC> ref_ptr(Glib::wrap(gobj()->black_gc));
+
+ if(ref_ptr)
+ ref_ptr->reference();
+
+ return ref_ptr;
+}
+
+Glib::RefPtr<const Gdk::GC> Style::get_black_gc() const
+{
+ Glib::RefPtr<const Gdk::GC> ref_ptr(Glib::wrap(gobj()->black_gc));
+
+ if(ref_ptr)
+ ref_ptr->reference();
+
+ return ref_ptr;
+}
+
+Glib::RefPtr<Gdk::GC> Style::get_white_gc()
+{
+ Glib::RefPtr<Gdk::GC> ref_ptr(Glib::wrap(gobj()->white_gc));
+
+ if(ref_ptr)
+ ref_ptr->reference();
+
+ return ref_ptr;
+}
+
+Glib::RefPtr<const Gdk::GC> Style::get_white_gc() const
+{
+ Glib::RefPtr<const Gdk::GC> ref_ptr(Glib::wrap(gobj()->white_gc));
+
+ if(ref_ptr)
+ ref_ptr->reference();
+
+ return ref_ptr;
+}
+
+void Style::paint_arrow(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget& widget, const Glib::ustring& detail, ArrowType arrow_type, bool fill, int x, int y, int width, int height) const
+{
+ gtk_paint_arrow(const_cast<GtkStyle*>(gobj()), Glib::unwrap(window), ((GtkStateType)(state_type)), ((GtkShadowType)(shadow_type)), const_cast<GdkRectangle*>(area.gobj()), (widget).gobj(), detail.c_str(), ((GtkArrowType)(arrow_type)), static_cast<int>(fill), x, y, width, height);
+}
+
+void Style::paint_box(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget& widget, const Glib::ustring& detail, int x, int y, int width, int height) const
+{
+ gtk_paint_box(const_cast<GtkStyle*>(gobj()), Glib::unwrap(window), ((GtkStateType)(state_type)), ((GtkShadowType)(shadow_type)), const_cast<GdkRectangle*>(area.gobj()), (widget).gobj(), detail.c_str(), x, y, width, height);
+}
+
+void Style::paint_box_gap(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget& widget, const Glib::ustring& detail, int x, int y, int width, int height, PositionType gap_side, int gap_x, int gap_width) const
+{
+ gtk_paint_box_gap(const_cast<GtkStyle*>(gobj()), Glib::unwrap(window), ((GtkStateType)(state_type)), ((GtkShadowType)(shadow_type)), const_cast<GdkRectangle*>(area.gobj()), (widget).gobj(), const_cast<gchar*>(detail.c_str()), x, y, width, height, ((GtkPositionType)(gap_side)), gap_x, gap_width);
+}
+
+void Style::paint_check(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget& widget, const Glib::ustring& detail, int x, int y, int width, int height) const
+{
+ gtk_paint_check(const_cast<GtkStyle*>(gobj()), Glib::unwrap(window), ((GtkStateType)(state_type)), ((GtkShadowType)(shadow_type)), const_cast<GdkRectangle*>(area.gobj()), (widget).gobj(), detail.c_str(), x, y, width, height);
+}
+
+void Style::paint_diamond(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget& widget, const Glib::ustring& detail, int x, int y, int width, int height) const
+{
+ gtk_paint_diamond(const_cast<GtkStyle*>(gobj()), Glib::unwrap(window), ((GtkStateType)(state_type)), ((GtkShadowType)(shadow_type)), const_cast<GdkRectangle*>(area.gobj()), (widget).gobj(), detail.c_str(), x, y, width, height);
+}
+
+void Style::paint_extension(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget& widget, const Glib::ustring& detail, int x, int y, int width, int height, PositionType gap_side) const
+{
+ gtk_paint_extension(const_cast<GtkStyle*>(gobj()), Glib::unwrap(window), ((GtkStateType)(state_type)), ((GtkShadowType)(shadow_type)), const_cast<GdkRectangle*>(area.gobj()), (widget).gobj(), const_cast<gchar*>(detail.c_str()), x, y, width, height, ((GtkPositionType)(gap_side)));
+}
+
+void Style::paint_flat_box(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget& widget, const Glib::ustring& detail, int x, int y, int width, int height) const
+{
+ gtk_paint_flat_box(const_cast<GtkStyle*>(gobj()), Glib::unwrap(window), ((GtkStateType)(state_type)), ((GtkShadowType)(shadow_type)), const_cast<GdkRectangle*>(area.gobj()), (widget).gobj(), detail.c_str(), x, y, width, height);
+}
+
+void Style::paint_focus(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, const Gdk::Rectangle& area, Widget& widget, const Glib::ustring& detail, int x, int y, int width, int height) const
+{
+ gtk_paint_focus(const_cast<GtkStyle*>(gobj()), Glib::unwrap(window), ((GtkStateType)(state_type)), const_cast<GdkRectangle*>(area.gobj()), (widget).gobj(), detail.c_str(), x, y, width, height);
+}
+
+void Style::paint_handle(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget& widget, const Glib::ustring& detail, int x, int y, int width, int height, Orientation orientation) const
+{
+ gtk_paint_handle(const_cast<GtkStyle*>(gobj()), Glib::unwrap(window), ((GtkStateType)(state_type)), ((GtkShadowType)(shadow_type)), const_cast<GdkRectangle*>(area.gobj()), (widget).gobj(), detail.c_str(), x, y, width, height, ((GtkOrientation)(orientation)));
+}
+
+void Style::paint_hline(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, const Gdk::Rectangle& area, Widget& widget, const Glib::ustring& detail, int x1, int x2, int y) const
+{
+ gtk_paint_hline(const_cast<GtkStyle*>(gobj()), Glib::unwrap(window), ((GtkStateType)(state_type)), const_cast<GdkRectangle*>(area.gobj()), (widget).gobj(), detail.c_str(), x1, x2, y);
+}
+
+void Style::paint_option(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget& widget, const Glib::ustring& detail, int x, int y, int width, int height) const
+{
+ gtk_paint_option(const_cast<GtkStyle*>(gobj()), Glib::unwrap(window), ((GtkStateType)(state_type)), ((GtkShadowType)(shadow_type)), const_cast<GdkRectangle*>(area.gobj()), (widget).gobj(), detail.c_str(), x, y, width, height);
+}
+
+void Style::paint_shadow(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget& widget, const Glib::ustring& detail, int x, int y, int width, int height) const
+{
+ gtk_paint_shadow(const_cast<GtkStyle*>(gobj()), Glib::unwrap(window), ((GtkStateType)(state_type)), ((GtkShadowType)(shadow_type)), const_cast<GdkRectangle*>(area.gobj()), (widget).gobj(), detail.c_str(), x, y, width, height);
+}
+
+void Style::paint_shadow_gap(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget& widget, const Glib::ustring& detail, int x, int y, int width, int height, PositionType gap_side, int gap_x, int gap_width) const
+{
+ gtk_paint_shadow_gap(const_cast<GtkStyle*>(gobj()), Glib::unwrap(window), ((GtkStateType)(state_type)), ((GtkShadowType)(shadow_type)), const_cast<GdkRectangle*>(area.gobj()), (widget).gobj(), const_cast<gchar*>(detail.c_str()), x, y, width, height, ((GtkPositionType)(gap_side)), gap_x, gap_width);
+}
+
+void Style::paint_slider(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget& widget, const Glib::ustring& detail, int x, int y, int width, int height, Orientation orientation) const
+{
+ gtk_paint_slider(const_cast<GtkStyle*>(gobj()), Glib::unwrap(window), ((GtkStateType)(state_type)), ((GtkShadowType)(shadow_type)), const_cast<GdkRectangle*>(area.gobj()), (widget).gobj(), detail.c_str(), x, y, width, height, ((GtkOrientation)(orientation)));
+}
+
+void Style::paint_tab(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget& widget, const Glib::ustring& detail, int x, int y, int width, int height) const
+{
+ gtk_paint_tab(const_cast<GtkStyle*>(gobj()), Glib::unwrap(window), ((GtkStateType)(state_type)), ((GtkShadowType)(shadow_type)), const_cast<GdkRectangle*>(area.gobj()), (widget).gobj(), detail.c_str(), x, y, width, height);
+}
+
+void Style::paint_vline(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, const Gdk::Rectangle& area, Widget& widget, const Glib::ustring& detail, int y1, int y2, int x) const
+{
+ gtk_paint_vline(const_cast<GtkStyle*>(gobj()), Glib::unwrap(window), ((GtkStateType)(state_type)), const_cast<GdkRectangle*>(area.gobj()), (widget).gobj(), detail.c_str(), y1, y2, x);
+}
+
+void Style::paint_expander(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, const Gdk::Rectangle& area, Widget& widget, const Glib::ustring& detail, int x, int y, ExpanderStyle expander_style) const
+{
+ gtk_paint_expander(const_cast<GtkStyle*>(gobj()), Glib::unwrap(window), ((GtkStateType)(state_type)), const_cast<GdkRectangle*>(area.gobj()), (widget).gobj(), detail.c_str(), x, y, ((GtkExpanderStyle)(expander_style)));
+}
+
+void Style::paint_layout(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, bool use_text, const Gdk::Rectangle& area, Widget& widget, const Glib::ustring& detail, int x, int y, const Glib::RefPtr<Pango::Layout>& layout) const
+{
+ gtk_paint_layout(const_cast<GtkStyle*>(gobj()), Glib::unwrap(window), ((GtkStateType)(state_type)), static_cast<int>(use_text), const_cast<GdkRectangle*>(area.gobj()), (widget).gobj(), detail.c_str(), x, y, Glib::unwrap(layout));
+}
+
+void Style::paint_resize_grip(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, const Gdk::Rectangle& area, Widget& widget, const Glib::ustring& detail, Gdk::WindowEdge edge, int x, int y, int width, int height) const
+{
+ gtk_paint_resize_grip(const_cast<GtkStyle*>(gobj()), Glib::unwrap(window), ((GtkStateType)(state_type)), const_cast<GdkRectangle*>(area.gobj()), (widget).gobj(), detail.c_str(), ((GdkWindowEdge)(edge)), x, y, width, height);
+}
+
+Glib::RefPtr<Style> Style::copy()
+{
+ return Glib::wrap(gtk_style_copy(gobj()));
+}
+
+void Style::set_background(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type)
+{
+ gtk_style_set_background(gobj(), Glib::unwrap(window), ((GtkStateType)(state_type)));
+}
+
+void Style::apply_default_background(const Glib::RefPtr<Gdk::Window>& window, bool set_bg, Gtk::StateType state_type, const Gdk::Rectangle& area, int x, int y, int width, int height)
+{
+ gtk_style_apply_default_background(gobj(), Glib::unwrap(window), static_cast<int>(set_bg), ((GtkStateType)(state_type)), const_cast<GdkRectangle*>(area.gobj()), x, y, width, height);
+}
+
+IconSet Style::lookup_icon_set(const Gtk::StockID& stock_id)
+{
+ return Glib::wrap(gtk_style_lookup_icon_set(gobj(), (stock_id).get_c_str()));
+}
+
+Glib::RefPtr<Gdk::Pixbuf> Style::render_icon(const IconSource& source, Gtk::TextDirection direction, Gtk::StateType state, Gtk::IconSize size, Gtk::Widget& widget, const Glib::ustring& detail)
+{
+ return Glib::wrap(gtk_style_render_icon(gobj(), (source).gobj(), ((GtkTextDirection)(direction)), ((GtkStateType)(state)), static_cast<GtkIconSize>(int(size)), (widget).gobj(), detail.c_str()));
+}
+
+
+Glib::SignalProxy0< void > Style::signal_realize()
+{
+ return Glib::SignalProxy0< void >(this, &Style_signal_realize_info);
+}
+
+Glib::SignalProxy0< void > Style::signal_unrealize()
+{
+ return Glib::SignalProxy0< void >(this, &Style_signal_unrealize_info);
+}
+
+
+void Gtk::Style::on_realize()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->realize)
+ (*base->realize)(gobj());
+}
+
+void Gtk::Style::on_unrealize()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->unrealize)
+ (*base->unrealize)(gobj());
+}
+
+
+void Gtk::Style::realize_vfunc()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->realize)
+ (*base->realize)(gobj());
+}
+
+void Gtk::Style::unrealize_vfunc()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->unrealize)
+ (*base->unrealize)(gobj());
+}
+
+void Gtk::Style::copy_vfunc(const Glib::RefPtr<Style>& src)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->copy)
+ (*base->copy)(gobj(),Glib::unwrap(src));
+}
+
+Glib::RefPtr<Style> Gtk::Style::clone_vfunc()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->clone)
+ return Glib::wrap((*base->clone)(gobj()));
+
+ typedef Glib::RefPtr<Style> RType;
+ return RType();
+}
+
+void Gtk::Style::init_from_rc_vfunc(const Glib::RefPtr<RcStyle>& rc_style)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->init_from_rc)
+ (*base->init_from_rc)(gobj(),Glib::unwrap(rc_style));
+}
+
+void Gtk::Style::set_background_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->set_background)
+ (*base->set_background)(gobj(),Glib::unwrap(window),((GtkStateType)(state_type)));
+}
+
+Glib::RefPtr<Gdk::Pixbuf> Gtk::Style::render_icon_vfunc(const IconSource& source, TextDirection direction, Gtk::StateType state, IconSize size, Widget* widget, const Glib::ustring& detail)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->render_icon)
+ return Glib::wrap((*base->render_icon)(gobj(),(source).gobj(),((GtkTextDirection)(direction)),((GtkStateType)(state)),static_cast<GtkIconSize>(int(size)),(GtkWidget*)Glib::unwrap(widget),detail.c_str()));
+
+ typedef Glib::RefPtr<Gdk::Pixbuf> RType;
+ return RType();
+}
+
+void Gtk::Style::draw_hline_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x1, int x2, int y)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->draw_hline)
+ (*base->draw_hline)(gobj(),Glib::unwrap(window),((GtkStateType)(state_type)),const_cast<GdkRectangle*>(area.gobj()),(GtkWidget*)Glib::unwrap(widget),detail.c_str(),x1,x2,y);
+}
+
+void Gtk::Style::draw_vline_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int y1, int y2, int x)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->draw_vline)
+ (*base->draw_vline)(gobj(),Glib::unwrap(window),((GtkStateType)(state_type)),const_cast<GdkRectangle*>(area.gobj()),(GtkWidget*)Glib::unwrap(widget),detail.c_str(),y1,y2,x);
+}
+
+void Gtk::Style::draw_shadow_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, int width, int height)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->draw_shadow)
+ (*base->draw_shadow)(gobj(),Glib::unwrap(window),((GtkStateType)(state_type)),((GtkShadowType)(shadow_type)),const_cast<GdkRectangle*>(area.gobj()),(GtkWidget*)Glib::unwrap(widget),detail.c_str(),x,y,width,height);
+}
+
+void Gtk::Style::draw_polygon_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, GdkPoint* point, int npoints, bool fill)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->draw_polygon)
+ (*base->draw_polygon)(gobj(),Glib::unwrap(window),((GtkStateType)(state_type)),((GtkShadowType)(shadow_type)),const_cast<GdkRectangle*>(area.gobj()),(GtkWidget*)Glib::unwrap(widget),detail.c_str(),point,npoints,static_cast<int>(fill));
+}
+
+void Gtk::Style::draw_arrow_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, Gtk::ArrowType arrow_type, bool fill, int x, int y, int width, int height)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->draw_arrow)
+ (*base->draw_arrow)(gobj(),Glib::unwrap(window),((GtkStateType)(state_type)),((GtkShadowType)(shadow_type)),const_cast<GdkRectangle*>(area.gobj()),(GtkWidget*)Glib::unwrap(widget),detail.c_str(),((GtkArrowType)(arrow_type)),static_cast<int>(fill),x,y,width,height);
+}
+
+void Gtk::Style::draw_diamond_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, int width, int height)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->draw_diamond)
+ (*base->draw_diamond)(gobj(),Glib::unwrap(window),((GtkStateType)(state_type)),((GtkShadowType)(shadow_type)),const_cast<GdkRectangle*>(area.gobj()),(GtkWidget*)Glib::unwrap(widget),detail.c_str(),x,y,width,height);
+}
+
+void Gtk::Style::draw_string_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, const Glib::ustring& string)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->draw_string)
+ (*base->draw_string)(gobj(),Glib::unwrap(window),((GtkStateType)(state_type)),const_cast<GdkRectangle*>(area.gobj()),(GtkWidget*)Glib::unwrap(widget),detail.c_str(),x,y,string.c_str());
+}
+
+void Gtk::Style::draw_box_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, int width, int height)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->draw_box)
+ (*base->draw_box)(gobj(),Glib::unwrap(window),((GtkStateType)(state_type)),((GtkShadowType)(shadow_type)),const_cast<GdkRectangle*>(area.gobj()),(GtkWidget*)Glib::unwrap(widget),detail.c_str(),x,y,width,height);
+}
+
+void Gtk::Style::draw_flat_box_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, int width, int height)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->draw_flat_box)
+ (*base->draw_flat_box)(gobj(),Glib::unwrap(window),((GtkStateType)(state_type)),((GtkShadowType)(shadow_type)),const_cast<GdkRectangle*>(area.gobj()),(GtkWidget*)Glib::unwrap(widget),detail.c_str(),x,y,width,height);
+}
+
+void Gtk::Style::draw_check_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, int width, int height)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->draw_check)
+ (*base->draw_check)(gobj(),Glib::unwrap(window),((GtkStateType)(state_type)),((GtkShadowType)(shadow_type)),const_cast<GdkRectangle*>(area.gobj()),(GtkWidget*)Glib::unwrap(widget),detail.c_str(),x,y,width,height);
+}
+
+void Gtk::Style::draw_option_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, int width, int height)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->draw_option)
+ (*base->draw_option)(gobj(),Glib::unwrap(window),((GtkStateType)(state_type)),((GtkShadowType)(shadow_type)),const_cast<GdkRectangle*>(area.gobj()),(GtkWidget*)Glib::unwrap(widget),detail.c_str(),x,y,width,height);
+}
+
+void Gtk::Style::draw_tab_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, int width, int height)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->draw_tab)
+ (*base->draw_tab)(gobj(),Glib::unwrap(window),((GtkStateType)(state_type)),((GtkShadowType)(shadow_type)),const_cast<GdkRectangle*>(area.gobj()),(GtkWidget*)Glib::unwrap(widget),detail.c_str(),x,y,width,height);
+}
+
+void Gtk::Style::draw_shadow_gap_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, int width, int height, Gtk::PositionType gap_side, int gap_x, int gap_width)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->draw_shadow_gap)
+ (*base->draw_shadow_gap)(gobj(),Glib::unwrap(window),((GtkStateType)(state_type)),((GtkShadowType)(shadow_type)),const_cast<GdkRectangle*>(area.gobj()),(GtkWidget*)Glib::unwrap(widget),detail.c_str(),x,y,width,height,((GtkPositionType)(gap_side)),gap_x,gap_width);
+}
+
+void Gtk::Style::draw_box_gap_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, int width, int height, Gtk::PositionType gap_side, int gap_x, int gap_width)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->draw_box_gap)
+ (*base->draw_box_gap)(gobj(),Glib::unwrap(window),((GtkStateType)(state_type)),((GtkShadowType)(shadow_type)),const_cast<GdkRectangle*>(area.gobj()),(GtkWidget*)Glib::unwrap(widget),detail.c_str(),x,y,width,height,((GtkPositionType)(gap_side)),gap_x,gap_width);
+}
+
+void Gtk::Style::draw_extension_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, int width, int height, PositionType gap_side)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->draw_extension)
+ (*base->draw_extension)(gobj(),Glib::unwrap(window),((GtkStateType)(state_type)),((GtkShadowType)(shadow_type)),const_cast<GdkRectangle*>(area.gobj()),(GtkWidget*)Glib::unwrap(widget),detail.c_str(),x,y,width,height,((GtkPositionType)(gap_side)));
+}
+
+void Gtk::Style::draw_focus_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, int width, int height)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->draw_focus)
+ (*base->draw_focus)(gobj(),Glib::unwrap(window),((GtkStateType)(state_type)),const_cast<GdkRectangle*>(area.gobj()),(GtkWidget*)Glib::unwrap(widget),detail.c_str(),x,y,width,height);
+}
+
+void Gtk::Style::draw_slider_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, int width, int height, Orientation orientation)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->draw_slider)
+ (*base->draw_slider)(gobj(),Glib::unwrap(window),((GtkStateType)(state_type)),((GtkShadowType)(shadow_type)),const_cast<GdkRectangle*>(area.gobj()),(GtkWidget*)Glib::unwrap(widget),detail.c_str(),x,y,width,height,((GtkOrientation)(orientation)));
+}
+
+void Gtk::Style::draw_handle_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, int width, int height, Orientation orientation)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->draw_handle)
+ (*base->draw_handle)(gobj(),Glib::unwrap(window),((GtkStateType)(state_type)),((GtkShadowType)(shadow_type)),const_cast<GdkRectangle*>(area.gobj()),(GtkWidget*)Glib::unwrap(widget),detail.c_str(),x,y,width,height,((GtkOrientation)(orientation)));
+}
+
+void Gtk::Style::draw_expander_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, ExpanderStyle expander_style)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->draw_expander)
+ (*base->draw_expander)(gobj(),Glib::unwrap(window),((GtkStateType)(state_type)),const_cast<GdkRectangle*>(area.gobj()),(GtkWidget*)Glib::unwrap(widget),detail.c_str(),x,y,((GtkExpanderStyle)(expander_style)));
+}
+
+void Gtk::Style::draw_layout_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, bool use_text, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, const Glib::RefPtr<Pango::Layout>& layout)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->draw_layout)
+ (*base->draw_layout)(gobj(),Glib::unwrap(window),((GtkStateType)(state_type)),static_cast<int>(use_text),const_cast<GdkRectangle*>(area.gobj()),(GtkWidget*)Glib::unwrap(widget),detail.c_str(),x,y,Glib::unwrap(layout));
+}
+
+void Gtk::Style::draw_resize_grip_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, Gdk::WindowEdge edge, int x, int y, int width, int height)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->draw_resize_grip)
+ (*base->draw_resize_grip)(gobj(),Glib::unwrap(window),((GtkStateType)(state_type)),const_cast<GdkRectangle*>(area.gobj()),(GtkWidget*)Glib::unwrap(widget),detail.c_str(),((GdkWindowEdge)(edge)),x,y,width,height);
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/style.h b/libs/gtkmm2/gtk/gtkmm/style.h
new file mode 100644
index 0000000000..d460abdc61
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/style.h
@@ -0,0 +1,786 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_STYLE_H
+#define _GTKMM_STYLE_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#include <pangomm/fontdescription.h>
+#include <pangomm/layout.h>
+
+#include <gdkmm/gc.h>
+#include <gdkmm/pixmap.h>
+#include <gdkmm/types.h>
+#include <gdkmm/window.h>
+
+#include <gtkmm/object.h>
+#include <gtkmm/enums.h>
+#include <gtkmm/iconsource.h>
+#include <gtkmm/iconset.h>
+#include <gtkmmconfig.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkStyle GtkStyle;
+typedef struct _GtkStyleClass GtkStyleClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class Style_Class; } // namespace Gtk
+namespace Gtk
+{
+
+class Widget;
+class RcStyle;
+
+
+class Style : public Glib::Object
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef Style CppObjectType;
+ typedef Style_Class CppClassType;
+ typedef GtkStyle BaseObjectType;
+ typedef GtkStyleClass BaseClassType;
+
+private: friend class Style_Class;
+ static CppClassType style_class_;
+
+private:
+ // noncopyable
+ Style(const Style&);
+ Style& operator=(const Style&);
+
+protected:
+ explicit Style(const Glib::ConstructParams& construct_params);
+ explicit Style(GtkStyle* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~Style();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ GtkStyle* gobj() { return reinterpret_cast<GtkStyle*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const GtkStyle* gobj() const { return reinterpret_cast<GtkStyle*>(gobject_); }
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ GtkStyle* gobj_copy();
+
+private:
+
+
+protected:
+ Style();
+
+public:
+
+ static Glib::RefPtr<Style> create();
+
+
+ void set_fg(Gtk::StateType state, const Gdk::Color& color);
+ Gdk::Color get_fg(Gtk::StateType state) const;
+
+ void set_bg(Gtk::StateType state, const Gdk::Color& color);
+ Gdk::Color get_bg(Gtk::StateType state) const;
+
+ void set_light(Gtk::StateType state, const Gdk::Color& color);
+ Gdk::Color get_light(Gtk::StateType state) const;
+
+ void set_dark(Gtk::StateType state, const Gdk::Color& color);
+ Gdk::Color get_dark(Gtk::StateType state) const;
+
+ void set_mid(Gtk::StateType state, const Gdk::Color& color);
+ Gdk::Color get_mid(Gtk::StateType state) const;
+
+ void set_text(Gtk::StateType state, const Gdk::Color& color);
+ Gdk::Color get_text(Gtk::StateType state) const;
+
+ void set_base(Gtk::StateType state, const Gdk::Color& color);
+ Gdk::Color get_base(Gtk::StateType state) const;
+
+ void set_text_aa(Gtk::StateType state, const Gdk::Color& color);
+ Gdk::Color get_text_aa(Gtk::StateType state) const;
+
+
+ void set_black(const Gdk::Color& value);
+ Gdk::Color get_black() const;
+ void set_white(const Gdk::Color& value);
+ Gdk::Color get_white() const;
+
+ void set_font(const Pango::FontDescription& font_desc);
+
+ // These are only available after being attached to a window.
+ Pango::FontDescription get_font() const;
+
+ void set_xthickness(int xthickness);
+ int get_xthickness() const;
+
+ void set_ythickness(int ythickness);
+ int get_ythickness() const;
+
+ Glib::RefPtr<Gdk::GC> get_fg_gc(Gtk::StateType state_type);
+ Glib::RefPtr<const Gdk::GC> get_fg_gc(Gtk::StateType state_type) const;
+
+ Glib::RefPtr<Gdk::GC> get_bg_gc(Gtk::StateType state_type);
+ Glib::RefPtr<const Gdk::GC> get_bg_gc(Gtk::StateType state_type) const;
+
+ Glib::RefPtr<Gdk::GC> get_light_gc(Gtk::StateType state_type);
+ Glib::RefPtr<const Gdk::GC> get_light_gc(Gtk::StateType state_type) const;
+
+ Glib::RefPtr<Gdk::GC> get_dark_gc(Gtk::StateType state_type);
+ Glib::RefPtr<const Gdk::GC> get_dark_gc(Gtk::StateType state_type) const;
+
+ Glib::RefPtr<Gdk::GC> get_mid_gc ( Gtk::StateType state_type);
+ Glib::RefPtr<const Gdk::GC> get_mid_gc ( Gtk::StateType state_type) const;
+
+ Glib::RefPtr<Gdk::GC> get_text_gc(Gtk::StateType state_type);
+ Glib::RefPtr<const Gdk::GC> get_text_gc(Gtk::StateType state_type) const;
+
+ Glib::RefPtr<Gdk::GC> get_base_gc(Gtk::StateType state_type);
+ Glib::RefPtr<const Gdk::GC> get_base_gc(Gtk::StateType state_type) const;
+
+ Glib::RefPtr<Gdk::GC> get_black_gc();
+ Glib::RefPtr<const Gdk::GC> get_black_gc() const;
+ Glib::RefPtr<Gdk::GC> get_white_gc();
+ Glib::RefPtr<const Gdk::GC> get_white_gc() const;
+
+ /* Deprecated in gtkmm 2.2 -- use get_bg() instead.
+ * Honestly, I have absolutely no idea why this method was added
+ * in the first place. It's basically just confusing since it's
+ * absolutely unrelated to set_background(). Sigh.
+ */
+ Gdk::Color get_background(Gtk::StateType state_type) const;
+
+ /* Deprecated in gtkmm 2.2 -- use get_bg_pixmap() instead.
+ */
+ Glib::RefPtr<Gdk::Pixmap> get_background_pixmap(Gtk::StateType state_type);
+
+ void set_bg_pixmap(Gtk::StateType state_type, const Glib::RefPtr<Gdk::Pixmap>& pixmap);
+ Glib::RefPtr<Gdk::Pixmap> get_bg_pixmap(Gtk::StateType state_type);
+ Glib::RefPtr<const Gdk::Pixmap> get_bg_pixmap(Gtk::StateType state_type) const;
+
+
+ /** Draws an arrow in the given rectangle on @a window using the given
+ * parameters. @a arrow_type determines the direction of the arrow.
+ * @param window A Gdk::Window.
+ * @param state_type A state.
+ * @param shadow_type The type of shadow to draw.
+ * @param area Clip rectangle.
+ * @param widget The widget.
+ * @param detail A style detail.
+ * @param arrow_type The type of arrow to draw.
+ * @param fill <tt>true</tt> if the arrow tip should be filled.
+ * @param x X origin of the rectangle to draw the arrow in.
+ * @param y Y origin of the rectangle to draw the arrow in.
+ * @param width Width of the rectangle to draw the arrow in.
+ * @param height Height of the rectangle to draw the arrow in.
+ */
+ void paint_arrow(
+ const Glib::RefPtr<Gdk::Window>& window,
+ Gtk::StateType state_type,
+ ShadowType shadow_type,
+ const Gdk::Rectangle& area,
+ Widget& widget,
+ const Glib::ustring& detail,
+ ArrowType arrow_type,
+ bool fill,
+ int x,
+ int y,
+ int width,
+ int height) const;
+
+
+ /** Draws a box on @a window with the given parameters.
+ * @param window A Gdk::Window.
+ * @param state_type A state.
+ * @param shadow_type The type of shadow to draw.
+ * @param area Clip rectangle.
+ * @param widget The widget.
+ * @param detail A style detail.
+ * @param x X origin of the box.
+ * @param y Y origin of the box.
+ * @param width The width of the box.
+ * @param height The height of the box.
+ */
+ void paint_box(
+ const Glib::RefPtr<Gdk::Window>& window,
+ Gtk::StateType state_type,
+ ShadowType shadow_type,
+ const Gdk::Rectangle& area,
+ Widget& widget,
+ const Glib::ustring& detail,
+ int x,
+ int y,
+ int width,
+ int height) const;
+
+
+ /** Draws a box in @a window using the given style and state and shadow type,
+ * leaving a gap in one side.
+ * @param window A Gdk::Window.
+ * @param state_type A state.
+ * @param shadow_type Type of shadow to draw.
+ * @param area Clip rectangle.
+ * @param widget The widget.
+ * @param detail A style detail.
+ * @param x X origin of the rectangle.
+ * @param y Y origin of the rectangle.
+ * @param width Width of the rectangle.
+ * @param height Width of the rectangle.
+ * @param gap_side Side in which to leave the gap.
+ * @param gap_x Starting position of the gap.
+ * @param gap_width Width of the gap.
+ */
+ void paint_box_gap(
+ const Glib::RefPtr<Gdk::Window>& window,
+ Gtk::StateType state_type,
+ ShadowType shadow_type,
+ const Gdk::Rectangle& area,
+ Widget& widget,
+ const Glib::ustring& detail,
+ int x,
+ int y,
+ int width,
+ int height,
+ PositionType gap_side,
+ int gap_x,
+ int gap_width) const;
+
+
+ /** Draws a check button indicator in the given rectangle on @a window with
+ * the given parameters.
+ * @param window A Gdk::Window.
+ * @param state_type A state.
+ * @param shadow_type The type of shadow to draw.
+ * @param area Clip rectangle.
+ * @param widget The widget.
+ * @param detail A style detail.
+ * @param x X origin of the rectangle to draw the check in.
+ * @param y Y origin of the rectangle to draw the check in.
+ * @param width The width of the rectangle to draw the check in.
+ * @param height The height of the rectangle to draw the check in.
+ */
+ void paint_check(
+ const Glib::RefPtr<Gdk::Window>& window,
+ Gtk::StateType state_type,
+ ShadowType shadow_type,
+ const Gdk::Rectangle& area,
+ Widget& widget,
+ const Glib::ustring& detail,
+ int x,
+ int y,
+ int width,
+ int height) const;
+
+
+ /** Draws a diamond in the given rectangle on @a window using the given
+ * parameters.
+ * @param window A Gdk::Window.
+ * @param state_type A state.
+ * @param shadow_type The type of shadow to draw.
+ * @param area Clip rectangle.
+ * @param widget The widget.
+ * @param detail A style detail.
+ * @param x X origin of the rectangle to draw the diamond in.
+ * @param y Y origin of the rectangle to draw the diamond in.
+ * @param width Width of the rectangle to draw the diamond in.
+ * @param height Height of the rectangle to draw the diamond in.
+ */
+ void paint_diamond(
+ const Glib::RefPtr<Gdk::Window>& window,
+ Gtk::StateType state_type,
+ ShadowType shadow_type,
+ const Gdk::Rectangle& area,
+ Widget& widget,
+ const Glib::ustring& detail,
+ int x,
+ int y,
+ int width,
+ int height) const;
+
+
+ /** Draws an extension, i.e.\ a notebook tab.
+ * @param window A Gdk::Window.
+ * @param state_type A state.
+ * @param shadow_type Type of shadow to draw.
+ * @param area Clip rectangle.
+ * @param widget The widget.
+ * @param detail A style detail.
+ * @param x X origin of the extension.
+ * @param y Y origin of the extension.
+ * @param width Width of the extension.
+ * @param height Width of the extension.
+ * @param gap_side The side on to which the extension is attached.
+ */
+ void paint_extension(
+ const Glib::RefPtr<Gdk::Window>& window,
+ Gtk::StateType state_type,
+ ShadowType shadow_type,
+ const Gdk::Rectangle& area,
+ Widget& widget,
+ const Glib::ustring& detail,
+ int x,
+ int y,
+ int width,
+ int height,
+ PositionType gap_side) const;
+
+
+ /** Draws a flat box on @a window with the given parameters.
+ * @param window A Gdk::Window.
+ * @param state_type A state.
+ * @param shadow_type The type of shadow to draw.
+ * @param area Clip rectangle.
+ * @param widget The widget.
+ * @param detail A style detail.
+ * @param x X origin of the box.
+ * @param y Y origin of the box.
+ * @param width The width of the box.
+ * @param height The height of the box.
+ */
+ void paint_flat_box(
+ const Glib::RefPtr<Gdk::Window>& window,
+ Gtk::StateType state_type,
+ ShadowType shadow_type,
+ const Gdk::Rectangle& area,
+ Widget& widget,
+ const Glib::ustring& detail,
+ int x,
+ int y,
+ int width,
+ int height) const;
+
+
+ /** Draws a focus indicator around the given rectangle on @a window using the
+ * given style.
+ * @param window A Gdk::Window.
+ * @param state_type A state.
+ * @param area Clip rectangle.
+ * @param widget The widget.
+ * @param detail A style detail.
+ * @param x The x origin of the rectangle around which to draw a focus indicator.
+ * @param y The y origin of the rectangle around which to draw a focus indicator.
+ * @param width The width of the rectangle around which to draw a focus indicator.
+ * @param height The height of the rectangle around which to draw a focus indicator.
+ */
+ void paint_focus(
+ const Glib::RefPtr<Gdk::Window>& window,
+ Gtk::StateType state_type,
+ const Gdk::Rectangle& area,
+ Widget& widget,
+ const Glib::ustring& detail,
+ int x,
+ int y,
+ int width,
+ int height) const;
+
+
+ /** Draws a handle as used in Gtk::HandleBox and Gtk::Paned.
+ * @param window A Gdk::Window.
+ * @param state_type A state.
+ * @param shadow_type Type of shadow to draw.
+ * @param area Clip rectangle.
+ * @param widget The widget.
+ * @param detail A style detail.
+ * @param x X origin of the handle.
+ * @param y Y origin of the handle.
+ * @param width With of the handle.
+ * @param height Height of the handle.
+ * @param orientation The orientation of the handle.
+ */
+ void paint_handle(
+ const Glib::RefPtr<Gdk::Window>& window,
+ Gtk::StateType state_type,
+ ShadowType shadow_type,
+ const Gdk::Rectangle& area,
+ Widget& widget,
+ const Glib::ustring& detail,
+ int x,
+ int y,
+ int width,
+ int height,
+ Orientation orientation) const;
+
+
+ /** Draws a horizontal line from ( @a x1 , @a y ) to ( @a x2 , @a y ) in @a window
+ * using the given style and state.
+ * @param window A Gdk::Window.
+ * @param state_type A state.
+ * @param area Rectangle to which the output is clipped.
+ * @param widget The widget.
+ * @param detail A style detail.
+ * @param x1 The starting x coordinate.
+ * @param x2 The ending x coordinate.
+ * @param y The y coordinate.
+ */
+ void paint_hline(
+ const Glib::RefPtr<Gdk::Window>& window,
+ Gtk::StateType state_type,
+ const Gdk::Rectangle& area,
+ Widget& widget,
+ const Glib::ustring& detail,
+ int x1,
+ int x2,
+ int y) const;
+
+
+ /** Draws a radio button indicator in the given rectangle on @a window with
+ * the given parameters.
+ * @param window A Gdk::Window.
+ * @param state_type A state.
+ * @param shadow_type The type of shadow to draw.
+ * @param area Clip rectangle.
+ * @param widget The widget.
+ * @param detail A style detail.
+ * @param x X origin of the rectangle to draw the option in.
+ * @param y Y origin of the rectangle to draw the option in.
+ * @param width The width of the rectangle to draw the option in.
+ * @param height The height of the rectangle to draw the option in.
+ */
+ void paint_option(
+ const Glib::RefPtr<Gdk::Window>& window,
+ Gtk::StateType state_type,
+ ShadowType shadow_type,
+ const Gdk::Rectangle& area,
+ Widget& widget,
+ const Glib::ustring& detail,
+ int x,
+ int y,
+ int width,
+ int height) const;
+
+ void paint_polygon(
+ const Glib::RefPtr<Gdk::Window>& window,
+ Gtk::StateType state_type,
+ ShadowType shadow_type,
+ const Gdk::Rectangle& area,
+ Widget& widget,
+ const Glib::ustring& detail,
+ const Glib::ArrayHandle<Gdk::Point>& points,
+ bool fill) const;
+
+
+ /** Draws a shadow around the given rectangle in @a window
+ * using the given style and state and shadow type.
+ * @param window A Gdk::Window.
+ * @param state_type A state.
+ * @param shadow_type Type of shadow to draw.
+ * @param area Clip rectangle.
+ * @param widget The widget.
+ * @param detail A style detail.
+ * @param x X origin of the rectangle.
+ * @param y Y origin of the rectangle.
+ * @param width Width of the rectangle.
+ * @param height Width of the rectangle.
+ */
+ void paint_shadow(
+ const Glib::RefPtr<Gdk::Window>& window,
+ Gtk::StateType state_type,
+ ShadowType shadow_type,
+ const Gdk::Rectangle& area,
+ Widget& widget,
+ const Glib::ustring& detail,
+ int x,
+ int y,
+ int width,
+ int height) const;
+
+
+ /** Draws a shadow around the given rectangle in @a window
+ * using the given style and state and shadow type, leaving a
+ * gap in one side.
+ * @param window A Gdk::Window.
+ * @param state_type A state.
+ * @param shadow_type Type of shadow to draw.
+ * @param area Clip rectangle.
+ * @param widget The widget.
+ * @param detail A style detail.
+ * @param x X origin of the rectangle.
+ * @param y Y origin of the rectangle.
+ * @param width Width of the rectangle.
+ * @param height Width of the rectangle.
+ * @param gap_side Side in which to leave the gap.
+ * @param gap_x Starting position of the gap.
+ * @param gap_width Width of the gap.
+ */
+ void paint_shadow_gap(
+ const Glib::RefPtr<Gdk::Window>& window,
+ Gtk::StateType state_type,
+ ShadowType shadow_type,
+ const Gdk::Rectangle& area,
+ Widget& widget,
+ const Glib::ustring& detail,
+ int x,
+ int y,
+ int width,
+ int height,
+ PositionType gap_side,
+ int gap_x,
+ int gap_width) const;
+
+
+ /**
+ */
+ void paint_slider(
+ const Glib::RefPtr<Gdk::Window>& window,
+ Gtk::StateType state_type,
+ ShadowType shadow_type,
+ const Gdk::Rectangle& area,
+ Widget& widget,
+ const Glib::ustring& detail,
+ int x,
+ int y,
+ int width,
+ int height,
+ Orientation orientation) const;
+
+
+ /** Draws an option menu tab (i.e.\ the up and down pointing arrows)
+ * in the given rectangle on @a window using the given parameters.
+ * @param window A Gdk::Window.
+ * @param state_type A state.
+ * @param shadow_type The type of shadow to draw.
+ * @param area Clip rectangle.
+ * @param widget The widget.
+ * @param detail A style detail.
+ * @param x X origin of the rectangle to draw the tab in.
+ * @param y Y origin of the rectangle to draw the tab in.
+ * @param width The width of the rectangle to draw the tab in.
+ * @param height The height of the rectangle to draw the tab in.
+ */
+ void paint_tab(
+ const Glib::RefPtr<Gdk::Window>& window,
+ Gtk::StateType state_type,
+ ShadowType shadow_type,
+ const Gdk::Rectangle& area,
+ Widget& widget,
+ const Glib::ustring& detail,
+ int x,
+ int y,
+ int width,
+ int height) const;
+
+
+ /** Draws a vertical line from ( @a x , @a y1 ) to ( @a x , @a y2 ) in @a window
+ * using the given style and state.
+ * @param window A Gdk::Window.
+ * @param state_type A state.
+ * @param area Rectangle to which the output is clipped.
+ * @param widget The widget.
+ * @param detail A style detail.
+ * @param y1 The starting y coordinate.
+ * @param y2 The ending y coordinate.
+ * @param x The x coordinate.
+ */
+ void paint_vline(
+ const Glib::RefPtr<Gdk::Window>& window,
+ Gtk::StateType state_type,
+ const Gdk::Rectangle& area,
+ Widget& widget,
+ const Glib::ustring& detail,
+ int y1,
+ int y2,
+ int x) const;
+
+
+ /** Draws an expander as used in Gtk::TreeView.
+ * @param window A Gdk::Window.
+ * @param state_type A state.
+ * @param area Clip rectangle.
+ * @param widget The widget.
+ * @param detail A style detail.
+ * @param x The x position to draw the expander at.
+ * @param y The y position to draw the expander at.
+ * @param expander_style The style to draw the expander in.
+ */
+ void paint_expander(
+ const Glib::RefPtr<Gdk::Window>& window,
+ Gtk::StateType state_type,
+ const Gdk::Rectangle& area,
+ Widget& widget,
+ const Glib::ustring& detail,
+ int x,
+ int y,
+ ExpanderStyle expander_style) const;
+
+
+ /**
+ */
+ void paint_layout(
+ const Glib::RefPtr<Gdk::Window>& window,
+ Gtk::StateType state_type,
+ bool use_text,
+ const Gdk::Rectangle& area,
+ Widget& widget,
+ const Glib::ustring& detail,
+ int x,
+ int y,
+ const Glib::RefPtr<Pango::Layout>& layout) const;
+
+
+ /** Draws a resize grip in the given rectangle on @a window using the given
+ * parameters.
+ * @param window A Gdk::Window.
+ * @param state_type A state.
+ * @param area Clip rectangle.
+ * @param widget The widget.
+ * @param detail A style detail.
+ * @param edge The edge in which to draw the resize grip.
+ * @param x The x origin of the rectangle in which to draw the resize grip.
+ * @param y The y origin of the rectangle in which to draw the resize grip.
+ * @param width The width of the rectangle in which to draw the resize grip.
+ * @param height The height of the rectangle in which to draw the resize grip.
+ */
+ void paint_resize_grip(
+ const Glib::RefPtr<Gdk::Window>& window,
+ Gtk::StateType state_type,
+ const Gdk::Rectangle& area,
+ Widget& widget,
+ const Glib::ustring& detail,
+ Gdk::WindowEdge edge,
+ int x,
+ int y,
+ int width,
+ int height) const;
+
+
+ Glib::RefPtr<Style> copy();
+
+ // These are worthless to the users - they should use set_style instead.
+
+ //_WRAP_METHOD(Glib::RefPtr<Style> attach(const Glib::RefPtr<Gdk::Window>& window), gtk_style_attach)
+ //_WRAP_METHOD(void detach(), gtk_style_detach)
+
+
+ /** Sets the background of @a window to the background color or pixmap
+ * specified by @a style for the given state.
+ * @param window A Gdk::Window.
+ * @param state_type A state.
+ */
+ void set_background(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type);
+
+
+ void apply_default_background(const Glib::RefPtr<Gdk::Window>& window, bool set_bg,
+ Gtk::StateType state_type, const Gdk::Rectangle& area,
+ int x, int y, int width, int height);
+
+
+ IconSet lookup_icon_set(const Gtk::StockID& stock_id);
+
+
+ /** Renders the icon specified by @a source at the given @a size
+ * according to the given parameters and returns the result in a
+ * pixbuf.
+ * @param source The Gtk::IconSource specifying the icon to render.
+ * @param direction A text direction.
+ * @param state A state.
+ * @param size The size to render the icon at. A size of (GtkIconSize)-1
+ * means render at the size of the source and don't scale.
+ * @param widget The widget.
+ * @param detail A style detail.
+ * @return A newly-created Gdk::Pixbuf containing the rendered icon.
+ */
+ Glib::RefPtr<Gdk::Pixbuf> render_icon(const IconSource& source,
+ Gtk::TextDirection direction, Gtk::StateType state, Gtk::IconSize size,
+ Gtk::Widget& widget, const Glib::ustring& detail);
+
+protected:
+ virtual void realize_vfunc();
+ virtual void unrealize_vfunc();
+ virtual void copy_vfunc(const Glib::RefPtr<Style>& src);
+ virtual Glib::RefPtr<Style> clone_vfunc();
+ virtual void init_from_rc_vfunc(const Glib::RefPtr<RcStyle>& rc_style);
+ virtual void set_background_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type);
+
+ virtual Glib::RefPtr<Gdk::Pixbuf> render_icon_vfunc(const IconSource& source, TextDirection direction, Gtk::StateType state, IconSize size, Widget* widget, const Glib::ustring& detail);
+ virtual void draw_hline_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x1, int x2, int y);
+ virtual void draw_vline_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int y1, int y2, int x);
+ virtual void draw_shadow_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, int width, int height);
+ virtual void draw_polygon_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, GdkPoint* point, int npoints, bool fill);
+ virtual void draw_arrow_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, Gtk::ArrowType arrow_type, bool fill, int x, int y, int width, int height);
+ virtual void draw_diamond_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, int width, int height);
+ virtual void draw_string_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, const Glib::ustring& string);
+ virtual void draw_box_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, int width, int height);
+ virtual void draw_flat_box_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, int width, int height);
+ virtual void draw_check_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, int width, int height);
+ virtual void draw_option_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, int width, int height);
+ virtual void draw_tab_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, int width, int height);
+ virtual void draw_shadow_gap_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, int width, int height, Gtk::PositionType gap_side, int gap_x, int gap_width);
+ virtual void draw_box_gap_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, int width, int height, Gtk::PositionType gap_side, int gap_x, int gap_width);
+ virtual void draw_extension_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, int width, int height, PositionType gap_side);
+ virtual void draw_focus_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, int width, int height);
+ virtual void draw_slider_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, int width, int height, Orientation orientation);
+ virtual void draw_handle_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, ShadowType shadow_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, int width, int height, Orientation orientation);
+ virtual void draw_expander_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, ExpanderStyle expander_style);
+ virtual void draw_layout_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, bool use_text, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, int x, int y, const Glib::RefPtr<Pango::Layout>& layout);
+ virtual void draw_resize_grip_vfunc(const Glib::RefPtr<Gdk::Window>& window, Gtk::StateType state_type, const Gdk::Rectangle& area, Widget* widget, const Glib::ustring& detail, Gdk::WindowEdge edge, int x, int y, int width, int height);
+
+
+ Glib::SignalProxy0< void > signal_realize();
+
+
+ Glib::SignalProxy0< void > signal_unrealize();
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_realize();
+ virtual void on_unrealize();
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::Style
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Gtk::Style> wrap(GtkStyle* object, bool take_copy = false);
+}
+
+
+#endif /* _GTKMM_STYLE_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/table.cc b/libs/gtkmm2/gtk/gtkmm/table.cc
new file mode 100644
index 0000000000..7fd5cb8292
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/table.cc
@@ -0,0 +1,406 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/table.h>
+#include <gtkmm/private/table_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtktable.h>
+
+namespace Gtk
+{
+
+namespace Table_Helpers
+{
+
+Widget* Child::get_widget() const
+{
+ return Glib::wrap(gobj()->widget);
+}
+
+guint16 Child::get_left_attach() const
+{
+ return gobj()->left_attach;
+}
+
+
+guint16 Child::get_right_attach() const
+{
+ return gobj()->right_attach;
+}
+
+guint16 Child::get_top_attach() const
+{
+ return gobj()->top_attach;
+}
+
+guint16 Child::get_bottom_attach() const
+{
+ return gobj()->bottom_attach;
+}
+
+guint16 Child::get_xpadding() const
+{
+ return gobj()->xpadding;
+}
+
+guint16 Child::get_ypadding() const
+{
+ return gobj()->ypadding;
+}
+
+bool Child::get_xexpand() const
+{
+ return (bool)gobj()->xexpand;
+}
+
+bool Child::get_yexpand() const
+{
+ return (bool)gobj()->yexpand;
+}
+
+bool Child::get_xshrink() const
+{
+ return (bool)gobj()->xshrink;
+}
+bool Child::get_yshrink() const
+{
+ return (bool)gobj()->yshrink;
+}
+
+bool Child::get_xfill() const
+{
+ return (bool)gobj()->xfill;
+}
+
+bool Child::get_yfill() const
+{
+ return (bool)gobj()->yfill;
+}
+
+
+} //namespace Table_Helpers
+
+
+void Table::set_spacings(guint spacing)
+{
+ set_row_spacings(spacing);
+ set_col_spacings(spacing);
+}
+
+Table::TableList& Table::children()
+{
+ children_proxy_ = TableList(gobj());
+ return children_proxy_;
+}
+
+const Table::TableList& Table::children() const
+{
+ children_proxy_ = TableList(const_cast<GtkTable*>(gobj()));
+ return children_proxy_;
+}
+
+
+} /* namespace Gtk */
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::Table* wrap(GtkTable* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::Table *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Table_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Table_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_table_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Table_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* Table_Class::wrap_new(GObject* o)
+{
+ return manage(new Table((GtkTable*)(o)));
+
+}
+
+
+/* The implementation: */
+
+Table::Table(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Container(construct_params)
+{
+ }
+
+Table::Table(GtkTable* castitem)
+:
+ Gtk::Container((GtkContainer*)(castitem))
+{
+ }
+
+Table::~Table()
+{
+ destroy_();
+}
+
+Table::CppClassType Table::table_class_; // initialize static member
+
+GType Table::get_type()
+{
+ return table_class_.init().get_type();
+}
+
+GType Table::get_base_type()
+{
+ return gtk_table_get_type();
+}
+
+
+namespace Table_Helpers
+{
+
+void TableList::remove(const_reference child)
+{
+ gtk_container_remove(GTK_CONTAINER(gparent_),
+ (GtkWidget*)(child.gobj()));
+}
+
+void TableList::remove(Widget& widget)
+{
+ gtk_container_remove(GTK_CONTAINER(gparent_), (GtkWidget*)(widget.gobj()));
+}
+
+TableList::iterator TableList::erase(iterator position)
+{
+ //Check that it is a valid iterator, to a real item:
+ if ( !position.node_|| (position == end()) )
+ return end();
+
+ //Get an iterator the the next item, to return:
+ iterator next = position;
+ next++;
+
+ //Use GTK+ C function to remove it, by providing the GtkWidget*:
+ gtk_container_remove( GTK_CONTAINER(gparent_), (GtkWidget*)(position->gobj()) );
+ return next;
+}
+
+} /* namespace Table_Helpers */
+
+
+namespace Table_Helpers
+{
+
+TableList::TableList()
+{}
+
+TableList::TableList(GtkTable* gparent)
+: type_base((GObject*)gparent)
+{}
+
+TableList::TableList(const TableList& src)
+:
+ type_base(src)
+{}
+
+TableList& TableList::operator=(const TableList& src)
+{
+ type_base::operator=(src);
+ return *this;
+}
+
+GList*& TableList::glist() const
+{
+ return ((GtkTable*)gparent_)->children;
+}
+
+void TableList::erase(iterator start, iterator stop)
+{
+ type_base::erase(start, stop);
+}
+
+GtkTable* TableList::gparent()
+{
+ return (GtkTable*)type_base::gparent();
+}
+
+const GtkTable* TableList::gparent() const
+{
+ return (GtkTable*)type_base::gparent();
+}
+
+TableList::reference TableList::operator[](size_type l) const
+{
+ return type_base::operator[](l);
+}
+
+} /* namespace Table_Helpers */
+
+Table::Table(guint n_rows, guint n_columns, bool homogeneous)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Container(Glib::ConstructParams(table_class_.init(), "n_rows", n_rows, "n_columns", n_columns, "homogeneous", static_cast<int>(homogeneous), (char*) 0))
+{
+ }
+
+void Table::attach(Widget& child, guint left_attach, guint right_attach, guint top_attach, guint bottom_attach, AttachOptions xoptions, AttachOptions yoptions, guint xpadding, guint ypadding)
+{
+ gtk_table_attach(gobj(), (child).gobj(), left_attach, right_attach, top_attach, bottom_attach, ((GtkAttachOptions)(xoptions)), ((GtkAttachOptions)(yoptions)), xpadding, ypadding);
+}
+
+void Table::resize(guint rows, guint columns)
+{
+ gtk_table_resize(gobj(), rows, columns);
+}
+
+void Table::set_row_spacing(guint row, guint spacing)
+{
+ gtk_table_set_row_spacing(gobj(), row, spacing);
+}
+
+guint Table::get_row_spacing(guint row) const
+{
+ return gtk_table_get_row_spacing(const_cast<GtkTable*>(gobj()), row);
+}
+
+void Table::set_col_spacing(guint column, guint spacing)
+{
+ gtk_table_set_col_spacing(gobj(), column, spacing);
+}
+
+guint Table::get_col_spacing(guint column) const
+{
+ return gtk_table_get_col_spacing(const_cast<GtkTable*>(gobj()), column);
+}
+
+void Table::set_row_spacings(guint spacing)
+{
+ gtk_table_set_row_spacings(gobj(), spacing);
+}
+
+void Table::set_col_spacings(guint spacing)
+{
+ gtk_table_set_col_spacings(gobj(), spacing);
+}
+
+guint Table::get_default_row_spacing()
+{
+ return gtk_table_get_default_row_spacing(gobj());
+}
+
+guint Table::get_default_col_spacing()
+{
+ return gtk_table_get_default_col_spacing(gobj());
+}
+
+void Table::set_homogeneous(bool homogeneous)
+{
+ gtk_table_set_homogeneous(gobj(), static_cast<int>(homogeneous));
+}
+
+bool Table::get_homogeneous() const
+{
+ return gtk_table_get_homogeneous(const_cast<GtkTable*>(gobj()));
+}
+
+
+Glib::PropertyProxy<guint> Table::property_n_rows()
+{
+ return Glib::PropertyProxy<guint>(this, "n-rows");
+}
+
+Glib::PropertyProxy_ReadOnly<guint> Table::property_n_rows() const
+{
+ return Glib::PropertyProxy_ReadOnly<guint>(this, "n-rows");
+}
+
+Glib::PropertyProxy<guint> Table::property_n_columns()
+{
+ return Glib::PropertyProxy<guint>(this, "n-columns");
+}
+
+Glib::PropertyProxy_ReadOnly<guint> Table::property_n_columns() const
+{
+ return Glib::PropertyProxy_ReadOnly<guint>(this, "n-columns");
+}
+
+Glib::PropertyProxy<guint> Table::property_column_spacing()
+{
+ return Glib::PropertyProxy<guint>(this, "column-spacing");
+}
+
+Glib::PropertyProxy_ReadOnly<guint> Table::property_column_spacing() const
+{
+ return Glib::PropertyProxy_ReadOnly<guint>(this, "column-spacing");
+}
+
+Glib::PropertyProxy<guint> Table::property_row_spacing()
+{
+ return Glib::PropertyProxy<guint>(this, "row-spacing");
+}
+
+Glib::PropertyProxy_ReadOnly<guint> Table::property_row_spacing() const
+{
+ return Glib::PropertyProxy_ReadOnly<guint>(this, "row-spacing");
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/table.h b/libs/gtkmm2/gtk/gtkmm/table.h
new file mode 100644
index 0000000000..5dd6a8987e
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/table.h
@@ -0,0 +1,379 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TABLE_H
+#define _GTKMM_TABLE_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/helperlist.h>
+#include <gtkmm/container.h>
+#include <gtkmm/enums.h>
+#include <gtk/gtktable.h> /* for GtkTableChild */
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkTable GtkTable;
+typedef struct _GtkTableClass GtkTableClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class Table_Class; } // namespace Gtk
+namespace Gtk
+{
+
+class Table;
+
+namespace Table_Helpers
+{
+
+class Child : protected _GtkTableChild
+{
+private:
+ Child& operator=(const Child&); //Not implemented.
+ Child(const Child&); //Not implemented.
+
+public:
+ inline _GtkTableChild* gobj() {return (this);}
+ inline const _GtkTableChild* gobj() const {return (this);}
+
+ Widget* get_widget() const;
+
+ //TODO: Which of the GtkTableChild's fields are public API?
+ //Maybe we should remove some of these get()s or add some set()s.
+ //If get_widget() is the only accessor, then we should probably make
+ //the STL-style Table list contain Widgets instead of Childs.
+
+ guint16 get_left_attach() const;
+ guint16 get_right_attach() const;
+ guint16 get_top_attach() const;
+ guint16 get_bottom_attach() const;
+ guint16 get_xpadding() const;
+ guint16 get_ypadding() const;
+ bool get_xexpand() const;
+ bool get_yexpand() const;
+ bool get_xshrink() const;
+ bool get_yshrink() const;
+ bool get_xfill() const;
+ bool get_yfill() const;
+
+protected:
+ inline GtkTable* parent()
+ { return (GtkTable*) (gobj()->widget->parent); }
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ friend class Dummy_; // silence the compiler (Child has only private ctors)
+#endif
+};
+
+
+class TableList : public Glib::HelperList< Child, Widget, Glib::List_Iterator< Child > >
+{
+public:
+ TableList();
+ explicit TableList(GtkTable* gparent);
+ TableList(const TableList& src);
+ virtual ~TableList() {}
+
+ TableList& operator=(const TableList& src);
+
+ typedef Glib::HelperList< Child, Widget, Glib::List_Iterator< Child > > type_base;
+
+ GtkTable* gparent();
+ const GtkTable* gparent() const;
+
+ virtual GList*& glist() const; // front of list
+
+ virtual void erase(iterator start, iterator stop);
+ virtual iterator erase(iterator); //Implented as custom or by LIST_CONTAINER_REMOVE
+ virtual void remove(const_reference); //Implented as custom or by LIST_CONTAINER_REMOVE
+
+ /// This is order n. (use at own risk)
+ reference operator[](size_type l) const;
+
+protected:
+ //Hide these because its read-only:
+ iterator insert(iterator position, element_type& e);
+
+ inline void pop_front();
+ inline void pop_back();
+
+
+ //The standard iterator, instead of List_Cpp_Iterator,
+ //only works because Child is derived from _GtkTableChild.
+
+
+virtual void remove(Widget& w); //Implented as custom or by LIST_CONTAINER_REMOVE
+
+ };
+
+
+} // namespace Table_Helpers
+
+
+/** Pack widgets in regular patterns.
+ * @ingroup Widgets
+ * @ingroup Containers
+ * Gtk::Table is one of the primary ways of grouping widgets together. It
+ * consists of a set of lattice points to to which widgets can be attached.
+ * There are <em>rows</em>&nbsp;+&nbsp;1 lattice points vertically and
+ * <em>columns</em>&nbsp;+&nbsp;1 lattice points horizontally. Lattice points
+ * start counting from 0. Lattice points can either be specified to be
+ * <em>homogeneous</em>, meaning equally spaced, or not <em>homogeneous</em>,
+ * meaning each cell should be calculated based on the widgets contained in the
+ * row and column. The <em>homogeneous</em> property defaults to false.
+ *
+ * Widgets can be attached to the table by specifying the top, bottom, left and
+ * right points corresponding to upper, lefthand lattice point and the lower,
+ * righthand lattice point which the widget should span. Widgets can either be
+ * contained in a cell or may span cells. A number of options control the
+ * resizing behavior of widgets contained in the table.
+ *
+ * @par Packing options:
+ * There are a number of packing options that can be specified when adding a
+ * widget. With <tt>Gtk::EXPAND</tt>, the lattice is allowed to grow to fill
+ * space. With <tt>Gtk::SHRINK</tt>, the lattice is allowed to shrink when
+ * resized. It is also possible to specify the behaviour of the widgets
+ * allocation within the table. The flag <tt>Gtk::FILL</tt> declares the
+ * widget should grow to fill lattice. If this is not set any extra space is
+ * used as padding. The default is <tt>(Gtk::FILL&nbsp;|&nbsp;Gtk::EXPAND)</tt>.
+ *
+ * @par Table sizing:
+ * The table size is calculated based on the size of the widgets contained
+ * within and the restrictions imposed by specified options. Padding and
+ * spacing can be used in the table. Padding is added on either side of a
+ * widget, while spacing is placed between widgets.
+ *
+ * @see Gtk::HBox, Gtk::VBox
+ */
+
+class Table : public Container
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Table CppObjectType;
+ typedef Table_Class CppClassType;
+ typedef GtkTable BaseObjectType;
+ typedef GtkTableClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~Table();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class Table_Class;
+ static CppClassType table_class_;
+
+ // noncopyable
+ Table(const Table&);
+ Table& operator=(const Table&);
+
+protected:
+ explicit Table(const Glib::ConstructParams& construct_params);
+ explicit Table(GtkTable* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkTable* gobj() { return reinterpret_cast<GtkTable*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkTable* gobj() const { return reinterpret_cast<GtkTable*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+
+public:
+ explicit Table(guint n_rows = 1, guint n_columns = 1, bool homogeneous = false);
+
+
+ void attach(Widget& child,
+ guint left_attach, guint right_attach,
+ guint top_attach, guint bottom_attach,
+ AttachOptions xoptions = FILL | EXPAND, AttachOptions yoptions = FILL | EXPAND,
+ guint xpadding = 0, guint ypadding = 0);
+
+
+ void resize(guint rows, guint columns);
+
+
+ void set_row_spacing(guint row, guint spacing);
+
+ /** Gets the amount of space between row @a row , and
+ * row @a row + 1. See set_row_spacing().
+ * @param row A row in the table, 0 indicates the first row.
+ * @return The row spacing.
+ */
+ guint get_row_spacing(guint row) const;
+
+
+ void set_col_spacing(guint column, guint spacing);
+
+ /** Gets the amount of space between column @a col , and
+ * column @a col + 1. See set_col_spacing().
+ * @param column A column in the table, 0 indicates the first column.
+ * @return The column spacing.
+ */
+ guint get_col_spacing(guint column) const;
+
+
+ void set_row_spacings(guint spacing);
+
+
+ void set_col_spacings(guint spacing);
+
+ void set_spacings(guint spacing);
+
+
+ /** Gets the default row spacing for the table. This is
+ * the spacing that will be used for newly added rows.
+ * (See set_row_spacings())
+ * @return Value: the default row spacing.
+ */
+ guint get_default_row_spacing();
+
+ /** Gets the default column spacing for the table. This is
+ * the spacing that will be used for newly added columns.
+ * (See set_col_spacings())
+ * @return Value: the default column spacing.
+ */
+ guint get_default_col_spacing();
+
+
+ void set_homogeneous(bool homogeneous = true);
+
+ /** Returns whether the table cells are all constrained to the same
+ * width and height. (See gtk_table_set_homogenous())
+ * @return <tt>true</tt> if the cells are all constrained to the same size.
+ */
+ bool get_homogeneous() const;
+
+ typedef Table_Helpers::TableList TableList;
+
+
+ TableList& children();
+ const TableList& children() const;
+
+ /** The number of rows in the table.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<guint> property_n_rows() ;
+
+/** The number of rows in the table.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<guint> property_n_rows() const;
+
+ /** The number of columns in the table.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<guint> property_n_columns() ;
+
+/** The number of columns in the table.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<guint> property_n_columns() const;
+
+ /** The amount of space between two consecutive columns.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<guint> property_column_spacing() ;
+
+/** The amount of space between two consecutive columns.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<guint> property_column_spacing() const;
+
+ /** The amount of space between two consecutive rows.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<guint> property_row_spacing() ;
+
+/** The amount of space between two consecutive rows.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<guint> property_row_spacing() const;
+
+
+protected:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ mutable TableList children_proxy_;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::Table
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::Table* wrap(GtkTable* object, bool take_copy = false);
+}
+#endif /* _GTKMM_TABLE_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/targetentry.cc b/libs/gtkmm2/gtk/gtkmm/targetentry.cc
new file mode 100644
index 0000000000..e97e8438f5
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/targetentry.cc
@@ -0,0 +1,113 @@
+// -*- c++ -*-
+/* $Id$ */
+
+/* targetentry.cc
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/targetentry.h>
+
+
+namespace Gtk
+{
+
+TargetEntry::TargetEntry()
+{
+ memset(&gobject_, 0, sizeof(gobject_));
+}
+
+TargetEntry::TargetEntry(const Glib::ustring& target, Gtk::TargetFlags flags, guint info)
+{
+ set_target(target);
+ set_flags(flags);
+ set_info(info);
+}
+
+TargetEntry::TargetEntry(const GtkTargetEntry& gobject)
+{
+ set_target(gobject.target);
+ set_info(gobject.info);
+ set_flags(TargetFlags(gobject.flags));
+}
+
+TargetEntry::TargetEntry(const TargetEntry& src)
+{
+ set_target(src.get_target());
+ set_info(src.get_info());
+ set_flags(src.get_flags());
+}
+
+TargetEntry::~TargetEntry()
+{
+ g_free(gobject_.target);
+}
+
+TargetEntry& TargetEntry::operator=(const TargetEntry& src)
+{
+ if(&src != this)
+ {
+ set_target(src.get_target());
+ set_info(src.get_info());
+ set_flags(src.get_flags());
+ }
+
+ return *this;
+}
+
+Glib::ustring TargetEntry::get_target() const
+{
+ return gobject_.target;
+}
+
+void TargetEntry::set_target(const Glib::ustring& target)
+{
+ gobject_.target = g_strdup(target.c_str());
+}
+
+Gtk::TargetFlags TargetEntry::get_flags() const
+{
+ return (Gtk::TargetFlags)(gobject_.flags);
+}
+
+void TargetEntry::set_flags(Gtk::TargetFlags flags)
+{
+ gobject_.flags = (guint)(flags);
+}
+
+guint TargetEntry::get_info() const
+{
+ return gobject_.info;
+}
+
+void TargetEntry::set_info(guint info)
+{
+ gobject_.info = info;
+}
+
+GtkTargetEntry* TargetEntry::gobj()
+{
+ return &gobject_;
+}
+
+const GtkTargetEntry* TargetEntry::gobj() const
+{
+ return &gobject_;
+}
+
+} /* namespace Gtk */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/targetentry.h b/libs/gtkmm2/gtk/gtkmm/targetentry.h
new file mode 100644
index 0000000000..6b00623adc
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/targetentry.h
@@ -0,0 +1,97 @@
+// -*- c++ -*-
+#ifndef _GTKMM_TARGETENTRY_H
+#define _GTKMM_TARGETENTRY_H
+
+/* $Id$ */
+
+/* targetentry.h
+ *
+ * Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/utility.h>
+#include <glibmm/ustring.h>
+#include <glibmm/arrayhandle.h>
+#include <gtkmm/enums.h>
+#include <gtk/gtkselection.h> //For GtkTargetEntry.
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C"
+{
+ typedef struct _GtkTargetEntry GtkTargetEntry;
+}
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+namespace Gtk
+{
+
+class TargetEntry
+{
+public:
+ TargetEntry();
+ explicit TargetEntry(const Glib::ustring& target, Gtk::TargetFlags flags = Gtk::TargetFlags(0), guint info = 0);
+ explicit TargetEntry(const GtkTargetEntry& gobject);
+ TargetEntry(const TargetEntry& src);
+ virtual ~TargetEntry();
+
+ TargetEntry& operator=(const TargetEntry& src);
+
+ Glib::ustring get_target() const;
+ void set_target(const Glib::ustring& target);
+
+ Gtk::TargetFlags get_flags() const;
+ void set_flags(Gtk::TargetFlags flags);
+
+ guint get_info() const;
+ void set_info(guint info);
+
+ //Use this when you have to use an array of GdkTargetEntrys
+ //This TargetEntry will still own the string memory.
+ GtkTargetEntry* gobj();
+ const GtkTargetEntry* gobj() const;
+
+protected:
+ GtkTargetEntry gobject_;
+};
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+struct TargetEntry_Traits
+{
+ typedef TargetEntry CppType;
+ typedef GtkTargetEntry CType;
+ typedef GtkTargetEntry CTypeNonConst;
+
+ static const CType& to_c_type(const CppType& item)
+ { return *item.gobj(); }
+
+ static const CType& to_c_type(const CType& item)
+ { return item; }
+
+ static CppType to_cpp_type(const CType& item)
+ { return TargetEntry(item); /* copies string */}
+
+ static void release_c_type(const CType&) {}
+};
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+typedef Glib::ArrayHandle< TargetEntry, TargetEntry_Traits > ArrayHandle_TargetEntry;
+
+} /* namespace Gtk */
+
+
+#endif /* _GTKMM_TARGETENTRY_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/targetlist.cc b/libs/gtkmm2/gtk/gtkmm/targetlist.cc
new file mode 100644
index 0000000000..8629b4f1a9
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/targetlist.cc
@@ -0,0 +1,129 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/targetlist.h>
+#include <gtkmm/private/targetlist_p.h>
+
+#include <gtk/gtkselection.h>
+/* Copyright 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+namespace Gtk
+{
+
+Glib::RefPtr<Gtk::TargetList> TargetList::create(const ArrayHandle_TargetEntry& targets)
+{
+ return Glib::wrap(gtk_target_list_new(targets.data(), targets.size()));
+}
+
+void TargetList::add(const ArrayHandle_TargetEntry& targets)
+{
+ gtk_target_list_add_table(gobj(), targets.data(), targets.size());
+}
+
+} // namespace Gtk
+
+
+namespace
+{
+} // anonymous namespace
+
+
+/* Why reinterpret_cast<TargetList*>(gobject) is needed:
+ *
+ * A TargetList instance is in fact always a GtkTargetList instance.
+ * Unfortunately, GtkTargetList cannot be a member of TargetList,
+ * because it is an opaque struct. Also, the C interface does not provide
+ * any hooks to install a destroy notification handler, thus we cannot
+ * wrap it dynamically either.
+ *
+ * The cast works because TargetList does not have any member data, and
+ * it is impossible to derive from it. This is ensured by not implementing
+ * the (protected) default constructor. The ctor is protected rather than
+ * private just to avoid a compile warning.
+ */
+
+namespace Glib
+{
+
+Glib::RefPtr<Gtk::TargetList> wrap(GtkTargetList* object, bool take_copy)
+{
+ if(take_copy && object)
+ gtk_target_list_ref(object);
+
+ // See the comment at the top of this file, if you want to know why the cast works.
+ return Glib::RefPtr<Gtk::TargetList>(reinterpret_cast<Gtk::TargetList*>(object));
+}
+
+} // namespace Glib
+
+
+namespace Gtk
+{
+
+
+void TargetList::reference() const
+{
+ // See the comment at the top of this file, if you want to know why the cast works.
+ gtk_target_list_ref(reinterpret_cast<GtkTargetList*>(const_cast<TargetList*>(this)));
+}
+
+void TargetList::unreference() const
+{
+ // See the comment at the top of this file, if you want to know why the cast works.
+ gtk_target_list_unref(reinterpret_cast<GtkTargetList*>(const_cast<TargetList*>(this)));
+}
+
+GtkTargetList* TargetList::gobj()
+{
+ // See the comment at the top of this file, if you want to know why the cast works.
+ return reinterpret_cast<GtkTargetList*>(this);
+}
+
+const GtkTargetList* TargetList::gobj() const
+{
+ // See the comment at the top of this file, if you want to know why the cast works.
+ return reinterpret_cast<const GtkTargetList*>(this);
+}
+
+GtkTargetList* TargetList::gobj_copy() const
+{
+ // See the comment at the top of this file, if you want to know why the cast works.
+ GtkTargetList *const gobject = reinterpret_cast<GtkTargetList*>(const_cast<TargetList*>(this));
+ gtk_target_list_ref(gobject);
+ return gobject;
+}
+
+
+void TargetList::add(const Glib::ustring& target, TargetFlags flags, guint info)
+{
+ gtk_target_list_add(gobj(), Gdk::AtomString::to_c_type(target), (guint)(flags), info);
+}
+
+void TargetList::remove(const Glib::ustring& target)
+{
+ gtk_target_list_remove(gobj(), Gdk::AtomString::to_c_type(target));
+}
+
+bool TargetList::find(const Glib::ustring& target, guint* info) const
+{
+ return gtk_target_list_find(const_cast<GtkTargetList*>(gobj()), Gdk::AtomString::to_c_type(target), info);
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/targetlist.h b/libs/gtkmm2/gtk/gtkmm/targetlist.h
new file mode 100644
index 0000000000..286d533ee1
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/targetlist.h
@@ -0,0 +1,97 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TARGETLIST_H
+#define _GTKMM_TARGETLIST_H
+
+#include <glibmm.h>
+
+/* Copyright(C) 2002 The gtkmm Development Team
+ *
+ * This library is free software, ) you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation, ) either
+ * version 2 of the License, or(at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY, ) without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library, ) if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#include <gtkmm/enums.h>
+#include <gtkmm/targetentry.h>
+#include <gdkmm/types.h>
+
+
+namespace Gtk
+{
+
+class TargetList
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef TargetList CppObjectType;
+ typedef GtkTargetList BaseObjectType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+ // For use with Glib::RefPtr<> only.
+ void reference() const;
+ void unreference() const;
+
+ ///Provides access to the underlying C instance.
+ GtkTargetList* gobj();
+
+ ///Provides access to the underlying C instance.
+ const GtkTargetList* gobj() const;
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ GtkTargetList* gobj_copy() const;
+
+protected:
+ // Do not derive this. Gtk::TargetList can neither be constructed nor deleted.
+ TargetList();
+ void operator delete(void*, size_t);
+
+private:
+ // noncopyable
+ TargetList(const TargetList&);
+ TargetList& operator=(const TargetList&);
+
+
+public:
+ static Glib::RefPtr<Gtk::TargetList> create(const ArrayHandle_TargetEntry& targets);
+
+
+ void add(const Glib::ustring& target, TargetFlags flags = TargetFlags(0), guint info = 0);
+ void add(const ArrayHandle_TargetEntry& targets);
+
+ void remove(const Glib::ustring& target);
+
+ bool find(const Glib::ustring& target, guint* info) const;
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+
+ /** @relates Gtk::TargetList
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Gtk::TargetList> wrap(GtkTargetList* object, bool take_copy = false);
+
+} // namespace Glib
+
+#endif /* _GTKMM_TARGETLIST_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/tearoffmenuitem.cc b/libs/gtkmm2/gtk/gtkmm/tearoffmenuitem.cc
new file mode 100644
index 0000000000..fbcc26f2cd
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/tearoffmenuitem.cc
@@ -0,0 +1,138 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/tearoffmenuitem.h>
+#include <gtkmm/private/tearoffmenuitem_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtktearoffmenuitem.h>
+
+namespace Gtk
+{
+
+bool TearoffMenuItem::is_torn_off() const
+{
+ return gobj()->torn_off;
+}
+
+} /* namespace Gtk */
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::TearoffMenuItem* wrap(GtkTearoffMenuItem* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::TearoffMenuItem *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& TearoffMenuItem_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &TearoffMenuItem_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_tearoff_menu_item_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void TearoffMenuItem_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* TearoffMenuItem_Class::wrap_new(GObject* o)
+{
+ return manage(new TearoffMenuItem((GtkTearoffMenuItem*)(o)));
+
+}
+
+
+/* The implementation: */
+
+TearoffMenuItem::TearoffMenuItem(const Glib::ConstructParams& construct_params)
+:
+ Gtk::MenuItem(construct_params)
+{
+ }
+
+TearoffMenuItem::TearoffMenuItem(GtkTearoffMenuItem* castitem)
+:
+ Gtk::MenuItem((GtkMenuItem*)(castitem))
+{
+ }
+
+TearoffMenuItem::~TearoffMenuItem()
+{
+ destroy_();
+}
+
+TearoffMenuItem::CppClassType TearoffMenuItem::tearoffmenuitem_class_; // initialize static member
+
+GType TearoffMenuItem::get_type()
+{
+ return tearoffmenuitem_class_.init().get_type();
+}
+
+GType TearoffMenuItem::get_base_type()
+{
+ return gtk_tearoff_menu_item_get_type();
+}
+
+
+TearoffMenuItem::TearoffMenuItem()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::MenuItem(Glib::ConstructParams(tearoffmenuitem_class_.init()))
+{
+ }
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/tearoffmenuitem.h b/libs/gtkmm2/gtk/gtkmm/tearoffmenuitem.h
new file mode 100644
index 0000000000..f2c619c0ee
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/tearoffmenuitem.h
@@ -0,0 +1,124 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TEAROFFMENUITEM_H
+#define _GTKMM_TEAROFFMENUITEM_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+
+/* tearoffmenuitem.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/menuitem.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkTearoffMenuItem GtkTearoffMenuItem;
+typedef struct _GtkTearoffMenuItemClass GtkTearoffMenuItemClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class TearoffMenuItem_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** A special Gtk::MenuItem which is used to tear off and reattach its menu.
+ * When its menu is shown normally, the Gtk::TearoffMenuItem is drawn as a dotted line indicating that the menu can be torn off. Activating it causes its menu to be torn off and displayed in its own window.
+ * When its menu is shown as a tearoff menu, the Gtk::TearoffMenuItem is drawn as a dotted line which has a left pointing arrow graphic indicating that the tearoff menu can be reattached. Activating it will erase the tearoff menu window.
+ * @ingroup Widgets
+ * @ingroup Menus
+ */
+
+class TearoffMenuItem : public MenuItem
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef TearoffMenuItem CppObjectType;
+ typedef TearoffMenuItem_Class CppClassType;
+ typedef GtkTearoffMenuItem BaseObjectType;
+ typedef GtkTearoffMenuItemClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~TearoffMenuItem();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class TearoffMenuItem_Class;
+ static CppClassType tearoffmenuitem_class_;
+
+ // noncopyable
+ TearoffMenuItem(const TearoffMenuItem&);
+ TearoffMenuItem& operator=(const TearoffMenuItem&);
+
+protected:
+ explicit TearoffMenuItem(const Glib::ConstructParams& construct_params);
+ explicit TearoffMenuItem(GtkTearoffMenuItem* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkTearoffMenuItem* gobj() { return reinterpret_cast<GtkTearoffMenuItem*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkTearoffMenuItem* gobj() const { return reinterpret_cast<GtkTearoffMenuItem*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+public:
+ TearoffMenuItem();
+
+ bool is_torn_off() const;
+
+
+};
+
+} /* namespace Gtk */
+
+
+namespace Glib
+{
+ /** @relates Gtk::TearoffMenuItem
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::TearoffMenuItem* wrap(GtkTearoffMenuItem* object, bool take_copy = false);
+}
+#endif /* _GTKMM_TEAROFFMENUITEM_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/textattributes.cc b/libs/gtkmm2/gtk/gtkmm/textattributes.cc
new file mode 100644
index 0000000000..ff1e647a08
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/textattributes.cc
@@ -0,0 +1,103 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/textattributes.h>
+#include <gtkmm/private/textattributes_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtktexttag.h>
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::TextAttributes wrap(GtkTextAttributes* object, bool take_copy)
+{
+ return Gtk::TextAttributes(object, take_copy);
+}
+
+} // namespace Glib
+
+
+namespace Gtk
+{
+
+
+// static
+GType TextAttributes::get_type()
+{
+ return gtk_text_attributes_get_type();
+}
+
+TextAttributes::TextAttributes()
+:
+ gobject_ (gtk_text_attributes_new())
+{}
+
+TextAttributes::TextAttributes(const TextAttributes& other)
+:
+ gobject_ ((other.gobject_) ? gtk_text_attributes_copy(other.gobject_) : 0)
+{}
+
+TextAttributes::TextAttributes(GtkTextAttributes* gobject, bool make_a_copy)
+:
+ // For BoxedType wrappers, make_a_copy is true by default. The static
+ // BoxedType wrappers must always take a copy, thus make_a_copy = true
+ // ensures identical behaviour if the default argument is used.
+ gobject_ ((make_a_copy && gobject) ? gtk_text_attributes_copy(gobject) : gobject)
+{}
+
+TextAttributes& TextAttributes::operator=(const TextAttributes& other)
+{
+ TextAttributes temp (other);
+ swap(temp);
+ return *this;
+}
+
+TextAttributes::~TextAttributes()
+{
+ if(gobject_)
+ gtk_text_attributes_unref(gobject_);
+}
+
+void TextAttributes::swap(TextAttributes& other)
+{
+ GtkTextAttributes *const temp = gobject_;
+ gobject_ = other.gobject_;
+ other.gobject_ = temp;
+}
+
+GtkTextAttributes* TextAttributes::gobj_copy() const
+{
+ return gtk_text_attributes_copy(gobject_);
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/textattributes.h b/libs/gtkmm2/gtk/gtkmm/textattributes.h
new file mode 100644
index 0000000000..6deef34cab
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/textattributes.h
@@ -0,0 +1,114 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TEXTATTRIBUTES_H
+#define _GTKMM_TEXTATTRIBUTES_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* textattributes.h
+ *
+ * Copyright(C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software, ) you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation, ) either
+ * version 2 of the License, or(at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY, ) without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library, ) if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C" { typedef struct _GtkTextAttributes GtkTextAttributes; }
+#endif
+
+namespace Gtk
+{
+
+/**
+ * @ingroup TextView
+ */
+class TextAttributes
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef TextAttributes CppObjectType;
+ typedef GtkTextAttributes BaseObjectType;
+
+ static GType get_type() G_GNUC_CONST;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ TextAttributes();
+
+ explicit TextAttributes(GtkTextAttributes* gobject, bool make_a_copy = true);
+
+ TextAttributes(const TextAttributes& other);
+ TextAttributes& operator=(const TextAttributes& other);
+
+ ~TextAttributes();
+
+ void swap(TextAttributes& other);
+
+ ///Provides access to the underlying C instance.
+ GtkTextAttributes* gobj() { return gobject_; }
+
+ ///Provides access to the underlying C instance.
+ const GtkTextAttributes* gobj() const { return gobject_; }
+
+ ///Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs.
+ GtkTextAttributes* gobj_copy() const;
+
+protected:
+ GtkTextAttributes* gobject_;
+
+private:
+
+public:
+
+
+};
+
+} //namespace Gtk
+
+
+namespace Gtk
+{
+
+/** @relates Gtk::TextAttributes
+ * @param lhs The left-hand side
+ * @param rhs The right-hand side
+ */
+inline void swap(TextAttributes& lhs, TextAttributes& rhs)
+ { lhs.swap(rhs); }
+
+} // namespace Gtk
+
+namespace Glib
+{
+
+/** @relates Gtk::TextAttributes
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+Gtk::TextAttributes wrap(GtkTextAttributes* object, bool take_copy = false);
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+template <>
+class Value<Gtk::TextAttributes> : public Glib::Value_Boxed<Gtk::TextAttributes>
+{};
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+} // namespace Glib
+
+#endif /* _GTKMM_TEXTATTRIBUTES_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/textbuffer.cc b/libs/gtkmm2/gtk/gtkmm/textbuffer.cc
new file mode 100644
index 0000000000..ab66089ba8
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/textbuffer.cc
@@ -0,0 +1,1664 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/textbuffer.h>
+#include <gtkmm/private/textbuffer_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright(C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtktextbuffer.h>
+#include <glib/gslist.h>
+#include <gtkmm/textmark.h>
+#include <gtkmm/textiter.h>
+
+
+namespace Gtk
+{
+
+typedef TextChildAnchor ChildAnchor; //Help the code-generator so that it does not have to fully qualify this type in the .cc file.
+
+TextBuffer::TextBuffer(const Glib::RefPtr<TagTable>& tag_table)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Glib::Object(Glib::ConstructParams(textbuffer_class_.init(), "tag_table",Glib::unwrap(tag_table), (char*) 0))
+{}
+
+Glib::RefPtr<TextBuffer::Tag> TextBuffer::create_tag(const Glib::ustring& tag_name)
+{
+ //gtk_text_buffer_create_tag takes a varargs list of property names and values.
+ //gtkmm coders should use the Tag.set_* method instead.
+ return Glib::wrap(gtk_text_buffer_create_tag(gobj(), tag_name.c_str(), (char*)0), true); //true = take_copy.
+ //We have to take a copy because gtk_text_buffer_create_tag() doesn't ref for us, for no real reason.
+}
+
+Glib::RefPtr<TextBuffer::Tag> TextBuffer::create_tag()
+{
+ //gtk_text_buffer_create_tag takes a varargs list of property names and values.
+ //gtkmm coders should use the Tag.set_* method instead.
+ return Glib::wrap(gtk_text_buffer_create_tag(gobj(), (const char*)0, (char*)0), true); //true = take_copy.
+ //We have to take a copy because gtk_text_buffer_create_tag() doesn't ref for us, for no real reason.
+}
+
+Glib::RefPtr<TextBuffer::Mark>
+TextBuffer::create_mark(const TextBuffer::iterator& where, bool left_gravity)
+{
+ return Glib::wrap(gtk_text_buffer_create_mark(
+ gobj(), 0, const_cast<GtkTextIter*>(where.gobj()), left_gravity),
+ true); // acquire reference
+}
+
+TextBuffer::iterator TextBuffer::get_iter_at_line_offset(int line_number, int char_offset)
+{
+ iterator iter;
+ gtk_text_buffer_get_iter_at_line_offset(gobj(), iter.gobj(), line_number, char_offset);
+ return iter;
+}
+
+TextBuffer::iterator TextBuffer::get_iter_at_line_index(int line_number, int byte_index)
+{
+ iterator iter;
+ gtk_text_buffer_get_iter_at_line_index(gobj(), iter.gobj(), line_number, byte_index);
+ return iter;
+}
+
+TextBuffer::iterator TextBuffer::get_iter_at_offset(int char_offset)
+{
+ iterator iter;
+ gtk_text_buffer_get_iter_at_offset(gobj(), iter.gobj(), char_offset);
+ return iter;
+}
+
+TextBuffer::iterator TextBuffer::get_iter_at_line(int line_number)
+{
+ iterator iter;
+ gtk_text_buffer_get_iter_at_line(gobj(), iter.gobj(), line_number);
+ return iter;
+}
+
+TextBuffer::iterator TextBuffer::begin()
+{
+ iterator iter;
+ gtk_text_buffer_get_start_iter(gobj(), iter.gobj());
+ return iter;
+}
+
+TextBuffer::iterator TextBuffer::end()
+{
+ iterator iter;
+ gtk_text_buffer_get_end_iter(gobj(), iter.gobj());
+ return iter;
+}
+
+void TextBuffer::get_bounds(iterator& range_begin, iterator& range_end)
+{
+ gtk_text_buffer_get_bounds(gobj(), range_begin.gobj(), range_end.gobj());
+}
+
+TextBuffer::iterator TextBuffer::get_iter_at_mark(const Glib::RefPtr<Mark>& mark)
+{
+ iterator iter;
+ gtk_text_buffer_get_iter_at_mark(gobj(), iter.gobj(), mark->gobj());
+ return iter;
+}
+
+void TextBuffer::set_text(const Glib::ustring& text)
+{
+ gtk_text_buffer_set_text(gobj(), text.data(), text.bytes());
+}
+
+void TextBuffer::set_text(const char* text_begin, const char* text_end)
+{
+ gtk_text_buffer_set_text(gobj(), text_begin, text_end - text_begin);
+}
+
+//deprecated:
+void TextBuffer::assign(const Glib::ustring& text)
+{
+ gtk_text_buffer_set_text(gobj(), text.data(), text.bytes());
+}
+
+//deprecated:
+void TextBuffer::assign(const char* text_begin, const char* text_end)
+{
+ gtk_text_buffer_set_text(gobj(), text_begin, text_end - text_begin);
+}
+
+TextBuffer::iterator TextBuffer::insert(const iterator& pos, const Glib::ustring& text)
+{
+ // gtk_text_buffer_insert() modifies the iterator, but that's not the
+ // STL way so we give it something that we don't mind it modifying.
+ iterator iterCopy (pos);
+ gtk_text_buffer_insert(gobj(), iterCopy.gobj(), text.data(), text.bytes());
+
+ // According to the gtk_text_buffer_insert() docs, the "default signal handler
+ // revalidates it to point to the end of the inserted text".
+ return iterCopy;
+}
+
+TextBuffer::iterator TextBuffer::insert(const iterator& pos, const char* text_begin, const char* text_end)
+{
+ // gtk_text_buffer_insert() modifies the iterator, but that's not the
+ // STL way so we give it something that we don't mind it modifying.
+ iterator iterCopy (pos);
+ gtk_text_buffer_insert(gobj(), iterCopy.gobj(), text_begin, text_end - text_begin);
+
+ // According to the gtk_text_buffer_insert() docs, the "default signal handler
+ // revalidates it to point to the end of the inserted text".
+ return iterCopy;
+}
+
+TextBuffer::iterator TextBuffer::insert_pixbuf(const iterator& pos, const Glib::RefPtr<Gdk::Pixbuf>& pixbuf)
+{
+ iterator iterCopy (pos);
+ gtk_text_buffer_insert_pixbuf(gobj(), iterCopy.gobj(), pixbuf->gobj());
+ return iterCopy;
+}
+
+TextBuffer::iterator TextBuffer::insert_child_anchor(const iterator& pos,
+ const Glib::RefPtr<ChildAnchor>& anchor)
+{
+ // Copy the iterator. It might be changed because it is used as a signal parameter internally.
+ iterator iterCopy (pos);
+ gtk_text_buffer_insert_child_anchor(gobj(), iterCopy.gobj(), Glib::unwrap(anchor));
+ return iterCopy;
+}
+
+Glib::RefPtr<ChildAnchor> TextBuffer::create_child_anchor(const iterator& pos)
+{
+ // Copy the iterator. It might be changed because it is used as a signal parameter internally.
+ iterator iterCopy (pos);
+ return Glib::wrap(gtk_text_buffer_create_child_anchor(gobj(), iterCopy.gobj()),
+ true); // The function does not do a ref for us.
+}
+
+void TextBuffer::insert_at_cursor(const Glib::ustring& text)
+{
+ gtk_text_buffer_insert_at_cursor(gobj(), text.data(), text.bytes());
+}
+
+void TextBuffer::insert_at_cursor(const char* text_begin, const char* text_end)
+{
+ gtk_text_buffer_insert_at_cursor(gobj(), text_begin, text_end - text_begin);
+}
+
+std::pair<TextBuffer::iterator,bool>
+TextBuffer::insert_interactive(const iterator& pos, const Glib::ustring& text, bool default_editable)
+{
+ // Since we have to copy the iterator anyway we can as well create the
+ // std::pair now. That saves another copy later (mind you, TextIter is
+ // a heavy struct), and allows modern compilers to apply the return value
+ // optimization.
+ std::pair<iterator,bool> pair_iter_success (pos, false);
+
+ pair_iter_success.second = gtk_text_buffer_insert_interactive(
+ gobj(), pair_iter_success.first.gobj(), text.data(), text.bytes(), default_editable);
+
+ return pair_iter_success;
+}
+
+std::pair<TextBuffer::iterator,bool>
+TextBuffer::insert_interactive(const iterator& pos, const char* text_begin, const char* text_end,
+ bool default_editable)
+{
+ // Since we have to copy the iterator anyway we can as well create the
+ // std::pair now. That saves another copy later (mind you, TextIter is
+ // a heavy struct), and allows modern compilers to apply the return value
+ // optimization.
+ std::pair<iterator,bool> pair_iter_success (pos, false);
+
+ pair_iter_success.second = gtk_text_buffer_insert_interactive(
+ gobj(), pair_iter_success.first.gobj(), text_begin, text_end - text_begin, default_editable);
+
+ return pair_iter_success;
+}
+
+bool TextBuffer::insert_interactive_at_cursor(const Glib::ustring& text, bool default_editable)
+{
+ return gtk_text_buffer_insert_interactive_at_cursor(
+ gobj(), text.data(), text.bytes(), default_editable);
+}
+
+bool TextBuffer::insert_interactive_at_cursor(const char* text_begin, const char* text_end,
+ bool default_editable)
+{
+ return gtk_text_buffer_insert_interactive_at_cursor(
+ gobj(), text_begin, text_end - text_begin, default_editable);
+}
+
+TextBuffer::iterator TextBuffer::insert_with_tag(const iterator& pos, const Glib::ustring& text,
+ const Glib::RefPtr<Tag>& tag)
+{
+ // gtk_text_buffer_insert_with_tags() invalidates the iterator, but this lets us recreate it later.
+ const int offset = pos.get_offset();
+
+ iterator iterCopy (pos);
+ gtk_text_buffer_insert_with_tags(
+ gobj(), iterCopy.gobj(), text.data(), text.bytes(), tag->gobj(), (GtkTextTag*)0);
+
+ return get_iter_at_offset(offset + text.size());
+}
+
+TextBuffer::iterator TextBuffer::insert_with_tag(const iterator& pos,
+ const char* text_begin, const char* text_end,
+ const Glib::RefPtr<Tag>& tag)
+{
+ // gtk_text_buffer_insert_with_tags() invalidates the iterator, but this lets us recreate it later.
+ const int offset = pos.get_offset();
+
+ iterator iterCopy (pos);
+ gtk_text_buffer_insert_with_tags(
+ gobj(), iterCopy.gobj(), text_begin, text_end - text_begin, tag->gobj(), (GtkTextTag*)0);
+
+ return get_iter_at_offset(offset + (text_end - text_begin));
+}
+
+TextBuffer::iterator TextBuffer::insert_with_tag(const iterator& pos, const Glib::ustring& text,
+ const Glib::ustring& tag_name)
+{
+ // gtk_text_buffer_insert_with_tags() invalidates the iterator, but this lets us recreate it later.
+ const int offset = pos.get_offset();
+
+ iterator iterCopy (pos);
+ gtk_text_buffer_insert_with_tags_by_name(
+ gobj(), iterCopy.gobj(), text.data(), text.bytes(), tag_name.c_str(), (char*)0);
+
+ return get_iter_at_offset(offset + text.size());
+}
+
+TextBuffer::iterator TextBuffer::insert_with_tag(const iterator& pos,
+ const char* text_begin, const char* text_end,
+ const Glib::ustring& tag_name)
+{
+ // gtk_text_buffer_insert_with_tags() invalidates the iterator, but this lets us recreate it later.
+ const int offset = pos.get_offset();
+
+ iterator iterCopy (pos);
+ gtk_text_buffer_insert_with_tags_by_name(
+ gobj(), iterCopy.gobj(), text_begin, text_end - text_begin, tag_name.c_str(), (char*)0);
+
+ return get_iter_at_offset(offset + (text_end - text_begin));
+}
+
+TextBuffer::iterator TextBuffer::insert_with_tags(const iterator& pos, const Glib::ustring& text,
+ const Glib::ArrayHandle< Glib::RefPtr<Tag> >& tags)
+{
+ const char *const text_begin = text.data();
+ return insert_with_tags(pos, text_begin, text_begin + text.bytes(), tags);
+}
+
+TextBuffer::iterator TextBuffer::insert_with_tags(const iterator& pos,
+ const char* text_begin, const char* text_end,
+ const Glib::ArrayHandle< Glib::RefPtr<Tag> >& tags)
+{
+ const int start_offset = pos.get_offset();
+ iterator range_end (insert(pos, text_begin, text_end));
+
+ GtkTextIter range_begin;
+ gtk_text_buffer_get_iter_at_offset(gobj(), &range_begin, start_offset);
+
+ //This was GtkTextTag* const * const, but the SUN Forte compiler said that it couldn't convert to that. murrayc
+ const GtkTextTag* const* tags_begin = tags.data();
+ const GtkTextTag* const* tags_end = tags_begin + tags.size();
+
+ //TODO: Investigate if this const_cast<> is really necessary.
+ //I added it for the SUN Forte compiler. murrayc.
+ for(GtkTextTag *const * ptag = const_cast<GtkTextTag* const *>(tags_begin); ptag != const_cast<GtkTextTag* const *>(tags_end);
+++ptag)
+ {
+ gtk_text_buffer_apply_tag(gobj(), *ptag, &range_begin, range_end.gobj());
+ }
+
+ return range_end;
+}
+
+TextBuffer::iterator TextBuffer::insert_with_tags_by_name(const iterator& pos, const Glib::ustring& text,
+ const Glib::ArrayHandle<Glib::ustring>& tag_names)
+{
+ const char *const text_begin = text.data();
+ return insert_with_tags_by_name(pos, text_begin, text_begin + text.bytes(), tag_names);
+}
+
+TextBuffer::iterator TextBuffer::insert_with_tags_by_name(const iterator& pos,
+ const char* text_begin, const char* text_end,
+ const Glib::ArrayHandle<Glib::ustring>& tag_names)
+{
+ // gtk_buffer_insert_with_tags_by_name() is a convenience wrapper, so it's kind of OK to reimplement it:
+
+ const int start_offset = pos.get_offset();
+ iterator range_end (insert(pos, text_begin, text_end));
+
+ GtkTextIter range_begin;
+ gtk_text_buffer_get_iter_at_offset(gobj(), &range_begin, start_offset);
+
+ GtkTextTagTable *const tag_table = gtk_text_buffer_get_tag_table(gobj());
+
+ const char *const *const names_begin = tag_names.data();
+ const char *const *const names_end = names_begin + tag_names.size();
+
+ for(const char *const * pname = names_begin; pname != names_end; ++pname)
+ {
+ if(GtkTextTag *const tag = gtk_text_tag_table_lookup(tag_table, *pname))
+ {
+ gtk_text_buffer_apply_tag(gobj(), tag, &range_begin, range_end.gobj());
+ }
+ else
+ {
+ g_warning("Gtk::TextBuffer::insert_with_tags_by_name(): no tag with name '%s'!", *pname);
+ }
+ }
+
+ return range_end;
+}
+
+TextBuffer::iterator TextBuffer::insert(const iterator& pos,
+ const iterator& range_begin, const iterator& range_end)
+{
+ iterator iterCopy (pos);
+ gtk_text_buffer_insert_range(gobj(), iterCopy.gobj(), range_begin.gobj(), range_end.gobj());
+ return iterCopy;
+}
+
+std::pair<TextBuffer::iterator,bool>
+TextBuffer::insert_interactive(const iterator& pos, const iterator& range_begin,
+ const iterator& range_end, bool default_editable)
+{
+ // Since we have to copy the iterator anyway we can as well create the
+ // std::pair now. That saves another copy later (mind you, TextIter is
+ // a heavy struct), and allows modern compilers to apply the return value
+ // optimization.
+ std::pair<iterator,bool> pair_iter_success (pos, false);
+
+ pair_iter_success.second = gtk_text_buffer_insert_range_interactive(
+ gobj(), pair_iter_success.first.gobj(), range_begin.gobj(), range_end.gobj(), default_editable);
+
+ return pair_iter_success;
+}
+
+TextBuffer::iterator TextBuffer::erase(const iterator& range_begin, const iterator& range_end)
+{
+ // GTK+ sets the iterators to where the deletion occured. We do it the STL way and therefore need copies.
+ iterator beginCopy (range_begin);
+ iterator endCopy (range_end);
+ gtk_text_buffer_delete(gobj(), beginCopy.gobj(), endCopy.gobj());
+ return beginCopy;
+}
+
+TextBuffer::iterator TextBuffer::backspace(const iterator& iter, bool interactive, bool default_editable)
+{
+ // GTK+ sets the iterators to where the deletion occured. We do it the STL way and therefore need copies.
+ iterator copy(iter);
+ gtk_text_buffer_backspace(gobj(), copy.gobj(), interactive, default_editable);
+ return copy;
+}
+
+
+std::pair<TextBuffer::iterator,bool>
+TextBuffer::erase_interactive(const iterator& range_begin, const iterator& range_end,
+ bool default_editable)
+{
+ // Since we have to copy the iterator anyway we can as well create the
+ // std::pair now. That saves another copy later (mind you, TextIter is
+ // a heavy struct), and allows modern compilers to apply the return value
+ // optimization.
+ std::pair<iterator,bool> pair_iter_success (range_begin, false);
+
+ // GTK+ sets the iterators to where the deletion occured.
+ // We do it the STL way and therefore need copies.
+ iterator endCopy (range_end);
+
+ pair_iter_success.second = gtk_text_buffer_delete_interactive(
+ gobj(), pair_iter_success.first.gobj(), endCopy.gobj(), default_editable);
+
+ return pair_iter_success;
+}
+
+void TextBuffer::paste_clipboard(const Glib::RefPtr<Clipboard>& clipboard, const iterator& override_location,
+ bool default_editable)
+{
+ gtk_text_buffer_paste_clipboard(gobj(), clipboard->gobj(),
+ const_cast<GtkTextIter*>(override_location.gobj()), default_editable);
+}
+
+void TextBuffer::paste_clipboard(const Glib::RefPtr<Clipboard>& clipboard, bool default_editable)
+{
+ gtk_text_buffer_paste_clipboard(gobj(), clipboard->gobj(), 0, default_editable);
+}
+
+TextBuffer::iterator TextBuffer::get_iter_at_child_anchor(const Glib::RefPtr<ChildAnchor>& anchor)
+{
+ iterator iter;
+ gtk_text_buffer_get_iter_at_child_anchor(gobj(), iter.gobj(), anchor->gobj());
+ return iter;
+}
+
+int TextBuffer::size() const
+{
+ return get_char_count();
+}
+
+Glib::ustring TextBuffer::get_text(bool include_hidden_chars)
+{
+ return get_text(begin(), end(), include_hidden_chars);
+}
+
+} // namespace Gtk
+
+
+namespace
+{
+
+void TextBuffer_signal_insert_callback(GtkTextBuffer* self, GtkTextIter* p0,const gchar* p1,gint p2,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,const TextBuffer::iterator&,const Glib::ustring&,int > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::wrap(p0)
+, Glib::ustring(p1, p1 + p2)
+, p2
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo TextBuffer_signal_insert_info =
+{
+ "insert_text",
+ (GCallback) &TextBuffer_signal_insert_callback,
+ (GCallback) &TextBuffer_signal_insert_callback
+};
+
+
+void TextBuffer_signal_insert_pixbuf_callback(GtkTextBuffer* self, GtkTextIter* p0,GdkPixbuf* p1,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,const TextBuffer::iterator&,const Glib::RefPtr<Gdk::Pixbuf>& > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::wrap(p0)
+, Glib::wrap(p1, true)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo TextBuffer_signal_insert_pixbuf_info =
+{
+ "insert_pixbuf",
+ (GCallback) &TextBuffer_signal_insert_pixbuf_callback,
+ (GCallback) &TextBuffer_signal_insert_pixbuf_callback
+};
+
+
+void TextBuffer_signal_insert_child_anchor_callback(GtkTextBuffer* self, GtkTextIter* p0,GtkTextChildAnchor* p1,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,const TextBuffer::iterator&,const Glib::RefPtr<ChildAnchor>& > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::wrap(p0)
+, Glib::wrap(p1, true)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo TextBuffer_signal_insert_child_anchor_info =
+{
+ "insert_child_anchor",
+ (GCallback) &TextBuffer_signal_insert_child_anchor_callback,
+ (GCallback) &TextBuffer_signal_insert_child_anchor_callback
+};
+
+
+void TextBuffer_signal_erase_callback(GtkTextBuffer* self, GtkTextIter* p0,GtkTextIter* p1,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,const TextBuffer::iterator&,const TextBuffer::iterator& > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::wrap(p0)
+, Glib::wrap(p1)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo TextBuffer_signal_erase_info =
+{
+ "delete_range",
+ (GCallback) &TextBuffer_signal_erase_callback,
+ (GCallback) &TextBuffer_signal_erase_callback
+};
+
+
+const Glib::SignalProxyInfo TextBuffer_signal_changed_info =
+{
+ "changed",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+
+const Glib::SignalProxyInfo TextBuffer_signal_modified_changed_info =
+{
+ "modified_changed",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+
+void TextBuffer_signal_mark_set_callback(GtkTextBuffer* self, const GtkTextIter* p0,GtkTextMark* p1,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,const TextBuffer::iterator&,const Glib::RefPtr<TextBuffer::Mark>& > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::wrap(p0)
+, Glib::wrap(p1, true)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo TextBuffer_signal_mark_set_info =
+{
+ "mark_set",
+ (GCallback) &TextBuffer_signal_mark_set_callback,
+ (GCallback) &TextBuffer_signal_mark_set_callback
+};
+
+
+void TextBuffer_signal_mark_deleted_callback(GtkTextBuffer* self, GtkTextMark* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,const Glib::RefPtr<TextBuffer::Mark>& > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::wrap(p0, true)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo TextBuffer_signal_mark_deleted_info =
+{
+ "mark_deleted",
+ (GCallback) &TextBuffer_signal_mark_deleted_callback,
+ (GCallback) &TextBuffer_signal_mark_deleted_callback
+};
+
+
+void TextBuffer_signal_apply_tag_callback(GtkTextBuffer* self, GtkTextTag* p0,const GtkTextIter* p1,const GtkTextIter* p2,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,const Glib::RefPtr<TextBuffer::Tag>&,const TextBuffer::iterator&,const TextBuffer::iterator& > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::wrap(p0, true)
+, Glib::wrap(p1)
+, Glib::wrap(p2)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo TextBuffer_signal_apply_tag_info =
+{
+ "apply_tag",
+ (GCallback) &TextBuffer_signal_apply_tag_callback,
+ (GCallback) &TextBuffer_signal_apply_tag_callback
+};
+
+
+void TextBuffer_signal_remove_tag_callback(GtkTextBuffer* self, GtkTextTag* p0,const GtkTextIter* p1,const GtkTextIter* p2,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,const Glib::RefPtr<TextBuffer::Tag>&,const TextBuffer::iterator&,const TextBuffer::iterator& > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::wrap(p0, true)
+, Glib::wrap(p1)
+, Glib::wrap(p2)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo TextBuffer_signal_remove_tag_info =
+{
+ "remove_tag",
+ (GCallback) &TextBuffer_signal_remove_tag_callback,
+ (GCallback) &TextBuffer_signal_remove_tag_callback
+};
+
+
+const Glib::SignalProxyInfo TextBuffer_signal_begin_user_action_info =
+{
+ "begin_user_action",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+
+const Glib::SignalProxyInfo TextBuffer_signal_end_user_action_info =
+{
+ "end_user_action",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Gtk::TextBuffer> wrap(GtkTextBuffer* object, bool take_copy)
+{
+ return Glib::RefPtr<Gtk::TextBuffer>( dynamic_cast<Gtk::TextBuffer*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} /* namespace Glib */
+
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& TextBuffer_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &TextBuffer_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_text_buffer_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void TextBuffer_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->insert_text = &insert_text_callback;
+ klass->insert_pixbuf = &insert_pixbuf_callback;
+ klass->insert_child_anchor = &insert_child_anchor_callback;
+ klass->delete_range = &delete_range_callback;
+ klass->changed = &changed_callback;
+ klass->modified_changed = &modified_changed_callback;
+ klass->mark_set = &mark_set_callback;
+ klass->mark_deleted = &mark_deleted_callback;
+ klass->apply_tag = &apply_tag_callback;
+ klass->remove_tag = &remove_tag_callback;
+ klass->begin_user_action = &begin_user_action_callback;
+ klass->end_user_action = &end_user_action_callback;
+}
+
+
+void TextBuffer_Class::insert_text_callback(GtkTextBuffer* self, GtkTextIter* p0, const gchar* p1, gint p2)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_insert(Glib::wrap(p0)
+, Glib::ustring(p1, p1 + p2)
+, p2
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->insert_text)
+ (*base->insert_text)(self, p0, p1, p2);
+ }
+}
+
+void TextBuffer_Class::insert_pixbuf_callback(GtkTextBuffer* self, GtkTextIter* p0, GdkPixbuf* p1)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_insert_pixbuf(Glib::wrap(p0)
+, Glib::wrap(p1, true)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->insert_pixbuf)
+ (*base->insert_pixbuf)(self, p0, p1);
+ }
+}
+
+void TextBuffer_Class::insert_child_anchor_callback(GtkTextBuffer* self, GtkTextIter* p0, GtkTextChildAnchor* p1)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_insert_child_anchor(Glib::wrap(p0)
+, Glib::wrap(p1, true)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->insert_child_anchor)
+ (*base->insert_child_anchor)(self, p0, p1);
+ }
+}
+
+void TextBuffer_Class::delete_range_callback(GtkTextBuffer* self, GtkTextIter* p0, GtkTextIter* p1)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_erase(Glib::wrap(p0)
+, Glib::wrap(p1)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->delete_range)
+ (*base->delete_range)(self, p0, p1);
+ }
+}
+
+void TextBuffer_Class::changed_callback(GtkTextBuffer* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_changed();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->changed)
+ (*base->changed)(self);
+ }
+}
+
+void TextBuffer_Class::modified_changed_callback(GtkTextBuffer* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_modified_changed();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->modified_changed)
+ (*base->modified_changed)(self);
+ }
+}
+
+void TextBuffer_Class::mark_set_callback(GtkTextBuffer* self, const GtkTextIter* p0, GtkTextMark* p1)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_mark_set(Glib::wrap(p0)
+, Glib::wrap(p1, true)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->mark_set)
+ (*base->mark_set)(self, p0, p1);
+ }
+}
+
+void TextBuffer_Class::mark_deleted_callback(GtkTextBuffer* self, GtkTextMark* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_mark_deleted(Glib::wrap(p0, true)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->mark_deleted)
+ (*base->mark_deleted)(self, p0);
+ }
+}
+
+void TextBuffer_Class::apply_tag_callback(GtkTextBuffer* self, GtkTextTag* p0, const GtkTextIter* p1, const GtkTextIter* p2)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_apply_tag(Glib::wrap(p0, true)
+, Glib::wrap(p1)
+, Glib::wrap(p2)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->apply_tag)
+ (*base->apply_tag)(self, p0, p1, p2);
+ }
+}
+
+void TextBuffer_Class::remove_tag_callback(GtkTextBuffer* self, GtkTextTag* p0, const GtkTextIter* p1, const GtkTextIter* p2)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_remove_tag(Glib::wrap(p0, true)
+, Glib::wrap(p1)
+, Glib::wrap(p2)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->remove_tag)
+ (*base->remove_tag)(self, p0, p1, p2);
+ }
+}
+
+void TextBuffer_Class::begin_user_action_callback(GtkTextBuffer* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_begin_user_action();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->begin_user_action)
+ (*base->begin_user_action)(self);
+ }
+}
+
+void TextBuffer_Class::end_user_action_callback(GtkTextBuffer* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_end_user_action();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->end_user_action)
+ (*base->end_user_action)(self);
+ }
+}
+
+
+Glib::ObjectBase* TextBuffer_Class::wrap_new(GObject* object)
+{
+ return new TextBuffer((GtkTextBuffer*)object);
+}
+
+
+/* The implementation: */
+
+GtkTextBuffer* TextBuffer::gobj_copy()
+{
+ reference();
+ return gobj();
+}
+
+TextBuffer::TextBuffer(const Glib::ConstructParams& construct_params)
+:
+ Glib::Object(construct_params)
+{}
+
+TextBuffer::TextBuffer(GtkTextBuffer* castitem)
+:
+ Glib::Object((GObject*)(castitem))
+{}
+
+TextBuffer::~TextBuffer()
+{}
+
+
+TextBuffer::CppClassType TextBuffer::textbuffer_class_; // initialize static member
+
+GType TextBuffer::get_type()
+{
+ return textbuffer_class_.init().get_type();
+}
+
+GType TextBuffer::get_base_type()
+{
+ return gtk_text_buffer_get_type();
+}
+
+
+TextBuffer::TextBuffer()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Glib::Object(Glib::ConstructParams(textbuffer_class_.init()))
+{
+ }
+
+Glib::RefPtr<TextBuffer> TextBuffer::create()
+{
+ return Glib::RefPtr<TextBuffer>( new TextBuffer() );
+}
+Glib::RefPtr<TextBuffer> TextBuffer::create(const Glib::RefPtr<TagTable>& tag_table)
+{
+ return Glib::RefPtr<TextBuffer>( new TextBuffer(tag_table) );
+}
+int TextBuffer::get_line_count() const
+{
+ return gtk_text_buffer_get_line_count(const_cast<GtkTextBuffer*>(gobj()));
+}
+
+int TextBuffer::get_char_count() const
+{
+ return gtk_text_buffer_get_char_count(const_cast<GtkTextBuffer*>(gobj()));
+}
+
+Glib::RefPtr<TextBuffer::TagTable> TextBuffer::get_tag_table()
+{
+
+ Glib::RefPtr<TextBuffer::TagTable> retvalue = Glib::wrap(gtk_text_buffer_get_tag_table(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const TextBuffer::TagTable> TextBuffer::get_tag_table() const
+{
+
+ Glib::RefPtr<const TextBuffer::TagTable> retvalue = Glib::wrap(gtk_text_buffer_get_tag_table(const_cast<GtkTextBuffer*>(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::ustring TextBuffer::get_text(const iterator& start, const iterator& end, bool include_hidden_chars)
+{
+ return Glib::convert_return_gchar_ptr_to_ustring(gtk_text_buffer_get_text(gobj(), (start).gobj(), (end).gobj(), static_cast<int>(include_hidden_chars)));
+}
+
+Glib::ustring TextBuffer::get_slice(const iterator& start, const iterator& end, bool include_hidden_chars)
+{
+ return Glib::convert_return_gchar_ptr_to_ustring(gtk_text_buffer_get_slice(gobj(), (start).gobj(), (end).gobj(), static_cast<int>(include_hidden_chars)));
+}
+
+Glib::RefPtr<TextBuffer::Mark> TextBuffer::create_mark(const Glib::ustring& mark_name, const iterator& where, bool left_gravity)
+{
+
+ Glib::RefPtr<TextBuffer::Mark> retvalue = Glib::wrap(gtk_text_buffer_create_mark(gobj(), mark_name.c_str(), (where).gobj(), static_cast<int>(left_gravity)));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+void TextBuffer::move_mark(const Glib::RefPtr<Mark>& mark, const iterator& where)
+{
+ gtk_text_buffer_move_mark(gobj(), Glib::unwrap(mark), (where).gobj());
+}
+
+void TextBuffer::delete_mark(const Glib::RefPtr<Mark>& mark)
+{
+ gtk_text_buffer_delete_mark(gobj(), Glib::unwrap(mark));
+}
+
+Glib::RefPtr<TextBuffer::Mark> TextBuffer::get_mark(const Glib::ustring& name)
+{
+
+ Glib::RefPtr<TextBuffer::Mark> retvalue = Glib::wrap(gtk_text_buffer_get_mark(gobj(), name.c_str()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const TextBuffer::Mark> TextBuffer::get_mark(const Glib::ustring& name) const
+{
+
+ Glib::RefPtr<const TextBuffer::Mark> retvalue = Glib::wrap(gtk_text_buffer_get_mark(const_cast<GtkTextBuffer*>(gobj()), name.c_str()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+void TextBuffer::move_mark_by_name(const Glib::ustring& name, const iterator& where)
+{
+ gtk_text_buffer_move_mark_by_name(gobj(), name.c_str(), (where).gobj());
+}
+
+void TextBuffer::delete_mark_by_name(const Glib::ustring& name)
+{
+ gtk_text_buffer_delete_mark_by_name(gobj(), name.c_str());
+}
+
+Glib::RefPtr<TextBuffer::Mark> TextBuffer::get_insert()
+{
+
+ Glib::RefPtr<TextBuffer::Mark> retvalue = Glib::wrap(gtk_text_buffer_get_insert(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<TextBuffer::Mark> TextBuffer::get_selection_bound()
+{
+
+ Glib::RefPtr<TextBuffer::Mark> retvalue = Glib::wrap(gtk_text_buffer_get_selection_bound(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+void TextBuffer::place_cursor(const iterator& where)
+{
+ gtk_text_buffer_place_cursor(gobj(), (where).gobj());
+}
+
+void TextBuffer::apply_tag(const Glib::RefPtr<Tag>& tag, const iterator& start, const iterator& end)
+{
+ gtk_text_buffer_apply_tag(gobj(), Glib::unwrap(tag), (start).gobj(), (end).gobj());
+}
+
+void TextBuffer::remove_tag(const Glib::RefPtr<Tag>& tag, const iterator& start, const iterator& end)
+{
+ gtk_text_buffer_remove_tag(gobj(), Glib::unwrap(tag), (start).gobj(), (end).gobj());
+}
+
+void TextBuffer::apply_tag_by_name(const Glib::ustring& name, const iterator& start, const iterator& end)
+{
+ gtk_text_buffer_apply_tag_by_name(gobj(), name.c_str(), (start).gobj(), (end).gobj());
+}
+
+void TextBuffer::remove_tag_by_name(const Glib::ustring& name, const iterator& start, const iterator& end)
+{
+ gtk_text_buffer_remove_tag_by_name(gobj(), name.c_str(), (start).gobj(), (end).gobj());
+}
+
+void TextBuffer::remove_all_tags(const iterator& start, const iterator& end)
+{
+ gtk_text_buffer_remove_all_tags(gobj(), (start).gobj(), (end).gobj());
+}
+
+bool TextBuffer::get_modified() const
+{
+ return gtk_text_buffer_get_modified(const_cast<GtkTextBuffer*>(gobj()));
+}
+
+void TextBuffer::set_modified(bool setting)
+{
+ gtk_text_buffer_set_modified(gobj(), static_cast<int>(setting));
+}
+
+void TextBuffer::add_selection_clipboard(const Glib::RefPtr<Clipboard>& clipboard)
+{
+ gtk_text_buffer_add_selection_clipboard(gobj(), Glib::unwrap(clipboard));
+}
+
+void TextBuffer::remove_selection_clipboard(const Glib::RefPtr<Clipboard>& clipboard)
+{
+ gtk_text_buffer_remove_selection_clipboard(gobj(), Glib::unwrap(clipboard));
+}
+
+void TextBuffer::cut_clipboard(const Glib::RefPtr<Clipboard>& clipboard, bool default_editable)
+{
+ gtk_text_buffer_cut_clipboard(gobj(), Glib::unwrap(clipboard), static_cast<int>(default_editable));
+}
+
+void TextBuffer::copy_clipboard(const Glib::RefPtr<Clipboard>& clipboard)
+{
+ gtk_text_buffer_copy_clipboard(gobj(), Glib::unwrap(clipboard));
+}
+
+bool TextBuffer::get_selection_bounds(iterator& start, iterator& end) const
+{
+ return gtk_text_buffer_get_selection_bounds(const_cast<GtkTextBuffer*>(gobj()), (start).gobj(), (end).gobj());
+}
+
+bool TextBuffer::erase_selection(bool interactive, bool default_editable)
+{
+ return gtk_text_buffer_delete_selection(gobj(), static_cast<int>(interactive), static_cast<int>(default_editable));
+}
+
+void TextBuffer::select_range(const iterator& ins, const iterator& bound)
+{
+ gtk_text_buffer_select_range(gobj(), (ins).gobj(), (bound).gobj());
+}
+
+void TextBuffer::begin_user_action()
+{
+ gtk_text_buffer_begin_user_action(gobj());
+}
+
+void TextBuffer::end_user_action()
+{
+ gtk_text_buffer_end_user_action(gobj());
+}
+
+
+Glib::SignalProxy3< void,const TextBuffer::iterator&,const Glib::ustring&,int > TextBuffer::signal_insert()
+{
+ return Glib::SignalProxy3< void,const TextBuffer::iterator&,const Glib::ustring&,int >(this, &TextBuffer_signal_insert_info);
+}
+
+Glib::SignalProxy2< void,const TextBuffer::iterator&,const Glib::RefPtr<Gdk::Pixbuf>& > TextBuffer::signal_insert_pixbuf()
+{
+ return Glib::SignalProxy2< void,const TextBuffer::iterator&,const Glib::RefPtr<Gdk::Pixbuf>& >(this, &TextBuffer_signal_insert_pixbuf_info);
+}
+
+Glib::SignalProxy2< void,const TextBuffer::iterator&,const Glib::RefPtr<ChildAnchor>& > TextBuffer::signal_insert_child_anchor()
+{
+ return Glib::SignalProxy2< void,const TextBuffer::iterator&,const Glib::RefPtr<ChildAnchor>& >(this, &TextBuffer_signal_insert_child_anchor_info);
+}
+
+Glib::SignalProxy2< void,const TextBuffer::iterator&,const TextBuffer::iterator& > TextBuffer::signal_erase()
+{
+ return Glib::SignalProxy2< void,const TextBuffer::iterator&,const TextBuffer::iterator& >(this, &TextBuffer_signal_erase_info);
+}
+
+Glib::SignalProxy0< void > TextBuffer::signal_changed()
+{
+ return Glib::SignalProxy0< void >(this, &TextBuffer_signal_changed_info);
+}
+
+Glib::SignalProxy0< void > TextBuffer::signal_modified_changed()
+{
+ return Glib::SignalProxy0< void >(this, &TextBuffer_signal_modified_changed_info);
+}
+
+Glib::SignalProxy2< void,const TextBuffer::iterator&,const Glib::RefPtr<TextBuffer::Mark>& > TextBuffer::signal_mark_set()
+{
+ return Glib::SignalProxy2< void,const TextBuffer::iterator&,const Glib::RefPtr<TextBuffer::Mark>& >(this, &TextBuffer_signal_mark_set_info);
+}
+
+Glib::SignalProxy1< void,const Glib::RefPtr<TextBuffer::Mark>& > TextBuffer::signal_mark_deleted()
+{
+ return Glib::SignalProxy1< void,const Glib::RefPtr<TextBuffer::Mark>& >(this, &TextBuffer_signal_mark_deleted_info);
+}
+
+Glib::SignalProxy3< void,const Glib::RefPtr<TextBuffer::Tag>&,const TextBuffer::iterator&,const TextBuffer::iterator& > TextBuffer::signal_apply_tag()
+{
+ return Glib::SignalProxy3< void,const Glib::RefPtr<TextBuffer::Tag>&,const TextBuffer::iterator&,const TextBuffer::iterator& >(this, &TextBuffer_signal_apply_tag_info);
+}
+
+Glib::SignalProxy3< void,const Glib::RefPtr<TextBuffer::Tag>&,const TextBuffer::iterator&,const TextBuffer::iterator& > TextBuffer::signal_remove_tag()
+{
+ return Glib::SignalProxy3< void,const Glib::RefPtr<TextBuffer::Tag>&,const TextBuffer::iterator&,const TextBuffer::iterator& >(this, &TextBuffer_signal_remove_tag_info);
+}
+
+Glib::SignalProxy0< void > TextBuffer::signal_begin_user_action()
+{
+ return Glib::SignalProxy0< void >(this, &TextBuffer_signal_begin_user_action_info);
+}
+
+Glib::SignalProxy0< void > TextBuffer::signal_end_user_action()
+{
+ return Glib::SignalProxy0< void >(this, &TextBuffer_signal_end_user_action_info);
+}
+
+
+void Gtk::TextBuffer::on_insert(const TextBuffer::iterator& pos, const Glib::ustring& text, int bytes)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->insert_text)
+ (*base->insert_text)(gobj(),const_cast<GtkTextIter*>((pos).gobj()),text.c_str(),bytes);
+}
+
+void Gtk::TextBuffer::on_insert_pixbuf(const TextBuffer::iterator& pos, const Glib::RefPtr<Gdk::Pixbuf>& pixbuf)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->insert_pixbuf)
+ (*base->insert_pixbuf)(gobj(),const_cast<GtkTextIter*>((pos).gobj()),Glib::unwrap(pixbuf));
+}
+
+void Gtk::TextBuffer::on_insert_child_anchor(const TextBuffer::iterator& pos, const Glib::RefPtr<ChildAnchor>& anchor)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->insert_child_anchor)
+ (*base->insert_child_anchor)(gobj(),const_cast<GtkTextIter*>((pos).gobj()),Glib::unwrap(anchor));
+}
+
+void Gtk::TextBuffer::on_erase(const TextBuffer::iterator& range_begin, const TextBuffer::iterator& range_end)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->delete_range)
+ (*base->delete_range)(gobj(),const_cast<GtkTextIter*>((range_begin).gobj()),const_cast<GtkTextIter*>((range_end).gobj()));
+}
+
+void Gtk::TextBuffer::on_changed()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->changed)
+ (*base->changed)(gobj());
+}
+
+void Gtk::TextBuffer::on_modified_changed()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->modified_changed)
+ (*base->modified_changed)(gobj());
+}
+
+void Gtk::TextBuffer::on_mark_set(const TextBuffer::iterator& location, const Glib::RefPtr<TextBuffer::Mark>& mark)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->mark_set)
+ (*base->mark_set)(gobj(),(location).gobj(),Glib::unwrap(mark));
+}
+
+void Gtk::TextBuffer::on_mark_deleted(const Glib::RefPtr<TextBuffer::Mark>& mark)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->mark_deleted)
+ (*base->mark_deleted)(gobj(),Glib::unwrap(mark));
+}
+
+void Gtk::TextBuffer::on_apply_tag(const Glib::RefPtr<TextBuffer::Tag>& tag, const TextBuffer::iterator& range_begin, const TextBuffer::iterator& range_end)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->apply_tag)
+ (*base->apply_tag)(gobj(),Glib::unwrap(tag),(range_begin).gobj(),(range_end).gobj());
+}
+
+void Gtk::TextBuffer::on_remove_tag(const Glib::RefPtr<TextBuffer::Tag>& tag, const TextBuffer::iterator& range_begin, const TextBuffer::iterator& range_end)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->remove_tag)
+ (*base->remove_tag)(gobj(),Glib::unwrap(tag),(range_begin).gobj(),(range_end).gobj());
+}
+
+void Gtk::TextBuffer::on_begin_user_action()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->begin_user_action)
+ (*base->begin_user_action)(gobj());
+}
+
+void Gtk::TextBuffer::on_end_user_action()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->end_user_action)
+ (*base->end_user_action)(gobj());
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/textbuffer.h b/libs/gtkmm2/gtk/gtkmm/textbuffer.h
new file mode 100644
index 0000000000..7a40dd9526
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/textbuffer.h
@@ -0,0 +1,844 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TEXTBUFFER_H
+#define _GTKMM_TEXTBUFFER_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright(C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or(at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#include <gtkmm/object.h>
+#include <gtkmm/texttagtable.h>
+#include <gtkmm/textchildanchor.h>
+#include <gtkmm/textmark.h>
+#include <gtkmm/textiter.h>
+#include <gtkmm/clipboard.h>
+#include <gdkmm/pixbuf.h>
+#include <gtkmmconfig.h>
+#include <utility>
+
+GLIBMM_USING_STD(pair)
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkTextBuffer GtkTextBuffer;
+typedef struct _GtkTextBufferClass GtkTextBufferClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class TextBuffer_Class; } // namespace Gtk
+namespace Gtk
+{
+
+class TextMark;
+class TextIter;
+
+/** Multi-line attributed text that can be displayed by one or more Gtk::TextView widgets.
+ *
+ * Text in a buffer can be marked with tags. A @link Gtk::TextTag Gtk::TextBuffer::Tag@endlink is an attribute that can be applied to some range of text. For example, a tag
+ * might be called "bold" and make the text inside the tag bold. However, the tag concept is more general than that; tags don't
+ * have to affect appearance. They can instead affect the behavior of mouse and key presses, "lock" a range of text so the user
+ * can't edit it, or countless other things. A tag is represented by a @link Gtk::TextTag Gtk::TextBuffer::Tag@endlink object.
+ * One @link Gtk::TextTag Gtk::TextBuffer::Tag@endlink can be applied to any number of text ranges in any number of @link Gtk::TextBuffer Gtk::TextBuffers@endlink.
+ *
+ * Each tag is stored in a @link Gtk::TextTagTable Gtk::TextBuffer::TagTable@endlink. A tag table defines a set of tags that can be used together. Each buffer has one tag
+ * table associated with it; only tags from that tag table can be used with the buffer. A single tag table can be shared between
+ * multiple buffers, however.
+ *
+ * Most text manipulation is accomplished with iterators, represented by an @link Gtk::TextIter iterator@endlink. The iterator can
+ * be used to navigate over characters, words, lines, and sentences.
+ *
+ * But iterators can't be used to preserve positions across buffer modifications. To preserve a position, the
+ * @link Gtk::TextMark Gtk::TextBuffer::Mark@endlink object is ideal. There are two marks built-in to GtkTextBuffer; these are
+ * named "insert" and "selection_bound" and refer to the insertion point and the boundary of the selection which is not the
+ * insertion point. If no text is selected, these two marks will be in the same position. You can manipulate what is selected and
+ * where the cursor appears by moving these marks around.
+ *
+ * Text buffers always contain at least one line, but may be empty (that is, buffers can contain zero characters). The last line
+ * in the text buffer never ends in a line separator (such as newline); the other lines in the buffer always end in a line
+ * separator. Line separators count as characters when computing character counts and character offsets. Note that some Unicode
+ * line separators are represented with multiple bytes in UTF-8, and the two-character sequence "\r\n" is also considered a line
+ * separator.
+ *
+ * @ingroup TextView
+ */
+
+class TextBuffer : public Glib::Object
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef TextBuffer CppObjectType;
+ typedef TextBuffer_Class CppClassType;
+ typedef GtkTextBuffer BaseObjectType;
+ typedef GtkTextBufferClass BaseClassType;
+
+private: friend class TextBuffer_Class;
+ static CppClassType textbuffer_class_;
+
+private:
+ // noncopyable
+ TextBuffer(const TextBuffer&);
+ TextBuffer& operator=(const TextBuffer&);
+
+protected:
+ explicit TextBuffer(const Glib::ConstructParams& construct_params);
+ explicit TextBuffer(GtkTextBuffer* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~TextBuffer();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ GtkTextBuffer* gobj() { return reinterpret_cast<GtkTextBuffer*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const GtkTextBuffer* gobj() const { return reinterpret_cast<GtkTextBuffer*>(gobject_); }
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ GtkTextBuffer* gobj_copy();
+
+private:
+
+
+public:
+ typedef TextIter iterator;
+ typedef TextTag Tag;
+ typedef TextTagTable TagTable;
+ typedef TextMark Mark;
+ typedef TextChildAnchor ChildAnchor;
+
+protected:
+ TextBuffer();
+ explicit TextBuffer(const Glib::RefPtr<TagTable>& tag_table);
+
+public:
+
+ static Glib::RefPtr<TextBuffer> create();
+
+
+ static Glib::RefPtr<TextBuffer> create(const Glib::RefPtr<TagTable>& tag_table);
+
+
+ /** Obtains the number of lines in the buffer. This value is cached, so
+ * the function is very fast.
+ * @return Number of lines in the buffer.
+ */
+ int get_line_count() const;
+
+ /** Gets the number of characters in the buffer; note that characters
+ * and bytes are not the same, you can't e.g.\ expect the contents of
+ * the buffer in string form to be this many bytes long. The character
+ * count is cached, so this function is very fast.
+ * @return Number of characters in the buffer.
+ */
+ int get_char_count() const;
+
+ /// See get_char_count().
+ int size() const;
+
+
+ /** Get the Gtk::TextTagTable associated with this buffer.
+ * @return The buffer's tag table.
+ */
+ Glib::RefPtr<TextBuffer::TagTable> get_tag_table();
+
+ /** Get the Gtk::TextTagTable associated with this buffer.
+ * @return The buffer's tag table.
+ */
+ Glib::RefPtr<const TextBuffer::TagTable> get_tag_table() const;
+
+ /** Removes the current contents of the buffer, and inserts @a text instead.
+ * @param text The text to put in the buffer.
+ */
+ void set_text(const Glib::ustring& text);
+
+ /** Removes the current contents of the buffer, and inserts @a text instead.
+ * @param text_begin The start of a UTF8 character array.
+ * @param text_end The end of the UTF8 character array.
+ */
+ void set_text(const char* text_begin, const char* text_end);
+
+
+ #ifndef GTKMM_DISABLE_DEPRECATED
+ /** @deprecated Use set_text()
+ */
+ void assign(const Glib::ustring& text);
+
+ /** @deprecated Use set_text()
+ */
+ void assign(const char* text_begin, const char* text_end);
+ #endif //GTKMM_DISABLE_DEPRECATED
+
+ //TODO: Make all insert() methods have the same return type:
+
+ /** Inserts @a text at position @a pos.
+ * Emits the "insert_text" signal; insertion actually occurs in the default handler for the signal.
+ * The @a pos iterator is invalidated when insertion occurs (because the buffer contents change).
+ *
+ * @param pos An iterator pointing to the position at which the text should be inserted.
+ * @param text The text to be inserted in the buffer.
+ * @result An iterator that points to the end of the inserted text.
+ */
+ iterator insert(const iterator& pos, const Glib::ustring& text);
+
+ /** Inserts text at position @a pos.
+ * Emits the "insert_text" signal; insertion actually occurs in the default handler for the signal.
+ * The @a pos iterator is invalidated when insertion occurs (because the buffer contents change).
+ *
+ * @param pos An iterator pointing to the position at which the text should be inserted.
+ * @param text_begin The start of a UTF8 character array.
+ * @param text_end The end of the UTF8 character array.
+ * @result An iterator that points to the end of the inserted text.
+ */
+ iterator insert(const iterator& pos, const char* text_begin, const char* text_end);
+
+ /** Inserts @a text, using the current cursor position as the insertion point.
+ * Emits the "insert_text" signal; insertion actually occurs in the default handler for the signal.
+ *
+ * @param text The text to be inserted in the buffer.
+ * @result An iterator that points to the end of the inserted text.
+ */
+ void insert_at_cursor(const Glib::ustring& text);
+
+ /** Inserts text, using the current cursor position as the insertion point.
+ * Emits the "insert_text" signal; insertion actually occurs in the default handler for the signal.
+ *
+ * @param text_begin The start of a UTF8 character array.
+ * @param text_end The end of the UTF8 character array.
+ * @result An iterator that points to the end of the inserted text.
+ */
+ void insert_at_cursor(const char* text_begin, const char* text_end);
+
+ /** Like insert(), but the insertion will not occur if @a iter is at a non-editable location in the buffer.
+ * Usually you want to prevent insertions at ineditable locations if the insertion results from a user action (is interactive).
+ *
+ * @a default_editable indicates the editability of text that doesn't have a tag affecting editability applied to it.
+ * Typically the result of Gtk::TextView::get_editable() is appropriate here.
+ *
+ * @param pos An iterator pointing to the position at which the text should be inserted.
+ * @param text The text to be inserted in the buffer.
+ * @param default_editable Default editability of buffer
+ * @result Whether text was actually inserted
+ */
+ std::pair<iterator,bool> insert_interactive(
+ const iterator& pos, const Glib::ustring& text, bool default_editable = true);
+
+ /** Like insert(), but the insertion will not occur if @a pos is at a non-editable location in the buffer.
+ * Usually you want to prevent insertions at ineditable locations if the insertion results from a user action (is interactive).
+ *
+ * @a default_editable indicates the editability of text that doesn't have a tag affecting editability applied to it.
+ * Typically the result of Gtk::TextView::get_editable() is appropriate here.
+ *
+ * @param pos An iterator pointing to the position at which the text should be inserted.
+ * @param text_begin The start of a UTF8 character array.
+ * @param text_end The end of the UTF8 character array.
+ * @param default_editable Default editability of buffer.
+ * @result Whether text was actually inserted
+ */
+ std::pair<iterator,bool> insert_interactive(
+ const iterator& pos, const char* text_begin, const char* text_end, bool default_editable = true);
+
+ /** Calls insert_interactive() at the cursor position.
+ *
+ * @a default_editable indicates the editability of text that doesn't have a tag affecting editability applied to it.
+ * Typically the result of Gtk::TextView::get_editable() is appropriate here.
+ *
+ * @param text The text to be inserted in the buffer.
+ * @param default_editable Default editability of buffer
+ * @result Whether text was actually inserted
+ */
+ bool insert_interactive_at_cursor(const Glib::ustring& text, bool default_editable = true);
+
+ /** Calls insert_interactive() at the cursor position.
+ *
+ * @a default_editable indicates the editability of text that doesn't have a tag affecting editability applied to it.
+ * Typically the result of Gtk::TextView::get_editable() is appropriate here.
+ *
+ * @param text_begin The start of a UTF8 character array.
+ * @param text_end The end of the UTF8 character array.
+ * @param default_editable Default editability of buffer
+ * @result Whether text was actually inserted
+ */
+ bool insert_interactive_at_cursor(const char* text_begin, const char* text_end,
+ bool default_editable = true);
+
+ /** Copies text, tags, and pixbufs between @a range_begin and @a range_end (the order of range_begin and range_begin doesn't
+ * matter) and inserts the copy at @a pos. Used instead of simply getting/inserting text because it preserves images and tags.
+ * If range_begin and range_end are in a different buffer, the two buffers must share the same tag table.
+ *
+ * Implemented via emissions of the insert_text and apply_tag signals, so expect those.
+ *
+ * @param pos An iterator pointing to the position at which the text should be inserted.
+ * @param range_begin A position in a buffer.
+ * @param range_end Another position in the same buffer as @a range_begin.
+ * @result Whether text was actually inserted
+ */
+ iterator insert(const iterator& pos, const iterator& range_begin, const iterator& range_end);
+
+
+ /** Same as insert_range(), but does nothing if the insertion point isn't editable.
+ *
+ * The @a default_editable parameter indicates whether the text is editable at @a pos if no tags enclosing @a pos affect editability.
+ * Typically the result of Gtk::TextView::get_editable() is appropriate here.
+ *
+ * @param pos An iterator pointing to the position at which the text should be inserted.
+ * @param range_begin A position in a buffer.
+ * @param range_end Another position in the same buffer as @a range_begin.
+ * @param default_editable Default editability of buffer.
+ * @result Whether text was actually inserted
+ */
+ std::pair<iterator,bool> insert_interactive(const iterator& pos, const iterator& range_begin, const iterator& range_end, bool default_editable = true);
+
+
+ iterator insert_with_tag(const iterator& pos, const Glib::ustring& text, const Glib::RefPtr<Tag>& tag);
+ iterator insert_with_tag(const iterator& pos, const char* text_begin, const char* text_end, const Glib::RefPtr<Tag>& tag);
+
+ iterator insert_with_tag(const iterator& pos, const Glib::ustring& text, const Glib::ustring& tag_name);
+ iterator insert_with_tag(const iterator& pos, const char* text_begin, const char* text_end, const Glib::ustring& tag_name);
+
+ /** Inserts text into buffer at @a pos, applying the list of tags to the newly-inserted text.
+ * Equivalent to calling insert(), then apply_tag() on the inserted text; This is just a convenience function.
+ *
+ * @param pos An iterator pointing to the position at which the text should be inserted.
+ * @param text The text to be inserted in the buffer.
+ * @param tags A standard C++ container of @link Gtk::TextTag Gtk::TextBuffer::Tags@endlink.
+ * @result Whether text was actually inserted
+ */
+ iterator insert_with_tags(const iterator& pos, const Glib::ustring& text,
+ const Glib::ArrayHandle< Glib::RefPtr<Tag> >& tags);
+
+ /** Inserts text into buffer at @a pos, applying the list of tags to the newly-inserted text.
+ * Equivalent to calling insert(), then apply_tag() on the inserted text; This is just a convenience function.
+ *
+ * @param pos An iterator pointing to the position at which the text should be inserted.
+ * @param text_begin The start of a UTF8 character array.
+ * @param text_end The end of the UTF8 character array.
+ * @param tags A standard C++ container of @link Gtk::TextTag Gtk::TextBuffer::Tags@endlink.
+ * @result Whether text was actually inserted
+ */
+ iterator insert_with_tags(const iterator& pos, const char* text_begin, const char* text_end,
+ const Glib::ArrayHandle< Glib::RefPtr<Tag> >& tags);
+
+ /** Inserts text into buffer at @a pos, applying the list of tags to the newly-inserted text.
+ * Equivalent to calling insert(), then apply_tag() on the inserted text; This is just a convenience function.
+ *
+ * @param pos An iterator pointing to the position at which the text should be inserted.
+ * @param text The text to be inserted in the buffer.
+ * @param tag_names A standard C++ container of tag names.
+ * @result Whether text was actually inserted
+ */
+ iterator insert_with_tags_by_name(const iterator& pos, const Glib::ustring& text,
+ const Glib::StringArrayHandle& tag_names);
+
+
+ /** Equivalent to calling insert(), then apply_tag() on the inserted text; This is just a convenience function.
+ *
+ * @param pos An iterator pointing to the position at which the text should be inserted.
+ * @param text_begin The start of a UTF8 character array.
+ * @param text_end The end of the UTF8 character array.
+ * @param tag_names A standard C++ container of tag names.
+ * @result Whether text was actually inserted
+ */
+ iterator insert_with_tags_by_name(const iterator& pos, const char* text_begin, const char* text_end,
+ const Glib::StringArrayHandle& tag_names);
+
+ /* Deletes all text between @a range_begin and @a range_end. The order of range_begin and range_end is not actually relevant.
+ * This function actually emits the "delete_range" signal, and the default handler of that signal deletes the text.
+ * Because the buffer is modified, all outstanding iterators become invalid after calling this function.
+ * @param range_begin
+ * @param range_end
+ * @result An iterator that points to the location where text was deleted.
+ */
+ iterator erase(const iterator& range_begin, const iterator& range_end);
+
+
+ /* Deletes all editable text between @a range_begin and @a range_end. The order of range_begin and range_end is not actually relevant.
+ * This function actually emits the "delete_range" signal, and the default handler of that signal deletes the text.
+ * Because the buffer is modified, all outstanding iterators become invalid after calling this function.
+ *
+ * @a default_editable indicates the editability of text that doesn't have a tag affecting editability applied to it.
+ * Typically the result of Gtk::TextView::get_editable() is appropriate here.
+ *
+ * @param range_begin
+ * @param range_end
+ * @param default_editable Default editability of buffer
+ * @result An iterator that points to the location where text was deleted, or end() is no text was deleted.
+ */
+ std::pair<iterator,bool> erase_interactive(const iterator& range_begin, const iterator& range_end, bool default_editable = true);
+
+
+ //TODO: Document this:
+ iterator backspace(const iterator& iter, bool interactive = true, bool default_editable = true);
+
+
+ /** Returns the text in the range [ @a start , @a end ). Excludes undisplayed
+ * text (text marked with tags that set the invisibility attribute) if
+ * @a include_hidden_chars is <tt>false</tt>. Does not include characters
+ * representing embedded images, so byte and character indexes into
+ * the returned string do <em>not</em> correspond to byte
+ * and character indexes into the buffer. Contrast with
+ * get_slice().
+ * @param start Start of a range.
+ * @param end End of a range.
+ * @param include_hidden_chars Whether to include invisible text.
+ * @return An allocated UTF-8 string.
+ */
+ Glib::ustring get_text(const iterator& start, const iterator& end, bool include_hidden_chars = true);
+
+ /** Returns all the text in the buffer. Excludes undisplayed
+ * text (text marked with tags that set the invisibility attribute) if
+ * @a include_hidden_chars is <tt>false</tt>. Does not include characters
+ * representing embedded images, so byte and character indexes into
+ * the returned string do <em>not</em> correspond to byte
+ * and character indexes into the buffer. Contrast with
+ * get_slice().
+ *
+ * @param include_hidden_chars Whether to include invisible text.
+ * @return An allocated UTF-8 string.
+ */
+ Glib::ustring get_text(bool include_hidden_chars = true);
+
+
+ /** Returns the text in the range [ @a start , @a end ). Excludes undisplayed
+ * text (text marked with tags that set the invisibility attribute) if
+ * @a include_hidden_chars is <tt>false</tt>. The returned string includes a
+ * 0xFFFC character whenever the buffer contains
+ * embedded images, so byte and character indexes into
+ * the returned string <em>do</em> correspond to byte
+ * and character indexes into the buffer. Contrast with
+ * get_text(). Note that 0xFFFC can occur in normal
+ * text as well, so it is not a reliable indicator that a pixbuf or
+ * widget is in the buffer.
+ * @param start Start of a range.
+ * @param end End of a range.
+ * @param include_hidden_chars Whether to include invisible text.
+ * @return An allocated UTF-8 string.
+ */
+ Glib::ustring get_slice(const iterator& start, const iterator& end, bool include_hidden_chars = true);
+
+ iterator insert_pixbuf(const iterator& pos, const Glib::RefPtr<Gdk::Pixbuf>& pixbuf);
+
+
+ iterator insert_child_anchor(const iterator& pos, const Glib::RefPtr<ChildAnchor>& anchor);
+
+
+ Glib::RefPtr<ChildAnchor> create_child_anchor(const iterator& pos);
+
+
+ /** Creates a mark at position @a where . The mark can be retrieved by name using
+ * get_mark(). If a mark has left gravity, and text is
+ * inserted at the mark's current location, the mark will be moved to
+ * the left of the newly-inserted text. If the mark has right gravity
+ * ( @a left_gravity = <tt>false</tt>), the mark will end up on the right of
+ * newly-inserted text. The standard left-to-right cursor is a mark
+ * with right gravity (when you type, the cursor stays on the right
+ * side of the text you're typing).
+ *
+ * Emits the "mark_set" signal as notification of the mark's initial
+ * placement.
+ * @param mark_name Name for mark, or <tt>0</tt>.
+ * @param where Location to place mark.
+ * @param left_gravity Whether the mark has left gravity.
+ * @return The new Gtk::TextMark object.
+ */
+ Glib::RefPtr<TextBuffer::Mark> create_mark(const Glib::ustring& mark_name, const iterator& where, bool left_gravity = true);
+
+ /** Create an anonymous mark. */
+ /** Creates an anonymous mark at position @a where.
+ *
+ * If a mark has left gravity, and text is
+ * inserted at the mark's current location, the mark will be moved to
+ * the left of the newly-inserted text. If the mark has right gravity
+ * ( @a left_gravity = <tt>false</tt>), the mark will end up on the right of
+ * newly-inserted text. The standard left-to-right cursor is a mark
+ * with right gravity (when you type, the cursor stays on the right
+ * side of the text you're typing).
+ *
+ * Emits the "mark_set" signal as notification of the mark's initial
+ * placement.
+ * @param where Location to place mark.
+ * @param left_gravity Whether the mark has left gravity.
+ * @return The new Gtk::TextMark object.
+ */
+ Glib::RefPtr<Mark> create_mark(const iterator& where, bool left_gravity = true);
+
+
+ /** Moves @a mark to the new location @a where . Emits the "mark_set" signal
+ * as notification of the move.
+ * @param mark A Gtk::TextMark.
+ * @param where New location for @a mark in @a buffer .
+ */
+ void move_mark(const Glib::RefPtr<Mark>& mark, const iterator& where);
+
+ /** Deletes @a mark , so that it's no longer located anywhere in the
+ * buffer. Removes the reference the buffer holds to the mark, so if
+ * you don't keep a Glib::RefPtr to the mark, it will be freed. Even
+ * if the mark isn't freed, most operations on @a mark become
+ * invalid. There is no way to undelete a
+ * mark. Gtk::TextMark::get_deleted() will return <tt>true</tt> after this
+ * function has been called on a mark; Gtk::TextMark::get_deleted()
+ * indicates that a mark no longer belongs to a buffer. The "mark_deleted"
+ * signal will be emitted as notification after the mark is deleted.
+ * @param mark A Gtk::TextMark in @a buffer .
+ */
+ void delete_mark(const Glib::RefPtr<Mark>& mark);
+
+ /** Returns the mark named @a name in buffer @a buffer , or <tt>0</tt> if no such
+ * mark exists in the buffer.
+ * @param name A mark name.
+ * @return A Gtk::TextMark, or <tt>0</tt>.
+ */
+ Glib::RefPtr<TextBuffer::Mark> get_mark(const Glib::ustring& name);
+
+ /** Returns the mark named @a name in buffer @a buffer , or <tt>0</tt> if no such
+ * mark exists in the buffer.
+ * @param name A mark name.
+ * @return A Gtk::TextMark, or <tt>0</tt>.
+ */
+ Glib::RefPtr<const TextBuffer::Mark> get_mark(const Glib::ustring& name) const;
+
+
+ /** Moves the mark named @a name (which must exist) to location @a where .
+ * See move_mark() for details.
+ * @param name Name of a mark.
+ * @param where New location for mark.
+ */
+ void move_mark_by_name(const Glib::ustring& name, const iterator& where);
+
+ /** Deletes the mark named @a name ; the mark must exist. See
+ * delete_mark() for details.
+ * @param name Name of a mark in @a buffer .
+ */
+ void delete_mark_by_name(const Glib::ustring& name);
+
+
+ /** Returns the mark that represents the cursor (insertion point).
+ * Equivalent to calling get_mark() to get the mark
+ * named "insert", but very slightly more efficient, and involves less
+ * typing.
+ * @return Insertion point mark.
+ */
+ Glib::RefPtr<TextBuffer::Mark> get_insert();
+
+ /** Returns the mark that represents the selection bound. Equivalent
+ * to calling get_mark() to get the mark named
+ * "selection_bound", but very slightly more efficient, and involves
+ * less typing.
+ *
+ * The currently-selected text in @a buffer is the region between the
+ * "selection_bound" and "insert" marks. If "selection_bound" and
+ * "insert" are in the same place, then there is no current selection.
+ * get_selection_bounds() is another convenient function
+ * for handling the selection, if you just want to know whether there's a
+ * selection and what its bounds are.
+ * @return Selection bound mark.
+ */
+ Glib::RefPtr<TextBuffer::Mark> get_selection_bound();
+
+
+ /** This function moves the "insert" and "selection_bound" marks
+ * simultaneously. If you move them to the same place in two steps
+ * with move_mark(), you will temporarily select a
+ * region in between their old and new locations, which can be pretty
+ * inefficient since the temporarily-selected region will force stuff
+ * to be recalculated. This function moves them as a unit, which can
+ * be optimized.
+ * @param where Where to put the cursor.
+ */
+ void place_cursor(const iterator& where);
+
+ /** Emits the "apply_tag" signal on @a buffer . The default
+ * handler for the signal applies @a tag to the given range.
+ * @a start and @a end do not have to be in order.
+ * @param tag A Gtk::TextTag.
+ * @param start One bound of range to be tagged.
+ * @param end Other bound of range to be tagged.
+ */
+ void apply_tag(const Glib::RefPtr<Tag>& tag, const iterator& start, const iterator& end);
+
+ /** Emits the "remove_tag" signal. The default handler for the signal
+ * removes all occurrences of @a tag from the given range. @a start and
+ * @a end don't have to be in order.
+ * @param tag A Gtk::TextTag.
+ * @param start One bound of range to be untagged.
+ * @param end Other bound of range to be untagged.
+ */
+ void remove_tag(const Glib::RefPtr<Tag>& tag, const iterator& start, const iterator& end);
+
+ /** Calls Gtk::TextTagTable::lookup() on the buffer's tag table to
+ * get a Gtk::TextTag, then calls apply_tag().
+ * @param name Name of a named Gtk::TextTag.
+ * @param start One bound of range to be tagged.
+ * @param end Other bound of range to be tagged.
+ */
+ void apply_tag_by_name(const Glib::ustring& name, const iterator& start, const iterator& end);
+
+ /** Calls Gtk::TextTagTable::lookup() on the buffer's tag table to
+ * get a Gtk::TextTag, then calls remove_tag().
+ * @param name Name of a Gtk::TextTag.
+ * @param start One bound of range to be untagged.
+ * @param end Other bound of range to be untagged.
+ */
+ void remove_tag_by_name(const Glib::ustring& name, const iterator& start, const iterator& end);
+
+ /** Removes all tags in the range between @a start and @a end . Be careful
+ * with this function; it could remove tags added in code unrelated to
+ * the code you're currently writing. That is, using this function is
+ * probably a bad idea if you have two or more unrelated code sections
+ * that add tags.
+ * @param start One bound of range to be untagged.
+ * @param end Other bound of range to be untagged.
+ */
+ void remove_all_tags(const iterator& start, const iterator& end);
+
+ /** Creates a tag and adds it to the tag table for buffer. Equivalent to calling Gtk::TextBuffer::Tag::create() and then adding
+ * the tag to the buffer's tag table.
+ * A tag called @a tag_name must not already exist in the tag table for this buffer.
+ *
+ * @param tag_name The name for the new tag.
+ * @result The new tag.
+ */
+ Glib::RefPtr<Tag> create_tag(const Glib::ustring& tag_name);
+
+
+ /** Creates an anoymous tag and adds it to the tag table for buffer. Equivalent to calling Gtk::TextBuffer::Tag::create() and then adding
+ * the tag to the buffer's tag table.
+ *
+ * @result The new tag.
+ */
+ Glib::RefPtr<Tag> create_tag();
+
+ iterator get_iter_at_line_offset(int line_number, int char_offset);
+ iterator get_iter_at_line_index(int line_number, int byte_index);
+ iterator get_iter_at_offset(int char_offset);
+ iterator get_iter_at_line(int line_number);
+ iterator begin();
+ iterator end();
+ void get_bounds(iterator& range_begin, iterator& range_end);
+
+ /** Get the current position of a mark.
+ * @param mark The @link Gtk::TextMark Gtk::TextBuffer::Mark@endlink
+ * @result An iterator that points to the position of the @a mark.
+ */
+ iterator get_iter_at_mark(const Glib::RefPtr<Mark>& mark);
+
+ /** Get the current position of an anchor.
+ * @param anchor A @link Gtk::TextChildAnchor Gtk::TextBuffer::Anchor@endlink that appears in the buffer.
+ * @result An iterator that points to the position of the @a anchor.
+ */
+ iterator get_iter_at_child_anchor(const Glib::RefPtr<ChildAnchor>& anchor);
+
+
+ /** Indicates whether the buffer has been modified since the last call
+ * to set_modified() set the modification flag to
+ * <tt>false</tt>. Used for example to enable a "save" function in a text
+ * editor.
+ * @return <tt>true</tt> if the buffer has been modified.
+ */
+ bool get_modified() const;
+
+ /** Used to keep track of whether the buffer has been modified since the
+ * last time it was saved. Whenever the buffer is saved to disk, call
+ * gtk_text_buffer_set_modified ( @a buffer , <tt>false</tt>). When the buffer is modified,
+ * it will automatically toggled on the modified bit again. When the modified
+ * bit flips, the buffer emits a "modified_changed" signal.
+ * @param setting Modification flag setting.
+ */
+ void set_modified(bool setting = true);
+
+
+ /** Adds @a clipboard to the list of clipboards in which the selection contents
+ * of @a buffer are available. In most cases, @a clipboard will be the Gtk::Clipboard
+ * of type Gdk::SELECTION_PRIMARY for a view of @a buffer .
+ * @param clipboard A Gtk::Clipboard.
+ */
+ void add_selection_clipboard(const Glib::RefPtr<Clipboard>& clipboard);
+
+ /** Removes a Gtk::Clipboard added with add_selection_clipboard()
+ * @param clipboard A Gtk::Clipboard added to @a buffer by add_selection_clipboard().
+ */
+ void remove_selection_clipboard(const Glib::RefPtr<Clipboard>& clipboard);
+
+ /** Copies the currently-selected text to a clipboard, then deletes
+ * said text if it's editable.
+ * @param clipboard The Gtk::Clipboard object to cut to.
+ * @param default_editable Default editability of the buffer.
+ */
+ void cut_clipboard(const Glib::RefPtr<Clipboard>& clipboard, bool default_editable = true);
+
+ /** Copies the currently-selected text to a clipboard.
+ * @param clipboard The Gtk::Clipboard object to copy to.
+ */
+ void copy_clipboard(const Glib::RefPtr<Clipboard>& clipboard);
+ void paste_clipboard(const Glib::RefPtr<Clipboard>& clipboard, const iterator& override_location, bool default_editable = true);
+ void paste_clipboard(const Glib::RefPtr<Clipboard>& clipboard, bool default_editable = true);
+
+
+ /** Returns <tt>true</tt> if some text is selected; places the bounds
+ * of the selection in @a start and @a end (if the selection has length 0,
+ * then @a start and @a end are filled in with the same value).
+ * @a start and @a end will be in ascending order. If @a start and @a end are
+ * <tt>0</tt>, then they are not filled in, but the return value still indicates
+ * whether text is selected.
+ * @param start Iterator to initialize with selection start.
+ * @param end Iterator to initialize with selection end.
+ * @return Whether the selection has nonzero length.
+ */
+ bool get_selection_bounds(iterator& start, iterator& end) const;
+
+ /** Deletes the range between the "insert" and "selection_bound" marks,
+ * that is, the currently-selected text. If @a interactive is <tt>true</tt>,
+ * the editability of the selection will be considered (users can't delete
+ * uneditable text).
+ * @param interactive Whether the deletion is caused by user interaction.
+ * @param default_editable Whether the buffer is editable by default.
+ * @return Whether there was a non-empty selection to delete.
+ */
+ bool erase_selection(bool interactive = true, bool default_editable = true);
+
+
+ /** This function moves the "insert" and "selection_bound" marks
+ * simultaneously. If you move them in two steps
+ * with move_mark(), you will temporarily select a
+ * region in between their old and new locations, which can be pretty
+ * inefficient since the temporarily-selected region will force stuff
+ * to be recalculated. This function moves them as a unit, which can
+ * be optimized.
+ *
+ * Since: 2.4
+ * @param ins Where to put the "insert" mark.
+ * @param bound Where to put the "selection_bound" mark.
+ */
+ void select_range(const iterator& ins, const iterator& bound);
+
+/* Called to specify atomic user actions, used to implement undo */
+
+ /** Called to indicate that the buffer operations between here and a
+ * call to end_user_action() are part of a single
+ * user-visible operation. The operations between
+ * begin_user_action() and
+ * end_user_action() can then be grouped when creating
+ * an undo stack. Gtk::TextBuffer maintains a count of calls to
+ * begin_user_action() that have not been closed with
+ * a call to end_user_action(), and emits the "begin_user_action"
+ * and "end_user_action" signals only for the outermost pair of calls.
+ * This allows you to build user actions from other user actions.
+ *
+ * The "interactive" buffer mutation functions, such as
+ * insert_interactive(), automatically call begin/end
+ * user action around the buffer operations they perform, so there's
+ * no need to add extra calls if you user action consists solely of a
+ * single call to one of those functions.
+ */
+ void begin_user_action();
+
+ /** Should be paired with a call to begin_user_action().
+ * See that function for a full explanation.
+ */
+ void end_user_action();
+
+
+ Glib::SignalProxy3< void,const TextBuffer::iterator&,const Glib::ustring&,int > signal_insert();
+
+
+ Glib::SignalProxy2< void,const TextBuffer::iterator&,const Glib::RefPtr<Gdk::Pixbuf>& > signal_insert_pixbuf();
+
+
+ Glib::SignalProxy2< void,const TextBuffer::iterator&,const Glib::RefPtr<ChildAnchor>& > signal_insert_child_anchor();
+
+
+ Glib::SignalProxy2< void,const TextBuffer::iterator&,const TextBuffer::iterator& > signal_erase();
+
+
+ Glib::SignalProxy0< void > signal_changed();
+
+
+ Glib::SignalProxy0< void > signal_modified_changed();
+
+
+ Glib::SignalProxy2< void,const TextBuffer::iterator&,const Glib::RefPtr<TextBuffer::Mark>& > signal_mark_set();
+
+
+ Glib::SignalProxy1< void,const Glib::RefPtr<TextBuffer::Mark>& > signal_mark_deleted();
+
+
+ Glib::SignalProxy3< void,const Glib::RefPtr<TextBuffer::Tag>&,const TextBuffer::iterator&,const TextBuffer::iterator& > signal_apply_tag();
+
+
+ Glib::SignalProxy3< void,const Glib::RefPtr<TextBuffer::Tag>&,const TextBuffer::iterator&,const TextBuffer::iterator& > signal_remove_tag();
+
+
+ Glib::SignalProxy0< void > signal_begin_user_action();
+
+
+ Glib::SignalProxy0< void > signal_end_user_action();
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_insert(const TextBuffer::iterator& pos, const Glib::ustring& text, int bytes);
+ virtual void on_insert_pixbuf(const TextBuffer::iterator& pos, const Glib::RefPtr<Gdk::Pixbuf>& pixbuf);
+ virtual void on_insert_child_anchor(const TextBuffer::iterator& pos, const Glib::RefPtr<ChildAnchor>& anchor);
+ virtual void on_erase(const TextBuffer::iterator& range_begin, const TextBuffer::iterator& range_end);
+ virtual void on_changed();
+ virtual void on_modified_changed();
+ virtual void on_mark_set(const TextBuffer::iterator& location, const Glib::RefPtr<TextBuffer::Mark>& mark);
+ virtual void on_mark_deleted(const Glib::RefPtr<TextBuffer::Mark>& mark);
+ virtual void on_apply_tag(const Glib::RefPtr<TextBuffer::Tag>& tag, const TextBuffer::iterator& range_begin, const TextBuffer::iterator& range_end);
+ virtual void on_remove_tag(const Glib::RefPtr<TextBuffer::Tag>& tag, const TextBuffer::iterator& range_begin, const TextBuffer::iterator& range_end);
+ virtual void on_begin_user_action();
+ virtual void on_end_user_action();
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::TextBuffer
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Gtk::TextBuffer> wrap(GtkTextBuffer* object, bool take_copy = false);
+}
+
+
+#endif /* _GTKMM_TEXTBUFFER_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/textchildanchor.cc b/libs/gtkmm2/gtk/gtkmm/textchildanchor.cc
new file mode 100644
index 0000000000..e44a5050c3
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/textchildanchor.cc
@@ -0,0 +1,151 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/textchildanchor.h>
+#include <gtkmm/private/textchildanchor_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtktextchild.h>
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Gtk::TextChildAnchor> wrap(GtkTextChildAnchor* object, bool take_copy)
+{
+ return Glib::RefPtr<Gtk::TextChildAnchor>( dynamic_cast<Gtk::TextChildAnchor*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} /* namespace Glib */
+
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& TextChildAnchor_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &TextChildAnchor_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_text_child_anchor_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void TextChildAnchor_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* TextChildAnchor_Class::wrap_new(GObject* object)
+{
+ return new TextChildAnchor((GtkTextChildAnchor*)object);
+}
+
+
+/* The implementation: */
+
+GtkTextChildAnchor* TextChildAnchor::gobj_copy()
+{
+ reference();
+ return gobj();
+}
+
+TextChildAnchor::TextChildAnchor(const Glib::ConstructParams& construct_params)
+:
+ Glib::Object(construct_params)
+{}
+
+TextChildAnchor::TextChildAnchor(GtkTextChildAnchor* castitem)
+:
+ Glib::Object((GObject*)(castitem))
+{}
+
+TextChildAnchor::~TextChildAnchor()
+{}
+
+
+TextChildAnchor::CppClassType TextChildAnchor::textchildanchor_class_; // initialize static member
+
+GType TextChildAnchor::get_type()
+{
+ return textchildanchor_class_.init().get_type();
+}
+
+GType TextChildAnchor::get_base_type()
+{
+ return gtk_text_child_anchor_get_type();
+}
+
+
+TextChildAnchor::TextChildAnchor()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Glib::Object(Glib::ConstructParams(textchildanchor_class_.init()))
+{
+ }
+
+Glib::RefPtr<TextChildAnchor> TextChildAnchor::create()
+{
+ return Glib::RefPtr<TextChildAnchor>( new TextChildAnchor() );
+}
+Glib::ListHandle<Widget*> TextChildAnchor::get_widgets()
+{
+ return Glib::ListHandle<Widget*>(gtk_text_child_anchor_get_widgets(gobj()), Glib::OWNERSHIP_SHALLOW);
+}
+
+Glib::ListHandle<const Widget*> TextChildAnchor::get_widgets() const
+{
+ return Glib::ListHandle<const Widget*>(gtk_text_child_anchor_get_widgets(const_cast<GtkTextChildAnchor*>(gobj())), Glib::OWNERSHIP_SHALLOW);
+}
+
+bool TextChildAnchor::get_deleted() const
+{
+ return gtk_text_child_anchor_get_deleted(const_cast<GtkTextChildAnchor*>(gobj()));
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/textchildanchor.h b/libs/gtkmm2/gtk/gtkmm/textchildanchor.h
new file mode 100644
index 0000000000..0ee3f68bd0
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/textchildanchor.h
@@ -0,0 +1,159 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TEXTCHILDANCHOR_H
+#define _GTKMM_TEXTCHILDANCHOR_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* textchildanchor.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#include <gtkmm/object.h>
+#include <gtkmm/widget.h>
+#include <glibmm/listhandle.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkTextChildAnchor GtkTextChildAnchor;
+typedef struct _GtkTextChildAnchorClass GtkTextChildAnchorClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class TextChildAnchor_Class; } // namespace Gtk
+namespace Gtk
+{
+
+//TODO: Add a real class description.
+
+/** Typedefed as Gtk::TextBuffer::ChildAnchor.
+ * @ingroup TextView
+ */
+
+class TextChildAnchor : public Glib::Object
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef TextChildAnchor CppObjectType;
+ typedef TextChildAnchor_Class CppClassType;
+ typedef GtkTextChildAnchor BaseObjectType;
+ typedef GtkTextChildAnchorClass BaseClassType;
+
+private: friend class TextChildAnchor_Class;
+ static CppClassType textchildanchor_class_;
+
+private:
+ // noncopyable
+ TextChildAnchor(const TextChildAnchor&);
+ TextChildAnchor& operator=(const TextChildAnchor&);
+
+protected:
+ explicit TextChildAnchor(const Glib::ConstructParams& construct_params);
+ explicit TextChildAnchor(GtkTextChildAnchor* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~TextChildAnchor();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ GtkTextChildAnchor* gobj() { return reinterpret_cast<GtkTextChildAnchor*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const GtkTextChildAnchor* gobj() const { return reinterpret_cast<GtkTextChildAnchor*>(gobject_); }
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ GtkTextChildAnchor* gobj_copy();
+
+private:
+
+protected:
+ TextChildAnchor();
+
+public:
+
+ static Glib::RefPtr<TextChildAnchor> create();
+
+
+ /** Gets a list of all widgets anchored at this child anchor.
+ * @return List of widgets anchored at @a anchor .
+ */
+ Glib::ListHandle<Widget*> get_widgets();
+
+ /** Gets a list of all widgets anchored at this child anchor.
+ * @return List of widgets anchored at @a anchor .
+ */
+ Glib::ListHandle<const Widget*> get_widgets() const;
+
+ /** Determines whether a child anchor has been deleted from
+ * the buffer. Keep in mind that the child anchor will be
+ * unreferenced when removed from the buffer, so you need to
+ * hold your own reference (with Glib::object_ref()) if you plan
+ * to use this function @htmlonly&mdash;@endhtmlonly otherwise all deleted child anchors
+ * will also be finalized.
+ * @return <tt>true</tt> if the child anchor has been deleted from its buffer.
+ */
+ bool get_deleted() const;
+
+ //These methods, and GtkTextLayout are semi-private:
+
+ //_WRAP_METHOD(void Register_child(TextLayout& layout), gtk_text_child_anchor_register_child)
+ //_WRAP_METHOD(void unregister_child(Widget& child), gtk_text_child_anchor_unregister_child)
+ //_WRAP_METHOD(void queue_resize(TextLayout& layout), gtk_text_child_anchor_queue_resize)
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+};
+
+} /* namespace Gtk */
+
+
+namespace Glib
+{
+ /** @relates Gtk::TextChildAnchor
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Gtk::TextChildAnchor> wrap(GtkTextChildAnchor* object, bool take_copy = false);
+}
+
+
+#endif /* _GTKMM_TEXTCHILDANCHOR_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/textiter.cc b/libs/gtkmm2/gtk/gtkmm/textiter.cc
new file mode 100644
index 0000000000..1881fa5574
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/textiter.cc
@@ -0,0 +1,617 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/textiter.h>
+#include <gtkmm/private/textiter_p.h>
+
+#include <gtk/gtktypebuiltins.h>
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/texttag.h>
+#include <gtkmm/textbuffer.h>
+
+namespace Gtk
+{
+
+/**** Gtk::TextIter ********************************************************/
+
+
+bool TextIter::get_attributes(TextAttributes& values) const
+{
+ // The initialization is not strictly necessary and omitting it
+ // prevents a gcc-3.2 warning since { 0, } doesn't specifically
+ // initialize all members.
+ GtkTextAttributes gattributes; // = { 0, }
+
+ const bool result = gtk_text_iter_get_attributes(gobj(), &gattributes);
+ values = TextAttributes(&gattributes, true); //true = take_copy.
+ return result;
+}
+
+bool TextIter::begins_tag() const
+{
+ return gtk_text_iter_begins_tag(const_cast<GtkTextIter*>(gobj()), 0 /* see C docs */);
+}
+
+bool TextIter::ends_tag() const
+{
+ return gtk_text_iter_ends_tag(const_cast<GtkTextIter*>(gobj()), 0 /* see C docs */);
+}
+
+bool TextIter::toggles_tag() const
+{
+ return gtk_text_iter_toggles_tag(const_cast<GtkTextIter*>(gobj()), 0 /* see C docs */);
+}
+
+bool TextIter::has_tag() const
+{
+ return gtk_text_iter_has_tag(const_cast<GtkTextIter*>(gobj()), 0 /* see C docs */);
+}
+
+bool TextIter::forward_search(const Glib::ustring& str, TextSearchFlags flags, TextIter& match_start, TextIter& match_end) const
+{
+ return gtk_text_iter_forward_search(const_cast<GtkTextIter*>(gobj()), str.c_str(), ((GtkTextSearchFlags)(flags)), (match_start).gobj(), (match_end).gobj(), 0 /* means end() - see C docs */);
+}
+
+bool TextIter::backward_search(const Glib::ustring& str, TextSearchFlags flags, TextIter& match_start, TextIter& match_end) const
+{
+ return gtk_text_iter_backward_search(const_cast<GtkTextIter*>(gobj()), str.c_str(), ((GtkTextSearchFlags)(flags)), (match_start).gobj(), (match_end).gobj(), 0 /* means end - see C docs */);
+}
+
+
+} // namespace Gtk
+
+
+namespace
+{
+} // anonymous namespace
+
+// static
+GType Glib::Value<Gtk::TextSearchFlags>::value_type()
+{
+ return gtk_text_search_flags_get_type();
+}
+
+
+namespace Glib
+{
+
+Gtk::TextIter& wrap(GtkTextIter* object)
+{
+ return *reinterpret_cast<Gtk::TextIter*>(object);
+}
+
+const Gtk::TextIter& wrap(const GtkTextIter* object)
+{
+ return *reinterpret_cast<const Gtk::TextIter*>(object);
+}
+
+} // namespace Glib
+
+
+namespace Gtk
+{
+
+
+// static
+GType TextIter::get_type()
+{
+ return gtk_text_iter_get_type();
+}
+
+TextIter::TextIter()
+{
+ GLIBMM_INITIALIZE_STRUCT(gobject_, GtkTextIter);
+}
+
+TextIter::TextIter(const GtkTextIter* gobject)
+{
+ if(gobject)
+ gobject_ = *gobject;
+ else
+ GLIBMM_INITIALIZE_STRUCT(gobject_, GtkTextIter);
+}
+
+
+bool TextIter::forward_find_char_impl(GtkTextCharPredicate predicate, void* user_data, const GtkTextIter* limit)
+{
+ return gtk_text_iter_forward_find_char(gobj(), predicate, user_data, limit);
+}
+
+bool TextIter::backward_find_char_impl(GtkTextCharPredicate predicate, void* user_data, const GtkTextIter* limit)
+{
+ return gtk_text_iter_backward_find_char(gobj(), predicate, user_data, limit);
+}
+
+Glib::RefPtr<TextBuffer> TextIter::get_buffer() const
+{
+
+ Glib::RefPtr<TextBuffer> retvalue = Glib::wrap(gtk_text_iter_get_buffer(const_cast<GtkTextIter*>(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+int TextIter::get_offset() const
+{
+ return gtk_text_iter_get_offset(const_cast<GtkTextIter*>(gobj()));
+}
+
+int TextIter::get_line() const
+{
+ return gtk_text_iter_get_line(const_cast<GtkTextIter*>(gobj()));
+}
+
+int TextIter::get_line_offset() const
+{
+ return gtk_text_iter_get_line_offset(const_cast<GtkTextIter*>(gobj()));
+}
+
+int TextIter::get_line_index() const
+{
+ return gtk_text_iter_get_line_index(const_cast<GtkTextIter*>(gobj()));
+}
+
+int TextIter::get_visible_line_offset() const
+{
+ return gtk_text_iter_get_visible_line_offset(const_cast<GtkTextIter*>(gobj()));
+}
+
+int TextIter::get_visible_line_index() const
+{
+ return gtk_text_iter_get_visible_line_index(const_cast<GtkTextIter*>(gobj()));
+}
+
+gunichar TextIter::get_char() const
+{
+ return gtk_text_iter_get_char(const_cast<GtkTextIter*>(gobj()));
+}
+
+Glib::ustring TextIter::get_slice(const TextIter& end) const
+{
+ return Glib::convert_return_gchar_ptr_to_ustring(gtk_text_iter_get_slice(const_cast<GtkTextIter*>(gobj()), (end).gobj()));
+}
+
+Glib::ustring TextIter::get_text(const TextIter& end) const
+{
+ return Glib::convert_return_gchar_ptr_to_ustring(gtk_text_iter_get_text(const_cast<GtkTextIter*>(gobj()), (end).gobj()));
+}
+
+Glib::ustring TextIter::get_visible_slice(const TextIter& end) const
+{
+ return Glib::convert_return_gchar_ptr_to_ustring(gtk_text_iter_get_visible_slice(const_cast<GtkTextIter*>(gobj()), (end).gobj()));
+}
+
+Glib::ustring TextIter::get_visible_text(const TextIter& end) const
+{
+ return Glib::convert_return_gchar_ptr_to_ustring(gtk_text_iter_get_visible_text(const_cast<GtkTextIter*>(gobj()), (end).gobj()));
+}
+
+Glib::RefPtr<Gdk::Pixbuf> TextIter::get_pixbuf() const
+{
+
+ Glib::RefPtr<Gdk::Pixbuf> retvalue = Glib::wrap(gtk_text_iter_get_pixbuf(const_cast<GtkTextIter*>(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::SListHandle< Glib::RefPtr<TextMark> > TextIter::get_marks()
+{
+ return Glib::SListHandle< Glib::RefPtr<TextMark> >(gtk_text_iter_get_marks(gobj()), Glib::OWNERSHIP_SHALLOW);
+}
+
+Glib::SListHandle< Glib::RefPtr<const TextMark> > TextIter::get_marks() const
+{
+ return Glib::SListHandle< Glib::RefPtr<const TextMark> >(gtk_text_iter_get_marks(const_cast<GtkTextIter*>(gobj())), Glib::OWNERSHIP_SHALLOW);
+}
+
+Glib::RefPtr<TextChildAnchor> TextIter::get_child_anchor()
+{
+
+ Glib::RefPtr<TextChildAnchor> retvalue = Glib::wrap(gtk_text_iter_get_child_anchor(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const TextChildAnchor> TextIter::get_child_anchor() const
+{
+
+ Glib::RefPtr<const TextChildAnchor> retvalue = Glib::wrap(gtk_text_iter_get_child_anchor(const_cast<GtkTextIter*>(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::SListHandle< Glib::RefPtr<TextTag> > TextIter::get_toggled_tags(bool toggled_on)
+{
+ return Glib::SListHandle< Glib::RefPtr<TextTag> >(gtk_text_iter_get_toggled_tags(gobj(), static_cast<int>(toggled_on)), Glib::OWNERSHIP_SHALLOW);
+}
+
+Glib::SListHandle< Glib::RefPtr<const TextTag> > TextIter::get_toggled_tags(bool toggled_on) const
+{
+ return Glib::SListHandle< Glib::RefPtr<const TextTag> >(gtk_text_iter_get_toggled_tags(const_cast<GtkTextIter*>(gobj()), static_cast<int>(toggled_on)), Glib::OWNERSHIP_SHALLOW);
+}
+
+bool TextIter::begins_tag(const Glib::RefPtr<const TextTag>& tag) const
+{
+ return gtk_text_iter_begins_tag(const_cast<GtkTextIter*>(gobj()), const_cast<GtkTextTag*>(Glib::unwrap<TextTag>(tag)));
+}
+
+bool TextIter::ends_tag(const Glib::RefPtr<const TextTag>& tag) const
+{
+ return gtk_text_iter_ends_tag(const_cast<GtkTextIter*>(gobj()), const_cast<GtkTextTag*>(Glib::unwrap<TextTag>(tag)));
+}
+
+bool TextIter::toggles_tag(const Glib::RefPtr<const TextTag>& tag) const
+{
+ return gtk_text_iter_toggles_tag(const_cast<GtkTextIter*>(gobj()), const_cast<GtkTextTag*>(Glib::unwrap<TextTag>(tag)));
+}
+
+bool TextIter::has_tag(const Glib::RefPtr<const TextTag>& tag) const
+{
+ return gtk_text_iter_has_tag(const_cast<GtkTextIter*>(gobj()), const_cast<GtkTextTag*>(Glib::unwrap<TextTag>(tag)));
+}
+
+Glib::SListHandle< Glib::RefPtr<TextTag> > TextIter::get_tags()
+{
+ return Glib::SListHandle< Glib::RefPtr<TextTag> >(gtk_text_iter_get_tags(gobj()), Glib::OWNERSHIP_SHALLOW);
+}
+
+Glib::SListHandle< Glib::RefPtr<const TextTag> > TextIter::get_tags() const
+{
+ return Glib::SListHandle< Glib::RefPtr<const TextTag> >(gtk_text_iter_get_tags(const_cast<GtkTextIter*>(gobj())), Glib::OWNERSHIP_SHALLOW);
+}
+
+bool TextIter::editable(bool default_setting) const
+{
+ return gtk_text_iter_editable(const_cast<GtkTextIter*>(gobj()), static_cast<int>(default_setting));
+}
+
+bool TextIter::can_insert(bool default_editability) const
+{
+ return gtk_text_iter_can_insert(const_cast<GtkTextIter*>(gobj()), static_cast<int>(default_editability));
+}
+
+bool TextIter::starts_word() const
+{
+ return gtk_text_iter_starts_word(const_cast<GtkTextIter*>(gobj()));
+}
+
+bool TextIter::ends_word() const
+{
+ return gtk_text_iter_ends_word(const_cast<GtkTextIter*>(gobj()));
+}
+
+bool TextIter::inside_word() const
+{
+ return gtk_text_iter_inside_word(const_cast<GtkTextIter*>(gobj()));
+}
+
+bool TextIter::starts_sentence() const
+{
+ return gtk_text_iter_starts_sentence(const_cast<GtkTextIter*>(gobj()));
+}
+
+bool TextIter::ends_sentence() const
+{
+ return gtk_text_iter_ends_sentence(const_cast<GtkTextIter*>(gobj()));
+}
+
+bool TextIter::inside_sentence() const
+{
+ return gtk_text_iter_inside_sentence(const_cast<GtkTextIter*>(gobj()));
+}
+
+bool TextIter::starts_line() const
+{
+ return gtk_text_iter_starts_line(const_cast<GtkTextIter*>(gobj()));
+}
+
+bool TextIter::ends_line() const
+{
+ return gtk_text_iter_ends_line(const_cast<GtkTextIter*>(gobj()));
+}
+
+bool TextIter::is_cursor_position() const
+{
+ return gtk_text_iter_is_cursor_position(const_cast<GtkTextIter*>(gobj()));
+}
+
+int TextIter::get_chars_in_line() const
+{
+ return gtk_text_iter_get_chars_in_line(const_cast<GtkTextIter*>(gobj()));
+}
+
+int TextIter::get_bytes_in_line() const
+{
+ return gtk_text_iter_get_bytes_in_line(const_cast<GtkTextIter*>(gobj()));
+}
+
+Pango::Language TextIter::get_language() const
+{
+ return Pango::Language(gtk_text_iter_get_language(const_cast<GtkTextIter*>(gobj())));
+}
+
+bool TextIter::is_end() const
+{
+ return gtk_text_iter_is_end(const_cast<GtkTextIter*>(gobj()));
+}
+
+bool TextIter::is_start() const
+{
+ return gtk_text_iter_is_start(const_cast<GtkTextIter*>(gobj()));
+}
+
+bool TextIter::forward_char()
+{
+ return gtk_text_iter_forward_char(gobj());
+}
+
+bool TextIter::backward_char()
+{
+ return gtk_text_iter_backward_char(gobj());
+}
+
+bool TextIter::forward_chars(int count)
+{
+ return gtk_text_iter_forward_chars(gobj(), count);
+}
+
+bool TextIter::backward_chars(int count)
+{
+ return gtk_text_iter_backward_chars(gobj(), count);
+}
+
+bool TextIter::forward_line()
+{
+ return gtk_text_iter_forward_line(gobj());
+}
+
+bool TextIter::backward_line()
+{
+ return gtk_text_iter_backward_line(gobj());
+}
+
+bool TextIter::forward_lines(int count)
+{
+ return gtk_text_iter_forward_lines(gobj(), count);
+}
+
+bool TextIter::backward_lines(int count)
+{
+ return gtk_text_iter_backward_lines(gobj(), count);
+}
+
+bool TextIter::forward_word_end()
+{
+ return gtk_text_iter_forward_word_end(gobj());
+}
+
+bool TextIter::backward_word_start()
+{
+ return gtk_text_iter_backward_word_start(gobj());
+}
+
+bool TextIter::forward_word_ends(int count)
+{
+ return gtk_text_iter_forward_word_ends(gobj(), count);
+}
+
+bool TextIter::backward_word_starts(int count)
+{
+ return gtk_text_iter_backward_word_starts(gobj(), count);
+}
+
+bool TextIter::forward_visible_word_end()
+{
+ return gtk_text_iter_forward_visible_word_end(gobj());
+}
+
+bool TextIter::backward_visible_word_start()
+{
+ return gtk_text_iter_backward_visible_word_start(gobj());
+}
+
+bool TextIter::forward_visible_word_ends(int count)
+{
+ return gtk_text_iter_forward_visible_word_ends(gobj(), count);
+}
+
+bool TextIter::backward_visible_word_starts(int count)
+{
+ return gtk_text_iter_backward_visible_word_starts(gobj(), count);
+}
+
+bool TextIter::forward_sentence_end()
+{
+ return gtk_text_iter_forward_sentence_end(gobj());
+}
+
+bool TextIter::backward_sentence_start()
+{
+ return gtk_text_iter_backward_sentence_start(gobj());
+}
+
+bool TextIter::forward_sentence_ends(int count)
+{
+ return gtk_text_iter_forward_sentence_ends(gobj(), count);
+}
+
+bool TextIter::backward_sentence_starts(int count)
+{
+ return gtk_text_iter_backward_sentence_starts(gobj(), count);
+}
+
+bool TextIter::forward_cursor_position()
+{
+ return gtk_text_iter_forward_cursor_position(gobj());
+}
+
+bool TextIter::backward_cursor_position()
+{
+ return gtk_text_iter_backward_cursor_position(gobj());
+}
+
+bool TextIter::forward_cursor_positions(int count)
+{
+ return gtk_text_iter_forward_cursor_positions(gobj(), count);
+}
+
+bool TextIter::backward_cursor_positions(int count)
+{
+ return gtk_text_iter_backward_cursor_positions(gobj(), count);
+}
+
+bool TextIter::forward_visible_cursor_position()
+{
+ return gtk_text_iter_forward_visible_cursor_position(gobj());
+}
+
+bool TextIter::backward_visible_cursor_position()
+{
+ return gtk_text_iter_backward_visible_cursor_position(gobj());
+}
+
+bool TextIter::forward_visible_cursor_positions(int count)
+{
+ return gtk_text_iter_forward_visible_cursor_positions(gobj(), count);
+}
+
+bool TextIter::backward_visible_cursor_positions(int count)
+{
+ return gtk_text_iter_backward_visible_cursor_positions(gobj(), count);
+}
+
+void TextIter::set_offset(int char_offset)
+{
+ gtk_text_iter_set_offset(gobj(), char_offset);
+}
+
+void TextIter::set_line(int line_number)
+{
+ gtk_text_iter_set_line(gobj(), line_number);
+}
+
+void TextIter::set_line_offset(int char_on_line)
+{
+ gtk_text_iter_set_line_offset(gobj(), char_on_line);
+}
+
+void TextIter::set_line_index(int byte_on_line)
+{
+ gtk_text_iter_set_line_index(gobj(), byte_on_line);
+}
+
+void TextIter::forward_to_end()
+{
+ gtk_text_iter_forward_to_end(gobj());
+}
+
+bool TextIter::forward_to_line_end()
+{
+ return gtk_text_iter_forward_to_line_end(gobj());
+}
+
+void TextIter::set_visible_line_offset(int char_on_line)
+{
+ gtk_text_iter_set_visible_line_offset(gobj(), char_on_line);
+}
+
+void TextIter::set_visible_line_index(int byte_on_line)
+{
+ gtk_text_iter_set_visible_line_index(gobj(), byte_on_line);
+}
+
+bool TextIter::forward_to_tag_toggle(const Glib::RefPtr<TextTag>& tag)
+{
+ return gtk_text_iter_forward_to_tag_toggle(gobj(), Glib::unwrap(tag));
+}
+
+bool TextIter::backward_to_tag_toggle(const Glib::RefPtr<TextTag>& tag)
+{
+ return gtk_text_iter_backward_to_tag_toggle(gobj(), Glib::unwrap(tag));
+}
+
+bool TextIter::forward_search(const Glib::ustring& str, TextSearchFlags flags, TextIter& match_start, TextIter& match_end, const TextIter& limit) const
+{
+ return gtk_text_iter_forward_search(const_cast<GtkTextIter*>(gobj()), str.c_str(), ((GtkTextSearchFlags)(flags)), (match_start).gobj(), (match_end).gobj(), (limit).gobj());
+}
+
+bool TextIter::backward_search(const Glib::ustring& str, TextSearchFlags flags, TextIter& match_start, TextIter& match_end, const TextIter& limit) const
+{
+ return gtk_text_iter_backward_search(const_cast<GtkTextIter*>(gobj()), str.c_str(), ((GtkTextSearchFlags)(flags)), (match_start).gobj(), (match_end).gobj(), (limit).gobj());
+}
+
+int TextIter::compare(const TextIter& rhs) const
+{
+ return gtk_text_iter_compare(const_cast<GtkTextIter*>(gobj()), (rhs).gobj());
+}
+
+bool TextIter::in_range(const TextIter& start, const TextIter& end) const
+{
+ return gtk_text_iter_in_range(const_cast<GtkTextIter*>(gobj()), (start).gobj(), (end).gobj());
+}
+
+void TextIter::order(TextIter& second)
+{
+ gtk_text_iter_order(gobj(), (second).gobj());
+}
+
+
+bool operator==(const TextIter& lhs, const TextIter& rhs)
+{
+ return (gtk_text_iter_equal(lhs.gobj(), rhs.gobj()) != 0);
+}
+
+bool operator!=(const TextIter& lhs, const TextIter& rhs)
+{
+ return (gtk_text_iter_equal(lhs.gobj(), rhs.gobj()) == 0);
+}
+
+bool operator<(const TextIter& lhs, const TextIter& rhs)
+{
+ return (gtk_text_iter_compare(lhs.gobj(), rhs.gobj()) < 0);
+}
+
+bool operator>(const TextIter& lhs, const TextIter& rhs)
+{
+ return (gtk_text_iter_compare(lhs.gobj(), rhs.gobj()) > 0);
+}
+
+bool operator<=(const TextIter& lhs, const TextIter& rhs)
+{
+ return (gtk_text_iter_compare(lhs.gobj(), rhs.gobj()) <= 0);
+}
+
+bool operator>=(const TextIter& lhs, const TextIter& rhs)
+{
+ return (gtk_text_iter_compare(lhs.gobj(), rhs.gobj()) >= 0);
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/textiter.h b/libs/gtkmm2/gtk/gtkmm/textiter.h
new file mode 100644
index 0000000000..5a8cf919d0
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/textiter.h
@@ -0,0 +1,1210 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TEXTITER_H
+#define _GTKMM_TEXTITER_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright(C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software, ) you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation, ) either
+ * version 2 of the License, or(at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY, ) without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library, ) if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/exceptionhandler.h>
+#include <glibmm/slisthandle.h>
+#include <gdkmm/pixbuf.h>
+#include <gtkmm/texttag.h>
+#include <gtkmm/textchildanchor.h>
+#include <gtkmm/textattributes.h>
+#include <gtk/gtktextiter.h> /* we need the definition of GtkTextIter */
+
+
+namespace Gtk
+{
+
+
+/** @addtogroup gtkmmEnums Enums and Flags */
+
+/**
+ * @ingroup gtkmmEnums
+ * @par Bitwise operators:
+ * <tt>%TextSearchFlags operator|(TextSearchFlags, TextSearchFlags)</tt><br>
+ * <tt>%TextSearchFlags operator&(TextSearchFlags, TextSearchFlags)</tt><br>
+ * <tt>%TextSearchFlags operator^(TextSearchFlags, TextSearchFlags)</tt><br>
+ * <tt>%TextSearchFlags operator~(TextSearchFlags)</tt><br>
+ * <tt>%TextSearchFlags& operator|=(TextSearchFlags&, TextSearchFlags)</tt><br>
+ * <tt>%TextSearchFlags& operator&=(TextSearchFlags&, TextSearchFlags)</tt><br>
+ * <tt>%TextSearchFlags& operator^=(TextSearchFlags&, TextSearchFlags)</tt><br>
+ */
+enum TextSearchFlags
+{
+ TEXT_SEARCH_VISIBLE_ONLY = 1 << 0,
+ TEXT_SEARCH_TEXT_ONLY = 1 << 1
+};
+
+/** @ingroup gtkmmEnums */
+inline TextSearchFlags operator|(TextSearchFlags lhs, TextSearchFlags rhs)
+ { return static_cast<TextSearchFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
+
+/** @ingroup gtkmmEnums */
+inline TextSearchFlags operator&(TextSearchFlags lhs, TextSearchFlags rhs)
+ { return static_cast<TextSearchFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
+
+/** @ingroup gtkmmEnums */
+inline TextSearchFlags operator^(TextSearchFlags lhs, TextSearchFlags rhs)
+ { return static_cast<TextSearchFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
+
+/** @ingroup gtkmmEnums */
+inline TextSearchFlags operator~(TextSearchFlags flags)
+ { return static_cast<TextSearchFlags>(~static_cast<unsigned>(flags)); }
+
+/** @ingroup gtkmmEnums */
+inline TextSearchFlags& operator|=(TextSearchFlags& lhs, TextSearchFlags rhs)
+ { return (lhs = static_cast<TextSearchFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
+
+/** @ingroup gtkmmEnums */
+inline TextSearchFlags& operator&=(TextSearchFlags& lhs, TextSearchFlags rhs)
+ { return (lhs = static_cast<TextSearchFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
+
+/** @ingroup gtkmmEnums */
+inline TextSearchFlags& operator^=(TextSearchFlags& lhs, TextSearchFlags rhs)
+ { return (lhs = static_cast<TextSearchFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::TextSearchFlags> : public Glib::Value_Flags<Gtk::TextSearchFlags>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+
+class TextBuffer;
+class TextMark;
+
+/** Typefed as Gtk::TextBuffer::iterator.
+ * An iterator represents a position between two characters in the text buffer. Iterators are not valid indefinitely; whenever the buffer is
+ * modified in a way that affects the number of characters in the buffer, all outstanding iterators become invalid. (Note that
+ * deleting 5 characters and then reinserting 5 still invalidates iterators, though you end up with the same number of characters
+ * you pass through a state with a different number).
+ *
+ * Because of this, iterators can't be used to preserve positions across buffer modifications. To preserve a position, the
+ * @link Gtk::TextMark Gtk::TextBuffer::Mark@endlink object is ideal.
+ *
+ * You can iterate over characters, words, lines, and sentences,
+ * but operator*() and operator++() deal only in characters.
+ *
+ * TODO: Maybe we should have separate iterators for words, lines, and sentences.
+ * @ingroup TextView
+ */
+class TextIter
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef TextIter CppObjectType;
+ typedef GtkTextIter BaseObjectType;
+
+ static GType get_type() G_GNUC_CONST;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ TextIter();
+
+ explicit TextIter(const GtkTextIter* gobject); // always takes a copy
+
+ ///Provides access to the underlying C instance.
+ GtkTextIter* gobj() { return &gobject_; }
+
+ ///Provides access to the underlying C instance.
+ const GtkTextIter* gobj() const { return &gobject_; }
+
+protected:
+ GtkTextIter gobject_;
+
+private:
+
+
+public:
+ typedef std::bidirectional_iterator_tag iterator_category;
+ typedef gunichar value_type;
+ typedef int difference_type;
+ typedef value_type reference;
+ typedef void pointer;
+
+ /** Alias for forward_char(). */
+ inline TextIter& operator++();
+ inline const TextIter operator++(int);
+
+ /** Alias for backward_char(). */
+ inline TextIter& operator--();
+ inline const TextIter operator--(int);
+
+ /** Alias for get_char(). */
+ inline value_type operator*() const;
+
+ /** Alias for !is_end(). */
+ inline operator bool() const;
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+protected:
+ template <class Predicate>
+ struct PredicateAdapter
+ {
+ Predicate predicate_;
+ inline PredicateAdapter(const Predicate& predicate);
+ static gboolean gtk_callback(gunichar uc, void* user_data);
+ };
+
+
+ /** Advances @a iter , calling @a pred on each character. If
+ * @a pred returns <tt>true</tt>, returns <tt>true</tt> and stops scanning.
+ * If @a pred never returns <tt>true</tt>, @a iter is set to @a limit if
+ * @a limit is non-<tt>0</tt>, otherwise to the end iterator.
+ * @param pred A function to be called on each character.
+ * @param user_data User data for @a pred .
+ * @param limit Search limit, or <tt>0</tt> for none.
+ * @return Whether a match was found.
+ */
+ bool forward_find_char_impl(GtkTextCharPredicate predicate,
+ void* user_data,
+ const GtkTextIter* limit);
+
+
+ /** Same as gtk_text_iter_forward_find_char(), but goes backward from @a iter .
+ * @param pred Function to be called on each character.
+ * @param user_data User data for @a pred .
+ * @param limit Search limit, or <tt>0</tt> for none.
+ * @return Whether a match was found.
+ */
+ bool backward_find_char_impl(GtkTextCharPredicate predicate,
+ void* user_data,
+ const GtkTextIter* limit);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+
+ /** Returns the Gtk::TextBuffer this iterator is associated with.
+ * @return The buffer.
+ */
+ Glib::RefPtr<TextBuffer> get_buffer() const;
+
+
+ /** Returns the character offset of an iterator.
+ * Each character in a Gtk::TextBuffer has an offset,
+ * starting with 0 for the first character in the buffer.
+ * Use Gtk::TextBuffer::get_iter_at_offset() to convert an
+ * offset back into an iterator.
+ * @return A character offset.
+ */
+ int get_offset() const;
+
+ /** Returns the line number containing the iterator. Lines in
+ * a Gtk::TextBuffer are numbered beginning with 0 for the first
+ * line in the buffer.
+ * @return A line number.
+ */
+ int get_line() const;
+
+ /** Returns the character offset of the iterator,
+ * counting from the start of a newline-terminated line.
+ * The first character on the line has offset 0.
+ * @return Offset from start of line.
+ */
+ int get_line_offset() const;
+
+ /** Returns the byte index of the iterator, counting
+ * from the start of a newline-terminated line.
+ * Remember that Gtk::TextBuffer encodes text in
+ * UTF-8, and that characters can require a variable
+ * number of bytes to represent.
+ * @return Distance from start of line, in bytes.
+ */
+ int get_line_index() const;
+
+
+ /** Returns the offset in characters from the start of the
+ * line to the given @a iter , not counting characters that
+ * are invisible due to tags with the "invisible" flag
+ * toggled on.
+ * @return Offset in visible characters from the start of the line.
+ */
+ int get_visible_line_offset() const;
+
+ /** Returns the number of bytes from the start of the
+ * line to the given @a iter , not counting bytes that
+ * are invisible due to tags with the "invisible" flag
+ * toggled on.
+ * @return Byte index of @a iter with respect to the start of the line.
+ */
+ int get_visible_line_index() const;
+
+
+ /** Returns the Unicode character at this iterator. (Equivalent to
+ * operator* on a C++ iterator.) If the element at this iterator is a
+ * non-character element, such as an image embedded in the buffer, the
+ * Unicode "unknown" character 0xFFFC is returned. If invoked on
+ * the end iterator, zero is returned; zero is not a valid Unicode character.
+ * So you can write a loop which ends when gtk_text_iter_get_char()
+ * returns 0.
+ * @return A Unicode character, or 0 if @a iter is not dereferenceable.
+ */
+ gunichar get_char() const;
+
+ /** Returns the text in the given range. A "slice" is an array of
+ * characters encoded in UTF-8 format, including the Unicode "unknown"
+ * character 0xFFFC for iterable non-character elements in the buffer,
+ * such as images. Because images are encoded in the slice, byte and
+ * character offsets in the returned array will correspond to byte
+ * offsets in the text buffer. Note that 0xFFFC can occur in normal
+ * text as well, so it is not a reliable indicator that a pixbuf or
+ * widget is in the buffer.
+ * @param end Iterator at end of a range.
+ * @return Slice of text from the buffer.
+ */
+ Glib::ustring get_slice(const TextIter& end) const;
+
+ /** Returns <em>text</em> in the given range. If the range
+ * contains non-text elements such as images, the character and byte
+ * offsets in the returned string will not correspond to character and
+ * byte offsets in the buffer. If you want offsets to correspond, see
+ * gtk_text_iter_get_slice().
+ * @param end Iterator at end of a range.
+ * @return Array of characters from the buffer.
+ */
+ Glib::ustring get_text(const TextIter& end) const;
+
+ /** Like gtk_text_iter_get_slice(), but invisible text is not included.
+ * Invisible text is usually invisible because a Gtk::TextTag with the
+ * "invisible" attribute turned on has been applied to it.
+ * @param end Iterator at end of range.
+ * @return Slice of text from the buffer.
+ */
+ Glib::ustring get_visible_slice(const TextIter& end) const;
+
+ /** Like gtk_text_iter_get_text(), but invisible text is not included.
+ * Invisible text is usually invisible because a Gtk::TextTag with the
+ * "invisible" attribute turned on has been applied to it.
+ * @param end Iterator at end of range.
+ * @return String containing visible text in the range.
+ */
+ Glib::ustring get_visible_text(const TextIter& end) const;
+
+
+ /** If the element at @a iter is a pixbuf, the pixbuf is returned
+ * (with no new reference count added). Otherwise,
+ * <tt>0</tt> is returned.
+ * @return The pixbuf at @a iter .
+ */
+ Glib::RefPtr<Gdk::Pixbuf> get_pixbuf() const;
+
+ /** Returns a list of all Gtk::TextMark at this location. Because marks
+ * are not iterable (they don't take up any "space" in the buffer,
+ * they are just marks in between iterable locations), multiple marks
+ * can exist in the same place. The returned list is not in any
+ * meaningful order.
+ * @return List of Gtk::TextMark.
+ */
+ Glib::SListHandle< Glib::RefPtr<TextMark> > get_marks();
+
+ /** Returns a list of all Gtk::TextMark at this location. Because marks
+ * are not iterable (they don't take up any "space" in the buffer,
+ * they are just marks in between iterable locations), multiple marks
+ * can exist in the same place. The returned list is not in any
+ * meaningful order.
+ * @return List of Gtk::TextMark.
+ */
+ Glib::SListHandle< Glib::RefPtr<const TextMark> > get_marks() const;
+
+
+ /** If the location at @a iter contains a child anchor, the
+ * anchor is returned (with no new reference count added). Otherwise,
+ * <tt>0</tt> is returned.
+ * @return The anchor at @a iter .
+ */
+ Glib::RefPtr<TextChildAnchor> get_child_anchor();
+
+ /** If the location at @a iter contains a child anchor, the
+ * anchor is returned (with no new reference count added). Otherwise,
+ * <tt>0</tt> is returned.
+ * @return The anchor at @a iter .
+ */
+ Glib::RefPtr<const TextChildAnchor> get_child_anchor() const;
+
+
+ /** Returns a list of Gtk::TextTag that are toggled on or off at this
+ * point. (If @a toggled_on is <tt>true</tt>, the list contains tags that are
+ * toggled on.) If a tag is toggled on at @a iter , then some non-empty
+ * range of characters following @a iter has that tag applied to it. If
+ * a tag is toggled off, then some non-empty range following @a iter
+ * does <em>not</em> have the tag applied to it.
+ * @param toggled_on <tt>true</tt> to get toggled-on tags.
+ * @return Tags toggled at this point.
+ */
+ Glib::SListHandle< Glib::RefPtr<TextTag> > get_toggled_tags(bool toggled_on = true);
+
+ /** Returns a list of Gtk::TextTag that are toggled on or off at this
+ * point. (If @a toggled_on is <tt>true</tt>, the list contains tags that are
+ * toggled on.) If a tag is toggled on at @a iter , then some non-empty
+ * range of characters following @a iter has that tag applied to it. If
+ * a tag is toggled off, then some non-empty range following @a iter
+ * does <em>not</em> have the tag applied to it.
+ * @param toggled_on <tt>true</tt> to get toggled-on tags.
+ * @return Tags toggled at this point.
+ */
+ Glib::SListHandle< Glib::RefPtr<const TextTag> > get_toggled_tags(bool toggled_on = true) const;
+
+
+ /** Returns <tt>true</tt> if @a tag is toggled on at exactly this point. If @a tag
+ * is <tt>0</tt>, returns <tt>true</tt> if any tag is toggled on at this point. Note
+ * that the gtk_text_iter_begins_tag() returns <tt>true</tt> if @a iter is the
+ * <em>start</em> of the tagged range;
+ * gtk_text_iter_has_tag() tells you whether an iterator is
+ * <em>within</em> a tagged range.
+ * @param tag A Gtk::TextTag, or <tt>0</tt>.
+ * @return Whether @a iter is the start of a range tagged with @a tag .
+ */
+ bool begins_tag(const Glib::RefPtr<const TextTag>& tag) const;
+ bool begins_tag() const;
+
+ /** Returns <tt>true</tt> if @a tag is toggled off at exactly this point. If @a tag
+ * is <tt>0</tt>, returns <tt>true</tt> if any tag is toggled off at this point. Note
+ * that the gtk_text_iter_ends_tag() returns <tt>true</tt> if @a iter is the
+ * <em>end</em> of the tagged range;
+ * gtk_text_iter_has_tag() tells you whether an iterator is
+ * <em>within</em> a tagged range.
+ * @param tag A Gtk::TextTag, or <tt>0</tt>.
+ * @return Whether @a iter is the end of a range tagged with @a tag .
+ */
+ bool ends_tag(const Glib::RefPtr<const TextTag>& tag) const;
+ bool ends_tag() const;
+
+ /** This is equivalent to (gtk_text_iter_begins_tag() ||
+ * gtk_text_iter_ends_tag()), i.e.\ it tells you whether a range with
+ * @a tag applied to it begins <em>or</em> ends at @a iter .
+ * @param tag A Gtk::TextTag, or <tt>0</tt>.
+ * @return Whether @a tag is toggled on or off at @a iter .
+ */
+ bool toggles_tag(const Glib::RefPtr<const TextTag>& tag) const;
+ bool toggles_tag() const;
+
+
+ /** Returns <tt>true</tt> if @a iter is within a range tagged with @a tag .
+ * @param tag A Gtk::TextTag.
+ * @return Whether @a iter is tagged with @a tag .
+ */
+ bool has_tag(const Glib::RefPtr<const TextTag>& tag) const;
+ bool has_tag() const;
+
+
+ /** Returns a list of tags that apply to @a iter , in ascending order of
+ * priority (highest-priority tags are last).
+ * @return List of Gtk::TextTag.
+ */
+ Glib::SListHandle< Glib::RefPtr<TextTag> > get_tags();
+
+ /** Returns a list of tags that apply to @a iter , in ascending order of
+ * priority (highest-priority tags are last).
+ * @return List of Gtk::TextTag.
+ */
+ Glib::SListHandle< Glib::RefPtr<const TextTag> > get_tags() const;
+
+
+ /** Returns whether the character at @a iter is within an editable region
+ * of text. Non-editable text is "locked" and can't be changed by the
+ * user via Gtk::TextView. This function is simply a convenience
+ * wrapper around gtk_text_iter_get_attributes(). If no tags applied
+ * to this text affect editability, @a default_setting will be returned.
+ *
+ * You don't want to use this function to decide whether text can be
+ * inserted at @a iter , because for insertion you don't want to know
+ * whether the char at @a iter is inside an editable range, you want to
+ * know whether a new character inserted at @a iter would be inside an
+ * editable range. Use gtk_text_iter_can_insert() to handle this
+ * case.
+ * @param default_setting <tt>true</tt> if text is editable by default.
+ * @return Whether @a iter is inside an editable range.
+ */
+ bool editable(bool default_setting = true) const;
+
+ /** Considering the default editability of the buffer, and tags that
+ * affect editability, determines whether text inserted at @a iter would
+ * be editable. If text inserted at @a iter would be editable then the
+ * user should be allowed to insert text at @a iter .
+ * Gtk::TextBuffer::insert_interactive() uses this function to decide
+ * whether insertions are allowed at a given position.
+ * @param default_editability <tt>true</tt> if text is editable by default.
+ * @return Whether text inserted at @a iter would be editable.
+ */
+ bool can_insert(bool default_editability = true) const;
+
+
+ /** Determines whether @a iter begins a natural-language word. Word
+ * breaks are determined by Pango and should be correct for nearly any
+ * language (if not, the correct fix would be to the Pango word break
+ * algorithms).
+ * @return <tt>true</tt> if @a iter is at the start of a word.
+ */
+ bool starts_word() const;
+
+ /** Determines whether @a iter ends a natural-language word. Word breaks
+ * are determined by Pango and should be correct for nearly any
+ * language (if not, the correct fix would be to the Pango word break
+ * algorithms).
+ * @return <tt>true</tt> if @a iter is at the end of a word.
+ */
+ bool ends_word() const;
+
+ /** Determines whether @a iter is inside a natural-language word (as
+ * opposed to say inside some whitespace). Word breaks are determined
+ * by Pango and should be correct for nearly any language (if not, the
+ * correct fix would be to the Pango word break algorithms).
+ * @return <tt>true</tt> if @a iter is inside a word.
+ */
+ bool inside_word() const;
+
+ /** Determines whether @a iter begins a sentence. Sentence boundaries are
+ * determined by Pango and should be correct for nearly any language
+ * (if not, the correct fix would be to the Pango text boundary
+ * algorithms).
+ * @return <tt>true</tt> if @a iter is at the start of a sentence.
+ */
+ bool starts_sentence() const;
+
+ /** Determines whether @a iter ends a sentence. Sentence boundaries are
+ * determined by Pango and should be correct for nearly any language
+ * (if not, the correct fix would be to the Pango text boundary
+ * algorithms).
+ * @return <tt>true</tt> if @a iter is at the end of a sentence.
+ */
+ bool ends_sentence() const;
+
+ /** Determines whether @a iter is inside a sentence (as opposed to in
+ * between two sentences, e.g.\ after a period and before the first
+ * letter of the next sentence). Sentence boundaries are determined
+ * by Pango and should be correct for nearly any language (if not, the
+ * correct fix would be to the Pango text boundary algorithms).
+ * @return <tt>true</tt> if @a iter is inside a sentence.
+ */
+ bool inside_sentence() const;
+
+ /** Returns <tt>true</tt> if @a iter begins a paragraph,
+ * i.e.\ if gtk_text_iter_get_line_offset() would return 0.
+ * However this function is potentially more efficient than
+ * gtk_text_iter_get_line_offset() because it doesn't have to compute
+ * the offset, it just has to see whether it's 0.
+ * @return Whether @a iter begins a line.
+ */
+ bool starts_line() const;
+
+ /** Returns <tt>true</tt> if @a iter points to the start of the paragraph
+ * delimiter characters for a line (delimiters will be either a
+ * newline, a carriage return, a carriage return followed by a
+ * newline, or a Unicode paragraph separator character). Note that an
+ * iterator pointing to the <tt>\\n</tt> of a <tt>\\r</tt><tt>\\n</tt> pair will not be counted as
+ * the end of a line, the line ends before the <tt>\\r</tt>. The end iterator is
+ * considered to be at the end of a line, even though there are no
+ * paragraph delimiter chars there.
+ * @return Whether @a iter is at the end of a line.
+ */
+ bool ends_line() const;
+
+ /** See gtk_text_iter_forward_cursor_position() or Pango::LogAttr or
+ * pango_break() for details on what a cursor position is.
+ * @return <tt>true</tt> if the cursor can be placed at @a iter .
+ */
+ bool is_cursor_position() const;
+
+
+ /** Returns the number of characters in the line containing @a iter ,
+ * including the paragraph delimiters.
+ * @return Number of characters in the line.
+ */
+ int get_chars_in_line() const;
+
+ /** Returns the number of bytes in the line containing @a iter ,
+ * including the paragraph delimiters.
+ * @return Number of bytes in the line.
+ */
+ int get_bytes_in_line() const;
+
+ bool get_attributes(TextAttributes& values) const;
+
+ /** A convenience wrapper around gtk_text_iter_get_attributes(),
+ * which returns the language in effect at @a iter . If no tags affecting
+ * language apply to @a iter , the return value is identical to that of
+ * gtk_get_default_language().
+ * @return Language in effect at @a iter .
+ */
+ Pango::Language get_language() const;
+
+ /** Returns <tt>true</tt> if @a iter is the end iterator, i.e.\ one past the last
+ * dereferenceable iterator in the buffer. gtk_text_iter_is_end() is
+ * the most efficient way to check whether an iterator is the end
+ * iterator.
+ * @return Whether @a iter is the end iterator.
+ */
+ bool is_end() const;
+
+ /** Returns <tt>true</tt> if @a iter is the first iterator in the buffer, that is
+ * if @a iter has a character offset of 0.
+ * @return Whether @a iter is the first in the buffer.
+ */
+ bool is_start() const;
+
+
+ /** Moves @a iter forward by one character offset. Note that images
+ * embedded in the buffer occupy 1 character slot, so
+ * gtk_text_iter_forward_char() may actually move onto an image instead
+ * of a character, if you have images in your buffer. If @a iter is the
+ * end iterator or one character before it, @a iter will now point at
+ * the end iterator, and gtk_text_iter_forward_char() returns <tt>false</tt> for
+ * convenience when writing loops.
+ * @return Whether @a iter moved and is dereferenceable.
+ */
+ bool forward_char();
+
+ /** Moves backward by one character offset. Returns <tt>true</tt> if movement
+ * was possible; if @a iter was the first in the buffer (character
+ * offset 0), gtk_text_iter_backward_char() returns <tt>false</tt> for convenience when
+ * writing loops.
+ * @return Whether movement was possible.
+ */
+ bool backward_char();
+
+ /** Moves @a count characters if possible (if @a count would move past the
+ * start or end of the buffer, moves to the start or end of the
+ * buffer). The return value indicates whether the new position of
+ * @a iter is different from its original position, and dereferenceable
+ * (the last iterator in the buffer is not dereferenceable). If @a count
+ * is 0, the function does nothing and returns <tt>false</tt>.
+ * @param count Number of characters to move, may be negative.
+ * @return Whether @a iter moved and is dereferenceable.
+ */
+ bool forward_chars(int count);
+
+ /** Moves @a count characters backward, if possible (if @a count would move
+ * past the start or end of the buffer, moves to the start or end of
+ * the buffer). The return value indicates whether the iterator moved
+ * onto a dereferenceable position; if the iterator didn't move, or
+ * moved onto the end iterator, then <tt>false</tt> is returned. If @a count is 0,
+ * the function does nothing and returns <tt>false</tt>.
+ * @param count Number of characters to move.
+ * @return Whether @a iter moved and is dereferenceable.
+ */
+ bool backward_chars(int count);
+
+ /** Moves @a iter to the start of the next line. Returns <tt>true</tt> if there
+ * was a next line to move to, and <tt>false</tt> if @a iter was simply moved to
+ * the end of the buffer and is now not dereferenceable, or if @a iter was
+ * already at the end of the buffer.
+ * @return Whether @a iter can be dereferenced.
+ */
+ bool forward_line();
+
+ /** Moves @a iter to the start of the previous line. Returns <tt>true</tt> if
+ * @a iter could be moved; i.e. if @a iter was at character offset 0, this
+ * function returns <tt>false</tt>. Therefore if @a iter was already on line 0,
+ * but not at the start of the line, @a iter is snapped to the start of
+ * the line and the function returns <tt>true</tt>. (Note that this implies that
+ * in a loop calling this function, the line number may not change on
+ * every iteration, if your first iteration is on line 0.)
+ * @return Whether @a iter moved.
+ */
+ bool backward_line();
+
+ /** Moves @a count lines forward, if possible (if @a count would move
+ * past the start or end of the buffer, moves to the start or end of
+ * the buffer). The return value indicates whether the iterator moved
+ * onto a dereferenceable position; if the iterator didn't move, or
+ * moved onto the end iterator, then <tt>false</tt> is returned. If @a count is 0,
+ * the function does nothing and returns <tt>false</tt>. If @a count is negative,
+ * moves backward by 0 - @a count lines.
+ * @param count Number of lines to move forward.
+ * @return Whether @a iter moved and is dereferenceable.
+ */
+ bool forward_lines(int count);
+
+ /** Moves @a count lines backward, if possible (if @a count would move
+ * past the start or end of the buffer, moves to the start or end of
+ * the buffer). The return value indicates whether the iterator moved
+ * onto a dereferenceable position; if the iterator didn't move, or
+ * moved onto the end iterator, then <tt>false</tt> is returned. If @a count is 0,
+ * the function does nothing and returns <tt>false</tt>. If @a count is negative,
+ * moves forward by 0 - @a count lines.
+ * @param count Number of lines to move backward.
+ * @return Whether @a iter moved and is dereferenceable.
+ */
+ bool backward_lines(int count);
+
+ /** Moves forward to the next word end. (If @a iter is currently on a
+ * word end, moves forward to the next one after that.) Word breaks
+ * are determined by Pango and should be correct for nearly any
+ * language (if not, the correct fix would be to the Pango word break
+ * algorithms).
+ * @return <tt>true</tt> if @a iter moved and is not the end iterator.
+ */
+ bool forward_word_end();
+
+ /** Moves backward to the previous word start. (If @a iter is currently on a
+ * word start, moves backward to the next one after that.) Word breaks
+ * are determined by Pango and should be correct for nearly any
+ * language (if not, the correct fix would be to the Pango word break
+ * algorithms).
+ * @return <tt>true</tt> if @a iter moved and is not the end iterator.
+ */
+ bool backward_word_start();
+
+ /** Calls gtk_text_iter_forward_word_end() up to @a count times.
+ * @param count Number of times to move.
+ * @return <tt>true</tt> if @a iter moved and is not the end iterator.
+ */
+ bool forward_word_ends(int count);
+
+ /** Calls gtk_text_iter_backward_word_start() up to @a count times.
+ * @param count Number of times to move.
+ * @return <tt>true</tt> if @a iter moved and is not the end iterator.
+ */
+ bool backward_word_starts(int count);
+
+ //TODO: Now that there are so many *_visible_ versions of the methods, maybe we should
+ //just add a visible=false parameter and therefore halve the number of methods. murrayc
+
+
+ /** Moves forward to the next visible word end. (If @a iter is currently on a
+ * word end, moves forward to the next one after that.) Word breaks
+ * are determined by Pango and should be correct for nearly any
+ * language (if not, the correct fix would be to the Pango word break
+ * algorithms).
+ * @return <tt>true</tt> if @a iter moved and is not the end iterator
+ *
+ * Since: 2.4.
+ */
+ bool forward_visible_word_end();
+
+ /** Moves backward to the previous visible word start. (If @a iter is currently
+ * on a word start, moves backward to the next one after that.) Word breaks
+ * are determined by Pango and should be correct for nearly any
+ * language (if not, the correct fix would be to the Pango word break
+ * algorithms).
+ * @return <tt>true</tt> if @a iter moved and is not the end iterator
+ *
+ * Since: 2.4.
+ */
+ bool backward_visible_word_start();
+
+ /** Calls gtk_text_iter_forward_visible_word_end() up to @a count times.
+ * @param count Number of times to move.
+ * @return <tt>true</tt> if @a iter moved and is not the end iterator
+ *
+ * Since: 2.4.
+ */
+ bool forward_visible_word_ends(int count);
+
+ /** Calls gtk_text_iter_backward_visible_word_start() up to @a count times.
+ * @param count Number of times to move.
+ * @return <tt>true</tt> if @a iter moved and is not the end iterator
+ *
+ * Since: 2.4.
+ */
+ bool backward_visible_word_starts(int count);
+
+
+ /** Moves forward to the next sentence end. (If @a iter is at the end of
+ * a sentence, moves to the next end of sentence.) Sentence
+ * boundaries are determined by Pango and should be correct for nearly
+ * any language (if not, the correct fix would be to the Pango text
+ * boundary algorithms).
+ * @return <tt>true</tt> if @a iter moved and is not the end iterator.
+ */
+ bool forward_sentence_end();
+
+ /** Moves backward to the previous sentence start; if @a iter is already at
+ * the start of a sentence, moves backward to the next one. Sentence
+ * boundaries are determined by Pango and should be correct for nearly
+ * any language (if not, the correct fix would be to the Pango text
+ * boundary algorithms).
+ * @return <tt>true</tt> if @a iter moved and is not the end iterator.
+ */
+ bool backward_sentence_start();
+
+ /** Calls gtk_text_iter_forward_sentence_end() @a count times (or until
+ * gtk_text_iter_forward_sentence_end() returns <tt>false</tt>). If @a count is
+ * negative, moves backward instead of forward.
+ * @param count Number of sentences to move.
+ * @return <tt>true</tt> if @a iter moved and is not the end iterator.
+ */
+ bool forward_sentence_ends(int count);
+
+ /** Calls gtk_text_iter_backward_sentence_start() up to @a count times,
+ * or until it returns <tt>false</tt>. If @a count is negative, moves forward
+ * instead of backward.
+ * @param count Number of sentences to move.
+ * @return <tt>true</tt> if @a iter moved and is not the end iterator.
+ */
+ bool backward_sentence_starts(int count);
+
+
+ /** Moves @a iter forward by a single cursor position. Cursor positions
+ * are (unsurprisingly) positions where the cursor can appear. Perhaps
+ * surprisingly, there may not be a cursor position between all
+ * characters. The most common example for European languages would be
+ * a carriage return/newline sequence. For some Unicode characters,
+ * the equivalent of say the letter "a" with an accent mark will be
+ * represented as two characters, first the letter then a "combining
+ * mark" that causes the accent to be rendered; so the cursor can't go
+ * between those two characters. See also the Pango::LogAttr structure and
+ * pango_break() function.
+ * @return <tt>true</tt> if we moved and the new position is dereferenceable.
+ */
+ bool forward_cursor_position();
+
+ /** Like gtk_text_iter_forward_cursor_position(), but moves backward.
+ * @return <tt>true</tt> if we moved.
+ */
+ bool backward_cursor_position();
+
+ /** Moves up to @a count cursor positions. See
+ * gtk_text_iter_forward_cursor_position() for details.
+ * @param count Number of positions to move.
+ * @return <tt>true</tt> if we moved and the new position is dereferenceable.
+ */
+ bool forward_cursor_positions(int count);
+
+ /** Moves up to @a count cursor positions. See
+ * gtk_text_iter_forward_cursor_position() for details.
+ * @param count Number of positions to move.
+ * @return <tt>true</tt> if we moved and the new position is dereferenceable.
+ */
+ bool backward_cursor_positions(int count);
+
+
+ /** Moves @a iter forward to the next visible cursor position. See
+ * gtk_text_iter_forward_cursor_position() for details.
+ * @return <tt>true</tt> if we moved and the new position is dereferenceable
+ *
+ * Since: 2.4.
+ */
+ bool forward_visible_cursor_position();
+
+ /** Moves @a iter forward to the previous visible cursor position. See
+ * gtk_text_iter_backward_cursor_position() for details.
+ * @return <tt>true</tt> if we moved and the new position is dereferenceable
+ *
+ * Since: 2.4.
+ */
+ bool backward_visible_cursor_position();
+
+ /** Moves up to @a count visible cursor positions. See
+ * gtk_text_iter_forward_cursor_position() for details.
+ * @param count Number of positions to move.
+ * @return <tt>true</tt> if we moved and the new position is dereferenceable
+ *
+ * Since: 2.4.
+ */
+ bool forward_visible_cursor_positions(int count);
+
+ /** Moves up to @a count visible cursor positions. See
+ * gtk_text_iter_forward_cursor_position() for details.
+ * @param count Number of positions to move.
+ * @return <tt>true</tt> if we moved and the new position is dereferenceable
+ *
+ * Since: 2.4.
+ */
+ bool backward_visible_cursor_positions(int count);
+
+
+ /** Sets @a iter to point to @a char_offset . @a char_offset counts from the start
+ * of the entire text buffer, starting with 0.
+ * @param char_offset A character number.
+ */
+ void set_offset(int char_offset);
+
+ /** Moves iterator @a iter to the start of the line @a line_number . If
+ * @a line_number is negative or larger than the number of lines in the
+ * buffer, moves @a iter to the start of the last line in the buffer.
+ * @param line_number Line number (counted from 0).
+ */
+ void set_line(int line_number);
+
+ /** Moves @a iter within a line, to a new <em>character</em>
+ * (not byte) offset. The given character offset must be less than or
+ * equal to the number of characters in the line; if equal, @a iter
+ * moves to the start of the next line. See
+ * gtk_text_iter_set_line_index() if you have a byte index rather than
+ * a character offset.
+ * @param char_on_line A character offset relative to the start of @a iter 's current line.
+ */
+ void set_line_offset(int char_on_line);
+
+ /** Same as gtk_text_iter_set_line_offset(), but works with a
+ * <em>byte</em> index. The given byte index must be at
+ * the start of a character, it can't be in the middle of a UTF-8
+ * encoded character.
+ * @param byte_on_line A byte index relative to the start of @a iter 's current line.
+ */
+ void set_line_index(int byte_on_line);
+
+ /** Moves @a iter forward to the "end iterator," which points one past the last
+ * valid character in the buffer. gtk_text_iter_get_char() called on the
+ * end iterator returns 0, which is convenient for writing loops.
+ */
+ void forward_to_end();
+
+ /** Moves the iterator to point to the paragraph delimiter characters,
+ * which will be either a newline, a carriage return, a carriage
+ * return/newline in sequence, or the Unicode paragraph separator
+ * character. If the iterator is already at the paragraph delimiter
+ * characters, moves to the paragraph delimiter characters for the
+ * next line. If @a iter is on the last line in the buffer, which does
+ * not end in paragraph delimiters, moves to the end iterator (end of
+ * the last line), and returns <tt>false</tt>.
+ * @return <tt>true</tt> if we moved and the new location is not the end iterator.
+ */
+ bool forward_to_line_end();
+
+
+ /** Like gtk_text_iter_set_line_offset(), but the offset is in visible
+ * characters, i.e.\ text with a tag making it invisible is not
+ * counted in the offset.
+ * @param char_on_line A character offset.
+ */
+ void set_visible_line_offset(int char_on_line);
+
+ /** Like gtk_text_iter_set_line_index(), but the index is in visible
+ * bytes, i.e.\ text with a tag making it invisible is not counted
+ * in the index.
+ * @param byte_on_line A byte index.
+ */
+ void set_visible_line_index(int byte_on_line);
+
+
+ /** Moves forward to the next toggle (on or off) of the
+ * Gtk::TextTag @a tag , or to the next toggle of any tag if
+ * @a tag is <tt>0</tt>. If no matching tag toggles are found,
+ * returns <tt>false</tt>, otherwise <tt>true</tt>. Does not return toggles
+ * located at @a iter , only toggles after @a iter . Sets @a iter to
+ * the location of the toggle, or to the end of the buffer
+ * if no toggle is found.
+ * @param tag A Gtk::TextTag, or <tt>0</tt>.
+ * @return Whether we found a tag toggle after @a iter .
+ */
+ bool forward_to_tag_toggle(const Glib::RefPtr<TextTag>& tag);
+
+ /** Moves backward to the next toggle (on or off) of the
+ * Gtk::TextTag @a tag , or to the next toggle of any tag if
+ * @a tag is <tt>0</tt>. If no matching tag toggles are found,
+ * returns <tt>false</tt>, otherwise <tt>true</tt>. Does not return toggles
+ * located at @a iter , only toggles before @a iter . Sets @a iter
+ * to the location of the toggle, or the start of the buffer
+ * if no toggle is found.
+ * @param tag A Gtk::TextTag, or <tt>0</tt>.
+ * @return Whether we found a tag toggle before @a iter .
+ */
+ bool backward_to_tag_toggle(const Glib::RefPtr<TextTag>& tag);
+
+ template <class Predicate> bool forward_find_char(const Predicate& predicate, const TextIter& limit);
+ template <class Predicate> bool forward_find_char(const Predicate& predicate);
+ template <class Predicate> bool backward_find_char(const Predicate& predicate, const TextIter& limit);
+ template <class Predicate> bool backward_find_char(const Predicate& predicate);
+
+
+ /** Searches forward for @a str . Any match is returned by setting
+ * @a match_start to the first character of the match and @a match_end to the
+ * first character after the match. The search will not continue past
+ * @a limit . Note that a search is a linear or O(n) operation, so you
+ * may wish to use @a limit to avoid locking up your UI on large
+ * buffers.
+ *
+ * If the Gtk::TEXT_SEARCH_VISIBLE_ONLY flag is present, the match may
+ * have invisible text interspersed in @a str . i.e. @a str will be a
+ * possibly-noncontiguous subsequence of the matched range. similarly,
+ * if you specify Gtk::TEXT_SEARCH_TEXT_ONLY, the match may have
+ * pixbufs or child widgets mixed inside the matched range. If these
+ * flags are not given, the match must be exact; the special 0xFFFC
+ * character in @a str will match embedded pixbufs or child widgets.
+ * @param str A search string.
+ * @param flags Flags affecting how the search is done.
+ * @param match_start Return location for start of match.
+ * @param match_end Return location for end of match.
+ * @param limit Bound for the search.
+ * @return Whether a match was found.
+ */
+ bool forward_search(const Glib::ustring& str,
+ TextSearchFlags flags,
+ TextIter& match_start,
+ TextIter& match_end,
+ const TextIter& limit) const;
+
+ /** Same as forward_search(), but searchs to the end.
+ *
+ * @param str A search string.
+ * @param flags Flags affecting how the search is done.
+ * @param match_start Return location for start of match, or <tt>0</tt>.
+ * @param match_end Return location for end of match, or <tt>0</tt>.
+ * @return Whether a match was found.
+ */
+ bool forward_search(const Glib::ustring& str, TextSearchFlags flags, TextIter& match_start, TextIter& match_end) const;
+
+
+ /** Same as gtk_text_iter_forward_search(), but moves backward.
+ * @param str Search string.
+ * @param flags Bitmask of flags affecting the search.
+ * @param match_start Return location for start of match.
+ * @param match_end Return location for end of match.
+ * @param limit Location of last possible @a match_start .
+ * @return Whether a match was found.
+ */
+ bool backward_search(const Glib::ustring& str,
+ TextSearchFlags flags,
+ TextIter& match_start,
+ TextIter& match_end,
+ const TextIter& limit) const;
+
+ /** Same as backward_search(), but searches to the start.
+ * @param str Search string.
+ * @param flags Bitmask of flags affecting the search.
+ * @param match_start Return location for start of match, or <tt>0</tt>.
+ * @param match_end Return location for end of match, or <tt>0</tt>.
+ * @return Whether a match was found.
+ */
+ bool backward_search(const Glib::ustring& str, TextSearchFlags flags, TextIter& match_start, TextIter& match_end) const;
+
+
+ /** A qsort()-style function that returns negative if @a lhs is less than
+ * @a rhs , positive if @a lhs is greater than @a rhs , and 0 if they're equal.
+ * Ordering is in character offset order, i.e. the first character in the buffer
+ * is less than the second character in the buffer.
+ * @param rhs Another Gtk::TextIter.
+ * @return -1 if @a lhs is less than @a rhs , 1 if @a lhs is greater, 0 if they are equal.
+ */
+ int compare(const TextIter& rhs) const;
+
+ /** Checks whether @a iter falls in the range [ @a start , @a end ).
+ * @a start and @a end must be in ascending order.
+ * @param start Start of range.
+ * @param end End of range.
+ * @return <tt>true</tt> if @a iter is in the range.
+ */
+ bool in_range(const TextIter& start, const TextIter& end) const;
+
+ /** Swaps the value of @a first and @a second if @a second comes before
+ * @a first in the buffer. That is, ensures that @a first and @a second are
+ * in sequence. Most text buffer functions that take a range call this
+ * automatically on your behalf, so there's no real reason to call it yourself
+ * in those cases. There are some exceptions, such as gtk_text_iter_in_range(),
+ * that expect a pre-sorted range.
+ * @param second Another Gtk::TextIter.
+ */
+ void order(TextIter& second);
+
+
+};
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+template <class Predicate> inline
+TextIter::PredicateAdapter<Predicate>::PredicateAdapter(const Predicate& predicate)
+:
+ predicate_ (predicate)
+{}
+
+// static
+template <class Predicate>
+gboolean TextIter::PredicateAdapter<Predicate>::gtk_callback(gunichar uc, void* user_data)
+{
+ try
+ {
+ // This will either use Predicate::operator(), or call a function pointer.
+ // The explicit conditional expression avoids relying on an implicit
+ // conversion of the return type to int, which might be not available.
+ return (static_cast<TextIter::PredicateAdapter<Predicate>*>(user_data)->predicate_(uc)) ? 1 : 0;
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ return 0;
+ }
+}
+
+inline
+TextIter& TextIter::operator++()
+{
+ forward_char();
+ return *this;
+}
+
+inline
+const TextIter TextIter::operator++(int)
+{
+ const TextIter temp (*this);
+ forward_char();
+ return temp;
+}
+
+inline
+TextIter& TextIter::operator--()
+{
+ backward_char();
+ return *this;
+}
+
+inline
+const TextIter TextIter::operator--(int)
+{
+ const TextIter temp (*this);
+ backward_char();
+ return temp;
+}
+
+inline
+TextIter::value_type TextIter::operator*() const
+{
+ return get_char();
+}
+
+inline
+TextIter::operator bool() const
+{
+ return !is_end();
+}
+
+template <class Predicate>
+bool TextIter::forward_find_char(const Predicate& predicate, const TextIter& limit)
+{
+ typedef TextIter::PredicateAdapter<Predicate> PredAdapter;
+ PredAdapter adapter (predicate);
+ return this->forward_find_char_impl(&PredAdapter::gtk_callback, &adapter, limit.gobj());
+}
+
+template <class Predicate>
+bool TextIter::forward_find_char(const Predicate& predicate)
+{
+ typedef TextIter::PredicateAdapter<Predicate> PredAdapter;
+ PredAdapter adapter (predicate);
+ return this->forward_find_char_impl(&PredAdapter::gtk_callback, &adapter, 0);
+}
+
+template <class Predicate>
+bool TextIter::backward_find_char(const Predicate& predicate, const TextIter& limit)
+{
+ typedef TextIter::PredicateAdapter<Predicate> PredAdapter;
+ PredAdapter adapter (predicate);
+ return this->backward_find_char_impl(&PredAdapter::gtk_callback, &adapter, limit.gobj());
+}
+
+template <class Predicate>
+bool TextIter::backward_find_char(const Predicate& predicate)
+{
+ typedef TextIter::PredicateAdapter<Predicate> PredAdapter;
+ PredAdapter adapter (predicate);
+ return this->backward_find_char_impl(&PredAdapter::gtk_callback, &adapter, 0);
+}
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+} // namespace Gtk
+
+
+namespace Gtk
+{
+
+/** @relates Gtk::TextIter
+ * @param lhs The left-hand side
+ * @param rhs The right-hand side
+ * @result The result
+ */
+bool operator==(const TextIter& lhs, const TextIter& rhs);
+
+/** @relates Gtk::TextIter
+ * @param lhs The left-hand side
+ * @param rhs The right-hand side
+ * @result The result
+ */
+bool operator!=(const TextIter& lhs, const TextIter& rhs);
+
+/** @relates Gtk::TextIter
+ * @param lhs The left-hand side
+ * @param rhs The right-hand side
+ * @result The result
+ */
+bool operator<(const TextIter& lhs, const TextIter& rhs);
+
+/** @relates Gtk::TextIter
+ * @param lhs The left-hand side
+ * @param rhs The right-hand side
+ * @result The result
+ */
+bool operator>(const TextIter& lhs, const TextIter& rhs);
+
+/** @relates Gtk::TextIter
+ * @param lhs The left-hand side
+ * @param rhs The right-hand side
+ * @result The result
+ */
+bool operator<=(const TextIter& lhs, const TextIter& rhs);
+
+/** @relates Gtk::TextIter
+ * @param lhs The left-hand side
+ * @param rhs The right-hand side
+ * @result The result
+ */
+bool operator>=(const TextIter& lhs, const TextIter& rhs);
+
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+
+/** @relates Gtk::TextIter
+ * @param object The C instance
+ * @result A C++ instance that wraps this C instance.
+ */
+Gtk::TextIter& wrap(GtkTextIter* object);
+
+/** @relates Gtk::TextIter
+ * @param object The C instance
+ * @result A C++ instance that wraps this C instance.
+ */
+const Gtk::TextIter& wrap(const GtkTextIter* object);
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+template <>
+class Value<Gtk::TextIter> : public Glib::Value_Boxed<Gtk::TextIter>
+{};
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+} // namespace Glib
+
+#endif /* _GTKMM_TEXTITER_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/textmark.cc b/libs/gtkmm2/gtk/gtkmm/textmark.cc
new file mode 100644
index 0000000000..2252f8715d
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/textmark.cc
@@ -0,0 +1,187 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/textmark.h>
+#include <gtkmm/private/textmark_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#include <gtkmm/textmark.h>
+#include <gtkmm/textbuffer.h>
+#include <gtk/gtktextmark.h>
+
+
+namespace Gtk
+{
+
+TextIter TextMark::get_iter()
+{
+ Glib::RefPtr<TextMark> mark = Glib::RefPtr<TextMark>(this);
+ mark->reference(); // RefPtr (T_CppObject* pCppObject) does not do a reference
+ return get_buffer()->get_iter_at_mark(mark);
+}
+
+} //namespace Gtk
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Gtk::TextMark> wrap(GtkTextMark* object, bool take_copy)
+{
+ return Glib::RefPtr<Gtk::TextMark>( dynamic_cast<Gtk::TextMark*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} /* namespace Glib */
+
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& TextMark_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &TextMark_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_text_mark_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void TextMark_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* TextMark_Class::wrap_new(GObject* object)
+{
+ return new TextMark((GtkTextMark*)object);
+}
+
+
+/* The implementation: */
+
+GtkTextMark* TextMark::gobj_copy()
+{
+ reference();
+ return gobj();
+}
+
+TextMark::TextMark(const Glib::ConstructParams& construct_params)
+:
+ Glib::Object(construct_params)
+{}
+
+TextMark::TextMark(GtkTextMark* castitem)
+:
+ Glib::Object((GObject*)(castitem))
+{}
+
+TextMark::~TextMark()
+{}
+
+
+TextMark::CppClassType TextMark::textmark_class_; // initialize static member
+
+GType TextMark::get_type()
+{
+ return textmark_class_.init().get_type();
+}
+
+GType TextMark::get_base_type()
+{
+ return gtk_text_mark_get_type();
+}
+
+
+void TextMark::set_visible(bool setting)
+{
+ gtk_text_mark_set_visible(gobj(), static_cast<int>(setting));
+}
+
+bool TextMark::get_visible() const
+{
+ return gtk_text_mark_get_visible(const_cast<GtkTextMark*>(gobj()));
+}
+
+Glib::ustring TextMark::get_name() const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(gtk_text_mark_get_name(const_cast<GtkTextMark*>(gobj())));
+}
+
+bool TextMark::get_deleted() const
+{
+ return gtk_text_mark_get_deleted(const_cast<GtkTextMark*>(gobj()));
+}
+
+Glib::RefPtr<TextBuffer> TextMark::get_buffer()
+{
+
+ Glib::RefPtr<TextBuffer> retvalue = Glib::wrap(gtk_text_mark_get_buffer(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const TextBuffer> TextMark::get_buffer() const
+{
+
+ Glib::RefPtr<const TextBuffer> retvalue = Glib::wrap(gtk_text_mark_get_buffer(const_cast<GtkTextMark*>(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+bool TextMark::get_left_gravity() const
+{
+ return gtk_text_mark_get_left_gravity(const_cast<GtkTextMark*>(gobj()));
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/textmark.h b/libs/gtkmm2/gtk/gtkmm/textmark.h
new file mode 100644
index 0000000000..559d6ed71d
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/textmark.h
@@ -0,0 +1,197 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TEXTMARK_H
+#define _GTKMM_TEXTMARK_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* textmark.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#include <gtkmm/object.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkTextMark GtkTextMark;
+typedef struct _GtkTextMarkClass GtkTextMarkClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class TextMark_Class; } // namespace Gtk
+namespace Gtk
+{
+
+class TextBuffer;
+class TextIter;
+
+/** Typedefed as Gtk::TextBuffer::Mark. A position in the buffer, preserved across buffer modifications.
+ *
+ * A Mark is like a bookmark in a text buffer; it preserves a position in the text. Unlike iterators, marks remain valid across buffer mutations, because
+ * their behavior is defined when text is inserted or deleted. When text containing a mark is deleted, the mark remains in
+ * the position originally occupied by the deleted text. When text is inserted at a mark, a mark with left gravity will be
+ * moved to the beginning of the newly-inserted text, and a mark with right gravity will be moved to the end.
+ * The standard text cursor in left-to-right languages is a mark with right gravity, because it stays to the right of inserted
+ * text.
+ *
+ * Like tags, marks can be either named or anonymous. There are two marks built-in to Gtk::TextBuffer; these are named "insert" and
+ * "selection_bound" and refer to the insertion point and the boundary of the selection which is not the insertion point,
+ * respectively. If no text is selected, these two marks will be in the same position. You can manipulate what is selected and
+ * where the cursor appears by moving these marks around.
+ *
+ * "left" and "right" here refer to logical direction (left is the toward the start of the buffer); in some languages such as
+ * Hebrew the logically-leftmost text is not actually on the left when displayed.
+ *
+ * You can convert the mark to an @link Gtk::TextIter iterator@endlink using Gtk::TextBuffer::get_iter_at_mark().
+ *
+ * Marks can be deleted from the buffer at any time with Gtk::TextBuffer::delete_mark(). Once deleted from the buffer, a mark is essentially useless.
+ *
+ * Marks optionally have names; these can be convenient to avoid passing the Gtk::TextBuffer::Mark object around.
+ *
+ * Marks are typically created using the Gtk::TextBuffer::create_mark() function.
+ *
+ * @ingroup TextView
+ */
+
+class TextMark : public Glib::Object
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef TextMark CppObjectType;
+ typedef TextMark_Class CppClassType;
+ typedef GtkTextMark BaseObjectType;
+ typedef GtkTextMarkClass BaseClassType;
+
+private: friend class TextMark_Class;
+ static CppClassType textmark_class_;
+
+private:
+ // noncopyable
+ TextMark(const TextMark&);
+ TextMark& operator=(const TextMark&);
+
+protected:
+ explicit TextMark(const Glib::ConstructParams& construct_params);
+ explicit TextMark(GtkTextMark* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~TextMark();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ GtkTextMark* gobj() { return reinterpret_cast<GtkTextMark*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const GtkTextMark* gobj() const { return reinterpret_cast<GtkTextMark*>(gobject_); }
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ GtkTextMark* gobj_copy();
+
+private:
+
+protected:
+
+public:
+
+ /** Sets the visibility of @a mark ; the insertion point is normally
+ * visible, i.e.\ you can see it as a vertical bar. Also, the text
+ * widget uses a visible mark to indicate where a drop will occur when
+ * dragging-and-dropping text. Most other marks are not visible.
+ * Marks are not visible by default.
+ * @param setting Visibility of mark.
+ */
+ void set_visible(bool setting = true);
+
+ /** Returns <tt>true</tt> if the mark is visible (i.e.\ a cursor is displayed
+ * for it)
+ * @return <tt>true</tt> if visible.
+ */
+ bool get_visible() const;
+
+ /** Returns the mark name; returns <tt>0</tt> for anonymous marks.
+ * @return Mark name.
+ */
+ Glib::ustring get_name() const;
+
+ /** Returns <tt>true</tt> if the mark has been removed from its buffer
+ * with Gtk::TextBuffer::delete_mark(). Marks can't be used
+ * once deleted.
+ * @return Whether the mark is deleted.
+ */
+ bool get_deleted() const;
+
+ /** Gets the buffer this mark is located inside,
+ * or <tt>0</tt> if the mark is deleted.
+ * @return The mark's Gtk::TextBuffer.
+ */
+ Glib::RefPtr<TextBuffer> get_buffer();
+
+ /** Gets the buffer this mark is located inside,
+ * or <tt>0</tt> if the mark is deleted.
+ * @return The mark's Gtk::TextBuffer.
+ */
+ Glib::RefPtr<const TextBuffer> get_buffer() const;
+
+ /** Determines whether the mark has left gravity.
+ * @return <tt>true</tt> if the mark has left gravity, <tt>false</tt> otherwise.
+ */
+ bool get_left_gravity() const;
+ TextIter get_iter();
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+};
+
+} /* namespace Gtk */
+
+
+namespace Glib
+{
+ /** @relates Gtk::TextMark
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Gtk::TextMark> wrap(GtkTextMark* object, bool take_copy = false);
+}
+
+
+#endif /* _GTKMM_TEXTMARK_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/texttag.cc b/libs/gtkmm2/gtk/gtkmm/texttag.cc
new file mode 100644
index 0000000000..f1867ef7b4
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/texttag.cc
@@ -0,0 +1,889 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/texttag.h>
+#include <gtkmm/private/texttag_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/textbuffer.h>
+#include <gtkmm/textiter.h>
+#include <gtk/gtktexttag.h>
+
+namespace
+{
+
+gboolean TextTag_signal_event_callback(GtkTextTag* self, GObject* p0,GdkEvent* p1,const GtkTextIter* p2,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< bool,const Glib::RefPtr<Glib::Object>&,GdkEvent*,const TextIter& > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ return static_cast<int>((*static_cast<SlotType*>(slot))(Glib::wrap(p0, true)
+, p1, Glib::wrap(p2)
+));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean TextTag_signal_event_notify_callback(GtkTextTag* self, GObject* p0,GdkEvent* p1,const GtkTextIter* p2, void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,const Glib::RefPtr<Glib::Object>&,GdkEvent*,const TextIter& > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::wrap(p0, true)
+, p1, Glib::wrap(p2)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+const Glib::SignalProxyInfo TextTag_signal_event_info =
+{
+ "event",
+ (GCallback) &TextTag_signal_event_callback,
+ (GCallback) &TextTag_signal_event_notify_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Gtk::TextTag> wrap(GtkTextTag* object, bool take_copy)
+{
+ return Glib::RefPtr<Gtk::TextTag>( dynamic_cast<Gtk::TextTag*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} /* namespace Glib */
+
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& TextTag_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &TextTag_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_text_tag_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void TextTag_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->event = &event_callback;
+}
+
+
+gboolean TextTag_Class::event_callback(GtkTextTag* self, GObject* p0, GdkEvent* p1, const GtkTextIter* p2)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->on_event(Glib::wrap(p0, true)
+, p1, Glib::wrap(p2)
+));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->event)
+ return (*base->event)(self, p0, p1, p2);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+
+Glib::ObjectBase* TextTag_Class::wrap_new(GObject* object)
+{
+ return new TextTag((GtkTextTag*)object);
+}
+
+
+/* The implementation: */
+
+GtkTextTag* TextTag::gobj_copy()
+{
+ reference();
+ return gobj();
+}
+
+TextTag::TextTag(const Glib::ConstructParams& construct_params)
+:
+ Glib::Object(construct_params)
+{}
+
+TextTag::TextTag(GtkTextTag* castitem)
+:
+ Glib::Object((GObject*)(castitem))
+{}
+
+TextTag::~TextTag()
+{}
+
+
+TextTag::CppClassType TextTag::texttag_class_; // initialize static member
+
+GType TextTag::get_type()
+{
+ return texttag_class_.init().get_type();
+}
+
+GType TextTag::get_base_type()
+{
+ return gtk_text_tag_get_type();
+}
+
+
+TextTag::TextTag()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Glib::Object(Glib::ConstructParams(texttag_class_.init()))
+{
+ }
+
+TextTag::TextTag(const Glib::ustring& name)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Glib::Object(Glib::ConstructParams(texttag_class_.init(), "name", name.c_str(), (char*) 0))
+{
+ }
+
+Glib::RefPtr<TextTag> TextTag::create()
+{
+ return Glib::RefPtr<TextTag>( new TextTag() );
+}
+Glib::RefPtr<TextTag> TextTag::create(const Glib::ustring& name)
+{
+ return Glib::RefPtr<TextTag>( new TextTag(name) );
+}
+int TextTag::get_priority() const
+{
+ return gtk_text_tag_get_priority(const_cast<GtkTextTag*>(gobj()));
+}
+
+void TextTag::set_priority(int priority)
+{
+ gtk_text_tag_set_priority(gobj(), priority);
+}
+
+bool TextTag::event(const Glib::RefPtr<Glib::Object>& event_object, GdkEvent* event, const TextIter& iter)
+{
+ return gtk_text_tag_event(gobj(), Glib::unwrap(event_object), event, (iter).gobj());
+}
+
+
+Glib::SignalProxy3< bool,const Glib::RefPtr<Glib::Object>&,GdkEvent*,const TextIter& > TextTag::signal_event()
+{
+ return Glib::SignalProxy3< bool,const Glib::RefPtr<Glib::Object>&,GdkEvent*,const TextIter& >(this, &TextTag_signal_event_info);
+}
+
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> TextTag::property_name() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "name");
+}
+
+Glib::PropertyProxy_WriteOnly<Glib::ustring> TextTag::property_background()
+{
+ return Glib::PropertyProxy_WriteOnly<Glib::ustring>(this, "background");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> TextTag::property_background() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "background");
+}
+
+Glib::PropertyProxy_WriteOnly<Glib::ustring> TextTag::property_foreground()
+{
+ return Glib::PropertyProxy_WriteOnly<Glib::ustring>(this, "foreground");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> TextTag::property_foreground() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "foreground");
+}
+
+Glib::PropertyProxy<Gdk::Color> TextTag::property_background_gdk()
+{
+ return Glib::PropertyProxy<Gdk::Color>(this, "background-gdk");
+}
+
+Glib::PropertyProxy_ReadOnly<Gdk::Color> TextTag::property_background_gdk() const
+{
+ return Glib::PropertyProxy_ReadOnly<Gdk::Color>(this, "background-gdk");
+}
+
+Glib::PropertyProxy<Gdk::Color> TextTag::property_foreground_gdk()
+{
+ return Glib::PropertyProxy<Gdk::Color>(this, "foreground-gdk");
+}
+
+Glib::PropertyProxy_ReadOnly<Gdk::Color> TextTag::property_foreground_gdk() const
+{
+ return Glib::PropertyProxy_ReadOnly<Gdk::Color>(this, "foreground-gdk");
+}
+
+Glib::PropertyProxy< Glib::RefPtr<Gdk::Bitmap> > TextTag::property_background_stipple()
+{
+ return Glib::PropertyProxy< Glib::RefPtr<Gdk::Bitmap> >(this, "background-stipple");
+}
+
+Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Bitmap> > TextTag::property_background_stipple() const
+{
+ return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Bitmap> >(this, "background-stipple");
+}
+
+Glib::PropertyProxy< Glib::RefPtr<Gdk::Bitmap> > TextTag::property_foreground_stipple()
+{
+ return Glib::PropertyProxy< Glib::RefPtr<Gdk::Bitmap> >(this, "foreground-stipple");
+}
+
+Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Bitmap> > TextTag::property_foreground_stipple() const
+{
+ return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Bitmap> >(this, "foreground-stipple");
+}
+
+Glib::PropertyProxy<Glib::ustring> TextTag::property_font()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "font");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> TextTag::property_font() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "font");
+}
+
+Glib::PropertyProxy<Pango::FontDescription> TextTag::property_font_desc()
+{
+ return Glib::PropertyProxy<Pango::FontDescription>(this, "font-desc");
+}
+
+Glib::PropertyProxy_ReadOnly<Pango::FontDescription> TextTag::property_font_desc() const
+{
+ return Glib::PropertyProxy_ReadOnly<Pango::FontDescription>(this, "font-desc");
+}
+
+Glib::PropertyProxy<Glib::ustring> TextTag::property_family()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "family");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> TextTag::property_family() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "family");
+}
+
+Glib::PropertyProxy<Pango::Style> TextTag::property_style()
+{
+ return Glib::PropertyProxy<Pango::Style>(this, "style");
+}
+
+Glib::PropertyProxy_ReadOnly<Pango::Style> TextTag::property_style() const
+{
+ return Glib::PropertyProxy_ReadOnly<Pango::Style>(this, "style");
+}
+
+Glib::PropertyProxy<Pango::Variant> TextTag::property_variant()
+{
+ return Glib::PropertyProxy<Pango::Variant>(this, "variant");
+}
+
+Glib::PropertyProxy_ReadOnly<Pango::Variant> TextTag::property_variant() const
+{
+ return Glib::PropertyProxy_ReadOnly<Pango::Variant>(this, "variant");
+}
+
+Glib::PropertyProxy<int> TextTag::property_weight()
+{
+ return Glib::PropertyProxy<int>(this, "weight");
+}
+
+Glib::PropertyProxy_ReadOnly<int> TextTag::property_weight() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "weight");
+}
+
+Glib::PropertyProxy<Pango::Stretch> TextTag::property_stretch()
+{
+ return Glib::PropertyProxy<Pango::Stretch>(this, "stretch");
+}
+
+Glib::PropertyProxy_ReadOnly<Pango::Stretch> TextTag::property_stretch() const
+{
+ return Glib::PropertyProxy_ReadOnly<Pango::Stretch>(this, "stretch");
+}
+
+Glib::PropertyProxy<int> TextTag::property_size()
+{
+ return Glib::PropertyProxy<int>(this, "size");
+}
+
+Glib::PropertyProxy_ReadOnly<int> TextTag::property_size() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "size");
+}
+
+Glib::PropertyProxy<double> TextTag::property_size_points()
+{
+ return Glib::PropertyProxy<double>(this, "size-points");
+}
+
+Glib::PropertyProxy_ReadOnly<double> TextTag::property_size_points() const
+{
+ return Glib::PropertyProxy_ReadOnly<double>(this, "size-points");
+}
+
+Glib::PropertyProxy<double> TextTag::property_scale()
+{
+ return Glib::PropertyProxy<double>(this, "scale");
+}
+
+Glib::PropertyProxy_ReadOnly<double> TextTag::property_scale() const
+{
+ return Glib::PropertyProxy_ReadOnly<double>(this, "scale");
+}
+
+Glib::PropertyProxy<int> TextTag::property_pixels_above_lines()
+{
+ return Glib::PropertyProxy<int>(this, "pixels-above-lines");
+}
+
+Glib::PropertyProxy_ReadOnly<int> TextTag::property_pixels_above_lines() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "pixels-above-lines");
+}
+
+Glib::PropertyProxy<int> TextTag::property_pixels_below_lines()
+{
+ return Glib::PropertyProxy<int>(this, "pixels-below-lines");
+}
+
+Glib::PropertyProxy_ReadOnly<int> TextTag::property_pixels_below_lines() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "pixels-below-lines");
+}
+
+Glib::PropertyProxy<int> TextTag::property_pixels_inside_wrap()
+{
+ return Glib::PropertyProxy<int>(this, "pixels-inside-wrap");
+}
+
+Glib::PropertyProxy_ReadOnly<int> TextTag::property_pixels_inside_wrap() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "pixels-inside-wrap");
+}
+
+Glib::PropertyProxy<bool> TextTag::property_editable()
+{
+ return Glib::PropertyProxy<bool>(this, "editable");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> TextTag::property_editable() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "editable");
+}
+
+Glib::PropertyProxy<WrapMode> TextTag::property_wrap_mode()
+{
+ return Glib::PropertyProxy<WrapMode>(this, "wrap-mode");
+}
+
+Glib::PropertyProxy_ReadOnly<WrapMode> TextTag::property_wrap_mode() const
+{
+ return Glib::PropertyProxy_ReadOnly<WrapMode>(this, "wrap-mode");
+}
+
+Glib::PropertyProxy<Justification> TextTag::property_justification()
+{
+ return Glib::PropertyProxy<Justification>(this, "justification");
+}
+
+Glib::PropertyProxy_ReadOnly<Justification> TextTag::property_justification() const
+{
+ return Glib::PropertyProxy_ReadOnly<Justification>(this, "justification");
+}
+
+Glib::PropertyProxy<TextDirection> TextTag::property_direction()
+{
+ return Glib::PropertyProxy<TextDirection>(this, "direction");
+}
+
+Glib::PropertyProxy_ReadOnly<TextDirection> TextTag::property_direction() const
+{
+ return Glib::PropertyProxy_ReadOnly<TextDirection>(this, "direction");
+}
+
+Glib::PropertyProxy<int> TextTag::property_left_margin()
+{
+ return Glib::PropertyProxy<int>(this, "left-margin");
+}
+
+Glib::PropertyProxy_ReadOnly<int> TextTag::property_left_margin() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "left-margin");
+}
+
+Glib::PropertyProxy<int> TextTag::property_indent()
+{
+ return Glib::PropertyProxy<int>(this, "indent");
+}
+
+Glib::PropertyProxy_ReadOnly<int> TextTag::property_indent() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "indent");
+}
+
+Glib::PropertyProxy<bool> TextTag::property_strikethrough()
+{
+ return Glib::PropertyProxy<bool>(this, "strikethrough");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> TextTag::property_strikethrough() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "strikethrough");
+}
+
+Glib::PropertyProxy<int> TextTag::property_right_margin()
+{
+ return Glib::PropertyProxy<int>(this, "right-margin");
+}
+
+Glib::PropertyProxy_ReadOnly<int> TextTag::property_right_margin() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "right-margin");
+}
+
+Glib::PropertyProxy<Pango::Underline> TextTag::property_underline()
+{
+ return Glib::PropertyProxy<Pango::Underline>(this, "underline");
+}
+
+Glib::PropertyProxy_ReadOnly<Pango::Underline> TextTag::property_underline() const
+{
+ return Glib::PropertyProxy_ReadOnly<Pango::Underline>(this, "underline");
+}
+
+Glib::PropertyProxy<int> TextTag::property_rise()
+{
+ return Glib::PropertyProxy<int>(this, "rise");
+}
+
+Glib::PropertyProxy_ReadOnly<int> TextTag::property_rise() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "rise");
+}
+
+Glib::PropertyProxy<bool> TextTag::property_background_full_height()
+{
+ return Glib::PropertyProxy<bool>(this, "background-full-height");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> TextTag::property_background_full_height() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "background-full-height");
+}
+
+Glib::PropertyProxy<Glib::ustring> TextTag::property_language()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "language");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> TextTag::property_language() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "language");
+}
+
+Glib::PropertyProxy<Pango::TabArray> TextTag::property_tabs()
+{
+ return Glib::PropertyProxy<Pango::TabArray>(this, "tabs");
+}
+
+Glib::PropertyProxy_ReadOnly<Pango::TabArray> TextTag::property_tabs() const
+{
+ return Glib::PropertyProxy_ReadOnly<Pango::TabArray>(this, "tabs");
+}
+
+Glib::PropertyProxy<bool> TextTag::property_invisible()
+{
+ return Glib::PropertyProxy<bool>(this, "invisible");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> TextTag::property_invisible() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "invisible");
+}
+
+Glib::PropertyProxy<bool> TextTag::property_background_set()
+{
+ return Glib::PropertyProxy<bool>(this, "background-set");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> TextTag::property_background_set() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "background-set");
+}
+
+Glib::PropertyProxy<bool> TextTag::property_foreground_set()
+{
+ return Glib::PropertyProxy<bool>(this, "foreground-set");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> TextTag::property_foreground_set() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "foreground-set");
+}
+
+Glib::PropertyProxy<bool> TextTag::property_background_stipple_set()
+{
+ return Glib::PropertyProxy<bool>(this, "background-stipple-set");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> TextTag::property_background_stipple_set() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "background-stipple-set");
+}
+
+Glib::PropertyProxy<bool> TextTag::property_foreground_stipple_set()
+{
+ return Glib::PropertyProxy<bool>(this, "foreground-stipple-set");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> TextTag::property_foreground_stipple_set() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "foreground-stipple-set");
+}
+
+Glib::PropertyProxy<bool> TextTag::property_family_set()
+{
+ return Glib::PropertyProxy<bool>(this, "family-set");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> TextTag::property_family_set() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "family-set");
+}
+
+Glib::PropertyProxy<bool> TextTag::property_style_set()
+{
+ return Glib::PropertyProxy<bool>(this, "style-set");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> TextTag::property_style_set() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "style-set");
+}
+
+Glib::PropertyProxy<bool> TextTag::property_variant_set()
+{
+ return Glib::PropertyProxy<bool>(this, "variant-set");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> TextTag::property_variant_set() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "variant-set");
+}
+
+Glib::PropertyProxy<bool> TextTag::property_weight_set()
+{
+ return Glib::PropertyProxy<bool>(this, "weight-set");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> TextTag::property_weight_set() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "weight-set");
+}
+
+Glib::PropertyProxy<bool> TextTag::property_stretch_set()
+{
+ return Glib::PropertyProxy<bool>(this, "stretch-set");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> TextTag::property_stretch_set() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "stretch-set");
+}
+
+Glib::PropertyProxy<bool> TextTag::property_size_set()
+{
+ return Glib::PropertyProxy<bool>(this, "size-set");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> TextTag::property_size_set() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "size-set");
+}
+
+Glib::PropertyProxy<bool> TextTag::property_scale_set()
+{
+ return Glib::PropertyProxy<bool>(this, "scale-set");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> TextTag::property_scale_set() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "scale-set");
+}
+
+Glib::PropertyProxy<bool> TextTag::property_pixels_above_lines_set()
+{
+ return Glib::PropertyProxy<bool>(this, "pixels-above-lines-set");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> TextTag::property_pixels_above_lines_set() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "pixels-above-lines-set");
+}
+
+Glib::PropertyProxy<bool> TextTag::property_pixels_below_lines_set()
+{
+ return Glib::PropertyProxy<bool>(this, "pixels-below-lines-set");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> TextTag::property_pixels_below_lines_set() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "pixels-below-lines-set");
+}
+
+Glib::PropertyProxy<bool> TextTag::property_pixels_inside_wrap_set()
+{
+ return Glib::PropertyProxy<bool>(this, "pixels-inside-wrap-set");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> TextTag::property_pixels_inside_wrap_set() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "pixels-inside-wrap-set");
+}
+
+Glib::PropertyProxy<bool> TextTag::property_editable_set()
+{
+ return Glib::PropertyProxy<bool>(this, "editable-set");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> TextTag::property_editable_set() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "editable-set");
+}
+
+Glib::PropertyProxy<bool> TextTag::property_wrap_mode_set()
+{
+ return Glib::PropertyProxy<bool>(this, "wrap-mode-set");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> TextTag::property_wrap_mode_set() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "wrap-mode-set");
+}
+
+Glib::PropertyProxy<bool> TextTag::property_justification_set()
+{
+ return Glib::PropertyProxy<bool>(this, "justification-set");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> TextTag::property_justification_set() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "justification-set");
+}
+
+Glib::PropertyProxy<bool> TextTag::property_left_margin_set()
+{
+ return Glib::PropertyProxy<bool>(this, "left-margin-set");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> TextTag::property_left_margin_set() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "left-margin-set");
+}
+
+Glib::PropertyProxy<bool> TextTag::property_indent_set()
+{
+ return Glib::PropertyProxy<bool>(this, "indent-set");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> TextTag::property_indent_set() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "indent-set");
+}
+
+Glib::PropertyProxy<bool> TextTag::property_strikethrough_set()
+{
+ return Glib::PropertyProxy<bool>(this, "strikethrough-set");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> TextTag::property_strikethrough_set() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "strikethrough-set");
+}
+
+Glib::PropertyProxy<bool> TextTag::property_right_margin_set()
+{
+ return Glib::PropertyProxy<bool>(this, "right-margin-set");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> TextTag::property_right_margin_set() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "right-margin-set");
+}
+
+Glib::PropertyProxy<bool> TextTag::property_underline_set()
+{
+ return Glib::PropertyProxy<bool>(this, "underline-set");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> TextTag::property_underline_set() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "underline-set");
+}
+
+Glib::PropertyProxy<bool> TextTag::property_rise_set()
+{
+ return Glib::PropertyProxy<bool>(this, "rise-set");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> TextTag::property_rise_set() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "rise-set");
+}
+
+Glib::PropertyProxy<bool> TextTag::property_background_full_height_set()
+{
+ return Glib::PropertyProxy<bool>(this, "background-full-height-set");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> TextTag::property_background_full_height_set() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "background-full-height-set");
+}
+
+Glib::PropertyProxy<bool> TextTag::property_language_set()
+{
+ return Glib::PropertyProxy<bool>(this, "language-set");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> TextTag::property_language_set() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "language-set");
+}
+
+Glib::PropertyProxy<bool> TextTag::property_tabs_set()
+{
+ return Glib::PropertyProxy<bool>(this, "tabs-set");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> TextTag::property_tabs_set() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "tabs-set");
+}
+
+Glib::PropertyProxy<bool> TextTag::property_invisible_set()
+{
+ return Glib::PropertyProxy<bool>(this, "invisible-set");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> TextTag::property_invisible_set() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "invisible-set");
+}
+
+
+bool Gtk::TextTag::on_event(const Glib::RefPtr<Glib::Object>& event_object, GdkEvent* event, const TextIter& iter)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->event)
+ return (*base->event)(gobj(),Glib::unwrap(event_object),event,(iter).gobj());
+
+ typedef bool RType;
+ return RType();
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/texttag.h b/libs/gtkmm2/gtk/gtkmm/texttag.h
new file mode 100644
index 0000000000..c5162c0914
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/texttag.h
@@ -0,0 +1,1158 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TEXTTAG_H
+#define _GTKMM_TEXTTAG_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* texttag.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#include <gtkmm/object.h>
+#include <gtkmm/enums.h>
+#include <gdkmm/bitmap.h>
+#include <gdkmm/color.h>
+#include <pangomm/fontdescription.h>
+#include <pangomm/tabarray.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkTextTag GtkTextTag;
+typedef struct _GtkTextTagClass GtkTextTagClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class TextTag_Class; } // namespace Gtk
+namespace Gtk
+{
+
+class TextIter;
+
+/** Typedefed as Gtk::TextBuffer::Tag.
+ *
+ * Text in a buffer can be marked with tags. A tag is an attribute that can be applied to some range of text. For example, a tag
+ * might be called "bold" and might make the text inside the tag bold. However, the tag concept is more general than that; tags don't
+ * have to affect appearance. They can instead affect the behavior of mouse and key presses, "lock" a range of text so the user
+ * can't edit it, or countless other things.
+ * One tag can be applied to any number of text ranges in any number of @link Gtk::TextBuffer Gtk::TextBuffers@endlink.
+ *
+ * Each tag is stored in a @link Gtk::TextTagTable Gtk::TextBuffer::TagTable@endlink, and Tags should be in the
+ * @link Gtk::TextTagTable Gtk::TextBuffer::TagTable@endlink for a given Gtk::TextBuffer before using
+ * them with that buffer.
+ *
+ * Tags can have names, which is convenient sometimes (for example, you can name your tag that makes things bold "bold"), but
+ * they can also be anonymous (which is convenient if you're creating tags on-the-fly).
+ *
+ * Gtk::TextBuffer::create_tag() is the best way to create tags. See the demo for numerous examples.
+ *
+ * @ingroup TextView
+ */
+
+class TextTag : public Glib::Object
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef TextTag CppObjectType;
+ typedef TextTag_Class CppClassType;
+ typedef GtkTextTag BaseObjectType;
+ typedef GtkTextTagClass BaseClassType;
+
+private: friend class TextTag_Class;
+ static CppClassType texttag_class_;
+
+private:
+ // noncopyable
+ TextTag(const TextTag&);
+ TextTag& operator=(const TextTag&);
+
+protected:
+ explicit TextTag(const Glib::ConstructParams& construct_params);
+ explicit TextTag(GtkTextTag* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~TextTag();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ GtkTextTag* gobj() { return reinterpret_cast<GtkTextTag*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const GtkTextTag* gobj() const { return reinterpret_cast<GtkTextTag*>(gobject_); }
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ GtkTextTag* gobj_copy();
+
+private:
+
+protected:
+ TextTag();
+ explicit TextTag(const Glib::ustring& name);
+
+public:
+
+ static Glib::RefPtr<TextTag> create();
+
+
+ static Glib::RefPtr<TextTag> create(const Glib::ustring& name);
+
+
+ /** Get the tag priority.
+ * @return The tag's priority.
+ */
+ int get_priority() const;
+
+ /** Sets the priority of a Gtk::TextTag. Valid priorities are
+ * start at 0 and go to one less than Gtk::TextTagTable::get_size().
+ * Each tag in a table has a unique priority; setting the priority
+ * of one tag shifts the priorities of all the other tags in the
+ * table to maintain a unique priority for each tag. Higher priority
+ * tags "win" if two tags both set the same text attribute. When adding
+ * a tag to a tag table, it will be assigned the highest priority in
+ * the table by default; so normally the precedence of a set of tags
+ * is the order in which they were added to the table, or created with
+ * Gtk::TextBuffer::create_tag(), which adds the tag to the buffer's table
+ * automatically.
+ * @param priority The new priority.
+ */
+ void set_priority(int priority);
+
+ /** Emits the "event" signal on the Gtk::TextTag.
+ * @param event_object Object that received the event, such as a widget.
+ * @param event The event.
+ * @param iter Location where the event was received.
+ * @return Result of signal emission (whether the event was handled).
+ */
+ bool event(const Glib::RefPtr<Glib::Object>& event_object, GdkEvent* event, const TextIter& iter);
+
+
+ Glib::SignalProxy3< bool,const Glib::RefPtr<Glib::Object>&,GdkEvent*,const TextIter& > signal_event();
+
+
+ /** Name used to refer to the text tag. NULL for anonymous tags.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_name() const;
+
+ //construct-only.
+ /** Background color as a string.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_WriteOnly<Glib::ustring> property_background() ;
+
+/** Background color as a string.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_background() const;
+
+ /** Foreground color as a string.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_WriteOnly<Glib::ustring> property_foreground() ;
+
+/** Foreground color as a string.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_foreground() const;
+
+ /** Background color as a (possibly unallocated) GdkColor.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Gdk::Color> property_background_gdk() ;
+
+/** Background color as a (possibly unallocated) GdkColor.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Gdk::Color> property_background_gdk() const;
+
+ /** Foreground color as a (possibly unallocated) GdkColor.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Gdk::Color> property_foreground_gdk() ;
+
+/** Foreground color as a (possibly unallocated) GdkColor.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Gdk::Color> property_foreground_gdk() const;
+
+ /** Bitmap to use as a mask when drawing the text background.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy< Glib::RefPtr<Gdk::Bitmap> > property_background_stipple() ;
+
+/** Bitmap to use as a mask when drawing the text background.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Bitmap> > property_background_stipple() const;
+
+ /** Bitmap to use as a mask when drawing the text foreground.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy< Glib::RefPtr<Gdk::Bitmap> > property_foreground_stipple() ;
+
+/** Bitmap to use as a mask when drawing the text foreground.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Bitmap> > property_foreground_stipple() const;
+
+ /** Font description as a string
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_font() ;
+
+/** Font description as a string
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_font() const;
+
+ /** Font description as a PangoFontDescription struct.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Pango::FontDescription> property_font_desc() ;
+
+/** Font description as a PangoFontDescription struct.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Pango::FontDescription> property_font_desc() const;
+
+ /** Name of the font family
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_family() ;
+
+/** Name of the font family
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_family() const;
+
+ /** Font style as a PangoStyle
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Pango::Style> property_style() ;
+
+/** Font style as a PangoStyle
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Pango::Style> property_style() const;
+
+ /** Font variant as a PangoVariant
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Pango::Variant> property_variant() ;
+
+/** Font variant as a PangoVariant
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Pango::Variant> property_variant() const;
+
+ /** Font weight as an integer
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_weight() ;
+
+/** Font weight as an integer
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_weight() const;
+
+ /** Font stretch as a PangoStretch
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Pango::Stretch> property_stretch() ;
+
+/** Font stretch as a PangoStretch
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Pango::Stretch> property_stretch() const;
+
+ /** Font size in Pango units.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_size() ;
+
+/** Font size in Pango units.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_size() const;
+
+ /** Font size in points.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<double> property_size_points() ;
+
+/** Font size in points.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<double> property_size_points() const;
+
+ /** Font size as a scale factor relative to the default font size. This properly adapts to theme changes etc. so is recommended. Pango predefines some scales such as PANGO_SCALE_X_LARGE.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<double> property_scale() ;
+
+/** Font size as a scale factor relative to the default font size. This properly adapts to theme changes etc. so is recommended. Pango predefines some scales such as PANGO_SCALE_X_LARGE.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<double> property_scale() const;
+
+ /** Pixels of blank space above paragraphs.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_pixels_above_lines() ;
+
+/** Pixels of blank space above paragraphs.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_pixels_above_lines() const;
+
+ /** Pixels of blank space below paragraphs.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_pixels_below_lines() ;
+
+/** Pixels of blank space below paragraphs.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_pixels_below_lines() const;
+
+ /** Pixels of blank space between wrapped lines in a paragraph.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_pixels_inside_wrap() ;
+
+/** Pixels of blank space between wrapped lines in a paragraph.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_pixels_inside_wrap() const;
+
+ /** Whether the text can be modified by the user.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_editable() ;
+
+/** Whether the text can be modified by the user.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_editable() const;
+
+ /** Whether to wrap lines never
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<WrapMode> property_wrap_mode() ;
+
+/** Whether to wrap lines never
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<WrapMode> property_wrap_mode() const;
+
+ /** Left
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Justification> property_justification() ;
+
+/** Left
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Justification> property_justification() const;
+
+ /** Text direction
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<TextDirection> property_direction() ;
+
+/** Text direction
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<TextDirection> property_direction() const;
+
+ /** Width of the left margin in pixels.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_left_margin() ;
+
+/** Width of the left margin in pixels.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_left_margin() const;
+
+ /** Amount to indent the paragraph
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_indent() ;
+
+/** Amount to indent the paragraph
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_indent() const;
+
+ /** Whether to strike through the text.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_strikethrough() ;
+
+/** Whether to strike through the text.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_strikethrough() const;
+
+ /** Width of the right margin in pixels.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_right_margin() ;
+
+/** Width of the right margin in pixels.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_right_margin() const;
+
+ /** Style of underline for this text.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Pango::Underline> property_underline() ;
+
+/** Style of underline for this text.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Pango::Underline> property_underline() const;
+
+ /** Offset of text above the baseline (below the baseline if rise is negative) in pixels.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_rise() ;
+
+/** Offset of text above the baseline (below the baseline if rise is negative) in pixels.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_rise() const;
+
+ /** Whether the background color fills the entire line height or only the height of the tagged characters.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_background_full_height() ;
+
+/** Whether the background color fills the entire line height or only the height of the tagged characters.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_background_full_height() const;
+
+ /** The language this text is in
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_language() ;
+
+/** The language this text is in
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_language() const;
+
+ /** Custom tabs for this text.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Pango::TabArray> property_tabs() ;
+
+/** Custom tabs for this text.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Pango::TabArray> property_tabs() const;
+
+ /** Whether this text is hidden. Not implemented in GTK 2.0.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_invisible() ;
+
+/** Whether this text is hidden. Not implemented in GTK 2.0.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_invisible() const;
+
+ /** Whether this tag affects the background color.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_background_set() ;
+
+/** Whether this tag affects the background color.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_background_set() const;
+
+ /** Whether this tag affects the foreground color.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_foreground_set() ;
+
+/** Whether this tag affects the foreground color.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_foreground_set() const;
+
+ /** Whether this tag affects the background stipple.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_background_stipple_set() ;
+
+/** Whether this tag affects the background stipple.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_background_stipple_set() const;
+
+ /** Whether this tag affects the foreground stipple.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_foreground_stipple_set() ;
+
+/** Whether this tag affects the foreground stipple.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_foreground_stipple_set() const;
+
+ /** Whether this tag affects the font family.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_family_set() ;
+
+/** Whether this tag affects the font family.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_family_set() const;
+
+ /** Whether this tag affects the font style.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_style_set() ;
+
+/** Whether this tag affects the font style.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_style_set() const;
+
+ /** Whether this tag affects the font variant.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_variant_set() ;
+
+/** Whether this tag affects the font variant.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_variant_set() const;
+
+ /** Whether this tag affects the font weight.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_weight_set() ;
+
+/** Whether this tag affects the font weight.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_weight_set() const;
+
+ /** Whether this tag affects the font stretch.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_stretch_set() ;
+
+/** Whether this tag affects the font stretch.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_stretch_set() const;
+
+ /** Whether this tag affects the font size.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_size_set() ;
+
+/** Whether this tag affects the font size.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_size_set() const;
+
+ /** Whether this tag scales the font size by a factor.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_scale_set() ;
+
+/** Whether this tag scales the font size by a factor.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_scale_set() const;
+
+ /** Whether this tag affects the number of pixels above lines.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_pixels_above_lines_set() ;
+
+/** Whether this tag affects the number of pixels above lines.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_pixels_above_lines_set() const;
+
+ /** Whether this tag affects the number of pixels above lines.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_pixels_below_lines_set() ;
+
+/** Whether this tag affects the number of pixels above lines.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_pixels_below_lines_set() const;
+
+ /** Whether this tag affects the number of pixels between wrapped lines.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_pixels_inside_wrap_set() ;
+
+/** Whether this tag affects the number of pixels between wrapped lines.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_pixels_inside_wrap_set() const;
+
+ /** Whether this tag affects text editability.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_editable_set() ;
+
+/** Whether this tag affects text editability.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_editable_set() const;
+
+ /** Whether this tag affects line wrap mode.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_wrap_mode_set() ;
+
+/** Whether this tag affects line wrap mode.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_wrap_mode_set() const;
+
+ /** Whether this tag affects paragraph justification.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_justification_set() ;
+
+/** Whether this tag affects paragraph justification.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_justification_set() const;
+
+ /** Whether this tag affects the left margin.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_left_margin_set() ;
+
+/** Whether this tag affects the left margin.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_left_margin_set() const;
+
+ /** Whether this tag affects indentation.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_indent_set() ;
+
+/** Whether this tag affects indentation.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_indent_set() const;
+
+ /** Whether this tag affects strikethrough.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_strikethrough_set() ;
+
+/** Whether this tag affects strikethrough.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_strikethrough_set() const;
+
+ /** Whether this tag affects the right margin.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_right_margin_set() ;
+
+/** Whether this tag affects the right margin.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_right_margin_set() const;
+
+ /** Whether this tag affects underlining.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_underline_set() ;
+
+/** Whether this tag affects underlining.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_underline_set() const;
+
+ /** Whether this tag affects the rise.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_rise_set() ;
+
+/** Whether this tag affects the rise.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_rise_set() const;
+
+ /** Whether this tag affects background height.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_background_full_height_set() ;
+
+/** Whether this tag affects background height.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_background_full_height_set() const;
+
+ /** Whether this tag affects the language the text is rendered as.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_language_set() ;
+
+/** Whether this tag affects the language the text is rendered as.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_language_set() const;
+
+ /** Whether this tag affects tabs.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_tabs_set() ;
+
+/** Whether this tag affects tabs.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_tabs_set() const;
+
+ /** Whether this tag affects text visibility.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_invisible_set() ;
+
+/** Whether this tag affects text visibility.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_invisible_set() const;
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual bool on_event(const Glib::RefPtr<Glib::Object>& event_object, GdkEvent* event, const TextIter& iter);
+
+
+};
+
+} /* namespace Gtk */
+
+
+namespace Glib
+{
+ /** @relates Gtk::TextTag
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Gtk::TextTag> wrap(GtkTextTag* object, bool take_copy = false);
+}
+
+
+#endif /* _GTKMM_TEXTTAG_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/texttagtable.cc b/libs/gtkmm2/gtk/gtkmm/texttagtable.cc
new file mode 100644
index 0000000000..c237a5a325
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/texttagtable.cc
@@ -0,0 +1,466 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/texttagtable.h>
+#include <gtkmm/private/texttagtable_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/texttag.h>
+#include <gtk/gtktexttag.h>
+#include <gtk/gtktexttagtable.h>
+
+namespace Gtk
+{
+
+//This Signal Proxy allows the C++ coder to specify a sigc::slot instead of a static function.
+class SignalProxy_ForEach
+{
+public:
+ typedef TextTagTable::SlotForEach SlotType;
+
+ SignalProxy_ForEach(const SlotType& slot);
+ ~SignalProxy_ForEach();
+
+ static void gtk_callback(GtkTextTag* texttag, gpointer data);
+
+protected:
+ SlotType slot_;
+};
+
+SignalProxy_ForEach::SignalProxy_ForEach(const SlotType& slot)
+{
+ slot_ = slot;
+}
+
+SignalProxy_ForEach::~SignalProxy_ForEach()
+{
+}
+
+void SignalProxy_ForEach::gtk_callback(GtkTextTag* texttag, gpointer data)
+{
+ SignalProxy_ForEach* pSignalProxy = static_cast<SignalProxy_ForEach*>(data);
+ if(pSignalProxy)
+ {
+ //Use Slot::operator():
+ (pSignalProxy->slot_)(Glib::wrap(texttag, true)); //true = take_copy.
+ }
+}
+
+
+void TextTagTable::foreach(const SlotForEach& slot)
+{
+ SignalProxy_ForEach proxy(slot); //It doesn't need to exist for longer than the function call.
+ gtk_text_tag_table_foreach(gobj(), &SignalProxy_ForEach::gtk_callback, (gpointer)&proxy);
+}
+
+
+} /* namespace Gtk */
+
+
+namespace
+{
+
+void TextTagTable_signal_tag_changed_callback(GtkTextTagTable* self, GtkTextTag* p0,gboolean p1,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,const Glib::RefPtr<TextTag>&,bool > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::wrap(p0, true)
+, p1
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo TextTagTable_signal_tag_changed_info =
+{
+ "tag_changed",
+ (GCallback) &TextTagTable_signal_tag_changed_callback,
+ (GCallback) &TextTagTable_signal_tag_changed_callback
+};
+
+
+void TextTagTable_signal_tag_added_callback(GtkTextTagTable* self, GtkTextTag* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,const Glib::RefPtr<TextTag>& > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::wrap(p0, true)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo TextTagTable_signal_tag_added_info =
+{
+ "tag_added",
+ (GCallback) &TextTagTable_signal_tag_added_callback,
+ (GCallback) &TextTagTable_signal_tag_added_callback
+};
+
+
+void TextTagTable_signal_tag_removed_callback(GtkTextTagTable* self, GtkTextTag* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,const Glib::RefPtr<TextTag>& > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::wrap(p0, true)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo TextTagTable_signal_tag_removed_info =
+{
+ "tag_removed",
+ (GCallback) &TextTagTable_signal_tag_removed_callback,
+ (GCallback) &TextTagTable_signal_tag_removed_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Gtk::TextTagTable> wrap(GtkTextTagTable* object, bool take_copy)
+{
+ return Glib::RefPtr<Gtk::TextTagTable>( dynamic_cast<Gtk::TextTagTable*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} /* namespace Glib */
+
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& TextTagTable_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &TextTagTable_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_text_tag_table_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void TextTagTable_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->tag_changed = &tag_changed_callback;
+ klass->tag_added = &tag_added_callback;
+ klass->tag_removed = &tag_removed_callback;
+}
+
+
+void TextTagTable_Class::tag_changed_callback(GtkTextTagTable* self, GtkTextTag* p0, gboolean p1)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_tag_changed(Glib::wrap(p0, true)
+, p1
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->tag_changed)
+ (*base->tag_changed)(self, p0, p1);
+ }
+}
+
+void TextTagTable_Class::tag_added_callback(GtkTextTagTable* self, GtkTextTag* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_tag_added(Glib::wrap(p0, true)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->tag_added)
+ (*base->tag_added)(self, p0);
+ }
+}
+
+void TextTagTable_Class::tag_removed_callback(GtkTextTagTable* self, GtkTextTag* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_tag_removed(Glib::wrap(p0, true)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->tag_removed)
+ (*base->tag_removed)(self, p0);
+ }
+}
+
+
+Glib::ObjectBase* TextTagTable_Class::wrap_new(GObject* object)
+{
+ return new TextTagTable((GtkTextTagTable*)object);
+}
+
+
+/* The implementation: */
+
+GtkTextTagTable* TextTagTable::gobj_copy()
+{
+ reference();
+ return gobj();
+}
+
+TextTagTable::TextTagTable(const Glib::ConstructParams& construct_params)
+:
+ Glib::Object(construct_params)
+{}
+
+TextTagTable::TextTagTable(GtkTextTagTable* castitem)
+:
+ Glib::Object((GObject*)(castitem))
+{}
+
+TextTagTable::~TextTagTable()
+{}
+
+
+TextTagTable::CppClassType TextTagTable::texttagtable_class_; // initialize static member
+
+GType TextTagTable::get_type()
+{
+ return texttagtable_class_.init().get_type();
+}
+
+GType TextTagTable::get_base_type()
+{
+ return gtk_text_tag_table_get_type();
+}
+
+
+TextTagTable::TextTagTable()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Glib::Object(Glib::ConstructParams(texttagtable_class_.init()))
+{
+ }
+
+Glib::RefPtr<TextTagTable> TextTagTable::create()
+{
+ return Glib::RefPtr<TextTagTable>( new TextTagTable() );
+}
+void TextTagTable::add(const Glib::RefPtr<TextTag>& tag)
+{
+ gtk_text_tag_table_add(gobj(), Glib::unwrap(tag));
+}
+
+void TextTagTable::remove(const Glib::RefPtr<TextTag>& tag)
+{
+ gtk_text_tag_table_remove(gobj(), Glib::unwrap(tag));
+}
+
+Glib::RefPtr<TextTag> TextTagTable::lookup(const Glib::ustring& name)
+{
+
+ Glib::RefPtr<TextTag> retvalue = Glib::wrap(gtk_text_tag_table_lookup(gobj(), name.c_str()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const TextTag> TextTagTable::lookup(const Glib::ustring& name) const
+{
+
+ Glib::RefPtr<const TextTag> retvalue = Glib::wrap(gtk_text_tag_table_lookup(const_cast<GtkTextTagTable*>(gobj()), name.c_str()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+int TextTagTable::get_size() const
+{
+ return gtk_text_tag_table_get_size(const_cast<GtkTextTagTable*>(gobj()));
+}
+
+
+Glib::SignalProxy2< void,const Glib::RefPtr<TextTag>&,bool > TextTagTable::signal_tag_changed()
+{
+ return Glib::SignalProxy2< void,const Glib::RefPtr<TextTag>&,bool >(this, &TextTagTable_signal_tag_changed_info);
+}
+
+Glib::SignalProxy1< void,const Glib::RefPtr<TextTag>& > TextTagTable::signal_tag_added()
+{
+ return Glib::SignalProxy1< void,const Glib::RefPtr<TextTag>& >(this, &TextTagTable_signal_tag_added_info);
+}
+
+Glib::SignalProxy1< void,const Glib::RefPtr<TextTag>& > TextTagTable::signal_tag_removed()
+{
+ return Glib::SignalProxy1< void,const Glib::RefPtr<TextTag>& >(this, &TextTagTable_signal_tag_removed_info);
+}
+
+
+void Gtk::TextTagTable::on_tag_changed(const Glib::RefPtr<TextTag>& tag, bool size_changed)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->tag_changed)
+ (*base->tag_changed)(gobj(),Glib::unwrap(tag),static_cast<int>(size_changed));
+}
+
+void Gtk::TextTagTable::on_tag_added(const Glib::RefPtr<TextTag>& tag)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->tag_added)
+ (*base->tag_added)(gobj(),Glib::unwrap(tag));
+}
+
+void Gtk::TextTagTable::on_tag_removed(const Glib::RefPtr<TextTag>& tag)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->tag_removed)
+ (*base->tag_removed)(gobj(),Glib::unwrap(tag));
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/texttagtable.h b/libs/gtkmm2/gtk/gtkmm/texttagtable.h
new file mode 100644
index 0000000000..3c8d8215ac
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/texttagtable.h
@@ -0,0 +1,186 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TEXTTAGTABLE_H
+#define _GTKMM_TEXTTAGTABLE_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* texttagtable.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/object.h>
+#include <gtkmm/texttag.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkTextTagTable GtkTextTagTable;
+typedef struct _GtkTextTagTableClass GtkTextTagTableClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class TextTagTable_Class; } // namespace Gtk
+namespace Gtk
+{
+
+class TextTag;
+
+/** Typedefed as Gtk::TextBuffer::TagTable. A Collection of @link Gtk::TextTag Gtk::TextBuffer::Tags@endlink that can be used together.
+ *
+ * A tag table defines a set of @link Gtk::TextTag Gtk::TextBuffer::Tags@endlink that can be used together. Each buffer has one tag
+ * table associated with it; only tags from that tag table can be used with the buffer. A single tag table can be shared between
+ * multiple buffers, however.
+ *
+ * @ingroup TextView
+ */
+
+class TextTagTable : public Glib::Object
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef TextTagTable CppObjectType;
+ typedef TextTagTable_Class CppClassType;
+ typedef GtkTextTagTable BaseObjectType;
+ typedef GtkTextTagTableClass BaseClassType;
+
+private: friend class TextTagTable_Class;
+ static CppClassType texttagtable_class_;
+
+private:
+ // noncopyable
+ TextTagTable(const TextTagTable&);
+ TextTagTable& operator=(const TextTagTable&);
+
+protected:
+ explicit TextTagTable(const Glib::ConstructParams& construct_params);
+ explicit TextTagTable(GtkTextTagTable* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~TextTagTable();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ GtkTextTagTable* gobj() { return reinterpret_cast<GtkTextTagTable*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const GtkTextTagTable* gobj() const { return reinterpret_cast<GtkTextTagTable*>(gobject_); }
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ GtkTextTagTable* gobj_copy();
+
+private:
+
+protected:
+
+ TextTagTable();
+
+public:
+
+ static Glib::RefPtr<TextTagTable> create();
+
+
+ /** Add a tag to the table. The tag is assigned the highest priority
+ * in the table.
+ *
+ * @a tag must not be in a tag table already, and may not have
+ * the same name as an already-added tag.
+ * @param tag A Gtk::TextTag.
+ */
+ void add(const Glib::RefPtr<TextTag>& tag);
+
+ /** Remove a tag from the table. This will remove the table's
+ * reference to the tag, so be careful - the tag will end
+ * up destroyed if you don't have a reference to it.
+ * @param tag A Gtk::TextTag.
+ */
+ void remove(const Glib::RefPtr<TextTag>& tag);
+
+ /** Look up a named tag.
+ * @param name Name of a tag.
+ * @return The tag, or <tt>0</tt> if none by that name is in the table.
+ */
+ Glib::RefPtr<TextTag> lookup(const Glib::ustring& name);
+
+ /** Look up a named tag.
+ * @param name Name of a tag.
+ * @return The tag, or <tt>0</tt> if none by that name is in the table.
+ */
+ Glib::RefPtr<const TextTag> lookup(const Glib::ustring& name) const;
+
+ typedef sigc::slot<void, const Glib::RefPtr<TextTag>&> SlotForEach;
+ void foreach(const SlotForEach& slot);
+
+
+ /** Returns the size of the table (number of tags)
+ * @return Number of tags in @a table .
+ */
+ int get_size() const;
+
+
+ Glib::SignalProxy2< void,const Glib::RefPtr<TextTag>&,bool > signal_tag_changed();
+
+
+ Glib::SignalProxy1< void,const Glib::RefPtr<TextTag>& > signal_tag_added();
+
+
+ Glib::SignalProxy1< void,const Glib::RefPtr<TextTag>& > signal_tag_removed();
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_tag_changed(const Glib::RefPtr<TextTag>& tag, bool size_changed);
+ virtual void on_tag_added(const Glib::RefPtr<TextTag>& tag);
+ virtual void on_tag_removed(const Glib::RefPtr<TextTag>& tag);
+
+
+};
+
+} /* namespace Gtk */
+
+
+namespace Glib
+{
+ /** @relates Gtk::TextTagTable
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Gtk::TextTagTable> wrap(GtkTextTagTable* object, bool take_copy = false);
+}
+
+
+#endif /* _GTKMM_TEXTTAGTABLE_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/textview.cc b/libs/gtkmm2/gtk/gtkmm/textview.cc
new file mode 100644
index 0000000000..d4d571371f
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/textview.cc
@@ -0,0 +1,920 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/textview.h>
+#include <gtkmm/private/textview_p.h>
+
+#include <gtk/gtktypebuiltins.h>
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtktextview.h>
+
+namespace Gtk
+{
+
+TextView::TextView(const Glib::RefPtr<TextBuffer>& buffer)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Container(Glib::ConstructParams(textview_class_.init(), (char*) 0))
+{
+ set_buffer(buffer);
+}
+
+bool TextView::scroll_to(TextBuffer::iterator& iter, double within_margin)
+{
+ //The last 2 arguments are ignored if use_align is FALSE.
+ return gtk_text_view_scroll_to_iter(gobj(), (iter).gobj(), within_margin, FALSE, 0.0, 0.0);
+}
+
+bool TextView::scroll_to(TextBuffer::iterator& iter, double within_margin, double xalign, double yalign)
+{
+ return gtk_text_view_scroll_to_iter(gobj(), (iter).gobj(), within_margin, TRUE /* use_align */, xalign, yalign);
+}
+
+void TextView::scroll_to(const Glib::RefPtr<TextBuffer::Mark>& mark, double within_margin)
+{
+ //The last 2 arguments are ignored if use_align is FALSE.
+ gtk_text_view_scroll_to_mark(gobj(), Glib::unwrap(mark), within_margin, FALSE, 0.0, 0.0);
+}
+
+void TextView::scroll_to(const Glib::RefPtr<TextBuffer::Mark>& mark, double within_margin, double xalign, double yalign)
+{
+ gtk_text_view_scroll_to_mark(gobj(), Glib::unwrap(mark), within_margin, TRUE /* use_align */, xalign, yalign);
+}
+
+//deprecated:
+bool TextView::scroll_to_iter(TextBuffer::iterator& iter, double within_margin)
+{
+ return scroll_to(iter, within_margin);
+}
+
+//deprecated:
+void TextView::scroll_to_mark(const Glib::RefPtr<TextBuffer::Mark>& mark, double within_margin)
+{
+ scroll_to(mark, within_margin);
+}
+
+void TextView::scroll_mark_onscreen(const Glib::RefPtr<TextBuffer::Mark>& mark)
+{
+ scroll_to(mark);
+}
+
+} // namespace Gtk
+
+
+namespace
+{
+
+void TextView_signal_set_scroll_adjustments_callback(GtkTextView* self, GtkAdjustment* p0,GtkAdjustment* p1,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,Adjustment*,Adjustment* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::wrap(p0)
+, Glib::wrap(p1)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo TextView_signal_set_scroll_adjustments_info =
+{
+ "set_scroll_adjustments",
+ (GCallback) &TextView_signal_set_scroll_adjustments_callback,
+ (GCallback) &TextView_signal_set_scroll_adjustments_callback
+};
+
+
+void TextView_signal_populate_popup_callback(GtkTextView* self, GtkMenu* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,Menu* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::wrap(p0)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo TextView_signal_populate_popup_info =
+{
+ "populate_popup",
+ (GCallback) &TextView_signal_populate_popup_callback,
+ (GCallback) &TextView_signal_populate_popup_callback
+};
+
+
+const Glib::SignalProxyInfo TextView_signal_set_anchor_info =
+{
+ "set_anchor",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+
+void TextView_signal_insert_at_cursor_callback(GtkTextView* self, const gchar* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,const Glib::ustring& > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::convert_const_gchar_ptr_to_ustring(p0)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo TextView_signal_insert_at_cursor_info =
+{
+ "insert_at_cursor",
+ (GCallback) &TextView_signal_insert_at_cursor_callback,
+ (GCallback) &TextView_signal_insert_at_cursor_callback
+};
+
+} // anonymous namespace
+
+// static
+GType Glib::Value<Gtk::TextWindowType>::value_type()
+{
+ return gtk_text_window_type_get_type();
+}
+
+
+namespace Glib
+{
+
+Gtk::TextView* wrap(GtkTextView* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::TextView *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& TextView_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &TextView_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_text_view_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void TextView_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->set_scroll_adjustments = &set_scroll_adjustments_callback;
+ klass->populate_popup = &populate_popup_callback;
+ klass->set_anchor = &set_anchor_callback;
+ klass->insert_at_cursor = &insert_at_cursor_callback;
+}
+
+
+void TextView_Class::set_scroll_adjustments_callback(GtkTextView* self, GtkAdjustment* p0, GtkAdjustment* p1)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_set_scroll_adjustments(Glib::wrap(p0)
+, Glib::wrap(p1)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->set_scroll_adjustments)
+ (*base->set_scroll_adjustments)(self, p0, p1);
+ }
+}
+
+void TextView_Class::populate_popup_callback(GtkTextView* self, GtkMenu* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_populate_popup(Glib::wrap(p0)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->populate_popup)
+ (*base->populate_popup)(self, p0);
+ }
+}
+
+void TextView_Class::set_anchor_callback(GtkTextView* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_set_anchor();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->set_anchor)
+ (*base->set_anchor)(self);
+ }
+}
+
+void TextView_Class::insert_at_cursor_callback(GtkTextView* self, const gchar* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_insert_at_cursor(Glib::convert_const_gchar_ptr_to_ustring(p0)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->insert_at_cursor)
+ (*base->insert_at_cursor)(self, p0);
+ }
+}
+
+
+Glib::ObjectBase* TextView_Class::wrap_new(GObject* o)
+{
+ return manage(new TextView((GtkTextView*)(o)));
+
+}
+
+
+/* The implementation: */
+
+TextView::TextView(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Container(construct_params)
+{
+ }
+
+TextView::TextView(GtkTextView* castitem)
+:
+ Gtk::Container((GtkContainer*)(castitem))
+{
+ }
+
+TextView::~TextView()
+{
+ destroy_();
+}
+
+TextView::CppClassType TextView::textview_class_; // initialize static member
+
+GType TextView::get_type()
+{
+ return textview_class_.init().get_type();
+}
+
+GType TextView::get_base_type()
+{
+ return gtk_text_view_get_type();
+}
+
+
+TextView::TextView()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Container(Glib::ConstructParams(textview_class_.init()))
+{
+ }
+
+void TextView::set_buffer(const Glib::RefPtr<TextBuffer>& buffer)
+{
+ gtk_text_view_set_buffer(gobj(), Glib::unwrap(buffer));
+}
+
+Glib::RefPtr<TextBuffer> TextView::get_buffer()
+{
+
+ Glib::RefPtr<TextBuffer> retvalue = Glib::wrap(gtk_text_view_get_buffer(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const TextBuffer> TextView::get_buffer() const
+{
+
+ Glib::RefPtr<const TextBuffer> retvalue = Glib::wrap(gtk_text_view_get_buffer(const_cast<GtkTextView*>(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+bool TextView::move_mark_onscreen(const Glib::RefPtr<TextBuffer::Mark>& mark)
+{
+ return gtk_text_view_move_mark_onscreen(gobj(), Glib::unwrap(mark));
+}
+
+bool TextView::place_cursor_onscreen()
+{
+ return gtk_text_view_place_cursor_onscreen(gobj());
+}
+
+void TextView::get_visible_rect(Gdk::Rectangle& visible_rect) const
+{
+ gtk_text_view_get_visible_rect(const_cast<GtkTextView*>(gobj()), (visible_rect).gobj());
+}
+
+void TextView::set_cursor_visible(bool setting)
+{
+ gtk_text_view_set_cursor_visible(gobj(), static_cast<int>(setting));
+}
+
+bool TextView::get_cursor_visible() const
+{
+ return gtk_text_view_get_cursor_visible(const_cast<GtkTextView*>(gobj()));
+}
+
+void TextView::get_iter_location(const TextBuffer::iterator& iter, Gdk::Rectangle& location) const
+{
+ gtk_text_view_get_iter_location(const_cast<GtkTextView*>(gobj()), (iter).gobj(), (location).gobj());
+}
+
+void TextView::get_iter_at_location(TextBuffer::iterator& iter, int x, int y) const
+{
+ gtk_text_view_get_iter_at_location(const_cast<GtkTextView*>(gobj()), (iter).gobj(), x, y);
+}
+
+void TextView::get_iter_at_position(TextBuffer::iterator& iter, int& trailing, int x, int y) const
+{
+ gtk_text_view_get_iter_at_position(const_cast<GtkTextView*>(gobj()), (iter).gobj(), &trailing, x, y);
+}
+
+void TextView::get_line_yrange(const TextBuffer::iterator& iter, int& y, int& height) const
+{
+ gtk_text_view_get_line_yrange(const_cast<GtkTextView*>(gobj()), (iter).gobj(), &y, &height);
+}
+
+void TextView::get_line_at_y(TextBuffer::iterator& target_iter, int y, int& line_top) const
+{
+ gtk_text_view_get_line_at_y(const_cast<GtkTextView*>(gobj()), (target_iter).gobj(), y, &line_top);
+}
+
+void TextView::buffer_to_window_coords(TextWindowType win, int buffer_x, int buffer_y, int& window_x, int& window_y) const
+{
+ gtk_text_view_buffer_to_window_coords(const_cast<GtkTextView*>(gobj()), ((GtkTextWindowType)(win)), buffer_x, buffer_y, &window_x, &window_y);
+}
+
+void TextView::window_to_buffer_coords(TextWindowType win, int window_x, int window_y, int& buffer_x, int& buffer_y) const
+{
+ gtk_text_view_window_to_buffer_coords(const_cast<GtkTextView*>(gobj()), ((GtkTextWindowType)(win)), window_x, window_y, &buffer_x, &buffer_y);
+}
+
+Glib::RefPtr<Gdk::Window> TextView::get_window(TextWindowType win)
+{
+
+ Glib::RefPtr<Gdk::Window> retvalue = Glib::wrap((GdkWindowObject*)(gtk_text_view_get_window(gobj(), ((GtkTextWindowType)(win)))));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const Gdk::Window> TextView::get_window(TextWindowType win) const
+{
+
+ Glib::RefPtr<const Gdk::Window> retvalue = Glib::wrap((GdkWindowObject*)(gtk_text_view_get_window(const_cast<GtkTextView*>(gobj()), ((GtkTextWindowType)(win)))));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+TextWindowType TextView::get_window_type(const Glib::RefPtr<Gdk::Window>& window)
+{
+ return ((TextWindowType)(gtk_text_view_get_window_type(gobj(), Glib::unwrap(window))));
+}
+
+void TextView::set_border_window_size(TextWindowType type, int size)
+{
+ gtk_text_view_set_border_window_size(gobj(), ((GtkTextWindowType)(type)), size);
+}
+
+int TextView::get_border_window_size(TextWindowType type) const
+{
+ return gtk_text_view_get_border_window_size(const_cast<GtkTextView*>(gobj()), ((GtkTextWindowType)(type)));
+}
+
+bool TextView::forward_display_line(TextBuffer::iterator& iter)
+{
+ return gtk_text_view_forward_display_line(gobj(), (iter).gobj());
+}
+
+bool TextView::backward_display_line(TextBuffer::iterator& iter)
+{
+ return gtk_text_view_backward_display_line(gobj(), (iter).gobj());
+}
+
+bool TextView::forward_display_line_end(TextBuffer::iterator& iter)
+{
+ return gtk_text_view_forward_display_line_end(gobj(), (iter).gobj());
+}
+
+bool TextView::backward_display_line_start(TextBuffer::iterator& iter)
+{
+ return gtk_text_view_backward_display_line_start(gobj(), (iter).gobj());
+}
+
+bool TextView::starts_display_line(const TextBuffer::iterator& iter)
+{
+ return gtk_text_view_starts_display_line(gobj(), (iter).gobj());
+}
+
+bool TextView::move_visually(TextBuffer::iterator& iter, int count)
+{
+ return gtk_text_view_move_visually(gobj(), (iter).gobj(), count);
+}
+
+void TextView::add_child_at_anchor(Widget& child, const Glib::RefPtr<TextBuffer::ChildAnchor>& anchor)
+{
+ gtk_text_view_add_child_at_anchor(gobj(), (child).gobj(), Glib::unwrap(anchor));
+}
+
+void TextView::add_child_in_window(Widget& child, TextWindowType which_window, int xpos, int ypos)
+{
+ gtk_text_view_add_child_in_window(gobj(), (child).gobj(), ((GtkTextWindowType)(which_window)), xpos, ypos);
+}
+
+void TextView::move_child(Widget& child, int xpos, int ypos)
+{
+ gtk_text_view_move_child(gobj(), (child).gobj(), xpos, ypos);
+}
+
+void TextView::set_wrap_mode(WrapMode wrap_mode)
+{
+ gtk_text_view_set_wrap_mode(gobj(), ((GtkWrapMode)(wrap_mode)));
+}
+
+WrapMode TextView::get_wrap_mode() const
+{
+ return ((WrapMode)(gtk_text_view_get_wrap_mode(const_cast<GtkTextView*>(gobj()))));
+}
+
+void TextView::set_editable(bool setting)
+{
+ gtk_text_view_set_editable(gobj(), static_cast<int>(setting));
+}
+
+bool TextView::get_editable() const
+{
+ return gtk_text_view_get_editable(const_cast<GtkTextView*>(gobj()));
+}
+
+void TextView::set_pixels_above_lines(int pixels_above_lines)
+{
+ gtk_text_view_set_pixels_above_lines(gobj(), pixels_above_lines);
+}
+
+int TextView::get_pixels_above_lines() const
+{
+ return gtk_text_view_get_pixels_above_lines(const_cast<GtkTextView*>(gobj()));
+}
+
+void TextView::set_pixels_below_lines(int pixels_below_lines)
+{
+ gtk_text_view_set_pixels_below_lines(gobj(), pixels_below_lines);
+}
+
+int TextView::get_pixels_below_lines() const
+{
+ return gtk_text_view_get_pixels_below_lines(const_cast<GtkTextView*>(gobj()));
+}
+
+void TextView::set_pixels_inside_wrap(int pixels_inside_wrap)
+{
+ gtk_text_view_set_pixels_inside_wrap(gobj(), pixels_inside_wrap);
+}
+
+int TextView::get_pixels_inside_wrap() const
+{
+ return gtk_text_view_get_pixels_inside_wrap(const_cast<GtkTextView*>(gobj()));
+}
+
+void TextView::set_justification(Justification justification)
+{
+ gtk_text_view_set_justification(gobj(), ((GtkJustification)(justification)));
+}
+
+Justification TextView::get_justification() const
+{
+ return ((Justification)(gtk_text_view_get_justification(const_cast<GtkTextView*>(gobj()))));
+}
+
+void TextView::set_left_margin(int left_margin)
+{
+ gtk_text_view_set_left_margin(gobj(), left_margin);
+}
+
+int TextView::get_left_margin() const
+{
+ return gtk_text_view_get_left_margin(const_cast<GtkTextView*>(gobj()));
+}
+
+void TextView::set_right_margin(int right_margin)
+{
+ gtk_text_view_set_right_margin(gobj(), right_margin);
+}
+
+int TextView::get_right_margin() const
+{
+ return gtk_text_view_get_right_margin(const_cast<GtkTextView*>(gobj()));
+}
+
+void TextView::set_indent(int indent)
+{
+ gtk_text_view_set_indent(gobj(), indent);
+}
+
+int TextView::get_indent() const
+{
+ return gtk_text_view_get_indent(const_cast<GtkTextView*>(gobj()));
+}
+
+void TextView::set_tabs(Pango::TabArray& tabs)
+{
+ gtk_text_view_set_tabs(gobj(), (tabs).gobj());
+}
+
+Pango::TabArray TextView::get_tabs() const
+{
+ return Pango::TabArray((gtk_text_view_get_tabs(const_cast<GtkTextView*>(gobj()))));
+}
+
+TextAttributes TextView::get_default_attributes() const
+{
+ return TextAttributes(gtk_text_view_get_default_attributes(const_cast<GtkTextView*>(gobj())));
+}
+
+void TextView::set_overwrite(bool overwrite)
+{
+ gtk_text_view_set_overwrite(gobj(), static_cast<int>(overwrite));
+}
+
+bool TextView::get_overwrite() const
+{
+ return gtk_text_view_get_overwrite(const_cast<GtkTextView*>(gobj()));
+}
+
+void TextView::set_accepts_tab(bool accepts_tab)
+{
+ gtk_text_view_set_accepts_tab(gobj(), static_cast<int>(accepts_tab));
+}
+
+bool TextView::get_accepts_tab() const
+{
+ return gtk_text_view_get_accepts_tab(const_cast<GtkTextView*>(gobj()));
+}
+
+
+Glib::SignalProxy2< void,Adjustment*,Adjustment* > TextView::signal_set_scroll_adjustments()
+{
+ return Glib::SignalProxy2< void,Adjustment*,Adjustment* >(this, &TextView_signal_set_scroll_adjustments_info);
+}
+
+Glib::SignalProxy1< void,Menu* > TextView::signal_populate_popup()
+{
+ return Glib::SignalProxy1< void,Menu* >(this, &TextView_signal_populate_popup_info);
+}
+
+Glib::SignalProxy0< void > TextView::signal_set_anchor()
+{
+ return Glib::SignalProxy0< void >(this, &TextView_signal_set_anchor_info);
+}
+
+Glib::SignalProxy1< void,const Glib::ustring& > TextView::signal_insert_at_cursor()
+{
+ return Glib::SignalProxy1< void,const Glib::ustring& >(this, &TextView_signal_insert_at_cursor_info);
+}
+
+
+Glib::PropertyProxy<int> TextView::property_pixels_above_lines()
+{
+ return Glib::PropertyProxy<int>(this, "pixels-above-lines");
+}
+
+Glib::PropertyProxy_ReadOnly<int> TextView::property_pixels_above_lines() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "pixels-above-lines");
+}
+
+Glib::PropertyProxy<int> TextView::property_pixels_below_lines()
+{
+ return Glib::PropertyProxy<int>(this, "pixels-below-lines");
+}
+
+Glib::PropertyProxy_ReadOnly<int> TextView::property_pixels_below_lines() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "pixels-below-lines");
+}
+
+Glib::PropertyProxy<int> TextView::property_pixels_inside_wrap()
+{
+ return Glib::PropertyProxy<int>(this, "pixels-inside-wrap");
+}
+
+Glib::PropertyProxy_ReadOnly<int> TextView::property_pixels_inside_wrap() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "pixels-inside-wrap");
+}
+
+Glib::PropertyProxy<bool> TextView::property_editable()
+{
+ return Glib::PropertyProxy<bool>(this, "editable");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> TextView::property_editable() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "editable");
+}
+
+Glib::PropertyProxy<WrapMode> TextView::property_wrap_mode()
+{
+ return Glib::PropertyProxy<WrapMode>(this, "wrap-mode");
+}
+
+Glib::PropertyProxy_ReadOnly<WrapMode> TextView::property_wrap_mode() const
+{
+ return Glib::PropertyProxy_ReadOnly<WrapMode>(this, "wrap-mode");
+}
+
+Glib::PropertyProxy<Justification> TextView::property_justification()
+{
+ return Glib::PropertyProxy<Justification>(this, "justification");
+}
+
+Glib::PropertyProxy_ReadOnly<Justification> TextView::property_justification() const
+{
+ return Glib::PropertyProxy_ReadOnly<Justification>(this, "justification");
+}
+
+Glib::PropertyProxy<int> TextView::property_left_margin()
+{
+ return Glib::PropertyProxy<int>(this, "left-margin");
+}
+
+Glib::PropertyProxy_ReadOnly<int> TextView::property_left_margin() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "left-margin");
+}
+
+Glib::PropertyProxy<int> TextView::property_right_margin()
+{
+ return Glib::PropertyProxy<int>(this, "right-margin");
+}
+
+Glib::PropertyProxy_ReadOnly<int> TextView::property_right_margin() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "right-margin");
+}
+
+Glib::PropertyProxy<int> TextView::property_indent()
+{
+ return Glib::PropertyProxy<int>(this, "indent");
+}
+
+Glib::PropertyProxy_ReadOnly<int> TextView::property_indent() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "indent");
+}
+
+Glib::PropertyProxy<Pango::TabArray> TextView::property_tabs()
+{
+ return Glib::PropertyProxy<Pango::TabArray>(this, "tabs");
+}
+
+Glib::PropertyProxy_ReadOnly<Pango::TabArray> TextView::property_tabs() const
+{
+ return Glib::PropertyProxy_ReadOnly<Pango::TabArray>(this, "tabs");
+}
+
+Glib::PropertyProxy<bool> TextView::property_cursor_visible()
+{
+ return Glib::PropertyProxy<bool>(this, "cursor-visible");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> TextView::property_cursor_visible() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "cursor-visible");
+}
+
+Glib::PropertyProxy< Glib::RefPtr<TextBuffer> > TextView::property_buffer()
+{
+ return Glib::PropertyProxy< Glib::RefPtr<TextBuffer> >(this, "buffer");
+}
+
+Glib::PropertyProxy_ReadOnly< Glib::RefPtr<TextBuffer> > TextView::property_buffer() const
+{
+ return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<TextBuffer> >(this, "buffer");
+}
+
+Glib::PropertyProxy<bool> TextView::property_overwrite()
+{
+ return Glib::PropertyProxy<bool>(this, "overwrite");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> TextView::property_overwrite() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "overwrite");
+}
+
+Glib::PropertyProxy<bool> TextView::property_accepts_tab()
+{
+ return Glib::PropertyProxy<bool>(this, "accepts-tab");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> TextView::property_accepts_tab() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "accepts-tab");
+}
+
+
+void Gtk::TextView::on_set_scroll_adjustments(Adjustment* hadjustment, Adjustment* vadjustment)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->set_scroll_adjustments)
+ (*base->set_scroll_adjustments)(gobj(),(GtkAdjustment*)Glib::unwrap(hadjustment),(GtkAdjustment*)Glib::unwrap(vadjustment));
+}
+
+void Gtk::TextView::on_populate_popup(Menu* menu)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->populate_popup)
+ (*base->populate_popup)(gobj(),(GtkMenu*)Glib::unwrap(menu));
+}
+
+void Gtk::TextView::on_set_anchor()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->set_anchor)
+ (*base->set_anchor)(gobj());
+}
+
+void Gtk::TextView::on_insert_at_cursor(const Glib::ustring& str)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->insert_at_cursor)
+ (*base->insert_at_cursor)(gobj(),str.c_str());
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/textview.h b/libs/gtkmm2/gtk/gtkmm/textview.h
new file mode 100644
index 0000000000..aee4dc44b7
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/textview.h
@@ -0,0 +1,960 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TEXTVIEW_H
+#define _GTKMM_TEXTVIEW_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright(C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or(at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/container.h>
+#include <gtkmm/textbuffer.h>
+#include <gtkmm/textmark.h>
+#include <gtkmm/menu.h>
+#include <gtkmm/adjustment.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkTextView GtkTextView;
+typedef struct _GtkTextViewClass GtkTextViewClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class TextView_Class; } // namespace Gtk
+namespace Gtk
+{
+
+
+/** @addtogroup gtkmmEnums Enums and Flags */
+
+/**
+ * @ingroup gtkmmEnums
+ */
+enum TextWindowType
+{
+ TEXT_WINDOW_PRIVATE,
+ TEXT_WINDOW_WIDGET,
+ TEXT_WINDOW_TEXT,
+ TEXT_WINDOW_LEFT,
+ TEXT_WINDOW_RIGHT,
+ TEXT_WINDOW_TOP,
+ TEXT_WINDOW_BOTTOM
+};
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::TextWindowType> : public Glib::Value_Enum<Gtk::TextWindowType>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+
+/** @defgroup TextView TextView Classes
+ * These classes are used with the Gtk::TextView widget.
+ */
+
+/** Multi-line text editing widget. It displays a Gtk::TextBuffer.
+ *
+ * @ingroup Widgets
+ * @ingroup Containers
+ * @ingroup TextView
+ */
+
+class TextView : public Container
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef TextView CppObjectType;
+ typedef TextView_Class CppClassType;
+ typedef GtkTextView BaseObjectType;
+ typedef GtkTextViewClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~TextView();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class TextView_Class;
+ static CppClassType textview_class_;
+
+ // noncopyable
+ TextView(const TextView&);
+ TextView& operator=(const TextView&);
+
+protected:
+ explicit TextView(const Glib::ConstructParams& construct_params);
+ explicit TextView(GtkTextView* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkTextView* gobj() { return reinterpret_cast<GtkTextView*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkTextView* gobj() const { return reinterpret_cast<GtkTextView*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_set_scroll_adjustments(Adjustment* hadjustment, Adjustment* vadjustment);
+ virtual void on_populate_popup(Menu* menu);
+ virtual void on_set_anchor();
+ virtual void on_insert_at_cursor(const Glib::ustring& str);
+
+
+private:
+
+public:
+ TextView();
+ explicit TextView(const Glib::RefPtr<TextBuffer>& buffer);
+
+
+ /** Sets @a buffer as the buffer being displayed by @a text_view . The previous
+ * buffer displayed by the text view is unreferenced, and a reference is
+ * added to @a buffer . If you owned a reference to @a buffer before passing it
+ * to this function, you must remove that reference yourself; Gtk::TextView
+ * will not "adopt" it.
+ * @param buffer A Gtk::TextBuffer.
+ */
+ void set_buffer(const Glib::RefPtr<TextBuffer>& buffer);
+
+ /** Returns the Gtk::TextBuffer being displayed by this text view.
+ * The reference count on the buffer is not incremented; the caller
+ * of this function won't own a new reference.
+ * @return A Gtk::TextBuffer.
+ */
+ Glib::RefPtr<TextBuffer> get_buffer();
+
+ /** Returns the Gtk::TextBuffer being displayed by this text view.
+ * The reference count on the buffer is not incremented; the caller
+ * of this function won't own a new reference.
+ * @return A Gtk::TextBuffer.
+ */
+ Glib::RefPtr<const TextBuffer> get_buffer() const;
+
+ #ifndef GTKMM_DISABLE_DEPRECATED
+ /** @deprecated Use scroll_to().
+ */
+ bool scroll_to_iter(TextBuffer::iterator& iter, double within_margin);
+
+ /** @deprecated Use scroll_to().
+ */
+ void scroll_to_mark(const Glib::RefPtr<TextBuffer::Mark>& mark, double within_margin);
+
+ /** @deprecated Use scroll_to()
+ */
+ void scroll_mark_onscreen(const Glib::RefPtr<TextBuffer::Mark>& mark);
+
+ #endif //GTKMM_DISABLE_DEPRECATED
+
+ /** Scrolls the TextView so that @a iter is on the screen, by scrolling the minimal distance to get the mark onscreen,
+ * possibly not scrolling at all. The effective screen for purposes of this function is reduced by a margin of size
+ * @a within_margin.
+ * @note This function uses the currently-computed height of the lines in the text buffer. Note that line heights are computed
+ * in an idle handler; so this function may not have the desired effect if it's called before the height computations. To avoid
+ * oddness, consider using gtk_text_view_scroll_to_mark() which saves a point to be scrolled to after line validation.
+ *
+ * @param iter An iterator pointing to the position that should be made visible by scrolling.
+ * @param within_margin margin as a [0.0,0.5] fraction of screen size.
+ * @result true if scrolling occurred.
+ */
+ bool scroll_to(TextBuffer::iterator& iter, double within_margin = 0);
+
+ /** Scrolls the TextView so that @a iter is on the screen, in the position indicated by xalign and yalign,
+ * possibly not scrolling at all. The effective screen for purposes of this function is reduced by a margin of size
+ * @a within_margin.
+ * @note This function uses the currently-computed height of the lines in the text buffer. Note that line heights are computed
+ * in an idle handler; so this function may not have the desired effect if it's called before the height computations. To avoid
+ * oddness, consider using gtk_text_view_scroll_to_mark() which saves a point to be scrolled to after line validation.
+ *
+ * @param iter An iterator pointing to the position that should be made visible by scrolling.
+ * @param within_margin margin as a [0.0,0.5] fraction of screen size.
+ * @param xalign horizontal alignment of mark within visible area. An alignment of 0.0 indicates left, 1.0 indicates right, 0.5 means center.
+ * @param yalign vertical alignment of mark within visible area. An alignment of 0.0 indicates top, 1.0 indicates bottom, 0.5 means center.
+ * @result true if scrolling occurred.
+ */
+ bool scroll_to(TextBuffer::iterator& iter, double within_margin, double xalign, double yalign);
+
+
+ /** Scrolls text_view so that @a mark is on the screen, by scrolling the minimal distance to get the mark onscreen,
+ * possibly not scrolling at all. The effective screen for purposes of this function is reduced by a margin of size
+ * @a within_margin.
+ *
+ * @param mark An mark pointing to the position that should be made visible by scrolling.
+ * @param within_margin margin as a [0.0,0.5] fraction of screen size.
+ */
+ void scroll_to(const Glib::RefPtr<TextBuffer::Mark>& mark, double within_margin = 0);
+
+ /** Scrolls the TextView so that @a iter is on the screen, in the position indicated by xalign and yalign,
+ * possibly not scrolling at all. The effective screen for purposes of this function is reduced by a margin of size
+ * @a within_margin.
+ *
+ * @param mark An mark pointing to the position that should be made visible by scrolling.
+ * @param within_margin margin as a [0.0,0.5] fraction of screen size.
+ * @param xalign horizontal alignment of mark within visible area. An alignment of 0.0 indicates left, 1.0 indicates right, 0.5 means center.
+ * @param yalign vertical alignment of mark within visible area. An alignment of 0.0 indicates top, 1.0 indicates bottom, 0.5 means center.
+ */
+ void scroll_to(const Glib::RefPtr<TextBuffer::Mark>& mark, double within_margin, double xalign, double yalign);
+
+
+ //It does not do anything more than the default scroll_to(mark).
+
+
+ /** Moves a mark within the buffer so that it's
+ * located within the currently-visible text area.
+ * @param mark A Gtk::TextMark.
+ * @return <tt>true</tt> if the mark moved (wasn't already onscreen).
+ */
+ bool move_mark_onscreen(const Glib::RefPtr<TextBuffer::Mark>& mark);
+
+ /** Moves the cursor to the currently visible region of the
+ * buffer, it it isn't there already.
+ * @return <tt>true</tt> if the cursor had to be moved.
+ */
+ bool place_cursor_onscreen();
+
+
+ /** Fills @a visible_rect with the currently-visible
+ * region of the buffer, in buffer coordinates. Convert to window coordinates
+ * with buffer_to_window_coords().
+ * @param visible_rect Rectangle to fill.
+ */
+ void get_visible_rect(Gdk::Rectangle& visible_rect) const;
+
+ /** Toggles whether the insertion point is displayed. A buffer with no editable
+ * text probably shouldn't have a visible cursor, so you may want to turn
+ * the cursor off.
+ * @param setting Whether to show the insertion cursor.
+ */
+ void set_cursor_visible(bool setting = true);
+
+ /** Find out whether the cursor is being displayed.
+ * @return Whether the insertion mark is visible.
+ */
+ bool get_cursor_visible() const;
+
+
+ /** Gets a rectangle which roughly contains the character at @a iter .
+ * The rectangle position is in buffer coordinates; use
+ * buffer_to_window_coords() to convert these
+ * coordinates to coordinates for one of the windows in the text view.
+ * @param iter A Gtk::TextIter.
+ * @param location Bounds of the character at @a iter .
+ */
+ void get_iter_location(const TextBuffer::iterator& iter, Gdk::Rectangle& location) const;
+
+ /** Retrieves the iterator at buffer coordinates @a x and @a y . Buffer
+ * coordinates are coordinates for the entire buffer, not just the
+ * currently-displayed portion. If you have coordinates from an
+ * event, you have to convert those to buffer coordinates with
+ * window_to_buffer_coords().
+ * @param iter A Gtk::TextIter.
+ * @param x X position, in buffer coordinates.
+ * @param y Y position, in buffer coordinates.
+ */
+ void get_iter_at_location(TextBuffer::iterator& iter, int x, int y) const;
+
+ /** Retrieves the iterator pointing to the character at buffer
+ * coordinates @a x and @a y . Buffer coordinates are coordinates for
+ * the entire buffer, not just the currently-displayed portion.
+ * If you have coordinates from an event, you have to convert
+ * those to buffer coordinates with
+ * window_to_buffer_coords().
+ *
+ * Note that this is diffferent from get_iter_at_location(),
+ * which returns cursor locations, i.e. positions <em>between</em>
+ * characters.
+ *
+ * Since: 2.6
+ * @param iter A Gtk::TextIter.
+ * @param x X position, in buffer coordinates.
+ * @param y Y position, in buffer coordinates.
+ */
+ void get_iter_at_position(TextBuffer::iterator& iter, int& trailing, int x, int y) const;
+
+ /** Gets the y coordinate of the top of the line containing @a iter ,
+ * and the height of the line. The coordinate is a buffer coordinate;
+ * convert to window coordinates with buffer_to_window_coords().
+ * @param iter A Gtk::TextIter.
+ * @param y Return location for a y coordinate.
+ * @param height Return location for a height.
+ */
+ void get_line_yrange(const TextBuffer::iterator& iter, int& y, int& height) const;
+
+
+ /** Gets the Gtk::TextIter at the start of the line containing
+ * the coordinate @a y . @a y is in buffer coordinates, convert from
+ * window coordinates with window_to_buffer_coords().
+ * If non-<tt>0</tt>, @a line_top will be filled with the coordinate of the top
+ * edge of the line.
+ * @param target_iter A Gtk::TextIter.
+ * @param y A y coordinate.
+ * @param line_top Return location for top coordinate of the line.
+ */
+ void get_line_at_y(TextBuffer::iterator& target_iter, int y, int& line_top) const;
+
+
+ /** Converts coordinate ( @a buffer_x , @a buffer_y ) to coordinates for the window
+ * @a win , and stores the result in ( @a window_x , @a window_y ).
+ *
+ * Note that you can't convert coordinates for a nonexisting window (see
+ * set_border_window_size()).
+ * @param win A Gtk::TextWindowType except Gtk::TEXT_WINDOW_PRIVATE.
+ * @param buffer_x Buffer x coordinate.
+ * @param buffer_y Buffer y coordinate.
+ * @param window_x Window x coordinate return location.
+ * @param window_y Window y coordinate return location.
+ */
+ void buffer_to_window_coords(TextWindowType win,
+ int buffer_x, int buffer_y,
+ int& window_x, int& window_y) const;
+
+ /** Converts coordinates on the window identified by @a win to buffer
+ * coordinates, storing the result in ( @a buffer_x , @a buffer_y ).
+ *
+ * Note that you can't convert coordinates for a nonexisting window (see
+ * set_border_window_size()).
+ * @param win A Gtk::TextWindowType except Gtk::TEXT_WINDOW_PRIVATE.
+ * @param window_x Window x coordinate.
+ * @param window_y Window y coordinate.
+ * @param buffer_x Buffer x coordinate return location.
+ * @param buffer_y Buffer y coordinate return location.
+ */
+ void window_to_buffer_coords(TextWindowType win,
+ int window_x, int window_y,
+ int& buffer_x, int& buffer_y) const;
+
+
+ /** Retrieves the Gdk::Window corresponding to an area of the text view;
+ * possible windows include the overall widget window, child windows
+ * on the left, right, top, bottom, and the window that displays the
+ * text buffer. Windows are <tt>0</tt> and nonexistent if their width or
+ * height is 0, and are nonexistent before the widget has been
+ * realized.
+ * @param win Window to get.
+ * @return A Gdk::Window, or <tt>0</tt>.
+ */
+ Glib::RefPtr<Gdk::Window> get_window(TextWindowType win);
+
+ /** Retrieves the Gdk::Window corresponding to an area of the text view;
+ * possible windows include the overall widget window, child windows
+ * on the left, right, top, bottom, and the window that displays the
+ * text buffer. Windows are <tt>0</tt> and nonexistent if their width or
+ * height is 0, and are nonexistent before the widget has been
+ * realized.
+ * @param win Window to get.
+ * @return A Gdk::Window, or <tt>0</tt>.
+ */
+ Glib::RefPtr<const Gdk::Window> get_window(TextWindowType win) const;
+
+ /** Usually used to find out which window an event corresponds to.
+ * If you connect to an event signal on @a text_view , this function
+ * should be called on <tt>event->window</tt> to
+ * see which window it was.
+ * @param window A window type.
+ * @return The window type.
+ */
+ TextWindowType get_window_type(const Glib::RefPtr<Gdk::Window>& window);
+
+
+ /** Sets the width of Gtk::TEXT_WINDOW_LEFT or Gtk::TEXT_WINDOW_RIGHT,
+ * or the height of Gtk::TEXT_WINDOW_TOP or Gtk::TEXT_WINDOW_BOTTOM.
+ * Automatically destroys the corresponding window if the size is set
+ * to 0, and creates the window if the size is set to non-zero. This
+ * function can only be used for the "border windows," it doesn't work
+ * with Gtk::TEXT_WINDOW_WIDGET, Gtk::TEXT_WINDOW_TEXT, or
+ * Gtk::TEXT_WINDOW_PRIVATE.
+ * @param type Window to affect.
+ * @param size Width or height of the window.
+ */
+ void set_border_window_size(TextWindowType type, int size);
+
+ /** Gets the width of the specified border window. See
+ * set_border_window_size().
+ * @param type Window to return size from.
+ * @return Width of window.
+ */
+ int get_border_window_size(TextWindowType type) const;
+
+
+ /** Moves the given @a iter forward by one display (wrapped) line. A
+ * display line is different from a paragraph. Paragraphs are
+ * separated by newlines or other paragraph separator characters.
+ * Display lines are created by line-wrapping a paragraph. If
+ * wrapping is turned off, display lines and paragraphs will be the
+ * same. Display lines are divided differently for each view, since
+ * they depend on the view's width; paragraphs are the same in all
+ * views, since they depend on the contents of the Gtk::TextBuffer.
+ * @param iter A Gtk::TextIter.
+ * @return <tt>true</tt> if @a iter was moved and is not on the end iterator.
+ */
+ bool forward_display_line(TextBuffer::iterator& iter);
+
+ /** Moves the given @a iter backward by one display (wrapped) line. A
+ * display line is different from a paragraph. Paragraphs are
+ * separated by newlines or other paragraph separator characters.
+ * Display lines are created by line-wrapping a paragraph. If
+ * wrapping is turned off, display lines and paragraphs will be the
+ * same. Display lines are divided differently for each view, since
+ * they depend on the view's width; paragraphs are the same in all
+ * views, since they depend on the contents of the Gtk::TextBuffer.
+ * @param iter A Gtk::TextIter.
+ * @return <tt>true</tt> if @a iter was moved and is not on the end iterator.
+ */
+ bool backward_display_line(TextBuffer::iterator& iter);
+
+ /** Moves the given @a iter forward to the next display line end. A
+ * display line is different from a paragraph. Paragraphs are
+ * separated by newlines or other paragraph separator characters.
+ * Display lines are created by line-wrapping a paragraph. If
+ * wrapping is turned off, display lines and paragraphs will be the
+ * same. Display lines are divided differently for each view, since
+ * they depend on the view's width; paragraphs are the same in all
+ * views, since they depend on the contents of the Gtk::TextBuffer.
+ * @param iter A Gtk::TextIter.
+ * @return <tt>true</tt> if @a iter was moved and is not on the end iterator.
+ */
+ bool forward_display_line_end(TextBuffer::iterator& iter);
+
+ /** Moves the given @a iter backward to the next display line start. A
+ * display line is different from a paragraph. Paragraphs are
+ * separated by newlines or other paragraph separator characters.
+ * Display lines are created by line-wrapping a paragraph. If
+ * wrapping is turned off, display lines and paragraphs will be the
+ * same. Display lines are divided differently for each view, since
+ * they depend on the view's width; paragraphs are the same in all
+ * views, since they depend on the contents of the Gtk::TextBuffer.
+ * @param iter A Gtk::TextIter.
+ * @return <tt>true</tt> if @a iter was moved and is not on the end iterator.
+ */
+ bool backward_display_line_start(TextBuffer::iterator& iter);
+
+ /** Determines whether @a iter is at the start of a display line.
+ * See forward_display_line() for an explanation of
+ * display lines vs. paragraphs.
+ * @param iter A Gtk::TextIter.
+ * @return <tt>true</tt> if @a iter begins a wrapped line.
+ */
+ bool starts_display_line(const TextBuffer::iterator& iter);
+
+ /** Move the iterator a given number of characters visually, treating
+ * it as the strong cursor position. If @a count is positive, then the
+ * new strong cursor position will be @a count positions to the right of
+ * the old cursor position. If @a count is negative then the new strong
+ * cursor position will be @a count positions to the left of the old
+ * cursor position.
+ *
+ * In the presence of bidirection text, the correspondence
+ * between logical and visual order will depend on the direction
+ * of the current run, and there may be jumps when the cursor
+ * is moved off of the end of a run.
+ * @param iter A Gtk::TextIter.
+ * @param count Number of characters to move (negative moves left, positive moves right).
+ * @return <tt>true</tt> if @a iter moved and is not on the end iterator.
+ */
+ bool move_visually(TextBuffer::iterator& iter, int count);
+
+
+ /** Adds a child widget in the text buffer, at the given @a anchor .
+ * @param child A Gtk::Widget.
+ * @param anchor A Gtk::TextChildAnchor in the Gtk::TextBuffer for @a text_view .
+ */
+ void add_child_at_anchor(Widget& child, const Glib::RefPtr<TextBuffer::ChildAnchor>& anchor);
+
+
+ /** Adds a child at fixed coordinates in one of the text widget's
+ * windows. The window must have nonzero size (see
+ * set_border_window_size()). Note that the child
+ * coordinates are given relative to the Gdk::Window in question, and
+ * that these coordinates have no sane relationship to scrolling. When
+ * placing a child in Gtk::TEXT_WINDOW_WIDGET, scrolling is
+ * irrelevant, the child floats above all scrollable areas. But when
+ * placing a child in one of the scrollable windows (border windows or
+ * text window), you'll need to compute the child's correct position
+ * in buffer coordinates any time scrolling occurs or buffer changes
+ * occur, and then call move_child() to update the
+ * child's position. Unfortunately there's no good way to detect that
+ * scrolling has occurred, using the current API; a possible hack
+ * would be to update all child positions when the scroll adjustments
+ * change or the text buffer changes. See bug 64518 on
+ * bugzilla.gnome.org for status of fixing this issue.
+ * @param child A Gtk::Widget.
+ * @param which_window Which window the child should appear in.
+ * @param xpos X position of child in window coordinates.
+ * @param ypos Y position of child in window coordinates.
+ */
+ void add_child_in_window(Widget& child, TextWindowType which_window,
+ int xpos, int ypos);
+
+
+ /** Updates the position of a child, as for add_child_in_window().
+ * @param child Child widget already added to the text view.
+ * @param xpos New X position in window coordinates.
+ * @param ypos New Y position in window coordinates.
+ */
+ void move_child(Widget& child, int xpos,int ypos);
+
+
+ /** Sets the line wrapping for the view.
+ * @param wrap_mode A Gtk::WrapMode.
+ */
+ void set_wrap_mode(WrapMode wrap_mode);
+
+ /** Gets the line wrapping for the view.
+ * @return The line wrap setting.
+ */
+ WrapMode get_wrap_mode() const;
+
+ /** Sets the default editability of the Gtk::TextView. You can override
+ * this default setting with tags in the buffer, using the "editable"
+ * attribute of tags.
+ * @param setting Whether it's editable.
+ */
+ void set_editable(bool setting = true);
+
+ /** Returns the default editability of the Gtk::TextView. Tags in the
+ * buffer may override this setting for some ranges of text.
+ * @return Whether text is editable by default.
+ */
+ bool get_editable() const;
+
+ /** Sets the default number of blank pixels above paragraphs in @a text_view .
+ * Tags in the buffer for @a text_view may override the defaults.
+ * @param pixels_above_lines Pixels above paragraphs.
+ */
+ void set_pixels_above_lines(int pixels_above_lines);
+
+ /** Gets the default number of pixels to put above paragraphs.
+ * @return Default number of pixels above paragraphs.
+ */
+ int get_pixels_above_lines() const;
+
+ /** Sets the default number of pixels of blank space
+ * to put below paragraphs in @a text_view . May be overridden
+ * by tags applied to @a text_view 's buffer.
+ * @param pixels_below_lines Pixels below paragraphs.
+ */
+ void set_pixels_below_lines(int pixels_below_lines);
+
+ /** Gets the value set by set_pixels_below_lines().
+ * @return Default number of blank pixels below paragraphs.
+ */
+ int get_pixels_below_lines() const;
+
+ /** Sets the default number of pixels of blank space to leave between
+ * display/wrapped lines within a paragraph. May be overridden by
+ * tags in @a text_view 's buffer.
+ * @param pixels_inside_wrap Default number of pixels between wrapped lines.
+ */
+ void set_pixels_inside_wrap(int pixels_inside_wrap);
+
+ /** Gets the value set by set_pixels_inside_wrap().
+ * @return Default number of pixels of blank space between wrapped lines.
+ */
+ int get_pixels_inside_wrap() const;
+
+ /** Sets the default justification of text in @a text_view .
+ * Tags in the view's buffer may override the default.
+ * @param justification Justification.
+ */
+ void set_justification(Justification justification);
+
+ /** Gets the default justification of paragraphs in @a text_view .
+ * Tags in the buffer may override the default.
+ * @return Default justification.
+ */
+ Justification get_justification() const;
+
+ /** Sets the default left margin for text in @a text_view .
+ * Tags in the buffer may override the default.
+ * @param left_margin Left margin in pixels.
+ */
+ void set_left_margin(int left_margin);
+
+ /** Gets the default left margin size of paragraphs in the @a text_view .
+ * Tags in the buffer may override the default.
+ * @return Left margin in pixels.
+ */
+ int get_left_margin() const;
+
+ /** Sets the default right margin for text in the text view.
+ * Tags in the buffer may override the default.
+ * @param right_margin Right margin in pixels.
+ */
+ void set_right_margin(int right_margin);
+
+ /** Gets the default right margin for text in @a text_view . Tags
+ * in the buffer may override the default.
+ * @return Right margin in pixels.
+ */
+ int get_right_margin() const;
+
+ /** Sets the default indentation for paragraphs in @a text_view .
+ * Tags in the buffer may override the default.
+ * @param indent Indentation in pixels.
+ */
+ void set_indent(int indent);
+
+ /** Gets the default indentation of paragraphs in @a text_view .
+ * Tags in the view's buffer may override the default.
+ * The indentation may be negative.
+ * @return Number of pixels of indentation.
+ */
+ int get_indent() const;
+
+ /** Sets the default tab stops for paragraphs in @a text_view .
+ * Tags in the buffer may override the default.
+ * @param tabs Tabs as a Pango::TabArray.
+ */
+ void set_tabs(Pango::TabArray& tabs);
+
+ /** Gets the default tabs for @a text_view . Tags in the buffer may
+ * override the defaults. The returned array will be <tt>0</tt> if
+ * "standard" (8-space) tabs are used.
+ * @return Copy of default tab array, or <tt>0</tt> if "standard" tabs are used.
+ */
+ Pango::TabArray get_tabs() const;
+
+ /** Obtains a copy of the default text attributes. These are the
+ * attributes used for text unless a tag overrides them.
+ * You'd typically pass the default attributes in to
+ * Gtk::TextIter::get_attributes() in order to get the
+ * attributes in effect at a given text position.
+ * @return A new #Gtk::TextAttributes.
+ */
+ TextAttributes get_default_attributes() const;
+
+
+ /** Changes the Gtk::TextView overwrite mode.
+ *
+ * Since: 2.4
+ * @param overwrite <tt>true</tt> to turn on overwrite mode, <tt>false</tt> to turn it off.
+ */
+ void set_overwrite(bool overwrite = true);
+
+ /** Returns whether the Gtk::TextView is in overwrite mode or not.
+ * @return Whether @a text_view is in overwrite mode or not.
+ *
+ * Since: 2.4.
+ */
+ bool get_overwrite() const;
+
+
+ /** Sets the behavior of the text widget when the Tab key is pressed. If @a accepts_tab
+ * is <tt>true</tt> a tab character is inserted. If @a accepts_tab is <tt>false</tt> the keyboard focus
+ * is moved to the next widget in the focus chain.
+ *
+ * Since: 2.4
+ * @param accepts_tab <tt>true</tt> if pressing the Tab key should insert a tab character, <tt>false</tt>, if pressing the Tab key should move the keyboard focus.
+ */
+ void set_accepts_tab(bool accepts_tab = true);
+
+ /** Returns whether pressing the Tab key inserts a tab characters.
+ * set_accepts_tab().
+ * @return <tt>true</tt> if pressing the Tab key inserts a tab character, <tt>false</tt> if pressing the Tab key moves the keyboard focus.
+ *
+ * Since: 2.4.
+ */
+ bool get_accepts_tab() const;
+
+
+ Glib::SignalProxy2< void,Adjustment*,Adjustment* > signal_set_scroll_adjustments();
+
+
+ Glib::SignalProxy1< void,Menu* > signal_populate_popup();
+
+
+ Glib::SignalProxy0< void > signal_set_anchor();
+
+
+ Glib::SignalProxy1< void,const Glib::ustring& > signal_insert_at_cursor();
+
+
+ //Keybinding signals:
+
+
+ /** Pixels of blank space above paragraphs.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_pixels_above_lines() ;
+
+/** Pixels of blank space above paragraphs.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_pixels_above_lines() const;
+
+ /** Pixels of blank space below paragraphs.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_pixels_below_lines() ;
+
+/** Pixels of blank space below paragraphs.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_pixels_below_lines() const;
+
+ /** Pixels of blank space between wrapped lines in a paragraph.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_pixels_inside_wrap() ;
+
+/** Pixels of blank space between wrapped lines in a paragraph.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_pixels_inside_wrap() const;
+
+ /** Whether the text can be modified by the user.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_editable() ;
+
+/** Whether the text can be modified by the user.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_editable() const;
+
+ /** Whether to wrap lines never
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<WrapMode> property_wrap_mode() ;
+
+/** Whether to wrap lines never
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<WrapMode> property_wrap_mode() const;
+
+ /** Left
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Justification> property_justification() ;
+
+/** Left
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Justification> property_justification() const;
+
+ /** Width of the left margin in pixels.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_left_margin() ;
+
+/** Width of the left margin in pixels.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_left_margin() const;
+
+ /** Width of the right margin in pixels.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_right_margin() ;
+
+/** Width of the right margin in pixels.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_right_margin() const;
+
+ /** Amount to indent the paragraph
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_indent() ;
+
+/** Amount to indent the paragraph
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_indent() const;
+
+ /** Custom tabs for this text.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Pango::TabArray> property_tabs() ;
+
+/** Custom tabs for this text.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Pango::TabArray> property_tabs() const;
+
+ /** If the insertion cursor is shown.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_cursor_visible() ;
+
+/** If the insertion cursor is shown.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_cursor_visible() const;
+
+ /** The buffer which is displayed.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy< Glib::RefPtr<TextBuffer> > property_buffer() ;
+
+/** The buffer which is displayed.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly< Glib::RefPtr<TextBuffer> > property_buffer() const;
+
+ /** Whether entered text overwrites existing contents.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_overwrite() ;
+
+/** Whether entered text overwrites existing contents.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_overwrite() const;
+
+ /** Whether Tab will result in a tab character being entered.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_accepts_tab() ;
+
+/** Whether Tab will result in a tab character being entered.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_accepts_tab() const;
+
+
+};
+
+} /* namespace Gtk */
+
+
+namespace Glib
+{
+ /** @relates Gtk::TextView
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::TextView* wrap(GtkTextView* object, bool take_copy = false);
+}
+#endif /* _GTKMM_TEXTVIEW_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/toggleaction.cc b/libs/gtkmm2/gtk/gtkmm/toggleaction.cc
new file mode 100644
index 0000000000..f9892927db
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/toggleaction.cc
@@ -0,0 +1,257 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/toggleaction.h>
+#include <gtkmm/private/toggleaction_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 2003 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtktoggleaction.h>
+
+
+namespace Gtk
+{
+
+ToggleAction::ToggleAction(const Glib::ustring& name, const Gtk::StockID& stock_id, const Glib::ustring& label, const Glib::ustring& tooltip, bool is_active)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Action(Glib::ConstructParams(toggleaction_class_.init(), "name",name.c_str(),"stock_id",stock_id.get_c_str(),"label",(label.empty() ? 0 : label.c_str()),"tooltip",(tooltip.empty() ? 0 : tooltip.c_str()), (char*) 0))
+{
+ set_active(is_active);
+}
+
+Glib::RefPtr<ToggleAction> ToggleAction::create(const Glib::ustring& name, const Glib::ustring& label, const Glib::ustring& tooltip, bool is_active)
+{
+ return Glib::RefPtr<ToggleAction>( new ToggleAction(name, Gtk::StockID(), label, tooltip, is_active) );
+}
+
+Glib::RefPtr<ToggleAction> ToggleAction::create(const Glib::ustring& name, const Gtk::StockID& stock_id, const Glib::ustring& label, const Glib::ustring& tooltip, bool is_active)
+{
+ return Glib::RefPtr<ToggleAction>( new ToggleAction(name, stock_id, label, tooltip, is_active) );
+}
+
+
+} // namespace Gtk
+
+
+namespace
+{
+
+const Glib::SignalProxyInfo ToggleAction_signal_toggled_info =
+{
+ "toggled",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Gtk::ToggleAction> wrap(GtkToggleAction* object, bool take_copy)
+{
+ return Glib::RefPtr<Gtk::ToggleAction>( dynamic_cast<Gtk::ToggleAction*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} /* namespace Glib */
+
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& ToggleAction_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &ToggleAction_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_toggle_action_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void ToggleAction_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->toggled = &toggled_callback;
+}
+
+
+void ToggleAction_Class::toggled_callback(GtkToggleAction* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_toggled();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->toggled)
+ (*base->toggled)(self);
+ }
+}
+
+
+Glib::ObjectBase* ToggleAction_Class::wrap_new(GObject* object)
+{
+ return new ToggleAction((GtkToggleAction*)object);
+}
+
+
+/* The implementation: */
+
+GtkToggleAction* ToggleAction::gobj_copy()
+{
+ reference();
+ return gobj();
+}
+
+ToggleAction::ToggleAction(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Action(construct_params)
+{}
+
+ToggleAction::ToggleAction(GtkToggleAction* castitem)
+:
+ Gtk::Action((GtkAction*)(castitem))
+{}
+
+ToggleAction::~ToggleAction()
+{}
+
+
+ToggleAction::CppClassType ToggleAction::toggleaction_class_; // initialize static member
+
+GType ToggleAction::get_type()
+{
+ return toggleaction_class_.init().get_type();
+}
+
+GType ToggleAction::get_base_type()
+{
+ return gtk_toggle_action_get_type();
+}
+
+
+ToggleAction::ToggleAction()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Action(Glib::ConstructParams(toggleaction_class_.init()))
+{
+ }
+
+Glib::RefPtr<ToggleAction> ToggleAction::create()
+{
+ return Glib::RefPtr<ToggleAction>( new ToggleAction() );
+}
+void ToggleAction::toggled()
+{
+ gtk_toggle_action_toggled(gobj());
+}
+
+void ToggleAction::set_active(bool is_active)
+{
+ gtk_toggle_action_set_active(gobj(), static_cast<int>(is_active));
+}
+
+bool ToggleAction::get_active() const
+{
+ return gtk_toggle_action_get_active(const_cast<GtkToggleAction*>(gobj()));
+}
+
+void ToggleAction::set_draw_as_radio(bool draw_as_radio)
+{
+ gtk_toggle_action_set_draw_as_radio(gobj(), static_cast<int>(draw_as_radio));
+}
+
+bool ToggleAction::get_draw_as_radio() const
+{
+ return gtk_toggle_action_get_draw_as_radio(const_cast<GtkToggleAction*>(gobj()));
+}
+
+
+Glib::SignalProxy0< void > ToggleAction::signal_toggled()
+{
+ return Glib::SignalProxy0< void >(this, &ToggleAction_signal_toggled_info);
+}
+
+
+Glib::PropertyProxy<bool> ToggleAction::property_draw_as_radio()
+{
+ return Glib::PropertyProxy<bool>(this, "draw-as-radio");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> ToggleAction::property_draw_as_radio() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "draw-as-radio");
+}
+
+
+void Gtk::ToggleAction::on_toggled()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->toggled)
+ (*base->toggled)(gobj());
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/toggleaction.h b/libs/gtkmm2/gtk/gtkmm/toggleaction.h
new file mode 100644
index 0000000000..b44872026e
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/toggleaction.h
@@ -0,0 +1,184 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TOGGLEACTION_H
+#define _GTKMM_TOGGLEACTION_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 2003 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/action.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkToggleAction GtkToggleAction;
+typedef struct _GtkToggleActionClass GtkToggleActionClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class ToggleAction_Class; } // namespace Gtk
+namespace Gtk
+{
+
+
+class ToggleAction : public Gtk::Action
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef ToggleAction CppObjectType;
+ typedef ToggleAction_Class CppClassType;
+ typedef GtkToggleAction BaseObjectType;
+ typedef GtkToggleActionClass BaseClassType;
+
+private: friend class ToggleAction_Class;
+ static CppClassType toggleaction_class_;
+
+private:
+ // noncopyable
+ ToggleAction(const ToggleAction&);
+ ToggleAction& operator=(const ToggleAction&);
+
+protected:
+ explicit ToggleAction(const Glib::ConstructParams& construct_params);
+ explicit ToggleAction(GtkToggleAction* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~ToggleAction();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ GtkToggleAction* gobj() { return reinterpret_cast<GtkToggleAction*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const GtkToggleAction* gobj() const { return reinterpret_cast<GtkToggleAction*>(gobject_); }
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ GtkToggleAction* gobj_copy();
+
+private:
+
+
+protected:
+ ToggleAction();
+ explicit ToggleAction(const Glib::ustring& name, const StockID& stock_id, const Glib::ustring& label = Glib::ustring(), const Glib::ustring& tooltip = Glib::ustring(), bool is_active = false);
+
+public:
+
+ static Glib::RefPtr<ToggleAction> create();
+
+ static Glib::RefPtr<ToggleAction> create(const Glib::ustring& name, const Glib::ustring& label = Glib::ustring(), const Glib::ustring& tooltip = Glib::ustring(), bool is_active = false);
+ static Glib::RefPtr<ToggleAction> create(const Glib::ustring& name, const Gtk::StockID& stock_id, const Glib::ustring& label = Glib::ustring(), const Glib::ustring& tooltip = Glib::ustring(), bool is_active = false);
+
+
+ /** Emits the "toggled" signal on the toggle action.
+ *
+ * Since: 2.4
+ */
+ void toggled();
+
+ /** Sets the checked state on the toggle action.
+ *
+ * Since: 2.4
+ * @param is_active Whether the action should be checked or not.
+ */
+ void set_active(bool is_active = true);
+
+ /** Returns the checked state of the toggle action.
+ * @return The checked state of the toggle action
+ *
+ * Since: 2.4.
+ */
+ bool get_active() const;
+
+ /** Sets whether the action should have proxies like a radio action.
+ *
+ * Since: 2.4
+ * @param draw_as_radio Whether the action should have proxies like a radio
+ * action.
+ */
+ void set_draw_as_radio(bool draw_as_radio = true);
+
+ /** Returns whether the action should have proxies like a radio action.
+ * @return Whether the action should have proxies like a radio action.
+ *
+ * Since: 2.4.
+ */
+ bool get_draw_as_radio() const;
+
+
+ Glib::SignalProxy0< void > signal_toggled();
+
+
+ /** Whether the proxies for this action look like radio action proxies.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_draw_as_radio() ;
+
+/** Whether the proxies for this action look like radio action proxies.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_draw_as_radio() const;
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_toggled();
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::ToggleAction
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Gtk::ToggleAction> wrap(GtkToggleAction* object, bool take_copy = false);
+}
+
+
+#endif /* _GTKMM_TOGGLEACTION_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/togglebutton.cc b/libs/gtkmm2/gtk/gtkmm/togglebutton.cc
new file mode 100644
index 0000000000..e7600d0406
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/togglebutton.cc
@@ -0,0 +1,267 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/togglebutton.h>
+#include <gtkmm/private/togglebutton_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtktogglebutton.h>
+
+namespace Gtk
+{
+
+ToggleButton::ToggleButton(const Glib::ustring& label, bool mnemonic)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Button(Glib::ConstructParams(togglebutton_class_.init(), "label",label.c_str(),"use_underline",gboolean(mnemonic), (char*) 0))
+{}
+
+} // namespace Gtk
+
+
+namespace
+{
+
+const Glib::SignalProxyInfo ToggleButton_signal_toggled_info =
+{
+ "toggled",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::ToggleButton* wrap(GtkToggleButton* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::ToggleButton *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& ToggleButton_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &ToggleButton_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_toggle_button_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void ToggleButton_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->toggled = &toggled_callback;
+}
+
+
+void ToggleButton_Class::toggled_callback(GtkToggleButton* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_toggled();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->toggled)
+ (*base->toggled)(self);
+ }
+}
+
+
+Glib::ObjectBase* ToggleButton_Class::wrap_new(GObject* o)
+{
+ return manage(new ToggleButton((GtkToggleButton*)(o)));
+
+}
+
+
+/* The implementation: */
+
+ToggleButton::ToggleButton(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Button(construct_params)
+{
+ }
+
+ToggleButton::ToggleButton(GtkToggleButton* castitem)
+:
+ Gtk::Button((GtkButton*)(castitem))
+{
+ }
+
+ToggleButton::~ToggleButton()
+{
+ destroy_();
+}
+
+ToggleButton::CppClassType ToggleButton::togglebutton_class_; // initialize static member
+
+GType ToggleButton::get_type()
+{
+ return togglebutton_class_.init().get_type();
+}
+
+GType ToggleButton::get_base_type()
+{
+ return gtk_toggle_button_get_type();
+}
+
+
+ToggleButton::ToggleButton()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Button(Glib::ConstructParams(togglebutton_class_.init()))
+{
+ }
+
+void ToggleButton::set_mode(bool draw_indicator)
+{
+ gtk_toggle_button_set_mode(gobj(), static_cast<int>(draw_indicator));
+}
+
+bool ToggleButton::get_mode() const
+{
+ return gtk_toggle_button_get_mode(const_cast<GtkToggleButton*>(gobj()));
+}
+
+void ToggleButton::set_active(bool is_active)
+{
+ gtk_toggle_button_set_active(gobj(), static_cast<int>(is_active));
+}
+
+bool ToggleButton::get_active() const
+{
+ return gtk_toggle_button_get_active(const_cast<GtkToggleButton*>(gobj()));
+}
+
+void ToggleButton::set_inconsistent(bool setting)
+{
+ gtk_toggle_button_set_inconsistent(gobj(), static_cast<int>(setting));
+}
+
+bool ToggleButton::get_inconsistent() const
+{
+ return gtk_toggle_button_get_inconsistent(const_cast<GtkToggleButton*>(gobj()));
+}
+
+void ToggleButton::toggled()
+{
+ gtk_toggle_button_toggled(gobj());
+}
+
+
+Glib::SignalProxy0< void > ToggleButton::signal_toggled()
+{
+ return Glib::SignalProxy0< void >(this, &ToggleButton_signal_toggled_info);
+}
+
+
+Glib::PropertyProxy<bool> ToggleButton::property_active()
+{
+ return Glib::PropertyProxy<bool>(this, "active");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> ToggleButton::property_active() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "active");
+}
+
+Glib::PropertyProxy<bool> ToggleButton::property_inconsistent()
+{
+ return Glib::PropertyProxy<bool>(this, "inconsistent");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> ToggleButton::property_inconsistent() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "inconsistent");
+}
+
+Glib::PropertyProxy<bool> ToggleButton::property_draw_indicator()
+{
+ return Glib::PropertyProxy<bool>(this, "draw-indicator");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> ToggleButton::property_draw_indicator() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "draw-indicator");
+}
+
+
+void Gtk::ToggleButton::on_toggled()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->toggled)
+ (*base->toggled)(gobj());
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/togglebutton.h b/libs/gtkmm2/gtk/gtkmm/togglebutton.h
new file mode 100644
index 0000000000..df0da34b34
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/togglebutton.h
@@ -0,0 +1,235 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TOGGLEBUTTON_H
+#define _GTKMM_TOGGLEBUTTON_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* togglebutton.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/button.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkToggleButton GtkToggleButton;
+typedef struct _GtkToggleButtonClass GtkToggleButtonClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class ToggleButton_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** A Gtk::ToggleButton will remain 'pressed-in' when clicked. Clicking again will cause the toggle button to return to it's normal state.
+ * The state of a Gtk::ToggleButton can be set specifically using set_active(), and retrieved using get_active().
+ * To simply switch the state of a toggle button, use toggled().
+ *
+ * @ingroup Widgets
+ */
+
+class ToggleButton : public Button
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef ToggleButton CppObjectType;
+ typedef ToggleButton_Class CppClassType;
+ typedef GtkToggleButton BaseObjectType;
+ typedef GtkToggleButtonClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~ToggleButton();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class ToggleButton_Class;
+ static CppClassType togglebutton_class_;
+
+ // noncopyable
+ ToggleButton(const ToggleButton&);
+ ToggleButton& operator=(const ToggleButton&);
+
+protected:
+ explicit ToggleButton(const Glib::ConstructParams& construct_params);
+ explicit ToggleButton(GtkToggleButton* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkToggleButton* gobj() { return reinterpret_cast<GtkToggleButton*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkToggleButton* gobj() const { return reinterpret_cast<GtkToggleButton*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_toggled();
+
+
+private:
+
+public:
+
+ /** Create an empty toggle button.
+ * With an empty button, you can Gtk::Button::add() a widget such as a
+ * Gtk::Pixmap or Gtk::Box.
+ *
+ * If you just wish to add a Gtk::Label, you may want to use the
+ * Gtk::ToggleButton(const Glib::ustring &label) constructor directly
+ * instead.
+ */
+ ToggleButton();
+
+ /** Create a toggle button with a label.
+ * You won't be able
+ * to add a widget to this button since it already contains a Gtk::Label
+ */
+ explicit ToggleButton(const Glib::ustring& label, bool mnemonic = false);
+
+
+ /** Sets whether the button is displayed as a separate indicator and label.
+ * You can call this function on a checkbutton or a radiobutton with
+ * @a draw_indicator = <tt>false</tt> to make the button look like a normal button
+ *
+ * This function only effects instances of classes like Gtk::CheckButton
+ * and Gtk::RadioButton that derive from Gtk::ToggleButton,
+ * not instances of Gtk::ToggleButton itself.
+ * @param draw_indicator If <tt>true</tt>, draw the button as a separate indicator
+ * and label; if <tt>false</tt>, draw the button like a normal button.
+ */
+ void set_mode(bool draw_indicator = true);
+
+ /** Retrieves whether the button is displayed as a separate indicator
+ * and label. See set_mode().
+ * @return <tt>true</tt> if the togglebutton is drawn as a separate indicator
+ * and label.
+ */
+ bool get_mode() const;
+
+
+ void set_active(bool is_active = true);
+
+ bool get_active() const;
+
+
+ /** If the user has selected a range of elements (such as some text or
+ * spreadsheet cells) that are affected by a toggle button, and the
+ * current values in that range are inconsistent, you may want to
+ * display the toggle in an "in between" state. This function turns on
+ * "in between" display. Normally you would turn off the inconsistent
+ * state again if the user toggles the toggle button. This has to be
+ * done manually, set_inconsistent() only affects
+ * visual appearance, it doesn't affect the semantics of the button.
+ * @param setting <tt>true</tt> if state is inconsistent.
+ */
+ void set_inconsistent(bool setting = true);
+
+ /** Gets the value set by set_inconsistent().
+ * @return <tt>true</tt> if the button is displayed as inconsistent, <tt>false</tt> otherwise.
+ */
+ bool get_inconsistent() const;
+
+
+ void toggled();
+
+
+ Glib::SignalProxy0< void > signal_toggled();
+
+
+ /** If the toggle button should be pressed in or not.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_active() ;
+
+/** If the toggle button should be pressed in or not.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_active() const;
+
+ /** If the toggle button is in an in-between state.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_inconsistent() ;
+
+/** If the toggle button is in an in-between state.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_inconsistent() const;
+
+ /** If the toggle part of the button is displayed.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_draw_indicator() ;
+
+/** If the toggle part of the button is displayed.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_draw_indicator() const;
+
+
+};
+
+} /* namespace Gtk */
+
+
+namespace Glib
+{
+ /** @relates Gtk::ToggleButton
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::ToggleButton* wrap(GtkToggleButton* object, bool take_copy = false);
+}
+#endif /* _GTKMM_TOGGLEBUTTON_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/toggletoolbutton.cc b/libs/gtkmm2/gtk/gtkmm/toggletoolbutton.cc
new file mode 100644
index 0000000000..3aadab7948
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/toggletoolbutton.cc
@@ -0,0 +1,226 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/toggletoolbutton.h>
+#include <gtkmm/private/toggletoolbutton_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 2003 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtktoggletoolbutton.h>
+
+namespace Gtk
+{
+
+ToggleToolButton::ToggleToolButton(const Glib::ustring& label)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::ToolButton(Glib::ConstructParams(toggletoolbutton_class_.init(), "label", label.c_str(), (char*) 0))
+{
+}
+
+ToggleToolButton::ToggleToolButton(Widget& icon_widget, const Glib::ustring& label)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::ToolButton(Glib::ConstructParams(toggletoolbutton_class_.init(), "icon_widget", (icon_widget).gobj(), "label", label.c_str(), (char*) 0))
+{
+}
+
+} // namespace Gtk
+
+
+namespace
+{
+
+const Glib::SignalProxyInfo ToggleToolButton_signal_toggled_info =
+{
+ "toggled",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::ToggleToolButton* wrap(GtkToggleToolButton* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::ToggleToolButton *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& ToggleToolButton_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &ToggleToolButton_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_toggle_tool_button_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void ToggleToolButton_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->toggled = &toggled_callback;
+}
+
+
+void ToggleToolButton_Class::toggled_callback(GtkToggleToolButton* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_toggled();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->toggled)
+ (*base->toggled)(self);
+ }
+}
+
+
+Glib::ObjectBase* ToggleToolButton_Class::wrap_new(GObject* o)
+{
+ return manage(new ToggleToolButton((GtkToggleToolButton*)(o)));
+
+}
+
+
+/* The implementation: */
+
+ToggleToolButton::ToggleToolButton(const Glib::ConstructParams& construct_params)
+:
+ Gtk::ToolButton(construct_params)
+{
+ }
+
+ToggleToolButton::ToggleToolButton(GtkToggleToolButton* castitem)
+:
+ Gtk::ToolButton((GtkToolButton*)(castitem))
+{
+ }
+
+ToggleToolButton::~ToggleToolButton()
+{
+ destroy_();
+}
+
+ToggleToolButton::CppClassType ToggleToolButton::toggletoolbutton_class_; // initialize static member
+
+GType ToggleToolButton::get_type()
+{
+ return toggletoolbutton_class_.init().get_type();
+}
+
+GType ToggleToolButton::get_base_type()
+{
+ return gtk_toggle_tool_button_get_type();
+}
+
+
+ToggleToolButton::ToggleToolButton()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::ToolButton(Glib::ConstructParams(toggletoolbutton_class_.init()))
+{
+ }
+
+ToggleToolButton::ToggleToolButton(const Gtk::StockID& stock_id)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::ToolButton(Glib::ConstructParams(toggletoolbutton_class_.init(), "stock_id", (stock_id).get_c_str(), (char*) 0))
+{
+ }
+
+void ToggleToolButton::set_active(bool is_active)
+{
+ gtk_toggle_tool_button_set_active(gobj(), static_cast<int>(is_active));
+}
+
+bool ToggleToolButton::get_active() const
+{
+ return gtk_toggle_tool_button_get_active(const_cast<GtkToggleToolButton*>(gobj()));
+}
+
+
+Glib::SignalProxy0< void > ToggleToolButton::signal_toggled()
+{
+ return Glib::SignalProxy0< void >(this, &ToggleToolButton_signal_toggled_info);
+}
+
+
+void Gtk::ToggleToolButton::on_toggled()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->toggled)
+ (*base->toggled)(gobj());
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/toggletoolbutton.h b/libs/gtkmm2/gtk/gtkmm/toggletoolbutton.h
new file mode 100644
index 0000000000..331d65976e
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/toggletoolbutton.h
@@ -0,0 +1,170 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TOGGLETOOLBUTTON_H
+#define _GTKMM_TOGGLETOOLBUTTON_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* box.h
+ *
+ * Copyright (C) 2003 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/toolbutton.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkToggleToolButton GtkToggleToolButton;
+typedef struct _GtkToggleToolButtonClass GtkToggleToolButtonClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class ToggleToolButton_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** A Gtk::ToolItem containing a toggle button.
+ *
+ * A ToggleToolButton is a Gtk::ToolItem that contains a toggle button.
+ * @ingroup Widgets
+ */
+
+class ToggleToolButton : public ToolButton
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef ToggleToolButton CppObjectType;
+ typedef ToggleToolButton_Class CppClassType;
+ typedef GtkToggleToolButton BaseObjectType;
+ typedef GtkToggleToolButtonClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~ToggleToolButton();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class ToggleToolButton_Class;
+ static CppClassType toggletoolbutton_class_;
+
+ // noncopyable
+ ToggleToolButton(const ToggleToolButton&);
+ ToggleToolButton& operator=(const ToggleToolButton&);
+
+protected:
+ explicit ToggleToolButton(const Glib::ConstructParams& construct_params);
+ explicit ToggleToolButton(GtkToggleToolButton* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkToggleToolButton* gobj() { return reinterpret_cast<GtkToggleToolButton*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkToggleToolButton* gobj() const { return reinterpret_cast<GtkToggleToolButton*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_toggled();
+
+
+private:
+
+public:
+
+ /** Creates a new ToggleToolButton.
+ */
+ ToggleToolButton();
+
+ /** Creates a new ToggleToolButton from a StockID.
+ *
+ * The ToggleToolButton will be created according to the @a stock_id properties.
+ *
+ * @param stock_id The StockID which determines the look of the ToggleToolButton.
+ */
+ explicit ToggleToolButton(const Gtk::StockID& stock_id);
+
+ /** Creates a new ToggleToolButton with a label.
+ *
+ * The ToggleToolButton will have the label @a label.
+ *
+ * @param label The string used to display the label for this ToggleToolButton.
+ */
+ explicit ToggleToolButton(const Glib::ustring& label);
+
+ /** Creates a new ToggleToolButton with an image.
+ *
+ * The ToggleToolButton will have the label @a label and an image widget @a icon_widget.
+ *
+ * @param icon_widget The widget placed as the ToggleToolButton's icon.
+ * @param label The string used to display the label for this ToggleToolButton.
+ */
+ explicit ToggleToolButton(Widget& icon_widget, const Glib::ustring& label = Glib::ustring());
+
+
+ /** Sets the status of the toggle tool button. Set to <tt>true</tt> if you
+ * want the GtkToggleButton to be 'pressed in', and <tt>false</tt> to raise it.
+ * This action causes the toggled signal to be emitted.
+ *
+ * Since: 2.4
+ * @param is_active Whether @a button should be active.
+ */
+ void set_active(bool is_active = true);
+
+ /** Queries a Gtk::ToggleToolButton and returns its current state.
+ * Returns <tt>true</tt> if the toggle button is pressed in and <tt>false</tt> if it is raised.
+ * @return <tt>true</tt> if the toggle tool button is pressed in, <tt>false</tt> if not
+ *
+ * Since: 2.4.
+ */
+ bool get_active() const;
+
+
+ Glib::SignalProxy0< void > signal_toggled();
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::ToggleToolButton
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::ToggleToolButton* wrap(GtkToggleToolButton* object, bool take_copy = false);
+}
+#endif /* _GTKMM_TOGGLETOOLBUTTON_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/toolbar.cc b/libs/gtkmm2/gtk/gtkmm/toolbar.cc
new file mode 100644
index 0000000000..a8d10a7dde
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/toolbar.cc
@@ -0,0 +1,609 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/toolbar.h>
+#include <gtkmm/private/toolbar_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+//Define this to make sure that we don't use any of the deprecated GtkToolbar API.
+//Normally we just deprecate it in gtkmm too,
+//but the GtkToolbar compatibility system is particularly unpleasant, so we just removed it in gtkmm 2.4. murrayc.
+//In future, this GTK_DISABLE_DEPRECATED might be inappropriate because it might cover extra GTK+ API. Just remove it then.
+
+#define GTK_DISABLE_DEPRECATED
+
+#include <glib.h>
+#include <gtkmm/button.h>
+#include <gtkmm/togglebutton.h>
+#include <gtkmm/radiobutton.h>
+#include <gtkmm/tooltips.h>
+//#include <gtkmm/image.h>
+#include <gtkmm/label.h>
+#include <gtk/gtklabel.h>
+#include <gtk/gtktoolbar.h>
+
+namespace Gtk
+{
+
+void Toolbar::insert(ToolButton& item, int pos, const sigc::slot<void>& clicked_slot)
+{
+ item.signal_clicked().connect(clicked_slot);
+ gtk_toolbar_insert(gobj(), (GtkToolItem*)((item).gobj()), pos);
+}
+
+void Toolbar::insert(ToggleToolButton& item, int pos, const sigc::slot<void>& toggled_slot)
+{
+ item.signal_toggled().connect(toggled_slot);
+ gtk_toolbar_insert(gobj(), (GtkToolItem*)((item).gobj()), pos);
+}
+
+void Toolbar::append(ToolItem& item)
+{
+ gtk_toolbar_insert(gobj(), (item).gobj(), -1 /* See GTK+ docs */);
+}
+
+void Toolbar::append(ToolButton& item, const sigc::slot<void>& clicked_slot)
+{
+ item.signal_clicked().connect(clicked_slot);
+ gtk_toolbar_insert(gobj(), (GtkToolItem*)((item).gobj()), -1 /* See GTK+ docs */);
+}
+
+void Toolbar::append(ToggleToolButton& item, const sigc::slot<void>& toggled_slot)
+{
+ item.signal_toggled().connect(toggled_slot);
+ gtk_toolbar_insert(gobj(), (GtkToolItem*)((item).gobj()), -1 /* See GTK+ docs */);
+}
+
+void Toolbar::prepend(ToolItem& item)
+{
+ gtk_toolbar_insert(gobj(), (item).gobj(), 0 /* See GTK+ docs */);
+}
+
+void Toolbar::prepend(ToolButton& item, const sigc::slot<void>& clicked_slot)
+{
+ item.signal_clicked().connect(clicked_slot);
+ gtk_toolbar_insert(gobj(), (GtkToolItem*)((item).gobj()), 0 /* See GTK+ docs */);
+}
+
+void Toolbar::prepend(ToggleToolButton& item, const sigc::slot<void>& toggled_slot)
+{
+ item.signal_toggled().connect(toggled_slot);
+ gtk_toolbar_insert(gobj(), (GtkToolItem*)((item).gobj()), 0 /* See GTK+ docs */);
+}
+
+void Toolbar::unset_drop_highlight_item()
+{
+ //See GTK+ docs.
+ gtk_toolbar_set_drop_highlight_item(gobj(), 0, 0);
+}
+
+} // namespace Gtk
+
+
+namespace
+{
+
+void Toolbar_signal_orientation_changed_callback(GtkToolbar* self, GtkOrientation p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,Orientation > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(((Orientation)(p0))
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo Toolbar_signal_orientation_changed_info =
+{
+ "orientation_changed",
+ (GCallback) &Toolbar_signal_orientation_changed_callback,
+ (GCallback) &Toolbar_signal_orientation_changed_callback
+};
+
+
+void Toolbar_signal_toolbar_style_changed_callback(GtkToolbar* self, GtkToolbarStyle p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,ToolbarStyle > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(((ToolbarStyle)(p0))
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo Toolbar_signal_toolbar_style_changed_info =
+{
+ "style_changed",
+ (GCallback) &Toolbar_signal_toolbar_style_changed_callback,
+ (GCallback) &Toolbar_signal_toolbar_style_changed_callback
+};
+
+
+gboolean Toolbar_signal_popup_context_menu_callback(GtkToolbar* self, gint p0,gint p1,gint p2,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< bool,int,int,int > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ return static_cast<int>((*static_cast<SlotType*>(slot))(p0
+, p1
+, p2
+));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Toolbar_signal_popup_context_menu_notify_callback(GtkToolbar* self, gint p0,gint p1,gint p2, void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,int,int,int > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(p0
+, p1
+, p2
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+const Glib::SignalProxyInfo Toolbar_signal_popup_context_menu_info =
+{
+ "popup_context_menu",
+ (GCallback) &Toolbar_signal_popup_context_menu_callback,
+ (GCallback) &Toolbar_signal_popup_context_menu_notify_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::Toolbar* wrap(GtkToolbar* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::Toolbar *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Toolbar_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Toolbar_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_toolbar_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Toolbar_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->orientation_changed = &orientation_changed_callback;
+ klass->style_changed = &style_changed_callback;
+ klass->popup_context_menu = &popup_context_menu_callback;
+}
+
+
+void Toolbar_Class::orientation_changed_callback(GtkToolbar* self, GtkOrientation p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_orientation_changed(((Orientation)(p0))
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->orientation_changed)
+ (*base->orientation_changed)(self, p0);
+ }
+}
+
+void Toolbar_Class::style_changed_callback(GtkToolbar* self, GtkToolbarStyle p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_toolbar_style_changed(((ToolbarStyle)(p0))
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->style_changed)
+ (*base->style_changed)(self, p0);
+ }
+}
+
+gboolean Toolbar_Class::popup_context_menu_callback(GtkToolbar* self, gint p0, gint p1, gint p2)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->on_popup_context_menu(p0
+, p1
+, p2
+));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->popup_context_menu)
+ return (*base->popup_context_menu)(self, p0, p1, p2);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+
+Glib::ObjectBase* Toolbar_Class::wrap_new(GObject* o)
+{
+ return manage(new Toolbar((GtkToolbar*)(o)));
+
+}
+
+
+/* The implementation: */
+
+Toolbar::Toolbar(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Container(construct_params)
+{
+ }
+
+Toolbar::Toolbar(GtkToolbar* castitem)
+:
+ Gtk::Container((GtkContainer*)(castitem))
+{
+ }
+
+Toolbar::~Toolbar()
+{
+ destroy_();
+}
+
+Toolbar::CppClassType Toolbar::toolbar_class_; // initialize static member
+
+GType Toolbar::get_type()
+{
+ return toolbar_class_.init().get_type();
+}
+
+GType Toolbar::get_base_type()
+{
+ return gtk_toolbar_get_type();
+}
+
+
+Toolbar::Toolbar()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Container(Glib::ConstructParams(toolbar_class_.init()))
+{
+ }
+
+void Toolbar::insert(ToolItem& item, int pos)
+{
+ gtk_toolbar_insert(gobj(), (item).gobj(), pos);
+}
+
+int Toolbar::get_item_index(const ToolItem& item) const
+{
+ return gtk_toolbar_get_item_index(const_cast<GtkToolbar*>(gobj()), const_cast<GtkToolItem*>((item).gobj()));
+}
+
+int Toolbar::get_n_items() const
+{
+ return gtk_toolbar_get_n_items(const_cast<GtkToolbar*>(gobj()));
+}
+
+ToolItem* Toolbar::get_nth_item(int n)
+{
+ return Glib::wrap(gtk_toolbar_get_nth_item(gobj(), n));
+}
+
+const ToolItem* Toolbar::get_nth_item(int n) const
+{
+ return Glib::wrap(gtk_toolbar_get_nth_item(const_cast<GtkToolbar*>(gobj()), n));
+}
+
+bool Toolbar::get_show_arrow() const
+{
+ return gtk_toolbar_get_show_arrow(const_cast<GtkToolbar*>(gobj()));
+}
+
+void Toolbar::set_show_arrow(bool show_arrow)
+{
+ gtk_toolbar_set_show_arrow(gobj(), static_cast<int>(show_arrow));
+}
+
+void Toolbar::set_orientation(Orientation orientation)
+{
+ gtk_toolbar_set_orientation(gobj(), ((GtkOrientation)(orientation)));
+}
+
+Orientation Toolbar::get_orientation() const
+{
+ return ((Orientation)(gtk_toolbar_get_orientation(const_cast<GtkToolbar*>(gobj()))));
+}
+
+void Toolbar::set_toolbar_style(ToolbarStyle style)
+{
+ gtk_toolbar_set_style(gobj(), ((GtkToolbarStyle)(style)));
+}
+
+ToolbarStyle Toolbar::get_toolbar_style() const
+{
+ return ((ToolbarStyle)(gtk_toolbar_get_style(const_cast<GtkToolbar*>(gobj()))));
+}
+
+void Toolbar::set_tooltips(bool enable)
+{
+ gtk_toolbar_set_tooltips(gobj(), static_cast<int>(enable));
+}
+
+bool Toolbar::get_tooltips() const
+{
+ return gtk_toolbar_get_tooltips(const_cast<GtkToolbar*>(gobj()));
+}
+
+void Toolbar::unset_toolbar_style()
+{
+ gtk_toolbar_unset_style(gobj());
+}
+
+IconSize Toolbar::get_icon_size() const
+{
+ return IconSize(static_cast<int>(gtk_toolbar_get_icon_size(const_cast<GtkToolbar*>(gobj()))));
+}
+
+ReliefStyle Toolbar::get_relief_style() const
+{
+ return ((ReliefStyle)(gtk_toolbar_get_relief_style(const_cast<GtkToolbar*>(gobj()))));
+}
+
+int Toolbar::get_drop_index(int x, int y) const
+{
+ return gtk_toolbar_get_drop_index(const_cast<GtkToolbar*>(gobj()), x, y);
+}
+
+void Toolbar::set_drop_highlight_item(ToolItem& tool_item, int index)
+{
+ gtk_toolbar_set_drop_highlight_item(gobj(), (tool_item).gobj(), index);
+}
+
+Tooltips* Toolbar::get_tooltips_object() const
+{
+ return Glib::wrap(gobj()->tooltips);
+}
+
+
+Glib::SignalProxy1< void,Orientation > Toolbar::signal_orientation_changed()
+{
+ return Glib::SignalProxy1< void,Orientation >(this, &Toolbar_signal_orientation_changed_info);
+}
+
+Glib::SignalProxy1< void,ToolbarStyle > Toolbar::signal_toolbar_style_changed()
+{
+ return Glib::SignalProxy1< void,ToolbarStyle >(this, &Toolbar_signal_toolbar_style_changed_info);
+}
+
+Glib::SignalProxy3< bool,int,int,int > Toolbar::signal_popup_context_menu()
+{
+ return Glib::SignalProxy3< bool,int,int,int >(this, &Toolbar_signal_popup_context_menu_info);
+}
+
+
+Glib::PropertyProxy<Orientation> Toolbar::property_orientation()
+{
+ return Glib::PropertyProxy<Orientation>(this, "orientation");
+}
+
+Glib::PropertyProxy_ReadOnly<Orientation> Toolbar::property_orientation() const
+{
+ return Glib::PropertyProxy_ReadOnly<Orientation>(this, "orientation");
+}
+
+Glib::PropertyProxy<ToolbarStyle> Toolbar::property_toolbar_style()
+{
+ return Glib::PropertyProxy<ToolbarStyle>(this, "toolbar-style");
+}
+
+Glib::PropertyProxy_ReadOnly<ToolbarStyle> Toolbar::property_toolbar_style() const
+{
+ return Glib::PropertyProxy_ReadOnly<ToolbarStyle>(this, "toolbar-style");
+}
+
+Glib::PropertyProxy<bool> Toolbar::property_show_arrow()
+{
+ return Glib::PropertyProxy<bool>(this, "show-arrow");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Toolbar::property_show_arrow() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "show-arrow");
+}
+
+
+void Gtk::Toolbar::on_orientation_changed(Orientation orientation)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->orientation_changed)
+ (*base->orientation_changed)(gobj(),((GtkOrientation)(orientation)));
+}
+
+void Gtk::Toolbar::on_toolbar_style_changed(ToolbarStyle style)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->style_changed)
+ (*base->style_changed)(gobj(),((GtkToolbarStyle)(style)));
+}
+
+bool Gtk::Toolbar::on_popup_context_menu(int x, int y, int button_number)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->popup_context_menu)
+ return (*base->popup_context_menu)(gobj(),x,y,button_number);
+
+ typedef bool RType;
+ return RType();
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/toolbar.h b/libs/gtkmm2/gtk/gtkmm/toolbar.h
new file mode 100644
index 0000000000..8cf6431014
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/toolbar.h
@@ -0,0 +1,370 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TOOLBAR_H
+#define _GTKMM_TOOLBAR_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/toolitem.h>
+#include <gtkmm/toolbutton.h>
+#include <gtkmm/toggletoolbutton.h>
+#include <glibmm/helperlist.h>
+#include <gtkmm/container.h>
+#include <gtkmm/stockid.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkToolbar GtkToolbar;
+typedef struct _GtkToolbarClass GtkToolbarClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class Toolbar_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** Bars of buttons and other widgets.
+ * @ingroup Widgets
+ * @ingroup Containers
+ * @ingroup Toolbars
+ */
+
+class Toolbar : public Container
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Toolbar CppObjectType;
+ typedef Toolbar_Class CppClassType;
+ typedef GtkToolbar BaseObjectType;
+ typedef GtkToolbarClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~Toolbar();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class Toolbar_Class;
+ static CppClassType toolbar_class_;
+
+ // noncopyable
+ Toolbar(const Toolbar&);
+ Toolbar& operator=(const Toolbar&);
+
+protected:
+ explicit Toolbar(const Glib::ConstructParams& construct_params);
+ explicit Toolbar(GtkToolbar* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkToolbar* gobj() { return reinterpret_cast<GtkToolbar*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkToolbar* gobj() const { return reinterpret_cast<GtkToolbar*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_orientation_changed(Orientation orientation);
+ virtual void on_toolbar_style_changed(ToolbarStyle style);
+ virtual bool on_popup_context_menu(int x, int y, int button_number);
+
+
+private:
+
+public:
+ Toolbar();
+
+
+ /** Insert a Gtk::ToolItem into the toolbar at position @a pos . If @a pos is
+ * 0 the item is prepended to the start of the toolbar. If @a pos is
+ * negative, the item is appended to the end of the toolbar.
+ *
+ * Since: 2.4
+ * @param item A Gtk::ToolItem.
+ * @param pos The position of the new item.
+ */
+ void insert(ToolItem& item, int pos);
+ void insert(ToolButton& item, int pos, const sigc::slot<void>& clicked_slot);
+ void insert(ToggleToolButton& item, int pos, const sigc::slot<void>& toggled_slot);
+
+ void append(ToolItem& item);
+ void append(ToolButton& item, const sigc::slot<void>& clicked_slot);
+ void append(ToggleToolButton& item, const sigc::slot<void>& toggled_slot);
+
+ void prepend(ToolItem& item);
+ void prepend(ToolButton& item, const sigc::slot<void>& clicked_slot);
+ void prepend(ToggleToolButton& item, const sigc::slot<void>& toggled_slot);
+
+
+ /** Returns the position of @a item on the toolbar, starting from 0.
+ * It is an error if @a item is not a child of the toolbar.
+ * @param item A Gtk::ToolItem that is a child of @a toolbar .
+ * @return The position of item on the toolbar.
+ *
+ * Since: 2.4.
+ */
+ int get_item_index(const ToolItem& item) const;
+
+ /** Returns the number of items on the toolbar.
+ * @return The number of items on the toolbar
+ *
+ * Since: 2.4.
+ */
+ int get_n_items() const;
+
+ /** Returns the @a n &lt;!-- --&gt;'s item on @a toolbar , or <tt>0</tt> if the
+ * toolbar does not contain an @a n &lt;!-- --&gt;'th item.
+ * @param n A position on the toolbar.
+ * @return The @a n &lt;!-- --&gt;'th Gtk::ToolItem on @a toolbar , or <tt>0</tt> if there
+ * isn't an @a n &lt;!-- --&gt;th item.
+ *
+ * Since: 2.4.
+ */
+ ToolItem* get_nth_item(int n);
+
+ /** Returns the @a n &lt;!-- --&gt;'s item on @a toolbar , or <tt>0</tt> if the
+ * toolbar does not contain an @a n &lt;!-- --&gt;'th item.
+ * @param n A position on the toolbar.
+ * @return The @a n &lt;!-- --&gt;'th Gtk::ToolItem on @a toolbar , or <tt>0</tt> if there
+ * isn't an @a n &lt;!-- --&gt;th item.
+ *
+ * Since: 2.4.
+ */
+ const ToolItem* get_nth_item(int n) const;
+
+ /** Returns whether the toolbar has an overflow menu.
+ * See set_show_arrow()
+ * @return Since: 2.4.
+ */
+ bool get_show_arrow() const;
+
+ /** Sets whether to show an overflow menu when
+ * @a toolbar doesn't have room for all items on it. If <tt>true</tt>,
+ * items that there are not room are available through an
+ * overflow menu.
+ *
+ * Since: 2.4
+ * @param show_arrow Whether to show an overflow menu.
+ */
+ void set_show_arrow(bool show_arrow = true);
+
+
+/* Style methods */
+
+ /** Sets whether a toolbar should appear horizontally or vertically.
+ * @param orientation A new Gtk::Orientation.
+ */
+ void set_orientation(Orientation orientation);
+
+ /** Retrieves the current orientation of the toolbar. See
+ * set_orientation().
+ * @return The orientation.
+ */
+ Orientation get_orientation() const;
+
+
+ /** Alters the view of @a toolbar to display either icons only, text only, or both.
+ * @param style The new style for @a toolbar .
+ */
+ void set_toolbar_style(ToolbarStyle style);
+
+ /** Retrieves whether the toolbar has text, icons, or both . See
+ * set_style().
+ * @return The current style of @a toolbar .
+ */
+ ToolbarStyle get_toolbar_style() const;
+
+
+ /** Sets if the tooltips of a toolbar should be active or not.
+ * @param enable Set to <tt>false</tt> to disable the tooltips, or <tt>true</tt> to enable them.
+ */
+ void set_tooltips(bool enable = true);
+
+ /** Retrieves whether tooltips are enabled. See
+ * set_tooltips().
+ * @return <tt>true</tt> if tooltips are enabled.
+ */
+ bool get_tooltips() const;
+
+
+ /** Unsets a toolbar style set with set_style(), so that
+ * user preferences will be used to determine the toolbar style.
+ */
+ void unset_toolbar_style();
+
+ //Note that gtk_toolbar_set_icon_size() is deprecated, bug gtk_toolbar_get_icon_size() is not.
+
+ /** Retrieves the icon size fo the toolbar. See set_icon_size().
+ * @return The current icon size for the icons on the toolbar.
+ */
+ IconSize get_icon_size() const;
+
+
+ /** Returns the relief style of buttons on @a toolbar . See
+ * Gtk::Button::set_relief().
+ * @return The relief style of buttons on @a toolbar .
+ *
+ * Since: 2.4.
+ */
+ ReliefStyle get_relief_style() const;
+
+ /** Returns the position corresponding to the indicated point on
+ * @a toolbar . This is useful when dragging items to the toolbar:
+ * this function returns the position a new item should be
+ * inserted.
+ *
+ * @a x and @a y are in @a toolbar coordinates.
+ * @param x X coordinate of a point on the toolbar.
+ * @param y Y coordinate of a point on the toolbar.
+ * @return The position corresponding to the point ( @a x , @a y ) on the toolbar.
+ *
+ * Since: 2.4.
+ */
+ int get_drop_index(int x, int y) const;
+
+ /** Highlights @a toolbar to give an idea of what it would look like
+ * if @a item was added to @a toolbar at the position indicated by @a index .
+ * If @a item is <tt>0</tt>, highlighting is turned off. In that case @a index
+ * is ignored.
+ *
+ * The @a tool_item passed to this function must not be part of any widget
+ * hierarchy. When an item is set as drop highlight item it can not
+ * added to any widget hierarchy or used as highlight item for another
+ * toolbar.
+ *
+ * Since: 2.4
+ * @param tool_item A Gtk::ToolItem, or <tt>0</tt> to turn of highlighting.
+ * @param index A position on @a toolbar .
+ */
+ void set_drop_highlight_item(ToolItem& tool_item, int index);
+ void unset_drop_highlight_item();
+
+
+ Glib::SignalProxy1< void,Orientation > signal_orientation_changed();
+
+
+ Glib::SignalProxy1< void,ToolbarStyle > signal_toolbar_style_changed();
+
+
+ Glib::SignalProxy3< bool,int,int,int > signal_popup_context_menu();
+
+
+ //This is called get_tooltips_object() to avoid a clash with get_tooltips(), which just says whether they are enabled.
+
+ Tooltips* get_tooltips_object() const;
+
+ //This is probably the same as Container::children().size(), which is deprecated anyway?
+ //_MEMBER_GET(num_children, num_children, int, gint)
+
+ //There is already set/get_orientation():
+ //_MEMBER_GET(orientation, orientation, GtkOrientation, Orientation)
+
+ //There is already set/get_toolbar_style():
+ //_MEMBER_GET(style, style, GtkToolbarStyle, ToolbarStyle)
+
+ //There is already set/get_icon_size():
+ //_MEMBER_GET(icon_size, icon_size, int, gint)
+
+ //Ignore deprecated GtkToolbarAPI:
+ //Normally we just deprecate it in gtkmm too,
+ //but the GtkToolbar compatibility system is particularly unpleasant, so we just removed it in gtkmm 2.4. murrayc.
+
+
+ /** The orientation of the toolbar.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Orientation> property_orientation() ;
+
+/** The orientation of the toolbar.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Orientation> property_orientation() const;
+
+ /** How to draw the toolbar.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<ToolbarStyle> property_toolbar_style() ;
+
+/** How to draw the toolbar.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<ToolbarStyle> property_toolbar_style() const;
+
+ /** If an arrow should be shown if the toolbar doesn't fit.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_show_arrow() ;
+
+/** If an arrow should be shown if the toolbar doesn't fit.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_show_arrow() const;
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::Toolbar
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::Toolbar* wrap(GtkToolbar* object, bool take_copy = false);
+}
+#endif /* _GTKMM_TOOLBAR_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/toolbutton.cc b/libs/gtkmm2/gtk/gtkmm/toolbutton.cc
new file mode 100644
index 0000000000..29519767d2
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/toolbutton.cc
@@ -0,0 +1,327 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/toolbutton.h>
+#include <gtkmm/private/toolbutton_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtktoolbutton.h>
+
+namespace Gtk
+{
+
+ToolButton::ToolButton(const Glib::ustring& label)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::ToolItem(Glib::ConstructParams(toolbutton_class_.init(), "label", label.c_str(), (char*) 0))
+{
+}
+
+} // namespace Gtk
+
+
+namespace
+{
+
+const Glib::SignalProxyInfo ToolButton_signal_clicked_info =
+{
+ "clicked",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::ToolButton* wrap(GtkToolButton* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::ToolButton *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& ToolButton_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &ToolButton_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_tool_button_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void ToolButton_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->clicked = &clicked_callback;
+}
+
+
+void ToolButton_Class::clicked_callback(GtkToolButton* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_clicked();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->clicked)
+ (*base->clicked)(self);
+ }
+}
+
+
+Glib::ObjectBase* ToolButton_Class::wrap_new(GObject* o)
+{
+ return manage(new ToolButton((GtkToolButton*)(o)));
+
+}
+
+
+/* The implementation: */
+
+ToolButton::ToolButton(const Glib::ConstructParams& construct_params)
+:
+ Gtk::ToolItem(construct_params)
+{
+ }
+
+ToolButton::ToolButton(GtkToolButton* castitem)
+:
+ Gtk::ToolItem((GtkToolItem*)(castitem))
+{
+ }
+
+ToolButton::~ToolButton()
+{
+ destroy_();
+}
+
+ToolButton::CppClassType ToolButton::toolbutton_class_; // initialize static member
+
+GType ToolButton::get_type()
+{
+ return toolbutton_class_.init().get_type();
+}
+
+GType ToolButton::get_base_type()
+{
+ return gtk_tool_button_get_type();
+}
+
+
+ToolButton::ToolButton()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::ToolItem(Glib::ConstructParams(toolbutton_class_.init()))
+{
+ }
+
+ToolButton::ToolButton(const Gtk::StockID& stock_id)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::ToolItem(Glib::ConstructParams(toolbutton_class_.init(), "stock_id", (stock_id).get_c_str(), (char*) 0))
+{
+ }
+
+ToolButton::ToolButton(Widget& icon_widget, const Glib::ustring& label)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::ToolItem(Glib::ConstructParams(toolbutton_class_.init(), "icon_widget", (icon_widget).gobj(), "label", label.c_str(), (char*) 0))
+{
+ }
+
+void ToolButton::set_label(const Glib::ustring& label)
+{
+ gtk_tool_button_set_label(gobj(), label.c_str());
+}
+
+Glib::ustring ToolButton::get_label() const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(gtk_tool_button_get_label(const_cast<GtkToolButton*>(gobj())));
+}
+
+void ToolButton::set_use_underline(bool use_underline)
+{
+ gtk_tool_button_set_use_underline(gobj(), static_cast<int>(use_underline));
+}
+
+bool ToolButton::get_use_underline() const
+{
+ return gtk_tool_button_get_use_underline(const_cast<GtkToolButton*>(gobj()));
+}
+
+void ToolButton::set_stock_id(const Gtk::StockID& stock_id)
+{
+ gtk_tool_button_set_stock_id(gobj(), (stock_id).get_c_str());
+}
+
+Glib::ustring ToolButton::get_stock_id() const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(gtk_tool_button_get_stock_id(const_cast<GtkToolButton*>(gobj())));
+}
+
+void ToolButton::set_icon_widget(Widget& icon_widget)
+{
+ gtk_tool_button_set_icon_widget(gobj(), (icon_widget).gobj());
+}
+
+Widget* ToolButton::get_icon_widget()
+{
+ return Glib::wrap(gtk_tool_button_get_icon_widget(gobj()));
+}
+
+const Widget* ToolButton::get_icon_widget() const
+{
+ return Glib::wrap(gtk_tool_button_get_icon_widget(const_cast<GtkToolButton*>(gobj())));
+}
+
+void ToolButton::set_label_widget(Widget& label_widget)
+{
+ gtk_tool_button_set_label_widget(gobj(), (label_widget).gobj());
+}
+
+Widget* ToolButton::get_label_widget()
+{
+ return Glib::wrap(gtk_tool_button_get_label_widget(gobj()));
+}
+
+const Widget* ToolButton::get_label_widget() const
+{
+ return Glib::wrap(gtk_tool_button_get_label_widget(const_cast<GtkToolButton*>(gobj())));
+}
+
+
+Glib::SignalProxy0< void > ToolButton::signal_clicked()
+{
+ return Glib::SignalProxy0< void >(this, &ToolButton_signal_clicked_info);
+}
+
+
+Glib::PropertyProxy<Glib::ustring> ToolButton::property_label()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "label");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> ToolButton::property_label() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "label");
+}
+
+Glib::PropertyProxy<bool> ToolButton::property_use_underline()
+{
+ return Glib::PropertyProxy<bool>(this, "use-underline");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> ToolButton::property_use_underline() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "use-underline");
+}
+
+Glib::PropertyProxy<Gtk::Widget*> ToolButton::property_label_widget()
+{
+ return Glib::PropertyProxy<Gtk::Widget*>(this, "label-widget");
+}
+
+Glib::PropertyProxy_ReadOnly<Gtk::Widget*> ToolButton::property_label_widget() const
+{
+ return Glib::PropertyProxy_ReadOnly<Gtk::Widget*>(this, "label-widget");
+}
+
+Glib::PropertyProxy<Glib::ustring> ToolButton::property_stock_id()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "stock-id");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> ToolButton::property_stock_id() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "stock-id");
+}
+
+Glib::PropertyProxy<Gtk::Widget> ToolButton::property_icon_widget()
+{
+ return Glib::PropertyProxy<Gtk::Widget>(this, "icon-widget");
+}
+
+Glib::PropertyProxy_ReadOnly<Gtk::Widget> ToolButton::property_icon_widget() const
+{
+ return Glib::PropertyProxy_ReadOnly<Gtk::Widget>(this, "icon-widget");
+}
+
+
+void Gtk::ToolButton::on_clicked()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->clicked)
+ (*base->clicked)(gobj());
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/toolbutton.h b/libs/gtkmm2/gtk/gtkmm/toolbutton.h
new file mode 100644
index 0000000000..c4a2622b95
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/toolbutton.h
@@ -0,0 +1,346 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TOOLBUTTON_H
+#define _GTKMM_TOOLBUTTON_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* box.h
+ *
+ * Copyright (C) 2003 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/toolitem.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkToolButton GtkToolButton;
+typedef struct _GtkToolButtonClass GtkToolButtonClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class ToolButton_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** A Gtk::ToolItem subclass that displays buttons.
+ *
+ * A ToolButton is are Gtk::ToolItem containing a button.
+ * @ingroup Widgets
+ */
+
+class ToolButton : public ToolItem
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef ToolButton CppObjectType;
+ typedef ToolButton_Class CppClassType;
+ typedef GtkToolButton BaseObjectType;
+ typedef GtkToolButtonClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~ToolButton();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class ToolButton_Class;
+ static CppClassType toolbutton_class_;
+
+ // noncopyable
+ ToolButton(const ToolButton&);
+ ToolButton& operator=(const ToolButton&);
+
+protected:
+ explicit ToolButton(const Glib::ConstructParams& construct_params);
+ explicit ToolButton(GtkToolButton* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkToolButton* gobj() { return reinterpret_cast<GtkToolButton*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkToolButton* gobj() const { return reinterpret_cast<GtkToolButton*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_clicked();
+
+
+private:
+
+public:
+
+ /** Creates a new ToolButton.
+ */
+ ToolButton();
+
+ /** Creates a new ToolButton from a StockID.
+ *
+ * The ToolButton will be created according to the @a stock_id properties.
+ *
+ * @param stock_id The StockID which determines the look of the ToolButton.
+ */
+ explicit ToolButton(const Gtk::StockID& stock_id);
+
+ /** Creates a new ToolButton with a label.
+ *
+ * The ToolButton will have the label @a label.
+ *
+ * @param label The string used to display the label for this ToolButton.
+ */
+ explicit ToolButton(const Glib::ustring& label);
+
+ /** Creates a new ToolButton with an image.
+ *
+ * The ToolButton will have the label @a label and an image widget @a icon_widget.
+ *
+ * @param icon_widget The widget placed as the ToolButton's icon.
+ * @param label The string used to display the label for this ToolButton.
+ */
+ explicit ToolButton(Widget& icon_widget, const Glib::ustring& label = Glib::ustring());
+
+
+ /** Sets @a label as the label used for the tool button. The "label" property
+ * only has an effect if not overridden by a non-<tt>0</tt> "label_widget" property.
+ * If both the "label_widget" and "label" properties are <tt>0</tt>, the label
+ * is determined by the "stock_id" property. If the "stock_id" property is also
+ * <tt>0</tt>, @a button will not have a label.
+ *
+ * Since: 2.4
+ * @param label A string that will be used as label, or <tt>0</tt>.
+ */
+ void set_label(const Glib::ustring& label);
+
+ /** Returns the label used by the tool button, or <tt>0</tt> if the tool button
+ * doesn't have a label. or uses a the label from a stock item. The returned
+ * string is owned by GTK+, and must not be modified or freed.
+ * @return The label, or <tt>0</tt>
+ *
+ * Since: 2.4.
+ */
+ Glib::ustring get_label() const;
+
+ /** If set, an underline in the label property indicates that the next character
+ * should be used for the mnemonic accelerator key in the overflow menu. For
+ * example, if the label property is "_Open" and @a use_underline is <tt>true</tt>,
+ * the label on the tool button will be "Open" and the item on the overflow
+ * menu will have an underlined 'O'.
+ *
+ * Labels shown on tool buttons never have mnemonics on them; this property
+ * only affects the menu item on the overflow menu.
+ *
+ * Since: 2.4
+ * @param use_underline Whether the button label has the form "_Open".
+ */
+ void set_use_underline(bool use_underline = true);
+
+ /** Returns whether underscores in the label property are used as mnemonics
+ * on menu items on the overflow menu. See set_use_underline().
+ * @return <tt>true</tt> if underscores in the label property are used as
+ * mnemonics on menu items on the overflow menu.
+ *
+ * Since: 2.4.
+ */
+ bool get_use_underline() const;
+
+ /** Sets the name of the stock item. See new_from_stock().
+ * The stock_id property only has an effect if not
+ * overridden by non-<tt>0</tt> "label" and "icon_widget" properties.
+ *
+ * Since: 2.4
+ * @param stock_id A name of a stock item, or <tt>0</tt>.
+ */
+ void set_stock_id(const Gtk::StockID& stock_id);
+
+ /** Returns the name of the stock item. See set_stock_id().
+ * The returned string is owned by GTK+ and must not be freed or modifed.
+ * @return The name of the stock item for @a button .
+ *
+ * Since: 2.4.
+ */
+ Glib::ustring get_stock_id() const;
+
+ /** Sets @a icon as the widget used as icon on @a button . If @a icon_widget is
+ * <tt>0</tt> the icon is determined by the "stock_id" property. If the
+ * "stock_id" property is also <tt>0</tt>, @a button will not have an icon.
+ *
+ * Since: 2.4
+ * @param icon_widget The widget used as icon, or <tt>0</tt>.
+ */
+ void set_icon_widget(Widget& icon_widget);
+
+ /** Return the widget used as icon widget on @a button . See
+ * set_icon_widget().
+ * @return The widget used as icon on @a button , or <tt>0</tt>.
+ *
+ * Since: 2.4.
+ */
+ Widget* get_icon_widget();
+
+ /** Return the widget used as icon widget on @a button . See
+ * set_icon_widget().
+ * @return The widget used as icon on @a button , or <tt>0</tt>.
+ *
+ * Since: 2.4.
+ */
+ const Widget* get_icon_widget() const;
+
+ /** Sets @a label_widget as the widget that will be used as the label
+ * for @a button . If @a label_widget is <tt>0</tt> the "label" property is used
+ * as label. If "label" is also <tt>0</tt>, the label in the stock item
+ * determined by the "stock_id" property is used as label. If
+ * "stock_id" is also <tt>0</tt>, @a button does not have a label.
+ *
+ * Since: 2.4
+ * @param label_widget The widget used as label, or <tt>0</tt>.
+ */
+ void set_label_widget(Widget& label_widget);
+
+ /** Returns the widget used as label on @a button . See
+ * set_label_widget().
+ * @return The widget used as label on @a button , or <tt>0</tt>.
+ *
+ * Since: 2.4.
+ */
+ Widget* get_label_widget();
+
+ /** Returns the widget used as label on @a button . See
+ * set_label_widget().
+ * @return The widget used as label on @a button , or <tt>0</tt>.
+ *
+ * Since: 2.4.
+ */
+ const Widget* get_label_widget() const;
+
+
+ Glib::SignalProxy0< void > signal_clicked();
+
+
+ /** Text to show in the item.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_label() ;
+
+/** Text to show in the item.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_label() const;
+
+ /** If set
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_use_underline() ;
+
+/** If set
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_use_underline() const;
+
+ /** Widget to use as the item label.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Gtk::Widget*> property_label_widget() ;
+
+/** Widget to use as the item label.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Gtk::Widget*> property_label_widget() const;
+
+ /** The stock icon displayed on the item.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_stock_id() ;
+
+/** The stock icon displayed on the item.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_stock_id() const;
+
+ /** Icon widget to display in the item.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Gtk::Widget> property_icon_widget() ;
+
+/** Icon widget to display in the item.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Gtk::Widget> property_icon_widget() const;
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::ToolButton
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::ToolButton* wrap(GtkToolButton* object, bool take_copy = false);
+}
+#endif /* _GTKMM_TOOLBUTTON_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/toolitem.cc b/libs/gtkmm2/gtk/gtkmm/toolitem.cc
new file mode 100644
index 0000000000..bc9e5dbc98
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/toolitem.cc
@@ -0,0 +1,517 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/toolitem.h>
+#include <gtkmm/private/toolitem_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtktoolitem.h>
+
+namespace Gtk
+{
+
+
+} // namespace Gtk
+
+
+namespace
+{
+
+gboolean ToolItem_signal_create_menu_proxy_callback(GtkToolItem* self, void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< bool > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ return static_cast<int>((*static_cast<SlotType*>(slot))());
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean ToolItem_signal_create_menu_proxy_notify_callback(GtkToolItem* self, void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+const Glib::SignalProxyInfo ToolItem_signal_create_menu_proxy_info =
+{
+ "create_menu_proxy",
+ (GCallback) &ToolItem_signal_create_menu_proxy_callback,
+ (GCallback) &ToolItem_signal_create_menu_proxy_notify_callback
+};
+
+
+const Glib::SignalProxyInfo ToolItem_signal_toolbar_reconfigured_info =
+{
+ "toolbar_reconfigured",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+
+gboolean ToolItem_signal_set_tooltip_callback(GtkToolItem* self, GtkTooltips* p0,const gchar* p1,const gchar* p2,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< bool,Tooltips*,const Glib::ustring&,const Glib::ustring& > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ return static_cast<int>((*static_cast<SlotType*>(slot))(Glib::wrap(p0)
+, Glib::convert_const_gchar_ptr_to_ustring(p1)
+, Glib::convert_const_gchar_ptr_to_ustring(p2)
+));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean ToolItem_signal_set_tooltip_notify_callback(GtkToolItem* self, GtkTooltips* p0,const gchar* p1,const gchar* p2, void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,Tooltips*,const Glib::ustring&,const Glib::ustring& > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::wrap(p0)
+, Glib::convert_const_gchar_ptr_to_ustring(p1)
+, Glib::convert_const_gchar_ptr_to_ustring(p2)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+const Glib::SignalProxyInfo ToolItem_signal_set_tooltip_info =
+{
+ "set_tooltip",
+ (GCallback) &ToolItem_signal_set_tooltip_callback,
+ (GCallback) &ToolItem_signal_set_tooltip_notify_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::ToolItem* wrap(GtkToolItem* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::ToolItem *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& ToolItem_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &ToolItem_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_tool_item_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void ToolItem_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->create_menu_proxy = &create_menu_proxy_callback;
+ klass->toolbar_reconfigured = &toolbar_reconfigured_callback;
+}
+
+
+gboolean ToolItem_Class::create_menu_proxy_callback(GtkToolItem* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->on_create_menu_proxy());
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->create_menu_proxy)
+ return (*base->create_menu_proxy)(self);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+void ToolItem_Class::toolbar_reconfigured_callback(GtkToolItem* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_toolbar_reconfigured();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->toolbar_reconfigured)
+ (*base->toolbar_reconfigured)(self);
+ }
+}
+
+
+Glib::ObjectBase* ToolItem_Class::wrap_new(GObject* o)
+{
+ return manage(new ToolItem((GtkToolItem*)(o)));
+
+}
+
+
+/* The implementation: */
+
+ToolItem::ToolItem(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Bin(construct_params)
+{
+ }
+
+ToolItem::ToolItem(GtkToolItem* castitem)
+:
+ Gtk::Bin((GtkBin*)(castitem))
+{
+ }
+
+ToolItem::~ToolItem()
+{
+ destroy_();
+}
+
+ToolItem::CppClassType ToolItem::toolitem_class_; // initialize static member
+
+GType ToolItem::get_type()
+{
+ return toolitem_class_.init().get_type();
+}
+
+GType ToolItem::get_base_type()
+{
+ return gtk_tool_item_get_type();
+}
+
+
+ToolItem::ToolItem()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Bin(Glib::ConstructParams(toolitem_class_.init()))
+{
+ }
+
+void ToolItem::set_homogeneous(bool homogeneous)
+{
+ gtk_tool_item_set_homogeneous(gobj(), static_cast<int>(homogeneous));
+}
+
+bool ToolItem::get_homogeneous() const
+{
+ return gtk_tool_item_get_homogeneous(const_cast<GtkToolItem*>(gobj()));
+}
+
+void ToolItem::set_expand(bool expand)
+{
+ gtk_tool_item_set_expand(gobj(), static_cast<int>(expand));
+}
+
+bool ToolItem::get_expand() const
+{
+ return gtk_tool_item_get_expand(const_cast<GtkToolItem*>(gobj()));
+}
+
+void ToolItem::set_tooltip(Tooltips& tooltips, const Glib::ustring& tip_text, const Glib::ustring& tip_private)
+{
+ gtk_tool_item_set_tooltip(gobj(), (tooltips).gobj(), tip_text.c_str(), tip_private.c_str());
+}
+
+void ToolItem::set_use_drag_window(bool use_drag_window)
+{
+ gtk_tool_item_set_use_drag_window(gobj(), static_cast<int>(use_drag_window));
+}
+
+bool ToolItem::get_use_drag_window() const
+{
+ return gtk_tool_item_get_use_drag_window(const_cast<GtkToolItem*>(gobj()));
+}
+
+void ToolItem::set_visible_horizontal(bool visible_horizontal)
+{
+ gtk_tool_item_set_visible_horizontal(gobj(), static_cast<int>(visible_horizontal));
+}
+
+bool ToolItem::get_visible_horizontal() const
+{
+ return gtk_tool_item_get_visible_horizontal(const_cast<GtkToolItem*>(gobj()));
+}
+
+void ToolItem::set_visible_vertical(bool visible_vertical)
+{
+ gtk_tool_item_set_visible_vertical(gobj(), static_cast<int>(visible_vertical));
+}
+
+bool ToolItem::get_visible_vertical() const
+{
+ return gtk_tool_item_get_visible_vertical(const_cast<GtkToolItem*>(gobj()));
+}
+
+bool ToolItem::get_is_important() const
+{
+ return gtk_tool_item_get_is_important(const_cast<GtkToolItem*>(gobj()));
+}
+
+void ToolItem::set_is_important(bool is_important)
+{
+ gtk_tool_item_set_is_important(gobj(), static_cast<int>(is_important));
+}
+
+IconSize ToolItem::get_icon_size() const
+{
+ return IconSize(static_cast<int>(gtk_tool_item_get_icon_size(const_cast<GtkToolItem*>(gobj()))));
+}
+
+Orientation ToolItem::get_orientation() const
+{
+ return ((Orientation)(gtk_tool_item_get_orientation(const_cast<GtkToolItem*>(gobj()))));
+}
+
+ToolbarStyle ToolItem::get_toolbar_style() const
+{
+ return ((ToolbarStyle)(gtk_tool_item_get_toolbar_style(const_cast<GtkToolItem*>(gobj()))));
+}
+
+ReliefStyle ToolItem::get_relief_style() const
+{
+ return ((ReliefStyle)(gtk_tool_item_get_relief_style(const_cast<GtkToolItem*>(gobj()))));
+}
+
+Widget* ToolItem::retrieve_proxy_menu_item()
+{
+ return Glib::wrap(gtk_tool_item_retrieve_proxy_menu_item(gobj()));
+}
+
+const Widget* ToolItem::retrieve_proxy_menu_item() const
+{
+ return Glib::wrap(gtk_tool_item_retrieve_proxy_menu_item(const_cast<GtkToolItem*>(gobj())));
+}
+
+Widget* ToolItem::get_proxy_menu_item(const Glib::ustring& menu_item_id)
+{
+ return Glib::wrap(gtk_tool_item_get_proxy_menu_item(gobj(), menu_item_id.c_str()));
+}
+
+const Widget* ToolItem::get_proxy_menu_item(const Glib::ustring& menu_item_id) const
+{
+ return Glib::wrap(gtk_tool_item_get_proxy_menu_item(const_cast<GtkToolItem*>(gobj()), menu_item_id.c_str()));
+}
+
+void ToolItem::set_proxy_menu_item(const Glib::ustring& menu_item_id, Widget& menu_item)
+{
+ gtk_tool_item_set_proxy_menu_item(gobj(), menu_item_id.c_str(), (menu_item).gobj());
+}
+
+void ToolItem::rebuild_menu()
+{
+ gtk_tool_item_rebuild_menu(gobj());
+}
+
+
+Glib::SignalProxy0< bool > ToolItem::signal_create_menu_proxy()
+{
+ return Glib::SignalProxy0< bool >(this, &ToolItem_signal_create_menu_proxy_info);
+}
+
+Glib::SignalProxy0< void > ToolItem::signal_toolbar_reconfigured()
+{
+ return Glib::SignalProxy0< void >(this, &ToolItem_signal_toolbar_reconfigured_info);
+}
+
+Glib::SignalProxy3< bool,Tooltips*,const Glib::ustring&,const Glib::ustring& > ToolItem::signal_set_tooltip()
+{
+ return Glib::SignalProxy3< bool,Tooltips*,const Glib::ustring&,const Glib::ustring& >(this, &ToolItem_signal_set_tooltip_info);
+}
+
+
+Glib::PropertyProxy<bool> ToolItem::property_visible_horizontal()
+{
+ return Glib::PropertyProxy<bool>(this, "visible-horizontal");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> ToolItem::property_visible_horizontal() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "visible-horizontal");
+}
+
+Glib::PropertyProxy<bool> ToolItem::property_visible_vertical()
+{
+ return Glib::PropertyProxy<bool>(this, "visible-vertical");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> ToolItem::property_visible_vertical() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "visible-vertical");
+}
+
+Glib::PropertyProxy<bool> ToolItem::property_is_important()
+{
+ return Glib::PropertyProxy<bool>(this, "is-important");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> ToolItem::property_is_important() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "is-important");
+}
+
+
+bool Gtk::ToolItem::on_create_menu_proxy()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->create_menu_proxy)
+ return (*base->create_menu_proxy)(gobj());
+
+ typedef bool RType;
+ return RType();
+}
+
+void Gtk::ToolItem::on_toolbar_reconfigured()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->toolbar_reconfigured)
+ (*base->toolbar_reconfigured)(gobj());
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/toolitem.h b/libs/gtkmm2/gtk/gtkmm/toolitem.h
new file mode 100644
index 0000000000..29b4bf2850
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/toolitem.h
@@ -0,0 +1,442 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TOOLITEM_H
+#define _GTKMM_TOOLITEM_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* box.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/bin.h>
+#include <gtkmm/tooltips.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkToolItem GtkToolItem;
+typedef struct _GtkToolItemClass GtkToolItemClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class ToolItem_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/**
+ *
+ * @ingroup Widgets
+ */
+
+class ToolItem : public Bin
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef ToolItem CppObjectType;
+ typedef ToolItem_Class CppClassType;
+ typedef GtkToolItem BaseObjectType;
+ typedef GtkToolItemClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~ToolItem();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class ToolItem_Class;
+ static CppClassType toolitem_class_;
+
+ // noncopyable
+ ToolItem(const ToolItem&);
+ ToolItem& operator=(const ToolItem&);
+
+protected:
+ explicit ToolItem(const Glib::ConstructParams& construct_params);
+ explicit ToolItem(GtkToolItem* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkToolItem* gobj() { return reinterpret_cast<GtkToolItem*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkToolItem* gobj() const { return reinterpret_cast<GtkToolItem*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual bool on_create_menu_proxy();
+ virtual void on_toolbar_reconfigured();
+
+
+private:
+
+public:
+ ToolItem();
+
+
+ /** Sets whether @a tool_item is to be allocated the same size as other
+ * homogeneous items. The effect is that all homogeneous items will have
+ * the same width as the widest of the items.
+ *
+ * Since: 2.4
+ * @param homogeneous Whether @a tool_item is the same size as other homogeneous items.
+ */
+ void set_homogeneous(bool homogeneous = true);
+
+ /** Returns whether @a tool_item is the same size as other homogeneous
+ * items. See set_homogeneous().
+ * @return <tt>true</tt> if the item is the same size as other homogeneous
+ * item.s
+ *
+ * Since: 2.4.
+ */
+ bool get_homogeneous() const;
+
+
+ /** Sets whether @a tool_item is allocated extra space when there
+ * is more room on the toolbar then needed for the items. The
+ * effect is that the item gets bigger when the toolbar gets bigger
+ * and smaller when the toolbar gets smaller.
+ *
+ * Since: 2.4
+ * @param expand Whether @a tool_item is allocated extra space.
+ */
+ void set_expand(bool expand = true);
+
+ /** Returns whether @a tool_item is allocated extra space.
+ * See set_expand().
+ * @return <tt>true</tt> if @a tool_item is allocated extra space.
+ *
+ * Since: 2.4.
+ */
+ bool get_expand() const;
+
+
+ /** Sets the Gtk::Tooltips object to be used for @a tool_item , the
+ * text to be displayed as tooltip on the item and the private text
+ * to be used. See Gtk::Tooltips::set_tip().
+ *
+ * Since: 2.4
+ * @param tooltips The Gtk::Tooltips object to be used.
+ * @param tip_text Text to be used as tooltip text for @a tool_item .
+ * @param tip_private Text to be used as private tooltip text.
+ */
+ void set_tooltip(Tooltips& tooltips, const Glib::ustring& tip_text, const Glib::ustring& tip_private = Glib::ustring());
+
+
+ /** Sets whether @a toolitem has a drag window. When <tt>true</tt> the
+ * toolitem can be used as a drag source through gtk_drag_source_set().
+ * When @a toolitem has a drag window it will intercept all events,
+ * even those that would otherwise be sent to a child of @a toolitem .
+ *
+ * Since: 2.4
+ * @param use_drag_window Whether @a toolitem has a drag window.
+ */
+ void set_use_drag_window(bool use_drag_window = true);
+
+ /** Returns whether @a toolitem has a drag window. See
+ * set_use_drag_window().
+ * @return <tt>true</tt> if @a toolitem uses a drag window.
+ *
+ * Since: 2.4.
+ */
+ bool get_use_drag_window() const;
+
+
+ /** Sets whether @a toolitem is visible when the toolbar is docked horizontally.
+ *
+ * Since: 2.4
+ * @param visible_horizontal Whether @a toolitem is visible when in horizontal mode.
+ */
+ void set_visible_horizontal(bool visible_horizontal = true);
+
+ /** Returns whether the @a toolitem is visible on toolbars that are
+ * docked horizontally.
+ * @return <tt>true</tt> if @a toolitem is visible on toolbars that are
+ * docked horizontally.
+ *
+ * Since: 2.4.
+ */
+ bool get_visible_horizontal() const;
+
+
+ /** Sets whether @a toolitem is visible when the toolbar is docked
+ * vertically. Some tool items, such as text entries, are too wide to be
+ * useful on a vertically docked toolbar. If @a visible_vertical is <tt>false</tt>
+ * @a toolitem will not appear on toolbars that are docked vertically.
+ *
+ * Since: 2.4
+ * @param visible_vertical Whether @a toolitem is visible when the toolbar
+ * is in vertical mode.
+ */
+ void set_visible_vertical(bool visible_vertical = true);
+
+ /** Returns whether @a toolitem is visible when the toolbar is docked vertically.
+ * See set_visible_vertical().
+ * @return Whether @a toolitem is visible when the toolbar is docked vertically
+ *
+ * Since: 2.4.
+ */
+ bool get_visible_vertical() const;
+
+
+ /** Returns whether @a tool_item is considered important. See
+ * set_is_important()
+ * @return <tt>true</tt> if @a tool_item is considered important.
+ *
+ * Since: 2.4.
+ */
+ bool get_is_important() const;
+
+ /** Sets whether @a tool_item should be considered important. The Gtk::ToolButton
+ * class uses this property to determine whether to show or hide its label
+ * when the toolbar style is Gtk::TOOLBAR_BOTH_HORIZ. The result is that
+ * only tool buttons with the "is_important" property set have labels, an
+ * effect known as "priority text"
+ *
+ * Since: 2.4
+ * @param is_important Whether the tool item should be considered important.
+ */
+ void set_is_important(bool is_important = true);
+
+
+ /** Returns the icon size used for @a tool_item . Custom subclasses of
+ * Gtk::ToolItem should call this function to find out what size icons
+ * they should use.
+ * @return A Gtk::IconSize indicating the icon size used for @a tool_item
+ *
+ * Since: 2.4.
+ */
+ IconSize get_icon_size () const;
+
+ /** Returns the orientation used for @a tool_item . Custom subclasses of
+ * Gtk::ToolItem should call this function to find out what size icons
+ * they should use.
+ * @return A Gtk::Orientation indicating the orientation
+ * used for @a tool_item
+ *
+ * Since: 2.4.
+ */
+ Orientation get_orientation() const;
+
+ /** Returns the toolbar style used for @a tool_item . Custom subclasses of
+ * Gtk::ToolItem should call this function in the handler of the
+ * GtkToolItem::toolbar_reconfigured signal to find out in what style
+ * the toolbar is displayed and change themselves accordingly
+ *
+ * Possibilities are:
+ * &lt;itemizedlist&gt;
+ * &lt;listitem&gt; GTK_TOOLBAR_BOTH, meaning the tool item should show
+ * both an icon and a label, stacked vertically &lt;/listitem&gt;
+ * &lt;listitem&gt; GTK_TOOLBAR_ICONS, meaning the toolbar shows
+ * only icons &lt;/listitem&gt;
+ * &lt;listitem&gt; GTK_TOOLBAR_TEXT, meaning the tool item should only
+ * show text&lt;/listitem&gt;
+ * &lt;listitem&gt; GTK_TOOLBAR_BOTH_HORIZ, meaning the tool item should show
+ * both an icon and a label, arranged horizontally (however, note the
+ * Gtk::ToolButton::has_text_horizontally that makes tool buttons not
+ * show labels when the toolbar style is GTK_TOOLBAR_BOTH_HORIZ.
+ * &lt;/listitem&gt;
+ * &lt;/itemizedlist&gt;
+ * @return A Gtk::ToolbarStyle indicating the toolbar style used
+ * for @a tool_item .
+ *
+ * Since: 2.4.
+ */
+ ToolbarStyle get_toolbar_style() const;
+
+ /** Returns the relief style of @a tool_item . See gtk_button_set_relief_style().
+ * Custom subclasses of Gtk::ToolItem should call this function in the handler
+ * of the Gtk::ToolItem::toolbar_reconfigured signal to find out the
+ * relief style of buttons.
+ * @return A Gtk::ReliefStyle indicating the relief style used
+ * for @a tool_item .
+ *
+ * Since: 2.4.
+ */
+ ReliefStyle get_relief_style() const;
+
+
+ /** Returns the Gtk::MenuItem that was last set by
+ * set_proxy_menu_item(), ie. the Gtk::MenuItem
+ * that is going to appear in the overflow menu.
+ * @return The Gtk::MenuItem that is going to appear in the
+ * overflow menu for @a tool_item .
+ *
+ * Since: 2.4.
+ */
+ Widget* retrieve_proxy_menu_item();
+
+ /** Returns the Gtk::MenuItem that was last set by
+ * set_proxy_menu_item(), ie. the Gtk::MenuItem
+ * that is going to appear in the overflow menu.
+ * @return The Gtk::MenuItem that is going to appear in the
+ * overflow menu for @a tool_item .
+ *
+ * Since: 2.4.
+ */
+ const Widget* retrieve_proxy_menu_item() const;
+
+ /** If @a menu_item_id matches the string passed to
+ * set_proxy_menu_item() return the corresponding Gtk::MenuItem.
+ *
+ * Custom subclasses of Gtk::ToolItem should use this function to update
+ * their menu item when the Gtk::ToolItem changes. That the
+ * @a menu_item_id &lt;!-- --&gt;s must match ensures that a Gtk::ToolItem will not
+ * inadvertently change a menu item that they did not create.
+ * @param menu_item_id A string used to identify the menu item.
+ * @return The Gtk::MenuItem passed to
+ * set_proxy_menu_item(), if the @a menu_item_id &lt;!-- --&gt;s match.
+ *
+ * Since: 2.4.
+ */
+ Widget* get_proxy_menu_item(const Glib::ustring& menu_item_id);
+
+ /** If @a menu_item_id matches the string passed to
+ * set_proxy_menu_item() return the corresponding Gtk::MenuItem.
+ *
+ * Custom subclasses of Gtk::ToolItem should use this function to update
+ * their menu item when the Gtk::ToolItem changes. That the
+ * @a menu_item_id &lt;!-- --&gt;s must match ensures that a Gtk::ToolItem will not
+ * inadvertently change a menu item that they did not create.
+ * @param menu_item_id A string used to identify the menu item.
+ * @return The Gtk::MenuItem passed to
+ * set_proxy_menu_item(), if the @a menu_item_id &lt;!-- --&gt;s match.
+ *
+ * Since: 2.4.
+ */
+ const Widget* get_proxy_menu_item(const Glib::ustring& menu_item_id) const;
+
+ /** Sets the Gtk::MenuItem used in the toolbar overflow menu. The
+ * @a menu_item_id is used to identify the caller of this function and
+ * should also be used with get_proxy_menu_item().
+ *
+ * Since: 2.4
+ * @param menu_item_id A string used to identify @a menu_item .
+ * @param menu_item A Gtk::MenuItem to be used in the overflow menu.
+ */
+ void set_proxy_menu_item(const Glib::ustring& menu_item_id, Widget& menu_item);
+
+
+ /** Calling this function signals to the toolbar that the
+ * overflow menu item for @a tool_item has changed. If the
+ * overflow menu is visible when this function it called,
+ * the menu will be rebuilt.
+ *
+ * The function must be called when the tool item
+ * changes what it will do in response to the "create_menu_proxy"
+ * signal.
+ *
+ * Since: 2.6
+ */
+ void rebuild_menu();
+
+
+ Glib::SignalProxy0< bool > signal_create_menu_proxy();
+
+
+ Glib::SignalProxy0< void > signal_toolbar_reconfigured();
+
+
+ //We use no_default_handler for this, because we can not add a new vfunc to 2.5 without breaking ABI.
+ //TODO: Remove no_default_handler when we do an ABI-break-with-parallel-install.
+
+
+ Glib::SignalProxy3< bool,Tooltips*,const Glib::ustring&,const Glib::ustring& > signal_set_tooltip();
+
+
+ /** Whether the toolbar item is visible when the toolbar is in a horizontal orientation.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_visible_horizontal() ;
+
+/** Whether the toolbar item is visible when the toolbar is in a horizontal orientation.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_visible_horizontal() const;
+
+ /** Whether the toolbar item is visible when the toolbar is in a vertical orientation.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_visible_vertical() ;
+
+/** Whether the toolbar item is visible when the toolbar is in a vertical orientation.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_visible_vertical() const;
+
+ /** Whether the toolbar item is considered important. When TRUE
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_is_important() ;
+
+/** Whether the toolbar item is considered important. When TRUE
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_is_important() const;
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::ToolItem
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::ToolItem* wrap(GtkToolItem* object, bool take_copy = false);
+}
+#endif /* _GTKMM_TOOLITEM_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/tooltips.cc b/libs/gtkmm2/gtk/gtkmm/tooltips.cc
new file mode 100644
index 0000000000..80b1946879
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/tooltips.cc
@@ -0,0 +1,171 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/tooltips.h>
+#include <gtkmm/private/tooltips_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkwidget.h>
+#include <gtk/gtktooltips.h>
+#include <gdkmm/color.h>
+#include <gtkmm/widget.h>
+
+
+namespace Gtk
+{
+
+void Tooltips::set_tip(Gtk::Widget& widget, const Glib::ustring& tip_text)
+{
+ gtk_tooltips_set_tip(gobj(), widget.gobj(), tip_text.c_str(), 0);
+}
+
+void Tooltips::unset_tip(Gtk::Widget& widget)
+{
+ gtk_tooltips_set_tip(gobj(), widget.gobj(), 0, 0);
+}
+
+} // namespace Gtk
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::Tooltips* wrap(GtkTooltips* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::Tooltips *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Tooltips_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Tooltips_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_tooltips_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Tooltips_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* Tooltips_Class::wrap_new(GObject* o)
+{
+ return manage(new Tooltips((GtkTooltips*)(o)));
+
+}
+
+
+/* The implementation: */
+
+Tooltips::Tooltips(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Object(construct_params)
+{
+ }
+
+Tooltips::Tooltips(GtkTooltips* castitem)
+:
+ Gtk::Object((GtkObject*)(castitem))
+{
+ }
+
+Tooltips::~Tooltips()
+{
+ destroy_();
+}
+
+Tooltips::CppClassType Tooltips::tooltips_class_; // initialize static member
+
+GType Tooltips::get_type()
+{
+ return tooltips_class_.init().get_type();
+}
+
+GType Tooltips::get_base_type()
+{
+ return gtk_tooltips_get_type();
+}
+
+
+Tooltips::Tooltips()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Object(Glib::ConstructParams(tooltips_class_.init()))
+{
+ }
+
+void Tooltips::enable()
+{
+ gtk_tooltips_enable(gobj());
+}
+
+void Tooltips::disable()
+{
+ gtk_tooltips_disable(gobj());
+}
+
+void Tooltips::set_tip(Widget& widget, const Glib::ustring& tip_text, const Glib::ustring& tip_private)
+{
+ gtk_tooltips_set_tip(gobj(), (widget).gobj(), tip_text.c_str(), tip_private.c_str());
+}
+
+GtkTooltipsData* Tooltips::data_get(Widget& widget)
+{
+ return gtk_tooltips_data_get((widget).gobj());
+}
+
+void Tooltips::force_window()
+{
+ gtk_tooltips_force_window(gobj());
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/tooltips.h b/libs/gtkmm2/gtk/gtkmm/tooltips.h
new file mode 100644
index 0000000000..277dc72466
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/tooltips.h
@@ -0,0 +1,145 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TOOLTIPS_H
+#define _GTKMM_TOOLTIPS_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gdkmm/color.h>
+#include <gtkmm/object.h>
+
+
+typedef struct _GtkTooltipsData GtkTooltipsData;
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkTooltips GtkTooltips;
+typedef struct _GtkTooltipsClass GtkTooltipsClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class Tooltips_Class; } // namespace Gtk
+namespace Gtk
+{
+
+class Widget;
+
+/** Tooltips are the messages that appear next to a widget when the mouse
+ * pointer is held over it for a short amount of time. They are especially
+ * helpful for adding more verbose descriptions of things such as buttons
+ * in a toolbar.
+ *
+ * This widget holds tooltips for other widgets. You should only need one
+ * Tooltip widget for all widgets you wish to add tips to.
+ */
+
+class Tooltips : public Object
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Tooltips CppObjectType;
+ typedef Tooltips_Class CppClassType;
+ typedef GtkTooltips BaseObjectType;
+ typedef GtkTooltipsClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~Tooltips();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class Tooltips_Class;
+ static CppClassType tooltips_class_;
+
+ // noncopyable
+ Tooltips(const Tooltips&);
+ Tooltips& operator=(const Tooltips&);
+
+protected:
+ explicit Tooltips(const Glib::ConstructParams& construct_params);
+ explicit Tooltips(GtkTooltips* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkTooltips* gobj() { return reinterpret_cast<GtkTooltips*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkTooltips* gobj() const { return reinterpret_cast<GtkTooltips*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+
+public:
+ Tooltips();
+
+
+ void enable();
+
+ void disable();
+
+
+ void set_tip(Widget& widget, const Glib::ustring& tip_text, const Glib::ustring& tip_private);
+ void set_tip(Widget& widget, const Glib::ustring& tip_text);
+ void unset_tip(Widget& widget);
+
+protected:
+
+ static GtkTooltipsData* data_get(Widget& widget);
+
+public:
+
+ void force_window();
+
+
+};
+
+} //namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::Tooltips
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::Tooltips* wrap(GtkTooltips* object, bool take_copy = false);
+}
+#endif /* _GTKMM_TOOLTIPS_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/treedragdest.cc b/libs/gtkmm2/gtk/gtkmm/treedragdest.cc
new file mode 100644
index 0000000000..d201fbddea
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/treedragdest.cc
@@ -0,0 +1,244 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/treedragdest.h>
+#include <gtkmm/private/treedragdest_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/treepath.h>
+#include <gtkmm/selectiondata_private.h>
+#include <gtk/gtktreednd.h>
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Gtk::TreeDragDest> wrap(GtkTreeDragDest* object, bool take_copy)
+{
+ return Glib::RefPtr<Gtk::TreeDragDest>( dynamic_cast<Gtk::TreeDragDest*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} // namespace Glib
+
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Interface_Class& TreeDragDest_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Interface_Class has to know the interface init function
+ // in order to add interfaces to implementing types.
+ class_init_func_ = &TreeDragDest_Class::iface_init_function;
+
+ // We can not derive from another interface, and it is not necessary anyway.
+ gtype_ = gtk_tree_drag_dest_get_type();
+ }
+
+ return *this;
+}
+
+void TreeDragDest_Class::iface_init_function(void* g_iface, void*)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_iface);
+
+ //This is just to avoid an "unused variable" warning when there are no vfuncs or signal handlers to connect.
+ //This is a temporary fix until I find out why I can not seem to derive a GtkFileChooser interface. murrayc
+ g_assert(klass != 0);
+
+ klass->drag_data_received = &drag_data_received_vfunc_callback;
+ klass->row_drop_possible = &row_drop_possible_vfunc_callback;
+}
+
+gboolean TreeDragDest_Class::drag_data_received_vfunc_callback(GtkTreeDragDest* self, GtkTreePath* dest, GtkSelectionData* selection_data)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->drag_data_received_vfunc(Gtk::TreePath(dest, true)
+, SelectionData_WithoutOwnership(selection_data)
+));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->drag_data_received)
+ return (*base->drag_data_received)(self, dest, selection_data);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean TreeDragDest_Class::row_drop_possible_vfunc_callback(GtkTreeDragDest* self, GtkTreePath* dest_path, GtkSelectionData* selection_data)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->row_drop_possible_vfunc(Gtk::TreePath(dest_path, true)
+, SelectionData_WithoutOwnership(selection_data)
+));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->row_drop_possible)
+ return (*base->row_drop_possible)(self, dest_path, selection_data);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+
+Glib::ObjectBase* TreeDragDest_Class::wrap_new(GObject* object)
+{
+ return new TreeDragDest((GtkTreeDragDest*)(object));
+}
+
+
+/* The implementation: */
+
+TreeDragDest::TreeDragDest()
+:
+ Glib::Interface(treedragdest_class_.init())
+{}
+
+TreeDragDest::TreeDragDest(GtkTreeDragDest* castitem)
+:
+ Glib::Interface((GObject*)(castitem))
+{}
+
+TreeDragDest::~TreeDragDest()
+{}
+
+// static
+void TreeDragDest::add_interface(GType gtype_implementer)
+{
+ treedragdest_class_.init().add_interface(gtype_implementer);
+}
+
+TreeDragDest::CppClassType TreeDragDest::treedragdest_class_; // initialize static member
+
+GType TreeDragDest::get_type()
+{
+ return treedragdest_class_.init().get_type();
+}
+
+GType TreeDragDest::get_base_type()
+{
+ return gtk_tree_drag_dest_get_type();
+}
+
+
+bool TreeDragDest::drag_data_received(const TreeModel::Path& dest, const SelectionData& selection_data)
+{
+ return gtk_tree_drag_dest_drag_data_received(gobj(), const_cast<GtkTreePath*>((dest).gobj()), const_cast<GtkSelectionData*>((selection_data).gobj()));
+}
+
+bool TreeDragDest::row_drop_possible(const TreeModel::Path& dest_path, const SelectionData& selection_data) const
+{
+ return gtk_tree_drag_dest_row_drop_possible(const_cast<GtkTreeDragDest*>(gobj()), const_cast<GtkTreePath*>((dest_path).gobj()), const_cast<GtkSelectionData*>((selection_data).gobj()));
+}
+
+
+bool Gtk::TreeDragDest::drag_data_received_vfunc(const TreeModel::Path& dest, const SelectionData& selection_data)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->drag_data_received)
+ return (*base->drag_data_received)(gobj(),const_cast<GtkTreePath*>((dest).gobj()),const_cast<GtkSelectionData*>((selection_data).gobj()));
+
+ typedef bool RType;
+ return RType();
+}
+
+bool Gtk::TreeDragDest::row_drop_possible_vfunc(const TreeModel::Path& dest, const SelectionData& selection_data) const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->row_drop_possible)
+ return (*base->row_drop_possible)(const_cast<GtkTreeDragDest*>(gobj()),const_cast<GtkTreePath*>((dest).gobj()),const_cast<GtkSelectionData*>((selection_data).gobj()));
+
+ typedef bool RType;
+ return RType();
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/treedragdest.h b/libs/gtkmm2/gtk/gtkmm/treedragdest.h
new file mode 100644
index 0000000000..afd98c697c
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/treedragdest.h
@@ -0,0 +1,161 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TREEDRAGDEST_H
+#define _GTKMM_TREEDRAGDEST_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/interface.h>
+#include <gtkmm/treemodel.h>
+#include <gtkmm/selectiondata.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C"
+{
+typedef struct _GtkTreeDragDestIface GtkTreeDragDestIface;
+typedef struct _GtkSelectionData GtkSelectionData;
+}
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkTreeDragDest GtkTreeDragDest;
+typedef struct _GtkTreeDragDestClass GtkTreeDragDestClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class TreeDragDest_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/**
+ * @ingroup TreeView
+ */
+
+class TreeDragDest : public Glib::Interface
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef TreeDragDest CppObjectType;
+ typedef TreeDragDest_Class CppClassType;
+ typedef GtkTreeDragDest BaseObjectType;
+ typedef GtkTreeDragDestIface BaseClassType;
+
+private:
+ friend class TreeDragDest_Class;
+ static CppClassType treedragdest_class_;
+
+ // noncopyable
+ TreeDragDest(const TreeDragDest&);
+ TreeDragDest& operator=(const TreeDragDest&);
+
+protected:
+ TreeDragDest(); // you must derive from this class
+ explicit TreeDragDest(GtkTreeDragDest* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~TreeDragDest();
+
+ static void add_interface(GType gtype_implementer);
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ GtkTreeDragDest* gobj() { return reinterpret_cast<GtkTreeDragDest*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const GtkTreeDragDest* gobj() const { return reinterpret_cast<GtkTreeDragDest*>(gobject_); }
+
+private:
+
+
+public:
+
+
+ /** Asks the Gtk::TreeDragDest to insert a row before the path @a dest ,
+ * deriving the contents of the row from @a selection_data . If @a dest is
+ * outside the tree so that inserting before it is impossible, <tt>false</tt>
+ * will be returned. Also, <tt>false</tt> may be returned if the new row is
+ * not created for some model-specific reason. Should robustly handle
+ * a @a dest no longer found in the model!
+ * @param dest Row to drop in front of.
+ * @param selection_data Data to drop.
+ * @return Whether a new row was created before position @a dest .
+ */
+ bool drag_data_received(const TreeModel::Path& dest, const SelectionData& selection_data);
+
+
+ /** Determines whether a drop is possible before the given @a dest_path ,
+ * at the same depth as @a dest_path . i.e., can we drop the data in
+ * @a selection_data at that location. @a dest_path does not have to
+ * exist; the return value will almost certainly be <tt>false</tt> if the
+ * parent of @a dest_path doesn't exist, though.
+ * @param dest_path Destination row.
+ * @param selection_data The data being dragged.
+ * @return <tt>true</tt> if a drop is possible before @a dest_path .
+ */
+ bool row_drop_possible(const TreeModel::Path& dest_path, const SelectionData& selection_data) const;
+
+protected:
+ virtual bool drag_data_received_vfunc(const TreeModel::Path& dest, const SelectionData& selection_data);
+
+ virtual bool row_drop_possible_vfunc(const TreeModel::Path& dest, const SelectionData& selection_data) const;
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::TreeDragDest
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Gtk::TreeDragDest> wrap(GtkTreeDragDest* object, bool take_copy = false);
+
+} // namespace Glib
+
+#endif /* _GTKMM_TREEDRAGDEST_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/treedragsource.cc b/libs/gtkmm2/gtk/gtkmm/treedragsource.cc
new file mode 100644
index 0000000000..57cbdeb64b
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/treedragsource.cc
@@ -0,0 +1,309 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/treedragsource.h>
+#include <gtkmm/private/treedragsource_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/treepath.h>
+#include <gtkmm/selectiondata_private.h> //For SelectionData_WithoutOwnership
+#include <gtk/gtktreednd.h>
+
+
+namespace Gtk
+{
+
+//This vfunc wrapper is manually written, so that we can use a temporary instance for the SelectionData& output parameter:
+
+gboolean TreeDragSource_Class::drag_data_get_vfunc_callback(GtkTreeDragSource* self, GtkTreePath* path, GtkSelectionData* selection_data)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ SelectionData_WithoutOwnership temp_instance(selection_data);
+ return static_cast<int>(obj->drag_data_get_vfunc(Gtk::TreePath(path, true), temp_instance));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->drag_data_get)
+ return (*base->drag_data_get)(self, path, selection_data);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+bool Gtk::TreeDragSource::drag_data_get_vfunc(const TreeModel::Path& path, SelectionData& selection_data) const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->drag_data_get)
+ return (*base->drag_data_get)(const_cast<GtkTreeDragSource*>(gobj()),const_cast<GtkTreePath*>((path).gobj()), selection_data.gobj());
+
+ typedef bool RType;
+ return RType();
+}
+
+} //namespace Gtk
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Gtk::TreeDragSource> wrap(GtkTreeDragSource* object, bool take_copy)
+{
+ return Glib::RefPtr<Gtk::TreeDragSource>( dynamic_cast<Gtk::TreeDragSource*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} // namespace Glib
+
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Interface_Class& TreeDragSource_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Interface_Class has to know the interface init function
+ // in order to add interfaces to implementing types.
+ class_init_func_ = &TreeDragSource_Class::iface_init_function;
+
+ // We can not derive from another interface, and it is not necessary anyway.
+ gtype_ = gtk_tree_drag_source_get_type();
+ }
+
+ return *this;
+}
+
+void TreeDragSource_Class::iface_init_function(void* g_iface, void*)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_iface);
+
+ //This is just to avoid an "unused variable" warning when there are no vfuncs or signal handlers to connect.
+ //This is a temporary fix until I find out why I can not seem to derive a GtkFileChooser interface. murrayc
+ g_assert(klass != 0);
+
+ klass->drag_data_get = &drag_data_get_vfunc_callback;
+ klass->row_draggable = &row_draggable_vfunc_callback;
+ klass->drag_data_delete = &drag_data_delete_vfunc_callback;
+}
+
+gboolean TreeDragSource_Class::row_draggable_vfunc_callback(GtkTreeDragSource* self, GtkTreePath* path)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->row_draggable_vfunc(Gtk::TreePath(path, true)
+));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->row_draggable)
+ return (*base->row_draggable)(self, path);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean TreeDragSource_Class::drag_data_delete_vfunc_callback(GtkTreeDragSource* self, GtkTreePath* path)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->drag_data_delete_vfunc(Gtk::TreePath(path, true)
+));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->drag_data_delete)
+ return (*base->drag_data_delete)(self, path);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+
+Glib::ObjectBase* TreeDragSource_Class::wrap_new(GObject* object)
+{
+ return new TreeDragSource((GtkTreeDragSource*)(object));
+}
+
+
+/* The implementation: */
+
+TreeDragSource::TreeDragSource()
+:
+ Glib::Interface(treedragsource_class_.init())
+{}
+
+TreeDragSource::TreeDragSource(GtkTreeDragSource* castitem)
+:
+ Glib::Interface((GObject*)(castitem))
+{}
+
+TreeDragSource::~TreeDragSource()
+{}
+
+// static
+void TreeDragSource::add_interface(GType gtype_implementer)
+{
+ treedragsource_class_.init().add_interface(gtype_implementer);
+}
+
+TreeDragSource::CppClassType TreeDragSource::treedragsource_class_; // initialize static member
+
+GType TreeDragSource::get_type()
+{
+ return treedragsource_class_.init().get_type();
+}
+
+GType TreeDragSource::get_base_type()
+{
+ return gtk_tree_drag_source_get_type();
+}
+
+
+bool TreeDragSource::row_draggable(const TreeModel::Path& path) const
+{
+ return gtk_tree_drag_source_row_draggable(const_cast<GtkTreeDragSource*>(gobj()), const_cast<GtkTreePath*>((path).gobj()));
+}
+
+bool TreeDragSource::drag_data_get(const TreeModel::Path& path, SelectionData& selection_data)
+{
+ return gtk_tree_drag_source_drag_data_get(gobj(), const_cast<GtkTreePath*>((path).gobj()), (selection_data).gobj());
+}
+
+bool TreeDragSource::drag_data_delete(const TreeModel::Path& path)
+{
+ return gtk_tree_drag_source_drag_data_delete(gobj(), const_cast<GtkTreePath*>((path).gobj()));
+}
+
+
+bool Gtk::TreeDragSource::row_draggable_vfunc(const TreeModel::Path& path) const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->row_draggable)
+ return (*base->row_draggable)(const_cast<GtkTreeDragSource*>(gobj()),const_cast<GtkTreePath*>((path).gobj()));
+
+ typedef bool RType;
+ return RType();
+}
+
+bool Gtk::TreeDragSource::drag_data_delete_vfunc(const TreeModel::Path& path)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->drag_data_delete)
+ return (*base->drag_data_delete)(gobj(),const_cast<GtkTreePath*>((path).gobj()));
+
+ typedef bool RType;
+ return RType();
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/treedragsource.h b/libs/gtkmm2/gtk/gtkmm/treedragsource.h
new file mode 100644
index 0000000000..41bdf732ec
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/treedragsource.h
@@ -0,0 +1,171 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TREEDRAGSOURCE_H
+#define _GTKMM_TREEDRAGSOURCE_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/interface.h>
+#include <gtkmm/treemodel.h>
+#include <gtkmm/selectiondata.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C"
+{
+typedef struct _GtkTreeDragSourceIface GtkTreeDragSourceIface;
+typedef struct _GtkSelectionData GtkSelectionData;
+}
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkTreeDragSource GtkTreeDragSource;
+typedef struct _GtkTreeDragSourceClass GtkTreeDragSourceClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class TreeDragSource_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/**
+ * @ingroup TreeView
+*/
+
+class TreeDragSource : public Glib::Interface
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef TreeDragSource CppObjectType;
+ typedef TreeDragSource_Class CppClassType;
+ typedef GtkTreeDragSource BaseObjectType;
+ typedef GtkTreeDragSourceIface BaseClassType;
+
+private:
+ friend class TreeDragSource_Class;
+ static CppClassType treedragsource_class_;
+
+ // noncopyable
+ TreeDragSource(const TreeDragSource&);
+ TreeDragSource& operator=(const TreeDragSource&);
+
+protected:
+ TreeDragSource(); // you must derive from this class
+ explicit TreeDragSource(GtkTreeDragSource* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~TreeDragSource();
+
+ static void add_interface(GType gtype_implementer);
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ GtkTreeDragSource* gobj() { return reinterpret_cast<GtkTreeDragSource*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const GtkTreeDragSource* gobj() const { return reinterpret_cast<GtkTreeDragSource*>(gobject_); }
+
+private:
+
+
+public:
+
+ /** Asks the Gtk::TreeDragSource whether a particular row can be used as
+ * the source of a DND operation. If the source doesn't implement
+ * this interface, the row is assumed draggable.
+ * @param path Row on which user is initiating a drag.
+ * @return <tt>true</tt> if the row can be dragged.
+ */
+ bool row_draggable(const TreeModel::Path& path) const;
+
+
+ /** Asks the Gtk::TreeDragSource to fill in @a selection_data with a
+ * representation of the row at @a path . @a selection_data -&gt;target gives
+ * the required type of the data. Should robustly handle a @a path no
+ * longer found in the model!
+ * @param path Row that was dragged.
+ * @param selection_data A Gtk::SelectionData to fill with data from the dragged row.
+ * @return <tt>true</tt> if data of the required type was provided.
+ */
+ bool drag_data_get(const TreeModel::Path& path, SelectionData& selection_data);
+
+
+ /** Asks the Gtk::TreeDragSource to delete the row at @a path , because
+ * it was moved somewhere else via drag-and-drop. Returns <tt>false</tt>
+ * if the deletion fails because @a path no longer exists, or for
+ * some model-specific reason. Should robustly handle a @a path no
+ * longer found in the model!
+ * @param path Row that was being dragged.
+ * @return <tt>true</tt> if the row was successfully deleted.
+ */
+ bool drag_data_delete(const TreeModel::Path& path);
+
+protected:
+
+
+ virtual bool row_draggable_vfunc(const TreeModel::Path& path) const;
+
+ //We hand-code this so that we can use a temporary instance for teh SelectionData& output parameter:
+ virtual bool drag_data_get_vfunc(const TreeModel::Path& path, SelectionData& selection_data) const;
+
+ virtual bool drag_data_delete_vfunc(const TreeModel::Path& path);
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::TreeDragSource
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Gtk::TreeDragSource> wrap(GtkTreeDragSource* object, bool take_copy = false);
+
+} // namespace Glib
+
+#endif /* _GTKMM_TREEDRAGSOURCE_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/treeiter.cc b/libs/gtkmm2/gtk/gtkmm/treeiter.cc
new file mode 100644
index 0000000000..8c355c353d
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/treeiter.cc
@@ -0,0 +1,395 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/treeiter.h>
+#include <gtkmm/private/treeiter_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/treemodel.h>
+
+namespace
+{
+
+// This is copied from Totem. In future there might be a version in GTK+ itself - see bug #
+void gtkmm_gtk_tree_model_iter_previous(GtkTreeModel* tree_model, GtkTreeIter* iter)
+{
+ GtkTreePath *const path = gtk_tree_model_get_path(tree_model, iter);
+
+ if(gtk_tree_path_prev(path))
+ gtk_tree_model_get_iter(tree_model, iter, path);
+ else
+ g_assert_not_reached();
+
+ gtk_tree_path_free(path);
+}
+
+} // anonymous namespace
+
+
+namespace Gtk
+{
+
+/**** Gtk::TreeIter ********************************************************/
+
+TreeIter::TreeIter()
+:
+ TreeIterBase(),
+ model_ (0),
+ is_end_ (false)
+{}
+
+TreeIter::TreeIter(TreeModel* model)
+:
+ TreeIterBase(),
+ model_ (model),
+ is_end_ (false)
+{}
+
+TreeIter::TreeIter(GtkTreeModel* model, const GtkTreeIter* iter)
+:
+ TreeIterBase(iter),
+ model_ (dynamic_cast<TreeModel*>(Glib::wrap_auto((GObject*) model))),
+ is_end_ (iter == 0)
+{}
+
+TreeIter& TreeIter::operator++()
+{
+ g_assert(!is_end_);
+
+ GtkTreeIter previous = gobject_;
+
+ if(!gtk_tree_model_iter_next(model_->gobj(), &gobject_))
+ {
+ is_end_ = true;
+ gtk_tree_model_iter_parent(model_->gobj(), &gobject_, &previous);
+ }
+
+ return *this;
+}
+
+const TreeIter TreeIter::operator++(int)
+{
+ g_assert(!is_end_);
+
+ TreeIter previous (*this);
+
+ if(!gtk_tree_model_iter_next(model_->gobj(), &gobject_))
+ {
+ is_end_ = true;
+ gtk_tree_model_iter_parent(model_->gobj(), &gobject_, &previous.gobject_);
+ }
+
+ return previous;
+}
+
+TreeIter& TreeIter::operator--()
+{
+ if(!is_end_)
+ {
+ gtkmm_gtk_tree_model_iter_previous(model_->gobj(), &gobject_);
+ }
+ else // --end yields last
+ {
+ GtkTreeIter next = gobject_;
+ GtkTreeIter *const parent = (next.stamp != 0) ? &next : 0;
+
+ const int index = gtk_tree_model_iter_n_children(model_->gobj(), parent) - 1;
+ is_end_ = !gtk_tree_model_iter_nth_child(model_->gobj(), &gobject_, parent, index);
+
+ g_assert(!is_end_);
+ }
+
+ return *this;
+}
+
+const TreeIter TreeIter::operator--(int)
+{
+ TreeIter next (*this);
+
+ if(!is_end_)
+ {
+ gtkmm_gtk_tree_model_iter_previous(model_->gobj(), &gobject_);
+ }
+ else // --end yields last
+ {
+ GtkTreeIter *const parent = (next.gobject_.stamp != 0) ? &next.gobject_ : 0;
+
+ const int index = gtk_tree_model_iter_n_children(model_->gobj(), parent) - 1;
+ is_end_ = !gtk_tree_model_iter_nth_child(model_->gobj(), &gobject_, parent, index);
+
+ g_assert(!is_end_);
+ }
+
+ return next;
+}
+
+/* There is no public gtk_tree_iter_equal(), so we must write our own.
+ */
+bool TreeIter::equal(const TreeIter& other) const
+{
+ g_assert(model_ == other.model_);
+
+ // A GtkTreeIter has the same stamp value as its model.
+ g_assert(gobject_.stamp == other.gobject_.stamp || is_end_ || other.is_end_);
+
+ //TODO: Allow custom treemodels to provide a different implementation.
+
+ // If all user_data pointers are equal we can assume the iterators to be
+ // equal. This should be safe since GtkTreeIter lacks destroy notification,
+ // thus there is no way to attach more data fields to the iterator.
+ return (is_end_ == other.is_end_) &&
+ (gobject_.user_data == other.gobject_.user_data) &&
+ (gobject_.user_data2 == other.gobject_.user_data2) &&
+ (gobject_.user_data3 == other.gobject_.user_data3);
+}
+
+TreeIter::operator bool() const
+{
+ // Test whether the GtkTreeIter is valid and not an end iterator. This check
+ // is almost the same as the private VALID_ITER() macro in gtkliststore.c and
+ // gtktreestore.c.
+ return (!is_end_ && gobject_.stamp != 0);
+}
+
+void TreeIter::setup_end_iterator(const TreeIter& last_valid)
+{
+ g_assert(model_ == last_valid.model_);
+
+ if(last_valid.is_end_)
+ gobject_ = last_valid.gobject_;
+ else
+ gtk_tree_model_iter_parent(model_->gobj(), &gobject_, const_cast<GtkTreeIter*>(&last_valid.gobject_));
+
+ is_end_ = true;
+}
+
+void TreeIter::set_model_refptr(const Glib::RefPtr<TreeModel>& model)
+{
+ model_ = model.operator->();
+}
+
+void TreeIter::set_model_gobject(GtkTreeModel* model)
+{
+ model_ = dynamic_cast<TreeModel*>(Glib::wrap_auto((GObject*) model));
+}
+
+GtkTreeModel* TreeIter::get_model_gobject() const
+{
+ return (model_) ? model_->gobj() : 0;
+}
+
+
+int TreeIter::get_stamp() const
+{
+ return gobj()->stamp;
+}
+
+void TreeIter::set_stamp(int stamp)
+{
+ gobj()->stamp = stamp;
+}
+
+
+/**** Gtk::TreeRow *********************************************************/
+
+const TreeNodeChildren& TreeRow::children() const
+{
+ g_assert(!is_end_);
+
+ return static_cast<const TreeNodeChildren&>(static_cast<const TreeIter&>(*this));
+}
+
+TreeIter TreeRow::parent() const
+{
+ TreeIter iter (model_);
+
+ if(is_end_)
+ iter.gobject_ = gobject_;
+ else
+ gtk_tree_model_iter_parent(model_->gobj(), iter.gobj(), const_cast<GtkTreeIter*>(&gobject_));
+
+ return iter;
+}
+
+void TreeRow::set_value_impl(int column, const Glib::ValueBase& value) const
+{
+ model_->set_value_impl(*this, column, value);
+}
+
+void TreeRow::get_value_impl(int column, Glib::ValueBase& value) const
+{
+ model_->get_value_impl(*this, column, value);
+}
+
+TreeRow::operator bool() const
+{
+ return TreeIter::operator bool();
+}
+
+
+/**** Gtk::TreeNodeChildren ************************************************/
+
+TreeNodeChildren::iterator TreeNodeChildren::begin()
+{
+ iterator iter (model_);
+
+ // If the iterator is invalid (stamp == 0), assume a 'virtual' toplevel
+ // node. This behaviour is needed to implement Gtk::TreeModel::children().
+
+ if(gobject_.stamp != 0)
+ {
+ if(!gtk_tree_model_iter_children(model_->gobj(), iter.gobj(), const_cast<GtkTreeIter*>(&gobject_)))
+ {
+ // Assign the already known parent, in order to create an end iterator.
+ iter.gobject_ = gobject_;
+ iter.is_end_ = true;
+ }
+ }
+ else
+ {
+ if(!gtk_tree_model_get_iter_first(model_->gobj(), iter.gobj()))
+ {
+ // No need to copy the GtkTreeIter, since iter.gobject_ is already empty.
+ iter.is_end_ = true;
+ }
+ }
+
+ return iter;
+}
+
+TreeNodeChildren::const_iterator TreeNodeChildren::begin() const
+{
+ //TODO: Reduce the copy/paste from the non-const begin()?
+
+ const_iterator iter (model_);
+
+ // If the iterator is invalid (stamp == 0), assume a 'virtual' toplevel
+ // node. This behaviour is needed to implement Gtk::TreeModel::children().
+
+ if(gobject_.stamp != 0)
+ {
+ if(!gtk_tree_model_iter_children(model_->gobj(), iter.gobj(), const_cast<GtkTreeIter*>(&gobject_)))
+ {
+ // Assign the already known parent, in order to create an end iterator.
+ iter.gobject_ = gobject_;
+ iter.is_end_ = true;
+ }
+ }
+ else
+ {
+ if(!gtk_tree_model_get_iter_first(model_->gobj(), iter.gobj()))
+ {
+ // No need to copy the GtkTreeIter, since iter.gobject_ is already empty.
+ iter.is_end_ = true;
+ }
+ }
+
+ return iter;
+}
+
+TreeNodeChildren::iterator TreeNodeChildren::end()
+{
+ // Just copy the parent, and turn it into an end iterator.
+ iterator iter (*this);
+ iter.is_end_ = true;
+ return iter;
+}
+
+TreeNodeChildren::const_iterator TreeNodeChildren::end() const
+{
+ // Just copy the parent, and turn it into an end iterator.
+ const_iterator iter (*this);
+ iter.is_end_ = true;
+ return iter;
+}
+
+TreeNodeChildren::value_type TreeNodeChildren::operator[](TreeNodeChildren::size_type index) const
+{
+ iterator iter (model_);
+
+ GtkTreeIter *const parent = const_cast<GtkTreeIter*>(get_parent_gobject());
+
+ if(!gtk_tree_model_iter_nth_child(model_->gobj(), iter.gobj(), parent, index))
+ {
+ // Assign the already known parent, in order to create an end iterator.
+ iter.gobject_ = gobject_;
+ iter.is_end_ = true;
+ }
+
+ return *iter;
+}
+
+TreeNodeChildren::size_type TreeNodeChildren::size() const
+{
+ GtkTreeIter *const parent = const_cast<GtkTreeIter*>(get_parent_gobject());
+
+ return gtk_tree_model_iter_n_children(model_->gobj(), parent);
+}
+
+bool TreeNodeChildren::empty() const
+{
+ // If the iterator is invalid (stamp == 0), assume a 'virtual' toplevel
+ // node. This behaviour is needed to implement Gtk::TreeModel::children().
+
+ if(gobject_.stamp == 0)
+ {
+ GtkTreeIter dummy;
+ return !gtk_tree_model_get_iter_first(model_->gobj(), &dummy);
+ }
+
+ return !gtk_tree_model_iter_has_child(model_->gobj(), const_cast<GtkTreeIter*>(&gobject_));
+}
+
+} // namespace Gtk
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Gtk
+{
+
+
+// static
+GType TreeIterBase::get_type()
+{
+ return gtk_tree_iter_get_type();
+}
+
+TreeIterBase::TreeIterBase()
+{
+ GLIBMM_INITIALIZE_STRUCT(gobject_, GtkTreeIter);
+}
+
+TreeIterBase::TreeIterBase(const GtkTreeIter* gobject)
+{
+ if(gobject)
+ gobject_ = *gobject;
+ else
+ GLIBMM_INITIALIZE_STRUCT(gobject_, GtkTreeIter);
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/treeiter.h b/libs/gtkmm2/gtk/gtkmm/treeiter.h
new file mode 100644
index 0000000000..49a639d4cf
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/treeiter.h
@@ -0,0 +1,517 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TREEITER_H
+#define _GTKMM_TREEITER_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright(C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software, ) you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation, ) either
+ * version 2 of the License, or(at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY, ) without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library, ) if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#include <gtkmm/treemodelcolumn.h>
+#include <gtkmmconfig.h>
+#include <iterator>
+#include <gtk/gtktreemodel.h> /* for GtkTreeIter */
+
+GLIBMM_USING_STD(forward_iterator_tag)
+
+
+namespace Gtk
+{
+
+class TreeModel;
+class TreeRow;
+class TreeNodeChildren;
+
+/**
+ * @ingroup TreeView
+ */
+class TreeIterBase
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef TreeIterBase CppObjectType;
+ typedef GtkTreeIter BaseObjectType;
+
+ static GType get_type() G_GNUC_CONST;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ TreeIterBase();
+
+ explicit TreeIterBase(const GtkTreeIter* gobject); // always takes a copy
+
+ ///Provides access to the underlying C instance.
+ GtkTreeIter* gobj() { return &gobject_; }
+
+ ///Provides access to the underlying C instance.
+ const GtkTreeIter* gobj() const { return &gobject_; }
+
+protected:
+ GtkTreeIter gobject_;
+
+private:
+
+
+ //A wrap() for TreeIterBase* wouldn't be very helpful.
+
+
+};
+
+
+// In order to offer STL-like iterator functionality, we cannot wrap
+// GtkTreeIter directly. Most GTK+ functions that operate on GtkTreeIter
+// are virtual functions in GtkTreeModel. Therefore, the C++ TreeIter
+// must store a pointer to the Gtk::TreeModel to which it belongs.
+//
+// Another problem, which is much worse, is that the GTK+ tree iterator
+// doesn't support the STL-style half-open interval [begin,end). Instead,
+// it uses a [first,last] interval, and functions return FALSE to indicate
+// the end was reached. Also, some functions accept a NULL GtkTreeIter*,
+// which will be interpreted as the end() iterator.
+//
+// Most of the immense complexity in the Gtk::TreeIter implementation is
+// needed for proper emulation of [begin,end) intervals. Unfortunately,
+// it's not even possible to encapsulate everything in the TreeIter
+// class. Almost all wrapper methods dealing with GtkTreeIter must be
+// carefully implemented by hand. TODO: document implementation details
+
+//TODO: Implement a const_iterator too:
+//danielk says that this ConstTreeIter class should return a ConstTreeRow, which would not allow operator=.
+
+/** A Gtk::TreeModel::iterator is a reference to a specific node on a specific
+ * model.
+ *
+ * It is a generic structure with an integer and three generic pointers.
+ * These are filled in by the model in a model-specific way.
+ *
+ * One can convert a path to an iterator by calling Gtk::TreeModel::get_iter().
+ *
+ * These iterators are the primary way of accessing a model and are similar to the iterators
+ * used by Gtk::TextBuffer. The model interface defines a set of operations
+ * using them for navigating the model.
+ *
+ * The lifecycle of an iterator can be a little confusing at first. Iterators
+ * are expected to always be valid for as long as the model is unchanged (and
+ * doesn't emit a signal).
+ * Additionally, some models guarantee that an iterator is valid for as
+ * long as the node it refers to is valid (most notably the Gtk::TreeStore and
+ * Gtk::ListStore).
+ *
+ * Although generally uninteresting, as one always has to
+ * allow for the case where iterators do not persist beyond a signal, some very
+ * important performance enhancements were made in the sort model. As a result,
+ * the Gtk::TREE_MODEL_ITERS_PERSIST flag was added to indicate this behaviour -
+ * see Gtk::TreeModel::get_flags().
+ *
+ * Typedefed as Gtk::TreeModel::iterator.
+ * The Gtk::TreeModel iterator.
+ * @ingroup TreeView
+ */
+class TreeIter : public TreeIterBase
+{
+public:
+ typedef std::bidirectional_iterator_tag iterator_category;
+ typedef Gtk::TreeRow value_type;
+ typedef int difference_type;
+ typedef const Gtk::TreeRow& reference;
+ typedef const Gtk::TreeRow* pointer;
+
+ TreeIter();
+
+ TreeIter& operator++();
+ const TreeIter operator++(int);
+
+ /** Please note that this is very slow compared to operator++().
+ */
+ TreeIter& operator--();
+
+ /** Please note that this is very slow compared to operator++().
+ */
+ const TreeIter operator--(int);
+
+ inline reference operator*() const;
+ inline pointer operator->() const;
+
+ bool equal(const TreeIter& other) const;
+
+ /** Discover whether the iterator is valid, and not equal to end().
+ */
+ operator bool() const;
+
+ /** This is only useful when implementing a custom Gtk::TreeModel class.
+ * Compare the iterator's stamp with your model's stamp to discover whether it is valid.
+ * @see set_stamp().
+ * @result The iterator's stamp.
+ */
+ int get_stamp() const;
+
+ /** This is only useful when implementing a custom Gtk::TreeModel class.
+ * Set the stamp to be equal to your model's stamp, to mark the iterator as valid.
+ * When your model's structure changes, you should increment your model's stamp
+ * to mark all older iterators as invalid. They will be recognised as invalid because
+ * they will then have an incorrect stamp.
+ */
+ void set_stamp(int stamp);
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+ explicit TreeIter(TreeModel* model); // used in TreeModel methods
+ TreeIter(GtkTreeModel* model, const GtkTreeIter* iter); // used by signal proxies
+
+ void set_model_refptr(const Glib::RefPtr<TreeModel>& model);
+ void set_model_gobject(GtkTreeModel* model);
+ GtkTreeModel* get_model_gobject() const;
+
+ void setup_end_iterator(const TreeIter& last_valid);
+
+ const GtkTreeIter* get_gobject_if_not_end() const
+ { return (!is_end_) ? &gobject_ : 0; }
+
+ const GtkTreeIter* get_parent_gobject_if_end() const
+ { return (is_end_ && gobject_.stamp) ? &gobject_ : 0; }
+
+protected:
+
+ // Yes, using a simple TreeModel* rather than Glib::RefPtr<TreeModel>
+ // violates the general policy. But Gtk::TreeIter should have a trivial
+ // copy constructor and assignment operator, i.e. it must contain only
+ // POD (plain old data).
+ //
+ // Gtk::TreeIter is copied a lot, particularly often as return value from
+ // methods. Postfix ++ must return by value, and STL algorithms usually
+ // pass iterators by value, too. With a RefPtr<> as member data, copying
+ // would no longer be trivial, and even cause frequent calls to reference()
+ // and unreference(). That usually doesn't matter much for GUI stuff, but
+ // Gtk::TreeModel is used as a generic container. Imagine a for-loop that
+ // checks whether iter != children.end() on each iteration.
+
+ TreeModel* model_;
+ bool is_end_;
+
+ friend class Gtk::TreeRow;
+ friend class Gtk::TreeNodeChildren;
+ friend class Gtk::TreeModel;
+
+#endif // DOXYGEN_SHOULD_SKIP_THIS
+};
+
+/** @relates Gtk::TreeIter */
+inline bool operator==(const TreeIter& lhs, const TreeIter& rhs)
+ { return lhs.equal(rhs); }
+
+/** @relates Gtk::TreeIter */
+inline bool operator!=(const TreeIter& lhs, const TreeIter& rhs)
+ { return !lhs.equal(rhs); }
+
+
+template <class ColumnType>
+class TreeValueProxy
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ inline TreeValueProxy(const TreeRow& row, const TreeModelColumn<ColumnType>& column);
+#endif
+
+ inline TreeValueProxy<ColumnType>& operator=(const ColumnType& data);
+ inline operator ColumnType() const;
+
+private:
+ const TreeRow& row_;
+ const TreeModelColumn<ColumnType>& column_;
+
+ // no copy assignment
+ TreeValueProxy<ColumnType>& operator=(const TreeValueProxy<ColumnType>&);
+};
+
+
+/** Typedefed as TreeModel::Row.
+ *
+ * Dereference a TreeModel::iterator to get the Row. Use operator[] or set_value() and get_value() to access the
+ * values in the columns of this row.
+ *
+ * If the model contains a hierarchy of rows (such as Gtk::TreeStore), then you can access the child rows with
+ * children().
+ *
+ * You can use a const TreeModel::Row& for any parameter that takes a const TreeModel::iterator&.
+ * @ingroup TreeView
+ */
+class TreeRow : public TreeIter //We use public inheritance so that we can cast from a TreeRow to a TreeIter.
+{
+public:
+
+ /** Use this to set and get the value of this @a column of this row.
+ * This is a templated method, so the compiler will not allow you to provide an inappropriate type
+ * of data for the model column.
+ *
+ * This is just a more convient syntax that does the same thing as set_value() and get_value().
+ *
+ * @param column The model column..
+ */
+ template <class ColumnType> inline
+ TreeValueProxy<ColumnType> operator[](const TreeModelColumn<ColumnType>& column) const;
+
+ /** Sets the value of this @a column of this row.
+ * This is a templated method, so the compiler will not allow you to provide an inappropriate type
+ * of @a data for the model column.
+ *
+ * See also operator[].
+ *
+ * @param column The model column.
+ * @param data The new value to use for this column of this row.
+ */
+ template <class ColumnType>
+ void set_value(const TreeModelColumn<ColumnType>& column, const ColumnType& data) const;
+
+ /** Use set_value(const TreeModelColumn<>& column, const ColumnType& data) unless
+ * you do not know the column type at compile-time.
+ * If the @a data is of an inappropriate C++ type then this might fail at runtime.
+ * @param column The number of the column whose value you want to change.
+ * @param data The new value to use for this column of this row.
+ */
+ template <class ColumnType>
+ void set_value(int column, const ColumnType& data) const;
+
+ /** Gets the value of this @a column of this row.
+ * This is a templated method, so the compiler will not allow you to provide an inappropriate type
+ * of data for the model column.
+ *
+ * See also operator[].
+ *
+ * @param column The model column.
+ * @result The new value to use for this column of this row.
+ */
+ template <class ColumnType>
+ ColumnType get_value(const TreeModelColumn<ColumnType>& column) const;
+
+ /** Use get_value(const TreeModelColumn<>& column) unless
+ * you do not know the column type at compile-time.
+ * If the @a data output argument is of an inappropriate C++ type then this might fail at runtime.
+ * @param column The number of the column whose value you want to change.
+ * @retval data An output argument which will contain the value of this column of this row.
+ */
+ template <class ColumnType>
+ void get_value(int column, ColumnType& data) const;
+
+ /** This returns an STL-like container API, for iterating over the rows.
+ * See also Gtk::TreeModel::children() for the top-level children.
+ */
+ const TreeNodeChildren& children() const;
+
+ /** Gets an iterator to the parent row of this row.
+ * @result An iterator to the parent row.
+ */
+ TreeIter parent() const;
+
+ /** Discover whether this is a valid row.
+ */
+ operator bool() const;
+
+ /// Provides access to the underlying C GObject.
+ GtkTreeIter* gobj() { return TreeIter::gobj(); }
+
+ /// Provides access to the underlying C GObject.
+ const GtkTreeIter* gobj() const { return TreeIter::gobj(); }
+
+private:
+ // Forwarders to Gtk::TreeModel virtual methods.
+ void set_value_impl(int column, const Glib::ValueBase& value) const;
+ void get_value_impl(int column, Glib::ValueBase& value) const;
+};
+
+
+//TODO: Document begin(), end(), size(), etc, in an STL-style way. murrayc.
+
+/** typedefed as TreeModel::Children.
+ * Virtual container of TreeModel::Row items.
+ * @ingroup TreeView
+ */
+class TreeNodeChildren : public TreeIter
+{
+public:
+ typedef Gtk::TreeRow value_type;
+ typedef unsigned int size_type;
+ typedef int difference_type;
+ typedef Gtk::TreeIter iterator;
+
+ #ifndef GLIBMM_HAVE_SUN_REVERSE_ITERATOR
+ typedef std::reverse_iterator<iterator> reverse_iterator;
+ #else
+ typedef std::reverse_iterator<iterator, std::random_access_iterator_tag,
+ int, int&, int*, ptrdiff_t> reverse_iterator;
+ #endif
+
+ typedef Gtk::TreeIter const_iterator; //TODO: Make it a real const_iterator.
+
+ #ifndef GLIBMM_HAVE_SUN_REVERSE_ITERATOR
+ typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
+ #else
+ typedef std::reverse_iterator<const_iterator, std::random_access_iterator_tag,
+ int, const int&, const int*, ptrdiff_t> const_reverse_iterator;
+ #endif
+
+ iterator begin();
+ const_iterator begin() const;
+ iterator end();
+ const_iterator end() const;
+
+ // Note: there is no advantage in not inlining these methods.
+ // We can't change them without breaking ABI anyway.
+ reverse_iterator rbegin() { return reverse_iterator(end()); }
+ reverse_iterator rend() { return reverse_iterator(begin()); }
+ const_reverse_iterator rbegin() const { return const_reverse_iterator(end()); }
+ const_reverse_iterator rend() const { return const_reverse_iterator(begin()); }
+
+ value_type operator[](size_type index) const;
+
+ size_type size() const;
+ bool empty() const;
+ operator bool() const { return !empty(); }
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+ explicit TreeNodeChildren(TreeModel* model)
+ : TreeIter(model) {}
+
+ const GtkTreeIter* get_parent_gobject() const
+ { return (gobject_.stamp != 0) ? &gobject_ : 0; }
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+};
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+/**** Gtk::TreeIter ********************************************************/
+
+inline
+TreeIter::reference TreeIter::operator*() const
+{
+ return static_cast<const TreeRow&>(*this);
+}
+
+inline
+TreeIter::pointer TreeIter::operator->() const
+{
+ return static_cast<const TreeRow*>(this);
+}
+
+
+/**** Gtk::TreeValueProxy<> ************************************************/
+
+template <class ColumnType> inline
+TreeValueProxy<ColumnType>::TreeValueProxy(const TreeRow& row, const TreeModelColumn<ColumnType>& column)
+:
+ row_ (row),
+ column_ (column)
+{}
+
+template <class ColumnType> inline
+TreeValueProxy<ColumnType>& TreeValueProxy<ColumnType>::operator=(const ColumnType& data)
+{
+ row_.set_value(column_, data);
+ return *this;
+}
+
+template <class ColumnType> inline
+TreeValueProxy<ColumnType>::operator ColumnType() const
+{
+ return row_.get_value(column_);
+}
+
+
+/**** Gtk::TreeRow *********************************************************/
+
+template <class ColumnType> inline
+TreeValueProxy<ColumnType> TreeRow::operator[](const TreeModelColumn<ColumnType>& column) const
+{
+ return TreeValueProxy<ColumnType>(*this, column);
+}
+
+template <class ColumnType>
+void TreeRow::set_value(const TreeModelColumn<ColumnType>& column, const ColumnType& data) const
+{
+ typedef typename Gtk::TreeModelColumn<ColumnType>::ValueType ValueType;
+
+ ValueType value;
+ value.init(column.type());
+
+ value.set(data);
+ this->set_value_impl(column.index(), value);
+}
+
+template <class ColumnType>
+void TreeRow::set_value(int column, const ColumnType& data) const
+{
+ //This could fail at run-time, because the wrong ColumnType might be used.
+ //It's only for dynamically generated model columns.
+
+ typedef typename Gtk::TreeModelColumn<ColumnType> type_cppcolumn;
+ typedef typename type_cppcolumn::ValueType ValueType;
+
+ ValueType value;
+ value.init(ValueType::value_type());
+
+ value.set(data);
+ this->set_value_impl(column, value);
+}
+
+template <class ColumnType>
+ColumnType TreeRow::get_value(const TreeModelColumn<ColumnType>& column) const
+{
+ typedef typename Gtk::TreeModelColumn<ColumnType>::ValueType ValueType;
+
+ ValueType value;
+ this->get_value_impl(column.index(), value);
+
+ return value.get();
+}
+
+template <class ColumnType>
+void TreeRow::get_value(int column, ColumnType& data) const
+{
+ //This could fail at run-time, because the wrong ColumnType might be used.
+ //It's only for dynamically generated model columns.
+
+ typedef typename Gtk::TreeModelColumn<ColumnType>::ValueType ValueType;
+
+ ValueType value;
+ this->get_value_impl(column, value);
+
+ data = value.get();
+}
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+template <>
+class Value<Gtk::TreeIterBase> : public Glib::Value_Boxed<Gtk::TreeIterBase>
+{};
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+} // namespace Glib
+
+#endif /* _GTKMM_TREEITER_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/treemodel.cc b/libs/gtkmm2/gtk/gtkmm/treemodel.cc
new file mode 100644
index 0000000000..b6989dff58
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/treemodel.cc
@@ -0,0 +1,1612 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/treemodel.h>
+#include <gtkmm/private/treemodel_p.h>
+
+#include <gtk/gtktypebuiltins.h>
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/treeiter.h>
+#include <gtkmm/treepath.h>
+#include <gtk/gtktreestore.h>
+#include <gtk/gtktreemodel.h>
+
+namespace
+{
+
+gboolean proxy_foreach_iter_callback(GtkTreeModel* model, GtkTreePath*, GtkTreeIter* iter, void* data)
+{
+ typedef Gtk::TreeModel::SlotForeachIter SlotType;
+ SlotType& slot = *static_cast<SlotType*>(data);
+
+ try
+ {
+ return slot(Gtk::TreeModel::iterator(model, iter));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+
+ return 1;
+}
+
+gboolean proxy_foreach_path_callback(GtkTreeModel*, GtkTreePath* path, GtkTreeIter*, void* data)
+{
+ typedef Gtk::TreeModel::SlotForeachPath SlotType;
+ SlotType& slot = *static_cast<SlotType*>(data);
+
+ try
+ {
+ return slot(Gtk::TreeModel::Path(path, true));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+
+ return 1;
+}
+
+gboolean proxy_foreach_path_and_iter_callback(GtkTreeModel* model, GtkTreePath* path,
+ GtkTreeIter* iter, void* data)
+{
+ typedef Gtk::TreeModel::SlotForeachPathAndIter SlotType;
+ SlotType& slot = *static_cast<SlotType*>(data);
+
+ try
+ {
+ return slot(Gtk::TreeModel::Path(path, true), Gtk::TreeModel::iterator(model, iter));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+
+ return 1;
+}
+
+} //anonymous namespace
+
+
+//Help the code generator, so that it doesn't have to fully qualify this type:
+typedef Gtk::TreeModel::iterator iterator;
+
+namespace Gtk
+{
+
+TreeModel::iterator TreeModel::get_iter(const Path& path)
+{
+ Gtk::TreeModel::iterator iter(this);
+ gtk_tree_model_get_iter(gobj(), iter.gobj(), const_cast<GtkTreePath*>(path.gobj()));
+ return iter;
+}
+
+TreeModel::iterator TreeModel::get_iter(const Glib::ustring& path_string)
+{
+ Gtk::TreeModel::iterator iter (this);
+ gtk_tree_model_get_iter_from_string(gobj(), iter.gobj(), path_string.c_str());
+ return iter;
+}
+
+TreeModel::Children TreeModel::children()
+{
+ return TreeNodeChildren(this);
+}
+
+TreeModel::Children TreeModel::children() const
+{
+ //TODO: Remove the const when we have a real const TreeNodeChildren, when we have a real const_iterator.
+ return TreeNodeChildren(const_cast<TreeModel*>(this));
+}
+
+void TreeModel::set_value_impl(const iterator&, int, const Glib::ValueBase&)
+{
+ g_assert_not_reached();
+}
+
+void TreeModel::get_value_impl(const iterator& row, int column, Glib::ValueBase& value) const
+{
+ gtk_tree_model_get_value(
+ const_cast<GtkTreeModel*>(gobj()),
+ const_cast<GtkTreeIter*>(row.gobj()),
+ column, value.gobj());
+}
+
+void TreeModel::foreach_iter(const SlotForeachIter& slot)
+{
+ SlotForeachIter slot_copy (slot);
+ gtk_tree_model_foreach(gobj(), &proxy_foreach_iter_callback, &slot_copy);
+}
+
+void TreeModel::foreach_path(const SlotForeachPath& slot)
+{
+ SlotForeachPath slot_copy (slot);
+ gtk_tree_model_foreach(gobj(), &proxy_foreach_path_callback, &slot_copy);
+}
+
+void TreeModel::foreach(const SlotForeachPathAndIter& slot)
+{
+ SlotForeachPathAndIter slot_copy (slot);
+ gtk_tree_model_foreach(gobj(), &proxy_foreach_path_and_iter_callback, &slot_copy);
+}
+
+bool TreeModel::iter_is_valid(const iterator& iter) const
+{
+ //This method is overriden in TreeStore and ListStore.
+ //This implementation will only be used as a default for custom derived TreeModels,
+ //and when we wrap a C GtkTreeModel with a Gtk::TreeModel instance, without knowing what derived C type it is.
+
+ // This check is almost the same as the private VALID_ITER() macro in gtkliststore.c and
+ // gtktreestore.c.
+ return (!iter.is_end_ && iter.gobj()->stamp != 0);
+}
+
+// Custom vfunc callbacks, because the C++ vfuncs have different parameters and return types
+// that can not be generated automatically:
+gboolean TreeModel_Class::iter_next_vfunc_callback(GtkTreeModel* self, GtkTreeIter* iter)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ TreeModel::iterator iter_input = TreeModel::iterator(self, iter);
+ TreeModel::iterator iter_next( self, iter ); //Copies iter by value.
+ gboolean test = obj->iter_next_vfunc(iter_input, iter_next);
+
+ //Copy the new iter value to the C output parameter:
+ if(test)
+ *iter = *(iter_next.gobj());
+
+ return test;
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+ g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+ )
+ );
+
+ // Call the original underlying C function:
+ if(base && base->iter_next)
+ return (*base->iter_next)(self, iter);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+
+bool TreeModel::iter_next_vfunc(const iterator& iter, iterator& iter_next) const
+{
+ //Call the default C implementation:
+
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+ )
+ );
+
+ if(base && base->iter_next)
+ {
+ TreeModel::iterator iter_copy = iter;
+ gboolean test = (*base->iter_next)(const_cast<GtkTreeModel*>(gobj()), iter_copy.gobj());
+ if(test)
+ iter_next = iter_copy;
+
+ return test;
+ }
+
+ return bool();
+}
+
+gboolean TreeModel_Class::get_iter_vfunc_callback(GtkTreeModel* self, GtkTreeIter* iter, GtkTreePath* path)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ Gtk::TreeModel::iterator iter_out(self, iter); //copies the iter by value.
+ gboolean test = obj->get_iter_vfunc(Gtk::TreePath(path, true), iter_out);
+
+ //Copy the new iter value to the C output parameter:
+ if(test)
+ *iter = *(iter_out.gobj());
+
+ return test;
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_iter)
+ return (*base->get_iter)(self, iter, const_cast<GtkTreePath*>(path));
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+bool TreeModel::get_iter_vfunc(const Path& path, iterator& iter) const
+{
+ //Call the default C implementation:
+
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+ )
+ );
+
+ if(base && base->get_iter)
+ {
+ return (*base->get_iter)( const_cast<GtkTreeModel*>(gobj()), iter.gobj(), const_cast<GtkTreePath*>(path.gobj()) );
+ }
+
+ return bool();
+}
+
+gboolean TreeModel_Class::iter_children_vfunc_callback(GtkTreeModel* self, GtkTreeIter* iter, GtkTreeIter* parent)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ Gtk::TreeModel::iterator iter_out(self, iter); //copies the iter by value.
+
+ gboolean test = false;
+ if(!parent)
+ {
+ //Deal with this case, which is documented in the C docs as:
+ //" If @parent is %NULL returns the first node, equivalent to
+ // <literal>gtk_tree_model_get_iter_first (tree_model, iter);</literal> "
+ test = obj->iter_nth_root_child_vfunc(0, iter_out);
+ }
+ else
+ {
+ //Normal case:
+ Gtk::TreeModel::iterator parent_cpp(self, parent);
+ test = obj->iter_children_vfunc(parent_cpp, iter_out);
+ }
+
+ //Copy the new iter value to the C output parameter:
+ if(test)
+ *iter = *(iter_out.gobj());
+
+ return test;
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->iter_children)
+ return (*base->iter_children)(self, iter, parent);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+bool TreeModel::iter_children_vfunc(const iterator& parent, iterator& iter) const
+{
+ //Call the default C implementation:
+
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+ )
+ );
+
+ if(base && base->iter_children)
+ {
+ return (*base->iter_children)( const_cast<GtkTreeModel*>(gobj()), iter.gobj(), const_cast<GtkTreeIter*>(parent.gobj()) );
+ }
+
+ return bool();
+}
+
+gboolean TreeModel_Class::iter_parent_vfunc_callback(GtkTreeModel* self, GtkTreeIter* iter, GtkTreeIter* child)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ Gtk::TreeModel::iterator iter_out(self, iter);
+ Gtk::TreeModel::iterator child_cpp(self, child);
+ gboolean test = obj->iter_parent_vfunc(child_cpp, iter_out);
+
+ //Copy the new iter value to the C output parameter:
+ if(test)
+ *iter = *(iter_out.gobj());
+
+ return test;
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->iter_parent)
+ return (*base->iter_parent)(self, iter, child);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+bool TreeModel::iter_parent_vfunc(const iterator& child, iterator& iter) const
+{
+ //Call the default C implementation:
+
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+ )
+ );
+
+ if(base && base->iter_parent)
+ {
+ return (*base->iter_parent)( const_cast<GtkTreeModel*>(gobj()), iter.gobj(), const_cast<GtkTreeIter*>(child.gobj()) );
+ }
+
+ return bool();
+}
+
+gboolean TreeModel_Class::iter_nth_child_vfunc_callback(GtkTreeModel* self, GtkTreeIter* iter, GtkTreeIter* parent, int n)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ Gtk::TreeModel::iterator iter_out(self, iter);
+
+ gboolean test = false;
+ if(!parent)
+ {
+ // Deal with this special case, docuemnted in the C docs as:
+ // "As a special case, if @parent is %NULL, then the nth root node is set.":
+ test = obj->iter_nth_root_child_vfunc(n, iter_out);
+ }
+ else
+ {
+ //The normal case:
+ Gtk::TreeModel::iterator parent_cpp(self, parent);
+ test = obj->iter_nth_child_vfunc(parent_cpp, n, iter_out);
+ }
+
+ //Copy the new iter value to the C output parameter:
+ if(test)
+ *iter = *(iter_out.gobj());
+
+ return test;
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->iter_nth_child)
+ return (*base->iter_nth_child)(self, iter, parent, n);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+bool TreeModel::iter_nth_child_vfunc(const iterator& parent, int n, iterator& iter) const
+{
+ //Call the default C implementation:
+
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+ )
+ );
+
+ if(base && base->iter_nth_child)
+ {
+ return (*base->iter_nth_child)( const_cast<GtkTreeModel*>(gobj()), iter.gobj(), const_cast<GtkTreeIter*>(parent.gobj()), n );
+ }
+
+ return bool();
+}
+
+//See the implementation of iter_children_vfunc_callback() and iter_nth_child_vfunc_callback()
+//to find out why this virtual function exists:
+bool TreeModel::iter_nth_root_child_vfunc(int n, iterator& iter) const
+{
+ //Call the default C implementation:
+
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+ g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+ )
+ );
+
+ if(base && base->iter_nth_child)
+ {
+ //This means that iter_nth_child(0) might be called by iter_children_vfunc_callback(),
+ //but hopefully that's exactly the same thing. TODO: Ask why both vfuncs exist. murrayc.
+ return (*base->iter_nth_child)( const_cast<GtkTreeModel*>(gobj()), iter.gobj(), 0 /* the null parent */, n );
+ }
+
+ return bool();
+}
+
+gboolean TreeModel_Class::iter_n_children_vfunc_callback(GtkTreeModel* self, GtkTreeIter* iter)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+
+ //Deal with the case that iter is null, as described in the C docs:
+ if(iter)
+ return obj->iter_n_children_vfunc( Gtk::TreeModel::iterator(self, iter) );
+ else
+ return obj->iter_n_root_children_vfunc();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->iter_n_children)
+ return (*base->iter_n_children)(self, iter);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+int TreeModel::iter_n_children_vfunc(const iterator& iter) const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->iter_n_children)
+ return (*base->iter_n_children)(const_cast<GtkTreeModel*>(gobj()), const_cast<GtkTreeIter*>((iter).gobj()));
+
+ typedef int RType;
+ return RType();
+}
+
+int TreeModel::iter_n_root_children_vfunc() const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->iter_n_children)
+ return (*base->iter_n_children)(const_cast<GtkTreeModel*>(gobj()), 0 /* null iter to mean root node, as described in C docs */);
+
+ typedef int RType;
+ return RType();
+}
+
+
+void TreeModel::rows_reordered(const Path& path, const iterator& iter, const Glib::ArrayHandle<int>& new_order)
+{
+ //The size of the array seems to be based on the known number of children. murrayc.
+ gtk_tree_model_rows_reordered(gobj(), const_cast<GtkTreePath*>((path).gobj()), const_cast<GtkTreeIter*>((iter).gobj()), const_cast<int*>(new_order.data()));
+}
+
+
+} // namespace Gtk
+
+
+namespace
+{
+
+void TreeModel_signal_row_changed_callback(GtkTreeModel* self, GtkTreePath* path,GtkTreeIter* iter,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,const TreeModel::Path&,const TreeModel::iterator& > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Gtk::TreePath(path, true)
+, Gtk::TreeModel::iterator(self, iter)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo TreeModel_signal_row_changed_info =
+{
+ "row_changed",
+ (GCallback) &TreeModel_signal_row_changed_callback,
+ (GCallback) &TreeModel_signal_row_changed_callback
+};
+
+
+void TreeModel_signal_row_inserted_callback(GtkTreeModel* self, GtkTreePath* path,GtkTreeIter* iter,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,const TreeModel::Path&,const TreeModel::iterator& > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Gtk::TreePath(path, true)
+, Gtk::TreeModel::iterator(self, iter)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo TreeModel_signal_row_inserted_info =
+{
+ "row_inserted",
+ (GCallback) &TreeModel_signal_row_inserted_callback,
+ (GCallback) &TreeModel_signal_row_inserted_callback
+};
+
+
+void TreeModel_signal_row_has_child_toggled_callback(GtkTreeModel* self, GtkTreePath* path,GtkTreeIter* iter,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,const TreeModel::Path&,const TreeModel::iterator& > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Gtk::TreePath(path, true)
+, Gtk::TreeModel::iterator(self, iter)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo TreeModel_signal_row_has_child_toggled_info =
+{
+ "row_has_child_toggled",
+ (GCallback) &TreeModel_signal_row_has_child_toggled_callback,
+ (GCallback) &TreeModel_signal_row_has_child_toggled_callback
+};
+
+
+void TreeModel_signal_row_deleted_callback(GtkTreeModel* self, GtkTreePath* path,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,const TreeModel::Path& > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Gtk::TreePath(path, true)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo TreeModel_signal_row_deleted_info =
+{
+ "row_deleted",
+ (GCallback) &TreeModel_signal_row_deleted_callback,
+ (GCallback) &TreeModel_signal_row_deleted_callback
+};
+
+
+void TreeModel_signal_rows_reordered_callback(GtkTreeModel* self, GtkTreePath* path,GtkTreeIter* iter,gint* new_order,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,const TreeModel::Path&,const TreeModel::iterator&,int* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Gtk::TreePath(path, true)
+, Gtk::TreeModel::iterator(self, iter)
+, new_order
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo TreeModel_signal_rows_reordered_info =
+{
+ "rows_reordered",
+ (GCallback) &TreeModel_signal_rows_reordered_callback,
+ (GCallback) &TreeModel_signal_rows_reordered_callback
+};
+
+} // anonymous namespace
+
+// static
+GType Glib::Value<Gtk::TreeModelFlags>::value_type()
+{
+ return gtk_tree_model_flags_get_type();
+}
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Gtk::TreeModel> wrap(GtkTreeModel* object, bool take_copy)
+{
+ return Glib::RefPtr<Gtk::TreeModel>( dynamic_cast<Gtk::TreeModel*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} // namespace Glib
+
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Interface_Class& TreeModel_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Interface_Class has to know the interface init function
+ // in order to add interfaces to implementing types.
+ class_init_func_ = &TreeModel_Class::iface_init_function;
+
+ // We can not derive from another interface, and it is not necessary anyway.
+ gtype_ = gtk_tree_model_get_type();
+ }
+
+ return *this;
+}
+
+void TreeModel_Class::iface_init_function(void* g_iface, void*)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_iface);
+
+ //This is just to avoid an "unused variable" warning when there are no vfuncs or signal handlers to connect.
+ //This is a temporary fix until I find out why I can not seem to derive a GtkFileChooser interface. murrayc
+ g_assert(klass != 0);
+
+ klass->get_flags = &get_flags_vfunc_callback;
+ klass->get_n_columns = &get_n_columns_vfunc_callback;
+ klass->get_column_type = &get_column_type_vfunc_callback;
+ klass->iter_next = &iter_next_vfunc_callback;
+ klass->get_iter = &get_iter_vfunc_callback;
+ klass->iter_children = &iter_children_vfunc_callback;
+ klass->iter_parent = &iter_parent_vfunc_callback;
+ klass->iter_nth_child = &iter_nth_child_vfunc_callback;
+ klass->iter_n_children = &iter_n_children_vfunc_callback;
+ klass->iter_has_child = &iter_has_child_vfunc_callback;
+ klass->ref_node = &ref_node_vfunc_callback;
+ klass->unref_node = &unref_node_vfunc_callback;
+ klass->get_path = &get_path_vfunc_callback;
+ klass->get_value = &get_value_vfunc_callback;
+ klass->row_changed = &row_changed_callback;
+ klass->row_inserted = &row_inserted_callback;
+ klass->row_has_child_toggled = &row_has_child_toggled_callback;
+ klass->row_deleted = &row_deleted_callback;
+ klass->rows_reordered = &rows_reordered_callback;
+}
+
+GtkTreeModelFlags TreeModel_Class::get_flags_vfunc_callback(GtkTreeModel* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return ((GtkTreeModelFlags)(obj->get_flags_vfunc()));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_flags)
+ return (*base->get_flags)(self);
+ }
+
+ typedef GtkTreeModelFlags RType;
+ return RType();
+}
+
+gint TreeModel_Class::get_n_columns_vfunc_callback(GtkTreeModel* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return obj->get_n_columns_vfunc();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_n_columns)
+ return (*base->get_n_columns)(self);
+ }
+
+ typedef gint RType;
+ return RType();
+}
+
+GType TreeModel_Class::get_column_type_vfunc_callback(GtkTreeModel* self, gint index)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return obj->get_column_type_vfunc(index
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_column_type)
+ return (*base->get_column_type)(self, index);
+ }
+
+ typedef GType RType;
+ return RType();
+}
+
+gboolean TreeModel_Class::iter_has_child_vfunc_callback(GtkTreeModel* self, GtkTreeIter* iter)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->iter_has_child_vfunc(Gtk::TreeModel::iterator(self, iter)
+));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->iter_has_child)
+ return (*base->iter_has_child)(self, iter);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+void TreeModel_Class::ref_node_vfunc_callback(GtkTreeModel* self, GtkTreeIter* iter)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->ref_node_vfunc(Gtk::TreeModel::iterator(self, iter)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->ref_node)
+ (*base->ref_node)(self, iter);
+ }
+}
+
+void TreeModel_Class::unref_node_vfunc_callback(GtkTreeModel* self, GtkTreeIter* iter)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->unref_node_vfunc(Gtk::TreeModel::iterator(self, iter)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->unref_node)
+ (*base->unref_node)(self, iter);
+ }
+}
+
+GtkTreePath* TreeModel_Class::get_path_vfunc_callback(GtkTreeModel* self, GtkTreeIter* iter)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return (obj->get_path_vfunc(Gtk::TreeModel::iterator(self, iter)
+)).gobj_copy();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_path)
+ return (*base->get_path)(self, iter);
+ }
+
+ typedef GtkTreePath* RType;
+ return RType();
+}
+
+void TreeModel_Class::get_value_vfunc_callback(GtkTreeModel* self, GtkTreeIter* iter, gint column, GValue* value)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->get_value_vfunc(Gtk::TreeModel::iterator(self, iter)
+, column
+, *reinterpret_cast<Glib::ValueBase*>(value)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_value)
+ (*base->get_value)(self, iter, column, value);
+ }
+}
+
+
+void TreeModel_Class::row_changed_callback(GtkTreeModel* self, GtkTreePath* path, GtkTreeIter* iter)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_row_changed(Gtk::TreePath(path, true)
+, Gtk::TreeModel::iterator(self, iter)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->row_changed)
+ (*base->row_changed)(self, path, iter);
+ }
+}
+
+void TreeModel_Class::row_inserted_callback(GtkTreeModel* self, GtkTreePath* path, GtkTreeIter* iter)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_row_inserted(Gtk::TreePath(path, true)
+, Gtk::TreeModel::iterator(self, iter)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->row_inserted)
+ (*base->row_inserted)(self, path, iter);
+ }
+}
+
+void TreeModel_Class::row_has_child_toggled_callback(GtkTreeModel* self, GtkTreePath* path, GtkTreeIter* iter)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_row_has_child_toggled(Gtk::TreePath(path, true)
+, Gtk::TreeModel::iterator(self, iter)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->row_has_child_toggled)
+ (*base->row_has_child_toggled)(self, path, iter);
+ }
+}
+
+void TreeModel_Class::row_deleted_callback(GtkTreeModel* self, GtkTreePath* path)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_row_deleted(Gtk::TreePath(path, true)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->row_deleted)
+ (*base->row_deleted)(self, path);
+ }
+}
+
+void TreeModel_Class::rows_reordered_callback(GtkTreeModel* self, GtkTreePath* path, GtkTreeIter* iter, gint* new_order)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_rows_reordered(Gtk::TreePath(path, true)
+, Gtk::TreeModel::iterator(self, iter)
+, new_order
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->rows_reordered)
+ (*base->rows_reordered)(self, path, iter, new_order);
+ }
+}
+
+
+Glib::ObjectBase* TreeModel_Class::wrap_new(GObject* object)
+{
+ return new TreeModel((GtkTreeModel*)(object));
+}
+
+
+/* The implementation: */
+
+TreeModel::TreeModel()
+:
+ Glib::Interface(treemodel_class_.init())
+{}
+
+TreeModel::TreeModel(GtkTreeModel* castitem)
+:
+ Glib::Interface((GObject*)(castitem))
+{}
+
+TreeModel::~TreeModel()
+{}
+
+// static
+void TreeModel::add_interface(GType gtype_implementer)
+{
+ treemodel_class_.init().add_interface(gtype_implementer);
+}
+
+TreeModel::CppClassType TreeModel::treemodel_class_; // initialize static member
+
+GType TreeModel::get_type()
+{
+ return treemodel_class_.init().get_type();
+}
+
+GType TreeModel::get_base_type()
+{
+ return gtk_tree_model_get_type();
+}
+
+
+TreeModelFlags TreeModel::get_flags() const
+{
+ return ((TreeModelFlags)(gtk_tree_model_get_flags(const_cast<GtkTreeModel*>(gobj()))));
+}
+
+int TreeModel::get_n_columns() const
+{
+ return gtk_tree_model_get_n_columns(const_cast<GtkTreeModel*>(gobj()));
+}
+
+GType TreeModel::get_column_type(int index) const
+{
+ return gtk_tree_model_get_column_type(const_cast<GtkTreeModel*>(gobj()), index);
+}
+
+TreeModel::Path TreeModel::get_path(const iterator& iter) const
+{
+ return Gtk::TreePath(gtk_tree_model_get_path(const_cast<GtkTreeModel*>(gobj()), const_cast<GtkTreeIter*>((iter).gobj())), false);
+}
+
+void TreeModel::row_changed(const Path& path, const iterator& iter)
+{
+ gtk_tree_model_row_changed(gobj(), const_cast<GtkTreePath*>((path).gobj()), const_cast<GtkTreeIter*>((iter).gobj()));
+}
+
+void TreeModel::row_inserted(const Path& path, const iterator& iter)
+{
+ gtk_tree_model_row_inserted(gobj(), const_cast<GtkTreePath*>((path).gobj()), const_cast<GtkTreeIter*>((iter).gobj()));
+}
+
+void TreeModel::row_has_child_toggled(const Path& path, const iterator& iter)
+{
+ gtk_tree_model_row_has_child_toggled(gobj(), const_cast<GtkTreePath*>((path).gobj()), const_cast<GtkTreeIter*>((iter).gobj()));
+}
+
+void TreeModel::row_deleted(const Path& path)
+{
+ gtk_tree_model_row_deleted(gobj(), const_cast<GtkTreePath*>((path).gobj()));
+}
+
+void TreeModel::rows_reordered(const Path& path, const iterator& iter, int* new_order)
+{
+ gtk_tree_model_rows_reordered(gobj(), const_cast<GtkTreePath*>((path).gobj()), const_cast<GtkTreeIter*>((iter).gobj()), new_order);
+}
+
+Glib::ustring TreeModel::get_string(const iterator& iter) const
+{
+ return Glib::convert_return_gchar_ptr_to_ustring(gtk_tree_model_get_string_from_iter(const_cast<GtkTreeModel*>(gobj()), const_cast<GtkTreeIter*>((iter).gobj())));
+}
+
+
+Glib::SignalProxy2< void,const TreeModel::Path&,const TreeModel::iterator& > TreeModel::signal_row_changed()
+{
+ return Glib::SignalProxy2< void,const TreeModel::Path&,const TreeModel::iterator& >(this, &TreeModel_signal_row_changed_info);
+}
+
+Glib::SignalProxy2< void,const TreeModel::Path&,const TreeModel::iterator& > TreeModel::signal_row_inserted()
+{
+ return Glib::SignalProxy2< void,const TreeModel::Path&,const TreeModel::iterator& >(this, &TreeModel_signal_row_inserted_info);
+}
+
+Glib::SignalProxy2< void,const TreeModel::Path&,const TreeModel::iterator& > TreeModel::signal_row_has_child_toggled()
+{
+ return Glib::SignalProxy2< void,const TreeModel::Path&,const TreeModel::iterator& >(this, &TreeModel_signal_row_has_child_toggled_info);
+}
+
+Glib::SignalProxy1< void,const TreeModel::Path& > TreeModel::signal_row_deleted()
+{
+ return Glib::SignalProxy1< void,const TreeModel::Path& >(this, &TreeModel_signal_row_deleted_info);
+}
+
+Glib::SignalProxy3< void,const TreeModel::Path&,const TreeModel::iterator&,int* > TreeModel::signal_rows_reordered()
+{
+ return Glib::SignalProxy3< void,const TreeModel::Path&,const TreeModel::iterator&,int* >(this, &TreeModel_signal_rows_reordered_info);
+}
+
+
+void Gtk::TreeModel::on_row_changed(const TreeModel::Path& path, const TreeModel::iterator& iter)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->row_changed)
+ (*base->row_changed)(gobj(),const_cast<GtkTreePath*>((path).gobj()),const_cast<GtkTreeIter*>((iter).gobj()));
+}
+
+void Gtk::TreeModel::on_row_inserted(const TreeModel::Path& path, const TreeModel::iterator& iter)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->row_inserted)
+ (*base->row_inserted)(gobj(),const_cast<GtkTreePath*>((path).gobj()),const_cast<GtkTreeIter*>((iter).gobj()));
+}
+
+void Gtk::TreeModel::on_row_has_child_toggled(const TreeModel::Path& path, const TreeModel::iterator& iter)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->row_has_child_toggled)
+ (*base->row_has_child_toggled)(gobj(),const_cast<GtkTreePath*>((path).gobj()),const_cast<GtkTreeIter*>((iter).gobj()));
+}
+
+void Gtk::TreeModel::on_row_deleted(const TreeModel::Path& path)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->row_deleted)
+ (*base->row_deleted)(gobj(),const_cast<GtkTreePath*>((path).gobj()));
+}
+
+void Gtk::TreeModel::on_rows_reordered(const TreeModel::Path& path, const TreeModel::iterator& iter, int* new_order)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->rows_reordered)
+ (*base->rows_reordered)(gobj(),const_cast<GtkTreePath*>((path).gobj()),const_cast<GtkTreeIter*>((iter).gobj()),new_order);
+}
+
+
+TreeModelFlags Gtk::TreeModel::get_flags_vfunc() const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_flags)
+ return ((TreeModelFlags)((*base->get_flags)(const_cast<GtkTreeModel*>(gobj()))));
+
+ typedef TreeModelFlags RType;
+ return RType();
+}
+
+int Gtk::TreeModel::get_n_columns_vfunc() const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_n_columns)
+ return (*base->get_n_columns)(const_cast<GtkTreeModel*>(gobj()));
+
+ typedef int RType;
+ return RType();
+}
+
+GType Gtk::TreeModel::get_column_type_vfunc(int index) const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_column_type)
+ return (*base->get_column_type)(const_cast<GtkTreeModel*>(gobj()),index);
+
+ typedef GType RType;
+ return RType();
+}
+
+bool Gtk::TreeModel::iter_has_child_vfunc(const iterator& iter) const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->iter_has_child)
+ return (*base->iter_has_child)(const_cast<GtkTreeModel*>(gobj()),const_cast<GtkTreeIter*>((iter).gobj()));
+
+ typedef bool RType;
+ return RType();
+}
+
+void Gtk::TreeModel::ref_node_vfunc(const iterator& iter) const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->ref_node)
+ (*base->ref_node)(const_cast<GtkTreeModel*>(gobj()),const_cast<GtkTreeIter*>((iter).gobj()));
+}
+
+void Gtk::TreeModel::unref_node_vfunc(const iterator& iter) const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->unref_node)
+ (*base->unref_node)(const_cast<GtkTreeModel*>(gobj()),const_cast<GtkTreeIter*>((iter).gobj()));
+}
+
+TreeModel::Path Gtk::TreeModel::get_path_vfunc(const iterator& iter) const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_path)
+ return Gtk::TreePath((*base->get_path)(const_cast<GtkTreeModel*>(gobj()),const_cast<GtkTreeIter*>((iter).gobj())), false);
+
+ typedef TreeModel::Path RType;
+ return RType();
+}
+
+void Gtk::TreeModel::get_value_vfunc(const iterator& iter, int column, Glib::ValueBase& value) const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_value)
+ (*base->get_value)(const_cast<GtkTreeModel*>(gobj()),const_cast<GtkTreeIter*>((iter).gobj()),column,(value).gobj());
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/treemodel.h b/libs/gtkmm2/gtk/gtkmm/treemodel.h
new file mode 100644
index 0000000000..25e0eb92e3
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/treemodel.h
@@ -0,0 +1,597 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TREEMODEL_H
+#define _GTKMM_TREEMODEL_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtktreemodel.h>
+#include <glibmm/interface.h>
+#include <gtkmm/treeiter.h>
+#include <gtkmm/treemodelcolumn.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkTreeModel GtkTreeModel;
+typedef struct _GtkTreeModelClass GtkTreeModelClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class TreeModel_Class; } // namespace Gtk
+namespace Gtk
+{
+
+class TreeModelSort;
+class TreePath;
+class TreeRowReference;
+
+
+/** @addtogroup gtkmmEnums Enums and Flags */
+
+/**
+ * @ingroup gtkmmEnums
+ * @par Bitwise operators:
+ * <tt>%TreeModelFlags operator|(TreeModelFlags, TreeModelFlags)</tt><br>
+ * <tt>%TreeModelFlags operator&(TreeModelFlags, TreeModelFlags)</tt><br>
+ * <tt>%TreeModelFlags operator^(TreeModelFlags, TreeModelFlags)</tt><br>
+ * <tt>%TreeModelFlags operator~(TreeModelFlags)</tt><br>
+ * <tt>%TreeModelFlags& operator|=(TreeModelFlags&, TreeModelFlags)</tt><br>
+ * <tt>%TreeModelFlags& operator&=(TreeModelFlags&, TreeModelFlags)</tt><br>
+ * <tt>%TreeModelFlags& operator^=(TreeModelFlags&, TreeModelFlags)</tt><br>
+ */
+enum TreeModelFlags
+{
+ TREE_MODEL_ITERS_PERSIST = 1 << 0,
+ TREE_MODEL_LIST_ONLY = 1 << 1
+};
+
+/** @ingroup gtkmmEnums */
+inline TreeModelFlags operator|(TreeModelFlags lhs, TreeModelFlags rhs)
+ { return static_cast<TreeModelFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
+
+/** @ingroup gtkmmEnums */
+inline TreeModelFlags operator&(TreeModelFlags lhs, TreeModelFlags rhs)
+ { return static_cast<TreeModelFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
+
+/** @ingroup gtkmmEnums */
+inline TreeModelFlags operator^(TreeModelFlags lhs, TreeModelFlags rhs)
+ { return static_cast<TreeModelFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
+
+/** @ingroup gtkmmEnums */
+inline TreeModelFlags operator~(TreeModelFlags flags)
+ { return static_cast<TreeModelFlags>(~static_cast<unsigned>(flags)); }
+
+/** @ingroup gtkmmEnums */
+inline TreeModelFlags& operator|=(TreeModelFlags& lhs, TreeModelFlags rhs)
+ { return (lhs = static_cast<TreeModelFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
+
+/** @ingroup gtkmmEnums */
+inline TreeModelFlags& operator&=(TreeModelFlags& lhs, TreeModelFlags rhs)
+ { return (lhs = static_cast<TreeModelFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
+
+/** @ingroup gtkmmEnums */
+inline TreeModelFlags& operator^=(TreeModelFlags& lhs, TreeModelFlags rhs)
+ { return (lhs = static_cast<TreeModelFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::TreeModelFlags> : public Glib::Value_Flags<Gtk::TreeModelFlags>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+
+//TODO: Remove any mention of null arguments from the method documentation, by adding overrides in gtk_docs_override.xml.
+/** This class defines a generic tree interface for use by the Gtk::TreeView widget.
+ * @ingroup TreeView
+ *
+ * It is is designed to be usable with any appropriate data structure. The
+ * programmer just has to implement this interface on their own data type for
+ * it to be viewable by a Gtk::TreeView widget.
+ *
+ * The model is represented as a hierarchical tree of strongly-typed, columned
+ * data. In other words, the model can be seen as a tree where every node has
+ * different values depending on which column is being queried. The type of
+ * data found in a column is determined by TreeModel::Column<> templates.
+ * The types are homogeneous per column across all nodes. It is important to note that this
+ * interface only provides a way of examining a model and observing changes.
+ * The implementation of each individual model decides how and if changes are
+ * made.
+ *
+ * In order to make life simpler for programmers who do not need to write their
+ * own specialized model, two generic models are provided - the Gtk::TreeStore
+ * and the Gtk::ListStore. To use these, the developer simply pushes data into
+ * these models as necessary. These models provide the data structure as well
+ * as all appropriate tree interfaces. As a result, implementing drag and drop,
+ * sorting, and storing data is trivial. For the vast majority of trees and
+ * lists, these two models are sufficient.
+ *
+ * Models are accessed on a node/column level of granularity. One can query for
+ * the value of a model at a certain node and a certain column on that node.
+ * There are two structures used to reference a particular node in a model.
+ * They are the @link Gtk::TreePath Path@endlink and the iterator. Most of the interface consists of
+ * operations on an @link Gtk::TreeIter iterator@endlink.
+ *
+ * A @link Gtk::TreePath Gtk::TreeModel::Path@endlink is essentially a potential node. It is a location on a model that may
+ * or may not actually correspond to a node on a specific model.
+ *
+ * By contrast, an @link Gtk::TreeIter Gtk::TreeModel::iterator@endlink is a reference to a specific node on a specific
+ * model. One can convert a path to an @link Gtk::TreeIter iterator@endlink by calling Gtk::TreeModel::get_iter().
+ * These iterators are the primary way of accessing a model and are similar to the iterators
+ * used by Gtk::TextBuffer. The model interface defines a set of operations
+ * using them for navigating the model.
+ *
+ * The @link Gtk::TreeRowReference RowReference@endlink is also useful, because it remains
+ * valid as long as there is an existing row pointed to by it's path. You can convert between RowReferences and iterators and @link Gtk::TreePath Path@endlink s.
+ */
+
+class TreeModel : public Glib::Interface
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef TreeModel CppObjectType;
+ typedef TreeModel_Class CppClassType;
+ typedef GtkTreeModel BaseObjectType;
+ typedef GtkTreeModelIface BaseClassType;
+
+private:
+ friend class TreeModel_Class;
+ static CppClassType treemodel_class_;
+
+ // noncopyable
+ TreeModel(const TreeModel&);
+ TreeModel& operator=(const TreeModel&);
+
+protected:
+ TreeModel(); // you must derive from this class
+ explicit TreeModel(GtkTreeModel* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~TreeModel();
+
+ static void add_interface(GType gtype_implementer);
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ GtkTreeModel* gobj() { return reinterpret_cast<GtkTreeModel*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const GtkTreeModel* gobj() const { return reinterpret_cast<GtkTreeModel*>(gobject_); }
+
+private:
+
+
+public:
+ typedef TreeModelColumnRecord ColumnRecord;
+
+ typedef TreeNodeChildren Children;
+ typedef Children::iterator iterator;
+ typedef Children::reverse_iterator reverse_iterator;
+ typedef Children::const_iterator const_iterator;
+ typedef Children::const_reverse_iterator const_reverse_iterator;
+
+ typedef TreeRow Row;
+ typedef TreePath Path;
+ typedef TreeRowReference RowReference;
+
+
+ //These are part of GtkTreeModelFilter or GtkTreeModelSort, not GtkTreeModel:
+
+
+ /** Returns a valid iterator pointing to @a path.
+ *
+ * @param path The @link Gtk::TreePath Gtk::TreeModel::Path@endlink.
+ * @result A valid iterator pointing to the path, or an invalid iterator if that is not possible.
+ */
+ iterator get_iter(const Path& path);
+ //TODO: Add const_iterator get_iter(const Path& path) const;
+ //Implement a const_iterator?
+
+ /** Returns a valid iterator pointing to @a path_string.
+ *
+ * @param path_string The path, as a string representation.
+ * @result A valid iterator pointing to the path, or an invalid iterator if that is not possible.
+ */
+ iterator get_iter(const Glib::ustring& path_string);
+ //TODO: Implement a const_iterator? const_iterator get_iter(const Glib::ustring& path_string) const;
+
+ ///This returns an STL-like container API, for iterating over the rows.
+ Children children();
+
+ //TODO: Return a real TreeNodeChildren (a container of const_iterators), when we have a real const_iterator.
+ ///This returns an STL-like container API, for iterating over the rows.
+ Children children() const;
+
+
+ /** For example,
+ * void on_foreach(const Gtk::TreeModel::iterator& iter);
+ *
+ * If the callback function returns true, then the tree ceases to be walked, and foreach() returns.
+ */
+ typedef sigc::slot<bool, const TreeModel::iterator&> SlotForeachIter;
+
+ /** Calls a callback slot on each node in the model in a depth-first fashion.
+ * If the callback function returns true, then the tree ceases to be walked, and foreach() returns.
+ *
+ * @param slot The function to call for each selected node.
+ */
+ void foreach_iter(const SlotForeachIter& slot);
+
+ /** For example,
+ * void on_foreach(const Gtk::TreeModel::Path& path);
+ *
+ * If the callback function returns true, then the tree ceases to be walked, and foreach() returns.
+ */
+ typedef sigc::slot<bool, const TreeModel::Path&> SlotForeachPath;
+
+ /** Calls a callback slot on each node in the model in a depth-first fashion.
+ * If the callback function returns true, then the tree ceases to be walked, and foreach() returns.
+ *
+ * @param slot The function to call for each selected node.
+ */
+ void foreach_path(const SlotForeachPath& slot);
+
+ /** For example,
+ * void on_foreach(const Gtk::TreeModel::Path& path, const Gtk::TreeModel::iterator& iter);
+ *
+ * If the callback function returns true, then the tree ceases to be walked, and foreach() returns.
+ */
+ typedef sigc::slot<bool, const TreeModel::Path&, const TreeModel::iterator&> SlotForeachPathAndIter;
+
+ /** Calls a callback slot on each node in the model in a depth-first fashion.
+ * If the callback function returns true, then the tree ceases to be walked, and foreach() returns.
+ *
+ * @param slot The function to call for each selected node.
+ */
+ void foreach(const SlotForeachPathAndIter& slot);
+
+
+ /** Returns a set of flags supported by this interface. The flags are a bitwise
+ * combination of Gtk::TreeModelFlags. The flags supported should not change
+ * during the lifecycle of the tree_model.
+ * @return The flags supported by this interface.
+ */
+ TreeModelFlags get_flags() const;
+
+ /** Returns the number of columns supported by @a tree_model .
+ * @return The number of columns.
+ */
+ int get_n_columns() const;
+
+ /** Returns the type of the column.
+ * @param index The column index.
+ * @return The type of the column.
+ */
+ GType get_column_type(int index) const;
+ //TODO: A C++-type version of get_column_type()?
+
+
+ /** Returns a Gtk::TreePath referenced by @a iter .
+ * @param iter The Gtk::TreeIter.
+ * @return A Gtk::TreePath.
+ */
+ TreeModel::Path get_path(const iterator& iter) const;
+
+
+ /** Emits the "row_changed" signal on @a tree_model .
+ * @param path A Gtk::TreePath pointing to the changed row.
+ * @param iter A valid Gtk::TreeIter pointing to the changed row.
+ */
+ void row_changed(const Path& path, const iterator& iter);
+
+ /** Emits the "row_inserted" signal on @a tree_model
+ * @param path A Gtk::TreePath pointing to the inserted row.
+ * @param iter A valid Gtk::TreeIter pointing to the inserted row.
+ */
+ void row_inserted(const Path& path, const iterator& iter);
+
+ /** Emits the "row_has_child_toggled" signal on @a tree_model . This should be
+ * called by models after the child state of a node changes.
+ * @param path A Gtk::TreePath pointing to the changed row.
+ * @param iter A valid Gtk::TreeIter pointing to the changed row.
+ */
+ void row_has_child_toggled(const Path& path, const iterator& iter);
+
+ /** Emits the "row_deleted" signal on @a tree_model . This should be called by
+ * models after a row has been removed. The location pointed to by @a path should
+ * be the location that the row previously was at. It may not be a valid
+ * location anymore.
+ * @param path A Gtk::TreePath pointing to the previous location of the deleted row.
+ */
+ void row_deleted(const Path& path);
+
+ void rows_reordered(const Path& path, const iterator& iter, const Glib::ArrayHandle<int>& new_order);
+
+
+ /** Emits the "rows_reordered" signal on @a tree_model . This should be called by
+ * models when their rows have been reordered.
+ * @param path A Gtk::TreePath pointing to the tree node whose children have been reordered.
+ * @param iter A valid Gtk::TreeIter pointing to the node whose children have been reordered.
+ * @param new_order An array of integers mapping the current position of each child
+ * to its old position before the re-ordering,
+ * i.e. @a new_order <tt>[newpos] = oldpos</tt>.
+ */
+ void rows_reordered(const Path& path, const iterator& iter, int* new_order);
+
+
+ /** Generates a string representation of the iter. This string is a ':'
+ * separated list of numbers. For example, "4:10:0:3" would be an
+ * acceptable return value for this string.
+ * @param iter An Gtk::TreeIter.
+ * @return The string.
+ *
+ * Since: 2.2.
+ */
+ Glib::ustring get_string(const iterator& iter) const;
+
+
+ Glib::SignalProxy2< void,const TreeModel::Path&,const TreeModel::iterator& > signal_row_changed();
+
+
+ Glib::SignalProxy2< void,const TreeModel::Path&,const TreeModel::iterator& > signal_row_inserted();
+
+
+ Glib::SignalProxy2< void,const TreeModel::Path&,const TreeModel::iterator& > signal_row_has_child_toggled();
+
+
+ Glib::SignalProxy1< void,const TreeModel::Path& > signal_row_deleted();
+
+
+ Glib::SignalProxy3< void,const TreeModel::Path&,const TreeModel::iterator&,int* > signal_rows_reordered();
+
+
+protected:
+ virtual TreeModelFlags get_flags_vfunc() const;
+ virtual int get_n_columns_vfunc() const;
+ virtual GType get_column_type_vfunc(int index) const;
+
+ //These are only for deriving new TreeModels, which isn't very common or easy:
+
+ /** Override and implement this in a derived TreeModel class.
+ * Sets @a iter_next to refer to the node following @a iter it at the current level.
+ * If there is no next iter, false is returned and iter_next is set to be invalid.
+ *
+ * @param iter An iterator.
+ * @param iter_next An iterator that will be set to refer to the next node, or will be set as invalid.
+ * @result true if the operation was possible.
+ */
+ virtual bool iter_next_vfunc(const iterator& iter, iterator& iter_next) const;
+
+ /** Override and implement this in a derived TreeModel class.
+ * Sets @a iter to a valid iterator pointing to @a path
+ *
+ * @param path An path to a node.
+ * @param iter An iterator that will be set to refer to a node to the path, or will be set as invalid.
+ * @result true if the operation was possible.
+ */
+ virtual bool get_iter_vfunc(const Path& path, iterator& iter) const;
+
+ /** Override and implement this in a derived TreeModel class.
+ * Sets @a iter to refer to the first child of @a parent. If @a parent has no children,
+ * false is returned and @a iter is set to be invalid.
+ *
+ * @param parent An iterator.
+ * @param iter An iterator that will be set to refer to the firt child node, or will be set as invalid.
+ * @result true if the operation was possible.
+ */
+ virtual bool iter_children_vfunc(const iterator& parent, iterator& iter) const;
+
+ /** Override and implement this in a derived TreeModel class.
+ * Sets @a iter to be the parent of @a child. If @a child is at the toplevel, and
+ * doesn't have a parent, then @a iter is set to an invalid iterator and false
+ * is returned.
+ *
+ * @param child An iterator.
+ * @param iter An iterator that will be set to refer to the parent node, or will be set as invalid.
+ * @result true if the operation was possible.
+ */
+ virtual bool iter_parent_vfunc(const iterator& child, iterator& iter) const;
+
+ /** Override and implement this in a derived TreeModel class.
+ * Sets @a iter to be the child of @a parent using the given index. The first
+ * index is 0. If @a n is too big, or @a parent has no children, @a iter is set
+ * to an invalid iterator and false is returned.
+ * See also iter_nth_root_child_vfunc()
+ *
+ * @param parent An iterator.
+ * @param n The index of the child node to which @a iter should be set.
+ * @param iter An iterator that will be set to refer to the nth node, or will be set as invalid.
+ * @result true if the operation was possible.
+ */
+ virtual bool iter_nth_child_vfunc(const iterator& parent, int n, iterator& iter) const;
+
+ /** Override and implement this in a derived TreeModel class.
+ * Sets @a iter to be the child of at the root level using the given index. The first
+ * index is 0. If @a n is too big, or if there are no children, @a iter is set
+ * to an invalid iterator and false is returned.
+ * See also iter_nth_child_vfunc().
+ *
+ * @param n The index of the child node to which @a iter should be set.
+ * @param iter An iterator that will be set to refer to the nth node, or will be set as invalid.
+ * @result true if the operation was possible.
+ */
+ virtual bool iter_nth_root_child_vfunc(int n, iterator& iter) const;
+
+
+ /** Override and implement this in a derived TreeModel class.
+ * Returns true if @a iter has children, false otherwise.
+ *
+ * @param iter The iterator to test for children.
+ * @result true if @a iter has children.
+ */
+ virtual bool iter_has_child_vfunc(const iterator& iter) const;
+
+ /** Override and implement this in a derived TreeModel class.
+ * Returns the number of children that @a iter has.
+ * See also iter_n_root_children_vfunc().
+ *
+ * @param iter The iterator to test for children.
+ * @result The number of children of @a iter.
+ */
+ virtual int iter_n_children_vfunc(const iterator& iter) const;
+
+ /** Override and implement this in a derived TreeModel class.
+ * Returns the number of toplevel nodes.
+ * See also iter_n_children().
+ *
+ * @result The number of children at the root level.
+ */
+ virtual int iter_n_root_children_vfunc() const;
+
+ /** Override and implement this in a derived TreeModel class.
+ * Lets the tree ref the node. This is an optional method for models to
+ * implement. To be more specific, models may ignore this call as it exists
+ * primarily for performance reasons.
+ *
+ * This function is primarily meant as a way for views to let caching model know
+ * when nodes are being displayed (and hence, whether or not to cache that
+ * node.) For example, a file-system based model would not want to keep the
+ * entire file-hierarchy in memory, just the sections that are currently being
+ * displayed by every current view.
+ *
+ * A model should be expected to be able to get an iter independent of its
+ * reffed state.
+ *
+ * @param iter the iterator.
+ */
+ virtual void ref_node_vfunc(const iterator& iter) const;
+
+ /** Override and implement this in a derived TreeModel class.
+ * Lets the tree unref the node. This is an optional method for models to
+ * implement. To be more specific, models may ignore this call as it exists
+ * primarily for performance reasons.
+ *
+ * For more information on what this means, see unref_node_vfunc().
+ * Please note that nodes that are deleted are not unreffed.
+ *
+ * @param iter the iterator.
+ */
+ virtual void unref_node_vfunc(const iterator& iter) const;
+
+ /** Override and implement this in a derived TreeModel class.
+ * Returns a Path referenced by @a iter.
+ *
+ * @param iter The iterator.
+ * @result The path.
+ */
+
+
+ virtual TreeModel::Path get_path_vfunc(const iterator& iter) const;
+
+ /** Override and implement this in a derived TreeModel class.
+ * Initializes and sets @a value to that at @a column.
+ *
+ * @param iter The iterator.
+ * @param column The column to lookup the value at.
+ * @param value An empty Glib:Value to set.
+ */
+ virtual void get_value_vfunc(const iterator& iter, int column, Glib::ValueBase& value) const;
+
+ /** Override and implement this in a derived TreeModel class.
+ * @note This virtual method is <em>deprecated</em>. If you want to check
+ * whether an iterator is valid, call TreeStore::iter_is_valid(),
+ * ListStore::iter_is_valid() or TreeModelSort::iter_is_valid() directly
+ * instead. Because these methods are intended to be used only for debugging
+ * and/or testing purposes, it doesn't make sense to provide an abstract
+ * interface to them.
+ *
+ * @result true if the iterator is valid.
+ *
+ * @deprecated Use iter_is_valid() in the derived class.
+ */
+ virtual bool iter_is_valid(const iterator& iter) const;
+
+ //Called by TreeRow, which is a friend class:
+ //The comment about set_row_changed() in the documentation is based on my reading of the source of
+ //gtk_list_store_set_value() and gtk_tree_store_set_value().
+ /** Override and implement this in a derived TreeModel class, so that Row::operator() and
+ * Row::set_value() work.
+ * You can probably just implement this by calling set_value_vfunc().
+ * Your implementation of set_value_impl() should also call set_row_changed() after changing the value.
+ */
+ virtual void set_value_impl(const iterator& row, int column, const Glib::ValueBase& value);
+
+ //This might not need to be virtual, but it's not a big deal. murrayc.
+ virtual void get_value_impl(const iterator& row, int column, Glib::ValueBase& value) const;
+
+ friend class Gtk::TreeModelSort;
+ friend class Gtk::TreeRow;
+ friend class Gtk::TreeIter;
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_row_changed(const TreeModel::Path& path, const TreeModel::iterator& iter);
+ virtual void on_row_inserted(const TreeModel::Path& path, const TreeModel::iterator& iter);
+ virtual void on_row_has_child_toggled(const TreeModel::Path& path, const TreeModel::iterator& iter);
+ virtual void on_row_deleted(const TreeModel::Path& path);
+ virtual void on_rows_reordered(const TreeModel::Path& path, const TreeModel::iterator& iter, int* new_order);
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::TreeModel
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Gtk::TreeModel> wrap(GtkTreeModel* object, bool take_copy = false);
+
+} // namespace Glib
+
+#endif /* _GTKMM_TREEMODEL_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/treemodelcolumn.cc b/libs/gtkmm2/gtk/gtkmm/treemodelcolumn.cc
new file mode 100644
index 0000000000..0cf6986018
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/treemodelcolumn.cc
@@ -0,0 +1,68 @@
+/* $Id$ */
+
+/* Copyright (c) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or(at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/treemodelcolumn.h>
+
+
+namespace Gtk
+{
+
+/**** Gtk::TreeModelColumnRecord *******************************************/
+
+TreeModelColumnRecord::TreeModelColumnRecord()
+:
+ column_types_ ()
+{}
+
+TreeModelColumnRecord::~TreeModelColumnRecord()
+{}
+
+void TreeModelColumnRecord::add(TreeModelColumnBase& column)
+{
+ g_return_if_fail(column.index_ == -1); //Check that it hasn't been set before.
+
+ column.index_ = column_types_.size();
+ column_types_.push_back(column.type_);
+}
+
+unsigned int TreeModelColumnRecord::size() const
+{
+ return column_types_.size();
+}
+
+const GType* TreeModelColumnRecord::types() const
+{
+ g_return_val_if_fail(!column_types_.empty(), 0);
+
+ // According to Josuttis' book, &vector.front() to get a builtin array is
+ // quasi-standard. It should work fine with any std::vector implementation.
+ return &column_types_.front();
+}
+
+
+/**** Gtk::TreeModelColumnBase *********************************************/
+
+TreeModelColumnBase::TreeModelColumnBase(GType type)
+:
+ type_ (type),
+ index_ (-1) //default to an invalid index.
+{}
+
+} // namespace Gtk
+
diff --git a/libs/gtkmm2/gtk/gtkmm/treemodelcolumn.h b/libs/gtkmm2/gtk/gtkmm/treemodelcolumn.h
new file mode 100644
index 0000000000..1ff824c9c9
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/treemodelcolumn.h
@@ -0,0 +1,145 @@
+#ifndef _GTKMM_TREEMODELCOLUMN_H
+#define _GTKMM_TREEMODELCOLUMN_H
+/* $Id$ */
+
+/* Copyright (c) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or(at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glib-object.h>
+#include <glibmm/value.h>
+
+#include <vector>
+#include <gtkmmconfig.h>
+
+GLIBMM_USING_STD(vector)
+
+
+namespace Gtk
+{
+
+class TreeModelColumnBase;
+
+
+/** Typedefed as TreeModel::ColumnRecord.
+ * Keeps a record of @link TreeModelColumn TreeModelColumns@endlink.
+ * @ingroup TreeView
+ * ColumnRecord objects are used to setup a new instance of a TreeModel
+ * (or rather, a new instance of an implementation of the model, such as Gtk::ListStore
+ * or Gtk::TreeStore). It is convenient to do that by deriving from
+ * TreeModel::ColumnRecord:
+ * @code
+ * class MyModelColumns : public Gtk::TreeModel::ColumnRecord
+ * {
+ * public:
+ * Gtk::TreeModelColumn<Glib::ustring> filename;
+ * Gtk::TreeModelColumn<Glib::ustring> description;
+ * Gtk::TreeModelColumn< Glib::RefPtr<Gdk::Pixbuf> > thumbnail;
+ *
+ * MyModelColumns() { add(filename); add(description); add(thumbnail); }
+ * };
+ * @endcode
+ *
+ * Whether or not you derive your own ColumnRecord, you need to add the
+ * @link TreeModelColumn TreeModelColumns@endlink to the ColumnRecord with the
+ * add() method.
+ *
+ * A ColumnRecord instance, such as an instance of @c MyModelColumns should then
+ * be passed to ListStore::create() or TreeStore::create().
+ * The @link TreeModelColumn TreeModelColumns@endlink, such as the members
+ * @c filename, @c description and @c thumbnail can then be used with Gtk::TreeRow::operator[]()
+ * to specify the column you're interested in.
+ *
+ * Neither TreeModel::ColumnRecord nor the
+ * @link TreeModelColumn TreeModelColumns@endlink contain any real data --
+ * they merely describe what C++ type is stored in which column
+ * of a TreeModel, and save you from having to repeat that type information in several places.
+ * Thus it's absolutely legal to use a statically allocated
+ * TreeModel::ColumnRecord (as long as you make sure it's instantiated after
+ * Gtk::Main), even when creating multiple models from it.
+ */
+class TreeModelColumnRecord
+{
+public:
+ TreeModelColumnRecord();
+ virtual ~TreeModelColumnRecord();
+
+ /** Adds a TreeModelColumn to this record.
+ * add() not only registers the @a column, but also assigns a column
+ * index to it. Once registered, the TreeModelColumn is final, and
+ * you're free to pass it around by value.
+ */
+ void add(TreeModelColumnBase& column);
+
+ unsigned int size() const;
+ const GType* types() const;
+
+private:
+ std::vector<GType> column_types_;
+
+ // noncopyable
+ TreeModelColumnRecord(const TreeModelColumnRecord&);
+ TreeModelColumnRecord& operator=(const TreeModelColumnRecord&);
+};
+
+
+/** Base class of TreeModelColumn templates.
+ * @ingroup TreeView
+ */
+class TreeModelColumnBase
+{
+public:
+ GType type() const { return type_; }
+ int index() const { return index_; }
+
+protected:
+ explicit TreeModelColumnBase(GType type);
+
+private:
+ GType type_;
+ int index_;
+
+ friend class Gtk::TreeModelColumnRecord;
+};
+
+/** @relates Gtk::TreeModelColumnBase */
+inline bool operator==(const TreeModelColumnBase& lhs, const TreeModelColumnBase& rhs)
+ { return (lhs.index() == rhs.index()); }
+
+/** @relates Gtk::TreeModelColumnBase */
+inline bool operator!=(const TreeModelColumnBase& lhs, const TreeModelColumnBase& rhs)
+ { return (lhs.index() != rhs.index()); }
+
+
+/** A Gtk::TreeModelColumn describes the C++ type of the data in a model column, and identifies that column in the model.
+ * See @link TreeModelColumnRecord Gtk::TreeModel::Columns@endlink for a usage example.
+ * @ingroup TreeView
+ */
+template <class T>
+class TreeModelColumn : public TreeModelColumnBase
+{
+public:
+ typedef T ElementType;
+ typedef Glib::Value<T> ValueType;
+
+ TreeModelColumn() : TreeModelColumnBase(ValueType::value_type()) {}
+};
+
+} // namespace Gtk
+
+
+#endif /* _GTKMM_TREEMODELCOLUMN_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/treemodelfilter.cc b/libs/gtkmm2/gtk/gtkmm/treemodelfilter.cc
new file mode 100644
index 0000000000..08670fb795
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/treemodelfilter.cc
@@ -0,0 +1,374 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/treemodelfilter.h>
+#include <gtkmm/private/treemodelfilter_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtktreemodelfilter.h>
+
+namespace //anonymous
+{
+
+// This Signal Proxy allows the C++ coder to specify
+// a sigc::slot instead of a static function.
+class SignalProxy_Visible
+{
+public:
+ typedef Gtk::TreeModelFilter::SlotVisible SlotType;
+
+ SignalProxy_Visible(const SlotType& slot)
+ : slot_(slot) {}
+
+ ~SignalProxy_Visible();
+
+ static gboolean gtk_callback(GtkTreeModel* model, GtkTreeIter* iter, gpointer data);
+ static void gtk_callback_destroy(void* data);
+
+private:
+ SlotType slot_;
+};
+
+SignalProxy_Visible::~SignalProxy_Visible()
+{}
+
+gboolean SignalProxy_Visible::gtk_callback(GtkTreeModel* model, GtkTreeIter* iter, gpointer data)
+{
+ SignalProxy_Visible *const self = static_cast<SignalProxy_Visible*>(data);
+
+ try
+ {
+ return (self->slot_)( Gtk::TreeModel::const_iterator(model, iter) );
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+
+ return FALSE; //An arbitary default, just to avoid the compiler warning.
+}
+
+void SignalProxy_Visible::gtk_callback_destroy(void* data)
+{
+ delete static_cast<SignalProxy_Visible*>(data);
+}
+
+
+// This Signal Proxy allows the C++ coder to specify
+// a sigc::slot instead of a static function.
+class SignalProxy_Modify
+{
+public:
+ typedef Gtk::TreeModelFilter::SlotModify SlotType;
+
+ SignalProxy_Modify(const SlotType& slot)
+ : slot_(slot) {}
+
+ ~SignalProxy_Modify();
+
+ static void gtk_callback(GtkTreeModel* model, GtkTreeIter* iter, GValue* value, gint column, gpointer data);
+ static void gtk_callback_destroy(void* data);
+
+private:
+ SlotType slot_;
+};
+
+SignalProxy_Modify::~SignalProxy_Modify()
+{}
+
+void SignalProxy_Modify::gtk_callback(GtkTreeModel* model, GtkTreeIter* iter, GValue* value, gint column, gpointer data)
+{
+ SignalProxy_Modify *const self = static_cast<SignalProxy_Modify*>(data);
+
+ try
+ {
+ //Initialize the input parameter with the appropriate type for this column.
+ //Then the C++ handler can just use operator==() without calling init on the value output arg:
+ Glib::ValueBase cppValue;
+ GType column_type = gtk_tree_model_get_column_type(model, column);
+ cppValue.init(column_type);
+
+ (self->slot_)( Gtk::TreeModel::const_iterator(model, iter), cppValue, column );
+
+ //GTK+ has already done this for us: g_value_init(value, column_type);
+
+ //If the C++ handler has inited value with an inappropriate GType, then this will fail,
+ //but they should not do that because it makes no sense.
+ g_value_copy(cppValue.gobj() /* source */, value /* destination */);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+}
+
+void SignalProxy_Modify::gtk_callback_destroy(void* data)
+{
+ delete static_cast<SignalProxy_Modify*>(data);
+}
+
+
+} // anonymous namespace
+
+
+typedef Gtk::TreeModel::Path Path; //So that the generated method implemenations can use this a return type.
+
+namespace Gtk
+{
+
+TreeModelFilter::TreeModelFilter(const Glib::RefPtr<TreeModel>& child_model)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Glib::Object(Glib::ConstructParams(treemodelfilter_class_.init(), "child_model",child_model->gobj(), (char*) 0))
+{
+}
+
+TreeModelFilter::TreeModelFilter(const Glib::RefPtr<TreeModel>& child_model, const TreeModel::Path& virtual_root)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Glib::Object(Glib::ConstructParams(treemodelfilter_class_.init(), "child_model",child_model->gobj(),"virtual_root",(virtual_root.empty() ? 0 : const_cast<GtkTreePath*>((virtual_root).gobj())) , (char*) 0))
+{
+}
+
+void TreeModelFilter::set_visible_func(const SlotVisible& slot)
+{
+ // Create a signal proxy. A pointer to this will be passed
+ // through the callback's data parameter. It will be deleted
+ // when SignalProxy_Visible::gtk_callback_destroy() is called.
+ SignalProxy_Visible *const pSignalProxy = new SignalProxy_Visible(slot);
+
+ gtk_tree_model_filter_set_visible_func(gobj(),
+ &SignalProxy_Visible::gtk_callback, pSignalProxy,
+ &SignalProxy_Visible::gtk_callback_destroy);
+}
+
+
+TreeModel::iterator TreeModelFilter::convert_child_iter_to_iter(const iterator& child_iter) const
+{
+ TreeIter filter_iter (const_cast<TreeModelFilter*>(this));
+
+ gtk_tree_model_filter_convert_child_iter_to_iter(
+ const_cast<GtkTreeModelFilter*>(gobj()), filter_iter.gobj(),
+ const_cast<GtkTreeIter*>(child_iter.gobj()));
+
+ return filter_iter;
+}
+
+TreeModel::iterator TreeModelFilter::convert_iter_to_child_iter(const iterator& filter_iter) const
+{
+ GtkTreeModel *const child_model = gtk_tree_model_filter_get_model(const_cast<GtkTreeModelFilter*>(gobj()));
+
+ TreeIter child_iter (dynamic_cast<TreeModel*>(Glib::wrap_auto((GObject*) child_model, false)));
+
+ gtk_tree_model_filter_convert_iter_to_child_iter(
+ const_cast<GtkTreeModelFilter*>(gobj()), child_iter.gobj(),
+ const_cast<GtkTreeIter*>(filter_iter.gobj()));
+
+ return child_iter;
+}
+
+void TreeModelFilter::set_modify_func(const TreeModelColumnRecord& columns, const SlotModify& slot)
+{
+ // Create a signal proxy. A pointer to this will be passed
+ // through the callback's data parameter. It will be deleted
+ // when SignalProxy_Modify::gtk_callback_destroy() is called.
+ SignalProxy_Modify *const pSignalProxy = new SignalProxy_Modify(slot);
+
+ gtk_tree_model_filter_set_modify_func(gobj(),
+ columns.size(), const_cast<GType*>(columns.types()),
+ &SignalProxy_Modify::gtk_callback, pSignalProxy,
+ &SignalProxy_Modify::gtk_callback_destroy);
+}
+
+void TreeModelFilter::set_value_impl(const iterator& /* row */, int /* column */, const Glib::ValueBase& /* value */)
+{
+ g_warning("Attempt to set a value of a row in a TreeModelFilter instead of in the child model.");
+}
+
+
+} // namespace Gtk
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Gtk::TreeModelFilter> wrap(GtkTreeModelFilter* object, bool take_copy)
+{
+ return Glib::RefPtr<Gtk::TreeModelFilter>( dynamic_cast<Gtk::TreeModelFilter*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} /* namespace Glib */
+
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& TreeModelFilter_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &TreeModelFilter_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_tree_model_filter_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ TreeModel::add_interface(get_type());
+ }
+
+ return *this;
+}
+
+void TreeModelFilter_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* TreeModelFilter_Class::wrap_new(GObject* object)
+{
+ return new TreeModelFilter((GtkTreeModelFilter*)object);
+}
+
+
+/* The implementation: */
+
+GtkTreeModelFilter* TreeModelFilter::gobj_copy()
+{
+ reference();
+ return gobj();
+}
+
+TreeModelFilter::TreeModelFilter(const Glib::ConstructParams& construct_params)
+:
+ Glib::Object(construct_params)
+{}
+
+TreeModelFilter::TreeModelFilter(GtkTreeModelFilter* castitem)
+:
+ Glib::Object((GObject*)(castitem))
+{}
+
+TreeModelFilter::~TreeModelFilter()
+{}
+
+
+TreeModelFilter::CppClassType TreeModelFilter::treemodelfilter_class_; // initialize static member
+
+GType TreeModelFilter::get_type()
+{
+ return treemodelfilter_class_.init().get_type();
+}
+
+GType TreeModelFilter::get_base_type()
+{
+ return gtk_tree_model_filter_get_type();
+}
+
+
+Glib::RefPtr<TreeModelFilter> TreeModelFilter::create(const Glib::RefPtr<TreeModel>& child_model)
+{
+ return Glib::RefPtr<TreeModelFilter>( new TreeModelFilter(child_model) );
+}
+Glib::RefPtr<TreeModelFilter> TreeModelFilter::create(const Glib::RefPtr<TreeModel>& child_model, const TreeModel::Path& virtual_root)
+{
+ return Glib::RefPtr<TreeModelFilter>( new TreeModelFilter(child_model, virtual_root) );
+}
+void TreeModelFilter::set_visible_column(const TreeModelColumnBase& column)
+{
+ gtk_tree_model_filter_set_visible_column(gobj(), (column).index());
+}
+
+void TreeModelFilter::set_visible_column(int column)
+{
+ gtk_tree_model_filter_set_visible_column(gobj(), column);
+}
+
+Glib::RefPtr<TreeModel> TreeModelFilter::get_model()
+{
+
+ Glib::RefPtr<TreeModel> retvalue = Glib::wrap(gtk_tree_model_filter_get_model(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const TreeModel> TreeModelFilter::get_model() const
+{
+
+ Glib::RefPtr<const TreeModel> retvalue = Glib::wrap(gtk_tree_model_filter_get_model(const_cast<GtkTreeModelFilter*>(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Path TreeModelFilter::convert_child_path_to_path(const Path& child_path)
+{
+ return Gtk::TreePath(gtk_tree_model_filter_convert_child_path_to_path(gobj(), const_cast<GtkTreePath*>((child_path).gobj())), false);
+}
+
+Path TreeModelFilter::convert_path_to_child_path(const Path& filter_path)
+{
+ return Gtk::TreePath(gtk_tree_model_filter_convert_path_to_child_path(gobj(), const_cast<GtkTreePath*>((filter_path).gobj())), false);
+}
+
+Path TreeModelFilter::convert_child_path_to_path(const Path& child_path) const
+{
+ return Gtk::TreePath(gtk_tree_model_filter_convert_child_path_to_path(const_cast<GtkTreeModelFilter*>(gobj()), const_cast<GtkTreePath*>((child_path).gobj())), false);
+}
+
+Path TreeModelFilter::convert_path_to_child_path(const Path& filter_path) const
+{
+ return Gtk::TreePath(gtk_tree_model_filter_convert_path_to_child_path(const_cast<GtkTreeModelFilter*>(gobj()), const_cast<GtkTreePath*>((filter_path).gobj())), false);
+}
+
+void TreeModelFilter::refilter()
+{
+ gtk_tree_model_filter_refilter(gobj());
+}
+
+void TreeModelFilter::clear_cache()
+{
+ gtk_tree_model_filter_clear_cache(gobj());
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/treemodelfilter.h b/libs/gtkmm2/gtk/gtkmm/treemodelfilter.h
new file mode 100644
index 0000000000..66ddb7dc90
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/treemodelfilter.h
@@ -0,0 +1,303 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TREEMODELFILTER_H
+#define _GTKMM_TREEMODELFILTER_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright(C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or(at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/treeiter.h>
+#include <gtkmm/treemodel.h>
+// We couldn't include it in treemodel.h, but doing it here makes it easier for people.
+#include <gtkmm/treepath.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkTreeModelFilter GtkTreeModelFilter;
+typedef struct _GtkTreeModelFilterClass GtkTreeModelFilterClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class TreeModelFilter_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/**
+ * @ingroup TreeView
+ *
+ */
+
+class TreeModelFilter :
+ public Glib::Object,
+ public TreeModel
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef TreeModelFilter CppObjectType;
+ typedef TreeModelFilter_Class CppClassType;
+ typedef GtkTreeModelFilter BaseObjectType;
+ typedef GtkTreeModelFilterClass BaseClassType;
+
+private: friend class TreeModelFilter_Class;
+ static CppClassType treemodelfilter_class_;
+
+private:
+ // noncopyable
+ TreeModelFilter(const TreeModelFilter&);
+ TreeModelFilter& operator=(const TreeModelFilter&);
+
+protected:
+ explicit TreeModelFilter(const Glib::ConstructParams& construct_params);
+ explicit TreeModelFilter(GtkTreeModelFilter* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~TreeModelFilter();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ GtkTreeModelFilter* gobj() { return reinterpret_cast<GtkTreeModelFilter*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const GtkTreeModelFilter* gobj() const { return reinterpret_cast<GtkTreeModelFilter*>(gobject_); }
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ GtkTreeModelFilter* gobj_copy();
+
+private:
+
+
+protected:
+
+ explicit TreeModelFilter(const Glib::RefPtr<TreeModel>& child_model);
+ explicit TreeModelFilter(const Glib::RefPtr<TreeModel>& child_model, const TreeModel::Path& virtual_root);
+
+
+public:
+
+ /** This creates a TreeModelFilter with @a child_model as the child model.
+ * You can use set_visible_func(), set_visible_column() and/or set_modify_func() to change the mapping of child
+ * model to parent model.
+ */
+
+ static Glib::RefPtr<TreeModelFilter> create(const Glib::RefPtr<TreeModel>& child_model);
+
+
+ /** This creates a TreeModelFilter with @a child_model as the child model, and @a root as the virtual root.
+ * You can use set_visible_func(), set_visible_column() and/or set_modify_func() to change the mapping of child
+ * model to parent model.
+ */
+
+ static Glib::RefPtr<TreeModelFilter> create(const Glib::RefPtr<TreeModel>& child_model, const TreeModel::Path& virtual_root);
+
+
+ /** For instance,
+ * bool on_visible(const TreeModel::const_iterator& iter);
+ * This should return true if the given row should be visible and false otherwise.
+ */
+ typedef sigc::slot<bool, const TreeModel::const_iterator&> SlotVisible;
+
+ /** Sets the "visible" callback used when filtering the filter.
+ * The callback function should return true if the given row should be visible and false otherwise.
+ *
+ * @param slot A callback slot which determines whether the row should be visible.
+ */
+ void set_visible_func(const SlotVisible& slot);
+
+
+ //TODO: It would be nicer to use "const TreeModelColumnBase& column" instead of "int column",
+ //but how can we get the TreeModelColumnBase from the int in the SignalProxy?
+ //Maybe we could pass the ColumnsRecord to set_modify_func() and store it in the proxy? murrayc.
+ /** For instance,
+ * void on_modify(const Gtk::TreeModel::iterator& iter, Glib::ValueBase& value, int column);
+ *
+ * where iter is an iterator to a row in the child model,
+ * value is an output parameter in which you must store the value to be used in the parent model's row,
+ * column is the column in the parent row whose row value you must provide in the value output paramater.
+ */
+ typedef sigc::slot<void, const Gtk::TreeModel::iterator& /* iter */, Glib::ValueBase& /* value */, int /* column */> SlotModify;
+
+ /** Specify columns that will be provided by this model, and a callback that will provide data for these
+ * columns based on data in the columns of the child model.
+ * The modify function will get called for each data access.
+ *
+ * @param columns Column types for this model (which will be exposed to the parent model/view).
+ * @param slot A callback which will be called for each data access.
+ */
+ void set_modify_func(const TreeModelColumnRecord& columns, const SlotModify& slot);
+
+
+ /** Sets @a column of the child_model to be the column where @a filter should
+ * look for visibility information. @a columns should be a column of type
+ * G::TYPE_BOOLEAN, where <tt>true</tt> means that a row is visible, and <tt>false</tt>
+ * if not.
+ *
+ * Since: 2.4
+ * @param column A <tt>int</tt> which is the column containing the visible information.
+ */
+ void set_visible_column(const TreeModelColumnBase& column);
+
+ /** Sets @a column of the child_model to be the column where @a filter should
+ * look for visibility information. @a columns should be a column of type
+ * G::TYPE_BOOLEAN, where <tt>true</tt> means that a row is visible, and <tt>false</tt>
+ * if not.
+ *
+ * Since: 2.4
+ * @param column A <tt>int</tt> which is the column containing the visible information.
+ */
+ void set_visible_column(int column);
+
+
+ /** Returns a pointer to the child model of @a filter .
+ * @return A pointer to a Gtk::TreeModel.
+ *
+ * Since: 2.4.
+ */
+ Glib::RefPtr<TreeModel> get_model();
+
+ /** Returns a pointer to the child model of @a filter .
+ * @return A pointer to a Gtk::TreeModel.
+ *
+ * Since: 2.4.
+ */
+ Glib::RefPtr<const TreeModel> get_model() const;
+
+ /** Gets an iterator that points to the sorted row that corresponds to the child row pointed at by child_iter.
+ *
+ * @param child_iter A valid iterator pointing to a row on the child model.
+ * @result A valid iterator that points to the row in this sorted model.
+ */
+ iterator convert_child_iter_to_iter(const iterator& child_iter) const;
+
+ /** Gets an iterator that points to the child row that corresponds to the sorted row pointed at by sorted_iter.
+ *
+ * @param filter_iter A valid iterator pointing to a row on the sorted model.
+ * @result A valid iterator that points to the row in the child model.
+ */
+ iterator convert_iter_to_child_iter(const iterator& filter_iter) const;
+
+ //TODO: Remove these deprecated non-const versions when we can break ABI:
+
+ /** Converts @a child_path to a path relative to @a filter . That is, @a child_path
+ * points to a path in the child model. The rerturned path will point to the
+ * same row in the filtered model. If @a child_path isn't a valid path on the
+ * child model, then <tt>0</tt> is returned.
+ * @param child_path A Gtk::TreePath to convert.
+ * @return A newly allocated Gtk::TreePath, or <tt>0</tt>.
+ *
+ * Since: 2.4.
+ */
+ Path convert_child_path_to_path(const Path& child_path);
+
+ /** Converts @a filter_path to a path on the child model of @a filter . That is,
+ * @a filter_path points to a location in @a filter . The returned path will
+ * point to the same location in the model not being filtered. If @a filter_path
+ * does not point to a location in the child model, <tt>0</tt> is returned.
+ * @param filter_path A Gtk::TreePath to convert.
+ * @return A newly allocated Gtk::TreePath, or <tt>0</tt>.
+ *
+ * Since: 2.4.
+ */
+ Path convert_path_to_child_path(const Path& filter_path);
+
+
+ /** Converts @a child_path to a path relative to @a filter . That is, @a child_path
+ * points to a path in the child model. The rerturned path will point to the
+ * same row in the filtered model. If @a child_path isn't a valid path on the
+ * child model, then <tt>0</tt> is returned.
+ * @param child_path A Gtk::TreePath to convert.
+ * @return A newly allocated Gtk::TreePath, or <tt>0</tt>.
+ *
+ * Since: 2.4.
+ */
+ Path convert_child_path_to_path(const Path& child_path) const;
+
+ /** Converts @a filter_path to a path on the child model of @a filter . That is,
+ * @a filter_path points to a location in @a filter . The returned path will
+ * point to the same location in the model not being filtered. If @a filter_path
+ * does not point to a location in the child model, <tt>0</tt> is returned.
+ * @param filter_path A Gtk::TreePath to convert.
+ * @return A newly allocated Gtk::TreePath, or <tt>0</tt>.
+ *
+ * Since: 2.4.
+ */
+ Path convert_path_to_child_path(const Path& filter_path) const;
+
+
+ /** Emits ::row_changed for each row in the child model, which causes
+ * the filter to re-evaluate whether a row is visible or not.
+ *
+ * Since: 2.4
+ */
+ void refilter();
+
+ /** This function should almost never be called. It clears the @a filter
+ * of any cached iterators that haven't been reffed with
+ * ref_node(). This might be useful if the child model
+ * being filtered is static (and doesn't change often) and there has been
+ * a lot of unreffed access to nodes. As a side effect of this function,
+ * all unreffed itters will be invalid.
+ *
+ * Since: 2.4
+ */
+ void clear_cache();
+
+protected:
+ virtual void set_value_impl(const iterator& row, int column, const Glib::ValueBase& value);
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::TreeModelFilter
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Gtk::TreeModelFilter> wrap(GtkTreeModelFilter* object, bool take_copy = false);
+}
+
+
+#endif /* _GTKMM_TREEMODELFILTER_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/treemodelsort.cc b/libs/gtkmm2/gtk/gtkmm/treemodelsort.cc
new file mode 100644
index 0000000000..00964ef5e0
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/treemodelsort.cc
@@ -0,0 +1,230 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/treemodelsort.h>
+#include <gtkmm/private/treemodelsort_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtktreemodelsort.h>
+
+
+typedef Gtk::TreeModel::Path Path; //So that the generated method implemenations can use this a return type.
+
+namespace Gtk
+{
+
+TreeModel::iterator TreeModelSort::convert_child_iter_to_iter(const iterator& child_iter) const
+{
+ TreeIter sorted_iter (const_cast<TreeModelSort*>(this));
+
+ gtk_tree_model_sort_convert_child_iter_to_iter(
+ const_cast<GtkTreeModelSort*>(gobj()), sorted_iter.gobj(),
+ const_cast<GtkTreeIter*>(child_iter.gobj()));
+
+ return sorted_iter;
+}
+
+TreeModel::iterator TreeModelSort::convert_iter_to_child_iter(const iterator& sorted_iter) const
+{
+ GtkTreeModel *const child_model = gtk_tree_model_sort_get_model(const_cast<GtkTreeModelSort*>(gobj()));
+
+ TreeIter child_iter (dynamic_cast<TreeModel*>(Glib::wrap_auto((GObject*) child_model, false)));
+
+ gtk_tree_model_sort_convert_iter_to_child_iter(
+ const_cast<GtkTreeModelSort*>(gobj()), child_iter.gobj(),
+ const_cast<GtkTreeIter*>(sorted_iter.gobj()));
+
+ return child_iter;
+}
+
+void TreeModelSort::set_value_impl(const iterator& row, int column, const Glib::ValueBase& value)
+{
+ // Avoid two extra ref/unref cycles -- we don't store the child
+ // model pointer anywhere, so it's OK to do this _internally_.
+
+ TreeModel *const child_model = dynamic_cast<TreeModel*>(
+ Glib::wrap_auto((GObject*) gtk_tree_model_sort_get_model(gobj()), false));
+
+ TreeIter child_iter (child_model);
+
+ gtk_tree_model_sort_convert_iter_to_child_iter(
+ gobj(), child_iter.gobj(), const_cast<GtkTreeIter*>(row.gobj()));
+
+ child_model->set_value_impl(child_iter, column, value);
+}
+
+} // namespace Gtk
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Gtk::TreeModelSort> wrap(GtkTreeModelSort* object, bool take_copy)
+{
+ return Glib::RefPtr<Gtk::TreeModelSort>( dynamic_cast<Gtk::TreeModelSort*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} /* namespace Glib */
+
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& TreeModelSort_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &TreeModelSort_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_tree_model_sort_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ TreeModel::add_interface(get_type());
+ TreeSortable::add_interface(get_type());
+ }
+
+ return *this;
+}
+
+void TreeModelSort_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* TreeModelSort_Class::wrap_new(GObject* object)
+{
+ return new TreeModelSort((GtkTreeModelSort*)object);
+}
+
+
+/* The implementation: */
+
+GtkTreeModelSort* TreeModelSort::gobj_copy()
+{
+ reference();
+ return gobj();
+}
+
+TreeModelSort::TreeModelSort(const Glib::ConstructParams& construct_params)
+:
+ Glib::Object(construct_params)
+{}
+
+TreeModelSort::TreeModelSort(GtkTreeModelSort* castitem)
+:
+ Glib::Object((GObject*)(castitem))
+{}
+
+TreeModelSort::~TreeModelSort()
+{}
+
+
+TreeModelSort::CppClassType TreeModelSort::treemodelsort_class_; // initialize static member
+
+GType TreeModelSort::get_type()
+{
+ return treemodelsort_class_.init().get_type();
+}
+
+GType TreeModelSort::get_base_type()
+{
+ return gtk_tree_model_sort_get_type();
+}
+
+
+TreeModelSort::TreeModelSort(const Glib::RefPtr<TreeModel>& model)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Glib::Object(Glib::ConstructParams(treemodelsort_class_.init(), "model", Glib::unwrap(model), (char*) 0))
+{
+ }
+
+Glib::RefPtr<TreeModelSort> TreeModelSort::create(const Glib::RefPtr<TreeModel>& model)
+{
+ return Glib::RefPtr<TreeModelSort>( new TreeModelSort(model) );
+}
+Glib::RefPtr<TreeModel> TreeModelSort::get_model()
+{
+
+ Glib::RefPtr<TreeModel> retvalue = Glib::wrap(gtk_tree_model_sort_get_model(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const TreeModel> TreeModelSort::get_model() const
+{
+
+ Glib::RefPtr<const TreeModel> retvalue = Glib::wrap(gtk_tree_model_sort_get_model(const_cast<GtkTreeModelSort*>(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Path TreeModelSort::convert_child_path_to_path(const Path& child_path) const
+{
+ return Gtk::TreePath(gtk_tree_model_sort_convert_child_path_to_path(const_cast<GtkTreeModelSort*>(gobj()), const_cast<GtkTreePath*>((child_path).gobj())), false);
+}
+
+Path TreeModelSort::convert_path_to_child_path(const Path& sorted_path) const
+{
+ return Gtk::TreePath(gtk_tree_model_sort_convert_path_to_child_path(const_cast<GtkTreeModelSort*>(gobj()), const_cast<GtkTreePath*>((sorted_path).gobj())), false);
+}
+
+void TreeModelSort::reset_default_sort_func()
+{
+ gtk_tree_model_sort_reset_default_sort_func(gobj());
+}
+
+void TreeModelSort::clear_cache()
+{
+ gtk_tree_model_sort_clear_cache(gobj());
+}
+
+bool TreeModelSort::iter_is_valid(const iterator& iter) const
+{
+ return gtk_tree_model_sort_iter_is_valid(const_cast<GtkTreeModelSort*>(gobj()), const_cast<GtkTreeIter*>((iter).gobj()));
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/treemodelsort.h b/libs/gtkmm2/gtk/gtkmm/treemodelsort.h
new file mode 100644
index 0000000000..fd56c18d29
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/treemodelsort.h
@@ -0,0 +1,208 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TREEMODELSORT_H
+#define _GTKMM_TREEMODELSORT_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright(C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or(at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#include <gtkmm/treeiter.h>
+#include <gtkmm/treemodel.h>
+#include <gtkmm/treesortable.h>
+// We couldn't include it in treemodel.h, but doing it here makes it easier for people.
+#include <gtkmm/treepath.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkTreeModelSort GtkTreeModelSort;
+typedef struct _GtkTreeModelSortClass GtkTreeModelSortClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class TreeModelSort_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** A wrapper which makes an underlying Gtk::TreeModel sortable.
+ * @ingroup TreeView
+ */
+
+class TreeModelSort : public Glib::Object, public TreeModel, public TreeSortable
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef TreeModelSort CppObjectType;
+ typedef TreeModelSort_Class CppClassType;
+ typedef GtkTreeModelSort BaseObjectType;
+ typedef GtkTreeModelSortClass BaseClassType;
+
+private: friend class TreeModelSort_Class;
+ static CppClassType treemodelsort_class_;
+
+private:
+ // noncopyable
+ TreeModelSort(const TreeModelSort&);
+ TreeModelSort& operator=(const TreeModelSort&);
+
+protected:
+ explicit TreeModelSort(const Glib::ConstructParams& construct_params);
+ explicit TreeModelSort(GtkTreeModelSort* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~TreeModelSort();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ GtkTreeModelSort* gobj() { return reinterpret_cast<GtkTreeModelSort*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const GtkTreeModelSort* gobj() const { return reinterpret_cast<GtkTreeModelSort*>(gobject_); }
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ GtkTreeModelSort* gobj_copy();
+
+private:
+
+
+protected:
+ explicit TreeModelSort(const Glib::RefPtr<TreeModel>& model);
+
+public:
+
+ static Glib::RefPtr<TreeModelSort> create(const Glib::RefPtr<TreeModel>& model);
+
+
+ /** Returns the model the Gtk::TreeModelSort is sorting.
+ * @return The "child model" being sorted.
+ */
+ Glib::RefPtr<TreeModel> get_model();
+
+ /** Returns the model the Gtk::TreeModelSort is sorting.
+ * @return The "child model" being sorted.
+ */
+ Glib::RefPtr<const TreeModel> get_model() const;
+
+
+ /** Converts @a child_path to a path relative to @a tree_model_sort . That is,
+ * @a child_path points to a path in the child model. The returned path will
+ * point to the same row in the sorted model. If @a child_path isn't a valid path
+ * on the child model, then <tt>0</tt> is returned.
+ * @param child_path A Gtk::TreePath to convert.
+ * @return A newly allocated Gtk::TreePath, or <tt>0</tt>.
+ */
+ Path convert_child_path_to_path(const Path& child_path) const;
+
+ /** Gets an iterator that points to the sorted row that corresponds to the child row pointed at by child_iter.
+ *
+ * @param child_iter A valid iterator pointing to a row on the child model.
+ * @result A valid iterator that points to the row in this sorted model.
+ */
+ iterator convert_child_iter_to_iter(const iterator& child_iter) const;
+
+
+ /** Converts @a sorted_path to a path on the child model of @a tree_model_sort . That
+ * is, @a sorted_path points to a location in @a tree_model_sort . The returned path
+ * will point to the same location in the model not being sorted. If @a sorted_path
+ * does not point to a location in the child model, <tt>0</tt> is returned.
+ * @param sorted_path A Gtk::TreePath to convert.
+ * @return A newly allocated Gtk::TreePath, or <tt>0</tt>.
+ */
+ Path convert_path_to_child_path(const Path& sorted_path) const;
+
+ /** Gets an iterator that points to the child row that corresponds to the sorted row pointed at by sorted_iter.
+ *
+ * @param sorted_iter A valid iterator pointing to a row on the sorted model.
+ * @result A valid iterator that points to the row in the child model.
+ */
+ iterator convert_iter_to_child_iter(const iterator& sorted_iter) const;
+
+
+ /** This resets the default sort function to be in the 'unsorted' state. That
+ * is, it is in the same order as the child model. It will re-sort the model
+ * to be in the same order as the child model only if the Gtk::TreeModelSort
+ * is in 'unsorted' state.
+ */
+ void reset_default_sort_func();
+
+ /** This function should almost never be called. It clears the @a tree_model_sort
+ * of any cached iterators that haven't been reffed with
+ * ref_node(). This might be useful if the child model being
+ * sorted is static (and doesn't change often) and there has been a lot of
+ * unreffed access to nodes. As a side effect of this function, all unreffed
+ * iters will be invalid.
+ */
+ void clear_cache();
+
+
+ /** WARNING: This function is slow. Only use it for debugging and/or testing
+ * purposes.
+ *
+ * Checks if the given iter is a valid iter for this Gtk::TreeModelSort.
+ * @param iter A Gtk::TreeIter.
+ * @return <tt>true</tt> if the iter is valid, <tt>false</tt> if the iter is invalid.
+ *
+ * Since: 2.2.
+ */
+ bool iter_is_valid(const iterator& iter) const;
+
+protected:
+ virtual void set_value_impl(const iterator& row, int column, const Glib::ValueBase& value);
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::TreeModelSort
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Gtk::TreeModelSort> wrap(GtkTreeModelSort* object, bool take_copy = false);
+}
+
+
+#endif /* _GTKMM_TREEMODELSORT_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/treepath.cc b/libs/gtkmm2/gtk/gtkmm/treepath.cc
new file mode 100644
index 0000000000..a84164113a
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/treepath.cc
@@ -0,0 +1,319 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/treepath.h>
+#include <gtkmm/private/treepath_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/treemodel.h>
+#include <glibmm/utility.h>
+#include <gtk/gtktreemodel.h>
+#include <gtk/gtktreednd.h>
+
+
+namespace Gtk
+{
+
+TreePath::TreePath(TreePath::size_type n, TreePath::value_type value)
+:
+ gobject_ (gtk_tree_path_new())
+{
+ for(; n > 0; --n)
+ gtk_tree_path_append_index(gobject_, value);
+}
+
+TreePath::TreePath(const Glib::ustring& path)
+:
+ gobject_ (gtk_tree_path_new_from_string(path.c_str()))
+{}
+
+TreePath::TreePath(const TreeModel::iterator& iter)
+:
+ // The GtkTreePath* is always newly created.
+ gobject_ (gtk_tree_model_get_path(iter.get_model_gobject(), const_cast<GtkTreeIter*>(iter.gobj())))
+{}
+
+TreePath& TreePath::operator=(const TreeModel::iterator& iter)
+{
+ TreePath temp (iter);
+ swap(temp);
+ return *this;
+}
+
+void TreePath::clear()
+{
+ TreePath empty_path;
+ swap(empty_path);
+}
+
+TreePath::size_type TreePath::size() const
+{
+ return gtk_tree_path_get_depth(gobject_);
+}
+
+bool TreePath::empty() const
+{
+ return (gtk_tree_path_get_depth(gobject_) == 0);
+}
+
+TreePath::reference TreePath::operator[](TreePath::size_type i)
+{
+ int *const indices = gtk_tree_path_get_indices(gobject_);
+ return indices[i];
+}
+
+TreePath::const_reference TreePath::operator[](TreePath::size_type i) const
+{
+ const int *const indices = gtk_tree_path_get_indices(gobject_);
+ return indices[i];
+}
+
+TreePath::iterator TreePath::begin()
+{
+ return gtk_tree_path_get_indices(gobject_);
+}
+
+TreePath::iterator TreePath::end()
+{
+ return gtk_tree_path_get_indices(gobject_) + gtk_tree_path_get_depth(gobject_);
+}
+
+TreePath::const_iterator TreePath::begin() const
+{
+ return gtk_tree_path_get_indices(gobject_);
+}
+
+TreePath::const_iterator TreePath::end() const
+{
+ return gtk_tree_path_get_indices(gobject_) + gtk_tree_path_get_depth(gobject_);
+}
+
+bool TreePath::get_from_selection_data(const SelectionData& selection_data, Glib::RefPtr<TreeModel>& model, TreePath& path) //static
+{
+ GtkTreeModel* src_model = 0;
+ GtkTreePath* src_path = 0;
+ gboolean result = gtk_tree_get_row_drag_data(const_cast<GtkSelectionData*>(selection_data.gobj()), &src_model, &src_path);
+
+ model = Glib::wrap(src_model, true /* take_copy=true */);
+
+ //gtk_tree_get_row_drag_data gives us ownership of src_path.
+ path = Glib::wrap(src_path, false /* take_copy=false */);
+
+ return result;
+}
+
+bool TreePath::get_from_selection_data(const SelectionData& selection_data, TreePath& path) //static
+{
+ GtkTreePath* src_path = 0;
+ gboolean result = gtk_tree_get_row_drag_data(const_cast<GtkSelectionData*>(selection_data.gobj()), 0, &src_path);
+
+ //gtk_tree_get_row_drag_data gives us ownership of src_path.
+ path = Glib::wrap(src_path, false /* take_copy=false */);
+
+ return result;
+}
+
+
+bool TreePath::set_in_selection_data(SelectionData& selection_data, const Glib::RefPtr<const TreeModel>& model) const
+{
+ return gtk_tree_set_row_drag_data(selection_data.gobj(), const_cast<GtkTreeModel*>(model->gobj()), const_cast<GtkTreePath*>(gobj()));
+}
+
+//deprecated:
+Glib::ArrayHandle<int> TreePath::get_indices() const
+{
+ // gtk_tree_path_get_indices() returns a pointer to an internal array,
+ // similar to std::string::data(). Thus the OWNERSHIP_NONE flag.
+
+ return Glib::ArrayHandle<int>(gtk_tree_path_get_indices(gobject_),
+ gtk_tree_path_get_depth(gobject_),
+ Glib::OWNERSHIP_NONE);
+}
+
+} // namespace Gtk
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::TreePath wrap(GtkTreePath* object, bool take_copy)
+{
+ return Gtk::TreePath(object, take_copy);
+}
+
+} // namespace Glib
+
+
+namespace Gtk
+{
+
+
+// static
+GType TreePath::get_type()
+{
+ return gtk_tree_path_get_type();
+}
+
+TreePath::TreePath()
+:
+ gobject_ (gtk_tree_path_new())
+{}
+
+TreePath::TreePath(const TreePath& other)
+:
+ gobject_ ((other.gobject_) ? gtk_tree_path_copy(other.gobject_) : 0)
+{}
+
+TreePath::TreePath(GtkTreePath* gobject, bool make_a_copy)
+:
+ // For BoxedType wrappers, make_a_copy is true by default. The static
+ // BoxedType wrappers must always take a copy, thus make_a_copy = true
+ // ensures identical behaviour if the default argument is used.
+ gobject_ ((make_a_copy && gobject) ? gtk_tree_path_copy(gobject) : gobject)
+{}
+
+TreePath& TreePath::operator=(const TreePath& other)
+{
+ TreePath temp (other);
+ swap(temp);
+ return *this;
+}
+
+TreePath::~TreePath()
+{
+ if(gobject_)
+ gtk_tree_path_free(gobject_);
+}
+
+void TreePath::swap(TreePath& other)
+{
+ GtkTreePath *const temp = gobject_;
+ gobject_ = other.gobject_;
+ other.gobject_ = temp;
+}
+
+GtkTreePath* TreePath::gobj_copy() const
+{
+ return gtk_tree_path_copy(gobject_);
+}
+
+
+void TreePath::push_back(int index)
+{
+ gtk_tree_path_append_index(gobj(), index);
+}
+
+void TreePath::push_front(int index)
+{
+ gtk_tree_path_prepend_index(gobj(), index);
+}
+
+void TreePath::next()
+{
+ gtk_tree_path_next(gobj());
+}
+
+bool TreePath::prev()
+{
+ return gtk_tree_path_prev(gobj());
+}
+
+bool TreePath::up()
+{
+ return gtk_tree_path_up(gobj());
+}
+
+void TreePath::down()
+{
+ gtk_tree_path_down(gobj());
+}
+
+bool TreePath::is_ancestor(const TreePath& descendant) const
+{
+ return gtk_tree_path_is_ancestor(const_cast<GtkTreePath*>(gobj()), const_cast<GtkTreePath*>((descendant).gobj()));
+}
+
+bool TreePath::is_descendant(const TreePath& ancestor) const
+{
+ return gtk_tree_path_is_descendant(const_cast<GtkTreePath*>(gobj()), const_cast<GtkTreePath*>((ancestor).gobj()));
+}
+
+Glib::ustring TreePath::to_string() const
+{
+ return Glib::convert_return_gchar_ptr_to_ustring(gtk_tree_path_to_string(const_cast<GtkTreePath*>(gobj())));
+}
+
+
+bool operator==(const TreePath& lhs, const TreePath& rhs)
+{
+ return (gtk_tree_path_compare(lhs.gobj(), rhs.gobj()) == 0);
+}
+
+bool operator!=(const TreePath& lhs, const TreePath& rhs)
+{
+ return (gtk_tree_path_compare(lhs.gobj(), rhs.gobj()) != 0);
+}
+
+bool operator<(const TreePath& lhs, const TreePath& rhs)
+{
+ return (gtk_tree_path_compare(lhs.gobj(), rhs.gobj()) < 0);
+}
+
+bool operator>(const TreePath& lhs, const TreePath& rhs)
+{
+ return (gtk_tree_path_compare(lhs.gobj(), rhs.gobj()) > 0);
+}
+
+bool operator<=(const TreePath& lhs, const TreePath& rhs)
+{
+ return (gtk_tree_path_compare(lhs.gobj(), rhs.gobj()) <= 0);
+}
+
+bool operator>=(const TreePath& lhs, const TreePath& rhs)
+{
+ return (gtk_tree_path_compare(lhs.gobj(), rhs.gobj()) >= 0);
+}
+
+
+void TreePath::append_index(int index)
+{
+ gtk_tree_path_append_index(gobj(), index);
+}
+
+void TreePath::prepend_index(int index)
+{
+ gtk_tree_path_prepend_index(gobj(), index);
+}
+
+int TreePath::get_depth() const
+{
+ return gtk_tree_path_get_depth(const_cast<GtkTreePath*>(gobj()));
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/treepath.h b/libs/gtkmm2/gtk/gtkmm/treepath.h
new file mode 100644
index 0000000000..8e41e81284
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/treepath.h
@@ -0,0 +1,402 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TREEPATH_H
+#define _GTKMM_TREEPATH_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright(C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software, ) you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation, ) either
+ * version 2 of the License, or(at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY, ) without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library, ) if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#include <gtkmm/treemodel.h>
+#include <gtkmm/selectiondata.h>
+#include <gtkmmconfig.h>
+
+GLIBMM_USING_STD(random_access_iterator_tag)
+GLIBMM_USING_STD(reverse_iterator)
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C" { typedef struct _GtkTreePath GtkTreePath; }
+#endif
+
+namespace Gtk
+{
+
+/** A path is essentially a potential node. It is a location on a model that may
+ * or may not actually correspond to a node on a specific model.
+ *
+ * A Path can be converted into either an array of unsigned integers or a string. The string
+ * form is a list of numbers separated by a colon. Each number refers to the
+ * offset at that level. Thus, the path "0" refers to the root node and the
+ * path "2:4" refers to the fifth child of the third node.
+ *
+ * Typedefed as Gtk::TreeModel::Path.
+ * @ingroup TreeView
+ */
+class TreePath
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef TreePath CppObjectType;
+ typedef GtkTreePath BaseObjectType;
+
+ static GType get_type() G_GNUC_CONST;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ TreePath();
+
+ explicit TreePath(GtkTreePath* gobject, bool make_a_copy = true);
+
+ TreePath(const TreePath& other);
+ TreePath& operator=(const TreePath& other);
+
+ ~TreePath();
+
+ void swap(TreePath& other);
+
+ ///Provides access to the underlying C instance.
+ GtkTreePath* gobj() { return gobject_; }
+
+ ///Provides access to the underlying C instance.
+ const GtkTreePath* gobj() const { return gobject_; }
+
+ ///Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs.
+ GtkTreePath* gobj_copy() const;
+
+protected:
+ GtkTreePath* gobject_;
+
+private:
+
+
+public:
+ typedef unsigned int size_type;
+ typedef int difference_type;
+
+ typedef int value_type;
+ typedef int& reference;
+ typedef const int& const_reference;
+
+ // Use plain pointers for simplicity.
+ typedef int* iterator;
+ typedef const int* const_iterator;
+
+#ifndef GLIBMM_HAVE_SUN_REVERSE_ITERATOR
+
+ typedef std::reverse_iterator<iterator> reverse_iterator;
+ typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
+
+#else
+
+ typedef std::reverse_iterator<iterator, std::random_access_iterator_tag,
+ int, int&, int*, ptrdiff_t> reverse_iterator;
+
+ typedef std::reverse_iterator<const_iterator, std::random_access_iterator_tag,
+ int, const int&, const int*, ptrdiff_t> const_reverse_iterator;
+
+#endif /* GLIBMM_HAVE_SUN_REVERSE_ITERATOR */
+
+ explicit TreePath(size_type n, value_type value = 0);
+ explicit TreePath(const Glib::ustring& path);
+ explicit TreePath(const TreeModel::iterator& iter);
+
+ template <class In> inline TreePath(In pbegin, In pend);
+
+ void clear();
+
+ // I think it's OK for this assignment to be implicit. It's very useful.
+ TreePath& operator=(const TreeModel::iterator& iter);
+
+ template <class In> inline void assign(In pbegin, In pend);
+ template <class In> void append(In pbegin, In pend);
+
+
+ /** Appends a new index to a path. As a result, the depth of the path is
+ * increased.
+ * @param index The index.
+ */
+ void push_back(int index);
+
+ /** Prepends a new index to a path. As a result, the depth of the path is
+ * increased.
+ * @param index The index.
+ */
+ void push_front(int index);
+
+ size_type size() const;
+ bool empty() const;
+
+ reference operator[](size_type i);
+ const_reference operator[](size_type i) const;
+
+ iterator begin();
+ iterator end();
+ const_iterator begin() const;
+ const_iterator end() const;
+
+ // Note: there is no advantage in not inlining these methods.
+ // We can't change them without breaking ABI anyway.
+ reverse_iterator rbegin() { return reverse_iterator(end()); }
+ reverse_iterator rend() { return reverse_iterator(begin()); }
+ const_reverse_iterator rbegin() const { return const_reverse_iterator(end()); }
+ const_reverse_iterator rend() const { return const_reverse_iterator(begin()); }
+
+ reference front() { return *begin(); }
+ const_reference front() const { return *begin(); }
+ reference back() { return *rbegin(); }
+ const_reference back() const { return *rbegin(); }
+
+
+ /** Moves the @a path to point to the next node at the current depth.
+ */
+ void next();
+
+ /** Moves the @a path to point to the previous node at the current depth, if it exists.
+ * @return <tt>true</tt> if @a path has a previous node, and the move was made.
+ */
+ bool prev();
+
+ /** Moves the @a path to point to its parent node, if it has a parent.
+ * @return <tt>true</tt> if @a path has a parent, and the move was made.
+ */
+ bool up();
+
+ /** Moves @a path to point to the first child of the current path.
+ */
+ void down();
+
+
+ /** Returns <tt>true</tt> if @a descendant is a descendant of @a path .
+ * @param descendant Another Gtk::TreePath.
+ * @return <tt>true</tt> if @a descendant is contained inside @a path .
+ */
+ bool is_ancestor(const TreePath& descendant) const;
+
+ /** Returns <tt>true</tt> if @a path is a descendant of @a ancestor .
+ * @param ancestor Another Gtk::TreePath.
+ * @return <tt>true</tt> if @a ancestor contains @a path somewhere below it.
+ */
+ bool is_descendant(const TreePath& ancestor) const;
+
+
+ /** Generates a string representation of the path. This string is a ':'
+ * separated list of numbers. For example, "4:10:0:3" would be an acceptable return value for this string.
+ * @return The string.
+ */
+ Glib::ustring to_string() const;
+
+
+#ifndef GTKMM_DISABLE_DEPRECATED
+ /// @deprecated replaced by push_back():
+
+ /** Appends a new index to a path. As a result, the depth of the path is
+ * increased.
+ * @param index The index.
+ */
+ void append_index(int index);
+ /// @deprecated replaced by push_front():
+
+ /** Prepends a new index to a path. As a result, the depth of the path is
+ * increased.
+ * @param index The index.
+ */
+ void prepend_index(int index);
+ /// @deprecated replaced by size():
+
+ /** Returns the current depth of @a path .
+ * @return The depth of @a path .
+ */
+ int get_depth() const;
+
+ /// @deprecated replaced by begin(), end(), and operator[]
+ Glib::ArrayHandle<int> get_indices() const;
+#endif
+
+
+ /**
+ * Obtains a Gtk::TreeModel and Gtk::TreeModel::Path from selection data of target type
+ * "GTK_TREE_MODEL_ROW". Normally called from a drag_data_received handler.
+ * This function can only be used if @a selection_data originates from the same
+ * process that's calling this function, because a pointer to the tree model
+ * is being passed around. If you aren't in the same process, then you'll
+ * get memory corruption. In the Gtk::TreeDragDest drag_data_received signal handler,
+ * you can assume that selection data of type "GTK_TREE_MODEL_ROW" is
+ * from the current process.
+ *
+ * @param selection_data a #SelectionData
+ * @param model a Gtk::TreeModel
+ * @param path a row in model
+ *
+ * @return true if the selection_data had target type "GTK_TREE_MODEL_ROW" and
+ * is otherwise valid
+ **/
+ static bool get_from_selection_data(const SelectionData& selection_data, Glib::RefPtr<TreeModel>& model, TreePath& path);
+ //TODO: Add an override that takes a const TreeModel (and deprecate the current version).
+
+ /// See description in the other overload.
+ static bool get_from_selection_data(const SelectionData& selection_data, TreePath& path);
+
+ /**
+ * Sets selection data of target type "GTK_TREE_MODEL_ROW". Normally used
+ * in a drag_data_get signal handler.
+ *
+ * @param selection_data some #SelectionData
+ * @param model: a Gtk::TreeModel
+ *
+ * @return true if the selection_data had the proper target type to allow us to set a tree row
+ **/
+ bool set_in_selection_data(SelectionData& selection_data, const Glib::RefPtr<const TreeModel>& model) const;
+
+
+};
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+template <class In>
+void TreePath::append(In pbegin, In pend)
+{
+ // push_back() can't throw -- if it could, this code wouldn't be strongly exception-safe.
+ for(; pbegin != pend; ++pbegin)
+ this->push_back(*pbegin);
+}
+
+template <class In> inline
+TreePath::TreePath(In pbegin, In pend)
+{
+ this->append(pbegin, pend);
+}
+
+template <class In> inline
+void TreePath::assign(In pbegin, In pend)
+{
+ TreePath temp (pbegin, pend);
+ this->swap(temp);
+}
+
+
+/* Traits for use of TreePath in a Glib::ListHandle<>.
+ */
+struct TreePath_Traits
+{
+ typedef TreePath CppType;
+ typedef const GtkTreePath* CType;
+ typedef GtkTreePath* CTypeNonConst;
+
+ static CType to_c_type(const CppType& item)
+ { return item.gobj(); }
+
+ static CType to_c_type(CType item)
+ { return item; }
+
+ static CppType to_cpp_type(CType item)
+ { return CppType(const_cast<CTypeNonConst>(item)); }
+
+ static void release_c_type(CType item)
+ { gtk_tree_path_free(const_cast<CTypeNonConst>(item)); }
+};
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+} // namespace Gtk
+
+
+namespace Gtk
+{
+
+/** @relates Gtk::TreePath
+ * @param lhs The left-hand side
+ * @param rhs The right-hand side
+ * @result The result
+ */
+bool operator==(const TreePath& lhs, const TreePath& rhs);
+
+/** @relates Gtk::TreePath
+ * @param lhs The left-hand side
+ * @param rhs The right-hand side
+ * @result The result
+ */
+bool operator!=(const TreePath& lhs, const TreePath& rhs);
+
+/** @relates Gtk::TreePath
+ * @param lhs The left-hand side
+ * @param rhs The right-hand side
+ * @result The result
+ */
+bool operator<(const TreePath& lhs, const TreePath& rhs);
+
+/** @relates Gtk::TreePath
+ * @param lhs The left-hand side
+ * @param rhs The right-hand side
+ * @result The result
+ */
+bool operator>(const TreePath& lhs, const TreePath& rhs);
+
+/** @relates Gtk::TreePath
+ * @param lhs The left-hand side
+ * @param rhs The right-hand side
+ * @result The result
+ */
+bool operator<=(const TreePath& lhs, const TreePath& rhs);
+
+/** @relates Gtk::TreePath
+ * @param lhs The left-hand side
+ * @param rhs The right-hand side
+ * @result The result
+ */
+bool operator>=(const TreePath& lhs, const TreePath& rhs);
+
+
+} // namespace Gtk
+
+
+namespace Gtk
+{
+
+/** @relates Gtk::TreePath
+ * @param lhs The left-hand side
+ * @param rhs The right-hand side
+ */
+inline void swap(TreePath& lhs, TreePath& rhs)
+ { lhs.swap(rhs); }
+
+} // namespace Gtk
+
+namespace Glib
+{
+
+/** @relates Gtk::TreePath
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+Gtk::TreePath wrap(GtkTreePath* object, bool take_copy = false);
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+template <>
+class Value<Gtk::TreePath> : public Glib::Value_Boxed<Gtk::TreePath>
+{};
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+} // namespace Glib
+
+#endif /* _GTKMM_TREEPATH_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/treerowreference.cc b/libs/gtkmm2/gtk/gtkmm/treerowreference.cc
new file mode 100644
index 0000000000..591323f942
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/treerowreference.cc
@@ -0,0 +1,128 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/treerowreference.h>
+#include <gtkmm/private/treerowreference_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtktreemodel.h>
+
+
+namespace Gtk
+{
+
+TreeRowReference::TreeRowReference(const Glib::RefPtr<TreeModel>& model, const TreeModel::Path& path)
+:
+ gobject_ ( gtk_tree_row_reference_new(model->gobj(), const_cast<GtkTreePath*>(path.gobj())) )
+{}
+
+TreeRowReference::operator bool() const
+{
+ return is_valid();
+}
+
+} // namespace Gtk
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::TreeRowReference wrap(GtkTreeRowReference* object, bool take_copy)
+{
+ return Gtk::TreeRowReference(object, take_copy);
+}
+
+} // namespace Glib
+
+
+namespace Gtk
+{
+
+
+// static
+GType TreeRowReference::get_type()
+{
+ return gtk_tree_row_reference_get_type();
+}
+
+TreeRowReference::TreeRowReference()
+:
+ gobject_ (0) // Allows creation of invalid wrapper, e.g. for output arguments to methods.
+{}
+
+TreeRowReference::TreeRowReference(const TreeRowReference& other)
+:
+ gobject_ ((other.gobject_) ? gtk_tree_row_reference_copy(other.gobject_) : 0)
+{}
+
+TreeRowReference::TreeRowReference(GtkTreeRowReference* gobject, bool make_a_copy)
+:
+ // For BoxedType wrappers, make_a_copy is true by default. The static
+ // BoxedType wrappers must always take a copy, thus make_a_copy = true
+ // ensures identical behaviour if the default argument is used.
+ gobject_ ((make_a_copy && gobject) ? gtk_tree_row_reference_copy(gobject) : gobject)
+{}
+
+TreeRowReference& TreeRowReference::operator=(const TreeRowReference& other)
+{
+ TreeRowReference temp (other);
+ swap(temp);
+ return *this;
+}
+
+TreeRowReference::~TreeRowReference()
+{
+ if(gobject_)
+ gtk_tree_row_reference_free(gobject_);
+}
+
+void TreeRowReference::swap(TreeRowReference& other)
+{
+ GtkTreeRowReference *const temp = gobject_;
+ gobject_ = other.gobject_;
+ other.gobject_ = temp;
+}
+
+GtkTreeRowReference* TreeRowReference::gobj_copy() const
+{
+ return gtk_tree_row_reference_copy(gobject_);
+}
+
+
+TreeModel::Path TreeRowReference::get_path() const
+{
+ return Gtk::TreePath(gtk_tree_row_reference_get_path(const_cast<GtkTreeRowReference*>(gobj())), false);
+}
+
+bool TreeRowReference::is_valid() const
+{
+ return gtk_tree_row_reference_valid(const_cast<GtkTreeRowReference*>(gobj()));
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/treerowreference.h b/libs/gtkmm2/gtk/gtkmm/treerowreference.h
new file mode 100644
index 0000000000..034981d478
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/treerowreference.h
@@ -0,0 +1,138 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TREEROWREFERENCE_H
+#define _GTKMM_TREEROWREFERENCE_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#include <gtkmm/treemodel.h>
+#include <gtkmm/treepath.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C" { typedef struct _GtkTreeRowReference GtkTreeRowReference; }
+#endif
+
+namespace Gtk
+{
+
+/** Typedefed as Gtk::TreeModel::RowReference.
+ * This reference will keep pointing to
+ * the node pointed to by the Path, so long as it exists. It listens to all
+ * signals emitted by the Model, and updates its Path appropriately.
+ * @ingroup TreeView
+*/
+class TreeRowReference
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef TreeRowReference CppObjectType;
+ typedef GtkTreeRowReference BaseObjectType;
+
+ static GType get_type() G_GNUC_CONST;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ TreeRowReference();
+
+ explicit TreeRowReference(GtkTreeRowReference* gobject, bool make_a_copy = true);
+
+ TreeRowReference(const TreeRowReference& other);
+ TreeRowReference& operator=(const TreeRowReference& other);
+
+ ~TreeRowReference();
+
+ void swap(TreeRowReference& other);
+
+ ///Provides access to the underlying C instance.
+ GtkTreeRowReference* gobj() { return gobject_; }
+
+ ///Provides access to the underlying C instance.
+ const GtkTreeRowReference* gobj() const { return gobject_; }
+
+ ///Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs.
+ GtkTreeRowReference* gobj_copy() const;
+
+protected:
+ GtkTreeRowReference* gobject_;
+
+private:
+
+
+public:
+ TreeRowReference(const Glib::RefPtr<TreeModel>& model, const TreeModel::Path& path);
+
+ ///The same as is_valid().
+ operator bool() const;
+
+
+ /** Returns a path that the row reference currently points to, or <tt>0</tt> if the
+ * path pointed to is no longer valid.
+ * @return A current path, or <tt>0</tt>.
+ */
+ TreeModel::Path get_path() const;
+
+
+ /** Returns <tt>true</tt> if the %reference is non-<tt>0</tt> and refers to a current valid
+ * path.
+ * @return <tt>true</tt> if %reference points to a valid path.
+ */
+ bool is_valid() const;
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Gtk
+{
+
+/** @relates Gtk::TreeRowReference
+ * @param lhs The left-hand side
+ * @param rhs The right-hand side
+ */
+inline void swap(TreeRowReference& lhs, TreeRowReference& rhs)
+ { lhs.swap(rhs); }
+
+} // namespace Gtk
+
+namespace Glib
+{
+
+/** @relates Gtk::TreeRowReference
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+Gtk::TreeRowReference wrap(GtkTreeRowReference* object, bool take_copy = false);
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+template <>
+class Value<Gtk::TreeRowReference> : public Glib::Value_Boxed<Gtk::TreeRowReference>
+{};
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+} // namespace Glib
+
+#endif /* _GTKMM_TREEROWREFERENCE_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/treeselection.cc b/libs/gtkmm2/gtk/gtkmm/treeselection.cc
new file mode 100644
index 0000000000..6a6ffffdcc
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/treeselection.cc
@@ -0,0 +1,454 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/treeselection.h>
+#include <gtkmm/private/treeselection_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/treeview.h>
+#include <gtk/gtktreeselection.h>
+
+
+namespace
+{
+
+void proxy_foreach_selection_iter_callback(GtkTreeModel* model, GtkTreePath*, GtkTreeIter* iter, void* data)
+{
+ typedef Gtk::TreeSelection::SlotForeachIter SlotType;
+ SlotType& slot = *static_cast<SlotType*>(data);
+
+ try
+ {
+ slot(Gtk::TreeModel::iterator(model, iter));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+}
+
+void proxy_foreach_selection_path_callback(GtkTreeModel*, GtkTreePath* path, GtkTreeIter*, void* data)
+{
+ typedef Gtk::TreeSelection::SlotForeachPath SlotType;
+ SlotType& slot = *static_cast<SlotType*>(data);
+
+ try
+ {
+ slot(Gtk::TreeModel::Path(path, true));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+}
+
+void proxy_foreach_selection_path_and_iter_callback(GtkTreeModel* model, GtkTreePath* path,
+ GtkTreeIter* iter, void* data)
+{
+ typedef Gtk::TreeSelection::SlotForeachPathAndIter SlotType;
+ SlotType& slot = *static_cast<SlotType*>(data);
+
+ try
+ {
+ slot(Gtk::TreeModel::Path(path, true), Gtk::TreeModel::iterator(model, iter));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+}
+
+
+// This Signal Proxy allows the C++ coder to specify
+// a sigc::slot instead of a static function.
+class SignalProxy_Select
+{
+public:
+ typedef Gtk::TreeSelection::SlotSelect SlotType;
+
+ SignalProxy_Select(const SlotType& slot) : slot_(slot) {}
+ ~SignalProxy_Select();
+
+ static gboolean gtk_callback(GtkTreeSelection*, GtkTreeModel* model, GtkTreePath* path,
+ gboolean path_currently_selected, void* data);
+
+ static void gtk_callback_destroy(void* data);
+
+private:
+ SlotType slot_;
+};
+
+SignalProxy_Select::~SignalProxy_Select()
+{}
+
+gboolean SignalProxy_Select::gtk_callback(GtkTreeSelection*, GtkTreeModel* model, GtkTreePath* path,
+ gboolean path_currently_selected, void* data)
+{
+ SignalProxy_Select *const self = static_cast<SignalProxy_Select*>(data);
+
+ try
+ {
+ return (self->slot_)(Glib::wrap(model, true), // take copy
+ Gtk::TreePath(path, true), // take copy
+ path_currently_selected);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+
+ return 0;
+}
+
+void SignalProxy_Select::gtk_callback_destroy(void* data)
+{
+ delete static_cast<SignalProxy_Select*>(data);
+}
+
+} // anonymous namespace
+
+
+namespace Gtk
+{
+
+void TreeSelection::set_select_function(const SlotSelect& slot)
+{
+ // Create a signal proxy. A pointer to this will be passed
+ // through the callback's data parameter. It will be deleted
+ // when SignalProxy_Select::gtk_callback_destroy() is called.
+ SignalProxy_Select *const pSignalProxy = new SignalProxy_Select(slot);
+
+ gtk_tree_selection_set_select_function(gobj(),
+ &SignalProxy_Select::gtk_callback, pSignalProxy,
+ &SignalProxy_Select::gtk_callback_destroy);
+}
+
+Glib::RefPtr<TreeModel> TreeSelection::get_model()
+{
+ GtkTreeView *const tree_view = gtk_tree_selection_get_tree_view(gobj());
+ return Glib::wrap(gtk_tree_view_get_model(tree_view), true);
+}
+
+Glib::RefPtr<const TreeModel> TreeSelection::get_model() const
+{
+ GtkTreeView *const tree_view = gtk_tree_selection_get_tree_view(const_cast<GtkTreeSelection*>(gobj()));
+ return Glib::wrap(gtk_tree_view_get_model(tree_view), true);
+}
+
+TreeModel::iterator TreeSelection::get_selected()
+{
+ TreeModel::iterator iter;
+ GtkTreeModel* model_gobject = 0;
+
+ gtk_tree_selection_get_selected(gobj(), &model_gobject, iter.gobj());
+
+ iter.set_model_gobject(model_gobject);
+ return iter;
+}
+
+TreeModel::iterator TreeSelection::get_selected(Glib::RefPtr<TreeModel>& model)
+{
+ TreeModel::iterator iter;
+ GtkTreeModel* model_gobject = 0;
+
+ gtk_tree_selection_get_selected(gobj(), &model_gobject, iter.gobj());
+
+ model = Glib::wrap(model_gobject, true);
+
+ iter.set_model_refptr(model);
+ return iter;
+}
+
+void TreeSelection::selected_foreach_iter(const SlotForeachIter& slot) const
+{
+ SlotForeachIter slot_copy (slot);
+ gtk_tree_selection_selected_foreach(const_cast<GtkTreeSelection*>(gobj()), &proxy_foreach_selection_iter_callback, &slot_copy);
+}
+
+void TreeSelection::selected_foreach_path(const SlotForeachPath& slot) const
+{
+ SlotForeachPath slot_copy (slot);
+ gtk_tree_selection_selected_foreach(const_cast<GtkTreeSelection*>(gobj()), &proxy_foreach_selection_path_callback, &slot_copy);
+}
+
+void TreeSelection::selected_foreach(const SlotForeachPathAndIter& slot) const
+{
+ SlotForeachPathAndIter slot_copy (slot);
+ gtk_tree_selection_selected_foreach(const_cast<GtkTreeSelection*>(gobj()), &proxy_foreach_selection_path_and_iter_callback, &slot_copy);
+}
+
+TreeSelection::ListHandle_Path TreeSelection::get_selected_rows() const
+{
+ return ListHandle_Path(gtk_tree_selection_get_selected_rows(
+ const_cast<GtkTreeSelection*>(gobj()), 0), Glib::OWNERSHIP_DEEP);
+}
+
+TreeSelection::ListHandle_Path TreeSelection::get_selected_rows(Glib::RefPtr<TreeModel>& model)
+{
+ GtkTreeModel* model_gobject = 0;
+
+ const ListHandle_Path result (gtk_tree_selection_get_selected_rows(
+ const_cast<GtkTreeSelection*>(gobj()), &model_gobject), Glib::OWNERSHIP_DEEP);
+
+ model = Glib::wrap(model_gobject, true);
+ return result;
+}
+
+} // namespace Gtk
+
+
+namespace
+{
+
+const Glib::SignalProxyInfo TreeSelection_signal_changed_info =
+{
+ "changed",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Gtk::TreeSelection> wrap(GtkTreeSelection* object, bool take_copy)
+{
+ return Glib::RefPtr<Gtk::TreeSelection>( dynamic_cast<Gtk::TreeSelection*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} /* namespace Glib */
+
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& TreeSelection_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &TreeSelection_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_tree_selection_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void TreeSelection_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->changed = &changed_callback;
+}
+
+
+void TreeSelection_Class::changed_callback(GtkTreeSelection* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_changed();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->changed)
+ (*base->changed)(self);
+ }
+}
+
+
+Glib::ObjectBase* TreeSelection_Class::wrap_new(GObject* object)
+{
+ return new TreeSelection((GtkTreeSelection*)object);
+}
+
+
+/* The implementation: */
+
+GtkTreeSelection* TreeSelection::gobj_copy()
+{
+ reference();
+ return gobj();
+}
+
+TreeSelection::TreeSelection(const Glib::ConstructParams& construct_params)
+:
+ Glib::Object(construct_params)
+{}
+
+TreeSelection::TreeSelection(GtkTreeSelection* castitem)
+:
+ Glib::Object((GObject*)(castitem))
+{}
+
+TreeSelection::~TreeSelection()
+{}
+
+
+TreeSelection::CppClassType TreeSelection::treeselection_class_; // initialize static member
+
+GType TreeSelection::get_type()
+{
+ return treeselection_class_.init().get_type();
+}
+
+GType TreeSelection::get_base_type()
+{
+ return gtk_tree_selection_get_type();
+}
+
+
+void TreeSelection::set_mode(SelectionMode type)
+{
+ gtk_tree_selection_set_mode(gobj(), ((GtkSelectionMode)(type)));
+}
+
+SelectionMode TreeSelection::get_mode() const
+{
+ return ((SelectionMode)(gtk_tree_selection_get_mode(const_cast<GtkTreeSelection*>(gobj()))));
+}
+
+TreeView* TreeSelection::get_tree_view()
+{
+ return Glib::wrap(gtk_tree_selection_get_tree_view(gobj()));
+}
+
+const TreeView* TreeSelection::get_tree_view() const
+{
+ return Glib::wrap(gtk_tree_selection_get_tree_view(const_cast<GtkTreeSelection*>(gobj())));
+}
+
+int TreeSelection::count_selected_rows() const
+{
+ return gtk_tree_selection_count_selected_rows(const_cast<GtkTreeSelection*>(gobj()));
+}
+
+void TreeSelection::select(const TreeModel::Path& path)
+{
+ gtk_tree_selection_select_path(gobj(), const_cast<GtkTreePath*>((path).gobj()));
+}
+
+void TreeSelection::select(const TreeModel::iterator& iter)
+{
+ gtk_tree_selection_select_iter(gobj(), const_cast<GtkTreeIter*>((iter).gobj()));
+}
+
+void TreeSelection::select(const TreeModel::Row& row)
+{
+ gtk_tree_selection_select_iter(gobj(), const_cast<GtkTreeIter*>((row).gobj()));
+}
+
+void TreeSelection::select(const TreeModel::Path& start_path, const TreeModel::Path& end_path)
+{
+ gtk_tree_selection_select_range(gobj(), const_cast<GtkTreePath*>((start_path).gobj()), const_cast<GtkTreePath*>((end_path).gobj()));
+}
+
+void TreeSelection::unselect(const TreeModel::Path& path)
+{
+ gtk_tree_selection_unselect_path(gobj(), const_cast<GtkTreePath*>((path).gobj()));
+}
+
+void TreeSelection::unselect(const TreeModel::Path& start_path, const TreeModel::Path& end_path)
+{
+ gtk_tree_selection_unselect_range(gobj(), const_cast<GtkTreePath*>((start_path).gobj()), const_cast<GtkTreePath*>((end_path).gobj()));
+}
+
+void TreeSelection::unselect(const TreeModel::iterator& iter)
+{
+ gtk_tree_selection_unselect_iter(gobj(), const_cast<GtkTreeIter*>((iter).gobj()));
+}
+
+bool TreeSelection::is_selected(const TreeModel::Path& path) const
+{
+ return gtk_tree_selection_path_is_selected(const_cast<GtkTreeSelection*>(gobj()), const_cast<GtkTreePath*>((path).gobj()));
+}
+
+bool TreeSelection::is_selected(const TreeModel::iterator& iter) const
+{
+ return gtk_tree_selection_iter_is_selected(const_cast<GtkTreeSelection*>(gobj()), const_cast<GtkTreeIter*>((iter).gobj()));
+}
+
+void TreeSelection::select_all()
+{
+ gtk_tree_selection_select_all(gobj());
+}
+
+void TreeSelection::unselect_all()
+{
+ gtk_tree_selection_unselect_all(gobj());
+}
+
+
+Glib::SignalProxy0< void > TreeSelection::signal_changed()
+{
+ return Glib::SignalProxy0< void >(this, &TreeSelection_signal_changed_info);
+}
+
+
+void Gtk::TreeSelection::on_changed()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->changed)
+ (*base->changed)(gobj());
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/treeselection.h b/libs/gtkmm2/gtk/gtkmm/treeselection.h
new file mode 100644
index 0000000000..da3cac7285
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/treeselection.h
@@ -0,0 +1,370 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TREESELECTION_H
+#define _GTKMM_TREESELECTION_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright(C) 1998-1999 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or(at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#include <gtkmm/enums.h>
+#include <gtkmm/treemodel.h>
+#include <gtkmm/treeiter.h>
+#include <gtkmm/treepath.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkTreeSelection GtkTreeSelection;
+typedef struct _GtkTreeSelectionClass GtkTreeSelectionClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class TreeSelection_Class; } // namespace Gtk
+namespace Gtk
+{
+
+class TreeView;
+class TreeModel;
+class TreePath;
+
+/** Typedefed as Gtk::TreeView::Selection.
+ * This is a helper object to manage the selection for a Gtk::TreeView widget.
+ *
+ * It is automatically created when a new Gtk::TreeView widget is created, and
+ * cannot exist independently of this widget. The primary reason this class
+ * exists is for cleanliness of code and API. That is, there is no conceptual
+ * reason all these methods could not be methods on the Gtk::TreeView widget
+ * instead of a separate class.
+ *
+ * The Gtk::TreeSelection object can be obtained from a Gtk::TreeView by
+ * calling Gtk::TreeView::get_selection(). It can be manipulated to check the
+ * selection status of the tree, as well as to select and deselect individual
+ * rows. Selection is done completely view-side. As a result, multiple views
+ * of the same model can have completely different selections. Additionally,
+ * you cannot change the selection of a row on the model that is not currently
+ * displayed by the view without expanding its parents first.
+ *
+ * When monitoring the selection of a view, it's important to remember that the
+ * "changed" signal is mostly a hint. That is, it may only emit one signal when
+ * a range of rows is selected. Additionally, it may on occasion emit a
+ * "changed" signal when nothing has happened.
+ *
+ * @ingroup TreeView
+ */
+
+class TreeSelection : public Glib::Object
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef TreeSelection CppObjectType;
+ typedef TreeSelection_Class CppClassType;
+ typedef GtkTreeSelection BaseObjectType;
+ typedef GtkTreeSelectionClass BaseClassType;
+
+private: friend class TreeSelection_Class;
+ static CppClassType treeselection_class_;
+
+private:
+ // noncopyable
+ TreeSelection(const TreeSelection&);
+ TreeSelection& operator=(const TreeSelection&);
+
+protected:
+ explicit TreeSelection(const Glib::ConstructParams& construct_params);
+ explicit TreeSelection(GtkTreeSelection* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~TreeSelection();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ GtkTreeSelection* gobj() { return reinterpret_cast<GtkTreeSelection*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const GtkTreeSelection* gobj() const { return reinterpret_cast<GtkTreeSelection*>(gobject_); }
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ GtkTreeSelection* gobj_copy();
+
+private:
+
+
+protected:
+
+
+public:
+
+ /** Sets the selection mode of the @a selection . If the previous type was
+ * Gtk::SELECTION_MULTIPLE, then the anchor is kept selected, if it was
+ * previously selected.
+ * @param type The selection mode.
+ */
+ void set_mode(SelectionMode type);
+
+ /** Gets the selection mode for @a selection . See
+ * set_mode().
+ * @return The current selection mode.
+ */
+ SelectionMode get_mode() const;
+
+ /** For instance, bool on_select_function(const Glib::RefPtr<TreeModel>& model, const TreeModel::Path& path, bool path_currently_selected)
+ * The select function should return true if the state of the node may be toggled,
+ * and false if the state of the node should be left unchanged.
+ */
+ typedef sigc::slot<bool, const Glib::RefPtr<TreeModel>&, const TreeModel::Path&, bool> SlotSelect;
+
+ /** Sets the selection callback slot. If set, this function is called before any node is selected or unselected,
+ * giving some control over which nodes are selected.
+ *
+ * The select function should return true if the state of the node may be toggled, and FALSE if the state of the node
+ * should be left unchanged.
+ *
+ * @param slot The selection function.
+ */
+ void set_select_function(const SlotSelect& slot);
+
+ // This would be our SignalProxy_Select* data.
+
+
+ /** Returns the tree view associated with @a selection .
+ * @return A Gtk::TreeView.
+ */
+ TreeView* get_tree_view();
+
+ /** Returns the tree view associated with @a selection .
+ * @return A Gtk::TreeView.
+ */
+ const TreeView* get_tree_view() const;
+
+ /** Shortcut for get_tree_view()->get_model().
+ * @return The TreeModel associated with this TreeSelection.
+ */
+ Glib::RefPtr<TreeModel> get_model(); // convenience function, not in GTK+
+ Glib::RefPtr<const TreeModel> get_model() const; // convenience function, not in GTK+
+
+ //TODO: Add TreeModel::const_iterator get_selected() const, when we have a real const_iterator.
+
+ /** Get the currently selected row.
+ * @return The currently selected row.
+ * @note
+ * This method won't work if the selection mode is <tt>Gtk::SELECTION_MULTIPLE</tt>.
+ * Use get_selected_rows() for multiple selections.
+ */
+ TreeModel::iterator get_selected();
+
+ /** Get the currently selected row.
+ * @return The currently selected row. Or end() if no rows were selected.
+ * @retval model The current TreeModel.
+ * @note
+ * This method won't work if the selection mode is <tt>Gtk::SELECTION_MULTIPLE</tt>.
+ * Use get_selected_rows() for multiple selections.
+ */
+ TreeModel::iterator get_selected(Glib::RefPtr<TreeModel>& model);
+
+ typedef Glib::ListHandle<TreeModel::Path, TreePath_Traits> ListHandle_Path;
+
+ /** Creates a list of paths of all selected rows.
+ * Additionally, if you are planning on modifying the model after calling this function,
+ * you may want to convert the returned list into a list of GtkTreeRowReferences.
+ *
+ * @returns a standard container containing a Gtk::Model::Path for each selected row.
+ */
+ ListHandle_Path get_selected_rows() const;
+
+ /** Creates a list of paths of all selected rows.
+ * Additionally, if you are planning on modifying the model after calling this function,
+ * you may want to convert the returned list into a list of GtkTreeRowReferences.
+ *
+ * @retval model The current TreeModel.
+ * @returns a standard container containing a Gtk::Model::Path for each selected row.
+ */
+ ListHandle_Path get_selected_rows(Glib::RefPtr<TreeModel>& model);
+
+
+ /** Returns the number of rows that have been selected in @a tree .
+ * @return The number of rows selected.
+ *
+ * Since: 2.2.
+ */
+ int count_selected_rows() const;
+
+ //TODO: Consider deprecating these selected_foreach() methods, because get_selected_rows() should be enough.
+
+ //TODO: SlotForEachIter should take a const_iterator, when we have a real const iterator.
+ /** For example,
+ * void on_foreach(const Gtk::TreeModel::iterator& iter);
+ *
+ * Note that you cannot modify the tree or selection from within the callback function.
+ * As a result, get_selected_rows() might be more useful.
+ */
+ typedef sigc::slot<void, const TreeModel::iterator&> SlotForeachIter;
+
+ /** Calls a callback slot for each selected node.
+ * Note that you cannot modify the tree or selection from within the callback function.
+ * As a result, get_selected_rows() might be more useful.
+ *
+ * @param slot The function to call for each selected node.
+ */
+ void selected_foreach_iter(const SlotForeachIter& slot) const;
+
+ /** For example,
+ * void on_foreach(const Gtk::TreeModel::Path& path);
+ *
+ * Note that you cannot modify the tree or selection from within the callback function.
+ * As a result, get_selected_rows() might be more useful.
+ */
+ typedef sigc::slot<void, const TreeModel::Path&> SlotForeachPath;
+
+ /** Calls a callback slot for each selected node.
+ * Note that you cannot modify the tree or selection from within the callback function.
+ * As a result, get_selected_rows() might be more useful.
+ *
+ * @param slot The function to call for each selected node.
+ */
+ void selected_foreach_path(const SlotForeachPath& slot) const;
+
+
+ /** For example,
+ * void on_foreach(const Gtk::TreeModel::Path& path, const Gtk::TreeModel::iterator& iter);
+ *
+ * Note that you cannot modify the tree or selection from within the callback function.
+ * As a result, get_selected_rows() might be more useful.
+ */
+ typedef sigc::slot<void, const TreeModel::Path&, const TreeModel::iterator&> SlotForeachPathAndIter;
+
+ /** Calls a callback slot for each selected node.
+ * Note that you cannot modify the tree or selection from within the callback function.
+ * As a result, get_selected_rows() might be more useful.
+ *
+ * @param slot The function to call for each selected node.
+ */
+ void selected_foreach(const SlotForeachPathAndIter& slot) const;
+
+
+ /** Select the row at @a path .
+ * @param path The Gtk::TreePath to be selected.
+ */
+ void select(const TreeModel::Path& path);
+
+ /** Selects the specified iterator.
+ * @param iter The Gtk::TreeIter to be selected.
+ */
+ void select(const TreeModel::iterator& iter);
+
+ /** Selects the specified iterator.
+ * @param iter The Gtk::TreeIter to be selected.
+ */
+ void select(const TreeModel::Row& row);
+
+ /** Selects a range of nodes, determined by @a start_path and @a end_path inclusive.
+ * @a selection must be set to Gtk::SELECTION_MULTIPLE mode.
+ * @param start_path The initial node of the range.
+ * @param end_path The final node of the range.
+ */
+ void select(const TreeModel::Path& start_path, const TreeModel::Path& end_path);
+
+
+ /** Unselects the row at @a path .
+ * @param path The Gtk::TreePath to be unselected.
+ */
+ void unselect(const TreeModel::Path& path);
+
+ /** Unselects a range of nodes, determined by @a start_path and @a end_path
+ * inclusive.
+ *
+ * Since: 2.2
+ * @param start_path The initial node of the range.
+ * @param end_path The initial node of the range.
+ */
+ void unselect(const TreeModel::Path& start_path, const TreeModel::Path& end_path);
+
+ /** Unselects the specified iterator.
+ * @param iter The Gtk::TreeIter to be unselected.
+ */
+ void unselect(const TreeModel::iterator& iter);
+
+
+ /** Returns <tt>true</tt> if the row pointed to by @a path is currently selected. If @a path
+ * does not point to a valid location, <tt>false</tt> is returned
+ * @param path A Gtk::TreePath to check selection on.
+ * @return <tt>true</tt> if @a path is selected.
+ */
+ bool is_selected(const TreeModel::Path& path) const;
+
+ /** Returns <tt>true</tt> if the row at @a iter is currently selected.
+ * @param iter A valid Gtk::TreeIter.
+ * @return <tt>true</tt>, if @a iter is selected.
+ */
+ bool is_selected(const TreeModel::iterator& iter) const;
+
+
+ /** Selects all the nodes. @a selection must be set to Gtk::SELECTION_MULTIPLE
+ * mode.
+ */
+ void select_all();
+
+ /** Unselects all the nodes.
+ */
+ void unselect_all();
+
+
+ Glib::SignalProxy0< void > signal_changed();
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_changed();
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::TreeSelection
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Gtk::TreeSelection> wrap(GtkTreeSelection* object, bool take_copy = false);
+}
+
+
+#endif /* _GTKMM_TREESELECTION_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/treesortable.cc b/libs/gtkmm2/gtk/gtkmm/treesortable.cc
new file mode 100644
index 0000000000..3318bd4d0c
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/treesortable.cc
@@ -0,0 +1,606 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/treesortable.h>
+#include <gtkmm/private/treesortable_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+namespace
+{
+
+// This Signal Proxy allows the C++ coder to specify a sigc::slot instead of a static function.
+class SignalProxy_Compare
+{
+public:
+ typedef Gtk::TreeSortable::SlotCompare SlotType;
+
+ explicit SignalProxy_Compare(const SlotType& slot);
+ ~SignalProxy_Compare();
+
+ static int gtk_callback(GtkTreeModel* model, GtkTreeIter* lhs, GtkTreeIter* rhs, void* data);
+ static void gtk_callback_destroy(void* data);
+
+private:
+ SlotType slot_;
+};
+
+SignalProxy_Compare::SignalProxy_Compare(const SlotType& slot)
+:
+ slot_ (slot)
+{}
+
+SignalProxy_Compare::~SignalProxy_Compare()
+{}
+
+int SignalProxy_Compare::gtk_callback(GtkTreeModel* model, GtkTreeIter* lhs, GtkTreeIter* rhs, void* data)
+{
+ SignalProxy_Compare *const self = static_cast<SignalProxy_Compare*>(data);
+
+ try
+ {
+ // use Slot::operator()
+ return (self->slot_)(Gtk::TreeIter(model, lhs), Gtk::TreeIter(model, rhs));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+
+ return 0;
+}
+
+void SignalProxy_Compare::gtk_callback_destroy(void* data)
+{
+ delete static_cast<SignalProxy_Compare*>(data);
+}
+
+} // anonymous namespace
+
+
+namespace Gtk
+{
+
+void TreeSortable::set_sort_func(int sort_column_id, const SlotCompare& slot)
+{
+ SignalProxy_Compare *const pSignalProxy = new SignalProxy_Compare(slot);
+
+ gtk_tree_sortable_set_sort_func(
+ gobj(), sort_column_id,
+ &SignalProxy_Compare::gtk_callback, pSignalProxy,
+ &SignalProxy_Compare::gtk_callback_destroy);
+}
+
+void TreeSortable::set_sort_func(const Gtk::TreeModelColumnBase& sort_column, const SlotCompare& slot)
+{
+ set_sort_func(sort_column.index(), slot);
+}
+
+void TreeSortable::set_default_sort_func(const SlotCompare& slot)
+{
+ SignalProxy_Compare *const pSignalProxy = new SignalProxy_Compare(slot);
+
+ gtk_tree_sortable_set_default_sort_func(
+ gobj(),
+ &SignalProxy_Compare::gtk_callback, pSignalProxy,
+ &SignalProxy_Compare::gtk_callback_destroy);
+}
+
+void TreeSortable::unset_default_sort_func()
+{
+ gtk_tree_sortable_set_default_sort_func(
+ gobj(), 0, 0, 0); /* See GTK+ docs about the 0s. */
+}
+
+//deprecated:
+void TreeSortable::set_sort_column_id(const TreeModelColumnBase& sort_column, SortType order)
+{
+ set_sort_column(sort_column, order);
+}
+
+//deprecated:
+void TreeSortable::set_sort_column_id(int sort_column_id, SortType order)
+{
+ set_sort_column(sort_column_id, order);
+}
+
+} // namespace Gtk
+
+
+namespace
+{
+
+const Glib::SignalProxyInfo TreeSortable_signal_sort_column_changed_info =
+{
+ "sort_column_changed",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Gtk::TreeSortable> wrap(GtkTreeSortable* object, bool take_copy)
+{
+ return Glib::RefPtr<Gtk::TreeSortable>( dynamic_cast<Gtk::TreeSortable*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} // namespace Glib
+
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Interface_Class& TreeSortable_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Interface_Class has to know the interface init function
+ // in order to add interfaces to implementing types.
+ class_init_func_ = &TreeSortable_Class::iface_init_function;
+
+ // We can not derive from another interface, and it is not necessary anyway.
+ gtype_ = gtk_tree_sortable_get_type();
+ }
+
+ return *this;
+}
+
+void TreeSortable_Class::iface_init_function(void* g_iface, void*)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_iface);
+
+ //This is just to avoid an "unused variable" warning when there are no vfuncs or signal handlers to connect.
+ //This is a temporary fix until I find out why I can not seem to derive a GtkFileChooser interface. murrayc
+ g_assert(klass != 0);
+
+ klass->get_sort_column_id = &get_sort_column_id_vfunc_callback;
+ klass->set_sort_column_id = &set_sort_column_id_vfunc_callback;
+ klass->set_sort_func = &set_sort_func_vfunc_callback;
+ klass->set_default_sort_func = &set_default_sort_func_vfunc_callback;
+ klass->has_default_sort_func = &has_default_sort_func_vfunc_callback;
+ klass->sort_column_changed = &sort_column_changed_vfunc_callback;
+ klass->sort_column_changed = &sort_column_changed_callback;
+}
+
+gboolean TreeSortable_Class::get_sort_column_id_vfunc_callback(GtkTreeSortable* self, int* sort_column_id, GtkSortType* order)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->get_sort_column_id_vfunc(sort_column_id, ((SortType*) (order))
+));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->get_sort_column_id)
+ return (*base->get_sort_column_id)(self, sort_column_id, order);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+void TreeSortable_Class::set_sort_column_id_vfunc_callback(GtkTreeSortable* self, int sort_column_id, GtkSortType order)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->set_sort_column_id_vfunc(sort_column_id, ((SortType)(order))
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->set_sort_column_id)
+ (*base->set_sort_column_id)(self, sort_column_id, order);
+ }
+}
+
+void TreeSortable_Class::set_sort_func_vfunc_callback(GtkTreeSortable* self, int sort_column_id, GtkTreeIterCompareFunc func, gpointer data, GtkDestroyNotify destroy)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->set_sort_func_vfunc(sort_column_id, func, data
+, destroy);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->set_sort_func)
+ (*base->set_sort_func)(self, sort_column_id, func, data, destroy);
+ }
+}
+
+void TreeSortable_Class::set_default_sort_func_vfunc_callback(GtkTreeSortable* self, GtkTreeIterCompareFunc func, gpointer data, GtkDestroyNotify destroy)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->set_default_sort_func_vfunc(func, data
+, destroy);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->set_default_sort_func)
+ (*base->set_default_sort_func)(self, func, data, destroy);
+ }
+}
+
+gboolean TreeSortable_Class::has_default_sort_func_vfunc_callback(GtkTreeSortable* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->has_default_sort_func_vfunc());
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->has_default_sort_func)
+ return (*base->has_default_sort_func)(self);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+void TreeSortable_Class::sort_column_changed_vfunc_callback(GtkTreeSortable* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->sort_column_changed_vfunc();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->sort_column_changed)
+ (*base->sort_column_changed)(self);
+ }
+}
+
+
+void TreeSortable_Class::sort_column_changed_callback(GtkTreeSortable* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_sort_column_changed();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
+) );
+
+ // Call the original underlying C function:
+ if(base && base->sort_column_changed)
+ (*base->sort_column_changed)(self);
+ }
+}
+
+
+Glib::ObjectBase* TreeSortable_Class::wrap_new(GObject* object)
+{
+ return new TreeSortable((GtkTreeSortable*)(object));
+}
+
+
+/* The implementation: */
+
+TreeSortable::TreeSortable()
+:
+ Glib::Interface(treesortable_class_.init())
+{}
+
+TreeSortable::TreeSortable(GtkTreeSortable* castitem)
+:
+ Glib::Interface((GObject*)(castitem))
+{}
+
+TreeSortable::~TreeSortable()
+{}
+
+// static
+void TreeSortable::add_interface(GType gtype_implementer)
+{
+ treesortable_class_.init().add_interface(gtype_implementer);
+}
+
+TreeSortable::CppClassType TreeSortable::treesortable_class_; // initialize static member
+
+GType TreeSortable::get_type()
+{
+ return treesortable_class_.init().get_type();
+}
+
+GType TreeSortable::get_base_type()
+{
+ return gtk_tree_sortable_get_type();
+}
+
+
+bool TreeSortable::get_sort_column_id(int& sort_column_id, SortType& order) const
+{
+ return gtk_tree_sortable_get_sort_column_id(const_cast<GtkTreeSortable*>(gobj()), &sort_column_id, ((GtkSortType*) &(order)));
+}
+
+void TreeSortable::set_sort_column(const TreeModelColumnBase& sort_column_id, SortType order)
+{
+ gtk_tree_sortable_set_sort_column_id(gobj(), (sort_column_id).index(), ((GtkSortType)(order)));
+}
+
+void TreeSortable::set_sort_column(int sort_column_id, SortType order)
+{
+ gtk_tree_sortable_set_sort_column_id(gobj(), sort_column_id, ((GtkSortType)(order)));
+}
+
+bool TreeSortable::has_default_sort_func() const
+{
+ return gtk_tree_sortable_has_default_sort_func(const_cast<GtkTreeSortable*>(gobj()));
+}
+
+void TreeSortable::sort_column_changed()
+{
+ gtk_tree_sortable_sort_column_changed(gobj());
+}
+
+
+Glib::SignalProxy0< void > TreeSortable::signal_sort_column_changed()
+{
+ return Glib::SignalProxy0< void >(this, &TreeSortable_signal_sort_column_changed_info);
+}
+
+
+void Gtk::TreeSortable::on_sort_column_changed()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->sort_column_changed)
+ (*base->sort_column_changed)(gobj());
+}
+
+
+bool Gtk::TreeSortable::get_sort_column_id_vfunc(int* sort_column_id, SortType* order) const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->get_sort_column_id)
+ return (*base->get_sort_column_id)(const_cast<GtkTreeSortable*>(gobj()),sort_column_id,((GtkSortType*) (order)));
+
+ typedef bool RType;
+ return RType();
+}
+
+void Gtk::TreeSortable::set_sort_column_id_vfunc(int sort_column_id, SortType order)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->set_sort_column_id)
+ (*base->set_sort_column_id)(gobj(),sort_column_id,((GtkSortType)(order)));
+}
+
+void Gtk::TreeSortable::set_sort_func_vfunc(int sort_column_id, GtkTreeIterCompareFunc func, void* data, GtkDestroyNotify destroy)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->set_sort_func)
+ (*base->set_sort_func)(gobj(),sort_column_id,func,data,destroy);
+}
+
+void Gtk::TreeSortable::set_default_sort_func_vfunc(GtkTreeIterCompareFunc func, void* data, GtkDestroyNotify destroy)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->set_default_sort_func)
+ (*base->set_default_sort_func)(gobj(),func,data,destroy);
+}
+
+bool Gtk::TreeSortable::has_default_sort_func_vfunc() const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->has_default_sort_func)
+ return (*base->has_default_sort_func)(const_cast<GtkTreeSortable*>(gobj()));
+
+ typedef bool RType;
+ return RType();
+}
+
+void Gtk::TreeSortable::sort_column_changed_vfunc() const
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
+g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
+) );
+
+ if(base && base->sort_column_changed)
+ (*base->sort_column_changed)(const_cast<GtkTreeSortable*>(gobj()));
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/treesortable.h b/libs/gtkmm2/gtk/gtkmm/treesortable.h
new file mode 100644
index 0000000000..6b295a1f41
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/treesortable.h
@@ -0,0 +1,238 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TREESORTABLE_H
+#define _GTKMM_TREESORTABLE_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+
+/* Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/interface.h>
+#include <gtkmm/enums.h>
+#include <gtkmm/treemodelcolumn.h>
+#include <gtkmm/treemodel.h>
+#include <gtkmm/treeiter.h>
+#include <gtk/gtktreesortable.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkTreeSortable GtkTreeSortable;
+typedef struct _GtkTreeSortableClass GtkTreeSortableClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class TreeSortable_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/**
+ * @ingroup TreeView
+*/
+
+class TreeSortable : public Glib::Interface
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef TreeSortable CppObjectType;
+ typedef TreeSortable_Class CppClassType;
+ typedef GtkTreeSortable BaseObjectType;
+ typedef GtkTreeSortableIface BaseClassType;
+
+private:
+ friend class TreeSortable_Class;
+ static CppClassType treesortable_class_;
+
+ // noncopyable
+ TreeSortable(const TreeSortable&);
+ TreeSortable& operator=(const TreeSortable&);
+
+protected:
+ TreeSortable(); // you must derive from this class
+ explicit TreeSortable(GtkTreeSortable* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~TreeSortable();
+
+ static void add_interface(GType gtype_implementer);
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ GtkTreeSortable* gobj() { return reinterpret_cast<GtkTreeSortable*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const GtkTreeSortable* gobj() const { return reinterpret_cast<GtkTreeSortable*>(gobject_); }
+
+private:
+
+
+public:
+
+ enum
+ {
+ /// See set_default_sort_func() and set_sort_column().
+ DEFAULT_SORT_COLUMN_ID = -1,
+ DEFAULT_UNSORTED_COLUMN_ID = -2
+ }; //See GTK+ implementation.
+
+
+ /** Fills in @a sort_column_id and @a order with the current sort column and the
+ * order. It returns <tt>true</tt> unless the @a sort_column_id is
+ * Gtk::TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID or
+ * Gtk::TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID.
+ * @param sort_column_id The sort column id to be filled in.
+ * @param order The Gtk::SortType to be filled in.
+ * @return <tt>true</tt> if the sort column is not one of the special sort
+ * column ids.
+ */
+ bool get_sort_column_id(int& sort_column_id, SortType& order) const;
+
+
+ /** Sets the current sort column to be @a sort_column_id . The @a sortable will
+ * resort itself to reflect this change, after emitting a
+ * GtkTreeSortable::sort_column_changed signal. If @a sort_column_id is
+ * Gtk::TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID, then the default sort function
+ * will be used, if it is set.
+ * @param sort_column_id The sort column id to set.
+ * @param order The sort order of the column.
+ */
+ void set_sort_column(const TreeModelColumnBase& sort_column_id, SortType order);
+
+ /** Sets the current sort column to be @a sort_column_id . The @a sortable will
+ * resort itself to reflect this change, after emitting a
+ * GtkTreeSortable::sort_column_changed signal. If @a sort_column_id is
+ * Gtk::TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID, then the default sort function
+ * will be used, if it is set.
+ * @param sort_column_id The sort column id to set.
+ * @param order The sort order of the column.
+ */
+ void set_sort_column(int sort_column_id, SortType order);
+
+ #ifndef GTKMM_DISABLE_DEPRECATED
+ /** @deprecated Use set_sort_column() instead.
+ */
+ void set_sort_column_id(const TreeModelColumnBase& sort_column_id, SortType order);
+
+ /** @deprecated Use set_sort_column() instead.
+ */
+ void set_sort_column_id(int sort_column_id, SortType order);
+ #endif //GTKMM_DISABLE_DEPRECATED
+
+ /** This callback should return -1 if b compares before a, 0 if they compare equal, 1 if a compares after b.
+ * For instance, int on_sort_compare(const Gtk::TreeModel::iterator& a, const Gtk::TreeModel::iterator& b);
+ */
+ typedef sigc::slot<int, const Gtk::TreeModel::iterator&, const Gtk::TreeModel::iterator&> SlotCompare;
+
+
+ /** Sets the comparison function used when sorting a certain column.
+ * If the current sort column is the same as @a sort_column, then the model will sort using this function.
+ * @param sort_column the sort column to set the function for
+ * @param slot The sorting slot callback.
+ */
+ void set_sort_func(const TreeModelColumnBase& sort_column, const SlotCompare& slot);
+
+ /** Sets the comparison function used when sorting a certain column.
+ * If the current sort column id is the same as @a sort_column_id, then the model will sort using this function.
+ * @param sort_column_id the sort column id to set the function for
+ * @param slot The sorting slot callback.
+ */
+ void set_sort_func(int sort_column_id, const SlotCompare& slot);
+
+ /** Sets the default comparison function used when sorting.
+ * If the current sort column id of sortable is DEFAULT_SORT_COLUMN_ID, then the model will
+ * sort using this function. See also unset_default_sort_func().
+ *
+ * @param slot The sorting function
+ */
+ void set_default_sort_func(const SlotCompare& slot);
+
+ /** Sets the default comparison function used when sorting. See set_default_sort_func().
+ *
+ * After calling this method there will be no default comparison function. This means that once the model has been sorted,
+ * it can't go back to the default state. In this case, when the current sort column id of sortable is
+ * DEFAULT_SORT_COLUMN_ID, the model will be unsorted.
+ */
+ void unset_default_sort_func();
+
+
+ /** Returns <tt>true</tt> if the model has a default sort function. This is used
+ * primarily by GtkTreeViewColumns in order to determine if a model can go back
+ * to the default state, or not.
+ * @return <tt>true</tt>, if the model has a default sort function.
+ */
+ bool has_default_sort_func() const;
+
+
+ /** Emits a GtkTreeSortable::sort_column_changed signal on
+ */
+ void sort_column_changed();
+
+
+ Glib::SignalProxy0< void > signal_sort_column_changed();
+
+
+protected:
+ virtual bool get_sort_column_id_vfunc(int* sort_column_id, SortType* order) const;
+ virtual void set_sort_column_id_vfunc(int sort_column_id, SortType order);
+ virtual void set_sort_func_vfunc(int sort_column_id, GtkTreeIterCompareFunc func, void* data, GtkDestroyNotify destroy);
+ virtual void set_default_sort_func_vfunc(GtkTreeIterCompareFunc func, void* data, GtkDestroyNotify destroy);
+ virtual bool has_default_sort_func_vfunc() const;
+ virtual void sort_column_changed_vfunc() const;
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_sort_column_changed();
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::TreeSortable
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Gtk::TreeSortable> wrap(GtkTreeSortable* object, bool take_copy = false);
+
+} // namespace Glib
+
+#endif /* _GTKMM_TREESORTABLE_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/treestore.cc b/libs/gtkmm2/gtk/gtkmm/treestore.cc
new file mode 100644
index 0000000000..cddd5961eb
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/treestore.cc
@@ -0,0 +1,283 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/treestore.h>
+#include <gtkmm/private/treestore_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtktreestore.h>
+
+
+namespace Gtk
+{
+
+TreeStore::TreeStore(const TreeModelColumnRecord& columns)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Glib::Object(Glib::ConstructParams(treestore_class_.init(), (char*) 0))
+{
+ gtk_tree_store_set_column_types(gobj(), columns.size(), const_cast<GType*>(columns.types()));
+}
+
+void TreeStore::set_column_types(const TreeModelColumnRecord& columns)
+{
+ gtk_tree_store_set_column_types(gobj(), columns.size(), const_cast<GType*>(columns.types()));
+}
+
+TreeModel::iterator TreeStore::erase(const iterator& iter)
+{
+ g_assert(iter.get_gobject_if_not_end() != 0);
+
+ iterator next (iter);
+ ++next;
+
+ GtkTreeIter tmp = *iter.gobj();
+ gtk_tree_store_remove(gobj(), &tmp);
+
+ return next;
+}
+
+TreeModel::iterator TreeStore::insert(const iterator& iter)
+{
+ iterator new_pos (this);
+
+ gtk_tree_store_insert_before(
+ gobj(), new_pos.gobj(),
+ const_cast<GtkTreeIter*>(iter.get_parent_gobject_if_end()),
+ const_cast<GtkTreeIter*>(iter.get_gobject_if_not_end()));
+
+ if(new_pos.gobj()->stamp == 0)
+ new_pos.setup_end_iterator(iter);
+
+ return new_pos;
+}
+
+TreeModel::iterator TreeStore::insert_after(const iterator& iter)
+{
+ iterator new_pos (this);
+
+ gtk_tree_store_insert_after(
+ gobj(), new_pos.gobj(),
+ const_cast<GtkTreeIter*>(iter.get_parent_gobject_if_end()),
+ const_cast<GtkTreeIter*>(iter.get_gobject_if_not_end()));
+
+ if(new_pos.gobj()->stamp == 0)
+ new_pos.setup_end_iterator(iter);
+
+ return new_pos;
+}
+
+TreeModel::iterator TreeStore::prepend()
+{
+ iterator new_pos (this);
+ gtk_tree_store_prepend(gobj(), new_pos.gobj(), 0);
+ return new_pos;
+}
+
+TreeModel::iterator TreeStore::prepend(const TreeNodeChildren& node)
+{
+ iterator new_pos (this);
+
+ gtk_tree_store_prepend(
+ gobj(), new_pos.gobj(),
+ const_cast<GtkTreeIter*>(node.get_parent_gobject()));
+
+ return new_pos;
+}
+
+TreeModel::iterator TreeStore::append()
+{
+ iterator new_pos (this);
+ gtk_tree_store_append(gobj(), new_pos.gobj(), 0);
+ return new_pos;
+}
+
+TreeModel::iterator TreeStore::append(const TreeNodeChildren& node)
+{
+ iterator new_pos (this);
+
+ gtk_tree_store_append(
+ gobj(), new_pos.gobj(),
+ const_cast<GtkTreeIter*>(node.get_parent_gobject()));
+
+ return new_pos;
+}
+
+void TreeStore::move(const iterator& source, const iterator& destination)
+{
+ gtk_tree_store_move_before(gobj(),
+ const_cast<GtkTreeIter*>(source.get_gobject_if_not_end()),
+ const_cast<GtkTreeIter*>(destination.get_gobject_if_not_end()));
+}
+
+void TreeStore::reorder(const TreeNodeChildren& node, const Glib::ArrayHandle<int>& new_order)
+{
+ gtk_tree_store_reorder(gobj(),
+ const_cast<GtkTreeIter*>(node.get_parent_gobject()),
+ const_cast<int*>(new_order.data()));
+}
+
+void TreeStore::set_value_impl(const iterator& row, int column, const Glib::ValueBase& value)
+{
+ gtk_tree_store_set_value(
+ gobj(), const_cast<GtkTreeIter*>(row.gobj()),
+ column, const_cast<GValue*>(value.gobj()));
+}
+
+} // namespace Gtk
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Gtk::TreeStore> wrap(GtkTreeStore* object, bool take_copy)
+{
+ return Glib::RefPtr<Gtk::TreeStore>( dynamic_cast<Gtk::TreeStore*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} /* namespace Glib */
+
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& TreeStore_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &TreeStore_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_tree_store_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ TreeModel::add_interface(get_type());
+ TreeSortable::add_interface(get_type());
+ TreeDragSource::add_interface(get_type());
+ TreeDragDest::add_interface(get_type());
+ }
+
+ return *this;
+}
+
+void TreeStore_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* TreeStore_Class::wrap_new(GObject* object)
+{
+ return new TreeStore((GtkTreeStore*)object);
+}
+
+
+/* The implementation: */
+
+GtkTreeStore* TreeStore::gobj_copy()
+{
+ reference();
+ return gobj();
+}
+
+TreeStore::TreeStore(const Glib::ConstructParams& construct_params)
+:
+ Glib::Object(construct_params)
+{}
+
+TreeStore::TreeStore(GtkTreeStore* castitem)
+:
+ Glib::Object((GObject*)(castitem))
+{}
+
+TreeStore::~TreeStore()
+{}
+
+
+TreeStore::CppClassType TreeStore::treestore_class_; // initialize static member
+
+GType TreeStore::get_type()
+{
+ return treestore_class_.init().get_type();
+}
+
+GType TreeStore::get_base_type()
+{
+ return gtk_tree_store_get_type();
+}
+
+
+TreeStore::TreeStore()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Glib::Object(Glib::ConstructParams(treestore_class_.init()))
+{
+ }
+
+Glib::RefPtr<TreeStore> TreeStore::create(const TreeModelColumnRecord& columns)
+{
+ return Glib::RefPtr<TreeStore>( new TreeStore(columns) );
+}
+void TreeStore::iter_swap(const iterator& a, const iterator& b)
+{
+ gtk_tree_store_swap(gobj(), const_cast<GtkTreeIter*>((a).gobj()), const_cast<GtkTreeIter*>((b).gobj()));
+}
+
+void TreeStore::clear()
+{
+ gtk_tree_store_clear(gobj());
+}
+
+bool TreeStore::is_ancestor(const iterator& iter, const iterator& descendant) const
+{
+ return gtk_tree_store_is_ancestor(const_cast<GtkTreeStore*>(gobj()), const_cast<GtkTreeIter*>((iter).gobj()), const_cast<GtkTreeIter*>((descendant).gobj()));
+}
+
+int TreeStore::iter_depth(const iterator& iter) const
+{
+ return gtk_tree_store_iter_depth(const_cast<GtkTreeStore*>(gobj()), const_cast<GtkTreeIter*>((iter).gobj()));
+}
+
+bool TreeStore::iter_is_valid(const iterator& iter) const
+{
+ return gtk_tree_store_iter_is_valid(const_cast<GtkTreeStore*>(gobj()), const_cast<GtkTreeIter*>((iter).gobj()));
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/treestore.h b/libs/gtkmm2/gtk/gtkmm/treestore.h
new file mode 100644
index 0000000000..e5d01a4443
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/treestore.h
@@ -0,0 +1,276 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TREESTORE_H
+#define _GTKMM_TREESTORE_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright(C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or(at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/treeiter.h>
+#include <gtkmm/treemodel.h>
+#include <gtkmm/treesortable.h>
+#include <gtkmm/treedragdest.h>
+#include <gtkmm/treedragsource.h>
+// We couldn't include it in treemodel.h, but doing it here makes it easier for people.
+#include <gtkmm/treepath.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkTreeStore GtkTreeStore;
+typedef struct _GtkTreeStoreClass GtkTreeStoreClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class TreeStore_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/**
+ * @ingroup TreeView
+ */
+
+class TreeStore :
+ public Glib::Object,
+ public Gtk::TreeModel,
+ public TreeSortable,
+ public TreeDragSource,
+ public TreeDragDest
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef TreeStore CppObjectType;
+ typedef TreeStore_Class CppClassType;
+ typedef GtkTreeStore BaseObjectType;
+ typedef GtkTreeStoreClass BaseClassType;
+
+private: friend class TreeStore_Class;
+ static CppClassType treestore_class_;
+
+private:
+ // noncopyable
+ TreeStore(const TreeStore&);
+ TreeStore& operator=(const TreeStore&);
+
+protected:
+ explicit TreeStore(const Glib::ConstructParams& construct_params);
+ explicit TreeStore(GtkTreeStore* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~TreeStore();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ GtkTreeStore* gobj() { return reinterpret_cast<GtkTreeStore*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const GtkTreeStore* gobj() const { return reinterpret_cast<GtkTreeStore*>(gobject_); }
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ GtkTreeStore* gobj_copy();
+
+private:
+
+
+protected:
+ /** When using this constructor, you must use set_column_types() immediately afterwards.
+ * This can be useful when deriving from this class, with a fixed TreeModelColumnRecord
+ * that is a member of the class.
+ * There is no create() method that corresponds to this constructor, because this
+ * constructor should only be used by derived classes.
+ */
+ TreeStore();
+
+ explicit TreeStore(const TreeModelColumnRecord& columns);
+
+public:
+ /** Instantiate a new TreeStore.
+ * @param columns The column types for this tree model.
+ * @result The new TreeStore.
+ */
+
+ static Glib::RefPtr<TreeStore> create(const TreeModelColumnRecord& columns);
+
+
+ void set_column_types(const TreeModelColumnRecord& columns);
+
+
+ /** Removes the given row from the list store.
+ * @param iter The iterator to the row to be removed.
+ * @result An iterator to the next row, or end() if there is none.
+ */
+ iterator erase(const iterator& iter);
+
+
+ //TODO: Make this documentation similar to documentation for Standard C++ insert methods.
+ /** Creates a new row before the position.
+ * If iter is end() then a new row will be appended to the list.
+ * The row will be empty - to fill in values, you need to dereference the returned iterator and use Row::operator[] or Row::set_value().
+ * See also prepend() and append().
+ *
+ * @param iter An iterator to the row before which the new row will be inserted.
+ * @result An iterator to the new row.
+ */
+ iterator insert(const iterator& iter);
+
+
+ /** Creates a new row after the position.
+ * If iter is end() then a new row will be prepended to the list.
+ * The row will be empty - to fill in values, you need to dereference the returned iterator and use Row::operator[] or Row::set_value().
+ * See also prepend() and append().
+ *
+ * @param iter An iterator to the row after which the new row will be inserted.
+ * @result An iterator to the new row.
+ */
+ iterator insert_after(const iterator& iter);
+
+
+ /** Creates a new row at the start of the top-level.
+ * The row will be empty - to fill in values, you need to dereference the returned iterator and use Row::operator[] or Row::set_value().
+ * See also insert() and append().
+ *
+ * @result An iterator to the new row.
+ */
+ iterator prepend();
+
+ /** Creates a new row at the start of the row's children.
+ * The row will be empty - to fill in values, you need to dereference the returned iterator and use Row::operator[] or Row::set_value().
+ * See also insert() and append().
+ *
+ * @param node The list of the parent row's children, as returned by Gtk::TreeModel::iterator::children().
+ * @result An iterator to the new row.
+ */
+ iterator prepend(const TreeNodeChildren& node);
+
+
+ /** Creates a new row at the end of the top-level.
+ * The row will be empty - to fill in values, you need to dereference the returned iterator and use Row::operator[] or Row::set_value().
+ * See also insert() and prepend().
+ *
+ * @result An iterator to the new row.
+ */
+ iterator append();
+
+ /** Creates a new row at the end of the row's children.
+ * The row will be empty - to fill in values, you need to dereference the returned iterator and use Row::operator[] or Row::set_value().
+ * See also insert() and prepend().
+ *
+ * @param node The list of the parent row's children, as returned by Gtk::TreeModel::iterator::children().
+ * @result An iterator to the new row.
+ */
+ iterator append(const TreeNodeChildren& node);
+
+
+ /** Swaps @a a and @a b in the same level of @a tree_store . Note that this function
+ * only works with unsorted stores.
+ *
+ * Since: 2.2
+ * @param a A Gtk::TreeIter.
+ * @param b Another Gtk::TreeIter.
+ */
+ void iter_swap(const iterator& a, const iterator& b);
+
+ /** Moves @a source to the position at @a destination.
+ * @a source and @a destination should be at the same level.
+ * Note that this function only works with unsorted stores.
+ * @param source The row that should be moved.
+ * @param destination The position to move to.
+ */
+ void move(const iterator& source, const iterator& destination);
+
+ /** Reorders the children of @a node to follow the order indicated by @a new_order.
+ * Note that this function only works with unsorted stores.
+ */
+ void reorder(const TreeNodeChildren& node, const Glib::ArrayHandle<int>& new_order);
+
+
+ /** Removes all rows from @a tree_store
+ */
+ void clear();
+
+ /** Returns <tt>true</tt> if @a iter is an ancestor of @a descendant . That is, @a iter is the
+ * parent (or grandparent or great-grandparent) of @a descendant .
+ * @param iter A valid Gtk::TreeIter.
+ * @param descendant A valid Gtk::TreeIter.
+ * @return <tt>true</tt>, if @a iter is an ancestor of @a descendant .
+ */
+ bool is_ancestor(const iterator& iter, const iterator& descendant) const;
+
+ /** Returns the depth of @a iter . This will be 0 for anything on the root level, 1
+ * for anything down a level, etc.
+ * @param iter A valid Gtk::TreeIter.
+ * @return The depth of @a iter .
+ */
+ int iter_depth(const iterator& iter) const;
+
+
+ /** WARNING: This function is slow. Only use it for debugging and/or testing
+ * purposes.
+ *
+ * Checks if the given iter is a valid iter for this Gtk::TreeStore.
+ * @param iter A Gtk::TreeIter.
+ * @return <tt>true</tt> if the iter is valid, <tt>false</tt> if the iter is invalid.
+ *
+ * Since: 2.2.
+ */
+ bool iter_is_valid(const iterator& iter) const;
+
+protected:
+ virtual void set_value_impl(const iterator& row, int column, const Glib::ValueBase& value);
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::TreeStore
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Gtk::TreeStore> wrap(GtkTreeStore* object, bool take_copy = false);
+}
+
+
+#endif /* _GTKMM_TREESTORE_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/treeview.cc b/libs/gtkmm2/gtk/gtkmm/treeview.cc
new file mode 100644
index 0000000000..4337e88c50
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/treeview.cc
@@ -0,0 +1,1727 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/treeview.h>
+#include <gtkmm/private/treeview_p.h>
+
+#include <gtk/gtktypebuiltins.h>
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtktreeview.h>
+#include <gtkmm/treeviewcolumn.h>
+#include <gtkmm/treeview_private.h>
+#include <gtkmm/treemodel.h>
+#include <gtkmm/treemodelfilter.h>
+
+namespace
+{
+
+//This target name is used in the GTK+ implementation:
+const char treeview_target_row[] = "GTK_TREE_MODEL_ROW";
+
+} // anonymous namespace
+
+namespace
+{
+
+//SignalProxy_Mapping:
+
+//This Signal Proxy allows the C++ coder to specify a sigc::slot instead of a static function.
+class SignalProxy_Mapping
+{
+public:
+ typedef Gtk::TreeView::SlotMapping SlotType;
+
+ SignalProxy_Mapping(const SlotType& slot);
+ ~SignalProxy_Mapping();
+
+ static void gtk_callback(GtkTreeView* tree_view, GtkTreePath* path, void* data);
+
+protected:
+ SlotType slot_;
+};
+
+SignalProxy_Mapping::SignalProxy_Mapping(const SlotType& slot)
+:
+ slot_ (slot)
+{}
+
+SignalProxy_Mapping::~SignalProxy_Mapping()
+{}
+
+void SignalProxy_Mapping::gtk_callback(GtkTreeView* tree_view, GtkTreePath* path, void* data)
+{
+ SignalProxy_Mapping *const self = static_cast<SignalProxy_Mapping*>(data);
+
+ try
+ {
+ (self->slot_)(Glib::wrap(tree_view), Gtk::TreePath(path, true));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+}
+
+
+//SignalProxy_SearchEqual:
+
+//This Signal Proxy allows the C++ coder to specify a sigc::slot instead of a static function.
+class SignalProxy_SearchEqual
+{
+public:
+ typedef Gtk::TreeView::SlotSearchEqual SlotType;
+
+ SignalProxy_SearchEqual(const SlotType& slot);
+ ~SignalProxy_SearchEqual();
+
+ static gboolean gtk_callback(GtkTreeModel* model, int column, const char* key,
+ GtkTreeIter* iter, void* data);
+ static void gtk_callback_destroy(void* data);
+
+protected:
+ SlotType slot_;
+};
+
+SignalProxy_SearchEqual::SignalProxy_SearchEqual(const SlotType& slot)
+:
+ slot_ (slot)
+{}
+
+SignalProxy_SearchEqual::~SignalProxy_SearchEqual()
+{}
+
+gboolean SignalProxy_SearchEqual::gtk_callback(GtkTreeModel* model, int column, const char* key,
+ GtkTreeIter* iter, void* data)
+{
+ SignalProxy_SearchEqual *const self = static_cast<SignalProxy_SearchEqual*>(data);
+
+ try
+ {
+ return (self->slot_)(Glib::wrap(model, true), column, key, Gtk::TreeIter(model, iter));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+
+ return 0; // arbitrary value
+}
+
+void SignalProxy_SearchEqual::gtk_callback_destroy(void* data)
+{
+ delete static_cast<SignalProxy_SearchEqual*>(data);
+}
+
+
+//SignalProxy_ColumnDrop:
+
+//This Signal Proxy allows the C++ coder to specify a sigc::slot instead of a static function.
+class SignalProxy_ColumnDrop
+{
+public:
+ typedef Gtk::TreeView::SlotColumnDrop SlotType;
+
+ SignalProxy_ColumnDrop(const SlotType& slot);
+ ~SignalProxy_ColumnDrop();
+
+ static gboolean gtk_callback(GtkTreeView* tree_view, GtkTreeViewColumn* column,
+ GtkTreeViewColumn* prev_column, GtkTreeViewColumn* next_column,
+ void* data);
+ static void gtk_callback_destroy(void* data);
+
+protected:
+ SlotType slot_;
+};
+
+SignalProxy_ColumnDrop::SignalProxy_ColumnDrop(const SlotType& slot)
+:
+ slot_ (slot)
+{}
+
+SignalProxy_ColumnDrop::~SignalProxy_ColumnDrop()
+{}
+
+gboolean SignalProxy_ColumnDrop::gtk_callback(GtkTreeView* tree_view, GtkTreeViewColumn* column,
+ GtkTreeViewColumn* prev_column,
+ GtkTreeViewColumn* next_column, void* data)
+{
+ SignalProxy_ColumnDrop *const self = static_cast<SignalProxy_ColumnDrop*>(data);
+
+ try
+ {
+ return (self->slot_)(Glib::wrap(tree_view), Glib::wrap(column),
+ Glib::wrap(prev_column), Glib::wrap(next_column));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+
+ return 0; // arbitrary value
+}
+
+void SignalProxy_ColumnDrop::gtk_callback_destroy(void* data)
+{
+ delete static_cast<SignalProxy_ColumnDrop*>(data);
+}
+
+} // anonymous namespace
+
+
+namespace Gtk
+{
+
+void TreeView::unset_hadjustment()
+{
+ gtk_tree_view_set_hadjustment(gobj(), 0);
+}
+
+void TreeView::unset_vadjustment()
+{
+ gtk_tree_view_set_vadjustment(gobj(), 0);
+}
+
+int TreeView::insert_column_with_data_func(int position, const Glib::ustring& title, CellRenderer& cell, const SlotCellData& slot)
+{
+ //Create a signal proxy. A pointer to this will be passed through the callback's data parameter.
+ //It will be deleted when TreeView_Private::SignalProxy_CellData::gtk_callback_destroy() is called.
+ TreeView_Private::SignalProxy_CellData *const pSignalProxy =
+ new TreeView_Private::SignalProxy_CellData(slot);
+
+ return gtk_tree_view_insert_column_with_data_func(
+ gobj(), position, title.c_str(), cell.gobj(),
+ &TreeView_Private::SignalProxy_CellData::gtk_callback, pSignalProxy,
+ &TreeView_Private::SignalProxy_CellData::gtk_callback_destroy);
+}
+
+void TreeView::set_cursor(const TreeModel::Path& path)
+{
+ gtk_tree_view_set_cursor(gobj(), const_cast<GtkTreePath*>(path.gobj()), 0, false);
+}
+
+void TreeView::get_cursor(TreeModel::Path& path, TreeViewColumn*& focus_column)
+{
+ GtkTreePath* pTreePath = 0;
+ GtkTreeViewColumn* pTreeViewColumn = 0;
+ gtk_tree_view_get_cursor(gobj(), &pTreePath, &pTreeViewColumn);
+
+ path = TreeModel::Path(pTreePath, true);
+ focus_column = Glib::wrap(pTreeViewColumn);
+}
+
+
+void TreeView::enable_model_drag_source(const ArrayHandle_TargetEntry& targets,
+ Gdk::ModifierType start_button_mask,
+ Gdk::DragAction actions)
+{
+ gtk_tree_view_enable_model_drag_source(
+ gobj(), (GdkModifierType) start_button_mask,
+ targets.data(), targets.size(), (GdkDragAction) actions);
+}
+
+void TreeView::enable_model_drag_source(Gdk::ModifierType start_button_mask, Gdk::DragAction actions)
+{
+ std::list<TargetEntry> listTargets;
+ listTargets.push_back(TargetEntry(treeview_target_row));
+ enable_model_drag_source(listTargets, start_button_mask, actions);
+}
+
+void TreeView::enable_model_drag_dest(const ArrayHandle_TargetEntry& targets, Gdk::DragAction actions)
+{
+ gtk_tree_view_enable_model_drag_dest(
+ gobj(), targets.data(), targets.size(), (GdkDragAction) actions);
+}
+
+void TreeView::enable_model_drag_dest(Gdk::DragAction actions)
+{
+ std::list<TargetEntry> listTargets;
+ listTargets.push_back(TargetEntry(treeview_target_row));
+ enable_model_drag_dest(listTargets, actions);
+}
+
+bool TreeView::get_path_at_pos(int x, int y, TreeModel::Path& path, TreeViewColumn*& column, int& cell_x, int& cell_y)
+{
+ GtkTreePath* pTreePath = 0;
+ GtkTreeViewColumn* pTreeViewColumn = 0;
+ bool result = gtk_tree_view_get_path_at_pos(gobj(), x, y, &pTreePath, &pTreeViewColumn, &cell_x, &cell_y);
+
+ path = TreeModel::Path(pTreePath, false /* don't take a copy, because the gtk_tree_view_get_path_at_pos() docs say that we must free the path */ );
+ column = Glib::wrap(pTreeViewColumn);
+ return result;
+}
+
+int TreeView::insert_column(const Glib::ustring& title, CellRenderer& cell, int position)
+{
+ return gtk_tree_view_insert_column_with_attributes(
+ gobj(), position, const_cast<char*>(title.c_str()), cell.gobj(), (void*)0); //Note that some compilers need the extra (void*) clue.
+}
+
+int TreeView::append_column(const Glib::ustring& title, CellRenderer& cell)
+{
+ return insert_column(title, cell, -1 /* at the end */);
+}
+
+void TreeView::get_drag_dest_row(TreeModel::Path& path, TreeViewDropPosition& pos) const
+{
+ GtkTreePath* pTreePath = 0;
+ gtk_tree_view_get_drag_dest_row(const_cast<GtkTreeView*>(gobj()), &pTreePath, (GtkTreeViewDropPosition*) &pos);
+ path = TreeModel::Path(pTreePath, true); //true = take_copy.
+}
+
+bool TreeView::get_dest_row_at_pos(int drag_x, int drag_y, TreeModel::Path& path, TreeViewDropPosition& pos) const
+{
+ GtkTreePath* pTreePath = 0;
+ const bool bResult = gtk_tree_view_get_dest_row_at_pos(
+ const_cast<GtkTreeView*>(gobj()), drag_x, drag_y, &pTreePath, (GtkTreeViewDropPosition*) &pos);
+
+ path = TreeModel::Path(pTreePath, true); //true = take_copy.
+ return bResult;
+}
+
+void TreeView::map_expanded_rows(const SlotMapping& slot)
+{
+ //Create a signal proxy.
+ SignalProxy_Mapping signalProxy (slot); //It only needs to live as long as this method call.
+
+ gtk_tree_view_map_expanded_rows(gobj(), &SignalProxy_Mapping::gtk_callback, &signalProxy);
+}
+
+void TreeView::set_search_equal_func(const SlotSearchEqual& slot)
+{
+ //Create a signal proxy. A pointer to this will be passed through the callback's data parameter.
+ //It will be deleted when SignalProxy_SearchEqual::gtk_callback_destroy() is called.
+ SignalProxy_SearchEqual *const pSignalProxy = new SignalProxy_SearchEqual(slot);
+
+ gtk_tree_view_set_search_equal_func(gobj(),
+ &SignalProxy_SearchEqual::gtk_callback, pSignalProxy,
+ &SignalProxy_SearchEqual::gtk_callback_destroy);
+}
+
+void TreeView::set_column_drag_function(const SlotColumnDrop& slot)
+{
+ //Create a signal proxy. A pointer to this will be passed through the callback's data parameter.
+ //It will be deleted when SignalProxy_ColumnDrop::gtk_callback_destroy() is called.
+ SignalProxy_ColumnDrop *const pSignalProxy = new SignalProxy_ColumnDrop(slot);
+
+ gtk_tree_view_set_column_drag_function(gobj(),
+ &SignalProxy_ColumnDrop::gtk_callback, pSignalProxy,
+ &SignalProxy_ColumnDrop::gtk_callback_destroy);
+
+}
+
+void TreeView::unset_column_drag_function()
+{
+ gtk_tree_view_set_column_drag_function(gobj(),
+ 0, 0, 0); /* See GTK+ docs about the 0s. */
+}
+
+void TreeView::scroll_to_cell(const TreeModel::Path& path, TreeViewColumn& column, float row_align, float col_align)
+{
+ gtk_tree_view_scroll_to_cell(gobj(), const_cast<GtkTreePath*>(path.gobj()), column.gobj(), TRUE, row_align, col_align);
+}
+
+void TreeView::scroll_to_cell(const TreeModel::Path& path, TreeViewColumn& column)
+{
+ gtk_tree_view_scroll_to_cell(gobj(), const_cast<GtkTreePath*>(path.gobj()), column.gobj(), FALSE, 0.0, 0.0);
+}
+
+void TreeView::scroll_to_row(const TreeModel::Path& path, float row_align)
+{
+ gtk_tree_view_scroll_to_cell(gobj(), const_cast<GtkTreePath*>(path.gobj()), 0, TRUE, row_align, 0.0);
+}
+
+void TreeView::scroll_to_row(const TreeModel::Path& path)
+{
+ gtk_tree_view_scroll_to_cell(gobj(), const_cast<GtkTreePath*>(path.gobj()), 0, FALSE, 0.0, 0.0);
+}
+
+void TreeView::scroll_to_column(TreeViewColumn& column, float col_align)
+{
+ gtk_tree_view_scroll_to_cell(gobj(), 0, column.gobj(), TRUE, 0.0, col_align);
+}
+
+void TreeView::scroll_to_column(TreeViewColumn& column)
+{
+ gtk_tree_view_scroll_to_cell(gobj(), 0, column.gobj(), FALSE, 0.0, 0.0);
+}
+
+void TreeView::remove_all_columns()
+{
+ //This method is not in GTK+, but it seems useful.
+
+ //Remove all View columns:
+ typedef std::list< Gtk::TreeView::Column* > type_vecViewColumns;
+ type_vecViewColumns vecViewColumns = get_columns();
+ for(type_vecViewColumns::iterator iter = vecViewColumns.begin(); iter != vecViewColumns.end(); ++iter)
+ {
+ Gtk::TreeView::Column* pViewColumn = *iter;
+ if(pViewColumn)
+ remove_column(*pViewColumn);
+ }
+}
+
+
+CellRenderer* TreeView::get_column_cell_renderer(int n)
+{
+ TreeViewColumn* pColumn = get_column(n);
+ if(pColumn)
+ return pColumn->get_first_cell_renderer();
+ else
+ return 0;
+}
+
+
+const CellRenderer* TreeView::get_column_cell_renderer(int n) const
+{
+ //Do some const_cast-ing to avoid repetition of code:
+ CellRenderer* pRenderer = const_cast<TreeView*>(this)->get_column_cell_renderer(n);
+ return pRenderer;
+}
+
+void TreeView::reset_expander_column()
+{
+ gtk_tree_view_set_expander_column(gobj(), 0 /* see C docs */);
+}
+
+Glib::RefPtr<Gtk::TreeModel> TreeView::_get_base_model()
+{
+ Glib::RefPtr<TreeModel> refModel = get_model();
+
+ bool get_child = true;
+ while(get_child && refModel)
+ {
+ Glib::RefPtr<Gtk::TreeModelFilter> refModelFilter = Glib::RefPtr<Gtk::TreeModelFilter>::cast_dynamic(refModel);
+ if(refModelFilter)
+ refModel = refModelFilter->get_model();
+ else
+ get_child = false;
+ }
+
+ return refModel;
+}
+
+void TreeView::_auto_store_on_cellrenderer_toggle_edited(const Glib::ustring& path_string,
+ int model_column)
+{
+ Gtk::TreePath path (path_string);
+
+ //Get the row from the path:
+ Glib::RefPtr<TreeModel> refModel = _get_base_model();
+
+ Gtk::TreeModel::iterator iter = refModel->get_iter(path);
+ if(iter)
+ {
+ Gtk::TreeRow row = *iter;
+
+ //Get the new value:
+ //This seems to get the old value, not the new one,
+ //so we will just NOT the model value ourselves.
+ //bool bActive = cell_renderer->get_active();
+ bool bActive = false;
+ row.get_value(model_column, bActive);
+ bActive = !bActive;
+
+ //Store the user's new text in the model:
+ row.set_value(model_column, bActive);
+ }
+}
+
+void TreeView::move_column_to_start(TreeViewColumn& column)
+{
+ gtk_tree_view_move_column_after(gobj(), (column).gobj(), 0 /* See C docs */);
+}
+
+void TreeView::set_row_separator_func(const SlotRowSeparator& slot)
+{
+ //Create a signal proxy. A pointer to this will be passed through the callback's data parameter.
+ //It will be deleted when SignalProxy_RowSeparator::gtk_callback_destroy() is called.
+ TreeView_Private::SignalProxy_RowSeparator *const pSignalProxy = new TreeView_Private::SignalProxy_RowSeparator(slot);
+
+ gtk_tree_view_set_row_separator_func(gobj(),
+ &TreeView_Private::SignalProxy_RowSeparator::gtk_callback, pSignalProxy,
+ &TreeView_Private::SignalProxy_RowSeparator::gtk_callback_destroy);
+}
+
+} // namespace Gtk
+
+
+namespace
+{
+
+void TreeView_signal_set_scroll_adjustments_callback(GtkTreeView* self, GtkAdjustment* p0,GtkAdjustment* p1,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,Adjustment*,Adjustment* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::wrap(p0)
+, Glib::wrap(p1)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo TreeView_signal_set_scroll_adjustments_info =
+{
+ "set-scroll-adjustments",
+ (GCallback) &TreeView_signal_set_scroll_adjustments_callback,
+ (GCallback) &TreeView_signal_set_scroll_adjustments_callback
+};
+
+
+void TreeView_signal_row_activated_callback(GtkTreeView* self, GtkTreePath* p0,GtkTreeViewColumn* p1,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,const TreeModel::Path&,TreeViewColumn* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Gtk::TreePath(p0, true)
+, Glib::wrap(p1)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo TreeView_signal_row_activated_info =
+{
+ "row-activated",
+ (GCallback) &TreeView_signal_row_activated_callback,
+ (GCallback) &TreeView_signal_row_activated_callback
+};
+
+
+gboolean TreeView_signal_test_expand_row_callback(GtkTreeView* self, GtkTreeIter* p0,GtkTreePath* p1,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< bool,const TreeModel::iterator&,const TreeModel::Path& > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ return static_cast<int>((*static_cast<SlotType*>(slot))(TreeModel::iterator(gtk_tree_view_get_model(self), p0)
+, Gtk::TreePath(p1, true)
+));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean TreeView_signal_test_expand_row_notify_callback(GtkTreeView* self, GtkTreeIter* p0,GtkTreePath* p1, void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,const TreeModel::iterator&,const TreeModel::Path& > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(TreeModel::iterator(gtk_tree_view_get_model(self), p0)
+, Gtk::TreePath(p1, true)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+const Glib::SignalProxyInfo TreeView_signal_test_expand_row_info =
+{
+ "test-expand-row",
+ (GCallback) &TreeView_signal_test_expand_row_callback,
+ (GCallback) &TreeView_signal_test_expand_row_notify_callback
+};
+
+
+gboolean TreeView_signal_test_collapse_row_callback(GtkTreeView* self, GtkTreeIter* p0,GtkTreePath* p1,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< bool,const TreeModel::iterator&,const TreeModel::Path& > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ return static_cast<int>((*static_cast<SlotType*>(slot))(TreeModel::iterator(gtk_tree_view_get_model(self), p0)
+, Gtk::TreePath(p1, true)
+));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean TreeView_signal_test_collapse_row_notify_callback(GtkTreeView* self, GtkTreeIter* p0,GtkTreePath* p1, void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,const TreeModel::iterator&,const TreeModel::Path& > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(TreeModel::iterator(gtk_tree_view_get_model(self), p0)
+, Gtk::TreePath(p1, true)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+const Glib::SignalProxyInfo TreeView_signal_test_collapse_row_info =
+{
+ "test-collapse-row",
+ (GCallback) &TreeView_signal_test_collapse_row_callback,
+ (GCallback) &TreeView_signal_test_collapse_row_notify_callback
+};
+
+
+void TreeView_signal_row_expanded_callback(GtkTreeView* self, GtkTreeIter* p0,GtkTreePath* p1,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,const TreeModel::iterator&,const TreeModel::Path& > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(TreeModel::iterator(gtk_tree_view_get_model(self), p0)
+, Gtk::TreePath(p1, true)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo TreeView_signal_row_expanded_info =
+{
+ "row-expanded",
+ (GCallback) &TreeView_signal_row_expanded_callback,
+ (GCallback) &TreeView_signal_row_expanded_callback
+};
+
+
+void TreeView_signal_row_collapsed_callback(GtkTreeView* self, GtkTreeIter* p0,GtkTreePath* p1,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,const TreeModel::iterator&,const TreeModel::Path& > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(TreeModel::iterator(gtk_tree_view_get_model(self), p0)
+, Gtk::TreePath(p1, true)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo TreeView_signal_row_collapsed_info =
+{
+ "row-collapsed",
+ (GCallback) &TreeView_signal_row_collapsed_callback,
+ (GCallback) &TreeView_signal_row_collapsed_callback
+};
+
+
+const Glib::SignalProxyInfo TreeView_signal_cursor_changed_info =
+{
+ "cursor-changed",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+
+const Glib::SignalProxyInfo TreeView_signal_columns_changed_info =
+{
+ "columns-changed",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+} // anonymous namespace
+
+// static
+GType Glib::Value<Gtk::TreeViewDropPosition>::value_type()
+{
+ return gtk_tree_view_drop_position_get_type();
+}
+
+
+namespace Glib
+{
+
+Gtk::TreeView* wrap(GtkTreeView* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::TreeView *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& TreeView_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &TreeView_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_tree_view_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void TreeView_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->set_scroll_adjustments = &set_scroll_adjustments_callback;
+ klass->row_activated = &row_activated_callback;
+ klass->test_expand_row = &test_expand_row_callback;
+ klass->test_collapse_row = &test_collapse_row_callback;
+ klass->row_expanded = &row_expanded_callback;
+ klass->row_collapsed = &row_collapsed_callback;
+ klass->cursor_changed = &cursor_changed_callback;
+ klass->columns_changed = &columns_changed_callback;
+}
+
+
+void TreeView_Class::set_scroll_adjustments_callback(GtkTreeView* self, GtkAdjustment* p0, GtkAdjustment* p1)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_set_scroll_adjustments(Glib::wrap(p0)
+, Glib::wrap(p1)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->set_scroll_adjustments)
+ (*base->set_scroll_adjustments)(self, p0, p1);
+ }
+}
+
+void TreeView_Class::row_activated_callback(GtkTreeView* self, GtkTreePath* p0, GtkTreeViewColumn* p1)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_row_activated(Gtk::TreePath(p0, true)
+, Glib::wrap(p1)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->row_activated)
+ (*base->row_activated)(self, p0, p1);
+ }
+}
+
+gboolean TreeView_Class::test_expand_row_callback(GtkTreeView* self, GtkTreeIter* p0, GtkTreePath* p1)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->on_test_expand_row(TreeModel::iterator(gtk_tree_view_get_model(self), p0)
+, Gtk::TreePath(p1, true)
+));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->test_expand_row)
+ return (*base->test_expand_row)(self, p0, p1);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean TreeView_Class::test_collapse_row_callback(GtkTreeView* self, GtkTreeIter* p0, GtkTreePath* p1)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->on_test_collapse_row(TreeModel::iterator(gtk_tree_view_get_model(self), p0)
+, Gtk::TreePath(p1, true)
+));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->test_collapse_row)
+ return (*base->test_collapse_row)(self, p0, p1);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+void TreeView_Class::row_expanded_callback(GtkTreeView* self, GtkTreeIter* p0, GtkTreePath* p1)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_row_expanded(TreeModel::iterator(gtk_tree_view_get_model(self), p0)
+, Gtk::TreePath(p1, true)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->row_expanded)
+ (*base->row_expanded)(self, p0, p1);
+ }
+}
+
+void TreeView_Class::row_collapsed_callback(GtkTreeView* self, GtkTreeIter* p0, GtkTreePath* p1)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_row_collapsed(TreeModel::iterator(gtk_tree_view_get_model(self), p0)
+, Gtk::TreePath(p1, true)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->row_collapsed)
+ (*base->row_collapsed)(self, p0, p1);
+ }
+}
+
+void TreeView_Class::cursor_changed_callback(GtkTreeView* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_cursor_changed();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->cursor_changed)
+ (*base->cursor_changed)(self);
+ }
+}
+
+void TreeView_Class::columns_changed_callback(GtkTreeView* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_columns_changed();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->columns_changed)
+ (*base->columns_changed)(self);
+ }
+}
+
+
+Glib::ObjectBase* TreeView_Class::wrap_new(GObject* o)
+{
+ return manage(new TreeView((GtkTreeView*)(o)));
+
+}
+
+
+/* The implementation: */
+
+TreeView::TreeView(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Container(construct_params)
+{
+ }
+
+TreeView::TreeView(GtkTreeView* castitem)
+:
+ Gtk::Container((GtkContainer*)(castitem))
+{
+ }
+
+TreeView::~TreeView()
+{
+ destroy_();
+}
+
+TreeView::CppClassType TreeView::treeview_class_; // initialize static member
+
+GType TreeView::get_type()
+{
+ return treeview_class_.init().get_type();
+}
+
+GType TreeView::get_base_type()
+{
+ return gtk_tree_view_get_type();
+}
+
+
+TreeView::TreeView()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Container(Glib::ConstructParams(treeview_class_.init()))
+{
+ }
+
+TreeView::TreeView(const Glib::RefPtr<TreeModel>& model)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Container(Glib::ConstructParams(treeview_class_.init(), "model", Glib::unwrap(model), (char*) 0))
+{
+ }
+
+Glib::RefPtr<TreeModel> TreeView::get_model()
+{
+
+ Glib::RefPtr<TreeModel> retvalue = Glib::wrap(gtk_tree_view_get_model(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const TreeModel> TreeView::get_model() const
+{
+
+ Glib::RefPtr<const TreeModel> retvalue = Glib::wrap(gtk_tree_view_get_model(const_cast<GtkTreeView*>(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+void TreeView::set_model(const Glib::RefPtr<TreeModel>& model)
+{
+ gtk_tree_view_set_model(gobj(), Glib::unwrap(model));
+}
+
+Glib::RefPtr<TreeSelection> TreeView::get_selection()
+{
+
+ Glib::RefPtr<TreeSelection> retvalue = Glib::wrap(gtk_tree_view_get_selection(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const TreeSelection> TreeView::get_selection() const
+{
+
+ Glib::RefPtr<const TreeSelection> retvalue = Glib::wrap(gtk_tree_view_get_selection(const_cast<GtkTreeView*>(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Adjustment* TreeView::get_hadjustment()
+{
+ return Glib::wrap(gtk_tree_view_get_hadjustment(gobj()));
+}
+
+const Adjustment* TreeView::get_hadjustment() const
+{
+ return Glib::wrap(gtk_tree_view_get_hadjustment(const_cast<GtkTreeView*>(gobj())));
+}
+
+void TreeView::set_hadjustment(Adjustment& adjustment)
+{
+ gtk_tree_view_set_hadjustment(gobj(), (adjustment).gobj());
+}
+
+Adjustment* TreeView::get_vadjustment()
+{
+ return Glib::wrap(gtk_tree_view_get_vadjustment(gobj()));
+}
+
+const Adjustment* TreeView::get_vadjustment() const
+{
+ return Glib::wrap(gtk_tree_view_get_vadjustment(const_cast<GtkTreeView*>(gobj())));
+}
+
+void TreeView::set_vadjustment(Adjustment& adjustment)
+{
+ gtk_tree_view_set_vadjustment(gobj(), (adjustment).gobj());
+}
+
+bool TreeView::get_headers_visible() const
+{
+ return gtk_tree_view_get_headers_visible(const_cast<GtkTreeView*>(gobj()));
+}
+
+void TreeView::set_headers_visible(bool headers_visible)
+{
+ gtk_tree_view_set_headers_visible(gobj(), static_cast<int>(headers_visible));
+}
+
+void TreeView::columns_autosize()
+{
+ gtk_tree_view_columns_autosize(gobj());
+}
+
+void TreeView::set_headers_clickable(bool setting)
+{
+ gtk_tree_view_set_headers_clickable(gobj(), static_cast<int>(setting));
+}
+
+void TreeView::set_rules_hint(bool setting)
+{
+ gtk_tree_view_set_rules_hint(gobj(), static_cast<int>(setting));
+}
+
+bool TreeView::get_rules_hint() const
+{
+ return gtk_tree_view_get_rules_hint(const_cast<GtkTreeView*>(gobj()));
+}
+
+int TreeView::append_column(TreeViewColumn& column)
+{
+ return gtk_tree_view_append_column(gobj(), (column).gobj());
+}
+
+int TreeView::remove_column(TreeViewColumn& column)
+{
+ return gtk_tree_view_remove_column(gobj(), (column).gobj());
+}
+
+int TreeView::insert_column(TreeViewColumn& column, int position)
+{
+ return gtk_tree_view_insert_column(gobj(), (column).gobj(), position);
+}
+
+TreeViewColumn* TreeView::get_column(int n)
+{
+ return Glib::wrap(gtk_tree_view_get_column(gobj(), n));
+}
+
+const TreeViewColumn* TreeView::get_column(int n) const
+{
+ return Glib::wrap(gtk_tree_view_get_column(const_cast<GtkTreeView*>(gobj()), n));
+}
+
+Glib::ListHandle<TreeViewColumn*> TreeView::get_columns()
+{
+ return Glib::ListHandle<TreeViewColumn*>(gtk_tree_view_get_columns(gobj()), Glib::OWNERSHIP_SHALLOW);
+}
+
+Glib::ListHandle<const TreeViewColumn*> TreeView::get_columns() const
+{
+ return Glib::ListHandle<const TreeViewColumn*>(gtk_tree_view_get_columns(const_cast<GtkTreeView*>(gobj())), Glib::OWNERSHIP_SHALLOW);
+}
+
+void TreeView::move_column_after(TreeViewColumn& column, TreeViewColumn& base_column)
+{
+ gtk_tree_view_move_column_after(gobj(), (column).gobj(), (base_column).gobj());
+}
+
+void TreeView::set_expander_column(TreeViewColumn& column)
+{
+ gtk_tree_view_set_expander_column(gobj(), (column).gobj());
+}
+
+TreeViewColumn* TreeView::get_expander_column()
+{
+ return Glib::wrap(gtk_tree_view_get_expander_column(gobj()));
+}
+
+const TreeViewColumn* TreeView::get_expander_column() const
+{
+ return Glib::wrap(gtk_tree_view_get_expander_column(const_cast<GtkTreeView*>(gobj())));
+}
+
+void TreeView::scroll_to_point(int tree_x, int tree_y)
+{
+ gtk_tree_view_scroll_to_point(gobj(), tree_x, tree_y);
+}
+
+void TreeView::row_activated(const TreeModel::Path& path, TreeViewColumn& column)
+{
+ gtk_tree_view_row_activated(gobj(), const_cast<GtkTreePath*>((path).gobj()), (column).gobj());
+}
+
+void TreeView::expand_all()
+{
+ gtk_tree_view_expand_all(gobj());
+}
+
+void TreeView::collapse_all()
+{
+ gtk_tree_view_collapse_all(gobj());
+}
+
+void TreeView::expand_to_path(const TreeModel::Path& path)
+{
+ gtk_tree_view_expand_to_path(gobj(), const_cast<GtkTreePath*>((path).gobj()));
+}
+
+bool TreeView::expand_row(const TreeModel::Path& path, bool open_all)
+{
+ return gtk_tree_view_expand_row(gobj(), const_cast<GtkTreePath*>((path).gobj()), static_cast<int>(open_all));
+}
+
+bool TreeView::collapse_row(const TreeModel::Path& path)
+{
+ return gtk_tree_view_collapse_row(gobj(), const_cast<GtkTreePath*>((path).gobj()));
+}
+
+bool TreeView::row_expanded(const TreeModel::Path& path)
+{
+ return gtk_tree_view_row_expanded(gobj(), const_cast<GtkTreePath*>((path).gobj()));
+}
+
+void TreeView::set_reorderable(bool reorderable)
+{
+ gtk_tree_view_set_reorderable(gobj(), static_cast<int>(reorderable));
+}
+
+bool TreeView::get_reorderable() const
+{
+ return gtk_tree_view_get_reorderable(const_cast<GtkTreeView*>(gobj()));
+}
+
+void TreeView::set_cursor(const TreeModel::Path& path, TreeViewColumn& focus_column, bool start_editing)
+{
+ gtk_tree_view_set_cursor(gobj(), const_cast<GtkTreePath*>((path).gobj()), (focus_column).gobj(), static_cast<int>(start_editing));
+}
+
+void TreeView::set_cursor(const TreeModel::Path& path, TreeViewColumn& focus_column, CellRenderer& focus_cell, bool start_editing)
+{
+ gtk_tree_view_set_cursor_on_cell(gobj(), const_cast<GtkTreePath*>((path).gobj()), (focus_column).gobj(), (focus_cell).gobj(), static_cast<int>(start_editing));
+}
+
+Glib::RefPtr<Gdk::Window> TreeView::get_bin_window()
+{
+
+ Glib::RefPtr<Gdk::Window> retvalue = Glib::wrap((GdkWindowObject*)(gtk_tree_view_get_bin_window(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const Gdk::Window> TreeView::get_bin_window() const
+{
+
+ Glib::RefPtr<const Gdk::Window> retvalue = Glib::wrap((GdkWindowObject*)(gtk_tree_view_get_bin_window(const_cast<GtkTreeView*>(gobj()))));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+void TreeView::get_cell_area(const TreeModel::Path& path, TreeViewColumn& column, Gdk::Rectangle& rect)
+{
+ gtk_tree_view_get_cell_area(gobj(), const_cast<GtkTreePath*>((path).gobj()), (column).gobj(), (rect).gobj());
+}
+
+void TreeView::get_background_area(const TreeModel::Path& path, TreeViewColumn& column, Gdk::Rectangle& rect)
+{
+ gtk_tree_view_get_background_area(gobj(), const_cast<GtkTreePath*>((path).gobj()), (column).gobj(), (rect).gobj());
+}
+
+void TreeView::get_visible_rect(Gdk::Rectangle& visible_rect)
+{
+ gtk_tree_view_get_visible_rect(gobj(), (visible_rect).gobj());
+}
+
+void TreeView::widget_to_tree_coords(int wx, int wy, int& tx, int& ty)
+{
+ gtk_tree_view_widget_to_tree_coords(gobj(), wx, wy, &tx, &ty);
+}
+
+void TreeView::tree_to_widget_coords(int tx, int ty, int& wx, int& wy)
+{
+ gtk_tree_view_tree_to_widget_coords(gobj(), tx, ty, &wx, &wy);
+}
+
+void TreeView::unset_rows_drag_source()
+{
+ gtk_tree_view_unset_rows_drag_source(gobj());
+}
+
+void TreeView::unset_rows_drag_dest()
+{
+ gtk_tree_view_unset_rows_drag_dest(gobj());
+}
+
+void TreeView::set_drag_dest_row(const TreeModel::Path& path, TreeViewDropPosition pos)
+{
+ gtk_tree_view_set_drag_dest_row(gobj(), const_cast<GtkTreePath*>((path).gobj()), ((GtkTreeViewDropPosition)(pos)));
+}
+
+Glib::RefPtr<Gdk::Pixmap> TreeView::create_row_drag_icon(const TreeModel::Path& path)
+{
+ return Glib::wrap((GdkPixmapObject*)(gtk_tree_view_create_row_drag_icon(gobj(), const_cast<GtkTreePath*>((path).gobj()))));
+}
+
+void TreeView::set_enable_search(bool enable_search)
+{
+ gtk_tree_view_set_enable_search(gobj(), static_cast<int>(enable_search));
+}
+
+bool TreeView::get_enable_search() const
+{
+ return gtk_tree_view_get_enable_search(const_cast<GtkTreeView*>(gobj()));
+}
+
+int TreeView::get_search_column() const
+{
+ return gtk_tree_view_get_search_column(const_cast<GtkTreeView*>(gobj()));
+}
+
+void TreeView::set_search_column(const TreeModelColumnBase& column)
+{
+ gtk_tree_view_set_search_column(gobj(), (column).index());
+}
+
+void TreeView::set_search_column(int column)
+{
+ gtk_tree_view_set_search_column(gobj(), column);
+}
+
+void TreeView::set_fixed_height_mode(bool enable)
+{
+ gtk_tree_view_set_fixed_height_mode(gobj(), static_cast<int>(enable));
+}
+
+bool TreeView::get_fixed_height_mode() const
+{
+ return gtk_tree_view_get_fixed_height_mode(const_cast<GtkTreeView*>(gobj()));
+}
+
+void TreeView::set_hover_selection(bool hover)
+{
+ gtk_tree_view_set_hover_selection(gobj(), static_cast<int>(hover));
+}
+
+bool TreeView::get_hover_selection() const
+{
+ return gtk_tree_view_get_hover_selection(const_cast<GtkTreeView*>(gobj()));
+}
+
+void TreeView::set_hover_expand(bool expand)
+{
+ gtk_tree_view_set_hover_expand(gobj(), static_cast<int>(expand));
+}
+
+bool TreeView::get_hover_expand() const
+{
+ return gtk_tree_view_get_hover_expand(const_cast<GtkTreeView*>(gobj()));
+}
+
+
+Glib::SignalProxy2< void,Adjustment*,Adjustment* > TreeView::signal_set_scroll_adjustments()
+{
+ return Glib::SignalProxy2< void,Adjustment*,Adjustment* >(this, &TreeView_signal_set_scroll_adjustments_info);
+}
+
+Glib::SignalProxy2< void,const TreeModel::Path&,TreeViewColumn* > TreeView::signal_row_activated()
+{
+ return Glib::SignalProxy2< void,const TreeModel::Path&,TreeViewColumn* >(this, &TreeView_signal_row_activated_info);
+}
+
+Glib::SignalProxy2< bool,const TreeModel::iterator&,const TreeModel::Path& > TreeView::signal_test_expand_row()
+{
+ return Glib::SignalProxy2< bool,const TreeModel::iterator&,const TreeModel::Path& >(this, &TreeView_signal_test_expand_row_info);
+}
+
+Glib::SignalProxy2< bool,const TreeModel::iterator&,const TreeModel::Path& > TreeView::signal_test_collapse_row()
+{
+ return Glib::SignalProxy2< bool,const TreeModel::iterator&,const TreeModel::Path& >(this, &TreeView_signal_test_collapse_row_info);
+}
+
+Glib::SignalProxy2< void,const TreeModel::iterator&,const TreeModel::Path& > TreeView::signal_row_expanded()
+{
+ return Glib::SignalProxy2< void,const TreeModel::iterator&,const TreeModel::Path& >(this, &TreeView_signal_row_expanded_info);
+}
+
+Glib::SignalProxy2< void,const TreeModel::iterator&,const TreeModel::Path& > TreeView::signal_row_collapsed()
+{
+ return Glib::SignalProxy2< void,const TreeModel::iterator&,const TreeModel::Path& >(this, &TreeView_signal_row_collapsed_info);
+}
+
+Glib::SignalProxy0< void > TreeView::signal_cursor_changed()
+{
+ return Glib::SignalProxy0< void >(this, &TreeView_signal_cursor_changed_info);
+}
+
+Glib::SignalProxy0< void > TreeView::signal_columns_changed()
+{
+ return Glib::SignalProxy0< void >(this, &TreeView_signal_columns_changed_info);
+}
+
+
+Glib::PropertyProxy< Glib::RefPtr<TreeModel> > TreeView::property_model()
+{
+ return Glib::PropertyProxy< Glib::RefPtr<TreeModel> >(this, "model");
+}
+
+Glib::PropertyProxy_ReadOnly< Glib::RefPtr<TreeModel> > TreeView::property_model() const
+{
+ return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<TreeModel> >(this, "model");
+}
+
+Glib::PropertyProxy<Adjustment*> TreeView::property_hadjustment()
+{
+ return Glib::PropertyProxy<Adjustment*>(this, "hadjustment");
+}
+
+Glib::PropertyProxy_ReadOnly<Adjustment*> TreeView::property_hadjustment() const
+{
+ return Glib::PropertyProxy_ReadOnly<Adjustment*>(this, "hadjustment");
+}
+
+Glib::PropertyProxy<Adjustment*> TreeView::property_vadjustment()
+{
+ return Glib::PropertyProxy<Adjustment*>(this, "vadjustment");
+}
+
+Glib::PropertyProxy_ReadOnly<Adjustment*> TreeView::property_vadjustment() const
+{
+ return Glib::PropertyProxy_ReadOnly<Adjustment*>(this, "vadjustment");
+}
+
+Glib::PropertyProxy<bool> TreeView::property_headers_visible()
+{
+ return Glib::PropertyProxy<bool>(this, "headers-visible");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> TreeView::property_headers_visible() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "headers-visible");
+}
+
+Glib::PropertyProxy<bool> TreeView::property_headers_clickable()
+{
+ return Glib::PropertyProxy<bool>(this, "headers-clickable");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> TreeView::property_headers_clickable() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "headers-clickable");
+}
+
+Glib::PropertyProxy<TreeViewColumn*> TreeView::property_expander_column()
+{
+ return Glib::PropertyProxy<TreeViewColumn*>(this, "expander-column");
+}
+
+Glib::PropertyProxy_ReadOnly<TreeViewColumn*> TreeView::property_expander_column() const
+{
+ return Glib::PropertyProxy_ReadOnly<TreeViewColumn*>(this, "expander-column");
+}
+
+Glib::PropertyProxy<bool> TreeView::property_reorderable()
+{
+ return Glib::PropertyProxy<bool>(this, "reorderable");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> TreeView::property_reorderable() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "reorderable");
+}
+
+Glib::PropertyProxy<bool> TreeView::property_rules_hint()
+{
+ return Glib::PropertyProxy<bool>(this, "rules-hint");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> TreeView::property_rules_hint() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "rules-hint");
+}
+
+Glib::PropertyProxy<bool> TreeView::property_enable_search()
+{
+ return Glib::PropertyProxy<bool>(this, "enable-search");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> TreeView::property_enable_search() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "enable-search");
+}
+
+Glib::PropertyProxy<int> TreeView::property_search_column()
+{
+ return Glib::PropertyProxy<int>(this, "search-column");
+}
+
+Glib::PropertyProxy_ReadOnly<int> TreeView::property_search_column() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "search-column");
+}
+
+Glib::PropertyProxy<bool> TreeView::property_fixed_height_mode()
+{
+ return Glib::PropertyProxy<bool>(this, "fixed-height-mode");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> TreeView::property_fixed_height_mode() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "fixed-height-mode");
+}
+
+Glib::PropertyProxy<bool> TreeView::property_hover_selection()
+{
+ return Glib::PropertyProxy<bool>(this, "hover-selection");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> TreeView::property_hover_selection() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "hover-selection");
+}
+
+Glib::PropertyProxy<bool> TreeView::property_hover_expand()
+{
+ return Glib::PropertyProxy<bool>(this, "hover-expand");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> TreeView::property_hover_expand() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "hover-expand");
+}
+
+
+void Gtk::TreeView::on_set_scroll_adjustments(Adjustment* hadjustment, Adjustment* vadjustment)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->set_scroll_adjustments)
+ (*base->set_scroll_adjustments)(gobj(),(GtkAdjustment*)Glib::unwrap(hadjustment),(GtkAdjustment*)Glib::unwrap(vadjustment));
+}
+
+void Gtk::TreeView::on_row_activated(const TreeModel::Path& path, TreeViewColumn* column)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->row_activated)
+ (*base->row_activated)(gobj(),const_cast<GtkTreePath*>((path).gobj()),(GtkTreeViewColumn*)Glib::unwrap(column));
+}
+
+bool Gtk::TreeView::on_test_expand_row(const TreeModel::iterator& iter, const TreeModel::Path& path)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->test_expand_row)
+ return (*base->test_expand_row)(gobj(),const_cast<GtkTreeIter*>((iter).gobj()),const_cast<GtkTreePath*>((path).gobj()));
+
+ typedef bool RType;
+ return RType();
+}
+
+bool Gtk::TreeView::on_test_collapse_row(const TreeModel::iterator& iter, const TreeModel::Path& path)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->test_collapse_row)
+ return (*base->test_collapse_row)(gobj(),const_cast<GtkTreeIter*>((iter).gobj()),const_cast<GtkTreePath*>((path).gobj()));
+
+ typedef bool RType;
+ return RType();
+}
+
+void Gtk::TreeView::on_row_expanded(const TreeModel::iterator& iter, const TreeModel::Path& path)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->row_expanded)
+ (*base->row_expanded)(gobj(),const_cast<GtkTreeIter*>((iter).gobj()),const_cast<GtkTreePath*>((path).gobj()));
+}
+
+void Gtk::TreeView::on_row_collapsed(const TreeModel::iterator& iter, const TreeModel::Path& path)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->row_collapsed)
+ (*base->row_collapsed)(gobj(),const_cast<GtkTreeIter*>((iter).gobj()),const_cast<GtkTreePath*>((path).gobj()));
+}
+
+void Gtk::TreeView::on_cursor_changed()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->cursor_changed)
+ (*base->cursor_changed)(gobj());
+}
+
+void Gtk::TreeView::on_columns_changed()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->columns_changed)
+ (*base->columns_changed)(gobj());
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/treeview.h b/libs/gtkmm2/gtk/gtkmm/treeview.h
new file mode 100644
index 0000000000..41a2bb9b9e
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/treeview.h
@@ -0,0 +1,1774 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TREEVIEW_H
+#define _GTKMM_TREEVIEW_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright(C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or(at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/listhandle.h>
+#include <gtkmm/container.h>
+#include <gtkmm/adjustment.h>
+#include <gdkmm/pixmap.h>
+#include <gtkmm/treeviewcolumn.h>
+#include <gtkmm/treeselection.h>
+#include <gtkmm/treemodelcolumn.h>
+#include <gtkmm/cellrenderer.h>
+#include <gtkmm/targetentry.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkTreeView GtkTreeView;
+typedef struct _GtkTreeViewClass GtkTreeViewClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class TreeView_Class; } // namespace Gtk
+namespace Gtk
+{
+
+
+/** @addtogroup gtkmmEnums Enums and Flags */
+
+/**
+ * @ingroup gtkmmEnums
+ */
+enum TreeViewDropPosition
+{
+ TREE_VIEW_DROP_BEFORE,
+ TREE_VIEW_DROP_AFTER,
+ TREE_VIEW_DROP_INTO_OR_BEFORE,
+ TREE_VIEW_DROP_INTO_OR_AFTER
+};
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::TreeViewDropPosition> : public Glib::Value_Enum<Gtk::TreeViewDropPosition>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+class TreeView;
+
+namespace TreeView_Private
+{
+/* This helper function is not a member of TreeView just for the reason that
+ * there are compilers that have problems compiling it otherwise. E.g. in gcc
+ * 2.95.3 a compiler bug prevents member functions from refering to specialized
+ * member function templates and that's what we do here: In function
+ * _connect_auto_store_editable_signal_handler we build a slot from
+ * TreeView::_auto_store_on_cellrenderer_*_edited. (The latter must be member
+ * functions of TreeView since we connect them to signals and we want the
+ * connections to vanish when the TreeView dies, of course.)
+ */
+ template <class ColumnType> inline
+ void _connect_auto_store_editable_signal_handler(Gtk::TreeView* this_p, Gtk::CellRenderer* pCellRenderer, const Gtk::TreeModelColumn<ColumnType>& model_column);
+
+ template<class ColumnType> inline
+ void _auto_store_on_cellrenderer_text_edited_string(const Glib::ustring& path_string, const Glib::ustring& new_text, int model_column, Gtk::TreeView*);
+
+ template <class ColumnType> inline
+ void _auto_store_on_cellrenderer_text_edited_numerical(const Glib::ustring& path_string, const Glib::ustring& new_text, int model_column, Gtk::TreeView*);
+
+ template <class ColumnType> inline
+ void _auto_cell_data_func(Gtk::CellRenderer* cell, const Gtk::TreeModel::iterator& iter, int model_column, const Glib::ustring& format);
+}
+
+#endif //DOXYGEN_SHOULD_SKIP_THIS
+
+
+//class TreeViewColumn;
+class TreeModel;
+
+/** @defgroup TreeView TreeView Classes
+ * These classes are used with the Gtk::TreeView widget.
+ */
+
+/** The TreeView widget displays the model (Gtk::TreeModel) data and allows the user to interact with it.
+ * The View can show all of the model's columns, or just some, and it can show them in various ways.
+ * You must provide the TreeModel in the constructor, or with set_model().
+ *
+ * Add View columns with append_column(), append_column_editable(), insert_column(), or insert_column_editable().
+ *
+ * You can manipulate the selection by obtaining the @link Gtk::TreeSelection Gtk::TreeView::Selection@endlink from get_selection().
+ *
+ * @ingroup Widgets
+ * @ingroup Containers
+ * @ingroup TreeView
+ */
+
+class TreeView : public Container
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef TreeView CppObjectType;
+ typedef TreeView_Class CppClassType;
+ typedef GtkTreeView BaseObjectType;
+ typedef GtkTreeViewClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~TreeView();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class TreeView_Class;
+ static CppClassType treeview_class_;
+
+ // noncopyable
+ TreeView(const TreeView&);
+ TreeView& operator=(const TreeView&);
+
+protected:
+ explicit TreeView(const Glib::ConstructParams& construct_params);
+ explicit TreeView(GtkTreeView* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkTreeView* gobj() { return reinterpret_cast<GtkTreeView*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkTreeView* gobj() const { return reinterpret_cast<GtkTreeView*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_set_scroll_adjustments(Adjustment* hadjustment, Adjustment* vadjustment);
+ virtual void on_row_activated(const TreeModel::Path& path, TreeViewColumn* column);
+ virtual bool on_test_expand_row(const TreeModel::iterator& iter, const TreeModel::Path& path);
+ virtual bool on_test_collapse_row(const TreeModel::iterator& iter, const TreeModel::Path& path);
+ virtual void on_row_expanded(const TreeModel::iterator& iter, const TreeModel::Path& path);
+ virtual void on_row_collapsed(const TreeModel::iterator& iter, const TreeModel::Path& path);
+ virtual void on_cursor_changed();
+ virtual void on_columns_changed();
+
+
+private:
+
+
+public:
+ /** A visible column in a Gtk::TreeView widget.
+ */
+ typedef TreeViewColumn Column;
+
+ /** A selection object for Gtk::TreeView.
+ */
+ typedef TreeSelection Selection;
+ /**
+ Default constructor
+ */
+ TreeView();
+ /**
+ Constructor that binds to a TreeModel
+ */
+ explicit TreeView(const Glib::RefPtr<TreeModel>& model);
+
+
+ /** Returns the model the the Gtk::TreeView is based on. Returns <tt>0</tt> if the
+ * model is unset.
+ * @return A Gtk::TreeModel, or <tt>0</tt> if none is currently being used.
+ */
+ Glib::RefPtr<TreeModel> get_model();
+
+ /** Returns the model the the Gtk::TreeView is based on. Returns <tt>0</tt> if the
+ * model is unset.
+ * @return A Gtk::TreeModel, or <tt>0</tt> if none is currently being used.
+ */
+ Glib::RefPtr<const TreeModel> get_model() const;
+
+ /** Sets the model for a Gtk::TreeView. If the @a tree_view already has a model
+ * set, it will remove it before setting the new model. If @a model is <tt>0</tt>,
+ * then it will unset the old model.
+ * @param model The model.
+ */
+ void set_model(const Glib::RefPtr<TreeModel>& model);
+
+ /** Gets the Gtk::TreeSelection associated with @a tree_view .
+ * @return A Gtk::TreeSelection object.
+ */
+ Glib::RefPtr<TreeSelection> get_selection();
+
+ /** Gets the Gtk::TreeSelection associated with @a tree_view .
+ * @return A Gtk::TreeSelection object.
+ */
+ Glib::RefPtr<const TreeSelection> get_selection() const;
+
+ /** Gets the Gtk::Adjustment currently being used for the horizontal aspect.
+ * @return A Gtk::Adjustment object, or <tt>0</tt> if none is currently being
+ * used.
+ */
+ Adjustment* get_hadjustment();
+
+ /** Gets the Gtk::Adjustment currently being used for the horizontal aspect.
+ * @return A Gtk::Adjustment object, or <tt>0</tt> if none is currently being
+ * used.
+ */
+ const Adjustment* get_hadjustment() const;
+
+ /** Sets the Gtk::Adjustment for the current horizontal aspect. See also unset_hadjustment().
+ * @param adjustment The Gtk::Adjustment to set.
+ */
+ void set_hadjustment(Adjustment& adjustment);
+
+ /** This method removes the hadjustment.
+ * @see set_hadjustment().
+ */
+ void unset_hadjustment();
+
+
+ /** Gets the Gtk::Adjustment currently being used for the vertical aspect.
+ * @return A Gtk::Adjustment object, or <tt>0</tt> if none is currently being
+ * used.
+ */
+ Adjustment* get_vadjustment();
+
+ /** Gets the Gtk::Adjustment currently being used for the vertical aspect.
+ * @return A Gtk::Adjustment object, or <tt>0</tt> if none is currently being
+ * used.
+ */
+ const Adjustment* get_vadjustment() const;
+
+ /** Sets the Gtk::Adjustment for the current vertical aspect. See also unset_vadjustment().
+ * @param adjustment The Gtk::Adjustment to set.
+ */
+ void set_vadjustment(Adjustment& adjustment);
+
+ /** This method removes the vadjustment.
+ * @see set_vadjustment().
+ */
+ void unset_vadjustment();
+
+
+ /** Returns <tt>true</tt> if the headers on the @a tree_view are visible.
+ * @return Whether the headers are visible or not.
+ */
+ bool get_headers_visible() const;
+
+ /** Sets the the visibility state of the headers.
+ * @param headers_visible <tt>true</tt> if the headers are visible.
+ */
+ void set_headers_visible(bool headers_visible);
+
+ /** Resizes all columns to their optimal width. Only works after the
+ * treeview has been realized.
+ */
+ void columns_autosize();
+
+ /** Allow the column title buttons to be clicked.
+ * @param setting <tt>true</tt> if the columns are clickable.
+ */
+ void set_headers_clickable(bool setting = true);
+
+ /** This function tells GTK+ that the user interface for your
+ * application requires users to read across tree rows and associate
+ * cells with one another. By default, GTK+ will then render the tree
+ * with alternating row colors. Do <em>not</em> use it
+ * just because you prefer the appearance of the ruled tree; that's a
+ * question for the theme. Some themes will draw tree rows in
+ * alternating colors even when rules are turned off, and users who
+ * prefer that appearance all the time can choose those themes. You
+ * should call this function only as a <em>semantic</em>
+ * hint to the theme engine that your tree makes alternating colors
+ * useful from a functional standpoint (since it has lots of columns,
+ * generally).
+ * @param setting <tt>true</tt> if the tree requires reading across rows.
+ */
+ void set_rules_hint(bool setting = true);
+
+ /** Gets the setting set by set_rules_hint().
+ * @return <tt>true</tt> if rules are useful for the user of this tree.
+ */
+ bool get_rules_hint() const;
+
+
+ /** Appends @a column to the list of columns. If @a tree_view has "fixed_height"
+ * mode enabled, then @a column must have its "sizing" property set to be
+ * GTK_TREE_VIEW_COLUMN_FIXED.
+ * @param column The Gtk::TreeViewColumn to add.
+ * @return The number of columns in @a tree_view after appending.
+ */
+ int append_column(TreeViewColumn& column);
+
+ /** Appends a View column with the appropriate CellRenderer for the Model column.
+ *
+ * The CellRenderer can only be created automatically for some basic
+ * column types, such as Glib::ustring, int, double, bool, and Gdk::Pixbuf.
+ * If the type is not supported then the following warning will be shown:
+ * GLib-GObject-WARNING **: unable to set property `text' of type
+ * `gchararray' from value of type `glibmm__CustomBoxed_t'.
+ *
+ * If the default formatting is not sufficient, or the numeric type is
+ * not supported, then you could use append_column_numeric(). Or you
+ * could create the TreeView::Column and/or CellRenderer
+ * manually and use TreeViewColumn::set_cell_data_func() to provide a callback
+ * that converts the model value into a string representation with .
+ *
+ * @param title The text to be used in the title header of this column.
+ * @param model_column The column in the TreeModel that will be rendered by this View column.
+ * @result The number of columns in the View after appending.
+ */
+ template <class ColumnType> inline
+ int append_column(const Glib::ustring& title, const TreeModelColumn<ColumnType>& model_column);
+
+ /** Like append_column(), but only for numeric types, which will be displayed in the specified format.
+ * This convenience template uses TreeView::Column::set_cell_data_func(), so the numeric formatting will
+ * be deactivated if you specify your own cell_data callback by calling set_cell_data_func() again.
+ *
+ * @param title The text to be used in the title header of this column.
+ * @param model_column The column in the TreeModel that will be rendered by this View column.
+ * @param format A printf-style format, such as "%d", used to create a text representation of the number.
+ * @result The number of columns in the View after appending.
+ */
+ template <class ColumnType> inline
+ int append_column_numeric(const Glib::ustring& title, const TreeModelColumn<ColumnType>& model_column, const Glib::ustring& format);
+
+ //TODO: danielk suggested use of Glib::Value to simplify/improve this.
+ /** Appends a View column with the appropriate CellRenderer for the Model
+ * column. The compiler will attempt to instantiate appropriate template
+ * code to automatically store user changes in the model. To intercept the
+ * user's change and implement non-default logic, or if the compiler can't
+ * instantiate appropriate code for your model type, you could use
+ * append_column() and connect a signal handler to the CellRenderer.
+ *
+ * @see append_column_numeric_editable().
+ *
+ * @param title The text to be used in the title header of this column.
+ * @param model_column The column in the TreeModel that will be rendered by this View column.
+ * @result The number of columns in the View after appending.
+ */
+ template <class ColumnType> inline
+ int append_column_editable(const Glib::ustring& title, const TreeModelColumn<ColumnType>& model_column);
+
+ /** Like append_column_editable(), but only for numeric types, which will be displayed in the specified format.
+ * This convenience template uses TreeView::Column::set_cell_data_func(), so the numeric formatting will
+ * be deactivated if you specify your own cell_data callback by calling set_cell_data_func() again.
+ *
+ * Note that the user's input will be interpreted as decimal (base 10), regardless of the @a format.
+ *
+ * @param title The text to be used in the title header of this column.
+ * @param model_column The column in the TreeModel that will be rendered by this View column.
+ * @param format A printf-style format, such as "%d", used to create a text representation of the number.
+ * @result The number of columns in the View after appending.
+ */
+ template <class ColumnType> inline
+ int append_column_numeric_editable(const Glib::ustring& title, const TreeModelColumn<ColumnType>& model_column, const Glib::ustring& format);
+
+
+ /// Creates a View column containing the CellRenderer, and appends it.
+ int append_column(const Glib::ustring& title, CellRenderer& cell);
+
+
+ /** Removes @a column from @a tree_view .
+ * @param column The Gtk::TreeViewColumn to remove.
+ * @return The number of columns in @a tree_view after removing.
+ */
+ int remove_column(TreeViewColumn& column);
+
+ /// Removes all View columns.
+ void remove_all_columns();
+
+
+ /** This inserts the @a column into the @a tree_view at @a position . If @a position is
+ * -1, then the column is inserted at the end. If @a tree_view has
+ * "fixed_height" mode enabled, then @a column must have its "sizing" property
+ * set to be GTK_TREE_VIEW_COLUMN_FIXED.
+ * @param column The Gtk::TreeViewColumn to be inserted.
+ * @param position The position to insert @a column in.
+ * @return The number of columns in @a tree_view after insertion.
+ */
+ int insert_column(TreeViewColumn& column, int position);
+
+ /** Creates a View column containing the CellRenderer, and inserts it.
+ *
+ * @param title The text to be used in the title header of this column.
+ * @param cell The CellRenderer.
+ * @param position The position at which the CellRenderer should be inserted.
+ * @result The number of columns in the View after inserting.
+ */
+ int insert_column(const Glib::ustring& title, CellRenderer& cell, int position);
+
+
+ /** Inserts a View column with the appropriate CellRenderer for the Model column.
+ *
+ * @param title The text to be used in the title header of this column.
+ * @param model_column The column in the TreeModel that will be rendered by this View column.
+ * @param position The position at which the CellRenderer should be inserted.
+ * @result The number of columns in the View after inserting.
+ */
+ template <class ColumnType> inline
+ int insert_column(const Glib::ustring& title, const TreeModelColumn<ColumnType>& model_column, int position);
+
+ /** Inserts a View column with the appropriate CellRenderer for the Model
+ * column. The compiler will attempt to instantiate appropriate template
+ * code to automatically store user changes in the model. To intercept the
+ * user's change and implement non-default logic, or if the compiler can't
+ * instantiate appropriate code for your model type, you should use
+ * append_column() and connect a signal handler to the CellRenderer.
+ *
+ * @param title The text to be used in the title header of this column.
+ * @param model_column The column in the TreeModel that will be rendered by this View column.
+ * @param position The position at which the CellRenderer should be inserted.
+ * @result The number of columns in the View after inserting.
+ */
+ template <class ColumnType> inline
+ int insert_column_editable(const Glib::ustring& title, const TreeModelColumn<ColumnType>& model_column, int position);
+
+ typedef TreeViewColumn::SlotCellData SlotCellData;
+
+ /**
+ * Inserts a new column into the TreeView with the given cell
+ * renderer and a SlotCellData to set cell renderer attributes
+ * (normally using data from the model).
+ *
+ * @param position Position to insert, -1 for append
+ * @param title column title
+ * @param cell cell renderer for column
+ * @param slot function to set attributes of cell renderer
+ * @return number of columns in the TreeView after the insert
+ */
+ int insert_column_with_data_func(int position, const Glib::ustring& title, CellRenderer& cell, const SlotCellData& slot);
+
+
+ /** Gets the Gtk::TreeViewColumn at the given position in the #tree_view.
+ * @param n The position of the column, counting from 0.
+ * @return The Gtk::TreeViewColumn, or <tt>0</tt> if the position is outside the
+ * range of columns.
+ */
+ TreeViewColumn* get_column(int n);
+
+ /** Gets the Gtk::TreeViewColumn at the given position in the #tree_view.
+ * @param n The position of the column, counting from 0.
+ * @return The Gtk::TreeViewColumn, or <tt>0</tt> if the position is outside the
+ * range of columns.
+ */
+ const TreeViewColumn* get_column(int n) const;
+
+ //The column index is of the view, not the model, so we do not need TreeViewColumn* get_column(TreeViewColumn& base_column).
+
+ /** Gets the CellRenderer for that column.
+ * You should dynamic_cast<> to the expected derived CellRenderer type.
+ * This assumes that the TreeViewColumn contains only one CellRenderer.
+ *
+ * @param n The position of the view column.
+ * @result The CellRenderer.
+ */
+ CellRenderer* get_column_cell_renderer(int n);
+
+ //TODO: Add TreeViewColumn* get_column_cell_renderer(TreeViewColumn& base_column); and a const one.
+
+
+ /** Gets the CellRenderer for that column.
+ * You should dynamic_cast<> to the expected derived CellRenderer type.
+ * This assumes that the TreeViewColumn contains only one CellRenderer.
+ *
+ * @param n The position of the view column.
+ * @result The CellRenderer.
+ */
+ const CellRenderer* get_column_cell_renderer(int n) const;
+
+
+ /** Returns a list of all the Gtk::TreeViewColumn s currently in @a tree_view .
+ * @return A list of Gtk::TreeViewColumn s.
+ */
+ Glib::ListHandle<TreeViewColumn*> get_columns();
+
+ /** Returns a list of all the Gtk::TreeViewColumn s currently in @a tree_view .
+ * @return A list of Gtk::TreeViewColumn s.
+ */
+ Glib::ListHandle<const TreeViewColumn*> get_columns() const;
+
+
+ /** Moves @a column to be after to @a base_column . See also move_column_to_start().
+ * @param column The Gtk::TreeViewColumn to be moved.
+ * @param base_column The Gtk::TreeViewColumn to be moved relative to.
+ */
+ void move_column_after(TreeViewColumn& column, TreeViewColumn& base_column);
+
+ /** This method moves column to the first position in the view.
+ *
+ * @param column The view column that will be moved
+ */
+ void move_column_to_start(TreeViewColumn& column);
+
+
+ /** Sets the column to draw the expander arrow at. It must be in the TreeView. See also reset_expander_column().
+ * @param column The column to draw the expander arrow at.
+ */
+ void set_expander_column(TreeViewColumn& column);
+
+ /** This method resets the expander arrow to the default - the first visible column.
+ * @see set_expander_column().
+ */
+ void reset_expander_column();
+
+
+ /** Returns the column that is the current expander column. This
+ * column has the expander arrow drawn next to it.
+ * @return The expander column.
+ */
+ TreeViewColumn* get_expander_column();
+
+ /** Returns the column that is the current expander column. This
+ * column has the expander arrow drawn next to it.
+ * @return The expander column.
+ */
+ const TreeViewColumn* get_expander_column() const;
+
+ /** For instance,
+ * bool on_column_drop(TreeView*, tree_view, TreeViewColumn* column, TreeViewColumn* prev_column, TreeViewColumn* next_column)
+ *
+ * This function is called on every column pair in turn at the beginning of a column drag to determine where a
+ * drop can take place. The arguments passed to the function are: the tree_view, the view Column being dragged,
+ * and the two view Columns determining the drop spot. If either of the view Column arguments for the drop spot
+ * are 0, then they indicate an edge.
+ */
+ typedef sigc::slot<bool, TreeView*, TreeViewColumn*, TreeViewColumn*, TreeViewColumn*> SlotColumnDrop;
+
+ /** Sets a callback slot for determining where a column may be dropped when dragged.
+ * This function is called on every column pair in turn at the beginning of a column drag to determine where a
+ * drop can take place. The arguments passed to the function are: the tree_view, the view Column being dragged,
+ * and the two view Columns determining the drop spot. If either of the view Column arguments for the drop spot
+ * are 0, then they indicate an edge.
+ *
+ * See unset_column_drag_function().
+ *
+ * @param slot A callback function to determine which columns are reorderable.
+ */
+ void set_column_drag_function(const SlotColumnDrop& slot);
+
+
+ /** See set_column_drag_function(). After this method has been called, the TreeView reverts to the default behavior of
+ * allowing all columns to be dropped everywhere.
+ */
+ void unset_column_drag_function();
+
+
+ /** Scrolls the tree view such that the top-left corner of the visible
+ * area is @a tree_x , @a tree_y , where @a tree_x and @a tree_y are specified
+ * in tree window coordinates. The @a tree_view must be realized before
+ * this function is called. If it isn't, you probably want to be
+ * using scroll_to_cell().
+ *
+ * If either @a tree_x or @a tree_y are -1, then that direction isn't scrolled.
+ * @param tree_x X coordinate of new top-left pixel of visible area, or -1.
+ * @param tree_y Y coordinate of new top-left pixel of visible area, or -1.
+ */
+ void scroll_to_point(int tree_x, int tree_y);
+
+ /** Moves the alignments of tree view to the position specified by @a column and @a path.
+ * @a row_align determines where the row is placed, and @a col_align determines where
+ * column is placed. Both are expected to be between 0.0 and 1.0. 0.0 means left/top
+ * alignment, 1.0 means right/bottom alignment, 0.5 means center.
+ *
+ * This function only works if the model is set, and @a path is a valid row on the model.
+ * If the model changes before the tree view is realized, the centered path will be
+ * modified to reflect this change.
+ *
+ * @param path The path of the row to move to.
+ * @param column The Gtk::TreeViewColumn to move horizontally to.
+ * @param row_align The vertical alignment of the row specified by @a path.
+ * @param col_align The horizontal alignment of the column specified by @a column.
+ */
+ void scroll_to_cell(const TreeModel::Path& path, TreeViewColumn& column, float row_align, float col_align);
+
+
+ /** Moves the alignments of tree view to the position specified by @a column and @a path.
+ * The tree does the minimum amount of work to scroll the cell onto the screen. This means
+ * that the cell will be scrolled to the edge closest to it's current position. If the cell
+ * is currently visible on the screen, nothing is done.
+ *
+ * This function only works if the model is set, and @a path is a valid row on the model.
+ * If the model changes before the tree_view is realized, the centered path will be modified
+ * to reflect this change.
+ *
+ * @param path The path of the row to move to.
+ * @param column The Gtk::TreeViewColumn to move horizontally to.
+ */
+ void scroll_to_cell(const TreeModel::Path& path, TreeViewColumn& column);
+
+ /** Moves the alignments of tree view to the position specified by @a path.
+ * @a row_align determines where the row is placed, and is expected to be between 0.0
+ * and 1.0. 0.0 means top alignment, 1.0 means bottom alignment, 0.5 means center.
+ *
+ * This function only works if the model is set, and @a path is a valid row on the model.
+ * If the model changes before the tree view is realized, the centered path will be
+ * modified to reflect this change.
+ *
+ * @param path The path of the row to move to.
+ * @param row_align The vertical alignment of the row specified by @a path.
+ */
+ void scroll_to_row(const TreeModel::Path& path, float row_align);
+
+ /** Moves the alignments of tree view to the position specified by @a path.
+ * The tree does the minimum amount of work to scroll the row onto the screen. This means
+ * that the row will be scrolled to the edge closest to it's current position. If the row
+ * is currently visible on the screen, nothing is done.
+ *
+ * This function only works if the model is set, and @a path is a valid row on the model.
+ * If the model changes before the tree view is realized, the centered path will be
+ * modified to reflect this change.
+ *
+ * @param path The path of the row to move to.
+ */
+ void scroll_to_row(const TreeModel::Path& path);
+
+ /** Moves the alignments of tree view to the position specified by @a column.
+ * @a col_align determines where the column is placed, and is expected to be between 0.0
+ * and 1.0. 0.0 means left alignment, 1.0 means right alignment, 0.5 means center.
+ *
+ * This function only works if the model is set. If the model changes before the tree
+ * view is realized, the centered path will be modified to reflect this change.
+ *
+ * @param column The Gtk::TreeViewColumn to move horizontally to.
+ * @param col_align The horizontal alignment of the column specified by @a column.
+ */
+ void scroll_to_column(TreeViewColumn& column, float col_align);
+
+ /** Moves the alignments of tree view to the position specified by @a column.
+ * The tree does the minimum amount of work to scroll the column onto the screen. This means
+ * that the column will be scrolled to the edge closest to it's current position. If the column
+ * is currently visible on the screen, nothing is done.
+ *
+ * This function only works if the model is set. If the model changes before the
+ * tree view is realized, the centered path will be modified to reflect this change.
+ *
+ * @param column The Gtk::TreeViewColumn to move horizontally to.
+ */
+ void scroll_to_column(TreeViewColumn& column);
+
+
+ /** Activates the cell determined by @a path and @a column .
+ * @param path The Gtk::TreePath to be activated.
+ * @param column The Gtk::TreeViewColumn to be activated.
+ */
+ void row_activated(const TreeModel::Path& path,TreeViewColumn& column);
+
+ /** Recursively expands all nodes in the @a tree_view .
+ */
+ void expand_all();
+
+ /** Recursively collapses all visible, expanded nodes in @a tree_view .
+ */
+ void collapse_all();
+
+ /** Expands the row at @a path . This will also expand all parent rows of
+ * @a path as necessary.
+ *
+ * Since: 2.2
+ * @param path Path to a row.
+ */
+ void expand_to_path(const TreeModel::Path& path);
+
+ /** Opens the row so its children are visible.
+ * @param path Path to a row.
+ * @param open_all Whether to recursively expand, or just expand immediate children.
+ * @return <tt>true</tt> if the row existed and had children.
+ */
+ bool expand_row(const TreeModel::Path& path, bool open_all);
+
+ /** Collapses a row (hides its child rows, if they exist).
+ * @param path Path to a row in the @a tree_view .
+ * @return <tt>true</tt> if the row was collapsed.
+ */
+ bool collapse_row(const TreeModel::Path& path);
+
+ /** For example,
+ * void on_map_expanded_rows(TreeView* tree_view, const TreeModel::Path& path);
+ */
+ typedef sigc::slot<void, TreeView*, const TreeModel::Path&> SlotMapping;
+
+ /** Calls the callback slot on all expanded rows.
+ * @param slot A callback function to be called.
+ */
+ void map_expanded_rows(const SlotMapping& slot);
+
+
+ /** Returns <tt>true</tt> if the node pointed to by @a path is expanded in @a tree_view .
+ * @param path A Gtk::TreePath to test expansion state.
+ * @return <tt>true</tt> if #path is expanded.
+ */
+ bool row_expanded(const TreeModel::Path& path);
+
+ /** This function is a convenience function to allow you to reorder models that
+ * support the Gtk::DragSourceIface and the Gtk::DragDestIface. Both
+ * Gtk::TreeStore and Gtk::ListStore support these. If @a reorderable is <tt>true</tt>, then
+ * the user can reorder the model by dragging and dropping rows. The
+ * developer can listen to these changes by connecting to the model's
+ * row_inserted and row_deleted signals.
+ *
+ * This function does not give you any degree of control over the order -- any
+ * reordering is allowed. If more control is needed, you should probably
+ * handle drag and drop manually.
+ * @param reorderable <tt>true</tt>, if the tree can be reordered.
+ */
+ void set_reorderable(bool reorderable = true);
+
+ /** Retrieves whether the user can reorder the tree via drag-and-drop. See
+ * set_reorderable().
+ * @return <tt>true</tt> if the tree can be reordered.
+ */
+ bool get_reorderable() const;
+
+ //TODO: Add set_cursor(path, ModelColumnBase&, start_editing)?
+
+ /** Sets the current keyboard focus to be at @a path , and selects it. This is
+ * useful when you want to focus the user's attention on a particular row. Focus is given to the column specified.
+ * Additionally, if @a start_editing is
+ * <tt>true</tt>, then editing should be started in the specified cell.
+ * This function is often followed by Gtk::Widget::grab_focus( @a tree_view )
+ * in order to give keyboard focus to the widget. Please note that editing
+ * can only happen when the widget is realized.
+ * @param path A Gtk::TreePath.
+ * @param focus_column A Gtk::TreeViewColumn.
+ * @param start_editing <tt>true</tt> if the specified cell should start being edited.
+ */
+ void set_cursor(const TreeModel::Path& path, TreeViewColumn& focus_column, bool start_editing = false);
+
+
+ /** Sets the current keyboard focus to be at @a path , and selects it. This is
+ * useful when you want to focus the user's attention on a particular row. If
+ * @a focus_column is not <tt>0</tt>, then focus is given to the column specified by
+ * it. If @a focus_column and @a focus_cell are not <tt>0</tt>, and @a focus_column
+ * contains 2 or more editable or activatable cells, then focus is given to
+ * the cell specified by @a focus_cell . Additionally, if @a focus_column is
+ * specified, and @a start_editing is <tt>true</tt>, then editing should be started in
+ * the specified cell. This function is often followed by
+ * @a gtk_widget_grab_focus ( @a tree_view ) in order to give keyboard focus to the
+ * widget. Please note that editing can only happen when the widget is
+ * realized.
+ *
+ * Since: 2.2
+ * @param path A Gtk::TreePath.
+ * @param focus_column A Gtk::TreeViewColumn, or <tt>0</tt>.
+ * @param focus_cell A Gtk::CellRenderer, or <tt>0</tt>.
+ * @param start_editing <tt>true</tt> if the specified cell should start being edited.
+ */
+ void set_cursor(const TreeModel::Path& path, TreeViewColumn& focus_column, CellRenderer& focus_cell, bool start_editing = false);
+
+
+ /** Sets the current keyboard focus to be at path , and selects it.
+ * This is useful when you want to focus the user's attention on a particular row.
+ * This function is often followed by Gtk::widget::grab_focus(tree_view)
+ * in order to give keyboard focus to the widget.
+ *
+ * @param path A reference to cursor path.
+ */
+ void set_cursor(const TreeModel::Path& path);
+
+ /** Fills in path and focus_column with the current path and focus column.
+ *
+ * @param path A reference to be filled with the current cursor path
+ * @param focus_column A reference to be filled with the current focus column
+ */
+ void get_cursor(TreeModel::Path& path, TreeViewColumn*& focus_column);
+
+/* Layout information */
+
+ /** Returns the window that @a tree_view renders to. This is used primarily to
+ * compare to <tt>event->window</tt> to confirm that the event on
+ * @a tree_view is on the right window.
+ * @return A Gdk::Window, or <tt>0</tt> when @a tree_view hasn't been realized yet.
+ */
+ Glib::RefPtr<Gdk::Window> get_bin_window();
+
+ /** Returns the window that @a tree_view renders to. This is used primarily to
+ * compare to <tt>event->window</tt> to confirm that the event on
+ * @a tree_view is on the right window.
+ * @return A Gdk::Window, or <tt>0</tt> when @a tree_view hasn't been realized yet.
+ */
+ Glib::RefPtr<const Gdk::Window> get_bin_window() const;
+
+ /** Finds the path at the point (x, y), relative to widget
+ * coordinates. It is primarily for things like popup menus.
+ *
+ * @param x The x position to be identified
+ * @param y The y position to be identified
+ * @param path A reference to a TreeModel::Path to be filled in
+ * @param column A reference to a TreeViewColumn pointer to be filled in
+ * @param cell_x A reference where the X coordinate relative to the cell
+ * can be placed
+ * @param cell_y A reference where the Y coordinate relative to the cell
+ * can be placed
+ * @return true if a row exists at that coordinate.
+ */
+ bool get_path_at_pos(int x, int y, TreeModel::Path& path, TreeViewColumn*& column, int& cell_x, int& cell_y);
+
+ /** Fills the bounding rectangle in tree window coordinates for the cell at the
+ * row specified by @a path and the column specified by @a column . If @a path points to a path not currently displayed, the @a y and @a height fields
+ * of the rectangle will be filled with 0. The sum of all cell rects does not cover the
+ * entire tree; there are extra pixels in between rows, for example. The
+ * returned rectangle is equivalent to the @a cell_area passed to
+ * Gtk::CellRenderer::render(). This function is only valid if #tree_view is
+ * realized.
+ * @param path A Gtk::TreePath for the row.
+ * @param column A Gtk::TreeViewColumn for the column.
+ * @param rect Rectangle to fill with cell rect.
+ */
+ void get_cell_area(const TreeModel::Path& path, TreeViewColumn& column, Gdk::Rectangle& rect);
+//We ignore the fact that one of the arguments can be 0 - it does not seem useful.
+
+
+ /** Fills the bounding rectangle in tree window coordinates for the cell at the
+ * row specified by @a path and the column specified by @a column . The returned rectangle is equivalent to the
+ * @a background_area passed to Gtk::CellRenderer::render(). These background
+ * areas tile to cover the entire tree window (except for the area used for
+ * header buttons). Contrast with the @a cell_area , returned by
+ * get_cell_area(), which returns only the cell itself, excluding
+ * surrounding borders and the tree expander area.
+ * @param path A Gtk::TreePath for the row.
+ * @param column A Gtk::TreeViewColumn for the column.
+ * @param rect Rectangle to fill with cell background rect.
+ */
+ void get_background_area(const TreeModel::Path& path, TreeViewColumn& column, Gdk::Rectangle& rect);
+ //We ignore the fact that one of the arguments can be 0 - it does not seem useful.
+
+
+ /** Fills @a visible_rect with the currently-visible region of the
+ * buffer, in tree coordinates. Convert to widget coordinates with
+ * tree_to_widget_coords(). Tree coordinates start at
+ * 0,0 for row 0 of the tree, and cover the entire scrollable area of
+ * the tree.
+ * @param visible_rect Rectangle to fill.
+ */
+ void get_visible_rect(Gdk::Rectangle& visible_rect);
+
+ /** Converts widget coordinates to coordinates for the
+ * tree window (the full scrollable area of the tree).
+ * @param wx Widget X coordinate.
+ * @param wy Widget Y coordinate.
+ * @param tx Return location for tree X coordinate.
+ * @param ty Return location for tree Y coordinate.
+ */
+ void widget_to_tree_coords(int wx, int wy, int& tx, int& ty);
+
+ /** Converts tree coordinates (coordinates in full scrollable area of the tree)
+ * to widget coordinates.
+ * @param tx Tree X coordinate.
+ * @param ty Tree Y coordinate.
+ * @param wx Return location for widget X coordinate.
+ * @param wy Return location for widget Y coordinate.
+ */
+ void tree_to_widget_coords(int tx, int ty, int& wx, int& wy);
+
+/* Drag-and-Drop support */
+
+
+ /**
+ * Turns the TreeView into a drag source for automatic DND.
+ *
+ * @param targets Standard container of targets that the drag will support.
+ * @param start_button_mask Mask of allowed buttons to start drag.
+ * @param actions The bitmask of possible actions for a drag from this widget.
+ */
+ void enable_model_drag_source(const ArrayHandle_TargetEntry& targets,
+ Gdk::ModifierType start_button_mask = Gdk::MODIFIER_MASK,
+ Gdk::DragAction actions = Gdk::ACTION_COPY | Gdk::ACTION_MOVE);
+
+ // Uses the default "GTK_TREE_MODEL_ROW" target, which the TreeView can handle automatically.
+
+ /** Turns the TreeView into a drag source for automatic DND.
+ *
+ * @param start_button_mask Mask of allowed buttons to start drag.
+ * @param actions The bitmask of possible actions for a drag from this widget.
+ */
+ void enable_model_drag_source(Gdk::ModifierType start_button_mask = Gdk::MODIFIER_MASK,
+ Gdk::DragAction actions = Gdk::ACTION_COPY | Gdk::ACTION_MOVE);
+
+
+ /** Turns the TreeViewinto a drop destination for automatic DND.
+ *
+ * @param targets The table of targets that the drag will support.
+ * @param actions The bitmask of possible actions for a drag from this widget.
+ */
+ void enable_model_drag_dest(const ArrayHandle_TargetEntry& targets, Gdk::DragAction actions = Gdk::ACTION_COPY | Gdk::ACTION_MOVE);
+
+ /** Turns the TreeView into a drop destination for automatic DND. This uses the default
+ * "GTK_TREE_MODEL_ROW" target, which the TreeView can handle automatically.
+ *
+ * @param actions The bitmask of possible actions for a drag from this widget.
+ */
+ void enable_model_drag_dest(Gdk::DragAction actions = Gdk::ACTION_COPY | Gdk::ACTION_MOVE);
+
+ /** Undoes the effect of enable_model_drag_source()
+ */
+
+ /** Undoes the effect of enable_model_drag_source().
+ */
+ void unset_rows_drag_source();
+
+ /** Undoes the effect of enable_model_drag_source()
+ */
+
+ /** Undoes the effect of enable_model_drag_dest().
+ */
+ void unset_rows_drag_dest();
+
+
+ /* These are useful to implement your own custom stuff. */
+
+ /** Sets the row that is highlighted for feedback.
+ *
+ * @param path The path of the row to highlight
+ * @param pos Specifies whether to drop before, after or into the row
+ */
+
+ /** Sets the row that is highlighted for feedback.
+ * @param path The path of the row to highlight, or <tt>0</tt>.
+ * @param pos Specifies whether to drop before, after or into the row.
+ */
+ void set_drag_dest_row(const TreeModel::Path& path, TreeViewDropPosition pos);
+
+ /** Gets information about the row that is highlighted for feedback.
+ *
+ * @param path Return location for the path of the highlighted row
+ * @param pos Return location for the drop position
+ */
+ void get_drag_dest_row(TreeModel::Path& path, TreeViewDropPosition& pos) const;
+
+ /** Determines the destination row for a given position.
+ *
+ * @param drag_x The x position to determine the destination row for
+ * @param drag_y The y position to determine the destination row for
+ * @param path Return location for the path of the highlighted row
+ * @param pos Return location for the drop position
+ */
+ bool get_dest_row_at_pos(int drag_x, int drag_y, TreeModel::Path& path, TreeViewDropPosition& pos) const;
+
+
+ /** Creates a Gdk::Pixmap representation of the row at @a path . This image is used
+ * for a drag icon.
+ * @param path A Gtk::TreePath in @a tree_view .
+ * @return A newly-allocated pixmap of the drag icon.
+ */
+ Glib::RefPtr<Gdk::Pixmap> create_row_drag_icon(const TreeModel::Path& path);
+
+/* Interactive search */
+
+ /** If @a enable_search is set, then the user can type in text to search through
+ * the tree interactively.
+ * @param enable_search <tt>true</tt>, if the user can search interactively.
+ */
+ void set_enable_search(bool enable_search = true);
+
+ /** Returns whether or not the tree allows interactive searching.
+ * @return Whether or not to let the user search interactively.
+ */
+ bool get_enable_search() const;
+
+ /** Gets the column searched on by the interactive search code.
+ * @return The column the interactive search code searches in.
+ */
+ int get_search_column() const;
+
+ /** Sets @a column as the column where the interactive search code should
+ * search in. Additionally, turns on interactive searching. Note that
+ * @a column refers to a column of the model.
+ * @param column The column of the model to search in.
+ */
+ void set_search_column(const TreeModelColumnBase& column);
+
+ /** Sets @a column as the column where the interactive search code should
+ * search in. Additionally, turns on interactive searching. Note that
+ * @a column refers to a column of the model.
+ * @param column The column of the model to search in.
+ */
+ void set_search_column(int column);
+
+ ///void on_search_equal(const Glib::RefPtr<TreeModel>& model, int column, const Glib::ustring& key, const TreeModel::iterator& iter)
+ typedef sigc::slot<bool, const Glib::RefPtr<TreeModel>&, int, const Glib::ustring&, const TreeModel::iterator&> SlotSearchEqual;
+ //SlotSearchEqual get_search_equal_func();
+
+
+ /** Sets the compare function for the interactive search capabilities.
+ *
+ * @param slot The compare function to use during the search
+ */
+ void set_search_equal_func(const SlotSearchEqual& slot);
+
+
+ /** Enables or disables the fixed height mode of @a tree_view .
+ * Fixed height mode speeds up Gtk::TreeView by assuming that all
+ * rows have the same height.
+ * Only enable this option if all rows are the same height and all
+ * columns are of type Gtk::TREE_VIEW_COLUMN_FIXED.
+ *
+ * Since: 2.6
+ * @param enable <tt>true</tt> to enable fixed height mode.
+ */
+ void set_fixed_height_mode(bool enable = true);
+
+ /** Returns whether fixed height mode is turned on for @a tree_view .
+ * @return <tt>true</tt> if @a tree_view is in fixed height mode
+ *
+ * Since: 2.6.
+ */
+ bool get_fixed_height_mode() const;
+
+ /** Enables of disables the hover selection mode of @a tree_view .
+ * Hover selection makes the selected row follow the pointer.
+ * Currently, this works only for the selection modes
+ * Gtk::SELECTION_SINGLE and Gtk::SELECTION_BROWSE.
+ *
+ * Since: 2.6
+ * @param hover <tt>true</tt> to enable hover selection mode.
+ */
+ void set_hover_selection(bool hover = true);
+
+ /** Returns whether hover selection mode is turned on for @a tree_view .
+ * @return <tt>true</tt> if @a tree_view is in hover selection mode
+ *
+ * Since: 2.6.
+ */
+ bool get_hover_selection() const;
+
+ /** Enables of disables the hover expansion mode of @a tree_view .
+ * Hover expansion makes rows expand or collaps if the pointer
+ * moves over them.
+ *
+ * Since: 2.6
+ * @param expand <tt>true</tt> to enable hover selection mode.
+ */
+ void set_hover_expand(bool expand = true);
+
+ /** Returns whether hover expansion mode is turned on for @a tree_view .
+ * @return <tt>true</tt> if @a tree_view is in hover expansion mode
+ *
+ * Since: 2.6.
+ */
+ bool get_hover_expand() const;
+
+ /** For instance,
+ * void on_row_separator(const Gtk::TreeModel& model, const Gtk::TreeModel::iterator& iter);
+ */
+ typedef sigc::slot<bool, const Glib::RefPtr<TreeModel>&, const TreeModel::iterator&> SlotRowSeparator;
+
+ void set_row_separator_func(const SlotRowSeparator& slot);
+
+
+ Glib::SignalProxy2< void,Adjustment*,Adjustment* > signal_set_scroll_adjustments();
+
+
+ Glib::SignalProxy2< void,const TreeModel::Path&,TreeViewColumn* > signal_row_activated();
+
+
+ Glib::SignalProxy2< bool,const TreeModel::iterator&,const TreeModel::Path& > signal_test_expand_row();
+
+
+ Glib::SignalProxy2< bool,const TreeModel::iterator&,const TreeModel::Path& > signal_test_collapse_row();
+
+
+ Glib::SignalProxy2< void,const TreeModel::iterator&,const TreeModel::Path& > signal_row_expanded();
+
+
+ Glib::SignalProxy2< void,const TreeModel::iterator&,const TreeModel::Path& > signal_row_collapsed();
+
+
+ Glib::SignalProxy0< void > signal_cursor_changed();
+
+
+ Glib::SignalProxy0< void > signal_columns_changed();
+
+
+ //Don't wrap these. They are keybinding signals, and their API broke for GTK+ 2.2.
+
+
+ /** The model for the tree view.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy< Glib::RefPtr<TreeModel> > property_model() ;
+
+/** The model for the tree view.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly< Glib::RefPtr<TreeModel> > property_model() const;
+
+ /** Horizontal Adjustment for the widget.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Adjustment*> property_hadjustment() ;
+
+/** Horizontal Adjustment for the widget.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Adjustment*> property_hadjustment() const;
+
+ /** Vertical Adjustment for the widget.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Adjustment*> property_vadjustment() ;
+
+/** Vertical Adjustment for the widget.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Adjustment*> property_vadjustment() const;
+
+ /** Show the column header buttons.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_headers_visible() ;
+
+/** Show the column header buttons.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_headers_visible() const;
+
+ /** Column headers respond to click events.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_headers_clickable() ;
+
+/** Column headers respond to click events.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_headers_clickable() const;
+
+ /** Set the column for the expander column.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<TreeViewColumn*> property_expander_column() ;
+
+/** Set the column for the expander column.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<TreeViewColumn*> property_expander_column() const;
+
+ /** View is reorderable.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_reorderable() ;
+
+/** View is reorderable.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_reorderable() const;
+
+ /** Set a hint to the theme engine to draw rows in alternating colors.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_rules_hint() ;
+
+/** Set a hint to the theme engine to draw rows in alternating colors.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_rules_hint() const;
+
+ /** View allows user to search through columns interactively.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_enable_search() ;
+
+/** View allows user to search through columns interactively.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_enable_search() const;
+
+ /** Model column to search through when searching through code.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_search_column() ;
+
+/** Model column to search through when searching through code.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_search_column() const;
+
+ /** Speeds up GtkTreeView by assuming that all rows have the same height.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_fixed_height_mode() ;
+
+/** Speeds up GtkTreeView by assuming that all rows have the same height.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_fixed_height_mode() const;
+
+ /** Whether the selection should follow the pointer.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_hover_selection() ;
+
+/** Whether the selection should follow the pointer.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_hover_selection() const;
+
+ /** Whether rows should be expanded/collapsed when the pointer moves over them.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_hover_expand() ;
+
+/** Whether rows should be expanded/collapsed when the pointer moves over them.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_hover_expand() const;
+
+
+ /// Get the treeview's model, but actually get the child model if it's a TreeModelFilter.
+ Glib::RefPtr<Gtk::TreeModel> _get_base_model();
+
+protected:
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ template<class ColumnType> friend
+ void _auto_store_on_cellrenderer_text_edited_string(const Glib::ustring& path_string, const Glib::ustring& new_text, int model_column, Gtk::TreeView*);
+
+ template <class ColumnType> friend
+ void _auto_store_on_cellrenderer_text_edited_numerical(const Glib::ustring& path_string, const Glib::ustring& new_text, int model_column, Gtk::TreeView*);
+
+ void _auto_store_on_cellrenderer_toggle_edited(const Glib::ustring& path_string, int model_column);
+
+ template<class ColumnType> friend
+ void TreeView_Private::_connect_auto_store_editable_signal_handler(TreeView*, CellRenderer*, const TreeModelColumn<ColumnType>&);
+
+#endif //DOXYGEN_SHOULD_SKIP_THIS
+
+
+};
+
+
+template <class ColumnType> inline
+int TreeView::append_column(const Glib::ustring& title, const TreeModelColumn<ColumnType>& model_column)
+{
+ // compilation will fail if there is no appropriate TreeViewColumn
+ // constructor for this model column type.
+ TreeViewColumn *const pViewColumn = Gtk::manage( new TreeViewColumn(title, model_column) );
+
+ return append_column(*pViewColumn);
+}
+
+//This is here because sigc::bind once did not work on all platforms, but now it does..
+#define GTKMM_HAVE_SIGC_BIND 1
+
+#ifdef GTKMM_HAVE_SIGC_BIND
+
+template <class ColumnType> inline
+int TreeView::append_column_numeric(const Glib::ustring& title, const TreeModelColumn<ColumnType>& model_column, const Glib::ustring& format)
+{
+ TreeViewColumn* const pViewColumn = Gtk::manage( new TreeViewColumn(title) );
+
+ //Use a CellRendererText:
+ //We don't use TreeView::Column::append_column(model_column) to generate an appropriate CellRenderer,
+ //because that uses set_renderer(), which renders the model value using the automatic glib "transformations" (number-string conversions). As well as being unnecessary here, those automatic conversions can't handle all numeric types.
+ CellRenderer* pCellRenderer = manage( new CellRendererText() );
+ pViewColumn->pack_start(*pCellRenderer);
+
+
+ //Some compilers don't like us to give the pointer to a template function directly to sigc::ptr_fun():
+ typedef void (*type_fptr)(Gtk::CellRenderer* cell, const Gtk::TreeModel::iterator& iter, int model_column, const Glib::ustring& format);
+ type_fptr fptr = TreeView_Private::_auto_cell_data_func<ColumnType>;
+
+ //Connect a cell_data callback, to show the number's text representation in the specified format:
+ //We use sigc::bind<-1> twice here, instead of sigc::bind() once, because some compilers need the extra hint.
+ Gtk::TreeViewColumn::SlotCellData slot = sigc::bind<-1>(
+ sigc::bind<-1>( sigc::ptr_fun(fptr), format),
+ model_column.index()
+ );
+
+ pViewColumn->set_cell_data_func(*pCellRenderer, slot);
+
+ return append_column(*pViewColumn);
+}
+
+#endif //GTKMM_HAVE_SIGC_BIND
+
+template <class ColumnType> inline
+int TreeView::append_column_numeric_editable(const Glib::ustring& title, const TreeModelColumn<ColumnType>& model_column, const Glib::ustring& format)
+{
+ int cols_count = append_column_numeric(title, model_column, format);
+
+ //connect signal handlers for auto-storing of edited cell data
+ //Note: This will only work for base-10 (decimal) formatted numbers:
+ CellRenderer *const cell = get_column_cell_renderer(cols_count - 1);
+ if(cell)
+ {
+ TreeView_Private::_connect_auto_store_editable_signal_handler<ColumnType>(this, cell, model_column);
+ }
+
+ return cols_count;
+}
+
+template <class ColumnType> inline
+int TreeView::append_column_editable(const Glib::ustring& title, const TreeModelColumn<ColumnType>& model_column)
+{
+ g_assert(model_column.type() != 0);
+
+ // compilation will fail if there is no appropriate TreeViewColumn
+ // constructor for this model column type.
+ TreeViewColumn *const pViewColumn = Gtk::manage( new TreeViewColumn(title, model_column) );
+
+ //connect signal handlers for auto-storing of edited cell data
+ CellRenderer* pCellRender = pViewColumn->get_first_cell_renderer();
+ TreeView_Private::_connect_auto_store_editable_signal_handler<ColumnType>(this, pCellRender, model_column);
+
+ return append_column(*pViewColumn);
+}
+
+template <class ColumnType> inline
+int TreeView::insert_column(const Glib::ustring& title, const TreeModelColumn<ColumnType>& model_column, int position)
+{
+ // compilation will fail if there is no appropriate TreeViewColumn
+ // constructor for this model column type.
+ TreeViewColumn *const pViewColumn = Gtk::manage( new TreeViewColumn(title, model_column) );
+
+ return insert_column(*pViewColumn, position);
+}
+
+template <class ColumnType> inline
+int TreeView::insert_column_editable(const Glib::ustring& title, const TreeModelColumn<ColumnType>& model_column, int position)
+{
+ // compilation will fail if there is no appropriate TreeViewColumn
+ // constructor for this model column type.
+ TreeViewColumn *const pViewColumn = Gtk::manage( new TreeViewColumn(title, model_column) );
+
+ //connect signal handlers for auto-storing of edited cell data
+ CellRenderer* pCellRender = pViewColumn->get_first_cell_renderer();
+ TreeView_Private::_connect_auto_store_editable_signal_handler(this, pCellRender, model_column);
+
+ return insert_column(*pViewColumn, position);
+}
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace TreeView_Private
+{
+
+//Template specializations, for different model column types:
+//TODO: Move these specializations into the .ccg file - I tried, but the int specialization was not used by the compiler. murrayc.
+
+#ifdef GTKMM_HAVE_SIGC_BIND
+
+//bool specialization:
+template<> inline
+void _connect_auto_store_editable_signal_handler(Gtk::TreeView* this_p, Gtk::CellRenderer* pCellRenderer, const Gtk::TreeModelColumn<bool>& model_column)
+{
+ Gtk::CellRendererToggle* pCellToggle = dynamic_cast<Gtk::CellRendererToggle*>(pCellRenderer);
+ if(pCellToggle)
+ {
+ //Set the appropriate property,
+ pCellToggle->property_activatable() = true;
+
+ //Connect to the appropriate signal, sending the model_column too,
+ pCellToggle->signal_toggled().connect(
+ sigc::bind<-1>( sigc::mem_fun(*this_p, &Gtk::TreeView::_auto_store_on_cellrenderer_toggle_edited), model_column.index()) );
+ //We use bind<1> instead of bind because some compilers need the extra hint.
+ }
+}
+
+//int specialization:
+template<> inline
+void _connect_auto_store_editable_signal_handler(Gtk::TreeView* this_p, Gtk::CellRenderer* pCellRenderer, const Gtk::TreeModelColumn<int>& model_column)
+{
+ Gtk::CellRendererText* pCellText = dynamic_cast<Gtk::CellRendererText*>(pCellRenderer);
+ if(pCellText)
+ {
+ //Set the appropriate property,
+ pCellText->property_editable() = true;
+
+ //Some compilers don't like us to give the pointer to a template function directly to sigc::ptr_fun():
+ typedef void (*type_fptr)(const Glib::ustring& path_string, const Glib::ustring& new_text, int model_column, Gtk::TreeView* this_p);
+ type_fptr fptr = _auto_store_on_cellrenderer_text_edited_numerical<int>;
+
+ //Connect to the appropriate signal, sending the model_column too,
+ //We use bind<-1> twice here, instead of using bind() once, because some compilers need the extra hint.
+ pCellText->signal_edited().connect(
+ sigc::bind<-1>(
+ sigc::bind<-1>( sigc::ptr_fun(fptr), this_p),
+ model_column.index()
+ )
+ );
+
+ }
+}
+
+//unsigned int specialization:
+template<> inline
+void _connect_auto_store_editable_signal_handler(Gtk::TreeView* this_p, Gtk::CellRenderer* pCellRenderer, const Gtk::TreeModelColumn<unsigned int>& model_column)
+{
+ Gtk::CellRendererText* pCellText = dynamic_cast<Gtk::CellRendererText*>(pCellRenderer);
+ if(pCellText)
+ {
+ //Set the appropriate property,
+ pCellText->property_editable() = true;
+
+ //Some compilers don't like us to give the pointer to a template function directly to sigc::ptr_fun():
+ typedef void (*type_fptr)(const Glib::ustring& path_string, const Glib::ustring& new_text, int model_column, Gtk::TreeView* this_p);
+ type_fptr fptr = _auto_store_on_cellrenderer_text_edited_numerical<unsigned int>;
+
+ //Connect to the appropriate signal, sending the model_column too,
+ //We use bind<-1> twice here, instead of using bind() once, because some compilers need the extra hint.
+ pCellText->signal_edited().connect(
+ sigc::bind<-1>(
+ sigc::bind<-1>( sigc::ptr_fun(fptr), this_p),
+ model_column.index()
+ )
+ );
+
+ }
+}
+
+//long specialization:
+template<> inline
+void _connect_auto_store_editable_signal_handler(Gtk::TreeView* this_p, Gtk::CellRenderer* pCellRenderer, const Gtk::TreeModelColumn<long>& model_column)
+{
+ Gtk::CellRendererText* pCellText = dynamic_cast<Gtk::CellRendererText*>(pCellRenderer);
+ if(pCellText)
+ {
+ //Set the appropriate property,
+ pCellText->property_editable() = true;
+
+ //Some compilers don't like us to give the pointer to a template function directly to sigc::ptr_fun():
+ typedef void (*type_fptr)(const Glib::ustring& path_string, const Glib::ustring& new_text, int model_column, Gtk::TreeView* this_p);
+ type_fptr fptr = _auto_store_on_cellrenderer_text_edited_numerical<long>;
+
+ //Connect to the appropriate signal, sending the model_column too,
+ //We use bind<-1> twice here, instead of using bind() once, because some compilers need the extra hint.
+ pCellText->signal_edited().connect(
+ sigc::bind<-1>(
+ sigc::bind<-1>( sigc::ptr_fun(fptr), this_p),
+ model_column.index()
+ )
+ );
+
+ }
+}
+
+//unsigned long specialization:
+template<> inline
+void _connect_auto_store_editable_signal_handler(Gtk::TreeView* this_p, Gtk::CellRenderer* pCellRenderer, const Gtk::TreeModelColumn<unsigned long>& model_column)
+{
+ Gtk::CellRendererText* pCellText = dynamic_cast<Gtk::CellRendererText*>(pCellRenderer);
+ if(pCellText)
+ {
+ //Set the appropriate property,
+ pCellText->property_editable() = true;
+
+ //Some compilers don't like us to give the pointer to a template function directly to sigc::ptr_fun():
+ typedef void (*type_fptr)(const Glib::ustring& path_string, const Glib::ustring& new_text, int model_column, Gtk::TreeView* this_p);
+ type_fptr fptr = _auto_store_on_cellrenderer_text_edited_numerical<unsigned long>;
+
+ //Connect to the appropriate signal, sending the model_column too,
+ //We use bind<-1> twice here, instead of using bind() once, because some compilers need the extra hint.
+ pCellText->signal_edited().connect(
+ sigc::bind<-1>(
+ sigc::bind<-1>( sigc::ptr_fun(fptr), this_p),
+ model_column.index()
+ )
+ );
+
+ }
+}
+
+//float specialization:
+template<> inline
+void _connect_auto_store_editable_signal_handler(Gtk::TreeView* this_p, Gtk::CellRenderer* pCellRenderer, const Gtk::TreeModelColumn<float>& model_column)
+{
+ Gtk::CellRendererText* pCellText = dynamic_cast<Gtk::CellRendererText*>(pCellRenderer);
+ if(pCellText)
+ {
+ //Set the appropriate property,
+ pCellText->property_editable() = true;
+
+ //Some compilers don't like us to give the pointer to a template function directly to sigc::ptr_fun():
+ typedef void (*type_fptr)(const Glib::ustring& path_string, const Glib::ustring& new_text, int model_column, Gtk::TreeView* this_p);
+ type_fptr fptr = _auto_store_on_cellrenderer_text_edited_numerical<float>;
+
+ //Connect to the appropriate signal, sending the model_column too,
+ //We use bind<-1> twice here, instead of using bind() once, because some compilers need the extra hint.
+ pCellText->signal_edited().connect(
+ sigc::bind<-1>(
+ sigc::bind<-1>( sigc::ptr_fun(fptr), this_p),
+ model_column.index()
+ )
+ );
+ }
+}
+
+//double specialization:
+template<> inline
+void _connect_auto_store_editable_signal_handler(Gtk::TreeView* this_p, Gtk::CellRenderer* pCellRenderer, const Gtk::TreeModelColumn<double>& model_column)
+{
+ Gtk::CellRendererText* pCellText = dynamic_cast<Gtk::CellRendererText*>(pCellRenderer);
+ if(pCellText)
+ {
+ //Set the appropriate property,
+ pCellText->property_editable() = true;
+
+ //Some compilers don't like us to give the pointer to a template function directly to sigc::ptr_fun():
+ typedef void (*type_fptr)(const Glib::ustring& path_string, const Glib::ustring& new_text, int model_column, Gtk::TreeView* this_p);
+ type_fptr fptr = _auto_store_on_cellrenderer_text_edited_numerical<double>;
+
+ //Connect to the appropriate signal, sending the model_column too,
+ //We use bind<-1> twice here, instead of using bind() once, because some compilers need the extra hint.
+ pCellText->signal_edited().connect(
+ sigc::bind<-1>(
+ sigc::bind<-1>( sigc::ptr_fun(fptr), this_p),
+ model_column.index()
+ )
+ );
+ }
+}
+
+#endif //GTKMM_HAVE_SIGC_BIND
+
+} // namespace TreeView_Private
+#endif //DOXYGEN_SHOULD_SKIP_THIS
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace TreeView_Private
+{
+
+#ifdef GTKMM_HAVE_SIGC_BIND
+
+template <class ColumnType> inline
+void _connect_auto_store_editable_signal_handler(Gtk::TreeView* this_p, Gtk::CellRenderer* pCellRenderer, const Gtk::TreeModelColumn<ColumnType>& model_column)
+{
+ g_assert(model_column.type() != 0);
+
+ //The different CellRenderers have different "edited" signals,
+ //and numerical values need to convert the text value to a number,
+ //so there are specializations for this tempate.
+
+ Gtk::CellRendererText* pCellText = dynamic_cast<Gtk::CellRendererText*>(pCellRenderer);
+
+ //Set the appropriate property,
+ //and connect to the appropriate signal, sending the model_column too,
+ if(pCellText)
+ {
+ pCellText->property_editable() = true;
+
+ //Some compilers (IRIX MipsPro) don't like us to give the pointer to a template function directly to sigc::ptr_fun():
+ typedef void (*type_func)(const Glib::ustring&, const Glib::ustring&, int, Gtk::TreeView*);
+ type_func func = &(_auto_store_on_cellrenderer_text_edited_string<ColumnType>);
+ sigc::slot<void, const Glib::ustring&, const Glib::ustring&, int, Gtk::TreeView*> theslot =
+ sigc::ptr_fun(func);
+
+ //We use bind<-1> twice here, instead of using bind() once, because some compilers need the extra hint.
+ pCellText->signal_edited().connect(
+ sigc::bind<-1>(
+ sigc::bind<-1>( theslot, this_p),
+ model_column.index()
+ )
+ );
+
+
+ }
+}
+
+#endif //GTKMM_HAVE_SIGC_BIND
+
+template <class ColumnType> inline
+void _auto_store_on_cellrenderer_text_edited_string(const Glib::ustring& path_string, const Glib::ustring& new_text, int model_column, Gtk::TreeView* this_p)
+{
+ Gtk::TreePath path(path_string);
+
+ //Get the row from the path:
+ Glib::RefPtr<TreeModel> refModel = this_p->_get_base_model();
+ Gtk::TreeModel::iterator iter = refModel->get_iter(path);
+ if(iter)
+ {
+ //Store the user's new text in the model:
+ Gtk::TreeRow row = *iter;
+ row.set_value(model_column, (ColumnType)new_text);
+ }
+}
+
+template <class ColumnType> inline
+void _auto_store_on_cellrenderer_text_edited_numerical(const Glib::ustring& path_string, const Glib::ustring& new_text, int model_column, Gtk::TreeView* this_p)
+{
+ //This is used on numerical model columns:
+
+ Gtk::TreePath path(path_string);
+
+ //Get the row from the path:
+ Glib::RefPtr<TreeModel> refModel = this_p->_get_base_model();
+ Gtk::TreeModel::iterator iter = refModel->get_iter(path);
+ if(iter)
+ {
+ //std::istringstream astream(new_text); //Put it in a stream.
+ //ColumnType new_value = ColumnType();
+ //new_value << astream; //Get it out of the stream as the numerical type.
+
+ //Convert the text to a number, using the same logic used by GtkCellRendererText when it stores numbers.
+ char* pchEnd = 0;
+ ColumnType new_value = static_cast<ColumnType>( strtod(new_text.c_str(), &pchEnd) );
+
+ //Store the user's new text in the model:
+ Gtk::TreeRow row = *iter;
+ row.set_value(model_column, (ColumnType)new_value);
+ }
+}
+
+template <class ColumnType> inline
+void _auto_cell_data_func(Gtk::CellRenderer* cell, const Gtk::TreeModel::iterator& iter, int model_column, const Glib::ustring& format)
+{
+ Gtk::CellRendererText* pTextRenderer = dynamic_cast<Gtk::CellRendererText*>(cell);
+ if(!pTextRenderer)
+ {
+ g_warning("gtkmm: TextView: append_column_numeric() was used with a non-numeric type.");
+ }
+ else
+ {
+ if(iter)
+ {
+ //Get the value from the model.
+ Gtk::TreeModel::Row row = *iter;
+ ColumnType value = ColumnType();
+ row.get_value(model_column, value);
+
+ //Convert it to a string representation:
+ char buff[20];
+ int used = g_snprintf(buff, sizeof(buff), format.c_str(), value); //value must be a numeric type.
+ if(used > 0)
+ {
+ //Show the text representation in the view:
+ pTextRenderer->property_text() = buff;
+ }
+ }
+ }
+}
+
+} // namespace TreeView_Private
+#endif //DOXYGEN_SHOULD_SKIP_THIS
+
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::TreeView
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::TreeView* wrap(GtkTreeView* object, bool take_copy = false);
+}
+#endif /* _GTKMM_TREEVIEW_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/treeview_private.cc b/libs/gtkmm2/gtk/gtkmm/treeview_private.cc
new file mode 100644
index 0000000000..a18fce35f8
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/treeview_private.cc
@@ -0,0 +1,94 @@
+/* $Id$ */
+
+/* Copyright(C) 2001-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or(at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/treeview_private.h>
+#include <glibmm.h>
+
+
+namespace Gtk
+{
+
+namespace TreeView_Private
+{
+
+SignalProxy_CellData::SignalProxy_CellData(const SlotType& slot)
+:
+ slot_ (slot)
+{}
+
+SignalProxy_CellData::~SignalProxy_CellData()
+{}
+
+void SignalProxy_CellData::gtk_callback(GtkTreeViewColumn*, GtkCellRenderer* cell,
+ GtkTreeModel* model, GtkTreeIter* iter, void* data)
+{
+ SignalProxy_CellData *const self = static_cast<SignalProxy_CellData*>(data);
+
+ try
+ {
+ // use Slot::operator()
+ (self->slot_)(Glib::wrap(cell, false), TreeIter(model, iter));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+}
+
+void SignalProxy_CellData::gtk_callback_destroy(void* data)
+{
+ delete static_cast<SignalProxy_CellData*>(data);
+}
+
+
+
+SignalProxy_RowSeparator::SignalProxy_RowSeparator(const SlotType& slot)
+:
+ slot_ (slot)
+{}
+
+SignalProxy_RowSeparator::~SignalProxy_RowSeparator()
+{}
+
+gboolean SignalProxy_RowSeparator::gtk_callback(GtkTreeModel* model, GtkTreeIter* iter, void* data)
+{
+ SignalProxy_RowSeparator *const self = static_cast<SignalProxy_RowSeparator*>(data);
+
+ try
+ {
+ return (self->slot_)(Glib::wrap(model, true), Gtk::TreeIter(model, iter));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+
+ return 0; // arbitrary value
+}
+
+void SignalProxy_RowSeparator::gtk_callback_destroy(void* data)
+{
+ delete static_cast<SignalProxy_RowSeparator*>(data);
+}
+
+
+} // namespace TreeView_Private
+
+} // namespace Gtk
+
diff --git a/libs/gtkmm2/gtk/gtkmm/treeview_private.h b/libs/gtkmm2/gtk/gtkmm/treeview_private.h
new file mode 100644
index 0000000000..418abe3a69
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/treeview_private.h
@@ -0,0 +1,77 @@
+#ifndef _GTKMM_TREEVIEW_PRIVATE_H
+#define _GTKMM_TREEVIEW_PRIVATE_H
+/* $Id$ */
+
+
+/* treeview.h
+ *
+ * Copyright(C) 2001-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or(at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/treeviewcolumn.h>
+#include <gtkmm/treeview.h>
+
+namespace Gtk
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace TreeView_Private
+{
+
+//This Signal Proxy allows the C++ coder to specify a sigc::slot instead of a static function.
+class SignalProxy_CellData
+{
+public:
+ typedef TreeViewColumn::SlotCellData SlotType;
+
+ SignalProxy_CellData(const SlotType& slot);
+ ~SignalProxy_CellData();
+
+ static void gtk_callback(GtkTreeViewColumn*, GtkCellRenderer* cell,
+ GtkTreeModel* model, GtkTreeIter* iter, void* data);
+ static void gtk_callback_destroy(void* data);
+
+protected:
+ SlotType slot_;
+};
+
+//SignalProxy_RowSeparator:
+
+//This Signal Proxy allows the C++ coder to specify a sigc::slot instead of a static function.
+class SignalProxy_RowSeparator
+{
+public:
+ typedef TreeView::SlotRowSeparator SlotType;
+
+ SignalProxy_RowSeparator(const SlotType& slot);
+ ~SignalProxy_RowSeparator();
+
+ static gboolean gtk_callback(GtkTreeModel* model, GtkTreeIter* iter, void* data);
+ static void gtk_callback_destroy(void* data);
+
+protected:
+ SlotType slot_;
+};
+
+
+} /* namespace TreeView_Private */
+#endif //DOXYGEN_SHOULD_SKIP_THIS
+
+} /* namespace Gtk */
+
+
+#endif /* _GTKMM_TREEVIEW_PRIVATE_H */
diff --git a/libs/gtkmm2/gtk/gtkmm/treeviewcolumn.cc b/libs/gtkmm2/gtk/gtkmm/treeviewcolumn.cc
new file mode 100644
index 0000000000..9a726fd39b
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/treeviewcolumn.cc
@@ -0,0 +1,663 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/treeviewcolumn.h>
+#include <gtkmm/private/treeviewcolumn_p.h>
+
+#include <gtk/gtktypebuiltins.h>
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtktreeviewcolumn.h>
+#include <gtkmm/treeview_private.h>
+
+namespace Gtk
+{
+
+// Only necessary because of the templated ctor, see .hg file.
+const Glib::Class& TreeViewColumn::class_init_()
+{
+ return treeviewcolumn_class_.init();
+}
+
+TreeViewColumn::TreeViewColumn(const Glib::ustring& title)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Object(Glib::ConstructParams(treeviewcolumn_class_.init(), "title",title.c_str(), (char*) 0))
+{}
+
+TreeViewColumn::TreeViewColumn(const Glib::ustring& title, Gtk::CellRenderer& cell)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Object(Glib::ConstructParams(treeviewcolumn_class_.init(), "title",title.c_str(), (char*) 0))
+{
+ //This is equivalent to _gtk_tree_view_column_new_with_attributes().
+ //You will also need to call add_atrribute(), or set_renderer() a few times.
+
+ pack_start(cell, true);
+}
+
+void TreeViewColumn::add_attribute(const Glib::PropertyProxy_Base& property,
+ const TreeModelColumnBase& column)
+{
+ gtk_tree_view_column_add_attribute(gobj(),
+ (GtkCellRenderer*) property.get_object()->gobj(), property.get_name(), column.index());
+}
+
+void TreeViewColumn::set_renderer(Gtk::CellRenderer& renderer, const TreeModelColumnBase& column)
+{
+ add_attribute(renderer._property_renderable(), column);
+}
+
+
+void TreeViewColumn::set_cell_data_func(CellRenderer& cell_renderer, const SlotCellData& slot)
+{
+ //Create a signal proxy. A pointer to this will be passed through the callback's data parameter.
+ //It will be deleted when TreeView_Private::SignalProxy_CellData::gtk_callback_destroy() is called.
+ TreeView_Private::SignalProxy_CellData* pSignalProxy = new TreeView_Private::SignalProxy_CellData(slot);
+
+ gtk_tree_view_column_set_cell_data_func(
+ gobj(), cell_renderer.gobj(),
+ &TreeView_Private::SignalProxy_CellData::gtk_callback, pSignalProxy,
+ &TreeView_Private::SignalProxy_CellData::gtk_callback_destroy);
+}
+
+void TreeViewColumn::unset_cell_data_func(CellRenderer& cell_renderer)
+{
+ gtk_tree_view_column_set_cell_data_func(gobj(), cell_renderer.gobj(), 0, 0, 0);
+}
+
+CellRenderer* TreeViewColumn::get_first_cell_renderer()
+{
+ typedef std::vector<Gtk::CellRenderer*> type_vecCellRenderers;
+ type_vecCellRenderers vecCellRenderers = get_cell_renderers();
+ if(!vecCellRenderers.empty())
+ return vecCellRenderers[0];
+ else
+ return 0;
+}
+
+const CellRenderer* TreeViewColumn::get_first_cell_renderer() const
+{
+ //Do some const_cast-ing to avoid repetition of code:
+ return const_cast<TreeViewColumn*>(this)->get_first_cell_renderer();
+}
+
+//deprecated:
+void TreeViewColumn::set_sort_column_id(const TreeModelColumnBase& sort_column)
+{
+ set_sort_column(sort_column);
+}
+
+//deprecated:
+void TreeViewColumn::set_sort_column_id(int sort_column_id)
+{
+ set_sort_column(sort_column_id);
+}
+
+} // namespace Gtk
+
+
+namespace
+{
+
+const Glib::SignalProxyInfo TreeViewColumn_signal_clicked_info =
+{
+ "clicked",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+} // anonymous namespace
+
+// static
+GType Glib::Value<Gtk::TreeViewColumnSizing>::value_type()
+{
+ return gtk_tree_view_column_sizing_get_type();
+}
+
+
+namespace Glib
+{
+
+Gtk::TreeViewColumn* wrap(GtkTreeViewColumn* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::TreeViewColumn *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& TreeViewColumn_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &TreeViewColumn_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_tree_view_column_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void TreeViewColumn_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->clicked = &clicked_callback;
+}
+
+
+void TreeViewColumn_Class::clicked_callback(GtkTreeViewColumn* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_clicked();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->clicked)
+ (*base->clicked)(self);
+ }
+}
+
+
+Glib::ObjectBase* TreeViewColumn_Class::wrap_new(GObject* o)
+{
+ return manage(new TreeViewColumn((GtkTreeViewColumn*)(o)));
+
+}
+
+
+/* The implementation: */
+
+TreeViewColumn::TreeViewColumn(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Object(construct_params)
+{
+ }
+
+TreeViewColumn::TreeViewColumn(GtkTreeViewColumn* castitem)
+:
+ Gtk::Object((GtkObject*)(castitem))
+{
+ }
+
+TreeViewColumn::~TreeViewColumn()
+{
+ destroy_();
+}
+
+TreeViewColumn::CppClassType TreeViewColumn::treeviewcolumn_class_; // initialize static member
+
+GType TreeViewColumn::get_type()
+{
+ return treeviewcolumn_class_.init().get_type();
+}
+
+GType TreeViewColumn::get_base_type()
+{
+ return gtk_tree_view_column_get_type();
+}
+
+
+TreeViewColumn::TreeViewColumn()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Object(Glib::ConstructParams(treeviewcolumn_class_.init()))
+{
+ }
+
+void TreeViewColumn::pack_start(CellRenderer& cell, bool expand)
+{
+ gtk_tree_view_column_pack_start(gobj(), (cell).gobj(), static_cast<int>(expand));
+}
+
+void TreeViewColumn::pack_end(CellRenderer& cell, bool expand)
+{
+ gtk_tree_view_column_pack_end(gobj(), (cell).gobj(), static_cast<int>(expand));
+}
+
+void TreeViewColumn::clear()
+{
+ gtk_tree_view_column_clear(gobj());
+}
+
+Glib::ListHandle<CellRenderer*> TreeViewColumn::get_cell_renderers()
+{
+ return Glib::ListHandle<CellRenderer*>(gtk_tree_view_column_get_cell_renderers(gobj()), Glib::OWNERSHIP_SHALLOW);
+}
+
+Glib::ListHandle<const CellRenderer*> TreeViewColumn::get_cell_renderers() const
+{
+ return Glib::ListHandle<const CellRenderer*>(gtk_tree_view_column_get_cell_renderers(const_cast<GtkTreeViewColumn*>(gobj())), Glib::OWNERSHIP_SHALLOW);
+}
+
+void TreeViewColumn::add_attribute(CellRenderer& cell_renderer, const Glib::ustring& attribute, int column)
+{
+ gtk_tree_view_column_add_attribute(gobj(), (cell_renderer).gobj(), attribute.c_str(), column);
+}
+
+void TreeViewColumn::clear_attributes(CellRenderer& cell_renderer)
+{
+ gtk_tree_view_column_clear_attributes(gobj(), (cell_renderer).gobj());
+}
+
+void TreeViewColumn::set_spacing(int spacing)
+{
+ gtk_tree_view_column_set_spacing(gobj(), spacing);
+}
+
+int TreeViewColumn::get_spacing() const
+{
+ return gtk_tree_view_column_get_spacing(const_cast<GtkTreeViewColumn*>(gobj()));
+}
+
+void TreeViewColumn::set_visible(bool visible)
+{
+ gtk_tree_view_column_set_visible(gobj(), static_cast<int>(visible));
+}
+
+bool TreeViewColumn::get_visible() const
+{
+ return gtk_tree_view_column_get_visible(const_cast<GtkTreeViewColumn*>(gobj()));
+}
+
+void TreeViewColumn::set_resizable(bool resizable)
+{
+ gtk_tree_view_column_set_resizable(gobj(), static_cast<int>(resizable));
+}
+
+bool TreeViewColumn::get_resizable() const
+{
+ return gtk_tree_view_column_get_resizable(const_cast<GtkTreeViewColumn*>(gobj()));
+}
+
+void TreeViewColumn::set_sizing(TreeViewColumnSizing type)
+{
+ gtk_tree_view_column_set_sizing(gobj(), ((GtkTreeViewColumnSizing)(type)));
+}
+
+TreeViewColumnSizing TreeViewColumn::get_sizing()
+{
+ return ((TreeViewColumnSizing)(gtk_tree_view_column_get_sizing(gobj())));
+}
+
+int TreeViewColumn::get_width() const
+{
+ return gtk_tree_view_column_get_width(const_cast<GtkTreeViewColumn*>(gobj()));
+}
+
+int TreeViewColumn::get_fixed_width() const
+{
+ return gtk_tree_view_column_get_fixed_width(const_cast<GtkTreeViewColumn*>(gobj()));
+}
+
+void TreeViewColumn::set_fixed_width(int fixed_width)
+{
+ gtk_tree_view_column_set_fixed_width(gobj(), fixed_width);
+}
+
+void TreeViewColumn::set_min_width(int min_width)
+{
+ gtk_tree_view_column_set_min_width(gobj(), min_width);
+}
+
+int TreeViewColumn::get_min_width() const
+{
+ return gtk_tree_view_column_get_min_width(const_cast<GtkTreeViewColumn*>(gobj()));
+}
+
+void TreeViewColumn::set_max_width(int max_width)
+{
+ gtk_tree_view_column_set_max_width(gobj(), max_width);
+}
+
+int TreeViewColumn::get_max_width() const
+{
+ return gtk_tree_view_column_get_max_width(const_cast<GtkTreeViewColumn*>(gobj()));
+}
+
+void TreeViewColumn::clicked()
+{
+ gtk_tree_view_column_clicked(gobj());
+}
+
+void TreeViewColumn::set_title(const Glib::ustring& title)
+{
+ gtk_tree_view_column_set_title(gobj(), title.c_str());
+}
+
+Glib::ustring TreeViewColumn::get_title() const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(gtk_tree_view_column_get_title(const_cast<GtkTreeViewColumn*>(gobj())));
+}
+
+void TreeViewColumn::set_expand(bool expand)
+{
+ gtk_tree_view_column_set_expand(gobj(), static_cast<int>(expand));
+}
+
+bool TreeViewColumn::get_expand() const
+{
+ return gtk_tree_view_column_get_expand(const_cast<GtkTreeViewColumn*>(gobj()));
+}
+
+void TreeViewColumn::set_clickable(bool clickable)
+{
+ gtk_tree_view_column_set_clickable(gobj(), static_cast<int>(clickable));
+}
+
+bool TreeViewColumn::get_clickable() const
+{
+ return gtk_tree_view_column_get_clickable(const_cast<GtkTreeViewColumn*>(gobj()));
+}
+
+void TreeViewColumn::set_widget(Gtk::Widget& widget)
+{
+ gtk_tree_view_column_set_widget(gobj(), (widget).gobj());
+}
+
+Widget* TreeViewColumn::get_widget()
+{
+ return Glib::wrap(gtk_tree_view_column_get_widget(gobj()));
+}
+
+const Widget* TreeViewColumn::get_widget() const
+{
+ return Glib::wrap(gtk_tree_view_column_get_widget(const_cast<GtkTreeViewColumn*>(gobj())));
+}
+
+void TreeViewColumn::set_alignment(float xalign)
+{
+ gtk_tree_view_column_set_alignment(gobj(), xalign);
+}
+
+void TreeViewColumn::set_alignment(AlignmentEnum xalign)
+{
+ gtk_tree_view_column_set_alignment(gobj(), _gtkmm_align_float_from_enum(xalign));
+}
+
+float TreeViewColumn::get_alignment() const
+{
+ return gtk_tree_view_column_get_alignment(const_cast<GtkTreeViewColumn*>(gobj()));
+}
+
+void TreeViewColumn::set_reorderable(bool reorderable)
+{
+ gtk_tree_view_column_set_reorderable(gobj(), static_cast<int>(reorderable));
+}
+
+bool TreeViewColumn::get_reorderable() const
+{
+ return gtk_tree_view_column_get_reorderable(const_cast<GtkTreeViewColumn*>(gobj()));
+}
+
+void TreeViewColumn::set_sort_column(const TreeModelColumnBase& sort_column_id)
+{
+ gtk_tree_view_column_set_sort_column_id(gobj(), (sort_column_id).index());
+}
+
+void TreeViewColumn::set_sort_column(int sort_column_id)
+{
+ gtk_tree_view_column_set_sort_column_id(gobj(), sort_column_id);
+}
+
+int TreeViewColumn::get_sort_column_id() const
+{
+ return gtk_tree_view_column_get_sort_column_id(const_cast<GtkTreeViewColumn*>(gobj()));
+}
+
+void TreeViewColumn::set_sort_indicator(bool setting)
+{
+ gtk_tree_view_column_set_sort_indicator(gobj(), static_cast<int>(setting));
+}
+
+bool TreeViewColumn::get_sort_indicator() const
+{
+ return gtk_tree_view_column_get_sort_indicator(const_cast<GtkTreeViewColumn*>(gobj()));
+}
+
+void TreeViewColumn::set_sort_order(SortType order)
+{
+ gtk_tree_view_column_set_sort_order(gobj(), ((GtkSortType)(order)));
+}
+
+SortType TreeViewColumn::get_sort_order() const
+{
+ return ((SortType)(gtk_tree_view_column_get_sort_order(const_cast<GtkTreeViewColumn*>(gobj()))));
+}
+
+void TreeViewColumn::cell_set_cell_data(const Glib::RefPtr<TreeModel>& tree_model, const TreeModel::iterator& iter, bool is_expander, bool is_expanded)
+{
+ gtk_tree_view_column_cell_set_cell_data(gobj(), Glib::unwrap(tree_model), const_cast<GtkTreeIter*>((iter).gobj()), static_cast<int>(is_expander), static_cast<int>(is_expanded));
+}
+
+void TreeViewColumn::cell_get_size(Gdk::Rectangle& cell_area, int& x_offset, int& y_offset, int& width, int& height) const
+{
+ gtk_tree_view_column_cell_get_size(const_cast<GtkTreeViewColumn*>(gobj()), (cell_area).gobj(), &x_offset, &y_offset, &width, &height);
+}
+
+bool TreeViewColumn::cell_is_visible() const
+{
+ return gtk_tree_view_column_cell_is_visible(const_cast<GtkTreeViewColumn*>(gobj()));
+}
+
+void TreeViewColumn::focus_cell(CellRenderer& cell)
+{
+ gtk_tree_view_column_focus_cell(gobj(), (cell).gobj());
+}
+
+bool TreeViewColumn::get_cell_position(const CellRenderer& cell_renderer, int& start_pos, int& width) const
+{
+ return gtk_tree_view_column_cell_get_position(const_cast<GtkTreeViewColumn*>(gobj()), const_cast<GtkCellRenderer*>((cell_renderer).gobj()), &start_pos, &width);
+}
+
+
+Glib::SignalProxy0< void > TreeViewColumn::signal_clicked()
+{
+ return Glib::SignalProxy0< void >(this, &TreeViewColumn_signal_clicked_info);
+}
+
+
+Glib::PropertyProxy<bool> TreeViewColumn::property_visible()
+{
+ return Glib::PropertyProxy<bool>(this, "visible");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> TreeViewColumn::property_visible() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "visible");
+}
+
+Glib::PropertyProxy_ReadOnly<int> TreeViewColumn::property_width() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "width");
+}
+
+Glib::PropertyProxy<TreeViewColumnSizing> TreeViewColumn::property_sizing()
+{
+ return Glib::PropertyProxy<TreeViewColumnSizing>(this, "sizing");
+}
+
+Glib::PropertyProxy_ReadOnly<TreeViewColumnSizing> TreeViewColumn::property_sizing() const
+{
+ return Glib::PropertyProxy_ReadOnly<TreeViewColumnSizing>(this, "sizing");
+}
+
+Glib::PropertyProxy<int> TreeViewColumn::property_fixed_width()
+{
+ return Glib::PropertyProxy<int>(this, "fixed-width");
+}
+
+Glib::PropertyProxy_ReadOnly<int> TreeViewColumn::property_fixed_width() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "fixed-width");
+}
+
+Glib::PropertyProxy<int> TreeViewColumn::property_min_width()
+{
+ return Glib::PropertyProxy<int>(this, "min-width");
+}
+
+Glib::PropertyProxy_ReadOnly<int> TreeViewColumn::property_min_width() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "min-width");
+}
+
+Glib::PropertyProxy<int> TreeViewColumn::property_max_width()
+{
+ return Glib::PropertyProxy<int>(this, "max-width");
+}
+
+Glib::PropertyProxy_ReadOnly<int> TreeViewColumn::property_max_width() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "max-width");
+}
+
+Glib::PropertyProxy<Glib::ustring> TreeViewColumn::property_title()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "title");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> TreeViewColumn::property_title() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "title");
+}
+
+Glib::PropertyProxy<bool> TreeViewColumn::property_expand()
+{
+ return Glib::PropertyProxy<bool>(this, "expand");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> TreeViewColumn::property_expand() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "expand");
+}
+
+Glib::PropertyProxy<bool> TreeViewColumn::property_clickable()
+{
+ return Glib::PropertyProxy<bool>(this, "clickable");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> TreeViewColumn::property_clickable() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "clickable");
+}
+
+Glib::PropertyProxy<Widget*> TreeViewColumn::property_widget()
+{
+ return Glib::PropertyProxy<Widget*>(this, "widget");
+}
+
+Glib::PropertyProxy_ReadOnly<Widget*> TreeViewColumn::property_widget() const
+{
+ return Glib::PropertyProxy_ReadOnly<Widget*>(this, "widget");
+}
+
+Glib::PropertyProxy<float> TreeViewColumn::property_alignment()
+{
+ return Glib::PropertyProxy<float>(this, "alignment");
+}
+
+Glib::PropertyProxy_ReadOnly<float> TreeViewColumn::property_alignment() const
+{
+ return Glib::PropertyProxy_ReadOnly<float>(this, "alignment");
+}
+
+Glib::PropertyProxy<bool> TreeViewColumn::property_reorderable()
+{
+ return Glib::PropertyProxy<bool>(this, "reorderable");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> TreeViewColumn::property_reorderable() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "reorderable");
+}
+
+Glib::PropertyProxy<bool> TreeViewColumn::property_sort_indicator()
+{
+ return Glib::PropertyProxy<bool>(this, "sort-indicator");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> TreeViewColumn::property_sort_indicator() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "sort-indicator");
+}
+
+Glib::PropertyProxy<SortType> TreeViewColumn::property_sort_order()
+{
+ return Glib::PropertyProxy<SortType>(this, "sort-order");
+}
+
+Glib::PropertyProxy_ReadOnly<SortType> TreeViewColumn::property_sort_order() const
+{
+ return Glib::PropertyProxy_ReadOnly<SortType>(this, "sort-order");
+}
+
+
+void Gtk::TreeViewColumn::on_clicked()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->clicked)
+ (*base->clicked)(gobj());
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/treeviewcolumn.h b/libs/gtkmm2/gtk/gtkmm/treeviewcolumn.h
new file mode 100644
index 0000000000..e4b7ef9296
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/treeviewcolumn.h
@@ -0,0 +1,868 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_TREEVIEWCOLUMN_H
+#define _GTKMM_TREEVIEWCOLUMN_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright(C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or(at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/object.h>
+#include <gtkmm/treeiter.h>
+#include <gtkmm/widget.h>
+#include <gdkmm/window.h>
+#include <gtkmm/treemodel.h>
+#include <glibmm/listhandle.h>
+#include <gtkmm/cellrenderer_generation.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkTreeViewColumn GtkTreeViewColumn;
+typedef struct _GtkTreeViewColumnClass GtkTreeViewColumnClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class TreeViewColumn_Class; } // namespace Gtk
+namespace Gtk
+{
+
+
+/** @addtogroup gtkmmEnums Enums and Flags */
+
+/**
+ * @ingroup gtkmmEnums
+ */
+enum TreeViewColumnSizing
+{
+ TREE_VIEW_COLUMN_GROW_ONLY,
+ TREE_VIEW_COLUMN_AUTOSIZE,
+ TREE_VIEW_COLUMN_FIXED
+};
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::TreeViewColumnSizing> : public Glib::Value_Enum<Gtk::TreeViewColumnSizing>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+
+/** Typedefed as Gtk::TreeView::Column.
+ * This is a visible column in a Gtk::TreeView widget. It determines the geometry, type.
+ *
+ * @ingroup TreeView
+*/
+
+class TreeViewColumn : public Gtk::Object
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef TreeViewColumn CppObjectType;
+ typedef TreeViewColumn_Class CppClassType;
+ typedef GtkTreeViewColumn BaseObjectType;
+ typedef GtkTreeViewColumnClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~TreeViewColumn();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class TreeViewColumn_Class;
+ static CppClassType treeviewcolumn_class_;
+
+ // noncopyable
+ TreeViewColumn(const TreeViewColumn&);
+ TreeViewColumn& operator=(const TreeViewColumn&);
+
+protected:
+ explicit TreeViewColumn(const Glib::ConstructParams& construct_params);
+ explicit TreeViewColumn(GtkTreeViewColumn* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkTreeViewColumn* gobj() { return reinterpret_cast<GtkTreeViewColumn*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkTreeViewColumn* gobj() const { return reinterpret_cast<GtkTreeViewColumn*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_clicked();
+
+
+private:
+
+
+public:
+ typedef TreeViewColumn Column;
+
+ TreeViewColumn();
+
+ explicit TreeViewColumn(const Glib::ustring& title);
+ TreeViewColumn(const Glib::ustring& title, CellRenderer& cell);
+
+ /** Create a default view column for the given model column type.
+ */
+ template<class T_ModelColumnType>
+ TreeViewColumn(const Glib::ustring& title, const TreeModelColumn<T_ModelColumnType>& column);
+
+
+ /** Packs the @a cell into the beginning of the column. If @a expand is <tt>false</tt>, then
+ * the @a cell is allocated no more space than it needs. Any unused space is divided
+ * evenly between cells for which @a expand is <tt>true</tt>.
+ * @param cell The Gtk::CellRenderer.
+ * @param expand <tt>true</tt> if @a cell is to be given extra space allocated to @a tree_column .
+ */
+ void pack_start(CellRenderer& cell, bool expand = true);
+
+ /** Adds the @a cell to end of the column. If @a expand is <tt>false</tt>, then the @a cell
+ * is allocated no more space than it needs. Any unused space is divided
+ * evenly between cells for which @a expand is <tt>true</tt>.
+ * @param cell The Gtk::CellRenderer.
+ * @param expand <tt>true</tt> if @a cell is to be given extra space allocated to @a tree_column .
+ */
+ void pack_end(CellRenderer& cell, bool expand = true);
+
+ /** Creates an appropriate CellRenderer for the @a column, and packs that cell into the beginning of the column.
+ * If @a expand is <tt>false</tt>, then
+ * the cell is allocated no more space than it needs. Any unused space is divided
+ * evenly between cells for which @a expand is <tt>true</tt>.
+ *
+ * You can use get_first_cell_renderer() or get_cell_renderers() to access the generated CellRenderer.
+ *
+ * @param column The model column that will be rendered by the view cell.
+ * @param expand <tt>true</tt> if the cell is to be given extra space allocated to the view column.
+ */
+ template<class T_ModelColumnType>
+ void pack_start(const TreeModelColumn<T_ModelColumnType>& column, bool expand = true);
+
+ /** Creates an appropriate CellRenderer for the @a column, and packs that cell at the end of the column.
+ * If @a expand is <tt>false</tt>, then
+ * the cell is allocated no more space than it needs. Any unused space is divided
+ * evenly between cells for which @a expand is <tt>true</tt>.
+ *
+ * You can use get_first_cell_renderer() or get_cell_renderers() to access the generated CellRenderer.
+ *
+ * @param column The model column that will be rendered by the view cell.
+ * @param expand <tt>true</tt> if the cell is to be given extra space allocated to the view column.
+ */
+ template<class T_ModelColumnType>
+ void pack_end(const TreeModelColumn<T_ModelColumnType>& column, bool expand = true);
+
+
+ /** Unsets all the mappings on all renderers on the @a tree_column .
+ */
+ void clear();
+
+ /** Gets the CellRenderer for the column.
+ * You should dynamic_cast<> to the expected derived CellRenderer type.
+ * This assumes that the TreeViewColumn contains only one CellRenderer.
+ */
+ CellRenderer* get_first_cell_renderer();
+
+ /** Gets the CellRenderer for the column.
+ * You should dynamic_cast<> to the expected derived CellRenderer type.
+ * This assumes that the TreeViewColumn contains only one CellRenderer.
+ */
+ const CellRenderer* get_first_cell_renderer() const;
+
+
+ /** Returns a list of all the cell renderers in the column,
+ * in no particular order.
+ * @return A list of Gtk::CellRenderers.
+ */
+ Glib::ListHandle<CellRenderer*> get_cell_renderers();
+
+ /** Returns a list of all the cell renderers in the column,
+ * in no particular order.
+ * @return A list of Gtk::CellRenderers.
+ */
+ Glib::ListHandle<const CellRenderer*> get_cell_renderers() const;
+
+
+ /** Adds an attribute mapping to the list in @a tree_column . The @a column is the
+ * column of the model to get a value from, and the @a attribute is the
+ * parameter on @a cell_renderer to be set from the value. So for example
+ * if column 2 of the model contains strings, you could have the
+ * "text" attribute of a Gtk::CellRendererText get its values from
+ * column 2.
+ * @param cell_renderer The Gtk::CellRenderer to set attributes on.
+ * @param attribute An attribute on the renderer.
+ * @param column The column position on the model to get the attribute from.
+ */
+ void add_attribute(CellRenderer& cell_renderer, const Glib::ustring& attribute, int column);
+
+ void add_attribute(const Glib::PropertyProxy_Base& property, const TreeModelColumnBase& column);
+
+
+ /** Associate a view CellRenderer with a model column, so that the CellRenderer renders the data in the model column.
+ *
+ * @param renderer The view cell renderer which will render the model column.
+ * @param column The model column to be renderered by this view.
+ */
+ void set_renderer(Gtk::CellRenderer& renderer, const TreeModelColumnBase& column);
+
+ // _WRAP_METHOD(void set_attributes(CellRenderer& cell_renderer, ...), )
+
+ /** For instance,
+ * void on_cell_data(Gtk::CellRenderer* cell, const Gtk::TreeModel::iterator& iter);
+ *
+ * This function is used instead of the standard attributes mapping for setting the column value, and should set the
+ * value of the column's cell renderer as appropriate.
+ */
+ typedef sigc::slot<void, CellRenderer*, const Gtk::TreeModel::iterator&> SlotCellData;
+
+ /** Sets the slot callback to use for the column.
+ * This callback function is used instead of the standard attributes mapping for setting the column value, and should set the
+ * value of the column's cell renderer as appropriate.
+ *
+ * See also unset_cell_data_func().
+ *
+ * @param cell_renderer A Gtk::CellRenderer
+ * @param slot The callback slot to use. Create this with sigc::mem_fun(), or sigc::ptr_fun().
+ */
+ void set_cell_data_func(CellRenderer& cell_renderer, const SlotCellData& slot);
+
+ /** Removes a previously set callback slot. See set_cell_data_func().
+ */
+ void unset_cell_data_func(CellRenderer& cell_renderer);
+
+
+ /** Clears all existing attributes previously set with
+ * set_attributes().
+ * @param cell_renderer A Gtk::CellRenderer to clear the attribute mapping on.
+ */
+ void clear_attributes(CellRenderer& cell_renderer);
+
+ /** Sets the spacing field of @a tree_column , which is the number of pixels to
+ * place between cell renderers packed into it.
+ * @param spacing Distance between cell renderers in pixels.
+ */
+ void set_spacing(int spacing);
+
+ /** Returns the spacing of @a tree_column .
+ * @return The spacing of @a tree_column .
+ */
+ int get_spacing() const;
+
+ /** Sets the visibility of @a tree_column .
+ * @param visible <tt>true</tt> if the @a tree_column is visible.
+ */
+ void set_visible(bool visible = true);
+
+ /** Returns <tt>true</tt> if @a tree_column is visible.
+ * @return Whether the column is visible or not. If it is visible, then
+ * the tree will show the column.
+ */
+ bool get_visible() const;
+
+ /** If @a resizable is <tt>true</tt>, then the user can explicitly resize the column by
+ * grabbing the outer edge of the column button. If resizable is <tt>true</tt> and
+ * sizing mode of the column is Gtk::TREE_VIEW_COLUMN_AUTOSIZE, then the sizing
+ * mode is changed to Gtk::TREE_VIEW_COLUMN_GROW_ONLY.
+ * @param resizable <tt>true</tt>, if the column can be resized.
+ */
+ void set_resizable(bool resizable = true);
+
+ /** Returns <tt>true</tt> if the @a tree_column can be resized by the end user.
+ * @return <tt>true</tt>, if the @a tree_column can be resized.
+ */
+ bool get_resizable() const;
+
+ /** Sets the growth behavior of @a tree_column to @a type .
+ * @param type The Gtk::TreeViewColumnSizing.
+ */
+ void set_sizing(TreeViewColumnSizing type);
+
+ /** Returns the current type of @a tree_column .
+ * @return The type of @a tree_column .
+ */
+ TreeViewColumnSizing get_sizing();
+
+ /** Returns the current size of @a tree_column in pixels.
+ * @return The current width of @a tree_column .
+ */
+ int get_width() const;
+
+ /** Gets the fixed width of the column. This value is only meaning may not be
+ * the actual width of the column on the screen, just what is requested.
+ * @return The fixed width of the column.
+ */
+ int get_fixed_width() const;
+
+ /** Sets the size of the column in pixels. This is meaningful only if the sizing
+ * type is Gtk::TREE_VIEW_COLUMN_FIXED. The size of the column is clamped to
+ * the min/max width for the column. Please note that the min/max width of the
+ * column doesn't actually affect the "fixed_width" property of the widget, just
+ * the actual size when displayed.
+ * @param fixed_width The size to set @a tree_column to. Must be greater than 0.
+ */
+ void set_fixed_width(int fixed_width);
+
+ /** Sets the minimum width of the @a tree_column . If @a min_width is -1, then the
+ * minimum width is unset.
+ * @param min_width The minimum width of the column in pixels, or -1.
+ */
+ void set_min_width(int min_width);
+
+ /** Returns the minimum width in pixels of the @a tree_column , or -1 if no minimum
+ * width is set.
+ * @return The minimum width of the @a tree_column .
+ */
+ int get_min_width() const;
+
+ /** Sets the maximum width of the @a tree_column . If @a max_width is -1, then the
+ * maximum width is unset. Note, the column can actually be wider than max
+ * width if it's the last column in a view. In this case, the column expands to
+ * fill any extra space.
+ * @param max_width The maximum width of the column in pixels, or -1.
+ */
+ void set_max_width(int max_width);
+
+ /** Returns the maximum width in pixels of the @a tree_column , or -1 if no maximum
+ * width is set.
+ * @return The maximum width of the @a tree_column .
+ */
+ int get_max_width() const;
+
+ /** Emits the "clicked" signal on the column. This function will only work if
+ * @a tree_column is clickable.
+ */
+ void clicked();
+
+
+ /** Sets the title of the @a tree_column . If a custom widget has been set, then
+ * this value is ignored.
+ * @param title The title of the @a tree_column .
+ */
+ void set_title(const Glib::ustring& title);
+
+ /** Returns the title of the widget.
+ * @return The title of the column. This string should not be
+ * modified or freed.
+ */
+ Glib::ustring get_title() const;
+
+
+ /** Sets the column to take available extra space. This space is shared equally
+ * amongst all columns that have the expand set to <tt>true</tt>. If no column has this
+ * option set, then the last column gets all extra space. By default, every
+ * column is created with this <tt>false</tt>.
+ *
+ * Since: 2.4
+ */
+ void set_expand(bool expand = true);
+
+ /** Return <tt>true</tt> if the column expands to take any available space.
+ * @return <tt>true</tt>, if the column expands
+ *
+ * Since: 2.4.
+ */
+ bool get_expand() const;
+
+
+ /** Sets the header to be active if @a active is <tt>true</tt>. When the header is active,
+ * then it can take keyboard focus, and can be clicked.
+ * @param clickable <tt>true</tt> if the header is active.
+ */
+ void set_clickable(bool clickable = true);
+
+ /** Returns <tt>true</tt> if the user can click on the header for the column.
+ * @return <tt>true</tt> if user can click the column header.
+ */
+ bool get_clickable() const;
+
+ /** Sets the widget in the header to be @a widget . If widget is <tt>0</tt>, then the
+ * header button is set with a Gtk::Label set to the title of @a tree_column .
+ * @param widget A child Gtk::Widget, or <tt>0</tt>.
+ */
+ void set_widget(Gtk::Widget& widget);
+
+ /** Returns the Gtk::Widget in the button on the column header. If a custom
+ * widget has not been set then <tt>0</tt> is returned.
+ * @return The Gtk::Widget in the column header, or <tt>0</tt>.
+ */
+ Widget* get_widget();
+
+ /** Returns the Gtk::Widget in the button on the column header. If a custom
+ * widget has not been set then <tt>0</tt> is returned.
+ * @return The Gtk::Widget in the column header, or <tt>0</tt>.
+ */
+ const Widget* get_widget() const;
+
+
+ /** Sets the alignment of the title or custom widget inside the column header.
+ * The alignment determines its location inside the button -- 0.0 for left, 0.5
+ * for center, 1.0 for right.
+ * @param xalign The alignment, which is between [0.0 and 1.0] inclusive.
+ */
+ void set_alignment(float xalign);
+
+ /** Sets the alignment of the title or custom widget inside the column header.
+ * The alignment determines its location inside the button -- 0.0 for left, 0.5
+ * for center, 1.0 for right.
+ * @param xalign The alignment, which is between [0.0 and 1.0] inclusive.
+ */
+ void set_alignment(AlignmentEnum xalign);
+
+
+ /** Returns the current x alignment of @a tree_column . This value can range
+ * between 0.0 and 1.0.
+ * @return The current alignent of @a tree_column .
+ */
+ float get_alignment() const;
+
+ /** If @a reorderable is <tt>true</tt>, then the column can be reordered by the end user
+ * dragging the header.
+ * @param reorderable <tt>true</tt>, if the column can be reordered.
+ */
+ void set_reorderable(bool reorderable = true);
+
+ /** Returns <tt>true</tt> if the @a tree_column can be reordered by the user.
+ * @return <tt>true</tt> if the @a tree_column can be reordered by the user.
+ */
+ bool get_reorderable() const;
+
+
+ /** Sets the logical @a sort_column_id that this column sorts on when this column
+ * is selected for sorting. Doing so makes the column header clickable.
+ * @param sort_column_id The @a sort_column_id of the model to sort on.
+ */
+ void set_sort_column(const TreeModelColumnBase& sort_column_id);
+
+ /** Sets the logical @a sort_column_id that this column sorts on when this column
+ * is selected for sorting. Doing so makes the column header clickable.
+ * @param sort_column_id The @a sort_column_id of the model to sort on.
+ */
+ void set_sort_column(int sort_column_id);
+
+ #ifndef GTKMM_DISABLE_DEPRECATED
+ /** @deprecated Use set_sort_column() instead.
+ */
+ void set_sort_column_id(const TreeModelColumnBase& sort_column_id);
+
+ /** @deprecated Use set_sort_column() instead.
+ */
+ void set_sort_column_id(int sort_column_id);
+ #endif //GTKMM_DISABLE_DEPRECATED
+
+
+ /** Gets the logical @a sort_column_id that the model sorts on when this
+ * column is selected for sorting.
+ * See set_sort_column_id().
+ * @return The current @a sort_column_id for this column, or -1 if
+ * this column can't be used for sorting.
+ */
+ int get_sort_column_id() const;
+
+ /** Call this function with a @a setting of <tt>true</tt> to display an arrow in
+ * the header button indicating the column is sorted. Call
+ * set_sort_order() to change the direction of
+ * the arrow.
+ * @param setting <tt>true</tt> to display an indicator that the column is sorted.
+ */
+ void set_sort_indicator(bool setting);
+
+ /** Gets the value set by set_sort_indicator().
+ * @return Whether the sort indicator arrow is displayed.
+ */
+ bool get_sort_indicator() const;
+
+ /** Changes the appearance of the sort indicator.
+ *
+ * This <em>does not</em> actually sort the model. Use
+ * set_sort_column_id() if you want automatic sorting
+ * support. This function is primarily for custom sorting behavior, and should
+ * be used in conjunction with gtk_tree_sortable_set_sort_column() to do
+ * that. For custom models, the mechanism will vary.
+ *
+ * The sort indicator changes direction to indicate normal sort or reverse sort.
+ * Note that you must have the sort indicator enabled to see anything when
+ * calling this function; see set_sort_indicator().
+ * @param order Sort order that the sort indicator should indicate.
+ */
+ void set_sort_order(SortType order);
+
+ /** Gets the value set by set_sort_order().
+ * @return The sort order the sort indicator is indicating.
+ */
+ SortType get_sort_order() const;
+
+
+ /** Sets the cell renderer based on the @a tree_model and @a iter . That is, for
+ * every attribute mapping in @a tree_column , it will get a value from the set
+ * column on the @a iter , and use that value to set the attribute on the cell
+ * renderer. This is used primarily by the Gtk::TreeView.
+ * @param tree_model The Gtk::TreeModel to to get the cell renderers attributes from.
+ * @param iter The Gtk::TreeIter to to get the cell renderer's attributes from.
+ * @param is_expander <tt>true</tt>, if the row has children.
+ * @param is_expanded <tt>true</tt>, if the row has visible children.
+ */
+ void cell_set_cell_data(const Glib::RefPtr<TreeModel>& tree_model, const TreeModel::iterator& iter, bool is_expander, bool is_expanded);
+
+ /** Obtains the width and height needed to render the column. This is used
+ * primarily by the Gtk::TreeView.
+ * @param cell_area The area a cell in the column will be allocated.
+ * @param x_offset Location to return x offset of a cell relative to @a cell_area .
+ * @param y_offset Location to return y offset of a cell relative to @a cell_area .
+ * @param width Location to return width needed to render a cell.
+ * @param height Location to return height needed to render a cell.
+ */
+ void cell_get_size(Gdk::Rectangle& cell_area, int& x_offset, int& y_offset, int& width, int& height) const;
+
+ /** Returns <tt>true</tt> if any of the cells packed into the @a tree_column are visible.
+ * For this to be meaningful, you must first initialize the cells with
+ * cell_set_cell_data()
+ * @return <tt>true</tt>, if any of the cells packed into the @a tree_column are currently visible.
+ */
+ bool cell_is_visible() const;
+
+ /** Sets the current keyboard focus to be at @a cell , if the column contains
+ * 2 or more editable and activatable cells.
+ *
+ * Since: 2.2
+ * @param cell A Gtk::CellRenderer.
+ */
+ void focus_cell(CellRenderer& cell);
+
+
+ /** Obtains the horizontal position and size of a cell in a column. If the
+ * cell is not found in the column, @a start_pos and @a width are not changed and
+ * <tt>false</tt> is returned.
+ * @param cell_renderer A Gtk::CellRenderer.
+ * @param start_pos Return location for the horizontal position of @a cell within
+ * @a tree_column .
+ * @param width Return location for the width of @a cell .
+ * @return <tt>true</tt> if @a cell belongs to @a tree_column .
+ */
+ bool get_cell_position(const CellRenderer& cell_renderer, int& start_pos, int& width) const;
+
+
+ Glib::SignalProxy0< void > signal_clicked();
+
+
+ /** Whether to display the column.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_visible() ;
+
+/** Whether to display the column.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_visible() const;
+
+ /** Current width of the column.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_width() const;
+
+
+ /** Resize mode of the column.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<TreeViewColumnSizing> property_sizing() ;
+
+/** Resize mode of the column.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<TreeViewColumnSizing> property_sizing() const;
+
+ /** Current fixed width of the column.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_fixed_width() ;
+
+/** Current fixed width of the column.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_fixed_width() const;
+
+ /** Minimum allowed width of the column.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_min_width() ;
+
+/** Minimum allowed width of the column.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_min_width() const;
+
+ /** Maximum allowed width of the column.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_max_width() ;
+
+/** Maximum allowed width of the column.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_max_width() const;
+
+ /** Title to appear in column header.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_title() ;
+
+/** Title to appear in column header.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_title() const;
+
+ /** Column gets share of extra width allocated to the widget.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_expand() ;
+
+/** Column gets share of extra width allocated to the widget.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_expand() const;
+
+ /** Whether the header can be clicked.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_clickable() ;
+
+/** Whether the header can be clicked.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_clickable() const;
+
+ /** Widget to put in column header button instead of column title.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Widget*> property_widget() ;
+
+/** Widget to put in column header button instead of column title.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Widget*> property_widget() const;
+
+ /** X Alignment of the column header text or widget.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<float> property_alignment() ;
+
+/** X Alignment of the column header text or widget.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<float> property_alignment() const;
+
+ /** Whether the column can be reordered around the headers.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_reorderable() ;
+
+/** Whether the column can be reordered around the headers.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_reorderable() const;
+
+ /** Whether to show a sort indicator.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_sort_indicator() ;
+
+/** Whether to show a sort indicator.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_sort_indicator() const;
+
+ /** Sort direction the sort indicator should indicate.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<SortType> property_sort_order() ;
+
+/** Sort direction the sort indicator should indicate.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<SortType> property_sort_order() const;
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+private:
+ // Only necessary because of the templated ctor, see below.
+ static const Glib::Class& class_init_();
+#endif //DOXYGEN_SHOULD_SKIP_THIS
+
+
+};
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+template<class T_ModelColumnType>
+void TreeViewColumn::pack_start(const TreeModelColumn<T_ModelColumnType>& column, bool expand)
+{
+ //Generate appropriate Renderer for the column:
+ CellRenderer* pCellRenderer = manage( CellRenderer_Generation::generate_cellrenderer<T_ModelColumnType>() );
+
+ //Use the renderer:
+ pack_start(*pCellRenderer, expand);
+ set_renderer(*pCellRenderer, column);
+}
+
+template<class T_ModelColumnType>
+void TreeViewColumn::pack_end(const TreeModelColumn<T_ModelColumnType>& column, bool expand)
+{
+ //Generate appropriate Renderer for the column:
+ CellRenderer* pCellRenderer= manage( CellRenderer_Generation::generate_cellrenderer<T_ModelColumnType>() );
+
+ //Use the renderer:
+ pack_end(*pCellRenderer, expand);
+ set_renderer(*pCellRenderer, column);
+}
+
+
+template <class T_ModelColumnType>
+TreeViewColumn::TreeViewColumn(const Glib::ustring& title,
+ const TreeModelColumn<T_ModelColumnType>& column)
+:
+ Glib::ObjectBase(0), // not (yet) a custom class
+ Gtk::Object(Glib::ConstructParams(class_init_(), "title", title.c_str(), (char*) 0))
+{
+ pack_start(column, true /* expand */);
+}
+
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::TreeViewColumn
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::TreeViewColumn* wrap(GtkTreeViewColumn* object, bool take_copy = false);
+}
+#endif /* _GTKMM_TREEVIEWCOLUMN_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/uimanager.cc b/libs/gtkmm2/gtk/gtkmm/uimanager.cc
new file mode 100644
index 0000000000..89088a1474
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/uimanager.cc
@@ -0,0 +1,581 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/uimanager.h>
+#include <gtkmm/private/uimanager_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 2003 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtkuimanager.h>
+
+
+namespace Gtk
+{
+
+typedef UIManager::ui_merge_id ui_merge_id; //Help gmmproc so that it does not need to add the full type name for the return type.
+
+UIManager::ui_merge_id UIManager::add_ui_from_string(const Glib::ustring& buffer)
+{
+ GError *error = 0;
+ guint retvalue = gtk_ui_manager_add_ui_from_string(gobj(), buffer.c_str(), buffer.size(), &(error));
+ if(error) ::Glib::Error::throw_exception(error);
+ return retvalue;
+}
+
+void UIManager::add_ui_separator(ui_merge_id merge_id, const Glib::ustring& path, const Glib::ustring& name, UIManagerItemType type, bool top)
+{
+ gtk_ui_manager_add_ui(gobj(), merge_id, path.c_str(), name.c_str(), 0 /* See C docs */, ((GtkUIManagerItemType)(type)), static_cast<int>(top));
+}
+
+
+} // namespace Gtk
+
+
+namespace
+{
+
+void UIManager_signal_add_widget_callback(GtkUIManager* self, GtkWidget* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,Widget* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::wrap(p0)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo UIManager_signal_add_widget_info =
+{
+ "add_widget",
+ (GCallback) &UIManager_signal_add_widget_callback,
+ (GCallback) &UIManager_signal_add_widget_callback
+};
+
+
+const Glib::SignalProxyInfo UIManager_signal_actions_changed_info =
+{
+ "actions_changed",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+
+void UIManager_signal_connect_proxy_callback(GtkUIManager* self, GtkAction* p0,GtkWidget* p1,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,const Glib::RefPtr<Action>&,Widget* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::wrap(p0, true)
+, Glib::wrap(p1)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo UIManager_signal_connect_proxy_info =
+{
+ "connect_proxy",
+ (GCallback) &UIManager_signal_connect_proxy_callback,
+ (GCallback) &UIManager_signal_connect_proxy_callback
+};
+
+
+void UIManager_signal_disconnect_proxy_callback(GtkUIManager* self, GtkAction* p0,GtkWidget* p1,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,const Glib::RefPtr<Action>&,Widget* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::wrap(p0, true)
+, Glib::wrap(p1)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo UIManager_signal_disconnect_proxy_info =
+{
+ "disconnect_proxy",
+ (GCallback) &UIManager_signal_disconnect_proxy_callback,
+ (GCallback) &UIManager_signal_disconnect_proxy_callback
+};
+
+
+void UIManager_signal_pre_activate_callback(GtkUIManager* self, GtkAction* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,const Glib::RefPtr<Action>& > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::wrap(p0, true)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo UIManager_signal_pre_activate_info =
+{
+ "pre_activate",
+ (GCallback) &UIManager_signal_pre_activate_callback,
+ (GCallback) &UIManager_signal_pre_activate_callback
+};
+
+
+void UIManager_signal_post_activate_callback(GtkUIManager* self, GtkAction* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,const Glib::RefPtr<Action>& > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::wrap(p0, true)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo UIManager_signal_post_activate_info =
+{
+ "post_activate",
+ (GCallback) &UIManager_signal_post_activate_callback,
+ (GCallback) &UIManager_signal_post_activate_callback
+};
+
+} // anonymous namespace
+
+// static
+GType Glib::Value<Gtk::UIManagerItemType>::value_type()
+{
+ return gtk_ui_manager_item_type_get_type();
+}
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Gtk::UIManager> wrap(GtkUIManager* object, bool take_copy)
+{
+ return Glib::RefPtr<Gtk::UIManager>( dynamic_cast<Gtk::UIManager*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} /* namespace Glib */
+
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& UIManager_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &UIManager_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_ui_manager_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void UIManager_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->add_widget = &add_widget_callback;
+ klass->actions_changed = &actions_changed_callback;
+}
+
+
+void UIManager_Class::add_widget_callback(GtkUIManager* self, GtkWidget* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_add_widget(Glib::wrap(p0)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->add_widget)
+ (*base->add_widget)(self, p0);
+ }
+}
+
+void UIManager_Class::actions_changed_callback(GtkUIManager* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_actions_changed();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->actions_changed)
+ (*base->actions_changed)(self);
+ }
+}
+
+
+Glib::ObjectBase* UIManager_Class::wrap_new(GObject* object)
+{
+ return new UIManager((GtkUIManager*)object);
+}
+
+
+/* The implementation: */
+
+GtkUIManager* UIManager::gobj_copy()
+{
+ reference();
+ return gobj();
+}
+
+UIManager::UIManager(const Glib::ConstructParams& construct_params)
+:
+ Glib::Object(construct_params)
+{}
+
+UIManager::UIManager(GtkUIManager* castitem)
+:
+ Glib::Object((GObject*)(castitem))
+{}
+
+UIManager::~UIManager()
+{}
+
+
+UIManager::CppClassType UIManager::uimanager_class_; // initialize static member
+
+GType UIManager::get_type()
+{
+ return uimanager_class_.init().get_type();
+}
+
+GType UIManager::get_base_type()
+{
+ return gtk_ui_manager_get_type();
+}
+
+
+UIManager::UIManager()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Glib::Object(Glib::ConstructParams(uimanager_class_.init()))
+{
+ }
+
+Glib::RefPtr<UIManager> UIManager::create()
+{
+ return Glib::RefPtr<UIManager>( new UIManager() );
+}
+void UIManager::set_add_tearoffs(bool add_tearoffs)
+{
+ gtk_ui_manager_set_add_tearoffs(gobj(), static_cast<int>(add_tearoffs));
+}
+
+bool UIManager::get_add_tearoffs() const
+{
+ return gtk_ui_manager_get_add_tearoffs(const_cast<GtkUIManager*>(gobj()));
+}
+
+void UIManager::insert_action_group(const Glib::RefPtr<ActionGroup>& action_group, int pos)
+{
+ gtk_ui_manager_insert_action_group(gobj(), Glib::unwrap(action_group), pos);
+}
+
+void UIManager::remove_action_group(const Glib::RefPtr<ActionGroup>& action_group)
+{
+ gtk_ui_manager_remove_action_group(gobj(), Glib::unwrap(action_group));
+}
+
+Glib::ListHandle< Glib::RefPtr<ActionGroup> > UIManager::get_action_groups()
+{
+ return Glib::ListHandle< Glib::RefPtr<ActionGroup> >(gtk_ui_manager_get_action_groups(gobj()), Glib::OWNERSHIP_SHALLOW);
+}
+
+Glib::ListHandle< Glib::RefPtr<const ActionGroup> > UIManager::get_action_groups() const
+{
+ return Glib::ListHandle< Glib::RefPtr<const ActionGroup> >(gtk_ui_manager_get_action_groups(const_cast<GtkUIManager*>(gobj())), Glib::OWNERSHIP_SHALLOW);
+}
+
+Glib::RefPtr<AccelGroup> UIManager::get_accel_group()
+{
+
+ Glib::RefPtr<AccelGroup> retvalue = Glib::wrap(gtk_ui_manager_get_accel_group(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const AccelGroup> UIManager::get_accel_group() const
+{
+
+ Glib::RefPtr<const AccelGroup> retvalue = Glib::wrap(gtk_ui_manager_get_accel_group(const_cast<GtkUIManager*>(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Widget* UIManager::get_widget(const Glib::ustring& path)
+{
+ return Glib::wrap(gtk_ui_manager_get_widget(gobj(), path.c_str()));
+}
+
+const Widget* UIManager::get_widget(const Glib::ustring& path) const
+{
+ return Glib::wrap(gtk_ui_manager_get_widget(const_cast<GtkUIManager*>(gobj()), path.c_str()));
+}
+
+Glib::SListHandle<Widget*> UIManager::get_toplevels(UIManagerItemType types)
+{
+ return Glib::SListHandle<Widget*>(gtk_ui_manager_get_toplevels(gobj(), ((GtkUIManagerItemType)(types))), Glib::OWNERSHIP_SHALLOW);
+}
+
+Glib::SListHandle<const Widget*> UIManager::get_toplevels(UIManagerItemType types) const
+{
+ return Glib::SListHandle<const Widget*>(gtk_ui_manager_get_toplevels(const_cast<GtkUIManager*>(gobj()), ((GtkUIManagerItemType)(types))), Glib::OWNERSHIP_SHALLOW);
+}
+
+Glib::RefPtr<Action> UIManager::get_action(const Glib::ustring& path)
+{
+
+ Glib::RefPtr<Action> retvalue = Glib::wrap(gtk_ui_manager_get_action(gobj(), path.c_str()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const Action> UIManager::get_action(const Glib::ustring& path) const
+{
+
+ Glib::RefPtr<const Action> retvalue = Glib::wrap(gtk_ui_manager_get_action(const_cast<GtkUIManager*>(gobj()), path.c_str()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+ui_merge_id UIManager::add_ui_from_file(const Glib::ustring& filename)
+{
+ GError *error = 0;
+ ui_merge_id retvalue = gtk_ui_manager_add_ui_from_file(gobj(), filename.c_str(), &(error));
+ if(error) ::Glib::Error::throw_exception(error);
+ return retvalue;
+}
+
+void UIManager::add_ui(ui_merge_id merge_id, const Glib::ustring& path, const Glib::ustring& name, const Glib::ustring& action, UIManagerItemType type, bool top)
+{
+ gtk_ui_manager_add_ui(gobj(), merge_id, path.c_str(), name.c_str(), action.c_str(), ((GtkUIManagerItemType)(type)), static_cast<int>(top));
+}
+
+void UIManager::remove_ui(ui_merge_id merge_id)
+{
+ gtk_ui_manager_remove_ui(gobj(), merge_id);
+}
+
+Glib::ustring UIManager::get_ui() const
+{
+ return Glib::convert_return_gchar_ptr_to_ustring(gtk_ui_manager_get_ui(const_cast<GtkUIManager*>(gobj())));
+}
+
+void UIManager::ensure_update()
+{
+ gtk_ui_manager_ensure_update(gobj());
+}
+
+ui_merge_id UIManager::new_merge_id()
+{
+ return gtk_ui_manager_new_merge_id(gobj());
+}
+
+
+Glib::SignalProxy1< void,Widget* > UIManager::signal_add_widget()
+{
+ return Glib::SignalProxy1< void,Widget* >(this, &UIManager_signal_add_widget_info);
+}
+
+Glib::SignalProxy0< void > UIManager::signal_actions_changed()
+{
+ return Glib::SignalProxy0< void >(this, &UIManager_signal_actions_changed_info);
+}
+
+Glib::SignalProxy2< void,const Glib::RefPtr<Action>&,Widget* > UIManager::signal_connect_proxy()
+{
+ return Glib::SignalProxy2< void,const Glib::RefPtr<Action>&,Widget* >(this, &UIManager_signal_connect_proxy_info);
+}
+
+Glib::SignalProxy2< void,const Glib::RefPtr<Action>&,Widget* > UIManager::signal_disconnect_proxy()
+{
+ return Glib::SignalProxy2< void,const Glib::RefPtr<Action>&,Widget* >(this, &UIManager_signal_disconnect_proxy_info);
+}
+
+Glib::SignalProxy1< void,const Glib::RefPtr<Action>& > UIManager::signal_pre_activate()
+{
+ return Glib::SignalProxy1< void,const Glib::RefPtr<Action>& >(this, &UIManager_signal_pre_activate_info);
+}
+
+Glib::SignalProxy1< void,const Glib::RefPtr<Action>& > UIManager::signal_post_activate()
+{
+ return Glib::SignalProxy1< void,const Glib::RefPtr<Action>& >(this, &UIManager_signal_post_activate_info);
+}
+
+
+Glib::PropertyProxy<bool> UIManager::property_add_tearoffs()
+{
+ return Glib::PropertyProxy<bool>(this, "add-tearoffs");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> UIManager::property_add_tearoffs() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "add-tearoffs");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> UIManager::property_ui() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "ui");
+}
+
+
+void Gtk::UIManager::on_add_widget(Widget* widget)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->add_widget)
+ (*base->add_widget)(gobj(),(GtkWidget*)Glib::unwrap(widget));
+}
+
+void Gtk::UIManager::on_actions_changed()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->actions_changed)
+ (*base->actions_changed)(gobj());
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/uimanager.h b/libs/gtkmm2/gtk/gtkmm/uimanager.h
new file mode 100644
index 0000000000..3adec8c251
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/uimanager.h
@@ -0,0 +1,505 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_UIMANAGER_H
+#define _GTKMM_UIMANAGER_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 2003 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/widget.h>
+#include <gtkmm/action.h>
+#include <gtkmm/actiongroup.h>
+#include <gtkmm/uimanager.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkUIManager GtkUIManager;
+typedef struct _GtkUIManagerClass GtkUIManagerClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class UIManager_Class; } // namespace Gtk
+namespace Gtk
+{
+
+/** @addtogroup gtkmmEnums Enums and Flags */
+
+/**
+ * @ingroup gtkmmEnums
+ * @par Bitwise operators:
+ * <tt>%UIManagerItemType operator|(UIManagerItemType, UIManagerItemType)</tt><br>
+ * <tt>%UIManagerItemType operator&(UIManagerItemType, UIManagerItemType)</tt><br>
+ * <tt>%UIManagerItemType operator^(UIManagerItemType, UIManagerItemType)</tt><br>
+ * <tt>%UIManagerItemType operator~(UIManagerItemType)</tt><br>
+ * <tt>%UIManagerItemType& operator|=(UIManagerItemType&, UIManagerItemType)</tt><br>
+ * <tt>%UIManagerItemType& operator&=(UIManagerItemType&, UIManagerItemType)</tt><br>
+ * <tt>%UIManagerItemType& operator^=(UIManagerItemType&, UIManagerItemType)</tt><br>
+ */
+enum UIManagerItemType
+{
+ UI_MANAGER_AUTO = 0,
+ UI_MANAGER_MENUBAR = 1 << 0,
+ UI_MANAGER_MENU = 1 << 1,
+ UI_MANAGER_TOOLBAR = 1 << 2,
+ UI_MANAGER_PLACEHOLDER = 1 << 3,
+ UI_MANAGER_POPUP = 1 << 4,
+ UI_MANAGER_MENUITEM = 1 << 5,
+ UI_MANAGER_TOOLITEM = 1 << 6,
+ UI_MANAGER_SEPARATOR = 1 << 7,
+ UI_MANAGER_ACCELERATOR = 1 << 8
+};
+
+/** @ingroup gtkmmEnums */
+inline UIManagerItemType operator|(UIManagerItemType lhs, UIManagerItemType rhs)
+ { return static_cast<UIManagerItemType>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
+
+/** @ingroup gtkmmEnums */
+inline UIManagerItemType operator&(UIManagerItemType lhs, UIManagerItemType rhs)
+ { return static_cast<UIManagerItemType>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
+
+/** @ingroup gtkmmEnums */
+inline UIManagerItemType operator^(UIManagerItemType lhs, UIManagerItemType rhs)
+ { return static_cast<UIManagerItemType>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
+
+/** @ingroup gtkmmEnums */
+inline UIManagerItemType operator~(UIManagerItemType flags)
+ { return static_cast<UIManagerItemType>(~static_cast<unsigned>(flags)); }
+
+/** @ingroup gtkmmEnums */
+inline UIManagerItemType& operator|=(UIManagerItemType& lhs, UIManagerItemType rhs)
+ { return (lhs = static_cast<UIManagerItemType>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
+
+/** @ingroup gtkmmEnums */
+inline UIManagerItemType& operator&=(UIManagerItemType& lhs, UIManagerItemType rhs)
+ { return (lhs = static_cast<UIManagerItemType>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
+
+/** @ingroup gtkmmEnums */
+inline UIManagerItemType& operator^=(UIManagerItemType& lhs, UIManagerItemType rhs)
+ { return (lhs = static_cast<UIManagerItemType>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::UIManagerItemType> : public Glib::Value_Flags<Gtk::UIManagerItemType>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+
+class UIManager : public Glib::Object
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef UIManager CppObjectType;
+ typedef UIManager_Class CppClassType;
+ typedef GtkUIManager BaseObjectType;
+ typedef GtkUIManagerClass BaseClassType;
+
+private: friend class UIManager_Class;
+ static CppClassType uimanager_class_;
+
+private:
+ // noncopyable
+ UIManager(const UIManager&);
+ UIManager& operator=(const UIManager&);
+
+protected:
+ explicit UIManager(const Glib::ConstructParams& construct_params);
+ explicit UIManager(GtkUIManager* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~UIManager();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ GtkUIManager* gobj() { return reinterpret_cast<GtkUIManager*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const GtkUIManager* gobj() const { return reinterpret_cast<GtkUIManager*>(gobject_); }
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ GtkUIManager* gobj_copy();
+
+private:
+
+protected:
+ UIManager();
+
+public:
+
+ static Glib::RefPtr<UIManager> create();
+
+
+ /** Sets the "add_tearoffs" property, which controls whether menus
+ * generated by this Gtk::UIManager will have tearoff menu items.
+ *
+ * Note that this only affects regular menus. Generated popup
+ * menus never have tearoff menu items.
+ *
+ * Since: 2.4
+ * @param add_tearoffs Whether tearoff menu items are added.
+ */
+ void set_add_tearoffs(bool add_tearoffs = true);
+
+ /** Returns whether menus generated by this Gtk::UIManager
+ * will have tearoff menu items.
+ * @return Whether tearoff menu items are added
+ *
+ * Since: 2.4.
+ */
+ bool get_add_tearoffs() const;
+
+ /** Inserts an action group into the list of action groups associated
+ * with @a self . Actions in earlier groups hide actions with the same
+ * name in later groups.
+ *
+ * Since: 2.4
+ * @param action_group The action group to be inserted.
+ * @param pos The position at which the group will be inserted.
+ */
+ void insert_action_group(const Glib::RefPtr<ActionGroup>& action_group, int pos = 0);
+
+ /** Removes an action group from the list of action groups associated
+ * with @a self .
+ *
+ * Since: 2.4
+ * @param action_group The action group to be removed.
+ */
+ void remove_action_group(const Glib::RefPtr<ActionGroup>& action_group);
+
+
+ /** Returns the list of action groups associated with @a self .
+ * @return A G::List of action groups. The list is owned by GTK+
+ * and should not be modified.
+ *
+ * Since: 2.4.
+ */
+ Glib::ListHandle< Glib::RefPtr<ActionGroup> > get_action_groups();
+
+ /** Returns the list of action groups associated with @a self .
+ * @return A G::List of action groups. The list is owned by GTK+
+ * and should not be modified.
+ *
+ * Since: 2.4.
+ */
+ Glib::ListHandle< Glib::RefPtr<const ActionGroup> > get_action_groups() const;
+
+
+ /** Returns the Gtk::AccelGroup associated with @a self .
+ * @return The Gtk::AccelGroup.
+ *
+ * Since: 2.4.
+ */
+ Glib::RefPtr<AccelGroup> get_accel_group();
+
+ /** Returns the Gtk::AccelGroup associated with @a self .
+ * @return The Gtk::AccelGroup.
+ *
+ * Since: 2.4.
+ */
+ Glib::RefPtr<const AccelGroup> get_accel_group() const;
+
+ /** Looks up a widget by following a path.
+ * The path consists of the names specified in the XML description of the UI.
+ * separated by '/'. Elements which don't have a name or action attribute in
+ * the XML (e.g. &lt;popup&gt;) can be addressed by their XML element name
+ * (e.g. "popup"). The root element ("/ui") can be omitted in the path.
+ *
+ * Note that the widget found by following a path that ends in a &lt;menu&gt;
+ * element is the menuitem to which the menu is attached, not the menu itself.
+ * @param path A path.
+ * @return The widget found by following the path, or <tt>0</tt> if no widget
+ * was found.
+ *
+ * Since: 2.4.
+ */
+ Widget* get_widget(const Glib::ustring& path);
+
+ /** Looks up a widget by following a path.
+ * The path consists of the names specified in the XML description of the UI.
+ * separated by '/'. Elements which don't have a name or action attribute in
+ * the XML (e.g. &lt;popup&gt;) can be addressed by their XML element name
+ * (e.g. "popup"). The root element ("/ui") can be omitted in the path.
+ *
+ * Note that the widget found by following a path that ends in a &lt;menu&gt;
+ * element is the menuitem to which the menu is attached, not the menu itself.
+ * @param path A path.
+ * @return The widget found by following the path, or <tt>0</tt> if no widget
+ * was found.
+ *
+ * Since: 2.4.
+ */
+ const Widget* get_widget(const Glib::ustring& path) const;
+
+
+ /** Obtains a list of all toplevel widgets of the requested types.
+ * @param types Specifies the types of toplevel widgets to include. Allowed
+ * types are Gtk::UI_MANAGER_MENUBAR, Gtk::UI_MANAGER_TOOLBAR and
+ * Gtk::UI_MANAGER_POPUP.
+ * @return A newly-allocated of all toplevel widgets of the requested
+ * types.
+ *
+ * Since: 2.4.
+ */
+ Glib::SListHandle<Widget*> get_toplevels(UIManagerItemType types);
+
+ /** Obtains a list of all toplevel widgets of the requested types.
+ * @param types Specifies the types of toplevel widgets to include. Allowed
+ * types are Gtk::UI_MANAGER_MENUBAR, Gtk::UI_MANAGER_TOOLBAR and
+ * Gtk::UI_MANAGER_POPUP.
+ * @return A newly-allocated of all toplevel widgets of the requested
+ * types.
+ *
+ * Since: 2.4.
+ */
+ Glib::SListHandle<const Widget*> get_toplevels(UIManagerItemType types) const;
+
+
+ /** Looks up an action by following a path. See gtk_ui_manager_get_widget()
+ * for more information about paths.
+ * @param path A path.
+ * @return The action whose proxy widget is found by following the path,
+ * or <tt>0</tt> if no widget was found.
+ *
+ * Since: 2.4.
+ */
+ Glib::RefPtr<Action> get_action(const Glib::ustring& path);
+
+ /** Looks up an action by following a path. See gtk_ui_manager_get_widget()
+ * for more information about paths.
+ * @param path A path.
+ * @return The action whose proxy widget is found by following the path,
+ * or <tt>0</tt> if no widget was found.
+ *
+ * Since: 2.4.
+ */
+ Glib::RefPtr<const Action> get_action(const Glib::ustring& path) const;
+
+ typedef guint ui_merge_id;
+
+ /** Parses a string containing a UI definition and
+ * merges it with the current contents. An enclosing &lt;ui&gt;
+ * element is added if it is missing.
+ *
+ * @param buffer the string to parse
+ * @result The merge id for the merged UI. The merge id can be used to unmerge the UI with remove_ui(). If an error occurred, the return value is 0.
+ * @throws exception
+ * Since: 2.4
+ */
+ ui_merge_id add_ui_from_string(const Glib::ustring& buffer);
+
+
+ /** Parses a file containing a UI definition and
+ * merges it with the current contents of @a self .
+ * @param filename The name of the file to parse.
+ * @return The merge id for the merged UI. The merge id can be used
+ * to unmerge the UI with gtk_ui_manager_remove_ui(). If an error occurred,
+ * the return value is 0.
+ *
+ * Since: 2.4.
+ */
+ ui_merge_id add_ui_from_file(const Glib::ustring& filename);
+
+//TODO: Is top=true a good default?
+
+
+ /** Adds a UI element to the current contents of @a self .
+ *
+ * If @a type is Gtk::UI_MANAGER_AUTO, GTK+ inserts a menuitem, toolitem or
+ * separator if such an element can be inserted at the place determined by
+ * @a path . Otherwise @a type must indicate an element that can be inserted at
+ * the place determined by @a path .
+ *
+ * @a see add_ui_separator().
+ *
+ * Since: 2.4
+ * @param merge_id The merge id for the merged UI, see gtk_ui_manager_new_merge_id().
+ * @param path A path.
+ * @param name The name for the added UI element.
+ * @param action The name of the action to be proxied, if this is not a separator.
+ * @param type The type of UI element to add.
+ * @param top If <tt>true</tt>, the UI element is added before its siblings, otherwise it
+ * is added after its siblings.
+ */
+ void add_ui(ui_merge_id merge_id, const Glib::ustring& path, const Glib::ustring& name, const Glib::ustring& action, UIManagerItemType type = Gtk::UI_MANAGER_AUTO, bool top = true);
+
+ /** Adds a separator UI element to the current contents.
+ *
+ * If @a type is Gtk::UI_MANAGER_AUTO, GTK+ inserts a menuitem, toolitem or
+ * separator if such an element can be inserted at the place determined by
+ * @a path . Otherwise @a type must indicate an element that can be inserted at
+ * the place determined by @a path.
+ *
+ * @see add_ui().
+ *
+ * Since: 2.4
+ * @param merge_id The merge id for the merged UI, see gtk_ui_manager_new_merge_id().
+ * @param path A path.
+ * @param name The name for the added UI element.
+ * @param type The type of UI element to add.
+ * @param top If <tt>true</tt>, the UI element is added before its siblings, otherwise it
+ * is added after its siblings.
+ */
+ void add_ui_separator(ui_merge_id merge_id, const Glib::ustring& path, const Glib::ustring& name = "", UIManagerItemType type = Gtk::UI_MANAGER_AUTO, bool top = true);
+
+
+ /** Unmerges the part of @a self &lt;!-- --&gt;s content identified by @a merge_id .
+ *
+ * Since: 2.4
+ * @param merge_id A merge id as returned by gtk_ui_manager_add_ui_from_string().
+ */
+ void remove_ui(ui_merge_id merge_id);
+
+ /** Creates a UI definition of the merged UI.
+ * @return A newly allocated string containing an XML representation of
+ * the merged UI.
+ *
+ * Since: 2.4.
+ */
+ Glib::ustring get_ui() const;
+
+ /** Makes sure that all pending updates to the UI have been completed.
+ *
+ * This may occasionally be necessary, since Gtk::UIManager updates the
+ * UI in an idle function. A typical example where this function is
+ * useful is to enforce that the menubar and toolbar have been added to
+ * the main window before showing it:
+ * @code
+ *
+ * gtk_container_add (GTK_CONTAINER (window), vbox);
+ * g_signal_connect (merge, "add_widget",
+ * G_CALLBACK (add_widget), vbox);
+ * gtk_ui_manager_add_ui_from_file (merge, "my-menus");
+ * gtk_ui_manager_add_ui_from_file (merge, "my-toolbars");
+ * gtk_ui_manager_ensure_update (merge);
+ * gtk_widget_show (window);
+ *
+ * @endcode
+ *
+ * Since: 2.4
+ */
+ void ensure_update();
+
+ /** Returns an unused merge id, suitable for use with
+ * gtk_ui_manager_add_ui().
+ * @return An unused merge id.
+ *
+ * Since: 2.4.
+ */
+ ui_merge_id new_merge_id();
+
+
+ Glib::SignalProxy1< void,Widget* > signal_add_widget();
+
+
+ Glib::SignalProxy0< void > signal_actions_changed();
+
+
+ Glib::SignalProxy2< void,const Glib::RefPtr<Action>&,Widget* > signal_connect_proxy();
+
+
+ Glib::SignalProxy2< void,const Glib::RefPtr<Action>&,Widget* > signal_disconnect_proxy();
+
+
+ Glib::SignalProxy1< void,const Glib::RefPtr<Action>& > signal_pre_activate();
+
+
+ Glib::SignalProxy1< void,const Glib::RefPtr<Action>& > signal_post_activate();
+
+
+ /** Whether tearoff menu items should be added to menus.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_add_tearoffs() ;
+
+/** Whether tearoff menu items should be added to menus.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_add_tearoffs() const;
+
+ /** An XML string describing the merged UI.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_ui() const;
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_add_widget(Widget* widget);
+ virtual void on_actions_changed();
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::UIManager
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Gtk::UIManager> wrap(GtkUIManager* object, bool take_copy = false);
+}
+
+
+#endif /* _GTKMM_UIMANAGER_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/viewport.cc b/libs/gtkmm2/gtk/gtkmm/viewport.cc
new file mode 100644
index 0000000000..c06abb80aa
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/viewport.cc
@@ -0,0 +1,297 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/viewport.h>
+#include <gtkmm/private/viewport_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/viewport.h>
+#include <gtkmm/adjustment.h>
+#include <gtk/gtkviewport.h>
+
+
+namespace
+{
+
+void Viewport_signal_set_scroll_adjustments_callback(GtkViewport* self, GtkAdjustment* p0,GtkAdjustment* p1,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,Gtk::Adjustment*,Gtk::Adjustment* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::wrap(p0)
+, Glib::wrap(p1)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo Viewport_signal_set_scroll_adjustments_info =
+{
+ "set_scroll_adjustments",
+ (GCallback) &Viewport_signal_set_scroll_adjustments_callback,
+ (GCallback) &Viewport_signal_set_scroll_adjustments_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::Viewport* wrap(GtkViewport* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::Viewport *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Viewport_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Viewport_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_viewport_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Viewport_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->set_scroll_adjustments = &set_scroll_adjustments_callback;
+}
+
+
+void Viewport_Class::set_scroll_adjustments_callback(GtkViewport* self, GtkAdjustment* p0, GtkAdjustment* p1)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_set_scroll_adjustments(Glib::wrap(p0)
+, Glib::wrap(p1)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->set_scroll_adjustments)
+ (*base->set_scroll_adjustments)(self, p0, p1);
+ }
+}
+
+
+Glib::ObjectBase* Viewport_Class::wrap_new(GObject* o)
+{
+ return manage(new Viewport((GtkViewport*)(o)));
+
+}
+
+
+/* The implementation: */
+
+Viewport::Viewport(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Bin(construct_params)
+{
+ }
+
+Viewport::Viewport(GtkViewport* castitem)
+:
+ Gtk::Bin((GtkBin*)(castitem))
+{
+ }
+
+Viewport::~Viewport()
+{
+ destroy_();
+}
+
+Viewport::CppClassType Viewport::viewport_class_; // initialize static member
+
+GType Viewport::get_type()
+{
+ return viewport_class_.init().get_type();
+}
+
+GType Viewport::get_base_type()
+{
+ return gtk_viewport_get_type();
+}
+
+
+Viewport::Viewport(Adjustment& hadjustment, Adjustment& vadjustment)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Bin(Glib::ConstructParams(viewport_class_.init(), "hadjustment", (hadjustment).gobj(), "vadjustment", (vadjustment).gobj(), (char*) 0))
+{
+ }
+
+Gtk::Adjustment* Viewport::get_hadjustment()
+{
+ return Glib::wrap(gtk_viewport_get_hadjustment(gobj()));
+}
+
+const Gtk::Adjustment* Viewport::get_hadjustment() const
+{
+ return Glib::wrap(gtk_viewport_get_hadjustment(const_cast<GtkViewport*>(gobj())));
+}
+
+Gtk::Adjustment* Viewport::get_vadjustment()
+{
+ return Glib::wrap(gtk_viewport_get_vadjustment(gobj()));
+}
+
+const Gtk::Adjustment* Viewport::get_vadjustment() const
+{
+ return Glib::wrap(gtk_viewport_get_vadjustment(const_cast<GtkViewport*>(gobj())));
+}
+
+void Viewport::set_hadjustment(Gtk::Adjustment* adjustment)
+{
+ gtk_viewport_set_hadjustment(gobj(), (GtkAdjustment*)Glib::unwrap(adjustment));
+}
+
+void Viewport::set_hadjustment(Gtk::Adjustment& adjustment)
+{
+ gtk_viewport_set_hadjustment(gobj(), (adjustment).gobj());
+}
+
+void Viewport::set_vadjustment(Gtk::Adjustment* adjustment)
+{
+ gtk_viewport_set_vadjustment(gobj(), (GtkAdjustment*)Glib::unwrap(adjustment));
+}
+
+void Viewport::set_vadjustment(Gtk::Adjustment& adjustment)
+{
+ gtk_viewport_set_vadjustment(gobj(), (adjustment).gobj());
+}
+
+void Viewport::set_shadow_type(ShadowType type)
+{
+ gtk_viewport_set_shadow_type(gobj(), ((GtkShadowType)(type)));
+}
+
+ShadowType Viewport::get_shadow_type() const
+{
+ return ((ShadowType)(gtk_viewport_get_shadow_type(const_cast<GtkViewport*>(gobj()))));
+}
+
+
+Glib::SignalProxy2< void,Gtk::Adjustment*,Gtk::Adjustment* > Viewport::signal_set_scroll_adjustments()
+{
+ return Glib::SignalProxy2< void,Gtk::Adjustment*,Gtk::Adjustment* >(this, &Viewport_signal_set_scroll_adjustments_info);
+}
+
+
+Glib::PropertyProxy<Gtk::Adjustment*> Viewport::property_hadjustment()
+{
+ return Glib::PropertyProxy<Gtk::Adjustment*>(this, "hadjustment");
+}
+
+Glib::PropertyProxy_ReadOnly<Gtk::Adjustment*> Viewport::property_hadjustment() const
+{
+ return Glib::PropertyProxy_ReadOnly<Gtk::Adjustment*>(this, "hadjustment");
+}
+
+Glib::PropertyProxy<Gtk::Adjustment*> Viewport::property_vadjustment()
+{
+ return Glib::PropertyProxy<Gtk::Adjustment*>(this, "vadjustment");
+}
+
+Glib::PropertyProxy_ReadOnly<Gtk::Adjustment*> Viewport::property_vadjustment() const
+{
+ return Glib::PropertyProxy_ReadOnly<Gtk::Adjustment*>(this, "vadjustment");
+}
+
+Glib::PropertyProxy<ShadowType> Viewport::property_shadow_type()
+{
+ return Glib::PropertyProxy<ShadowType>(this, "shadow-type");
+}
+
+Glib::PropertyProxy_ReadOnly<ShadowType> Viewport::property_shadow_type() const
+{
+ return Glib::PropertyProxy_ReadOnly<ShadowType>(this, "shadow-type");
+}
+
+
+void Gtk::Viewport::on_set_scroll_adjustments(Gtk::Adjustment* hadjustment, Gtk::Adjustment* vadjustment)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->set_scroll_adjustments)
+ (*base->set_scroll_adjustments)(gobj(),(GtkAdjustment*)Glib::unwrap(hadjustment),(GtkAdjustment*)Glib::unwrap(vadjustment));
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/viewport.h b/libs/gtkmm2/gtk/gtkmm/viewport.h
new file mode 100644
index 0000000000..42d429c15d
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/viewport.h
@@ -0,0 +1,231 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_VIEWPORT_H
+#define _GTKMM_VIEWPORT_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* viewport.h
+ *
+ * Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/bin.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkViewport GtkViewport;
+typedef struct _GtkViewportClass GtkViewportClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class Viewport_Class; } // namespace Gtk
+namespace Gtk {
+class Adjustment;
+
+/** An adapter which makes widgets scrollable.
+ *
+ * @ingroup Widgets
+ * @ingroup Containers
+ */
+
+class Viewport : public Bin
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Viewport CppObjectType;
+ typedef Viewport_Class CppClassType;
+ typedef GtkViewport BaseObjectType;
+ typedef GtkViewportClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~Viewport();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class Viewport_Class;
+ static CppClassType viewport_class_;
+
+ // noncopyable
+ Viewport(const Viewport&);
+ Viewport& operator=(const Viewport&);
+
+protected:
+ explicit Viewport(const Glib::ConstructParams& construct_params);
+ explicit Viewport(GtkViewport* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkViewport* gobj() { return reinterpret_cast<GtkViewport*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkViewport* gobj() const { return reinterpret_cast<GtkViewport*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_set_scroll_adjustments(Gtk::Adjustment* hadjustment, Gtk::Adjustment* vadjustment);
+
+
+private:
+
+public:
+
+ explicit Viewport(Adjustment& hadjustment, Adjustment& vadjustment);
+
+
+ /** Returns the horizontal adjustment of the viewport.
+ * @return The horizontal adjustment of @a viewport .
+ */
+ Gtk::Adjustment* get_hadjustment();
+
+ /** Returns the horizontal adjustment of the viewport.
+ * @return The horizontal adjustment of @a viewport .
+ */
+ const Gtk::Adjustment* get_hadjustment() const;
+
+
+ /** Returns the vertical adjustment of the viewport.
+ * @return The vertical adjustment of @a viewport .
+ */
+ Gtk::Adjustment* get_vadjustment();
+
+ /** Returns the vertical adjustment of the viewport.
+ * @return The vertical adjustment of @a viewport .
+ */
+ const Gtk::Adjustment* get_vadjustment() const;
+
+
+ /** Sets the horizontal adjustment of the viewport.
+ * @param adjustment A Gtk::Adjustment.
+ */
+ void set_hadjustment(Gtk::Adjustment* adjustment=0);
+
+ /** Sets the horizontal adjustment of the viewport.
+ * @param adjustment A Gtk::Adjustment.
+ */
+ void set_hadjustment(Gtk::Adjustment& adjustment);
+
+
+ /** Sets the vertical adjustment of the viewport.
+ * @param adjustment A Gtk::Adjustment.
+ */
+ void set_vadjustment(Gtk::Adjustment* adjustment=0);
+
+ /** Sets the vertical adjustment of the viewport.
+ * @param adjustment A Gtk::Adjustment.
+ */
+ void set_vadjustment(Gtk::Adjustment& adjustment);
+
+
+ /** Sets the shadow type of the viewport.
+ * @param type The new shadow type.
+ */
+ void set_shadow_type(ShadowType type);
+
+
+ /** Gets the shadow type of the Gtk::Viewport. See
+ * set_shadow_type().
+ * @return The shadow type.
+ */
+ ShadowType get_shadow_type() const;
+
+
+ Glib::SignalProxy2< void,Gtk::Adjustment*,Gtk::Adjustment* > signal_set_scroll_adjustments();
+
+
+ /** The GtkAdjustment that determines the values of the horizontal position for this viewport.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Gtk::Adjustment*> property_hadjustment() ;
+
+/** The GtkAdjustment that determines the values of the horizontal position for this viewport.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Gtk::Adjustment*> property_hadjustment() const;
+
+ /** The GtkAdjustment that determines the values of the vertical position for this viewport.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Gtk::Adjustment*> property_vadjustment() ;
+
+/** The GtkAdjustment that determines the values of the vertical position for this viewport.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Gtk::Adjustment*> property_vadjustment() const;
+
+ /** Determines how the shadowed box around the viewport is drawn.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<ShadowType> property_shadow_type() ;
+
+/** Determines how the shadowed box around the viewport is drawn.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<ShadowType> property_shadow_type() const;
+
+
+};
+
+} /* namespace Gtk */
+
+
+namespace Glib
+{
+ /** @relates Gtk::Viewport
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::Viewport* wrap(GtkViewport* object, bool take_copy = false);
+}
+#endif /* _GTKMM_VIEWPORT_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/widget.cc b/libs/gtkmm2/gtk/gtkmm/widget.cc
new file mode 100644
index 0000000000..eabf1ed4a8
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/widget.cc
@@ -0,0 +1,7088 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/widget.h>
+#include <gtkmm/private/widget_p.h>
+
+#include <gtk/gtktypebuiltins.h>
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/adjustment.h>
+#include <gtkmm/window.h>
+#include <gtkmm/accelgroup.h>
+#include <gtkmm/settings.h>
+#include <gtkmm/style.h>
+#include <gtkmm/container.h>
+#include <gtkmm/selectiondata_private.h>
+#include <gtk/gtkdnd.h>
+#include <gtk/gtkselection.h>
+#include <gtk/gtkwidget.h>
+#include <gtk/gtkcontainer.h>
+#include <gtk/gtkmain.h>
+
+
+namespace //anonymous
+{
+
+//These signal callbacks are custom implemented, so that we can create a temporary SelectionData instance.
+//To do this, we used the optional custom_c_callback paramater to _WRAP_SIGNAL() in the .hg file.
+void Widget_signal_drag_data_get_callback(GtkWidget* self, GdkDragContext* p0,GtkSelectionData* p1,guint p2,guint p3,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,const Glib::RefPtr<Gdk::DragContext>&,SelectionData&,guint,guint > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ {
+ SelectionData_WithoutOwnership temp_instance(p1);
+ (*static_cast<SlotType*>(slot))( Glib::wrap(p0, true), temp_instance, p2, p3 );
+ }
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+void Widget_signal_selection_get_callback(GtkWidget* self, GtkSelectionData* p0,guint p1,guint p2,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void, SelectionData&, guint, guint > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ {
+ SelectionData_WithoutOwnership temp_instance(p0);
+ (*static_cast<SlotType*>(slot))( temp_instance, p1, p2 );
+ }
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+
+} //anonymous
+
+namespace Gtk
+{
+
+//These default handler callbacks are custom implemented, so that we can create a temporary SelectionData instance.
+//To do this, we used the optional custom_c_callback paramater to _WRAP_SIGNAL() in the .hg file.
+void Widget_Class::selection_get_callback(GtkWidget* self, GtkSelectionData* p0, guint p1, guint p2)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ SelectionData_WithoutOwnership temp_instance(p0);
+ obj->on_selection_get(temp_instance, p1, p2);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->selection_get)
+ (*base->selection_get)(self, p0, p1, p2);
+ }
+}
+
+void Widget_Class::drag_data_get_callback(GtkWidget* self, GdkDragContext* p0, GtkSelectionData* p1, guint p2, guint p3)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ SelectionData_WithoutOwnership temp_instance(p1);
+ obj->on_drag_data_get(Glib::wrap(p0, true), temp_instance, p2, p3);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->drag_data_get)
+ (*base->drag_data_get)(self, p0, p1, p2, p3);
+ }
+}
+
+Widget::~Widget()
+{}
+
+bool Widget::intersect(const Gdk::Rectangle& area) const
+{
+ return gtk_widget_intersect(
+ const_cast<GtkWidget*>(gobj()), const_cast<GdkRectangle*>(area.gobj()), 0);
+}
+
+void Widget::unset_name()
+{
+ gtk_widget_set_name(gobj(), 0);
+}
+
+void Widget::unset_composite_name()
+{
+ gtk_widget_set_composite_name(gobj(), 0);
+}
+
+void Widget::realize_if_needed()
+{
+ if(!is_realized())
+ realize();
+}
+
+void Widget::add_modal_grab()
+{
+ gtk_grab_add(gobj());
+}
+
+void Widget::remove_modal_grab()
+{
+ gtk_grab_remove(gobj());
+}
+
+Widget* Widget::get_current_modal_grab()
+{
+ return Glib::wrap(gtk_grab_get_current());
+}
+
+void Widget::path(Glib::ustring& path_arg, Glib::ustring& path_reversed)
+{
+ guint path_length = 0;
+ Glib::ScopedPtr<gchar> path_ptr;
+ Glib::ScopedPtr<gchar> rpath_ptr;
+
+ gtk_widget_path(gobj(), &path_length, path_ptr.addr(), rpath_ptr.addr());
+
+ path_arg.assign(path_ptr.get(), path_ptr.get() + path_length);
+ path_reversed.assign(rpath_ptr.get(), rpath_ptr.get() + path_length);
+}
+
+void Widget::class_path(Glib::ustring& path_arg, Glib::ustring& path_reversed)
+{
+ guint path_length = 0;
+ Glib::ScopedPtr<gchar> path_ptr;
+ Glib::ScopedPtr<gchar> rpath_ptr;
+
+ gtk_widget_class_path(gobj(), &path_length, path_ptr.addr(), rpath_ptr.addr());
+
+ path_arg.assign(path_ptr.get(), path_ptr.get() + path_length);
+ path_reversed.assign(rpath_ptr.get(), rpath_ptr.get() + path_length);
+}
+
+void Widget::modify_bg_pixmap(StateType state, const Glib::ustring& pixmap_name)
+{
+ const Glib::RefPtr<RcStyle> modifier_style = get_modifier_style();
+ modifier_style->set_bg_pixmap_name(state, pixmap_name);
+ modify_style(modifier_style);
+}
+
+void Widget::unset_fg(StateType state)
+{
+ gtk_widget_modify_fg(gobj(), static_cast<GtkStateType>(int(state)), 0);
+}
+
+void Widget::unset_bg(StateType state)
+{
+ gtk_widget_modify_bg(gobj(), static_cast<GtkStateType>(int(state)), 0);
+}
+
+void Widget::unset_text(StateType state)
+{
+ gtk_widget_modify_text(gobj(), static_cast<GtkStateType>(int(state)), 0);
+}
+
+void Widget::unset_base(StateType state)
+{
+ gtk_widget_modify_base(gobj(), static_cast<GtkStateType>(int(state)), 0);
+}
+
+void Widget::unset_font()
+{
+ gtk_widget_modify_font(gobj(), 0);
+}
+
+bool Widget::is_toplevel() const
+ { return GTK_WIDGET_TOPLEVEL(gobj()); }
+
+bool Widget::has_no_window() const
+ { return GTK_WIDGET_NO_WINDOW(gobj()); }
+
+bool Widget::is_realized() const
+ { return GTK_WIDGET_REALIZED(gobj()); }
+
+bool Widget::is_mapped() const
+ { return GTK_WIDGET_MAPPED(gobj()); }
+
+bool Widget::is_visible() const
+ { return GTK_WIDGET_VISIBLE(gobj()); }
+
+bool Widget::is_drawable() const
+ { return GTK_WIDGET_DRAWABLE(gobj()); }
+
+bool Widget::sensitive() const
+ { return GTK_WIDGET_SENSITIVE(gobj()); }
+
+bool Widget::parent_sensitive() const
+ { return GTK_WIDGET_PARENT_SENSITIVE(gobj()); }
+
+bool Widget::is_sensitive() const
+ { return GTK_WIDGET_IS_SENSITIVE(gobj()); }
+
+bool Widget::can_focus() const
+ { return GTK_WIDGET_CAN_FOCUS(gobj()); }
+
+bool Widget::has_focus() const
+ { return GTK_WIDGET_HAS_FOCUS(gobj()); }
+
+bool Widget::can_default() const
+ { return GTK_WIDGET_CAN_DEFAULT(gobj()); }
+
+bool Widget::has_default() const
+ { return GTK_WIDGET_HAS_DEFAULT(gobj()); }
+
+bool Widget::has_grab() const
+ { return GTK_WIDGET_HAS_GRAB(gobj()); }
+
+bool Widget::rc_style() const
+ { return GTK_WIDGET_RC_STYLE(gobj()); }
+
+bool Widget::is_composite_child() const
+ { return GTK_WIDGET_COMPOSITE_CHILD(gobj()); }
+
+bool Widget::app_paintable() const
+ { return GTK_WIDGET_APP_PAINTABLE(gobj()); }
+
+bool Widget::receives_default() const
+ { return GTK_WIDGET_RECEIVES_DEFAULT(gobj()); }
+
+bool Widget::double_buffered() const
+ { return GTK_WIDGET_DOUBLE_BUFFERED(gobj()); }
+
+WidgetFlags Widget::get_flags() const
+ { return static_cast<WidgetFlags>(GTK_WIDGET_FLAGS(gobj())); }
+
+void Widget::set_flags(WidgetFlags flags)
+ { GTK_WIDGET_SET_FLAGS(gobj(), static_cast<guint32>(flags)); }
+
+void Widget::unset_flags(WidgetFlags flags)
+ { GTK_WIDGET_UNSET_FLAGS(gobj(), static_cast<guint32>(flags)); }
+
+int Widget::get_width() const
+ { return gobj()->allocation.width; }
+
+int Widget::get_height() const
+ { return gobj()->allocation.height; }
+
+
+void Widget::drag_dest_set(DestDefaults flags, Gdk::DragAction actions)
+{
+ gtk_drag_dest_set(gobj(), (GtkDestDefaults)flags, 0, 0, (GdkDragAction)actions);
+}
+
+void Widget::drag_dest_set(const ArrayHandle_TargetEntry& targets,
+ DestDefaults flags, Gdk::DragAction actions)
+{
+ // I've used Gdk::ACTION_COPY as the default, because Gdk::ACTION_DEFAULT means that
+ // it's never a drag destination, so it would seem like this method didn't work. murrayc.
+ gtk_drag_dest_set(
+ gobj(), (GtkDestDefaults)flags,
+ targets.data(), targets.size(), (GdkDragAction)actions);
+}
+
+void Widget::drag_source_set(const ArrayHandle_TargetEntry& targets,
+ Gdk::ModifierType start_button_mask, Gdk::DragAction actions)
+{
+ // I've used Gdk::MODIFIER_MASK as the default, because it seems
+ // to mean 'whatever is possible in the context'. murrayc.
+ gtk_drag_source_set(
+ gobj(), (GdkModifierType)start_button_mask,
+ targets.data(), targets.size(), (GdkDragAction)actions);
+}
+
+Widget* Widget::drag_get_source_widget(const Glib::RefPtr<Gdk::DragContext>& context) //static
+{
+ return Glib::wrap( gtk_drag_get_source_widget(Glib::unwrap(context)) );
+}
+
+void Widget::drag_set_as_icon(const Glib::RefPtr<Gdk::DragContext>& context, int hot_x, int hot_y)
+{
+ gtk_drag_set_icon_widget(Glib::unwrap(context), gobj(), hot_x, hot_y);
+}
+
+void Widget_Class::hierarchy_changed_callback_custom(GtkWidget* self, GtkWidget* p0)
+{
+ //GTKMM_LIFECYCLE
+ //Don't call wrap() on a GTK+ instance whose gtkmm instance has been deleted - just call the original C callback.
+ bool gtkmm_child_already_deleted = Glib::_gobject_cppinstance_already_deleted((GObject*)p0);
+
+ if(!gtkmm_child_already_deleted)
+ {
+ //Call the regular, generated callback:
+ Widget_Class::hierarchy_changed_callback(self, p0);
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ //Call the original underlying C function:
+ if(base && base->hierarchy_changed)
+ (*base->hierarchy_changed)(self, p0);
+ }
+}
+
+void Widget_Class::parent_set_callback_custom(GtkWidget* self, GtkWidget* p0)
+{
+ //GTKMM_LIFECYCLE
+ //Don't call wrap() on a GTK+ instance whose gtkmm instance has been deleted - just call the original C callback.
+ bool gtkmm_p0_already_deleted = Glib::_gobject_cppinstance_already_deleted((GObject*)p0);
+
+ if(!gtkmm_p0_already_deleted)
+ {
+ //Call the regular, generated callback:
+ Widget_Class::parent_set_callback(self, p0);
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ //Call the original underlying C function:
+ if(base && base->parent_set)
+ (*base->parent_set)(self, p0);
+ }
+}
+
+void Widget_Class::dispose_vfunc_callback(GObject* self)
+{
+ //Avoid disposal. See also Window_Class::dispose_vfunc_callback().
+
+ #ifdef GLIBMM_DEBUG_REFCOUNTING
+ g_warning("Widget_Class::dispose_vfunc_callback(): gobject_: %p\n", (void*)self);
+ //if(self)
+ //g_warning(" gtypename: %s\n", G_OBJECT_TYPE_NAME(self));
+ #endif
+
+ Widget *const obj = dynamic_cast<Widget*>(
+ Glib::ObjectBase::_get_current_wrapper(self));
+
+ // This function might be invoked recursively because we're triggering
+ // several signal emissions, particularly signal_hide(). Therefore we
+ // have to test for cpp_destruction_in_progress_ at this point.
+
+ if(obj && !obj->_cpp_destruction_is_in_progress()) //When it should really be destroyed, we zero gobj_.
+ {
+ GtkWidget *const pWidget = obj->gobj();
+ g_return_if_fail(pWidget == GTK_WIDGET(self));
+
+ // Abort dispose if the widget isn't managed, in order to prevent
+ // the nasty self-destroying behaviour of GTK+. This applies to
+ // any widget inside a GtkContainer on gtk_container_destroy()
+ // See also Window_Class::dispose_vfunc_callback().
+
+ if(obj->referenced_) //Not managed
+ {
+ // GTKMM_LIFECYCLE
+ // Remove the widget from its parent container so that it
+ // won't be destroyed later by gtk_container_destroy().
+ if(pWidget->parent)
+ {
+ // Normally, we would have to ref the child widget because
+ // gtk_container_remove() unrefs it. But since we only remove
+ // non-managed objects here, the container just releases the
+ // reference it has acquired before in gtk_container_add().
+
+ #ifdef GLIBMM_DEBUG_REFCOUNTING
+ g_warning("Widget_Class::dispose_vfunc_callback(): removing gobject_: %p from parent: %p", (void*)self, (void*)pWidget->parent);
+ #endif
+
+ gtk_container_remove(GTK_CONTAINER(pWidget->parent), pWidget);
+
+ #ifdef GLIBMM_DEBUG_REFCOUNTING
+ g_warning("Widget_Class::dispose_vfunc_callback(): after removing from parent.");
+ #endif
+ }
+
+ #ifdef GLIBMM_DEBUG_REFCOUNTING
+ g_warning("Widget_Class::dispose_vfunc_callback(): before gtk_widget_hide().");
+ #endif
+
+ // Now hide the widget. The C++ object must _not_ be accessed anymore
+ // after this call, because a signal_hide() handler might delete it.
+ gtk_widget_hide(pWidget);
+
+ #ifdef GLIBMM_DEBUG_REFCOUNTING
+ g_warning("Widget_Class::dispose_vfunc_callback(): after gtk_widget_hide().");
+ #endif
+
+ // GTKMM_LIFECYCLE
+ return; // Prevent calling of normal C dispose vfunc (see below)
+ }
+
+ #ifdef GLIBMM_DEBUG_REFCOUNTING
+ g_warning("Widget_Class::dispose_vfunc_callback(): unreferenced: before gtk_widget_hide().");
+ #endif
+
+ // Always hide widgets on gtk_object_destroy(), regardless of whether
+ // the widget is managed or not. This is done for consistency so that
+ // connecting to signal_hide() is guaranteed to work.
+ gtk_widget_hide(pWidget);
+
+ #ifdef GLIBMM_DEBUG_REFCOUNTING
+ g_warning("Widget_Class::dispose_vfunc_callback(): unreferenced: after gtk_widget_hide().");
+ #endif
+ }
+
+ GObjectClass *const base = static_cast<GObjectClass*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)));
+
+ #ifdef GLIBMM_DEBUG_REFCOUNTING
+ g_warning("Widget_Class::dispose_vfunc_callback(): before calling base->dispose.");
+ #endif
+
+ if(base->dispose)
+ (*base->dispose)(self);
+
+ #ifdef GLIBMM_DEBUG_REFCOUNTING
+ g_warning("Widget_Class::dispose_vfunc_callback(): after calling base->dispose.");
+ #endif
+}
+
+
+void Widget::unset_style()
+{
+ gtk_widget_set_style(gobj(), 0 /* See GTK+ docs */);
+}
+
+Glib::ustring Widget::drag_dest_find_target(const Glib::RefPtr<Gdk::DragContext>& context) const
+{
+ return Gdk::AtomString::to_cpp_type(gtk_drag_dest_find_target(const_cast<GtkWidget*>(gobj()), Glib::unwrap(context), 0 /* See GTK+ docs */));
+}
+
+void Widget::unset_shape_combine_mask()
+{
+ gtk_widget_shape_combine_mask(gobj(), 0, 0, 0); /* See GTK+ docs */
+}
+
+void Widget::draw_insertion_cursor(Glib::RefPtr<Gdk::Drawable> drawable, const Gdk::Rectangle& area, const Gdk::Rectangle& location, bool is_primary, TextDirection direction, bool draw_arrow)
+{
+ gtk_draw_insertion_cursor(gobj(), drawable->gobj(), const_cast<GdkRectangle*>(area.gobj()), const_cast<GdkRectangle*>(location.gobj()), is_primary, (GtkTextDirection)direction, draw_arrow);
+}
+
+Requisition Widget::size_request() const
+{
+ Requisition requisition;
+ gtk_widget_size_request(const_cast<GtkWidget*>(gobj()), (GtkRequisition*)(&requisition));
+ return requisition;
+}
+
+
+} // namespace Gtk
+
+
+namespace
+{
+
+const Glib::SignalProxyInfo Widget_signal_show_info =
+{
+ "show",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+
+const Glib::SignalProxyInfo Widget_signal_hide_info =
+{
+ "hide",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+
+const Glib::SignalProxyInfo Widget_signal_map_info =
+{
+ "map",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+
+const Glib::SignalProxyInfo Widget_signal_unmap_info =
+{
+ "unmap",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+
+const Glib::SignalProxyInfo Widget_signal_realize_info =
+{
+ "realize",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+
+const Glib::SignalProxyInfo Widget_signal_unrealize_info =
+{
+ "unrealize",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+
+void Widget_signal_size_request_callback(GtkWidget* self, GtkRequisition* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,Requisition* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))((Requisition*)(p0)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo Widget_signal_size_request_info =
+{
+ "size_request",
+ (GCallback) &Widget_signal_size_request_callback,
+ (GCallback) &Widget_signal_size_request_callback
+};
+
+
+void Widget_signal_size_allocate_callback(GtkWidget* self, GtkAllocation* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,Allocation& > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))((Allocation&)(Glib::wrap(p0))
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo Widget_signal_size_allocate_info =
+{
+ "size_allocate",
+ (GCallback) &Widget_signal_size_allocate_callback,
+ (GCallback) &Widget_signal_size_allocate_callback
+};
+
+
+void Widget_signal_state_changed_callback(GtkWidget* self, GtkStateType p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,Gtk::StateType > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(((Gtk::StateType)(p0))
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo Widget_signal_state_changed_info =
+{
+ "state_changed",
+ (GCallback) &Widget_signal_state_changed_callback,
+ (GCallback) &Widget_signal_state_changed_callback
+};
+
+
+void Widget_signal_parent_changed_callback(GtkWidget* self, GtkWidget* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,Widget* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::wrap(p0)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo Widget_signal_parent_changed_info =
+{
+ "parent_set",
+ (GCallback) &Widget_signal_parent_changed_callback,
+ (GCallback) &Widget_signal_parent_changed_callback
+};
+
+
+void Widget_signal_hierarchy_changed_callback(GtkWidget* self, GtkWidget* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,Widget* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::wrap(p0)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo Widget_signal_hierarchy_changed_info =
+{
+ "hierarchy_changed",
+ (GCallback) &Widget_signal_hierarchy_changed_callback,
+ (GCallback) &Widget_signal_hierarchy_changed_callback
+};
+
+
+void Widget_signal_style_changed_callback(GtkWidget* self, GtkStyle* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,const Glib::RefPtr<Style>& > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::wrap(p0, true)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo Widget_signal_style_changed_info =
+{
+ "style_set",
+ (GCallback) &Widget_signal_style_changed_callback,
+ (GCallback) &Widget_signal_style_changed_callback
+};
+
+
+void Widget_signal_direction_changed_callback(GtkWidget* self, GtkTextDirection p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,TextDirection > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(((TextDirection)(p0))
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo Widget_signal_direction_changed_info =
+{
+ "direction_changed",
+ (GCallback) &Widget_signal_direction_changed_callback,
+ (GCallback) &Widget_signal_direction_changed_callback
+};
+
+
+void Widget_signal_grab_notify_callback(GtkWidget* self, gboolean p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,bool > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(p0
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo Widget_signal_grab_notify_info =
+{
+ "grab_notify",
+ (GCallback) &Widget_signal_grab_notify_callback,
+ (GCallback) &Widget_signal_grab_notify_callback
+};
+
+
+void Widget_signal_child_notify_callback(GtkWidget* self, GParamSpec* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,GParamSpec* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(p0);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo Widget_signal_child_notify_info =
+{
+ "child_notify",
+ (GCallback) &Widget_signal_child_notify_callback,
+ (GCallback) &Widget_signal_child_notify_callback
+};
+
+
+gboolean Widget_signal_mnemonic_activate_callback(GtkWidget* self, gboolean p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< bool,bool > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ return static_cast<int>((*static_cast<SlotType*>(slot))(p0
+));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Widget_signal_mnemonic_activate_notify_callback(GtkWidget* self, gboolean p0, void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,bool > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(p0
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+const Glib::SignalProxyInfo Widget_signal_mnemonic_activate_info =
+{
+ "mnemonic_activate",
+ (GCallback) &Widget_signal_mnemonic_activate_callback,
+ (GCallback) &Widget_signal_mnemonic_activate_notify_callback
+};
+
+
+const Glib::SignalProxyInfo Widget_signal_grab_focus_info =
+{
+ "grab_focus",
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
+ (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
+};
+
+
+gboolean Widget_signal_focus_callback(GtkWidget* self, GtkDirectionType p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< bool,DirectionType > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ return static_cast<int>((*static_cast<SlotType*>(slot))(((DirectionType)(p0))
+));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Widget_signal_focus_notify_callback(GtkWidget* self, GtkDirectionType p0, void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,DirectionType > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(((DirectionType)(p0))
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+const Glib::SignalProxyInfo Widget_signal_focus_info =
+{
+ "focus",
+ (GCallback) &Widget_signal_focus_callback,
+ (GCallback) &Widget_signal_focus_notify_callback
+};
+
+
+gboolean Widget_signal_event_callback(GtkWidget* self, GdkEvent* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< bool,GdkEvent* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ return static_cast<int>((*static_cast<SlotType*>(slot))(p0));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Widget_signal_event_notify_callback(GtkWidget* self, GdkEvent* p0, void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,GdkEvent* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(p0);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+const Glib::SignalProxyInfo Widget_signal_event_info =
+{
+ "event",
+ (GCallback) &Widget_signal_event_callback,
+ (GCallback) &Widget_signal_event_notify_callback
+};
+
+
+void Widget_signal_event_after_callback(GtkWidget* self, GdkEvent* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,GdkEvent* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(p0);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo Widget_signal_event_after_info =
+{
+ "event_after",
+ (GCallback) &Widget_signal_event_after_callback,
+ (GCallback) &Widget_signal_event_after_callback
+};
+
+
+gboolean Widget_signal_button_press_event_callback(GtkWidget* self, GdkEventButton* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< bool,GdkEventButton* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ return static_cast<int>((*static_cast<SlotType*>(slot))(p0));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Widget_signal_button_press_event_notify_callback(GtkWidget* self, GdkEventButton* p0, void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,GdkEventButton* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(p0);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+const Glib::SignalProxyInfo Widget_signal_button_press_event_info =
+{
+ "button_press_event",
+ (GCallback) &Widget_signal_button_press_event_callback,
+ (GCallback) &Widget_signal_button_press_event_notify_callback
+};
+
+
+gboolean Widget_signal_button_release_event_callback(GtkWidget* self, GdkEventButton* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< bool,GdkEventButton* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ return static_cast<int>((*static_cast<SlotType*>(slot))(p0));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Widget_signal_button_release_event_notify_callback(GtkWidget* self, GdkEventButton* p0, void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,GdkEventButton* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(p0);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+const Glib::SignalProxyInfo Widget_signal_button_release_event_info =
+{
+ "button_release_event",
+ (GCallback) &Widget_signal_button_release_event_callback,
+ (GCallback) &Widget_signal_button_release_event_notify_callback
+};
+
+
+gboolean Widget_signal_scroll_event_callback(GtkWidget* self, GdkEventScroll* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< bool,GdkEventScroll* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ return static_cast<int>((*static_cast<SlotType*>(slot))(p0));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Widget_signal_scroll_event_notify_callback(GtkWidget* self, GdkEventScroll* p0, void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,GdkEventScroll* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(p0);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+const Glib::SignalProxyInfo Widget_signal_scroll_event_info =
+{
+ "scroll_event",
+ (GCallback) &Widget_signal_scroll_event_callback,
+ (GCallback) &Widget_signal_scroll_event_notify_callback
+};
+
+
+gboolean Widget_signal_motion_notify_event_callback(GtkWidget* self, GdkEventMotion* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< bool,GdkEventMotion* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ return static_cast<int>((*static_cast<SlotType*>(slot))(p0));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Widget_signal_motion_notify_event_notify_callback(GtkWidget* self, GdkEventMotion* p0, void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,GdkEventMotion* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(p0);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+const Glib::SignalProxyInfo Widget_signal_motion_notify_event_info =
+{
+ "motion_notify_event",
+ (GCallback) &Widget_signal_motion_notify_event_callback,
+ (GCallback) &Widget_signal_motion_notify_event_notify_callback
+};
+
+
+gboolean Widget_signal_delete_event_callback(GtkWidget* self, GdkEventAny* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< bool,GdkEventAny* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ return static_cast<int>((*static_cast<SlotType*>(slot))(p0));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Widget_signal_delete_event_notify_callback(GtkWidget* self, GdkEventAny* p0, void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,GdkEventAny* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(p0);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+const Glib::SignalProxyInfo Widget_signal_delete_event_info =
+{
+ "delete_event",
+ (GCallback) &Widget_signal_delete_event_callback,
+ (GCallback) &Widget_signal_delete_event_notify_callback
+};
+
+
+gboolean Widget_signal_expose_event_callback(GtkWidget* self, GdkEventExpose* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< bool,GdkEventExpose* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ return static_cast<int>((*static_cast<SlotType*>(slot))(p0));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Widget_signal_expose_event_notify_callback(GtkWidget* self, GdkEventExpose* p0, void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,GdkEventExpose* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(p0);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+const Glib::SignalProxyInfo Widget_signal_expose_event_info =
+{
+ "expose_event",
+ (GCallback) &Widget_signal_expose_event_callback,
+ (GCallback) &Widget_signal_expose_event_notify_callback
+};
+
+
+gboolean Widget_signal_key_press_event_callback(GtkWidget* self, GdkEventKey* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< bool,GdkEventKey* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ return static_cast<int>((*static_cast<SlotType*>(slot))(p0));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Widget_signal_key_press_event_notify_callback(GtkWidget* self, GdkEventKey* p0, void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,GdkEventKey* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(p0);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+const Glib::SignalProxyInfo Widget_signal_key_press_event_info =
+{
+ "key_press_event",
+ (GCallback) &Widget_signal_key_press_event_callback,
+ (GCallback) &Widget_signal_key_press_event_notify_callback
+};
+
+
+gboolean Widget_signal_key_release_event_callback(GtkWidget* self, GdkEventKey* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< bool,GdkEventKey* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ return static_cast<int>((*static_cast<SlotType*>(slot))(p0));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Widget_signal_key_release_event_notify_callback(GtkWidget* self, GdkEventKey* p0, void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,GdkEventKey* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(p0);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+const Glib::SignalProxyInfo Widget_signal_key_release_event_info =
+{
+ "key_release_event",
+ (GCallback) &Widget_signal_key_release_event_callback,
+ (GCallback) &Widget_signal_key_release_event_notify_callback
+};
+
+
+gboolean Widget_signal_enter_notify_event_callback(GtkWidget* self, GdkEventCrossing* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< bool,GdkEventCrossing* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ return static_cast<int>((*static_cast<SlotType*>(slot))(p0));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Widget_signal_enter_notify_event_notify_callback(GtkWidget* self, GdkEventCrossing* p0, void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,GdkEventCrossing* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(p0);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+const Glib::SignalProxyInfo Widget_signal_enter_notify_event_info =
+{
+ "enter_notify_event",
+ (GCallback) &Widget_signal_enter_notify_event_callback,
+ (GCallback) &Widget_signal_enter_notify_event_notify_callback
+};
+
+
+gboolean Widget_signal_leave_notify_event_callback(GtkWidget* self, GdkEventCrossing* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< bool,GdkEventCrossing* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ return static_cast<int>((*static_cast<SlotType*>(slot))(p0));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Widget_signal_leave_notify_event_notify_callback(GtkWidget* self, GdkEventCrossing* p0, void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,GdkEventCrossing* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(p0);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+const Glib::SignalProxyInfo Widget_signal_leave_notify_event_info =
+{
+ "leave_notify_event",
+ (GCallback) &Widget_signal_leave_notify_event_callback,
+ (GCallback) &Widget_signal_leave_notify_event_notify_callback
+};
+
+
+gboolean Widget_signal_configure_event_callback(GtkWidget* self, GdkEventConfigure* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< bool,GdkEventConfigure* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ return static_cast<int>((*static_cast<SlotType*>(slot))(p0));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Widget_signal_configure_event_notify_callback(GtkWidget* self, GdkEventConfigure* p0, void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,GdkEventConfigure* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(p0);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+const Glib::SignalProxyInfo Widget_signal_configure_event_info =
+{
+ "configure_event",
+ (GCallback) &Widget_signal_configure_event_callback,
+ (GCallback) &Widget_signal_configure_event_notify_callback
+};
+
+
+gboolean Widget_signal_focus_in_event_callback(GtkWidget* self, GdkEventFocus* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< bool,GdkEventFocus* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ return static_cast<int>((*static_cast<SlotType*>(slot))(p0));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Widget_signal_focus_in_event_notify_callback(GtkWidget* self, GdkEventFocus* p0, void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,GdkEventFocus* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(p0);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+const Glib::SignalProxyInfo Widget_signal_focus_in_event_info =
+{
+ "focus_in_event",
+ (GCallback) &Widget_signal_focus_in_event_callback,
+ (GCallback) &Widget_signal_focus_in_event_notify_callback
+};
+
+
+gboolean Widget_signal_focus_out_event_callback(GtkWidget* self, GdkEventFocus* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< bool,GdkEventFocus* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ return static_cast<int>((*static_cast<SlotType*>(slot))(p0));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Widget_signal_focus_out_event_notify_callback(GtkWidget* self, GdkEventFocus* p0, void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,GdkEventFocus* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(p0);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+const Glib::SignalProxyInfo Widget_signal_focus_out_event_info =
+{
+ "focus_out_event",
+ (GCallback) &Widget_signal_focus_out_event_callback,
+ (GCallback) &Widget_signal_focus_out_event_notify_callback
+};
+
+
+gboolean Widget_signal_map_event_callback(GtkWidget* self, GdkEventAny* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< bool,GdkEventAny* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ return static_cast<int>((*static_cast<SlotType*>(slot))(p0));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Widget_signal_map_event_notify_callback(GtkWidget* self, GdkEventAny* p0, void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,GdkEventAny* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(p0);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+const Glib::SignalProxyInfo Widget_signal_map_event_info =
+{
+ "map_event",
+ (GCallback) &Widget_signal_map_event_callback,
+ (GCallback) &Widget_signal_map_event_notify_callback
+};
+
+
+gboolean Widget_signal_unmap_event_callback(GtkWidget* self, GdkEventAny* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< bool,GdkEventAny* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ return static_cast<int>((*static_cast<SlotType*>(slot))(p0));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Widget_signal_unmap_event_notify_callback(GtkWidget* self, GdkEventAny* p0, void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,GdkEventAny* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(p0);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+const Glib::SignalProxyInfo Widget_signal_unmap_event_info =
+{
+ "unmap_event",
+ (GCallback) &Widget_signal_unmap_event_callback,
+ (GCallback) &Widget_signal_unmap_event_notify_callback
+};
+
+
+gboolean Widget_signal_property_notify_event_callback(GtkWidget* self, GdkEventProperty* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< bool,GdkEventProperty* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ return static_cast<int>((*static_cast<SlotType*>(slot))(p0));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Widget_signal_property_notify_event_notify_callback(GtkWidget* self, GdkEventProperty* p0, void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,GdkEventProperty* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(p0);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+const Glib::SignalProxyInfo Widget_signal_property_notify_event_info =
+{
+ "property_notify_event",
+ (GCallback) &Widget_signal_property_notify_event_callback,
+ (GCallback) &Widget_signal_property_notify_event_notify_callback
+};
+
+
+gboolean Widget_signal_selection_clear_event_callback(GtkWidget* self, GdkEventSelection* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< bool,GdkEventSelection* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ return static_cast<int>((*static_cast<SlotType*>(slot))(p0));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Widget_signal_selection_clear_event_notify_callback(GtkWidget* self, GdkEventSelection* p0, void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,GdkEventSelection* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(p0);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+const Glib::SignalProxyInfo Widget_signal_selection_clear_event_info =
+{
+ "selection_clear_event",
+ (GCallback) &Widget_signal_selection_clear_event_callback,
+ (GCallback) &Widget_signal_selection_clear_event_notify_callback
+};
+
+
+gboolean Widget_signal_selection_request_event_callback(GtkWidget* self, GdkEventSelection* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< bool,GdkEventSelection* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ return static_cast<int>((*static_cast<SlotType*>(slot))(p0));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Widget_signal_selection_request_event_notify_callback(GtkWidget* self, GdkEventSelection* p0, void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,GdkEventSelection* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(p0);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+const Glib::SignalProxyInfo Widget_signal_selection_request_event_info =
+{
+ "selection_request_event",
+ (GCallback) &Widget_signal_selection_request_event_callback,
+ (GCallback) &Widget_signal_selection_request_event_notify_callback
+};
+
+
+gboolean Widget_signal_selection_notify_event_callback(GtkWidget* self, GdkEventSelection* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< bool,GdkEventSelection* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ return static_cast<int>((*static_cast<SlotType*>(slot))(p0));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Widget_signal_selection_notify_event_notify_callback(GtkWidget* self, GdkEventSelection* p0, void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,GdkEventSelection* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(p0);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+const Glib::SignalProxyInfo Widget_signal_selection_notify_event_info =
+{
+ "selection_notify_event",
+ (GCallback) &Widget_signal_selection_notify_event_callback,
+ (GCallback) &Widget_signal_selection_notify_event_notify_callback
+};
+
+
+gboolean Widget_signal_proximity_in_event_callback(GtkWidget* self, GdkEventProximity* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< bool,GdkEventProximity* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ return static_cast<int>((*static_cast<SlotType*>(slot))(p0));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Widget_signal_proximity_in_event_notify_callback(GtkWidget* self, GdkEventProximity* p0, void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,GdkEventProximity* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(p0);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+const Glib::SignalProxyInfo Widget_signal_proximity_in_event_info =
+{
+ "proximity_in_event",
+ (GCallback) &Widget_signal_proximity_in_event_callback,
+ (GCallback) &Widget_signal_proximity_in_event_notify_callback
+};
+
+
+gboolean Widget_signal_proximity_out_event_callback(GtkWidget* self, GdkEventProximity* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< bool,GdkEventProximity* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ return static_cast<int>((*static_cast<SlotType*>(slot))(p0));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Widget_signal_proximity_out_event_notify_callback(GtkWidget* self, GdkEventProximity* p0, void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,GdkEventProximity* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(p0);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+const Glib::SignalProxyInfo Widget_signal_proximity_out_event_info =
+{
+ "proximity_out_event",
+ (GCallback) &Widget_signal_proximity_out_event_callback,
+ (GCallback) &Widget_signal_proximity_out_event_notify_callback
+};
+
+
+gboolean Widget_signal_visibility_notify_event_callback(GtkWidget* self, GdkEventVisibility* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< bool,GdkEventVisibility* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ return static_cast<int>((*static_cast<SlotType*>(slot))(p0));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Widget_signal_visibility_notify_event_notify_callback(GtkWidget* self, GdkEventVisibility* p0, void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,GdkEventVisibility* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(p0);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+const Glib::SignalProxyInfo Widget_signal_visibility_notify_event_info =
+{
+ "visibility_notify_event",
+ (GCallback) &Widget_signal_visibility_notify_event_callback,
+ (GCallback) &Widget_signal_visibility_notify_event_notify_callback
+};
+
+
+gboolean Widget_signal_client_event_callback(GtkWidget* self, GdkEventClient* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< bool,GdkEventClient* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ return static_cast<int>((*static_cast<SlotType*>(slot))(p0));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Widget_signal_client_event_notify_callback(GtkWidget* self, GdkEventClient* p0, void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,GdkEventClient* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(p0);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+const Glib::SignalProxyInfo Widget_signal_client_event_info =
+{
+ "client_event",
+ (GCallback) &Widget_signal_client_event_callback,
+ (GCallback) &Widget_signal_client_event_notify_callback
+};
+
+
+gboolean Widget_signal_no_expose_event_callback(GtkWidget* self, GdkEventAny* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< bool,GdkEventAny* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ return static_cast<int>((*static_cast<SlotType*>(slot))(p0));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Widget_signal_no_expose_event_notify_callback(GtkWidget* self, GdkEventAny* p0, void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,GdkEventAny* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(p0);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+const Glib::SignalProxyInfo Widget_signal_no_expose_event_info =
+{
+ "no_expose_event",
+ (GCallback) &Widget_signal_no_expose_event_callback,
+ (GCallback) &Widget_signal_no_expose_event_notify_callback
+};
+
+
+gboolean Widget_signal_window_state_event_callback(GtkWidget* self, GdkEventWindowState* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< bool,GdkEventWindowState* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ return static_cast<int>((*static_cast<SlotType*>(slot))(p0));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Widget_signal_window_state_event_notify_callback(GtkWidget* self, GdkEventWindowState* p0, void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,GdkEventWindowState* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(p0);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+const Glib::SignalProxyInfo Widget_signal_window_state_event_info =
+{
+ "window_state_event",
+ (GCallback) &Widget_signal_window_state_event_callback,
+ (GCallback) &Widget_signal_window_state_event_notify_callback
+};
+
+
+const Glib::SignalProxyInfo Widget_signal_selection_get_info =
+{
+ "selection_get",
+ (GCallback) &Widget_signal_selection_get_callback,
+ (GCallback) &Widget_signal_selection_get_callback
+};
+
+
+void Widget_signal_selection_received_callback(GtkWidget* self, GtkSelectionData* p0,guint p1,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,const SelectionData&,guint > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(SelectionData_WithoutOwnership(p0)
+, p1);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo Widget_signal_selection_received_info =
+{
+ "selection_received",
+ (GCallback) &Widget_signal_selection_received_callback,
+ (GCallback) &Widget_signal_selection_received_callback
+};
+
+
+void Widget_signal_drag_begin_callback(GtkWidget* self, GdkDragContext* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,const Glib::RefPtr<Gdk::DragContext>& > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::wrap(p0, true)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo Widget_signal_drag_begin_info =
+{
+ "drag_begin",
+ (GCallback) &Widget_signal_drag_begin_callback,
+ (GCallback) &Widget_signal_drag_begin_callback
+};
+
+
+void Widget_signal_drag_end_callback(GtkWidget* self, GdkDragContext* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,const Glib::RefPtr<Gdk::DragContext>& > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::wrap(p0, true)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo Widget_signal_drag_end_info =
+{
+ "drag_end",
+ (GCallback) &Widget_signal_drag_end_callback,
+ (GCallback) &Widget_signal_drag_end_callback
+};
+
+
+const Glib::SignalProxyInfo Widget_signal_drag_data_get_info =
+{
+ "drag_data_get",
+ (GCallback) &Widget_signal_drag_data_get_callback,
+ (GCallback) &Widget_signal_drag_data_get_callback
+};
+
+
+void Widget_signal_drag_data_delete_callback(GtkWidget* self, GdkDragContext* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,const Glib::RefPtr<Gdk::DragContext>& > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::wrap(p0, true)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo Widget_signal_drag_data_delete_info =
+{
+ "drag_data_delete",
+ (GCallback) &Widget_signal_drag_data_delete_callback,
+ (GCallback) &Widget_signal_drag_data_delete_callback
+};
+
+
+void Widget_signal_drag_leave_callback(GtkWidget* self, GdkDragContext* p0,guint p1,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,const Glib::RefPtr<Gdk::DragContext>&,guint > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::wrap(p0, true)
+, p1);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo Widget_signal_drag_leave_info =
+{
+ "drag_leave",
+ (GCallback) &Widget_signal_drag_leave_callback,
+ (GCallback) &Widget_signal_drag_leave_callback
+};
+
+
+gboolean Widget_signal_drag_motion_callback(GtkWidget* self, GdkDragContext* p0,gint p1,gint p2,guint p3,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< bool,const Glib::RefPtr<Gdk::DragContext>&,int,int,guint > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ return static_cast<int>((*static_cast<SlotType*>(slot))(Glib::wrap(p0, true)
+, p1
+, p2
+, p3));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Widget_signal_drag_motion_notify_callback(GtkWidget* self, GdkDragContext* p0,gint p1,gint p2,guint p3, void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,const Glib::RefPtr<Gdk::DragContext>&,int,int,guint > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::wrap(p0, true)
+, p1
+, p2
+, p3);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+const Glib::SignalProxyInfo Widget_signal_drag_motion_info =
+{
+ "drag_motion",
+ (GCallback) &Widget_signal_drag_motion_callback,
+ (GCallback) &Widget_signal_drag_motion_notify_callback
+};
+
+
+gboolean Widget_signal_drag_drop_callback(GtkWidget* self, GdkDragContext* p0,gint p1,gint p2,guint p3,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< bool,const Glib::RefPtr<Gdk::DragContext>&,int,int,guint > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ return static_cast<int>((*static_cast<SlotType*>(slot))(Glib::wrap(p0, true)
+, p1
+, p2
+, p3));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Widget_signal_drag_drop_notify_callback(GtkWidget* self, GdkDragContext* p0,gint p1,gint p2,guint p3, void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,const Glib::RefPtr<Gdk::DragContext>&,int,int,guint > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::wrap(p0, true)
+, p1
+, p2
+, p3);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+const Glib::SignalProxyInfo Widget_signal_drag_drop_info =
+{
+ "drag_drop",
+ (GCallback) &Widget_signal_drag_drop_callback,
+ (GCallback) &Widget_signal_drag_drop_notify_callback
+};
+
+
+void Widget_signal_drag_data_received_callback(GtkWidget* self, GdkDragContext* p0,gint p1,gint p2,GtkSelectionData* p3,guint p4,guint p5,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,const Glib::RefPtr<Gdk::DragContext>&,int,int,const SelectionData&,guint,guint > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::wrap(p0, true)
+, p1
+, p2
+, SelectionData_WithoutOwnership(p3)
+, p4, p5);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo Widget_signal_drag_data_received_info =
+{
+ "drag_data_received",
+ (GCallback) &Widget_signal_drag_data_received_callback,
+ (GCallback) &Widget_signal_drag_data_received_callback
+};
+
+
+AtkObject* Widget_signal_get_accessible_callback(GtkWidget* self, void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< Glib::RefPtr<Atk::Object> > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ return Glib::unwrap((*static_cast<SlotType*>(slot))());
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef AtkObject* RType;
+ return RType();
+}
+
+AtkObject* Widget_signal_get_accessible_notify_callback(GtkWidget* self, void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef AtkObject* RType;
+ return RType();
+}
+
+const Glib::SignalProxyInfo Widget_signal_get_accessible_info =
+{
+ "get_accessible",
+ (GCallback) &Widget_signal_get_accessible_callback,
+ (GCallback) &Widget_signal_get_accessible_notify_callback
+};
+
+
+void Widget_signal_screen_changed_callback(GtkWidget* self, GdkScreen* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,const Glib::RefPtr<Gdk::Screen>& > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::wrap(p0, true)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo Widget_signal_screen_changed_info =
+{
+ "screen_changed",
+ (GCallback) &Widget_signal_screen_changed_callback,
+ (GCallback) &Widget_signal_screen_changed_callback
+};
+
+} // anonymous namespace
+
+// static
+GType Glib::Value<Gtk::DestDefaults>::value_type()
+{
+ return gtk_dest_defaults_get_type();
+}
+
+// static
+GType Glib::Value<Gtk::WidgetFlags>::value_type()
+{
+ return gtk_widget_flags_get_type();
+}
+
+// static
+GType Glib::Value<Gtk::WidgetHelpType>::value_type()
+{
+ return gtk_widget_help_type_get_type();
+}
+
+
+namespace Glib
+{
+
+Gtk::Widget* wrap(GtkWidget* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::Widget *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Widget_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Widget_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_widget_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ Atk::Implementor::add_interface(get_type());
+ }
+
+ return *this;
+}
+
+void Widget_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ reinterpret_cast<GObjectClass*>(klass)->dispose = &dispose_vfunc_callback;
+ klass->dispatch_child_properties_changed = &dispatch_child_properties_changed_vfunc_callback;
+ klass->show_all = &show_all_vfunc_callback;
+ klass->hide_all = &hide_all_vfunc_callback;
+ klass->get_accessible = &get_accessible_vfunc_callback;
+ klass->show = &show_callback;
+ klass->hide = &hide_callback;
+ klass->map = &map_callback;
+ klass->unmap = &unmap_callback;
+ klass->realize = &realize_callback;
+ klass->unrealize = &unrealize_callback;
+ klass->size_request = &size_request_callback;
+ klass->size_allocate = &size_allocate_callback;
+ klass->state_changed = &state_changed_callback;
+ klass->parent_set = &parent_set_callback;
+ klass->hierarchy_changed = &hierarchy_changed_callback;
+ klass->style_set = &style_set_callback;
+ klass->direction_changed = &direction_changed_callback;
+ klass->grab_notify = &grab_notify_callback;
+ klass->child_notify = &child_notify_callback;
+ klass->mnemonic_activate = &mnemonic_activate_callback;
+ klass->grab_focus = &grab_focus_callback;
+ klass->focus = &focus_callback;
+ klass->event = &event_callback;
+ klass->button_press_event = &button_press_event_callback;
+ klass->button_release_event = &button_release_event_callback;
+ klass->scroll_event = &scroll_event_callback;
+ klass->motion_notify_event = &motion_notify_event_callback;
+ klass->delete_event = &delete_event_callback;
+ klass->expose_event = &expose_event_callback;
+ klass->key_press_event = &key_press_event_callback;
+ klass->key_release_event = &key_release_event_callback;
+ klass->enter_notify_event = &enter_notify_event_callback;
+ klass->leave_notify_event = &leave_notify_event_callback;
+ klass->configure_event = &configure_event_callback;
+ klass->focus_in_event = &focus_in_event_callback;
+ klass->focus_out_event = &focus_out_event_callback;
+ klass->map_event = &map_event_callback;
+ klass->unmap_event = &unmap_event_callback;
+ klass->property_notify_event = &property_notify_event_callback;
+ klass->selection_clear_event = &selection_clear_event_callback;
+ klass->selection_request_event = &selection_request_event_callback;
+ klass->selection_notify_event = &selection_notify_event_callback;
+ klass->proximity_in_event = &proximity_in_event_callback;
+ klass->proximity_out_event = &proximity_out_event_callback;
+ klass->visibility_notify_event = &visibility_notify_event_callback;
+ klass->client_event = &client_event_callback;
+ klass->no_expose_event = &no_expose_event_callback;
+ klass->window_state_event = &window_state_event_callback;
+ klass->selection_get = &selection_get_callback;
+ klass->selection_received = &selection_received_callback;
+ klass->drag_begin = &drag_begin_callback;
+ klass->drag_end = &drag_end_callback;
+ klass->drag_data_get = &drag_data_get_callback;
+ klass->drag_data_delete = &drag_data_delete_callback;
+ klass->drag_leave = &drag_leave_callback;
+ klass->drag_motion = &drag_motion_callback;
+ klass->drag_drop = &drag_drop_callback;
+ klass->drag_data_received = &drag_data_received_callback;
+ klass->get_accessible = &get_accessible_callback;
+ klass->screen_changed = &screen_changed_callback;
+ klass->hierarchy_changed = &hierarchy_changed_callback_custom;
+ klass->parent_set = &parent_set_callback_custom;
+ }
+
+void Widget_Class::dispatch_child_properties_changed_vfunc_callback(GtkWidget* self, guint n_pspecs, GParamSpec** pspecs)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->dispatch_child_properties_changed_vfunc(n_pspecs, pspecs);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->dispatch_child_properties_changed)
+ (*base->dispatch_child_properties_changed)(self, n_pspecs, pspecs);
+ }
+}
+
+void Widget_Class::show_all_vfunc_callback(GtkWidget* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->show_all_vfunc();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->show_all)
+ (*base->show_all)(self);
+ }
+}
+
+void Widget_Class::hide_all_vfunc_callback(GtkWidget* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->hide_all_vfunc();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->hide_all)
+ (*base->hide_all)(self);
+ }
+}
+
+AtkObject* Widget_Class::get_accessible_vfunc_callback(GtkWidget* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return Glib::unwrap(obj->get_accessible_vfunc());
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->get_accessible)
+ return (*base->get_accessible)(self);
+ }
+
+ typedef AtkObject* RType;
+ return RType();
+}
+
+
+void Widget_Class::show_callback(GtkWidget* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_show();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->show)
+ (*base->show)(self);
+ }
+}
+
+void Widget_Class::hide_callback(GtkWidget* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_hide();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->hide)
+ (*base->hide)(self);
+ }
+}
+
+void Widget_Class::map_callback(GtkWidget* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_map();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->map)
+ (*base->map)(self);
+ }
+}
+
+void Widget_Class::unmap_callback(GtkWidget* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_unmap();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->unmap)
+ (*base->unmap)(self);
+ }
+}
+
+void Widget_Class::realize_callback(GtkWidget* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_realize();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->realize)
+ (*base->realize)(self);
+ }
+}
+
+void Widget_Class::unrealize_callback(GtkWidget* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_unrealize();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->unrealize)
+ (*base->unrealize)(self);
+ }
+}
+
+void Widget_Class::size_request_callback(GtkWidget* self, GtkRequisition* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_size_request((Requisition*)(p0)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->size_request)
+ (*base->size_request)(self, p0);
+ }
+}
+
+void Widget_Class::size_allocate_callback(GtkWidget* self, GtkAllocation* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_size_allocate((Allocation&)(Glib::wrap(p0))
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->size_allocate)
+ (*base->size_allocate)(self, p0);
+ }
+}
+
+void Widget_Class::state_changed_callback(GtkWidget* self, GtkStateType p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_state_changed(((Gtk::StateType)(p0))
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->state_changed)
+ (*base->state_changed)(self, p0);
+ }
+}
+
+void Widget_Class::parent_set_callback(GtkWidget* self, GtkWidget* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_parent_changed(Glib::wrap(p0)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->parent_set)
+ (*base->parent_set)(self, p0);
+ }
+}
+
+void Widget_Class::hierarchy_changed_callback(GtkWidget* self, GtkWidget* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_hierarchy_changed(Glib::wrap(p0)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->hierarchy_changed)
+ (*base->hierarchy_changed)(self, p0);
+ }
+}
+
+void Widget_Class::style_set_callback(GtkWidget* self, GtkStyle* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_style_changed(Glib::wrap(p0, true)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->style_set)
+ (*base->style_set)(self, p0);
+ }
+}
+
+void Widget_Class::direction_changed_callback(GtkWidget* self, GtkTextDirection p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_direction_changed(((TextDirection)(p0))
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->direction_changed)
+ (*base->direction_changed)(self, p0);
+ }
+}
+
+void Widget_Class::grab_notify_callback(GtkWidget* self, gboolean p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_grab_notify(p0
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->grab_notify)
+ (*base->grab_notify)(self, p0);
+ }
+}
+
+void Widget_Class::child_notify_callback(GtkWidget* self, GParamSpec* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_child_notify(p0);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->child_notify)
+ (*base->child_notify)(self, p0);
+ }
+}
+
+gboolean Widget_Class::mnemonic_activate_callback(GtkWidget* self, gboolean p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->on_mnemonic_activate(p0
+));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->mnemonic_activate)
+ return (*base->mnemonic_activate)(self, p0);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+void Widget_Class::grab_focus_callback(GtkWidget* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_grab_focus();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->grab_focus)
+ (*base->grab_focus)(self);
+ }
+}
+
+gboolean Widget_Class::focus_callback(GtkWidget* self, GtkDirectionType p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->on_focus(((DirectionType)(p0))
+));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->focus)
+ return (*base->focus)(self, p0);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Widget_Class::event_callback(GtkWidget* self, GdkEvent* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->on_event(p0));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->event)
+ return (*base->event)(self, p0);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Widget_Class::button_press_event_callback(GtkWidget* self, GdkEventButton* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->on_button_press_event(p0));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->button_press_event)
+ return (*base->button_press_event)(self, p0);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Widget_Class::button_release_event_callback(GtkWidget* self, GdkEventButton* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->on_button_release_event(p0));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->button_release_event)
+ return (*base->button_release_event)(self, p0);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Widget_Class::scroll_event_callback(GtkWidget* self, GdkEventScroll* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->on_scroll_event(p0));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->scroll_event)
+ return (*base->scroll_event)(self, p0);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Widget_Class::motion_notify_event_callback(GtkWidget* self, GdkEventMotion* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->on_motion_notify_event(p0));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->motion_notify_event)
+ return (*base->motion_notify_event)(self, p0);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Widget_Class::delete_event_callback(GtkWidget* self, GdkEventAny* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->on_delete_event(p0));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->delete_event)
+ return (*base->delete_event)(self, p0);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Widget_Class::expose_event_callback(GtkWidget* self, GdkEventExpose* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->on_expose_event(p0));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->expose_event)
+ return (*base->expose_event)(self, p0);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Widget_Class::key_press_event_callback(GtkWidget* self, GdkEventKey* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->on_key_press_event(p0));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->key_press_event)
+ return (*base->key_press_event)(self, p0);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Widget_Class::key_release_event_callback(GtkWidget* self, GdkEventKey* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->on_key_release_event(p0));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->key_release_event)
+ return (*base->key_release_event)(self, p0);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Widget_Class::enter_notify_event_callback(GtkWidget* self, GdkEventCrossing* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->on_enter_notify_event(p0));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->enter_notify_event)
+ return (*base->enter_notify_event)(self, p0);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Widget_Class::leave_notify_event_callback(GtkWidget* self, GdkEventCrossing* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->on_leave_notify_event(p0));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->leave_notify_event)
+ return (*base->leave_notify_event)(self, p0);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Widget_Class::configure_event_callback(GtkWidget* self, GdkEventConfigure* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->on_configure_event(p0));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->configure_event)
+ return (*base->configure_event)(self, p0);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Widget_Class::focus_in_event_callback(GtkWidget* self, GdkEventFocus* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->on_focus_in_event(p0));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->focus_in_event)
+ return (*base->focus_in_event)(self, p0);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Widget_Class::focus_out_event_callback(GtkWidget* self, GdkEventFocus* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->on_focus_out_event(p0));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->focus_out_event)
+ return (*base->focus_out_event)(self, p0);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Widget_Class::map_event_callback(GtkWidget* self, GdkEventAny* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->on_map_event(p0));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->map_event)
+ return (*base->map_event)(self, p0);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Widget_Class::unmap_event_callback(GtkWidget* self, GdkEventAny* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->on_unmap_event(p0));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->unmap_event)
+ return (*base->unmap_event)(self, p0);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Widget_Class::property_notify_event_callback(GtkWidget* self, GdkEventProperty* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->on_property_notify_event(p0));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->property_notify_event)
+ return (*base->property_notify_event)(self, p0);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Widget_Class::selection_clear_event_callback(GtkWidget* self, GdkEventSelection* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->on_selection_clear_event(p0));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->selection_clear_event)
+ return (*base->selection_clear_event)(self, p0);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Widget_Class::selection_request_event_callback(GtkWidget* self, GdkEventSelection* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->on_selection_request_event(p0));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->selection_request_event)
+ return (*base->selection_request_event)(self, p0);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Widget_Class::selection_notify_event_callback(GtkWidget* self, GdkEventSelection* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->on_selection_notify_event(p0));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->selection_notify_event)
+ return (*base->selection_notify_event)(self, p0);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Widget_Class::proximity_in_event_callback(GtkWidget* self, GdkEventProximity* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->on_proximity_in_event(p0));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->proximity_in_event)
+ return (*base->proximity_in_event)(self, p0);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Widget_Class::proximity_out_event_callback(GtkWidget* self, GdkEventProximity* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->on_proximity_out_event(p0));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->proximity_out_event)
+ return (*base->proximity_out_event)(self, p0);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Widget_Class::visibility_notify_event_callback(GtkWidget* self, GdkEventVisibility* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->on_visibility_notify_event(p0));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->visibility_notify_event)
+ return (*base->visibility_notify_event)(self, p0);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Widget_Class::client_event_callback(GtkWidget* self, GdkEventClient* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->on_client_event(p0));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->client_event)
+ return (*base->client_event)(self, p0);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Widget_Class::no_expose_event_callback(GtkWidget* self, GdkEventAny* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->on_no_expose_event(p0));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->no_expose_event)
+ return (*base->no_expose_event)(self, p0);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Widget_Class::window_state_event_callback(GtkWidget* self, GdkEventWindowState* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->on_window_state_event(p0));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->window_state_event)
+ return (*base->window_state_event)(self, p0);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+void Widget_Class::selection_received_callback(GtkWidget* self, GtkSelectionData* p0, guint p1)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_selection_received(SelectionData_WithoutOwnership(p0)
+, p1);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->selection_received)
+ (*base->selection_received)(self, p0, p1);
+ }
+}
+
+void Widget_Class::drag_begin_callback(GtkWidget* self, GdkDragContext* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_drag_begin(Glib::wrap(p0, true)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->drag_begin)
+ (*base->drag_begin)(self, p0);
+ }
+}
+
+void Widget_Class::drag_end_callback(GtkWidget* self, GdkDragContext* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_drag_end(Glib::wrap(p0, true)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->drag_end)
+ (*base->drag_end)(self, p0);
+ }
+}
+
+void Widget_Class::drag_data_delete_callback(GtkWidget* self, GdkDragContext* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_drag_data_delete(Glib::wrap(p0, true)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->drag_data_delete)
+ (*base->drag_data_delete)(self, p0);
+ }
+}
+
+void Widget_Class::drag_leave_callback(GtkWidget* self, GdkDragContext* p0, guint p1)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_drag_leave(Glib::wrap(p0, true)
+, p1);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->drag_leave)
+ (*base->drag_leave)(self, p0, p1);
+ }
+}
+
+gboolean Widget_Class::drag_motion_callback(GtkWidget* self, GdkDragContext* p0, gint p1, gint p2, guint p3)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->on_drag_motion(Glib::wrap(p0, true)
+, p1
+, p2
+, p3));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->drag_motion)
+ return (*base->drag_motion)(self, p0, p1, p2, p3);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Widget_Class::drag_drop_callback(GtkWidget* self, GdkDragContext* p0, gint p1, gint p2, guint p3)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->on_drag_drop(Glib::wrap(p0, true)
+, p1
+, p2
+, p3));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->drag_drop)
+ return (*base->drag_drop)(self, p0, p1, p2, p3);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+void Widget_Class::drag_data_received_callback(GtkWidget* self, GdkDragContext* p0, gint p1, gint p2, GtkSelectionData* p3, guint p4, guint p5)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_drag_data_received(Glib::wrap(p0, true)
+, p1
+, p2
+, SelectionData_WithoutOwnership(p3)
+, p4, p5);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->drag_data_received)
+ (*base->drag_data_received)(self, p0, p1, p2, p3, p4, p5);
+ }
+}
+
+AtkObject* Widget_Class::get_accessible_callback(GtkWidget* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return Glib::unwrap(obj->on_get_accessible());
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->get_accessible)
+ return (*base->get_accessible)(self);
+ }
+
+ typedef AtkObject* RType;
+ return RType();
+}
+
+void Widget_Class::screen_changed_callback(GtkWidget* self, GdkScreen* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_screen_changed(Glib::wrap(p0, true)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->screen_changed)
+ (*base->screen_changed)(self, p0);
+ }
+}
+
+
+Glib::ObjectBase* Widget_Class::wrap_new(GObject* o)
+{
+ return manage(new Widget((GtkWidget*)(o)));
+
+}
+
+
+/* The implementation: */
+
+Widget::Widget(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Object(construct_params)
+{
+ }
+
+Widget::Widget(GtkWidget* castitem)
+:
+ Gtk::Object((GtkObject*)(castitem))
+{
+ }
+
+Widget::CppClassType Widget::widget_class_; // initialize static member
+
+GType Widget::get_type()
+{
+ return widget_class_.init().get_type();
+}
+
+GType Widget::get_base_type()
+{
+ return gtk_widget_get_type();
+}
+
+
+bool Widget::set_scroll_adjustments(Adjustment& hadjustment, Adjustment& vadjustment)
+{
+ return gtk_widget_set_scroll_adjustments(gobj(), (hadjustment).gobj(), (vadjustment).gobj());
+}
+
+void Widget::show()
+{
+ gtk_widget_show(gobj());
+}
+
+void Widget::show_now()
+{
+ gtk_widget_show_now(gobj());
+}
+
+void Widget::hide()
+{
+ gtk_widget_hide(gobj());
+}
+
+void Widget::show_all()
+{
+ gtk_widget_show_all(gobj());
+}
+
+void Widget::hide_all()
+{
+ gtk_widget_hide_all(gobj());
+}
+
+void Widget::queue_draw()
+{
+ gtk_widget_queue_draw(gobj());
+}
+
+void Widget::queue_draw_area(int x, int y, int width, int height)
+{
+ gtk_widget_queue_draw_area(gobj(), x, y, width, height);
+}
+
+void Widget::queue_resize()
+{
+ gtk_widget_queue_resize(gobj());
+}
+
+void Widget::size_request(const Requisition& requisition)
+{
+ gtk_widget_size_request(gobj(), (GtkRequisition*)(&requisition));
+}
+
+void Widget::size_allocate(const Allocation& allocation)
+{
+ gtk_widget_size_allocate(gobj(), (GtkAllocation*)(allocation.gobj()));
+}
+
+void Widget::add_accelerator(const Glib::ustring& accel_signal, const Glib::RefPtr<AccelGroup>& accel_group, guint accel_key, Gdk::ModifierType accel_mods, AccelFlags accel_flags)
+{
+ gtk_widget_add_accelerator(gobj(), accel_signal.c_str(), Glib::unwrap(accel_group), accel_key, ((GdkModifierType)(accel_mods)), ((GtkAccelFlags)(accel_flags)));
+}
+
+bool Widget::remove_accelerator(const Glib::RefPtr<AccelGroup>& accel_group, guint accel_key, Gdk::ModifierType accel_mods)
+{
+ return gtk_widget_remove_accelerator(gobj(), Glib::unwrap(accel_group), accel_key, ((GdkModifierType)(accel_mods)));
+}
+
+void Widget::set_accel_path(const Glib::ustring& accel_path, const Glib::RefPtr<AccelGroup>& accel_group)
+{
+ gtk_widget_set_accel_path(gobj(), accel_path.c_str(), Glib::unwrap(accel_group));
+}
+
+bool Widget::mnemonic_activate(bool group_cycling)
+{
+ return gtk_widget_mnemonic_activate(gobj(), static_cast<int>(group_cycling));
+}
+
+bool Widget::event(GdkEvent* event)
+{
+ return gtk_widget_event(gobj(), event);
+}
+
+int Widget::send_expose(GdkEvent* event)
+{
+ return gtk_widget_send_expose(gobj(), event);
+}
+
+bool Widget::activate()
+{
+ return gtk_widget_activate(gobj());
+}
+
+void Widget::reparent(Widget & new_parent)
+{
+ gtk_widget_reparent(gobj(), (new_parent).gobj());
+}
+
+bool Widget::intersect(const Gdk::Rectangle& area, Gdk::Rectangle& intersection) const
+{
+ return gtk_widget_intersect(const_cast<GtkWidget*>(gobj()), const_cast<GdkRectangle*>(area.gobj()), (intersection).gobj());
+}
+
+Gdk::Region Widget::region_intersect(const Gdk::Region& region) const
+{
+ return Gdk::Region(gtk_widget_region_intersect(const_cast<GtkWidget*>(gobj()), const_cast<GdkRegion*>((region).gobj())));
+}
+
+void Widget::freeze_child_notify()
+{
+ gtk_widget_freeze_child_notify(gobj());
+}
+
+void Widget::child_notify(const Glib::ustring& child_property)
+{
+ gtk_widget_child_notify(gobj(), child_property.c_str());
+}
+
+void Widget::thaw_child_notify()
+{
+ gtk_widget_thaw_child_notify(gobj());
+}
+
+bool Widget::is_focus() const
+{
+ return gtk_widget_is_focus(const_cast<GtkWidget*>(gobj()));
+}
+
+void Widget::grab_focus()
+{
+ gtk_widget_grab_focus(gobj());
+}
+
+void Widget::grab_default()
+{
+ gtk_widget_grab_default(gobj());
+}
+
+void Widget::set_name(const Glib::ustring& name)
+{
+ gtk_widget_set_name(gobj(), name.c_str());
+}
+
+Glib::ustring Widget::get_name() const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(gtk_widget_get_name(const_cast<GtkWidget*>(gobj())));
+}
+
+void Widget::set_state(Gtk::StateType state)
+{
+ gtk_widget_set_state(gobj(), ((GtkStateType)(state)));
+}
+
+void Widget::set_sensitive(bool sensitive)
+{
+ gtk_widget_set_sensitive(gobj(), static_cast<int>(sensitive));
+}
+
+void Widget::set_app_paintable(bool app_paintable)
+{
+ gtk_widget_set_app_paintable(gobj(), static_cast<int>(app_paintable));
+}
+
+void Widget::set_double_buffered(bool double_buffered)
+{
+ gtk_widget_set_double_buffered(gobj(), static_cast<int>(double_buffered));
+}
+
+void Widget::set_redraw_on_allocate(bool redraw_on_allocate)
+{
+ gtk_widget_set_redraw_on_allocate(gobj(), static_cast<int>(redraw_on_allocate));
+}
+
+void Widget::set_child_visible(bool is_visible)
+{
+ gtk_widget_set_child_visible(gobj(), static_cast<int>(is_visible));
+}
+
+bool Widget::get_child_visible() const
+{
+ return gtk_widget_get_child_visible(const_cast<GtkWidget*>(gobj()));
+}
+
+Container* Widget::get_parent()
+{
+ return Glib::wrap((GtkContainer*)(gtk_widget_get_parent(gobj())));
+}
+
+const Container* Widget::get_parent() const
+{
+ return Glib::wrap((GtkContainer*)(gtk_widget_get_parent(const_cast<GtkWidget*>(gobj()))));
+}
+
+Glib::RefPtr<Gdk::Window> Widget::get_parent_window()
+{
+
+ Glib::RefPtr<Gdk::Window> retvalue = Glib::wrap((GdkWindowObject*)(gtk_widget_get_parent_window(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const Gdk::Window> Widget::get_parent_window() const
+{
+
+ Glib::RefPtr<const Gdk::Window> retvalue = Glib::wrap((GdkWindowObject*)(gtk_widget_get_parent_window(const_cast<GtkWidget*>(gobj()))));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+void Widget::set_parent_window(const Glib::RefPtr<const Gdk::Window>& parent_window)
+{
+ gtk_widget_set_parent_window(gobj(), const_cast<GdkWindow*>(Glib::unwrap<Gdk::Window>(parent_window)));
+}
+
+bool Widget::child_focus(DirectionType direction)
+{
+ return gtk_widget_child_focus(gobj(), ((GtkDirectionType)(direction)));
+}
+
+void Widget::set_size_request(int width, int height)
+{
+ gtk_widget_set_size_request(gobj(), width, height);
+}
+
+void Widget::get_size_request(int& width, int& height) const
+{
+ gtk_widget_get_size_request(const_cast<GtkWidget*>(gobj()), &width, &height);
+}
+
+void Widget::set_events(Gdk::EventMask events)
+{
+ gtk_widget_set_events(gobj(), events);
+}
+
+void Widget::add_events(Gdk::EventMask events)
+{
+ gtk_widget_add_events(gobj(), events);
+}
+
+void Widget::set_extension_events(Gdk::ExtensionMode mode)
+{
+ gtk_widget_set_extension_events(gobj(), ((GdkExtensionMode)(mode)));
+}
+
+Gdk::ExtensionMode Widget::get_extension_events() const
+{
+ return ((Gdk::ExtensionMode)(gtk_widget_get_extension_events(const_cast<GtkWidget*>(gobj()))));
+}
+
+Container* Widget::get_toplevel()
+{
+ return Glib::wrap((GtkContainer*)(gtk_widget_get_toplevel(gobj())));
+}
+
+const Container* Widget::get_toplevel() const
+{
+ return Glib::wrap((GtkContainer*)(gtk_widget_get_toplevel(const_cast<GtkWidget*>(gobj()))));
+}
+
+Widget* Widget::get_ancestor(GType widget_type)
+{
+ return Glib::wrap(gtk_widget_get_ancestor(gobj(), widget_type));
+}
+
+const Widget* Widget::get_ancestor(GType widget_type) const
+{
+ return Glib::wrap(gtk_widget_get_ancestor(const_cast<GtkWidget*>(gobj()), widget_type));
+}
+
+Glib::RefPtr<Gdk::Colormap> Widget::get_colormap()
+{
+
+ Glib::RefPtr<Gdk::Colormap> retvalue = Glib::wrap(gtk_widget_get_colormap(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<Gdk::Visual> Widget::get_visual()
+{
+
+ Glib::RefPtr<Gdk::Visual> retvalue = Glib::wrap(gtk_widget_get_visual(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<Gdk::Screen> Widget::get_screen()
+{
+
+ Glib::RefPtr<Gdk::Screen> retvalue = Glib::wrap(gtk_widget_get_screen(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const Gdk::Screen> Widget::get_screen() const
+{
+
+ Glib::RefPtr<const Gdk::Screen> retvalue = Glib::wrap(gtk_widget_get_screen(const_cast<GtkWidget*>(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+bool Widget::has_screen() const
+{
+ return gtk_widget_has_screen(const_cast<GtkWidget*>(gobj()));
+}
+
+Glib::RefPtr<Gdk::Display> Widget::get_display()
+{
+
+ Glib::RefPtr<Gdk::Display> retvalue = Glib::wrap(gtk_widget_get_display(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const Gdk::Display> Widget::get_display() const
+{
+
+ Glib::RefPtr<const Gdk::Display> retvalue = Glib::wrap(gtk_widget_get_display(const_cast<GtkWidget*>(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<Gdk::Window> Widget::get_root_window()
+{
+
+ Glib::RefPtr<Gdk::Window> retvalue = Glib::wrap((GdkWindowObject*)(gtk_widget_get_root_window(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const Gdk::Window> Widget::get_root_window() const
+{
+
+ Glib::RefPtr<const Gdk::Window> retvalue = Glib::wrap((GdkWindowObject*)(gtk_widget_get_root_window(const_cast<GtkWidget*>(gobj()))));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<Settings> Widget::get_settings()
+{
+
+ Glib::RefPtr<Settings> retvalue = Glib::wrap(gtk_widget_get_settings(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<Clipboard> Widget::get_clipboard(const Glib::ustring& selection)
+{
+
+ Glib::RefPtr<Clipboard> retvalue = Glib::wrap(gtk_widget_get_clipboard(gobj(), Gdk::AtomString::to_c_type(selection)));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const Clipboard> Widget::get_clipboard(const Glib::ustring& selection) const
+{
+
+ Glib::RefPtr<const Clipboard> retvalue = Glib::wrap(gtk_widget_get_clipboard(const_cast<GtkWidget*>(gobj()), Gdk::AtomString::to_c_type(selection)));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<Atk::Object> Widget::get_accessible()
+{
+
+ Glib::RefPtr<Atk::Object> retvalue = Glib::wrap(gtk_widget_get_accessible(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+void Widget::set_colormap(const Glib::RefPtr<const Gdk::Colormap> & colormap)
+{
+ gtk_widget_set_colormap(gobj(), const_cast<GdkColormap*>(Glib::unwrap<Gdk::Colormap>(colormap)));
+}
+
+Gdk::EventMask Widget::get_events() const
+{
+ return static_cast<Gdk::EventMask>(gtk_widget_get_events(const_cast<GtkWidget*>(gobj())));
+}
+
+void Widget::get_pointer(int & x, int & y) const
+{
+ gtk_widget_get_pointer(const_cast<GtkWidget*>(gobj()), &x, &y);
+}
+
+bool Widget::is_ancestor(Widget & ancestor) const
+{
+ return gtk_widget_is_ancestor(const_cast<GtkWidget*>(gobj()), (ancestor).gobj());
+}
+
+bool Widget::translate_coordinates(Widget& dest_widget, int src_x, int src_y, int& dest_x, int& dest_y)
+{
+ return gtk_widget_translate_coordinates(gobj(), (dest_widget).gobj(), src_x, src_y, &dest_x, &dest_y);
+}
+
+void Widget::set_style(const Glib::RefPtr<Style>& style)
+{
+ gtk_widget_set_style(gobj(), Glib::unwrap(style));
+}
+
+void Widget::ensure_style()
+{
+ gtk_widget_ensure_style(gobj());
+}
+
+Glib::RefPtr<Style> Widget::get_style()
+{
+
+ Glib::RefPtr<Style> retvalue = Glib::wrap(gtk_widget_get_style(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const Style> Widget::get_style() const
+{
+
+ Glib::RefPtr<const Style> retvalue = Glib::wrap(gtk_widget_get_style(const_cast<GtkWidget*>(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+void Widget::modify_style(const Glib::RefPtr<RcStyle>& style)
+{
+ gtk_widget_modify_style(gobj(), Glib::unwrap(style));
+}
+
+Glib::RefPtr<RcStyle> Widget::get_modifier_style()
+{
+
+ Glib::RefPtr<RcStyle> retvalue = Glib::wrap(gtk_widget_get_modifier_style(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const RcStyle> Widget::get_modifier_style() const
+{
+
+ Glib::RefPtr<const RcStyle> retvalue = Glib::wrap(gtk_widget_get_modifier_style(const_cast<GtkWidget*>(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+void Widget::modify_fg(StateType state, const Gdk::Color& color)
+{
+ gtk_widget_modify_fg(gobj(), ((GtkStateType)(state)), (color).gobj());
+}
+
+void Widget::modify_bg(StateType state, const Gdk::Color& color)
+{
+ gtk_widget_modify_bg(gobj(), ((GtkStateType)(state)), (color).gobj());
+}
+
+void Widget::modify_text(StateType state, const Gdk::Color& color)
+{
+ gtk_widget_modify_text(gobj(), ((GtkStateType)(state)), (color).gobj());
+}
+
+void Widget::modify_base(StateType state, const Gdk::Color& color)
+{
+ gtk_widget_modify_base(gobj(), ((GtkStateType)(state)), (color).gobj());
+}
+
+void Widget::modify_font(const Pango::FontDescription& font_desc)
+{
+ gtk_widget_modify_font(gobj(), const_cast<PangoFontDescription*>((font_desc).gobj()));
+}
+
+Glib::RefPtr<Pango::Context> Widget::create_pango_context()
+{
+ return Glib::wrap(gtk_widget_create_pango_context(gobj()));
+}
+
+Glib::RefPtr<Pango::Context> Widget::get_pango_context()
+{
+
+ Glib::RefPtr<Pango::Context> retvalue = Glib::wrap(gtk_widget_get_pango_context(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<Pango::Layout> Widget::create_pango_layout(const Glib::ustring& text)
+{
+ return Glib::wrap(gtk_widget_create_pango_layout(gobj(), text.c_str()));
+}
+
+Glib::RefPtr<Gdk::Pixbuf> Widget::render_icon(const StockID& stock_id, IconSize size, const Glib::ustring& detail)
+{
+ return Glib::wrap(gtk_widget_render_icon(gobj(), (stock_id).get_c_str(), static_cast<GtkIconSize>(int(size)), detail.c_str()));
+}
+
+void Widget::set_composite_name(const Glib::ustring& name)
+{
+ gtk_widget_set_composite_name(gobj(), name.c_str());
+}
+
+Glib::ustring Widget::get_composite_name() const
+{
+ return Glib::convert_return_gchar_ptr_to_ustring(gtk_widget_get_composite_name(const_cast<GtkWidget*>(gobj())));
+}
+
+void Widget::reset_rc_styles()
+{
+ gtk_widget_reset_rc_styles(gobj());
+}
+
+void Widget::push_colormap(const Glib::RefPtr<const Gdk::Colormap>& cmap)
+{
+ gtk_widget_push_colormap(const_cast<GdkColormap*>(Glib::unwrap<Gdk::Colormap>(cmap)));
+}
+
+void Widget::pop_colormap()
+{
+ gtk_widget_pop_colormap();
+}
+
+void Widget::push_composite_child()
+{
+ gtk_widget_push_composite_child();
+}
+
+void Widget::pop_composite_child()
+{
+ gtk_widget_pop_composite_child();
+}
+
+void Widget::set_default_colormap(const Glib::RefPtr<const Gdk::Colormap>& colormap)
+{
+ gtk_widget_set_default_colormap(const_cast<GdkColormap*>(Glib::unwrap<Gdk::Colormap>(colormap)));
+}
+
+Glib::RefPtr<Style> Widget::get_default_style()
+{
+
+ Glib::RefPtr<Style> retvalue = Glib::wrap(gtk_widget_get_default_style());
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<Gdk::Colormap> Widget::get_default_colormap()
+{
+
+ Glib::RefPtr<Gdk::Colormap> retvalue = Glib::wrap(gtk_widget_get_default_colormap());
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<Gdk::Visual> Widget::get_default_visual()
+{
+
+ Glib::RefPtr<Gdk::Visual> retvalue = Glib::wrap(gtk_widget_get_default_visual());
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+void Widget::set_direction(TextDirection dir)
+{
+ gtk_widget_set_direction(gobj(), ((GtkTextDirection)(dir)));
+}
+
+TextDirection Widget::get_direction()
+{
+ return ((TextDirection)(gtk_widget_get_direction(gobj())));
+}
+
+void Widget::set_default_direction(TextDirection dir)
+{
+ gtk_widget_set_default_direction(((GtkTextDirection)(dir)));
+}
+
+TextDirection Widget::get_default_direction()
+{
+ return ((TextDirection)(gtk_widget_get_default_direction()));
+}
+
+void Widget::shape_combine_mask(const Glib::RefPtr<const Gdk::Bitmap>& shape_mask, int offset_x, int offset_y)
+{
+ gtk_widget_shape_combine_mask(gobj(), const_cast<GdkBitmap*>(Glib::unwrap<Gdk::Bitmap>(shape_mask)), offset_x, offset_y);
+}
+
+void Widget::reset_shapes()
+{
+ gtk_widget_reset_shapes(gobj());
+}
+
+Glib::ListHandle<Widget*> Widget::list_mnemonic_labels()
+{
+ return Glib::ListHandle<Widget*>(gtk_widget_list_mnemonic_labels(gobj()), Glib::OWNERSHIP_SHALLOW);
+}
+
+Glib::ListHandle<const Widget*> Widget::list_mnemonic_labels() const
+{
+ return Glib::ListHandle<const Widget*>(gtk_widget_list_mnemonic_labels(const_cast<GtkWidget*>(gobj())), Glib::OWNERSHIP_SHALLOW);
+}
+
+void Widget::add_mnemonic_label(Widget& label)
+{
+ gtk_widget_add_mnemonic_label(gobj(), (label).gobj());
+}
+
+void Widget::remove_mnemonic_label(Widget& label)
+{
+ gtk_widget_remove_mnemonic_label(gobj(), (label).gobj());
+}
+
+void Widget::drag_get_data(const Glib::RefPtr<Gdk::DragContext>& context, Glib::ustring& target, guint32 time)
+{
+ gtk_drag_get_data(gobj(), Glib::unwrap(context), Gdk::AtomString::to_c_type(target), time);
+}
+
+void Widget::drag_highlight()
+{
+ gtk_drag_highlight(gobj());
+}
+
+void Widget::drag_unhighlight()
+{
+ gtk_drag_unhighlight(gobj());
+}
+
+void Widget::drag_dest_set_proxy(const Glib::RefPtr<Gdk::Window>& proxy_window, Gdk::DragProtocol protocol, bool use_coordinates)
+{
+ gtk_drag_dest_set_proxy(gobj(), Glib::unwrap(proxy_window), ((GdkDragProtocol)(protocol)), static_cast<int>(use_coordinates));
+}
+
+void Widget::drag_dest_unset()
+{
+ gtk_drag_dest_unset(gobj());
+}
+
+Glib::ustring Widget::drag_dest_find_target(const Glib::RefPtr<Gdk::DragContext>& context, const Glib::RefPtr<TargetList>& target_list) const
+{
+ return Gdk::AtomString::to_cpp_type(gtk_drag_dest_find_target(const_cast<GtkWidget*>(gobj()), Glib::unwrap(context), const_cast<GtkTargetList*>(Glib::unwrap(target_list))));
+}
+
+Glib::RefPtr<TargetList> Widget::drag_dest_get_target_list()
+{
+
+ Glib::RefPtr<TargetList> retvalue = Glib::wrap(gtk_drag_dest_get_target_list(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const TargetList> Widget::drag_dest_get_target_list() const
+{
+
+ Glib::RefPtr<const TargetList> retvalue = Glib::wrap(gtk_drag_dest_get_target_list(const_cast<GtkWidget*>(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+void Widget::drag_dest_set_target_list(const Glib::RefPtr<TargetList>& target_list)
+{
+ gtk_drag_dest_set_target_list(gobj(), const_cast<GtkTargetList*>(Glib::unwrap(target_list)));
+}
+
+void Widget::drag_dest_add_text_targets()
+{
+ gtk_drag_dest_add_text_targets(gobj());
+}
+
+void Widget::drag_dest_add_image_targets()
+{
+ gtk_drag_dest_add_image_targets(gobj());
+}
+
+void Widget::drag_dest_add_uri_targets()
+{
+ gtk_drag_dest_add_uri_targets(gobj());
+}
+
+void Widget::drag_source_unset()
+{
+ gtk_drag_source_unset(gobj());
+}
+
+void Widget::drag_source_set_icon(const Glib::RefPtr<Gdk::Colormap>& colormap, const Glib::RefPtr<Gdk::Pixmap>& pixmap, const Glib::RefPtr<Gdk::Bitmap>& mask)
+{
+ gtk_drag_source_set_icon(gobj(), Glib::unwrap(colormap), Glib::unwrap(pixmap), Glib::unwrap(mask));
+}
+
+void Widget::drag_source_set_icon(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf)
+{
+ gtk_drag_source_set_icon_pixbuf(gobj(), Glib::unwrap(pixbuf));
+}
+
+void Widget::drag_source_set_icon(const StockID& stock_id)
+{
+ gtk_drag_source_set_icon_stock(gobj(), (stock_id).get_c_str());
+}
+
+void Widget::drag_source_add_text_targets()
+{
+ gtk_drag_source_add_text_targets(gobj());
+}
+
+void Widget::drag_source_add_uri_targets()
+{
+ gtk_drag_source_add_uri_targets(gobj());
+}
+
+void Widget::drag_source_add_image_targets()
+{
+ gtk_drag_source_add_image_targets(gobj());
+}
+
+Glib::RefPtr<Gdk::DragContext> Widget::drag_begin(const Glib::RefPtr<TargetList>& targets, Gdk::DragAction actions, int button, GdkEvent* event)
+{
+
+ Glib::RefPtr<Gdk::DragContext> retvalue = Glib::wrap(gtk_drag_begin(gobj(), const_cast<GtkTargetList*>(Glib::unwrap(targets)), ((GdkDragAction)(actions)), button, event), true);
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+bool Widget::drag_check_threshold(int start_x, int start_y, int current_x, int current_y)
+{
+ return gtk_drag_check_threshold(gobj(), start_x, start_y, current_x, current_y);
+}
+
+void Widget::queue_resize_no_redraw()
+{
+ gtk_widget_queue_resize_no_redraw(gobj());
+}
+
+bool Widget::get_no_show_all() const
+{
+ return gtk_widget_get_no_show_all(const_cast<GtkWidget*>(gobj()));
+}
+
+void Widget::set_no_show_all(bool no_show_all)
+{
+ gtk_widget_set_no_show_all(gobj(), static_cast<int>(no_show_all));
+}
+
+void Widget::set_parent(Widget& parent)
+{
+ gtk_widget_set_parent(gobj(), (parent).gobj());
+}
+
+void Widget::unparent()
+{
+ gtk_widget_unparent(gobj());
+}
+
+Gtk::StateType Widget::get_state() const
+{
+ return static_cast<StateType>(gobj()->state);
+}
+
+Gtk::StateType Widget::get_saved_state() const
+{
+ return static_cast<StateType>(gobj()->saved_state);
+}
+
+Requisition Widget::get_requisition() const
+{
+ return (Requisition)(gobj()->requisition);
+}
+
+Allocation Widget::get_allocation() const
+{
+ return (Allocation)(Glib::wrap(&gobj()->allocation));
+}
+
+Glib::RefPtr<Gdk::Window> Widget::get_window()
+{
+ Glib::RefPtr<Gdk::Window> ref_ptr(Glib::wrap((GdkWindowObject*)(gobj()->window)));
+
+ if(ref_ptr)
+ ref_ptr->reference();
+
+ return ref_ptr;
+}
+
+Glib::RefPtr<const Gdk::Window> Widget::get_window() const
+{
+ Glib::RefPtr<const Gdk::Window> ref_ptr(Glib::wrap((GdkWindowObject*)(gobj()->window)));
+
+ if(ref_ptr)
+ ref_ptr->reference();
+
+ return ref_ptr;
+}
+
+Widget::Widget()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Object(Glib::ConstructParams(widget_class_.init()))
+{
+ }
+
+void Widget::map()
+{
+ gtk_widget_map(gobj());
+}
+
+void Widget::unmap()
+{
+ gtk_widget_unmap(gobj());
+}
+
+void Widget::realize()
+{
+ gtk_widget_realize(gobj());
+}
+
+void Widget::unrealize()
+{
+ gtk_widget_unrealize(gobj());
+}
+
+void Widget::get_child_requisition(Requisition& requisition) const
+{
+ gtk_widget_get_child_requisition(const_cast<GtkWidget*>(gobj()), (GtkRequisition*)(&requisition));
+}
+
+void Widget::get_style_property_value(const Glib::ustring& the_property_name, Glib::ValueBase& value) const
+{
+ gtk_widget_style_get_property(const_cast<GtkWidget*>(gobj()), the_property_name.c_str(), (value).gobj());
+}
+
+void Widget::set_allocation(const Allocation& value)
+{
+ gobj()->allocation = (GtkAllocation)(*(value.gobj()));
+}
+
+void Widget::set_window(const Glib::RefPtr<Gdk::Window>& value)
+{
+ Glib::RefPtr<Gdk::Window> valueOld(Glib::wrap((GdkWindowObject*)(gobj()->window))); //Take possession of the old one, unref-ing it in the destructor.
+
+ if(value)
+ value->reference(); //Ref once for the recipient.
+
+ gobj()->window = Glib::unwrap(value);
+}
+
+
+Glib::SignalProxy0< void > Widget::signal_show()
+{
+ return Glib::SignalProxy0< void >(this, &Widget_signal_show_info);
+}
+
+Glib::SignalProxy0< void > Widget::signal_hide()
+{
+ return Glib::SignalProxy0< void >(this, &Widget_signal_hide_info);
+}
+
+Glib::SignalProxy0< void > Widget::signal_map()
+{
+ return Glib::SignalProxy0< void >(this, &Widget_signal_map_info);
+}
+
+Glib::SignalProxy0< void > Widget::signal_unmap()
+{
+ return Glib::SignalProxy0< void >(this, &Widget_signal_unmap_info);
+}
+
+Glib::SignalProxy0< void > Widget::signal_realize()
+{
+ return Glib::SignalProxy0< void >(this, &Widget_signal_realize_info);
+}
+
+Glib::SignalProxy0< void > Widget::signal_unrealize()
+{
+ return Glib::SignalProxy0< void >(this, &Widget_signal_unrealize_info);
+}
+
+Glib::SignalProxy1< void,Requisition* > Widget::signal_size_request()
+{
+ return Glib::SignalProxy1< void,Requisition* >(this, &Widget_signal_size_request_info);
+}
+
+Glib::SignalProxy1< void,Allocation& > Widget::signal_size_allocate()
+{
+ return Glib::SignalProxy1< void,Allocation& >(this, &Widget_signal_size_allocate_info);
+}
+
+Glib::SignalProxy1< void,Gtk::StateType > Widget::signal_state_changed()
+{
+ return Glib::SignalProxy1< void,Gtk::StateType >(this, &Widget_signal_state_changed_info);
+}
+
+Glib::SignalProxy1< void,Widget* > Widget::signal_parent_changed()
+{
+ return Glib::SignalProxy1< void,Widget* >(this, &Widget_signal_parent_changed_info);
+}
+
+Glib::SignalProxy1< void,Widget* > Widget::signal_hierarchy_changed()
+{
+ return Glib::SignalProxy1< void,Widget* >(this, &Widget_signal_hierarchy_changed_info);
+}
+
+Glib::SignalProxy1< void,const Glib::RefPtr<Style>& > Widget::signal_style_changed()
+{
+ return Glib::SignalProxy1< void,const Glib::RefPtr<Style>& >(this, &Widget_signal_style_changed_info);
+}
+
+Glib::SignalProxy1< void,TextDirection > Widget::signal_direction_changed()
+{
+ return Glib::SignalProxy1< void,TextDirection >(this, &Widget_signal_direction_changed_info);
+}
+
+Glib::SignalProxy1< void,bool > Widget::signal_grab_notify()
+{
+ return Glib::SignalProxy1< void,bool >(this, &Widget_signal_grab_notify_info);
+}
+
+Glib::SignalProxy1< void,GParamSpec* > Widget::signal_child_notify()
+{
+ return Glib::SignalProxy1< void,GParamSpec* >(this, &Widget_signal_child_notify_info);
+}
+
+Glib::SignalProxy1< bool,bool > Widget::signal_mnemonic_activate()
+{
+ return Glib::SignalProxy1< bool,bool >(this, &Widget_signal_mnemonic_activate_info);
+}
+
+Glib::SignalProxy0< void > Widget::signal_grab_focus()
+{
+ return Glib::SignalProxy0< void >(this, &Widget_signal_grab_focus_info);
+}
+
+Glib::SignalProxy1< bool,DirectionType > Widget::signal_focus()
+{
+ return Glib::SignalProxy1< bool,DirectionType >(this, &Widget_signal_focus_info);
+}
+
+Glib::SignalProxy1< bool,GdkEvent* > Widget::signal_event()
+{
+ return Glib::SignalProxy1< bool,GdkEvent* >(this, &Widget_signal_event_info);
+}
+
+Glib::SignalProxy1< void,GdkEvent* > Widget::signal_event_after()
+{
+ return Glib::SignalProxy1< void,GdkEvent* >(this, &Widget_signal_event_after_info);
+}
+
+Glib::SignalProxy1< bool,GdkEventButton* > Widget::signal_button_press_event()
+{
+ return Glib::SignalProxy1< bool,GdkEventButton* >(this, &Widget_signal_button_press_event_info);
+}
+
+Glib::SignalProxy1< bool,GdkEventButton* > Widget::signal_button_release_event()
+{
+ return Glib::SignalProxy1< bool,GdkEventButton* >(this, &Widget_signal_button_release_event_info);
+}
+
+Glib::SignalProxy1< bool,GdkEventScroll* > Widget::signal_scroll_event()
+{
+ return Glib::SignalProxy1< bool,GdkEventScroll* >(this, &Widget_signal_scroll_event_info);
+}
+
+Glib::SignalProxy1< bool,GdkEventMotion* > Widget::signal_motion_notify_event()
+{
+ return Glib::SignalProxy1< bool,GdkEventMotion* >(this, &Widget_signal_motion_notify_event_info);
+}
+
+Glib::SignalProxy1< bool,GdkEventAny* > Widget::signal_delete_event()
+{
+ return Glib::SignalProxy1< bool,GdkEventAny* >(this, &Widget_signal_delete_event_info);
+}
+
+Glib::SignalProxy1< bool,GdkEventExpose* > Widget::signal_expose_event()
+{
+ return Glib::SignalProxy1< bool,GdkEventExpose* >(this, &Widget_signal_expose_event_info);
+}
+
+Glib::SignalProxy1< bool,GdkEventKey* > Widget::signal_key_press_event()
+{
+ return Glib::SignalProxy1< bool,GdkEventKey* >(this, &Widget_signal_key_press_event_info);
+}
+
+Glib::SignalProxy1< bool,GdkEventKey* > Widget::signal_key_release_event()
+{
+ return Glib::SignalProxy1< bool,GdkEventKey* >(this, &Widget_signal_key_release_event_info);
+}
+
+Glib::SignalProxy1< bool,GdkEventCrossing* > Widget::signal_enter_notify_event()
+{
+ return Glib::SignalProxy1< bool,GdkEventCrossing* >(this, &Widget_signal_enter_notify_event_info);
+}
+
+Glib::SignalProxy1< bool,GdkEventCrossing* > Widget::signal_leave_notify_event()
+{
+ return Glib::SignalProxy1< bool,GdkEventCrossing* >(this, &Widget_signal_leave_notify_event_info);
+}
+
+Glib::SignalProxy1< bool,GdkEventConfigure* > Widget::signal_configure_event()
+{
+ return Glib::SignalProxy1< bool,GdkEventConfigure* >(this, &Widget_signal_configure_event_info);
+}
+
+Glib::SignalProxy1< bool,GdkEventFocus* > Widget::signal_focus_in_event()
+{
+ return Glib::SignalProxy1< bool,GdkEventFocus* >(this, &Widget_signal_focus_in_event_info);
+}
+
+Glib::SignalProxy1< bool,GdkEventFocus* > Widget::signal_focus_out_event()
+{
+ return Glib::SignalProxy1< bool,GdkEventFocus* >(this, &Widget_signal_focus_out_event_info);
+}
+
+Glib::SignalProxy1< bool,GdkEventAny* > Widget::signal_map_event()
+{
+ return Glib::SignalProxy1< bool,GdkEventAny* >(this, &Widget_signal_map_event_info);
+}
+
+Glib::SignalProxy1< bool,GdkEventAny* > Widget::signal_unmap_event()
+{
+ return Glib::SignalProxy1< bool,GdkEventAny* >(this, &Widget_signal_unmap_event_info);
+}
+
+Glib::SignalProxy1< bool,GdkEventProperty* > Widget::signal_property_notify_event()
+{
+ return Glib::SignalProxy1< bool,GdkEventProperty* >(this, &Widget_signal_property_notify_event_info);
+}
+
+Glib::SignalProxy1< bool,GdkEventSelection* > Widget::signal_selection_clear_event()
+{
+ return Glib::SignalProxy1< bool,GdkEventSelection* >(this, &Widget_signal_selection_clear_event_info);
+}
+
+Glib::SignalProxy1< bool,GdkEventSelection* > Widget::signal_selection_request_event()
+{
+ return Glib::SignalProxy1< bool,GdkEventSelection* >(this, &Widget_signal_selection_request_event_info);
+}
+
+Glib::SignalProxy1< bool,GdkEventSelection* > Widget::signal_selection_notify_event()
+{
+ return Glib::SignalProxy1< bool,GdkEventSelection* >(this, &Widget_signal_selection_notify_event_info);
+}
+
+Glib::SignalProxy1< bool,GdkEventProximity* > Widget::signal_proximity_in_event()
+{
+ return Glib::SignalProxy1< bool,GdkEventProximity* >(this, &Widget_signal_proximity_in_event_info);
+}
+
+Glib::SignalProxy1< bool,GdkEventProximity* > Widget::signal_proximity_out_event()
+{
+ return Glib::SignalProxy1< bool,GdkEventProximity* >(this, &Widget_signal_proximity_out_event_info);
+}
+
+Glib::SignalProxy1< bool,GdkEventVisibility* > Widget::signal_visibility_notify_event()
+{
+ return Glib::SignalProxy1< bool,GdkEventVisibility* >(this, &Widget_signal_visibility_notify_event_info);
+}
+
+Glib::SignalProxy1< bool,GdkEventClient* > Widget::signal_client_event()
+{
+ return Glib::SignalProxy1< bool,GdkEventClient* >(this, &Widget_signal_client_event_info);
+}
+
+Glib::SignalProxy1< bool,GdkEventAny* > Widget::signal_no_expose_event()
+{
+ return Glib::SignalProxy1< bool,GdkEventAny* >(this, &Widget_signal_no_expose_event_info);
+}
+
+Glib::SignalProxy1< bool,GdkEventWindowState* > Widget::signal_window_state_event()
+{
+ return Glib::SignalProxy1< bool,GdkEventWindowState* >(this, &Widget_signal_window_state_event_info);
+}
+
+Glib::SignalProxy3< void,SelectionData&,guint,guint > Widget::signal_selection_get()
+{
+ return Glib::SignalProxy3< void,SelectionData&,guint,guint >(this, &Widget_signal_selection_get_info);
+}
+
+Glib::SignalProxy2< void,const SelectionData&,guint > Widget::signal_selection_received()
+{
+ return Glib::SignalProxy2< void,const SelectionData&,guint >(this, &Widget_signal_selection_received_info);
+}
+
+Glib::SignalProxy1< void,const Glib::RefPtr<Gdk::DragContext>& > Widget::signal_drag_begin()
+{
+ return Glib::SignalProxy1< void,const Glib::RefPtr<Gdk::DragContext>& >(this, &Widget_signal_drag_begin_info);
+}
+
+Glib::SignalProxy1< void,const Glib::RefPtr<Gdk::DragContext>& > Widget::signal_drag_end()
+{
+ return Glib::SignalProxy1< void,const Glib::RefPtr<Gdk::DragContext>& >(this, &Widget_signal_drag_end_info);
+}
+
+Glib::SignalProxy4< void,const Glib::RefPtr<Gdk::DragContext>&,SelectionData&,guint,guint > Widget::signal_drag_data_get()
+{
+ return Glib::SignalProxy4< void,const Glib::RefPtr<Gdk::DragContext>&,SelectionData&,guint,guint >(this, &Widget_signal_drag_data_get_info);
+}
+
+Glib::SignalProxy1< void,const Glib::RefPtr<Gdk::DragContext>& > Widget::signal_drag_data_delete()
+{
+ return Glib::SignalProxy1< void,const Glib::RefPtr<Gdk::DragContext>& >(this, &Widget_signal_drag_data_delete_info);
+}
+
+Glib::SignalProxy2< void,const Glib::RefPtr<Gdk::DragContext>&,guint > Widget::signal_drag_leave()
+{
+ return Glib::SignalProxy2< void,const Glib::RefPtr<Gdk::DragContext>&,guint >(this, &Widget_signal_drag_leave_info);
+}
+
+Glib::SignalProxy4< bool,const Glib::RefPtr<Gdk::DragContext>&,int,int,guint > Widget::signal_drag_motion()
+{
+ return Glib::SignalProxy4< bool,const Glib::RefPtr<Gdk::DragContext>&,int,int,guint >(this, &Widget_signal_drag_motion_info);
+}
+
+Glib::SignalProxy4< bool,const Glib::RefPtr<Gdk::DragContext>&,int,int,guint > Widget::signal_drag_drop()
+{
+ return Glib::SignalProxy4< bool,const Glib::RefPtr<Gdk::DragContext>&,int,int,guint >(this, &Widget_signal_drag_drop_info);
+}
+
+Glib::SignalProxy6< void,const Glib::RefPtr<Gdk::DragContext>&,int,int,const SelectionData&,guint,guint > Widget::signal_drag_data_received()
+{
+ return Glib::SignalProxy6< void,const Glib::RefPtr<Gdk::DragContext>&,int,int,const SelectionData&,guint,guint >(this, &Widget_signal_drag_data_received_info);
+}
+
+Glib::SignalProxy0< Glib::RefPtr<Atk::Object> > Widget::signal_get_accessible()
+{
+ return Glib::SignalProxy0< Glib::RefPtr<Atk::Object> >(this, &Widget_signal_get_accessible_info);
+}
+
+Glib::SignalProxy1< void,const Glib::RefPtr<Gdk::Screen>& > Widget::signal_screen_changed()
+{
+ return Glib::SignalProxy1< void,const Glib::RefPtr<Gdk::Screen>& >(this, &Widget_signal_screen_changed_info);
+}
+
+
+Glib::PropertyProxy<Glib::ustring> Widget::property_name()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "name");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> Widget::property_name() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "name");
+}
+
+Glib::PropertyProxy<Container*> Widget::property_parent()
+{
+ return Glib::PropertyProxy<Container*>(this, "parent");
+}
+
+Glib::PropertyProxy_ReadOnly<Container*> Widget::property_parent() const
+{
+ return Glib::PropertyProxy_ReadOnly<Container*>(this, "parent");
+}
+
+Glib::PropertyProxy<int> Widget::property_width_request()
+{
+ return Glib::PropertyProxy<int>(this, "width-request");
+}
+
+Glib::PropertyProxy_ReadOnly<int> Widget::property_width_request() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "width-request");
+}
+
+Glib::PropertyProxy<int> Widget::property_height_request()
+{
+ return Glib::PropertyProxy<int>(this, "height-request");
+}
+
+Glib::PropertyProxy_ReadOnly<int> Widget::property_height_request() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "height-request");
+}
+
+Glib::PropertyProxy<bool> Widget::property_visible()
+{
+ return Glib::PropertyProxy<bool>(this, "visible");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Widget::property_visible() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "visible");
+}
+
+Glib::PropertyProxy<bool> Widget::property_sensitive()
+{
+ return Glib::PropertyProxy<bool>(this, "sensitive");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Widget::property_sensitive() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "sensitive");
+}
+
+Glib::PropertyProxy<bool> Widget::property_app_paintable()
+{
+ return Glib::PropertyProxy<bool>(this, "app-paintable");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Widget::property_app_paintable() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "app-paintable");
+}
+
+Glib::PropertyProxy<bool> Widget::property_can_focus()
+{
+ return Glib::PropertyProxy<bool>(this, "can-focus");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Widget::property_can_focus() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "can-focus");
+}
+
+Glib::PropertyProxy<bool> Widget::property_has_focus()
+{
+ return Glib::PropertyProxy<bool>(this, "has-focus");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Widget::property_has_focus() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "has-focus");
+}
+
+Glib::PropertyProxy<bool> Widget::property_can_default()
+{
+ return Glib::PropertyProxy<bool>(this, "can-default");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Widget::property_can_default() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "can-default");
+}
+
+Glib::PropertyProxy<bool> Widget::property_has_default()
+{
+ return Glib::PropertyProxy<bool>(this, "has-default");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Widget::property_has_default() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "has-default");
+}
+
+Glib::PropertyProxy<bool> Widget::property_receives_default()
+{
+ return Glib::PropertyProxy<bool>(this, "receives-default");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Widget::property_receives_default() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "receives-default");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Widget::property_composite_child() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "composite-child");
+}
+
+Glib::PropertyProxy< Glib::RefPtr<Style> > Widget::property_style()
+{
+ return Glib::PropertyProxy< Glib::RefPtr<Style> >(this, "style");
+}
+
+Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Style> > Widget::property_style() const
+{
+ return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Style> >(this, "style");
+}
+
+Glib::PropertyProxy<Gdk::EventMask> Widget::property_events()
+{
+ return Glib::PropertyProxy<Gdk::EventMask>(this, "events");
+}
+
+Glib::PropertyProxy_ReadOnly<Gdk::EventMask> Widget::property_events() const
+{
+ return Glib::PropertyProxy_ReadOnly<Gdk::EventMask>(this, "events");
+}
+
+Glib::PropertyProxy<Gdk::ExtensionMode> Widget::property_extension_events()
+{
+ return Glib::PropertyProxy<Gdk::ExtensionMode>(this, "extension-events");
+}
+
+Glib::PropertyProxy_ReadOnly<Gdk::ExtensionMode> Widget::property_extension_events() const
+{
+ return Glib::PropertyProxy_ReadOnly<Gdk::ExtensionMode>(this, "extension-events");
+}
+
+
+void Gtk::Widget::on_show()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->show)
+ (*base->show)(gobj());
+}
+
+void Gtk::Widget::on_hide()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->hide)
+ (*base->hide)(gobj());
+}
+
+void Gtk::Widget::on_map()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->map)
+ (*base->map)(gobj());
+}
+
+void Gtk::Widget::on_unmap()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->unmap)
+ (*base->unmap)(gobj());
+}
+
+void Gtk::Widget::on_realize()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->realize)
+ (*base->realize)(gobj());
+}
+
+void Gtk::Widget::on_unrealize()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->unrealize)
+ (*base->unrealize)(gobj());
+}
+
+void Gtk::Widget::on_size_request(Requisition* requisition)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->size_request)
+ (*base->size_request)(gobj(),(GtkRequisition*)(requisition));
+}
+
+void Gtk::Widget::on_size_allocate(Allocation& allocation)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->size_allocate)
+ (*base->size_allocate)(gobj(),(GtkAllocation*)(allocation.gobj()));
+}
+
+void Gtk::Widget::on_state_changed(Gtk::StateType previous_state)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->state_changed)
+ (*base->state_changed)(gobj(),((GtkStateType)(previous_state)));
+}
+
+void Gtk::Widget::on_parent_changed(Widget* previous_parent)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->parent_set)
+ (*base->parent_set)(gobj(),(GtkWidget*)Glib::unwrap(previous_parent));
+}
+
+void Gtk::Widget::on_hierarchy_changed(Widget* previous_toplevel)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->hierarchy_changed)
+ (*base->hierarchy_changed)(gobj(),(GtkWidget*)Glib::unwrap(previous_toplevel));
+}
+
+void Gtk::Widget::on_style_changed(const Glib::RefPtr<Style>& previous_style)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->style_set)
+ (*base->style_set)(gobj(),Glib::unwrap(previous_style));
+}
+
+void Gtk::Widget::on_direction_changed(TextDirection direction)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->direction_changed)
+ (*base->direction_changed)(gobj(),((GtkTextDirection)(direction)));
+}
+
+void Gtk::Widget::on_grab_notify(bool was_grabbed)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->grab_notify)
+ (*base->grab_notify)(gobj(),static_cast<int>(was_grabbed));
+}
+
+void Gtk::Widget::on_child_notify(GParamSpec* pspec)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->child_notify)
+ (*base->child_notify)(gobj(),pspec);
+}
+
+bool Gtk::Widget::on_mnemonic_activate(bool group_cycling)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->mnemonic_activate)
+ return (*base->mnemonic_activate)(gobj(),static_cast<int>(group_cycling));
+
+ typedef bool RType;
+ return RType();
+}
+
+void Gtk::Widget::on_grab_focus()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->grab_focus)
+ (*base->grab_focus)(gobj());
+}
+
+bool Gtk::Widget::on_focus(DirectionType direction)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->focus)
+ return (*base->focus)(gobj(),((GtkDirectionType)(direction)));
+
+ typedef bool RType;
+ return RType();
+}
+
+bool Gtk::Widget::on_event(GdkEvent* event)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->event)
+ return (*base->event)(gobj(),event);
+
+ typedef bool RType;
+ return RType();
+}
+
+bool Gtk::Widget::on_button_press_event(GdkEventButton* event)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->button_press_event)
+ return (*base->button_press_event)(gobj(),event);
+
+ typedef bool RType;
+ return RType();
+}
+
+bool Gtk::Widget::on_button_release_event(GdkEventButton* event)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->button_release_event)
+ return (*base->button_release_event)(gobj(),event);
+
+ typedef bool RType;
+ return RType();
+}
+
+bool Gtk::Widget::on_scroll_event(GdkEventScroll* event)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->scroll_event)
+ return (*base->scroll_event)(gobj(),event);
+
+ typedef bool RType;
+ return RType();
+}
+
+bool Gtk::Widget::on_motion_notify_event(GdkEventMotion* event)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->motion_notify_event)
+ return (*base->motion_notify_event)(gobj(),event);
+
+ typedef bool RType;
+ return RType();
+}
+
+bool Gtk::Widget::on_delete_event(GdkEventAny* event)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->delete_event)
+ return (*base->delete_event)(gobj(),event);
+
+ typedef bool RType;
+ return RType();
+}
+
+bool Gtk::Widget::on_expose_event(GdkEventExpose* event)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->expose_event)
+ return (*base->expose_event)(gobj(),event);
+
+ typedef bool RType;
+ return RType();
+}
+
+bool Gtk::Widget::on_key_press_event(GdkEventKey* event)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->key_press_event)
+ return (*base->key_press_event)(gobj(),event);
+
+ typedef bool RType;
+ return RType();
+}
+
+bool Gtk::Widget::on_key_release_event(GdkEventKey* event)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->key_release_event)
+ return (*base->key_release_event)(gobj(),event);
+
+ typedef bool RType;
+ return RType();
+}
+
+bool Gtk::Widget::on_enter_notify_event(GdkEventCrossing* event)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->enter_notify_event)
+ return (*base->enter_notify_event)(gobj(),event);
+
+ typedef bool RType;
+ return RType();
+}
+
+bool Gtk::Widget::on_leave_notify_event(GdkEventCrossing* event)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->leave_notify_event)
+ return (*base->leave_notify_event)(gobj(),event);
+
+ typedef bool RType;
+ return RType();
+}
+
+bool Gtk::Widget::on_configure_event(GdkEventConfigure* event)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->configure_event)
+ return (*base->configure_event)(gobj(),event);
+
+ typedef bool RType;
+ return RType();
+}
+
+bool Gtk::Widget::on_focus_in_event(GdkEventFocus* event)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->focus_in_event)
+ return (*base->focus_in_event)(gobj(),event);
+
+ typedef bool RType;
+ return RType();
+}
+
+bool Gtk::Widget::on_focus_out_event(GdkEventFocus* event)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->focus_out_event)
+ return (*base->focus_out_event)(gobj(),event);
+
+ typedef bool RType;
+ return RType();
+}
+
+bool Gtk::Widget::on_map_event(GdkEventAny* event)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->map_event)
+ return (*base->map_event)(gobj(),event);
+
+ typedef bool RType;
+ return RType();
+}
+
+bool Gtk::Widget::on_unmap_event(GdkEventAny* event)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->unmap_event)
+ return (*base->unmap_event)(gobj(),event);
+
+ typedef bool RType;
+ return RType();
+}
+
+bool Gtk::Widget::on_property_notify_event(GdkEventProperty* event)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->property_notify_event)
+ return (*base->property_notify_event)(gobj(),event);
+
+ typedef bool RType;
+ return RType();
+}
+
+bool Gtk::Widget::on_selection_clear_event(GdkEventSelection* event)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->selection_clear_event)
+ return (*base->selection_clear_event)(gobj(),event);
+
+ typedef bool RType;
+ return RType();
+}
+
+bool Gtk::Widget::on_selection_request_event(GdkEventSelection* event)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->selection_request_event)
+ return (*base->selection_request_event)(gobj(),event);
+
+ typedef bool RType;
+ return RType();
+}
+
+bool Gtk::Widget::on_selection_notify_event(GdkEventSelection* event)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->selection_notify_event)
+ return (*base->selection_notify_event)(gobj(),event);
+
+ typedef bool RType;
+ return RType();
+}
+
+bool Gtk::Widget::on_proximity_in_event(GdkEventProximity* event)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->proximity_in_event)
+ return (*base->proximity_in_event)(gobj(),event);
+
+ typedef bool RType;
+ return RType();
+}
+
+bool Gtk::Widget::on_proximity_out_event(GdkEventProximity* event)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->proximity_out_event)
+ return (*base->proximity_out_event)(gobj(),event);
+
+ typedef bool RType;
+ return RType();
+}
+
+bool Gtk::Widget::on_visibility_notify_event(GdkEventVisibility* event)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->visibility_notify_event)
+ return (*base->visibility_notify_event)(gobj(),event);
+
+ typedef bool RType;
+ return RType();
+}
+
+bool Gtk::Widget::on_client_event(GdkEventClient* event)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->client_event)
+ return (*base->client_event)(gobj(),event);
+
+ typedef bool RType;
+ return RType();
+}
+
+bool Gtk::Widget::on_no_expose_event(GdkEventAny* event)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->no_expose_event)
+ return (*base->no_expose_event)(gobj(),event);
+
+ typedef bool RType;
+ return RType();
+}
+
+bool Gtk::Widget::on_window_state_event(GdkEventWindowState* event)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->window_state_event)
+ return (*base->window_state_event)(gobj(),event);
+
+ typedef bool RType;
+ return RType();
+}
+
+void Gtk::Widget::on_selection_get(SelectionData& selection_data, guint info, guint time)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->selection_get)
+ (*base->selection_get)(gobj(),(selection_data).gobj(),info,time);
+}
+
+void Gtk::Widget::on_selection_received(const SelectionData& selection_data, guint time)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->selection_received)
+ (*base->selection_received)(gobj(),const_cast<GtkSelectionData*>((selection_data).gobj()),time);
+}
+
+void Gtk::Widget::on_drag_begin(const Glib::RefPtr<Gdk::DragContext>& context)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->drag_begin)
+ (*base->drag_begin)(gobj(),Glib::unwrap(context));
+}
+
+void Gtk::Widget::on_drag_end(const Glib::RefPtr<Gdk::DragContext>& context)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->drag_end)
+ (*base->drag_end)(gobj(),Glib::unwrap(context));
+}
+
+void Gtk::Widget::on_drag_data_get(const Glib::RefPtr<Gdk::DragContext>& context, SelectionData& selection_data, guint info, guint time)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->drag_data_get)
+ (*base->drag_data_get)(gobj(),Glib::unwrap(context),(selection_data).gobj(),info,time);
+}
+
+void Gtk::Widget::on_drag_data_delete(const Glib::RefPtr<Gdk::DragContext>& context)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->drag_data_delete)
+ (*base->drag_data_delete)(gobj(),Glib::unwrap(context));
+}
+
+void Gtk::Widget::on_drag_leave(const Glib::RefPtr<Gdk::DragContext>& context, guint time)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->drag_leave)
+ (*base->drag_leave)(gobj(),Glib::unwrap(context),time);
+}
+
+bool Gtk::Widget::on_drag_motion(const Glib::RefPtr<Gdk::DragContext>& context, int x, int y, guint time)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->drag_motion)
+ return (*base->drag_motion)(gobj(),Glib::unwrap(context),x,y,time);
+
+ typedef bool RType;
+ return RType();
+}
+
+bool Gtk::Widget::on_drag_drop(const Glib::RefPtr<Gdk::DragContext>& context, int x, int y, guint time)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->drag_drop)
+ return (*base->drag_drop)(gobj(),Glib::unwrap(context),x,y,time);
+
+ typedef bool RType;
+ return RType();
+}
+
+void Gtk::Widget::on_drag_data_received(const Glib::RefPtr<Gdk::DragContext>& context, int x, int y, const SelectionData& selection_data, guint info, guint time)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->drag_data_received)
+ (*base->drag_data_received)(gobj(),Glib::unwrap(context),x,y,const_cast<GtkSelectionData*>((selection_data).gobj()),info,time);
+}
+
+Glib::RefPtr<Atk::Object> Gtk::Widget::on_get_accessible()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->get_accessible)
+ return Glib::wrap((*base->get_accessible)(gobj()), true);
+
+ typedef Glib::RefPtr<Atk::Object> RType;
+ return RType();
+}
+
+void Gtk::Widget::on_screen_changed(const Glib::RefPtr<Gdk::Screen>& previous_screen)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->screen_changed)
+ (*base->screen_changed)(gobj(),Glib::unwrap(previous_screen));
+}
+
+
+void Gtk::Widget::dispatch_child_properties_changed_vfunc(guint p1, GParamSpec** p2)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->dispatch_child_properties_changed)
+ (*base->dispatch_child_properties_changed)(gobj(),p1,p2);
+}
+
+void Gtk::Widget::show_all_vfunc()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->show_all)
+ (*base->show_all)(gobj());
+}
+
+void Gtk::Widget::hide_all_vfunc()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->hide_all)
+ (*base->hide_all)(gobj());
+}
+
+Glib::RefPtr<Atk::Object> Gtk::Widget::get_accessible_vfunc()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->get_accessible)
+ return Glib::wrap((*base->get_accessible)(gobj()));
+
+ typedef Glib::RefPtr<Atk::Object> RType;
+ return RType();
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/widget.h b/libs/gtkmm2/gtk/gtkmm/widget.h
new file mode 100644
index 0000000000..36877d402d
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/widget.h
@@ -0,0 +1,2666 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_WIDGET_H
+#define _GTKMM_WIDGET_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* Copyright (C) 2002, 2003 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <pangomm/context.h>
+#include <pangomm/layout.h>
+#include <atkmm/object.h>
+#include <atkmm/implementor.h>
+#include <gdkmm/event.h>
+#include <gdkmm/types.h>
+#include <gdkmm/window.h>
+#include <gdkmm/dragcontext.h>
+#include <gdkmm/pixbuf.h>
+#include <gdkmm/screen.h>
+#include <gtkmm/enums.h>
+#include <gdkmm/display.h>
+//#include <gtkmm/style.h>
+#include <gtkmm/targetlist.h>
+#include <gtkmm/rc.h>
+#include <gtkmm/object.h>
+#include <gtkmm/clipboard.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C"
+{
+typedef struct _GtkTargetEntry GtkTargetEntry;
+}
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkWidget GtkWidget;
+typedef struct _GtkWidgetClass GtkWidgetClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class Widget_Class; } // namespace Gtk
+namespace Gtk
+{
+
+
+/** @addtogroup gtkmmEnums Enums and Flags */
+
+/**
+ * @ingroup gtkmmEnums
+ * @par Bitwise operators:
+ * <tt>%DestDefaults operator|(DestDefaults, DestDefaults)</tt><br>
+ * <tt>%DestDefaults operator&(DestDefaults, DestDefaults)</tt><br>
+ * <tt>%DestDefaults operator^(DestDefaults, DestDefaults)</tt><br>
+ * <tt>%DestDefaults operator~(DestDefaults)</tt><br>
+ * <tt>%DestDefaults& operator|=(DestDefaults&, DestDefaults)</tt><br>
+ * <tt>%DestDefaults& operator&=(DestDefaults&, DestDefaults)</tt><br>
+ * <tt>%DestDefaults& operator^=(DestDefaults&, DestDefaults)</tt><br>
+ */
+enum DestDefaults
+{
+ DEST_DEFAULT_MOTION = 1 << 0,
+ DEST_DEFAULT_HIGHLIGHT = 1 << 1,
+ DEST_DEFAULT_DROP = 1 << 2,
+ DEST_DEFAULT_ALL = 0x07
+};
+
+/** @ingroup gtkmmEnums */
+inline DestDefaults operator|(DestDefaults lhs, DestDefaults rhs)
+ { return static_cast<DestDefaults>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
+
+/** @ingroup gtkmmEnums */
+inline DestDefaults operator&(DestDefaults lhs, DestDefaults rhs)
+ { return static_cast<DestDefaults>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
+
+/** @ingroup gtkmmEnums */
+inline DestDefaults operator^(DestDefaults lhs, DestDefaults rhs)
+ { return static_cast<DestDefaults>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
+
+/** @ingroup gtkmmEnums */
+inline DestDefaults operator~(DestDefaults flags)
+ { return static_cast<DestDefaults>(~static_cast<unsigned>(flags)); }
+
+/** @ingroup gtkmmEnums */
+inline DestDefaults& operator|=(DestDefaults& lhs, DestDefaults rhs)
+ { return (lhs = static_cast<DestDefaults>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
+
+/** @ingroup gtkmmEnums */
+inline DestDefaults& operator&=(DestDefaults& lhs, DestDefaults rhs)
+ { return (lhs = static_cast<DestDefaults>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
+
+/** @ingroup gtkmmEnums */
+inline DestDefaults& operator^=(DestDefaults& lhs, DestDefaults rhs)
+ { return (lhs = static_cast<DestDefaults>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::DestDefaults> : public Glib::Value_Flags<Gtk::DestDefaults>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+/**
+ * @ingroup gtkmmEnums
+ * @par Bitwise operators:
+ * <tt>%WidgetFlags operator|(WidgetFlags, WidgetFlags)</tt><br>
+ * <tt>%WidgetFlags operator&(WidgetFlags, WidgetFlags)</tt><br>
+ * <tt>%WidgetFlags operator^(WidgetFlags, WidgetFlags)</tt><br>
+ * <tt>%WidgetFlags operator~(WidgetFlags)</tt><br>
+ * <tt>%WidgetFlags& operator|=(WidgetFlags&, WidgetFlags)</tt><br>
+ * <tt>%WidgetFlags& operator&=(WidgetFlags&, WidgetFlags)</tt><br>
+ * <tt>%WidgetFlags& operator^=(WidgetFlags&, WidgetFlags)</tt><br>
+ */
+enum WidgetFlags
+{
+ TOPLEVEL = 1 << 4,
+ NO_WINDOW = 1 << 5,
+ REALIZED = 1 << 6,
+ MAPPED = 1 << 7,
+ VISIBLE = 1 << 8,
+ SENSITIVE = 1 << 9,
+ PARENT_SENSITIVE = 1 << 10,
+ CAN_FOCUS = 1 << 11,
+ HAS_FOCUS = 1 << 12,
+ CAN_DEFAULT = 1 << 13,
+ HAS_DEFAULT = 1 << 14,
+ HAS_GRAB = 1 << 15,
+ RC_STYLE = 1 << 16,
+ COMPOSITE_CHILD = 1 << 17,
+ NO_REPARENT = 1 << 18,
+ APP_PAINTABLE = 1 << 19,
+ RECEIVES_DEFAULT = 1 << 20,
+ DOUBLE_BUFFERED = 1 << 21,
+ NO_SHOW_ALL = 1 << 22
+};
+
+/** @ingroup gtkmmEnums */
+inline WidgetFlags operator|(WidgetFlags lhs, WidgetFlags rhs)
+ { return static_cast<WidgetFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
+
+/** @ingroup gtkmmEnums */
+inline WidgetFlags operator&(WidgetFlags lhs, WidgetFlags rhs)
+ { return static_cast<WidgetFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
+
+/** @ingroup gtkmmEnums */
+inline WidgetFlags operator^(WidgetFlags lhs, WidgetFlags rhs)
+ { return static_cast<WidgetFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
+
+/** @ingroup gtkmmEnums */
+inline WidgetFlags operator~(WidgetFlags flags)
+ { return static_cast<WidgetFlags>(~static_cast<unsigned>(flags)); }
+
+/** @ingroup gtkmmEnums */
+inline WidgetFlags& operator|=(WidgetFlags& lhs, WidgetFlags rhs)
+ { return (lhs = static_cast<WidgetFlags>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
+
+/** @ingroup gtkmmEnums */
+inline WidgetFlags& operator&=(WidgetFlags& lhs, WidgetFlags rhs)
+ { return (lhs = static_cast<WidgetFlags>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
+
+/** @ingroup gtkmmEnums */
+inline WidgetFlags& operator^=(WidgetFlags& lhs, WidgetFlags rhs)
+ { return (lhs = static_cast<WidgetFlags>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::WidgetFlags> : public Glib::Value_Flags<Gtk::WidgetFlags>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+/**
+ * @ingroup gtkmmEnums
+ */
+enum WidgetHelpType
+{
+ WIDGET_HELP_TOOLTIP,
+ WIDGET_HELP_WHATS_THIS
+};
+
+} // namespace Gtk
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gtk::WidgetHelpType> : public Glib::Value_Enum<Gtk::WidgetHelpType>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{
+
+
+class Style;
+class AccelGroup;
+class Adjustment;
+class Window;
+class Container;
+class Settings;
+
+typedef GtkRequisition Requisition;
+
+// Gtk::Allocation is a typedef of Gdk::Rectangle because GtkAllocation is
+// a typedef of GdkRectangle.
+typedef Gdk::Rectangle Allocation;
+
+
+/** @defgroup Widgets Widgets
+ */
+
+/** Abstract Widget (Base class for all widgets)
+ *
+ * As the base class of all widgets this contains all of the properties
+ * and methods common to all widgets. It is an abstract class that
+ * can not be instantiated.
+ *
+ * Important part of widgets are the *_event signals and virtual methods
+ * that every widget have. Those are events coming directly from gdk and
+ * thus also from XLib. By overriding those virtual methods you can
+ * trap everything a widget can ever do.
+ * In order to capture events from a widget, the event mask must
+ * first be set with ().
+ *
+ * Only widgets with a Gdk::Window on the server side are allowed to
+ * capture events. Widgets in the Gtk::Misc group for example lack
+ * a Gdk::Window.
+ */
+
+class Widget
+: public Object,
+ public Atk::Implementor
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Widget CppObjectType;
+ typedef Widget_Class CppClassType;
+ typedef GtkWidget BaseObjectType;
+ typedef GtkWidgetClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~Widget();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class Widget_Class;
+ static CppClassType widget_class_;
+
+ // noncopyable
+ Widget(const Widget&);
+ Widget& operator=(const Widget&);
+
+protected:
+ explicit Widget(const Glib::ConstructParams& construct_params);
+ explicit Widget(GtkWidget* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkWidget* gobj() { return reinterpret_cast<GtkWidget*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkWidget* gobj() const { return reinterpret_cast<GtkWidget*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_show();
+ virtual void on_hide();
+ virtual void on_map();
+ virtual void on_unmap();
+ virtual void on_realize();
+ virtual void on_unrealize();
+ virtual void on_size_request(Requisition* requisition);
+ virtual void on_size_allocate(Allocation& allocation);
+ virtual void on_state_changed(Gtk::StateType previous_state);
+ virtual void on_parent_changed(Widget* previous_parent);
+ virtual void on_hierarchy_changed(Widget* previous_toplevel);
+ virtual void on_style_changed(const Glib::RefPtr<Style>& previous_style);
+ virtual void on_direction_changed(TextDirection direction);
+ virtual void on_grab_notify(bool was_grabbed);
+ virtual void on_child_notify(GParamSpec* pspec);
+ virtual bool on_mnemonic_activate(bool group_cycling);
+ virtual void on_grab_focus();
+ virtual bool on_focus(DirectionType direction);
+ virtual bool on_event(GdkEvent* event);
+ virtual bool on_button_press_event(GdkEventButton* event);
+ virtual bool on_button_release_event(GdkEventButton* event);
+ virtual bool on_scroll_event(GdkEventScroll* event);
+ virtual bool on_motion_notify_event(GdkEventMotion* event);
+ virtual bool on_delete_event(GdkEventAny* event);
+ virtual bool on_expose_event(GdkEventExpose* event);
+ virtual bool on_key_press_event(GdkEventKey* event);
+ virtual bool on_key_release_event(GdkEventKey* event);
+ virtual bool on_enter_notify_event(GdkEventCrossing* event);
+ virtual bool on_leave_notify_event(GdkEventCrossing* event);
+ virtual bool on_configure_event(GdkEventConfigure* event);
+ virtual bool on_focus_in_event(GdkEventFocus* event);
+ virtual bool on_focus_out_event(GdkEventFocus* event);
+ virtual bool on_map_event(GdkEventAny* event);
+ virtual bool on_unmap_event(GdkEventAny* event);
+ virtual bool on_property_notify_event(GdkEventProperty* event);
+ virtual bool on_selection_clear_event(GdkEventSelection* event);
+ virtual bool on_selection_request_event(GdkEventSelection* event);
+ virtual bool on_selection_notify_event(GdkEventSelection* event);
+ virtual bool on_proximity_in_event(GdkEventProximity* event);
+ virtual bool on_proximity_out_event(GdkEventProximity* event);
+ virtual bool on_visibility_notify_event(GdkEventVisibility* event);
+ virtual bool on_client_event(GdkEventClient* event);
+ virtual bool on_no_expose_event(GdkEventAny* event);
+ virtual bool on_window_state_event(GdkEventWindowState* event);
+ virtual void on_selection_get(SelectionData& selection_data, guint info, guint time);
+ virtual void on_selection_received(const SelectionData& selection_data, guint time);
+ virtual void on_drag_begin(const Glib::RefPtr<Gdk::DragContext>& context);
+ virtual void on_drag_end(const Glib::RefPtr<Gdk::DragContext>& context);
+ virtual void on_drag_data_get(const Glib::RefPtr<Gdk::DragContext>& context, SelectionData& selection_data, guint info, guint time);
+ virtual void on_drag_data_delete(const Glib::RefPtr<Gdk::DragContext>& context);
+ virtual void on_drag_leave(const Glib::RefPtr<Gdk::DragContext>& context, guint time);
+ virtual bool on_drag_motion(const Glib::RefPtr<Gdk::DragContext>& context, int x, int y, guint time);
+ virtual bool on_drag_drop(const Glib::RefPtr<Gdk::DragContext>& context, int x, int y, guint time);
+ virtual void on_drag_data_received(const Glib::RefPtr<Gdk::DragContext>& context, int x, int y, const SelectionData& selection_data, guint info, guint time);
+ virtual Glib::RefPtr<Atk::Object> on_get_accessible();
+ virtual void on_screen_changed(const Glib::RefPtr<Gdk::Screen>& previous_screen);
+
+
+private:
+
+
+public:
+ friend class Main;
+
+
+ /** For widgets that support scrolling, sets the scroll adjustments and
+ * returns <tt>true</tt>. For widgets that don't support scrolling, does
+ * nothing and returns <tt>false</tt>. Widgets that don't support scrolling
+ * can be scrolled by placing them in a Gtk::Viewport, which does
+ * support scrolling.
+ * @param hadjustment An adjustment for horizontal scrolling, or <tt>0</tt>.
+ * @param vadjustment An adjustment for vertical scrolling, or <tt>0</tt>.
+ * @return <tt>true</tt> if the widget supports scrolling.
+ */
+ bool set_scroll_adjustments(Adjustment& hadjustment, Adjustment& vadjustment);
+
+
+ /** Flags a widget to be displayed. Any widget that isn't shown will
+ * not appear on the screen. If you want to show all the widgets in a
+ * container, it's easier to call show_all() on the
+ * container, instead of individually showing the widgets.
+ *
+ * Remember that you have to show the containers containing a widget,
+ * in addition to the widget itself, before it will appear onscreen.
+ *
+ * When a toplevel container is shown, it is immediately realized and
+ * mapped; other shown widgets are realized and mapped when their
+ * toplevel container is realized and mapped.
+ */
+ void show();
+
+ /** Shows a widget. If the widget is an unmapped toplevel widget
+ * (i.e. a Gtk::Window that has not yet been shown), enter the main
+ * loop and wait for the window to actually be mapped. Be careful;
+ * because the main loop is running, anything can happen during
+ * this function.
+ */
+ void show_now();
+
+ /** Reverses the effects of show(), causing the widget to be
+ * hidden (invisible to the user).
+ */
+ void hide();
+
+
+ /** Recursively shows a widget, and any child widgets (if the widget is
+ * a container).
+ */
+ void show_all();
+
+
+ /** Recursively hides a widget and any child widgets.
+ */
+ void hide_all();
+
+
+/* QUEUE DRAWS */
+
+
+ /** Equivalent to calling queue_draw_area() for the
+ * entire area of a widget.
+ */
+ void queue_draw();
+
+ /** Invalidates the rectangular area of @a widget defined by @a x , @a y ,
+ * @a width and @a height by calling gdk_window_invalidate_rect() on the
+ * widget's window and all its child windows. Once the main loop
+ * becomes idle (after the current batch of events has been processed,
+ * roughly), the window will receive expose events for the union of
+ * all regions that have been invalidated.
+ *
+ * Normally you would only use this function in widget
+ * implementations. You might also use it, or
+ * gdk_window_invalidate_rect() directly, to schedule a redraw of a
+ * Gtk::DrawingArea or some portion thereof.
+ *
+ * Frequently you can just call gdk_window_invalidate_rect() or
+ * gdk_window_invalidate_region() instead of this function. Those
+ * functions will invalidate only a single window, instead of the
+ * widget and all its children.
+ *
+ * The advantage of adding to the invalidated region compared to
+ * simply drawing immediately is efficiency; using an invalid region
+ * ensures that you only have to redraw one time.
+ * @param x X coordinate of upper-left corner of rectangle to redraw.
+ * @param y Y coordinate of upper-left corner of rectangle to redraw.
+ * @param width Width of region to draw.
+ * @param height Height of region to draw.
+ */
+ void queue_draw_area(int x, int y, int width, int height);
+
+ /** This function is only for use in widget implementations.
+ * Flags a widget to have its size renegotiated; should
+ * be called when a widget for some reason has a new size request.
+ * For example, when you change the text in a Gtk::Label, Gtk::Label
+ * queues a resize to ensure there's enough space for the new text.
+ */
+ void queue_resize();
+
+ /** This function is typically used when implementing a Gtk::Container
+ * subclass. Obtains the preferred size of a widget. The container
+ * uses this information to arrange its child widgets and decide what
+ * size allocations to give them with size_allocate().
+ *
+ * You can also call this function from an application, with some
+ * caveats. Most notably, getting a size request requires the widget
+ * to be associated with a screen, because font information may be
+ * needed. Multihead-aware applications should keep this in mind.
+ *
+ * Also remember that the size request is not necessarily the size
+ * a widget will actually be allocated.
+ *
+ * See also get_child_requisition().
+ * @result A Gtk::Requisition.
+ */
+ Requisition size_request() const;
+
+
+ //Deprecated, because the Requisition should be an output parameter. This could never have been used.
+
+ /** This function is typically used when implementing a Gtk::Container
+ * subclass. Obtains the preferred size of a widget. The container
+ * uses this information to arrange its child widgets and decide what
+ * size allocations to give them with size_allocate().
+ *
+ * You can also call this function from an application, with some
+ * caveats. Most notably, getting a size request requires the widget
+ * to be associated with a screen, because font information may be
+ * needed. Multihead-aware applications should keep this in mind.
+ *
+ * Also remember that the size request is not necessarily the size
+ * a widget will actually be allocated.
+ *
+ * See also get_child_requisition().
+ * @param requisition A Gtk::Requisition to be filled in.
+ */
+ void size_request(const Requisition& requisition);
+
+
+ /** This function is only used by Gtk::Container subclasses, to assign a size
+ * and position to their child widgets.
+ * @param allocation Position and size to be allocated to @a widget .
+ */
+ void size_allocate(const Allocation& allocation);
+
+
+ /** Installs an accelerator for this @a widget in @a accel_group that causes
+ * @a accel_signal to be emitted if the accelerator is activated.
+ * The @a accel_group needs to be added to the widget's toplevel via
+ * Gtk::Window::add_accel_group(), and the signal must be of type G::RUN_ACTION.
+ * Accelerators added through this function are not user changeable during
+ * runtime. If you want to support accelerators that can be changed by the
+ * user, use gtk_accel_map_add_entry() and set_accel_path() or
+ * Gtk::MenuItem::set_accel_path() instead.
+ * @param accel_signal Widget signal to emit on accelerator activation.
+ * @param accel_group Accel group for this widget, added to its toplevel.
+ * @param accel_key GDK keyval of the accelerator.
+ * @param accel_mods Modifier key combination of the accelerator.
+ * @param accel_flags Flag accelerators, e.g. Gtk::ACCEL_VISIBLE.
+ */
+ void add_accelerator(const Glib::ustring& accel_signal, const Glib::RefPtr<AccelGroup>& accel_group,
+ guint accel_key, Gdk::ModifierType accel_mods, AccelFlags accel_flags);
+
+
+ /** Removes an accelerator from @a widget , previously installed with
+ * add_accelerator().
+ * @param accel_group Accel group for this widget.
+ * @param accel_key GDK keyval of the accelerator.
+ * @param accel_mods Modifier key combination of the accelerator.
+ * @return Whether an accelerator was installed and could be removed.
+ */
+ bool remove_accelerator(const Glib::RefPtr<AccelGroup>& accel_group,
+ guint accel_key, Gdk::ModifierType accel_mods);
+
+ /** Given an accelerator group, @a accel_group , and an accelerator path,
+ * @a accel_path , sets up an accelerator in @a accel_group so whenever the
+ * key binding that is defined for @a accel_path is pressed, @a widget
+ * will be activated. This removes any accelerators (for any
+ * accelerator group) installed by previous calls to
+ * set_accel_path(). Associating accelerators with
+ * paths allows them to be modified by the user and the modifications
+ * to be saved for future use. (See gtk_accel_map_save().)
+ *
+ * This function is a low level function that would most likely
+ * be used by a menu creation system like Gtk::ItemFactory. If you
+ * use Gtk::ItemFactory, setting up accelerator paths will be done
+ * automatically.
+ *
+ * Even when you you aren't using Gtk::ItemFactory, if you only want to
+ * set up accelerators on menu items Gtk::MenuItem::set_accel_path()
+ * provides a somewhat more convenient interface.
+ * @param accel_path Path used to look up the the accelerator.
+ * @param accel_group A Gtk::AccelGroup.
+ */
+ void set_accel_path(const Glib::ustring& accel_path,
+ const Glib::RefPtr<AccelGroup>& accel_group);
+
+ //GList* gtk_widget_list_accel_closures();
+
+ //TODO: Or maybe it is useless: gboolean gtk_widget_can_activate_accel(GtkWidget *widget, guint signal_id)
+
+
+ bool mnemonic_activate(bool group_cycling);
+
+ //TODO: Use C++ type
+
+ /** Rarely-used function. This function is used to emit
+ * the event signals on a widget (those signals should never
+ * be emitted without using this function to do so).
+ * If you want to synthesize an event though, don't use this function;
+ * instead, use gtk_main_do_event() so the event will behave as if
+ * it were in the event queue. Don't synthesize expose events; instead,
+ * use gdk_window_invalidate_rect() to invalidate a region of the
+ * window.
+ * @param event A Gdk::Event.
+ * @return Return from the event signal emission (<tt>true</tt> if the event was handled).
+ */
+ bool event(GdkEvent* event);
+
+ /** Very rarely-used function. This function is used to emit
+ * an expose event signals on a widget. This function is not
+ * normally used directly. The only time it is used is when
+ * propagating an expose event to a child NO_WINDOW widget, and
+ * that is normally done using Gtk::Container::propagate_expose().
+ *
+ * If you want to force an area of a window to be redrawn,
+ * use gdk_window_invalidate_rect() or gdk_window_invalidate_region().
+ * To cause the redraw to be done immediately, follow that call
+ * with a call to gdk_window_process_updates().
+ * @param event A expose Gdk::Event.
+ * @return Return from the event signal emission (<tt>true</tt> if the event was handled).
+ */
+ int send_expose(GdkEvent* event);
+
+ /** For widgets that can be "activated" (buttons, menu items, etc.)
+ * this function activates them. Activation is what happens when you
+ * press Enter on a widget during key navigation. If @a widget isn't
+ * activatable, the function returns <tt>false</tt>.
+ * @return <tt>true</tt> if the widget was activatable.
+ */
+ bool activate();
+
+
+ /** Moves a widget from one Gtk::Container to another, handling reference
+ * count issues to avoid destroying the widget.
+ * @param new_parent A Gtk::Container to move the widget into.
+ */
+ void reparent(Widget & new_parent);
+
+ bool intersect(const Gdk::Rectangle& area) const;
+
+ /** Computes the intersection of a @a widget 's area and @a area , storing
+ * the intersection in @a intersection , and returns <tt>true</tt> if there was
+ * an intersection. @a intersection may be <tt>0</tt> if you're only
+ * interested in whether there was an intersection.
+ * @param area A rectangle.
+ * @param intersection Rectangle to store intersection of @a widget and @a area .
+ * @return <tt>true</tt> if there was an intersection.
+ */
+ bool intersect(const Gdk::Rectangle& area, Gdk::Rectangle& intersection) const;
+
+
+ /** Computes the intersection of a @a widget 's area and @a region , returning
+ * the intersection. The result may be empty, use gdk_region_empty() to
+ * check.
+ * @param region A Gdk::Region, in the same coordinate system as
+ * @a widget -&gt;allocation. That is, relative to @a widget -&gt;window
+ * for NO_WINDOW widgets; relative to the parent window
+ * of @a widget -&gt;window for widgets with their own window.
+ * @return A newly allocated region holding the intersection of @a widget
+ * and @a region . The coordinates of the return value are
+ * relative to @a widget -&gt;window for NO_WINDOW widgets, and
+ * relative to the parent window of @a widget -&gt;window for
+ * widgets with their own window.
+ */
+ Gdk::Region region_intersect(const Gdk::Region& region) const;
+
+
+ /** Stops emission of "child-notify" signals on @a widget . The signals are
+ * queued until thaw_child_notify() is called on @a widget .
+ *
+ * This is the analogue of Glib::object_freeze_notify() for child properties.
+ */
+ void freeze_child_notify();
+
+ /** Emits a "child-notify" signal for the
+ * child property @a child_property
+ * on @a widget .
+ *
+ * This is the analogue of Glib::object_notify() for child properties.
+ * @param child_property The name of a child property installed on the
+ * class of @a widget &lt;!-- --&gt;'s parent.
+ */
+ void child_notify(const Glib::ustring& child_property);
+
+ /** Reverts the effect of a previous call to freeze_child_notify().
+ * This causes all queued "child-notify" signals on @a widget to be emitted.
+ */
+ void thaw_child_notify();
+
+
+ /** Determines if the widget is the focus widget within its
+ * toplevel. (This does not mean that the HAS_FOCUS flag is
+ * necessarily set; HAS_FOCUS will only be set if the
+ * toplevel widget additionally has the global input focus.)
+ * @return <tt>true</tt> if the widget is the focus widget.
+ */
+ bool is_focus() const;
+
+ /** Causes @a widget to have the keyboard focus for the Gtk::Window it's
+ * inside. @a widget must be a focusable widget, such as a Gtk::Entry;
+ * something like Gtk::Frame won't work. (More precisely, it must have the
+ * Gtk::CAN_FOCUS flag set.)
+ */
+ void grab_focus();
+
+ /** Causes @a widget to become the default widget. @a widget must have the
+ * Gtk::CAN_DEFAULT flag set; typically you have to set this flag
+ * yourself by calling <tt>GTK_WIDGET_SET_FLAGS ( @a widget ,
+ * GTK_CAN_DEFAULT)</tt>. The default widget is activated when the user
+ * presses Enter in a window. Default widgets must be activatable,
+ * that is, activate() should affect them.
+ */
+ void grab_default();
+
+ /** Block events to everything else than this widget and its children. This
+ * way you can get modal behaviour (usually not recommended). One practical
+ * example could be when implementing a key-binding widget that needs
+ * exclusive access to the key combination that the user presses next.
+ *
+ * Calls to add_modal_grab should be paired with calls to remove_modal_grab.
+ */
+ void add_modal_grab();
+
+ /** Remove the modal grab of the widget in case it was previously grabbed.
+ */
+ void remove_modal_grab();
+
+ /** Retrieve the widget which is currently grabbing all events.
+ */
+ static Widget* get_current_modal_grab();
+
+
+ /** Widgets can be named, which allows you to refer to them from a
+ * gtkrc file. You can apply a style to widgets with a particular name
+ * in the gtkrc file. See the documentation for gtkrc files (on the
+ * same page as the docs for Gtk::RcStyle).
+ *
+ * Note that widget names are separated by periods in paths (see
+ * path()), so names with embedded periods may cause confusion.
+ * @param name Name for the widget.
+ */
+ void set_name(const Glib::ustring& name);
+ void unset_name();
+
+ /** Retrieves the name of a widget. See set_name() for the
+ * significance of widget names.
+ * @return Name of the widget. This string is owned by GTK+ and
+ * should not be modified or freed.
+ */
+ Glib::ustring get_name() const;
+
+
+ /** This function is for use in widget implementations. Sets the state
+ * of a widget (insensitive, prelighted, etc.) Usually you should set
+ * the state using wrapper functions such as set_sensitive().
+ * @param state New state for @a widget .
+ */
+ void set_state(Gtk::StateType state);
+
+ /** Sets the sensitivity of a widget. A widget is sensitive if the user
+ * can interact with it. Insensitive widgets are "grayed out" and the
+ * user can't interact with them. Insensitive widgets are known as
+ * "inactive", "disabled", or "ghosted" in some other toolkits.
+ * @param sensitive <tt>true</tt> to make the widget sensitive.
+ */
+ void set_sensitive(bool sensitive = true);
+
+ void set_app_paintable(bool app_paintable = true);
+
+ /** Widgets are double buffered by default; you can use this function
+ * to turn off the buffering. "Double buffered" simply means that
+ * gdk_window_begin_paint_region() and gdk_window_end_paint() are called
+ * automatically around expose events sent to the
+ * widget. gdk_window_begin_paint() diverts all drawing to a widget's
+ * window to an offscreen buffer, and gdk_window_end_paint() draws the
+ * buffer to the screen. The result is that users see the window
+ * update in one smooth step, and don't see individual graphics
+ * primitives being rendered.
+ *
+ * In very simple terms, double buffered widgets don't flicker,
+ * so you would only use this function to turn off double buffering
+ * if you had special needs and really knew what you were doing.
+ * @param double_buffered <tt>true</tt> to double-buffer a widget.
+ */
+ void set_double_buffered(bool double_buffered = true);
+
+
+ /** Sets whether a when a widgets size allocation changes, the entire
+ * widget is queued for drawing. By default, this setting is <tt>true</tt> and
+ * the entire widget is redrawn on every size change. If your widget
+ * leaves the upper left unchanged when made bigger, turning this
+ * setting on will improve performance.
+ *
+ * Note that for NO_WINDOW widgets setting this flag to <tt>false</tt> turns
+ * off all allocation on resizing: the widget will not even redraw if
+ * its position changes; this is to allow containers that don't draw
+ * anything to avoid excess invalidations. If you set this flag on a
+ * NO_WINDOW widget that <em>does</em> draw on @a widget -&gt;window,
+ * you are responsible for invalidating both the old and new allocation
+ * of the widget when the widget is moved and responsible for invalidating
+ * regions newly when the widget increases size.
+ * @param redraw_on_allocate If <tt>true</tt>, the entire widget will be redrawn
+ * when it is allocated to a new size. Otherwise, only the
+ * new portion of the widget will be redrawn.
+ */
+ void set_redraw_on_allocate(bool redraw_on_allocate = true);
+
+
+ /** Sets whether @a widget should be mapped along with its when its parent
+ * is mapped and @a widget has been shown with show().
+ *
+ * The child visibility can be set for widget before it is added to
+ * a container with set_parent(), to avoid mapping
+ * children unnecessary before immediately unmapping them. However
+ * it will be reset to its default state of <tt>true</tt> when the widget
+ * is removed from a container.
+ *
+ * Note that changing the child visibility of a widget does not
+ * queue a resize on the widget. Most of the time, the size of
+ * a widget is computed from all visible children, whether or
+ * not they are mapped. If this is not the case, the container
+ * can queue a resize itself.
+ *
+ * This function is only useful for container implementations and
+ * never should be called by an application.
+ * @param is_visible If <tt>true</tt>, @a widget should be mapped along with its parent.
+ */
+ void set_child_visible(bool is_visible = true);
+
+ /** Gets the value set with set_child_visible().
+ * If you feel a need to use this function, your code probably
+ * needs reorganization.
+ *
+ * This function is only useful for container implementations and
+ * never should be called by an application.
+ * @return <tt>true</tt> if the widget is mapped with the parent.
+ */
+ bool get_child_visible() const;
+
+
+ /** Returns the parent container of @a widget .
+ * @return The parent container of @a widget , or <tt>0</tt>.
+ */
+ Container* get_parent();
+
+ /** Returns the parent container of @a widget .
+ * @return The parent container of @a widget , or <tt>0</tt>.
+ */
+ const Container* get_parent() const;
+
+
+ /** Gets @a widget 's parent window.
+ * @return The parent window of @a widget .
+ */
+ Glib::RefPtr<Gdk::Window> get_parent_window();
+
+ /** Gets @a widget 's parent window.
+ * @return The parent window of @a widget .
+ */
+ Glib::RefPtr<const Gdk::Window> get_parent_window() const;
+
+ /** Sets a non default parent window for @a widget .
+ * @param parent_window The new parent window.
+ */
+ void set_parent_window(const Glib::RefPtr<const Gdk::Window>& parent_window);
+
+
+ /** This function is used by custom widget implementations; if you're
+ * writing an app, you'd use grab_focus() to move the focus
+ * to a particular widget, and Gtk::Container::set_focus_chain() to
+ * change the focus tab order. So you may want to investigate those
+ * functions instead.
+ *
+ * child_focus() is called by containers as the user moves
+ * around the window using keyboard shortcuts. @a direction indicates
+ * what kind of motion is taking place (up, down, left, right, tab
+ * forward, tab backward). child_focus() invokes the
+ * "focus" signal on Gtk::Widget; widgets override the default handler
+ * for this signal in order to implement appropriate focus behavior.
+ *
+ * The "focus" default handler for a widget should return <tt>true</tt> if
+ * moving in @a direction left the focus on a focusable location inside
+ * that widget, and <tt>false</tt> if moving in @a direction moved the focus
+ * outside the widget. If returning <tt>true</tt>, widgets normally
+ * call grab_focus() to place the focus accordingly;
+ * if returning <tt>false</tt>, they don't modify the current focus location.
+ *
+ * This function replaces gtk_container_focus() from GTK+ 1.2. It was
+ * necessary to check that the child was visible, sensitive, and
+ * focusable before calling
+ * gtk_container_focus(). child_focus() returns <tt>false</tt> if
+ * the widget is not currently in a focusable state, so there's no
+ * need for those checks.
+ * @param direction Direction of focus movement.
+ * @return <tt>true</tt> if focus ended up inside @a widget .
+ */
+ bool child_focus(DirectionType direction);
+
+
+ /** Sets the minimum size of a widget; that is, the widget's size
+ * request will be @a width by @a height . You can use this function to
+ * force a widget to be either larger or smaller than it normally
+ * would be.
+ *
+ * In most cases, Gtk::Window::set_default_size() is a better choice for
+ * toplevel windows than this function; setting the default size will
+ * still allow users to shrink the window. Setting the size request
+ * will force them to leave the window at least as large as the size
+ * request. When dealing with window sizes,
+ * Gtk::Window::set_geometry_hints() can be a useful function as well.
+ *
+ * Note the inherent danger of setting any fixed size - themes,
+ * translations into other languages, different fonts, and user action
+ * can all change the appropriate size for a given widget. So, it's
+ * basically impossible to hardcode a size that will always be
+ * correct.
+ *
+ * The size request of a widget is the smallest size a widget can
+ * accept while still functioning well and drawing itself correctly.
+ * However in some strange cases a widget may be allocated less than
+ * its requested size, and in many cases a widget may be allocated more
+ * space than it requested.
+ *
+ * If the size request in a given direction is -1 (unset), then
+ * the "natural" size request of the widget will be used instead.
+ *
+ * Widgets can't actually be allocated a size less than 1 by 1, but
+ * you can pass 0,0 to this function to mean "as small as possible."
+ * @param width Width @a widget should request, or -1 to unset.
+ * @param height Height @a widget should request, or -1 to unset.
+ */
+ void set_size_request(int width = -1, int height = -1);
+
+ /** Gets the size request that was explicitly set for the widget using
+ * set_size_request(). A value of -1 stored in @a width or
+ * @a height indicates that that dimension has not been set explicitly
+ * and the natural requisition of the widget will be used intead. See
+ * set_size_request(). To get the size a widget will
+ * actually use, call size_request() instead of
+ * this function.
+ * @param width Return location for width, or <tt>0</tt>.
+ * @param height Return location for height, or <tt>0</tt>.
+ */
+ void get_size_request(int& width, int& height) const;
+
+
+ /** Sets the event mask (see Gdk::EventMask) for a widget. The event
+ * mask determines which events a widget will receive. Keep in mind
+ * that different widgets have different default event masks, and by
+ * changing the event mask you may disrupt a widget's functionality,
+ * so be careful. This function must be called while a widget is
+ * unrealized. Consider add_events() for widgets that are
+ * already realized, or if you want to preserve the existing event
+ * mask. This function can't be used with Gtk::NO_WINDOW widgets;
+ * to get events on those widgets, place them inside a Gtk::EventBox
+ * and receive events on the event box.
+ * @param events Event mask.
+ */
+ void set_events(Gdk::EventMask events);
+
+ /** Adds the events in the bitfield @a events to the event mask for
+ * @a widget . See set_events() for details.
+ * @param events An event mask, see Gdk::EventMask.
+ */
+ void add_events(Gdk::EventMask events);
+
+ /** Sets the extension events mask to @a mode . See Gdk::ExtensionMode
+ * and gdk_input_set_extension_events().
+ * @param mode Bitfield of extension events to receive.
+ */
+ void set_extension_events(Gdk::ExtensionMode mode);
+
+
+ /** Retrieves the extension events the widget will receive; see
+ * gdk_input_set_extension_events().
+ * @return Extension events for @a widget .
+ */
+ Gdk::ExtensionMode get_extension_events() const;
+
+
+ /** This function returns the topmost widget in the container hierarchy
+ * @a widget is a part of. If @a widget has no parent widgets, it will be
+ * returned as the topmost widget. No reference will be added to the
+ * returned widget; it should not be unreferenced.
+ *
+ * Note the difference in behavior vs. get_ancestor();
+ * <tt>gtk_widget_get_ancestor (widget, GTK_TYPE_WINDOW)</tt>
+ * would return
+ * <tt>0</tt> if @a widget wasn't inside a toplevel window, and if the
+ * window was inside a Gtk::Window-derived widget which was in turn
+ * inside the toplevel Gtk::Window. While the second case may
+ * seem unlikely, it actually happens when a Gtk::Plug is embedded
+ * inside a Gtk::Socket within the same application.
+ *
+ * To reliably find the toplevel Gtk::Window, use
+ * get_toplevel() and check if the T::OPLEVEL flags
+ * is set on the result.
+ * @code
+ * GtkWidget *toplevel = gtk_widget_get_toplevel (widget);
+ * if (GTK_WIDGET_TOPLEVEL (toplevel))
+ * {
+ * [ Perform action on toplevel. ]
+ * }
+ * @endcode
+ * @return The topmost ancestor of @a widget , or @a widget itself if there's no ancestor.
+ */
+ Container* get_toplevel();
+
+ /** This function returns the topmost widget in the container hierarchy
+ * @a widget is a part of. If @a widget has no parent widgets, it will be
+ * returned as the topmost widget. No reference will be added to the
+ * returned widget; it should not be unreferenced.
+ *
+ * Note the difference in behavior vs. get_ancestor();
+ * <tt>gtk_widget_get_ancestor (widget, GTK_TYPE_WINDOW)</tt>
+ * would return
+ * <tt>0</tt> if @a widget wasn't inside a toplevel window, and if the
+ * window was inside a Gtk::Window-derived widget which was in turn
+ * inside the toplevel Gtk::Window. While the second case may
+ * seem unlikely, it actually happens when a Gtk::Plug is embedded
+ * inside a Gtk::Socket within the same application.
+ *
+ * To reliably find the toplevel Gtk::Window, use
+ * get_toplevel() and check if the T::OPLEVEL flags
+ * is set on the result.
+ * @code
+ * GtkWidget *toplevel = gtk_widget_get_toplevel (widget);
+ * if (GTK_WIDGET_TOPLEVEL (toplevel))
+ * {
+ * [ Perform action on toplevel. ]
+ * }
+ * @endcode
+ * @return The topmost ancestor of @a widget , or @a widget itself if there's no ancestor.
+ */
+ const Container* get_toplevel() const;
+
+
+ /** Gets the first ancestor of @a widget with type @a widget_type . For example,
+ * <tt>gtk_widget_get_ancestor (widget, GTK_TYPE_BOX)</tt> gets the
+ * first Gtk::Box that's
+ * an ancestor of @a widget . No reference will be added to the returned widget;
+ * it should not be unreferenced. See note about checking for a toplevel
+ * Gtk::Window in the docs for get_toplevel().
+ *
+ * Note that unlike is_ancestor(), get_ancestor()
+ * considers @a widget to be an ancestor of itself.
+ * @param widget_type Ancestor type.
+ * @return The ancestor widget, or <tt>0</tt> if not found.
+ */
+ Widget* get_ancestor(GType widget_type);
+
+ /** Gets the first ancestor of @a widget with type @a widget_type . For example,
+ * <tt>gtk_widget_get_ancestor (widget, GTK_TYPE_BOX)</tt> gets the
+ * first Gtk::Box that's
+ * an ancestor of @a widget . No reference will be added to the returned widget;
+ * it should not be unreferenced. See note about checking for a toplevel
+ * Gtk::Window in the docs for get_toplevel().
+ *
+ * Note that unlike is_ancestor(), get_ancestor()
+ * considers @a widget to be an ancestor of itself.
+ * @param widget_type Ancestor type.
+ * @return The ancestor widget, or <tt>0</tt> if not found.
+ */
+ const Widget* get_ancestor(GType widget_type) const;
+
+
+ /** Gets the colormap that will be used to render @a widget . No reference will
+ * be added to the returned colormap; it should not be unreferenced.
+ * @return The colormap used by @a widget .
+ */
+ Glib::RefPtr<Gdk::Colormap> get_colormap();
+
+
+ /** Gets the visual that will be used to render @a widget .
+ * @return The visual for @a widget .
+ */
+ Glib::RefPtr<Gdk::Visual> get_visual();
+
+
+ /** Get the Gdk::Screen from the toplevel window associated with
+ * this widget. This function can only be called after the widget
+ * has been added to a widget hierarchy with a Gtk::Window
+ * at the top.
+ *
+ * In general, you should only create screen specific
+ * resources when a widget has been realized, and you should
+ * free those resources when the widget is unrealized.
+ * @return The Gdk::Screen for the toplevel for this widget.
+ *
+ * Since: 2.2.
+ */
+ Glib::RefPtr<Gdk::Screen> get_screen();
+
+ /** Get the Gdk::Screen from the toplevel window associated with
+ * this widget. This function can only be called after the widget
+ * has been added to a widget hierarchy with a Gtk::Window
+ * at the top.
+ *
+ * In general, you should only create screen specific
+ * resources when a widget has been realized, and you should
+ * free those resources when the widget is unrealized.
+ * @return The Gdk::Screen for the toplevel for this widget.
+ *
+ * Since: 2.2.
+ */
+ Glib::RefPtr<const Gdk::Screen> get_screen() const;
+
+
+ /** Checks whether there is a Gdk::Screen is associated with
+ * this widget. All toplevel widgets have an associated
+ * screen, and all widgets added into a heirarchy with a toplevel
+ * window at the top.
+ * @return <tt>true</tt> if there is a Gdk::Screen associcated
+ * with the widget.
+ *
+ * Since: 2.2.
+ */
+ bool has_screen() const;
+
+
+ /** Get the Gdk::Display for the toplevel window associated with
+ * this widget. This function can only be called after the widget
+ * has been added to a widget hierarchy with a Gtk::Window at the top.
+ *
+ * In general, you should only create display specific
+ * resources when a widget has been realized, and you should
+ * free those resources when the widget is unrealized.
+ * @return The Gdk::Display for the toplevel for this widget.
+ *
+ * Since: 2.2.
+ */
+ Glib::RefPtr<Gdk::Display> get_display();
+
+ /** Get the Gdk::Display for the toplevel window associated with
+ * this widget. This function can only be called after the widget
+ * has been added to a widget hierarchy with a Gtk::Window at the top.
+ *
+ * In general, you should only create display specific
+ * resources when a widget has been realized, and you should
+ * free those resources when the widget is unrealized.
+ * @return The Gdk::Display for the toplevel for this widget.
+ *
+ * Since: 2.2.
+ */
+ Glib::RefPtr<const Gdk::Display> get_display() const;
+
+
+ /** Get the root window where this widget is located. This function can
+ * only be called after the widget has been added to a widget
+ * heirarchy with Gtk::Window at the top.
+ *
+ * The root window is useful for such purposes as creating a popup
+ * Gdk::Window associated with the window. In general, you should only
+ * create display specific resources when a widget has been realized,
+ * and you should free those resources when the widget is unrealized.
+ * @return The Gdk::Window root window for the toplevel for this widget.
+ *
+ * Since: 2.2.
+ */
+ Glib::RefPtr<Gdk::Window> get_root_window();
+
+ /** Get the root window where this widget is located. This function can
+ * only be called after the widget has been added to a widget
+ * heirarchy with Gtk::Window at the top.
+ *
+ * The root window is useful for such purposes as creating a popup
+ * Gdk::Window associated with the window. In general, you should only
+ * create display specific resources when a widget has been realized,
+ * and you should free those resources when the widget is unrealized.
+ * @return The Gdk::Window root window for the toplevel for this widget.
+ *
+ * Since: 2.2.
+ */
+ Glib::RefPtr<const Gdk::Window> get_root_window() const;
+
+
+ /** Gets the settings object holding the settings (global property
+ * settings, RC file information, etc) used for this widget.
+ *
+ * Note that this function can only be called when the Gtk::Widget
+ * is attached to a toplevel, since the settings object is specific
+ * to a particular Gdk::Screen.
+ * @return The relevant Gtk::Settings object.
+ */
+ Glib::RefPtr<Settings> get_settings();
+
+
+ /** Returns the clipboard object for the given selection to
+ * be used with @a widget . @a widget must have a Gdk::Display
+ * associated with it, so must be attached to a toplevel
+ * window.
+ * @param selection A Gdk::Atom which identifies the clipboard
+ * to use. Gdk::SELECTION_CLIPBOARD gives the
+ * default clipboard. Another common value
+ * is Gdk::SELECTION_PRIMARY, which gives
+ * the primary X selection.
+ * @return The appropriate clipboard object. If no
+ * clipboard already exists, a new one will
+ * be created. Once a clipboard object has
+ * been created, it is persistent for all time.
+ *
+ * Since: 2.2.
+ */
+ Glib::RefPtr<Clipboard> get_clipboard(const Glib::ustring& selection);
+
+ /** Returns the clipboard object for the given selection to
+ * be used with @a widget . @a widget must have a Gdk::Display
+ * associated with it, so must be attached to a toplevel
+ * window.
+ * @param selection A Gdk::Atom which identifies the clipboard
+ * to use. Gdk::SELECTION_CLIPBOARD gives the
+ * default clipboard. Another common value
+ * is Gdk::SELECTION_PRIMARY, which gives
+ * the primary X selection.
+ * @return The appropriate clipboard object. If no
+ * clipboard already exists, a new one will
+ * be created. Once a clipboard object has
+ * been created, it is persistent for all time.
+ *
+ * Since: 2.2.
+ */
+ Glib::RefPtr<const Clipboard> get_clipboard(const Glib::ustring& selection) const;
+
+ //TODO: This probably needs a special conversion to do an extra ref (take_copy=true) for the returned instance:
+
+ Glib::RefPtr<Atk::Object> get_accessible();
+
+
+ /** Sets the colormap for the widget to the given value. Widget must not
+ * have been previously realized. This probably should only be used
+ * from an <tt>init()</tt> function (i.e. from the constructor
+ * for the widget).
+ * @param colormap A colormap.
+ */
+ void set_colormap(const Glib::RefPtr<const Gdk::Colormap> &colormap);
+
+ /** Returns the event mask for the widget (a bitfield containing flags
+ * from the Gdk::EventMask enumeration). These are the events that the widget
+ * will receive.
+ * @return Event mask for @a widget .
+ */
+ Gdk::EventMask get_events() const;
+
+ /** Obtains the location of the mouse pointer in widget coordinates.
+ * Widget coordinates are a bit odd; for historical reasons, they are
+ * defined as @a widget -&gt;window coordinates for widgets that are not
+ * Gtk::NO_WINDOW widgets, and are relative to @a widget -&gt;allocation.x,
+ * @a widget -&gt;allocation.y for widgets that are Gtk::NO_WINDOW widgets.
+ * @param x Return location for the X coordinate, or <tt>0</tt>.
+ * @param y Return location for the Y coordinate, or <tt>0</tt>.
+ */
+ void get_pointer(int &x, int &y) const;
+
+ /** Determines whether @a widget is somewhere inside @a ancestor , possibly with
+ * intermediate containers.
+ * @param ancestor Another Gtk::Widget.
+ * @return <tt>true</tt> if @a ancestor contains @a widget as a child, grandchild, great grandchild, etc.
+ */
+ bool is_ancestor(Widget &ancestor) const;
+
+
+ /** Translate coordinates relative to @a src_widget 's allocation to coordinates
+ * relative to @a dest_widget 's allocations. In order to perform this
+ * operation, both widgets must be realized, and must share a common
+ * toplevel.
+ * @param dest_widget A Gtk::Widget.
+ * @param src_x X position relative to @a src_widget .
+ * @param src_y Y position relative to @a src_widget .
+ * @param dest_x Location to store X position relative to @a dest_widget .
+ * @param dest_y Location to store Y position relative to @a dest_widget .
+ * @return <tt>false</tt> if either widget was not realized, or there
+ * was no common ancestor. In this case, nothing is stored in
+ * * @a dest_x and * @a dest_y . Otherwise <tt>true</tt>.
+ */
+ bool translate_coordinates(Widget& dest_widget,
+ int src_x, int src_y,
+ int& dest_x, int& dest_y);
+
+/* STYLE */
+
+ /** Sets the Gtk::Style for a widget ( @a widget -&gt;style). You probably don't
+ * want to use this function; it interacts badly with themes, because
+ * themes work by replacing the Gtk::Style. Instead, use
+ * modify_style().
+ * @param style A Gtk::Style.
+ */
+ void set_style(const Glib::RefPtr<Style>& style);
+ void unset_style();
+
+
+ /** Ensures that @a widget has a style ( @a widget -&gt;style). Not a very useful
+ * function; most of the time, if you want the style, the widget is
+ * realized, and realized widgets are guaranteed to have a style
+ * already.
+ */
+ void ensure_style();
+
+ /** Simply an accessor function that returns @a widget -&gt;style.
+ * @return The widget's Gtk::Style.
+ */
+ Glib::RefPtr<Style> get_style();
+
+ /** Simply an accessor function that returns @a widget -&gt;style.
+ * @return The widget's Gtk::Style.
+ */
+ Glib::RefPtr<const Style> get_style() const;
+
+ /** Modifies style values on the widget. Modifications made using this
+ * technique take precedence over style values set via an RC file,
+ * however, they will be overriden if a style is explicitely set on
+ * the widget using set_style(). The Gtk::RcStyle structure
+ * is designed so each field can either be set or unset, so it is
+ * possible, using this function, to modify some style values and
+ * leave the others unchanged.
+ *
+ * Note that modifications made with this function are not cumulative
+ * with previous calls to modify_style() or with such
+ * functions as modify_fg(). If you wish to retain
+ * previous values, you must first call get_modifier_style(),
+ * make your modifications to the returned style, then call
+ * modify_style() with that style. On the other hand,
+ * if you first call modify_style(), subsequent calls
+ * to such functions modify_fg() will have a cumulative
+ * effect with the initial modifications.
+ * @param style The Gtk::RcStyle holding the style modifications.
+ */
+ void modify_style(const Glib::RefPtr<RcStyle>& style);
+
+ /** Returns the current modifier style for the widget. (As set by
+ * modify_style().) If no style has previously set, a new
+ * Gtk::RcStyle will be created with all values unset, and set as the
+ * modifier style for the widget. If you make changes to this rc
+ * style, you must call modify_style(), passing in the
+ * returned rc style, to make sure that your changes take effect.
+ *
+ * Caution: passing the style back to modify_style() will
+ * normally end up destroying it, because modify_style() copies
+ * the passed-in style and sets the copy as the new modifier style,
+ * thus dropping any reference to the old modifier style. Add a reference
+ * to the modifier style if you want to keep it alive.
+ * @return The modifier style for the widget. This rc style is
+ * owned by the widget. If you want to keep a pointer to value this
+ * around, you must add a refcount using Gtk::RcStyle::ref().
+ */
+ Glib::RefPtr<RcStyle> get_modifier_style();
+
+ /** Returns the current modifier style for the widget. (As set by
+ * modify_style().) If no style has previously set, a new
+ * Gtk::RcStyle will be created with all values unset, and set as the
+ * modifier style for the widget. If you make changes to this rc
+ * style, you must call modify_style(), passing in the
+ * returned rc style, to make sure that your changes take effect.
+ *
+ * Caution: passing the style back to modify_style() will
+ * normally end up destroying it, because modify_style() copies
+ * the passed-in style and sets the copy as the new modifier style,
+ * thus dropping any reference to the old modifier style. Add a reference
+ * to the modifier style if you want to keep it alive.
+ * @return The modifier style for the widget. This rc style is
+ * owned by the widget. If you want to keep a pointer to value this
+ * around, you must add a refcount using Gtk::RcStyle::ref().
+ */
+ Glib::RefPtr<const RcStyle> get_modifier_style() const;
+
+ // we need custom documentation because modify_* can take a NULL pointer
+ // (which we wrap with unset_*)
+ /** Sets the foreground color for a widget in a particular state.
+ * All other style values are left untouched. See also modify_style() and
+ * unset_fg().
+ *
+ * @param state The state for which to set the foreground color.
+ * @param color The color to assign (does not need to be allocated).
+ */
+
+ /** Sets the foreground color for a widget in a particular state. All
+ * other style values are left untouched. See also
+ * modify_style().
+ * @param state The state for which to set the foreground color.
+ * @param color The color to assign (does not need to be allocated).
+ */
+ void modify_fg(StateType state, const Gdk::Color& color);
+
+
+ /** Sets the background color for a widget in a particular state.
+ * All other style values are left untouched. See also modify_style() and
+ * unset_bg().
+ *
+ * @param state The state for which to set the background color.
+ * @param color The color to assign (does not need to be allocated).
+ */
+
+ /** Sets the background color for a widget in a particular state. All
+ * other style values are left untouched. See also
+ * modify_style().
+ * @param state The state for which to set the background color.
+ * @param color The color to assign (does not need to be allocated).
+ */
+ void modify_bg(StateType state, const Gdk::Color& color);
+
+ // TODO: Document this, and perhaps add unset_bg_pixmap
+ void modify_bg_pixmap(StateType state, const Glib::ustring& pixmap_name);
+
+ /** Sets the text color for a widget in a particular state.
+ * All other style values are left untouched. The text color is the
+ * foreground color used along with the base color (see modify_base() ) for
+ * widgets such as Gtk::Entry and Gtk::TextView. See also modify_style() and
+ * unset_text().
+ *
+ * @param state The state for which to set the text color.
+ * @param color The color to assign (does not need to be allocated).
+ */
+
+ /** Sets the text color for a widget in a particular state. All other
+ * style values are left untouched. The text color is the foreground
+ * color used along with the base color (see modify_base())
+ * for widgets such as Gtk::Entry and Gtk::TextView. See also
+ * modify_style().
+ * @param state The state for which to set the text color.
+ * @param color The color to assign (does not need to be allocated).
+ */
+ void modify_text(StateType state, const Gdk::Color& color);
+
+ /** Sets the base color for a widget in a particular state.
+ * All other style values are left untouched. The base color is the
+ * background color used along with the text color (see modify_text() ) for
+ * widgets such as Gtk::Entry and Gtk::TextView. See also modify_style() and
+ * unset_base().
+ *
+ * @param state The state for which to set the text color.
+ * @param color The color to assign (does not need to be allocated).
+ */
+
+ /** Sets the base color for a widget in a particular state.
+ * All other style values are left untouched. The base color
+ * is the background color used along with the text color
+ * (see modify_text()) for widgets such as Gtk::Entry
+ * and Gtk::TextView. See also modify_style().
+ * @param state The state for which to set the base color.
+ * @param color The color to assign (does not need to be allocated).
+ */
+ void modify_base(StateType state, const Gdk::Color& color);
+
+ /** Sets the font to use for a widget.
+ * All other style values are left untouched. See also modify_style() and
+ * unset_font().
+ */
+
+ /** Sets the font to use for a widget. All other style values are left
+ * untouched. See also modify_style().
+ * @param font_desc The font description to use.
+ */
+ void modify_font(const Pango::FontDescription& font_desc);
+
+ /** Undo the effect of previous calls to modify_fg() for a particular state.
+ * All other style values are left untouched. See also modify_style().
+ */
+ void unset_fg(StateType state);
+
+ /** Undo the effect of previous calls to modify_bg() for a particular state.
+ * All other style values are left untouched. See also modify_style().
+ */
+ void unset_bg(StateType state);
+
+ /** Undo the effect of previous calls to modify_text() for a particular state.
+ * All other style values are left untouched. See also modify_style().
+ */
+ void unset_text(StateType state);
+
+ /** Undo the effect of previous calls to modify_base() for a particular state.
+ * All other style values are left untouched. See also modify_style().
+ */
+ void unset_base(StateType state);
+
+ /** Undo the effect of previous calls to modify_font() for a particular state.
+ * All other style values are left untouched. See also modify_style().
+ */
+ void unset_font();
+
+ //The parameter name is "the_property_name" to avoid a warning because there is a method with the "property_name" name.
+ template <class PropertyType>
+ void get_style_property(const Glib::ustring& the_property_name, PropertyType& value) const;
+
+
+ /** Creates a new Pango::Context with the appropriate colormap,
+ * font description, and base direction for drawing text for
+ * this widget. See also get_pango_context().
+ * @return The new Pango::Context.
+ */
+ Glib::RefPtr<Pango::Context> create_pango_context();
+
+ /** Gets a Pango::Context with the appropriate colormap, font description
+ * and base direction for this widget. Unlike the context returned
+ * by create_pango_context(), this context is owned by
+ * the widget (it can be used until the screen for the widget changes
+ * or the widget is removed from its toplevel), and will be updated to
+ * match any changes to the widget's attributes.
+ *
+ * If you create and keep a Pango::Layout using this context, you must
+ * deal with changes to the context by calling pango_layout_context_changed()
+ * on the layout in response to the ::style-set and ::direction-changed signals
+ * for the widget.
+ * @return The Pango::Context for the widget.
+ */
+ Glib::RefPtr<Pango::Context> get_pango_context();
+
+ /** Creates a new Pango::Layout with the appropriate colormap,
+ * font description, and base direction for drawing text for
+ * this widget.
+ *
+ * If you keep a Pango::Layout created in this way around, in order
+ * notify the layout of changes to the base direction or font of this
+ * widget, you must call pango_layout_context_changed() in response to
+ * the ::style-set and ::direction-changed signals for the widget.
+ * @param text Text to set on the layout (can be <tt>0</tt>).
+ * @return The new Pango::Layout.
+ */
+ Glib::RefPtr<Pango::Layout> create_pango_layout(const Glib::ustring& text);
+
+
+ /** A convenience function that uses the theme engine and RC file
+ * settings for @a widget to look up @a stock_id and render it to
+ * a pixbuf. @a stock_id should be a stock icon ID such as
+ * Gtk::STOCK_OPEN or Gtk::STOCK_OK. @a size should be a size
+ * such as Gtk::ICON_SIZE_MENU. @a detail should be a string that
+ * identifies the widget or code doing the rendering, so that
+ * theme engines can special-case rendering for that widget or code.
+ *
+ * The pixels in the returned Gdk::Pixbuf are shared with the rest of
+ * the application and should not be modified. The pixbuf should be freed
+ * after use with Glib::object_unref().
+ * @param stock_id A stock ID.
+ * @param size A stock size. A size of (GtkIconSize)-1 means render at
+ * the size of the source and don't scale (if there are multiple
+ * source sizes, GTK+ picks one of the available sizes).
+ * @param detail Render detail to pass to theme engine.
+ * @return A new pixbuf, or <tt>0</tt> if the stock ID wasn't known.
+ */
+ Glib::RefPtr<Gdk::Pixbuf> render_icon(const StockID& stock_id, IconSize size, const Glib::ustring& detail = Glib::ustring());
+
+
+ /** Sets a widgets composite name. The widget must be
+ * a composite child of its parent; see push_composite_child().
+ * @param name The name to set.
+ */
+ void set_composite_name(const Glib::ustring& name);
+ void unset_composite_name();
+
+ /** Obtains the composite name of a widget.
+ * @return The composite name of @a widget , or <tt>0</tt> if @a widget is not
+ * a composite child. The string should not be freed when it is no
+ * longer needed.
+ */
+ Glib::ustring get_composite_name() const;
+
+
+ void reset_rc_styles();
+
+
+ // PUSH/POP - these are used to create widgets. Hidden arguments to override the defaults.
+
+ /** Pushes @a cmap onto a global stack of colormaps; the topmost
+ * colormap on the stack will be used to create all widgets.
+ * Remove @a cmap with pop_colormap(). There's little
+ * reason to use this function.
+ * @param cmap A Gdk::Colormap.
+ */
+ static void push_colormap(const Glib::RefPtr<const Gdk::Colormap>& cmap);
+
+ /** Removes a colormap pushed with push_colormap().
+ */
+ static void pop_colormap();
+
+
+ /** Makes all newly-created widgets as composite children until
+ * the corresponding pop_composite_child() call.
+ *
+ * A composite child is a child that's an implementation detail of the
+ * container it's inside and should not be visible to people using the
+ * container. Composite children aren't treated differently by GTK (but
+ * see Gtk::Container::foreach() vs. Gtk::Container::forall()), but e.g. GUI
+ * builders might want to treat them in a different way.
+ *
+ * Here is a simple example:
+ * @code
+ * gtk_widget_push_composite_child (&lt;!-- --&gt;);
+ * scrolled_window->hscrollbar = gtk_hscrollbar_new (hadjustment);
+ * gtk_widget_set_composite_name (scrolled_window->hscrollbar, "hscrollbar");
+ * gtk_widget_pop_composite_child (&lt;!-- --&gt;);
+ * gtk_widget_set_parent (scrolled_window->hscrollbar,
+ * GTK_WIDGET (scrolled_window));
+ * g_object_ref (scrolled_window->hscrollbar);
+ * @endcode
+ */
+ static void push_composite_child();
+
+ /** Cancels the effect of a previous call to push_composite_child().
+ */
+ static void pop_composite_child();
+
+
+/* DEFAULTS */
+
+
+ /** Sets the default colormap to use when creating widgets.
+ * push_colormap() is a better function to use if
+ * you only want to affect a few widgets, rather than all widgets.
+ * @param colormap A Gdk::Colormap.
+ */
+ static void set_default_colormap(const Glib::RefPtr<const Gdk::Colormap>& colormap);
+
+ /** Returns the default style used by all widgets initially.
+ * @return The default style. This Gtk::Style object is owned by GTK+ and
+ * should not be modified or freed.
+ */
+ static Glib::RefPtr<Style> get_default_style();
+
+ /** Obtains the default colormap used to create widgets.
+ * @return Default widget colormap.
+ */
+ static Glib::RefPtr<Gdk::Colormap> get_default_colormap();
+
+ /** Obtains the visual of the default colormap. Not really useful;
+ * used to be useful before gdk_colormap_get_visual() existed.
+ * @return Visual of the default colormap.
+ */
+ static Glib::RefPtr<Gdk::Visual> get_default_visual();
+
+
+/* Directionality of Text */
+
+
+ /** Sets the reading direction on a particular widget. This direction
+ * controls the primary direction for widgets containing text,
+ * and also the direction in which the children of a container are
+ * packed. The ability to set the direction is present in order
+ * so that correct localization into languages with right-to-left
+ * reading directions can be done. Generally, applications will
+ * let the default reading direction present, except for containers
+ * where the containers are arranged in an order that is explicitely
+ * visual rather than logical (such as buttons for text justification).
+ *
+ * If the direction is set to Gtk::TEXT_DIR_NONE, then the value
+ * set by set_default_direction() will be used.
+ * @param dir The new direction.
+ */
+ void set_direction(TextDirection dir);
+
+ /** Gets the reading direction for a particular widget. See
+ * set_direction().
+ * @return The reading direction for the widget.
+ */
+ TextDirection get_direction();
+
+ /** Sets the default reading direction for widgets where the
+ * direction has not been explicitly set by set_direction().
+ * @param dir The new default direction. This cannot be
+ * Gtk::TEXT_DIR_NONE.
+ */
+ static void set_default_direction(TextDirection dir);
+
+ /** Obtains the current default reading direction. See
+ * set_default_direction().
+ * @return The current default direction.
+ */
+ static TextDirection get_default_direction();
+
+
+/* Shape masking */
+
+ /** Sets a shape for this widget's GDK window. This allows for
+ * transparent windows etc., see gdk_window_shape_combine_mask()
+ * for more information.
+ * @param shape_mask Shape to be added.
+ * @param offset_x X position of shape mask with respect to @a window .
+ * @param offset_y Y position of shape mask with respect to @a window .
+ */
+ void shape_combine_mask(const Glib::RefPtr<const Gdk::Bitmap>& shape_mask, int offset_x, int offset_y);
+ void unset_shape_combine_mask();
+
+
+ // must be realized
+
+ /** Recursively resets the shape on this widget and its descendants.
+ */
+ void reset_shapes();
+
+/* Paths */
+ /// Compute a widget's path of the form "GtkWindow.MyLabel"
+ void path(Glib::ustring& path, Glib::ustring& path_reversed);
+ void class_path(Glib::ustring& path, Glib::ustring& path_reversed);
+
+
+ /** Returns a newly allocated list of the widgets, normally labels, for
+ * which this widget is a the target of a mnemonic (see for example,
+ * Gtk::Label::set_mnemonic_widget()).
+ *
+ * The widgets in the list are not individually referenced. If you
+ * want to iterate through the list and perform actions involving
+ * callbacks that might destroy the widgets, you
+ * <em>must</em> call <tt>g_list_foreach (result,
+ * (GFunc)g_object_ref, <tt>0</tt>)</tt> first, and then unref all the
+ * widgets afterwards.
+ * @return The list of mnemonic labels; free this list
+ * with Glib::list_free() when you are done with it.
+ *
+ * Since: 2.4.
+ */
+ Glib::ListHandle<Widget*> list_mnemonic_labels();
+
+ /** Returns a newly allocated list of the widgets, normally labels, for
+ * which this widget is a the target of a mnemonic (see for example,
+ * Gtk::Label::set_mnemonic_widget()).
+ *
+ * The widgets in the list are not individually referenced. If you
+ * want to iterate through the list and perform actions involving
+ * callbacks that might destroy the widgets, you
+ * <em>must</em> call <tt>g_list_foreach (result,
+ * (GFunc)g_object_ref, <tt>0</tt>)</tt> first, and then unref all the
+ * widgets afterwards.
+ * @return The list of mnemonic labels; free this list
+ * with Glib::list_free() when you are done with it.
+ *
+ * Since: 2.4.
+ */
+ Glib::ListHandle<const Widget*> list_mnemonic_labels() const;
+
+ /** Adds a widget to the list of mnemonic labels for
+ * this widget. (See list_mnemonic_labels()). Note the
+ * list of mnemonic labels for the widget is cleared when the
+ * widget is destroyed, so the caller must make sure to update
+ * it's internal state at this point as well, by using a connection
+ * to the ::destroy signal or a weak notifier.
+ *
+ * Since: 2.4
+ * @param label A Gtk::Widget that acts as a mnemonic label for @a widget .
+ */
+ void add_mnemonic_label(Widget& label);
+
+ /** Removes a widget from the list of mnemonic labels for
+ * this widget. (See list_mnemonic_labels()). The widget
+ * must have previously been added to the list with
+ * add_mnemonic_label().
+ *
+ * Since: 2.4
+ * @param label A Gtk::Widget that was previously set as a mnemnic label for
+ * @a widget with add_mnemonic_label().
+ */
+ void remove_mnemonic_label(Widget& label);
+
+
+ //TODO: Should drag_get_data() be const?
+
+ void drag_get_data(const Glib::RefPtr<Gdk::DragContext>& context, Glib::ustring& target, guint32 time);
+
+ void drag_highlight();
+
+ void drag_unhighlight();
+
+ void drag_dest_set(DestDefaults flags = DestDefaults(0), Gdk::DragAction actions = Gdk::DragAction(0));
+ void drag_dest_set(const ArrayHandle_TargetEntry& targets, DestDefaults flags = DEST_DEFAULT_ALL, Gdk::DragAction actions = Gdk::ACTION_COPY);
+
+
+ void drag_dest_set_proxy(const Glib::RefPtr<Gdk::Window>& proxy_window, Gdk::DragProtocol protocol, bool use_coordinates);
+
+ void drag_dest_unset();
+
+ /** Looks for a match between @a context -&gt;targets and the
+ * @a dest_target_list , returning the first matching target, otherwise
+ * returning Gdk::NONE. @a dest_target_list should usually be the return
+ * value from gtk_drag_dest_get_target_list(), but some widgets may
+ * have different valid targets for different parts of the widget; in
+ * that case, they will have to implement a drag_motion handler that
+ * passes the correct target list to this function.
+ * @param context Drag context.
+ * @param target_list List of droppable targets.
+ * @return First target that the source offers and the dest can accept, or Gdk::NONE.
+ */
+ Glib::ustring drag_dest_find_target(const Glib::RefPtr<Gdk::DragContext>& context, const Glib::RefPtr<TargetList>& target_list) const;
+ Glib::ustring drag_dest_find_target(const Glib::RefPtr<Gdk::DragContext>& context) const;
+
+
+ /** Returns the list of targets this widget can accept from
+ * drag-and-drop.
+ * @return The Gtk::TargetList, or <tt>0</tt> if none.
+ */
+ Glib::RefPtr<TargetList> drag_dest_get_target_list();
+
+ /** Returns the list of targets this widget can accept from
+ * drag-and-drop.
+ * @return The Gtk::TargetList, or <tt>0</tt> if none.
+ */
+ Glib::RefPtr<const TargetList> drag_dest_get_target_list() const;
+
+ /** Sets the target types that this widget can accept from drag-and-drop.
+ * The widget must first be made into a drag destination with
+ * gtk_drag_dest_set().
+ * @param target_list List of droppable targets, or <tt>0</tt> for none.
+ */
+ void drag_dest_set_target_list(const Glib::RefPtr<TargetList>& target_list);
+
+
+ /** Add the text targets supported by Gtk::Selection to
+ * the target list of the drag destination. The targets
+ * are added with @a info = 0. If you need another value,
+ * use gtk_target_list_add_text_targets() and
+ * gtk_drag_dest_set_target_list().
+ *
+ * Since: 2.6
+ * @param widget A Gtk::Widget that's a drag destination.
+ */
+ void drag_dest_add_text_targets();
+
+ /** Add the image targets supported by Gtk::Selection to
+ * the target list of the drag destination. The targets
+ * are added with @a info = 0. If you need another value,
+ * use gtk_target_list_add_image_targets() and
+ * gtk_drag_dest_set_target_list().
+ *
+ * Since: 2.6
+ * @param widget A Gtk::Widget that's a drag destination.
+ */
+ void drag_dest_add_image_targets();
+
+ /** Add the URI targets supported by Gtk::Selection to
+ * the target list of the drag destination. The targets
+ * are added with @a info = 0. If you need another value,
+ * use gtk_target_list_add_uri_targets() and
+ * gtk_drag_dest_set_target_list().
+ *
+ * Since: 2.6
+ * @param widget A Gtk::Widget that's a drag destination.
+ */
+ void drag_dest_add_uri_targets();
+
+ void drag_source_set(const ArrayHandle_TargetEntry& targets, Gdk::ModifierType start_button_mask = Gdk::MODIFIER_MASK, Gdk::DragAction actions = Gdk::ACTION_COPY);
+
+
+ void drag_source_unset();
+
+
+ /** Sets the icon that will be used for drags from a particular widget
+ * from a pixmap/mask. GTK+ retains references for the arguments, and
+ * will release them when they are no longer needed.
+ * Use gtk_drag_source_set_icon_pixbuf() instead.
+ * @param colormap The colormap of the icon.
+ * @param pixmap The image data for the icon.
+ * @param mask The transparency mask for an image.
+ */
+ void drag_source_set_icon(const Glib::RefPtr<Gdk::Colormap>& colormap, const Glib::RefPtr<Gdk::Pixmap>& pixmap, const Glib::RefPtr<Gdk::Bitmap>& mask);
+
+ /** Sets the icon that will be used for drags from a particular widget
+ * from a Gdk::Pixbuf. GTK+ retains a reference for @a pixbuf and will
+ * release it when it is no longer needed.
+ * @param pixbuf The Gdk::Pixbuf for the drag icon.
+ */
+ void drag_source_set_icon(const Glib::RefPtr<Gdk::Pixbuf>& pixbuf);
+
+ /** Sets the icon that will be used for drags from a particular source
+ * to a stock icon.
+ * @param stock_id The ID of the stock icon to use.
+ */
+ void drag_source_set_icon(const StockID& stock_id);
+
+
+ /** Add the text targets supported by Gtk::Selection to
+ * the target list of the drag source. The targets
+ * are added with @a info = 0. If you need another value,
+ * use gtk_target_list_add_text_targets() and
+ * gtk_drag_source_set_target_list().
+ *
+ * Since: 2.6
+ * @param widget A Gtk::Widget that's is a drag source.
+ */
+ void drag_source_add_text_targets();
+
+ /** Add the URI targets supported by Gtk::Selection to
+ * the target list of the drag source. The targets
+ * are added with @a info = 0. If you need another value,
+ * use gtk_target_list_add_uri_targets() and
+ * gtk_drag_source_set_target_list().
+ *
+ * Since: 2.6
+ * @param widget A Gtk::Widget that's is a drag source.
+ */
+ void drag_source_add_uri_targets();
+
+ /** Add the writable image targets supported by Gtk::Selection to
+ * the target list of the drag source. The targets
+ * are added with @a info = 0. If you need another value,
+ * use gtk_target_list_add_image_targets() and
+ * gtk_drag_source_set_target_list().
+ *
+ * Since: 2.6
+ * @param widget A Gtk::Widget that's is a drag source.
+ */
+ void drag_source_add_image_targets();
+
+
+ /** Initiates a drag on the source side. The function
+ * only needs to be used when the application is
+ * starting drags itself, and is not needed when
+ * gtk_drag_source_set() is used.
+ * @param targets The targets (data formats) in which the
+ * source can provide the data.
+ * @param actions A bitmask of the allowed drag actions for this drag.
+ * @param button The button the user clicked to start the drag.
+ * @param event The event that triggered the start of the drag.
+ * @return The context for this drag.
+ */
+ Glib::RefPtr<Gdk::DragContext> drag_begin(const Glib::RefPtr<TargetList>& targets, Gdk::DragAction actions, int button, GdkEvent* event);
+
+ /** Checks to see if a mouse drag starting at ( @a start_x , @a start_y ) and ending
+ * at ( @a current_x , @a current_y ) has passed the GTK+ drag threshold, and thus
+ * should trigger the beginning of a drag-and-drop operation.
+ * @param start_x X coordinate of start of drag.
+ * @param start_y Y coordinate of start of drag.
+ * @param current_x Current X coordinate.
+ * @param current_y Current Y coordinate.
+ * @return <tt>true</tt> if the drag threshold has been passed.
+ */
+ bool drag_check_threshold(int start_x, int start_y, int current_x, int current_y);
+
+
+ //These should be a method of Gdk::DragContext, but gdkmm can't depend on gtkmm.
+ static Widget* drag_get_source_widget(const Glib::RefPtr<Gdk::DragContext>& context);
+ void drag_set_as_icon(const Glib::RefPtr<Gdk::DragContext>& context, int hot_x, int hot_y);
+
+
+ /** This function works like queue_resize(), except that the
+ * widget is not invalidated.
+ *
+ * Since: 2.4
+ */
+ void queue_resize_no_redraw();
+
+ /** Returns the current value of the "no_show_all" property, which determines
+ * whether calls to show_all() and hide_all()
+ * will affect this widget.
+ * @return The current value of the "no_show_all" property.
+ *
+ * Since: 2.4.
+ */
+ bool get_no_show_all() const;
+
+ /** Sets the "no_show_all" property, which determines whether calls to
+ * show_all() and hide_all() will affect this widget.
+ *
+ * This is mostly for use in constructing widget hierarchies with externally
+ * controlled visibility, see Gtk::UIManager.
+ *
+ * Since: 2.4
+ * @param no_show_all The new value for the "no_show_all" property.
+ */
+ void set_no_show_all(bool no_show_all = true);
+
+ //Used when implementing containers:
+
+ /** This function is useful only when implementing subclasses of Gtk::Container.
+ * Sets the container as the parent of @a widget , and takes care of
+ * some details such as updating the state and style of the child
+ * to reflect its new location. The opposite function is
+ * unparent().
+ * @param parent Parent container.
+ */
+ void set_parent(Widget& parent);
+
+ /** This function is only for use in widget implementations.
+ * Should be called by implementations of the remove method
+ * on Gtk::Container, to dissociate a child from the container.
+ */
+ void unparent();
+
+ void draw_insertion_cursor(Glib::RefPtr<Gdk::Drawable> drawable, const Gdk::Rectangle& area, const Gdk::Rectangle& location, bool is_primary, TextDirection direction, bool draw_arrow = true);
+
+
+ /* FLAGS */
+
+ //: Returns property {flags.toplevel}.
+ bool is_toplevel() const;
+
+ //: Returns property {flags.nowindow}.
+ bool has_no_window() const;
+
+ //: Returns property {flags.realized}.
+ bool is_realized() const;
+
+ //: Returns property {flags.mapped}.
+ bool is_mapped() const;
+
+ //: Returns property {flags.visible}.
+ bool is_visible() const;
+
+ //: Returns if the widget is ready to be drawn to.
+ // Checks to see if the widget is both visible and mapped which
+ // makes it possible to perform drawing commands on.
+ bool is_drawable() const;
+
+ //: Returns property {flags.sensitive}. You might want to check
+ // is_sensitive instead.
+ bool sensitive() const;
+
+ bool parent_sensitive() const;
+ bool is_sensitive() const;
+ bool can_focus() const;
+ bool has_focus() const;
+ bool can_default() const;
+ bool has_default() const;
+ bool has_grab() const;
+ bool rc_style() const;
+ bool is_composite_child() const;
+ bool app_paintable() const;
+ bool receives_default() const;
+ bool double_buffered() const;
+
+ WidgetFlags get_flags() const;
+ void set_flags(WidgetFlags flags);
+ void unset_flags(WidgetFlags flags);
+
+ int get_width() const;
+ int get_height() const;
+
+ Gtk::StateType get_state() const;
+ Gtk::StateType get_saved_state() const;
+ Requisition get_requisition() const;
+ Allocation get_allocation() const;
+ Glib::RefPtr<Gdk::Window> get_window();
+ Glib::RefPtr<const Gdk::Window> get_window() const;
+
+
+ Glib::SignalProxy0< void > signal_show();
+
+
+ Glib::SignalProxy0< void > signal_hide();
+
+
+ //: Emitted on mapping of a widget to the screen.
+ //- See {flags.mapped}.
+
+
+ Glib::SignalProxy0< void > signal_map();
+
+
+ //- See {flags.mapped}.
+
+
+ Glib::SignalProxy0< void > signal_unmap();
+
+
+ //: Emitted on realization of a widget.
+ //- See {flags.realized}. This is also responsible for
+ //- setting {flags.realized} when it is done. Therefore,
+ //- when overriding the impl method, you should call the
+ //- default realize method.
+
+
+ Glib::SignalProxy0< void > signal_realize();
+
+
+ //- See {flags.realized}. This should not be called by the user.
+ //__WRAP(meth|sig|impl,void unrealize_(),gtk_widget_unrealize,"unrealize")
+
+
+ Glib::SignalProxy0< void > signal_unrealize();
+
+
+ Glib::SignalProxy1< void,Requisition* > signal_size_request();
+
+
+ Glib::SignalProxy1< void,Allocation& > signal_size_allocate();
+
+
+// Changed signals -- inform widget of internal changes.
+// We rename parent_set => parent_changed
+// and style_set => style_changed
+// to avoid confusion with set_parent and set_style.
+
+ //: Informs objects that their state has changed.
+ //- The old state is passed as the argument.
+
+
+ Glib::SignalProxy1< void,Gtk::StateType > signal_state_changed();
+
+
+ //: Informs objects that their parent changed.
+ //- The widget passed is the former parent, which may be 0 if
+ //- there was no parent. (was parent_set in GTK+)
+
+
+ Glib::SignalProxy1< void,Widget* > signal_parent_changed();
+
+
+ Glib::SignalProxy1< void,Widget* > signal_hierarchy_changed();
+
+
+ //: Informs objects that their style has been changed.
+ //- The former style is passed as the argument. (was style_set in gtk+)
+
+
+ Glib::SignalProxy1< void,const Glib::RefPtr<Style>& > signal_style_changed();
+
+
+ Glib::SignalProxy1< void,TextDirection > signal_direction_changed();
+
+
+ Glib::SignalProxy1< void,bool > signal_grab_notify();
+
+
+ Glib::SignalProxy1< void,GParamSpec* > signal_child_notify();
+
+
+ //_WRAP_SIGNAL(void add_accelerator(guint, GtkAccelGroup*, guint accel_key, Gdk::ModifierType, AccelFlags), "add-accelerator")
+ //_WRAP_SIGNAL(void remove_accelerator(GtkAccelGroup* accel_group, guint, Gdk::ModifierType), "remove-accelerator")
+
+
+ Glib::SignalProxy1< bool,bool > signal_mnemonic_activate();
+
+
+ Glib::SignalProxy0< void > signal_grab_focus();
+
+
+ Glib::SignalProxy1< bool,DirectionType > signal_focus();
+
+
+ Glib::SignalProxy1< bool,GdkEvent* > signal_event();
+
+
+ Glib::SignalProxy1< void,GdkEvent* > signal_event_after();
+
+
+ //: Event triggered by user pressing button.
+
+
+ Glib::SignalProxy1< bool,GdkEventButton* > signal_button_press_event();
+
+
+ //: Event triggered by user releasing button.
+
+
+ Glib::SignalProxy1< bool,GdkEventButton* > signal_button_release_event();
+
+
+ Glib::SignalProxy1< bool,GdkEventScroll* > signal_scroll_event();
+
+
+ //: Event triggered by user moving pointer.
+
+
+ Glib::SignalProxy1< bool,GdkEventMotion* > signal_motion_notify_event();
+
+
+ //: Event triggered by window being closed.
+
+
+ Glib::SignalProxy1< bool,GdkEventAny* > signal_delete_event();
+
+
+ //: Event triggered by window requiring a refresh.
+ //- Expose events cover a rectangular area that was covered
+ //- or obscured by another window. That area is now exposed
+ //- and thus is needs to be redrawn.
+ //-
+ //- If the application is not capable of redrawing sections
+ //- it should watch the count field and only draw on the last
+ //- even indicated. This is important for things such as
+ //- Gtk::DrawingArea.
+
+
+ Glib::SignalProxy1< bool,GdkEventExpose* > signal_expose_event();
+
+
+ //: Event triggered by a key press will widget has focus.
+
+
+ Glib::SignalProxy1< bool,GdkEventKey* > signal_key_press_event();
+
+
+ //: Event triggered by a key release will widget has focus.
+
+
+ Glib::SignalProxy1< bool,GdkEventKey* > signal_key_release_event();
+
+
+ //: Event triggered by pointer entering widget area.
+
+
+ Glib::SignalProxy1< bool,GdkEventCrossing* > signal_enter_notify_event();
+
+
+ //: Event triggered by pointer leaving widget area.
+
+
+ Glib::SignalProxy1< bool,GdkEventCrossing* > signal_leave_notify_event();
+
+
+ //: Event triggered by a window resizing.
+
+
+ Glib::SignalProxy1< bool,GdkEventConfigure* > signal_configure_event();
+
+
+ Glib::SignalProxy1< bool,GdkEventFocus* > signal_focus_in_event();
+
+
+ Glib::SignalProxy1< bool,GdkEventFocus* > signal_focus_out_event();
+
+
+ Glib::SignalProxy1< bool,GdkEventAny* > signal_map_event();
+
+
+ Glib::SignalProxy1< bool,GdkEventAny* > signal_unmap_event();
+
+
+ Glib::SignalProxy1< bool,GdkEventProperty* > signal_property_notify_event();
+
+
+ Glib::SignalProxy1< bool,GdkEventSelection* > signal_selection_clear_event();
+
+
+ Glib::SignalProxy1< bool,GdkEventSelection* > signal_selection_request_event();
+
+
+ Glib::SignalProxy1< bool,GdkEventSelection* > signal_selection_notify_event();
+
+
+ Glib::SignalProxy1< bool,GdkEventProximity* > signal_proximity_in_event();
+
+
+ Glib::SignalProxy1< bool,GdkEventProximity* > signal_proximity_out_event();
+
+
+ Glib::SignalProxy1< bool,GdkEventVisibility* > signal_visibility_notify_event();
+
+
+ Glib::SignalProxy1< bool,GdkEventClient* > signal_client_event();
+
+
+ Glib::SignalProxy1< bool,GdkEventAny* > signal_no_expose_event();
+
+
+ Glib::SignalProxy1< bool,GdkEventWindowState* > signal_window_state_event();
+
+
+ //We use the optional custom_c_callback parameter with _WRAP_SIGNAL() for some of these,
+ //so that we can write special code to wrap the non-const SelectioData& output parameters:
+
+
+ Glib::SignalProxy3< void,SelectionData&,guint,guint > signal_selection_get();
+
+
+ Glib::SignalProxy2< void,const SelectionData&,guint > signal_selection_received();
+
+
+ Glib::SignalProxy1< void,const Glib::RefPtr<Gdk::DragContext>& > signal_drag_begin();
+
+
+ Glib::SignalProxy1< void,const Glib::RefPtr<Gdk::DragContext>& > signal_drag_end();
+
+
+ Glib::SignalProxy4< void,const Glib::RefPtr<Gdk::DragContext>&,SelectionData&,guint,guint > signal_drag_data_get();
+
+
+ Glib::SignalProxy1< void,const Glib::RefPtr<Gdk::DragContext>& > signal_drag_data_delete();
+
+
+ Glib::SignalProxy2< void,const Glib::RefPtr<Gdk::DragContext>&,guint > signal_drag_leave();
+
+
+ Glib::SignalProxy4< bool,const Glib::RefPtr<Gdk::DragContext>&,int,int,guint > signal_drag_motion();
+
+
+ Glib::SignalProxy4< bool,const Glib::RefPtr<Gdk::DragContext>&,int,int,guint > signal_drag_drop();
+
+
+ Glib::SignalProxy6< void,const Glib::RefPtr<Gdk::DragContext>&,int,int,const SelectionData&,guint,guint > signal_drag_data_received();
+
+
+ //accessibility signals:
+
+
+ Glib::SignalProxy0< Glib::RefPtr<Atk::Object> > signal_get_accessible();
+
+
+ Glib::SignalProxy1< void,const Glib::RefPtr<Gdk::Screen>& > signal_screen_changed();
+
+
+//TODO: The signal_id is very C-like here:
+ //_WRAP_SIGNAL(bool can_activate_accel(guint signal_id), "can_activate_accel")
+
+ //Keybinding signals:
+
+
+ /** The name of the widget.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_name() ;
+
+/** The name of the widget.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_name() const;
+
+ /** The parent widget of this widget. Must be a Container widget.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Container*> property_parent() ;
+
+/** The parent widget of this widget. Must be a Container widget.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Container*> property_parent() const;
+
+ /** Override for width request of the widget
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_width_request() ;
+
+/** Override for width request of the widget
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_width_request() const;
+
+ /** Override for height request of the widget
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_height_request() ;
+
+/** Override for height request of the widget
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_height_request() const;
+
+ /** Whether the widget is visible.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_visible() ;
+
+/** Whether the widget is visible.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_visible() const;
+
+ /** Whether the widget responds to input.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_sensitive() ;
+
+/** Whether the widget responds to input.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_sensitive() const;
+
+ /** Whether the application will paint directly on the widget.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_app_paintable() ;
+
+/** Whether the application will paint directly on the widget.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_app_paintable() const;
+
+ /** Whether the widget can accept the input focus.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_can_focus() ;
+
+/** Whether the widget can accept the input focus.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_can_focus() const;
+
+ /** Whether the widget has the input focus.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_has_focus() ;
+
+/** Whether the widget has the input focus.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_has_focus() const;
+
+ /** Whether the widget can be the default widget.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_can_default() ;
+
+/** Whether the widget can be the default widget.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_can_default() const;
+
+ /** Whether the widget is the default widget.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_has_default() ;
+
+/** Whether the widget is the default widget.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_has_default() const;
+
+ /** If TRUE
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_receives_default() ;
+
+/** If TRUE
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_receives_default() const;
+
+ /** Whether the widget is part of a composite widget.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_composite_child() const;
+
+
+ /** The style of the widget
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy< Glib::RefPtr<Style> > property_style() ;
+
+/** The style of the widget
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Style> > property_style() const;
+
+ /** The event mask that decides what kind of GdkEvents this widget gets.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Gdk::EventMask> property_events() ;
+
+/** The event mask that decides what kind of GdkEvents this widget gets.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Gdk::EventMask> property_events() const;
+
+ /** The mask that decides what kind of extension events this widget gets.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Gdk::ExtensionMode> property_extension_events() ;
+
+/** The mask that decides what kind of extension events this widget gets.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Gdk::ExtensionMode> property_extension_events() const;
+
+
+protected:
+ //comment in GTK+ header: "seldomly overidden"
+ virtual void dispatch_child_properties_changed_vfunc(guint p1, GParamSpec** p2);
+
+ virtual void show_all_vfunc();
+ virtual void hide_all_vfunc();
+
+ virtual Glib::RefPtr<Atk::Object> get_accessible_vfunc();
+
+
+protected:
+ Widget();
+
+
+ /** This function is only for use in widget implementations. Causes
+ * a widget to be mapped if it isn't already.
+ */
+ void map();
+
+ /** This function is only for use in widget implementations. Causes
+ * a widget to be unmapped if it's currently mapped.
+ */
+ void unmap();
+
+ /** Creates the GDK (windowing system) resources associated with a
+ * widget. For example, @a widget -&gt;window will be created when a widget
+ * is realized. Normally realization happens implicitly; if you show
+ * a widget and all its parent containers, then the widget will be
+ * realized and mapped automatically.
+ *
+ * Realizing a widget requires all
+ * the widget's parent widgets to be realized; calling
+ * realize() realizes the widget's parents in addition to
+ * @a widget itself. If a widget is not yet inside a toplevel window
+ * when you realize it, bad things will happen.
+ *
+ * This function is primarily used in widget implementations, and
+ * isn't very useful otherwise. Many times when you think you might
+ * need it, a better approach is to connect to a signal that will be
+ * called after the widget is realized automatically, such as
+ * "expose_event". Or simply Glib::signal_connect_after() to the
+ * "realize" signal.
+ */
+ void realize();
+
+ /** This function is only useful in widget implementations.
+ * Causes a widget to be unrealized (frees all GDK resources
+ * associated with the widget, such as @a widget -&gt;window).
+ */
+ void unrealize();
+
+
+ /** This function is only for use in widget implementations. Obtains
+ * @a widget -&gt;requisition, unless someone has forced a particular
+ * geometry on the widget (e.g. with set_usize()), in which
+ * case it returns that geometry instead of the widget's requisition.
+ *
+ * This function differs from size_request() in that
+ * it retrieves the last size request value from @a widget -&gt;requisition,
+ * while size_request() actually calls the "size_request" method
+ * on @a widget to compute the size request and fill in @a widget -&gt;requisition,
+ * and only then returns @a widget -&gt;requisition.
+ *
+ * Because this function does not call the "size_request" method, it
+ * can only be used when you know that @a widget -&gt;requisition is
+ * up-to-date, that is, size_request() has been called
+ * since the last time a resize was queued. In general, only container
+ * implementations have this information; applications should use
+ * size_request().
+ * @param requisition A Gtk::Requisition to be filled in.
+ */
+ void get_child_requisition(Requisition& requisition) const;
+
+ //The parameter name is "the_property_name" to avoid a warning because there is a method with the "property_name" name.
+
+ /** Gets the value of a style property of @a widget .
+ * @param the_property_name The name of a style property.
+ * @param value Location to return the property value.
+ */
+ void get_style_property_value(
+ const Glib::ustring& the_property_name, Glib::ValueBase& value) const;
+
+ void realize_if_needed();
+
+ void set_allocation(const Allocation& value);
+ void set_window(const Glib::RefPtr<Gdk::Window>& value);
+
+
+};
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+//The parameter name is "the_property_name" to avoid a warning because there is a method with the "property_name" name.
+template <class PropertyType>
+void Widget::get_style_property(const Glib::ustring& the_property_name, PropertyType& value) const
+{
+ Glib::Value<PropertyType> property_value;
+ property_value.init(Glib::Value<PropertyType>::value_type());
+
+ this->get_style_property_value(the_property_name, property_value);
+
+ value = property_value.get();
+}
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::Widget
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::Widget* wrap(GtkWidget* object, bool take_copy = false);
+}
+#endif /* _GTKMM_WIDGET_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/window.cc b/libs/gtkmm2/gtk/gtkmm/window.cc
new file mode 100644
index 0000000000..4be33fd86b
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/window.cc
@@ -0,0 +1,1242 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <gtkmm/window.h>
+#include <gtkmm/private/window_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/accelgroup.h>
+#include <gdkmm/cursor.h>
+#include <gtk/gtkwindow.h>
+
+
+namespace Gtk
+{
+
+Glib::RefPtr<AccelGroup> Window::get_accel_group()
+{
+ //There doesn't seem to be any gtk_window_get_accel_group().
+ //I think that you're supposed to remember what you added yourself.
+ //And that's what we do here.
+
+ if(!accel_group_)
+ {
+ accel_group_ = AccelGroup::create();
+ add_accel_group(accel_group_);
+ }
+
+ return accel_group_;
+}
+
+bool Window::is_toplevel() const
+{
+ return gobj()->type == GTK_WINDOW_TOPLEVEL;
+}
+
+bool Window::is_popup() const
+{
+ return gobj()->type == GTK_WINDOW_POPUP;
+}
+
+void Window::raise()
+{
+ get_window()->raise();
+}
+
+void Window::set_manage()
+{
+ g_warning("gtkmm: Attempt to call Gtk::manage() on a Gtk::Window, but a Gtk::Window has no parent container to manage its lifetime.\n");
+}
+
+void Window::destroy_()
+{
+ //Called from destructors.
+ //overridden so that the correct _destroy_c_instance() ends up being called by the destructor.
+
+ //GTKMM_LIFECYCLE
+
+ #ifdef GLIBMM_DEBUG_REFCOUNTING
+ g_warning("Gtk::Window::destroy_(): gobject_: %10X\n", gobject_);
+ if(gobject_)
+ g_warning(" gtypename: %s\n", G_OBJECT_TYPE_NAME(gobject_));
+ #endif
+
+ if ( !cpp_destruction_in_progress_ ) //see comment below.
+ {
+ //Prevent destroy_notify_() from running as a possible side-effect of gtk_object_destroy.
+ //We can't predict whether destroy_notify_() will really be run, so we'll disconnect the C++ instance here.
+ cpp_destruction_in_progress_ = true;
+
+ //destroy the C instance:
+ _destroy_c_instance();
+ }
+
+ //The C++ destructor will be reached later. This function was called by a destructor.
+}
+
+void Window::_destroy_c_instance()
+{
+ //We override this,
+ //because though top-level windows can only be destroyed with gtk_widget_destroy, according to Owen Taylor. murrayc.
+ #ifdef GLIBMM_DEBUG_REFCOUNTING
+ g_warning("Gtk::Window::_destroy_c_instance() gobject_=%10X\n", gobject_);
+ #endif
+
+ cpp_destruction_in_progress_ = true;
+
+ // remove our hook.
+ GtkObject* object = (GtkObject*)gobj();
+ if (object)
+ {
+ disconnect_cpp_wrapper();
+ //If we are killing the C++ instance before the C instance, then this might lead to strange behaviour.
+ //If this is a problem, then you'll have to use a managed() object, which will die only upon GTK+'s request.
+
+ //We can't do anything with the gobject_ if it's already been disposed.
+ //This prevents us from unref-ing it again, or destroying it again after GTK+ has told us that it has been disposed.
+ if (!gobject_disposed_)
+ {
+ //Windows can not be unrefed. They are "self-owning".
+ gtk_object_destroy(object);
+ }
+
+ //Glib::Object::~Object() will not g_object_unref() it too. because gobject_ is now 0.
+ }
+}
+
+void Window_Class::dispose_vfunc_callback(GObject* self)
+{
+ //Avoid disposal of Windows on delete_event (window close) signal.
+
+ #ifdef GLIBMM_DEBUG_REFCOUNTING
+ g_warning("Window_Class::dispose_vfunc_callback(): gobject_: %p\n", (void*)self);
+ #endif
+
+ Widget *const obj = dynamic_cast<Widget*>(
+ Glib::ObjectBase::_get_current_wrapper(self));
+
+ // This function might be invoked recursively because we're triggering
+ // several signal emissions, particularly signal_hide(). Therefore we
+ // have to test for cpp_destruction_in_progress_ at this point.
+
+ if(obj && !obj->_cpp_destruction_is_in_progress()) //When it should really be destroyed, we zero gobj_.
+ {
+ GtkWidget* const pWidget = obj->gobj();
+ g_return_if_fail(pWidget == GTK_WIDGET(self));
+
+ // Abort dispose if the widget isn't managed, in order to prevent
+ // the nasty self-destroying behaviour of GTK+. This applies to:
+ //
+ // - GtkWindow, if it received "delete_event"
+ // - GtkDialog, which destroys on "response" by default
+
+ #ifdef GLIBMM_DEBUG_REFCOUNTING
+ g_warning("Window_Class::dispose_vfunc_callback(): before gtk_widget_hide().");
+ #endif
+
+ // Now hide the widget. The C++ object must _not_ be accessed anymore
+ // after this call, because a signal_hide() handler might delete it.
+ gtk_widget_hide(pWidget);
+
+ #ifdef GLIBMM_DEBUG_REFCOUNTING
+ g_warning("Window_Class::dispose_vfunc_callback(): after gtk_widget_hide().");
+ #endif
+
+ // GTKMM_LIFECYCLE
+ return; // Prevent calling of normal C dispose vfunc (see below)
+ }
+ else
+ {
+ #ifdef GLIBMM_DEBUG_REFCOUNTING
+ //g_warning("Window_Class::dispose_vfunc_callback(): unreferenced: before gtk_widget_hide().");
+ #endif
+
+ // Always hide widgets on gtk_object_destroy(), regardless of whether
+ // the widget is managed or not. This is done for consistency so that
+ // connecting to signal_hide() is guaranteed to work.
+ //gtk_widget_hide(pWidget);
+
+ #ifdef GLIBMM_DEBUG_REFCOUNTING
+ //g_warning("Window_Class::dispose_vfunc_callback(): unreferenced: after gtk_widget_hide().");
+ #endif
+
+ GObjectClass *const base = static_cast<GObjectClass*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)));
+
+ #ifdef GLIBMM_DEBUG_REFCOUNTING
+ g_warning("Window_Class::dispose_vfunc_callback(): before calling base->dispose.");
+ #endif
+
+ if(base->dispose)
+ (*base->dispose)(self);
+
+ #ifdef GLIBMM_DEBUG_REFCOUNTING
+ g_warning("Window_Class::dispose_vfunc_callback(): after calling base->dispose.");
+ #endif
+ }
+}
+
+void Window::unset_focus()
+{
+ gtk_window_set_focus(gobj(), 0 /* See GTK+ docs */);
+}
+
+void Window::unset_default()
+{
+ gtk_window_set_default(gobj(), 0 /* See GTK+ docs */);
+}
+
+} // namespace Gtk
+
+
+namespace
+{
+
+void Window_signal_set_focus_callback(GtkWindow* self, GtkWidget* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,Widget* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::wrap(p0)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo Window_signal_set_focus_info =
+{
+ "set_focus",
+ (GCallback) &Window_signal_set_focus_callback,
+ (GCallback) &Window_signal_set_focus_callback
+};
+
+
+gboolean Window_signal_frame_event_callback(GtkWindow* self, GdkEvent* p0,void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< bool,GdkEvent* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ return static_cast<int>((*static_cast<SlotType*>(slot))(p0));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Window_signal_frame_event_notify_callback(GtkWindow* self, GdkEvent* p0, void* data)
+{
+ using namespace Gtk;
+ typedef sigc::slot< void,GdkEvent* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(p0);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+const Glib::SignalProxyInfo Window_signal_frame_event_info =
+{
+ "frame_event",
+ (GCallback) &Window_signal_frame_event_callback,
+ (GCallback) &Window_signal_frame_event_notify_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gtk::Window* wrap(GtkWindow* object, bool take_copy)
+{
+ return dynamic_cast<Gtk::Window *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Window_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Window_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_window_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Window_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ reinterpret_cast<GObjectClass*>(klass)->dispose = &dispose_vfunc_callback;
+ klass->set_focus = &set_focus_callback;
+ klass->frame_event = &frame_event_callback;
+}
+
+
+void Window_Class::set_focus_callback(GtkWindow* self, GtkWidget* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_set_focus(Glib::wrap(p0)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->set_focus)
+ (*base->set_focus)(self, p0);
+ }
+}
+
+gboolean Window_Class::frame_event_callback(GtkWindow* self, GdkEvent* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->on_frame_event(p0));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->frame_event)
+ return (*base->frame_event)(self, p0);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+
+Glib::ObjectBase* Window_Class::wrap_new(GObject* o)
+{
+ return new Window((GtkWindow*)(o)); //top-level windows can not be manage()ed.
+
+}
+
+
+/* The implementation: */
+
+Window::Window(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Bin(construct_params)
+{
+ }
+
+Window::Window(GtkWindow* castitem)
+:
+ Gtk::Bin((GtkBin*)(castitem))
+{
+ }
+
+Window::~Window()
+{
+ destroy_();
+}
+
+Window::CppClassType Window::window_class_; // initialize static member
+
+GType Window::get_type()
+{
+ return window_class_.init().get_type();
+}
+
+GType Window::get_base_type()
+{
+ return gtk_window_get_type();
+}
+
+
+Window::Window(WindowType type)
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Bin(Glib::ConstructParams(window_class_.init(), "type", ((GtkWindowType)(type)), (char*) 0))
+{
+ }
+
+WindowType Window::get_window_type() const
+{
+ return static_cast<WindowType>(gobj()->type);
+}
+
+Glib::RefPtr<Gdk::Window> Window::get_frame()
+{
+ Glib::RefPtr<Gdk::Window> ref_ptr(Glib::wrap((GdkWindowObject*)(gobj()->frame)));
+
+ if(ref_ptr)
+ ref_ptr->reference();
+
+ return ref_ptr;
+}
+
+Glib::RefPtr<const Gdk::Window> Window::get_frame() const
+{
+ Glib::RefPtr<const Gdk::Window> ref_ptr(Glib::wrap((GdkWindowObject*)(gobj()->frame)));
+
+ if(ref_ptr)
+ ref_ptr->reference();
+
+ return ref_ptr;
+}
+
+void Window::set_title(const Glib::ustring& title)
+{
+ gtk_window_set_title(gobj(), title.c_str());
+}
+
+Glib::ustring Window::get_title() const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(gtk_window_get_title(const_cast<GtkWindow*>(gobj())));
+}
+
+void Window::set_wmclass(const Glib::ustring& wmclass_name, const Glib::ustring& wmclass_class)
+{
+ gtk_window_set_wmclass(gobj(), wmclass_name.c_str(), wmclass_class.c_str());
+}
+
+void Window::set_role(const Glib::ustring& role)
+{
+ gtk_window_set_role(gobj(), role.c_str());
+}
+
+Glib::ustring Window::get_role() const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(gtk_window_get_role(const_cast<GtkWindow*>(gobj())));
+}
+
+void Window::add_accel_group(const Glib::RefPtr<AccelGroup>& accel_group)
+{
+ gtk_window_add_accel_group(gobj(), Glib::unwrap(accel_group));
+}
+
+void Window::remove_accel_group(const Glib::RefPtr<AccelGroup>& accel_group)
+{
+ gtk_window_remove_accel_group(gobj(), Glib::unwrap(accel_group));
+}
+
+void Window::set_position(WindowPosition position)
+{
+ gtk_window_set_position(gobj(), ((GtkWindowPosition)(position)));
+}
+
+bool Window::activate_focus()
+{
+ return gtk_window_activate_focus(gobj());
+}
+
+void Window::set_focus(Gtk::Widget& focus)
+{
+ gtk_window_set_focus(gobj(), (focus).gobj());
+}
+
+Widget* Window::get_focus()
+{
+ return Glib::wrap(gtk_window_get_focus(gobj()));
+}
+
+const Widget* Window::get_focus() const
+{
+ return Glib::wrap(gtk_window_get_focus(const_cast<GtkWindow*>(gobj())));
+}
+
+void Window::set_default(Gtk::Widget& default_widget)
+{
+ gtk_window_set_default(gobj(), (default_widget).gobj());
+}
+
+bool Window::activate_default()
+{
+ return gtk_window_activate_default(gobj());
+}
+
+void Window::set_transient_for(Window& parent)
+{
+ gtk_window_set_transient_for(gobj(), (parent).gobj());
+}
+
+Window* Window::get_transient_for()
+{
+ return Glib::wrap(gtk_window_get_transient_for(gobj()));
+}
+
+const Window* Window::get_transient_for() const
+{
+ return Glib::wrap(gtk_window_get_transient_for(const_cast<GtkWindow*>(gobj())));
+}
+
+void Window::set_type_hint(Gdk::WindowTypeHint hint)
+{
+ gtk_window_set_type_hint(gobj(), ((GdkWindowTypeHint)(hint)));
+}
+
+Gdk::WindowTypeHint Window::get_type_hint() const
+{
+ return ((Gdk::WindowTypeHint)(gtk_window_get_type_hint(const_cast<GtkWindow*>(gobj()))));
+}
+
+void Window::set_skip_taskbar_hint(bool setting)
+{
+ gtk_window_set_skip_taskbar_hint(gobj(), static_cast<int>(setting));
+}
+
+bool Window::get_skip_taskbar_hint() const
+{
+ return gtk_window_get_skip_taskbar_hint(const_cast<GtkWindow*>(gobj()));
+}
+
+void Window::set_skip_pager_hint(bool setting)
+{
+ gtk_window_set_skip_pager_hint(gobj(), static_cast<int>(setting));
+}
+
+bool Window::get_skip_pager_hint() const
+{
+ return gtk_window_get_skip_pager_hint(const_cast<GtkWindow*>(gobj()));
+}
+
+bool Window::get_destroy_with_parent() const
+{
+ return gtk_window_get_destroy_with_parent(const_cast<GtkWindow*>(gobj()));
+}
+
+void Window::set_resizable(bool resizable)
+{
+ gtk_window_set_resizable(gobj(), static_cast<int>(resizable));
+}
+
+bool Window::get_resizable() const
+{
+ return gtk_window_get_resizable(const_cast<GtkWindow*>(gobj()));
+}
+
+void Window::set_gravity(Gdk::Gravity gravity)
+{
+ gtk_window_set_gravity(gobj(), ((GdkGravity)(gravity)));
+}
+
+Gdk::Gravity Window::get_gravity() const
+{
+ return ((Gdk::Gravity)(gtk_window_get_gravity(const_cast<GtkWindow*>(gobj()))));
+}
+
+void Window::set_geometry_hints(Widget& geometry_widget, const Gdk::Geometry& geometry, Gdk::WindowHints geom_mask)
+{
+ gtk_window_set_geometry_hints(gobj(), (geometry_widget).gobj(), const_cast<GdkGeometry*>(&(geometry)), ((GdkWindowHints)(geom_mask)));
+}
+
+void Window::set_screen(const Glib::RefPtr<Gdk::Screen>& screen)
+{
+ gtk_window_set_screen(gobj(), Glib::unwrap(screen));
+}
+
+Glib::RefPtr<Gdk::Screen> Window::get_screen()
+{
+
+ Glib::RefPtr<Gdk::Screen> retvalue = Glib::wrap(gtk_window_get_screen(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const Gdk::Screen> Window::get_screen() const
+{
+
+ Glib::RefPtr<const Gdk::Screen> retvalue = Glib::wrap(gtk_window_get_screen(const_cast<GtkWindow*>(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+void Window::set_has_frame(bool setting)
+{
+ gtk_window_set_has_frame(gobj(), static_cast<int>(setting));
+}
+
+bool Window::get_has_frame() const
+{
+ return gtk_window_get_has_frame(const_cast<GtkWindow*>(gobj()));
+}
+
+void Window::set_frame_dimensions(int left, int top, int right, int bottom)
+{
+ gtk_window_set_frame_dimensions(gobj(), left, top, right, bottom);
+}
+
+void Window::get_frame_dimensions(int& left, int& top, int& right, int& bottom) const
+{
+ gtk_window_get_frame_dimensions(const_cast<GtkWindow*>(gobj()), &left, &top, &right, &bottom);
+}
+
+void Window::set_decorated(bool setting)
+{
+ gtk_window_set_decorated(gobj(), static_cast<int>(setting));
+}
+
+bool Window::get_decorated() const
+{
+ return gtk_window_get_decorated(const_cast<GtkWindow*>(gobj()));
+}
+
+Glib::ListHandle< Glib::RefPtr<Gdk::Pixbuf> > Window::get_icon_list()
+{
+ return Glib::ListHandle< Glib::RefPtr<Gdk::Pixbuf> >(gtk_window_get_icon_list(gobj()), Glib::OWNERSHIP_SHALLOW);
+}
+
+Glib::ListHandle< Glib::RefPtr<const Gdk::Pixbuf> > Window::get_icon_list() const
+{
+ return Glib::ListHandle< Glib::RefPtr<const Gdk::Pixbuf> >(gtk_window_get_icon_list(const_cast<GtkWindow*>(gobj())), Glib::OWNERSHIP_SHALLOW);
+}
+
+void Window::set_icon_list(const Glib::ListHandle< Glib::RefPtr<Gdk::Pixbuf> >& list)
+{
+ gtk_window_set_icon_list(gobj(), list.data());
+}
+
+void Window::set_icon(const Glib::RefPtr<Gdk::Pixbuf>& icon)
+{
+ gtk_window_set_icon(gobj(), Glib::unwrap(icon));
+}
+
+bool Window::set_icon_from_file(const std::string& filename)
+{
+ GError *error = 0;
+ bool retvalue = gtk_window_set_icon_from_file(gobj(), filename.c_str(), &(error));
+ if(error) ::Glib::Error::throw_exception(error);
+ return retvalue;
+}
+
+Glib::RefPtr<Gdk::Pixbuf> Window::get_icon()
+{
+
+ Glib::RefPtr<Gdk::Pixbuf> retvalue = Glib::wrap(gtk_window_get_icon(gobj()));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const Gdk::Pixbuf> Window::get_icon() const
+{
+
+ Glib::RefPtr<const Gdk::Pixbuf> retvalue = Glib::wrap(gtk_window_get_icon(const_cast<GtkWindow*>(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+void Window::set_default_icon_list(const Glib::ListHandle< Glib::RefPtr<Gdk::Pixbuf> >& list)
+{
+ gtk_window_set_default_icon_list(list.data());
+}
+
+Glib::ListHandle< Glib::RefPtr<Gdk::Pixbuf> > Window::get_default_icon_list()
+{
+ return Glib::ListHandle< Glib::RefPtr<Gdk::Pixbuf> >(gtk_window_get_default_icon_list(), Glib::OWNERSHIP_SHALLOW);
+}
+
+bool Window::set_default_icon_from_file(const std::string& filename)
+{
+ GError *error = 0;
+ bool retvalue = gtk_window_set_default_icon_from_file(filename.c_str(), &(error));
+ if(error) ::Glib::Error::throw_exception(error);
+ return retvalue;
+}
+
+void Window::set_auto_startup_notification(bool setting)
+{
+ gtk_window_set_auto_startup_notification(static_cast<int>(setting));
+}
+
+void Window::set_modal(bool modal)
+{
+ gtk_window_set_modal(gobj(), static_cast<int>(modal));
+}
+
+bool Window::get_modal() const
+{
+ return gtk_window_get_modal(const_cast<GtkWindow*>(gobj()));
+}
+
+Glib::ListHandle<Window*> Window::list_toplevels()
+{
+ return Glib::ListHandle<Window*>(gtk_window_list_toplevels(), Glib::OWNERSHIP_SHALLOW);
+}
+
+void Window::add_mnemonic(guint keyval, Widget& target)
+{
+ gtk_window_add_mnemonic(gobj(), keyval, (target).gobj());
+}
+
+void Window::remove_mnemonic(guint keyval, Widget& target)
+{
+ gtk_window_remove_mnemonic(gobj(), keyval, (target).gobj());
+}
+
+bool Window::mnemonic_activate(guint keyval, Gdk::ModifierType modifier)
+{
+ return gtk_window_mnemonic_activate(gobj(), keyval, ((GdkModifierType)(modifier)));
+}
+
+void Window::set_mnemonic_modifier(Gdk::ModifierType modifier)
+{
+ gtk_window_set_mnemonic_modifier(gobj(), ((GdkModifierType)(modifier)));
+}
+
+Gdk::ModifierType Window::get_mnemonic_modifier()
+{
+ return ((Gdk::ModifierType)(gtk_window_get_mnemonic_modifier(gobj())));
+}
+
+void Window::present()
+{
+ gtk_window_present(gobj());
+}
+
+void Window::iconify()
+{
+ gtk_window_iconify(gobj());
+}
+
+void Window::deiconify()
+{
+ gtk_window_deiconify(gobj());
+}
+
+void Window::stick()
+{
+ gtk_window_stick(gobj());
+}
+
+void Window::unstick()
+{
+ gtk_window_unstick(gobj());
+}
+
+void Window::maximize()
+{
+ gtk_window_maximize(gobj());
+}
+
+void Window::unmaximize()
+{
+ gtk_window_unmaximize(gobj());
+}
+
+void Window::fullscreen()
+{
+ gtk_window_fullscreen(gobj());
+}
+
+void Window::unfullscreen()
+{
+ gtk_window_unfullscreen(gobj());
+}
+
+void Window::begin_resize_drag(Gdk::WindowEdge edge, int button, int root_x, int root_y, guint32 timestamp)
+{
+ gtk_window_begin_resize_drag(gobj(), ((GdkWindowEdge)(edge)), button, root_x, root_y, timestamp);
+}
+
+void Window::begin_move_drag(int button, int root_x, int root_y, guint32 timestamp)
+{
+ gtk_window_begin_move_drag(gobj(), button, root_x, root_y, timestamp);
+}
+
+void Window::set_default_size(int width, int height)
+{
+ gtk_window_set_default_size(gobj(), width, height);
+}
+
+void Window::get_default_size(int& width, int& height) const
+{
+ gtk_window_get_default_size(const_cast<GtkWindow*>(gobj()), &width, &height);
+}
+
+void Window::resize(int width, int height)
+{
+ gtk_window_resize(gobj(), width, height);
+}
+
+void Window::get_size(int& width, int& height) const
+{
+ gtk_window_get_size(const_cast<GtkWindow*>(gobj()), &width, &height);
+}
+
+void Window::move(int x, int y)
+{
+ gtk_window_move(gobj(), x, y);
+}
+
+void Window::get_position(int& root_x, int& root_y) const
+{
+ gtk_window_get_position(const_cast<GtkWindow*>(gobj()), &root_x, &root_y);
+}
+
+bool Window::parse_geometry(const Glib::ustring& geometry)
+{
+ return gtk_window_parse_geometry(gobj(), geometry.c_str());
+}
+
+void Window::reshow_with_initial_size()
+{
+ gtk_window_reshow_with_initial_size(gobj());
+}
+
+void Window::set_default_icon(const Glib::RefPtr<Gdk::Pixbuf>& icon)
+{
+ gtk_window_set_default_icon(Glib::unwrap(icon));
+}
+
+void Window::set_keep_above(bool setting)
+{
+ gtk_window_set_keep_above(gobj(), static_cast<int>(setting));
+}
+
+void Window::set_keep_below(bool setting)
+{
+ gtk_window_set_keep_below(gobj(), static_cast<int>(setting));
+}
+
+
+Glib::SignalProxy1< void,Widget* > Window::signal_set_focus()
+{
+ return Glib::SignalProxy1< void,Widget* >(this, &Window_signal_set_focus_info);
+}
+
+Glib::SignalProxy1< bool,GdkEvent* > Window::signal_frame_event()
+{
+ return Glib::SignalProxy1< bool,GdkEvent* >(this, &Window_signal_frame_event_info);
+}
+
+
+Glib::PropertyProxy<Glib::ustring> Window::property_title()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "title");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> Window::property_title() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "title");
+}
+
+Glib::PropertyProxy<bool> Window::property_allow_shrink()
+{
+ return Glib::PropertyProxy<bool>(this, "allow-shrink");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Window::property_allow_shrink() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "allow-shrink");
+}
+
+Glib::PropertyProxy<bool> Window::property_allow_grow()
+{
+ return Glib::PropertyProxy<bool>(this, "allow-grow");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Window::property_allow_grow() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "allow-grow");
+}
+
+Glib::PropertyProxy<bool> Window::property_resizable()
+{
+ return Glib::PropertyProxy<bool>(this, "resizable");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Window::property_resizable() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "resizable");
+}
+
+Glib::PropertyProxy<bool> Window::property_modal()
+{
+ return Glib::PropertyProxy<bool>(this, "modal");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Window::property_modal() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "modal");
+}
+
+Glib::PropertyProxy<WindowPosition> Window::property_window_position()
+{
+ return Glib::PropertyProxy<WindowPosition>(this, "window-position");
+}
+
+Glib::PropertyProxy_ReadOnly<WindowPosition> Window::property_window_position() const
+{
+ return Glib::PropertyProxy_ReadOnly<WindowPosition>(this, "window-position");
+}
+
+Glib::PropertyProxy<int> Window::property_default_width()
+{
+ return Glib::PropertyProxy<int>(this, "default-width");
+}
+
+Glib::PropertyProxy_ReadOnly<int> Window::property_default_width() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "default-width");
+}
+
+Glib::PropertyProxy<int> Window::property_default_height()
+{
+ return Glib::PropertyProxy<int>(this, "default-height");
+}
+
+Glib::PropertyProxy_ReadOnly<int> Window::property_default_height() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "default-height");
+}
+
+Glib::PropertyProxy<bool> Window::property_destroy_with_parent()
+{
+ return Glib::PropertyProxy<bool>(this, "destroy-with-parent");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Window::property_destroy_with_parent() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "destroy-with-parent");
+}
+
+Glib::PropertyProxy< Glib::RefPtr<Gdk::Pixbuf> > Window::property_icon()
+{
+ return Glib::PropertyProxy< Glib::RefPtr<Gdk::Pixbuf> >(this, "icon");
+}
+
+Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Pixbuf> > Window::property_icon() const
+{
+ return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Pixbuf> >(this, "icon");
+}
+
+Glib::PropertyProxy< Glib::RefPtr<Gdk::Screen> > Window::property_screen()
+{
+ return Glib::PropertyProxy< Glib::RefPtr<Gdk::Screen> >(this, "screen");
+}
+
+Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Screen> > Window::property_screen() const
+{
+ return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Screen> >(this, "screen");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Window::property_is_active() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "is-active");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Window::property_has_toplevel_focus() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "has-toplevel-focus");
+}
+
+Glib::PropertyProxy<GdkWindowTypeHint> Window::property_type_hint()
+{
+ return Glib::PropertyProxy<GdkWindowTypeHint>(this, "type-hint");
+}
+
+Glib::PropertyProxy_ReadOnly<GdkWindowTypeHint> Window::property_type_hint() const
+{
+ return Glib::PropertyProxy_ReadOnly<GdkWindowTypeHint>(this, "type-hint");
+}
+
+Glib::PropertyProxy<bool> Window::property_skip_taskbar_hint()
+{
+ return Glib::PropertyProxy<bool>(this, "skip-taskbar-hint");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Window::property_skip_taskbar_hint() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "skip-taskbar-hint");
+}
+
+Glib::PropertyProxy<bool> Window::property_skip_pager_hint()
+{
+ return Glib::PropertyProxy<bool>(this, "skip-pager-hint");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Window::property_skip_pager_hint() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "skip-pager-hint");
+}
+
+Glib::PropertyProxy<Glib::ustring> Window::property_role()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "role");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> Window::property_role() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "role");
+}
+
+Glib::PropertyProxy<bool> Window::property_decorated()
+{
+ return Glib::PropertyProxy<bool>(this, "decorated");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Window::property_decorated() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "decorated");
+}
+
+Glib::PropertyProxy<Gdk::Gravity> Window::property_gravity()
+{
+ return Glib::PropertyProxy<Gdk::Gravity>(this, "gravity");
+}
+
+Glib::PropertyProxy_ReadOnly<Gdk::Gravity> Window::property_gravity() const
+{
+ return Glib::PropertyProxy_ReadOnly<Gdk::Gravity>(this, "gravity");
+}
+
+
+void Gtk::Window::on_set_focus(Widget* focus)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->set_focus)
+ (*base->set_focus)(gobj(),(GtkWidget*)Glib::unwrap(focus));
+}
+
+bool Gtk::Window::on_frame_event(GdkEvent* event)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->frame_event)
+ return (*base->frame_event)(gobj(),event);
+
+ typedef bool RType;
+ return RType();
+}
+
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Gtk::WindowGroup> wrap(GtkWindowGroup* object, bool take_copy)
+{
+ return Glib::RefPtr<Gtk::WindowGroup>( dynamic_cast<Gtk::WindowGroup*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} /* namespace Glib */
+
+
+namespace Gtk
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& WindowGroup_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &WindowGroup_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gtk_window_group_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void WindowGroup_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* WindowGroup_Class::wrap_new(GObject* object)
+{
+ return new WindowGroup((GtkWindowGroup*)object);
+}
+
+
+/* The implementation: */
+
+GtkWindowGroup* WindowGroup::gobj_copy()
+{
+ reference();
+ return gobj();
+}
+
+WindowGroup::WindowGroup(const Glib::ConstructParams& construct_params)
+:
+ Glib::Object(construct_params)
+{}
+
+WindowGroup::WindowGroup(GtkWindowGroup* castitem)
+:
+ Glib::Object((GObject*)(castitem))
+{}
+
+WindowGroup::~WindowGroup()
+{}
+
+
+WindowGroup::CppClassType WindowGroup::windowgroup_class_; // initialize static member
+
+GType WindowGroup::get_type()
+{
+ return windowgroup_class_.init().get_type();
+}
+
+GType WindowGroup::get_base_type()
+{
+ return gtk_window_group_get_type();
+}
+
+WindowGroup::WindowGroup()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Glib::Object(Glib::ConstructParams(windowgroup_class_.init()))
+{
+ }
+
+Glib::RefPtr<WindowGroup> WindowGroup::create()
+{
+ return Glib::RefPtr<WindowGroup>( new WindowGroup() );
+}
+void WindowGroup::add_window(Window& window)
+{
+ gtk_window_group_add_window(gobj(), (window).gobj());
+}
+
+void WindowGroup::remove_window(Window& window)
+{
+ gtk_window_group_remove_window(gobj(), (window).gobj());
+}
+
+
+} // namespace Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/window.h b/libs/gtkmm2/gtk/gtkmm/window.h
new file mode 100644
index 0000000000..442c68a011
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/window.h
@@ -0,0 +1,1637 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _GTKMM_WINDOW_H
+#define _GTKMM_WINDOW_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* window.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/object.h>
+#include <glibmm/listhandle.h>
+#include <gtkmm/bin.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkWindow GtkWindow;
+typedef struct _GtkWindowClass GtkWindowClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class Window_Class; } // namespace Gtk
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GtkWindowGroup GtkWindowGroup;
+typedef struct _GtkWindowGroupClass GtkWindowGroupClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gtk
+{ class WindowGroup_Class; } // namespace Gtk
+namespace Gtk
+{
+
+class AccelGroup;
+class WindowGroup;
+
+
+/** Toplevel Window
+ * This represents all widgets which are physical windows controlled
+ * by the window manager.
+ *
+ * The window will be hidden when the window manager's close button is clicked. Override on_delete_event() to stop this.
+ *
+ * Gtk::manage() has no effect on Windows because they have no parent Containers.
+ * @ingroup Widgets
+ */
+
+class Window : public Bin
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Window CppObjectType;
+ typedef Window_Class CppClassType;
+ typedef GtkWindow BaseObjectType;
+ typedef GtkWindowClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~Window();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class Window_Class;
+ static CppClassType window_class_;
+
+ // noncopyable
+ Window(const Window&);
+ Window& operator=(const Window&);
+
+protected:
+ explicit Window(const Glib::ConstructParams& construct_params);
+ explicit Window(GtkWindow* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GtkWindow* gobj() { return reinterpret_cast<GtkWindow*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GtkWindow* gobj() const { return reinterpret_cast<GtkWindow*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_set_focus(Widget* focus);
+ virtual bool on_frame_event(GdkEvent* event);
+
+
+private:
+
+
+public:
+ explicit Window(WindowType type = WINDOW_TOPLEVEL);
+
+ /** The title of the window.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_title() ;
+
+/** The title of the window.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_title() const;
+
+ /** If TRUE
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_allow_shrink() ;
+
+/** If TRUE
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_allow_shrink() const;
+
+ /** If TRUE
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_allow_grow() ;
+
+/** If TRUE
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_allow_grow() const;
+
+ /** If TRUE
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_resizable() ;
+
+/** If TRUE
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_resizable() const;
+
+ /** If TRUE
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_modal() ;
+
+/** If TRUE
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_modal() const;
+
+ /** The initial position of the window.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<WindowPosition> property_window_position() ;
+
+/** The initial position of the window.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<WindowPosition> property_window_position() const;
+
+ /** The default width of the window
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_default_width() ;
+
+/** The default width of the window
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_default_width() const;
+
+ /** The default height of the window
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_default_height() ;
+
+/** The default height of the window
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_default_height() const;
+
+ /** If this window should be destroyed when the parent is destroyed.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_destroy_with_parent() ;
+
+/** If this window should be destroyed when the parent is destroyed.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_destroy_with_parent() const;
+
+ /** Icon for this window.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy< Glib::RefPtr<Gdk::Pixbuf> > property_icon() ;
+
+/** Icon for this window.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Pixbuf> > property_icon() const;
+
+
+ /** The screen where this window will be displayed.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy< Glib::RefPtr<Gdk::Screen> > property_screen() ;
+
+/** The screen where this window will be displayed.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Screen> > property_screen() const;
+
+ /** Whether the toplevel is the current active window.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_is_active() const;
+
+
+ /** Whether the input focus is within this GtkWindow.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_has_toplevel_focus() const;
+
+
+ /** Hint to help the desktop environment understand what kind of window this is and how to treat it.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<GdkWindowTypeHint> property_type_hint() ;
+
+/** Hint to help the desktop environment understand what kind of window this is and how to treat it.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<GdkWindowTypeHint> property_type_hint() const;
+
+ /** TRUE if the window should not be in the task bar.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_skip_taskbar_hint() ;
+
+/** TRUE if the window should not be in the task bar.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_skip_taskbar_hint() const;
+
+ /** TRUE if the window should not be in the pager.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_skip_pager_hint() ;
+
+/** TRUE if the window should not be in the pager.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_skip_pager_hint() const;
+
+ /** Unique identifier for the window to be used when restoring a session.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_role() ;
+
+/** Unique identifier for the window to be used when restoring a session.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_role() const;
+
+ /** Whether the window should be decorated by the window manager.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_decorated() ;
+
+/** Whether the window should be decorated by the window manager.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_decorated() const;
+
+ /** The window gravity of the window.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Gdk::Gravity> property_gravity() ;
+
+/** The window gravity of the window.
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Gdk::Gravity> property_gravity() const;
+
+
+ bool is_toplevel() const;
+ bool is_dialog() const;
+ bool is_popup() const;
+
+ WindowType get_window_type() const;
+
+ //: This is special to the GTK+ linux-fb port.
+ Glib::RefPtr<Gdk::Window> get_frame();
+ Glib::RefPtr<const Gdk::Window> get_frame() const;
+
+
+ Glib::SignalProxy1< void,Widget* > signal_set_focus();
+
+
+ Glib::SignalProxy1< bool,GdkEvent* > signal_frame_event();
+
+
+ //Keybinding signals:
+
+
+ /** Sets the title of the Gtk::Window. The title of a window will be
+ * displayed in its title bar; on the X&nbsp;%Window System, the title bar
+ * is rendered by the window
+ * manager, so exactly how the title appears to users may vary
+ * according to a user's exact configuration. The title should help a
+ * user distinguish this window from other windows they may have
+ * open. A good title might include the application name and current
+ * document filename, for example.
+ * @param title Title of the window.
+ */
+ void set_title(const Glib::ustring& title);
+
+
+ /** Retrieves the title of the window. See set_title().
+ * @return The title of the window, or <tt>0</tt> if none has
+ * been set explicitely. The returned string is owned by the widget
+ * and must not be modified or freed.
+ */
+ Glib::ustring get_title() const;
+
+
+ /** Don't use this function. It sets the X&nbsp;%Window System "class" and
+ * "name" hints for a window. According to the ICCCM, you should
+ * always set these to the same value for all windows in an
+ * application, and GTK+ sets them to that value by default, so calling
+ * this function is sort of pointless. However, you may want to call
+ * set_role() on each window in your application, for the
+ * benefit of the session manager. Setting the role allows the window
+ * manager to restore window positions when loading a saved session.
+ * @param wmclass_name Window name hint.
+ * @param wmclass_class Window class hint.
+ */
+ void set_wmclass(const Glib::ustring& wmclass_name,
+ const Glib::ustring& wmclass_class);
+
+
+ /** This function is only useful on X11, not with other GTK+ targets.
+ *
+ * In combination with the window title, the window role allows a
+ * window manager to identify "the
+ * same" window when an application is restarted. So for example you
+ * might set the "toolbox" role on your app's toolbox window, so that
+ * when the user restarts their session, the window manager can put
+ * the toolbox back in the same place.
+ *
+ * If a window already has a unique title, you don't need to set the
+ * role, since the WM can use the title to identify the window when
+ * restoring the session.
+ * @param role Unique identifier for the window to be used when restoring a session.
+ */
+ void set_role(const Glib::ustring& role);
+
+ //: Returns the role of the window.
+ //- See {set_role()} for further explanation.
+
+ /** Returns the role of the window. See set_role() for
+ * further explanation.
+ * @return The role of the window if set, or <tt>0</tt>. The
+ * returned is owned by the widget and must not be modified
+ * or freed.
+ */
+ Glib::ustring get_role() const;
+
+
+ /** Associate @a accel_group with @a window , such that calling
+ * gtk_accel_groups_activate() on @a window will activate accelerators
+ * in @a accel_group .
+ * @param accel_group A Gtk::AccelGroup.
+ */
+ void add_accel_group(const Glib::RefPtr<AccelGroup>& accel_group);
+
+
+ /** Reverses the effects of add_accel_group().
+ * @param accel_group A Gtk::AccelGroup.
+ */
+ void remove_accel_group(const Glib::RefPtr<AccelGroup>& accel_group);
+
+
+ /** Sets a position constraint for this window. If the old or new
+ * constraint is Gtk::WIN_POS_CENTER_ALWAYS, this will also cause
+ * the window to be repositioned to satisfy the new constraint.
+ * @param position A position constraint.
+ */
+ void set_position(WindowPosition position);
+
+
+ /** Activates the current focused widget within the window.
+ * @return <tt>true</tt> if a widget got activated.
+ */
+ bool activate_focus();
+
+
+ /** If @a focus is not the current focus widget, and is focusable, sets
+ * it as the focus widget for the window. To set the focus to a particular
+ * widget in the toplevel, it is usually more convenient to use
+ * Gtk::Widget::grab_focus() instead of this function.
+ * @param focus Widget to be the new focus widget.
+ */
+ void set_focus(Gtk::Widget& focus);
+ void unset_focus();
+
+
+ /** Retrieves the current focused widget within the window.
+ * Note that this is the widget that would have the focus
+ * if the toplevel window focused; if the toplevel window
+ * is not focused then <tt>GTK_WIDGET_HAS_FOCUS (widget)</tt> will
+ * not be <tt>true</tt> for the widget.
+ * @return The currently focused widget, or <tt>0</tt> if there is none.
+ */
+ Widget* get_focus();
+
+ /** Retrieves the current focused widget within the window.
+ * Note that this is the widget that would have the focus
+ * if the toplevel window focused; if the toplevel window
+ * is not focused then <tt>GTK_WIDGET_HAS_FOCUS (widget)</tt> will
+ * not be <tt>true</tt> for the widget.
+ * @return The currently focused widget, or <tt>0</tt> if there is none.
+ */
+ const Widget* get_focus() const;
+
+ /** The default widget is the widget that's activated when the user
+ * presses Enter in a dialog (for example). This function sets the default widget for a Gtk::Window. When setting
+ * (rather than unsetting) the default widget it's generally easier to
+ * call Gtk::Widget::grab_focus() on the widget. Before making a widget
+ * the default widget, you must set the Gtk::CAN_DEFAULT flag on the
+ * widget you'd like to make the default using GTK_WIDGET_SET_FLAGS().
+ * @param default_widget Widget to be the default.
+ */
+ void set_default(Gtk::Widget& default_widget);
+ void unset_default();
+
+
+ /** Activates the default widget for the window, unless the current
+ * focused widget has been configured to receive the default action
+ * (see Gtk::RECEIVES_DEFAULT in Gtk::WidgetFlags), in which case the
+ * focused widget is activated.
+ * @return <tt>true</tt> if a widget got activated.
+ */
+ bool activate_default();
+
+
+ /** Dialog windows should be set transient for the main application
+ * window they were spawned from. This allows window managers to e.g. keep the
+ * dialog on top of the main window, or center the dialog over the
+ * main window. Gtk::Dialog::new_with_buttons() and other convenience
+ * functions in GTK+ will sometimes call
+ * set_transient_for() on your behalf.
+ *
+ * On Windows, this function will and put the child window
+ * on top of the parent, much as the window manager would have
+ * done on X.
+ * @param parent Parent window.
+ */
+ void set_transient_for(Window& parent);
+
+
+ /** Fetches the transient parent for this window. See
+ * set_transient_for().
+ * @return The transient parent for this window, or <tt>0</tt>
+ * if no transient parent has been set.
+ */
+ Window* get_transient_for();
+
+ /** Fetches the transient parent for this window. See
+ * set_transient_for().
+ * @return The transient parent for this window, or <tt>0</tt>
+ * if no transient parent has been set.
+ */
+ const Window* get_transient_for() const;
+
+
+ /** By setting the type hint for the window, you allow the window
+ * manager to decorate and handle the window in a way which is
+ * suitable to the function of the window in your application.
+ *
+ * This function should be called before the window becomes visible.
+ *
+ * Gtk::Dialog::new_with_buttons() and other convenience functions in GTK+
+ * will sometimes call set_type_hint() on your behalf.
+ * @param hint The window type.
+ */
+ void set_type_hint(Gdk::WindowTypeHint hint);
+
+
+ /** Gets the type hint for this window. See set_type_hint().
+ * @return The type hint for @a window .
+ */
+ Gdk::WindowTypeHint get_type_hint() const;
+
+
+ /** Windows may set a hint asking the desktop environment not to display
+ * the window in the task bar. This function sets this hint.
+ *
+ * Since: 2.2
+ * @param setting <tt>true</tt> to keep this window from appearing in the task bar.
+ */
+ void set_skip_taskbar_hint(bool setting = true);
+
+ /** Gets the value set by set_skip_taskbar_hint()
+ * @return <tt>true</tt> if window shouldn't be in taskbar
+ *
+ * Since: 2.2.
+ */
+ bool get_skip_taskbar_hint() const;
+
+
+ /** Windows may set a hint asking the desktop environment not to display
+ * the window in the pager. This function sets this hint.
+ * (A "pager" is any desktop navigation tool such as a workspace
+ * switcher that displays a thumbnail representation of the windows
+ * on the screen.)
+ *
+ * Since: 2.2
+ * @param setting <tt>true</tt> to keep this window from appearing in the pager.
+ */
+ void set_skip_pager_hint(bool setting = true);
+
+ /** Gets the value set by set_skip_pager_hint().
+ * @return <tt>true</tt> if window shouldn't be in pager
+ *
+ * Since: 2.2.
+ */
+ bool get_skip_pager_hint() const;
+
+ //_WRAP_METHOD(void set_destroy_with_parent(bool setting = true), gtk_window_set_destroy_with_parent)
+ // I don't that that this is ever a good thing for C++.murrayc.
+
+
+ /** Returns whether the window will be destroyed with its transient parent. See
+ * set_destroy_with_parent().
+ * @return <tt>true</tt> if the window will be destroyed with its transient parent.
+ */
+ bool get_destroy_with_parent() const;
+ // I don't that that this is ever a good thing for C++.murrayc.
+
+
+ /** Sets whether the user can resize a window. Windows are user resizable
+ * by default.
+ * @param resizable <tt>true</tt> if the user can resize this window.
+ */
+ void set_resizable(bool resizable = true);
+
+
+ /** Gets the value set by set_resizable().
+ * @return <tt>true</tt> if the user can resize the window.
+ */
+ bool get_resizable() const;
+
+
+ /** Window gravity defines the meaning of coordinates passed to
+ * move(). See move() and Gdk::Gravity for
+ * more details.
+ *
+ * The default window gravity is Gdk::GRAVITY_NORTH_WEST which will
+ * typically "do what you mean."
+ * @param gravity Window gravity.
+ */
+ void set_gravity(Gdk::Gravity gravity);
+
+
+ /** Gets the value set by set_gravity().
+ * @return Window gravity.
+ */
+ Gdk::Gravity get_gravity() const;
+
+
+ /** This function sets up hints about how a window can be resized by
+ * the user. You can set a minimum and maximum size; allowed resize
+ * increments (e.g. for xterm, you can only resize by the size of a
+ * character); aspect ratios; and more. See the Gdk::Geometry struct.
+ * @param geometry_widget Widget the geometry hints will be applied to.
+ * @param geometry Struct containing geometry information.
+ * @param geom_mask Mask indicating which struct fields should be paid attention to.
+ */
+ void set_geometry_hints(Widget& geometry_widget,
+ const Gdk::Geometry& geometry,
+ Gdk::WindowHints geom_mask);
+
+
+ /** Sets the Gdk::Screen where the @a window is displayed; if
+ * the window is already mapped, it will be unmapped, and
+ * then remapped on the new screen.
+ *
+ * Since: 2.2
+ * @param screen A Gdk::Screen.
+ */
+ void set_screen(const Glib::RefPtr<Gdk::Screen>& screen);
+
+
+ /** Returns the Gdk::Screen associated with @a window .
+ * @return A Gdk::Screen.
+ *
+ * Since: 2.2.
+ */
+ Glib::RefPtr<Gdk::Screen> get_screen();
+
+ /** Returns the Gdk::Screen associated with @a window .
+ * @return A Gdk::Screen.
+ *
+ * Since: 2.2.
+ */
+ Glib::RefPtr<const Gdk::Screen> get_screen() const;
+
+
+ /** (Note: this is a special-purpose function for the framebuffer port,
+ * that causes GTK+ to draw its own window border. For most applications,
+ * you want set_decorated() instead, which tells the window
+ * manager whether to draw the window border.)
+ *
+ * If this function is called on a window with setting of <tt>true</tt>, before
+ * it is realized or showed, it will have a "frame" window around
+ * @a window -&gt;window, accessible in @a window -&gt;frame. Using the signal
+ * frame_event you can receive all events targeted at the frame.
+ *
+ * This function is used by the linux-fb port to implement managed
+ * windows, but it could concievably be used by X-programs that
+ * want to do their own window decorations.
+ * @param setting A boolean.
+ */
+ void set_has_frame(bool setting = true);
+
+
+ /** Accessor for whether the window has a frame window exterior to
+ * @a window -&gt;window. Gets the value set by set_has_frame().
+ * @return <tt>true</tt> if a frame has been added to the window
+ * via set_has_frame().
+ */
+ bool get_has_frame() const;
+
+
+ /** (Note: this is a special-purpose function intended for the framebuffer
+ * port; see set_has_frame(). It will have no effect on the
+ * window border drawn by the window manager, which is the normal
+ * case when using the X&nbsp;%Window system.)
+ *
+ * For windows with frames (see set_has_frame()) this function
+ * can be used to change the size of the frame border.
+ * @param left The width of the left border.
+ * @param top The height of the top border.
+ * @param right The width of the right border.
+ * @param bottom The height of the bottom border.
+ */
+ void set_frame_dimensions(int left, int top,
+ int right, int bottom);
+
+
+ /** (Note: this is a special-purpose function intended for the
+ * framebuffer port; see set_has_frame(). It will not
+ * return the size of the window border drawn by the window manager, which is the normal
+ * case when using a windowing system. See
+ * gdk_window_get_frame_extents() to get the standard window border
+ * extents.)
+ *
+ * Retrieves the dimensions of the frame window for this toplevel.
+ * See set_has_frame(), set_frame_dimensions().
+ * @param left Location to store the width of the frame at the left.
+ * @param top Location to store the height of the frame at the top.
+ * @param right Location to store the width of the frame at the returns.
+ * @param bottom Location to store the height of the frame at the bottom.
+ */
+ void get_frame_dimensions(int& left, int& top,
+ int& right, int& bottom) const;
+
+
+ /** By default, windows are decorated with a title bar, resize
+ * controls, etc. Some window
+ * managers allow GTK+ to disable these decorations, creating a
+ * borderless window. If you set the decorated property to <tt>false</tt>
+ * using this function, GTK+ will do its best to convince the window
+ * manager not to decorate the window. Depending on the system, this
+ * function may not have any effect when called on a window that is
+ * already visible, so you should call it before calling gtk_window_show().
+ *
+ * On Windows, this function always works, since there's no window manager
+ * policy involved.
+ * @param setting <tt>true</tt> to decorate the window.
+ */
+ void set_decorated(bool setting = true);
+
+ /** Returns whether the window has been set to have decorations
+ * such as a title bar via set_decorated().
+ * @return <tt>true</tt> if the window has been set to have decorations.
+ */
+ bool get_decorated() const;
+
+
+ /** Retrieves the list of icons set by set_icon_list().
+ * The list is copied, but the reference count on each
+ * member won't be incremented.
+ * @return Copy of window's icon list.
+ */
+ Glib::ListHandle< Glib::RefPtr<Gdk::Pixbuf> > get_icon_list();
+
+ /** Retrieves the list of icons set by set_icon_list().
+ * The list is copied, but the reference count on each
+ * member won't be incremented.
+ * @return Copy of window's icon list.
+ */
+ Glib::ListHandle< Glib::RefPtr<const Gdk::Pixbuf> > get_icon_list() const;
+
+
+ /** Sets up the icon representing a Gtk::Window. The icon is used when
+ * the window is minimized (also known as iconified). Some window
+ * managers or desktop environments may also place it in the window
+ * frame, or display it in other contexts.
+ *
+ * set_icon_list() allows you to pass in the same icon in
+ * several hand-drawn sizes. The list should contain the natural sizes
+ * your icon is available in; that is, don't scale the image before
+ * passing it to GTK+. Scaling is postponed until the last minute,
+ * when the desired final size is known, to allow best quality.
+ *
+ * By passing several sizes, you may improve the final image quality
+ * of the icon, by reducing or eliminating automatic image scaling.
+ *
+ * Recommended sizes to provide: 16x16, 32x32, 48x48 at minimum, and
+ * larger images (64x64, 128x128) if you have them.
+ *
+ * See also set_default_icon_list() to set the icon
+ * for all windows in your application in one go.
+ *
+ * Note that transient windows (those who have been set transient for another
+ * window using set_transient_for()) will inherit their
+ * icon from their transient parent. So there's no need to explicitly
+ * set the icon on transient windows.
+ * @param list List of Gdk::Pixbuf.
+ */
+ void set_icon_list(const Glib::ListHandle< Glib::RefPtr<Gdk::Pixbuf> >& list);
+
+
+ /** Sets up the icon representing a Gtk::Window. This icon is used when
+ * the window is minimized (also known as iconified). Some window
+ * managers or desktop environments may also place it in the window
+ * frame, or display it in other contexts.
+ *
+ * The icon should be provided in whatever size it was naturally
+ * drawn; that is, don't scale the image before passing it to
+ * GTK+. Scaling is postponed until the last minute, when the desired
+ * final size is known, to allow best quality.
+ *
+ * If you have your icon hand-drawn in multiple sizes, use
+ * set_icon_list(). Then the best size will be used.
+ *
+ * This function is equivalent to calling set_icon_list()
+ * with a 1-element list.
+ *
+ * See also set_default_icon_list() to set the icon
+ * for all windows in your application in one go.
+ * @param icon Icon image, or <tt>0</tt>.
+ */
+ void set_icon(const Glib::RefPtr<Gdk::Pixbuf>& icon);
+
+
+ /** Sets the icon for the window.
+ *
+ * This function is equivalent to calling set_icon()
+ * with a pixbuf created by loading the image from @a filename .
+ * @param filename Location of icon file.
+ * @return <tt>true</tt> if setting the icon succeeded.
+ *
+ * Since: 2.2.
+ */
+ bool set_icon_from_file(const std::string& filename);
+
+
+ /** Gets the value set by set_icon() (or if you've
+ * called set_icon_list(), gets the first icon in
+ * the icon list).
+ * @return Icon for window.
+ */
+ Glib::RefPtr<Gdk::Pixbuf> get_icon();
+
+ /** Gets the value set by set_icon() (or if you've
+ * called set_icon_list(), gets the first icon in
+ * the icon list).
+ * @return Icon for window.
+ */
+ Glib::RefPtr<const Gdk::Pixbuf> get_icon() const;
+
+
+ /** Sets an icon list to be used as fallback for windows that haven't
+ * had set_icon_list() called on them to set up a
+ * window-specific icon list. This function allows you to set up the
+ * icon for all windows in your app at once.
+ *
+ * See set_icon_list() for more details.
+ * @param list A list of Gdk::Pixbuf.
+ */
+ static void set_default_icon_list(
+ const Glib::ListHandle< Glib::RefPtr<Gdk::Pixbuf> >& list);
+
+
+ /** Gets the value set by Gtk::Window::set_default_icon_list().
+ * @return Copy of default icon list.
+ */
+ static Glib::ListHandle< Glib::RefPtr<Gdk::Pixbuf> > get_default_icon_list();
+
+
+ /** Sets an icon to be used as fallback for windows that haven't
+ * had set_icon_list() called on them from a file
+ * on disk. Warns on failure if @a err is <tt>0</tt>.
+ * @param filename Location of icon file.
+ * @return <tt>true</tt> if setting the icon succeeded.
+ *
+ * Since: 2.2.
+ */
+ static bool set_default_icon_from_file(const std::string& filename);
+
+ /** By default, after showing the first Gtk::Window for each Gdk::Screen,
+ * GTK+ calls gdk_screen_notify_startup_complete(). Call this
+ * function to disable the automatic startup notification. You might
+ * do this if your first window is a splash screen, and you want to
+ * delay notification until after your real main window has been
+ * shown, for example.
+ *
+ * In that example, you would disable startup notification
+ * temporarily, show your splash screen, then re-enable it so that
+ * showing the main window would automatically result in notification.
+ *
+ * Since: 2.2
+ * @param setting <tt>true</tt> to automatically do startup notification.
+ */
+ static void set_auto_startup_notification(bool setting = true);
+
+
+ /** Sets a window modal or non-modal. Modal windows prevent interaction
+ * with other windows in the same application. To keep modal dialogs
+ * on top of main application windows, use
+ * set_transient_for() to make the dialog transient for the
+ * parent; most window managers
+ * will then disallow lowering the dialog below the parent.
+ * @param modal Whether the window is modal.
+ */
+ void set_modal(bool modal = true);
+
+
+ /** Returns whether the window is modal. See set_modal().
+ * @return <tt>true</tt> if the window is set to be modal and
+ * establishes a grab when shown.
+ */
+ bool get_modal() const;
+
+
+ /** Returns a list of all existing toplevel windows. The widgets
+ * in the list are not individually referenced. If you want
+ * to iterate through the list and perform actions involving
+ * callbacks that might destroy the widgets, you <em>must</em> call
+ * <tt>g_list_foreach (result, (GFunc)g_object_ref, <tt>0</tt>)</tt> first, and
+ * then unref all the widgets afterwards.
+ * @return List of toplevel widgets.
+ */
+ static Glib::ListHandle<Window*> list_toplevels();
+
+
+ /** Adds a mnemonic to this window.
+ * @param keyval The mnemonic.
+ * @param target The widget that gets activated by the mnemonic.
+ */
+ void add_mnemonic(guint keyval, Widget& target);
+
+
+ /** Removes a mnemonic from this window.
+ * @param keyval The mnemonic.
+ * @param target The widget that gets activated by the mnemonic.
+ */
+ void remove_mnemonic(guint keyval, Widget& target);
+
+
+ /** Activates the targets associated with the mnemonic.
+ * @param keyval The mnemonic.
+ * @param modifier The modifiers.
+ * @return <tt>true</tt> if the activation is done.
+ */
+ bool mnemonic_activate(guint keyval, Gdk::ModifierType modifier);
+
+
+ /** Sets the mnemonic modifier for this window.
+ * @param modifier The modifier mask used to activate
+ * mnemonics on this window.
+ */
+ void set_mnemonic_modifier(Gdk::ModifierType modifier);
+
+
+ /** Returns the mnemonic modifier for this window. See
+ * set_mnemonic_modifier().
+ * @return The modifier mask used to activate
+ * mnemonics on this window.
+ */
+ Gdk::ModifierType get_mnemonic_modifier();
+
+
+ /** Presents a window to the user. This may mean raising the window
+ * in the stacking order, deiconifying it, moving it to the current
+ * desktop, and/or giving it the keyboard focus, possibly dependent
+ * on the user's platform, window manager, and preferences.
+ *
+ * If @a window is hidden, this function calls Gtk::Widget::show()
+ * as well.
+ *
+ * This function should be used when the user tries to open a window
+ * that's already open. Say for example the preferences dialog is
+ * currently open, and the user chooses Preferences from the menu
+ * a second time; use present() to move the already-open dialog
+ * where the user can see it.
+ */
+ void present();
+
+
+ /** Asks to iconify (i.e.\ minimize) the specified @a window . Note that
+ * you shouldn't assume the window is definitely iconified afterward,
+ * because other entities (e.g. the user or window manager) could deiconify it
+ * again, or there may not be a window manager in which case
+ * iconification isn't possible, etc. But normally the window will end
+ * up iconified. Just don't write code that crashes if not.
+ *
+ * It's permitted to call this function before showing a window,
+ * in which case the window will be iconified before it ever appears
+ * onscreen.
+ *
+ * You can track iconification via the "window_state_event" signal
+ * on Gtk::Widget.
+ */
+ void iconify();
+
+ /** Asks to deiconify (i.e.\ unminimize) the specified @a window . Note
+ * that you shouldn't assume the window is definitely deiconified
+ * afterward, because other entities (e.g. the user or window manager) could iconify it
+ * again before your code which assumes deiconification gets to run.
+ *
+ * You can track iconification via the "window_state_event" signal
+ * on Gtk::Widget.
+ */
+ void deiconify();
+
+
+ /** Asks to stick @a window , which means that it will appear on all user
+ * desktops. Note that you shouldn't assume the window is definitely
+ * stuck afterward, because other entities (e.g. the user or window manager) could unstick it
+ * again, and some window managers do not support sticking
+ * windows. But normally the window will end up stuck. Just don't
+ * write code that crashes if not.
+ *
+ * It's permitted to call this function before showing a window.
+ *
+ * You can track stickiness via the "window_state_event" signal
+ * on Gtk::Widget.
+ */
+ void stick();
+
+ /** Asks to unstick @a window , which means that it will appear on only
+ * one of the user's desktops. Note that you shouldn't assume the
+ * window is definitely unstuck afterward, because other entities
+ * (e.g. the user or window
+ * manager) could stick it again. But normally the window will
+ * end up stuck. Just don't write code that crashes if not.
+ *
+ * You can track stickiness via the "window_state_event" signal
+ * on Gtk::Widget.
+ */
+ void unstick();
+
+
+ /** Asks to maximize @a window , so that it becomes full-screen. Note that
+ * you shouldn't assume the window is definitely maximized afterward,
+ * because other entities (e.g. the user or window manager) could unmaximize it
+ * again, and not all window managers support maximization. But
+ * normally the window will end up maximized. Just don't write code
+ * that crashes if not.
+ *
+ * It's permitted to call this function before showing a window,
+ * in which case the window will be maximized when it appears onscreen
+ * initially.
+ *
+ * You can track maximization via the "window_state_event" signal
+ * on Gtk::Widget.
+ */
+ void maximize();
+
+ /** Asks to unmaximize @a window . Note that you shouldn't assume the
+ * window is definitely unmaximized afterward, because other entities
+ * (e.g. the user or window
+ * manager) could maximize it again, and not all window
+ * managers honor requests to unmaximize. But normally the window will
+ * end up unmaximized. Just don't write code that crashes if not.
+ *
+ * You can track maximization via the "window_state_event" signal
+ * on Gtk::Widget.
+ */
+ void unmaximize();
+
+
+ /** Asks to place @a window in the fullscreen state. Note that you
+ * shouldn't assume the window is definitely full screen afterward,
+ * because other entities (e.g. the user or window manager) could unfullscreen it
+ * again, and not all window managers honor requests to fullscreen
+ * windows. But normally the window will end up fullscreen. Just
+ * don't write code that crashes if not.
+ *
+ * You can track the fullscreen state via the "window_state_event" signal
+ * on Gtk::Widget.
+ *
+ * Since: 2.2
+ */
+ void fullscreen();
+
+ /** Asks to toggle off the fullscreen state for @a window . Note that you
+ * shouldn't assume the window is definitely not full screen
+ * afterward, because other entities (e.g. the user or window manager) could fullscreen it
+ * again, and not all window managers honor requests to unfullscreen
+ * windows. But normally the window will end up restored to its normal
+ * state. Just don't write code that crashes if not.
+ *
+ * You can track the fullscreen state via the "window_state_event" signal
+ * on Gtk::Widget.
+ *
+ * Since: 2.2
+ */
+ void unfullscreen();
+
+
+ /** Starts resizing a window. This function is used if an application
+ * has window resizing controls. When GDK can support it, the resize
+ * will be done using the standard mechanism for the window manager or windowing
+ * system. Otherwise, GDK will try to emulate window resizing,
+ * potentially not all that well, depending on the windowing system.
+ * @param button Mouse button that initiated the drag.
+ * @param edge Position of the resize control.
+ * @param root_x X position where the user clicked to initiate the drag, in root window coordinates.
+ * @param root_y Y position where the user clicked to initiate the drag.
+ * @param timestamp Timestamp from the click event that initiated the drag.
+ */
+ void begin_resize_drag(Gdk::WindowEdge edge,
+ int button, int root_x, int root_y, guint32 timestamp);
+
+
+ /** Starts moving a window. This function is used if an application has
+ * window movement grips. When GDK can support it, the window movement
+ * will be done using the standard mechanism for the window manager or windowing
+ * system. Otherwise, GDK will try to emulate window movement,
+ * potentially not all that well, depending on the windowing system.
+ * @param button Mouse button that initiated the drag.
+ * @param root_x X position where the user clicked to initiate the drag, in root window coordinates.
+ * @param root_y Y position where the user clicked to initiate the drag.
+ * @param timestamp Timestamp from the click event that initiated the drag.
+ */
+ void begin_move_drag(
+ int button, int root_x, int root_y, guint32 timestamp);
+
+
+ /** Sets the default size of a window. If the window's "natural" size
+ * (its size request) is larger than the default, the default will be
+ * ignored. More generally, if the default size does not obey the
+ * geometry hints for the window (set_geometry_hints() can
+ * be used to set these explicitly), the default size will be clamped
+ * to the nearest permitted size.
+ *
+ * Unlike Gtk::Widget::set_size_request(), which sets a size request for
+ * a widget and thus would keep users from shrinking the window, this
+ * function only sets the initial size, just as if the user had
+ * resized the window themselves. Users can still shrink the window
+ * again as they normally would. Setting a default size of -1 means to
+ * use the "natural" default size (the size request of the window).
+ *
+ * For more control over a window's initial size and how resizing works,
+ * investigate set_geometry_hints().
+ *
+ * For some uses, resize() is a more appropriate function.
+ * resize() changes the current size of the window, rather
+ * than the size to be used on initial display. resize() always
+ * affects the window itself, not the geometry widget.
+ *
+ * The default size of a window only affects the first time a window is
+ * shown; if a window is hidden and re-shown, it will remember the size
+ * it had prior to hiding, rather than using the default size.
+ *
+ * Windows can't actually be 0x0 in size, they must be at least 1x1, but
+ * passing 0 for @a width and @a height is OK, resulting in a 1x1 default size.
+ * @param width Width in pixels, or -1 to unset the default width.
+ * @param height Height in pixels, or -1 to unset the default height.
+ */
+ void set_default_size(int width, int height);
+
+
+ /** Gets the default size of the window. A value of -1 for the width or
+ * height indicates that a default size has not been explicitly set
+ * for that dimension, so the "natural" size of the window will be
+ * used.
+ * @param width Location to store the default width.
+ * @param height Location to store the default height.
+ */
+ void get_default_size(int& width, int& height) const;
+
+
+ /** Resizes the window as if the user had done so, obeying geometry
+ * constraints. The default geometry constraint is that windows may
+ * not be smaller than their size request; to override this
+ * constraint, call Gtk::Widget::set_size_request() to set the window's
+ * request to a smaller value.
+ *
+ * If resize() is called before showing a window for the
+ * first time, it overrides any default size set with
+ * set_default_size().
+ *
+ * Windows may not be resized smaller than 1 by 1 pixels.
+ * @param width Width in pixels to resize the window to.
+ * @param height Height in pixels to resize the window to.
+ */
+ void resize(int width, int height);
+
+
+ /** Obtains the current size of @a window . If @a window is not onscreen,
+ * it returns the size GTK+ will suggest to the window manager for the initial window
+ * size (but this is not reliably the same as the size the window
+ * manager will actually select). The size obtained by
+ * get_size() is the last size received in a
+ * Gdk::EventConfigure, that is, GTK+ uses its locally-stored size,
+ * rather than querying the X server for the size. As a result, if you
+ * call resize() then immediately call
+ * get_size(), the size won't have taken effect yet. After
+ * the window manager processes the resize request, GTK+ receives
+ * notification that the size has changed via a configure event, and
+ * the size of the window gets updated.
+ *
+ * @note Nearly any use of this function creates a race condition,
+ * because the size of the window may change between the time that you
+ * get the size and the time that you perform some action assuming
+ * that size is the current size. To avoid race conditions, connect to
+ * "configure_event" on the window and adjust your size-dependent
+ * state to match the size delivered in the Gdk::EventConfigure.
+ *
+ * @note The returned size does <em>not</em> include the
+ * size of the window manager decorations (aka the window frame or
+ * border). Those are not drawn by GTK+ and GTK+ has no reliable
+ * method of determining their size.
+ *
+ * @note If you are getting a window size in order to position
+ * the window onscreen, there may be a better way. The preferred
+ * way is to simply set the window's semantic type with
+ * set_type_hint(), which allows the window manager to
+ * e.g. center dialogs. Also, if you set the transient parent of
+ * dialogs with set_transient_for() window managers
+ * will often center the dialog over its parent window. It's
+ * much preferred to let the window manager handle these
+ * things rather than doing it yourself, because all apps will
+ * behave consistently and according to user prefs if the window
+ * manager handles it. Also, the window manager can take the size
+ * of the window decorations/border into account, while your
+ * application cannot.
+ *
+ * In any case, if you insist on application-specified window
+ * positioning, there's <em>still</em> a better way than
+ * doing it yourself - set_position() will frequently
+ * handle the details for you.
+ * @param width Return location for width.
+ * @param height Return location for height.
+ */
+ void get_size(int& width, int& height) const;
+
+
+ /** Asks the window manager to move
+ * @a window to the given position. %Window managers are free to ignore
+ * this; most window managers ignore requests for initial window
+ * positions (instead using a user-defined placement algorithm) and
+ * honor requests after the window has already been shown.
+ *
+ * @note the position is the position of the gravity-determined
+ * reference point for the window. The gravity determines two things:
+ * first, the location of the reference point in root window
+ * coordinates; and second, which point on the window is positioned at
+ * the reference point.
+ *
+ * By default the gravity is Gdk::GRAVITY_NORTH_WEST, so the reference
+ * point is simply the @a x , @a y supplied to move(). The
+ * top-left corner of the window decorations (aka window frame or
+ * border) will be placed at @a x , @a y . Therefore, to position a window
+ * at the top left of the screen, you want to use the default gravity
+ * (which is Gdk::GRAVITY_NORTH_WEST) and move the window to 0,0.
+ *
+ * To position a window at the bottom right corner of the screen, you
+ * would set Gdk::GRAVITY_SOUTH_EAST, which means that the reference
+ * point is at @a x + the window width and @a y + the window height, and
+ * the bottom-right corner of the window border will be placed at that
+ * reference point. So, to place a window in the bottom right corner
+ * you would first set gravity to south east, then write:
+ * <tt>gtk_window_move (window, gdk_screen_width() - window_width,
+ * gdk_screen_height() - window_height)</tt>.
+ *
+ * The Extended Window Manager Hints specification at
+ * http://www.freedesktop.org/standards/wm-spec has a
+ * nice table of gravities in the "implementation notes" section.
+ *
+ * The get_position() documentation may also be relevant.
+ * @param x X coordinate to move window to.
+ * @param y Y coordinate to move window to.
+ */
+ void move(int x, int y);
+
+
+ /** This function returns the position you need to pass to
+ * move() to keep @a window in its current position. This
+ * means that the meaning of the returned value varies with window
+ * gravity. See move() for more details.
+ *
+ * If you haven't changed the window gravity, its gravity will be
+ * Gdk::GRAVITY_NORTH_WEST. This means that get_position()
+ * gets the position of the top-left corner of the window manager
+ * frame for the window. move() sets the position of this
+ * same top-left corner.
+ *
+ * get_position() is not 100% reliable because the X&nbsp;%Window System
+ * does not specify a way to obtain the geometry of the
+ * decorations placed on a window by the window manager.
+ * Thus GTK+ is using a "best guess" that works with most
+ * window managers.
+ *
+ * Moreover, nearly all window managers are historically broken with
+ * respect to their handling of window gravity. So moving a window to
+ * its current position as returned by get_position() tends
+ * to result in moving the window slightly. %Window managers are
+ * slowly getting better over time.
+ *
+ * If a window has gravity Gdk::GRAVITY_STATIC the window manager
+ * frame is not relevant, and thus get_position() will
+ * always produce accurate results. However you can't use static
+ * gravity to do things like place a window in a corner of the screen,
+ * because static gravity ignores the window manager decorations.
+ *
+ * If you are saving and restoring your application's window
+ * positions, you should know that it's impossible for applications to
+ * do this without getting it somewhat wrong because applications do
+ * not have sufficient knowledge of window manager state. The Correct
+ * Mechanism is to support the session management protocol (see the
+ * "GnomeClient" object in the GNOME libraries for example) and allow
+ * the window manager to save your window sizes and positions.
+ * @param root_x Return location for X coordinate of gravity-determined reference point.
+ * @param root_y Return location for Y coordinate of gravity-determined reference point.
+ */
+ void get_position(int& root_x, int& root_y) const;
+
+
+ /** Parses a standard X&nbsp;%Window System geometry string - see the
+ * manual page for X (type 'man X') for details on this.
+ * parse_geometry() does work on all GTK+ ports
+ * including Win32 but is primarily intended for an X environment.
+ *
+ * If either a size or a position can be extracted from the
+ * geometry string, parse_geometry() returns <tt>true</tt>
+ * and calls set_default_size() and/or move()
+ * to resize/move the window.
+ *
+ * If parse_geometry() returns <tt>true</tt>, it will also
+ * set the Gdk::HINT_USER_POS and/or Gdk::HINT_USER_SIZE hints
+ * indicating to the window manager that the size/position of
+ * the window was user-specified. This causes most window
+ * managers to honor the geometry.
+ *
+ * Note that for parse_geometry() to work as expected, it has
+ * to be called when the window has its "final" size, i.e. after calling
+ * Gtk::Widget::show_all() on the contents and set_geometry_hints()
+ * on the window.
+ *
+ * @code
+ * int
+ * main (int argc, char *argv[])
+ * {
+ * GtkWidget *window, vbox;
+ * GdkGeometry size_hints;
+ *
+ * gtk_init (&amp;argc, &amp;argv);
+ *
+ * window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ * vbox = gtk_vbox_new (<tt>false</tt>, 0);
+ *
+ * gtk_container_add (GTK_CONTAINER (window), vbox);
+ * fill_with_content (vbox);
+ * gtk_widget_show_all (vbox);
+ *
+ * size_hints = {
+ * 100, 50, 0, 0, 100, 50, 10, 10, 0.0, 0.0, GDK_GRAVITY_NORTH_WEST
+ * };
+ *
+ * gtk_window_set_geometry_hints (GTK_WINDOW (window),
+ * window,
+ * &amp;size_hints,
+ * GDK_HINT_MIN_SIZE |
+ * GDK_HINT_BASE_SIZE |
+ * GDK_HINT_RESIZE_INC);
+ *
+ * if (argc &gt; 1)
+ * {
+ * if (!gtk_window_parse_geometry (GTK_WINDOW (window), argv[1]))
+ * fprintf (stderr, "Failed to parse '&percnt;s'<tt>\\n</tt>", argv[1]);
+ * }
+ *
+ * gtk_widget_show_all (window);
+ * gtk_main();
+ *
+ * return 0;
+ * }
+ * @endcode
+ * @param geometry Geometry string.
+ * @return <tt>true</tt> if string was parsed successfully.
+ */
+ bool parse_geometry(const Glib::ustring& geometry);
+
+
+ /** Hides @a window , then reshows it, resetting the
+ * default size and position of the window. Used
+ * by GUI builders only.
+ */
+ void reshow_with_initial_size();
+
+
+ /** Sets an icon to be used as fallback for windows that haven't
+ * had set_icon() called on them from a pixbuf.
+ *
+ * Since: 2.4
+ * @param icon The icon.
+ */
+ static void set_default_icon(const Glib::RefPtr<Gdk::Pixbuf>& icon);
+
+ /** Asks to keep @a window above, so that it stays on top. Note that
+ * you shouldn't assume the window is definitely above afterward,
+ * because other entities (e.g. the user or window manager) could not keep it above,
+ * and not all window managers support keeping windows above. But
+ * normally the window will end kept above. Just don't write code
+ * that crashes if not.
+ *
+ * It's permitted to call this function before showing a window,
+ * in which case the window will be kept above when it appears onscreen
+ * initially.
+ *
+ * You can track the above state via the "window_state_event" signal
+ * on Gtk::Widget.
+ *
+ * Note that, according to the Extended Window Manager Hints
+ * specification, the above state is mainly meant for user preferences and should not be used
+ * by applications e.g. for drawing attention to their dialogs.
+ *
+ * Since: 2.4
+ * @param setting Whether to keep @a window above other windows.
+ */
+ void set_keep_above(bool setting = true);
+
+ /** Asks to keep @a window below, so that it stays in bottom. Note that
+ * you shouldn't assume the window is definitely below afterward,
+ * because other entities (e.g. the user or window manager) could not keep it below,
+ * and not all window managers support putting windows below. But
+ * normally the window will be kept below. Just don't write code
+ * that crashes if not.
+ *
+ * It's permitted to call this function before showing a window,
+ * in which case the window will be kept below when it appears onscreen
+ * initially.
+ *
+ * You can track the below state via the "window_state_event" signal
+ * on Gtk::Widget.
+ *
+ * Note that, according to the Extended Window Manager Hints
+ * specification, the above state is mainly meant for user preferences and should not be used
+ * by applications e.g. for drawing attention to their dialogs.
+ *
+ * Since: 2.4
+ * @param setting Whether to keep @a window below other windows.
+ */
+ void set_keep_below(bool setting = true);
+
+
+ /** Returns a default accel group for this window
+ * This is a gtkmm-specific function. This accel group can not
+ * be removed.
+ */
+ Glib::RefPtr<AccelGroup> get_accel_group();
+
+ /** Brings the window to the front.
+ * This is just a more obvious convenience wrapper for get_window()->raise().
+ */
+ virtual void raise();
+
+ ///Overriden to warn that it doesn't make sense to use Gtk::manage() on this class because it has no parent container.
+ virtual void set_manage();
+
+protected:
+
+ //See comments in the implementations:
+ void destroy_();
+ void _destroy_c_instance();
+
+private:
+
+ //We'll create an accel_group if it's requested, and remember it.
+ //Otherwise, you'd have to create it, add it to the window, then remember it somewhere else while you add it to other widgets.
+ Glib::RefPtr<AccelGroup> accel_group_;
+
+
+};
+
+
+class WindowGroup : public Glib::Object
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef WindowGroup CppObjectType;
+ typedef WindowGroup_Class CppClassType;
+ typedef GtkWindowGroup BaseObjectType;
+ typedef GtkWindowGroupClass BaseClassType;
+
+private: friend class WindowGroup_Class;
+ static CppClassType windowgroup_class_;
+
+private:
+ // noncopyable
+ WindowGroup(const WindowGroup&);
+ WindowGroup& operator=(const WindowGroup&);
+
+protected:
+ explicit WindowGroup(const Glib::ConstructParams& construct_params);
+ explicit WindowGroup(GtkWindowGroup* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~WindowGroup();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ GtkWindowGroup* gobj() { return reinterpret_cast<GtkWindowGroup*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const GtkWindowGroup* gobj() const { return reinterpret_cast<GtkWindowGroup*>(gobject_); }
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ GtkWindowGroup* gobj_copy();
+
+private:
+
+
+protected:
+ WindowGroup();
+
+public:
+
+ static Glib::RefPtr<WindowGroup> create();
+
+
+ /** Adds a window to a Gtk::WindowGroup.
+ * @param window The Gtk::Window to add.
+ */
+ void add_window(Window& window);
+
+ /** Removes a window from a Gtk::WindowGroup.
+ * @param window The Gtk::Window to remove.
+ */
+ void remove_window(Window& window);
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+};
+
+} // namespace Gtk
+
+
+namespace Glib
+{
+ /** @relates Gtk::Window
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gtk::Window* wrap(GtkWindow* object, bool take_copy = false);
+}
+
+namespace Glib
+{
+ /** @relates Gtk::WindowGroup
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Gtk::WindowGroup> wrap(GtkWindowGroup* object, bool take_copy = false);
+}
+
+
+#endif /* _GTKMM_WINDOW_H */
+
diff --git a/libs/gtkmm2/gtk/gtkmm/wrap_init.cc b/libs/gtkmm2/gtk/gtkmm/wrap_init.cc
new file mode 100644
index 0000000000..9c1713c033
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/wrap_init.cc
@@ -0,0 +1,740 @@
+
+#include <glib.h>
+
+// Disable the 'const' function attribute of the get_type() functions.
+// GCC would optimize them out because we don't use the return value.
+#undef G_GNUC_CONST
+#define G_GNUC_CONST /* empty */
+
+#include <gtkmm/wrap_init.h>
+#include <glibmm/error.h>
+#include <glibmm/object.h>
+
+// #include the widget headers so that we can call the get_type() static methods:
+
+#include "plug.h"
+#include "socket.h"
+#include "aboutdialog.h"
+#include "accelgroup.h"
+#include "accellabel.h"
+#include "action.h"
+#include "actiongroup.h"
+#include "adjustment.h"
+#include "alignment.h"
+#include "arrow.h"
+#include "aspectframe.h"
+#include "bin.h"
+#include "box.h"
+#include "button.h"
+#include "buttonbox.h"
+#include "calendar.h"
+#include "celleditable.h"
+#include "celllayout.h"
+#include "cellview.h"
+#include "cellrenderer.h"
+#include "cellrenderercombo.h"
+#include "cellrendererpixbuf.h"
+#include "cellrendererprogress.h"
+#include "cellrenderertext.h"
+#include "cellrenderertoggle.h"
+#include "checkbutton.h"
+#include "checkmenuitem.h"
+#include "clipboard.h"
+#include "colorselection.h"
+#include "colorbutton.h"
+#include "combobox.h"
+#include "comboboxentry.h"
+#include "container.h"
+#include "curve.h"
+#include "dialog.h"
+#include "drawingarea.h"
+#include "editable.h"
+#include "entry.h"
+#include "entrycompletion.h"
+#include "enums.h"
+#include "eventbox.h"
+#include "expander.h"
+#include "filechooser.h"
+#include "filechooserbutton.h"
+#include "filechooserwidget.h"
+#include "filechooserdialog.h"
+#include "filefilter.h"
+#include "fileselection.h"
+#include "fixed.h"
+#include "fontbutton.h"
+#include "fontselection.h"
+#include "frame.h"
+#include "handlebox.h"
+#include "iconfactory.h"
+#include "iconset.h"
+#include "iconsource.h"
+#include "iconinfo.h"
+#include "icontheme.h"
+#include "iconview.h"
+#include "image.h"
+#include "imagemenuitem.h"
+#include "inputdialog.h"
+#include "invisible.h"
+#include "item.h"
+#include "label.h"
+#include "layout.h"
+#include "liststore.h"
+#include "main.h"
+#include "menu.h"
+#include "menubar.h"
+#include "menuitem.h"
+#include "menushell.h"
+#include "menutoolbutton.h"
+#include "messagedialog.h"
+#include "misc.h"
+#include "notebook.h"
+#include "object.h"
+#include "optionmenu.h"
+#include "paned.h"
+#include "progressbar.h"
+#include "radioaction.h"
+#include "radiobutton.h"
+#include "radiomenuitem.h"
+#include "radiotoolbutton.h"
+#include "range.h"
+#include "rc.h"
+#include "ruler.h"
+#include "scale.h"
+#include "scrollbar.h"
+#include "scrolledwindow.h"
+#include "selectiondata.h"
+#include "separator.h"
+#include "separatormenuitem.h"
+#include "separatortoolitem.h"
+#include "settings.h"
+#include "sizegroup.h"
+#include "spinbutton.h"
+#include "statusbar.h"
+#include "stockitem.h"
+#include "style.h"
+#include "table.h"
+#include "targetlist.h"
+#include "tearoffmenuitem.h"
+#include "textattributes.h"
+#include "textbuffer.h"
+#include "textchildanchor.h"
+#include "textiter.h"
+#include "textmark.h"
+#include "texttag.h"
+#include "texttagtable.h"
+#include "textview.h"
+#include "toggleaction.h"
+#include "togglebutton.h"
+#include "toggletoolbutton.h"
+#include "toolbar.h"
+#include "toolitem.h"
+#include "toolbutton.h"
+#include "tooltips.h"
+#include "treedragdest.h"
+#include "treedragsource.h"
+#include "treepath.h"
+#include "treerowreference.h"
+#include "treeselection.h"
+#include "treesortable.h"
+#include "treeiter.h"
+#include "treemodel.h"
+#include "treemodelfilter.h"
+#include "treemodelsort.h"
+#include "treestore.h"
+#include "treeview.h"
+#include "treeviewcolumn.h"
+#include "viewport.h"
+#include "uimanager.h"
+#include "widget.h"
+#include "window.h"
+#include "combo.h"
+
+extern "C"
+{
+
+//Declarations of the *_get_type() functions:
+
+GType gtk_about_dialog_get_type(void);
+GType gtk_accel_group_get_type(void);
+GType gtk_accel_label_get_type(void);
+GType gtk_action_get_type(void);
+GType gtk_action_group_get_type(void);
+GType gtk_adjustment_get_type(void);
+GType gtk_alignment_get_type(void);
+GType gtk_arrow_get_type(void);
+GType gtk_aspect_frame_get_type(void);
+GType gtk_bin_get_type(void);
+GType gtk_box_get_type(void);
+GType gtk_button_get_type(void);
+GType gtk_button_box_get_type(void);
+GType gtk_calendar_get_type(void);
+GType gtk_cell_renderer_get_type(void);
+GType gtk_cell_renderer_combo_get_type(void);
+GType gtk_cell_renderer_pixbuf_get_type(void);
+GType gtk_cell_renderer_progress_get_type(void);
+GType gtk_cell_renderer_text_get_type(void);
+GType gtk_cell_renderer_toggle_get_type(void);
+GType gtk_cell_view_get_type(void);
+GType gtk_check_button_get_type(void);
+GType gtk_check_menu_item_get_type(void);
+GType gtk_clipboard_get_type(void);
+GType gtk_color_button_get_type(void);
+GType gtk_color_selection_get_type(void);
+GType gtk_color_selection_dialog_get_type(void);
+GType gtk_combo_get_type(void);
+GType gtk_combo_box_get_type(void);
+GType gtk_combo_box_entry_get_type(void);
+GType gtk_list_get_type(void);
+GType gtk_list_item_get_type(void);
+GType gtk_container_get_type(void);
+GType gtk_curve_get_type(void);
+GType gtk_dialog_get_type(void);
+GType gtk_drawing_area_get_type(void);
+GType gtk_entry_get_type(void);
+GType gtk_entry_completion_get_type(void);
+GType gtk_event_box_get_type(void);
+GType gtk_expander_get_type(void);
+GType gtk_file_chooser_button_get_type(void);
+GType gtk_file_chooser_dialog_get_type(void);
+GType gtk_file_chooser_widget_get_type(void);
+GType gtk_file_filter_get_type(void);
+GType gtk_file_selection_get_type(void);
+GType gtk_fixed_get_type(void);
+GType gtk_font_button_get_type(void);
+GType gtk_font_selection_get_type(void);
+GType gtk_font_selection_dialog_get_type(void);
+GType gtk_frame_get_type(void);
+GType gtk_gamma_curve_get_type(void);
+GType gtk_hbox_get_type(void);
+GType gtk_hbutton_box_get_type(void);
+GType gtk_hpaned_get_type(void);
+GType gtk_hruler_get_type(void);
+GType gtk_hscale_get_type(void);
+GType gtk_hscrollbar_get_type(void);
+GType gtk_hseparator_get_type(void);
+GType gtk_handle_box_get_type(void);
+GType gtk_icon_factory_get_type(void);
+GType gtk_icon_theme_get_type(void);
+GType gtk_icon_view_get_type(void);
+GType gtk_image_get_type(void);
+GType gtk_image_menu_item_get_type(void);
+GType gtk_input_dialog_get_type(void);
+GType gtk_invisible_get_type(void);
+GType gtk_item_get_type(void);
+GType gtk_label_get_type(void);
+GType gtk_layout_get_type(void);
+GType gtk_list_store_get_type(void);
+GType gtk_menu_get_type(void);
+GType gtk_menu_bar_get_type(void);
+GType gtk_menu_item_get_type(void);
+GType gtk_menu_shell_get_type(void);
+GType gtk_menu_tool_button_get_type(void);
+GType gtk_message_dialog_get_type(void);
+GType gtk_misc_get_type(void);
+GType gtk_notebook_get_type(void);
+GType gtk_object_get_type(void);
+GType gtk_option_menu_get_type(void);
+GType gtk_paned_get_type(void);
+#ifndef G_OS_WIN32
+GType gtk_plug_get_type(void);
+#endif //G_OS_WIN32
+GType gtk_progress_bar_get_type(void);
+GType gtk_radio_action_get_type(void);
+GType gtk_radio_button_get_type(void);
+GType gtk_radio_menu_item_get_type(void);
+GType gtk_radio_tool_button_get_type(void);
+GType gtk_range_get_type(void);
+GType gtk_rc_style_get_type(void);
+GType gtk_ruler_get_type(void);
+GType gtk_scale_get_type(void);
+GType gtk_scrollbar_get_type(void);
+GType gtk_scrolled_window_get_type(void);
+GType gtk_separator_get_type(void);
+GType gtk_separator_menu_item_get_type(void);
+GType gtk_separator_tool_item_get_type(void);
+GType gtk_settings_get_type(void);
+GType gtk_size_group_get_type(void);
+#ifndef G_OS_WIN32
+GType gtk_socket_get_type(void);
+#endif //G_OS_WIN32
+GType gtk_spin_button_get_type(void);
+GType gtk_statusbar_get_type(void);
+GType gtk_style_get_type(void);
+GType gtk_table_get_type(void);
+GType gtk_tearoff_menu_item_get_type(void);
+GType gtk_text_buffer_get_type(void);
+GType gtk_text_child_anchor_get_type(void);
+GType gtk_text_mark_get_type(void);
+GType gtk_text_tag_get_type(void);
+GType gtk_text_tag_table_get_type(void);
+GType gtk_text_view_get_type(void);
+GType gtk_toggle_action_get_type(void);
+GType gtk_toggle_button_get_type(void);
+GType gtk_toggle_tool_button_get_type(void);
+GType gtk_tool_button_get_type(void);
+GType gtk_tool_item_get_type(void);
+GType gtk_toolbar_get_type(void);
+GType gtk_tooltips_get_type(void);
+GType gtk_tree_model_filter_get_type(void);
+GType gtk_tree_model_sort_get_type(void);
+GType gtk_tree_selection_get_type(void);
+GType gtk_tree_store_get_type(void);
+GType gtk_tree_view_get_type(void);
+GType gtk_tree_view_column_get_type(void);
+GType gtk_ui_manager_get_type(void);
+GType gtk_vbox_get_type(void);
+GType gtk_vbutton_box_get_type(void);
+GType gtk_vpaned_get_type(void);
+GType gtk_vruler_get_type(void);
+GType gtk_vscale_get_type(void);
+GType gtk_vscrollbar_get_type(void);
+GType gtk_vseparator_get_type(void);
+GType gtk_viewport_get_type(void);
+GType gtk_widget_get_type(void);
+GType gtk_window_get_type(void);
+GType gtk_window_group_get_type(void);
+
+//Declarations of the *_error_quark() functions:
+
+GQuark gtk_file_chooser_error_quark(void);
+GQuark gtk_icon_theme_error_quark(void);
+} // extern "C"
+
+
+//Declarations of the *_Class::wrap_new() methods, instead of including all the private headers:
+
+namespace Gtk { class AboutDialog_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class AccelGroup_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class AccelLabel_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class Action_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class ActionGroup_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class Adjustment_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class Alignment_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class Arrow_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class AspectFrame_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class Bin_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class Box_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class Button_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class ButtonBox_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class Calendar_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class CellRenderer_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class CellRendererCombo_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class CellRendererPixbuf_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class CellRendererProgress_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class CellRendererText_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class CellRendererToggle_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class CellView_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class CheckButton_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class CheckMenuItem_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class Clipboard_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class ColorButton_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class ColorSelection_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class ColorSelectionDialog_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class Combo_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class ComboBox_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class ComboBoxEntry_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class ComboDropDown_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class ComboDropDownItem_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class Container_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class Curve_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class Dialog_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class DrawingArea_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class Entry_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class EntryCompletion_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class EventBox_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class Expander_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class FileChooserButton_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class FileChooserDialog_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class FileChooserWidget_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class FileFilter_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class FileSelection_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class Fixed_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class FontButton_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class FontSelection_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class FontSelectionDialog_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class Frame_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class GammaCurve_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class HBox_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class HButtonBox_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class HPaned_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class HRuler_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class HScale_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class HScrollbar_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class HSeparator_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class HandleBox_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class IconFactory_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class IconTheme_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class IconView_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class Image_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class ImageMenuItem_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class InputDialog_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class Invisible_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class Item_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class Label_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class Layout_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class ListStore_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class Menu_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class MenuBar_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class MenuItem_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class MenuShell_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class MenuToolButton_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class MessageDialog_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class Misc_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class Notebook_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class Object_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class OptionMenu_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class Paned_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+#ifndef G_OS_WIN32
+namespace Gtk { class Plug_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+#endif //G_OS_WIN32
+namespace Gtk { class ProgressBar_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class RadioAction_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class RadioButton_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class RadioMenuItem_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class RadioToolButton_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class Range_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class RcStyle_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class Ruler_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class Scale_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class Scrollbar_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class ScrolledWindow_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class Separator_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class SeparatorMenuItem_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class SeparatorToolItem_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class Settings_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class SizeGroup_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+#ifndef G_OS_WIN32
+namespace Gtk { class Socket_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+#endif //G_OS_WIN32
+namespace Gtk { class SpinButton_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class Statusbar_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class Style_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class Table_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class TearoffMenuItem_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class TextBuffer_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class TextChildAnchor_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class TextMark_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class TextTag_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class TextTagTable_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class TextView_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class ToggleAction_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class ToggleButton_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class ToggleToolButton_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class ToolButton_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class ToolItem_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class Toolbar_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class Tooltips_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class TreeModelFilter_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class TreeModelSort_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class TreeSelection_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class TreeStore_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class TreeView_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class TreeViewColumn_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class UIManager_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class VBox_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class VButtonBox_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class VPaned_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class VRuler_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class VScale_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class VScrollbar_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class VSeparator_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class Viewport_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class Widget_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class Window_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Gtk { class WindowGroup_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+
+namespace Gtk {
+
+void wrap_init()
+{
+ // Register Error domains:
+ Glib::Error::register_domain(gtk_file_chooser_error_quark(), &Gtk::FileChooserError::throw_func);
+ Glib::Error::register_domain(gtk_icon_theme_error_quark(), &Gtk::IconThemeError::throw_func);
+
+// Map gtypes to gtkmm wrapper-creation functions:
+ Glib::wrap_register(gtk_about_dialog_get_type(), &Gtk::AboutDialog_Class::wrap_new);
+ Glib::wrap_register(gtk_accel_group_get_type(), &Gtk::AccelGroup_Class::wrap_new);
+ Glib::wrap_register(gtk_accel_label_get_type(), &Gtk::AccelLabel_Class::wrap_new);
+ Glib::wrap_register(gtk_action_get_type(), &Gtk::Action_Class::wrap_new);
+ Glib::wrap_register(gtk_action_group_get_type(), &Gtk::ActionGroup_Class::wrap_new);
+ Glib::wrap_register(gtk_adjustment_get_type(), &Gtk::Adjustment_Class::wrap_new);
+ Glib::wrap_register(gtk_alignment_get_type(), &Gtk::Alignment_Class::wrap_new);
+ Glib::wrap_register(gtk_arrow_get_type(), &Gtk::Arrow_Class::wrap_new);
+ Glib::wrap_register(gtk_aspect_frame_get_type(), &Gtk::AspectFrame_Class::wrap_new);
+ Glib::wrap_register(gtk_bin_get_type(), &Gtk::Bin_Class::wrap_new);
+ Glib::wrap_register(gtk_box_get_type(), &Gtk::Box_Class::wrap_new);
+ Glib::wrap_register(gtk_button_get_type(), &Gtk::Button_Class::wrap_new);
+ Glib::wrap_register(gtk_button_box_get_type(), &Gtk::ButtonBox_Class::wrap_new);
+ Glib::wrap_register(gtk_calendar_get_type(), &Gtk::Calendar_Class::wrap_new);
+ Glib::wrap_register(gtk_cell_renderer_get_type(), &Gtk::CellRenderer_Class::wrap_new);
+ Glib::wrap_register(gtk_cell_renderer_combo_get_type(), &Gtk::CellRendererCombo_Class::wrap_new);
+ Glib::wrap_register(gtk_cell_renderer_pixbuf_get_type(), &Gtk::CellRendererPixbuf_Class::wrap_new);
+ Glib::wrap_register(gtk_cell_renderer_progress_get_type(), &Gtk::CellRendererProgress_Class::wrap_new);
+ Glib::wrap_register(gtk_cell_renderer_text_get_type(), &Gtk::CellRendererText_Class::wrap_new);
+ Glib::wrap_register(gtk_cell_renderer_toggle_get_type(), &Gtk::CellRendererToggle_Class::wrap_new);
+ Glib::wrap_register(gtk_cell_view_get_type(), &Gtk::CellView_Class::wrap_new);
+ Glib::wrap_register(gtk_check_button_get_type(), &Gtk::CheckButton_Class::wrap_new);
+ Glib::wrap_register(gtk_check_menu_item_get_type(), &Gtk::CheckMenuItem_Class::wrap_new);
+ Glib::wrap_register(gtk_clipboard_get_type(), &Gtk::Clipboard_Class::wrap_new);
+ Glib::wrap_register(gtk_color_button_get_type(), &Gtk::ColorButton_Class::wrap_new);
+ Glib::wrap_register(gtk_color_selection_get_type(), &Gtk::ColorSelection_Class::wrap_new);
+ Glib::wrap_register(gtk_color_selection_dialog_get_type(), &Gtk::ColorSelectionDialog_Class::wrap_new);
+ Glib::wrap_register(gtk_combo_get_type(), &Gtk::Combo_Class::wrap_new);
+ Glib::wrap_register(gtk_combo_box_get_type(), &Gtk::ComboBox_Class::wrap_new);
+ Glib::wrap_register(gtk_combo_box_entry_get_type(), &Gtk::ComboBoxEntry_Class::wrap_new);
+ Glib::wrap_register(gtk_list_get_type(), &Gtk::ComboDropDown_Class::wrap_new);
+ Glib::wrap_register(gtk_list_item_get_type(), &Gtk::ComboDropDownItem_Class::wrap_new);
+ Glib::wrap_register(gtk_container_get_type(), &Gtk::Container_Class::wrap_new);
+ Glib::wrap_register(gtk_curve_get_type(), &Gtk::Curve_Class::wrap_new);
+ Glib::wrap_register(gtk_dialog_get_type(), &Gtk::Dialog_Class::wrap_new);
+ Glib::wrap_register(gtk_drawing_area_get_type(), &Gtk::DrawingArea_Class::wrap_new);
+ Glib::wrap_register(gtk_entry_get_type(), &Gtk::Entry_Class::wrap_new);
+ Glib::wrap_register(gtk_entry_completion_get_type(), &Gtk::EntryCompletion_Class::wrap_new);
+ Glib::wrap_register(gtk_event_box_get_type(), &Gtk::EventBox_Class::wrap_new);
+ Glib::wrap_register(gtk_expander_get_type(), &Gtk::Expander_Class::wrap_new);
+ Glib::wrap_register(gtk_file_chooser_button_get_type(), &Gtk::FileChooserButton_Class::wrap_new);
+ Glib::wrap_register(gtk_file_chooser_dialog_get_type(), &Gtk::FileChooserDialog_Class::wrap_new);
+ Glib::wrap_register(gtk_file_chooser_widget_get_type(), &Gtk::FileChooserWidget_Class::wrap_new);
+ Glib::wrap_register(gtk_file_filter_get_type(), &Gtk::FileFilter_Class::wrap_new);
+ Glib::wrap_register(gtk_file_selection_get_type(), &Gtk::FileSelection_Class::wrap_new);
+ Glib::wrap_register(gtk_fixed_get_type(), &Gtk::Fixed_Class::wrap_new);
+ Glib::wrap_register(gtk_font_button_get_type(), &Gtk::FontButton_Class::wrap_new);
+ Glib::wrap_register(gtk_font_selection_get_type(), &Gtk::FontSelection_Class::wrap_new);
+ Glib::wrap_register(gtk_font_selection_dialog_get_type(), &Gtk::FontSelectionDialog_Class::wrap_new);
+ Glib::wrap_register(gtk_frame_get_type(), &Gtk::Frame_Class::wrap_new);
+ Glib::wrap_register(gtk_gamma_curve_get_type(), &Gtk::GammaCurve_Class::wrap_new);
+ Glib::wrap_register(gtk_hbox_get_type(), &Gtk::HBox_Class::wrap_new);
+ Glib::wrap_register(gtk_hbutton_box_get_type(), &Gtk::HButtonBox_Class::wrap_new);
+ Glib::wrap_register(gtk_hpaned_get_type(), &Gtk::HPaned_Class::wrap_new);
+ Glib::wrap_register(gtk_hruler_get_type(), &Gtk::HRuler_Class::wrap_new);
+ Glib::wrap_register(gtk_hscale_get_type(), &Gtk::HScale_Class::wrap_new);
+ Glib::wrap_register(gtk_hscrollbar_get_type(), &Gtk::HScrollbar_Class::wrap_new);
+ Glib::wrap_register(gtk_hseparator_get_type(), &Gtk::HSeparator_Class::wrap_new);
+ Glib::wrap_register(gtk_handle_box_get_type(), &Gtk::HandleBox_Class::wrap_new);
+ Glib::wrap_register(gtk_icon_factory_get_type(), &Gtk::IconFactory_Class::wrap_new);
+ Glib::wrap_register(gtk_icon_theme_get_type(), &Gtk::IconTheme_Class::wrap_new);
+ Glib::wrap_register(gtk_icon_view_get_type(), &Gtk::IconView_Class::wrap_new);
+ Glib::wrap_register(gtk_image_get_type(), &Gtk::Image_Class::wrap_new);
+ Glib::wrap_register(gtk_image_menu_item_get_type(), &Gtk::ImageMenuItem_Class::wrap_new);
+ Glib::wrap_register(gtk_input_dialog_get_type(), &Gtk::InputDialog_Class::wrap_new);
+ Glib::wrap_register(gtk_invisible_get_type(), &Gtk::Invisible_Class::wrap_new);
+ Glib::wrap_register(gtk_item_get_type(), &Gtk::Item_Class::wrap_new);
+ Glib::wrap_register(gtk_label_get_type(), &Gtk::Label_Class::wrap_new);
+ Glib::wrap_register(gtk_layout_get_type(), &Gtk::Layout_Class::wrap_new);
+ Glib::wrap_register(gtk_list_store_get_type(), &Gtk::ListStore_Class::wrap_new);
+ Glib::wrap_register(gtk_menu_get_type(), &Gtk::Menu_Class::wrap_new);
+ Glib::wrap_register(gtk_menu_bar_get_type(), &Gtk::MenuBar_Class::wrap_new);
+ Glib::wrap_register(gtk_menu_item_get_type(), &Gtk::MenuItem_Class::wrap_new);
+ Glib::wrap_register(gtk_menu_shell_get_type(), &Gtk::MenuShell_Class::wrap_new);
+ Glib::wrap_register(gtk_menu_tool_button_get_type(), &Gtk::MenuToolButton_Class::wrap_new);
+ Glib::wrap_register(gtk_message_dialog_get_type(), &Gtk::MessageDialog_Class::wrap_new);
+ Glib::wrap_register(gtk_misc_get_type(), &Gtk::Misc_Class::wrap_new);
+ Glib::wrap_register(gtk_notebook_get_type(), &Gtk::Notebook_Class::wrap_new);
+ Glib::wrap_register(gtk_object_get_type(), &Gtk::Object_Class::wrap_new);
+ Glib::wrap_register(gtk_option_menu_get_type(), &Gtk::OptionMenu_Class::wrap_new);
+ Glib::wrap_register(gtk_paned_get_type(), &Gtk::Paned_Class::wrap_new);
+#ifndef G_OS_WIN32
+ Glib::wrap_register(gtk_plug_get_type(), &Gtk::Plug_Class::wrap_new);
+#endif //G_OS_WIN32
+ Glib::wrap_register(gtk_progress_bar_get_type(), &Gtk::ProgressBar_Class::wrap_new);
+ Glib::wrap_register(gtk_radio_action_get_type(), &Gtk::RadioAction_Class::wrap_new);
+ Glib::wrap_register(gtk_radio_button_get_type(), &Gtk::RadioButton_Class::wrap_new);
+ Glib::wrap_register(gtk_radio_menu_item_get_type(), &Gtk::RadioMenuItem_Class::wrap_new);
+ Glib::wrap_register(gtk_radio_tool_button_get_type(), &Gtk::RadioToolButton_Class::wrap_new);
+ Glib::wrap_register(gtk_range_get_type(), &Gtk::Range_Class::wrap_new);
+ Glib::wrap_register(gtk_rc_style_get_type(), &Gtk::RcStyle_Class::wrap_new);
+ Glib::wrap_register(gtk_ruler_get_type(), &Gtk::Ruler_Class::wrap_new);
+ Glib::wrap_register(gtk_scale_get_type(), &Gtk::Scale_Class::wrap_new);
+ Glib::wrap_register(gtk_scrollbar_get_type(), &Gtk::Scrollbar_Class::wrap_new);
+ Glib::wrap_register(gtk_scrolled_window_get_type(), &Gtk::ScrolledWindow_Class::wrap_new);
+ Glib::wrap_register(gtk_separator_get_type(), &Gtk::Separator_Class::wrap_new);
+ Glib::wrap_register(gtk_separator_menu_item_get_type(), &Gtk::SeparatorMenuItem_Class::wrap_new);
+ Glib::wrap_register(gtk_separator_tool_item_get_type(), &Gtk::SeparatorToolItem_Class::wrap_new);
+ Glib::wrap_register(gtk_settings_get_type(), &Gtk::Settings_Class::wrap_new);
+ Glib::wrap_register(gtk_size_group_get_type(), &Gtk::SizeGroup_Class::wrap_new);
+#ifndef G_OS_WIN32
+ Glib::wrap_register(gtk_socket_get_type(), &Gtk::Socket_Class::wrap_new);
+#endif //G_OS_WIN32
+ Glib::wrap_register(gtk_spin_button_get_type(), &Gtk::SpinButton_Class::wrap_new);
+ Glib::wrap_register(gtk_statusbar_get_type(), &Gtk::Statusbar_Class::wrap_new);
+ Glib::wrap_register(gtk_style_get_type(), &Gtk::Style_Class::wrap_new);
+ Glib::wrap_register(gtk_table_get_type(), &Gtk::Table_Class::wrap_new);
+ Glib::wrap_register(gtk_tearoff_menu_item_get_type(), &Gtk::TearoffMenuItem_Class::wrap_new);
+ Glib::wrap_register(gtk_text_buffer_get_type(), &Gtk::TextBuffer_Class::wrap_new);
+ Glib::wrap_register(gtk_text_child_anchor_get_type(), &Gtk::TextChildAnchor_Class::wrap_new);
+ Glib::wrap_register(gtk_text_mark_get_type(), &Gtk::TextMark_Class::wrap_new);
+ Glib::wrap_register(gtk_text_tag_get_type(), &Gtk::TextTag_Class::wrap_new);
+ Glib::wrap_register(gtk_text_tag_table_get_type(), &Gtk::TextTagTable_Class::wrap_new);
+ Glib::wrap_register(gtk_text_view_get_type(), &Gtk::TextView_Class::wrap_new);
+ Glib::wrap_register(gtk_toggle_action_get_type(), &Gtk::ToggleAction_Class::wrap_new);
+ Glib::wrap_register(gtk_toggle_button_get_type(), &Gtk::ToggleButton_Class::wrap_new);
+ Glib::wrap_register(gtk_toggle_tool_button_get_type(), &Gtk::ToggleToolButton_Class::wrap_new);
+ Glib::wrap_register(gtk_tool_button_get_type(), &Gtk::ToolButton_Class::wrap_new);
+ Glib::wrap_register(gtk_tool_item_get_type(), &Gtk::ToolItem_Class::wrap_new);
+ Glib::wrap_register(gtk_toolbar_get_type(), &Gtk::Toolbar_Class::wrap_new);
+ Glib::wrap_register(gtk_tooltips_get_type(), &Gtk::Tooltips_Class::wrap_new);
+ Glib::wrap_register(gtk_tree_model_filter_get_type(), &Gtk::TreeModelFilter_Class::wrap_new);
+ Glib::wrap_register(gtk_tree_model_sort_get_type(), &Gtk::TreeModelSort_Class::wrap_new);
+ Glib::wrap_register(gtk_tree_selection_get_type(), &Gtk::TreeSelection_Class::wrap_new);
+ Glib::wrap_register(gtk_tree_store_get_type(), &Gtk::TreeStore_Class::wrap_new);
+ Glib::wrap_register(gtk_tree_view_get_type(), &Gtk::TreeView_Class::wrap_new);
+ Glib::wrap_register(gtk_tree_view_column_get_type(), &Gtk::TreeViewColumn_Class::wrap_new);
+ Glib::wrap_register(gtk_ui_manager_get_type(), &Gtk::UIManager_Class::wrap_new);
+ Glib::wrap_register(gtk_vbox_get_type(), &Gtk::VBox_Class::wrap_new);
+ Glib::wrap_register(gtk_vbutton_box_get_type(), &Gtk::VButtonBox_Class::wrap_new);
+ Glib::wrap_register(gtk_vpaned_get_type(), &Gtk::VPaned_Class::wrap_new);
+ Glib::wrap_register(gtk_vruler_get_type(), &Gtk::VRuler_Class::wrap_new);
+ Glib::wrap_register(gtk_vscale_get_type(), &Gtk::VScale_Class::wrap_new);
+ Glib::wrap_register(gtk_vscrollbar_get_type(), &Gtk::VScrollbar_Class::wrap_new);
+ Glib::wrap_register(gtk_vseparator_get_type(), &Gtk::VSeparator_Class::wrap_new);
+ Glib::wrap_register(gtk_viewport_get_type(), &Gtk::Viewport_Class::wrap_new);
+ Glib::wrap_register(gtk_widget_get_type(), &Gtk::Widget_Class::wrap_new);
+ Glib::wrap_register(gtk_window_get_type(), &Gtk::Window_Class::wrap_new);
+ Glib::wrap_register(gtk_window_group_get_type(), &Gtk::WindowGroup_Class::wrap_new);
+
+ // Register the gtkmm gtypes:
+ Gtk::AboutDialog::get_type();
+ Gtk::AccelGroup::get_type();
+ Gtk::AccelLabel::get_type();
+ Gtk::Action::get_type();
+ Gtk::ActionGroup::get_type();
+ Gtk::Adjustment::get_type();
+ Gtk::Alignment::get_type();
+ Gtk::Arrow::get_type();
+ Gtk::AspectFrame::get_type();
+ Gtk::Bin::get_type();
+ Gtk::Box::get_type();
+ Gtk::Button::get_type();
+ Gtk::ButtonBox::get_type();
+ Gtk::Calendar::get_type();
+ Gtk::CellRenderer::get_type();
+ Gtk::CellRendererCombo::get_type();
+ Gtk::CellRendererPixbuf::get_type();
+ Gtk::CellRendererProgress::get_type();
+ Gtk::CellRendererText::get_type();
+ Gtk::CellRendererToggle::get_type();
+ Gtk::CellView::get_type();
+ Gtk::CheckButton::get_type();
+ Gtk::CheckMenuItem::get_type();
+ Gtk::Clipboard::get_type();
+ Gtk::ColorButton::get_type();
+ Gtk::ColorSelection::get_type();
+ Gtk::ColorSelectionDialog::get_type();
+ Gtk::Combo::get_type();
+ Gtk::ComboBox::get_type();
+ Gtk::ComboBoxEntry::get_type();
+ Gtk::ComboDropDown::get_type();
+ Gtk::ComboDropDownItem::get_type();
+ Gtk::Container::get_type();
+ Gtk::Curve::get_type();
+ Gtk::Dialog::get_type();
+ Gtk::DrawingArea::get_type();
+ Gtk::Entry::get_type();
+ Gtk::EntryCompletion::get_type();
+ Gtk::EventBox::get_type();
+ Gtk::Expander::get_type();
+ Gtk::FileChooserButton::get_type();
+ Gtk::FileChooserDialog::get_type();
+ Gtk::FileChooserWidget::get_type();
+ Gtk::FileFilter::get_type();
+ Gtk::FileSelection::get_type();
+ Gtk::Fixed::get_type();
+ Gtk::FontButton::get_type();
+ Gtk::FontSelection::get_type();
+ Gtk::FontSelectionDialog::get_type();
+ Gtk::Frame::get_type();
+ Gtk::GammaCurve::get_type();
+ Gtk::HBox::get_type();
+ Gtk::HButtonBox::get_type();
+ Gtk::HPaned::get_type();
+ Gtk::HRuler::get_type();
+ Gtk::HScale::get_type();
+ Gtk::HScrollbar::get_type();
+ Gtk::HSeparator::get_type();
+ Gtk::HandleBox::get_type();
+ Gtk::IconFactory::get_type();
+ Gtk::IconTheme::get_type();
+ Gtk::IconView::get_type();
+ Gtk::Image::get_type();
+ Gtk::ImageMenuItem::get_type();
+ Gtk::InputDialog::get_type();
+ Gtk::Invisible::get_type();
+ Gtk::Item::get_type();
+ Gtk::Label::get_type();
+ Gtk::Layout::get_type();
+ Gtk::ListStore::get_type();
+ Gtk::Menu::get_type();
+ Gtk::MenuBar::get_type();
+ Gtk::MenuItem::get_type();
+ Gtk::MenuShell::get_type();
+ Gtk::MenuToolButton::get_type();
+ Gtk::MessageDialog::get_type();
+ Gtk::Misc::get_type();
+ Gtk::Notebook::get_type();
+ Gtk::Object::get_type();
+ Gtk::OptionMenu::get_type();
+ Gtk::Paned::get_type();
+#ifndef G_OS_WIN32
+ Gtk::Plug::get_type();
+#endif //G_OS_WIN32
+ Gtk::ProgressBar::get_type();
+ Gtk::RadioAction::get_type();
+ Gtk::RadioButton::get_type();
+ Gtk::RadioMenuItem::get_type();
+ Gtk::RadioToolButton::get_type();
+ Gtk::Range::get_type();
+ Gtk::RcStyle::get_type();
+ Gtk::Ruler::get_type();
+ Gtk::Scale::get_type();
+ Gtk::Scrollbar::get_type();
+ Gtk::ScrolledWindow::get_type();
+ Gtk::Separator::get_type();
+ Gtk::SeparatorMenuItem::get_type();
+ Gtk::SeparatorToolItem::get_type();
+ Gtk::Settings::get_type();
+ Gtk::SizeGroup::get_type();
+#ifndef G_OS_WIN32
+ Gtk::Socket::get_type();
+#endif //G_OS_WIN32
+ Gtk::SpinButton::get_type();
+ Gtk::Statusbar::get_type();
+ Gtk::Style::get_type();
+ Gtk::Table::get_type();
+ Gtk::TearoffMenuItem::get_type();
+ Gtk::TextBuffer::get_type();
+ Gtk::TextChildAnchor::get_type();
+ Gtk::TextMark::get_type();
+ Gtk::TextTag::get_type();
+ Gtk::TextTagTable::get_type();
+ Gtk::TextView::get_type();
+ Gtk::ToggleAction::get_type();
+ Gtk::ToggleButton::get_type();
+ Gtk::ToggleToolButton::get_type();
+ Gtk::ToolButton::get_type();
+ Gtk::ToolItem::get_type();
+ Gtk::Toolbar::get_type();
+ Gtk::Tooltips::get_type();
+ Gtk::TreeModelFilter::get_type();
+ Gtk::TreeModelSort::get_type();
+ Gtk::TreeSelection::get_type();
+ Gtk::TreeStore::get_type();
+ Gtk::TreeView::get_type();
+ Gtk::TreeViewColumn::get_type();
+ Gtk::UIManager::get_type();
+ Gtk::VBox::get_type();
+ Gtk::VButtonBox::get_type();
+ Gtk::VPaned::get_type();
+ Gtk::VRuler::get_type();
+ Gtk::VScale::get_type();
+ Gtk::VScrollbar::get_type();
+ Gtk::VSeparator::get_type();
+ Gtk::Viewport::get_type();
+ Gtk::Widget::get_type();
+ Gtk::Window::get_type();
+ Gtk::WindowGroup::get_type();
+
+} // wrap_init()
+
+} //Gtk
+
+
diff --git a/libs/gtkmm2/gtk/gtkmm/wrap_init.h b/libs/gtkmm2/gtk/gtkmm/wrap_init.h
new file mode 100644
index 0000000000..9f7574c5a2
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmm/wrap_init.h
@@ -0,0 +1,32 @@
+#ifndef _GTKMM_WRAP_INIT_H
+#define _GTKMM_WRAP_INIT_H
+
+/* wrap_init.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+// wrap_init.cc is generated by tools/generate_wrap_init.pl
+
+namespace Gtk
+{
+
+void wrap_init();
+
+} /* namespace Gtk */
+
+#endif // _GTKMM_WRAP_INIT_H
diff --git a/libs/gtkmm2/gtk/gtkmmconfig.h b/libs/gtkmm2/gtk/gtkmmconfig.h
new file mode 100644
index 0000000000..b28315ec71
--- /dev/null
+++ b/libs/gtkmm2/gtk/gtkmmconfig.h
@@ -0,0 +1,42 @@
+/* gtk/gtkmmconfig.h. Generated by configure. */
+#ifndef _GTKMM_CONFIG_H
+#define _GTKMM_CONFIG_H 1
+
+#include <gdkmmconfig.h>
+
+/* version numbers */
+#define GTKMM_MAJOR_VERSION 2
+#define GTKMM_MINOR_VERSION 6
+#define GTKMM_MICRO_VERSION 1
+
+#ifdef GLIBMM_CONFIGURE
+/* compiler feature tests that are used during compile time and run-time
+ by gtkmm only. */
+
+/* SUN Forte, AIX, and Tru64 have the problem with flockfile and
+ funlockfile - configure finds it but the compiler can not find it
+ while compiling demowindow.cc. undef HAVE_FLOCKFILE and
+ HAVE_FUNLOCKFILE for now, so that it builds on those platforms. */
+
+/* #undef HAVE_FLOCKFILE */
+/* #undef HAVE_FUNLOCKFILE */
+/* #undef GETC_UNLOCKED */
+
+#endif /* GLIBMM_CONFIGURE */
+
+#ifdef GLIBMM_DLL
+ #if defined(GTKMM_BUILD) && defined(_WINDLL)
+ // Do not dllexport as it is handled by gendef on MSVC
+ #define GTKMM_API
+ #elif !defined(GTKMM_BUILD)
+ #define GTKMM_API __declspec(dllimport)
+ #else
+ /* Build a static library */
+ #define GTKMM_API
+ #endif /* GTKMM_BUILD - _WINDLL */
+#else
+ #define GTKMM_API
+#endif /* GLIBMM_DLL */
+
+#endif /* _GTKMM_CONFIG_H */
+
diff --git a/libs/gtkmm2/pango/SConscript b/libs/gtkmm2/pango/SConscript
new file mode 100644
index 0000000000..f869598895
--- /dev/null
+++ b/libs/gtkmm2/pango/SConscript
@@ -0,0 +1,11 @@
+import glob
+import os
+
+pangomm_files = glob.glob('pangomm/*.cc')
+
+Import('env libraries')
+pangomm = env.Copy()
+pangomm.Merge([libraries['glibmm2'], libraries['pango'], libraries['sigc2']])
+
+libpangomm = pangomm.StaticLibrary('pangomm', pangomm_files)
+Default(libpangomm)
diff --git a/libs/gtkmm2/pango/pangomm.h b/libs/gtkmm2/pango/pangomm.h
new file mode 100644
index 0000000000..f319c23f06
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm.h
@@ -0,0 +1,41 @@
+/* $Id$ */
+
+/* pangomm - a C++ wrapper for the GLib toolkit
+ *
+ * Copyright 2002 Free Software Foundation
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef _PANGOMM_H
+#define _PANGOMM_H
+
+#include <pangomm/attrlist.h>
+#include <pangomm/context.h>
+#include <pangomm/coverage.h>
+#include <pangomm/fontdescription.h>
+#include <pangomm/fontface.h>
+#include <pangomm/fontfamily.h>
+#include <pangomm/font.h>
+#include <pangomm/fontmap.h>
+#include <pangomm/fontmetrics.h>
+#include <pangomm/fontset.h>
+#include <pangomm/layout.h>
+#include <pangomm/layoutiter.h>
+#include <pangomm/layoutline.h>
+#include <pangomm/tabarray.h>
+
+#endif /* _PANGOMM_H */
+
diff --git a/libs/gtkmm2/pango/pangomm/attributes.cc b/libs/gtkmm2/pango/pangomm/attributes.cc
new file mode 100644
index 0000000000..2d23e5d77b
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/attributes.cc
@@ -0,0 +1,534 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <pangomm/attributes.h>
+#include <pangomm/private/attributes_p.h>
+
+#include <pango/pango-enum-types.h>
+/*
+ *
+ * Copyright 2002 Free Software Foundation
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+namespace Pango
+{
+
+Attribute::Attribute()
+:
+ gobject_(0)
+{}
+
+Attribute::Attribute(const Attribute& src)
+:
+ gobject_(src.gobject_ ? pango_attribute_copy(src.gobject_) : 0)
+{}
+
+Attribute::Attribute(PangoAttribute* castitem, bool take_copy)
+{
+ if(take_copy)
+ {
+ if(castitem)
+ gobject_ = pango_attribute_copy(castitem);
+ else
+ gobject_ = 0;
+ }
+ else
+ {
+ // It was given to us by a function which has already made a copy for us to keep.
+ gobject_ = castitem;
+ }
+}
+
+Attribute::~Attribute()
+{
+ if(gobject_)
+ pango_attribute_destroy(gobject_);
+ gobject_ = 0;
+}
+
+Attribute& Attribute::operator=(const Attribute& src)
+{
+ PangoAttribute *const new_gobject = (src.gobject_ ? pango_attribute_copy(src.gobject_) : 0);
+
+ if(gobject_)
+ pango_attribute_destroy(gobject_);
+ gobject_ = new_gobject;
+
+ return *this;
+}
+
+AttrType Attribute::get_type() const
+{
+ return (AttrType) ((gobject_) ? gobj()->klass->type : PANGO_ATTR_INVALID);
+}
+
+AttrType Attribute::register_type(const Glib::ustring& name)
+{
+ return (AttrType)pango_attr_type_register(name.c_str());
+}
+
+AttrString Attribute::create_attr_family(const Glib::ustring& family)
+{
+ return Glib::wrap((PangoAttrString*)pango_attr_family_new(family.c_str()));
+}
+
+AttrLanguage Attribute::create_attr_language(const Language& language)
+{
+ return Glib::wrap((PangoAttrLanguage*)pango_attr_language_new(const_cast<PangoLanguage*>(language.gobj())));
+}
+
+AttrColor Attribute::create_attr_foreground(guint16 red, guint16 green, guint16 blue)
+{
+ return Glib::wrap((PangoAttrColor*)pango_attr_foreground_new(red, green, blue));
+}
+
+AttrColor Attribute::create_attr_background(guint16 red, guint16 green, guint16 blue)
+{
+ return Glib::wrap((PangoAttrColor*)pango_attr_background_new(red, green, blue));
+}
+
+AttrInt Attribute::create_attr_size(int size)
+{
+ return Glib::wrap((PangoAttrInt*)pango_attr_size_new(size));
+}
+
+AttrInt Attribute::create_attr_style(Style style)
+{
+ return Glib::wrap((PangoAttrInt*)pango_attr_style_new((PangoStyle)style));
+}
+
+AttrInt Attribute::create_attr_weight(Weight weight)
+{
+ return Glib::wrap((PangoAttrInt*)pango_attr_weight_new((PangoWeight)weight));
+}
+
+AttrInt Attribute::create_attr_variant(Variant variant)
+{
+ return Glib::wrap((PangoAttrInt*)pango_attr_variant_new((PangoVariant)variant));
+}
+
+AttrInt Attribute::create_attr_stretch(Stretch stretch)
+{
+ return Glib::wrap((PangoAttrInt*)pango_attr_stretch_new((PangoStretch)stretch));
+}
+
+AttrFontDesc Attribute::create_attr_font_desc(const FontDescription& desc)
+{
+ return Glib::wrap((PangoAttrFontDesc*)pango_attr_font_desc_new(desc.gobj()));
+}
+
+AttrInt Attribute::create_attr_underline(Underline underline)
+{
+ return Glib::wrap((PangoAttrInt*)pango_attr_underline_new((PangoUnderline)underline));
+}
+
+AttrInt Attribute::create_attr_strikethrough(bool strikethrough)
+{
+ return Glib::wrap((PangoAttrInt*)pango_attr_strikethrough_new(strikethrough));
+}
+
+AttrInt Attribute::create_attr_rise(int rise)
+{
+ return Glib::wrap((PangoAttrInt*)pango_attr_rise_new(rise));
+}
+
+AttrFloat Attribute::create_attr_scale(double scale_factor)
+{
+ return Glib::wrap((PangoAttrFloat*)pango_attr_scale_new(scale_factor));
+}
+
+AttrShape Attribute::create_attr_shape(const Rectangle& ink_rect, const Rectangle& logical_rect)
+{
+ return Glib::wrap((PangoAttrShape*)pango_attr_shape_new(ink_rect.gobj(), logical_rect.gobj()));
+}
+
+
+AttrString::AttrString()
+{}
+
+AttrString::AttrString(const AttrString& src)
+:
+ Attribute(src)
+{}
+
+AttrString::AttrString(PangoAttrString* castitem, bool take_copy)
+:
+ Attribute((PangoAttribute*)castitem, take_copy)
+{}
+
+AttrString& AttrString::operator=(const AttrString& src)
+{
+ Attribute::operator=(src);
+ return *this;
+}
+
+void AttrString::set_string(const Glib::ustring& str)
+{
+ g_free(gobj()->value);
+ gobj()->value = g_strdup(str.c_str());
+}
+
+
+AttrLanguage::AttrLanguage()
+{}
+
+AttrLanguage::AttrLanguage(const AttrLanguage& src)
+:
+ Attribute(src)
+{}
+
+AttrLanguage::AttrLanguage(PangoAttrLanguage* castitem, bool take_copy)
+:
+ Attribute((PangoAttribute*)castitem, take_copy)
+{}
+
+AttrLanguage& AttrLanguage::operator=(const AttrLanguage& src)
+{
+ Attribute::operator=(src);
+ return *this;
+}
+
+
+AttrColor::AttrColor()
+{}
+
+AttrColor::AttrColor(const AttrColor& src)
+:
+ Attribute(src)
+{}
+
+AttrColor::AttrColor(PangoAttrColor* castitem, bool take_copy)
+:
+ Attribute((PangoAttribute*)castitem, take_copy)
+{}
+
+AttrColor& AttrColor::operator=(const AttrColor& src)
+{
+ Attribute::operator=(src);
+ return *this;
+}
+
+
+AttrInt::AttrInt()
+{}
+
+AttrInt::AttrInt(const AttrInt& src)
+:
+ Attribute(src)
+{}
+
+AttrInt::AttrInt(PangoAttrInt* castitem, bool take_copy)
+:
+ Attribute((PangoAttribute*)castitem, take_copy)
+{}
+
+AttrInt& AttrInt::operator=(const AttrInt& src)
+{
+ Attribute::operator=(src);
+ return *this;
+}
+
+
+AttrFloat::AttrFloat()
+{}
+
+AttrFloat::AttrFloat(const AttrFloat& src)
+:
+ Attribute(src)
+{}
+
+AttrFloat::AttrFloat(PangoAttrFloat* castitem, bool take_copy)
+:
+ Attribute((PangoAttribute*)castitem, take_copy)
+{}
+
+AttrFloat& AttrFloat::operator=(const AttrFloat& src)
+{
+ Attribute::operator=(src);
+ return *this;
+}
+
+
+AttrFontDesc::AttrFontDesc()
+{}
+
+AttrFontDesc::AttrFontDesc(const AttrFontDesc& src)
+:
+ Attribute(src)
+{}
+
+AttrFontDesc::AttrFontDesc(PangoAttrFontDesc* castitem, bool take_copy)
+:
+ Attribute((PangoAttribute*)castitem, take_copy)
+{}
+
+AttrFontDesc& AttrFontDesc::operator=(const AttrFontDesc& src)
+{
+ Attribute::operator=(src);
+ return *this;
+}
+
+void AttrFontDesc::set_desc(const FontDescription& desc)
+{
+ pango_font_description_free(gobj()->desc);
+ gobj()->desc = pango_font_description_copy(desc.gobj());
+}
+
+
+AttrShape::AttrShape()
+{}
+
+AttrShape::AttrShape(const AttrShape& src)
+:
+ Attribute(src)
+{}
+
+AttrShape::AttrShape(PangoAttrShape* castitem, bool take_copy)
+:
+ Attribute((PangoAttribute*)castitem, take_copy)
+{}
+
+AttrShape& AttrShape::operator=(const AttrShape& src)
+{
+ Attribute::operator=(src);
+ return *this;
+}
+
+} //namespace Pango
+
+
+namespace Glib
+{
+
+Pango::Attribute wrap(PangoAttribute* object, bool take_copy)
+{
+ return Pango::Attribute(object, take_copy);
+}
+
+Pango::AttrString wrap(PangoAttrString* object, bool take_copy)
+{
+ return Pango::AttrString(object, take_copy);
+}
+
+Pango::AttrLanguage wrap(PangoAttrLanguage* object, bool take_copy)
+{
+ return Pango::AttrLanguage(object, take_copy);
+}
+
+Pango::AttrColor wrap(PangoAttrColor* object, bool take_copy)
+{
+ return Pango::AttrColor(object, take_copy);
+}
+
+Pango::AttrInt wrap(PangoAttrInt* object, bool take_copy)
+{
+ return Pango::AttrInt(object, take_copy);
+}
+
+Pango::AttrFloat wrap(PangoAttrFloat* object, bool take_copy)
+{
+ return Pango::AttrFloat(object, take_copy);
+}
+
+Pango::AttrFontDesc wrap(PangoAttrFontDesc* object, bool take_copy)
+{
+ return Pango::AttrFontDesc(object, take_copy);
+}
+
+Pango::AttrShape wrap(PangoAttrShape* object, bool take_copy)
+{
+ return Pango::AttrShape(object, take_copy);
+}
+
+} //namespace Glib
+
+
+namespace
+{
+} // anonymous namespace
+
+// static
+GType Glib::Value<Pango::AttrType>::value_type()
+{
+ return pango_attr_type_get_type();
+}
+
+// static
+GType Glib::Value<Pango::Underline>::value_type()
+{
+ return pango_underline_get_type();
+}
+
+
+namespace Pango
+{
+
+
+unsigned int Attribute::get_start_index() const
+{
+ return gobj()->start_index;
+}
+
+unsigned int Attribute::get_end_index() const
+{
+ return gobj()->end_index;
+}
+
+void Attribute::set_start_index(const unsigned int& value)
+{
+ gobj()->start_index = value;
+}
+
+void Attribute::set_end_index(const unsigned int& value)
+{
+ gobj()->end_index = value;
+}
+
+bool Attribute::equal(const Attribute& attr2) const
+{
+ return pango_attribute_equal(const_cast<PangoAttribute*>(gobj()), (attr2).gobj());
+}
+
+
+} // namespace Pango
+
+
+namespace Pango
+{
+
+
+Glib::ustring AttrString::get_string() const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(gobj()->value);
+}
+
+
+} // namespace Pango
+
+
+namespace Pango
+{
+
+
+Language AttrLanguage::get_language() const
+{
+ return Language(gobj()->value);
+}
+
+void AttrLanguage::set_language(const Language& value)
+{
+ gobj()->value = const_cast<PangoLanguage*>((value).gobj());
+}
+
+
+} // namespace Pango
+
+
+namespace Pango
+{
+
+
+Color AttrColor::get_color() const
+{
+ return Color(&(gobj()->color));
+}
+
+void AttrColor::set_color(const Color& value)
+{
+ gobj()->color = *(value).gobj();
+}
+
+
+} // namespace Pango
+
+
+namespace Pango
+{
+
+
+int AttrInt::get_value() const
+{
+ return gobj()->value;
+}
+
+void AttrInt::set_value(const int& value)
+{
+ gobj()->value = value;
+}
+
+
+} // namespace Pango
+
+
+namespace Pango
+{
+
+
+double AttrFloat::get_value() const
+{
+ return gobj()->value;
+}
+
+void AttrFloat::set_value(const double& value)
+{
+ gobj()->value = value;
+}
+
+
+} // namespace Pango
+
+
+namespace Pango
+{
+
+
+FontDescription AttrFontDesc::get_desc() const
+{
+ return FontDescription((gobj()->desc));
+}
+
+
+} // namespace Pango
+
+
+namespace Pango
+{
+
+
+Rectangle AttrShape::get_ink_rect() const
+{
+ return Rectangle(&(gobj()->ink_rect));
+}
+
+Rectangle AttrShape::get_logical_rect() const
+{
+ return Rectangle(&(gobj()->logical_rect));
+}
+
+void AttrShape::set_ink_rect(const Rectangle& value)
+{
+ gobj()->ink_rect = *(value).gobj();
+}
+
+void AttrShape::set_logical_rect(const Rectangle& value)
+{
+ gobj()->logical_rect = *(value).gobj();
+}
+
+
+} // namespace Pango
+
+
diff --git a/libs/gtkmm2/pango/pangomm/attributes.h b/libs/gtkmm2/pango/pangomm/attributes.h
new file mode 100644
index 0000000000..25baa96475
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/attributes.h
@@ -0,0 +1,669 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _PANGOMM_ATTRIBUTES_H
+#define _PANGOMM_ATTRIBUTES_H
+
+#include <glibmm.h>
+
+/* attributes.h
+ *
+ * Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <pangomm/language.h>
+#include <pangomm/rectangle.h>
+#include <pangomm/color.h>
+#include <pangomm/fontdescription.h>
+#include <pango/pango-attributes.h>
+
+
+namespace Pango
+{
+
+
+/** @addtogroup pangommEnums Enums and Flags */
+
+/** Pango::AttrType distinguishes between different types of attributes.
+ * Along with the predefined values, it is possible to allocate additional values for
+ * custom attributes using Pango::Attribute::register_type(). The predefined values
+ * are given below.
+ * @ingroup pangommEnums
+ */
+enum AttrType
+{
+ ATTR_INVALID,
+ ATTR_LANGUAGE,
+ ATTR_FAMILY,
+ ATTR_STYLE,
+ ATTR_WEIGHT,
+ ATTR_VARIANT,
+ ATTR_STRETCH,
+ ATTR_SIZE,
+ ATTR_FONT_DESC,
+ ATTR_FOREGROUND,
+ ATTR_BACKGROUND,
+ ATTR_UNDERLINE,
+ ATTR_STRIKETHROUGH,
+ ATTR_RISE,
+ ATTR_SHAPE,
+ ATTR_SCALE,
+ ATTR_FALLBACK,
+ ATTR_LETTER_SPACING,
+ ATTR_UNDERLINE_COLOR,
+ ATTR_STRIKETHROUGH_COLOR
+};
+
+} // namespace Pango
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Pango::AttrType> : public Glib::Value_Enum<Pango::AttrType>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Pango
+{
+
+
+/** A Pango::Underline is used to specify whether text should be underlined, and if so, the type of underlining.
+ * @ingroup pangommEnums
+ */
+enum Underline
+{
+ UNDERLINE_NONE,
+ UNDERLINE_SINGLE,
+ UNDERLINE_DOUBLE,
+ UNDERLINE_LOW,
+ UNDERLINE_ERROR
+};
+
+} // namespace Pango
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Pango::Underline> : public Glib::Value_Enum<Pango::Underline>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Pango
+{
+
+
+/** A Pango::LogAttr stores information about the attributes of a single character.
+ */
+typedef PangoLogAttr LogAttr;
+
+
+class AttrString;
+class AttrLanguage;
+class AttrColor;
+class AttrInt;
+class AttrFloat;
+class AttrFontDesc;
+class AttrShape;
+
+/** The Pango::Attribute structure represents the common portions of all attributes.
+ * Particular types of attributes derive this class. It holds the range in which the
+ * value in the type-specific part of the attribute applies.
+ *
+ * Attributed text is used in a number of places in pango. It is used as the input to
+ * the itemization process and also when creating a Pango::Layout.
+ */
+class Attribute
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Attribute CppObjectType;
+ typedef PangoAttribute BaseObjectType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+private:
+
+
+public:
+ /** Constructs an invalid attribute.
+ */
+ Attribute();
+
+ Attribute(const Attribute& src);
+ explicit Attribute(PangoAttribute* castitem, bool take_copy=true);
+ ~Attribute();
+
+ Attribute& operator=(const Attribute& src);
+
+ /** Gets the type ID for this attribute.
+ * @return The type ID for this attribute or ATTR_INVALID if the attribute is invalid.
+ */
+ AttrType get_type() const;
+
+ /** Allocate a new attribute type ID.
+ * @param name An identifier for the type (currently unused).
+ * @return The new type ID.
+ */
+ static AttrType register_type(const Glib::ustring& name);
+
+ /** Gets the start index of the range.
+ * @return The start index of the range.
+ */
+ unsigned int get_start_index() const;
+
+ /** Gets the end index of the range. The character at this index is not included in the range.
+ * @return The end index of the range.
+ */
+ unsigned int get_end_index() const;
+
+ /** Sets the start index of the range.
+ * @param value The new start index.
+ */
+ void set_start_index(const unsigned int& value);
+
+ /** Sets the end index of the range. The character at this index is not included in the range.
+ * @param value The new end index.
+ */
+ void set_end_index(const unsigned int& value);
+
+
+ /** Compare two attributes for equality. This compares only the
+ * actual value of the two attributes and not the ranges that the
+ * attributes apply to.
+ * @param attr2 Another Pango::Attribute.
+ * @return <tt>true</tt> if the two attributes have the same value.
+ */
+ bool equal(const Attribute& attr2) const;
+
+ /// Provides access to the underlying C GObject.
+ PangoAttribute* gobj() { return gobject_; }
+ /// Provides access to the underlying C GObject.
+ PangoAttribute* const gobj() const { return gobject_; }
+
+ /** Create a new font family attribute.
+ * @param family The family or comma separated list of families.
+ * @return An attribute of type AttrString.
+ */
+ static AttrString create_attr_family(const Glib::ustring& family);
+
+ /** Create a new language tag attribute
+ * @param language The language tag.
+ * @return An attribute of type AttrLanguage.
+ */
+ static AttrLanguage create_attr_language(const Language& language);
+
+ /** Create a new foreground color attribute.
+ * @param red The red value (ranging from 0 to 65535).
+ * @param green The green value (ranging from 0 to 65535).
+ * @param blue The blue value (ranging from 0 to 65535).
+ * @return An attribute of type AttrColor.
+ */
+ static AttrColor create_attr_foreground(guint16 red, guint16 green, guint16 blue);
+
+ /** Create a new background color attribute.
+ * @param red The red value (ranging from 0 to 65535).
+ * @param green The green value (ranging from 0 to 65535).
+ * @param blue The blue value (ranging from 0 to 65535).
+ * @return An attribute of type AttrColor.
+ */
+ static AttrColor create_attr_background(guint16 red, guint16 green, guint16 blue);
+
+ /** Create a new font-size attribute.
+ * @param size The font size, in 1000ths of a point.
+ * @return An attribute of type AttrInt.
+ */
+ static AttrInt create_attr_size(int size);
+
+ /** Create a new font slant style attribute.
+ * @param style The slant style.
+ * @return An attribute of type AttrInt.
+ */
+ static AttrInt create_attr_style(Style style);
+
+ /** Create a new font weight attribute.
+ * @param weight The weight.
+ * @return An attribute of type AttrInt.
+ */
+ static AttrInt create_attr_weight(Weight weight);
+
+ /** Create a new font variant attribute (normal or small caps).
+ * @param variant The variant.
+ * @return An attribute of type AttrInt.
+ */
+ static AttrInt create_attr_variant(Variant variant);
+
+ /** Create a new font stretch attribute.
+ * @param stretch The stretch.
+ * @return An attribute of type AttrInt.
+ */
+ static AttrInt create_attr_stretch(Stretch stretch);
+
+ /** Create a new font description attribute.
+ * This attribute allows setting family, style, weight, variant, stretch, and size simultaneously.
+ * @param desc The font description.
+ * @return An attribute of type AttrFontDesc.
+ */
+ static AttrFontDesc create_attr_font_desc(const FontDescription& desc);
+
+ /** Create a new underline-style object.
+ * @param underline The underline style.
+ * @return An attribute of type AttrInt.
+ */
+ static AttrInt create_attr_underline(Underline underline);
+
+ /** Create a new font strike-through attribute.
+ * @param strikethrough True indicates the text should be struck-through.
+ * @return An attribute of type AttrInt.
+ */
+ static AttrInt create_attr_strikethrough(bool strikethrough);
+
+ /** Create a new baseline displacement attribute.
+ * @param rise The amount that the text should be displaced vertically, in 10'000ths of an em. Positive values displace the text upwards.
+ * @return An attribute of type AttrInt.
+ */
+ static AttrInt create_attr_rise(int rise);
+
+ /** Create a new font size scale attribute.
+ * The base font for the affected text will have its size multiplied by scale_factor.
+ * @param scale_factor Factor to scale the font.
+ * @return An attribute of type AttrFloat.
+ */
+ static AttrFloat create_attr_scale(double scale_factor);
+
+ /** Create a new shape attribute.
+ * A shape is used to impose a particular ink and logical rect on the result of shaping a particular glyph.
+ * This might be used, for instance, for embedding a picture or a widget inside a PangoLayout.
+ * @param ink_rect Ink rectangle to assign to each character.
+ * @param logical_rect Logical rectangle assign to each character.
+ * @return An attribute of type AttrShape.
+ */
+ static AttrShape create_attr_shape(const Rectangle& ink_rect, const Rectangle& logical_rect);
+
+protected:
+ PangoAttribute* gobject_;
+
+
+};
+
+/** @relates Pango::Attribute */
+inline bool operator==(const Attribute& lhs, const Attribute& rhs)
+{
+ return lhs.equal(rhs);
+}
+
+/** @relates Pango::Attribute */
+inline bool operator!=(const Attribute& lhs, const Attribute& rhs)
+{
+ return lhs.equal(rhs);
+}
+
+
+/** A Pango::AttrString is used to represent an attribute with a string value.
+ */
+class AttrString : public Attribute
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef AttrString CppObjectType;
+ typedef PangoAttrString BaseObjectType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+private:
+
+
+protected:
+ AttrString();
+public:
+ AttrString(const AttrString& src);
+ explicit AttrString(PangoAttrString* castitem, bool take_copy=true);
+
+ AttrString& operator=(const AttrString& src);
+
+ /** Gets the string which is the value of the attribute.
+ * @return The string value of the attribute.
+ */
+ Glib::ustring get_string() const;
+
+ /** Sets the string which is the value of the attribute.
+ * @param string The new string value for the attribute.
+ */
+ void set_string(const Glib::ustring& string);
+
+ /// Provides access to the underlying C GObject.
+ PangoAttrString* gobj() { return reinterpret_cast<PangoAttrString*>(gobject_); }
+ /// Provides access to the underlying C GObject.
+ const PangoAttrString* gobj() const { return reinterpret_cast<const PangoAttrString*>(gobject_); }
+
+
+};
+
+
+/** A Pango::AttrLanguage is used to represent an attribute that is a language.
+ */
+class AttrLanguage : public Attribute
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef AttrLanguage CppObjectType;
+ typedef PangoAttrLanguage BaseObjectType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+private:
+
+
+protected:
+ AttrLanguage();
+public:
+ AttrLanguage(const AttrLanguage& src);
+ explicit AttrLanguage(PangoAttrLanguage* castitem, bool take_copy=true);
+
+ AttrLanguage& operator=(const AttrLanguage& src);
+
+ /** Gets the language which is the value of the attribute.
+ * @return The language tag of the attribute.
+ */
+ Language get_language() const;
+
+ /** Sets the language which is the value of the attribute.
+ * @param value The new language tag for the attribute.
+ */
+ void set_language(const Language& value);
+
+ /// Provides access to the underlying C GObject.
+ PangoAttrLanguage* gobj() { return reinterpret_cast<PangoAttrLanguage*>(gobject_); }
+ /// Provides access to the underlying C GObject.
+ const PangoAttrLanguage* gobj() const { return reinterpret_cast<const PangoAttrLanguage*>(gobject_); }
+
+
+};
+
+
+/** A Pango::AttrColor is used to represent an attribute which is a color.
+ */
+class AttrColor : public Attribute
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef AttrColor CppObjectType;
+ typedef PangoAttrColor BaseObjectType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+private:
+
+
+protected:
+ AttrColor();
+public:
+ AttrColor(const AttrColor& src);
+ explicit AttrColor(PangoAttrColor* castitem, bool take_copy=true);
+
+ AttrColor& operator=(const AttrColor& src);
+
+ /** Gets the color which is the value of the attribute.
+ * @return The color value of the attribute.
+ */
+ Color get_color() const;
+
+ /** Sets the color which is the value of the attribute.
+ * @param value The new color value for the attribute.
+ */
+ void set_color(const Color& value);
+
+ /// Provides access to the underlying C GObject.
+ PangoAttrColor* gobj() { return reinterpret_cast<PangoAttrColor*>(gobject_); }
+ /// Provides access to the underlying C GObject.
+ const PangoAttrColor* gobj() const { return reinterpret_cast<const PangoAttrColor*>(gobject_); }
+
+
+};
+
+
+/** A Pango::AttrInt is used to represent an attribute with an integer or enumeration value.
+ */
+class AttrInt : public Attribute
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef AttrInt CppObjectType;
+ typedef PangoAttrInt BaseObjectType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+private:
+
+
+protected:
+ AttrInt();
+public:
+ AttrInt(const AttrInt& src);
+ explicit AttrInt(PangoAttrInt* castitem, bool take_copy=true);
+
+ AttrInt& operator=(const AttrInt& src);
+
+ /** Gets the integer value of the attribute.
+ * @return The integer value of the attribute.
+ */
+ int get_value() const;
+
+ /** Sets the integer value of the attribute.
+ * @param value The new integer value for the attribute.
+ */
+ void set_value(const int& value);
+
+ /// Provides access to the underlying C GObject.
+ PangoAttrInt* gobj() { return reinterpret_cast<PangoAttrInt*>(gobject_); }
+ /// Provides access to the underlying C GObject.
+ const PangoAttrInt* gobj() const { return reinterpret_cast<const PangoAttrInt*>(gobject_); }
+
+
+};
+
+
+/** A Pango::AttrFloat is used to represent an attribute with a float or double value.
+ */
+class AttrFloat : public Attribute
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef AttrFloat CppObjectType;
+ typedef PangoAttrFloat BaseObjectType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+private:
+
+
+protected:
+ AttrFloat();
+public:
+ AttrFloat(const AttrFloat& src);
+ explicit AttrFloat(PangoAttrFloat* castitem, bool take_copy=true);
+
+ AttrFloat& operator=(const AttrFloat& src);
+
+ /** Gets the floating point value of the attribute.
+ * @return The floating point value of the attribute.
+ */
+ double get_value() const;
+
+ /** Sets the floating point value of the attribute.
+ * @param value The new floating point value for the attribute.
+ */
+ void set_value(const double& value);
+
+ /// Provides access to the underlying C GObject.
+ PangoAttrFloat* gobj() { return reinterpret_cast<PangoAttrFloat*>(gobject_); }
+ /// Provides access to the underlying C GObject.
+ const PangoAttrFloat* gobj() const { return reinterpret_cast<const PangoAttrFloat*>(gobject_); }
+
+
+};
+
+
+/** A Pango::AttrFontDesc is used to represent an attribute that sets all aspects of the font description at once.
+ */
+class AttrFontDesc : public Attribute
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef AttrFontDesc CppObjectType;
+ typedef PangoAttrFontDesc BaseObjectType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+private:
+
+
+protected:
+ AttrFontDesc();
+public:
+ AttrFontDesc(const AttrFontDesc& src);
+ explicit AttrFontDesc(PangoAttrFontDesc* castitem, bool take_copy=true);
+
+ AttrFontDesc& operator=(const AttrFontDesc& src);
+
+ /** Gets the font description which is the value of the attribute.
+ * @return The font description of the attribute.
+ */
+ FontDescription get_desc() const;
+
+ /** Sets the font description which is the value of the attribute.
+ * @param desc The new font description for the attribute.
+ */
+ void set_desc(const FontDescription& desc);
+
+ /// Provides access to the underlying C GObject.
+ PangoAttrFontDesc* gobj() { return reinterpret_cast<PangoAttrFontDesc*>(gobject_); }
+ /// Provides access to the underlying C GObject.
+ const PangoAttrFontDesc* gobj() const { return reinterpret_cast<const PangoAttrFontDesc*>(gobject_); }
+
+
+};
+
+
+/** A Pango::AttrShape structure is used to represent an attribute which imposes shape restrictions.
+ */
+class AttrShape : public Attribute
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef AttrShape CppObjectType;
+ typedef PangoAttrShape BaseObjectType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+private:
+
+
+protected:
+ AttrShape();
+public:
+ AttrShape(const AttrShape& src);
+ explicit AttrShape(PangoAttrShape* castitem, bool take_copy=true);
+
+ AttrShape& operator=(const AttrShape& src);
+
+ /** Gets the ink rectangle to restrict to.
+ * @return The ink rectangle of the attribute.
+ */
+ Rectangle get_ink_rect() const;
+
+ /** Gets the logical rectangle to restrict to.
+ * @return The logical rectangle of the attribute.
+ */
+ Rectangle get_logical_rect() const;
+
+ /** Sets the ink rectangle to restrict to.
+ * @param value The new ink rectangle for the attribute.
+ */
+ void set_ink_rect(const Rectangle& value);
+
+ /** Sets the logical rectangle to restrict to.
+ * @param value The new logical rectangle for the attribute.
+ */
+ void set_logical_rect(const Rectangle& value);
+
+ /// Provides access to the underlying C GObject.
+ PangoAttrShape* gobj() { return reinterpret_cast<PangoAttrShape*>(gobject_); }
+ /// Provides access to the underlying C GObject.
+ const PangoAttrShape* gobj() const { return reinterpret_cast<const PangoAttrShape*>(gobject_); }
+
+
+};
+
+
+struct AttributeTraits
+{
+ typedef Pango::Attribute CppType;
+ typedef const PangoAttribute* CType;
+ typedef PangoAttribute* CTypeNonConst;
+
+ static CType to_c_type (const CppType& obj) { return obj.gobj(); }
+ static CType to_c_type (CType ptr) { return ptr; }
+ static CppType to_cpp_type (CType ptr) { return CppType(const_cast<CTypeNonConst>(ptr), true); }
+ static void release_c_type (CType ptr) { pango_attribute_destroy(const_cast<CTypeNonConst>(ptr)); }
+};
+
+typedef Glib::SListHandle<Attribute, AttributeTraits> SListHandle_Attribute;
+
+} // namespace Pango
+
+
+namespace Glib
+{
+
+/** @relates Pango::Attribute */
+Pango::Attribute wrap(PangoAttribute* object, bool take_copy = false);
+
+/** @relates Pango::AttrString */
+Pango::AttrString wrap(PangoAttrString* object, bool take_copy = false);
+
+/** @relates Pango::AttrLanguage */
+Pango::AttrLanguage wrap(PangoAttrLanguage* object, bool take_copy = false);
+
+/** @relates Pango::AttrColor */
+Pango::AttrColor wrap(PangoAttrColor* object, bool take_copy = false);
+
+/** @relates Pango::AttrInt */
+Pango::AttrInt wrap(PangoAttrInt* object, bool take_copy = false);
+
+/** @relates Pango::AttrFloat */
+Pango::AttrFloat wrap(PangoAttrFloat* object, bool take_copy = false);
+
+/** @relates Pango::AttrFontDesc */
+Pango::AttrFontDesc wrap(PangoAttrFontDesc* object, bool take_copy = false);
+
+/** @relates Pango::AttrShape */
+Pango::AttrShape wrap(PangoAttrShape* object, bool take_copy = false);
+
+} //namespace Glib
+
+
+#endif /* _PANGOMM_ATTRIBUTES_H */
+
diff --git a/libs/gtkmm2/pango/pangomm/attriter.cc b/libs/gtkmm2/pango/pangomm/attriter.cc
new file mode 100644
index 0000000000..71fa57052a
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/attriter.cc
@@ -0,0 +1,180 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <pangomm/attriter.h>
+#include <pangomm/private/attriter_p.h>
+
+/*
+ *
+ * Copyright 1998-1999 The Gtk-- Development Team
+ * Copyright 2001 Free Software Foundation
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+namespace Pango
+{
+
+AttrIter::AttrIter()
+:
+ gobject_(0)
+{}
+
+AttrIter::AttrIter(const AttrIter& src)
+:
+ gobject_(src.gobject_ ? pango_attr_iterator_copy(src.gobject_) : 0)
+{}
+
+AttrIter::AttrIter(PangoAttrIterator* castitem, bool take_copy)
+{
+ if(take_copy)
+ {
+ if(castitem)
+ gobject_ = pango_attr_iterator_copy(castitem);
+ else
+ gobject_ = 0;
+ }
+ else
+ {
+ gobject_ = castitem;
+ }
+}
+
+AttrIter::~AttrIter()
+{
+ if(gobject_)
+ pango_attr_iterator_destroy(gobject_);
+}
+
+AttrIter& AttrIter::operator=(const AttrIter& src)
+{
+ PangoAttrIterator *const new_gobject = (src.gobject_ ? pango_attr_iterator_copy(src.gobject_) : 0);
+
+ if(gobject_)
+ pango_attr_iterator_destroy(gobject_);
+ gobject_ = new_gobject;
+
+ return *this;
+}
+
+AttrIter& AttrIter::operator++()
+{
+ next();
+ return *this;
+}
+
+const AttrIter AttrIter::operator++(int)
+{
+ AttrIter previous(*this);
+ next();
+ return previous;
+}
+
+/* operator bool() cannot be implemented to work properly if a Pango::AttrIter is created
+ * from an already invalid PangoAttrIterator* because there is no way to validate it.
+ * Otherwise the iterator can only become invalid after some call to Pango::AttrIter::next()
+ * in which case gobject_ is destroyed thus marking the iterator as invalid.
+ */
+AttrIter::operator bool() const
+{
+ return (gobject_ != 0);
+}
+
+bool AttrIter::next()
+{
+ if(!pango_attr_iterator_next(gobj()))
+ {
+ pango_attr_iterator_destroy(gobject_);
+ gobject_ = 0; // Mark as invalid. There is no other way to determine whether the iterator is valid later.
+ return false;
+ }
+ else
+ return true;
+}
+
+FontDescription AttrIter::get_font_desc() const
+{
+ FontDescription desc;
+ pango_attr_iterator_get_font(const_cast<PangoAttrIterator*>(gobj()), desc.gobj(), 0, 0);
+
+ // See pango ref docs for pango_attr_iterator_get_font.
+ pango_font_description_set_family(desc.gobj(), pango_font_description_get_family(desc.gobj()));
+
+ return desc;
+}
+
+Language AttrIter::get_language() const
+{
+ FontDescription desc;
+ PangoLanguage* language = 0;
+
+ pango_attr_iterator_get_font(const_cast<PangoAttrIterator*>(gobj()), desc.gobj(), &language, 0);
+
+ return Language(language, true);
+}
+
+SListHandle_Attribute AttrIter::get_extra_attrs() const
+{
+ FontDescription desc;
+ GSList* extra_attrs = 0;
+
+ pango_attr_iterator_get_font(const_cast<PangoAttrIterator*>(gobj()), desc.gobj(), 0, &extra_attrs);
+
+ return SListHandle_Attribute(extra_attrs, Glib::OWNERSHIP_DEEP);
+}
+
+SListHandle_Attribute AttrIter::get_attrs() const
+{
+ GSList* attrs = pango_attr_iterator_get_attrs( const_cast<PangoAttrIterator*>(gobj()) );
+ return SListHandle_Attribute(attrs, Glib::OWNERSHIP_DEEP);
+}
+
+
+} /* namespace Pango */
+
+
+namespace Glib
+{
+
+Pango::AttrIter wrap(PangoAttrIterator* object, bool take_copy)
+{
+ return Pango::AttrIter(object, take_copy);
+}
+
+} /* namespace Glib */
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Pango
+{
+
+
+void AttrIter::get_range(int& start, int& end) const
+{
+ pango_attr_iterator_range(const_cast<PangoAttrIterator*>(gobj()), &start, &end);
+}
+
+Attribute AttrIter::get_attribute(AttrType type) const
+{
+ return Attribute((pango_attr_iterator_get(const_cast<PangoAttrIterator*>(gobj()), ((PangoAttrType)(type)))));
+}
+
+
+} // namespace Pango
+
+
diff --git a/libs/gtkmm2/pango/pangomm/attriter.h b/libs/gtkmm2/pango/pangomm/attriter.h
new file mode 100644
index 0000000000..ce654e92dd
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/attriter.h
@@ -0,0 +1,147 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _PANGOMM_ATTRITER_H
+#define _PANGOMM_ATTRITER_H
+
+#include <glibmm.h>
+
+/* attriter.h
+ *
+ * Copyright (C) 1998-1999 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/slisthandle.h>
+#include <pangomm/attributes.h>
+
+
+namespace Pango
+{
+
+/** A Pango::AttrIter is used to represent an iterator through a Pango::AttrList.
+ * A new iterator is created with Pango::AttrList::get_iter(). Once the iterator is created,
+ * it can be advanced through the style changes in the text using Pango::AttrIter::next().
+ * At each style change, the range of the current style segment and the attributes currently in effect can be queried.
+ */
+class AttrIter
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef AttrIter CppObjectType;
+ typedef PangoAttrIterator BaseObjectType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+private:
+
+
+public:
+ typedef std::forward_iterator_tag iterator_category;
+ typedef int difference_type;
+
+protected:
+ AttrIter();
+
+public:
+ explicit AttrIter(PangoAttrIterator* castitem, bool take_copy=true);
+ AttrIter(const AttrIter& src);
+
+ ~AttrIter();
+
+ AttrIter& operator=(const AttrIter& src);
+
+ /** Advance the iterator until the next change of style.
+ * The iterator becomes invalid if the end of the list is reached.
+ * @return The iterator itself.
+ */
+ AttrIter& operator++();
+
+ const AttrIter operator++(int);
+
+ /** Check whether the iterator is valid.
+ * @return <tt>true</tt> if the iterator is valid.
+ */
+ operator bool() const;
+
+ /** The same as operator++().
+ * @return <tt>false</tt> if the end of the list is reached.
+ */
+ bool next();
+
+
+ /** Get the range of the current segment.
+ * @param start Location to store the start of the range.
+ * @param end Location to store the end of the range.
+ */
+ void get_range(int& start, int& end) const;
+
+ /** Find the current attribute of a particular type at the iterator
+ * location. When multiple attributes of the same type overlap,
+ * the attribute whose range starts closest to the current location
+ * is used.
+ * @param type The type of attribute to find.
+ * @return The current attribute of the given type, or <tt>0</tt>
+ * if no attribute of that type applies to the current
+ * location.
+ */
+ Attribute get_attribute(AttrType type) const;
+
+ /** Get the font description used at the current iterator position.
+ * @return The font description used at the current iterator position.
+ */
+ FontDescription get_font_desc() const;
+
+ /** Gets the language tag used at current iterator position.
+ * @return The language tag or an empty Pango::Language object if non is found.
+ */
+ Language get_language() const;
+
+ /** Gets a list of non-font attributes at the the current iterator position.
+ * Only the highest priority value of each attribute will be added to this list.
+ * @return The list of non-font attributes at the current iterator position.
+ */
+ SListHandle_Attribute get_extra_attrs() const;
+
+ /** Gets a list all attributes a the current position of the
+ * iterator.
+ *
+ * @result A list of all attributes for the current range.
+ */
+ SListHandle_Attribute get_attrs() const;
+
+
+ PangoAttrIterator* gobj() { return gobject_; }
+ const PangoAttrIterator* gobj() const { return gobject_; }
+
+protected:
+ PangoAttrIterator* gobject_;
+
+
+};
+
+} // namespace Pango
+
+
+namespace Glib
+{
+
+/** @relates Pango::AttrIter */
+Pango::AttrIter wrap(PangoAttrIterator* object, bool take_copy=false);
+
+} // namespace Glib
+
+
+#endif /* _PANGOMM_ATTRITER_H */
+
diff --git a/libs/gtkmm2/pango/pangomm/attrlist.cc b/libs/gtkmm2/pango/pangomm/attrlist.cc
new file mode 100644
index 0000000000..deba57a453
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/attrlist.cc
@@ -0,0 +1,161 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <pangomm/attrlist.h>
+#include <pangomm/private/attrlist_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-1999 The Gtk-- Development Team
+ * Copyright 2001 Free Software Foundation
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+namespace Pango
+{
+
+AttrList::AttrList(const Glib::ustring& markup_text, gunichar accel_marker)
+{
+ gboolean bTest = pango_parse_markup(markup_text.c_str(), -1 /* means null-terminated */, accel_marker,
+ &gobject_, 0, 0, 0);
+ if(bTest == FALSE)
+ gobject_ = 0;
+}
+
+AttrList::AttrList(const Glib::ustring& markup_text, gunichar accel_marker, Glib::ustring& text, gunichar& accel_char)
+{
+ //initialize output parameters:
+ text.erase();
+ accel_char = 0;
+
+ gchar* pchText = 0;
+ gboolean bTest = pango_parse_markup(markup_text.c_str(), -1 /* means null-terminated */, accel_marker,
+ &gobject_, &pchText, &accel_char, 0);
+ if(bTest == FALSE)
+ {
+ gobject_ = 0;
+ }
+ else
+ {
+ text = pchText;
+ g_free(pchText);
+ }
+}
+
+void AttrList::insert(Attribute& attr)
+{
+ pango_attr_list_insert(gobj(), pango_attribute_copy(attr.gobj()));
+}
+
+void AttrList::insert_before(Attribute& attr)
+{
+ pango_attr_list_insert_before(gobj(), pango_attribute_copy(attr.gobj()));
+}
+
+void AttrList::change(Attribute& attr)
+{
+ pango_attr_list_change(gobj(), pango_attribute_copy(attr.gobj()));
+}
+
+} /* namespace Pango */
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Pango::AttrList wrap(PangoAttrList* object, bool take_copy)
+{
+ return Pango::AttrList(object, take_copy);
+}
+
+} // namespace Glib
+
+
+namespace Pango
+{
+
+
+// static
+GType AttrList::get_type()
+{
+ return pango_attr_list_get_type();
+}
+
+AttrList::AttrList()
+:
+ gobject_ (pango_attr_list_new())
+{}
+
+AttrList::AttrList(const AttrList& other)
+:
+ gobject_ ((other.gobject_) ? pango_attr_list_copy(other.gobject_) : 0)
+{}
+
+AttrList::AttrList(PangoAttrList* gobject, bool make_a_copy)
+:
+ // For BoxedType wrappers, make_a_copy is true by default. The static
+ // BoxedType wrappers must always take a copy, thus make_a_copy = true
+ // ensures identical behaviour if the default argument is used.
+ gobject_ ((make_a_copy && gobject) ? pango_attr_list_copy(gobject) : gobject)
+{}
+
+AttrList& AttrList::operator=(const AttrList& other)
+{
+ AttrList temp (other);
+ swap(temp);
+ return *this;
+}
+
+AttrList::~AttrList()
+{
+ if(gobject_)
+ pango_attr_list_unref(gobject_);
+}
+
+void AttrList::swap(AttrList& other)
+{
+ PangoAttrList *const temp = gobject_;
+ gobject_ = other.gobject_;
+ other.gobject_ = temp;
+}
+
+PangoAttrList* AttrList::gobj_copy() const
+{
+ return pango_attr_list_copy(gobject_);
+}
+
+
+void AttrList::splice(AttrList& other, int pos, int len)
+{
+ pango_attr_list_splice(gobj(), (other).gobj(), pos, len);
+}
+
+AttrIter AttrList::get_iter()
+{
+ return Glib::wrap((pango_attr_list_get_iterator(gobj())));
+}
+
+
+} // namespace Pango
+
+
diff --git a/libs/gtkmm2/pango/pangomm/attrlist.h b/libs/gtkmm2/pango/pangomm/attrlist.h
new file mode 100644
index 0000000000..78d435e729
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/attrlist.h
@@ -0,0 +1,182 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _PANGOMM_ATTRLIST_H
+#define _PANGOMM_ATTRLIST_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* attrlist.h
+ *
+ * Copyright (C) 1998-1999 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <pangomm/attributes.h>
+#include <pangomm/attriter.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C" { typedef struct _PangoAttrList PangoAttrList; }
+#endif
+
+namespace Pango
+{
+
+/** A Pango::AttrList represents a list of attributes that apply to a section of text.
+ * The attributes are, in general, allowed to overlap in an arbitrary fashion, however,
+ * if the attributes are manipulated only through Pango::AttrList::change(), the overlap between properties will meet stricter criteria.
+ *
+ * Since the Pango::AttrList structure is stored as a linear list, it is not suitable for storing attributes for large amounts of text.
+ * In general, you should not use a single Pango::AttrList for more than one paragraph of text.
+ */
+class AttrList
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef AttrList CppObjectType;
+ typedef PangoAttrList BaseObjectType;
+
+ static GType get_type() G_GNUC_CONST;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ AttrList();
+
+ explicit AttrList(PangoAttrList* gobject, bool make_a_copy = true);
+
+ AttrList(const AttrList& other);
+ AttrList& operator=(const AttrList& other);
+
+ ~AttrList();
+
+ void swap(AttrList& other);
+
+ ///Provides access to the underlying C instance.
+ PangoAttrList* gobj() { return gobject_; }
+
+ ///Provides access to the underlying C instance.
+ const PangoAttrList* gobj() const { return gobject_; }
+
+ ///Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs.
+ PangoAttrList* gobj_copy() const;
+
+protected:
+ PangoAttrList* gobject_;
+
+private:
+
+
+public:
+ /** Constructs an attribute list by parsing a marked-up text (see markup format).
+ * If @a accel_marker is nonzero, the given character will mark the character
+ * following it as an accelerator. For example, the accel marker might be an
+ * ampersand or underscore. All characters marked as an accelerator will receive
+ * a Pango::UNDERLINE_LOW attribute.
+ * Two @a accel_marker characters following each other
+ * produce a single literal @a accel_marker character.
+ *
+ * @param markup_text Markup to parse (see markup format).
+ * @param accel_marker Character that precedes an accelerator, or <tt>0</tt> for none.
+ */
+ explicit AttrList(const Glib::ustring& markup_text, gunichar accel_marker=0);
+
+ /** Constructs an attribute list by parsing a marked-up text (see markup format).
+ * @a text is set to the plaintext string.
+ * If @a accel_marker is nonzero, the given character will mark the character
+ * following it as an accelerator. For example, the accel marker might be an
+ * ampersand or underscore. All characters marked as an accelerator will receive
+ * a Pango::UNDERLINE_LOW attribute. The first character so marked will be
+ * returned in @a accel_char. Two @a accel_marker characters following each other
+ * produce a single literal @a accel_marker character.
+ *
+ * @param markup_text Markup to parse (see markup format).
+ * @param accel_marker Character that precedes an accelerator, or <tt>0</tt> for none.
+ * @param text Return location for text with tags stripped.
+ * @param accel_char Return location for accelerator char.
+ */
+ AttrList(const Glib::ustring& markup_text, gunichar accel_marker, Glib::ustring& text, gunichar& accel_char);
+
+ void insert(Attribute& attr);
+ // hand code because we need to pass a copy of the attribute
+ void insert_before(Attribute& attr);
+ // hand code because we need to pass a copy of the attribute
+ void change(Attribute& attr);
+ // hand code because we need to pass a copy of the attribute
+
+ /** This function splices attribute list @a other into @a list .
+ * This operation is equivalent to stretching every attribute
+ * applies at position @a pos in @a list by an amount @a len ,
+ * and then calling pango_attr_list_change() with a copy
+ * of each attributes in @a other in sequence (offset in position by @a pos ).
+ *
+ * This operation proves useful for, for instance, inserting
+ * a preedit string in the middle of an edit buffer.
+ * @param other Another Pango::AttrList.
+ * @param pos The position in @a list at which to insert @a other .
+ * @param len The length of the spliced segment. (Note that this
+ * must be specified since the attributes in @a other
+ * may only be present at some subsection of this range).
+ */
+ void splice(AttrList& other, int pos, int len);
+
+ /** Create a iterator initialized to the beginning of the list.
+ * @return A new Pango::Iterator. @a list must not be modified
+ * until this iterator is freed with pango_attr_iterator_destroy().
+ */
+ AttrIter get_iter();
+
+ //TODO: Though it doesn't seem important:
+ //PangoAttrList* pango_attr_list_filter (PangoAttrList* list, PangoAttrFilterFunc func, gpointer data)
+
+
+};
+
+} //namespace Pango
+
+
+namespace Pango
+{
+
+/** @relates Pango::AttrList
+ * @param lhs The left-hand side
+ * @param rhs The right-hand side
+ */
+inline void swap(AttrList& lhs, AttrList& rhs)
+ { lhs.swap(rhs); }
+
+} // namespace Pango
+
+namespace Glib
+{
+
+/** @relates Pango::AttrList
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+Pango::AttrList wrap(PangoAttrList* object, bool take_copy = false);
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+template <>
+class Value<Pango::AttrList> : public Glib::Value_Boxed<Pango::AttrList>
+{};
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+} // namespace Glib
+
+#endif /* _PANGOMM_ATTRLIST_H */
+
diff --git a/libs/gtkmm2/pango/pangomm/color.cc b/libs/gtkmm2/pango/pangomm/color.cc
new file mode 100644
index 0000000000..946d7fcc37
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/color.cc
@@ -0,0 +1,124 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <pangomm/color.h>
+#include <pangomm/private/color_p.h>
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+namespace Pango
+{
+
+/* For some unknown reason pango doesn't provide pango_color_new(). Let's define an
+ * equivalent function ourself! */
+PangoColor* _pango_color_new()
+{
+ return g_new(PangoColor, 1);
+}
+
+Color::operator bool()
+{
+ return gobj() != 0;
+}
+
+} /* namespace Pango */
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Pango::Color& wrap(PangoColor* object)
+{
+ return *reinterpret_cast<Pango::Color*>(object);
+}
+
+const Pango::Color& wrap(const PangoColor* object)
+{
+ return *reinterpret_cast<const Pango::Color*>(object);
+}
+
+} // namespace Glib
+
+
+namespace Pango
+{
+
+
+// static
+GType Color::get_type()
+{
+ return pango_color_get_type();
+}
+
+Color::Color()
+{
+ GLIBMM_INITIALIZE_STRUCT(gobject_, PangoColor);
+}
+
+Color::Color(const PangoColor* gobject)
+{
+ if(gobject)
+ gobject_ = *gobject;
+ else
+ GLIBMM_INITIALIZE_STRUCT(gobject_, PangoColor);
+}
+
+
+guint16 Color::get_red() const
+{
+ return gobj()->red;
+}
+
+guint16 Color::get_green() const
+{
+ return gobj()->green;
+}
+
+guint16 Color::get_blue() const
+{
+ return gobj()->blue;
+}
+
+void Color::set_red(const guint16& value)
+{
+ gobj()->red = value;
+}
+
+void Color::set_green(const guint16& value)
+{
+ gobj()->green = value;
+}
+
+void Color::set_blue(const guint16& value)
+{
+ gobj()->blue = value;
+}
+
+bool Color::parse(const Glib::ustring& spec)
+{
+ return pango_color_parse(gobj(), spec.c_str());
+}
+
+
+} // namespace Pango
+
+
diff --git a/libs/gtkmm2/pango/pangomm/color.h b/libs/gtkmm2/pango/pangomm/color.h
new file mode 100644
index 0000000000..07ce119896
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/color.h
@@ -0,0 +1,138 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _PANGOMM_COLOR_H
+#define _PANGOMM_COLOR_H
+
+#include <glibmm.h>
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <pango/pango-attributes.h>
+
+
+namespace Pango
+{
+
+/** A Pango::Color is used to represent a color in an uncalibrated RGB colorspace.
+ */
+class Color
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Color CppObjectType;
+ typedef PangoColor BaseObjectType;
+
+ static GType get_type() G_GNUC_CONST;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ Color();
+
+ explicit Color(const PangoColor* gobject); // always takes a copy
+
+ ///Provides access to the underlying C instance.
+ PangoColor* gobj() { return &gobject_; }
+
+ ///Provides access to the underlying C instance.
+ const PangoColor* gobj() const { return &gobject_; }
+
+protected:
+ PangoColor gobject_;
+
+private:
+
+
+public:
+
+ /// Tests whether the Color is valid.
+ operator bool();
+
+ /** Gets the red component of the color.
+ * @return The red component of the color. This is a value between 0 and 65535, with 65535 indicating full intensity.
+ */
+ guint16 get_red() const;
+
+ /** Gets the green component of the color.
+ * @return The green component of the color. This is a value between 0 and 65535, with 65535 indicating full intensity.
+ */
+ guint16 get_green() const;
+
+ /** Gets the blue component of the color.
+ * @return The blue component of the color. This is a value between 0 and 65535, with 65535 indicating full intensity.
+ */
+ guint16 get_blue() const;
+
+ /** Sets the red component of the color.
+ * @param value The red component of the color. This is a value between 0 and 65535, with 65535 indicating full intensity.
+ */
+ void set_red(const guint16& value);
+
+ /** Sets the green component of the color.
+ * @param value The green component of the color. This is a value between 0 and 65535, with 65535 indicating full intensity.
+ */
+ void set_green(const guint16& value);
+
+ /** Sets the blue component of the color.
+ * @param value The blue component of the color. This is a value between 0 and 65535, with 65535 indicating full intensity.
+ */
+ void set_blue(const guint16& value);
+
+
+ /** Fill in the fields of a color from a string specification. The
+ * string can either one of a large set of standard names. (Taken
+ * from the X11 &lt;filename&gt;rgb.txt&lt;/filename&gt; file), or it can be a hex value in the
+ * form '#rgb' '#rrggbb' '#rrrgggbbb' or '#rrrrggggbbbb' where
+ * 'r', 'g' and 'b' are hex digits of the red, green, and blue
+ * components of the color, respectively. (White in the four
+ * forms is '#fff' '#ffffff' '#fffffffff' and '#ffffffffffff')
+ * @param spec A string specifying the new color.
+ * @return <tt>true</tt> if parsing of the specifier succeeded,
+ * otherwise false.
+ */
+ bool parse(const Glib::ustring& spec);
+
+
+};
+
+} /* namespace Pango */
+
+
+namespace Glib
+{
+
+/** @relates Pango::Color
+ * @param object The C instance
+ * @result A C++ instance that wraps this C instance.
+ */
+Pango::Color& wrap(PangoColor* object);
+
+/** @relates Pango::Color
+ * @param object The C instance
+ * @result A C++ instance that wraps this C instance.
+ */
+const Pango::Color& wrap(const PangoColor* object);
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+template <>
+class Value<Pango::Color> : public Glib::Value_Boxed<Pango::Color>
+{};
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+} // namespace Glib
+
+#endif /* _PANGOMM_COLOR_H */
+
diff --git a/libs/gtkmm2/pango/pangomm/context.cc b/libs/gtkmm2/pango/pangomm/context.cc
new file mode 100644
index 0000000000..5acd2cc9cf
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/context.cc
@@ -0,0 +1,239 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <pangomm/context.h>
+#include <pangomm/private/context_p.h>
+
+#include <pango/pango-enum-types.h>
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-1999 The Gtk-- Development Team
+ * Copyright 2001 Free Software Foundation
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+namespace Pango
+{
+
+Glib::ArrayHandle< Glib::RefPtr<FontFamily> > Context::list_families() const
+{
+ //Get array:
+ PangoFontFamily** pFamilies = 0;
+ int n_families = 0;
+ pango_context_list_families(const_cast<PangoContext*>(gobj()), &pFamilies, &n_families);
+
+ return Glib::ArrayHandle< Glib::RefPtr<FontFamily> >
+ (pFamilies, n_families, Glib::OWNERSHIP_SHALLOW);
+}
+
+Pango::FontMetrics Context::get_metrics(const FontDescription& desc) const
+{
+ return FontMetrics(pango_context_get_metrics(const_cast<PangoContext*>(gobj()), desc.gobj(), 0));
+}
+
+ListHandle_Item Context::itemize(const Glib::ustring& text, const AttrList& attrs) const
+{
+ return ListHandle_Item(
+ pango_itemize(const_cast<PangoContext*>(gobj()),
+ text.c_str(), 0, text.bytes(),
+ const_cast<PangoAttrList*>(attrs.gobj()), 0),
+ Glib::OWNERSHIP_DEEP);
+}
+
+ListHandle_Item Context::itemize(const Glib::ustring& text, int start_index, int length,
+ const AttrList& attrs, AttrIter& cached_iter) const
+{
+ return ListHandle_Item(
+ pango_itemize(const_cast<PangoContext*>(gobj()),
+ text.c_str(), start_index, length,
+ const_cast<PangoAttrList*>(attrs.gobj()), cached_iter.gobj()),
+ Glib::OWNERSHIP_DEEP);
+}
+
+} /* namespace Pango */
+
+
+namespace
+{
+} // anonymous namespace
+
+// static
+GType Glib::Value<Pango::Direction>::value_type()
+{
+ return pango_direction_get_type();
+}
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Pango::Context> wrap(PangoContext* object, bool take_copy)
+{
+ return Glib::RefPtr<Pango::Context>( dynamic_cast<Pango::Context*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} /* namespace Glib */
+
+
+namespace Pango
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Context_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Context_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(pango_context_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Context_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* Context_Class::wrap_new(GObject* object)
+{
+ return new Context((PangoContext*)object);
+}
+
+
+/* The implementation: */
+
+PangoContext* Context::gobj_copy()
+{
+ reference();
+ return gobj();
+}
+
+Context::Context(const Glib::ConstructParams& construct_params)
+:
+ Glib::Object(construct_params)
+{}
+
+Context::Context(PangoContext* castitem)
+:
+ Glib::Object((GObject*)(castitem))
+{}
+
+Context::~Context()
+{}
+
+
+Context::CppClassType Context::context_class_; // initialize static member
+
+GType Context::get_type()
+{
+ return context_class_.init().get_type();
+}
+
+GType Context::get_base_type()
+{
+ return pango_context_get_type();
+}
+
+
+Context::Context()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Glib::Object(Glib::ConstructParams(context_class_.init()))
+{
+ }
+
+Glib::RefPtr<FontMap> Context::get_font_map()
+{
+ return Glib::wrap(pango_context_get_font_map(gobj()));
+}
+
+Glib::RefPtr<const FontMap> Context::get_font_map() const
+{
+ return Glib::wrap(pango_context_get_font_map(const_cast<PangoContext*>(gobj())));
+}
+
+Glib::RefPtr<Font> Context::load_font(const FontDescription& desc) const
+{
+ return Glib::wrap(pango_context_load_font(const_cast<PangoContext*>(gobj()), (desc).gobj()));
+}
+
+Glib::RefPtr<Fontset> Context::load_fontset(const FontDescription& desc, const Language& language) const
+{
+ return Glib::wrap(pango_context_load_fontset(const_cast<PangoContext*>(gobj()), (desc).gobj(), const_cast<PangoLanguage*>((language).gobj())));
+}
+
+FontMetrics Context::get_metrics(const FontDescription& desc, const Language& language) const
+{
+ return FontMetrics((pango_context_get_metrics(const_cast<PangoContext*>(gobj()), (desc).gobj(), const_cast<PangoLanguage*>((language).gobj()))));
+}
+
+void Context::set_font_description(const FontDescription& desc)
+{
+ pango_context_set_font_description(gobj(), (desc).gobj());
+}
+
+FontDescription Context::get_font_description() const
+{
+ return FontDescription((pango_context_get_font_description(const_cast<PangoContext*>(gobj()))));
+}
+
+Language Context::get_language() const
+{
+ return Language(pango_context_get_language(const_cast<PangoContext*>(gobj())));
+}
+
+void Context::set_language(const Language& language)
+{
+ pango_context_set_language(gobj(), const_cast<PangoLanguage*>((language).gobj()));
+}
+
+void Context::set_base_dir(Direction direction)
+{
+ pango_context_set_base_dir(gobj(), ((PangoDirection)(direction)));
+}
+
+Direction Context::get_base_dir() const
+{
+ return ((Direction)(pango_context_get_base_dir(const_cast<PangoContext*>(gobj()))));
+}
+
+void Context::set_matrix(const Matrix& matrix)
+{
+ pango_context_set_matrix(gobj(), &(matrix));
+}
+
+
+} // namespace Pango
+
+
diff --git a/libs/gtkmm2/pango/pangomm/context.h b/libs/gtkmm2/pango/pangomm/context.h
new file mode 100644
index 0000000000..6ce379ff89
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/context.h
@@ -0,0 +1,349 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _PANGOMM_CONTEXT_H
+#define _PANGOMM_CONTEXT_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* context.h
+ *
+ * Copyright (C) 1998-1999 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#include <glibmm/object.h>
+#include <glibmm/arrayhandle.h>
+#include <glibmm/listhandle.h>
+#include <pangomm/fontdescription.h>
+#include <pangomm/fontmetrics.h>
+#include <pangomm/fontset.h>
+#include <pangomm/fontmap.h>
+#include <pangomm/item.h>
+#include <pangomm/attrlist.h>
+#include <pangomm/types.h> //For Matrix
+#include <pango/pango-context.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _PangoContext PangoContext;
+typedef struct _PangoContextClass PangoContextClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Pango
+{ class Context_Class; } // namespace Pango
+namespace Pango
+{
+
+
+/** @addtogroup pangommEnums Enums and Flags */
+
+/**
+ * @ingroup pangommEnums
+ */
+enum Direction
+{
+ DIRECTION_LTR,
+ DIRECTION_RTL,
+ DIRECTION_TTB_LTR,
+ DIRECTION_TTB_RTL,
+ DIRECTION_WEAK_LTR,
+ DIRECTION_WEAK_RTL,
+ DIRECTION_NEUTRAL
+};
+
+} // namespace Pango
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Pango::Direction> : public Glib::Value_Enum<Pango::Direction>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Pango
+{
+
+
+/** A Pango::Context stores global information used to control the itemization process.
+ * You can retrieve a Pango::Context object with Gtk::Widget::create_pango_context() or
+ * Gtk::Widget::get_pango_context(). If you don't use gtkmm call some c function of the
+ * pango backend you intend to use and create a wrapper for the returned context,
+ * e.g. Glib::wrap(pango_x_get_context()).
+ *
+ * Creating a Pango::Context object is the starting point of every rendering process.
+ * You can either use it to create a high level Pango::Layout object which does all
+ * the hard work for you by passing it into
+ * Pango::Layout::create() or to generate glyph strings from character strings with
+ * the help of itemize() and Pango::Item::shape() subsequently.
+ *
+ * Which fonts are used for rendering can be influenced by setting the default
+ * font description, language and base direction of the context.
+ *
+ * If you want to calculate the space some text will need to be displayed you
+ * might find the functions of Pango::FontMetrics useful. Use get_metrics() to
+ * obtain the Pango::FontMetrics object for a specific Pango::FontDescription.
+ * For more detailed calculations in a rendering-system-independant manner
+ * and to determine whether specific characters can be represented by the
+ * font that would be used for a specific Pango::FontDescription load a
+ * Pango::Fontset with load_fontset() (load_font() returns the Pango::Font
+ * that is the closest match for a Pango::FontDescription; however that's not
+ * necessarily the font that will be used for rendering).
+ */
+
+class Context : public Glib::Object
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef Context CppObjectType;
+ typedef Context_Class CppClassType;
+ typedef PangoContext BaseObjectType;
+ typedef PangoContextClass BaseClassType;
+
+private: friend class Context_Class;
+ static CppClassType context_class_;
+
+private:
+ // noncopyable
+ Context(const Context&);
+ Context& operator=(const Context&);
+
+protected:
+ explicit Context(const Glib::ConstructParams& construct_params);
+ explicit Context(PangoContext* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~Context();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ PangoContext* gobj() { return reinterpret_cast<PangoContext*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const PangoContext* gobj() const { return reinterpret_cast<PangoContext*>(gobject_); }
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ PangoContext* gobj_copy();
+
+private:
+
+ //PANGO_ENABLE_BACKEND
+
+protected:
+ Context();
+
+public:
+ /** List all available font families for a context.
+ * You can specify one of these as your desired font family in the Pango::FontDesciption
+ * objects you use, e.g. in the default font description of the context.
+ * @return An array of Pango::FontFamily objects.
+ */
+ Glib::ArrayHandle< Glib::RefPtr<FontFamily> > list_families() const;
+
+
+ /** Gets the Pango::Fontmap used to look up fonts for this context.
+ * @return The font map for the Pango::Context. This value
+ * is owned by Pango and should not be unreferenced.
+ *
+ * Since: 1.6.
+ */
+ Glib::RefPtr<FontMap> get_font_map();
+
+ /** Gets the Pango::Fontmap used to look up fonts for this context.
+ * @return The font map for the Pango::Context. This value
+ * is owned by Pango and should not be unreferenced.
+ *
+ * Since: 1.6.
+ */
+ Glib::RefPtr<const FontMap> get_font_map() const;
+
+
+ /** Loads the font in one of the fontmaps in the context
+ * that is the closest match for @a desc .
+ * @param desc A Pango::FontDescription describing the font to load.
+ * @return The font loaded, or <tt>0</tt> if no font matched.
+ */
+ Glib::RefPtr<Font> load_font(const FontDescription& desc) const;
+
+ /** Load a set of fonts in the context that can be used to render
+ * a font matching @a desc .
+ * @param desc A Pango::FontDescription describing the fonts to load.
+ * @param language A Pango::Language the fonts will be used for.
+ * @return The fontset, or <tt>0</tt> if no font matched.
+ */
+ Glib::RefPtr<Fontset> load_fontset(const FontDescription& desc, const Language& language) const;
+
+ /** Get overall metric information for a particular font description.
+ * The metrics may be substantially different for different scripts. However this
+ * function overload returns the metrics of the entire font.
+ * @param desc A Pango::FontDescription object.
+ * @return A Pango::FontMetrics object.
+ */
+ FontMetrics get_metrics(const FontDescription& desc) const;
+
+ /** Get overall metric information for a font particular font
+ * description. Since the metrics may be substantially different for
+ * different scripts, a language tag can be provided to indicate that
+ * the metrics should be retrieved that correspond to the script(s)
+ * used by that language.
+ *
+ * The Pango::FontDescription is interpreted in the same way as
+ * by pango_itemize(), and the family name may be a comma separated
+ * list of figures. If characters from multiple of these families
+ * would be used to render the string, then the returned fonts would
+ * be a composite of the metrics for the fonts loaded for the
+ * individual families.
+ * @param desc A Pango::FontDescription structure.
+ * @param language Language tag used to determine which script to get the metrics
+ * for.
+ * @return A Pango::Metrics object.
+ */
+ FontMetrics get_metrics(const FontDescription& desc, const Language& language) const;
+
+ /** Set the default font description for the context
+ * @param desc The new pango font description.
+ */
+ void set_font_description(const FontDescription& desc);
+
+ /** Retrieve the default font description for the context.
+ * @return A pointer to the context's default font description.
+ * This value must not be modified or freed.
+ */
+ FontDescription get_font_description() const;
+
+ /** Retrieves the global language tag for the context.
+ * @return The global language tag.
+ */
+ Language get_language() const;
+
+ /** Sets the global language tag for the context.
+ * @param language The new language tag.
+ */
+ void set_language(const Language& language);
+
+ /** Sets the base direction for the context.
+ *
+ * The base direction is used in applying the Unicode bidirectional
+ * algorithm; if the @a direction is Pango::DIRECTION_LTR or
+ * Pango::DIRECTION_RTL, then the value will be used as the paragraph
+ * direction in the Unicode bidirectional algorithm. A value of
+ * Pango::DIRECTION_WEAK_LTR or Pango::DIRECTION_WEAK_RTL is used only
+ * for paragraphs that do not contain any strong characters themselves.
+ * @param direction The new base direction.
+ */
+ void set_base_dir(Direction direction);
+
+ /** Retrieves the base direction for the context. See
+ * pango_context_set_base_dir().
+ * @return The base direction for the context.
+ */
+ Direction get_base_dir() const;
+
+
+ /** Sets the transformation matrix that will be applied when rendering
+ * with this context. Note that reported metrics are in the user space
+ * coordinates before the application of the matrix, not device-space
+ * coordiantes after the application of the matrix. So, they don't scale
+ * with the matrix, though they may change slightly for different
+ * matrices, depending on how the text is fit to the pixel grid.
+ *
+ * Since: 1.6
+ * @param matrix A Pango::Matrix, or <tt>0</tt> to unset any existing matrix.
+ * (No matrix set is the same as setting the identity matrix.).
+ */
+ void set_matrix(const Matrix& matrix);
+ //TODO: _WRAP_METHOD(Matrix get_matrix() const, pango_context_get_matrix)
+
+ /** Breaks a piece of text into segments with consistent directional level and shaping engine.
+ * Each byte of @a text will be contained in exactly one of the items in the returned list.
+ * The generated list of items will be in logical order (the start offsets of the items
+ * are ascending).
+ * @param text The text to itemize.
+ * @param attrs The set of attributes that apply.
+ * @return A list of Pango::Item objects.
+ */
+ ListHandle_Item itemize(const Glib::ustring& text, const AttrList& attrs) const;
+
+ /** Breaks a piece of text into segments with consistent directional level and shaping engine.
+ * Each byte of @a text will be contained in exactly one of the items in the returned list.
+ * The generated list of items will be in logical order (the start offsets of the items
+ * are ascending).
+ *
+ * @a cached_iter should be an iterator over @a attrs currently positioned at a range before
+ * or containing @a start_index. @a cached_iter will be advanced to the range covering the
+ * position just after @a start_index + @a length. (i.e. if itemizing in a loop, just keep
+ * passing in the same @a cached_iter).
+ *
+ * @param text The text to itemize.
+ * @param start_index First byte in @a text to process.
+ * @param length The number of bytes (not characters) to process after @a start_index. This must be >= <tt>0</tt>.
+ * @param attrs The set of attributes that apply to @a text.
+ * @param cached_iter Cached attribute iterator.
+ * @return A list of Pango::Item structures.
+ */
+ ListHandle_Item itemize(const Glib::ustring& text, int start_index, int length,
+ const AttrList& attrs, AttrIter& cached_iter) const;
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+};
+
+} /* namespace Pango */
+
+
+namespace Glib
+{
+ /** @relates Pango::Context
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Pango::Context> wrap(PangoContext* object, bool take_copy = false);
+}
+
+
+#endif /* _PANGOMM_CONTEXT_H */
+
diff --git a/libs/gtkmm2/pango/pangomm/coverage.cc b/libs/gtkmm2/pango/pangomm/coverage.cc
new file mode 100644
index 0000000000..e755994012
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/coverage.cc
@@ -0,0 +1,151 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <pangomm/coverage.h>
+#include <pangomm/private/coverage_p.h>
+
+#include <pango/pango-enum-types.h>
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-1999 The Gtk-- Development Team
+ * Copyright 2001 Free Software Foundation
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+namespace Pango
+{
+
+Glib::ArrayHandle<unsigned char> Coverage::to_bytes() const
+{
+ guchar* bytes = 0;
+ int n_bytes = 0;
+ pango_coverage_to_bytes(const_cast<PangoCoverage*>(gobj()), &bytes, &n_bytes);
+ return Glib::ArrayHandle<unsigned char>(bytes, n_bytes, Glib::OWNERSHIP_SHALLOW);
+}
+
+} /* namespace Pango */
+
+
+namespace
+{
+} // anonymous namespace
+
+// static
+GType Glib::Value<Pango::CoverageLevel>::value_type()
+{
+ return pango_coverage_level_get_type();
+}
+
+
+/* Why reinterpret_cast<Coverage*>(gobject) is needed:
+ *
+ * A Coverage instance is in fact always a PangoCoverage instance.
+ * Unfortunately, PangoCoverage cannot be a member of Coverage,
+ * because it is an opaque struct. Also, the C interface does not provide
+ * any hooks to install a destroy notification handler, thus we cannot
+ * wrap it dynamically either.
+ *
+ * The cast works because Coverage does not have any member data, and
+ * it is impossible to derive from it. This is ensured by not implementing
+ * the (protected) default constructor. The ctor is protected rather than
+ * private just to avoid a compile warning.
+ */
+
+namespace Glib
+{
+
+Glib::RefPtr<Pango::Coverage> wrap(PangoCoverage* object, bool take_copy)
+{
+ if(take_copy && object)
+ pango_coverage_ref(object);
+
+ // See the comment at the top of this file, if you want to know why the cast works.
+ return Glib::RefPtr<Pango::Coverage>(reinterpret_cast<Pango::Coverage*>(object));
+}
+
+} // namespace Glib
+
+
+namespace Pango
+{
+
+
+// static
+Glib::RefPtr<Coverage> Coverage::create()
+{
+ // See the comment at the top of this file, if you want to know why the cast works.
+ return Glib::RefPtr<Coverage>(reinterpret_cast<Coverage*>(pango_coverage_new()));
+}
+
+void Coverage::reference() const
+{
+ // See the comment at the top of this file, if you want to know why the cast works.
+ pango_coverage_ref(reinterpret_cast<PangoCoverage*>(const_cast<Coverage*>(this)));
+}
+
+void Coverage::unreference() const
+{
+ // See the comment at the top of this file, if you want to know why the cast works.
+ pango_coverage_unref(reinterpret_cast<PangoCoverage*>(const_cast<Coverage*>(this)));
+}
+
+PangoCoverage* Coverage::gobj()
+{
+ // See the comment at the top of this file, if you want to know why the cast works.
+ return reinterpret_cast<PangoCoverage*>(this);
+}
+
+const PangoCoverage* Coverage::gobj() const
+{
+ // See the comment at the top of this file, if you want to know why the cast works.
+ return reinterpret_cast<const PangoCoverage*>(this);
+}
+
+PangoCoverage* Coverage::gobj_copy() const
+{
+ // See the comment at the top of this file, if you want to know why the cast works.
+ PangoCoverage *const gobject = reinterpret_cast<PangoCoverage*>(const_cast<Coverage*>(this));
+ pango_coverage_ref(gobject);
+ return gobject;
+}
+
+
+Glib::RefPtr<Coverage> Coverage::create(const guchar* bytes, int n_bytes)
+{
+ return Glib::wrap(pango_coverage_from_bytes(const_cast<guchar*>(bytes), n_bytes));
+}
+
+CoverageLevel Coverage::get(int index) const
+{
+ return ((CoverageLevel)(pango_coverage_get(const_cast<PangoCoverage*>(gobj()), index)));
+}
+
+void Coverage::set(int index, CoverageLevel level)
+{
+ pango_coverage_set(gobj(), index, ((PangoCoverageLevel)(level)));
+}
+
+void Coverage::max(const Glib::RefPtr<Coverage>& other) const
+{
+ pango_coverage_max(const_cast<PangoCoverage*>(gobj()), Glib::unwrap(other));
+}
+
+
+} // namespace Pango
+
+
diff --git a/libs/gtkmm2/pango/pangomm/coverage.h b/libs/gtkmm2/pango/pangomm/coverage.h
new file mode 100644
index 0000000000..eebbffd628
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/coverage.h
@@ -0,0 +1,169 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _PANGOMM_COVERAGE_H
+#define _PANGOMM_COVERAGE_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* coverage.h
+ *
+ * Copyright (C) 1998-1999 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/arrayhandle.h>
+#include <pango/pango-font.h>
+
+
+namespace Pango
+{
+
+
+/** @addtogroup pangommEnums Enums and Flags */
+
+/**
+ * @ingroup pangommEnums
+ */
+enum CoverageLevel
+{
+ COVERAGE_NONE,
+ COVERAGE_FALLBACK,
+ COVERAGE_APPROXIMATE,
+ COVERAGE_EXACT
+};
+
+} // namespace Pango
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Pango::CoverageLevel> : public Glib::Value_Enum<Pango::CoverageLevel>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Pango
+{
+
+
+/** A Pango::Coverage represents a map from ISO-10646 character point to Pango::CoverageLevel.
+ * It is often necessary in pango to determine if a particular font can represent a particular character,
+ * and also how well it can represent that character. Pango::Coverage holds this information.
+ */
+class Coverage
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Coverage CppObjectType;
+ typedef PangoCoverage BaseObjectType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ static Glib::RefPtr<Coverage> create();
+
+ // For use with Glib::RefPtr<> only.
+ void reference() const;
+ void unreference() const;
+
+ ///Provides access to the underlying C instance.
+ PangoCoverage* gobj();
+
+ ///Provides access to the underlying C instance.
+ const PangoCoverage* gobj() const;
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ PangoCoverage* gobj_copy() const;
+
+protected:
+ // Do not derive this. Pango::Coverage can neither be constructed nor deleted.
+ Coverage();
+ void operator delete(void*, size_t);
+
+private:
+ // noncopyable
+ Coverage(const Coverage&);
+ Coverage& operator=(const Coverage&);
+
+
+ //pango ref doc: "This function may now be unecessary since we refcount the structure. Mail otaylor redhat.com if you use it."
+
+
+public:
+
+ /** Convert data generated from pango_converage_to_bytes() back
+ * to a Pango::Coverage
+ * @param bytes Binary data representing a Pango::Coverage.
+ * @param n_bytes The size of @a bytes in bytes.
+ * @return A newly allocated Pango::Coverage, or <tt>0</tt> if
+ * the data was invalid.
+ */
+ static Glib::RefPtr<Coverage> create(const guchar* bytes, int n_bytes);
+
+ //_WRAP_METHOD(Glib::RefPtr<Coverage> copy() const, pango_coverage_copy) //see above
+
+
+ /** Determine whether a particular index is covered by @a coverage
+ * @param index The index to check.
+ */
+ CoverageLevel get(int index) const;
+
+ /** Modify a particular index within @a coverage
+ * @param index The index to modify.
+ * @param level The new level for @a index .
+ */
+ void set(int index, CoverageLevel level);
+
+ /** Set the coverage for each index in @a coverage to be the max (better)
+ * value of the current coverage for the index and the coverage for
+ * the corresponding index in @a other .
+ * @param other Another Pango::Coverage.
+ */
+ void max(const Glib::RefPtr<Coverage>& other) const;
+
+ /** Convert the coverage map into a flat binary format.
+ * @return An array of bytes representing the coverage map.
+ */
+ Glib::ArrayHandle<unsigned char> to_bytes() const;
+
+
+};
+
+} // namespace Pango
+
+
+namespace Glib
+{
+
+ /** @relates Pango::Coverage
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Pango::Coverage> wrap(PangoCoverage* object, bool take_copy = false);
+
+} // namespace Glib
+
+#endif /* _PANGOMM_COVERAGE_H */
+
diff --git a/libs/gtkmm2/pango/pangomm/font.cc b/libs/gtkmm2/pango/pangomm/font.cc
new file mode 100644
index 0000000000..b126931536
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/font.cc
@@ -0,0 +1,169 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <pangomm/font.h>
+#include <pangomm/private/font_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-1999 The Gtk-- Development Team
+ * Copyright 2001 Free Software Foundation
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+namespace Pango
+{
+
+FontMetrics Font::get_metrics() const
+{
+ return FontMetrics(pango_font_get_metrics(const_cast<PangoFont*>(gobj()), 0));
+}
+
+Rectangle Font::get_glyph_ink_extents(Glyph glyph) const
+{
+ Rectangle ink_rect;
+ pango_font_get_glyph_extents(const_cast<PangoFont*>(gobj()), glyph, ink_rect.gobj(), 0);
+ return ink_rect;
+}
+
+Rectangle Font::get_glyph_logical_extents(Glyph glyph) const
+{
+ Rectangle logical_rect;
+ pango_font_get_glyph_extents(const_cast<PangoFont*>(gobj()), glyph, 0, logical_rect.gobj());
+ return logical_rect;
+}
+
+} /* namespace Pango */
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Pango::Font> wrap(PangoFont* object, bool take_copy)
+{
+ return Glib::RefPtr<Pango::Font>( dynamic_cast<Pango::Font*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} /* namespace Glib */
+
+
+namespace Pango
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Font_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Font_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(pango_font_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Font_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* Font_Class::wrap_new(GObject* object)
+{
+ return new Font((PangoFont*)object);
+}
+
+
+/* The implementation: */
+
+PangoFont* Font::gobj_copy()
+{
+ reference();
+ return gobj();
+}
+
+Font::Font(const Glib::ConstructParams& construct_params)
+:
+ Glib::Object(construct_params)
+{}
+
+Font::Font(PangoFont* castitem)
+:
+ Glib::Object((GObject*)(castitem))
+{}
+
+Font::~Font()
+{}
+
+
+Font::CppClassType Font::font_class_; // initialize static member
+
+GType Font::get_type()
+{
+ return font_class_.init().get_type();
+}
+
+GType Font::get_base_type()
+{
+ return pango_font_get_type();
+}
+
+
+FontDescription Font::describe() const
+{
+ return FontDescription((pango_font_describe(const_cast<PangoFont*>(gobj()))));
+}
+
+Glib::RefPtr<Coverage> Font::get_coverage(const Language& language) const
+{
+ return Glib::wrap(pango_font_get_coverage(const_cast<PangoFont*>(gobj()), const_cast<PangoLanguage*>((language).gobj())));
+}
+
+FontMetrics Font::get_metrics(const Language& language) const
+{
+ return FontMetrics((pango_font_get_metrics(const_cast<PangoFont*>(gobj()), const_cast<PangoLanguage*>((language).gobj()))));
+}
+
+void Font::get_glyph_extents(Glyph glyph, Rectangle& ink_rect, Rectangle& logical_rect) const
+{
+ pango_font_get_glyph_extents(const_cast<PangoFont*>(gobj()), glyph, (ink_rect).gobj(), (logical_rect).gobj());
+}
+
+
+} // namespace Pango
+
+
diff --git a/libs/gtkmm2/pango/pangomm/font.h b/libs/gtkmm2/pango/pangomm/font.h
new file mode 100644
index 0000000000..6aa53a1629
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/font.h
@@ -0,0 +1,194 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _PANGOMM_FONT_H
+#define _PANGOMM_FONT_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* font.h
+ *
+ * Copyright (C) 1998-1999 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#include <glibmm/object.h>
+#include <pangomm/rectangle.h>
+#include <pangomm/language.h>
+#include <pangomm/glyph.h>
+#include <pangomm/fontdescription.h>
+#include <pangomm/fontmetrics.h>
+#include <pangomm/coverage.h>
+#include <pango/pango-font.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _PangoFont PangoFont;
+typedef struct _PangoFontClass PangoFontClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Pango
+{ class Font_Class; } // namespace Pango
+namespace Pango
+{
+
+const int SCALE = 1024;
+const double SCALE_XX_SMALL = 0.5787037037037;
+const double SCALE_X_SMALL = 0.6444444444444;
+const double SCALE_SMALL = 0.8333333333333;
+const double SCALE_MEDIUM = 1.0;
+const double SCALE_LARGE = 1.2;
+const double SCALE_X_LARGE = 1.4399999999999;
+const double SCALE_XX_LARGE = 1.728;
+
+
+/** A Pango::Font is used to represent a font in a rendering-system-independent matter.
+ */
+
+class Font : public Glib::Object
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef Font CppObjectType;
+ typedef Font_Class CppClassType;
+ typedef PangoFont BaseObjectType;
+ typedef PangoFontClass BaseClassType;
+
+private: friend class Font_Class;
+ static CppClassType font_class_;
+
+private:
+ // noncopyable
+ Font(const Font&);
+ Font& operator=(const Font&);
+
+protected:
+ explicit Font(const Glib::ConstructParams& construct_params);
+ explicit Font(PangoFont* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~Font();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ PangoFont* gobj() { return reinterpret_cast<PangoFont*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const PangoFont* gobj() const { return reinterpret_cast<PangoFont*>(gobject_); }
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ PangoFont* gobj_copy();
+
+private:
+
+ //This would return a PangoEngineShape* but the definition of the struct is surrounded by #define PANGO_ENABLE_BACKEND [...] #endif. So don't wrap it.
+
+public:
+
+ /** Returns a description of the font.
+ * @return A newly-allocated Pango::FontDescription object.
+ */
+ FontDescription describe() const;
+
+ /** Computes the coverage map for a given font and language tag.
+ * @param language The language tag.
+ * @return A newly-allocated Pango::Coverage object.
+ */
+ Glib::RefPtr<Coverage> get_coverage(const Language& language) const;
+
+ /** Gets overall metric information for a font.
+ * The metrics may be substantially different for different scripts.
+ * However, this function overload returns the metrics for the entire font.
+ */
+ FontMetrics get_metrics() const;
+
+ /** Gets overall metric information for a font. Since the metrics may be
+ * substantially different for different scripts, a language tag can
+ * be provided to indicate that the metrics should be retrieved that
+ * correspond to the script(s) used by that language.
+ * @param language Language tag used to determine which script to get the metrics
+ * for.
+ * @return A Pango::Metrics object.
+ */
+ FontMetrics get_metrics(const Language& language) const;
+
+
+ /** Gets the logical and ink extents of a glyph within a font. The
+ * coordinate system for each rectangle has its origin at the
+ * base line and horizontal origin of the character with increasing
+ * coordinates extending to the right and down. The macros PANGO_ASCENT(),
+ * PANGO_DESCENT(), PANGO_LBEARING(), and PANGO_RBEARING can be used to convert
+ * from the extents rectangle to more traditional font metrics. The units
+ * of the rectangles are in 1/PANGO_SCALE of a device unit.
+ * @param glyph The glyph index.
+ * @param ink_rect Rectangle used to store the extents of the glyph as drawn.
+ * @param logical_rect Rectangle used to store the logical extents of the glyph.
+ */
+ void get_glyph_extents(Glyph glyph, Rectangle& ink_rect, Rectangle& logical_rect) const;
+
+ /** Get the ink extents of a glyph within the font.
+ * @param glyph The glyph index.
+ * @return The extents of the glyph as drawn.
+ */
+ Rectangle get_glyph_ink_extents(Glyph glyph) const;
+
+ /** Gets the logical extents of a glyph within the font.
+ * @param glyph The glyph index.
+ * @return The logical extents of the glyph.
+ */
+ Rectangle get_glyph_logical_extents(Glyph glyph) const;
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+};
+
+} /* namespace Pango */
+
+
+namespace Glib
+{
+ /** @relates Pango::Font
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Pango::Font> wrap(PangoFont* object, bool take_copy = false);
+}
+
+
+#endif /* _PANGOMM_FONT_H */
+
diff --git a/libs/gtkmm2/pango/pangomm/fontdescription.cc b/libs/gtkmm2/pango/pangomm/fontdescription.cc
new file mode 100644
index 0000000000..af866dc9cb
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/fontdescription.cc
@@ -0,0 +1,252 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <pangomm/fontdescription.h>
+#include <pangomm/private/fontdescription_p.h>
+
+#include <pango/pango-enum-types.h>
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/utility.h>
+
+
+namespace Pango
+{
+
+FontDescription::FontDescription(const Glib::ustring& font_name)
+{
+ gobject_ = pango_font_description_from_string(font_name.c_str());
+}
+
+} // namespace Pango
+
+
+namespace
+{
+} // anonymous namespace
+
+// static
+GType Glib::Value<Pango::Style>::value_type()
+{
+ return pango_style_get_type();
+}
+
+// static
+GType Glib::Value<Pango::Variant>::value_type()
+{
+ return pango_variant_get_type();
+}
+
+// static
+GType Glib::Value<Pango::Stretch>::value_type()
+{
+ return pango_stretch_get_type();
+}
+
+// static
+GType Glib::Value<Pango::Weight>::value_type()
+{
+ return pango_weight_get_type();
+}
+
+// static
+GType Glib::Value<Pango::FontMask>::value_type()
+{
+ return pango_font_mask_get_type();
+}
+
+
+namespace Glib
+{
+
+Pango::FontDescription wrap(PangoFontDescription* object, bool take_copy)
+{
+ return Pango::FontDescription(object, take_copy);
+}
+
+} // namespace Glib
+
+
+namespace Pango
+{
+
+
+// static
+GType FontDescription::get_type()
+{
+ return pango_font_description_get_type();
+}
+
+FontDescription::FontDescription()
+:
+ gobject_ (pango_font_description_new())
+{}
+
+FontDescription::FontDescription(const FontDescription& other)
+:
+ gobject_ ((other.gobject_) ? pango_font_description_copy(other.gobject_) : 0)
+{}
+
+FontDescription::FontDescription(PangoFontDescription* gobject, bool make_a_copy)
+:
+ // For BoxedType wrappers, make_a_copy is true by default. The static
+ // BoxedType wrappers must always take a copy, thus make_a_copy = true
+ // ensures identical behaviour if the default argument is used.
+ gobject_ ((make_a_copy && gobject) ? pango_font_description_copy(gobject) : gobject)
+{}
+
+FontDescription& FontDescription::operator=(const FontDescription& other)
+{
+ FontDescription temp (other);
+ swap(temp);
+ return *this;
+}
+
+FontDescription::~FontDescription()
+{
+ if(gobject_)
+ pango_font_description_free(gobject_);
+}
+
+void FontDescription::swap(FontDescription& other)
+{
+ PangoFontDescription *const temp = gobject_;
+ gobject_ = other.gobject_;
+ other.gobject_ = temp;
+}
+
+PangoFontDescription* FontDescription::gobj_copy() const
+{
+ return pango_font_description_copy(gobject_);
+}
+
+
+guint FontDescription::hash() const
+{
+ return pango_font_description_hash(const_cast<PangoFontDescription*>(gobj()));
+}
+
+void FontDescription::set_family(const Glib::ustring& family)
+{
+ pango_font_description_set_family(gobj(), family.c_str());
+}
+
+Glib::ustring FontDescription::get_family() const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(pango_font_description_get_family(const_cast<PangoFontDescription*>(gobj())));
+}
+
+void FontDescription::set_style(Style style)
+{
+ pango_font_description_set_style(gobj(), ((PangoStyle)(style)));
+}
+
+Style FontDescription::get_style() const
+{
+ return ((Style)(pango_font_description_get_style(const_cast<PangoFontDescription*>(gobj()))));
+}
+
+void FontDescription::set_variant(Variant variant)
+{
+ pango_font_description_set_variant(gobj(), ((PangoVariant)(variant)));
+}
+
+Variant FontDescription::get_variant() const
+{
+ return ((Variant)(pango_font_description_get_variant(const_cast<PangoFontDescription*>(gobj()))));
+}
+
+void FontDescription::set_weight(Weight weight)
+{
+ pango_font_description_set_weight(gobj(), ((PangoWeight)(weight)));
+}
+
+Weight FontDescription::get_weight() const
+{
+ return ((Weight)(pango_font_description_get_weight(const_cast<PangoFontDescription*>(gobj()))));
+}
+
+void FontDescription::set_stretch(Stretch stretch)
+{
+ pango_font_description_set_stretch(gobj(), ((PangoStretch)(stretch)));
+}
+
+Stretch FontDescription::get_stretch() const
+{
+ return ((Stretch)(pango_font_description_get_stretch(const_cast<PangoFontDescription*>(gobj()))));
+}
+
+void FontDescription::set_size(int size)
+{
+ pango_font_description_set_size(gobj(), size);
+}
+
+int FontDescription::get_size() const
+{
+ return pango_font_description_get_size(const_cast<PangoFontDescription*>(gobj()));
+}
+
+FontMask FontDescription::get_set_fields() const
+{
+ return ((FontMask)(pango_font_description_get_set_fields(const_cast<PangoFontDescription*>(gobj()))));
+}
+
+void FontDescription::unset_fields(FontMask to_unset)
+{
+ pango_font_description_unset_fields(gobj(), ((PangoFontMask)(to_unset)));
+}
+
+void FontDescription::merge(const FontDescription& desc_to_merge, bool replace_existing)
+{
+ pango_font_description_merge(gobj(), (desc_to_merge).gobj(), static_cast<int>(replace_existing));
+}
+
+bool FontDescription::better_match(const FontDescription& old_match, const FontDescription& new_match) const
+{
+ return pango_font_description_better_match(const_cast<PangoFontDescription*>(gobj()), (old_match).gobj(), (new_match).gobj());
+}
+
+Glib::ustring FontDescription::to_string() const
+{
+ return Glib::convert_return_gchar_ptr_to_ustring(pango_font_description_to_string(const_cast<PangoFontDescription*>(gobj())));
+}
+
+Glib::ustring FontDescription::to_filename() const
+{
+ return Glib::convert_return_gchar_ptr_to_ustring(pango_font_description_to_filename(const_cast<PangoFontDescription*>(gobj())));
+}
+
+
+bool operator==(const FontDescription& lhs, const FontDescription& rhs)
+{
+ return (pango_font_description_equal(lhs.gobj(), rhs.gobj()) != 0);
+}
+
+bool operator!=(const FontDescription& lhs, const FontDescription& rhs)
+{
+ return (pango_font_description_equal(lhs.gobj(), rhs.gobj()) == 0);
+}
+
+
+} // namespace Pango
+
+
diff --git a/libs/gtkmm2/pango/pangomm/fontdescription.h b/libs/gtkmm2/pango/pangomm/fontdescription.h
new file mode 100644
index 0000000000..1c51be840c
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/fontdescription.h
@@ -0,0 +1,529 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _PANGOMM_FONTDESCRIPTION_H
+#define _PANGOMM_FONTDESCRIPTION_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* fontdescription.h
+ *
+ * Copyright (C) 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <pango/pango-font.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C" { typedef struct _PangoFontDescription PangoFontDescription; }
+#endif
+
+namespace Pango
+{
+
+
+/** @addtogroup pangommEnums Enums and Flags */
+
+/**
+ * @ingroup pangommEnums
+ */
+enum Style
+{
+ STYLE_NORMAL,
+ STYLE_OBLIQUE,
+ STYLE_ITALIC
+};
+
+} // namespace Pango
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Pango::Style> : public Glib::Value_Enum<Pango::Style>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Pango
+{
+
+/**
+ * @ingroup pangommEnums
+ */
+enum Variant
+{
+ VARIANT_NORMAL,
+ VARIANT_SMALL_CAPS
+};
+
+} // namespace Pango
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Pango::Variant> : public Glib::Value_Enum<Pango::Variant>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Pango
+{
+
+/**
+ * @ingroup pangommEnums
+ */
+enum Stretch
+{
+ STRETCH_ULTRA_CONDENSED,
+ STRETCH_EXTRA_CONDENSED,
+ STRETCH_CONDENSED,
+ STRETCH_SEMI_CONDENSED,
+ STRETCH_NORMAL,
+ STRETCH_SEMI_EXPANDED,
+ STRETCH_EXPANDED,
+ STRETCH_EXTRA_EXPANDED,
+ STRETCH_ULTRA_EXPANDED
+};
+
+} // namespace Pango
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Pango::Stretch> : public Glib::Value_Enum<Pango::Stretch>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Pango
+{
+
+/**
+ * @ingroup pangommEnums
+ */
+enum Weight
+{
+ WEIGHT_ULTRALIGHT = 200,
+ WEIGHT_LIGHT = 300,
+ WEIGHT_NORMAL = 400,
+ WEIGHT_BOLD = 700,
+ WEIGHT_ULTRABOLD = 800,
+ WEIGHT_HEAVY = 900
+};
+
+} // namespace Pango
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Pango::Weight> : public Glib::Value_Enum<Pango::Weight>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Pango
+{
+
+/**
+ * @ingroup pangommEnums
+ * @par Bitwise operators:
+ * <tt>%FontMask operator|(FontMask, FontMask)</tt><br>
+ * <tt>%FontMask operator&(FontMask, FontMask)</tt><br>
+ * <tt>%FontMask operator^(FontMask, FontMask)</tt><br>
+ * <tt>%FontMask operator~(FontMask)</tt><br>
+ * <tt>%FontMask& operator|=(FontMask&, FontMask)</tt><br>
+ * <tt>%FontMask& operator&=(FontMask&, FontMask)</tt><br>
+ * <tt>%FontMask& operator^=(FontMask&, FontMask)</tt><br>
+ */
+enum FontMask
+{
+ FONT_MASK_FAMILY = 1 << 0,
+ FONT_MASK_STYLE = 1 << 1,
+ FONT_MASK_VARIANT = 1 << 2,
+ FONT_MASK_WEIGHT = 1 << 3,
+ FONT_MASK_STRETCH = 1 << 4,
+ FONT_MASK_SIZE = 1 << 5
+};
+
+/** @ingroup pangommEnums */
+inline FontMask operator|(FontMask lhs, FontMask rhs)
+ { return static_cast<FontMask>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); }
+
+/** @ingroup pangommEnums */
+inline FontMask operator&(FontMask lhs, FontMask rhs)
+ { return static_cast<FontMask>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); }
+
+/** @ingroup pangommEnums */
+inline FontMask operator^(FontMask lhs, FontMask rhs)
+ { return static_cast<FontMask>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); }
+
+/** @ingroup pangommEnums */
+inline FontMask operator~(FontMask flags)
+ { return static_cast<FontMask>(~static_cast<unsigned>(flags)); }
+
+/** @ingroup pangommEnums */
+inline FontMask& operator|=(FontMask& lhs, FontMask rhs)
+ { return (lhs = static_cast<FontMask>(static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs))); }
+
+/** @ingroup pangommEnums */
+inline FontMask& operator&=(FontMask& lhs, FontMask rhs)
+ { return (lhs = static_cast<FontMask>(static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs))); }
+
+/** @ingroup pangommEnums */
+inline FontMask& operator^=(FontMask& lhs, FontMask rhs)
+ { return (lhs = static_cast<FontMask>(static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs))); }
+
+} // namespace Pango
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Pango::FontMask> : public Glib::Value_Flags<Pango::FontMask>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Pango
+{
+
+
+/** A Pango::FontDescription represents the description of an ideal font.
+ * It is used both to list what fonts are available on the system and also for specifying the characteristics of a font to load.
+ */
+class FontDescription
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef FontDescription CppObjectType;
+ typedef PangoFontDescription BaseObjectType;
+
+ static GType get_type() G_GNUC_CONST;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ FontDescription();
+
+ explicit FontDescription(PangoFontDescription* gobject, bool make_a_copy = true);
+
+ FontDescription(const FontDescription& other);
+ FontDescription& operator=(const FontDescription& other);
+
+ ~FontDescription();
+
+ void swap(FontDescription& other);
+
+ ///Provides access to the underlying C instance.
+ PangoFontDescription* gobj() { return gobject_; }
+
+ ///Provides access to the underlying C instance.
+ const PangoFontDescription* gobj() const { return gobject_; }
+
+ ///Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs.
+ PangoFontDescription* gobj_copy() const;
+
+protected:
+ PangoFontDescription* gobject_;
+
+private:
+
+
+ /* These functions are dangerous! The first casts the "const" from the parameter away
+ * copying the pointer and keep it hanging around.
+ * So desc.set_family_static("some_family") would lead to a segfault.
+ * The latter makes a shallow copy of the parameter's "family" data member.
+ * So if the FontDescription you passed in dies, a pointer to its (deleted)
+ * family data member still hangs around!
+ * This is why we can't wrap these functions!
+ */
+
+
+public:
+ /** Constructs a font description from a string representation.
+ * @a font_name must have the form
+ * "[FAMILY-LIST] [STYLE-OPTIONS] [SIZE]", where FAMILY-LIST is a comma separated
+ * list of families optionally terminated by a comma, STYLE_OPTIONS is a whitespace
+ * separated list of words where each WORD describes one of style, variant, weight,
+ * or stretch, and SIZE is an decimal number (size in points). Any one of the
+ * options may be absent. If FAMILY-LIST is absent, then the family_name field
+ * of the resulting font description will be initialized to 0. If STYLE-OPTIONS
+ * is missing, then all style options will be set to the default values. If SIZE
+ * is missing, the size in the resulting font description will be set to 0.
+ * @param font_name String representation of a font description.
+ */
+ explicit FontDescription(const Glib::ustring& font_name);
+
+
+ /** Computes a hash of a Pango::FontDescription structure suitable
+ * to be used, for example, as an argument to Glib::hash_table_new().
+ * @return The hash value.
+ */
+ guint hash() const;
+
+ /** Sets the family name field of a font description. The family
+ * name represents a family of related font styles, and will
+ * resolve to a particular Pango::FontFamily. In some uses of
+ * Pango::FontDescription, it is also possible to use a comma
+ * separated list of family names for this field.
+ * @param family A string representing the family name.
+ */
+ void set_family(const Glib::ustring& family);
+
+ /** Gets the family name field of a font description. See
+ * pango_font_description_set_family().
+ * @return The family name field. (Will be <tt>0</tt> if not previously set.).
+ */
+ Glib::ustring get_family() const;
+
+ /** Sets the style field of a Pango::FontDescription. The
+ * Pango::Style enumeration describes whether the font is slanted and
+ * the manner in which it is slanted; it can be either
+ * Pango::STYLE_NORMAL, Pango::STYLE_ITALIC, or Pango::STYLE_OBLIQUE.
+ * Most fonts will either have a italic style or an oblique
+ * style, but not both, and font matching in Pango will
+ * match italic specifications with oblique fonts and vice-versa
+ * if an exact match is not found.
+ * @param style The style for the font description.
+ */
+ void set_style(Style style);
+
+ /** Gets the style field of a Pango::FontDescription. See
+ * pango_font_description_set_style().
+ * @return The style field for the font description.
+ * Use pango_font_description_get_set_fields() to find out if
+ * the field was explicitely set or not.
+ */
+ Style get_style() const;
+
+ /** Sets the variant field of a font description. The Pango::Variant
+ * can either be Pango::VARIANT_NORMAL or Pango::VARIANT_SMALL_CAPS.
+ * @param variant The variant type for the font description.
+ */
+ void set_variant(Variant variant);
+
+ /** Gets the variant field of a Pango::FontDescription. See
+ * pango_font_description_set_variant().
+ * @return The variant field for the font description. Use
+ * pango_font_description_get_set_fields() to find out if
+ * the field was explicitely set or not.
+ */
+ Variant get_variant() const;
+
+ /** Sets the weight field of a font description. The weight field
+ * specifies how bold or light the font should be. In addition
+ * to the values of the Pango::Weight enumeration, other intermediate
+ * numeric values are possible.
+ * @param weight The weight for the font description.
+ */
+ void set_weight(Weight weight);
+
+ /** Gets the weight field of a font description. See
+ * pango_font_description_set_weight().
+ * @return The weight field for the font description. Use
+ * pango_font_description_get_set_fields() to find out if
+ * the field was explicitely set or not.
+ */
+ Weight get_weight() const;
+
+ /** Sets the stretch field of a font description. The stretch field
+ * specifies how narrow or wide the font should be.
+ * @param stretch The stretch for the font description.
+ */
+ void set_stretch(Stretch stretch);
+
+ /** Gets the stretch field of a font description.
+ * See pango_font_description_set_stretch().
+ * @return The stretch field for the font description. Use
+ * pango_font_description_get_set_fields() to find out if
+ * the field was explicitely set or not.
+ */
+ Stretch get_stretch() const;
+
+ /** Sets the size field of a font description in fractional points. This is mutually
+ * exclusive with pango_font_description_set_absolute_size().
+ * @param size The size of the font in points, scaled by PANGO_SCALE. (That is,
+ * a @a size value of 10 * PANGO_SCALE is a 10 point font. The conversion
+ * factor between points and device units depends on system configuration
+ * and the output device. For screen display, a logical DPI of 96 is
+ * common, in which case a 10 point font corresponds to a 10 * (96 / 72) = 13.3
+ * pixel font. Use pango_font_description_set_absolute_size() if you need
+ * a particular size in device units.
+ */
+ void set_size(int size);
+
+ /** Gets the size field of a font description.
+ * See pango_font_description_get_size().
+ * @return The size field for the font description in points or device units.
+ * You must call pango_font_description_get_size_is_absolute()
+ * to find out which is the case. Returns 0 if the size field has not
+ * previously been set. pango_font_description_get_set_fields() to
+ * find out if the field was explicitely set or not.
+ */
+ int get_size() const;
+
+ /** Determines which fields in a font description have been set.
+ * @return A bitmask with bits set corresponding to the
+ * fields in @a desc that have been set.
+ */
+ FontMask get_set_fields() const;
+
+ /** Unsets some of the fields in a Pango::FontDescription. Note that
+ * this merely marks the fields cleared, it does not clear the
+ * settings for those fields, to clear a family name set with
+ * pango_font_description_set_family_static() so that it won't
+ * be returned by subsequent calls to pango_font_description_get_family(),
+ * you must actually call pango_font_description_set_family (desc, <tt>0</tt>);
+ * @param to_unset Bitmask of fields in the @a desc to unset.
+ */
+ void unset_fields(FontMask to_unset);
+
+ /** Merges the fields that are set in @a desc_to_merge into the fields in
+ * @a desc . If @a replace_existing is <tt>false</tt>, only fields in @a desc that
+ * are not already set are affected. If <tt>true</tt>, then fields that are
+ * already set will be replaced as well.
+ * @param desc_to_merge The Pango::FontDescription to merge from.
+ * @param replace_existing If <tt>true</tt>, replace fields in @a desc with the
+ * corresponding values from @a desc_to_merge , even if they
+ * are already exist.
+ */
+ void merge(const FontDescription& desc_to_merge, bool replace_existing);
+
+ /** Determines if the style attributes of @a new_match are a closer match
+ * for @a desc than @a old_match , or if @a old_match is <tt>0</tt>, determines if
+ * @a new_match is a match at all. Approximate matching is done for
+ * weight and style; other attributes must match exactly.
+ * @param old_match A Pango::FontDescription, or <tt>0</tt>.
+ * @param new_match A Pango::FontDescription.
+ * @return <tt>true</tt> if @a new_match is a better match.
+ */
+ bool better_match(const FontDescription& old_match, const FontDescription& new_match) const;
+
+ /** Creates a string representation of a font description. See
+ * description_from_string() for a description of the
+ * format of the string representation. The family list in the
+ * string description will only have a terminating comma if the
+ * last word of the list is a valid style option.
+ * @return The string.
+ */
+ Glib::ustring to_string() const;
+
+ /** Creates a filename representation of a font description. The
+ * filename is identical to the result from calling
+ * pango_font_description_to_string(), but with underscores instead of
+ * characters that are untypical in filenames, and in lower case only.
+ * @return The filename.
+ */
+ Glib::ustring to_filename() const;
+
+
+};
+
+} //namespace Pango
+
+
+namespace Pango
+{
+
+/** @relates Pango::FontDescription
+ * @param lhs The left-hand side
+ * @param rhs The right-hand side
+ * @result The result
+ */
+bool operator==(const FontDescription& lhs, const FontDescription& rhs);
+
+/** @relates Pango::FontDescription
+ * @param lhs The left-hand side
+ * @param rhs The right-hand side
+ * @result The result
+ */
+bool operator!=(const FontDescription& lhs, const FontDescription& rhs);
+
+
+} // namespace Pango
+
+
+namespace Pango
+{
+
+/** @relates Pango::FontDescription
+ * @param lhs The left-hand side
+ * @param rhs The right-hand side
+ */
+inline void swap(FontDescription& lhs, FontDescription& rhs)
+ { lhs.swap(rhs); }
+
+} // namespace Pango
+
+namespace Glib
+{
+
+/** @relates Pango::FontDescription
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+Pango::FontDescription wrap(PangoFontDescription* object, bool take_copy = false);
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+template <>
+class Value<Pango::FontDescription> : public Glib::Value_Boxed<Pango::FontDescription>
+{};
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+} // namespace Glib
+
+#endif /* _PANGOMM_FONTDESCRIPTION_H */
+
diff --git a/libs/gtkmm2/pango/pangomm/fontface.cc b/libs/gtkmm2/pango/pangomm/fontface.cc
new file mode 100644
index 0000000000..44c087aaef
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/fontface.cc
@@ -0,0 +1,148 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <pangomm/fontface.h>
+#include <pangomm/private/fontface_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+namespace Pango
+{
+
+Glib::ArrayHandle<int> FontFace::list_sizes() const
+{
+ int* sizes = 0;
+ int n_sizes = 0;
+ pango_font_face_list_sizes(const_cast<PangoFontFace*>(gobj()), &sizes, &n_sizes);
+
+ return Glib::ArrayHandle<int>(sizes, n_sizes, Glib::OWNERSHIP_SHALLOW); //The ArrayHandle will free the array.
+}
+
+} //namespace Pango
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Pango::FontFace> wrap(PangoFontFace* object, bool take_copy)
+{
+ return Glib::RefPtr<Pango::FontFace>( dynamic_cast<Pango::FontFace*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} /* namespace Glib */
+
+
+namespace Pango
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& FontFace_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &FontFace_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(pango_font_face_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void FontFace_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* FontFace_Class::wrap_new(GObject* object)
+{
+ return new FontFace((PangoFontFace*)object);
+}
+
+
+/* The implementation: */
+
+PangoFontFace* FontFace::gobj_copy()
+{
+ reference();
+ return gobj();
+}
+
+FontFace::FontFace(const Glib::ConstructParams& construct_params)
+:
+ Glib::Object(construct_params)
+{}
+
+FontFace::FontFace(PangoFontFace* castitem)
+:
+ Glib::Object((GObject*)(castitem))
+{}
+
+FontFace::~FontFace()
+{}
+
+
+FontFace::CppClassType FontFace::fontface_class_; // initialize static member
+
+GType FontFace::get_type()
+{
+ return fontface_class_.init().get_type();
+}
+
+GType FontFace::get_base_type()
+{
+ return pango_font_face_get_type();
+}
+
+
+FontDescription FontFace::describe() const
+{
+ return FontDescription((pango_font_face_describe(const_cast<PangoFontFace*>(gobj()))));
+}
+
+Glib::ustring FontFace::get_name() const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(pango_font_face_get_face_name(const_cast<PangoFontFace*>(gobj())));
+}
+
+
+} // namespace Pango
+
+
diff --git a/libs/gtkmm2/pango/pangomm/fontface.h b/libs/gtkmm2/pango/pangomm/fontface.h
new file mode 100644
index 0000000000..64b0317c7c
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/fontface.h
@@ -0,0 +1,151 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _PANGOMM_FONTFACE_H
+#define _PANGOMM_FONTFACE_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* fontface.h
+ *
+ * Copyright 2001 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#include <glibmm/object.h>
+#include <pangomm/fontdescription.h>
+#include <pango/pango-font.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _PangoFontFace PangoFontFace;
+typedef struct _PangoFontFaceClass PangoFontFaceClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Pango
+{ class FontFace_Class; } // namespace Pango
+namespace Pango
+{
+
+/** A Pango::FontFace is used to represent a group of fonts with the same family, slant, weight, width, but varying sizes.
+ */
+
+class FontFace : public Glib::Object
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef FontFace CppObjectType;
+ typedef FontFace_Class CppClassType;
+ typedef PangoFontFace BaseObjectType;
+ typedef PangoFontFaceClass BaseClassType;
+
+private: friend class FontFace_Class;
+ static CppClassType fontface_class_;
+
+private:
+ // noncopyable
+ FontFace(const FontFace&);
+ FontFace& operator=(const FontFace&);
+
+protected:
+ explicit FontFace(const Glib::ConstructParams& construct_params);
+ explicit FontFace(PangoFontFace* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~FontFace();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ PangoFontFace* gobj() { return reinterpret_cast<PangoFontFace*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const PangoFontFace* gobj() const { return reinterpret_cast<PangoFontFace*>(gobject_); }
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ PangoFontFace* gobj_copy();
+
+private:
+
+
+public:
+
+ /** Returns the family, style, variant, weight and stretch of
+ * a Pango::FontFace. The size field of the resulting font description
+ * will be unset.
+ * @return A Pango::FontDescription
+ * holding the description of the face.
+ */
+ FontDescription describe() const;
+
+ /** Gets a name representing the style of this face among the
+ * different faces in the Pango::FontFamily for the face. This
+ * name is unique among all faces in the family and is suitable
+ * for displaying to users.
+ * @return The face name for the face. This string is
+ * owned by the face object and must not be modified or freed.
+ */
+ Glib::ustring get_name() const;
+
+ Glib::ArrayHandle<int> list_sizes() const;
+
+
+protected:
+ //We can't wrap the virtual functions because PangoFontFace has a hidden class.
+ //We probably don't need to subclass this anyway.
+ //_WRAP_VFUNC(const char* get_name() const, "get_face_name")
+ //_WRAP_VFUNC(PangoFontDescription* describe(), "describe")
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+};
+
+} /* namespace Pango */
+
+
+namespace Glib
+{
+ /** @relates Pango::FontFace
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Pango::FontFace> wrap(PangoFontFace* object, bool take_copy = false);
+}
+
+
+#endif /* _PANGOMM_FONTFACE_H */
+
diff --git a/libs/gtkmm2/pango/pangomm/fontfamily.cc b/libs/gtkmm2/pango/pangomm/fontfamily.cc
new file mode 100644
index 0000000000..da7f0be452
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/fontfamily.cc
@@ -0,0 +1,149 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <pangomm/fontfamily.h>
+#include <pangomm/private/fontfamily_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 2001 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+namespace Pango
+{
+
+Glib::ArrayHandle< Glib::RefPtr<FontFace> > FontFamily::list_faces() const
+{
+ //Get the array:
+ PangoFontFace** pFontFaces = 0;
+ int n_fonts = 0;
+ pango_font_family_list_faces(const_cast<PangoFontFamily*>(gobj()), &pFontFaces, &n_fonts);
+
+ return Glib::ArrayHandle<Glib::RefPtr <FontFace> > (pFontFaces, n_fonts, Glib::OWNERSHIP_SHALLOW);
+}
+
+} /* namespace Pango */
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Pango::FontFamily> wrap(PangoFontFamily* object, bool take_copy)
+{
+ return Glib::RefPtr<Pango::FontFamily>( dynamic_cast<Pango::FontFamily*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} /* namespace Glib */
+
+
+namespace Pango
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& FontFamily_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &FontFamily_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(pango_font_family_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void FontFamily_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* FontFamily_Class::wrap_new(GObject* object)
+{
+ return new FontFamily((PangoFontFamily*)object);
+}
+
+
+/* The implementation: */
+
+PangoFontFamily* FontFamily::gobj_copy()
+{
+ reference();
+ return gobj();
+}
+
+FontFamily::FontFamily(const Glib::ConstructParams& construct_params)
+:
+ Glib::Object(construct_params)
+{}
+
+FontFamily::FontFamily(PangoFontFamily* castitem)
+:
+ Glib::Object((GObject*)(castitem))
+{}
+
+FontFamily::~FontFamily()
+{}
+
+
+FontFamily::CppClassType FontFamily::fontfamily_class_; // initialize static member
+
+GType FontFamily::get_type()
+{
+ return fontfamily_class_.init().get_type();
+}
+
+GType FontFamily::get_base_type()
+{
+ return pango_font_family_get_type();
+}
+
+
+Glib::ustring FontFamily::get_name() const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(pango_font_family_get_name(const_cast<PangoFontFamily*>(gobj())));
+}
+
+bool FontFamily::is_monospace() const
+{
+ return pango_font_family_is_monospace(const_cast<PangoFontFamily*>(gobj()));
+}
+
+
+} // namespace Pango
+
+
diff --git a/libs/gtkmm2/pango/pangomm/fontfamily.h b/libs/gtkmm2/pango/pangomm/fontfamily.h
new file mode 100644
index 0000000000..f763866a19
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/fontfamily.h
@@ -0,0 +1,171 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _PANGOMM_FONTFAMILY_H
+#define _PANGOMM_FONTFAMILY_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* fontfamily.h
+ *
+ * Copyright 2001 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#include <glibmm/object.h>
+#include <glibmm/arrayhandle.h>
+#include <pangomm/fontface.h>
+#include <pango/pango-font.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _PangoFontFamily PangoFontFamily;
+typedef struct _PangoFontFamilyClass PangoFontFamilyClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Pango
+{ class FontFamily_Class; } // namespace Pango
+namespace Pango
+{
+
+/** A Pango::FontFamily is used to represent a family of related font faces.
+ * The faces in a family share a common design, but differ in slant, weight, width and other aspects.
+ */
+
+class FontFamily : public Glib::Object
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef FontFamily CppObjectType;
+ typedef FontFamily_Class CppClassType;
+ typedef PangoFontFamily BaseObjectType;
+ typedef PangoFontFamilyClass BaseClassType;
+
+private: friend class FontFamily_Class;
+ static CppClassType fontfamily_class_;
+
+private:
+ // noncopyable
+ FontFamily(const FontFamily&);
+ FontFamily& operator=(const FontFamily&);
+
+protected:
+ explicit FontFamily(const Glib::ConstructParams& construct_params);
+ explicit FontFamily(PangoFontFamily* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~FontFamily();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ PangoFontFamily* gobj() { return reinterpret_cast<PangoFontFamily*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const PangoFontFamily* gobj() const { return reinterpret_cast<PangoFontFamily*>(gobject_); }
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ PangoFontFamily* gobj_copy();
+
+private:
+
+
+public:
+ /** Lists the different font faces that make up family.
+ * The faces in a family share a common design, but differ in slant, weight, width and other aspects.
+ * @return an array of pointers to Pango::FontFace objects.
+ */
+ Glib::ArrayHandle< Glib::RefPtr<FontFace> > list_faces() const;
+
+
+ /** Gets the name of the family. The name is unique among all
+ * fonts for the font backend and can be used in a Pango::FontDescription
+ * to specify that a face from this family is desired.
+ * @return The name of the family. This string is owned
+ * by the family object and must not be modified or freed.
+ */
+ Glib::ustring get_name() const;
+
+ /** A monospace font is a font designed for text display where the the
+ * characters form a regular grid. For Western languages this would
+ * mean that the advance width of all characters are the same, but
+ * this categorization also includes Asian fonts which include
+ * double-width characters: characters that occupy two grid cells.
+ * Glib::unichar_iswide() returns a result that indicates whether a
+ * character is typically double-width in a monospace font.
+ *
+ * The best way to find out the grid-cell size is to call
+ * pango_font_metrics_get_approximate_digit_width(), since the results
+ * of pango_font_metrics_get_approximate_char_width() may be affected
+ * by double-width characters.
+ * @return <tt>true</tt> if the family is monospace.
+ */
+ bool is_monospace() const;
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+};
+
+/*
+struct FontFamilyRefPtrTraits
+{
+ typedef Glib::RefPtr<FontFamily> CppType;
+ typedef PangoFontFamily * CType;
+ typedef PangoFontFamily * CTypeNonConst;
+
+ static CType to_c_type (const CppType& ptr) { return Glib::unwrap (ptr); }
+ static CType to_c_type (CType ptr) { return ptr; }
+ static CppType to_cpp_type (CType ptr) { return FontFamily::wrap_specific_type (ptr); }
+ static void release_c_type (CType ptr) { g_object_unref (ptr); }
+};
+*/
+
+} // namespace Pango
+
+
+namespace Glib
+{
+ /** @relates Pango::FontFamily
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Pango::FontFamily> wrap(PangoFontFamily* object, bool take_copy = false);
+}
+
+
+#endif /* _PANGOMM_FONTFAMILY_H */
+
diff --git a/libs/gtkmm2/pango/pangomm/fontmap.cc b/libs/gtkmm2/pango/pangomm/fontmap.cc
new file mode 100644
index 0000000000..1e5caa8ab4
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/fontmap.cc
@@ -0,0 +1,153 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <pangomm/fontmap.h>
+#include <pangomm/private/fontmap_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 2001 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <pangomm/context.h>
+#include <pango/pango-fontmap.h>
+
+namespace Pango
+{
+
+Glib::ArrayHandle< Glib::RefPtr<FontFamily> > FontMap::list_families() const
+{
+ //Get the array:
+ PangoFontFamily** pFamilies = 0;
+ int n_families = 0;
+ pango_font_map_list_families(const_cast<PangoFontMap*>(gobj()), &pFamilies, &n_families);
+
+ return Glib::ArrayHandle< Glib::RefPtr<FontFamily> >
+ (pFamilies, n_families, Glib::OWNERSHIP_SHALLOW);
+}
+
+} /* namespace Pango */
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Pango::FontMap> wrap(PangoFontMap* object, bool take_copy)
+{
+ return Glib::RefPtr<Pango::FontMap>( dynamic_cast<Pango::FontMap*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} /* namespace Glib */
+
+
+namespace Pango
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& FontMap_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &FontMap_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(pango_font_map_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void FontMap_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* FontMap_Class::wrap_new(GObject* object)
+{
+ return new FontMap((PangoFontMap*)object);
+}
+
+
+/* The implementation: */
+
+PangoFontMap* FontMap::gobj_copy()
+{
+ reference();
+ return gobj();
+}
+
+FontMap::FontMap(const Glib::ConstructParams& construct_params)
+:
+ Glib::Object(construct_params)
+{}
+
+FontMap::FontMap(PangoFontMap* castitem)
+:
+ Glib::Object((GObject*)(castitem))
+{}
+
+FontMap::~FontMap()
+{}
+
+
+FontMap::CppClassType FontMap::fontmap_class_; // initialize static member
+
+GType FontMap::get_type()
+{
+ return fontmap_class_.init().get_type();
+}
+
+GType FontMap::get_base_type()
+{
+ return pango_font_map_get_type();
+}
+
+
+Glib::RefPtr<Font> FontMap::load_font(const Glib::RefPtr<Context>& context, const FontDescription& desc) const
+{
+ return Glib::wrap(pango_font_map_load_font(const_cast<PangoFontMap*>(gobj()), Glib::unwrap(context), (desc).gobj()));
+}
+
+Glib::RefPtr<Fontset> FontMap::load_fontset(const Glib::RefPtr<Context>& context, const FontDescription& desc, const Language& language) const
+{
+ return Glib::wrap(pango_font_map_load_fontset(const_cast<PangoFontMap*>(gobj()), Glib::unwrap(context), (desc).gobj(), const_cast<PangoLanguage*>((language).gobj())));
+}
+
+
+} // namespace Pango
+
+
diff --git a/libs/gtkmm2/pango/pangomm/fontmap.h b/libs/gtkmm2/pango/pangomm/fontmap.h
new file mode 100644
index 0000000000..c05fe7cc44
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/fontmap.h
@@ -0,0 +1,153 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _PANGOMM_FONTMAP_H
+#define _PANGOMM_FONTMAP_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* fontmap.h
+ *
+ * Copyright 2001 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#include <glibmm/object.h>
+#include <glibmm/arrayhandle.h>
+#include <pangomm/font.h>
+#include <pangomm/fontset.h>
+#include <pangomm/fontfamily.h>
+#include <pango/pango-fontmap.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _PangoFontMap PangoFontMap;
+typedef struct _PangoFontMapClass PangoFontMapClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Pango
+{ class FontMap_Class; } // namespace Pango
+namespace Pango
+{
+
+class Context;
+
+/** A Pango::FontMap represents the set of fonts available for a particular rendering system.
+ */
+
+class FontMap : public Glib::Object
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef FontMap CppObjectType;
+ typedef FontMap_Class CppClassType;
+ typedef PangoFontMap BaseObjectType;
+ typedef PangoFontMapClass BaseClassType;
+
+private: friend class FontMap_Class;
+ static CppClassType fontmap_class_;
+
+private:
+ // noncopyable
+ FontMap(const FontMap&);
+ FontMap& operator=(const FontMap&);
+
+protected:
+ explicit FontMap(const Glib::ConstructParams& construct_params);
+ explicit FontMap(PangoFontMap* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~FontMap();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ PangoFontMap* gobj() { return reinterpret_cast<PangoFontMap*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const PangoFontMap* gobj() const { return reinterpret_cast<PangoFontMap*>(gobject_); }
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ PangoFontMap* gobj_copy();
+
+private:
+
+
+public:
+
+ /** Load the font in the fontmap that is the closest match for @a desc .
+ * @param context The Pango::Context the font will be used with.
+ * @param desc A Pango::FontDescription describing the font to load.
+ * @return The font loaded, or <tt>0</tt> if no font matched.
+ */
+ Glib::RefPtr<Font> load_font(const Glib::RefPtr<Context>& context, const FontDescription& desc) const;
+
+ /** Load a set of fonts in the fontmap that can be used to render
+ * a font matching @a desc .
+ * @param context The Pango::Context the font will be used with.
+ * @param desc A Pango::FontDescription describing the font to load.
+ * @param language A Pango::Language the fonts will be used for.
+ * @return The fontset, or <tt>0</tt> if no font matched.
+ */
+ Glib::RefPtr<Fontset> load_fontset(const Glib::RefPtr<Context>& context, const FontDescription& desc, const Language& language) const;
+
+ /** List all families for the fontmap.
+ * @return an array of pointers to Pango::FontFamily objects.
+ */
+ Glib::ArrayHandle< Glib::RefPtr<FontFamily> > list_families() const;
+
+ //This is not used unless ENABLE_BACKEND is defined: _WRAP_METHOD(Glib::ustring get_shape_engine_type() const, pango_font_map_get_shape_engine_type)
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+};
+
+} /* namespace Pango */
+
+
+namespace Glib
+{
+ /** @relates Pango::FontMap
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Pango::FontMap> wrap(PangoFontMap* object, bool take_copy = false);
+}
+
+
+#endif /* _PANGOMM_FONTMAP_H */
+
diff --git a/libs/gtkmm2/pango/pangomm/fontmetrics.cc b/libs/gtkmm2/pango/pangomm/fontmetrics.cc
new file mode 100644
index 0000000000..d9ba904f5b
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/fontmetrics.cc
@@ -0,0 +1,143 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <pangomm/fontmetrics.h>
+#include <pangomm/private/fontmetrics_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-1999 The Gtk-- Development Team
+ * Copyright 2001 Free Software Foundation
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Pango::FontMetrics wrap(PangoFontMetrics* object, bool take_copy)
+{
+ return Pango::FontMetrics(object, take_copy);
+}
+
+} // namespace Glib
+
+
+namespace Pango
+{
+
+
+// static
+GType FontMetrics::get_type()
+{
+ return pango_font_metrics_get_type();
+}
+
+FontMetrics::FontMetrics()
+:
+ gobject_ (0) // Allows creation of invalid wrapper, e.g. for output arguments to methods.
+{}
+
+FontMetrics::FontMetrics(const FontMetrics& other)
+:
+ gobject_ ((other.gobject_) ? pango_font_metrics_ref(other.gobject_) : 0)
+{}
+
+FontMetrics::FontMetrics(PangoFontMetrics* gobject, bool make_a_copy)
+:
+ // For BoxedType wrappers, make_a_copy is true by default. The static
+ // BoxedType wrappers must always take a copy, thus make_a_copy = true
+ // ensures identical behaviour if the default argument is used.
+ gobject_ ((make_a_copy && gobject) ? pango_font_metrics_ref(gobject) : gobject)
+{}
+
+FontMetrics& FontMetrics::operator=(const FontMetrics& other)
+{
+ FontMetrics temp (other);
+ swap(temp);
+ return *this;
+}
+
+FontMetrics::~FontMetrics()
+{
+ if(gobject_)
+ pango_font_metrics_unref(gobject_);
+}
+
+void FontMetrics::swap(FontMetrics& other)
+{
+ PangoFontMetrics *const temp = gobject_;
+ gobject_ = other.gobject_;
+ other.gobject_ = temp;
+}
+
+PangoFontMetrics* FontMetrics::gobj_copy() const
+{
+ return pango_font_metrics_ref(gobject_);
+}
+
+
+int FontMetrics::get_ascent() const
+{
+ return pango_font_metrics_get_ascent(const_cast<PangoFontMetrics*>(gobj()));
+}
+
+int FontMetrics::get_descent() const
+{
+ return pango_font_metrics_get_descent(const_cast<PangoFontMetrics*>(gobj()));
+}
+
+int FontMetrics::get_approximate_char_width() const
+{
+ return pango_font_metrics_get_approximate_char_width(const_cast<PangoFontMetrics*>(gobj()));
+}
+
+int FontMetrics::get_approximate_digit_width() const
+{
+ return pango_font_metrics_get_approximate_digit_width(const_cast<PangoFontMetrics*>(gobj()));
+}
+
+int FontMetrics::get_underline_position() const
+{
+ return pango_font_metrics_get_underline_position(const_cast<PangoFontMetrics*>(gobj()));
+}
+
+int FontMetrics::get_underline_thickness() const
+{
+ return pango_font_metrics_get_underline_thickness(const_cast<PangoFontMetrics*>(gobj()));
+}
+
+int FontMetrics::get_strikethrough_position() const
+{
+ return pango_font_metrics_get_strikethrough_position(const_cast<PangoFontMetrics*>(gobj()));
+}
+
+int FontMetrics::get_strikethrough_thickness() const
+{
+ return pango_font_metrics_get_strikethrough_thickness(const_cast<PangoFontMetrics*>(gobj()));
+}
+
+
+} // namespace Pango
+
+
diff --git a/libs/gtkmm2/pango/pangomm/fontmetrics.h b/libs/gtkmm2/pango/pangomm/fontmetrics.h
new file mode 100644
index 0000000000..8b66669f81
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/fontmetrics.h
@@ -0,0 +1,187 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _PANGOMM_FONTMETRICS_H
+#define _PANGOMM_FONTMETRICS_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* fontmetrics.h
+ *
+ * Copyright (C) 1998-1999 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <pango/pango-font.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C" { typedef struct _PangoFontMetrics PangoFontMetrics; }
+#endif
+
+namespace Pango
+{
+
+/** A Pango::FontMetrics holds the overall metric information for a font (possibly restricted to a script).
+ */
+class FontMetrics
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef FontMetrics CppObjectType;
+ typedef PangoFontMetrics BaseObjectType;
+
+ static GType get_type() G_GNUC_CONST;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ FontMetrics();
+
+ explicit FontMetrics(PangoFontMetrics* gobject, bool make_a_copy = true);
+
+ FontMetrics(const FontMetrics& other);
+ FontMetrics& operator=(const FontMetrics& other);
+
+ ~FontMetrics();
+
+ void swap(FontMetrics& other);
+
+ ///Provides access to the underlying C instance.
+ PangoFontMetrics* gobj() { return gobject_; }
+
+ ///Provides access to the underlying C instance.
+ const PangoFontMetrics* gobj() const { return gobject_; }
+
+ ///Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs.
+ PangoFontMetrics* gobj_copy() const;
+
+protected:
+ PangoFontMetrics* gobject_;
+
+private:
+
+
+public:
+
+ /** Gets the ascent from a font metrics structure. The ascent is
+ * the distance from the baseline to the logical top of a line
+ * of text. (The logical top may be above or below the top of the
+ * actual drawn ink. It is necessary to lay out the text to figure
+ * where the ink will be.)
+ * @return The ascent, in pango units. (1 point == Pango::SCALE pango units.).
+ */
+ int get_ascent() const;
+
+ /** Gets the descent from a font metrics structure. The descent is
+ * the distance from the baseline to the logical bottom of a line
+ * of text. (The logical bottom may be above or below the bottom of the
+ * actual drawn ink. It is necessary to lay out the text to figure
+ * where the ink will be.)
+ * @return The descent, in pango units. (1 point == Pango::SCALE pango units.).
+ */
+ int get_descent() const;
+
+ /** Gets the approximate character width for a font metrics structure.
+ * This is merely a representative value useful, for example, for
+ * determining the initial size for a window. Actual characters in
+ * text will be wider and narrower than this.
+ * @return The character width, in pango units. (1 point == Pango::SCALE pango units.).
+ */
+ int get_approximate_char_width() const;
+
+ /** Gets the approximate digit width for a font metrics structure.
+ * This is merely a representative value useful, for example, for
+ * determining the initial size for a window. Actual digits in
+ * text can be wider and narrower than this, though this value
+ * is generally somewhat more accurate than the result of
+ * pango_font_metrics_get_approximate_digit_width().
+ * @return The digit width, in pango units. (1 point == Pango::SCALE pango units.).
+ */
+ int get_approximate_digit_width() const;
+
+
+ /** Gets the suggested position to draw the underline.
+ * The value returned is the distance <em>above</em> the
+ * baseline of the top of the underline. Since most fonts have
+ * underline positions beneath the baseline, this value is typically
+ * negative.
+ * @return The suggested underline position, in Pango units.
+ *
+ * Since: 1.6.
+ */
+ int get_underline_position() const;
+
+ /** Gets the suggested thickness to draw for the underline.
+ * @return The suggested underline thickness, in Pango units.
+ *
+ * Since: 1.6.
+ */
+ int get_underline_thickness() const;
+
+ /** Gets the suggested position to draw the strikethrough.
+ * The value returned is the distance <em>above</em> the
+ * baseline of the top of the strikethrough.
+ * @return The suggested strikethrough position, in Pango units.
+ *
+ * Since: 1.6.
+ */
+ int get_strikethrough_position() const;
+
+ /** Gets the suggested thickness to draw for the strikethrough.
+ * @return The suggested strikethrough thickness, in Pango units.
+ *
+ * Since: 1.6.
+ */
+ int get_strikethrough_thickness() const;
+
+
+};
+
+} //namespace Pango
+
+
+namespace Pango
+{
+
+/** @relates Pango::FontMetrics
+ * @param lhs The left-hand side
+ * @param rhs The right-hand side
+ */
+inline void swap(FontMetrics& lhs, FontMetrics& rhs)
+ { lhs.swap(rhs); }
+
+} // namespace Pango
+
+namespace Glib
+{
+
+/** @relates Pango::FontMetrics
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+Pango::FontMetrics wrap(PangoFontMetrics* object, bool take_copy = false);
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+template <>
+class Value<Pango::FontMetrics> : public Glib::Value_Boxed<Pango::FontMetrics>
+{};
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+} // namespace Glib
+
+#endif /* _PANGOMM_FONTMETRICS_H */
+
diff --git a/libs/gtkmm2/pango/pangomm/fontset.cc b/libs/gtkmm2/pango/pangomm/fontset.cc
new file mode 100644
index 0000000000..2d684bde16
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/fontset.cc
@@ -0,0 +1,166 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <pangomm/fontset.h>
+#include <pangomm/private/fontset_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 2001 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+namespace { //anonymous
+
+gboolean fontset_foreach_callback(PangoFontset* /* fontset */, PangoFont* font, gpointer data)
+{
+ try
+ {
+ Pango::Fontset::ForeachSlot& slot = *static_cast<Pango::Fontset::ForeachSlot*>(data);
+ Glib::RefPtr<Pango::Font> cppFont = Glib::wrap(font, true /* take_copy */);
+
+ return slot(cppFont);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+
+ return false; //arbitrary default
+}
+
+
+} //anonymous namespace
+
+namespace Pango
+{
+
+void Fontset::foreach(const ForeachSlot& slot)
+{
+ pango_fontset_foreach(gobj(), &fontset_foreach_callback, (void*)&slot);
+}
+
+} //namespace
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Pango::Fontset> wrap(PangoFontset* object, bool take_copy)
+{
+ return Glib::RefPtr<Pango::Fontset>( dynamic_cast<Pango::Fontset*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} /* namespace Glib */
+
+
+namespace Pango
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Fontset_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Fontset_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(pango_fontset_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Fontset_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* Fontset_Class::wrap_new(GObject* object)
+{
+ return new Fontset((PangoFontset*)object);
+}
+
+
+/* The implementation: */
+
+PangoFontset* Fontset::gobj_copy()
+{
+ reference();
+ return gobj();
+}
+
+Fontset::Fontset(const Glib::ConstructParams& construct_params)
+:
+ Glib::Object(construct_params)
+{}
+
+Fontset::Fontset(PangoFontset* castitem)
+:
+ Glib::Object((GObject*)(castitem))
+{}
+
+Fontset::~Fontset()
+{}
+
+
+Fontset::CppClassType Fontset::fontset_class_; // initialize static member
+
+GType Fontset::get_type()
+{
+ return fontset_class_.init().get_type();
+}
+
+GType Fontset::get_base_type()
+{
+ return pango_fontset_get_type();
+}
+
+
+Glib::RefPtr<Font> Fontset::get_font(guint wc) const
+{
+ return Glib::wrap(pango_fontset_get_font(const_cast<PangoFontset*>(gobj()), wc));
+}
+
+FontMetrics Fontset::get_metrics() const
+{
+ return FontMetrics((pango_fontset_get_metrics(const_cast<PangoFontset*>(gobj()))));
+}
+
+
+} // namespace Pango
+
+
diff --git a/libs/gtkmm2/pango/pangomm/fontset.h b/libs/gtkmm2/pango/pangomm/fontset.h
new file mode 100644
index 0000000000..d3baddfbea
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/fontset.h
@@ -0,0 +1,154 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _PANGOMM_FONTSET_H
+#define _PANGOMM_FONTSET_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* fontset.h
+ *
+ * Copyright 2001 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/object.h>
+#include <pangomm/language.h>
+#include <pangomm/font.h>
+#include <pangomm/fontmetrics.h>
+#include <pango/pango-fontset.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _PangoFontset PangoFontset;
+typedef struct _PangoFontsetClass PangoFontsetClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Pango
+{ class Fontset_Class; } // namespace Pango
+namespace Pango
+{
+
+/** A Pango::Fontset is used to represent a set of fonts.
+ */
+
+class Fontset : public Glib::Object
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef Fontset CppObjectType;
+ typedef Fontset_Class CppClassType;
+ typedef PangoFontset BaseObjectType;
+ typedef PangoFontsetClass BaseClassType;
+
+private: friend class Fontset_Class;
+ static CppClassType fontset_class_;
+
+private:
+ // noncopyable
+ Fontset(const Fontset&);
+ Fontset& operator=(const Fontset&);
+
+protected:
+ explicit Fontset(const Glib::ConstructParams& construct_params);
+ explicit Fontset(PangoFontset* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~Fontset();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ PangoFontset* gobj() { return reinterpret_cast<PangoFontset*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const PangoFontset* gobj() const { return reinterpret_cast<PangoFontset*>(gobject_); }
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ PangoFontset* gobj_copy();
+
+private:
+
+
+public:
+
+ /** Returns the font in the fontset that contains the best glyph for the
+ * unicode character wc.
+ * @param wc A unicode character.
+ * @return A Pango::Font. The caller must call g_object_unref when finished
+ * with the font.
+ */
+ Glib::RefPtr<Font> get_font(guint wc) const;
+
+ /** Get overall metric information for the fonts in the fontset.
+ * @return A Pango::FontMetrics object. The caller must call pango_font_metrics_unref()
+ * when finished using the object.
+ */
+ FontMetrics get_metrics() const;
+
+ /** For instance,
+ * bool on_foreach(const Glib::RefPtr<Pango::Font>& font);
+ */
+ typedef sigc::slot< bool, const Glib::RefPtr<Font>& > ForeachSlot;
+
+ /** Iterates through all the fonts in a fontset, calling @a slot for
+ * each one. If @a slot returns true, that stops the iteration.
+ *
+ * Since: 1.4
+ *
+ * @param slot Callback function
+ */
+ void foreach(const ForeachSlot& slot);
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+};
+
+} /* namespace Pango */
+
+
+namespace Glib
+{
+ /** @relates Pango::Fontset
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Pango::Fontset> wrap(PangoFontset* object, bool take_copy = false);
+}
+
+
+#endif /* _PANGOMM_FONTSET_H */
+
diff --git a/libs/gtkmm2/pango/pangomm/glyph.cc b/libs/gtkmm2/pango/pangomm/glyph.cc
new file mode 100644
index 0000000000..bf595ec5b0
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/glyph.cc
@@ -0,0 +1,145 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <pangomm/glyph.h>
+#include <pangomm/private/glyph_p.h>
+
+/*
+ * Copyright 2001 Free Software Foundation
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+namespace Pango
+{
+
+GlyphInfo::GlyphInfo()
+{
+ gobject_.glyph = 0;
+}
+
+
+GlyphGeometry::GlyphGeometry()
+{
+ gobject_.width = gobject_.x_offset = gobject_.y_offset = 0;
+}
+
+GlyphGeometry::GlyphGeometry(const PangoGlyphGeometry* src)
+{
+ gobject_.width = src->width;
+ gobject_.x_offset = src->x_offset;
+ gobject_.y_offset = src->y_offset;
+}
+
+
+/*GlyphVisAttr::GlyphVisAttr()
+{
+ gobject_.is_cluster_start = 0;
+}
+
+GlyphVisAttr::GlyphVisAttr(const PangoGlyphVisAttr* src)
+{
+ gobject_.is_cluster_start = src->is_cluster_start;
+}*/
+
+} //namespace Pango
+
+
+namespace Glib
+{
+
+Pango::GlyphInfo& wrap(PangoGlyphInfo* object)
+{
+ return *reinterpret_cast<Pango::GlyphInfo*>(object);
+}
+
+const Pango::GlyphInfo& wrap(const PangoGlyphInfo* object)
+{
+ return *reinterpret_cast<const Pango::GlyphInfo*>(object);
+}
+
+Pango::GlyphGeometry& wrap(PangoGlyphGeometry* object)
+{
+ return *reinterpret_cast<Pango::GlyphGeometry*>(object);
+}
+
+const Pango::GlyphGeometry& wrap(const PangoGlyphGeometry* object)
+{
+ return *reinterpret_cast<const Pango::GlyphGeometry*>(object);
+}
+
+/*Pango::GlyphVisAttr& wrap(PangoGlyphVisAttr* object)
+{
+ return *reinterpret_cast<Pango::GlyphVisAttr*>(object);
+}
+
+const Pango::GlyphVisAttr& wrap(const PangoGlyphVisAttr* object)
+{
+ return *reinterpret_cast<const Pango::GlyphVisAttr*>(object);
+}*/
+
+} //namespace Glib
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Pango
+{
+
+
+Glyph GlyphInfo::get_glyph() const
+{
+ return gobj()->glyph;
+}
+
+GlyphGeometry GlyphInfo::get_geometry() const
+{
+ return GlyphGeometry(&(gobj()->geometry));
+}
+
+GlyphVisAttr GlyphInfo::get_attr() const
+{
+ return gobj()->attr;
+}
+
+
+} // namespace Pango
+
+
+namespace Pango
+{
+
+
+GlyphUnit GlyphGeometry::get_width() const
+{
+ return gobj()->width;
+}
+
+GlyphUnit GlyphGeometry::get_x_offset() const
+{
+ return gobj()->x_offset;
+}
+
+GlyphUnit GlyphGeometry::get_y_offset() const
+{
+ return gobj()->y_offset;
+}
+
+
+} // namespace Pango
+
+
diff --git a/libs/gtkmm2/pango/pangomm/glyph.h b/libs/gtkmm2/pango/pangomm/glyph.h
new file mode 100644
index 0000000000..387999d306
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/glyph.h
@@ -0,0 +1,222 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _PANGOMM_GLYPH_H
+#define _PANGOMM_GLYPH_H
+
+#include <glibmm.h>
+
+/* glyph.h
+ *
+ * Copyright (C) 1998-1999 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <pango/pango-glyph.h>
+
+
+namespace Pango
+{
+
+class GlyphInfo;
+class GlyphGeometry;
+
+
+/** A Pango::Glyph represents a single glyph in the output form of a string.
+ */
+typedef PangoGlyph Glyph; //This is defined as a guint32
+
+
+/** A Pango::GlyphUnit is used to store dimensions within Pango. Dimensions are stored in 1/64ths of a point.
+ */
+typedef PangoGlyphUnit GlyphUnit;
+
+
+/** A Pango::GlyphVisAttr is used to communicate information between the shaping phase and the rendering phase. It's contents are still evolving.
+ */
+typedef PangoGlyphVisAttr GlyphVisAttr;
+
+
+/** A Pango::GlyphInfo represents a single glyph together with positioning information and visual attributes.
+ */
+class GlyphInfo
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef GlyphInfo CppObjectType;
+ typedef PangoGlyphInfo BaseObjectType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+private:
+
+
+public:
+ GlyphInfo();
+
+ /** Gets the glyph itself.
+ * @return The glyph.
+ */
+ Glyph get_glyph() const;
+
+ /** Gets the positional information about the glyph.
+ * @return A GylphGeometry object.
+ */
+ GlyphGeometry get_geometry() const;
+
+ /** Gets the visual attributes of the glyph.
+ * @return A GlyphVisAttr structure.
+ */
+ GlyphVisAttr get_attr() const;
+
+//I don't think that we need these set_* functions!
+//TODO: Who wrote this? Investigate. murrayc.
+ /* Sets the glyph itself.
+ * @param glyph The new glyph.
+ */
+// _MEMBER_SET(glyph, glyph, Glyph, PangoGlyph)
+
+ /* Sets the positional information about the glyph.
+ * @param geometry A GlyphGeometry object.
+ */
+// _MEMBER_SET(geometry, geometry, GlyphGeometry, PangoGlyphGeometry)
+
+ /* Sets the visual attributes of the glyph.
+ * @param attr A GylphVisAttr structure.
+ */
+// _MEMBER_SET(attr, attr, GlyphVisAttr, PangoGlyphVisAttr)
+
+ /// Provides access to the underlying C GObject.
+ PangoGlyphInfo* gobj() { return &gobject_; }
+ /// Provides access to the underlying C GObject.
+ const PangoGlyphInfo* gobj() const { return &gobject_; }
+
+protected:
+ PangoGlyphInfo gobject_;
+
+
+};
+
+
+/** A Pango::GlyphGeometry contains width and positioning information for a single glyph. Distances are in 1/64ths of a point.
+ */
+class GlyphGeometry
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef GlyphGeometry CppObjectType;
+ typedef PangoGlyphGeometry BaseObjectType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+private:
+
+
+public:
+ GlyphGeometry();
+ explicit GlyphGeometry(const PangoGlyphGeometry* src);
+
+ /** Gets the logical width to use for the character.
+ * @return The logical width.
+ */
+ GlyphUnit get_width() const;
+
+ /** Gets the horizontal offset from nominal character position.
+ * @return The horizontal offset.
+ */
+ GlyphUnit get_x_offset() const;
+
+ /** Gets the vertical offset from nominal character position.
+ * @return The vertical offset.
+ */
+ GlyphUnit get_y_offset() const;
+
+//I don't think that we need these set_* functions!
+ /* Sets the logical width to use for the character.
+ * @param width The new logical width.
+ */
+// _MEMBER_SET(width, width, GlyphUnit, PangoGlyphUnit)
+
+ /* Sets the horizontal offset from nominal character position.
+ * @param x_offset The new horizontal offset.
+ */
+// _MEMBER_SET(x_offset, x_offset, GlyphUnit, PangoGlyphUnit)
+
+ /* Sets the vertical offset from nominal character position.
+ * @param y_offset The new vertical offset.
+ */
+// _MEMBER_SET(y_offset, y_offset, GlyphUnit, PangoGlyphUnit)
+
+ PangoGlyphGeometry* gobj() { return &gobject_; }
+ const PangoGlyphGeometry* gobj() const { return &gobject_; }
+
+protected:
+ PangoGlyphGeometry gobject_;
+
+
+};
+
+
+/* Since "the contents [of this struct] are still evolving" it might get necessary
+ * to create a wrapper class for PangoGlyphVisAttr in future. Currently, however,
+ * PangoGlyphVisAttr just contains one simple data field (guint is_cluster_start).
+ */
+/*class GlyphVisAttr
+{
+ _CLASS_GENERIC(GlyphVisAttr, PangoGlyphVisAttr)
+
+public:
+ GlyphVisAttr();
+ explicit GlyphVisAttr(const PangoGlyphVisAttr* src);
+
+ _MEMBER_GET(cluster_start, is_cluster_start, bool, guint)
+
+ _MEMBER_SET(cluster_start, is_cluster_start, bool, guint)
+
+ /// Provides access to the underlying C GObject.
+ PangoGlyphVisAttr* gobj() { return &gobject_; }
+ /// Provides access to the underlying C GObject.
+ const PangoGlyphVisAttr* gobj() const { return &gobject_; }
+
+protected:
+ PangoGlyphVisAttr gobject_;
+};*/
+
+} //namespace Pango
+
+
+namespace Glib
+{
+
+/** @relates Pango::GlyphInfo */
+Pango::GlyphInfo& wrap(PangoGlyphInfo* object);
+
+/** @relates Pango::GlyphInfo */
+const Pango::GlyphInfo& wrap(const PangoGlyphInfo* object);
+
+/** @relates Pango::GlyphGeometry */
+Pango::GlyphGeometry& wrap(PangoGlyphGeometry* object);
+
+/** @relates Pango::GlyphGeometry */
+const Pango::GlyphGeometry& wrap(const PangoGlyphGeometry* object);
+
+/* @relates Pango::GlyphVisAttr */
+//Pango::GlyphVisAttr& wrap(PangoGlyphVisAttr* object);
+
+/* @relates Pango::GlyphVisAttr */
+//const Pango::GlyphVisAttr& wrap(const PangoGlyphVisAttr* object);
+
+} //namespace Glib
+
+#endif /* _PANGOMM_GLYPH_H */
+
diff --git a/libs/gtkmm2/pango/pangomm/glyphstring.cc b/libs/gtkmm2/pango/pangomm/glyphstring.cc
new file mode 100644
index 0000000000..38ba283c70
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/glyphstring.cc
@@ -0,0 +1,186 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <pangomm/glyphstring.h>
+#include <pangomm/private/glyphstring_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/utility.h>
+
+
+namespace Pango
+{
+
+GlyphString::GlyphString(const Glib::ustring& text, const Analysis& analysis)
+:
+ gobject_(pango_glyph_string_new())
+{
+ pango_shape(text.c_str(), text.bytes(), const_cast<PangoAnalysis*>(analysis.gobj()), gobj());
+}
+
+Rectangle GlyphString::get_ink_extents(const Glib::RefPtr<const Font>& font) const
+{
+ Rectangle ink_rect;
+ pango_glyph_string_extents(const_cast<PangoGlyphString*>(gobj()), const_cast<PangoFont*>(font->gobj()), ink_rect.gobj(), 0);
+ return ink_rect;
+}
+
+Rectangle GlyphString::get_ink_extents(int start, int end, const Glib::RefPtr<const Font>& font) const
+{
+ Rectangle ink_rect;
+ pango_glyph_string_extents_range(const_cast<PangoGlyphString*>(gobj()), start, end, const_cast<PangoFont*>(font->gobj()), ink_rect.gobj(), 0);
+ return ink_rect;
+}
+
+Rectangle GlyphString::get_logical_extents(const Glib::RefPtr<const Font>& font) const
+{
+ Rectangle logical_rect;
+ pango_glyph_string_extents(const_cast<PangoGlyphString*>(gobj()), const_cast<PangoFont*>(font->gobj()), 0, logical_rect.gobj());
+ return logical_rect;
+}
+
+Rectangle GlyphString::get_logical_extents(int start, int end, const Glib::RefPtr<const Font>& font) const
+{
+ Rectangle logical_rect;
+ pango_glyph_string_extents_range(const_cast<PangoGlyphString*>(gobj()), start, end, const_cast<PangoFont*>(font->gobj()), 0, logical_rect.gobj());
+ return logical_rect;
+}
+
+Glib::ArrayHandle<int> GlyphString::get_logical_widths(const Glib::ustring& text, int embedding_level) const
+{
+ int* logical_widths = g_new(int, text.length());
+ pango_glyph_string_get_logical_widths(const_cast<PangoGlyphString*>(gobj()), text.c_str(), text.bytes(), embedding_level, logical_widths);
+ return Glib::ArrayHandle<int>(logical_widths, text.length(), Glib::OWNERSHIP_SHALLOW);
+}
+
+int GlyphString::index_to_x(const Glib::ustring& text, const Analysis& analysis, int index, bool trailing) const
+{
+ int x_pos;
+ pango_glyph_string_index_to_x(const_cast<PangoGlyphString*>(gobj()), const_cast<gchar*>(text.c_str()), text.bytes(), const_cast<PangoAnalysis*>(analysis.gobj()), index, static_cast<int>(trailing), &x_pos);
+ return x_pos;
+}
+
+void GlyphString::x_to_index(const Glib::ustring& text, const Analysis& analysis, int x_pos, int& index, bool& trailing) const
+{
+ gboolean trailing_temp = FALSE;
+ pango_glyph_string_x_to_index(const_cast<PangoGlyphString*>(gobj()), const_cast<char*>(text.c_str()), text.bytes(), const_cast<PangoAnalysis*>(analysis.gobj()), x_pos, &index, &trailing_temp);
+ trailing = trailing_temp;
+}
+
+Glib::ArrayHandle<GlyphInfo> GlyphString::get_glyphs() const
+{
+ return Glib::ArrayHandle<GlyphInfo>(reinterpret_cast<GlyphInfo*>(gobj()->glyphs), gobj()->num_glyphs, Glib::OWNERSHIP_NONE);
+}
+
+} //namespace Pango
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Pango::GlyphString wrap(PangoGlyphString* object, bool take_copy)
+{
+ return Pango::GlyphString(object, take_copy);
+}
+
+} // namespace Glib
+
+
+namespace Pango
+{
+
+
+// static
+GType GlyphString::get_type()
+{
+ return pango_glyph_string_get_type();
+}
+
+GlyphString::GlyphString()
+:
+ gobject_ (pango_glyph_string_new())
+{}
+
+GlyphString::GlyphString(const GlyphString& other)
+:
+ gobject_ ((other.gobject_) ? pango_glyph_string_copy(other.gobject_) : 0)
+{}
+
+GlyphString::GlyphString(PangoGlyphString* gobject, bool make_a_copy)
+:
+ // For BoxedType wrappers, make_a_copy is true by default. The static
+ // BoxedType wrappers must always take a copy, thus make_a_copy = true
+ // ensures identical behaviour if the default argument is used.
+ gobject_ ((make_a_copy && gobject) ? pango_glyph_string_copy(gobject) : gobject)
+{}
+
+GlyphString& GlyphString::operator=(const GlyphString& other)
+{
+ GlyphString temp (other);
+ swap(temp);
+ return *this;
+}
+
+GlyphString::~GlyphString()
+{
+ if(gobject_)
+ pango_glyph_string_free(gobject_);
+}
+
+void GlyphString::swap(GlyphString& other)
+{
+ PangoGlyphString *const temp = gobject_;
+ gobject_ = other.gobject_;
+ other.gobject_ = temp;
+}
+
+PangoGlyphString* GlyphString::gobj_copy() const
+{
+ return pango_glyph_string_copy(gobject_);
+}
+
+
+void GlyphString::set_size(int new_len)
+{
+ pango_glyph_string_set_size(gobj(), new_len);
+}
+
+void GlyphString::get_extents(const Glib::RefPtr<const Font>& font, Rectangle& ink_rect, Rectangle& logical_rect) const
+{
+ pango_glyph_string_extents(const_cast<PangoGlyphString*>(gobj()), const_cast<PangoFont*>(Glib::unwrap<Font>(font)), (ink_rect).gobj(), (logical_rect).gobj());
+}
+
+void GlyphString::get_extents(int start, int end, const Glib::RefPtr<const Font>& font, Rectangle& ink_rect, Rectangle& logical_rect) const
+{
+ pango_glyph_string_extents_range(const_cast<PangoGlyphString*>(gobj()), start, end, const_cast<PangoFont*>(Glib::unwrap<Font>(font)), (ink_rect).gobj(), (logical_rect).gobj());
+}
+
+
+} // namespace Pango
+
+
diff --git a/libs/gtkmm2/pango/pangomm/glyphstring.h b/libs/gtkmm2/pango/pangomm/glyphstring.h
new file mode 100644
index 0000000000..7313e41766
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/glyphstring.h
@@ -0,0 +1,223 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _PANGOMM_GLYPHSTRING_H
+#define _PANGOMM_GLYPHSTRING_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* glyphstring.h
+ *
+ * Copyright (C) 1998-1999 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <pangomm/font.h>
+#include <pangomm/glyph.h>
+#include <pangomm/item.h>
+#include <pango/pango-glyph.h>
+#include <pango/pango-item.h> //For PangoAnalysis.
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C" { typedef struct _PangoGlyphString PangoGlyphString; }
+#endif
+
+namespace Pango
+{
+
+/** A Pango::GlyphString is used to store strings of glyphs with geometry and visual attribute information.
+ * It can be measured or drawn to the screen.
+ */
+class GlyphString
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef GlyphString CppObjectType;
+ typedef PangoGlyphString BaseObjectType;
+
+ static GType get_type() G_GNUC_CONST;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ GlyphString();
+
+ explicit GlyphString(PangoGlyphString* gobject, bool make_a_copy = true);
+
+ GlyphString(const GlyphString& other);
+ GlyphString& operator=(const GlyphString& other);
+
+ ~GlyphString();
+
+ void swap(GlyphString& other);
+
+ ///Provides access to the underlying C instance.
+ PangoGlyphString* gobj() { return gobject_; }
+
+ ///Provides access to the underlying C instance.
+ const PangoGlyphString* gobj() const { return gobject_; }
+
+ ///Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs.
+ PangoGlyphString* gobj_copy() const;
+
+protected:
+ PangoGlyphString* gobject_;
+
+private:
+
+
+public:
+ /** Construct a string of glyphs from a string of characters.
+ * Given a segment of text and the corresponding Pango::Analysis structure
+ * returned from Pango::Context::itemize(), convert the characters into glyphs.
+ * You may also pass in only a sub-string of the item.
+ * @param text The text to process. You must pass the same string into those member functions expecting a const Glib::ustring&.
+ * @param analysis The analysis information return from Pango::Context::itemize().
+ */
+ GlyphString(const Glib::ustring& text, const Analysis& analysis);
+
+
+ /** Resize a glyph string to the given length.
+ * @param new_len The new length of the string.
+ */
+ void set_size (int new_len);
+
+
+ /** Compute the logical and ink extents of a glyph string. See the documentation
+ * for Pango::Font::get_glyph_extents() for details about the interpretation
+ * of the rectangles.
+ * @param font A Pango::Font.
+ * @param ink_rect Rectangle used to store the extents of the glyph string as drawn.
+ * @param logical_rect Rectangle used to store the logical extents of the glyph string.
+ */
+ void get_extents(const Glib::RefPtr<const Font>& font, Rectangle& ink_rect, Rectangle& logical_rect) const;
+
+ /** Computes the extents of a sub-portion of a glyph string. The extents are
+ * relative to the start of the glyph string range (the origin of their
+ * coordinate system is at the start of the range, not at the start of the entire
+ * glyph string).
+ * @param start Start index.
+ * @param end End index (the range is the set of bytes with
+ * indices such that start &lt;= index &lt; end).
+ * @param font A Pango::Font.
+ * @param ink_rect Rectangle used to store the extents of the glyph string range as drawn.
+ * @param logical_rect Rectangle used to store the logical extents of the glyph string range.
+ */
+ void get_extents(int start, int end, const Glib::RefPtr<const Font>& font, Rectangle& ink_rect, Rectangle& logical_rect) const;
+
+ /** Computes the extents of the glyph string as drawn.
+ * @param font A Pango::Font.
+ * @return The extents of the glyph string as drawn.
+ */
+ Rectangle get_ink_extents(const Glib::RefPtr<const Font>& font) const;
+
+ /** Computes the extents of a sub-portion of the glyph string as drawn.
+ * @param start The start index.
+ * @param end The end index.
+ * @param font A Panog::Font
+ * @return The extents of the sub-portion of the glyph string as drawn.
+ */
+ Rectangle get_ink_extents(int start, int end, const Glib::RefPtr<const Font>& font) const;
+
+ /** Computes the logical extents of a sub-portion of the glyph string.
+ * @param font A Pango::Font.
+ * @return The logical extents of the glyph string.
+ */
+ Rectangle get_logical_extents(const Glib::RefPtr<const Font>& font) const;
+
+ /** Computes the logical extents of a sub-portion of the glyph string.
+ * @param start The start index.
+ * @param end The end index.
+ * @param font A Pango::Font.
+ * @return The logical extents of the sub-portion of the glyph string.
+ */
+ Rectangle get_logical_extents(int start, int end, const Glib::RefPtr<const Font>& font) const;
+
+ /** Determine the screen width corresponding to each character.
+ * When multiple characters compose a single cluster, the width of the entire cluster
+ * is divided equally among the characters.
+ * @param text The text corresponding to the glyphs.
+ * @param embedding_level The embedding level of the string.
+ * @return An array of integers representing the resulting character widths.
+ */
+ Glib::ArrayHandle<int> get_logical_widths(const Glib::ustring& text, int embedding_level) const;
+
+ /** Converts from character position to x position.
+ * (X position is measured from the left edge of the run). Character positions are computed by dividing up each cluster into equal portions.
+ * @param text The text corresponding to the glyphs.
+ * @param analysis The analysis information return from Pango::Context::itemize().
+ * @param index The byte index within text.
+ * @param trailing Whether we should compute the result for the beginning or end of the character.
+ * @return The x position.
+ */
+ int index_to_x(const Glib::ustring& text, const Analysis& analysis, int index, bool trailing) const;
+
+ /** Convert from x offset to character position.
+ * Character positions are computed by dividing up each cluster into equal portions.
+ * In scripts where positioning within a cluster is not allowed (such as Thai),
+ * the returned value may not be a valid cursor position; the caller must combine the
+ * result with the logical attributes for the text to compute the valid cursor position.
+ * @param text The text corresponding to the glyphs.
+ * @param analysis The analysis information return from Pango::Context::itemize().
+ * @param x_pos The x offset (in thousands of a device unit).
+ * @param index The location to store calculated byte index within.
+ * @param trailing The location to store a boolean indicating whether the user clicked on the leading or trailing edge of the character.
+ */
+ void x_to_index(const Glib::ustring& text, const Analysis& analysis, int x_pos, int& index, bool& trailing) const;
+
+ /** Gharacter positions are computed by dividing up each cluster into equal portions.
+ * @return An array of Pango::GlyphInfo objects.
+ */
+ Glib::ArrayHandle<GlyphInfo> get_glyphs() const;
+
+
+};
+
+} //namespace Pango
+
+
+namespace Pango
+{
+
+/** @relates Pango::GlyphString
+ * @param lhs The left-hand side
+ * @param rhs The right-hand side
+ */
+inline void swap(GlyphString& lhs, GlyphString& rhs)
+ { lhs.swap(rhs); }
+
+} // namespace Pango
+
+namespace Glib
+{
+
+/** @relates Pango::GlyphString
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+Pango::GlyphString wrap(PangoGlyphString* object, bool take_copy = false);
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+template <>
+class Value<Pango::GlyphString> : public Glib::Value_Boxed<Pango::GlyphString>
+{};
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+} // namespace Glib
+
+#endif /* _PANGOMM_GLYPHSTRING_H */
+
diff --git a/libs/gtkmm2/pango/pangomm/init.cc b/libs/gtkmm2/pango/pangomm/init.cc
new file mode 100644
index 0000000000..8ae697e967
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/init.cc
@@ -0,0 +1,34 @@
+// -*- c++ -*-
+/* $Id$ */
+
+/* Copyright (C) 2003 The pangomm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/init.h>
+#include <pangomm/wrap_init.h>
+
+namespace Pango
+{
+
+void init()
+{
+ Glib::init();
+ Pango::wrap_init();
+}
+
+} // namespace Pango
+
diff --git a/libs/gtkmm2/pango/pangomm/init.h b/libs/gtkmm2/pango/pangomm/init.h
new file mode 100644
index 0000000000..955b8c2d83
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/init.h
@@ -0,0 +1,40 @@
+// -*- c++ -*-
+#ifndef _PANGOMM_INIT_H
+#define _PANGOMM_INIT_H
+
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+namespace Pango
+{
+
+/** Initialize pangomm.
+ * You may call this more than once.
+ * You do not need to call this if you are using Gtk::Main,
+ * because it calls it for you.
+ */
+void init();
+
+} // namespace Pango
+
+
+
+#endif // _PANGOMM_INIT_H
+
+
diff --git a/libs/gtkmm2/pango/pangomm/item.cc b/libs/gtkmm2/pango/pangomm/item.cc
new file mode 100644
index 0000000000..f798552e1b
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/item.cc
@@ -0,0 +1,201 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <pangomm/item.h>
+#include <pangomm/private/item_p.h>
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <pangomm/font.h>
+#include <pangomm/attributes.h>
+#include <pangomm/glyphstring.h>
+
+namespace Pango
+{
+
+Analysis::Analysis()
+{}
+
+Analysis::Analysis(const PangoAnalysis* src)
+:
+ gobject_ (*src)
+{}
+
+SListHandle_Attribute Analysis::get_extra_attrs() const
+{
+ return SListHandle_Attribute(gobj()->extra_attrs, Glib::OWNERSHIP_NONE);
+}
+
+
+Item::Item(const Item& src)
+:
+ gobject_ ((src.gobject_) ? pango_item_copy(src.gobject_) : 0)
+{}
+
+Item::Item(PangoItem* castitem, bool make_a_copy)
+{
+ // For BoxedType wrappers, make_a_copy is true by default. The static
+ // BoxedType wrappers must always take a copy, thus make_a_copy = true
+ // ensures identical behaviour if the default argument is used.
+
+ if(make_a_copy)
+ {
+ if(castitem)
+ gobject_ = pango_item_copy(castitem);
+ else
+ gobject_ = 0;
+ }
+ else
+ {
+ // It was given to us by a function which has already made a copy for us to keep.
+ gobject_ = castitem;
+ }
+}
+
+Item& Item::operator=(const Item& src)
+{
+ PangoItem *const new_gobject = (src.gobject_) ? pango_item_copy(src.gobject_) : 0;
+
+ if(gobject_)
+ pango_item_free(gobject_);
+ gobject_ = new_gobject;
+
+ return *this;
+}
+
+Item::~Item()
+{
+ if(gobject_)
+ pango_item_free(gobject_);
+}
+
+PangoItem* Item::gobj_copy() const
+{
+ return pango_item_copy(gobject_);
+}
+
+Analysis Item::get_analysis() const
+{
+ return Analysis(&gobj()->analysis);
+}
+
+Glib::ustring Item::get_segment(const Glib::ustring& text) const
+{
+ const char *const start = text.data() + gobj()->offset;
+ return Glib::ustring(start, start + gobj()->length);
+}
+
+Pango::GlyphString Item::shape(const Glib::ustring& text) const
+{
+ return GlyphString(text, get_analysis());
+}
+
+} /* namespace Pango */
+
+
+namespace Glib
+{
+
+Pango::Analysis& wrap(PangoAnalysis* object)
+{
+ return *reinterpret_cast<Pango::Analysis*>(object);
+}
+
+const Pango::Analysis& wrap(const PangoAnalysis* object)
+{
+ return *reinterpret_cast<const Pango::Analysis*>(object);
+}
+
+Pango::Item wrap(PangoItem* object, bool take_copy)
+{
+ return Pango::Item(object, take_copy);
+}
+
+} /* namespace Glib */
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Pango
+{
+
+
+Glib::RefPtr<Font> Analysis::get_font()
+{
+ Glib::RefPtr<Font> ref_ptr(Glib::wrap(gobj()->font));
+
+ if(ref_ptr)
+ ref_ptr->reference();
+
+ return ref_ptr;
+}
+
+Glib::RefPtr<const Font> Analysis::get_font() const
+{
+ Glib::RefPtr<const Font> ref_ptr(Glib::wrap(gobj()->font));
+
+ if(ref_ptr)
+ ref_ptr->reference();
+
+ return ref_ptr;
+}
+
+guint8 Analysis::get_level() const
+{
+ return gobj()->level;
+}
+
+Language Analysis::get_language() const
+{
+ return Language(gobj()->language);
+}
+
+
+} // namespace Pango
+
+
+namespace Pango
+{
+
+
+Item Item::split(int split_index, int split_offset)
+{
+ return Item((pango_item_split(gobj(), split_index, split_offset)));
+}
+
+int Item::get_offset() const
+{
+ return gobj()->offset;
+}
+
+int Item::get_length() const
+{
+ return gobj()->length;
+}
+
+int Item::get_num_chars() const
+{
+ return gobj()->num_chars;
+}
+
+
+} // namespace Pango
+
+
diff --git a/libs/gtkmm2/pango/pangomm/item.h b/libs/gtkmm2/pango/pangomm/item.h
new file mode 100644
index 0000000000..3e58b9a069
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/item.h
@@ -0,0 +1,225 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _PANGOMM_ITEM_H
+#define _PANGOMM_ITEM_H
+
+#include <glibmm.h>
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <pangomm/attributes.h>
+#include <pangomm/language.h>
+#include <pango/pango-item.h>
+
+
+namespace Pango
+{
+
+class Font;
+class GlyphString;
+
+/** A Pango::Analysis stores information about the properties of a segment of text.
+ * Pango::Analysis is used as an output type only so there is no public default constructor.
+ * You can retrieve an object of this type from an object of type Pango::Item by
+ * calling Pango::Item::get_analysis(). Objects of this class can be used for some
+ * calculations in Pango::GlyphString.
+ */
+class Analysis
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Analysis CppObjectType;
+ typedef PangoAnalysis BaseObjectType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+private:
+
+
+protected:
+ // This class is only used as an output type.
+ Analysis();
+
+public:
+ explicit Analysis(const PangoAnalysis* src);
+
+public:
+// _MEMBER_GET_PTR(engine_shape, shape_engine, EngineShape*, PangoEngineShape*) //We don't wrap the Engine* stuff.
+// _MEMBER_GET_PTR(engine_lang, lang_engine, EngineLang*, PangoEngineLang*)
+
+ /** Gets the font used to render this segment.
+ * @return The font used to render this segment.
+ */
+ Glib::RefPtr<Font> get_font();
+ Glib::RefPtr<const Font> get_font() const;
+
+ /** Gets the bidrectional level for this segment.
+ * @return The bidirectional level for this segment.
+ */
+ guint8 get_level() const;
+
+ /** Gets the language of this segment.
+ * @return The language of this segment.
+ */
+ Language get_language() const;
+
+ /** Gets a list of non-font attributes for this segment.
+ * @return A list of non-font attributes for this segment.
+ */
+ SListHandle_Attribute get_extra_attrs() const;
+
+ /// Provides access to the underlying C GObject.
+ PangoAnalysis* gobj() { return &gobject_; }
+ /// Provides access to the underlying C GObject.
+ const PangoAnalysis* gobj() const { return &gobject_; }
+
+protected:
+ PangoAnalysis gobject_;
+
+
+};
+
+
+/** A Pango::Item stores information about a segment of text.
+ * Pango::Item is used as an output type only so there is no public default constructor.
+ * You retrieve objects of this type by calling Pango::Context::itemize() with some text.
+ * The actual rendering of the segment of text that corresponds to a particular Pango::Item
+ * (or some sub-string) into a string of glyphs is done with shape().
+ * The segment of text that corresponds to a Pango::Item can be computed from the
+ * text passed into Pango::Context::itemize() with get_segment(). Together with
+ * the Pango::Analysis data member that can be accessed with get_analysis()
+ * it is needed for further calculations in Pango::GlyphString.
+ */
+class Item
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Item CppObjectType;
+ typedef PangoItem BaseObjectType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+private:
+ //There is the whole set of functions for _CLASS_BOXEDTYPE but unfortunately PangoItem is not registered as a boxed type and lacks pango_item_get_type...
+
+
+public:
+ // There is no default constructor. This class is only used as an output type.
+ explicit Item(PangoItem* castitem, bool make_a_copy = true);
+
+ Item(const Item& src);
+ Item& operator=(const Item& src);
+
+ ~Item();
+
+ /// Provides access to the underlying C GObject. The caller is responsible for freeing it. Use when directly setting fields in structs.
+ PangoItem* gobj_copy() const;
+
+public:
+
+ /** Modifies @a orig to cover only the text after @a split_index , and
+ * returns a new item that covers the text before @a split_index that
+ * used to be in @a orig . You can think of @a split_index as the length of
+ * the returned item. @a split_index may not be 0, and it may not be
+ * greater than or equal to the length of @a orig (that is, there must
+ * be at least one byte assigned to each item, you can't create a
+ * zero-length item). @a split_offset is the length of the first item in
+ * chars, and must be provided because the text used to generate the
+ * item isn't available, so pango_item_split() can't count the char
+ * length of the split items itself.
+ * @param split_index Byte index of position to split item, relative to the start of the item.
+ * @param split_offset Number of chars between start of @a orig and @a split_index .
+ * @return New item representing text before @a split_index .
+ */
+ Item split(int split_index, int split_offset);
+
+ /** Gets the offset of the segment from the beginning of the string in bytes.
+ * @return The offset of the segment from the beginning of the string in bytes.
+ */
+ int get_offset() const;
+
+ /** Gets the length of the segment in bytes.
+ * @return The length of the segment in bytes.
+ */
+ int get_length() const;
+
+ /** Gets the length of the segment in characters.
+ * @return The length of the semgment in characters.
+ */
+ int get_num_chars() const;
+
+ /** Gets the properties of the segment.
+ * @return The properties of the segment.
+ */
+ Analysis get_analysis() const;
+
+ /** Computes the segment of text that is represented by the item.
+ * @param text The text that has been passed into Pango::Context::itemize().
+ * @return The sub-string of @a text that corresponds to the item.
+ */
+ Glib::ustring get_segment(const Glib::ustring& text) const;
+
+ /** Convert a segment of text into a string of glyphs.
+ * @param text The text to process. This must either be the whole segment of text that corresponds to the item as returned by get_segment() or a sub-string of that segment. You need to pass the same text to the member functions of Pango::GlyphString for further calculations.
+ * @return A Pango::GlyphString object that can be measured or drawn.
+ */
+ GlyphString shape(const Glib::ustring& text) const;
+
+ /// Provides access to the underlying C GObject.
+ PangoItem* gobj() { return gobject_; }
+ /// Provides access to the underlying C GObject.
+ const PangoItem* gobj() const { return gobject_; }
+
+protected:
+ PangoItem* gobject_;
+
+
+};
+
+struct ItemTraits
+{
+ typedef Pango::Item CppType;
+ typedef const PangoItem* CType;
+ typedef PangoItem* CTypeNonConst;
+
+ static CType to_c_type (const CppType& obj) { return obj.gobj(); }
+ static CType to_c_type (CType ptr) { return ptr; }
+ static CppType to_cpp_type (CType ptr) { return CppType(const_cast<CTypeNonConst>(ptr), true); }
+ static void release_c_type (CType ptr) { pango_item_free(const_cast<CTypeNonConst>(ptr)); }
+};
+
+typedef Glib::ListHandle<Item, ItemTraits> ListHandle_Item;
+
+} // namespace Pango
+
+
+namespace Glib
+{
+
+/** @relates Pango::Analysis */
+Pango::Analysis& wrap(PangoAnalysis* object);
+
+/** @relates Pango::Analysis */
+const Pango::Analysis& wrap(const PangoAnalysis* object);
+
+/** @relates Pango::Item */
+Pango::Item wrap(PangoItem* object, bool take_copy=true);
+
+} // namespace Glib
+
+
+#endif /* _PANGOMM_ITEM_H */
+
diff --git a/libs/gtkmm2/pango/pangomm/language.cc b/libs/gtkmm2/pango/pangomm/language.cc
new file mode 100644
index 0000000000..db2fd1fde4
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/language.cc
@@ -0,0 +1,158 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <pangomm/language.h>
+#include <pangomm/private/language_p.h>
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <pango/pango-enum-types.h>
+#include <pango/pango-script.h>
+
+namespace Pango
+{
+
+/* PangoLanguage is just another example of inconsistent coding in atk/pango/gtk:
+ * on the one hand it is defined and registered as a boxed type, on the other
+ * hand it is always a pointer to some statically allocated string and thus
+ * neither allocated by itself, nor copied by value, nor freed. Similar dummy
+ * functions as below are defined in pango/pango-util.c but they are not exported.
+ * Compare with pango/pango-util.c for reference. */
+ //(I wonder who wrote this - it wasn't me. murrayc)
+
+inline PangoLanguage* _pango_language_new()
+{
+ return 0;
+}
+
+inline PangoLanguage* _pango_language_copy(const PangoLanguage* language)
+{
+ return const_cast<PangoLanguage*>(language);
+}
+
+inline void _pango_language_free(PangoLanguage*)
+{
+ return;
+}
+
+Language::Language()
+:
+ gobject_(0)
+{}
+
+Language::Language(const Glib::ustring& language)
+:
+ gobject_(pango_language_from_string(language.c_str()))
+{}
+
+Glib::ustring Language::get_string() const
+{
+ if (gobject_)
+ return pango_language_to_string(const_cast<PangoLanguage*>(gobj()));
+ else
+ return Glib::ustring();
+}
+
+} /* namespace Pango */
+
+
+namespace
+{
+} // anonymous namespace
+
+// static
+GType Glib::Value<Pango::Script>::value_type()
+{
+ return pango_script_get_type();
+}
+
+
+namespace Glib
+{
+
+Pango::Language wrap(PangoLanguage* object, bool take_copy)
+{
+ return Pango::Language(object, take_copy);
+}
+
+} // namespace Glib
+
+
+namespace Pango
+{
+
+
+// static
+GType Language::get_type()
+{
+ return pango_language_get_type();
+}
+
+
+Language::Language(const Language& other)
+:
+ gobject_ ((other.gobject_) ? _pango_language_copy(other.gobject_) : 0)
+{}
+
+Language::Language(PangoLanguage* gobject, bool make_a_copy)
+:
+ // For BoxedType wrappers, make_a_copy is true by default. The static
+ // BoxedType wrappers must always take a copy, thus make_a_copy = true
+ // ensures identical behaviour if the default argument is used.
+ gobject_ ((make_a_copy && gobject) ? _pango_language_copy(gobject) : gobject)
+{}
+
+Language& Language::operator=(const Language& other)
+{
+ Language temp (other);
+ swap(temp);
+ return *this;
+}
+
+Language::~Language()
+{
+ if(gobject_)
+ _pango_language_free(gobject_);
+}
+
+void Language::swap(Language& other)
+{
+ PangoLanguage *const temp = gobject_;
+ gobject_ = other.gobject_;
+ other.gobject_ = temp;
+}
+
+PangoLanguage* Language::gobj_copy() const
+{
+ return _pango_language_copy(gobject_);
+}
+
+
+bool Language::matches(const Glib::ustring & range_list) const
+{
+ return pango_language_matches(const_cast<PangoLanguage*>(gobj()), range_list.c_str());
+}
+
+bool Language::includes_script(Script script) const
+{
+ return pango_language_includes_script(const_cast<PangoLanguage*>(gobj()), ((PangoScript)(script)));
+}
+
+
+} // namespace Pango
+
+
diff --git a/libs/gtkmm2/pango/pangomm/language.h b/libs/gtkmm2/pango/pangomm/language.h
new file mode 100644
index 0000000000..f4f762eb39
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/language.h
@@ -0,0 +1,245 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _PANGOMM_LANGUAGE_H
+#define _PANGOMM_LANGUAGE_H
+
+#include <glibmm.h>
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <pango/pango-attributes.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C" { typedef struct _PangoLanguage PangoLanguage; }
+#endif
+
+namespace Pango
+{
+
+/** @addtogroup pangommEnums Enums and Flags */
+
+/**
+ * @ingroup pangommEnums
+ */
+enum Script
+{
+ SCRIPT_INVALID_CODE = -1,
+ SCRIPT_COMMON,
+ SCRIPT_INHERITED,
+ SCRIPT_ARABIC,
+ SCRIPT_ARMENIAN,
+ SCRIPT_BENGALI,
+ SCRIPT_BOPOMOFO,
+ SCRIPT_CHEROKEE,
+ SCRIPT_COPTIC,
+ SCRIPT_CYRILLIC,
+ SCRIPT_DESERET,
+ SCRIPT_DEVANAGARI,
+ SCRIPT_ETHIOPIC,
+ SCRIPT_GEORGIAN,
+ SCRIPT_GOTHIC,
+ SCRIPT_GREEK,
+ SCRIPT_GUJARATI,
+ SCRIPT_GURMUKHI,
+ SCRIPT_HAN,
+ SCRIPT_HANGUL,
+ SCRIPT_HEBREW,
+ SCRIPT_HIRAGANA,
+ SCRIPT_KANNADA,
+ SCRIPT_KATAKANA,
+ SCRIPT_KHMER,
+ SCRIPT_LAO,
+ SCRIPT_LATIN,
+ SCRIPT_MALAYALAM,
+ SCRIPT_MONGOLIAN,
+ SCRIPT_MYANMAR,
+ SCRIPT_OGHAM,
+ SCRIPT_OLD_ITALIC,
+ SCRIPT_ORIYA,
+ SCRIPT_RUNIC,
+ SCRIPT_SINHALA,
+ SCRIPT_SYRIAC,
+ SCRIPT_TAMIL,
+ SCRIPT_TELUGU,
+ SCRIPT_THAANA,
+ SCRIPT_THAI,
+ SCRIPT_TIBETAN,
+ SCRIPT_CANADIAN_ABORIGINAL,
+ SCRIPT_YI,
+ SCRIPT_TAGALOG,
+ SCRIPT_HANUNOO,
+ SCRIPT_BUHID,
+ SCRIPT_TAGBANWA,
+ SCRIPT_BRAILLE,
+ SCRIPT_CYPRIOT,
+ SCRIPT_LIMBU,
+ SCRIPT_OSMANYA,
+ SCRIPT_SHAVIAN,
+ SCRIPT_LINEAR_B,
+ SCRIPT_TAI_LE,
+ SCRIPT_UGARITIC
+};
+
+} // namespace Pango
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Pango::Script> : public Glib::Value_Enum<Pango::Script>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Pango
+{
+
+
+/** A Pango::Language is used to represent a language.
+ */
+class Language
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Language CppObjectType;
+ typedef PangoLanguage BaseObjectType;
+
+ static GType get_type() G_GNUC_CONST;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+ explicit Language(PangoLanguage* gobject, bool make_a_copy = true);
+
+ Language(const Language& other);
+ Language& operator=(const Language& other);
+
+ ~Language();
+
+ void swap(Language& other);
+
+ ///Provides access to the underlying C instance.
+ PangoLanguage* gobj() { return gobject_; }
+
+ ///Provides access to the underlying C instance.
+ const PangoLanguage* gobj() const { return gobject_; }
+
+ ///Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs.
+ PangoLanguage* gobj_copy() const;
+
+protected:
+ PangoLanguage* gobject_;
+
+private:
+
+ //This function is a bad hack for internal use by renderers and Pango (from pango/pango-utils.c)
+ //This is defined as a macro
+
+
+public:
+ /** Constructs an empty language tag.
+ */
+ Language();
+
+ /** Constructs a Pango::Language object from a RFC-3066 format language tag.
+ * This function first canonicalizes the string by converting it to lowercase,
+ * mapping '_' to '-', and stripping all characters other than letters and '-'.
+ */
+ Language(const Glib::ustring& language);
+
+ /** Gets a RFC-3066 format string representing the given language tag.
+ * @return A string representing the language tag. An empty string is returned if the language tag is empty.
+ */
+ Glib::ustring get_string() const;
+
+
+ /** Checks if a language tag matches one of the elements in a list of
+ * language ranges. A language tag is considered to match a range
+ * in the list if the range is '*', the range is exactly the tag,
+ * or the range is a prefix of the tag, and the character after the
+ * tag is '-'.
+ * @param range_list A list of language ranges, separated by ';' characters.
+ * each element must either be '*', or a RFC 3066 language range
+ * canonicalized as by pango_language_from_string().
+ * @return <tt>true</tt> if a match was found.
+ */
+ bool matches(const Glib::ustring & range_list) const;
+
+ /** Determines if @a script is one of the scripts used to
+ * write @a language . The returned value is conservative;
+ * if nothing is known about the language tag @a language ,
+ * <tt>true</tt> will be returned, since, as far as Pango knows,
+ * @a script might be used to write @a language .
+ *
+ * This routine is used in Pango's itemization process when
+ * determining if a supplied language tag is relevant to
+ * a particular section of text. It probably is not useful for
+ * applications in most circumstances.
+ * @param script A Pango::Script.
+ * @return <tt>true</tt> if @a script is one of the scripts used
+ * to write @a language , or if nothing is known about @a language .
+ *
+ * Since: 1.4.
+ */
+ bool includes_script(Script script) const;
+
+
+};
+
+} /* namespace Pango */
+
+
+namespace Pango
+{
+
+/** @relates Pango::Language
+ * @param lhs The left-hand side
+ * @param rhs The right-hand side
+ */
+inline void swap(Language& lhs, Language& rhs)
+ { lhs.swap(rhs); }
+
+} // namespace Pango
+
+namespace Glib
+{
+
+/** @relates Pango::Language
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+Pango::Language wrap(PangoLanguage* object, bool take_copy = false);
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+template <>
+class Value<Pango::Language> : public Glib::Value_Boxed<Pango::Language>
+{};
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+} // namespace Glib
+
+#endif /* _PANGOMM_LANGUAGE_H */
+
diff --git a/libs/gtkmm2/pango/pangomm/layout.cc b/libs/gtkmm2/pango/pangomm/layout.cc
new file mode 100644
index 0000000000..96d45e2037
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/layout.cc
@@ -0,0 +1,451 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <pangomm/layout.h>
+#include <pangomm/private/layout_p.h>
+
+#include <pango/pango-enum-types.h>
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+namespace Pango
+{
+
+Layout::Layout(const Glib::RefPtr<Context>& context)
+:
+ Glib::Object(G_OBJECT(pango_layout_new(context->gobj())))
+{}
+
+void Layout::set_text(const Glib::ustring& text)
+{
+ pango_layout_set_text(gobj(), text.c_str(), text.bytes());
+}
+
+void Layout::set_markup(const Glib::ustring& markup)
+{
+ return pango_layout_set_markup(gobj(), markup.c_str(), markup.bytes());
+}
+
+void Layout::set_markup(const Glib::ustring& markup, gunichar accel_marker, gunichar& accel_char)
+{
+ return pango_layout_set_markup_with_accel(gobj(), markup.c_str(), markup.bytes(), accel_marker, &accel_char);
+}
+
+Glib::ArrayHandle<PangoLogAttr> Layout::get_log_attrs() const
+{
+ //Get array:
+ PangoLogAttr* pAttrs = 0;
+ int n_attrs = 0;
+ pango_layout_get_log_attrs(const_cast<PangoLayout*>(gobj()), &pAttrs, &n_attrs);
+
+ return Glib::ArrayHandle<PangoLogAttr>(pAttrs, n_attrs, Glib::OWNERSHIP_SHALLOW);
+}
+
+Rectangle Layout::index_to_pos(int index) const
+{
+ Rectangle pos;
+ pango_layout_index_to_pos(const_cast<PangoLayout*>(gobj()), index, pos.gobj());
+ return pos;
+}
+
+Rectangle Layout::get_cursor_strong_pos(int index) const
+{
+ Rectangle strong_pos;
+ pango_layout_get_cursor_pos(const_cast<PangoLayout*>(gobj()), index, strong_pos.gobj(), 0);
+ return strong_pos;
+}
+
+Rectangle Layout::get_cursor_weak_pos(int index) const
+{
+ Rectangle weak_pos;
+ pango_layout_get_cursor_pos(const_cast<PangoLayout*>(gobj()), index, 0, weak_pos.gobj());
+ return weak_pos;
+}
+
+Rectangle Layout::get_ink_extents() const
+{
+ Rectangle ink_extents;
+ pango_layout_get_extents(const_cast<PangoLayout*>(gobj()), ink_extents.gobj(), 0);
+ return ink_extents;
+}
+
+Rectangle Layout::get_logical_extents() const
+{
+ Rectangle logical_extents;
+ pango_layout_get_extents(const_cast<PangoLayout*>(gobj()), 0, logical_extents.gobj());
+ return logical_extents;
+}
+
+Rectangle Layout::get_pixel_ink_extents() const
+{
+ Rectangle ink_extents;
+ pango_layout_get_pixel_extents(const_cast<PangoLayout*>(gobj()), ink_extents.gobj(), 0);
+ return ink_extents;
+}
+
+Rectangle Layout::get_pixel_logical_extents() const
+{
+ Rectangle logical_extents;
+ pango_layout_get_pixel_extents(const_cast<PangoLayout*>(gobj()), 0, logical_extents.gobj());
+ return logical_extents;
+}
+
+void Layout::get_iter(LayoutIter& iter)
+{
+ iter.assign_gobj(pango_layout_get_iter(gobj()));
+}
+
+void Layout::unset_font_description()
+{
+ pango_layout_set_font_description(gobj(), 0);
+}
+
+} /* namespace Pango */
+
+
+namespace
+{
+} // anonymous namespace
+
+// static
+GType Glib::Value<Pango::Alignment>::value_type()
+{
+ return pango_alignment_get_type();
+}
+
+// static
+GType Glib::Value<Pango::WrapMode>::value_type()
+{
+ return pango_wrap_mode_get_type();
+}
+
+// static
+GType Glib::Value<Pango::EllipsizeMode>::value_type()
+{
+ return pango_ellipsize_mode_get_type();
+}
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Pango::Layout> wrap(PangoLayout* object, bool take_copy)
+{
+ return Glib::RefPtr<Pango::Layout>( dynamic_cast<Pango::Layout*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} /* namespace Glib */
+
+
+namespace Pango
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Layout_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Layout_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(pango_layout_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Layout_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* Layout_Class::wrap_new(GObject* object)
+{
+ return new Layout((PangoLayout*)object);
+}
+
+
+/* The implementation: */
+
+PangoLayout* Layout::gobj_copy()
+{
+ reference();
+ return gobj();
+}
+
+Layout::Layout(const Glib::ConstructParams& construct_params)
+:
+ Glib::Object(construct_params)
+{}
+
+Layout::Layout(PangoLayout* castitem)
+:
+ Glib::Object((GObject*)(castitem))
+{}
+
+Layout::~Layout()
+{}
+
+
+Layout::CppClassType Layout::layout_class_; // initialize static member
+
+GType Layout::get_type()
+{
+ return layout_class_.init().get_type();
+}
+
+GType Layout::get_base_type()
+{
+ return pango_layout_get_type();
+}
+
+
+Glib::RefPtr<Layout> Layout::create(const Glib::RefPtr<Context>& context)
+{
+ return Glib::RefPtr<Layout>( new Layout(context) );
+}
+Glib::RefPtr<Layout> Layout::copy()
+{
+ return Glib::wrap(pango_layout_copy(gobj()));
+}
+
+Glib::RefPtr<Context> Layout::get_context() const
+{
+
+ Glib::RefPtr<Context> retvalue = Glib::wrap(pango_layout_get_context(const_cast<PangoLayout*>(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+void Layout::set_attributes(AttrList& attrs)
+{
+ pango_layout_set_attributes(gobj(), (attrs).gobj());
+}
+
+AttrList Layout::get_attributes() const
+{
+ return AttrList((pango_layout_get_attributes(const_cast<PangoLayout*>(gobj()))));
+}
+
+Glib::ustring Layout::get_text() const
+{
+ return Glib::convert_const_gchar_ptr_to_ustring(pango_layout_get_text(const_cast<PangoLayout*>(gobj())));
+}
+
+void Layout::set_font_description(const FontDescription& desc)
+{
+ pango_layout_set_font_description(gobj(), (desc).gobj());
+}
+
+void Layout::set_width(int width)
+{
+ pango_layout_set_width(gobj(), width);
+}
+
+int Layout::get_width() const
+{
+ return pango_layout_get_width(const_cast<PangoLayout*>(gobj()));
+}
+
+void Layout::set_wrap(WrapMode wrap)
+{
+ pango_layout_set_wrap(gobj(), ((PangoWrapMode)(wrap)));
+}
+
+WrapMode Layout::get_wrap() const
+{
+ return ((WrapMode)(pango_layout_get_wrap(const_cast<PangoLayout*>(gobj()))));
+}
+
+void Layout::set_indent(int indent)
+{
+ pango_layout_set_indent(gobj(), indent);
+}
+
+int Layout::get_indent() const
+{
+ return pango_layout_get_indent(const_cast<PangoLayout*>(gobj()));
+}
+
+void Layout::set_spacing(int spacing)
+{
+ pango_layout_set_spacing(gobj(), spacing);
+}
+
+int Layout::get_spacing() const
+{
+ return pango_layout_get_spacing(const_cast<PangoLayout*>(gobj()));
+}
+
+void Layout::set_justify(bool justify)
+{
+ pango_layout_set_justify(gobj(), static_cast<int>(justify));
+}
+
+bool Layout::get_justify() const
+{
+ return pango_layout_get_justify(const_cast<PangoLayout*>(gobj()));
+}
+
+bool Layout::get_auto_dir() const
+{
+ return pango_layout_get_auto_dir(const_cast<PangoLayout*>(gobj()));
+}
+
+void Layout::set_auto_dir(bool auto_dir)
+{
+ pango_layout_set_auto_dir(gobj(), static_cast<int>(auto_dir));
+}
+
+void Layout::set_alignment(Alignment alignment)
+{
+ pango_layout_set_alignment(gobj(), ((PangoAlignment)(alignment)));
+}
+
+Alignment Layout::get_alignment() const
+{
+ return ((Alignment)(pango_layout_get_alignment(const_cast<PangoLayout*>(gobj()))));
+}
+
+void Layout::set_tabs(TabArray& tabs)
+{
+ pango_layout_set_tabs(gobj(), (tabs).gobj());
+}
+
+TabArray Layout::get_tabs() const
+{
+ return TabArray((pango_layout_get_tabs(const_cast<PangoLayout*>(gobj()))));
+}
+
+void Layout::set_single_paragraph_mode(bool setting)
+{
+ pango_layout_set_single_paragraph_mode(gobj(), static_cast<int>(setting));
+}
+
+bool Layout::get_single_paragraph_mode() const
+{
+ return pango_layout_get_single_paragraph_mode(const_cast<PangoLayout*>(gobj()));
+}
+
+void Layout::set_ellipsize(EllipsizeMode ellipsize)
+{
+ pango_layout_set_ellipsize(gobj(), ((PangoEllipsizeMode)(ellipsize)));
+}
+
+EllipsizeMode Layout::get_ellipsize() const
+{
+ return ((EllipsizeMode)(pango_layout_get_ellipsize(const_cast<PangoLayout*>(gobj()))));
+}
+
+void Layout::context_changed()
+{
+ pango_layout_context_changed(gobj());
+}
+
+void Layout::get_cursor_pos(int index, Rectangle& strong_pos, Rectangle& weak_pos) const
+{
+ pango_layout_get_cursor_pos(const_cast<PangoLayout*>(gobj()), index, (strong_pos).gobj(), (weak_pos).gobj());
+}
+
+void Layout::move_cursor_visually(bool strong, int old_index, int old_trailing, int direction, int& new_index, int& new_trailing) const
+{
+ pango_layout_move_cursor_visually(const_cast<PangoLayout*>(gobj()), static_cast<int>(strong), old_index, old_trailing, direction, &new_index, &new_trailing);
+}
+
+bool Layout::xy_to_index(int x, int y, int& index, int& trailing) const
+{
+ return pango_layout_xy_to_index(const_cast<PangoLayout*>(gobj()), x, y, &index, &trailing);
+}
+
+void Layout::get_extents(Rectangle& ink_rect, Rectangle& logical_rect) const
+{
+ pango_layout_get_extents(const_cast<PangoLayout*>(gobj()), (ink_rect).gobj(), (logical_rect).gobj());
+}
+
+void Layout::get_pixel_extents(Rectangle& ink_rect, Rectangle& logical_rect) const
+{
+ pango_layout_get_pixel_extents(const_cast<PangoLayout*>(gobj()), (ink_rect).gobj(), (logical_rect).gobj());
+}
+
+void Layout::get_size(int& width, int& height) const
+{
+ pango_layout_get_size(const_cast<PangoLayout*>(gobj()), &width, &height);
+}
+
+void Layout::get_pixel_size(int& width, int& height) const
+{
+ pango_layout_get_pixel_size(const_cast<PangoLayout*>(gobj()), &width, &height);
+}
+
+int Layout::get_line_count() const
+{
+ return pango_layout_get_line_count(const_cast<PangoLayout*>(gobj()));
+}
+
+Glib::RefPtr<LayoutLine> Layout::get_line(int line)
+{
+
+ Glib::RefPtr<LayoutLine> retvalue = Glib::wrap(pango_layout_get_line(gobj(), line));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+Glib::RefPtr<const LayoutLine> Layout::get_line(int line) const
+{
+
+ Glib::RefPtr<const LayoutLine> retvalue = Glib::wrap(pango_layout_get_line(const_cast<PangoLayout*>(gobj()), line));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+SListHandle_LayoutLine Layout::get_lines()
+{
+ return SListHandle_LayoutLine(pango_layout_get_lines(gobj()), Glib::OWNERSHIP_SHALLOW);
+}
+
+SListHandle_ConstLayoutLine Layout::get_lines() const
+{
+ return SListHandle_ConstLayoutLine(pango_layout_get_lines(const_cast<PangoLayout*>(gobj())), Glib::OWNERSHIP_SHALLOW);
+}
+
+
+} // namespace Pango
+
+
diff --git a/libs/gtkmm2/pango/pangomm/layout.h b/libs/gtkmm2/pango/pangomm/layout.h
new file mode 100644
index 0000000000..dceee8c358
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/layout.h
@@ -0,0 +1,687 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _PANGOMM_LAYOUT_H
+#define _PANGOMM_LAYOUT_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* layout.h
+ *
+ * Copyright(C) 1998-1999 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or(at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#include <glibmm/object.h>
+#include <glibmm/slisthandle.h>
+#include <pangomm/font.h>
+#include <pangomm/fontdescription.h>
+#include <pangomm/context.h>
+#include <pangomm/attrlist.h>
+#include <pangomm/tabarray.h>
+#include <pangomm/layoutline.h>
+#include <pangomm/layoutiter.h>
+#include <pango/pango-layout.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _PangoLayout PangoLayout;
+typedef struct _PangoLayoutClass PangoLayoutClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Pango
+{ class Layout_Class; } // namespace Pango
+namespace Pango
+{
+
+
+/** @addtogroup pangommEnums Enums and Flags */
+
+/**
+ * @ingroup pangommEnums
+ */
+enum Alignment
+{
+ ALIGN_LEFT,
+ ALIGN_CENTER,
+ ALIGN_RIGHT
+};
+
+} // namespace Pango
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Pango::Alignment> : public Glib::Value_Enum<Pango::Alignment>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Pango
+{
+
+/**
+ * @ingroup pangommEnums
+ */
+enum WrapMode
+{
+ WRAP_WORD,
+ WRAP_CHAR,
+ WRAP_WORD_CHAR
+};
+
+} // namespace Pango
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Pango::WrapMode> : public Glib::Value_Enum<Pango::WrapMode>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Pango
+{
+
+/**
+ * @ingroup pangommEnums
+ */
+enum EllipsizeMode
+{
+ ELLIPSIZE_NONE,
+ ELLIPSIZE_START,
+ ELLIPSIZE_MIDDLE,
+ ELLIPSIZE_END
+};
+
+} // namespace Pango
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Pango::EllipsizeMode> : public Glib::Value_Enum<Pango::EllipsizeMode>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Pango
+{
+
+
+/** A Pango::Layout represents an entire paragraph of text.
+ * It is initialized with a Pango::Context, UTF-8 string and set of attributes for that string.
+ * Once that is done, the set of formatted lines can be extracted from the object,
+ * the layout can be rendered, and conversion between logical character positions
+ * within the layout's text, and the physical position of the resulting glyphs can be made.
+ */
+
+class Layout : public Glib::Object
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef Layout CppObjectType;
+ typedef Layout_Class CppClassType;
+ typedef PangoLayout BaseObjectType;
+ typedef PangoLayoutClass BaseClassType;
+
+private: friend class Layout_Class;
+ static CppClassType layout_class_;
+
+private:
+ // noncopyable
+ Layout(const Layout&);
+ Layout& operator=(const Layout&);
+
+protected:
+ explicit Layout(const Glib::ConstructParams& construct_params);
+ explicit Layout(PangoLayout* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~Layout();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ PangoLayout* gobj() { return reinterpret_cast<PangoLayout*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const PangoLayout* gobj() const { return reinterpret_cast<PangoLayout*>(gobject_); }
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ PangoLayout* gobj_copy();
+
+private:
+
+
+protected:
+ explicit Layout(const Glib::RefPtr<Context>& context);
+
+public:
+
+ static Glib::RefPtr<Layout> create(const Glib::RefPtr<Context>& context);
+
+
+ /** Does a deep copy-by-value of the @a src layout. The attribute list,
+ * tab array, and text from the original layout are all copied by
+ * value.
+ * @return A new Pango::Layout identical to @a src .
+ */
+ Glib::RefPtr<Layout> copy();
+
+ /** Retrieves the Pango::Context used for this layout.
+ * @return The Pango::Context for the layout. This does not
+ * have an additional refcount added, so if you want to keep
+ * a copy of this around, you must reference it yourself.
+ */
+ Glib::RefPtr<Context> get_context() const;
+
+ /** Sets the text attributes for a layout object.
+ * @param attrs A Pango::AttrList.
+ */
+ void set_attributes(AttrList& attrs);
+
+ /** Gets the attribute list for the layout, if any.
+ * @return A Pango::AttrList.
+ */
+ AttrList get_attributes() const;
+
+ /** Set the text of the layout.
+ * @param text The text for the layout.
+ */
+ void set_text(const Glib::ustring& text);
+
+
+ /** Gets the text in the layout. The returned text should not
+ * be freed or modified.
+ * @return The text in the @a layout .
+ */
+ Glib::ustring get_text() const;
+
+ /** Sets the layout text and attribute list from marked-up text (see markup format).
+ * Replaces the current text and attribute list.
+ * @param markup Some marked-up text.
+ */
+ void set_markup(const Glib::ustring& markup);
+
+ /** Sets the layout text and attribute list from marked-up text (see markup format).
+ * Replaces the current text and attribute list.
+ *
+ * If @a accel_marker is nonzero, the given character will mark the character following
+ * it as an accelerator. For example, the accel marker might be an ampersand or
+ * underscore. All characters marked as an accelerator will receive a
+ * Pango::UNDERLINE_LOW attribute, and the first character so marked will be returned
+ * in @a accel_char. Two @a accel_marker characters following each other produce a
+ * single literal @a accel_marker character.
+ * @param markup Some marked-up text.
+ * @param accel_marker Marker for accelerators in the text.
+ * @param accel_char Return location for any located accelerators.
+ */
+ void set_markup(const Glib::ustring& markup, gunichar accel_marker, gunichar& accel_char);
+
+
+ /** Set the default font description for the layout. If no font
+ * description is set on the layout, the font description from
+ * the layout's context is used.
+ * @param desc The new pango font description.
+ */
+ void set_font_description(const FontDescription& desc);
+ void unset_font_description();
+
+
+ /** Sets the width to which the lines of the Pango::Layout should be wrapped.
+ * @param width The desired width, or -1 to indicate that no wrapping should be
+ * performed.
+ */
+ void set_width(int width);
+
+ /** Gets the width to which the lines of the Pango::Layout should be wrapped.
+ * @return The width.
+ */
+ int get_width() const;
+
+ /** Sets the wrap mode; the wrap mode only has an effect if a width
+ * is set on the layout with pango_layout_set_width(). To turn off wrapping,
+ * set the width to -1.
+ * @param wrap The wrap mode.
+ */
+ void set_wrap(WrapMode wrap);
+
+ /** Gets the wrap mode for the layout.
+ * @return Active wrap mode.
+ */
+ WrapMode get_wrap() const;
+
+ /** Sets the width in pango units to indent each paragraph. A negative value
+ * of @a indent will produce a hanging indent. That is, the first line will
+ * have the full width, and subsequent lines will be indented by the
+ * absolute value of @a indent .
+ * @param indent The amount by which to indentset.
+ */
+ void set_indent(int indent);
+
+ /** Gets the paragraph indent width in pango units. A negative value
+ * indicates a hanging indent.
+ * @return The indent.
+ */
+ int get_indent() const;
+
+ /** Sets the amount of spacing between the lines of the layout.
+ * @param spacing The amount of spacing.
+ */
+ void set_spacing(int spacing);
+
+ /** Gets the amount of spacing between the lines of the layout.
+ * @return The spacing (in Pango::GlyphUnit).
+ */
+ int get_spacing() const;
+
+ /** Sets whether or not each complete line should be stretched to
+ * fill the entire width of the layout. This stretching is typically
+ * done by adding whitespace, but for some scripts (such as Arabic),
+ * the justification is done by extending the characters.
+ *
+ * Note that as of Pango-1.4, this functionality is not yet implemented.
+ * @param justify Whether the lines in the layout should be justified.
+ */
+ void set_justify(bool justify = true);
+
+ /** Gets whether or not each complete line should be stretched to
+ * fill the entire width of the layout.
+ * @return The justify.
+ */
+ bool get_justify() const;
+
+
+ /** Gets whether to calculate the bidirectional base direction
+ * for the layout according to the contents of the layout.
+ * See pango_layout_set_auto_dir().
+ * @return If <tt>true</tt>, the bidirectional base direction
+ * is computed from the layout's contents.
+ */
+ bool get_auto_dir() const;
+
+ /** Sets whether to calculate the bidirectional base direction
+ * for the layout according to the contents of the layout;
+ * when this flag is on (the default), then paragraphs in
+ * @a layout that begin with strong right-to-left characters
+ * (Arabic and Hebrew principally), will have right-to-left
+ * layout, paragraphs with letters from other scripts will
+ * have left-to-right layout. Paragraphs with only neutral
+ * characters get their direction from the surrounding paragraphs.
+ *
+ * When <tt>false</tt>, the choice between left-to-right and
+ * right-to-left layout is done by according to the base direction
+ * of the layout's Pango::Context. (See pango_context_set_base_dir()).
+ *
+ * When the auto-computed direction or a paragraph differs from the
+ * base direction of the context, then the interpretation of
+ * Pango::ALIGN_LEFT and Pango::ALIGN_RIGHT are swapped.
+ * @param auto_dir If <tt>true</tt>, compute the bidirectional base direction
+ * from the layout's contents.
+ */
+ void set_auto_dir(bool auto_dir = true);
+
+
+ /** Sets the alignment for the layout (how partial lines are
+ * positioned within the horizontal space available.)
+ * @param alignment The new alignment.
+ */
+ void set_alignment(Alignment alignment);
+
+ /** Sets the alignment for the layout (how partial lines are
+ * positioned within the horizontal space available.)
+ * @return The alignment value.
+ */
+ Alignment get_alignment() const;
+
+
+ /** Sets the tabs to use for @a layout , overriding the default tabs
+ * (by default, tabs are every 8 spaces). If @a tabs is <tt>0</tt>, the default
+ * tabs are reinstated. @a tabs is copied into the layout; you must
+ * free your copy of @a tabs yourself.
+ * @param tabs A Pango::TabArray.
+ */
+ void set_tabs(TabArray& tabs);
+
+ /** Get the current Pango::TabArray used by this layout. If no
+ * Pango::TabArray has been set, then the default tabs are in use
+ * and an invalid instance is returned. Default tabs are every 8 spaces.
+ * @return A copy of the tabs for this layout.
+ */
+ TabArray get_tabs() const;
+
+
+ /** If @a setting is <tt>true</tt>, do not treat newlines and similar characters
+ * as paragraph separators; instead, keep all text in a single paragraph,
+ * and display a glyph for paragraph separator characters. Used when
+ * you want to allow editing of newlines on a single text line.
+ * @param setting New setting.
+ */
+ void set_single_paragraph_mode(bool setting = true);
+
+ /** Obtains the value set by pango_layout_set_single_paragraph_mode().
+ * @return <tt>true</tt> if the layout does not break paragraphs at
+ * paragraph separator characters.
+ */
+ bool get_single_paragraph_mode() const;
+
+
+ /** Sets the type of ellipsization being performed for @a layout .
+ * Depending on the ellipsization mode @a ellipsize text is
+ * removed from the start, middle, or end of lines so they
+ * fit within the width of layout set with pango_layout_set_width().
+ *
+ * If the layout contains characters such as newlines that
+ * force it to be layed out in multiple lines, then each line
+ * is ellipsized separately.
+ *
+ * Since: 1.6
+ * @param ellipsize The new ellipsization mode for @a layout .
+ */
+ void set_ellipsize(EllipsizeMode ellipsize);
+
+ /** Gets the type of ellipsization being performed for @a layout .
+ * See pango_layout_set_ellipsize()
+ * @return The current ellipsization mode for @a layout
+ *
+ * Since: 1.6.
+ */
+ EllipsizeMode get_ellipsize() const;
+
+
+ /** Forces recomputation of any state in the Pango::Layout that
+ * might depend on the layout's context. This function should
+ * be called if you make changes to the context subsequent
+ * to creating the layout.
+ */
+ void context_changed();
+
+ /** Retrieve an array of logical attributes for each character in the layout.
+ * @return An array of logical attributes.
+ */
+ Glib::ArrayHandle<LogAttr> get_log_attrs() const;
+
+ /** Convert from an index within the layout to the onscreen position corresponding to the grapheme at that index, which is represented as rectangle.
+ * Note that @a x in the returned rectangle is always the leading edge of the grapheme
+ * and @a x + @a width the trailing edge of the grapheme.
+ * If the directionality of the grapheme is right-to-left, then @a width will be negative.
+ * @param index Byte index within layout.
+ * @return The position of the grapheme.
+ */
+ Rectangle index_to_pos(int index) const;
+
+
+ /** Given an index within a layout, determines the positions that of the
+ * strong and weak cursors if the insertion point is at that
+ * index. The position of each cursor is stored as a zero-width
+ * rectangle. The strong cursor location is the location where
+ * characters of the directionality equal to the base direction of the
+ * layout are inserted. The weak cursor location is the location
+ * where characters of the directionality opposite to the base
+ * direction of the layout are inserted.
+ * @param index The byte index of the cursor.
+ * @param strong_pos Location to store the strong cursor position (may be <tt>0</tt>).
+ * @param weak_pos Location to store the weak cursor position (may be <tt>0</tt>).
+ */
+ void get_cursor_pos(int index, Rectangle& strong_pos, Rectangle& weak_pos) const;
+
+ /** Given an index within the layout, determine the positions that of the strong cursors if the insertion point is at that index.
+ * @param index The byte index of the cursor.
+ * @return The strong cursor position.
+ */
+ Rectangle get_cursor_strong_pos(int index) const;
+
+ /** Given an index within the layout, determine the positions that of the weak cursors if the insertion point is at that index.
+ * @param index The byte index of the cursor.
+ * @return The weak cursor position.
+ */
+ Rectangle get_cursor_weak_pos(int index) const;
+
+
+ /** Computes a new cursor position from an old position and
+ * a count of positions to move visually. If @a count is positive,
+ * then the new strong cursor position will be one position
+ * to the right of the old cursor position. If @a count is position
+ * then the new strong cursor position will be one position
+ * to the left of the old cursor position.
+ *
+ * In the presence of bidirection text, the correspondence
+ * between logical and visual order will depend on the direction
+ * of the current run, and there may be jumps when the cursor
+ * is moved off of the end of a run.
+ *
+ * Motion here is in cursor positions, not in characters, so a
+ * single call to pango_layout_move_cursor_visually() may move the
+ * cursor over multiple characters when multiple characters combine
+ * to form a single grapheme.
+ * @param strong Whether the moving cursor is the strong cursor or the
+ * weak cursor. The strong cursor is the cursor corresponding
+ * to text insertion in the base direction for the layout.
+ * @param old_index The byte index of the grapheme for the old index.
+ * @param old_trailing If 0, the cursor was at the trailing edge of the
+ * grapheme indicated by @a old_index , if &gt; 0, the cursor
+ * was at the leading edge.
+ * @param direction Direction to move cursor. A negative
+ * value indicates motion to the left.
+ * @param new_index Location to store the new cursor byte index. A value of -1
+ * indicates that the cursor has been moved off the beginning
+ * of the layout. A value of G_MAXINT indicates that
+ * the cursor has been moved off the end of the layout.
+ * @param new_trailing Number of characters to move forward from the location returned
+ * for @a new_index to get the position where the cursor should
+ * be displayed. This allows distinguishing the position at
+ * the beginning of one line from the position at the end
+ * of the preceding line. @a new_index is always on the line
+ * where the cursor should be displayed.
+ */
+ void move_cursor_visually(bool strong,
+ int old_index, int old_trailing, int direction,
+ int& new_index, int& new_trailing) const;
+
+
+ /** Converts from X and Y position within a layout to the byte
+ * index to the character at that logical position. If the
+ * Y position is not inside the layout, the closest position is chosen
+ * (the position will be clamped inside the layout). If the
+ * X position is not within the layout, then the start or the
+ * end of the line is chosen as described for pango_layout_x_to_index().
+ * If either the X or Y positions were not inside the layout, then the
+ * function returns <tt>false</tt>; on an exact hit, it returns <tt>true</tt>.
+ * @param x The X offset (in Pango::GlyphUnit)
+ * from the left edge of the layout.
+ * @param y The Y offset (in Pango::GlyphUnit)
+ * from the top edge of the layout.
+ * @param index Location to store calculated byte index.
+ * @param trailing Location to store a integer indicating where
+ * in the grapheme the user clicked. It will either
+ * be zero, or the number of characters in the
+ * grapheme. 0 represents the trailing edge of the grapheme.
+ * @return <tt>true</tt> if the coordinates were inside text.
+ */
+ bool xy_to_index(int x, int y, int& index, int& trailing) const;
+
+
+ /** Compute the logical and ink extents of @a layout . Logical extents
+ * are usually what you want for positioning things. The extents
+ * are given in layout coordinates; layout coordinates begin at the
+ * top left corner of the layout.
+ * @param ink_rect Rectangle used to store the extents of the layout as drawn.
+ * @param logical_rect Rectangle used to store the logical extents of the layout.
+ */
+ void get_extents(Rectangle& ink_rect, Rectangle& logical_rect) const;
+
+ /** Compute the ink extents of layout.
+ * @return The extents of the layout as drawn.
+ */
+ Rectangle get_ink_extents() const;
+
+ /** Compute the logical extents of layout.
+ * @return The logical extents of the layout.
+ */
+ Rectangle get_logical_extents() const;
+
+
+ /** Compute the logical and ink extents of @a layout in device units.
+ * See pango_layout_get_extents(); this function just calls
+ * pango_layout_get_extents() and then converts the extents to
+ * pixels using the Pango::SCALE factor.
+ * @param ink_rect Rectangle used to store the extents of the layout as drawn.
+ * @param logical_rect Rectangle used to store the logical extents of the
+ * layout.
+ */
+ void get_pixel_extents(Rectangle& ink_rect, Rectangle& logical_rect) const;
+
+ /** Compute the ink extents of the layout in device units.
+ * @return The extents of the layout as drawn.
+ */
+ Rectangle get_pixel_ink_extents() const;
+
+ /** Compute the logical extents of the layout in device units.
+ * @return The logical extents of the layout.
+ */
+ Rectangle get_pixel_logical_extents() const;
+
+
+ /** Determines the logical width and height of a Pango::Layout
+ * in Pango units. (device units divided by Pango::SCALE). This
+ * is simply a convenience function around pango_layout_get_extents().
+ * @param width Location to store the logical width, or <tt>0</tt>.
+ * @param height Location to store the logical height, or <tt>0</tt>.
+ */
+ void get_size(int& width, int& height) const;
+
+ /** Determines the logical width and height of a Pango::Layout
+ * in device units. (pango_layout_get_size() returns the width
+ * and height in thousandths of a device unit.) This
+ * is simply a convenience function around pango_layout_get_extents().
+ * @param width Location to store the logical width, or <tt>0</tt>.
+ * @param height Location to store the logical height, or <tt>0</tt>.
+ */
+ void get_pixel_size(int& width, int& height) const;
+
+
+ /** Retrieves the count of lines for the @a layout .
+ * @return The line count.
+ */
+ int get_line_count() const;
+
+
+ /** Retrieves a particular line from a Pango::Layout.
+ * @param line The index of a line, which must be between 0 and
+ * <tt>pango_layout_get_line_count(layout) - 1</tt>, inclusive.
+ * @return The requested Pango::LayoutLine, or <tt>0</tt> if the
+ * index is out of range. This layout line can
+ * be ref'ed and retained, but will become invalid
+ * if changes are made to the Pango::Layout.
+ */
+ Glib::RefPtr<LayoutLine> get_line(int line);
+
+ /** Retrieves a particular line from a Pango::Layout.
+ * @param line The index of a line, which must be between 0 and
+ * <tt>pango_layout_get_line_count(layout) - 1</tt>, inclusive.
+ * @return The requested Pango::LayoutLine, or <tt>0</tt> if the
+ * index is out of range. This layout line can
+ * be ref'ed and retained, but will become invalid
+ * if changes are made to the Pango::Layout.
+ */
+ Glib::RefPtr<const LayoutLine> get_line(int line) const;
+
+
+ /** Returns the lines of the @a layout as a list.
+ * @return A G::SList containing the lines in the layout. This
+ * points to internal data of the Pango::Layout and must be used with
+ * care. It will become invalid on any change to the layout's
+ * text or properties.
+ */
+ SListHandle_LayoutLine get_lines();
+
+ /** Returns the lines of the @a layout as a list.
+ * @return A G::SList containing the lines in the layout. This
+ * points to internal data of the Pango::Layout and must be used with
+ * care. It will become invalid on any change to the layout's
+ * text or properties.
+ */
+ SListHandle_ConstLayoutLine get_lines() const;
+
+ /** Gets an iterator to iterate over the visual extents of the layout.
+ * @param iter Location to store the iterator.
+ */
+ void get_iter(LayoutIter& iter);
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+};
+
+} /* namespace Pango */
+
+
+namespace Glib
+{
+ /** @relates Pango::Layout
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Pango::Layout> wrap(PangoLayout* object, bool take_copy = false);
+}
+
+
+#endif /* _PANGOMM_LAYOUT_H */
+
diff --git a/libs/gtkmm2/pango/pangomm/layoutiter.cc b/libs/gtkmm2/pango/pangomm/layoutiter.cc
new file mode 100644
index 0000000000..4ba4620c3e
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/layoutiter.cc
@@ -0,0 +1,206 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <pangomm/layoutiter.h>
+#include <pangomm/private/layoutiter_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 2001-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+namespace Pango
+{
+
+LayoutIter::LayoutIter()
+:
+ gobject_ (0)
+{}
+
+LayoutIter::~LayoutIter()
+{
+ if(gobject_)
+ pango_layout_iter_free(gobject_);
+}
+
+void LayoutIter::assign_gobj(PangoLayoutIter* src)
+{
+ if(src != gobject_)
+ {
+ if(gobject_)
+ pango_layout_iter_free(gobject_);
+
+ gobject_ = src;
+ }
+}
+
+Rectangle LayoutIter::get_char_extents() const
+{
+ Rectangle logical_rect;
+ pango_layout_iter_get_char_extents(const_cast<PangoLayoutIter*>(gobj()), logical_rect.gobj());
+ return logical_rect;
+}
+
+Rectangle LayoutIter::get_cluster_ink_extents() const
+{
+ Rectangle ink_rect;
+ pango_layout_iter_get_cluster_extents(const_cast<PangoLayoutIter*>(gobj()), ink_rect.gobj(), 0);
+ return ink_rect;
+}
+
+Rectangle LayoutIter::get_cluster_logical_extents() const
+{
+ Rectangle logical_rect;
+ pango_layout_iter_get_cluster_extents(const_cast<PangoLayoutIter*>(gobj()), 0, logical_rect.gobj());
+ return logical_rect;
+}
+
+Rectangle LayoutIter::get_run_ink_extents() const
+{
+ Rectangle ink_rect;
+ pango_layout_iter_get_run_extents(const_cast<PangoLayoutIter*>(gobj()), ink_rect.gobj(), 0);
+ return ink_rect;
+}
+
+Rectangle LayoutIter::get_run_logical_extents() const
+{
+ Rectangle logical_rect;
+ pango_layout_iter_get_run_extents(const_cast<PangoLayoutIter*>(gobj()), 0, logical_rect.gobj());
+ return logical_rect;
+}
+
+Rectangle LayoutIter::get_line_ink_extents() const
+{
+ Rectangle ink_rect;
+ pango_layout_iter_get_line_extents(const_cast<PangoLayoutIter*>(gobj()), ink_rect.gobj(), 0);
+ return ink_rect;
+}
+
+Rectangle LayoutIter::get_line_logical_extents() const
+{
+ Rectangle logical_rect;
+ pango_layout_iter_get_line_extents(const_cast<PangoLayoutIter*>(gobj()), 0, logical_rect.gobj());
+ return logical_rect;
+}
+
+Rectangle LayoutIter::get_layout_ink_extents() const
+{
+ Rectangle ink_rect;
+ pango_layout_iter_get_layout_extents(const_cast<PangoLayoutIter*>(gobj()), ink_rect.gobj(), 0);
+ return ink_rect;
+}
+
+Rectangle LayoutIter::get_layout_logical_extents() const
+{
+ Rectangle logical_rect;
+ pango_layout_iter_get_layout_extents(const_cast<PangoLayoutIter*>(gobj()), 0, logical_rect.gobj());
+ return logical_rect;
+}
+
+} // namespace Pango
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Pango
+{
+
+
+int LayoutIter::get_index() const
+{
+ return pango_layout_iter_get_index(const_cast<PangoLayoutIter*>(gobj()));
+}
+
+LayoutRun LayoutIter::get_run() const
+{
+ return Glib::wrap(pango_layout_iter_get_run(const_cast<PangoLayoutIter*>(gobj())));
+}
+
+Glib::RefPtr<LayoutLine> LayoutIter::get_line() const
+{
+
+ Glib::RefPtr<LayoutLine> retvalue = Glib::wrap(pango_layout_iter_get_line(const_cast<PangoLayoutIter*>(gobj())));
+
+ if(retvalue)
+ retvalue->reference(); //The function does not do a ref for us.
+ return retvalue;
+}
+
+bool LayoutIter::at_last_line() const
+{
+ return pango_layout_iter_at_last_line(const_cast<PangoLayoutIter*>(gobj()));
+}
+
+bool LayoutIter::next_char()
+{
+ return pango_layout_iter_next_char(gobj());
+}
+
+bool LayoutIter::next_cluster()
+{
+ return pango_layout_iter_next_cluster(gobj());
+}
+
+bool LayoutIter::next_run()
+{
+ return pango_layout_iter_next_run(gobj());
+}
+
+bool LayoutIter::next_line()
+{
+ return pango_layout_iter_next_line(gobj());
+}
+
+void LayoutIter::get_cluster_extents(Rectangle& ink_rect, Rectangle& logical_rect) const
+{
+ pango_layout_iter_get_cluster_extents(const_cast<PangoLayoutIter*>(gobj()), (ink_rect).gobj(), (logical_rect).gobj());
+}
+
+void LayoutIter::get_run_extents(Rectangle& ink_rect, Rectangle& logical_rect) const
+{
+ pango_layout_iter_get_run_extents(const_cast<PangoLayoutIter*>(gobj()), (ink_rect).gobj(), (logical_rect).gobj());
+}
+
+void LayoutIter::get_line_extents(Rectangle& ink_rect, Rectangle& logical_rect) const
+{
+ pango_layout_iter_get_line_extents(const_cast<PangoLayoutIter*>(gobj()), (ink_rect).gobj(), (logical_rect).gobj());
+}
+
+void LayoutIter::get_line_yrange(int& y0, int& y1) const
+{
+ pango_layout_iter_get_line_yrange(const_cast<PangoLayoutIter*>(gobj()), &y0, &y1);
+}
+
+void LayoutIter::get_layout_extents(Rectangle& ink_rect, Rectangle& logical_rect) const
+{
+ pango_layout_iter_get_layout_extents(const_cast<PangoLayoutIter*>(gobj()), (ink_rect).gobj(), (logical_rect).gobj());
+}
+
+int LayoutIter::get_baseline() const
+{
+ return pango_layout_iter_get_baseline(const_cast<PangoLayoutIter*>(gobj()));
+}
+
+
+} // namespace Pango
+
+
diff --git a/libs/gtkmm2/pango/pangomm/layoutiter.h b/libs/gtkmm2/pango/pangomm/layoutiter.h
new file mode 100644
index 0000000000..ccb24ded81
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/layoutiter.h
@@ -0,0 +1,235 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _PANGOMM_LAYOUTITER_H
+#define _PANGOMM_LAYOUTITER_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* layoutiter.h
+ *
+ * Copyright 2001-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <pangomm/layoutline.h>
+#include <pangomm/layoutrun.h>
+#include <pango/pango-layout.h>
+
+
+namespace Pango
+{
+
+/** A Pango::LayoutIter can be used to iterate over the visual extents of a Pango::Layout.
+ */
+class LayoutIter
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef LayoutIter CppObjectType;
+ typedef PangoLayoutIter BaseObjectType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+private:
+
+
+public:
+ // There's no other ctor, and the default ctor creates an invalid object.
+ // Therefore, Pango::LayoutIter is usable only as output argument.
+ LayoutIter();
+ ~LayoutIter();
+
+
+ /** Gets the current byte index. Note that iterating forward by char
+ * moves in visual order, not logical order, so indexes may not be
+ * sequential. Also, the index may be equal to the length of the text
+ * in the layout, if on the <tt>0</tt> run (see pango_layout_iter_get_run()).
+ * @return Current byte index.
+ */
+ int get_index() const;
+
+ /** Gets the current run. When iterating by run, at the end of each
+ * line, there's a position with a <tt>0</tt> run, so this function can return
+ * <tt>0</tt>. The <tt>0</tt> run at the end of each line ensures that all lines have
+ * at least one run, even lines consisting of only a newline.
+ * @return The current run.
+ */
+ LayoutRun get_run() const;
+
+ /** Gets the current line.
+ * @return The current line.
+ */
+ Glib::RefPtr<LayoutLine> get_line() const;
+
+ /** Determines whether @a iter is on the last line of the layout.
+ * @return <tt>true</tt> if @a iter is on the last line.
+ */
+ bool at_last_line() const;
+
+
+ /** Moves @a iter forward to the next character in visual order. If @a iter was already at
+ * the end of the layout, returns <tt>false</tt>.
+ * @return Whether motion was possible.
+ */
+ bool next_char();
+
+ /** Moves @a iter forward to the next cluster in visual order. If @a iter
+ * was already at the end of the layout, returns <tt>false</tt>.
+ * @return Whether motion was possible.
+ */
+ bool next_cluster();
+
+ /** Moves @a iter forward to the next run in visual order. If @a iter was
+ * already at the end of the layout, returns <tt>false</tt>.
+ * @return Whether motion was possible.
+ */
+ bool next_run();
+
+ /** Moves @a iter forward to the start of the next line. If @a iter is
+ * already on the last line, returns <tt>false</tt>.
+ * @return Whether motion was possible.
+ */
+ bool next_line();
+
+ /** Gets the extents of the current character, in layout coordinates (origin is the top left of the entire layout).
+ * Only logical extents can sensibly be obtained for characters; ink extents make sense only down to the level of clusters.
+ * @return The logical extents of the current character.
+ */
+ Rectangle get_char_extents() const;
+
+
+ /** Gets the extents of the current cluster, in layout coordinates
+ * (origin is the top left of the entire layout).
+ * @param ink_rect Rectangle to fill with ink extents.
+ * @param logical_rect Rectangle to fill with logical extents.
+ */
+ void get_cluster_extents(Rectangle& ink_rect, Rectangle& logical_rect) const;
+
+ /** Gets the ink extents of the current cluster, in layout coordinates (origin is the top left of the entire layout).
+ * @return The extents of the current cluster as drawn.
+ */
+ Rectangle get_cluster_ink_extents() const;
+
+ /** Gets the logical extents of the current cluster, in layout coordinates (origin is the top left of the entire layout).
+ * @return The logical extents of the current cluster.
+ */
+ Rectangle get_cluster_logical_extents() const;
+
+
+ /** Gets the extents of the current run in layout coordinates
+ * (origin is the top left of the entire layout).
+ * @param ink_rect Rectangle to fill with ink extents.
+ * @param logical_rect Rectangle to fill with logical extents.
+ */
+ void get_run_extents(Rectangle& ink_rect, Rectangle& logical_rect) const;
+
+ /** Gets the ink extents of the current run in layout coordinates (origin is the top left of the entire layout).
+ * @return The extents of the current run as drawn.
+ */
+ Rectangle get_run_ink_extents() const;
+
+ /** Gets the logical extents of the current run in layout coordinates (origin is the top left of the entire layout).
+ * @return The logical extents of the current run.
+ */
+ Rectangle get_run_logical_extents() const;
+
+
+ /** Obtains the extents of the current line. @a ink_rect or @a logical_rect
+ * can be <tt>0</tt> if you aren't interested in them. Extents are in layout
+ * coordinates (origin is the top-left corner of the entire
+ * Pango::Layout). Thus the extents returned by this function will be
+ * the same width/height but not at the same x/y as the extents
+ * returned from pango_layout_line_get_extents().
+ * @param ink_rect Rectangle to fill with ink extents.
+ * @param logical_rect Rectangle to fill with logical extents.
+ */
+ void get_line_extents(Rectangle& ink_rect, Rectangle& logical_rect) const;
+
+ /** Obtains the ink extents of the current line.
+ * @return The extents of the current line as drawn.
+ */
+ Rectangle get_line_ink_extents() const;
+
+ /** Obtains the logical extents of the current line.
+ * @return The logical extents of the current line.
+ */
+ Rectangle get_line_logical_extents() const;
+
+
+ /** Divides the vertical space in the Pango::Layout being iterated over
+ * between the lines in the layout, and returns the space belonging to
+ * the current line. A line's range includes the line's logical
+ * extents, plus half of the spacing above and below the line, if
+ * pango_layout_set_spacing() has been called to set layout spacing.
+ * The y positions are in layout coordinates (origin at top left of the
+ * entire layout).
+ * @param y0 Start of line.
+ * @param y1 End of line.
+ */
+ void get_line_yrange(int& y0, int& y1) const;
+
+
+ /** Obtains the extents of the Pango::Layout being iterated
+ * over. @a ink_rect or @a logical_rect can be <tt>0</tt> if you
+ * aren't interested in them.
+ * @param ink_rect Rectangle to fill with ink extents.
+ * @param logical_rect Rectangle to fill with logical extents.
+ */
+ void get_layout_extents(Rectangle& ink_rect, Rectangle& logical_rect) const;
+
+ /** Obtains the ink extents of the Pango::Layout being iterated over.
+ * @return The extents of the layout as drawn.
+ */
+ Rectangle get_layout_ink_extents() const;
+
+ /** Obtains the logical extents of the Pango::Layout being iterated over.
+ * @return The logical extents of the layout.
+ */
+ Rectangle get_layout_logical_extents() const;
+
+
+ /** Gets the y position of the current line's baseline, in layout
+ * coordinates (origin at top left of the entire layout).
+ * @return Baseline of current line.
+ */
+ int get_baseline() const;
+
+ /// Provides access to the underlying C GObject.
+ PangoLayoutIter* gobj() { return gobject_; }
+ /// Provides access to the underlying C GObject.
+ const PangoLayoutIter* gobj() const { return gobject_; }
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ void assign_gobj(PangoLayoutIter* src);
+#endif
+
+protected:
+ PangoLayoutIter* gobject_;
+
+private:
+ // noncopyable
+ LayoutIter(const LayoutIter&);
+ LayoutIter& operator=(const LayoutIter&);
+
+
+};
+
+} //namespace Pango
+
+
+#endif /* _PANGOMM_LAYOUTITER_H */
+
diff --git a/libs/gtkmm2/pango/pangomm/layoutline.cc b/libs/gtkmm2/pango/pangomm/layoutline.cc
new file mode 100644
index 0000000000..f3ff372461
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/layoutline.cc
@@ -0,0 +1,197 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <pangomm/layoutline.h>
+#include <pangomm/private/layoutline_p.h>
+
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 1998-2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <pangomm/layout.h>
+
+namespace Pango {
+
+Rectangle LayoutLine::get_ink_extents() const
+{
+ Rectangle ink_rect;
+ pango_layout_line_get_extents(const_cast<PangoLayoutLine*>(gobj()), ink_rect.gobj(), 0);
+ return ink_rect;
+}
+
+Rectangle LayoutLine::get_logical_extents() const
+{
+ Rectangle logical_rect;
+ pango_layout_line_get_extents(const_cast<PangoLayoutLine*>(gobj()), 0, logical_rect.gobj());
+ return logical_rect;
+}
+
+Rectangle LayoutLine::get_pixel_ink_extents() const
+{
+ Rectangle ink_rect;
+ pango_layout_line_get_pixel_extents(const_cast<PangoLayoutLine*>(gobj()), ink_rect.gobj(), 0);
+ return ink_rect;
+}
+
+Rectangle LayoutLine::get_pixel_logical_extents() const
+{
+ Rectangle logical_rect;
+ pango_layout_line_get_pixel_extents(const_cast<PangoLayoutLine*>(gobj()), 0, logical_rect.gobj());
+ return logical_rect;
+}
+
+int LayoutLine::index_to_x(int index, bool trailing) const
+{
+ int x_pos;
+ pango_layout_line_index_to_x(const_cast<PangoLayoutLine*>(gobj()), index, trailing, &x_pos);
+ return x_pos;
+}
+
+Glib::ArrayHandle<std::pair<int,int> > LayoutLine::get_x_ranges(int start_index, int end_index) const
+{
+ int* ranges = 0;
+ int n_ranges = 0;
+ pango_layout_line_get_x_ranges(const_cast<PangoLayoutLine*>(gobj()), start_index, end_index, &ranges, &n_ranges);
+ return Glib::ArrayHandle<std::pair<int,int> >(reinterpret_cast<std::pair<int,int>*>(ranges), n_ranges, Glib::OWNERSHIP_SHALLOW);
+}
+
+} /* namespace Pango */
+
+
+namespace
+{
+} // anonymous namespace
+
+
+/* Why reinterpret_cast<LayoutLine*>(gobject) is needed:
+ *
+ * A LayoutLine instance is in fact always a PangoLayoutLine instance.
+ * Unfortunately, PangoLayoutLine cannot be a member of LayoutLine,
+ * because it is an opaque struct. Also, the C interface does not provide
+ * any hooks to install a destroy notification handler, thus we cannot
+ * wrap it dynamically either.
+ *
+ * The cast works because LayoutLine does not have any member data, and
+ * it is impossible to derive from it. This is ensured by not implementing
+ * the (protected) default constructor. The ctor is protected rather than
+ * private just to avoid a compile warning.
+ */
+
+namespace Glib
+{
+
+Glib::RefPtr<Pango::LayoutLine> wrap(PangoLayoutLine* object, bool take_copy)
+{
+ if(take_copy && object)
+ pango_layout_line_ref(object);
+
+ // See the comment at the top of this file, if you want to know why the cast works.
+ return Glib::RefPtr<Pango::LayoutLine>(reinterpret_cast<Pango::LayoutLine*>(object));
+}
+
+} // namespace Glib
+
+
+namespace Pango
+{
+
+
+void LayoutLine::reference() const
+{
+ // See the comment at the top of this file, if you want to know why the cast works.
+ pango_layout_line_ref(reinterpret_cast<PangoLayoutLine*>(const_cast<LayoutLine*>(this)));
+}
+
+void LayoutLine::unreference() const
+{
+ // See the comment at the top of this file, if you want to know why the cast works.
+ pango_layout_line_unref(reinterpret_cast<PangoLayoutLine*>(const_cast<LayoutLine*>(this)));
+}
+
+PangoLayoutLine* LayoutLine::gobj()
+{
+ // See the comment at the top of this file, if you want to know why the cast works.
+ return reinterpret_cast<PangoLayoutLine*>(this);
+}
+
+const PangoLayoutLine* LayoutLine::gobj() const
+{
+ // See the comment at the top of this file, if you want to know why the cast works.
+ return reinterpret_cast<const PangoLayoutLine*>(this);
+}
+
+PangoLayoutLine* LayoutLine::gobj_copy() const
+{
+ // See the comment at the top of this file, if you want to know why the cast works.
+ PangoLayoutLine *const gobject = reinterpret_cast<PangoLayoutLine*>(const_cast<LayoutLine*>(this));
+ pango_layout_line_ref(gobject);
+ return gobject;
+}
+
+
+bool LayoutLine::x_to_index(int x_pos, int& index, int& trailing) const
+{
+ return pango_layout_line_x_to_index(const_cast<PangoLayoutLine*>(gobj()), x_pos, &index, &trailing);
+}
+
+void LayoutLine::get_extents(Rectangle& ink_rect, Rectangle& logical_rect) const
+{
+ pango_layout_line_get_extents(const_cast<PangoLayoutLine*>(gobj()), (ink_rect).gobj(), (logical_rect).gobj());
+}
+
+void LayoutLine::get_pixel_extents(Rectangle& ink_rect, Rectangle& logical_rect) const
+{
+ pango_layout_line_get_pixel_extents(const_cast<PangoLayoutLine*>(gobj()), (ink_rect).gobj(), (logical_rect).gobj());
+}
+
+Glib::RefPtr<Pango::Layout> LayoutLine::get_layout()
+{
+ Glib::RefPtr<Pango::Layout> ref_ptr(Glib::wrap(gobj()->layout));
+
+ if(ref_ptr)
+ ref_ptr->reference();
+
+ return ref_ptr;
+}
+
+Glib::RefPtr<const Pango::Layout> LayoutLine::get_layout() const
+{
+ Glib::RefPtr<const Pango::Layout> ref_ptr(Glib::wrap(gobj()->layout));
+
+ if(ref_ptr)
+ ref_ptr->reference();
+
+ return ref_ptr;
+}
+
+int LayoutLine::get_length() const
+{
+ return gobj()->length;
+}
+
+int LayoutLine::get_start_index() const
+{
+ return gobj()->start_index;
+}
+
+
+} // namespace Pango
+
+
diff --git a/libs/gtkmm2/pango/pangomm/layoutline.h b/libs/gtkmm2/pango/pangomm/layoutline.h
new file mode 100644
index 0000000000..594d5cc7a3
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/layoutline.h
@@ -0,0 +1,222 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _PANGOMM_LAYOUTLINE_H
+#define _PANGOMM_LAYOUTLINE_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* layoutline.h
+ *
+ * Copyright (C) 1998-1999 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/slisthandle.h> // For the Glib::SListHandle typedef
+#include <pangomm/rectangle.h>
+#include <pango/pango-layout.h>
+
+
+namespace Pango
+{
+
+class Layout;
+
+/** A Pango::LayoutLine represents one of the lines resulting from laying out a paragraph via Pango::Layout.
+ * Pango::LayoutLine objects are obtained by calling Pango::Layout::get_line()
+ * and are only valid until the text, attributes, or settings of the parent Pango::Layout are modified.
+ * Routines for rendering Pango::Layout objects are provided in code specific to each rendering system.
+ */
+class LayoutLine
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef LayoutLine CppObjectType;
+ typedef PangoLayoutLine BaseObjectType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+ // For use with Glib::RefPtr<> only.
+ void reference() const;
+ void unreference() const;
+
+ ///Provides access to the underlying C instance.
+ PangoLayoutLine* gobj();
+
+ ///Provides access to the underlying C instance.
+ const PangoLayoutLine* gobj() const;
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ PangoLayoutLine* gobj_copy() const;
+
+protected:
+ // Do not derive this. Pango::LayoutLine can neither be constructed nor deleted.
+ LayoutLine();
+ void operator delete(void*, size_t);
+
+private:
+ // noncopyable
+ LayoutLine(const LayoutLine&);
+ LayoutLine& operator=(const LayoutLine&);
+
+
+public:
+
+
+ /** Converts from x offset to the byte index of the corresponding
+ * character within the text of the layout. If @a x_pos is outside the line,
+ * @a index and @a trailing will point to the very first or very last position
+ * in the line. This determination is based on the resolved direction
+ * of the paragraph; for example, if the resolved direction is
+ * right-to-left, then an X position to the right of the line (after it)
+ * results in 0 being stored in @a index and @a trailing . An X position to the
+ * left of the line results in @a index pointing to the (logical) last
+ * grapheme in the line and @a trailing being set to the number of characters
+ * in that grapheme. The reverse is true for a left-to-right line.
+ * @param x_pos The x offset (in Pango::GlyphUnit)
+ * from the left edge of the line.
+ * @param index Location to store calculated byte index for
+ * the grapheme in which the user clicked.
+ * @param trailing Location to store a integer indicating where
+ * in the grapheme the user clicked. It will either
+ * be zero, or the number of characters in the
+ * grapheme. 0 represents the trailing edge of the grapheme.
+ * @return <tt>false</tt> if @a x_pos was outside the line, <tt>true</tt> if inside.
+ */
+ bool x_to_index(int x_pos, int& index, int& trailing) const;
+
+ /** Converts an index within a line to a @a x position.
+ * @param index Byte offset of a grapheme within the layout.
+ * @param trailing A boolean indicating the edge of the grapheme to retrieve the position of. If <tt>false</tt>, the trailing edge of the grapheme, if <tt>true</tt> the leading of the grapheme.
+ * @return The x offset (in thousands of a device unit).
+ */
+ int index_to_x(int index, bool trailing) const;
+
+
+ /** Get a list of visual ranges corresponding to a given logical range.
+ * This list is not necessarily minimal - there may be consecutive ranges which are adjacent.
+ * The ranges will be sorted from left to right. The ranges are with respect to the
+ * left edge of the entire layout, not with respect to the line.
+ * @param start_index The start byte index of the logical range.
+ * If the value of @a start_index is less than the start index for the line,
+ * then the first range will extend all the way to the leading edge of the layout.
+ * Otherwise it will start at the leading edge of the first character.
+ * @param end_index The end byte index of the logical range.
+ * If the value of @a end_index is greater than the end index for the line,
+ * then the last range will extend all the way to the trailing edge of the layout.
+ * Otherwise, it will end at the trailing edge of the last character.
+ * @return An array of ranges represented by pairs of integers marking the start and end pixel coordinates of the ranges.
+ */
+ Glib::ArrayHandle<std::pair<int,int> > get_x_ranges(int start_index, int end_index) const;
+
+
+ /** Compute the logical and ink extents of a layout line. See the documentation
+ * for Pango::Font::get_glyph_extents() for details about the interpretation
+ * of the rectangles.
+ * @param ink_rect Rectangle used to store the extents of the glyph string as drawn.
+ * @param logical_rect Rectangle used to store the logical extents of the glyph string.
+ */
+ void get_extents(Rectangle& ink_rect, Rectangle& logical_rect) const;
+
+ /** Compute the ink extents of a layout line.
+ * @return The extents of the layout line as drawn.
+ */
+ Rectangle get_ink_extents() const;
+
+ /** Compute the logical extents of a layout line.
+ * @return The logical extents of the layout line.
+ */
+ Rectangle get_logical_extents() const;
+
+
+ /** Compute the logical and ink extents of a layout line. See the documentation
+ * for Pango::Font::get_glyph_extents() for details about the interpretation
+ * of the rectangles. The returned rectangles are in device units, as
+ * opposed to pango_layout_line_get_extents(), which returns the extents in
+ * units of device unit / PANGO_SCALE.
+ * @param ink_rect Rectangle used to store the extents of the glyph string as drawn.
+ * @param logical_rect Rectangle used to store the logical extents of the glyph string.
+ */
+ void get_pixel_extents(Rectangle& ink_rect, Rectangle& logical_rect) const;
+
+ /** Compute the ink extents of a layout line in device units.
+ * @return The extents of the layout line as drawn.
+ */
+ Rectangle get_pixel_ink_extents() const;
+
+ /** Compute the logical extents of a layout line in device units.
+ * @return The logical extents of the layout line.
+ */
+ Rectangle get_pixel_logical_extents() const;
+
+ Glib::RefPtr<Pango::Layout> get_layout();
+ Glib::RefPtr<const Pango::Layout> get_layout() const;
+ //_MEMBER_SET_GOBJECT(layout, layout, Pango::Layout, PangoLayout*)
+ int get_length() const;
+ int get_start_index() const;
+
+
+};
+
+} // namespace Pango
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+// forward declaration needed by LayoutLineTraits
+Glib::RefPtr<Pango::LayoutLine> wrap(PangoLayoutLine* object, bool take_copy /* = false */);
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Pango
+{
+
+struct LayoutLineTraits
+{
+ typedef Glib::RefPtr<LayoutLine> CppType;
+ typedef PangoLayoutLine * CType;
+ typedef PangoLayoutLine * CTypeNonConst;
+
+ static CType to_c_type (const CppType& ptr) { return Glib::unwrap(ptr); }
+ static CType to_c_type (CType ptr) { return ptr; }
+ static CppType to_cpp_type (CType ptr) { return Glib::wrap(ptr, true); }
+ static void release_c_type (CType ptr) { pango_layout_line_unref(ptr); }
+};
+
+typedef Glib::SListHandle< Glib::RefPtr<LayoutLine>, LayoutLineTraits > SListHandle_LayoutLine;
+typedef Glib::SListHandle< Glib::RefPtr<const LayoutLine>, LayoutLineTraits > SListHandle_ConstLayoutLine;
+
+} // namespace Pango
+
+
+namespace Glib
+{
+
+ /** @relates Pango::LayoutLine
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Pango::LayoutLine> wrap(PangoLayoutLine* object, bool take_copy = false);
+
+} // namespace Glib
+
+#endif /* _PANGOMM_LAYOUTLINE_H */
+
diff --git a/libs/gtkmm2/pango/pangomm/layoutrun.cc b/libs/gtkmm2/pango/pangomm/layoutrun.cc
new file mode 100644
index 0000000000..6d797fc02c
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/layoutrun.cc
@@ -0,0 +1,79 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <pangomm/layoutrun.h>
+#include <pangomm/private/layoutrun_p.h>
+
+/*
+ * Copyright 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <pangomm/item.h>
+#include <pangomm/glyphstring.h>
+
+namespace Pango
+{
+
+LayoutRun::LayoutRun()
+{}
+
+LayoutRun::LayoutRun(const PangoLayoutRun* src)
+{
+ gobject_ = *src;
+}
+
+} /* namespace Pango */
+
+
+namespace Glib
+{
+
+Pango::LayoutRun& wrap(PangoLayoutRun* object)
+{
+ return *reinterpret_cast<Pango::LayoutRun*>(object);
+}
+
+const Pango::LayoutRun& wrap(const PangoLayoutRun* object)
+{
+ return *reinterpret_cast<const Pango::LayoutRun*>(object);
+}
+
+} /* namespace Glib */
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Pango
+{
+
+
+Item LayoutRun::get_item() const
+{
+ return Item((gobj()->item));
+}
+
+GlyphString LayoutRun::get_glyphs() const
+{
+ return GlyphString((gobj()->glyphs));
+}
+
+
+} // namespace Pango
+
+
diff --git a/libs/gtkmm2/pango/pangomm/layoutrun.h b/libs/gtkmm2/pango/pangomm/layoutrun.h
new file mode 100644
index 0000000000..8a150646fa
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/layoutrun.h
@@ -0,0 +1,92 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _PANGOMM_LAYOUTRUN_H
+#define _PANGOMM_LAYOUTRUN_H
+
+#include <glibmm.h>
+
+/* layoutrun.h
+ *
+ * Copyright (C) 1998-1999 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <pango/pango-layout.h>
+
+
+namespace Pango
+{
+
+class Item;
+class GlyphString;
+
+/** A Pango::LayoutRun represents a single run within a PangoLayoutLine.
+ */
+class LayoutRun
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef LayoutRun CppObjectType;
+ typedef PangoLayoutRun BaseObjectType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+private:
+
+
+protected:
+ LayoutRun();
+
+public:
+ explicit LayoutRun(const PangoLayoutRun* src);
+
+ /** Gets the Pango::Item object that provides information about the segment of text in this run.
+ * @return A Pango::Item object.
+ */
+ Item get_item() const;
+
+ /** Gets the string of glyphs obtained by shaping the text for this item.
+ * @return A Pango::GlyphString object.
+ */
+ GlyphString get_glyphs() const;
+
+ /// Provides access to the underlying C GObject.
+ PangoLayoutRun* gobj() { return &gobject_; }
+ /// Provides access to the underlying C GObject.
+ const PangoLayoutRun* gobj() const { return &gobject_; }
+
+protected:
+ PangoLayoutRun gobject_;
+
+
+};
+
+} /* namespace Pango */
+
+
+namespace Glib
+{
+
+/** @relates Pango::LayoutRun */
+Pango::LayoutRun& wrap(PangoLayoutRun* object);
+
+/** @relates Pango::LayoutRun */
+const Pango::LayoutRun& wrap(const PangoLayoutRun* object);
+
+} /* namepspace Glib */
+
+
+#endif /* _PANGOMM_LAYOUTRUN_H */
+
diff --git a/libs/gtkmm2/pango/pangomm/private/attributes_p.h b/libs/gtkmm2/pango/pangomm/private/attributes_p.h
new file mode 100644
index 0000000000..a2c62c09a6
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/private/attributes_p.h
@@ -0,0 +1,6 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _PANGOMM_ATTRIBUTES_P_H
+#define _PANGOMM_ATTRIBUTES_P_H
+#endif /* _PANGOMM_ATTRIBUTES_P_H */
+
diff --git a/libs/gtkmm2/pango/pangomm/private/attriter_p.h b/libs/gtkmm2/pango/pangomm/private/attriter_p.h
new file mode 100644
index 0000000000..d8cc2fd346
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/private/attriter_p.h
@@ -0,0 +1,6 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _PANGOMM_ATTRITER_P_H
+#define _PANGOMM_ATTRITER_P_H
+#endif /* _PANGOMM_ATTRITER_P_H */
+
diff --git a/libs/gtkmm2/pango/pangomm/private/attrlist_p.h b/libs/gtkmm2/pango/pangomm/private/attrlist_p.h
new file mode 100644
index 0000000000..4c05d959d2
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/private/attrlist_p.h
@@ -0,0 +1,6 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _PANGOMM_ATTRLIST_P_H
+#define _PANGOMM_ATTRLIST_P_H
+#endif /* _PANGOMM_ATTRLIST_P_H */
+
diff --git a/libs/gtkmm2/pango/pangomm/private/color_p.h b/libs/gtkmm2/pango/pangomm/private/color_p.h
new file mode 100644
index 0000000000..945c38bedb
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/private/color_p.h
@@ -0,0 +1,6 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _PANGOMM_COLOR_P_H
+#define _PANGOMM_COLOR_P_H
+#endif /* _PANGOMM_COLOR_P_H */
+
diff --git a/libs/gtkmm2/pango/pangomm/private/context_p.h b/libs/gtkmm2/pango/pangomm/private/context_p.h
new file mode 100644
index 0000000000..a54c181ffd
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/private/context_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _PANGOMM_CONTEXT_P_H
+#define _PANGOMM_CONTEXT_P_H
+#include <glibmm/private/object_p.h>
+
+#include <glibmm/class.h>
+
+namespace Pango
+{
+
+class Context_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Context CppObjectType;
+ typedef PangoContext BaseObjectType;
+ typedef PangoContextClass BaseClassType;
+ typedef Glib::Object_Class CppClassParent;
+ typedef GObjectClass BaseClassParent;
+
+ friend class Context;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Pango
+
+#endif /* _PANGOMM_CONTEXT_P_H */
+
diff --git a/libs/gtkmm2/pango/pangomm/private/coverage_p.h b/libs/gtkmm2/pango/pangomm/private/coverage_p.h
new file mode 100644
index 0000000000..129cefb95d
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/private/coverage_p.h
@@ -0,0 +1,6 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _PANGOMM_COVERAGE_P_H
+#define _PANGOMM_COVERAGE_P_H
+#endif /* _PANGOMM_COVERAGE_P_H */
+
diff --git a/libs/gtkmm2/pango/pangomm/private/font_p.h b/libs/gtkmm2/pango/pangomm/private/font_p.h
new file mode 100644
index 0000000000..6ff30d4ddf
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/private/font_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _PANGOMM_FONT_P_H
+#define _PANGOMM_FONT_P_H
+#include <glibmm/private/object_p.h>
+
+#include <glibmm/class.h>
+
+namespace Pango
+{
+
+class Font_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Font CppObjectType;
+ typedef PangoFont BaseObjectType;
+ typedef PangoFontClass BaseClassType;
+ typedef Glib::Object_Class CppClassParent;
+ typedef GObjectClass BaseClassParent;
+
+ friend class Font;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Pango
+
+#endif /* _PANGOMM_FONT_P_H */
+
diff --git a/libs/gtkmm2/pango/pangomm/private/fontdescription_p.h b/libs/gtkmm2/pango/pangomm/private/fontdescription_p.h
new file mode 100644
index 0000000000..12ec7e662d
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/private/fontdescription_p.h
@@ -0,0 +1,6 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _PANGOMM_FONTDESCRIPTION_P_H
+#define _PANGOMM_FONTDESCRIPTION_P_H
+#endif /* _PANGOMM_FONTDESCRIPTION_P_H */
+
diff --git a/libs/gtkmm2/pango/pangomm/private/fontface_p.h b/libs/gtkmm2/pango/pangomm/private/fontface_p.h
new file mode 100644
index 0000000000..66bddd9298
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/private/fontface_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _PANGOMM_FONTFACE_P_H
+#define _PANGOMM_FONTFACE_P_H
+#include <glibmm/private/object_p.h>
+
+#include <glibmm/class.h>
+
+namespace Pango
+{
+
+class FontFace_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef FontFace CppObjectType;
+ typedef PangoFontFace BaseObjectType;
+ typedef PangoFontFaceClass BaseClassType;
+ typedef Glib::Object_Class CppClassParent;
+ typedef GObjectClass BaseClassParent;
+
+ friend class FontFace;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Pango
+
+#endif /* _PANGOMM_FONTFACE_P_H */
+
diff --git a/libs/gtkmm2/pango/pangomm/private/fontfamily_p.h b/libs/gtkmm2/pango/pangomm/private/fontfamily_p.h
new file mode 100644
index 0000000000..657f7b266a
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/private/fontfamily_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _PANGOMM_FONTFAMILY_P_H
+#define _PANGOMM_FONTFAMILY_P_H
+#include <glibmm/private/object_p.h>
+
+#include <glibmm/class.h>
+
+namespace Pango
+{
+
+class FontFamily_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef FontFamily CppObjectType;
+ typedef PangoFontFamily BaseObjectType;
+ typedef PangoFontFamilyClass BaseClassType;
+ typedef Glib::Object_Class CppClassParent;
+ typedef GObjectClass BaseClassParent;
+
+ friend class FontFamily;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Pango
+
+#endif /* _PANGOMM_FONTFAMILY_P_H */
+
diff --git a/libs/gtkmm2/pango/pangomm/private/fontmap_p.h b/libs/gtkmm2/pango/pangomm/private/fontmap_p.h
new file mode 100644
index 0000000000..88e898e016
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/private/fontmap_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _PANGOMM_FONTMAP_P_H
+#define _PANGOMM_FONTMAP_P_H
+#include <glibmm/private/object_p.h>
+
+#include <glibmm/class.h>
+
+namespace Pango
+{
+
+class FontMap_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef FontMap CppObjectType;
+ typedef PangoFontMap BaseObjectType;
+ typedef PangoFontMapClass BaseClassType;
+ typedef Glib::Object_Class CppClassParent;
+ typedef GObjectClass BaseClassParent;
+
+ friend class FontMap;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Pango
+
+#endif /* _PANGOMM_FONTMAP_P_H */
+
diff --git a/libs/gtkmm2/pango/pangomm/private/fontmetrics_p.h b/libs/gtkmm2/pango/pangomm/private/fontmetrics_p.h
new file mode 100644
index 0000000000..80670d0639
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/private/fontmetrics_p.h
@@ -0,0 +1,6 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _PANGOMM_FONTMETRICS_P_H
+#define _PANGOMM_FONTMETRICS_P_H
+#endif /* _PANGOMM_FONTMETRICS_P_H */
+
diff --git a/libs/gtkmm2/pango/pangomm/private/fontset_p.h b/libs/gtkmm2/pango/pangomm/private/fontset_p.h
new file mode 100644
index 0000000000..ed012a1cbb
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/private/fontset_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _PANGOMM_FONTSET_P_H
+#define _PANGOMM_FONTSET_P_H
+#include <glibmm/private/object_p.h>
+
+#include <glibmm/class.h>
+
+namespace Pango
+{
+
+class Fontset_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Fontset CppObjectType;
+ typedef PangoFontset BaseObjectType;
+ typedef PangoFontsetClass BaseClassType;
+ typedef Glib::Object_Class CppClassParent;
+ typedef GObjectClass BaseClassParent;
+
+ friend class Fontset;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Pango
+
+#endif /* _PANGOMM_FONTSET_P_H */
+
diff --git a/libs/gtkmm2/pango/pangomm/private/glyph_p.h b/libs/gtkmm2/pango/pangomm/private/glyph_p.h
new file mode 100644
index 0000000000..8c4b42f6c7
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/private/glyph_p.h
@@ -0,0 +1,6 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _PANGOMM_GLYPH_P_H
+#define _PANGOMM_GLYPH_P_H
+#endif /* _PANGOMM_GLYPH_P_H */
+
diff --git a/libs/gtkmm2/pango/pangomm/private/glyphstring_p.h b/libs/gtkmm2/pango/pangomm/private/glyphstring_p.h
new file mode 100644
index 0000000000..6d9535bcda
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/private/glyphstring_p.h
@@ -0,0 +1,6 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _PANGOMM_GLYPHSTRING_P_H
+#define _PANGOMM_GLYPHSTRING_P_H
+#endif /* _PANGOMM_GLYPHSTRING_P_H */
+
diff --git a/libs/gtkmm2/pango/pangomm/private/item_p.h b/libs/gtkmm2/pango/pangomm/private/item_p.h
new file mode 100644
index 0000000000..a2015d337d
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/private/item_p.h
@@ -0,0 +1,6 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _PANGOMM_ITEM_P_H
+#define _PANGOMM_ITEM_P_H
+#endif /* _PANGOMM_ITEM_P_H */
+
diff --git a/libs/gtkmm2/pango/pangomm/private/language_p.h b/libs/gtkmm2/pango/pangomm/private/language_p.h
new file mode 100644
index 0000000000..f9921544be
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/private/language_p.h
@@ -0,0 +1,6 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _PANGOMM_LANGUAGE_P_H
+#define _PANGOMM_LANGUAGE_P_H
+#endif /* _PANGOMM_LANGUAGE_P_H */
+
diff --git a/libs/gtkmm2/pango/pangomm/private/layout_p.h b/libs/gtkmm2/pango/pangomm/private/layout_p.h
new file mode 100644
index 0000000000..d87fb6de2f
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/private/layout_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _PANGOMM_LAYOUT_P_H
+#define _PANGOMM_LAYOUT_P_H
+#include <glibmm/private/object_p.h>
+
+#include <glibmm/class.h>
+
+namespace Pango
+{
+
+class Layout_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Layout CppObjectType;
+ typedef PangoLayout BaseObjectType;
+ typedef PangoLayoutClass BaseClassType;
+ typedef Glib::Object_Class CppClassParent;
+ typedef GObjectClass BaseClassParent;
+
+ friend class Layout;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Pango
+
+#endif /* _PANGOMM_LAYOUT_P_H */
+
diff --git a/libs/gtkmm2/pango/pangomm/private/layoutiter_p.h b/libs/gtkmm2/pango/pangomm/private/layoutiter_p.h
new file mode 100644
index 0000000000..e43c4334d2
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/private/layoutiter_p.h
@@ -0,0 +1,6 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _PANGOMM_LAYOUTITER_P_H
+#define _PANGOMM_LAYOUTITER_P_H
+#endif /* _PANGOMM_LAYOUTITER_P_H */
+
diff --git a/libs/gtkmm2/pango/pangomm/private/layoutline_p.h b/libs/gtkmm2/pango/pangomm/private/layoutline_p.h
new file mode 100644
index 0000000000..2bccde57d1
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/private/layoutline_p.h
@@ -0,0 +1,6 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _PANGOMM_LAYOUTLINE_P_H
+#define _PANGOMM_LAYOUTLINE_P_H
+#endif /* _PANGOMM_LAYOUTLINE_P_H */
+
diff --git a/libs/gtkmm2/pango/pangomm/private/layoutrun_p.h b/libs/gtkmm2/pango/pangomm/private/layoutrun_p.h
new file mode 100644
index 0000000000..3d9bb774f1
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/private/layoutrun_p.h
@@ -0,0 +1,6 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _PANGOMM_LAYOUTRUN_P_H
+#define _PANGOMM_LAYOUTRUN_P_H
+#endif /* _PANGOMM_LAYOUTRUN_P_H */
+
diff --git a/libs/gtkmm2/pango/pangomm/private/rectangle_p.h b/libs/gtkmm2/pango/pangomm/private/rectangle_p.h
new file mode 100644
index 0000000000..4b3e6f2481
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/private/rectangle_p.h
@@ -0,0 +1,6 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _PANGOMM_RECTANGLE_P_H
+#define _PANGOMM_RECTANGLE_P_H
+#endif /* _PANGOMM_RECTANGLE_P_H */
+
diff --git a/libs/gtkmm2/pango/pangomm/private/renderer_p.h b/libs/gtkmm2/pango/pangomm/private/renderer_p.h
new file mode 100644
index 0000000000..1c24c86970
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/private/renderer_p.h
@@ -0,0 +1,44 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _PANGOMM_RENDERER_P_H
+#define _PANGOMM_RENDERER_P_H
+#include <glibmm/private/object_p.h>
+
+#include <glibmm/class.h>
+
+namespace Pango
+{
+
+class Renderer_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Renderer CppObjectType;
+ typedef PangoRenderer BaseObjectType;
+ typedef PangoRendererClass BaseClassType;
+ typedef Glib::Object_Class CppClassParent;
+ typedef GObjectClass BaseClassParent;
+
+ friend class Renderer;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Pango
+
+#endif /* _PANGOMM_RENDERER_P_H */
+
diff --git a/libs/gtkmm2/pango/pangomm/private/tabarray_p.h b/libs/gtkmm2/pango/pangomm/private/tabarray_p.h
new file mode 100644
index 0000000000..d27ae8534a
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/private/tabarray_p.h
@@ -0,0 +1,6 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _PANGOMM_TABARRAY_P_H
+#define _PANGOMM_TABARRAY_P_H
+#endif /* _PANGOMM_TABARRAY_P_H */
+
diff --git a/libs/gtkmm2/pango/pangomm/rectangle.cc b/libs/gtkmm2/pango/pangomm/rectangle.cc
new file mode 100644
index 0000000000..4686d3a7d0
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/rectangle.cc
@@ -0,0 +1,84 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <pangomm/rectangle.h>
+#include <pangomm/private/rectangle_p.h>
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+namespace Pango
+{
+
+Rectangle::Rectangle()
+{
+ gobject_.x = gobject_.y = 0;
+ gobject_.width = gobject_.height = 0;
+}
+
+Rectangle::Rectangle(int x, int y, int width, int height)
+{
+ gobject_.x = x;
+ gobject_.y = y;
+ gobject_.width = width;
+ gobject_.height = height;
+}
+
+Rectangle::Rectangle(const PangoRectangle* src)
+{
+ gobject_.x = src->x;
+ gobject_.y = src->y;
+ gobject_.width = src->width;
+ gobject_.height = src->height;
+}
+
+bool Rectangle::equal(const Rectangle& rhs) const
+{
+ return (get_x() == rhs.get_x() && get_y() == rhs.get_y() &&
+ get_width() == rhs.get_width() && get_height() == rhs.get_height());
+}
+
+} /* namespace Pango */
+
+
+namespace Glib
+{
+
+Pango::Rectangle& wrap(PangoRectangle* object)
+{
+ return *reinterpret_cast<Pango::Rectangle*>(object);
+}
+
+const Pango::Rectangle& wrap(const PangoRectangle* object)
+{
+ return *reinterpret_cast<const Pango::Rectangle*>(object);
+}
+
+} /* namespace Glib */
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Pango
+{
+
+
+} // namespace Pango
+
+
diff --git a/libs/gtkmm2/pango/pangomm/rectangle.h b/libs/gtkmm2/pango/pangomm/rectangle.h
new file mode 100644
index 0000000000..beb6825406
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/rectangle.h
@@ -0,0 +1,163 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _PANGOMM_RECTANGLE_H
+#define _PANGOMM_RECTANGLE_H
+
+#include <glibmm.h>
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <pango/pango-types.h>
+
+
+namespace Pango
+{
+
+/** A Pango::Rectangle represents a rectangle.
+ * It is frequently used to represent the logical or ink extents of a single glyph or section of text.
+ * The coordinate system for each rectangle has its origin at the base line and the horizontal
+ * origin of the character with increasing coordinates extending to the right and down.
+ * get_ascent(), get_descent(), get_lbearing(), and get_rbearing() can be used to convert
+ * from the extents rectangle to more traditional font metrics.
+ * The units of rectangles usually are in 1/Pango::SCALE of a device unit.
+ */
+class Rectangle
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Rectangle CppObjectType;
+ typedef PangoRectangle BaseObjectType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+private:
+
+
+public:
+ Rectangle();
+ Rectangle(int x, int y, int width, int height);
+ explicit Rectangle(const PangoRectangle* src);
+
+ /** Sets the X coordinate of the left side of the rectangle.
+ * @param x The new X coordinate.
+ */
+ void set_x(int x) { gobject_.x = x; }
+
+ /** Sets the Y coordinate of the top side of the rectangle.
+ * @param y The new Y coordinate.
+ */
+ void set_y(int y) { gobject_.y = y; }
+
+ /** Sets the width of the rectangle.
+ * @param w The new width.
+ */
+ void set_width(int w) { gobject_.width = w; }
+
+ /** Sets the height of the rectangle.
+ * @param h The new height.
+ */
+ void set_height(int h) { gobject_.height = h; }
+
+ /** Gets the X coordinate of the left side of the rectangle.
+ * @return The X coordinate.
+ */
+ int get_x() const { return gobject_.x; }
+
+ /** Gets the Y coordinate of the top side of the rectangle.
+ * @return The Y coordinate.
+ */
+ int get_y() const { return gobject_.y; }
+
+ /** Gets the width of the rectangle.
+ * @return The width.
+ */
+ int get_width() const { return gobject_.width; }
+
+ /** Gets the height of the rectangle.
+ * @return The height.
+ */
+ int get_height() const { return gobject_.height; }
+
+ /** Extracts the ascent from a Pango::Rectangle representing glyph extents.
+ * The ascent is the distance from the baseline to the highest point of the character.
+ * This is positive if the glyph ascends above the baseline.
+ * @return The ascent of the character.
+ */
+ int get_ascent() const { return PANGO_ASCENT(*gobj()); }
+
+ /** Extracts the descent from a Pango::Rectangle representing glyph extents.
+ * The descent is the distance from the baseline to the lowest point of the character.
+ * This is positive if the glyph descends below the baseline.
+ * @return The descent of the character.
+ */
+ int get_descent() const { return PANGO_DESCENT(*gobj()); }
+
+ /** Extracts the left bearing from a Pango::Rectangle representing glyph extents.
+ * The left bearing is the distance from the horizontal origin to the farthest left point of the character.
+ * This is positive for characters drawn completely to the right of the glyph origin.
+ * @return The left bearing of the character.
+ */
+ int get_lbearing() const { return PANGO_LBEARING(*gobj()); }
+
+ /** Extracts the right bearing from a Pango::Rectangle representing glyph extents.
+ * The right bearing is the distance from the horizontal origin to the farthest right point of the character.
+ * This is positive except for characters drawn completely to the left of the horizontal origin.
+ * @return The right bearing of the character.
+ */
+ int get_rbearing() const { return PANGO_RBEARING(*gobj()); }
+
+ /** Checks for equality of two Pango::Rectangles.
+ * @param rhs The Pango::Rectangle to compare with.
+ * @return true if @a rhs is equal with the rectangle.
+ */
+ bool equal(const Rectangle& rhs) const;
+
+ /// Provides access to the underlying C GObject.
+ PangoRectangle* gobj() { return &gobject_; }
+ /// Provides access to the underlying C GObject.
+ const PangoRectangle* gobj() const { return &gobject_; }
+
+protected:
+ PangoRectangle gobject_;
+
+
+};
+
+/** @relates Pango::Rectangle */
+inline bool operator==(const Rectangle& lhs, const Rectangle& rhs)
+ { return lhs.equal(rhs); }
+
+/** @relates Pango::Rectangle */
+inline bool operator!=(const Rectangle& lhs, const Rectangle& rhs)
+ { return !lhs.equal(rhs); }
+
+} /* namespace Pango */
+
+
+namespace Glib
+{
+
+/** @relates Pango::Rectangle */
+Pango::Rectangle& wrap(PangoRectangle* object);
+
+/** @relates Pango::Rectangle */
+const Pango::Rectangle& wrap(const PangoRectangle* object);
+
+} /* namespace Glib */
+
+#endif /* _PANGOMM_RECTANGLE_H */
+
diff --git a/libs/gtkmm2/pango/pangomm/renderer.cc b/libs/gtkmm2/pango/pangomm/renderer.cc
new file mode 100644
index 0000000000..e456fc19cf
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/renderer.cc
@@ -0,0 +1,203 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <pangomm/renderer.h>
+#include <pangomm/private/renderer_p.h>
+
+#include <pango/pango-enum-types.h>
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 2004 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <pango/pango-renderer.h>
+
+namespace Pango
+{
+
+} /* namespace Pango */
+
+
+namespace
+{
+} // anonymous namespace
+
+// static
+GType Glib::Value<Pango::RenderPart>::value_type()
+{
+ return pango_render_part_get_type();
+}
+
+
+namespace Glib
+{
+
+Glib::RefPtr<Pango::Renderer> wrap(PangoRenderer* object, bool take_copy)
+{
+ return Glib::RefPtr<Pango::Renderer>( dynamic_cast<Pango::Renderer*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
+ //We use dynamic_cast<> in case of multiple inheritance.
+}
+
+} /* namespace Glib */
+
+
+namespace Pango
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Renderer_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Renderer_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(pango_renderer_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Renderer_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* Renderer_Class::wrap_new(GObject* object)
+{
+ return new Renderer((PangoRenderer*)object);
+}
+
+
+/* The implementation: */
+
+PangoRenderer* Renderer::gobj_copy()
+{
+ reference();
+ return gobj();
+}
+
+Renderer::Renderer(const Glib::ConstructParams& construct_params)
+:
+ Glib::Object(construct_params)
+{}
+
+Renderer::Renderer(PangoRenderer* castitem)
+:
+ Glib::Object((GObject*)(castitem))
+{}
+
+Renderer::~Renderer()
+{}
+
+
+Renderer::CppClassType Renderer::renderer_class_; // initialize static member
+
+GType Renderer::get_type()
+{
+ return renderer_class_.init().get_type();
+}
+
+GType Renderer::get_base_type()
+{
+ return pango_renderer_get_type();
+}
+
+
+void Renderer::draw_layout(const Glib::RefPtr<Layout>& layout, int x, int y)
+{
+ pango_renderer_draw_layout(gobj(), Glib::unwrap(layout), x, y);
+}
+
+void Renderer::draw_layout_line(const Glib::RefPtr<LayoutLine>& line, int x, int y)
+{
+ pango_renderer_draw_layout_line(gobj(), Glib::unwrap(line), x, y);
+}
+
+void Renderer::draw_glyphs(const Glib::RefPtr<Font>& font, const GlyphString& glyphs, int x, int y)
+{
+ pango_renderer_draw_glyphs(gobj(), Glib::unwrap(font), const_cast<PangoGlyphString*>(glyphs.gobj()), x, y);
+}
+
+void Renderer::draw_rectangle(RenderPart part, int x, int y, int width, int height)
+{
+ pango_renderer_draw_rectangle(gobj(), ((PangoRenderPart)(part)), x, y, width, height);
+}
+
+void Renderer::draw_error_underline(int x, int y, int width, int height)
+{
+ pango_renderer_draw_error_underline(gobj(), x, y, width, height);
+}
+
+void Renderer::draw_trapezoid(RenderPart part, double y1, double x11, double x21, double y2, double x12, double x22)
+{
+ pango_renderer_draw_trapezoid(gobj(), ((PangoRenderPart)(part)), y1, x11, x21, y2, x12, x22);
+}
+
+void Renderer::draw_glyph(const Glib::RefPtr<Font>& font, Glyph glyph, double x, double y)
+{
+ pango_renderer_draw_glyph(gobj(), Glib::unwrap(font), glyph, x, y);
+}
+
+void Renderer::activate()
+{
+ pango_renderer_activate(gobj());
+}
+
+void Renderer::deactivate()
+{
+ pango_renderer_deactivate(gobj());
+}
+
+void Renderer::part_changed(RenderPart part)
+{
+ pango_renderer_part_changed(gobj(), ((PangoRenderPart)(part)));
+}
+
+void Renderer::set_color(RenderPart part, const Color& color)
+{
+ pango_renderer_set_color(gobj(), ((PangoRenderPart)(part)), (color).gobj());
+}
+
+Color Renderer::get_color(RenderPart part) const
+{
+ return Color(pango_renderer_get_color(const_cast<PangoRenderer*>(gobj()), ((PangoRenderPart)(part))));
+}
+
+void Renderer::set_matrix(const Matrix& matrix)
+{
+ pango_renderer_set_matrix(gobj(), &(matrix));
+}
+
+
+} // namespace Pango
+
+
diff --git a/libs/gtkmm2/pango/pangomm/renderer.h b/libs/gtkmm2/pango/pangomm/renderer.h
new file mode 100644
index 0000000000..8428c15b50
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/renderer.h
@@ -0,0 +1,322 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _PANGOMM_RENDERER_H
+#define _PANGOMM_RENDERER_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* renderer.h
+ *
+ * Copyright(C) 2004 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or(at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#include <glibmm/object.h>
+#include <pangomm/context.h>
+#include <pangomm/glyphstring.h>
+#include <pangomm/layout.h>
+#include <pangomm/layoutline.h>
+#include <pangomm/types.h> //For Matrix.
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _PangoRenderer PangoRenderer;
+typedef struct _PangoRendererClass PangoRendererClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Pango
+{ class Renderer_Class; } // namespace Pango
+namespace Pango
+{
+
+
+/** @addtogroup pangommEnums Enums and Flags */
+
+/**
+ * @ingroup pangommEnums
+ */
+enum RenderPart
+{
+ RENDER_PART_FOREGROUND,
+ RENDER_PART_BACKGROUND,
+ RENDER_PART_UNDERLINE,
+ RENDER_PART_STRIKETHROUGH
+};
+
+} // namespace Pango
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Pango::RenderPart> : public Glib::Value_Enum<Pango::RenderPart>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Pango
+{
+
+
+/** TODO.
+ */
+
+class Renderer : public Glib::Object
+{
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+public:
+ typedef Renderer CppObjectType;
+ typedef Renderer_Class CppClassType;
+ typedef PangoRenderer BaseObjectType;
+ typedef PangoRendererClass BaseClassType;
+
+private: friend class Renderer_Class;
+ static CppClassType renderer_class_;
+
+private:
+ // noncopyable
+ Renderer(const Renderer&);
+ Renderer& operator=(const Renderer&);
+
+protected:
+ explicit Renderer(const Glib::ConstructParams& construct_params);
+ explicit Renderer(PangoRenderer* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+ virtual ~Renderer();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GObject.
+ PangoRenderer* gobj() { return reinterpret_cast<PangoRenderer*>(gobject_); }
+
+ ///Provides access to the underlying C GObject.
+ const PangoRenderer* gobj() const { return reinterpret_cast<PangoRenderer*>(gobject_); }
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ PangoRenderer* gobj_copy();
+
+private:
+
+
+protected:
+
+public:
+
+
+ /** Draws @a layout with the specified Pango::Renderer.
+ *
+ * Since: 1.8
+ * @param layout A Pango::Layout.
+ * @param x X position of left edge of baseline, in user space coordinates
+ * in Pango units.
+ * @param y X position of left edge of baseline, in user space coordinates
+ * in Pango units.
+ */
+ void draw_layout(const Glib::RefPtr<Layout>& layout, int x, int y);
+
+ /** Draws @a line with the specified Pango::Renderer.
+ *
+ * Since: 1.8
+ * @param line A Pango::LayoutLine.
+ * @param x X position of left edge of baseline, in user space coordinates
+ * in Pango units.
+ * @param y X position of left edge of baseline, in user space coordinates
+ * in Pango units.
+ */
+ void draw_layout_line(const Glib::RefPtr<LayoutLine>& line, int x, int y);
+
+ /** Draws the glyphs in @a glyphs with the specified Pango::Renderer.
+ *
+ * Since: 1.8
+ * @param font A Pango::Font.
+ * @param glyphs A Pango::GlyphString.
+ * @param x X position of left edge of baseline, in user space coordinates
+ * in Pango units.
+ * @param y X position of left edge of baseline, in user space coordinates
+ * in Pango units.
+ */
+ void draw_glyphs(const Glib::RefPtr<Font>& font, const GlyphString& glyphs, int x, int y);
+
+ /** Draws an axis-aligned rectangle in user space coordinates with the
+ * specified Pango::Renderer.
+ *
+ * Since: 1.8
+ * @param part Type of object this rectangle is part of.
+ * @param x X position at which to draw rectangle, in user space coordinates in Pango units.
+ * @param y Y position at which to draw rectangle, in user space coordinates in Pango units.
+ * @param width Width of rectangle in PangoUnits in user space coordinates.
+ * @param height Height of rectangle in PangoUnits in user space coordinates.
+ */
+ void draw_rectangle(RenderPart part, int x, int y, int width, int height);
+
+ /** Draw a squiggly line that approximately covers the given rectangle
+ * in the style of an underline used to indicate a spelling error.
+ * (The width of the underline is rounded to an integer number
+ * of up/down segments and the resulting rectangle is centered
+ * in the original rectangle)
+ *
+ * Since: 1.8
+ * @param x X coordinate of underline, in Pango units in user coordinate system.
+ * @param y Y coordinate of underline, in Pango units in user coordinate system.
+ * @param width Width of underline, in Pango units in user coordinate system.
+ * @param height Height of underline, in Pango units in user coordinate system.
+ */
+ void draw_error_underline(int x, int y, int width, int height);
+
+ /** Draws a trapezoid with the parallel sides aligned with the X axis
+ * using the given Pango::Renderer; coordinates are in device space.
+ *
+ * Since: 1.8
+ * @param part Type of object this trapezoid is part of.
+ * @param y1 Y coordinate of top of trapezoid.
+ * @param x11 X coordinate of left end of top of trapezoid.
+ * @param x21 X coordinate of right end of top of trapezoid.
+ * @param y2 X coordinate of top of trapezoid.
+ * @param x12 X coordinate of left end of top of trapezoid.
+ * @param x22 Y coordinate of left end of top of trapezoid.
+ */
+ void draw_trapezoid(RenderPart part, double y1, double x11, double x21, double y2, double x12, double x22);
+
+ /** Draws a single glyph with coordinates in device space.
+ *
+ * Since: 1.8
+ * @param font A Pango::Font.
+ * @param glyph The glyph index of a single glyph.
+ * @param x X coordinate of left edge of baseline of glyph.
+ * @param y Y coordinate of left edge of baseline of glyph.
+ */
+ void draw_glyph(const Glib::RefPtr<Font>& font, Glyph glyph, double x, double y);
+
+
+ /** Does initial setup before rendering operations on @a renderer .
+ * deactivate() should be called when done drawing.
+ * Calls such as draw_layout() automatically
+ * activate the layout before drawing on it. Calls to
+ * activate() and deactivate() can
+ * be nested and the renderer will only be initialized and
+ * deinitialized once.
+ *
+ * Since: 1.8
+ */
+ void activate();
+
+ /** Cleans up after rendering operations on @a renderer . See
+ * docs for activate().
+ *
+ * Since: 1.8
+ */
+ void deactivate();
+
+
+ /** Informs Pango that the way that the renderering is done
+ * for @a part has changed in a way that would prevent multiple
+ * pieces being joined together into one drawing call. For
+ * instance, if a subclass of Pango::Renderer was to add a stipple
+ * option for drawing underlines, it needs to call
+ *
+ * @code
+ * pango_renderer_part_changed (render, PANGO_RENDER_PART_UNDERLINE);
+ * @endcode
+ *
+ * When the stipple changes or underlines with different stipples
+ * might be joined together. Pango automatically calls this for
+ * changes to colors. (See set_color())
+ *
+ * Since: 1.8
+ * @param part The part for which rendering has changed.
+ */
+ void part_changed(RenderPart part);
+
+
+ /** Sets the color for part of the rendering.
+ *
+ * Since: 1.8
+ * @param part The part to change the color of.
+ * @param color The new color or <tt>0</tt> to unset the current color.
+ */
+ void set_color(RenderPart part, const Color& color);
+
+
+ /** Gets the current rendering color for the specified part.
+ * @param part The part to get the color for.
+ * @return The color for the specified part, or <tt>0</tt>
+ * if it hasn't been set and should be inherited from the
+ * environment.
+ *
+ * Since: 1.8.
+ */
+ Color get_color(RenderPart part) const;
+
+
+ /** Sets the transformation matrix that will be applied when rendering.
+ *
+ * Since: 1.8
+ * @param matrix A Pango::Matrix, or <tt>0</tt> to unset any existing matrix.
+ * (No matrix set is the same as setting the identity matrix.).
+ */
+ void set_matrix(const Matrix& matrix);
+ //TOOD: _WRAP_METHOD(Matrix get_matrix(), pango_renderer_get_matrix)
+ //Note: The returned matrix is owned by Pango and must not be modified or freed.
+
+
+public:
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+};
+
+} /* namespace Pango */
+
+
+namespace Glib
+{
+ /** @relates Pango::Renderer
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Pango::Renderer> wrap(PangoRenderer* object, bool take_copy = false);
+}
+
+
+#endif /* _PANGOMM_RENDERER_H */
+
diff --git a/libs/gtkmm2/pango/pangomm/tabarray.cc b/libs/gtkmm2/pango/pangomm/tabarray.cc
new file mode 100644
index 0000000000..57353f418a
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/tabarray.cc
@@ -0,0 +1,181 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <pangomm/tabarray.h>
+#include <pangomm/private/tabarray_p.h>
+
+#include <pango/pango-enum-types.h>
+// -*- c++ -*-
+/* $Id$ */
+
+/*
+ *
+ * Copyright 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+namespace Pango
+{
+
+TabArray::TabArray(int initial_size, bool positions_in_pixels)
+{
+ gobject_ = pango_tab_array_new(initial_size, (gboolean)positions_in_pixels);
+}
+
+std::pair<TabAlign,int> TabArray::get_tab(int tab_index) const
+{
+ TabAlign alignment;
+ int location;
+ pango_tab_array_get_tab(const_cast<PangoTabArray*>(gobj()), tab_index, (PangoTabAlign*)&alignment, &location);
+ return std::pair<TabAlign,int>(alignment, location);
+}
+
+Glib::ArrayHandle< std::pair<TabAlign,int> > TabArray::get_tabs() const
+{
+ typedef std::pair<TabAlign,int> PairType;
+
+ PairType* pair_buffer = 0;
+ const int size = pango_tab_array_get_size(const_cast<PangoTabArray*>(gobj()));
+
+ if(size > 0)
+ {
+ // Get arrays
+ PangoTabAlign* pAlignments = 0;
+ int* pLocations = 0;
+ pango_tab_array_get_tabs(const_cast<PangoTabArray*>(gobj()), &pAlignments, &pLocations);
+
+ if(pAlignments && pLocations)
+ {
+ // Create temporary C array. Fortunately, the C++ type is POD,
+ // so we can safely store it in the array.
+ pair_buffer = g_new(PairType, size);
+
+ for(int i = 0; i < size; ++i)
+ {
+ pair_buffer[i].first = (TabAlign)(pAlignments[i]);
+ pair_buffer[i].second = pLocations[i];
+ }
+ }
+
+ g_free(pAlignments);
+ g_free(pLocations);
+ }
+
+ return Glib::ArrayHandle<PairType>(pair_buffer, size, Glib::OWNERSHIP_SHALLOW);
+}
+
+} /* namespace Pango */
+
+
+namespace
+{
+} // anonymous namespace
+
+// static
+GType Glib::Value<Pango::TabAlign>::value_type()
+{
+ return pango_tab_align_get_type();
+}
+
+
+namespace Glib
+{
+
+Pango::TabArray wrap(PangoTabArray* object, bool take_copy)
+{
+ return Pango::TabArray(object, take_copy);
+}
+
+} // namespace Glib
+
+
+namespace Pango
+{
+
+
+// static
+GType TabArray::get_type()
+{
+ return pango_tab_array_get_type();
+}
+
+TabArray::TabArray()
+:
+ gobject_ (0) // Allows creation of invalid wrapper, e.g. for output arguments to methods.
+{}
+
+TabArray::TabArray(const TabArray& other)
+:
+ gobject_ ((other.gobject_) ? pango_tab_array_copy(other.gobject_) : 0)
+{}
+
+TabArray::TabArray(PangoTabArray* gobject, bool make_a_copy)
+:
+ // For BoxedType wrappers, make_a_copy is true by default. The static
+ // BoxedType wrappers must always take a copy, thus make_a_copy = true
+ // ensures identical behaviour if the default argument is used.
+ gobject_ ((make_a_copy && gobject) ? pango_tab_array_copy(gobject) : gobject)
+{}
+
+TabArray& TabArray::operator=(const TabArray& other)
+{
+ TabArray temp (other);
+ swap(temp);
+ return *this;
+}
+
+TabArray::~TabArray()
+{
+ if(gobject_)
+ pango_tab_array_free(gobject_);
+}
+
+void TabArray::swap(TabArray& other)
+{
+ PangoTabArray *const temp = gobject_;
+ gobject_ = other.gobject_;
+ other.gobject_ = temp;
+}
+
+PangoTabArray* TabArray::gobj_copy() const
+{
+ return pango_tab_array_copy(gobject_);
+}
+
+
+int TabArray::get_size() const
+{
+ return pango_tab_array_get_size(const_cast<PangoTabArray*>(gobj()));
+}
+
+void TabArray::resize(int new_size)
+{
+ pango_tab_array_resize(gobj(), new_size);
+}
+
+void TabArray::set_tab(int tab_index, TabAlign alignment, int location)
+{
+ pango_tab_array_set_tab(gobj(), tab_index, ((PangoTabAlign)(alignment)), location);
+}
+
+bool TabArray::get_positions_in_pixels() const
+{
+ return pango_tab_array_get_positions_in_pixels(const_cast<PangoTabArray*>(gobj()));
+}
+
+
+} // namespace Pango
+
+
diff --git a/libs/gtkmm2/pango/pangomm/tabarray.h b/libs/gtkmm2/pango/pangomm/tabarray.h
new file mode 100644
index 0000000000..7a5850c663
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/tabarray.h
@@ -0,0 +1,195 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _PANGOMM_TABARRAY_H
+#define _PANGOMM_TABARRAY_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* tabarray.h
+ *
+ * Copyright (C) 1998-1999 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <pangomm/attrlist.h>
+#include <pango/pango-tabs.h>
+#include <pango/pango-break.h> //For PangoLogAttrs.
+
+#include <utility>
+#include <glibmmconfig.h>
+GLIBMM_USING_STD(pair)
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+extern "C" { typedef struct _PangoTabArray PangoTabArray; }
+#endif
+
+namespace Pango
+{
+
+
+/** @addtogroup pangommEnums Enums and Flags */
+
+/**
+ * @ingroup pangommEnums
+ */
+enum TabAlign
+{
+ TAB_LEFT
+};
+
+} // namespace Pango
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Pango::TabAlign> : public Glib::Value_Enum<Pango::TabAlign>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Pango
+{
+
+
+/** A Pango::TabArray contains an array of tab stops.
+ * Each tab stop has an alignment and a position.
+ */
+class TabArray
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef TabArray CppObjectType;
+ typedef PangoTabArray BaseObjectType;
+
+ static GType get_type() G_GNUC_CONST;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ TabArray();
+
+ explicit TabArray(PangoTabArray* gobject, bool make_a_copy = true);
+
+ TabArray(const TabArray& other);
+ TabArray& operator=(const TabArray& other);
+
+ ~TabArray();
+
+ void swap(TabArray& other);
+
+ ///Provides access to the underlying C instance.
+ PangoTabArray* gobj() { return gobject_; }
+
+ ///Provides access to the underlying C instance.
+ const PangoTabArray* gobj() const { return gobject_; }
+
+ ///Provides access to the underlying C instance. The caller is responsible for freeing it. Use when directly setting fields in structs.
+ PangoTabArray* gobj_copy() const;
+
+protected:
+ PangoTabArray* gobject_;
+
+private:
+
+
+public:
+ explicit TabArray(int initial_size, bool positions_in_pixels = true);
+
+
+ /** Gets the number of tab stops in @a tab_array .
+ * @return The number of tab stops in the array.
+ */
+ int get_size() const;
+
+ /** Resizes a tab array. You must subsequently initialize any tabs that
+ * were added as a result of growing the array.
+ * @param new_size New size of the array.
+ */
+ void resize(int new_size);
+
+ /** Sets the alignment and location of a tab stop.
+ * @a alignment must always be Pango::TAB_LEFT in the current
+ * implementation.
+ * @param tab_index The index of a tab stop.
+ * @param alignment Tab alignment.
+ * @param location Tab location in pango units.
+ */
+ void set_tab(int tab_index, TabAlign alignment, int location);
+
+ /** Gets the alignment and position of a tab stop.
+ * @return An std::pair<TabAlign, int>. The first element represents the tab stop alignment, the second one is the tab position.
+ */
+ std::pair<TabAlign,int> get_tab(int tab_index) const;
+
+ /** Gets an array of std::pairs containing the tab stop alignments and tab positions.
+ * @return An array of std::pair<TabAlign, int>. The first element in each pair represents the tab stop alignment, the second one is the tab position.
+ */
+ Glib::ArrayHandle< std::pair<TabAlign,int> > get_tabs() const;
+
+
+ /** Returns <tt>true</tt> if the tab positions are in pixels, <tt>false</tt> if they are
+ * in Pango units.
+ * @return Whether positions are in pixels.
+ */
+ bool get_positions_in_pixels() const;
+
+
+};
+
+} //namespace Pango
+
+
+namespace Pango
+{
+
+/** @relates Pango::TabArray
+ * @param lhs The left-hand side
+ * @param rhs The right-hand side
+ */
+inline void swap(TabArray& lhs, TabArray& rhs)
+ { lhs.swap(rhs); }
+
+} // namespace Pango
+
+namespace Glib
+{
+
+/** @relates Pango::TabArray
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+Pango::TabArray wrap(PangoTabArray* object, bool take_copy = false);
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+template <>
+class Value<Pango::TabArray> : public Glib::Value_Boxed<Pango::TabArray>
+{};
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+} // namespace Glib
+
+#endif /* _PANGOMM_TABARRAY_H */
+
diff --git a/libs/gtkmm2/pango/pangomm/types.h b/libs/gtkmm2/pango/pangomm/types.h
new file mode 100644
index 0000000000..4ed2f12783
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/types.h
@@ -0,0 +1,34 @@
+/* $Id$ */
+
+/* Copyright (C) 2002 The gtkmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef _PANGOMM_TYPES_H
+#define _PANGOMM_TYPES_H
+
+#include <pango/pango-types.h>
+
+namespace Pango
+{
+
+typedef PangoMatrix Matrix;
+
+} // namespace Pango
+
+
+#endif /* _PANGOMM_TYPES_H */
+
diff --git a/libs/gtkmm2/pango/pangomm/wrap_init.cc b/libs/gtkmm2/pango/pangomm/wrap_init.cc
new file mode 100644
index 0000000000..348d28fabd
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/wrap_init.cc
@@ -0,0 +1,100 @@
+
+#include <glib.h>
+
+// Disable the 'const' function attribute of the get_type() functions.
+// GCC would optimize them out because we don't use the return value.
+#undef G_GNUC_CONST
+#define G_GNUC_CONST /* empty */
+
+#include <pangomm/wrap_init.h>
+#include <glibmm/error.h>
+#include <glibmm/object.h>
+
+// #include the widget headers so that we can call the get_type() static methods:
+
+#include "attributes.h"
+#include "attriter.h"
+#include "attrlist.h"
+#include "color.h"
+#include "context.h"
+#include "coverage.h"
+#include "font.h"
+#include "fontdescription.h"
+#include "fontface.h"
+#include "fontfamily.h"
+#include "fontmap.h"
+#include "fontmetrics.h"
+#include "fontset.h"
+#include "glyph.h"
+#include "glyphstring.h"
+#include "item.h"
+#include "language.h"
+#include "layout.h"
+#include "layoutiter.h"
+#include "layoutline.h"
+#include "layoutrun.h"
+#include "rectangle.h"
+#include "renderer.h"
+#include "tabarray.h"
+
+extern "C"
+{
+
+//Declarations of the *_get_type() functions:
+
+GType pango_context_get_type(void);
+GType pango_font_get_type(void);
+GType pango_font_face_get_type(void);
+GType pango_font_family_get_type(void);
+GType pango_font_map_get_type(void);
+GType pango_fontset_get_type(void);
+GType pango_layout_get_type(void);
+GType pango_renderer_get_type(void);
+
+//Declarations of the *_error_quark() functions:
+
+} // extern "C"
+
+
+//Declarations of the *_Class::wrap_new() methods, instead of including all the private headers:
+
+namespace Pango { class Context_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Pango { class Font_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Pango { class FontFace_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Pango { class FontFamily_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Pango { class FontMap_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Pango { class Fontset_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Pango { class Layout_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+namespace Pango { class Renderer_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; }
+
+namespace Pango {
+
+void wrap_init()
+{
+ // Register Error domains:
+
+// Map gtypes to gtkmm wrapper-creation functions:
+ Glib::wrap_register(pango_context_get_type(), &Pango::Context_Class::wrap_new);
+ Glib::wrap_register(pango_font_get_type(), &Pango::Font_Class::wrap_new);
+ Glib::wrap_register(pango_font_face_get_type(), &Pango::FontFace_Class::wrap_new);
+ Glib::wrap_register(pango_font_family_get_type(), &Pango::FontFamily_Class::wrap_new);
+ Glib::wrap_register(pango_font_map_get_type(), &Pango::FontMap_Class::wrap_new);
+ Glib::wrap_register(pango_fontset_get_type(), &Pango::Fontset_Class::wrap_new);
+ Glib::wrap_register(pango_layout_get_type(), &Pango::Layout_Class::wrap_new);
+ Glib::wrap_register(pango_renderer_get_type(), &Pango::Renderer_Class::wrap_new);
+
+ // Register the gtkmm gtypes:
+ Pango::Context::get_type();
+ Pango::Font::get_type();
+ Pango::FontFace::get_type();
+ Pango::FontFamily::get_type();
+ Pango::FontMap::get_type();
+ Pango::Fontset::get_type();
+ Pango::Layout::get_type();
+ Pango::Renderer::get_type();
+
+} // wrap_init()
+
+} //Pango
+
+
diff --git a/libs/gtkmm2/pango/pangomm/wrap_init.h b/libs/gtkmm2/pango/pangomm/wrap_init.h
new file mode 100644
index 0000000000..fd4cd217dd
--- /dev/null
+++ b/libs/gtkmm2/pango/pangomm/wrap_init.h
@@ -0,0 +1,32 @@
+#ifndef _PANGOMM_WRAP_INIT_H
+#define _PANGOMM_WRAP_INIT_H
+
+/* wrap_init.h
+ *
+ * Copyright (C) 1998-2001 The Gtk-- Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+// wrap_init.cc is generated by tools/generate_wrap_init.pl
+
+namespace Pango
+{
+
+void wrap_init();
+
+} /* namespace Pango */
+
+#endif // _PANGOMM_WRAP_INIT_H
diff --git a/libs/gtkmm2ext/.cvsignore b/libs/gtkmm2ext/.cvsignore
new file mode 100644
index 0000000000..c3ceb3bfd5
--- /dev/null
+++ b/libs/gtkmm2ext/.cvsignore
@@ -0,0 +1,5 @@
+libgtkmmext.pc
+libgtkmmext.spec
+version.cc
+*.mo
+*.pot
diff --git a/libs/gtkmm2ext/AUTHORS b/libs/gtkmm2ext/AUTHORS
new file mode 100644
index 0000000000..396f223e8c
--- /dev/null
+++ b/libs/gtkmm2ext/AUTHORS
@@ -0,0 +1,2 @@
+Written primarily by Paul Davis.
+Porting to gtkmm2 and sigc++2 work done by Taybin Rutkin.
diff --git a/libs/gtkmm2ext/COPYING b/libs/gtkmm2ext/COPYING
new file mode 100644
index 0000000000..d60c31a97a
--- /dev/null
+++ b/libs/gtkmm2ext/COPYING
@@ -0,0 +1,340 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/libs/gtkmm2ext/ChangeLog b/libs/gtkmm2ext/ChangeLog
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/libs/gtkmm2ext/ChangeLog
diff --git a/libs/gtkmm2ext/NEWS b/libs/gtkmm2ext/NEWS
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/libs/gtkmm2ext/NEWS
diff --git a/libs/gtkmm2ext/README b/libs/gtkmm2ext/README
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/libs/gtkmm2ext/README
diff --git a/libs/gtkmm2ext/SConscript b/libs/gtkmm2ext/SConscript
new file mode 100644
index 0000000000..e3ba3f1fcd
--- /dev/null
+++ b/libs/gtkmm2ext/SConscript
@@ -0,0 +1,74 @@
+# -*- python -*-
+
+import os
+import os.path
+import glob
+
+Import('env final_prefix install_prefix libraries i18n')
+
+gtkmm2ext = env.Copy()
+gtkmm2ext.Merge ([
+ libraries['sigc2'],
+ libraries['pbd3'],
+ libraries['midi++2'],
+ libraries['gtk2'],
+ libraries['glibmm2'],
+ libraries['pangomm'],
+ libraries['atkmm'],
+ libraries['gdkmm2'],
+ libraries['gtkmm2']
+ ])
+
+#
+# this defines the version number of libgtkmm2ext
+#
+
+domain = 'libgtkmm2ext'
+
+gtkmm2ext.Append(DOMAIN=domain,MAJOR=0,MINOR=8,MICRO=0)
+gtkmm2ext.Append(CXXFLAGS="-DPACKAGE=\\\"" + domain + "\\\"")
+gtkmm2ext.Append(CCFLAGS="-DLIBSIGC_DISABLE_DEPRECATED")
+gtkmm2ext.Append(PACKAGE=domain)
+gtkmm2ext.Append(POTFILE=domain + '.pot')
+
+gtkmm2ext_files = Split("""
+auto_spin.cc
+barcontroller.cc
+bindable_button.cc
+choice.cc
+click_box.cc
+controller.cc
+fastmeter.cc
+gtk_ui.cc
+gtkutils.cc
+hexentry.cc
+idle_adjustment.cc
+pix.cc
+pixscroller.cc
+popup.cc
+prompter.cc
+selector.cc
+slider_controller.cc
+tearoff.cc
+textviewer.cc
+utils.cc
+version.cc
+""")
+
+gtkmm2ext.VersionBuild(['version.cc','gtkmm2ext/version.h'], 'SConscript')
+
+gtkmm2ext.Append(CCFLAGS="-D_REENTRANT")
+gtkmm2ext.Append(CCFLAGS="-DLOCALEDIR=\\\""+final_prefix+"/share/locale\\\"")
+
+libgtkmm2ext = gtkmm2ext.StaticLibrary('gtkmm2ext', gtkmm2ext_files)
+
+Default(libgtkmm2ext)
+
+if env['NLS']:
+ i18n (gtkmm2ext, gtkmm2ext_files, env)
+
+env.Alias('tarball', env.Distribute (env['DISTTREE'],
+ [ 'SConscript', 'i18n.h', 'gettext.h'] +
+ gtkmm2ext_files +
+ glob.glob('po/*.po') +
+ glob.glob('gtkmm2ext/*.h')))
diff --git a/libs/gtkmm2ext/auto_spin.cc b/libs/gtkmm2ext/auto_spin.cc
new file mode 100644
index 0000000000..0830eca77e
--- /dev/null
+++ b/libs/gtkmm2ext/auto_spin.cc
@@ -0,0 +1,262 @@
+/*
+ Copyright (C) 1999 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#include <gtkmm2ext/auto_spin.h>
+#include <cmath>
+
+using namespace Gtkmm2ext;
+using namespace std;
+
+#define upper adjustment.get_upper()
+#define lower adjustment.get_lower()
+#define step_increment adjustment.get_step_increment()
+#define page_increment adjustment.get_page_increment()
+
+const unsigned int AutoSpin::initial_timer_interval = 500; /* msecs */
+const unsigned int AutoSpin::timer_interval = 20; /* msecs */
+const unsigned int AutoSpin::climb_timer_calls = 5; /* between climbing */
+
+AutoSpin::AutoSpin (Gtk::Adjustment &adjr, gfloat cr)
+ : adjustment (adjr),
+ climb_rate (cr)
+
+{
+ initial = adjustment.get_value();
+ left_is_decrement = true;
+ wrap = false;
+ have_timer = false;
+ need_timer = false;
+ timer_calls = 0;
+}
+
+void
+AutoSpin::stop_timer ()
+{
+ if (have_timer) {
+ gtk_timeout_remove (timeout_tag);
+ have_timer = false;
+ }
+}
+
+gint
+AutoSpin::stop_spinning (GdkEventButton *ev)
+{
+ need_timer = false;
+ stop_timer ();
+ return FALSE;
+}
+
+gint
+AutoSpin::button_press (GdkEventButton *ev)
+{
+ bool shifted = false;
+ bool control = false;
+ bool with_decrement = false;
+
+ stop_spinning (0);
+
+ if (ev->state & GDK_SHIFT_MASK) {
+ /* use page shift */
+
+ shifted = true;
+ }
+
+ if (ev->state & GDK_CONTROL_MASK) {
+ /* go to upper/lower bound on button1/button2 */
+
+ control = true;
+ }
+
+ /* XXX should figure out which button is left/right */
+
+ switch (ev->button) {
+ case 1:
+ if (control) {
+ set_value (left_is_decrement ? lower : upper);
+ return TRUE;
+ } else {
+ if (left_is_decrement) {
+ with_decrement = true;
+ } else {
+ with_decrement = false;
+ }
+ }
+ break;
+
+ case 2:
+ if (!control) {
+ set_value (initial);
+ }
+ return TRUE;
+ break;
+
+ case 3:
+ if (control) {
+ set_value (left_is_decrement ? upper : lower);
+ return TRUE;
+ }
+ break;
+
+ case 4:
+ if (!control) {
+ adjust_value (shifted ? page_increment : step_increment);
+ } else {
+ set_value (upper);
+ }
+ return TRUE;
+ break;
+
+ case 5:
+ if (!control) {
+ adjust_value (shifted ? -page_increment : -step_increment);
+ } else {
+ set_value (lower);
+ }
+ return TRUE;
+ break;
+ }
+
+ start_spinning (with_decrement, shifted);
+ return TRUE;
+}
+
+void
+AutoSpin::start_spinning (bool decrement, bool page)
+{
+ timer_increment = page ? page_increment : step_increment;
+
+ if (decrement) {
+ timer_increment = -timer_increment;
+ }
+
+ adjust_value (timer_increment);
+
+ have_timer = true;
+ timer_calls = 0;
+ timeout_tag = gtk_timeout_add (initial_timer_interval,
+ AutoSpin::_timer,
+ this);
+}
+
+gint
+AutoSpin::_timer (void *arg)
+{
+ return ((AutoSpin *) arg)->timer ();
+}
+
+void
+AutoSpin::set_value (gfloat value)
+{
+ adjustment.set_value (value);
+}
+
+bool
+AutoSpin::adjust_value (gfloat increment)
+{
+ gfloat val;
+ bool done = false;
+
+ val = adjustment.get_value();
+
+ val += increment;
+
+ if (val > upper) {
+ if (wrap) {
+ val = lower;
+ } else {
+ val = upper;
+ done = true;
+ }
+ } else if (val < lower) {
+ if (wrap) {
+ val = upper;
+ } else {
+ val = lower;
+ done = true;
+ }
+ }
+
+ adjustment.set_value (val);
+ return done;
+}
+
+gint
+AutoSpin::timer ()
+{
+ bool done;
+ int retval = FALSE;
+
+ done = adjust_value (timer_increment);
+
+ if (need_timer) {
+
+ /* we're in the initial call, which happened
+ after initial_timer_interval msecs. Now
+ request a much more frequent update.
+ */
+
+ timeout_tag = gtk_timeout_add (timer_interval,
+ _timer,
+ this);
+ have_timer = true;
+ need_timer = false;
+
+ /* cancel this initial timeout */
+
+ retval = FALSE;
+
+ } else {
+ /* this is the regular "fast" call after each
+ timer_interval msecs.
+ */
+
+ if (timer_calls < climb_timer_calls) {
+ timer_calls++;
+ } else {
+ if (climb_rate > 0.0) {
+ if (timer_increment > 0) {
+ timer_increment += climb_rate;
+ } else {
+ timer_increment -= climb_rate;
+ }
+ }
+ timer_calls = 0;
+ }
+
+ if (!done) {
+ retval = TRUE;
+ }
+ }
+
+ return retval;
+}
+
+void
+AutoSpin::set_bounds (gfloat init, gfloat up, gfloat down, bool with_reset)
+{
+ adjustment.set_upper(up);
+ adjustment.set_lower(down);
+
+ adjustment.changed ();
+
+ if (with_reset) {
+ adjustment.set_value (init);
+ }
+}
diff --git a/libs/gtkmm2ext/barcontroller.cc b/libs/gtkmm2ext/barcontroller.cc
new file mode 100644
index 0000000000..01a952f558
--- /dev/null
+++ b/libs/gtkmm2ext/barcontroller.cc
@@ -0,0 +1,497 @@
+/*
+ Copyright (C) 2004 Paul Davis
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#include <string>
+#include <climits>
+#include <cstdio>
+#include <cmath>
+#include <algorithm>
+
+#include <midi++/controllable.h>
+
+#include <gtkmm2ext/gtk_ui.h>
+#include <gtkmm2ext/barcontroller.h>
+
+#include "i18n.h"
+
+using namespace std;
+using namespace Gtk;
+using namespace Gtkmm2ext;
+
+BarController::BarController (Gtk::Adjustment& adj,
+ MIDI::Controllable *mc,
+ sigc::slot<void,char*,unsigned int> lc)
+
+ : adjustment (adj),
+ prompter (Gtk::WIN_POS_MOUSE, 30000, false),
+ midi_control (mc),
+ label_callback (lc),
+ spinner (adjustment),
+ bind_button (2),
+ bind_statemask (Gdk::CONTROL_MASK)
+
+{
+ _style = LeftToRight;
+ grabbed = false;
+ switching = false;
+ switch_on_release = false;
+ with_text = true;
+ use_parent = false;
+
+ set_shadow_type (SHADOW_NONE);
+
+ initial_value = adjustment.get_value ();
+
+ adjustment.signal_value_changed().connect (mem_fun (*this, &Gtk::Widget::queue_draw));
+ adjustment.signal_changed().connect (mem_fun (*this, &Gtk::Widget::queue_draw));
+
+ darea.add_events (Gdk::BUTTON_RELEASE_MASK|
+ Gdk::BUTTON_PRESS_MASK|
+ Gdk::POINTER_MOTION_MASK|
+ Gdk::ENTER_NOTIFY_MASK|
+ Gdk::LEAVE_NOTIFY_MASK);
+
+ darea.signal_expose_event().connect (mem_fun (*this, &BarController::expose));
+ darea.signal_motion_notify_event().connect (mem_fun (*this, &BarController::motion));
+ darea.signal_button_press_event().connect (mem_fun (*this, &BarController::button_press));
+ darea.signal_button_release_event().connect (mem_fun (*this, &BarController::button_release));
+
+ prompter.signal_unmap_event().connect (mem_fun (*this, &BarController::prompter_hiding));
+
+ prompting = false;
+ unprompting = false;
+
+ if (mc) {
+ mc->learning_started.connect (mem_fun (*this, &BarController::midicontrol_prompt));
+ mc->learning_stopped.connect (mem_fun (*this, &BarController::midicontrol_unprompt));
+ }
+
+ spinner.signal_activate().connect (mem_fun (*this, &BarController::entry_activated));
+ spinner.signal_focus_out_event().connect (mem_fun (*this, &BarController::entry_focus_out));
+ spinner.set_digits (3);
+
+ add (darea);
+ show_all ();
+}
+
+void
+BarController::set_bind_button_state (guint button, guint statemask)
+{
+ bind_button = button;
+ bind_statemask = statemask;
+}
+
+void
+BarController::get_bind_button_state (guint &button, guint &statemask)
+{
+ button = bind_button;
+ statemask = bind_statemask;
+}
+
+
+gint
+BarController::button_press (GdkEventButton* ev)
+{
+ switch (ev->button) {
+ case 1:
+ if (ev->type == GDK_2BUTTON_PRESS) {
+ switch_on_release = true;
+ } else {
+ switch_on_release = false;
+ darea.add_modal_grab();
+ grabbed = true;
+ grab_x = ev->x;
+ grab_window = ev->window;
+ StartGesture ();
+ }
+ return TRUE;
+ break;
+
+ case 2:
+ case 3:
+ break;
+
+ case 4:
+ case 5:
+ break;
+ }
+
+ return FALSE;
+}
+
+gint
+BarController::button_release (GdkEventButton* ev)
+{
+ switch (ev->button) {
+ case 1:
+ if (switch_on_release) {
+ Glib::signal_idle().connect (mem_fun (*this, &BarController::switch_to_spinner));
+ return TRUE;
+ }
+
+ if ((ev->state & (GDK_SHIFT_MASK|GDK_CONTROL_MASK)) == GDK_SHIFT_MASK) {
+ adjustment.set_value (initial_value);
+ } else {
+ double scale;
+
+ if (ev->state & (GDK_CONTROL_MASK|GDK_SHIFT_MASK) == (GDK_CONTROL_MASK|GDK_SHIFT_MASK)) {
+ scale = 0.01;
+ } else if (ev->state & GDK_CONTROL_MASK) {
+ scale = 0.1;
+ } else {
+ scale = 1.0;
+ }
+
+ mouse_control (ev->x, ev->window, scale);
+ }
+ grabbed = false;
+ darea.remove_modal_grab();
+ StopGesture ();
+ break;
+
+ case 2:
+ if ((ev->state & bind_statemask) && bind_button == 2) {
+ midi_learn ();
+ } else {
+ double fract;
+ fract = ev->x / (darea.get_width() - 2.0);
+ adjustment.set_value (adjustment.get_lower() +
+ fract * (adjustment.get_upper() - adjustment.get_lower()));
+ }
+ return TRUE;
+
+ case 3:
+ if ((ev->state & bind_statemask) && bind_button == 3) {
+ midi_learn ();
+ return TRUE;
+ }
+ return FALSE;
+
+ case 4:
+ adjustment.set_value (adjustment.get_value() +
+ adjustment.get_step_increment());
+ break;
+ case 5:
+ adjustment.set_value (adjustment.get_value() -
+ adjustment.get_step_increment());
+ break;
+ }
+
+ return TRUE;
+}
+
+gint
+BarController::motion (GdkEventMotion* ev)
+{
+ double scale;
+
+ if (!grabbed) {
+ return TRUE;
+ }
+
+ if ((ev->state & (GDK_SHIFT_MASK|GDK_CONTROL_MASK)) == GDK_SHIFT_MASK) {
+ return TRUE;
+ }
+
+ if (ev->state & (GDK_CONTROL_MASK|GDK_SHIFT_MASK) == (GDK_CONTROL_MASK|GDK_SHIFT_MASK)) {
+ scale = 0.01;
+ } else if (ev->state & GDK_CONTROL_MASK) {
+ scale = 0.1;
+ } else {
+ scale = 1.0;
+ }
+
+ return mouse_control (ev->x, ev->window, scale);
+}
+
+gint
+BarController::mouse_control (double x, GdkWindow* window, double scaling)
+{
+ double fract;
+ double delta;
+
+ if (window != grab_window) {
+ grab_x = x;
+ grab_window = window;
+ return TRUE;
+ }
+
+ delta = x - grab_x;
+ grab_x = x;
+
+ switch (_style) {
+ case Line:
+ case LeftToRight:
+ fract = scaling * (delta / (darea.get_width() - 2));
+ fract = min (1.0, fract);
+ fract = max (-1.0, fract);
+ adjustment.set_value (adjustment.get_value() + fract * (adjustment.get_upper() - adjustment.get_lower()));
+ break;
+
+ default:
+ fract = 0.0;
+ }
+
+
+ return TRUE;
+}
+
+gint
+BarController::expose (GdkEventExpose* event)
+{
+ Glib::RefPtr<Gdk::Window> win (darea.get_window());
+ Widget* parent;
+ gint x1, x2, y1, y2;
+ gint w, h;
+ double fract;
+
+ w = darea.get_width() - 2;
+ h = darea.get_height() - 2;
+
+ fract = ((adjustment.get_value() - adjustment.get_lower()) /
+ (adjustment.get_upper() - adjustment.get_lower()));
+
+ switch (_style) {
+ case Line:
+ x1 = (gint) floor (w * fract);
+ x2 = x1;
+ y1 = 0;
+ y2 = h - 1;
+
+ if (use_parent) {
+ parent = get_parent();
+
+ if (parent) {
+ win->draw_rectangle (parent->get_style()->get_fg_gc (parent->get_state()),
+ true,
+ 0, 0, darea.get_width(), darea.get_height());
+ }
+ } else {
+ win->draw_rectangle (get_style()->get_bg_gc (get_state()),
+ true,
+ 0, 0, darea.get_width(), darea.get_height());
+ }
+
+ if (fract == 0.0) {
+ win->draw_rectangle (get_style()->get_fg_gc (get_state()),
+ true, x1, 1, 2, darea.get_height() - 2);
+ } else {
+ win->draw_rectangle (get_style()->get_fg_gc (get_state()),
+ true, x1 - 1, 1, 3, darea.get_height() - 2);
+ }
+ break;
+
+ case CenterOut:
+ break;
+
+ case LeftToRight:
+ x1 = 0;
+ x2 = (gint) floor (w * fract);
+ y1 = 0;
+ y2 = h - 1;
+
+ win->draw_rectangle (get_style()->get_bg_gc (get_state()),
+ false,
+ 0, 0, darea.get_width(), darea.get_height());
+
+ /* draw active box */
+
+ win->draw_rectangle (get_style()->get_fg_gc (get_state()),
+ true,
+ 1 + x1,
+ 1 + y1,
+ x2,
+ 1 + y2);
+
+ /* draw inactive box */
+
+ win->draw_rectangle (get_style()->get_fg_gc (STATE_INSENSITIVE),
+ true,
+ 1 + x2,
+ 1 + y1,
+ w - x2,
+ 1 + y2);
+
+ break;
+
+ case RightToLeft:
+ break;
+ case TopToBottom:
+ break;
+ case BottomToTop:
+ break;
+ }
+
+ if (with_text) {
+ /* draw label */
+
+ char buf[64];
+ buf[0] = '\0';
+
+ label_callback (buf, 64);
+
+ if (buf[0] != '\0') {
+ int width = 0, height;
+ darea.create_pango_layout(buf)->get_pixel_size(width, height);
+ darea.set_size_request(width + 2, -1);
+ }
+ }
+ return TRUE;
+}
+
+void
+BarController::set_with_text (bool yn)
+{
+ if (with_text != yn) {
+ with_text = yn;
+ queue_draw ();
+ }
+}
+
+void
+BarController::midicontrol_set_tip ()
+{
+ if (midi_control) {
+ // Gtkmm2ext::UI::instance()->set_tip (&darea, midi_control->control_description());
+ }
+}
+
+void
+BarController::midi_learn()
+{
+ if (midi_control) {
+ prompting = true;
+ midi_control->learn_about_external_control ();
+ }
+}
+
+
+void
+BarController::midicontrol_prompt ()
+{
+ if (prompting) {
+ string prompt = _("operate MIDI controller now");
+ prompter.set_text (prompt);
+ Gtkmm2ext::UI::instance()->touch_display (&prompter);
+
+ unprompting = true;
+ prompting = false;
+ }
+}
+
+void
+BarController::midicontrol_unprompt ()
+{
+ if (unprompting) {
+ Gtkmm2ext::UI::instance()->touch_display (&prompter);
+
+ unprompting = false;
+ }
+}
+
+gint
+BarController::prompter_hiding (GdkEventAny *ev)
+{
+ if (unprompting) {
+ if (midi_control) {
+ midi_control->stop_learning();
+ }
+ unprompting = false;
+ }
+
+ return FALSE;
+}
+
+
+void
+BarController::set_style (Style s)
+{
+ _style = s;
+ darea.queue_draw ();
+}
+
+gint
+BarController::switch_to_bar ()
+{
+ if (switching) {
+ return FALSE;
+ }
+
+ switching = true;
+
+ if (get_child() == &darea) {
+ return FALSE;
+ }
+
+ remove ();
+ add (darea);
+ darea.show ();
+
+ switching = false;
+ return FALSE;
+}
+
+gint
+BarController::switch_to_spinner ()
+{
+ if (switching) {
+ return FALSE;
+ }
+
+ switching = true;
+
+ if (get_child() == &spinner) {
+ return FALSE;
+ }
+
+ remove ();
+ add (spinner);
+ spinner.show ();
+ spinner.grab_focus ();
+
+ switching = false;
+ return FALSE;
+}
+
+void
+BarController::entry_activated ()
+{
+ string text = spinner.get_text ();
+ float val;
+
+ if (sscanf (text.c_str(), "%f", &val) == 1) {
+ adjustment.set_value (val);
+ }
+
+ switch_to_bar ();
+}
+
+gint
+BarController::entry_focus_out (GdkEventFocus* ev)
+{
+ entry_activated ();
+ return TRUE;
+}
+
+void
+BarController::set_use_parent (bool yn)
+{
+ use_parent = yn;
+ queue_draw ();
+}
diff --git a/libs/gtkmm2ext/bindable_button.cc b/libs/gtkmm2ext/bindable_button.cc
new file mode 100644
index 0000000000..c2516a9219
--- /dev/null
+++ b/libs/gtkmm2ext/bindable_button.cc
@@ -0,0 +1,155 @@
+/*
+ Copyright (C) 2004 Paul Davis
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#include <string>
+#include <climits>
+#include <iostream>
+
+#include <midi++/controllable.h>
+
+#include <gtkmm2ext/gtk_ui.h>
+#include <gtkmm2ext/bindable_button.h>
+
+#include "i18n.h"
+
+using namespace Gtkmm2ext;
+using namespace std;
+
+BindableToggleButton::BindableToggleButton (MIDI::Controllable *mc)
+ : ToggleButton (),
+ prompter (Gtk::WIN_POS_MOUSE, 30000, false),
+ midi_control (mc),
+ bind_button (2),
+ bind_statemask (Gdk::CONTROL_MASK)
+
+{
+ init_events ();
+}
+
+BindableToggleButton::BindableToggleButton(MIDI::Controllable *mc, const string &label)
+ : ToggleButton (label),
+ prompter (Gtk::WIN_POS_MOUSE, 30000, false),
+ midi_control (mc),
+ bind_button (2),
+ bind_statemask (Gdk::CONTROL_MASK)
+{
+ init_events ();
+}
+
+
+void
+BindableToggleButton::init_events ()
+{
+ signal_button_press_event().connect (mem_fun (*this, &BindableToggleButton::button_press));
+
+ prompter.signal_unmap_event().connect (mem_fun (*this, &BindableToggleButton::prompter_hiding));
+
+ prompting = false;
+ unprompting = false;
+
+ if (midi_control) {
+ midi_control->learning_started.connect (mem_fun (*this, &BindableToggleButton::midicontrol_prompt));
+ midi_control->learning_stopped.connect (mem_fun (*this, &BindableToggleButton::midicontrol_unprompt));
+ }
+}
+
+void
+BindableToggleButton::set_bind_button_state (guint button, guint statemask)
+{
+ bind_button = button;
+ bind_statemask = statemask;
+}
+
+void
+BindableToggleButton::get_bind_button_state (guint &button, guint &statemask)
+{
+ button = bind_button;
+ statemask = bind_statemask;
+}
+
+void
+BindableToggleButton::midi_learn()
+{
+ if (midi_control) {
+ prompting = true;
+ midi_control->learn_about_external_control ();
+ }
+}
+
+
+gint
+BindableToggleButton::button_press (GdkEventButton *ev)
+{
+
+ if ((ev->state & bind_statemask) && ev->button == bind_button) {
+ midi_learn ();
+ return TRUE;
+ }
+
+ return FALSE;
+}
+
+gint
+BindableToggleButton::prompter_hiding (GdkEventAny *ev)
+{
+ if (unprompting) {
+ if (midi_control) {
+ midi_control->stop_learning();
+ }
+ unprompting = false;
+ }
+
+ return FALSE;
+}
+
+
+void
+BindableToggleButton::midicontrol_set_tip ()
+
+{
+ if (midi_control) {
+ // Gtkmm2ext::UI::instance()->set_tip (evbox, midi_control->control_description());
+ }
+}
+
+void
+BindableToggleButton::midicontrol_prompt ()
+
+{
+ if (prompting) {
+ string prompt = _("operate MIDI controller now");
+ prompter.set_text (prompt);
+ Gtkmm2ext::UI::instance()->touch_display (&prompter);
+
+ unprompting = true;
+ prompting = false;
+ }
+}
+
+void
+BindableToggleButton::midicontrol_unprompt ()
+
+{
+ if (unprompting) {
+ Gtkmm2ext::UI::instance()->touch_display (&prompter);
+ unprompting = false;
+ }
+}
+
+
diff --git a/libs/gtkmm2ext/choice.cc b/libs/gtkmm2ext/choice.cc
new file mode 100644
index 0000000000..5a3b7d0140
--- /dev/null
+++ b/libs/gtkmm2ext/choice.cc
@@ -0,0 +1,97 @@
+/*
+ Copyright (C) 1998-99 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#include <gtkmm2ext/choice.h>
+
+using namespace std;
+using namespace Gtkmm2ext;
+using namespace sigc;
+using namespace Gtk;
+
+Choice::Choice (string prompt,
+ vector<string> choices)
+ : Gtk::Window (WINDOW_TOPLEVEL),
+ prompt_label (prompt)
+{
+ int n;
+ vector<string>::iterator i;
+
+ set_position (WIN_POS_MOUSE);
+ set_name ("ChoiceWindow");
+ add (packer);
+
+ packer.set_spacing (10);
+ packer.set_border_width (10);
+ packer.pack_start (prompt_label);
+ packer.pack_start (button_packer);
+ prompt_label.set_name ("ChoicePrompt");
+
+ for (n = 0, i = choices.begin(); i != choices.end(); ++i, ++n) {
+ Button *button = manage (new Gtk::Button (*i));
+ button->set_name ("ChoiceButton");
+
+ button_packer.set_spacing (5);
+ button_packer.set_homogeneous (true);
+ button_packer.pack_start (*button, false, true);
+
+ button->signal_clicked().connect (bind (mem_fun (*this, &Choice::_choice_made), n));
+ buttons.push_back (button);
+ }
+
+ signal_delete_event().connect(mem_fun(*this, &Choice::closed));
+
+ packer.show_all ();
+ which_choice = -1;
+}
+
+void
+Choice::on_realize ()
+{
+ Gtk::Window::on_realize();
+ Glib::RefPtr<Gdk::Window> win (get_window());
+ win->set_decorations (Gdk::WMDecoration (Gdk::DECOR_BORDER|Gdk::DECOR_RESIZEH));
+}
+
+Choice::~Choice ()
+{
+}
+
+void
+Choice::_choice_made (int nbutton)
+{
+ which_choice = nbutton;
+ choice_made (which_choice);
+ chosen ();
+}
+
+gint
+Choice::closed (GdkEventAny *ev)
+{
+ which_choice = -1;
+ choice_made (which_choice);
+ chosen ();
+ return TRUE;
+}
+
+int
+Choice::get_choice ()
+{
+ return which_choice;
+}
diff --git a/libs/gtkmm2ext/click_box.cc b/libs/gtkmm2ext/click_box.cc
new file mode 100644
index 0000000000..6bd03282eb
--- /dev/null
+++ b/libs/gtkmm2ext/click_box.cc
@@ -0,0 +1,125 @@
+/*
+ Copyright (C) 1999 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#include <iostream>
+#include <cstdio> /* for sprintf, sigh ... */
+
+#include <gtkmm2ext/utils.h>
+#include <gtkmm2ext/click_box.h>
+
+using namespace std;
+using namespace Gtk;
+using namespace Gtkmm2ext;
+using namespace sigc;
+
+ClickBox::ClickBox (Gtk::Adjustment *adjp, const string &name)
+ : AutoSpin (*adjp)
+{
+ print_func = default_printer;
+ print_arg = 0;
+
+ set_name (name);
+ add_events (Gdk::BUTTON_RELEASE_MASK|
+ Gdk::BUTTON_PRESS_MASK|
+ Gdk::ENTER_NOTIFY_MASK|
+ Gdk::LEAVE_NOTIFY_MASK);
+ set_label ();
+
+ get_adjustment().signal_value_changed().connect (mem_fun (*this, &ClickBox::set_label));
+
+ signal_button_press_event().connect (mem_fun (*this, &ClickBox::button_press_handler));
+ signal_button_release_event().connect (mem_fun (*this, &ClickBox::button_release_handler));
+}
+
+ClickBox::~ClickBox ()
+{
+}
+
+bool
+ClickBox::button_press_handler (GdkEventButton* ev)
+{
+ add_modal_grab();
+ AutoSpin::button_press (ev);
+ return true;
+}
+
+bool
+ClickBox::button_release_handler (GdkEventButton* ev)
+{
+ switch (ev->button) {
+ case 1:
+ case 2:
+ case 3:
+ stop_spinning (0);
+ remove_modal_grab();
+ break;
+ default:
+ break;
+ }
+ return true;
+}
+
+void
+ClickBox::default_printer (char buf[32], Gtk::Adjustment &adj,
+ void *ignored)
+{
+ sprintf (buf, "%.2f", adj.get_value());
+}
+
+void
+ClickBox::set_label ()
+{
+ queue_draw ();
+}
+
+bool
+ClickBox::on_expose_event (GdkEventExpose *ev)
+{
+ /* Why do we do things like this rather than use a Gtk::Label?
+ Because whenever Gtk::Label::set_label() is called, it
+ triggers a recomputation of its own size, along with that
+ of its container and on up the tree. That's intended
+ to be unnecessary here.
+ */
+
+ Gtk::DrawingArea::on_expose_event (ev);
+
+ if (print_func) {
+
+ char buf[32];
+
+ Glib::RefPtr<Gtk::Style> style (get_style());
+
+ print_func (buf, get_adjustment(), print_arg);
+
+ Glib::RefPtr <Gdk::Window> win (get_window());
+ win->draw_rectangle (style->get_bg_gc(get_state()),
+ TRUE, 0, 0, -1, -1);
+
+ {
+ int width = 0;
+ int height = 0;
+ create_pango_layout(buf)->get_pixel_size(width, height);
+ set_size_request(width, height);
+ }
+ }
+
+ return true;
+}
diff --git a/libs/gtkmm2ext/controller.cc b/libs/gtkmm2ext/controller.cc
new file mode 100644
index 0000000000..98d5566c69
--- /dev/null
+++ b/libs/gtkmm2ext/controller.cc
@@ -0,0 +1,92 @@
+/*
+ Copyright (C) 1998-99 Paul Davis
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#include <string>
+#include <climits>
+
+#include <midi++/channel.h>
+#include <gtkmm2ext/gtk_ui.h>
+#include <gtkmm2ext/controller.h>
+
+#include "i18n.h"
+
+using namespace Gtkmm2ext;
+
+Controller::Controller (Gtk::Adjustment *adj, MIDI::Port *p)
+ : MIDI::Controllable (p),
+ adjustment (adj),
+ prompter (Gtk::WIN_POS_MOUSE, 30000, false)
+{
+ new_value_pending = false;
+
+ /* hear about MIDI control learning */
+
+ learning_started.connect
+ (mem_fun (*this, &Controller::midicontrol_prompt));
+ learning_stopped.connect
+ (mem_fun (*this, &Controller::midicontrol_unprompt));
+}
+
+void
+Controller::midicontrol_prompt ()
+
+{
+ string prompt = _("operate MIDI controller now");
+
+ prompter.set_text (prompt);
+ Gtkmm2ext::UI::instance()->touch_display (&prompter);
+}
+
+void
+Controller::midicontrol_unprompt ()
+
+{
+ Gtkmm2ext::UI::instance()->touch_display (&prompter);
+}
+
+int
+Controller::update_controller_value (void *arg)
+
+{
+ Controller *c = (Controller *) arg;
+
+ c->adjustment->set_value (c->new_value);
+ c->new_value_pending = false;
+
+ return FALSE;
+}
+
+void
+Controller::set_value (float v)
+
+{
+ /* This is called from a MIDI callback. It could happen
+ a thousand times a second, or more. Therefore, instead
+ of going straight to the X server, which may not work for
+ thread-related reasons, simply request an update whenever
+ the GTK main loop is idle.
+ */
+
+ new_value = v;
+
+ if (!new_value_pending) {
+ new_value_pending = true;
+ Gtkmm2ext::UI::instance()->idle_add (update_controller_value, this);
+ }
+}
diff --git a/libs/gtkmm2ext/fastmeter.cc b/libs/gtkmm2ext/fastmeter.cc
new file mode 100644
index 0000000000..3eff07e915
--- /dev/null
+++ b/libs/gtkmm2ext/fastmeter.cc
@@ -0,0 +1,291 @@
+/*
+ Copyright (C) 2003 Paul Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#include <iostream>
+#include <cmath>
+#include <algorithm>
+#include <gdkmm/rectangle.h>
+#include <gtkmm2ext/fastmeter.h>
+#include <gtkmm/style.h>
+
+using namespace Gtk;
+using namespace Gtkmm2ext;
+using namespace std;
+
+Glib::RefPtr<Gdk::Pixmap> *FastMeter::v_pixmap = 0;
+Glib::RefPtr<Gdk::Bitmap> *FastMeter::v_mask = 0;
+gint FastMeter::v_pixheight = 0;
+gint FastMeter::v_pixwidth = 0;
+
+Glib::RefPtr<Gdk::Pixmap> *FastMeter::h_pixmap = 0;
+Glib::RefPtr<Gdk::Bitmap> *FastMeter::h_mask = 0;
+gint FastMeter::h_pixheight = 0;
+gint FastMeter::h_pixwidth = 0;
+
+FastMeter::FastMeter (long hold, unsigned long dimen, Orientation o)
+{
+ orientation = o;
+ hold_cnt = hold;
+ hold_state = 0;
+ current_peak = 0;
+ current_level = 0;
+ current_user_level = -100.0f;
+
+ set_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK);
+
+ pixrect.set_x(0);
+ pixrect.set_y(0);
+
+ if (orientation == Vertical) {
+ pixrect.set_width(min (v_pixwidth, (gint) dimen));
+ pixrect.set_height(v_pixheight);
+ } else {
+ pixrect.set_width(h_pixwidth);
+ pixrect.set_height(min (h_pixheight, (gint) dimen));
+ }
+
+ request_width = pixrect.get_width();
+ request_height= pixrect.get_height();
+
+ backing = 0;
+}
+
+FastMeter::~FastMeter ()
+{
+ if (backing) {
+ (*backing)->unreference();
+ }
+}
+
+void
+FastMeter::set_vertical_xpm (const char **xpm)
+{
+ if (v_pixmap == 0) {
+ gint w, h;
+
+ *v_pixmap = Gdk::Pixmap::create_from_xpm(Gdk::Colormap::get_system(), *v_mask, xpm);
+
+ (*v_pixmap)->get_size(w, h);
+
+ v_pixheight = h;
+ v_pixwidth = w;
+ }
+}
+
+void
+FastMeter::set_horizontal_xpm (const char **xpm)
+{
+ if (h_pixmap == 0) {
+ gint w, h;
+
+ *h_pixmap = Gdk::Pixmap::create_from_xpm(Gdk::Colormap::get_system(), *h_mask, xpm);
+
+ (*h_pixmap)->get_size(w, h);
+
+ h_pixheight = h;
+ h_pixwidth = w;
+ }
+}
+
+void
+FastMeter::set_hold_count (long val)
+{
+ if (val < 1) {
+ val = 1;
+ }
+
+ hold_cnt = val;
+ hold_state = 0;
+ current_peak = 0;
+
+ queue_draw ();
+}
+
+void
+FastMeter::on_size_request (GtkRequisition* req)
+{
+ req->width = request_width;
+ req->height = request_height;
+}
+
+bool
+FastMeter::on_expose_event (GdkEventExpose* ev)
+{
+ if (orientation == Vertical) {
+ return vertical_expose (ev);
+ } else {
+ return horizontal_expose (ev);
+ }
+}
+
+bool
+FastMeter::vertical_expose (GdkEventExpose* ev)
+{
+ Gdk::Rectangle intersect;
+ gint top_of_meter;
+ bool blit = false;
+ bool intersecting = false;
+
+ top_of_meter = (gint) floor (v_pixheight * current_level);
+ pixrect.set_height(v_pixheight - top_of_meter); /* bottom of background */
+
+ if (backing == 0) {
+ *backing = Gdk::Pixmap::create (get_window(), get_width(), get_height());
+ }
+
+ intersect = pixrect.intersect(Glib::wrap(&ev->area), intersecting);
+ if (intersecting) {
+
+ /* paint the background (black). */
+ (*backing)->draw_rectangle(get_style()->get_black_gc(), true, intersect.get_x(), intersect.get_y(), intersect.get_width(), intersect.get_height());
+ blit = true;
+ }
+
+ pixrect.set_height(top_of_meter);
+
+ intersect = pixrect.intersect(Glib::wrap(&ev->area), intersecting);
+ if (intersecting) {
+ /* draw the part of the meter image that we need. the area we draw is bounded "in reverse" (top->bottom)
+ */
+
+ (*backing)->draw_drawable(get_style()->get_fg_gc(get_state()), *v_pixmap,
+ intersect.get_x(), v_pixheight - top_of_meter,
+ intersect.get_x(), v_pixheight - top_of_meter,
+ intersect.get_width(), intersect.get_height());
+
+ blit = true;
+ }
+
+ /* draw peak bar */
+
+ if (hold_state) {
+ (*backing)->draw_drawable(get_style()->get_fg_gc(get_state()), *v_pixmap,
+ intersect.get_x(), v_pixheight - (gint) floor (v_pixheight * current_peak),
+ intersect.get_x(), v_pixheight - (gint) floor (v_pixheight * current_peak),
+ intersect.get_width(), 3);
+ }
+
+ /* bilt to on-screen drawable */
+
+ if (blit) {
+ Glib::RefPtr<Gdk::Window> win (get_window());
+ win->draw_drawable(get_style()->get_fg_gc(get_state()), *backing,
+ ev->area.x, ev->area.y,
+ ev->area.x, ev->area.y,
+ ev->area.width, ev->area.height);
+ }
+
+ return true;
+}
+
+bool
+FastMeter::horizontal_expose (GdkEventExpose* ev)
+{
+ Gdk::Rectangle intersect;
+ bool intersecting = false;
+ gint right_of_meter;
+ bool blit = false;
+
+ right_of_meter = (gint) floor (h_pixwidth * current_level);
+
+ pixrect.set_x(right_of_meter);
+ pixrect.set_y(0);
+ pixrect.set_width(h_pixwidth - right_of_meter);
+
+ if (backing == 0) {
+ *backing = Gdk::Pixmap::create(get_window(), get_width(), get_height());
+ }
+
+ intersect = pixrect.intersect(Glib::wrap(&ev->area), intersecting);
+ if (intersecting) {
+ /* paint the background (black). */
+
+ (*backing)->draw_rectangle(get_style()->get_black_gc(), true,
+ intersect.get_x(), intersect.get_y(),
+ intersect.get_width(), intersect.get_height());
+ blit = true;
+ }
+
+ pixrect.set_x(0);
+ pixrect.set_width(right_of_meter);
+
+ intersect = pixrect.intersect(Glib::wrap(&ev->area), intersecting);
+ if (intersecting) {
+ /* draw the part of the meter image that we need.
+ */
+
+ (*backing)->draw_drawable(get_style()->get_fg_gc(get_state()), *h_pixmap,
+ intersect.get_x(), intersect.get_y(),
+ intersect.get_x(), intersect.get_y(),
+ intersect.get_width(), intersect.get_height());
+
+ blit = true;
+ }
+
+ /* draw peak bar */
+
+ if (hold_state) {
+ (*backing)->draw_drawable(get_style()->get_fg_gc(get_state()), *h_pixmap,
+ right_of_meter, intersect.get_y(),
+ right_of_meter, intersect.get_y(),
+ 3, intersect.get_height());
+ }
+
+ /* bilt to on-screen drawable */
+
+ if (blit) {
+ Glib::RefPtr<Gdk::Window> win(get_window());
+ win->draw_drawable(get_style()->get_fg_gc(get_state()), *backing,
+ ev->area.x, ev->area.y,
+ ev->area.x, ev->area.y,
+ ev->area.width, ev->area.height);
+ }
+
+ return true;
+}
+
+void
+FastMeter::set (float lvl, float usrlvl)
+{
+ current_level = lvl;
+ current_user_level = usrlvl;
+
+ if (lvl > current_peak) {
+ current_peak = lvl;
+ hold_state = hold_cnt;
+ }
+
+ if (hold_state > 0) {
+ if (--hold_state == 0) {
+ current_peak = lvl;
+ }
+ }
+
+ queue_draw ();
+}
+
+void
+FastMeter::clear ()
+{
+ current_level = 0;
+ current_peak = 0;
+ hold_state = 0;
+ queue_draw ();
+}
diff --git a/libs/gtkmm2ext/gettext.h b/libs/gtkmm2ext/gettext.h
new file mode 100644
index 0000000000..339c74ffe7
--- /dev/null
+++ b/libs/gtkmm2ext/gettext.h
@@ -0,0 +1,82 @@
+/* Convenience header for conditional use of GNU <libintl.h>.
+ Copyright (C) 1995-1998, 2000-2002 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Library General Public License as published
+ by the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+ USA. */
+
+#ifndef _LIBGETTEXT_H
+#define _LIBGETTEXT_H 1
+
+/* NLS can be disabled through the configure --disable-nls option. */
+#if ENABLE_NLS
+
+/* Get declarations of GNU message catalog functions. */
+# include <libintl.h>
+
+#else
+
+/* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which
+ chokes if dcgettext is defined as a macro. So include it now, to make
+ later inclusions of <locale.h> a NOP. We don't include <libintl.h>
+ as well because people using "gettext.h" will not include <libintl.h>,
+ and also including <libintl.h> would fail on SunOS 4, whereas <locale.h>
+ is OK. */
+#if defined(__sun)
+# include <locale.h>
+#endif
+
+/* Disabled NLS.
+ The casts to 'const char *' serve the purpose of producing warnings
+ for invalid uses of the value returned from these functions.
+ On pre-ANSI systems without 'const', the config.h file is supposed to
+ contain "#define const". */
+
+/* other headers may have included libintl.h */
+
+# undef gettext
+# undef dgettext
+# undef dcgettext
+# undef ngettext
+# undef dngettext
+# undef dcngettext
+# undef textdomain
+# undef bindtextdomain
+# undef bind_textdomain_codeset
+
+# define gettext(Msgid) ((const char *) (Msgid))
+# define dgettext(Domainname, Msgid) ((const char *) (Msgid))
+# define dcgettext(Domainname, Msgid, Category) ((const char *) (Msgid))
+# define ngettext(Msgid1, Msgid2, N) \
+ ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
+# define dngettext(Domainname, Msgid1, Msgid2, N) \
+ ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
+# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
+ ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
+# define textdomain(Domainname) ((const char *) (Domainname))
+# define bindtextdomain(Domainname, Dirname) ((const char *) (Dirname))
+# define bind_textdomain_codeset(Domainname, Codeset) ((const char *) (Codeset))
+
+#endif
+
+/* A pseudo function call that serves as a marker for the automated
+ extraction of messages, but does not call gettext(). The run-time
+ translation is done at a different place in the code.
+ The argument, String, should be a literal string. Concatenated strings
+ and other string expressions won't work.
+ The macro's expansion is not parenthesized, so that it is suitable as
+ initializer for static 'char[]' or 'const char[]' variables. */
+#define gettext_noop(String) String
+
+#endif /* _LIBGETTEXT_H */
diff --git a/libs/gtkmm2ext/gtk_ui.cc b/libs/gtkmm2ext/gtk_ui.cc
new file mode 100644
index 0000000000..d2a551144d
--- /dev/null
+++ b/libs/gtkmm2ext/gtk_ui.cc
@@ -0,0 +1,823 @@
+/*
+ Copyright (C) 1999-2002 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#include <cmath>
+#include <fcntl.h>
+#include <signal.h>
+#include <unistd.h>
+#include <cerrno>
+#include <climits>
+#include <cctype>
+
+#include <gtkmm.h>
+#include <pbd/error.h>
+#include <pbd/touchable.h>
+#include <pbd/failed_constructor.h>
+#include <pbd/pthread_utils.h>
+
+#include <gtkmm2ext/gtk_ui.h>
+#include <gtkmm2ext/textviewer.h>
+#include <gtkmm2ext/popup.h>
+#include <gtkmm2ext/utils.h>
+
+#include "i18n.h"
+
+using namespace Gtkmm2ext;
+using std::map;
+
+pthread_t UI::gui_thread;
+UI *UI::theGtkUI = 0;
+
+UI::UI (string name, int *argc, char ***argv, string rcfile)
+ : _ui_name (name)
+{
+ theMain = new Gtk::Main (argc, argv);
+ tips = new Gtk::Tooltips;
+
+ if (pthread_key_create (&thread_request_buffer_key, 0)) {
+ cerr << _("cannot create thread request buffer key") << endl;
+ throw failed_constructor();
+ }
+
+ PBD::ThreadCreated.connect (mem_fun (*this, &UI::register_thread));
+
+ _ok = false;
+ _active = false;
+
+ if (!theGtkUI) {
+ theGtkUI = this;
+ gui_thread = pthread_self ();
+ } else {
+ fatal << "duplicate UI requested" << endmsg;
+ /* NOTREACHED */
+ }
+
+ if (setup_signal_pipe ()) {
+ return;
+ }
+
+ load_rcfile (rcfile);
+
+ errors = new TextViewer (850,100);
+ errors->text().set_editable (false);
+ errors->text().set_name ("ErrorText");
+
+ string title;
+ title = _ui_name;
+ title += ": Log";
+ errors->set_title (title);
+
+ errors->dismiss_button().set_name ("ErrorLogCloseButton");
+// errors->realize();
+
+ Glib::RefPtr<Gdk::Window> win(errors->get_window());
+ win->set_decorations (Gdk::WMDecoration (Gdk::DECOR_BORDER|Gdk::DECOR_RESIZEH));
+
+ errors->signal_delete_event().connect (bind (ptr_fun (just_hide_it), (Gtk::Window *) errors));
+
+ register_thread (pthread_self(), X_("GUI"));
+
+ _ok = true;
+}
+
+UI::~UI ()
+{
+ close (signal_pipe[0]);
+ close (signal_pipe[1]);
+}
+
+int
+UI::load_rcfile (string path)
+{
+ if (path.length() == 0) {
+ return -1;
+ }
+
+ if (access (path.c_str(), R_OK)) {
+ error << "UI: couldn't find rc file \""
+ << path
+ << '"'
+ << endmsg;
+ return -1;
+ }
+
+ gtk_rc_parse (path.c_str());
+
+ Gtk::Label *a_widget1;
+ Gtk::Label *a_widget2;
+ Gtk::Label *a_widget3;
+ Gtk::Label *a_widget4;
+
+ a_widget1 = new Gtk::Label;
+ a_widget2 = new Gtk::Label;
+ a_widget3 = new Gtk::Label;
+ a_widget4 = new Gtk::Label;
+
+ a_widget1->set_name ("FatalMessage");
+ a_widget1->ensure_style ();
+ fatal_message_style = a_widget1->get_style();
+
+ a_widget2->set_name ("ErrorMessage");
+ a_widget2->ensure_style ();
+ error_message_style = a_widget2->get_style();
+
+ a_widget3->set_name ("WarningMessage");
+ a_widget3->ensure_style ();
+ warning_message_style = a_widget3->get_style();
+
+ a_widget4->set_name ("InfoMessage");
+ a_widget4->ensure_style ();
+ info_message_style = a_widget4->get_style();
+
+ delete a_widget1;
+ delete a_widget2;
+ delete a_widget3;
+ delete a_widget4;
+
+ return 0;
+}
+
+void
+UI::run (Receiver &old_receiver)
+{
+ listen_to (error);
+ listen_to (info);
+ listen_to (warning);
+ listen_to (fatal);
+
+ old_receiver.hangup ();
+ starting ();
+ _active = true;
+ theMain->run ();
+ _active = false;
+ stopping ();
+ hangup ();
+ return;
+}
+
+bool
+UI::running ()
+{
+ return _active;
+}
+
+void
+UI::kill ()
+{
+ if (_active) {
+ pthread_kill (gui_thread, SIGKILL);
+ }
+}
+
+void
+UI::quit ()
+{
+ request (Quit);
+}
+
+void
+UI::do_quit ()
+{
+ Gtk::Main::quit();
+}
+
+void
+UI::touch_display (Touchable *display)
+{
+ Request *req = get_request (TouchDisplay);
+
+ if (req == 0) {
+ return;
+ }
+
+ req->display = display;
+
+ send_request (req);
+}
+
+void
+UI::call_slot (sigc::slot<void> slot)
+{
+ Request *req = get_request (CallSlot);
+
+ if (req == 0) {
+ return;
+ }
+
+ req->slot = slot;
+
+ send_request (req);
+}
+
+void
+UI::call_slot_locked (sigc::slot<void> slot)
+{
+ if (caller_is_gui_thread()) {
+ call_slot (slot);
+ return;
+ }
+
+ Request *req = get_request (CallSlotLocked);
+
+ if (req == 0) {
+ return;
+ }
+
+ req->slot = slot;
+
+ pthread_mutex_init (&req->slot_lock, NULL);
+ pthread_cond_init (&req->slot_cond, NULL);
+ pthread_mutex_lock (&req->slot_lock);
+
+ send_request (req);
+
+ pthread_cond_wait (&req->slot_cond, &req->slot_lock);
+ pthread_mutex_unlock (&req->slot_lock);
+
+ delete req;
+}
+
+void
+UI::set_tip (Gtk::Widget *w, const gchar *tip, const gchar *hlp)
+{
+ Request *req = get_request (SetTip);
+
+ if (req == 0) {
+ return;
+ }
+
+ req->widget = w;
+ req->msg = tip;
+ req->msg2 = hlp;
+
+ send_request (req);
+}
+
+void
+UI::set_state (Gtk::Widget *w, Gtk::StateType state)
+{
+ Request *req = get_request (StateChange);
+
+ if (req == 0) {
+ return;
+ }
+
+ req->new_state = state;
+ req->widget = w;
+
+ send_request (req);
+}
+
+void
+UI::idle_add (int (*func)(void *), void *arg)
+{
+ Request *req = get_request (AddIdle);
+
+ if (req == 0) {
+ return;
+ }
+
+ req->function = func;
+ req->arg = arg;
+
+ send_request (req);
+}
+
+void
+UI::timeout_add (unsigned int timeout, int (*func)(void *), void *arg)
+{
+ Request *req = get_request (AddTimeout);
+
+ if (req == 0) {
+ return;
+ }
+
+ req->function = func;
+ req->arg = arg;
+ req->timeout = timeout;
+
+ send_request (req);
+}
+
+/* END abstract_ui interfaces */
+
+/* Handling requests */
+
+void
+UI::register_thread (pthread_t thread_id, string name)
+{
+ RingBufferNPT<Request>* b = new RingBufferNPT<Request> (128);
+
+ {
+ PBD::LockMonitor lm (request_buffer_map_lock, __LINE__, __FILE__);
+ request_buffers[thread_id] = b;
+ }
+
+ pthread_setspecific (thread_request_buffer_key, b);
+}
+
+UI::Request::Request()
+{
+
+}
+
+UI::Request*
+UI::get_request (RequestType rt)
+{
+ RingBufferNPT<Request>* rbuf = static_cast<RingBufferNPT<Request>* >(pthread_getspecific (thread_request_buffer_key));
+
+ if (rbuf == 0) {
+ /* Cannot happen, but if it does we can't use the error reporting mechanism */
+ cerr << _("programming error: ")
+ << compose (X_("no GUI request buffer found for thread %1"), pthread_self())
+ << endl;
+ abort ();
+ }
+
+ RingBufferNPT<Request>::rw_vector vec;
+
+ rbuf->get_write_vector (&vec);
+
+ if (vec.len[0] == 0) {
+ if (vec.len[1] == 0) {
+ cerr << compose (X_("no space in GUI request buffer for thread %1"), pthread_self())
+ << endl;
+ return 0;
+ } else {
+ vec.buf[1]->type = rt;
+ return vec.buf[1];
+ }
+ } else {
+ vec.buf[0]->type = rt;
+ return vec.buf[0];
+ }
+}
+
+int
+UI::setup_signal_pipe ()
+{
+ /* setup the pipe that other threads send us notifications/requests
+ through.
+ */
+
+ if (pipe (signal_pipe)) {
+ error << "UI: cannot create error signal pipe ("
+ << strerror (errno) << ")"
+ << endmsg;
+
+ return -1;
+ }
+
+ if (fcntl (signal_pipe[0], F_SETFL, O_NONBLOCK)) {
+ error << "UI: cannot set O_NONBLOCK on "
+ "signal read pipe ("
+ << strerror (errno) << ")"
+ << endmsg;
+ return -1;
+ }
+
+ if (fcntl (signal_pipe[1], F_SETFL, O_NONBLOCK)) {
+ error << "UI: cannot set O_NONBLOCK on "
+ "signal write pipe ("
+ << strerror (errno)
+ << ")"
+ << endmsg;
+ return -1;
+ }
+
+ /* add the pipe to the select/poll loop that GDK does */
+
+ gdk_input_add (signal_pipe[0],
+ GDK_INPUT_READ,
+ UI::signal_pipe_callback,
+ this);
+
+ return 0;
+}
+
+void
+UI::signal_pipe_callback (void *arg, int fd, GdkInputCondition cond)
+{
+ char buf[256];
+
+ /* flush (nonblocking) pipe */
+
+ while (read (fd, buf, 256) > 0);
+
+ ((UI *) arg)->handle_ui_requests ();
+}
+
+void
+UI::handle_ui_requests ()
+{
+ RequestBufferMap::iterator i;
+
+ request_buffer_map_lock.lock ();
+
+ for (i = request_buffers.begin(); i != request_buffers.end(); ++i) {
+
+ RingBufferNPT<Request>::rw_vector vec;
+
+ while (true) {
+
+ /* we must process requests 1 by 1 because
+ the request may run a recursive main
+ event loop that will itself call
+ handle_ui_requests. when we return
+ from the request handler, we cannot
+ expect that the state of queued requests
+ is even remotely consistent with
+ the condition before we called it.
+ */
+
+ i->second->get_read_vector (&vec);
+
+ if (vec.len[0] == 0) {
+ break;
+ } else {
+ /* copy constructor does a deep
+ copy of the Request object,
+ unlike Ringbuffer::read()
+ */
+ Request req (*vec.buf[0]);
+ i->second->increment_read_ptr (1);
+ request_buffer_map_lock.unlock ();
+ do_request (&req);
+ request_buffer_map_lock.lock ();
+ }
+ }
+ }
+
+ request_buffer_map_lock.unlock ();
+}
+
+void
+UI::do_request (Request* req)
+{
+ switch (req->type) {
+ case ErrorMessage:
+ process_error_message (req->chn, req->msg);
+ free (const_cast<char*>(req->msg)); /* it was strdup'ed */
+ break;
+
+ case Quit:
+ do_quit ();
+ break;
+
+ case CallSlot:
+ req->slot ();
+ break;
+
+ case CallSlotLocked:
+ pthread_mutex_lock (&req->slot_lock);
+ req->slot ();
+ pthread_cond_signal (&req->slot_cond);
+ pthread_mutex_unlock (&req->slot_lock);
+ break;
+
+ case TouchDisplay:
+ req->display->touch ();
+ if (req->display->delete_after_touch()) {
+ delete req->display;
+ }
+ break;
+
+ case StateChange:
+ req->widget->set_state (req->new_state);
+ break;
+
+ case SetTip:
+ /* XXX need to figure out how this works */
+ break;
+
+ case AddIdle:
+ gtk_idle_add (req->function, req->arg);
+ break;
+
+ case AddTimeout:
+ gtk_timeout_add (req->timeout, req->function, req->arg);
+ break;
+
+ default:
+ error << "UI: unknown request type "
+ << (int) req->type
+ << endmsg;
+ }
+}
+
+void
+UI::send_request (Request *req)
+{
+ if (instance() == 0) {
+ return; /* XXX is this the right thing to do ? */
+ }
+
+ if (caller_is_gui_thread()) {
+ // cerr << "GUI thread sent request " << req << " type = " << req->type << endl;
+ do_request (req);
+ } else {
+ const char c = 0;
+ RingBufferNPT<Request*>* rbuf = static_cast<RingBufferNPT<Request*> *> (pthread_getspecific (thread_request_buffer_key));
+
+ if (rbuf == 0) {
+ /* can't use the error system to report this, because this
+ thread isn't registered!
+ */
+ cerr << _("programming error: ")
+ << compose (X_("UI::send_request() called from %1, but no request buffer exists for that thread"),
+ pthread_self())
+ << endl;
+ abort ();
+ }
+
+ // cerr << "thread " << pthread_self() << " sent request " << req << " type = " << req->type << endl;
+ rbuf->increment_write_ptr (1);
+ write (signal_pipe[1], &c, 1);
+ }
+}
+
+void
+UI::request (RequestType rt)
+{
+ Request *req = get_request (rt);
+
+ if (req == 0) {
+ return;
+ }
+
+ send_request (req);
+}
+
+/*======================================================================
+ Error Display
+ ======================================================================*/
+
+void
+UI::receive (Transmitter::Channel chn, const char *str)
+{
+ if (caller_is_gui_thread()) {
+ process_error_message (chn, str);
+ } else {
+ Request* req = get_request (ErrorMessage);
+
+ if (req == 0) {
+ return;
+ }
+
+ req->chn = chn;
+ req->msg = strdup (str);
+
+ send_request (req);
+ }
+}
+
+#define OLD_STYLE_ERRORS 1
+
+void
+UI::process_error_message (Transmitter::Channel chn, const char *str)
+{
+ Glib::RefPtr<Gtk::Style> style;
+ char *prefix;
+ size_t prefix_len;
+ bool fatal_received = false;
+#ifndef OLD_STYLE_ERRORS
+ PopUp* popup = new PopUp (Gtk::WIN_POS_CENTER, 0, true);
+#endif
+
+ switch (chn) {
+ case Transmitter::Fatal:
+ prefix = "[FATAL]: ";
+ style = fatal_message_style;
+ prefix_len = 9;
+ fatal_received = true;
+ break;
+ case Transmitter::Error:
+#if OLD_STYLE_ERRORS
+ prefix = "[ERROR]: ";
+ style = error_message_style;
+ prefix_len = 9;
+#else
+ popup->set_name ("ErrorMessage");
+ popup->set_text (str);
+ popup->touch ();
+ return;
+#endif
+ break;
+ case Transmitter::Info:
+#if OLD_STYLE_ERRORS
+ prefix = "[INFO]: ";
+ style = info_message_style;
+ prefix_len = 8;
+#else
+ popup->set_name ("InfoMessage");
+ popup->set_text (str);
+ popup->touch ();
+ return;
+#endif
+
+ break;
+ case Transmitter::Warning:
+#if OLD_STYLE_ERRORS
+ prefix = "[WARNING]: ";
+ style = warning_message_style;
+ prefix_len = 11;
+#else
+ popup->set_name ("WarningMessage");
+ popup->set_text (str);
+ popup->touch ();
+ return;
+#endif
+ break;
+ default:
+ /* no choice but to use text/console output here */
+ cerr << "programmer error in UI::check_error_messages (channel = " << chn << ")\n";
+ ::exit (1);
+ }
+
+ errors->text().get_buffer()->begin_user_action();
+
+ if (fatal_received) {
+ handle_fatal (str);
+ } else {
+
+ display_message (prefix, prefix_len, style, str);
+
+ if (!errors->is_visible()) {
+ toggle_errors();
+ }
+ }
+
+ errors->text().get_buffer()->end_user_action();
+}
+
+void
+UI::toggle_errors ()
+{
+ if (!errors->is_visible()) {
+ errors->set_position (Gtk::WIN_POS_MOUSE);
+ errors->show ();
+ } else {
+ errors->hide ();
+ }
+}
+
+void
+UI::display_message (const char *prefix, gint prefix_len, Glib::RefPtr<Gtk::Style> style, const char *msg)
+{
+ Glib::RefPtr<Gtk::TextBuffer::Tag> ptag = Gtk::TextBuffer::Tag::create();
+ Glib::RefPtr<Gtk::TextBuffer::Tag> mtag = Gtk::TextBuffer::Tag::create();
+
+ Pango::FontDescription pfont(style->get_font());
+ ptag->property_font_desc().set_value(pfont);
+ ptag->property_foreground_gdk().set_value(style->get_fg(Gtk::STATE_ACTIVE));
+ ptag->property_background_gdk().set_value(style->get_bg(Gtk::STATE_ACTIVE));
+
+ Pango::FontDescription mfont (style->get_font());
+ mtag->property_font_desc().set_value(mfont);
+ mtag->property_foreground_gdk().set_value(style->get_fg(Gtk::STATE_NORMAL));
+ mtag->property_background_gdk().set_value(style->get_bg(Gtk::STATE_NORMAL));
+
+ Glib::RefPtr<Gtk::TextBuffer> buffer (errors->text().get_buffer());
+ buffer->insert_with_tag(buffer->end(), prefix, ptag);
+ buffer->insert_with_tag(buffer->end(), msg, mtag);
+ buffer->insert_with_tag(buffer->end(), "\n", mtag);
+
+ errors->scroll_to_bottom ();
+}
+
+void
+UI::handle_fatal (const char *message)
+{
+ Gtk::Window win (Gtk::WINDOW_POPUP);
+ Gtk::VBox packer;
+ Gtk::Label label (message);
+ Gtk::Button quit (_("Press To Exit"));
+
+ win.set_default_size (400, 100);
+
+ string title;
+ title = _ui_name;
+ title += ": Fatal Error";
+ win.set_title (title);
+
+ win.set_position (Gtk::WIN_POS_MOUSE);
+ win.add (packer);
+
+ packer.pack_start (label, true, true);
+ packer.pack_start (quit, false, false);
+ quit.signal_clicked().connect(mem_fun(*this,&UI::quit));
+
+ win.show_all ();
+ win.set_modal (true);
+
+ theMain->run ();
+
+ exit (1);
+}
+
+void
+UI::popup_error (const char *text)
+{
+ PopUp *pup;
+
+ if (!caller_is_gui_thread()) {
+ error << "non-UI threads can't use UI::popup_error"
+ << endmsg;
+ return;
+ }
+
+ pup = new PopUp (Gtk::WIN_POS_MOUSE, 0, true);
+ pup->set_text (text);
+ pup->touch ();
+}
+
+
+void
+UI::flush_pending ()
+{
+ if (!caller_is_gui_thread()) {
+ error << "non-UI threads cannot call UI::flush_pending()"
+ << endmsg;
+ return;
+ }
+
+ gtk_main_iteration();
+
+ while (gtk_events_pending()) {
+ gtk_main_iteration();
+ }
+}
+
+bool
+UI::just_hide_it (GdkEventAny *ev, Gtk::Window *win)
+{
+ win->hide_all ();
+ return true;
+}
+
+Gdk::Color
+UI::get_color (const string& prompt, bool& picked, Gdk::Color* initial)
+{
+ Gdk::Color color;
+
+ Gtk::ColorSelectionDialog color_dialog (prompt);
+
+ color_dialog.set_modal (true);
+ color_dialog.get_cancel_button()->signal_clicked().connect (bind (mem_fun (*this, &UI::color_selection_done), false));
+ color_dialog.get_ok_button()->signal_clicked().connect (bind (mem_fun (*this, &UI::color_selection_done), true));
+ color_dialog.signal_delete_event().connect (mem_fun (*this, &UI::color_selection_deleted));
+
+ if (initial) {
+ color_dialog.get_colorsel()->set_current_color (*initial);
+ }
+
+ color_dialog.show_all ();
+ color_picked = false;
+ picked = false;
+
+ Gtk::Main::run();
+
+ color_dialog.hide_all ();
+
+ if (color_picked) {
+ Gdk::Color f_rgba = color_dialog.get_colorsel()->get_current_color ();
+ color.set_red(f_rgba.get_red());
+ color.set_green(f_rgba.get_green());
+ color.set_blue(f_rgba.get_blue());
+
+ picked = true;
+ }
+
+ return color;
+}
+
+void
+UI::color_selection_done (bool status)
+{
+ color_picked = status;
+ Gtk::Main::quit ();
+}
+
+bool
+UI::color_selection_deleted (GdkEventAny *ev)
+{
+ Gtk::Main::quit ();
+ return true;
+}
diff --git a/libs/gtkmm2ext/gtkmm2ext-config.in b/libs/gtkmm2ext/gtkmm2ext-config.in
new file mode 100644
index 0000000000..2744b20c52
--- /dev/null
+++ b/libs/gtkmm2ext/gtkmm2ext-config.in
@@ -0,0 +1,232 @@
+#!/bin/sh
+
+af_libs=
+af_cflags=
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+
+
+##
+## Define usage()
+##
+usage()
+{
+ cat <<EOF
+Usage: pbd-config [OPTIONS] [LIBRARIES]
+Options:
+ --cflags print pre-processor and compiler flags
+ --libs print library linking information
+ --libs-dirs only print the -L/-R part of --libs
+ --libs-names only print the -l part of --libs
+ --help display this help and exit
+ --macros print the path to m4 macros
+
+ --prefix[=DIR]
+ --exec_prefix[=DIR]
+ --version output gtkmm2ext version information
+Libraries:
+ gtkmm2ext
+EOF
+ exit $1
+}
+
+##
+## Process options
+##
+parse()
+{
+# we must be called with at least one argument
+if test $# -eq 0; then
+ usage 1 1>&2
+fi
+
+# at least one option should be selected
+case "$1" in
+ --*)
+ ;;
+ *)
+ usage 1 1>&2
+ ;;
+esac
+
+# grab all -- arguments
+while test $# -gt 0; do
+ case "$1" in
+ -*=*) af_optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) af_optarg= ;;
+ esac
+
+ case $1 in
+ --help)
+ usage 0 0>&2
+ ;;
+ --cflags)
+ af_echo_cflags=yes
+ ;;
+ --libs)
+ af_echo_libs_L=yes
+ af_echo_libs_l=yes
+ ;;
+ --libs-dirs)
+ af_echo_libs_L=yes
+ ;;
+ --libs-names)
+ af_echo_libs_l=yes
+ ;;
+ --macros*)
+
+echo -I @prefix@/include/gtkmm2ext/macros
+exit
+
+ ;;
+ --prefix=*)
+ prefix=$af_optarg
+ af_prefix_set=yes
+ ;;
+ --prefix)
+ af_echo_prefix=yes
+ ;;
+ --exec_prefix=*)
+ exec_prefix=$af_optarg
+ af_exec_prefix_set=yes
+ ;;
+ --exec_prefix)
+ af_echo_exec_prefix=yes
+ ;;
+ --version)
+ af_echo_version=yes
+ ;;
+ --*)
+ usage 1 1>&2
+ ;;
+ *)
+ break
+ ;;
+ esac
+ shift
+done
+
+# if we have a default library use it
+if test $# -eq 0; then
+if test "X$af_lib_default" != "X"; then
+ af_lib__AF_LIB_DEFAULT=yes
+ return
+fi
+fi
+
+while test $# -gt 0; do
+ case $1 in
+ gtkmm2ext)
+ af_lib_gtkmm2ext=yes
+ ;;
+ *)
+ usage 1 1>&2
+ ;;
+ esac
+ shift
+done
+}
+
+print_result()
+{
+if test "X$af_echo_cflags" = "Xyes"; then
+ af_all_flags="$af_cflags"
+fi
+
+if test "X$af_echo_libs_L" = "Xyes" || test "X$af_echo_libs_l" = "Xyes"; then
+ af_all_flags="$af_all_flags $af_libs"
+fi
+
+if test -z "$af_all_flags" || test "X$af_all_flags" = "X "; then
+ exit 1
+fi
+
+# Straight out any possible duplicates, but be careful to
+# get `-lfoo -lbar -lbaz' for `-lfoo -lbaz -lbar -lbaz'
+af_other_flags=
+af_lib_L_flags=
+af_rev_libs=
+for i in $af_all_flags; do
+ case "$i" in
+ # a library, save it for later, in reverse order
+ -l*) af_rev_libs="$i $af_rev_libs" ;;
+ -L*|-R*)
+ if test "X$af_echo_libs_L" = "Xyes"; then
+ case " $af_lib_L_flags " in
+ *\ $i\ *) ;; # already there
+ *) af_lib_L_flags="$af_lib_L_flags $i" ;; # add it to output
+ esac
+ fi;;
+ *)
+ case " $af_other_flags " in
+ *\ $i\ *) ;; # already there
+ *) af_other_flags="$af_other_flags $i" ;; # add it to output
+ esac ;;
+ esac
+done
+
+af_ord_libs=
+if test "X$af_echo_libs_l" = "Xyes"; then
+ for i in $af_rev_libs; do
+ case " $af_ord_libs " in
+ *\ $i\ *) ;; # already there
+ *) af_ord_libs="$i $af_ord_libs" ;; # add it to output in reverse order
+ esac
+ done
+fi
+
+echo $af_other_flags $af_lib_L_flags $af_ord_libs
+}
+
+##
+## Main Body
+##
+
+parse $*
+
+
+##
+## Initialize names
+##
+
+
+
+
+
+if test "X$af_echo_prefix" = "Xyes"; then
+ echo $prefix
+fi
+
+if test "X$af_echo_exec_prefix" = "Xyes"; then
+ echo $exec_prefix
+fi
+
+if test "X$af_echo_version" = "Xyes"; then
+ echo @LIBGTKMMEXT_VERSION@
+ exit 0
+fi
+
+
+##
+## Libraries
+##
+
+#dummy because this should always be selected
+
+
+if test "@includedir@" != /usr/include ; then
+ includes="-I@includedir@"
+fi
+if test "@libdir@" != /usr/lib ; then
+ libs="-L@libdir@"
+fi
+af_cflags="$af_cflags $includes @GLIB_CFLAGS@ @GTK_CFLAGS@ @GTKMM_CFLAGS@ @SIGC_CFLAGS@ "
+af_libs="$libs -lgtkmm2ext @GLIB_LIBS@ @GTK_LIBS@ @GTKMM_LIBS@ @PBD_LIBS@ @SIGC_LIBS@ $af_libs"
+
+
+
+
+print_result
+
+exit 0
+
diff --git a/libs/gtkmm2ext/gtkmm2ext/.cvsignore b/libs/gtkmm2ext/gtkmm2ext/.cvsignore
new file mode 100644
index 0000000000..67020331ba
--- /dev/null
+++ b/libs/gtkmm2ext/gtkmm2ext/.cvsignore
@@ -0,0 +1 @@
+version.h
diff --git a/libs/gtkmm2ext/gtkmm2ext/auto_spin.h b/libs/gtkmm2ext/gtkmm2ext/auto_spin.h
new file mode 100644
index 0000000000..41d83373ce
--- /dev/null
+++ b/libs/gtkmm2ext/gtkmm2ext/auto_spin.h
@@ -0,0 +1,71 @@
+/*
+ Copyright (C) 2000 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef __gtkmm2ext_auto_spin_h__
+#define __gtkmm2ext_auto_spin_h__
+
+#include <gtkmm.h>
+
+namespace Gtkmm2ext {
+
+class AutoSpin
+
+{
+ public:
+ AutoSpin (Gtk::Adjustment &adj, gfloat cr = 0);
+
+ Gtk::Adjustment &get_adjustment() { return adjustment; }
+
+ void use_left_as_decrement (bool yn) { left_is_decrement = yn; }
+ void set_wrap (bool yn) { wrap = yn; }
+ void set_climb_rate (gfloat cr) { climb_rate = cr; }
+ void set_bounds (gfloat initial, gfloat low, gfloat high,
+ bool with_reset = true);
+
+ gint button_press (GdkEventButton *);
+ gint stop_spinning (GdkEventButton *ignored_but_here_for_clicked);
+ void start_spinning (bool decrementing, bool use_page);
+
+ private:
+ Gtk::Adjustment &adjustment;
+ gfloat climb_rate;
+ gfloat timer_increment;
+ gfloat initial;
+ unsigned int timer_calls;
+ bool have_timer;
+ bool need_timer;
+ bool wrap;
+ gint timeout_tag;
+ bool left_is_decrement;
+
+ static const unsigned int initial_timer_interval;
+ static const unsigned int timer_interval;
+ static const unsigned int climb_timer_calls;
+
+ void stop_timer ();
+ static gint _timer (void *arg);
+ gint timer ();
+ bool adjust_value (gfloat increment);
+ void set_value (gfloat value);
+};
+
+} /* namespace */
+
+#endif /* __gtkmm2ext_auto_spin_h__ */
diff --git a/libs/gtkmm2ext/gtkmm2ext/barcontroller.h b/libs/gtkmm2ext/gtkmm2ext/barcontroller.h
new file mode 100644
index 0000000000..1a4b78009d
--- /dev/null
+++ b/libs/gtkmm2ext/gtkmm2ext/barcontroller.h
@@ -0,0 +1,113 @@
+/*
+ Copyright (C) 2004 Paul Davis
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef __gtkmm2ext_bar_controller_h__
+#define __gtkmm2ext_bar_controller_h__
+
+#include <gtkmm.h>
+#include <gtkmm2ext/popup.h>
+
+namespace MIDI {
+ class Controllable;
+}
+
+namespace Gtkmm2ext {
+
+class BarController : public Gtk::Frame
+{
+ public:
+ BarController (Gtk::Adjustment& adj, MIDI::Controllable*, sigc::slot<void,char*,unsigned int>);
+ virtual ~BarController () {}
+
+ void set_bind_button_state (guint button, guint statemask);
+ void get_bind_button_state (guint &button, guint &statemask);
+ void midicontrol_set_tip ();
+ void midi_learn ();
+
+ void set_sensitive (bool yn) {
+ darea.set_sensitive (yn);
+ }
+
+ enum Style {
+ LeftToRight,
+ RightToLeft,
+ Line,
+ CenterOut,
+ TopToBottom,
+ BottomToTop
+ };
+
+ Style style() const { return _style; }
+ void set_style (Style);
+ void set_with_text (bool yn);
+ void set_use_parent (bool yn);
+
+ Gtk::SpinButton& get_spin_button() { return spinner; }
+
+ sigc::signal<void> StartGesture;
+ sigc::signal<void> StopGesture;
+
+ /* export this to allow direct connection to button events */
+
+ Gtk::Widget& event_widget() { return darea; }
+
+ protected:
+ Gtk::Adjustment& adjustment;
+ Gtk::DrawingArea darea;
+ Gtkmm2ext::PopUp prompter;
+ MIDI::Controllable* midi_control;
+ sigc::slot<void,char*,unsigned int> label_callback;
+ Style _style;
+ bool grabbed;
+ bool switching;
+ bool switch_on_release;
+ bool with_text;
+ double initial_value;
+ double grab_x;
+ GdkWindow* grab_window;
+ Gtk::SpinButton spinner;
+ bool use_parent;
+
+ guint bind_button;
+ guint bind_statemask;
+ bool prompting, unprompting;
+
+ gint button_press (GdkEventButton *);
+ gint button_release (GdkEventButton *);
+ gint motion (GdkEventMotion *);
+ gint expose (GdkEventExpose *);
+
+ gint mouse_control (double x, GdkWindow* w, double scaling);
+
+ gint prompter_hiding (GdkEventAny *);
+ void midicontrol_prompt ();
+ void midicontrol_unprompt ();
+ void update_midi_control ();
+
+ gint switch_to_bar ();
+ gint switch_to_spinner ();
+
+ void entry_activated ();
+ gint entry_focus_out (GdkEventFocus*);
+};
+
+
+}; /* namespace */
+
+#endif // __gtkmm2ext_bar_controller_h__
diff --git a/libs/gtkmm2ext/gtkmm2ext/bindable_button.h b/libs/gtkmm2ext/gtkmm2ext/bindable_button.h
new file mode 100644
index 0000000000..1e460b3790
--- /dev/null
+++ b/libs/gtkmm2ext/gtkmm2ext/bindable_button.h
@@ -0,0 +1,77 @@
+/*
+ Copyright (C) 2004 Paul Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef __pbd_gtkmm_bindable_button_h__
+#define __pbd_gtkmm_bindable_button_h__
+
+#include <gtkmm.h>
+#include <gtkmm2ext/popup.h>
+
+
+namespace MIDI {
+ class Controllable;
+}
+
+
+namespace Gtkmm2ext {
+
+class BindableToggleButton : public Gtk::ToggleButton
+{
+ public:
+ BindableToggleButton(MIDI::Controllable *);
+
+ //: Create a check button with a label.
+ //- You won't be able
+ //- to add a widget in this button since it already has a {\class Gtk_Label}
+ //- in it.
+ explicit BindableToggleButton(MIDI::Controllable *, const string &label);
+
+ virtual ~BindableToggleButton() {}
+
+ void set_bind_button_state (guint button, guint statemask);
+ void get_bind_button_state (guint &button, guint &statemask);
+
+ void midicontrol_set_tip ();
+
+ void midi_learn ();
+
+ protected:
+
+ Gtkmm2ext::PopUp prompter;
+
+ MIDI::Controllable* midi_control;
+
+ guint bind_button;
+ guint bind_statemask;
+
+ bool prompting, unprompting;
+
+ void init_events ();
+ gint button_press (GdkEventButton *);
+ gint prompter_hiding (GdkEventAny *);
+ void midicontrol_prompt ();
+ void midicontrol_unprompt ();
+
+
+};
+
+};
+
+#endif
diff --git a/libs/gtkmm2ext/gtkmm2ext/choice.h b/libs/gtkmm2ext/gtkmm2ext/choice.h
new file mode 100644
index 0000000000..4b8baede52
--- /dev/null
+++ b/libs/gtkmm2ext/gtkmm2ext/choice.h
@@ -0,0 +1,44 @@
+#ifndef __pbd_gtkmm_choice_h__
+#define __pbd_gtkmm_choice_h__
+
+#include <gtkmm.h>
+#include <vector>
+
+namespace Gtkmm2ext {
+
+class Choice : public Gtk::Window
+{
+ public:
+ Choice (std::string prompt, std::vector<std::string> choices);
+ virtual ~Choice ();
+
+ /* This signal will be raised when a choice
+ is made or the choice window is deleted.
+ If the choice was to cancel, or the window
+ was deleted, then the argument will be -1.
+ Otherwise, it will be choice selected
+ of those presented, starting at zero.
+ */
+
+ sigc::signal<void,int> choice_made;
+ sigc::signal<void> chosen;
+
+ int get_choice ();
+
+ protected:
+ void on_realize ();
+
+ private:
+ Gtk::VBox packer;
+ Gtk::Label prompt_label;
+ Gtk::HBox button_packer;
+ std::vector<Gtk::Button*> buttons;
+ int which_choice;
+
+ void _choice_made (int nbutton);
+ gint closed (GdkEventAny *);
+};
+
+} /* namespace */
+
+#endif // __pbd_gtkmm_choice_h__
diff --git a/libs/gtkmm2ext/gtkmm2ext/click_box.h b/libs/gtkmm2ext/gtkmm2ext/click_box.h
new file mode 100644
index 0000000000..cc35afb6e1
--- /dev/null
+++ b/libs/gtkmm2ext/gtkmm2ext/click_box.h
@@ -0,0 +1,61 @@
+/*
+ Copyright (C) 1999 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef __gtkmm2ext_click_box_h__
+#define __gtkmm2ext_click_box_h__
+
+#include <string>
+#include <gtkmm.h>
+
+#include <gtkmm2ext/auto_spin.h>
+
+namespace Gtkmm2ext {
+
+class ClickBox : public Gtk::DrawingArea, public AutoSpin
+{
+ public:
+ ClickBox (Gtk::Adjustment *adj, const std::string &name);
+ ~ClickBox ();
+
+ void set_print_func(void (*pf)(char buf[32], Gtk::Adjustment &, void *),
+ void *arg) {
+ print_func = pf;
+ print_arg = arg;
+ set_label ();
+ }
+
+
+ protected:
+ bool on_expose_event (GdkEventExpose*);
+
+ private:
+ void (*print_func) (char buf[32], Gtk::Adjustment &, void *);
+ void *print_arg;
+
+ void set_label ();
+ bool button_press_handler (GdkEventButton *);
+ bool button_release_handler (GdkEventButton *);
+
+ static void default_printer (char buf[32], Gtk::Adjustment &, void *);
+};
+
+} /* namespace */
+
+#endif /* __gtkmm2ext_click_box_h__ */
diff --git a/libs/gtkmm2ext/gtkmm2ext/controller.h b/libs/gtkmm2ext/gtkmm2ext/controller.h
new file mode 100644
index 0000000000..b72f6c7ed7
--- /dev/null
+++ b/libs/gtkmm2ext/gtkmm2ext/controller.h
@@ -0,0 +1,59 @@
+/*
+ Copyright (C) 1998-99 Paul Davis
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef __gtkmm2ext_controller_h__
+#define __gtkmm2ext_controller_h__
+
+#include <gtkmm.h>
+#include <gtkmm2ext/popup.h>
+#include <midi++/controllable.h>
+
+namespace Gtkmm2ext {
+
+class Controller : public MIDI::Controllable
+
+{
+ public:
+ Controller (Gtk::Adjustment *, MIDI::Port *);
+ virtual ~Controller () {}
+
+ void set_value (float);
+ float lower () { return adjustment->get_lower(); }
+ float upper () { return adjustment->get_upper(); }
+ float range () { return upper() - lower() /* XXX +1 ??? */ ; }
+
+ void midicontrol_prompt ();
+ void midicontrol_unprompt ();
+
+ protected:
+ Gtk::Adjustment *adjustment;
+
+ private:
+ Gtkmm2ext::PopUp prompter;
+ gfloat new_value;
+ bool new_value_pending;
+
+ static gint update_controller_value (void *);
+};
+
+}; /* namespace */
+
+#endif // __gtkmm2ext_controller_h__
+
+
diff --git a/libs/gtkmm2ext/gtkmm2ext/doi.h b/libs/gtkmm2ext/gtkmm2ext/doi.h
new file mode 100644
index 0000000000..f804c8a090
--- /dev/null
+++ b/libs/gtkmm2ext/gtkmm2ext/doi.h
@@ -0,0 +1,37 @@
+/*
+ Copyright (C) 2002 Paul Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef __ardour_gtk_doi_h__
+#define __ardour_gtk_doi_h__
+
+#include <gtkmm.h>
+
+/* XXX g++ 2.95 can't compile this as pair of member function templates */
+
+template<class T> gint idle_delete (T *obj) { delete obj; return FALSE; }
+template<class T> void delete_when_idle (T *obj) {
+ Gtk::Main::idle.connect (sigc::bind (sigc::slot (idle_delete<T>), obj));
+}
+template<class T> gint delete_on_unmap (GdkEventAny *ignored, T *obj) {
+ Gtk::Main::idle.connect (sigc::bind (sigc::slot (idle_delete<T>), obj));
+ return FALSE;
+}
+
+#endif /* __ardour_gtk_doi_h__ */
diff --git a/libs/gtkmm2ext/gtkmm2ext/fastmeter.h b/libs/gtkmm2ext/gtkmm2ext/fastmeter.h
new file mode 100644
index 0000000000..5620a17a4d
--- /dev/null
+++ b/libs/gtkmm2ext/gtkmm2ext/fastmeter.h
@@ -0,0 +1,85 @@
+/*
+ Copyright (C) 2003 Paul Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef __gtkmm2ext_fastmeter_h__
+#define __gtkmm2ext_fastmeter_h__
+
+#include <gtkmm/drawingarea.h>
+#include <gdkmm/pixmap.h>
+
+namespace Gtkmm2ext {
+
+class FastMeter : public Gtk::DrawingArea {
+ public:
+ enum Orientation {
+ Horizontal,
+ Vertical
+ };
+
+ FastMeter (long hold_cnt, unsigned long width, Orientation);
+ virtual ~FastMeter ();
+
+ void set (float level, float user_level=0.0f);
+ void clear ();
+
+ float get_level() { return current_level; }
+ float get_user_level() { return current_user_level; }
+ float get_peak() { return current_peak; }
+
+ long hold_count() { return hold_cnt; }
+ void set_hold_count (long);
+
+ static void set_horizontal_xpm (const char **xpm);
+ static void set_vertical_xpm (const char **xpm);
+
+ protected:
+ bool on_expose_event (GdkEventExpose*);
+ void on_size_request (GtkRequisition*);
+
+ private:
+ static Glib::RefPtr<Gdk::Pixmap>* h_pixmap;
+ static Glib::RefPtr<Gdk::Bitmap>* h_mask;
+ static gint h_pixheight;
+ static gint h_pixwidth;
+
+ static Glib::RefPtr<Gdk::Pixmap>* v_pixmap;
+ static Glib::RefPtr<Gdk::Bitmap>* v_mask;
+ static gint v_pixheight;
+ static gint v_pixwidth;
+
+ Orientation orientation;
+ Glib::RefPtr<Gdk::Pixmap>* backing;
+ Gdk::Rectangle pixrect;
+ gint request_width;
+ gint request_height;
+ unsigned long hold_cnt;
+ unsigned long hold_state;
+ float current_level;
+ float current_peak;
+ float current_user_level;
+
+ bool vertical_expose (GdkEventExpose*);
+ bool horizontal_expose (GdkEventExpose*);
+};
+
+
+} /* namespace */
+
+ #endif /* __gtkmm2ext_fastmeter_h__ */
diff --git a/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h b/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h
new file mode 100644
index 0000000000..147daa2623
--- /dev/null
+++ b/libs/gtkmm2ext/gtkmm2ext/gtk_ui.h
@@ -0,0 +1,219 @@
+/*
+ Copyright (C) 1999 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef __pbd_gtk_ui_h__
+#define __pbd_gtk_ui_h__
+
+#include <string>
+#include <queue>
+#include <map>
+
+#include <pthread.h>
+#include <gtkmm.h>
+#include <pbd/abstract_ui.h>
+#include <pbd/ringbufferNPT.h>
+#include <pbd/atomic.h>
+#include <pbd/pool.h>
+#include <pbd/error.h>
+#include <pbd/lockmonitor.h>
+
+using std::string;
+using std::queue;
+
+class Touchable;
+
+namespace Gtkmm2ext {
+
+class TextViewer;
+
+class UI : public AbstractUI
+
+{
+ public:
+ UI (string name, int *argc, char **argv[], string rcfile);
+ virtual ~UI ();
+
+ static UI *instance() { return theGtkUI; }
+
+ /* Abstract UI interfaces */
+
+ bool running ();
+ void quit ();
+ void kill ();
+ int load_rcfile (string);
+ void request (RequestType);
+ void run (Receiver &old_receiver);
+ void call_slot (sigc::slot<void>);
+ void call_slot_locked (sigc::slot<void>);
+ void touch_display (Touchable *);
+ void receive (Transmitter::Channel, const char *);
+ void register_thread (pthread_t, string);
+
+ bool caller_is_gui_thread () {
+ return pthread_equal (gui_thread, pthread_self());
+ }
+
+ /* Gtk-UI specific interfaces */
+
+ void set_tip (Gtk::Widget *, const gchar *txt, const gchar *hlp = 0);
+ void set_state (Gtk::Widget *w, Gtk::StateType state);
+ void idle_add (int (*)(void *), void *);
+ void timeout_add (unsigned int, int (*)(void *), void *);
+ void popup_error (const char *text);
+ void flush_pending ();
+ void toggle_errors ();
+
+ template<class T> static bool idle_delete (T *obj) { delete obj; return false; }
+ template<class T> static void delete_when_idle (T *obj) {
+ Glib::signal_idle().connect (bind (slot (&UI::idle_delete<T>), obj));
+ }
+
+ Gdk::Color get_color (const string& prompt, bool& picked, Gdk::Color *initial = 0);
+
+ /* starting is sent just before we enter the main loop,
+ stopping just after we return from it (at the top level)
+ */
+
+ sigc::signal<void> starting;
+ sigc::signal<void> stopping;
+
+ static bool just_hide_it (GdkEventAny *, Gtk::Window *);
+
+ protected:
+ virtual void handle_fatal (const char *);
+ virtual void display_message (const char *prefix, gint prefix_len,
+ Glib::RefPtr<Gtk::Style> style, const char *msg);
+
+ /* stuff to invoke member functions in another
+ thread so that we can keep the GUI running.
+ */
+
+ template<class UI_CLASS> struct thread_arg {
+ UI_CLASS *ui;
+ void (UI_CLASS::*func)(void *);
+ void *arg;
+ };
+
+ template<class UI_CLASS> static void *start_other_thread (void *arg);
+ template<class UI_CLASS> void other_thread (void (UI_CLASS::*func)(void *), void *arg = 0);
+
+ private:
+ struct Request {
+
+ /* this once used anonymous unions to merge elements
+ that are never part of the same request. that makes
+ the creation of a legal copy constructor difficult
+ because of the semantics of the slot member.
+ */
+
+ RequestType type;
+ Touchable *display;
+ const char *msg;
+ Gtk::StateType new_state;
+ int (*function)(void *);
+ Gtk::Widget *widget;
+ Transmitter::Channel chn;
+ void *arg;
+ const char *msg2;
+ unsigned int timeout;
+ sigc::slot<void> slot;
+
+ /* this is for CallSlotLocked requests */
+
+ pthread_mutex_t slot_lock;
+ pthread_cond_t slot_cond;
+
+ Request ();
+ ~Request () {
+ if (type == ErrorMessage && msg) {
+ /* msg was strdup()'ed */
+ free ((char *)msg);
+ }
+ }
+ };
+
+ static UI *theGtkUI;
+ static pthread_t gui_thread;
+ bool _active;
+ string _ui_name;
+ Gtk::Main *theMain;
+ Gtk::Tooltips *tips;
+ TextViewer *errors;
+
+ /* error message display styles */
+
+ Glib::RefPtr<Gtk::Style> error_message_style;
+ Glib::RefPtr<Gtk::Style> info_message_style;
+ Glib::RefPtr<Gtk::Style> warning_message_style;
+ Glib::RefPtr<Gtk::Style> fatal_message_style;
+
+ int signal_pipe[2];
+ PBD::Lock request_buffer_map_lock;
+ typedef std::map<pthread_t,RingBufferNPT<Request>* > RequestBufferMap;
+ RequestBufferMap request_buffers;
+ Request* get_request(RequestType);
+ pthread_key_t thread_request_buffer_key;
+
+ int setup_signal_pipe ();
+
+ void handle_ui_requests ();
+ void do_request (Request *);
+ void send_request (Request *);
+ static void signal_pipe_callback (void *, gint, GdkInputCondition);
+ void process_error_message (Transmitter::Channel, const char *);
+ void do_quit ();
+
+ void color_selection_done (bool status);
+ bool color_selection_deleted (GdkEventAny *);
+ bool color_picked;
+};
+
+template<class UI_CLASS> void *
+UI::start_other_thread (void *arg)
+
+{
+ thread_arg<UI_CLASS> *ta = (thread_arg<UI_CLASS> *) arg;
+ (ta->ui->*ta->func)(ta->arg);
+ delete ta;
+ return 0;
+}
+
+template<class UI_CLASS> void
+UI::other_thread (void (UI_CLASS::*func)(void *), void *arg)
+
+{
+ pthread_t thread_id;
+ thread_arg<UI_CLASS> *ta = new thread_arg<UI_CLASS>;
+
+ ta->ui = dynamic_cast<UI_CLASS *> (this);
+ if (ta->ui == 0) {
+ error << "UI::other thread called illegally"
+ << endmsg;
+ return;
+ }
+ ta->func = func;
+ ta->arg = arg;
+ pthread_create (&thread_id, 0, start_other_thread, ta);
+}
+
+
+} /* namespace */
+
+#endif /* __pbd_gtk_ui_h__ */
diff --git a/libs/gtkmm2ext/gtkmm2ext/gtkutils.h b/libs/gtkmm2ext/gtkmm2ext/gtkutils.h
new file mode 100644
index 0000000000..ae60252e83
--- /dev/null
+++ b/libs/gtkmm2ext/gtkmm2ext/gtkutils.h
@@ -0,0 +1,30 @@
+/*
+ Copyright (C) 1998-99 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef __gtkutils_h__
+#define __gtkutils_h__
+
+#include <string>
+
+void set_usize_to_display_given_text (Gtk::Widget& w,
+ const std::string& text,
+ gint hpadding = 0,
+ gint vpadding = 0);
+#endif /* __gtkutils_h__ */
diff --git a/libs/gtkmm2ext/gtkmm2ext/hexentry.h b/libs/gtkmm2ext/gtkmm2ext/hexentry.h
new file mode 100644
index 0000000000..785d6eef36
--- /dev/null
+++ b/libs/gtkmm2ext/gtkmm2ext/hexentry.h
@@ -0,0 +1,59 @@
+/*
+ Copyright (C) 1999 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef __gtkmm2ext_hexentry_h__
+#define __gtkmm2ext_hexentry_h__
+
+#include <gtkmm.h>
+
+namespace Gtkmm2ext {
+
+class HexEntry : public Gtk::Entry
+
+{
+ public:
+ /* Take a byte-level representation of a series of hexadecimal
+ values and use them to set the displayed text of the entry.
+ Eg. if hexbuf[0] = 0xff and hexbuf[1] = 0xa1 and buflen = 2,
+ then the text will be set to "ff a1".
+ */
+
+ void set_hex (unsigned char *hexbuf, unsigned int buflen);
+
+ /* puts byte-level representation of current entry text
+ into hexbuf, and returns number of bytes written there.
+
+ NOTE: this will release the existing memory pointed to
+ by hexbuf if buflen indicates that it is not long enough
+ to hold the new representation, and hexbuf is not zero.
+
+ If the returned length is zero, the contents of hexbuf
+ are undefined.
+ */
+
+ unsigned int get_hex (unsigned char *hexbuf, size_t buflen);
+
+ private:
+ bool on_key_press_event (GdkEventKey *);
+};
+
+} /* namespace */
+
+#endif /* __gtkmm2ext_hexentry_h__ */
diff --git a/libs/gtkmm2ext/gtkmm2ext/idle_adjustment.h b/libs/gtkmm2ext/gtkmm2ext/idle_adjustment.h
new file mode 100644
index 0000000000..48e1cc449c
--- /dev/null
+++ b/libs/gtkmm2ext/gtkmm2ext/idle_adjustment.h
@@ -0,0 +1,26 @@
+#ifndef __gtkmm2ext_idle_adjustment_h__
+#define __gtkmm2ext_idle_adjustment_h__
+
+#include <sys/time.h>
+#include <gtkmm/adjustment.h>
+
+namespace Gtkmm2ext {
+
+class IdleAdjustment : public sigc::trackable
+{
+ public:
+ IdleAdjustment (Gtk::Adjustment& adj);
+ ~IdleAdjustment ();
+
+ sigc::signal<void> value_changed;
+
+ private:
+ void underlying_adjustment_value_changed();
+ struct timeval last_vc;
+ gint timeout_handler();
+ bool timeout_queued;
+};
+
+}
+
+#endif /* __gtkmm2ext_idle_adjustment_h__ */
diff --git a/libs/gtkmm2ext/gtkmm2ext/pix.h b/libs/gtkmm2ext/gtkmm2ext/pix.h
new file mode 100644
index 0000000000..b06f6046ea
--- /dev/null
+++ b/libs/gtkmm2ext/gtkmm2ext/pix.h
@@ -0,0 +1,87 @@
+#ifndef __pbd_gtkmm_pix_h__
+#define __pbd_gtkmm_pix_h__
+
+#include <string>
+#include <map>
+#include <vector>
+#include <gtkmm.h>
+
+namespace Gtkmm2ext {
+
+class Pix
+{
+ typedef std::map<std::string, Pix *> PixCache;
+ static PixCache *cache;
+
+ PixCache::iterator cache_position;
+ int refcnt;
+ bool generated;
+ std::vector<std::string *> *files;
+ std::vector<const char **> data;
+ bool from_files;
+ int pixmap_count;
+ int last_pixmap;
+ Glib::RefPtr<Gdk::Pixmap> *pixmaps;
+ Glib::RefPtr<Gdk::Bitmap> *bitmaps;
+ int max_pixwidth;
+ int max_pixheight;
+ bool _homegenous;
+
+ Pix (const std::string &dirpath, const std::string &regexp,
+ bool homogenous = true);
+ Pix (std::vector<const char **> xpm_data, bool homogenous = true);
+ virtual ~Pix();
+
+ friend Pix *get_pix (const std::string &dirpath,
+ const std::string &regexp,
+ bool homogenous);
+ friend Pix *get_pix (std::string name,
+ std::vector<const char **> xpm_data,
+ bool homogenous);
+ friend void finish_pix (Pix *);
+
+ public:
+ Pix (bool homogenous = true);
+
+ void generate ();
+ int n_pixmaps() { return pixmap_count; }
+ int max_pixmap() { return last_pixmap; }
+ bool homogenous () { return _homegenous; }
+
+ /* ref/unref should really be protected, but we don't know the
+ name of the class that should have access to them.
+ */
+
+ void ref () { refcnt++; }
+ void unref () { if (refcnt) refcnt--; }
+
+ Glib::RefPtr<Gdk::Bitmap>* shape_mask (int n) {
+ if (n < pixmap_count) {
+ return &bitmaps[n];
+ }
+ return 0;
+ }
+
+ Glib::RefPtr<Gdk::Pixmap>* pixmap(int n) {
+ if (n < pixmap_count) {
+ return &pixmaps[n];
+ }
+ return 0;
+ }
+
+ int max_width() { return max_pixwidth; }
+ int max_height() { return max_pixheight; }
+};
+
+extern Pix *get_pix (const std::string &dirpath,
+ const std::string &regexp,
+ bool homog = false);
+
+extern Pix *get_pix (std::string,
+ std::vector<const char **>,
+ bool homog = false);
+extern void finish_pix (Pix *);
+
+} /* namespace */
+
+#endif // __pbd_gtkmm_pix_h__
diff --git a/libs/gtkmm2ext/gtkmm2ext/pixscroller.h b/libs/gtkmm2ext/gtkmm2ext/pixscroller.h
new file mode 100644
index 0000000000..4501a0c88c
--- /dev/null
+++ b/libs/gtkmm2ext/gtkmm2ext/pixscroller.h
@@ -0,0 +1,47 @@
+#ifndef __gtkmm2ext_pixscroller_h__
+#define __gtkmm2ext_pixscroller_h__
+
+#include <gtkmm/drawingarea.h>
+#include <gtkmm/adjustment.h>
+#include <gdkmm.h>
+
+#include <gtkmm2ext/pix.h>
+
+namespace Gtkmm2ext {
+
+class PixScroller : public Gtk::DrawingArea
+{
+ public:
+ PixScroller(Gtk::Adjustment& adjustment, Pix&);
+
+
+ bool on_expose_event (GdkEventExpose*);
+ bool on_motion_notify_event (GdkEventMotion*);
+ bool on_button_press_event (GdkEventButton*);
+ bool on_button_release_event (GdkEventButton*);
+ void on_size_request (GtkRequisition*);
+
+ protected:
+ Gtk::Adjustment& adj;
+
+ private:
+ Glib::RefPtr<Gdk::Pixmap> rail;
+ Glib::RefPtr<Gdk::Pixmap> slider;
+ Glib::RefPtr<Gdk::Bitmap> rail_mask;
+ Glib::RefPtr<Gdk::Bitmap> slider_mask;
+ Gdk::Rectangle sliderrect;
+ Gdk::Rectangle railrect;
+ GdkWindow* grab_window;
+ double grab_y;
+ double grab_start;
+ int overall_height;
+ bool dragging;
+
+ float default_value;
+
+ void adjustment_changed ();
+};
+
+} // namespace
+
+#endif /* __gtkmm2ext_pixscroller_h__ */
diff --git a/libs/gtkmm2ext/gtkmm2ext/popup.h b/libs/gtkmm2ext/gtkmm2ext/popup.h
new file mode 100644
index 0000000000..5684230f56
--- /dev/null
+++ b/libs/gtkmm2ext/gtkmm2ext/popup.h
@@ -0,0 +1,57 @@
+/*
+ Copyright (C) 1998-99 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef __qui_popup_h__
+#define __qui_popup_h__
+
+#include <string>
+#include <gtkmm.h>
+
+#include <pbd/touchable.h>
+
+namespace Gtkmm2ext {
+
+class PopUp : public Gtk::Window, public Touchable
+{
+ public:
+ PopUp (Gtk::WindowPosition pos, unsigned int show_for_msecs = 0,
+ bool delete_on_hide = false);
+ virtual ~PopUp ();
+ void touch ();
+ void remove ();
+ void set_text (std::string);
+ void set_name (std::string);
+ gint button_click (GdkEventButton *);
+
+ bool on_delete_event (GdkEventAny* );
+
+ private:
+ Gtk::Label label;
+ std::string my_text;
+ gint timeout;
+ static gint remove_prompt_timeout (void *);
+ bool delete_on_hide;
+ unsigned int popdown_time;
+
+};
+
+} /* namespace */
+
+#endif // __qui_popup_h__
diff --git a/libs/gtkmm2ext/gtkmm2ext/prompter.h b/libs/gtkmm2ext/gtkmm2ext/prompter.h
new file mode 100644
index 0000000000..5997cc8b24
--- /dev/null
+++ b/libs/gtkmm2ext/gtkmm2ext/prompter.h
@@ -0,0 +1,86 @@
+/*
+ Copyright (C) 1999 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef __gtkmm2ext_prompter_h__
+#define __gtkmm2ext_prompter_h__
+
+#include <string>
+#include <gtkmm.h>
+#include <sigc++/sigc++.h>
+
+namespace Gtkmm2ext {
+
+class Prompter : public Gtk::Window
+
+{
+ public:
+ Prompter (bool modal = false);
+ ~Prompter () {};
+
+ void set_prompt (std::string prompt) {
+ entryLabel.set_label (prompt);
+ }
+
+ void set_initial_text (std::string txt) {
+ entry.set_text (txt);
+ entry.select_region (0, entry.get_text_length());
+ }
+
+ void change_labels (std::string ok, std::string cancel);
+
+ enum PrompterStatus {
+ entered,
+ cancelled
+ };
+
+ PrompterStatus status;
+ void get_result (std::string &str);
+
+ /* the prompter will send a `done' signal when it is finished.
+ the "caller" can then check `status' and if it wants to
+ can then call `get_result()'.
+ */
+
+ sigc::signal<void> done;
+
+ protected:
+ Gtk::Entry& the_entry() { return entry; }
+
+ private:
+ Gtk::VBox packer;
+ Gtk::HBox buttonBox;
+ Gtk::Entry entry;
+ Gtk::VBox entryBox;
+ Gtk::Label entryLabel;
+ Gtk::Button ok;
+ Gtk::Button cancel;
+
+ void activated ();
+ void cancel_click ();
+
+ bool deleted (GdkEventAny *);
+
+ void on_realize ();
+ void on_map ();
+};
+
+} /* namespace */
+
+#endif /* __gtkmm2ext_prompter_h__ */
diff --git a/libs/gtkmm2ext/gtkmm2ext/selector.h b/libs/gtkmm2ext/gtkmm2ext/selector.h
new file mode 100644
index 0000000000..f84c85cb4c
--- /dev/null
+++ b/libs/gtkmm2ext/gtkmm2ext/selector.h
@@ -0,0 +1,103 @@
+/*
+ Copyright (C) 1999 Paul Barton-Davis
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef __gtkselector_h__
+#define __gtkselector_h__
+
+#include <string>
+#include <vector>
+
+#include <gtkmm.h>
+
+namespace Gtkmm2ext {
+
+class TreeView_Selector : public Gtk::TreeView
+{
+public:
+ TreeView_Selector() {}
+ virtual ~TreeView_Selector() {}
+
+protected:
+ virtual bool on_button_press_event(GdkEventButton *ev);
+};
+
+typedef void (SelectorRefillFunction)(Glib::RefPtr<Gtk::ListStore>, void *);
+
+class Selector : public Gtk::VBox
+{
+ friend class Gtkmm2ext::TreeView_Selector;
+
+public:
+ Selector (SelectorRefillFunction, void *arg,
+ std::vector<std::string> titles);
+
+ virtual ~Selector ();
+ Glib::RefPtr<Gtk::ListStore> liststore () { return lstore; }
+ void reset (void (*refiller)(Glib::RefPtr<Gtk::ListStore>, void *), void *arg);
+ void set_size (unsigned int w, unsigned int h) {
+ scroll.set_size_request (w, h);
+ tview.columns_autosize ();
+ }
+
+ /* selection is activated via a double click, choice via
+ a single click.
+ */
+ sigc::signal<void,Gtk::TreeView&, Glib::RefPtr<Gtk::TreeSelection> > selection_made;
+ sigc::signal<void,Gtk::TreeView&, Glib::RefPtr<Gtk::TreeSelection> > choice_made;
+ sigc::signal<void,Gtk::TreeView&, Glib::RefPtr<Gtk::TreeSelection> > shift_made;
+ sigc::signal<void,Gtk::TreeView&, Glib::RefPtr<Gtk::TreeSelection> > control_made;
+
+ sigc::signal<void> update_contents;
+
+ void accept();
+ void cancel();
+ void rescan();
+
+
+ protected:
+ virtual void on_map ();
+ virtual void on_show ();
+
+ private:
+ Gtk::ScrolledWindow scroll;
+ Gtk::TreeModel::ColumnRecord column_records;
+ Glib::RefPtr<Gtk::ListStore> lstore;
+ Gtkmm2ext::TreeView_Selector tview;
+ void (*refiller)(Glib::RefPtr<Gtk::ListStore>, void *);
+ void *refill_arg;
+ gint selected_row;
+ gint selected_column;
+ gint chosen_row;
+ gint chosen_column;
+
+ void refill ();
+ void chosen ();
+ void shift_clicked ();
+ void control_clicked ();
+
+ static gint _accept (gpointer);
+ static gint _chosen (gpointer);
+ static gint _shift_clicked (gpointer);
+ static gint _control_clicked (gpointer);
+
+};
+
+} /* namespace */
+
+#endif // __gtkselector_h__
diff --git a/libs/gtkmm2ext/gtkmm2ext/slider_controller.h b/libs/gtkmm2ext/gtkmm2ext/slider_controller.h
new file mode 100644
index 0000000000..3cb8e9d363
--- /dev/null
+++ b/libs/gtkmm2ext/gtkmm2ext/slider_controller.h
@@ -0,0 +1,98 @@
+/*
+ Copyright (C) 1998-99 Paul Davis
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef __gtkmm2ext_motion_controller_h__
+#define __gtkmm2ext_motion_controller_h__
+
+#include <gtkmm.h>
+#include <gtkmm2ext/popup.h>
+#include <gtkmm2ext/pixscroller.h>
+
+namespace Gtkmm2ext {
+ class Pix;
+}
+
+namespace MIDI {
+ class Controllable;
+}
+
+namespace Gtkmm2ext {
+
+class SliderController : public Gtkmm2ext::PixScroller
+{
+ public:
+ SliderController (Gtkmm2ext::Pix* pixset,
+ Gtk::Adjustment* adj,
+ MIDI::Controllable*,
+ bool with_numeric = true);
+
+ virtual ~SliderController () {}
+
+ void set_bind_button_state (guint button, guint statemask);
+ void get_bind_button_state (guint &button, guint &statemask);
+ void midicontrol_set_tip ();
+ void midi_learn ();
+
+ void set_value (float);
+ // void set_sensitive (bool yn) {
+ // spin.set_sensitive (yn);
+ // }
+
+ Gtk::SpinButton & get_spin_button () { return spin; }
+
+ protected:
+ Gtk::SpinButton spin;
+ Gtk::Frame spin_frame;
+ Gtk::HBox spin_hbox;
+ Gtkmm2ext::PopUp prompter;
+ MIDI::Controllable* midi_control;
+
+ guint bind_button;
+ guint bind_statemask;
+ bool prompting, unprompting;
+
+ bool button_press (GdkEventButton *);
+ bool prompter_hiding (GdkEventAny *);
+ void midicontrol_prompt ();
+ void midicontrol_unprompt ();
+ void update_midi_control ();
+};
+
+class VSliderController : public SliderController
+{
+ public:
+ VSliderController (Gtkmm2ext::Pix *pixset,
+ Gtk::Adjustment *adj,
+ MIDI::Controllable *,
+ bool with_numeric = true);
+};
+
+class HSliderController : public SliderController
+{
+ public:
+ HSliderController (Gtkmm2ext::Pix *pixset,
+ Gtk::Adjustment *adj,
+ MIDI::Controllable *,
+ bool with_numeric = true);
+};
+
+
+}; /* namespace */
+
+#endif // __gtkmm2ext_motion_controller_h__
diff --git a/libs/gtkmm2ext/gtkmm2ext/stop_signal.h b/libs/gtkmm2ext/gtkmm2ext/stop_signal.h
new file mode 100644
index 0000000000..2890efecfb
--- /dev/null
+++ b/libs/gtkmm2ext/gtkmm2ext/stop_signal.h
@@ -0,0 +1,14 @@
+#ifndef __ardour_gtk_stop_signal_h__
+#define __ardour_gtk_stop_signal_h__
+
+#include <gtk--/widget.h>
+#include <gtk/gtksignal.h>
+
+static inline gint
+stop_signal (Gtk::Widget& widget, const char *signal_name)
+{
+ gtk_signal_emit_stop_by_name (GTK_OBJECT(widget.gtkobj()), signal_name);
+ return TRUE;
+}
+
+#endif /* __ardour_gtk_stop_signal_h__ */
diff --git a/libs/gtkmm2ext/gtkmm2ext/tearoff.h b/libs/gtkmm2ext/gtkmm2ext/tearoff.h
new file mode 100644
index 0000000000..d0478d5c57
--- /dev/null
+++ b/libs/gtkmm2ext/gtkmm2ext/tearoff.h
@@ -0,0 +1,63 @@
+/*
+ Copyright (C) 2003 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef __gtkmm2ext_tearoff_h__
+#define __gtkmm2ext_tearoff_h__
+
+#include <gtkmm.h>
+
+namespace Gtkmm2ext {
+
+class TearOff : public Gtk::HBox
+{
+ public:
+ TearOff (Gtk::Widget& contents);
+ virtual ~TearOff ();
+
+ sigc::signal<void> Detach;
+ sigc::signal<void> Attach;
+
+ Gtk::Window* tearoff_window() const { return own_window; }
+ bool torn_off() const;
+
+ private:
+ Gtk::Widget& contents;
+ Gtk::Window* own_window;
+ Gtk::Arrow tearoff_arrow;
+ Gtk::Arrow close_arrow;
+ Gtk::HBox window_box;
+ Gtk::EventBox tearoff_event_box;
+ Gtk::EventBox close_event_box;
+ double drag_x;
+ double drag_y;
+ bool dragging;
+
+ gint tearoff_click (GdkEventButton*);
+ gint close_click (GdkEventButton*);
+
+ gint window_motion (GdkEventMotion*);
+ gint window_button_press (GdkEventButton*);
+ gint window_button_release (GdkEventButton*);
+ gint window_delete_event (GdkEventAny*);
+};
+
+} /* namespace */
+
+#endif // __gtkmm2ext_tearoff_h__
diff --git a/libs/gtkmm2ext/gtkmm2ext/textviewer.h b/libs/gtkmm2ext/gtkmm2ext/textviewer.h
new file mode 100644
index 0000000000..280eb4437d
--- /dev/null
+++ b/libs/gtkmm2ext/gtkmm2ext/textviewer.h
@@ -0,0 +1,58 @@
+/*
+ Copyright (C) 1999 Paul Barton-Davis
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef __pbd_gtkmm_textviewer_h__
+#define __pbd_gtkmm_textviewer_h__
+
+#include <string>
+#include <gtkmm.h>
+
+#include <pbd/transmitter.h>
+
+using std::string;
+
+namespace Gtkmm2ext {
+
+class TextViewer : public Gtk::Window, public Transmitter
+{
+ Gtk::TextView etext;
+ Gtk::VBox vbox1;
+ Gtk::VBox vbox2;
+ Gtk::ScrolledWindow scrollwin;
+ Gtk::Button dismiss;
+ bool _editable;
+
+ void toggle_edit ();
+ void toggle_word_wrap ();
+ void signal_released_handler ();
+
+ public:
+ TextViewer (size_t width, size_t height);
+ Gtk::TextView& text() { return etext; }
+ Gtk::Button& dismiss_button() { return dismiss; }
+
+ void insert_file (const string &);
+ void scroll_to_bottom ();
+
+ void deliver ();
+};
+
+} /* namespace */
+
+#endif // __pbd_gtkmm_textviewer_h__
diff --git a/libs/gtkmm2ext/gtkmm2ext/utils.h b/libs/gtkmm2ext/gtkmm2ext/utils.h
new file mode 100644
index 0000000000..867f9ed904
--- /dev/null
+++ b/libs/gtkmm2ext/gtkmm2ext/utils.h
@@ -0,0 +1,41 @@
+/*
+ Copyright (C) 1999 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef __gtkmm2ext_utils_h__
+#define __gtkmm2ext_utils_h__
+
+#include <gtkmm.h>
+
+namespace Gtkmm2ext {
+ void init ();
+
+ void set_usize_to_display_given_text (Gtk::Widget &w,
+ const gchar *text,
+ gint hpadding,
+ gint vpadding);
+
+ template<class T> void deferred_delete (void *ptr) {
+ delete static_cast<T *> (ptr);
+ }
+};
+
+gint do_not_propagate (GdkEventButton*);
+
+#endif /* __gtkmm2ext_utils_h__ */
diff --git a/libs/gtkmm2ext/gtkutils.cc b/libs/gtkmm2ext/gtkutils.cc
new file mode 100644
index 0000000000..a4e86b0a22
--- /dev/null
+++ b/libs/gtkmm2ext/gtkutils.cc
@@ -0,0 +1,41 @@
+/*
+ Copyright (C) 1998-99 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#include <string>
+
+#include <gtkmm.h>
+#include <gtkmm2ext/gtkutils.h>
+
+void
+set_usize_to_display_given_text (Gtk::Widget &w,
+ const std::string& text,
+ gint hpadding,
+ gint vpadding)
+{
+ int height = 0;
+ int width = 0;
+
+ w.create_pango_layout(text)->get_pixel_size(width, height);
+
+ height += vpadding;
+ width += hpadding;
+
+ w.set_size_request(width, height);
+}
diff --git a/libs/gtkmm2ext/hexentry.cc b/libs/gtkmm2ext/hexentry.cc
new file mode 100644
index 0000000000..9862cac435
--- /dev/null
+++ b/libs/gtkmm2ext/hexentry.cc
@@ -0,0 +1,111 @@
+/*
+ Copyright (C) 2000 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#include <stdio.h> /* for sprintf, sigh ... */
+#include <string>
+#include <ctype.h>
+
+#include <gdk/gdkkeysyms.h>
+#include <gtkmm2ext/hexentry.h>
+
+using namespace std;
+using namespace Gtkmm2ext;
+
+bool
+HexEntry::on_key_press_event (GdkEventKey *ev)
+
+{
+ if ((ev->keyval >= GDK_a && ev->keyval <= GDK_f) ||
+ (ev->keyval >= GDK_A && ev->keyval <= GDK_A) ||
+ (ev->keyval >= GDK_0 && ev->keyval <= GDK_9) ||
+ ev->keyval == GDK_space ||
+ ev->keyval == GDK_Tab ||
+ ev->keyval == GDK_Return ||
+ ev->keyval == GDK_BackSpace ||
+ ev->keyval == GDK_Delete) {
+ return Gtk::Entry::on_key_press_event (ev);
+ } else {
+ gdk_beep ();
+ return FALSE;
+ }
+}
+
+
+void
+HexEntry::set_hex (unsigned char *msg, unsigned int len)
+
+{
+ /* create a textual representation of the MIDI message */
+
+ if (msg && len) {
+ char *rep;
+
+ rep = new char[(len * 3) + 1];
+ for (size_t i = 0; i < len; i++) {
+ sprintf (&rep[i*3], "%02x ", msg[i]);
+ }
+ rep[len * 3] = '\0';
+ set_text (rep);
+ delete [] rep;
+ } else {
+ set_text ("");
+ }
+}
+
+unsigned int
+HexEntry::get_hex (unsigned char *hexbuf, size_t buflen)
+
+{
+ int fetched_len;
+ char buf[3];
+ string text = get_text();
+ string::size_type length = text.length ();
+ string::size_type offset;
+
+ fetched_len = 0;
+ buf[2] = '\0';
+ offset = 0;
+
+ while (1) {
+ offset = text.find_first_of ("abcdef0123456789", offset);
+
+ if (offset == string::npos) {
+ break;
+ }
+
+ /* grab two characters, but no more */
+
+ buf[0] = text[offset];
+
+ if (offset < length - 1) {
+ buf[1] = text[offset+1];
+ offset += 2;
+ } else {
+ buf[1] = '\0';
+ offset += 1;
+ }
+
+ hexbuf[fetched_len++] = (char) strtol (buf, 0, 16);
+ }
+
+ return fetched_len;
+}
+
+
diff --git a/libs/gtkmm2ext/i18n.h b/libs/gtkmm2ext/i18n.h
new file mode 100644
index 0000000000..7c79d2eb53
--- /dev/null
+++ b/libs/gtkmm2ext/i18n.h
@@ -0,0 +1,11 @@
+#ifndef __i18n_h__
+#define __i18n_h__
+
+#include <pbd/compose.h>
+#include "gettext.h"
+
+#define _(Text) dgettext (PACKAGE, Text)
+#define N_(Text) gettext_noop (Text)
+#define X_(Text) (Text)
+
+#endif // __i18n_h__
diff --git a/libs/gtkmm2ext/idle_adjustment.cc b/libs/gtkmm2ext/idle_adjustment.cc
new file mode 100644
index 0000000000..45118283c5
--- /dev/null
+++ b/libs/gtkmm2ext/idle_adjustment.cc
@@ -0,0 +1,54 @@
+#define _BSD_SOURCE
+#include <gtkmm2ext/idle_adjustment.h>
+#include <gtkmm/main.h>
+#include <iostream>
+
+using namespace Gtk;
+using namespace sigc;
+using namespace Gtkmm2ext;
+
+IdleAdjustment::IdleAdjustment (Gtk::Adjustment& adj)
+{
+ adj.signal_value_changed().connect (mem_fun (*this, &IdleAdjustment::underlying_adjustment_value_changed));
+ timeout_queued = 0;
+ gettimeofday (&last_vc, 0);
+}
+
+IdleAdjustment::~IdleAdjustment ()
+{
+}
+
+void
+IdleAdjustment::underlying_adjustment_value_changed ()
+{
+ gettimeofday (&last_vc, 0);
+
+ if (timeout_queued) {
+ return;
+ }
+
+ Glib::signal_timeout().connect(mem_fun(*this, &IdleAdjustment::timeout_handler), 250);
+ timeout_queued = true;
+}
+
+gint
+IdleAdjustment::timeout_handler ()
+{
+ struct timeval now;
+ struct timeval tdiff;
+
+ gettimeofday (&now, 0);
+
+ timersub (&now, &last_vc, &tdiff);
+
+ std::cerr << "timer elapsed, diff = " << tdiff.tv_sec << " + " << tdiff.tv_usec << std::endl;
+
+ if (tdiff.tv_sec > 0 || tdiff.tv_usec > 250000) {
+ std::cerr << "send signal\n";
+ value_changed ();
+ timeout_queued = false;
+ return FALSE;
+ } else {
+ return TRUE;
+ }
+}
diff --git a/libs/gtkmm2ext/libgtkmm2ext.pc.in b/libs/gtkmm2ext/libgtkmm2ext.pc.in
new file mode 100644
index 0000000000..ee87973e2b
--- /dev/null
+++ b/libs/gtkmm2ext/libgtkmm2ext.pc.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@/gtkmm2ext
+
+Name: libgtkmm2ext
+Version: @VERSION@
+Description: libgtkmm2ext, a library of useful new C++ and C widgets for gtkmm users
+Requires: libpbd, libmidi++
+Libs: -L${libdir} -lgtkmm2ext @NON_PKG_LIBS@
+Cflags: -I${includedir} @NON_PKG_CFLAGS@
diff --git a/libs/gtkmm2ext/libgtkmm2ext.spec.in b/libs/gtkmm2ext/libgtkmm2ext.spec.in
new file mode 100644
index 0000000000..19657721ef
--- /dev/null
+++ b/libs/gtkmm2ext/libgtkmm2ext.spec.in
@@ -0,0 +1,68 @@
+Summary: extensions to the libgtkmm library
+%define lib_name gtkmm2ext
+Name: lib%{lib_name}
+Version: @VERSION@
+Release: 2
+Copyright: GPL
+Source: ftp://ftp.quasimodo.org/pub/libs/gtkmm2ext/current/%{name}-%{version}.tar.gz
+Url: http://www.quasimodo.org
+Vendor: Paul Barton Davis <pbd@op.net>
+Packager: jfm3 <jfm3@acm.org>
+Group: System Environment/Libraries
+Prefix: %{_prefix}
+BuildRoot: %{_tmppath}/%{name}-%{version}-root
+
+%description
+
+libgtkmm2ext provides extensions to Gtk-- useful for audio
+applications. These include ShapedWindow, MotionFeedback,
+PixmapButton and several more. It also includes the useful Pix class
+for managing sets of pixmaps, with reference counting etc.
+
+%prep
+%setup -q
+
+%build
+CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" ./configure $ARCH_FLAGS --prefix=%{prefix}
+make
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d -m 755 $RPM_BUILD_ROOT%{prefix}/{{include,lib}/%{lib_name}}
+make install INSTALL="%(which install) -p" prefix=$RPM_BUILD_ROOT%{prefix}
+
+%post
+/sbin/ldconfig
+
+%postun
+/sbin/ldconfig
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root)
+%doc README AUTHORS NEWS COPYING*
+%{prefix}/lib/libgtkmm2ext.so*
+
+%package devel
+Summary: extensions to the libgtkmm library -- developer package
+Group: System Environment/Libraries
+
+%description devel
+
+libgtkmm2ext provides extensions to Gtk-- useful for audio
+applications. These include ShapedWindow, MotionFeedback,
+PixmapButton and several more. It also includes the useful Pix class
+for managing sets of pixmaps, with reference counting etc.
+
+This package holds static libraries and headers needed by developers
+who wish to use libgtkmm2ext in their programs.
+
+%files devel
+%defattr(-,root,root)
+%{prefix}/include/gtkmm2ext/*
+%{prefix}/lib/libgtkmm2ext.a
+%{prefix}/lib/libgtkmm2ext.la
+%{prefix}/bin/gtkmm2ext-config
+%{prefix}/share/aclocal/gtkmm2ext.m4
diff --git a/libs/gtkmm2ext/pix.cc b/libs/gtkmm2ext/pix.cc
new file mode 100644
index 0000000000..c9f759b321
--- /dev/null
+++ b/libs/gtkmm2ext/pix.cc
@@ -0,0 +1,231 @@
+/*
+ Copyright (C) 1998-99 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#include <algorithm>
+
+#include <gdkmm.h>
+#include <gdkmm/pixmap.h>
+
+#include <pbd/pathscanner.h>
+#include <pbd/stl_delete.h>
+#include <pbd/failed_constructor.h>
+
+/* as of gcc 2.95.2, some of the stl_functors in this header are not
+ handled correctly. it sucks, but we put them inline here instead.
+
+ #include <pbd/stl_functors.h>
+*/
+
+#include <gtkmm2ext/pix.h>
+
+namespace std
+{
+ template<> struct less<string *> {
+ bool operator()(string *s1, string *s2) const {
+ return *s1 < *s2;
+ }
+ };
+}
+
+using namespace std;
+using namespace Gtkmm2ext;
+
+Pix::PixCache *Pix::cache;
+
+Pix::Pix (bool homog)
+
+{
+ pixmap_count = 0;
+ _homegenous = homog;
+}
+
+Pix::Pix (vector<const char **> xpm_data, bool homog)
+{
+ if (xpm_data.size() == 0) {
+ throw failed_constructor();
+ }
+
+ pixmap_count = xpm_data.size();
+ last_pixmap = pixmap_count - 1;
+ refcnt = 0;
+ generated = false;
+ max_pixwidth = 0;
+ max_pixheight = 0;
+ _homegenous = homog;
+
+ data = xpm_data;
+ from_files = false;
+
+ pixmaps = new Glib::RefPtr<Gdk::Pixmap> [pixmap_count];
+ bitmaps = new Glib::RefPtr<Gdk::Bitmap> [pixmap_count];
+ memset (pixmaps, 0, sizeof (Glib::RefPtr<Gdk::Pixmap>) * pixmap_count);
+ memset (bitmaps, 0, sizeof (Glib::RefPtr<Gdk::Bitmap>) * pixmap_count);
+}
+
+Pix::Pix (const string &dirpath, const string &regexp, bool homog)
+
+{
+ PathScanner scanner;
+ less<string *> cmp;
+
+ pixmap_count = 0;
+ last_pixmap = 0;
+ refcnt = 0;
+ generated = false;
+ max_pixwidth = 0;
+ max_pixheight = 0;
+ _homegenous = homog;
+
+ pixmaps = 0;
+ bitmaps = 0;
+
+ files = scanner (dirpath, regexp, false, true);
+
+ sort (files->begin(), files->end(), cmp);
+
+ if (files == 0) {
+ return;
+ }
+
+ /* create handy reference */
+
+ if ((pixmap_count = files->size()) == 0) {
+ return;
+ }
+
+ from_files = true;
+ pixmaps = new Glib::RefPtr<Gdk::Pixmap> [pixmap_count];
+ bitmaps = new Glib::RefPtr<Gdk::Bitmap> [pixmap_count];
+ memset (pixmaps, 0, sizeof (Glib::RefPtr<Gdk::Pixmap>) * pixmap_count);
+ memset (bitmaps, 0, sizeof (Glib::RefPtr<Gdk::Bitmap>) * pixmap_count);
+
+ last_pixmap = pixmap_count - 1;
+}
+
+Pix::~Pix ()
+
+{
+ if (from_files) {
+ vector_delete (files);
+ }
+
+ if (pixmap_count) delete [] pixmaps;
+ if (pixmap_count) delete [] bitmaps;
+}
+
+void
+Pix::generate ()
+
+{
+ if (generated) {
+ return;
+ }
+
+ for (int i = 0; i < pixmap_count; i++) {
+ if (from_files) {
+ string *strp;
+ strp = (*files)[i];
+ const char* str(strp->c_str());
+
+ pixmaps[i] = Gdk::Pixmap::create_from_xpm (Gdk::Colormap::get_system(),
+ bitmaps[i], &str);
+ } else {
+ gchar **xpm;
+ xpm = const_cast<gchar **> (data[i]);
+
+ pixmaps[i] = Gdk::Pixmap::create_from_xpm(Gdk::Colormap::get_system(),
+ bitmaps[i], Gdk::Color(), xpm);
+ }
+
+ int w, h;
+ pixmaps[i]->get_size(w, h);
+ if (w > max_pixwidth) max_pixwidth = w;
+ if (h > max_pixheight) max_pixheight = h;
+ }
+
+ generated = true;
+}
+
+Pix *
+Gtkmm2ext::get_pix (string name, vector<const char **> xpm_data, bool homog)
+{
+ Pix *ret = 0;
+ Pix::PixCache::iterator iter;
+ pair<string, Pix *> newpair;
+
+ if (Pix::cache == 0) {
+ Pix::cache = new Pix::PixCache;
+ }
+
+ if ((iter = Pix::cache->find (name)) == Pix::cache->end()) {
+ ret = new Pix (xpm_data, homog);
+ if (ret->pixmap_count == 0) {
+ delete ret;
+ return 0;
+ }
+ newpair.first = name;
+ newpair.second = ret;
+ ret->cache_position = (Pix::cache->insert (newpair)).first;
+ ret->refcnt++;
+ return ret;
+ } else {
+ (*iter).second->refcnt++;
+ return (*iter).second;
+ }
+}
+
+Pix *
+Gtkmm2ext::get_pix (const string &dirpath, const string &regexp, bool homog)
+{
+ Pix *ret = 0;
+ Pix::PixCache::iterator iter;
+ pair<string, Pix *> newpair;
+
+ if (Pix::cache == 0) {
+ Pix::cache = new Pix::PixCache;
+ }
+
+ if ((iter = Pix::cache->find (regexp)) == Pix::cache->end()) {
+ ret = new Pix (dirpath, regexp, homog);
+ if (ret->pixmap_count == 0) {
+ delete ret;
+ return 0;
+ }
+ newpair.first = regexp;
+ newpair.second = ret;
+ ret->cache_position = (Pix::cache->insert (newpair)).first;
+ ret->refcnt++;
+ return ret;
+ } else {
+ (*iter).second->refcnt++;
+ return (*iter).second;
+ }
+}
+
+void
+Gtkmm2ext::finish_pix (Pix *pix)
+
+{
+ pix->refcnt--;
+ if (pix->refcnt == 0) {
+ Pix::cache->erase (pix->cache_position);
+ delete pix;
+ }
+}
diff --git a/libs/gtkmm2ext/pixscroller.cc b/libs/gtkmm2ext/pixscroller.cc
new file mode 100644
index 0000000000..78f1725271
--- /dev/null
+++ b/libs/gtkmm2ext/pixscroller.cc
@@ -0,0 +1,248 @@
+/*
+ Copyright (C) 2005 Paul Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+#include <iostream>
+#include <algorithm>
+#include <cmath>
+
+#include <gtkmm.h>
+
+#include <gtkmm2ext/pixscroller.h>
+
+using namespace std;
+using namespace Gtk;
+using namespace Gtkmm2ext;
+
+PixScroller::PixScroller (Adjustment& a, Pix& pix)
+ : adj (a)
+{
+ dragging = false;
+ add_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK|Gdk::POINTER_MOTION_MASK);
+
+ adj.signal_value_changed().connect (mem_fun (*this, &PixScroller::adjustment_changed));
+ default_value = adj.get_value();
+
+ pix.generate ();
+
+ rail = *(pix.pixmap (0));
+ rail_mask = *(pix.shape_mask (0));
+ slider = *(pix.pixmap (1));
+ slider_mask = *(pix.shape_mask (1));
+
+ int w, h;
+
+ slider->get_size (w, h);
+ sliderrect.set_width(w);
+ sliderrect.set_height(h);
+ rail->get_size (w, h);
+ railrect.set_width(w);
+ railrect.set_height(h);
+
+ railrect.set_y(sliderrect.get_height() / 2);
+ sliderrect.set_x(0);
+
+ overall_height = railrect.get_height() + sliderrect.get_height();
+
+ sliderrect.set_y((int) rint ((overall_height - sliderrect.get_height()) * (adj.get_upper() - adj.get_value())));
+ railrect.set_x((sliderrect.get_width() / 2) - 3);
+}
+
+void
+PixScroller::on_size_request (GtkRequisition* requisition)
+{
+ requisition->width = sliderrect.get_width();
+ requisition->height = overall_height;
+}
+
+bool
+PixScroller::on_expose_event (GdkEventExpose* ev)
+{
+ GdkRectangle intersect;
+ Glib::RefPtr<Gdk::Window> win (get_window());
+
+ win->draw_rectangle (get_style()->get_bg_gc(get_state()), TRUE,
+ ev->area.x,
+ ev->area.y,
+ ev->area.width,
+ ev->area.height);
+
+ if (gdk_rectangle_intersect (railrect.gobj(), &ev->area, &intersect)) {
+ Glib::RefPtr<Gdk::GC> gc(get_style()->get_bg_gc(get_state()));
+ win->draw_drawable (gc, rail,
+ intersect.x - railrect.get_x(),
+ intersect.y - railrect.get_y(),
+ intersect.x,
+ intersect.y,
+ intersect.width,
+ intersect.height);
+ }
+
+ if (gdk_rectangle_intersect (sliderrect.gobj(), &ev->area, &intersect)) {
+ Glib::RefPtr<Gdk::GC> gc(get_style()->get_fg_gc(get_state()));
+ Glib::RefPtr<Gdk::Bitmap> mask (slider_mask);
+// Do these have a gtk2 equivalent?
+// Gdk::GCValues values;
+// gc->get_values(values);
+ gc->set_clip_origin (sliderrect.get_x(), sliderrect.get_y());
+ gc->set_clip_mask (mask);
+ win->draw_drawable (gc, slider,
+ intersect.x - sliderrect.get_x(),
+ intersect.y - sliderrect.get_y(),
+ intersect.x,
+ intersect.y,
+ intersect.width,
+ intersect.height);
+// gc->set_clip_origin(values.clip_x_origin, values.clip_y_origin);
+// Gdk::Bitmap i_hate_gdk (values.clip_mask);
+// gc->set_clip_mask (i_hate_gdk);
+ }
+
+
+ return true;
+}
+
+bool
+PixScroller::on_button_press_event (GdkEventButton* ev)
+{
+ switch (ev->button) {
+ case 1:
+ if (!(ev->state & Gdk::SHIFT_MASK)) {
+ add_modal_grab();
+ grab_y = ev->y;
+ grab_start = ev->y;
+ grab_window = ev->window;
+ dragging = true;
+ }
+ break;
+ default:
+ break;
+ }
+
+
+ return false;
+}
+
+bool
+PixScroller::on_button_release_event (GdkEventButton* ev)
+{
+ double scale;
+
+ if (ev->state & GDK_CONTROL_MASK) {
+ if (ev->state & GDK_MOD1_MASK) {
+ scale = 0.05;
+ } else {
+ scale = 0.1;
+ }
+ } else {
+ scale = 1.0;
+ }
+
+ switch (ev->button) {
+ case 1:
+ if (dragging) {
+ remove_modal_grab();
+ dragging = false;
+
+ if (ev->y == grab_start) {
+ /* no motion - just a click */
+ double fract;
+
+ if (ev->y < sliderrect.get_height()/2) {
+ /* near the top */
+ fract = 1.0;
+ } else {
+ fract = 1.0 - (ev->y - sliderrect.get_height()/2) / railrect.get_height();
+ }
+
+ fract = min (1.0, fract);
+ fract = max (0.0, fract);
+
+ adj.set_value (scale * fract * (adj.get_upper() - adj.get_lower()));
+ }
+ } else {
+ if (ev->state & Gdk::SHIFT_MASK) {
+ adj.set_value (default_value);
+ cerr << "default value = " << default_value << endl;
+ }
+ }
+ break;
+ case 4:
+ /* wheel up */
+ adj.set_value (adj.get_value() + (adj.get_page_increment() * scale));
+ break;
+ case 5:
+ /* wheel down */
+ adj.set_value (adj.get_value() - (adj.get_page_increment() * scale));
+ break;
+ default:
+ break;
+ }
+ return false;
+}
+
+bool
+PixScroller::on_motion_notify_event (GdkEventMotion* ev)
+{
+ if (dragging) {
+ double fract;
+ double delta;
+ double scale;
+
+ if (ev->window != grab_window) {
+ grab_y = ev->y;
+ grab_window = ev->window;
+ return true;
+ }
+
+ if (ev->state & GDK_CONTROL_MASK) {
+ if (ev->state & GDK_MOD1_MASK) {
+ scale = 0.05;
+ } else {
+ scale = 0.1;
+ }
+ } else {
+ scale = 1.0;
+ }
+
+ delta = ev->y - grab_y;
+ grab_y = ev->y;
+
+ fract = (delta / railrect.get_height());
+
+ fract = min (1.0, fract);
+ fract = max (-1.0, fract);
+
+ fract = -fract;
+
+ adj.set_value (adj.get_value() + scale * fract * (adj.get_upper() - adj.get_lower()));
+ }
+
+ return true;
+}
+
+void
+PixScroller::adjustment_changed ()
+{
+ int y = (int) rint ((overall_height - sliderrect.get_height()) * (adj.get_upper() - adj.get_value()));
+
+ if (y != sliderrect.get_y()) {
+ sliderrect.set_y(y);
+ queue_draw ();
+ }
+}
diff --git a/libs/gtkmm2ext/po/el_GR.po b/libs/gtkmm2ext/po/el_GR.po
new file mode 100644
index 0000000000..28dd199ea3
--- /dev/null
+++ b/libs/gtkmm2ext/po/el_GR.po
@@ -0,0 +1,79 @@
+# Σχολιαστικός Τίτλος.
+# Πνευματικά Δικαιώματα (C) YEAR Paul Davis
+# Το παÏόν αÏχείο διανέμεται υπό της ιδίας αδείας με του PACKAGE πακέτου.
+# ΠΡΩΤΟΣ ΔΗΜΙΟΥΡΓΟΣ <muadib@in.gr>, 2004.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: 0.99beta23\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2005-03-12 11:01-0500\n"
+"PO-Revision-Date: 2005-01-11\n"
+"Last-Translator: Muadibas\n"
+"Language-Team: Hellenic(Greek) <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: libs/gtkmm2ext/barcontroller.cc:416 libs/gtkmm2ext/bindable_button.cc:136
+#: libs/gtkmm2ext/controller.cc:50 libs/gtkmm2ext/slider_controller.cc:141
+msgid "operate MIDI controller now"
+msgstr "λειτουÏγία ελεγκτή MIDI Ï„ÏŽÏα"
+
+#: libs/gtkmm2ext/gtk_ui.cc:55
+msgid "cannot create thread request buffer key"
+msgstr ""
+
+#: libs/gtkmm2ext/gtk_ui.cc:356 libs/gtkmm2ext/gtk_ui.cc:523
+msgid "programming error: "
+msgstr ""
+
+#: libs/gtkmm2ext/gtk_ui.cc:688
+msgid "Press To Exit"
+msgstr ""
+
+#: libs/gtkmm2ext/mwc.cc:33 libs/gtkmm2ext/popup_selector.cc:34
+#: libs/gtkmm2ext/prompter.cc:32
+msgid "OK"
+msgstr "OK"
+
+#: libs/gtkmm2ext/newsavedialog.cc:26
+msgid "Location:"
+msgstr "Τοποθεσία:"
+
+#: libs/gtkmm2ext/newsavedialog.cc:27 libs/gtkmm2ext/newsavedialog.cc:265
+msgid "Browse ..."
+msgstr "Αναζήτηση ..."
+
+#: libs/gtkmm2ext/newsavedialog.cc:28 libs/gtkmm2ext/newsavedialog.cc:61
+#: libs/gtkmm2ext/prompter.cc:33
+msgid "Cancel"
+msgstr "ΑκÏÏωση"
+
+#: libs/gtkmm2ext/newsavedialog.cc:30
+msgid "New folder"
+msgstr "Îέος φάκελος"
+
+#: libs/gtkmm2ext/newsavedialog.cc:31
+msgid "Add to favorites"
+msgstr "ΠÏόσθεση στα 'Αγαπημένα'"
+
+#: libs/gtkmm2ext/newsavedialog.cc:32
+msgid "Remove from favorites"
+msgstr "Απαλοιφή από τα 'Αγαπημένα'"
+
+#: libs/gtkmm2ext/newsavedialog.cc:33
+msgid "Show Hidden"
+msgstr "Ανάδειξη κÏυμμένων"
+
+#: libs/gtkmm2ext/newsavedialog.cc:53 libs/gtkmm2ext/newsavedialog.cc:269
+msgid "Hide browser"
+msgstr "ΑπόκÏυψη browser"
+
+#: libs/gtkmm2ext/popup_selector.cc:33 libs/gtkmm2ext/textviewer.cc:34
+msgid "Close"
+msgstr "Κλείσιμο"
+
+#: libs/gtkmm2ext/popup_selector.cc:35
+msgid "Rescan"
+msgstr "Ανανέωση"
diff --git a/libs/gtkmm2ext/po/es_ES.po b/libs/gtkmm2ext/po/es_ES.po
new file mode 100644
index 0000000000..fed58f060a
--- /dev/null
+++ b/libs/gtkmm2ext/po/es_ES.po
@@ -0,0 +1,78 @@
+# Copyright (C) 2004 Paul Davis
+# This file is distributed under the same license as the gtkmm2ext package.
+# Author: Alex Krohn <alexkrohn@fastmail.fm>, 2004.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: gtkmm2ext\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2005-03-12 11:01-0500\n"
+"PO-Revision-Date: 2004-02-13 00:35+0300\n"
+"Last-Translator: Alex Krohn alexkrohn@fastmail.fm\n"
+"Language-Team: Spanish\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: libs/gtkmm2ext/barcontroller.cc:416 libs/gtkmm2ext/bindable_button.cc:136
+#: libs/gtkmm2ext/controller.cc:50 libs/gtkmm2ext/slider_controller.cc:141
+msgid "operate MIDI controller now"
+msgstr "Operar controladora de MIDI ahora"
+
+#: libs/gtkmm2ext/gtk_ui.cc:55
+msgid "cannot create thread request buffer key"
+msgstr ""
+
+#: libs/gtkmm2ext/gtk_ui.cc:356 libs/gtkmm2ext/gtk_ui.cc:523
+msgid "programming error: "
+msgstr ""
+
+#: libs/gtkmm2ext/gtk_ui.cc:688
+msgid "Press To Exit"
+msgstr ""
+
+#: libs/gtkmm2ext/mwc.cc:33 libs/gtkmm2ext/popup_selector.cc:34
+#: libs/gtkmm2ext/prompter.cc:32
+msgid "OK"
+msgstr "ACEPTAR"
+
+#: libs/gtkmm2ext/newsavedialog.cc:26
+msgid "Location:"
+msgstr "Localización:"
+
+#: libs/gtkmm2ext/newsavedialog.cc:27 libs/gtkmm2ext/newsavedialog.cc:265
+msgid "Browse ..."
+msgstr "Seleccionar ..."
+
+#: libs/gtkmm2ext/newsavedialog.cc:28 libs/gtkmm2ext/newsavedialog.cc:61
+#: libs/gtkmm2ext/prompter.cc:33
+msgid "Cancel"
+msgstr "Cancelar"
+
+#: libs/gtkmm2ext/newsavedialog.cc:30
+msgid "New folder"
+msgstr "Nueva carpeta"
+
+#: libs/gtkmm2ext/newsavedialog.cc:31
+msgid "Add to favorites"
+msgstr "Agregar a favoritos"
+
+#: libs/gtkmm2ext/newsavedialog.cc:32
+msgid "Remove from favorites"
+msgstr "Quitar de favoritos"
+
+#: libs/gtkmm2ext/newsavedialog.cc:33
+msgid "Show Hidden"
+msgstr "Mostrar ocultos"
+
+#: libs/gtkmm2ext/newsavedialog.cc:53 libs/gtkmm2ext/newsavedialog.cc:269
+msgid "Hide browser"
+msgstr "Ocultar explorador"
+
+#: libs/gtkmm2ext/popup_selector.cc:33 libs/gtkmm2ext/textviewer.cc:34
+msgid "Close"
+msgstr "Cerrar"
+
+#: libs/gtkmm2ext/popup_selector.cc:35
+msgid "Rescan"
+msgstr "Buscar de nuevo"
diff --git a/libs/gtkmm2ext/po/pt_BR.po b/libs/gtkmm2ext/po/pt_BR.po
new file mode 100644
index 0000000000..451e4adb3a
--- /dev/null
+++ b/libs/gtkmm2ext/po/pt_BR.po
@@ -0,0 +1,79 @@
+# Copyright (C) 2004 Paul Davis
+# This file is distributed under the same license as the gtkmm2ext package.
+# Authors: Alexander Franca <alexander@nautae.eti.br>
+# Chris Ross <chris.ross@tebibyte.org>
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: gtkmm2ext\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2005-03-12 11:01-0500\n"
+"PO-Revision-Date: 2004-05-17 20:36+0200\n"
+"Last-Translator: Chris Ross <chris.ross@tebibyte.org>\n"
+"Language-Team: Portuguese\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-15\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: libs/gtkmm2ext/barcontroller.cc:416 libs/gtkmm2ext/bindable_button.cc:136
+#: libs/gtkmm2ext/controller.cc:50 libs/gtkmm2ext/slider_controller.cc:141
+msgid "operate MIDI controller now"
+msgstr "Operar controladora de MIDI agora"
+
+#: libs/gtkmm2ext/gtk_ui.cc:55
+msgid "cannot create thread request buffer key"
+msgstr ""
+
+#: libs/gtkmm2ext/gtk_ui.cc:356 libs/gtkmm2ext/gtk_ui.cc:523
+msgid "programming error: "
+msgstr ""
+
+#: libs/gtkmm2ext/gtk_ui.cc:688
+msgid "Press To Exit"
+msgstr ""
+
+#: libs/gtkmm2ext/mwc.cc:33 libs/gtkmm2ext/popup_selector.cc:34
+#: libs/gtkmm2ext/prompter.cc:32
+msgid "OK"
+msgstr "OK"
+
+#: libs/gtkmm2ext/newsavedialog.cc:26
+msgid "Location:"
+msgstr "localização:"
+
+#: libs/gtkmm2ext/newsavedialog.cc:27 libs/gtkmm2ext/newsavedialog.cc:265
+msgid "Browse ..."
+msgstr "Localizar ..."
+
+#: libs/gtkmm2ext/newsavedialog.cc:28 libs/gtkmm2ext/newsavedialog.cc:61
+#: libs/gtkmm2ext/prompter.cc:33
+msgid "Cancel"
+msgstr "Cancelar"
+
+#: libs/gtkmm2ext/newsavedialog.cc:30
+msgid "New folder"
+msgstr "Novo diretório"
+
+#: libs/gtkmm2ext/newsavedialog.cc:31
+msgid "Add to favorites"
+msgstr "Adicionar a favoritos"
+
+#: libs/gtkmm2ext/newsavedialog.cc:32
+msgid "Remove from favorites"
+msgstr "Remover de favoritos"
+
+#: libs/gtkmm2ext/newsavedialog.cc:33
+msgid "Show Hidden"
+msgstr "Mostrar ocultos"
+
+#: libs/gtkmm2ext/newsavedialog.cc:53 libs/gtkmm2ext/newsavedialog.cc:269
+msgid "Hide browser"
+msgstr "Ocultar explorador"
+
+#: libs/gtkmm2ext/popup_selector.cc:33 libs/gtkmm2ext/textviewer.cc:34
+msgid "Close"
+msgstr "Fechar"
+
+#: libs/gtkmm2ext/popup_selector.cc:35
+msgid "Rescan"
+msgstr "Buscar de novo"
diff --git a/libs/gtkmm2ext/po/ru_RU.po b/libs/gtkmm2ext/po/ru_RU.po
new file mode 100644
index 0000000000..4fc78f6987
--- /dev/null
+++ b/libs/gtkmm2ext/po/ru_RU.po
@@ -0,0 +1,78 @@
+# Copyright (C) 2004 Paul Davis
+# This file is distributed under the same license as the gtkmm2ext package.
+# Igor Blinov pitstop@nm.ru, 2004.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: gtkmm2ext\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2005-03-12 11:01-0500\n"
+"PO-Revision-Date: 2004-02-13 00:35+0300\n"
+"Last-Translator: Igor Blinov pitstop@nm.ru\n"
+"Language-Team: Russian\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=koi8-r\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: libs/gtkmm2ext/barcontroller.cc:416 libs/gtkmm2ext/bindable_button.cc:136
+#: libs/gtkmm2ext/controller.cc:50 libs/gtkmm2ext/slider_controller.cc:141
+msgid "operate MIDI controller now"
+msgstr "×ËÌÀÞÉÔØ MIDI-ËÏÎÔÒÏÌÌÅÒ"
+
+#: libs/gtkmm2ext/gtk_ui.cc:55
+msgid "cannot create thread request buffer key"
+msgstr ""
+
+#: libs/gtkmm2ext/gtk_ui.cc:356 libs/gtkmm2ext/gtk_ui.cc:523
+msgid "programming error: "
+msgstr ""
+
+#: libs/gtkmm2ext/gtk_ui.cc:688
+msgid "Press To Exit"
+msgstr ""
+
+#: libs/gtkmm2ext/mwc.cc:33 libs/gtkmm2ext/popup_selector.cc:34
+#: libs/gtkmm2ext/prompter.cc:32
+msgid "OK"
+msgstr "ïë"
+
+#: libs/gtkmm2ext/newsavedialog.cc:26
+msgid "Location:"
+msgstr "ðÕÔØ:"
+
+#: libs/gtkmm2ext/newsavedialog.cc:27 libs/gtkmm2ext/newsavedialog.cc:265
+msgid "Browse ..."
+msgstr "ïÂÚÏÒ ..."
+
+#: libs/gtkmm2ext/newsavedialog.cc:28 libs/gtkmm2ext/newsavedialog.cc:61
+#: libs/gtkmm2ext/prompter.cc:33
+msgid "Cancel"
+msgstr "ïÔÍÅÎÁ"
+
+#: libs/gtkmm2ext/newsavedialog.cc:30
+msgid "New folder"
+msgstr "îÏ×ÁÑ ÐÁÐËÁ"
+
+#: libs/gtkmm2ext/newsavedialog.cc:31
+msgid "Add to favorites"
+msgstr "äÏÂÁ×ÉÔØ × ÉÚÂÒÁÎÎÏÅ"
+
+#: libs/gtkmm2ext/newsavedialog.cc:32
+msgid "Remove from favorites"
+msgstr "éÓËÌÀÞÉÔØ ÉÚ ÉÚÂÒÁÎÎÏÇÏ"
+
+#: libs/gtkmm2ext/newsavedialog.cc:33
+msgid "Show Hidden"
+msgstr "ðÏËÁÚÙ×ÁÔØ ÓËÒÙÔÙÅ ÆÁÊÌÙ"
+
+#: libs/gtkmm2ext/newsavedialog.cc:53 libs/gtkmm2ext/newsavedialog.cc:269
+msgid "Hide browser"
+msgstr "óËÒÙÔØ ÏÂÌÁÓÔØ ÏÂÚÏÒÁ"
+
+#: libs/gtkmm2ext/popup_selector.cc:33 libs/gtkmm2ext/textviewer.cc:34
+msgid "Close"
+msgstr "úÁËÒÙÔØ"
+
+#: libs/gtkmm2ext/popup_selector.cc:35
+msgid "Rescan"
+msgstr "ïÂÎÏ×ÉÔØ"
diff --git a/libs/gtkmm2ext/popup.cc b/libs/gtkmm2ext/popup.cc
new file mode 100644
index 0000000000..540edba5c3
--- /dev/null
+++ b/libs/gtkmm2ext/popup.cc
@@ -0,0 +1,134 @@
+/*
+ Copyright (C) 1998-99 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#include <iostream>
+
+#include <gtkmm2ext/popup.h>
+#include <gtkmm2ext/utils.h>
+
+using namespace std;
+using namespace Gtk;
+using namespace Gtkmm2ext;
+
+PopUp::PopUp (Gtk::WindowPosition pos, unsigned int showfor_msecs, bool doh)
+ : Window (WINDOW_POPUP)
+{
+
+ realize ();
+ Glib::RefPtr<Gdk::Window> win (get_window());
+ win->set_decorations (Gdk::WMDecoration (Gdk::DECOR_BORDER|Gdk::DECOR_RESIZEH));
+ add_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK);
+ signal_button_press_event().connect(mem_fun(*this,&PopUp::button_click));
+ set_border_width (12);
+ add (label);
+ set_position (pos);
+
+ delete_on_hide = doh;
+ popdown_time = showfor_msecs;
+ timeout = -1;
+}
+
+
+PopUp::~PopUp ()
+{
+}
+
+gint
+PopUp::remove_prompt_timeout (void *arg)
+{
+ PopUp *pup = (PopUp *) arg;
+
+ pup->remove ();
+ return FALSE;
+}
+
+static gint idle_delete (void *arg)
+{
+ delete static_cast<PopUp*> (arg);
+ return FALSE;
+}
+
+void
+PopUp::remove ()
+{
+ hide ();
+
+ if (delete_on_hide) {
+ std::cerr << "deleting prompter\n";
+ if (popdown_time != 0 && timeout != -1) {
+ gtk_timeout_remove (timeout);
+ }
+ gtk_idle_add (idle_delete, this);
+ }
+}
+
+void
+PopUp::touch ()
+{
+ if (is_visible ()) {
+ remove ();
+ } else {
+ set_usize_to_display_given_text (label, my_text.c_str(), 25, 10);
+ label.set_text (my_text);
+ show_all ();
+
+ if (popdown_time != 0) {
+ timeout = gtk_timeout_add (popdown_time,
+ remove_prompt_timeout,
+ this);
+ }
+ }
+}
+
+gint
+PopUp::button_click (GdkEventButton *ev)
+{
+ remove ();
+ return TRUE;
+}
+
+void
+PopUp::set_text (string txt)
+{
+ my_text = txt;
+}
+
+void
+PopUp::set_name (string name)
+{
+ Window::set_name (name);
+ label.set_name (name);
+}
+
+bool
+PopUp::on_delete_event (GdkEventAny* ev)
+{
+ hide();
+
+ if (delete_on_hide) {
+ std::cerr << "deleting prompter\n" << endl;
+ if (popdown_time != 0 && timeout != -1) {
+ gtk_timeout_remove (timeout);
+ }
+ gtk_idle_add (idle_delete, this);
+ }
+
+ return true;
+}
diff --git a/libs/gtkmm2ext/prompter.cc b/libs/gtkmm2ext/prompter.cc
new file mode 100644
index 0000000000..83a64e78d4
--- /dev/null
+++ b/libs/gtkmm2ext/prompter.cc
@@ -0,0 +1,118 @@
+/*
+ Copyright (C) 1999 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#include <string>
+
+#include <gtkmm2ext/prompter.h>
+
+#include "i18n.h"
+
+using namespace std;
+using namespace Gtkmm2ext;
+
+Prompter::Prompter (bool modal)
+ : Gtk::Window (Gtk::WINDOW_POPUP),
+ ok (_("OK")),
+ cancel (_("Cancel"))
+{
+ set_position (Gtk::WIN_POS_MOUSE);
+ set_name ("Prompter");
+ set_modal (modal);
+
+ add (packer);
+
+ entryLabel.set_line_wrap (true);
+ entryLabel.set_name ("PrompterLabel");
+
+ entryBox.set_homogeneous (false);
+ entryBox.set_spacing (25);
+ entryBox.set_border_width (10);
+ entryBox.pack_start (entryLabel);
+ entryBox.pack_start (entry, false, false);
+
+ buttonBox.set_homogeneous (true);
+ buttonBox.set_border_width (10);
+ buttonBox.pack_start (ok, false, true);
+ buttonBox.pack_start (cancel, false, true);
+
+ packer.pack_start (entryBox);
+ packer.pack_start (buttonBox);
+
+ entry.signal_activate().connect(mem_fun(*this,&Prompter::activated));
+ ok.signal_clicked().connect(mem_fun(*this,&Prompter::activated));
+ cancel.signal_clicked().connect(mem_fun(*this,&Prompter::cancel_click));
+ signal_delete_event().connect (mem_fun (*this, &Prompter::deleted));
+
+}
+
+void
+Prompter::change_labels (string okstr, string cancelstr)
+{
+ dynamic_cast<Gtk::Label*>(ok.get_child())->set_text (okstr);
+ dynamic_cast<Gtk::Label*>(cancel.get_child())->set_text (cancelstr);
+}
+
+void
+Prompter::on_realize ()
+{
+ Gtk::Window::on_realize ();
+ Glib::RefPtr<Gdk::Window> win (get_window());
+ win->set_decorations (Gdk::WMDecoration (Gdk::DECOR_BORDER|Gdk::DECOR_RESIZEH|Gdk::DECOR_MENU));
+}
+
+void
+Prompter::on_map ()
+{
+ entry.grab_focus();
+ Gtk::Window::on_map ();
+}
+
+void
+Prompter::activated ()
+
+{
+ status = entered;
+ hide_all ();
+ done ();
+}
+
+void
+Prompter::cancel_click ()
+
+{
+ entry.set_text ("");
+ status = cancelled;
+ hide_all ();
+ done ();
+}
+
+bool
+Prompter::deleted (GdkEventAny *ev)
+{
+ cancel_click ();
+ return false;
+}
+
+void
+Prompter::get_result (string &str)
+
+{
+ str = entry.get_text ();
+}
diff --git a/libs/gtkmm2ext/selector.cc b/libs/gtkmm2ext/selector.cc
new file mode 100644
index 0000000000..371c946fe7
--- /dev/null
+++ b/libs/gtkmm2ext/selector.cc
@@ -0,0 +1,238 @@
+/*
+ Copyright (C) 1999 Paul Barton-Davis
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#include <algorithm>
+#include <functional>
+#include <vector>
+#include <string>
+
+#include <gtkmm2ext/selector.h>
+#include <gtkmm2ext/utils.h>
+#include <pbd/pathscanner.h>
+#include <pbd/error.h>
+
+using namespace std;
+using namespace Gtkmm2ext;
+
+Selector::Selector (void (*func)(Glib::RefPtr<Gtk::ListStore>, void *), void *arg,
+ vector<string> titles)
+{
+ scroll.add (tview);
+ scroll.set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_AUTOMATIC);
+
+ pack_start (scroll, true, true);
+
+ vector<string>::iterator i;
+ for (i = titles.begin(); i != titles.end(); ++i) {
+ Gtk::TreeModelColumn<Glib::ustring> title;
+ column_records.add(title);
+ }
+
+ lstore = Gtk::ListStore::create(column_records);
+ tview.set_model(lstore);
+
+ update_contents.connect(mem_fun(*this,&Selector::rescan));
+
+ tview.show ();
+
+ refiller = func;
+ refill_arg = arg;
+ selected_row = -1;
+ selected_column = -1;
+}
+
+Selector::~Selector ()
+
+{
+ /* ensure that any row data set with set_row_data_full() is deleted */
+ hide_all ();
+ lstore.clear ();
+}
+
+void
+Selector::on_map()
+
+{
+ Gtk::VBox::on_map ();
+
+ selected_row = -1;
+ selected_column = -1;
+ refill();
+}
+
+void
+Selector::on_show()
+{
+ VBox::on_show();
+
+ rescan();
+}
+
+void
+Selector::reset (void (*func)(Glib::RefPtr<Gtk::ListStore>, void *), void *arg)
+
+{
+ refiller = func;
+ refill_arg = arg;
+ selected_row = -1;
+ selected_column = -1;
+
+ refill();
+}
+
+void
+Selector::refill ()
+
+{
+ if (refiller) {
+ lstore.clear ();
+ refiller (lstore, refill_arg);
+ }
+}
+
+gint
+Selector::_accept (gpointer arg)
+
+{
+ ((Selector *) arg)->accept ();
+ return FALSE;
+}
+
+gint
+Selector::_chosen (gpointer arg)
+
+{
+ ((Selector *) arg)->chosen ();
+ return FALSE;
+}
+
+gint
+Selector::_shift_clicked (gpointer arg)
+{
+ ((Selector *) arg)->shift_clicked ();
+ return FALSE;
+}
+
+gint
+Selector::_control_clicked (gpointer arg)
+{
+ ((Selector *) arg)->control_clicked ();
+ return FALSE;
+}
+
+void
+Selector::accept ()
+{
+ Glib::RefPtr<Gtk::TreeSelection> tree_sel = tview.get_selection();
+ Gtk::TreeModel::iterator iter = tree_sel->get_selected();
+
+ if (iter) {
+ selection_made (tview, tree_sel);
+ } else {
+ cancel ();
+ }
+}
+
+void
+Selector::chosen ()
+
+{
+ Glib::RefPtr<Gtk::TreeSelection> tree_sel = tview.get_selection();
+ Gtk::TreeModel::iterator iter = tree_sel->get_selected();
+
+ if (iter) {
+ choice_made (tview, tree_sel);
+ } else {
+ cancel ();
+ }
+}
+
+void
+Selector::shift_clicked ()
+
+{
+ Glib::RefPtr<Gtk::TreeSelection> tree_sel = tview.get_selection();
+ Gtk::TreeModel::iterator iter = tree_sel->get_selected();
+
+ if (iter) {
+ shift_made (tview, tree_sel);
+ } else {
+ cancel ();
+ }
+}
+
+void
+Selector::control_clicked ()
+
+{
+ Glib::RefPtr<Gtk::TreeSelection> tree_sel = tview.get_selection();
+ Gtk::TreeModel::iterator iter = tree_sel->get_selected();
+
+ if (iter) {
+ control_made (tview, tree_sel);
+ } else {
+ cancel ();
+ }
+}
+
+void
+Selector::cancel ()
+
+{
+ Glib::RefPtr<Gtk::TreeSelection> tree_sel = tview.get_selection();
+ tree_sel->unselect_all();
+
+ selection_made (tview, tree_sel);
+}
+
+void
+Selector::rescan ()
+
+{
+ selected_row = -1;
+ selected_column = -1;
+ refill ();
+ show_all ();
+}
+
+struct string_cmp {
+ bool operator()(const string* a, const string* b) {
+ return *a < *b;
+ }
+};
+
+bool
+TreeView_Selector::on_button_press_event(GdkEventButton* ev)
+{
+ bool return_value = TreeView::on_button_press_event(ev);
+
+ if (ev && (ev->type == GDK_BUTTON_RELEASE || ev->type == GDK_2BUTTON_PRESS)) {
+ if (ev->state & Gdk::CONTROL_MASK) {
+ gtk_idle_add (Selector::_control_clicked, this);
+ } else if (ev->state & Gdk::SHIFT_MASK) {
+ gtk_idle_add (Selector::_shift_clicked, this);
+ } else if (ev->type == GDK_2BUTTON_PRESS) {
+ gtk_idle_add (Selector::_accept, this);
+ } else {
+ gtk_idle_add (Selector::_chosen, this);
+ }
+ }
+
+ return return_value;
+}
diff --git a/libs/gtkmm2ext/slider_controller.cc b/libs/gtkmm2ext/slider_controller.cc
new file mode 100644
index 0000000000..ca75fbb7b4
--- /dev/null
+++ b/libs/gtkmm2ext/slider_controller.cc
@@ -0,0 +1,183 @@
+/*
+ Copyright (C) 1998-99 Paul Davis
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#include <string>
+#include <climits>
+
+#include <midi++/controllable.h>
+
+#include <gtkmm2ext/gtk_ui.h>
+#include <gtkmm2ext/slider_controller.h>
+#include <gtkmm2ext/pix.h>
+
+#include "i18n.h"
+
+using namespace Gtkmm2ext;
+
+SliderController::SliderController (Pix *pixset,
+ Gtk::Adjustment *adj,
+ MIDI::Controllable *mc,
+ bool with_numeric)
+
+ : PixScroller (*adj, *pixset),
+ spin (*adj, 0, 2),
+ prompter (Gtk::WIN_POS_MOUSE, 30000, false),
+ midi_control (mc),
+ bind_button (2),
+ bind_statemask (Gdk::CONTROL_MASK)
+
+{
+ pixset->generate ();
+
+ signal_button_press_event().connect (mem_fun (this, &SliderController::button_press));
+ spin.set_name ("SliderControllerValue");
+ spin.set_size_request (70,-1); // should be based on font size somehow
+ spin.set_numeric (true);
+ spin.set_snap_to_ticks (false);
+
+ prompter.signal_unmap_event().connect (mem_fun (*this, &SliderController::prompter_hiding));
+
+ prompting = false;
+ unprompting = false;
+
+ if (mc) {
+ mc->learning_started.connect (mem_fun (*this, &SliderController::midicontrol_prompt));
+ mc->learning_stopped.connect (mem_fun (*this, &SliderController::midicontrol_unprompt));
+ }
+}
+
+void
+SliderController::set_value (float v)
+{
+ adj.set_value (v);
+}
+
+void
+SliderController::set_bind_button_state (guint button, guint statemask)
+{
+ bind_button = button;
+ bind_statemask = statemask;
+}
+
+void
+SliderController::get_bind_button_state (guint &button, guint &statemask)
+{
+ button = bind_button;
+ statemask = bind_statemask;
+}
+
+void
+SliderController::midi_learn()
+{
+ if (midi_control) {
+ prompting = true;
+ midi_control->learn_about_external_control ();
+ }
+}
+
+bool
+SliderController::button_press (GdkEventButton *ev)
+{
+ if ((ev->state & bind_statemask) && ev->button == bind_button) {
+ midi_learn ();
+ return true;
+ }
+
+ return false;
+}
+
+void
+SliderController::midicontrol_set_tip ()
+
+{
+ if (midi_control) {
+ // Gtkmm2ext::UI::instance()->set_tip (this, midi_control->control_description());
+ }
+}
+
+bool
+SliderController::prompter_hiding (GdkEventAny *ev)
+{
+ if (unprompting) {
+ if (midi_control) {
+ midi_control->stop_learning();
+ }
+ unprompting = false;
+ }
+
+ return false;
+}
+
+void
+SliderController::midicontrol_prompt ()
+
+{
+ if (prompting) {
+
+ string prompt = _("operate MIDI controller now");
+ prompter.set_text (prompt);
+ Gtkmm2ext::UI::instance()->touch_display (&prompter);
+
+ unprompting = true;
+ prompting = false;
+ }
+}
+
+void
+SliderController::midicontrol_unprompt ()
+
+{
+ if (unprompting) {
+ Gtkmm2ext::UI::instance()->touch_display (&prompter);
+ unprompting = false;
+ }
+}
+
+
+VSliderController::VSliderController (Pix *pixset,
+ Gtk::Adjustment *adj,
+ MIDI::Controllable *mcontrol,
+ bool with_numeric)
+
+ : SliderController (pixset, adj, mcontrol, with_numeric)
+{
+ if (with_numeric) {
+ spin_frame.add (spin);
+ spin_frame.set_shadow_type (Gtk::SHADOW_IN);
+ spin_frame.set_name ("BaseFrame");
+ spin_hbox.pack_start (spin_frame, false, true);
+ // pack_start (spin_hbox, false, false);
+ }
+}
+
+HSliderController::HSliderController (Pix *pixset,
+ Gtk::Adjustment *adj,
+ MIDI::Controllable *mcontrol,
+ bool with_numeric)
+
+ : SliderController (pixset, adj, mcontrol, with_numeric)
+{
+ if (with_numeric) {
+ spin_frame.add (spin);
+ //spin_frame.set_shadow_type (Gtk::SHADOW_IN);
+ spin_frame.set_name ("BaseFrame");
+ spin_hbox.pack_start (spin_frame, false, true);
+ // pack_start (spin_hbox, false, false);
+ }
+}
diff --git a/libs/gtkmm2ext/tearoff.cc b/libs/gtkmm2ext/tearoff.cc
new file mode 100644
index 0000000000..c9dd89ac52
--- /dev/null
+++ b/libs/gtkmm2ext/tearoff.cc
@@ -0,0 +1,164 @@
+/*
+ Copyright (C) 2003 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#include <cmath>
+#include <gtkmm2ext/tearoff.h>
+
+using namespace Gtkmm2ext;
+using namespace Gtk;
+using namespace std;
+
+TearOff::TearOff (Gtk::Widget& c)
+ : contents (c),
+ tearoff_arrow (Gtk::ARROW_DOWN, Gtk::SHADOW_OUT),
+ close_arrow (Gtk::ARROW_UP, Gtk::SHADOW_OUT)
+{
+ dragging = false;
+
+ tearoff_event_box.add (tearoff_arrow);
+ tearoff_event_box.set_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK);
+ tearoff_event_box.signal_button_release_event().connect (mem_fun (*this, &TearOff::tearoff_click));
+
+ close_event_box.add (close_arrow);
+ close_event_box.set_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK);
+ close_event_box.signal_button_release_event().connect (mem_fun (*this, &TearOff::close_click));
+
+ own_window = new Gtk::Window (Gtk::WINDOW_TOPLEVEL);
+ own_window->add_events (Gdk::BUTTON_PRESS_MASK|Gdk::BUTTON_RELEASE_MASK|Gdk::POINTER_MOTION_MASK|Gdk::POINTER_MOTION_HINT_MASK);
+ own_window->set_resizable (false);
+// own_window->realize ();
+
+ Glib::RefPtr<Gdk::Window> win (own_window->get_window());
+ win->set_decorations (Gdk::WMDecoration (Gdk::DECOR_BORDER|Gdk::DECOR_RESIZEH));
+
+ VBox* box1;
+ box1 = manage (new VBox);
+ box1->pack_start (close_event_box, false, false, 5);
+
+ window_box.pack_end (*box1, false, false, 2);
+ own_window->add (window_box);
+
+ own_window->signal_button_press_event().connect (mem_fun (*this, &TearOff::window_button_press));
+ own_window->signal_button_release_event().connect (mem_fun (*this, &TearOff::window_button_release));
+ own_window->signal_motion_notify_event().connect (mem_fun (*this, &TearOff::window_motion));
+ own_window->signal_delete_event().connect (mem_fun (*this, &TearOff::window_delete_event));
+
+ tearoff_arrow.set_name ("TearOffArrow");
+ close_arrow.set_name ("TearOffArrow");
+
+ VBox* box2;
+ box2 = manage (new VBox);
+ box2->pack_start (tearoff_event_box, false, false, 5);
+
+ pack_start (contents);
+ pack_start (*box2, false, false, 2);
+
+}
+
+TearOff::~TearOff ()
+{
+ delete own_window;
+}
+
+gint
+TearOff::tearoff_click (GdkEventButton* ev)
+{
+ remove (contents);
+ window_box.pack_start (contents);
+ own_window->set_name (get_name());
+ close_event_box.set_name (get_name());
+ own_window->show_all ();
+// own_window->realize ();
+ hide ();
+ Detach ();
+ return TRUE;
+}
+
+gint
+TearOff::close_click (GdkEventButton* ev)
+{
+ window_box.remove (contents);
+ pack_start (contents);
+ reorder_child (contents, 0);
+ own_window->hide ();
+ show_all ();
+ Attach ();
+ return TRUE;
+}
+
+gint
+TearOff::window_button_press (GdkEventButton* ev)
+{
+ dragging = true;
+ drag_x = ev->x_root;
+ drag_y = ev->y_root;
+
+ own_window->add_modal_grab();
+
+ return TRUE;
+}
+
+gint
+TearOff::window_button_release (GdkEventButton* ev)
+{
+ dragging = false;
+ own_window->remove_modal_grab();
+ return TRUE;
+}
+
+gint
+TearOff::window_delete_event (GdkEventAny* ev)
+{
+ return close_click(0);
+}
+
+gint
+TearOff::window_motion (GdkEventMotion* ev)
+{
+ gint x;
+ gint y;
+ gint mx, my;
+ double x_delta;
+ double y_delta;
+ Glib::RefPtr<Gdk::Window> win (own_window->get_window());
+
+ own_window->get_pointer (mx, my);
+
+ if (!dragging) {
+ return TRUE;
+ }
+
+ x_delta = ev->x_root - drag_x;
+ y_delta = ev->y_root - drag_y;
+
+ win->get_root_origin (x, y);
+ win->move ((gint) floor (x + x_delta), (gint) floor (y + y_delta));
+
+ drag_x = ev->x_root;
+ drag_y = ev->y_root;
+
+ return TRUE;
+}
+
+bool
+TearOff::torn_off() const
+{
+ return own_window->is_visible();
+}
diff --git a/libs/gtkmm2ext/textviewer.cc b/libs/gtkmm2ext/textviewer.cc
new file mode 100644
index 0000000000..8c89b845b7
--- /dev/null
+++ b/libs/gtkmm2ext/textviewer.cc
@@ -0,0 +1,127 @@
+/*
+ Copyright (C) 1999 Paul Barton-Davis
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#include <string>
+#include <fstream>
+
+#include <gtkmm2ext/textviewer.h>
+
+#include "i18n.h"
+
+using namespace std;
+using namespace Gtkmm2ext;
+using namespace sigc;
+
+TextViewer::TextViewer (size_t xsize, size_t ysize) :
+ Gtk::Window (Gtk::WINDOW_TOPLEVEL),
+ Transmitter (Transmitter::Info), /* channel arg is irrelevant */
+ dismiss (_("Close"))
+{
+ set_size_request (xsize, ysize);
+
+ set_title ("Text Viewer");
+ set_name ("TextViewer");
+ set_resizable (true);
+ set_border_width (0);
+
+ vbox1.set_homogeneous (false);
+ vbox1.set_spacing (0);
+ add (vbox1);
+ vbox1.show ();
+
+ vbox2.set_homogeneous (false);
+ vbox2.set_spacing (10);
+ //vbox2.set_border_width (10);
+
+ vbox1.pack_start (vbox2, true, true, 0);
+ vbox2.show ();
+
+ vbox2.pack_start (scrollwin, TRUE, TRUE, 0);
+ scrollwin.set_policy (Gtk::POLICY_NEVER, Gtk::POLICY_ALWAYS);
+ scrollwin.show ();
+
+ etext.set_editable (false);
+ etext.set_wrap_mode (Gtk::WRAP_WORD);
+ scrollwin.add (etext);
+ etext.show ();
+
+ vbox1.pack_start (dismiss, false, false, 0);
+ dismiss.show ();
+
+ dismiss.signal_clicked().connect(mem_fun (*this, &TextViewer::signal_released_handler));
+}
+
+void
+TextViewer::signal_released_handler()
+{
+ hide();
+}
+
+void
+TextViewer::insert_file (const string &path)
+
+{
+ char buf[1024];
+ ifstream f (path.c_str());
+
+ if (!f) {
+ return;
+ }
+
+ Glib::RefPtr<Gtk::TextBuffer> tb (etext.get_buffer());
+
+ tb->begin_user_action();
+ while (f) {
+ f.read (buf, sizeof (buf));
+
+ if (f.gcount()) {
+ buf[f.gcount()] = '\0';
+ string foo (buf);
+ tb->insert (tb->end(), foo);
+ }
+ }
+ tb->end_user_action();
+}
+
+void
+TextViewer::scroll_to_bottom ()
+
+{
+ Gtk::Adjustment *adj;
+
+ adj = scrollwin.get_vadjustment();
+ adj->set_value (MAX(0,(adj->get_upper() - adj->get_page_size())));
+}
+
+void
+TextViewer::deliver ()
+
+{
+ char buf[1024];
+ Glib::RefPtr<Gtk::TextBuffer> tb (etext.get_buffer());
+
+ while (!eof()) {
+ read (buf, sizeof (buf));
+ buf[gcount()] = '\0';
+ string foo (buf);
+ tb->insert (tb->end(), foo);
+ }
+ scroll_to_bottom ();
+ clear ();
+}
diff --git a/libs/gtkmm2ext/utils.cc b/libs/gtkmm2ext/utils.cc
new file mode 100644
index 0000000000..0366c02f12
--- /dev/null
+++ b/libs/gtkmm2ext/utils.cc
@@ -0,0 +1,47 @@
+/*
+ Copyright (C) 1999 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#include <gtkmm2ext/utils.h>
+#include <gtkmm2ext/gtkutils.h>
+
+#include "i18n.h"
+
+void
+Gtkmm2ext::set_usize_to_display_given_text (Gtk::Widget &w, const gchar *text,
+ gint hpadding, gint vpadding)
+
+{
+ w.ensure_style ();
+ set_usize_to_display_given_text(w, text, hpadding, vpadding);
+}
+
+gint
+do_not_propagate (GdkEventButton *ev)
+{
+ return TRUE;
+}
+
+void
+Gtkmm2ext::init ()
+{
+ // Necessary for gettext
+ (void) bindtextdomain(PACKAGE, LOCALEDIR);
+}
+
diff --git a/libs/libgnomecanvasmm/.DS_Store b/libs/libgnomecanvasmm/.DS_Store
new file mode 100644
index 0000000000..7fc822ba63
--- /dev/null
+++ b/libs/libgnomecanvasmm/.DS_Store
Binary files differ
diff --git a/libs/libgnomecanvasmm/AUTHORS b/libs/libgnomecanvasmm/AUTHORS
new file mode 100644
index 0000000000..da913ffe29
--- /dev/null
+++ b/libs/libgnomecanvasmm/AUTHORS
@@ -0,0 +1,40 @@
+Maintainers:
+Murray Cumming <murrayc@usa.net>
+
+Developers:
+Paul Davis <pdb@op.net>
+Gergo Erdi <cactus@cactus.rulez.org>
+
+
+gnomemm 1.2:
+
+Developers:
+Claudio Bley
+Eric Bourque
+Manuel Clos <llanero@users.sourceforge.net>
+Daniel Elstner <daniel.elstner@gmx.de>
+Gergõ Érdi <cactus@cactus.rulez.org>
+Cedric Gustin
+Andreas Holzmann
+Falk Hueffner
+Peter Lerner <plerner@users.sourceforge.net>
+Agustin Ferrin Pozuelo
+Karl Nelson <kenelson@users.sourceforge.net>
+Herbert Valerio Riedel <hvr@gnu.org>
+Sebastian Rittau<srittau@users.sourceforge.net >
+Joe Yandle
+
+
+Former contributors:
+
+Tero Pulkkinen <terop@modeemi.cs.tut.fi>
+Stephan Kulow <coolo@itm.mu-luebeck.de>
+Elliot Lee <sopwith@redhat.com>
+Phil Dawes <P.L.Dawes-CSSE94@cs.bham.ac.uk>
+Erik Andersen <andersee@debian.org>
+Bibek Sahu <scorpio@dodds.net>
+Mirko Streckenbach
+Havoc Pennington <hp@redhat.com>
+Guillaume Laurent <glaurent@telegraph-road.org>
+Todd Dukes <tdukes@ibmoto.com>
+
diff --git a/libs/libgnomecanvasmm/COPYING b/libs/libgnomecanvasmm/COPYING
new file mode 100644
index 0000000000..c4792dd27a
--- /dev/null
+++ b/libs/libgnomecanvasmm/COPYING
@@ -0,0 +1,515 @@
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations
+below.
+
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+^L
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it
+becomes
+a de-facto standard. To achieve this, non-free programs must be
+allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+^L
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control
+compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+^L
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+^L
+ 6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ d) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ e) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+^L
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+^L
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply, and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License
+may add an explicit geographical distribution limitation excluding those
+countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+^L
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+^L
+ How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms
+of the ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library.
+It is safest to attach them to the start of each source file to most
+effectively convey the exclusion of warranty; and each file should
+have at least the "copyright" line and a pointer to where the full
+notice is found.
+
+
+ <one line to give the library's name and a brief idea of what it
+does.>
+ Copyright (C) <year> <name of author>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+Also add information on how to contact you by electronic and paper
+mail.
+
+You should also get your employer (if you work as a programmer) or
+your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James
+Random Hacker.
+
+ <signature of Ty Coon>, 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
+
+
diff --git a/libs/libgnomecanvasmm/ChangeLog b/libs/libgnomecanvasmm/ChangeLog
new file mode 100644
index 0000000000..5de1d36668
--- /dev/null
+++ b/libs/libgnomecanvasmm/ChangeLog
@@ -0,0 +1,556 @@
+2.10.0:
+
+2005-02-07 Cedric Gustin <cedric.gustin@swing.be>
+
+ * build_shared/Makefile_build.am_fragment: added a few LDFLAGS
+ for win32 DLLs (defined in win32_dlls_ldflags and appended to
+ common_ldflags).
+
+2005-02-07 Michael Hofmann <mh21@piware.de>
+
+ * configure.in: Added test of win32 platform and support for
+ MS-style bit alignment.
+
+2005-02-02 Bradley Bell <btb@debian.org>
+
+ * libgnomecanvasmm/src/item.ccg: item_construct(): Use an extra
+ helper function to create an empty va_list, instead of passing 0 to
+ gnome_canvas_item_construct(). Needed by the alpha platform.
+ Bug # 136930.
+
+2.8.0:
+
+2004-09-12 Murray Cumming <murrayc@murrayc.com>
+
+ * Increased version for GNOME 2.8 release version.
+
+2.6.1:
+
+2004-05-01 Takashi Takekawa <takekawa@users.sourceforge.jp>
+
+ * libgnomecanvas/libgnomecanvas.[h,cc] (GNOMEMM_PROPERTY,
+ GNOMEMM_PROPERTY_IMPL): fixed doubled '>' when T is a template class,
+ for the Intel compiler.
+ * libgnomecanvas/src/line.hg: deleted unnecessary namespace
+ qualification, for the Intel compiler.
+
+2.6.0:
+
+2004-04-12 Bryan Forbes <bryan@reigndropsfall.net>
+
+ * tools/extra_defs_gen/Makefile.am: link against the 2.4 release of glibmm.
+
+2.5.2:
+
+2004-04-07 Bryan Forbes <bryan@reigndropsfall.net>
+
+ * libgnomecanvas/src/canvas.hg: changed from using GdkRgbDither to
+ Gdk::RgbDither.
+ * libgnomecanvas/src/item.hg: changed from using GdkDrawable* to const
+ Glib::RefPtr<Gdk::Drawable>&.
+ * libgnomecanvas/src/text.hg: changed all C Pango properties to their C++
+ counterparts.
+
+2004-02-07 Alexander Nedotsukov <bland@FreeBSD.org>
+
+ * Fixed m4 files installation directory missed after 2.0 -> 2.6 change.
+
+2.5.1:
+
+2004-02-13 Murray Cumming <murrayc@usa.net>
+
+ * Use the new libsigc++ 2 syntax.
+
+2003-12-21 Eric Bourque <ericb@computer.org>
+ * libgnomecanvasmm.spec.in: fixed dependency to gtkmm2 instead of gtkmm
+
+2003-12-19 Murray Cumming <murrayc@usa.net>
+
+ * libgnomecanvas/src/widget.hg: Use a Gtk::Widget* instead of a
+ Gtk::Widget for the widget property.
+
+2.5.0:
+
+2003-11-03 Murray Cumming <murrayc@usa.net>
+
+ * This is now libgnomecanvasmm 2.5, which will become libgnomecanvasmm
+ 2.6. This is on HEAD, and libgnomecanvasmm 2.0 is on the gnome-2-4
+ branch. This uses gtkmm 2.4 and is parallel-installable.
+
+2003-09-25 Eric Bourque <ericb@computer.org>
+ * libgnomecanvasmm.spec.in: updated for libgnomecanvasmm-2.0
+
+2.0.1:
+
+2003-08-22 Murray Cumming <murrayc@usa.net>
+
+ * examples/Makefile.am: Fixed the distcheck.
+
+
+2003-07-21 Murray Cumming <murrayc@usa.net>
+
+ * libgnomecanvas/src/canvas.hg: Use the new GMMPROC_PROTECTED_GCLASS
+ macro on the Canvas class so that the CanvasAA class can access
+ canvas_class_.
+ * libgnomecanvas/src/canvas.ccg: Rewrite the CanvasAA constructor to
+ use the new (and working) gtkmm2-style construction construction. Fixes
+ bug #107686.
+ * configure.in: Now requires gtkmm 2.2.5, which has the new macro.
+
+2.0.0:
+
+2002-12-10 Bradley Bell <btb@debian.org>
+
+ * scripts/Makefile.am: distribute macros.m4
+
+2002-12-10 Andreas Holzmann <Andreas.Holzmann@epost.de>
+
+ * Properties: Files renamed to be more conform with the rest,
+ moved implementation from header into implementation file,
+ some typos fixed, some properties added.
+
+2002-12-09 Andreas Holzmann <Andreas.Holzmann@epost.de>
+
+ * libgnomecanvas/src/rich-text.[ccg|hg]: Replaced
+ void get_iter_at_location(const Gtk::TextIter&, int, int) with
+ iterator get_iter_at_location(int, int) const to be more conform
+ with Gtkmm iterator methods.
+ * libgnomecanvas/src/canvas.[ccg|hg]: The following methods are
+ now const: root(), get_scroll_region(), get_center_scroll_region(),
+ w2c(), and get_color()
+ * libgnomecanvas/libgnomecanvasmm/affinetrans.[cc,h]: Changed
+ bool operator==(AffineTrans&) to
+ bool operator==(const AffineTrans&) const
+ * demos/primitives.cc: Fixed pack_start() Gtk::AttachOptions.
+ * examples/Makefile.am_fragment: Was missing in CVS (I took it from
+ the release candidate).
+ * libgnomecanvas/src/libgnomecanvas_docs_override.xml: Was missing
+ in CVS (I took it from the release candidate).
+
+2002-12-09 Murray Cumming <murrayc@usa.net>
+
+ * libgnomecanvas/*.pc.in: Changed LIBS from 1.3 to 2.0.
+
+2002-12-09 Murray Cumming <murrayc@usa.net>
+
+ * Merging C docs: Added libgnomecavas/src/libgnomecavas_docs.xml and
+ libgnomecanvas_docs_override.xml, and added --mergecdocs to
+ build_shared/Makefile_gensrc.am_fragment
+ * examples: Created separated directories for each example, with each
+ Makefile.am including examples/Makefile.am_fragment, like the other
+ *mm projects. Unlike the other projects, the examples build as part
+ of the main build, because there aren't many.
+
+2002-12-09 Murray Cumming <murrayc@usa.net>
+
+ * Increased version to 2.0.0, renamed library from 1.3 to 2.0.
+
+1.3.11:
+
+2002-09-28 Owen Stenseth <owen@bonemachine.org>
+
+ * demos/primitives.cc: Set center_scroll_region to false as the
+ libgnomecanvas demo does.
+
+1.3.10:
+
+2002-08-15 ERDI Gergo <cactus@cactus.rulez.org>
+
+ * libgnomecanvas/libgnomecanvasmm/canvas-property.cc
+ (Property<Gdk::Color>::set_value_in_object): Clear color property if input string is ""
+ (Property<Pango::FontDescription>): Moved implementation to .cc file
+
+1.3.9:
+
+2002-08-08 ERDI Gergo <cactus@cactus.rulez.org>
+
+ * libgnomecanvas/src/shape.hg:
+ * libgnomecanvas/src/line.hg:
+ * libgnomecanvas/src/text.hg:
+ * libgnomecanvas/libgnomecanvasmm/canvas-property.h: Changed
+ stipple properties to use correct Gdk::Bitmap param type instead
+ of Gdk::Pixmap and Gdk::Drawable
+
+2002-07-25 Michael Babcock <mbabcock@la.creatureshop.henson.com>
+ * libgnomecanvas/libgnomecanvasmm/point.cc: gobj(): Avoid infinite
+ recursion.
+
+2002-07-24 Erwin J. van Eijk <kojak@oakhill.demon.nl>
+
+ * examples/canvas/canvas_events.cc:
+ One of the examples, canvas_events caused an infinite recursion
+ to occur. I've patched canvas_events to be more like canvas.cc,
+ and not to cause the recursion.
+
+2002-07-19 Murray Cumming <murrayc@usa.net>
+
+ * Updated examples for latest gtkmm pack_start() method.
+
+1.3.8:
+
+2002-07-16 Murray Cumming <murrayc@usa.net>
+
+ * Rebuilt for latest gtkmm.
+
+1.3.7:
+
+2002-06-23 Murray Cumming <murrayc@usa.net>
+
+ * Rebuilt for latest gtkmm.
+
+1.3.6:
+
+2002-06-11 Andreas Holzmann <Andreas.Holzmann@epost.de>
+
+ * libgnomecanvas/libgnomecanvasmm.h: Add missing include
+ <libgnomecanvasmm/widget.h>
+ (#84704, reported by abes@memlab1.ccs.brandeis.edu)
+
+2002-06-02 Daniel Elstner <daniel.elstner@gmx.net>
+
+ * libgnomecanvas/src/pixbuf.hg (property_pixbuf): Change the
+ property type to Glib::RefPtr<Gdk::Pixbuf>. (Reported by
+ Ole Laursen <olau@hardworking.dk>.)
+
+2002-05-14 Daniel Elstner <daniel.elstner@gmx.net>
+
+ * libgnomecanvas/src/line.hg (Canvas::Points::is_null): Remove
+ 'virtual' keyword. There is no need for is_null() to be virtual,
+ and gcc-3.1 issues a warning because the dtor isn't virtual too.
+
+ * libgnomecanvas/libgnomecanvasmm/affinetrans.cc: Remove default
+ method arguments from the implementation prototype -- gcc-3.1
+ doesn't like them at all. Also, remove the now unnecessary cast
+ to std::string in operator<<().
+
+2002-05-14 Andreas Holzmann <Andreas.Holzmann@epost.de>
+
+ * demos/*.cc: Use new Gtk::Box::pack_start() API.
+ * configure.in: Require gtkmm version 1.3.14. Require libgnomecanvas
+ version 1.113 because of function set_center_scroll_region().
+
+2002-05-07 Andreas Holzmann <Andreas.Holzmann@epost.de>
+
+ * demos/canvas.cc: Use new Gtk::Notebook API.
+ * libgnomecanvas/src/line.[ccg|hg]: Add Glib::Value<>
+ specialization for Points class.
+ * configure.in: Require gtkmm version 1.3.13.
+
+1.3.5:
+
+2002-04-23 Murray Cumming <murrayc@usa.net>
+
+ * generated sources are now distributed. The am_fragments in
+ build_files are now abstracted for all Gnome::Something libraries,
+ so I can now just copy them into the other libraries.
+
+1.3.4:
+
+2002-04-04 Andreas Holzmann <Andreas.Holzmann@epost.de>
+
+ * Use new Glib::Value and Glib::PropertyProxy implementation.
+ * Use new namespace enums.
+
+2002-04-01 Murray Cumming <murrayc@usa.net>
+
+ * Use new _DEFS() format in *.hg.
+
+2002-03-27 Murray Cumming <murrayc@usa.net>
+
+ * PathDef: Use new _CLASS_OPAQUE_REFCOUNTED macro instead of
+ _CLASS_BOXEDTYPE.
+
+2002-03-17 Murray Cumming <murrayc@usa.net>
+
+ * Added BoxedType-like methods to Gnome::Points, so that it can
+ be used for Properties.
+
+2002-03-16 Murary Cumming <murrayc@usa.net>
+
+ * Gnome::Art::AffineTrans and Gnome::Art::Point obj() methods
+ renamed to gobj(), to conform to match everything else.
+
+2002-03-15 Andreas Holzmann <Andreas.Holzmann@epost.de>
+
+ * libgnomecanvas/src/canvas.[hg|ccg]
+ (set_center_scroll_region,
+ get_center_scroll_region): New functions wrapped.
+ * libgnomecanvas/src/bpath.[hg|ccg]: New wrapper for GnomeCanvasBpath.
+ * libgnomecanvas/src/path-def.[hg|ccg]: New wrapper for
+ GnomeCanvasPathDef.
+ * demos/*: Missing curve demos added. More conform to coding standards.
+
+1.3.3:
+2002-03-10 Murray Cumming <murrayc@usa.net>
+
+ * Changed signal args to C++ types.
+
+2002-02-24 Murray Cumming <murrayc@usa.net>
+
+ * Renamed canvas-*.[h.cc] to *.[h.cc]. They were previously prefixed
+ by canvas- to make things clearer when they were part of libgnomeui.
+ This means you should probably manually delete any installed
+ libgnomecanvasmm headers or make uninstall a previous version.
+
+2002-02-24 Andreas Holzmann <Andreas.Holzmann@epost.de>
+
+ * docs/reference generation fixed
+ * libgnomecanvas/src/canvas.[hg|ccg]:
+ + Antialiased canvas constructor fixed
+ + aa property changed from gulong to bool
+ * libgnomecanvas/src/pixbuf.[hg|ccg]: implemented
+ * libgnomecanvas/src/rich-text.[hg|ccg]: implemented
+ * Added demo, based on the C demo - needs some more
+ classes to be implemented.
+
+1.3.2:
+
+2002-02-20 Murray Cumming <murrayc@usa.net>
+
+ * Wrapped remaining methods and signals in Canvas and Item.
+ * Art::Affine(const double[6]) constructor is now explicit, and
+ the arg is const, with a fixed array size.
+ * Increased version number.
+
+2002-02-17 Murray Cumming <murrayc@usa.net>
+
+ * Removed an if{} check from init(). This would have prevented
+ Gnome::Canvas::init() or Gnome::Conf::init() from working after one
+ of them had run first.
+
+2002-02-15 Murray Cumming <murrayc@usa.net>
+
+ * Added GnomeCanvasShape wrapper, and corrected RectEllpise and
+ Polygon to inherit from it.
+
+2002-02-15 Andreas Holzmann <Andreas.Holzmann@epost.de>
+
+ * Fixed name and description in the pkg-config file.
+ * Uncommented Canvas::get_item_at(). Don't know why it was commented.
+
+Release 1:3.1:
+
+ vfuncs.defs parsing problems solved. Updated for latest gtkmm
+
+Release 1.3.0:
+
+2002-01-08 Murray Cumming <murrayc@usa.net>
+
+ * canvas-properties.[h|c]: Properly implemented the shared
+ streams-based properties, using the gtkmm2 PropertyProxy* templates,
+ and put them in the Gnome::Canvas::Properties namespace instead of
+ Gnome::CanvasHelpers.
+ I think that the implementation is much clearer than before.
+ We probably need to review the properties in case any streams-based
+ properties need to be added.
+
+2002-01-05 Murray Cumming <murrayc@usa.net>
+
+ * Change properties to normal gtkmm-1.3 properties. The
+ streams-based shared property objects need more work so they
+ can deal with BoxedType and Glib::Object properties. However, this
+ streams stuff is separate from normal property proxies.
+
+2002-01-04 Murray Cumming <murrayc@usa.net>
+
+ * Canvas::CanvasGroup, Canvas::CanvasItem, etc are now
+ Canvas::Group, Canvas::Item, etc. Canvas::RE is now
+ Canvas::RectEllipse.
+
+2002-01-03 Murray Cumming <murrayc@usa.net>
+
+ * Moved things into the Gnome::Canvas namespace. We might want to
+ rename things such as Gnome::Canvas::CanvasGroup to
+ Gnome::Canvas::Group.
+
+2002-01-02 ERDI Gergo <cactus@cactus.rulez.org>
+
+ * libgnomecanvas/src/canvas-text.hg:
+ * libgnomecanvas/src/canvas-polygon.hg:
+ * libgnomecanvas/src/canvas-line.hg: Use Gdk::Bitmaps instead of
+ Gdk::Pixmaps for stipples
+
+2001-12-15 Murray Cumming <murrayc@usa.net>
+
+ * Committed Paul Davis's first patch to properly wrap the old
+ CanvasItem 'signals' as vfuncs, using his hand-written
+ libgnomecanvas_vfuncs.defs. He also fixed the canvas/canvas
+ example, which now runs.
+ * Fixed libgnomecanvasmm.h and added Gnome::canvas_init() which
+ should be used before Gtk::Main, if you are not using libgnomeuimm
+ and Gnome::Main.
+
+2001-12-12 Murray Cumming <murrayc@usa.net>
+
+ * Changed build files to use -I instead of --m4 with
+ gtkmmproc, as needed by the latest gtkmm-1.3. The new
+ gtkmmproc doesn't seem to be picking up the libgnomecanvasmm
+ conversions so I had to comment out a _MEMBER_GET in CanvasItem.
+
+2001-12-11 Murray Cumming <murrayc@usa.net>
+
+ * Gnome::wrap_init() is now Gnome::canvas_wrap_init()
+ to avoid a clash with other wrap_init() functions. This
+ requires the latest gtkmm-1.3.
+
+2001-12-04 Murray Cumming <murrayc@usa.net>
+
+ * Created libgnomecanvasmm for libgnomeui in GNOME2.
+
+The following notes are from gnome-- 1.2.x, which previously
+contained the GnomeCanvas wrappers:
+
+Release 1.2.2
+ * Gnome::UI::Help fixed: This should be added to the
+ Help menu to automatically add items from the
+ topics.dat file. (Murray Cumming)
+ * gnome-hello example: The About box is now closed
+ and deleted when [Close] is clicked
+ (Murray Cumming)
+
+Release 1.2.1
+ * App::create_toolbars fixed to use member UI::Array.
+ This allows access to the widgets, as well as
+ properly managing memory for the UI Items.
+ - menu example modified to demonstrate disabling
+ of menu item widgets. (Murray Cumming)
+ * configure.in: Don't add -I$prefix/include to
+ GNOMEMM_INCLUDEDIR if $prefix=/usr. -I/usr/include
+ should never be used because it overrides the order
+ of gcc's implicit include path. gtkmm-config.in has
+ been corrected too. (Daniel Elstner)
+ * Dialog, MessageBox, PropertyBox: Added extra
+ documentation so people know that these are not
+ self-destructed when run() or run_and_close()
+ returns. (Murray Cumming)
+
+Release 1.2.0
+ * Canvas example:
+ Added example.png to test CanvasImage.
+ Items are now deleted in the destructor.
+ (Murray Cumming)
+ * Reference Documentation:
+ Location of perl not hardcoded. (Cedric Gustin)
+ * Some gcc 3.0 std namespace fixes. (Claudio Bley)
+
+Release 1.1.21
+ * CanvasText: set_font(const GdkFont&) conversion
+ fixed and set_font(const string&) added.
+ (Murray Cumming)
+ * CanvasItem: event signal marshalled again. We lost
+ this fix sometime after 1.1.17. (Gergõ Érdi)
+ * Uncommented the CanvasHelper::anchor property,
+ adding the necessary gtkpacker.h #include.
+ (Murray Cumming)
+ * Fixed CanvasHelpers::font for Gdk_Font input and
+ added a string constructor. (Murray Cumming)
+ * Added CanvasText::set_fontset(). (Murray Cumming)
+
+Release 1.1.20
+ Unofficial, with some 1.1.21 changes.
+
+Release 1.1.19
+ * canvas-property.h is installed.
+ (Murray Cumming)
+
+Release 1.1.18
+ * Namespace and other fixes for gcc 3.
+ (Murray Cumming and Joe Yandle)
+ * New Canvas API (KEN)
+ Adds streams-style interface. See examples.
+ * MDIChild:
+ Comments in code.
+ Implemented set_config_string(), remove_view(),
+ and set_active(). (Murray Cumming)
+
+
+Release 1.1.17
+ * Improved configure checks for Gtkmm and libsigc++.
+ (Eric Bourque)
+ * App:
+ create_menus() and create_toolbar() now
+ return UI::Array<>s that provide the widget
+ pointers.
+ Added insert_menus() and remove_menus().
+ Added menu example, to demonstrate access to menu
+ item widgets and insert_menus().
+ (Murray Cumming)
+ * Added Gnome::Pixmap::find_file() as wrapper for
+ gnome_pixmap_file(). (Murray Cumming)
+ * CanvasItem::event()'s propagation can be stopped by
+ returning TRUE in signal handler (Gergõ Érdi)
+
+Release 1.1.16
+ * Fixed AppBar default constructor. (Murray Cumming)
+ * Improved Point and AffineTrans wrappers. Put them in
+ their own point.h/.cc and affinetrans.h/.cc files,
+ in the Gnome::Art namespace.
+ (Agustin Ferrin Pozuelo)
+ * Added canvas_events example. (Agustin Ferrin Pozuelo)
+ * Added canvas_affine example. (Agustin Ferrin Pozuelo)
+ * configure: fixed check for perl. (Agustin Ferrin Pozuelo)
+ * IconList: Removed default constructor. Fixed signals.
+ Added selection() method, with SelectionList.
+ Added examples.
+ (Andreas Holzmann)
+ * Canvas, CanvasItem: Changed some pointer args to
+ references (Andreas Holzmann).
+ * AM_PATH_GNOMEMM() macro installed.
+ (Agustin Ferrin Pozuelo)
+
+Release 1.1.15
+ * Changed AffineTrans::operator[] to return reference.
+ (Falk Hueffner)
+ * Examples now quit when close button is clicked,
+ instead of just hiding their windows.
+ (Murray Cumming)
+ * Fixed Clock constructor problems, and
+ added demo. (Murray Cumming)
+ * CanvasItem sub-classes:
+ - Removed default constructors - there's nothing
+ in libgnomeui for these.
+ - IconTextItem (icon-item.gen_h): Constructors are now
+ like other CanvasItems. (Murray Cumming)
+ * Fixed Druid constructor problems, and
+ added demo. (Murray Cumming)
+ * Fixed MessageBox constructor problems, and
+ added demo. (Murray Cumming)
+ * Fixed Dialog self-destruct by correcting
+ close signal wrapping. (Karl Nelson)
+ * Dialogs (and sub-classes) now use close_hides()
+ as default, to prevent self-destruction.
+ (Murray Cumming)
+ * Reference documentation now builds
+ (Murray Cumming)
+ * Fixes to app-helper to allow Slot1<void,Gtk::Widget*> and
+ Slot0<void> on UI::Info items. (Karl Nelson)
+
+
+==================================================================
+
+Release 1.1.14
+ ?
+
+==================================================================
+
+Release 1.1.13
+ * Static string problem on initialization
+ * gcc 2.96 fixes.
+
+==================================================================
+
+Release 1.1.12
+ * Massive cleanup of internals (Murray Cumming)
+ * Animator and demo (Murray Cumming)
+ * HRef (Murray Cumming)
+ * Fixes to UIInfo (Murray Cumming)
+ * added add_button to dialog (Murray Cumming)
+ * cleanups of types to match GNOME
+ * Canvas fixes (Sebastian Rittau)
+ * MDI fixes (Manuel Clos and Sebastian Rittau)
+ * Complete demo for MDI (Manuel Clos)
+ * Added radio items (Karl)
+ * Improved UIInfo conversions (Karl)
+ * Demos for UIInfo (Karl)
+ * STL name cleanups (Karl)
+
diff --git a/libs/libgnomecanvasmm/NEWS b/libs/libgnomecanvasmm/NEWS
new file mode 100644
index 0000000000..f3bf80dcef
--- /dev/null
+++ b/libs/libgnomecanvasmm/NEWS
@@ -0,0 +1,54 @@
+2.10.0:
+
+* Increased version for GNOME 2.10 release version.
+* WIN32 build fixes. (Cedric Gustin, Michael Hofmann)
+* Alpha build fix (Bradley Bell)
+
+2.8.0:
+
+* Increased version for GNOME 2.8 release version.
+
+2.6.1:
+
+* Build fixes for gcc 3.4 and for the Intel compiler.
+ (Takashi Takekawa)
+
+2.6.0:
+
+Increased version.
+
+2.5.2:
+
+* Canvas: set_dither(), get_dither(): Use C++ enum instead of C enum.
+* Item: draw(): Use C++ Gdk::Drawable instead of C type.
+* Text: Changed all C Pango properties to their C++
+ counterparts.
+(Bryan Forbes)
+
+
+2.5.1:
+
+* Use new libsigc++ 2 syntax.
+* Canvas::Widget: Use a Gtk::Widget* for the "widget" property,
+ instead of Gtk::Widget, so that it is usable.
+(Murray Cumming)
+* Spec file dependency fix. (Eric Bourque)
+
+2.5.0:
+
+This is the new unstable branch of the parallel-installable
+libgnomevanvasmm 2.6, for use with gtkmm 2.4.
+
+2.0.1:
+
+* Corrected segfault in CanvasAA destructor.
+ The AA Canvas was probably useless before this.
+ (Murray Cumming)
+
+2.0.0:
+
+Documentation:
+* Reuses C documentation.
+* examples separated into individual directories.
+
+1.3.11:
diff --git a/libs/libgnomecanvasmm/README b/libs/libgnomecanvasmm/README
new file mode 100644
index 0000000000..e70affef6f
--- /dev/null
+++ b/libs/libgnomecanvasmm/README
@@ -0,0 +1 @@
+libgnomecanvasmm provides C++ wrappers for libgnomecanvas, for use with gtkmm. \ No newline at end of file
diff --git a/libs/libgnomecanvasmm/SConscript b/libs/libgnomecanvasmm/SConscript
new file mode 100644
index 0000000000..c53d218d94
--- /dev/null
+++ b/libs/libgnomecanvasmm/SConscript
@@ -0,0 +1,10 @@
+import glob
+
+gnomecanvasmm_files = glob.glob('libgnomecanvasmm/*.cc')
+
+Import('env libraries')
+gnomecanvasmm = env.Copy()
+gnomecanvasmm.Merge([libraries['glibmm2'], libraries['gtk2'], libraries['sigc2'], libraries['pangomm'], libraries['atkmm'], libraries['gdkmm2'], libraries['gtkmm2'], libraries['libgnomecanvas2'] ])
+
+libgnomecanvasmm = gnomecanvasmm.StaticLibrary('libgnomecanvasmm', gnomecanvasmm_files)
+Default(libgnomecanvasmm)
diff --git a/libs/libgnomecanvasmm/TODO b/libs/libgnomecanvasmm/TODO
new file mode 100644
index 0000000000..83b2a478f0
--- /dev/null
+++ b/libs/libgnomecanvasmm/TODO
@@ -0,0 +1,8 @@
+LIBGNOMECANVASMM:
+
+* Rename canvas-*.hg to *.hg.
+* Check that we have all the necessary streams-based properties.
+
+
+
+
diff --git a/libs/libgnomecanvasmm/libgnomecanvasmm.h b/libs/libgnomecanvasmm/libgnomecanvasmm.h
new file mode 100644
index 0000000000..a745189d5e
--- /dev/null
+++ b/libs/libgnomecanvasmm/libgnomecanvasmm.h
@@ -0,0 +1,45 @@
+/* $Id$ */
+/* libgnomecanvasmm - a C++ wrapper for libgnomecanvas
+ *
+ * Copyright 1999-2001 Free Software Foundation
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef LIBGNOMECANVASMM_H
+#define LIBGNOMECANVASMM_H
+
+/* libgnomecanvasmm version. */
+extern const int libgnomecanvasmm_major_version;
+extern const int libgnomecanvasmm_minor_version;
+extern const int libgnomecanvasmm_micro_version;
+
+#include <gtkmm.h>
+
+#include <libgnomecanvasmm/canvas.h>
+#include <libgnomecanvasmm/properties.h>
+#include <libgnomecanvasmm/group.h>
+#include <libgnomecanvasmm/init.h>
+#include <libgnomecanvasmm/line.h>
+#include <libgnomecanvasmm/ellipse.h>
+#include <libgnomecanvasmm/pixbuf.h>
+#include <libgnomecanvasmm/point.h>
+#include <libgnomecanvasmm/rect.h>
+#include <libgnomecanvasmm/rect-ellipse.h>
+#include <libgnomecanvasmm/rich-text.h>
+#include <libgnomecanvasmm/text.h>
+#include <libgnomecanvasmm/widget.h>
+
+#endif /* #ifndef LIBGNOMECANVASMM_H */
diff --git a/libs/libgnomecanvasmm/libgnomecanvasmm/.DS_Store b/libs/libgnomecanvasmm/libgnomecanvasmm/.DS_Store
new file mode 100644
index 0000000000..693c13e9f3
--- /dev/null
+++ b/libs/libgnomecanvasmm/libgnomecanvasmm/.DS_Store
Binary files differ
diff --git a/libs/libgnomecanvasmm/libgnomecanvasmm/affinetrans.cc b/libs/libgnomecanvasmm/libgnomecanvasmm/affinetrans.cc
new file mode 100644
index 0000000000..f483e7022e
--- /dev/null
+++ b/libs/libgnomecanvasmm/libgnomecanvasmm/affinetrans.cc
@@ -0,0 +1,234 @@
+// -*- C++ -*-
+/* $Id$ */
+
+/* affinetrans.h
+ *
+ * Copyright (C) 1999 The gnomemm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <libgnomecanvasmm/affinetrans.h>
+#include <libgnomecanvas/gnome-canvas.h>
+
+namespace Gnome
+{
+
+namespace Art
+{
+
+AffineTrans::AffineTrans(double scale)
+{
+ trans_[0] = scale;
+ trans_[1] = 0.0;
+ trans_[2] = 0.0;
+ trans_[3] = scale;
+ trans_[4] = 0.0;
+ trans_[5] = 0.0;
+}
+
+AffineTrans::AffineTrans(const double aff[6])
+{
+ trans_[0] = aff[0];
+ trans_[1] = aff[1];
+ trans_[2] = aff[2];
+ trans_[3] = aff[3];
+ trans_[4] = aff[4];
+ trans_[5] = aff[5];
+}
+
+AffineTrans::AffineTrans(const AffineTrans& src)
+{
+ operator=(src);
+}
+
+AffineTrans::~AffineTrans()
+{
+}
+
+AffineTrans& AffineTrans::operator=(const AffineTrans& src)
+{
+ for(unsigned int i = 0; i < 6; i++)
+ {
+ trans_[i] = src.trans_[i];
+ }
+
+ return *this;
+}
+
+double&
+AffineTrans::operator[](unsigned int idx)
+{
+ if(idx > 5)
+ {
+ g_warning("AffineTrans::operator[] called with idx > 5");
+ return trans_[5]; //0; //Can't convert 0 to double& - throw exception?
+ }
+
+ return trans_[idx];
+}
+
+const double&
+AffineTrans::operator[](unsigned int idx) const
+{
+ if(idx > 5)
+ {
+ g_warning("AffineTrans::operator[] const called with idx > 5");
+ return trans_[5]; //0; //Can't convert 0 to double& - throw exception?
+ }
+
+ return trans_[idx];
+}
+
+Point AffineTrans::apply_to(const Point& p) const
+{
+ Point result;
+ art_affine_point(result.gobj(), p.gobj(), trans_);
+ return result;
+}
+
+Point AffineTrans::operator*(const Point& p) const
+{
+ return apply_to(p);
+}
+
+AffineTrans
+AffineTrans::operator*(const AffineTrans& aff2)
+{
+ AffineTrans result;
+ art_affine_multiply(result.gobj(), gobj(), aff2.gobj());
+ return result;
+}
+
+bool AffineTrans::operator==(const AffineTrans& other) const
+{
+ return (bool)art_affine_equal(const_cast<double*>(trans_),
+ const_cast<double*>(other.gobj()));
+}
+
+bool AffineTrans::operator!=(const AffineTrans& other) const
+{
+ return !(bool)art_affine_equal(const_cast<double*>(trans_),
+ const_cast<double*>(other.gobj()));
+}
+
+void AffineTrans::invert()
+{
+ art_affine_invert(trans_, trans_);
+}
+
+void AffineTrans::flip(bool horiz, bool vert)
+{
+ art_affine_flip(trans_, trans_, horiz, vert);
+}
+
+bool AffineTrans::rectilinear() const
+{
+ return art_affine_rectilinear(trans_);
+}
+
+double AffineTrans::expansion() const
+{
+ return art_affine_expansion(trans_);
+}
+
+AffineTrans const &
+AffineTrans::operator*=(AffineTrans& other)
+{
+ art_affine_multiply(gobj(), gobj(), other.gobj());
+ return *this;
+}
+
+
+AffineTrans AffineTrans::identity()
+{
+ AffineTrans tmp;
+ art_affine_identity(tmp.gobj());
+ return tmp;
+}
+
+AffineTrans
+AffineTrans::scaling(double s)
+{
+ return scaling(s, s);
+}
+
+AffineTrans
+AffineTrans::scaling(double sx, double sy)
+{
+ AffineTrans tmp;
+ art_affine_scale(tmp.gobj(), sx, sy);
+ return tmp;
+}
+
+AffineTrans
+AffineTrans::rotation(double theta)
+{
+ AffineTrans tmp;
+ art_affine_rotate(tmp.gobj(), theta);
+ return tmp;
+}
+
+AffineTrans
+AffineTrans::translation(double dx, double dy)
+{
+ AffineTrans tmp;
+ art_affine_translate(tmp.gobj(), dx, dy);
+ return tmp;
+}
+
+AffineTrans
+AffineTrans::translation(const Point& p)
+{
+ AffineTrans tmp;
+ art_affine_translate(tmp.gobj(), p.get_x(), p.get_y());
+ return tmp;
+}
+
+
+AffineTrans
+AffineTrans::shearing(double theta)
+{
+ AffineTrans tmp;
+ art_affine_shear(tmp.gobj(), theta);
+ return tmp;
+}
+
+double* AffineTrans::gobj()
+{
+ return trans_;
+}
+
+const double* AffineTrans::gobj() const
+{
+ return trans_;
+}
+
+Glib::ustring AffineTrans::to_string() const
+{
+ char pchStr[128];
+ pchStr[127] = 0; //Just in case art_affine_to_string doesn't work properly.
+ art_affine_to_string(pchStr, gobj());
+ return Glib::ustring(pchStr);
+}
+
+} //namespace Art
+
+} //namespace Gnome
+
+std::ostream& operator<<(std::ostream& out, const Gnome::Art::AffineTrans& aff)
+{
+ return out << aff.to_string();
+}
diff --git a/libs/libgnomecanvasmm/libgnomecanvasmm/affinetrans.h b/libs/libgnomecanvasmm/libgnomecanvasmm/affinetrans.h
new file mode 100644
index 0000000000..b04648963d
--- /dev/null
+++ b/libs/libgnomecanvasmm/libgnomecanvasmm/affinetrans.h
@@ -0,0 +1,119 @@
+#ifndef _LIBGNOMECANVASMM_AFFINETRANS_H
+#define _LIBGNOMECANVASMM_AFFINETRANS_H
+
+// -*- C++ -*-
+/* $Id$ */
+
+/* affinetrans.h
+ *
+ * Copyright (C) 1999 The gnomemm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/containers.h>
+#include <libgnomecanvasmm/point.h>
+
+namespace Gnome
+{
+
+namespace Art
+{
+
+//: Used by CanvasItem.
+class AffineTrans
+{
+public:
+ //: Initialize the affine as unit matrix, with a scaling factor
+ AffineTrans(double scale = 1.0);
+
+ //: aff[6]
+ explicit AffineTrans(const double aff[6]);
+
+ AffineTrans(const AffineTrans& src);
+ AffineTrans& operator=(const AffineTrans& src);
+ ~AffineTrans();
+
+ double& operator[](unsigned int idx);
+ const double& operator[](unsigned int idx) const;
+
+ double* gobj();
+ const double* gobj() const;
+
+ //: Apply the affine to a given point
+ //: e.g. Point dst = affine.apply(Point(x,y));
+ //: is the same as:
+ //: dst.x = x * affine[0] + y * affine[2] + affine[4];
+ //: dst.y = x * affine[1] + y * affine[3] + affine[5];
+ Point apply_to(const Point& p) const;
+
+ //: Apply the affine to a given point
+ Point operator*(const Point& p) const;
+
+ //: Compose two affines
+ AffineTrans operator*(const AffineTrans& aff2);
+
+ //: Apply other affine to the affine
+ AffineTrans const & operator*=(AffineTrans& other);
+
+ bool operator==(const AffineTrans& other) const;
+ bool operator!=(const AffineTrans& other) const;
+
+ //: Give the inverse of the affine
+ void invert();
+
+ //: Flip horizontally and/or vertically the affine
+ void flip(bool horiz, bool vert);
+
+ //: Determine whether the affine is rectilinear (rotates 0, 90, 180 or 270 degrees)
+ bool rectilinear() const;
+
+ //: Find the affine's "expansion factor", i.e. the scale amount
+ double expansion() const;
+
+ //: Set up the identity matrix
+ static AffineTrans identity();
+
+ //: Set up a scaling matrix
+ static AffineTrans scaling(double s);
+
+ //: Set up a scaling matrix
+ static AffineTrans scaling(double sx, double sy);
+
+ //: Set up a rotation matrix; theta is given in degrees
+ static AffineTrans rotation(double theta);
+
+ //: Set up a shearing matrix; theta given in degrees
+ static AffineTrans shearing(double theta);
+
+ //: Set up a translation matrix
+ static AffineTrans translation(double dx, double dy);
+
+ //: Set up a translation matrix
+ static AffineTrans translation(const Point& p);
+
+ Glib::ustring to_string() const;
+
+protected:
+ double trans_[6];
+};
+
+} //namespace Art
+
+} /* namespace Gnome */
+
+std::ostream& operator<<(std::ostream& out, const Gnome::Art::AffineTrans& aff);
+
+#endif // _GNOMEMM_AFFINETRANS_H
diff --git a/libs/libgnomecanvasmm/libgnomecanvasmm/bpath.cc b/libs/libgnomecanvasmm/libgnomecanvasmm/bpath.cc
new file mode 100644
index 0000000000..6843922029
--- /dev/null
+++ b/libs/libgnomecanvasmm/libgnomecanvasmm/bpath.cc
@@ -0,0 +1,156 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <libgnomecanvasmm/bpath.h>
+#include <libgnomecanvasmm/private/bpath_p.h>
+
+/* bpath.cc
+ *
+ * Copyright (C) 2002 The libgnomecanvasmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+
+Bpath::Bpath(Group& parent)
+ : Shape(GNOME_CANVAS_SHAPE(g_object_new(get_type(),0)))
+{
+ item_construct(parent);
+}
+
+
+void Bpath::set_bpath(const Glib::RefPtr<PathDef>& path)
+{
+ property_bpath ().set_value ((gpointer)path->gobj());
+}
+
+
+} /* namespace Canvas */
+
+} /* namespace Gnome */
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gnome::Canvas::Bpath* wrap(GnomeCanvasBpath* object, bool take_copy)
+{
+ return dynamic_cast<Gnome::Canvas::Bpath *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Bpath_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Bpath_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gnome_canvas_bpath_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Bpath_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* Bpath_Class::wrap_new(GObject* o)
+{
+ return manage(new Bpath((GnomeCanvasBpath*)(o)));
+
+}
+
+
+/* The implementation: */
+
+Bpath::Bpath(const Glib::ConstructParams& construct_params)
+:
+ Shape(construct_params)
+{
+ }
+
+Bpath::Bpath(GnomeCanvasBpath* castitem)
+:
+ Shape((GnomeCanvasShape*)(castitem))
+{
+ }
+
+Bpath::~Bpath()
+{
+ destroy_();
+}
+
+Bpath::CppClassType Bpath::bpath_class_; // initialize static member
+
+GType Bpath::get_type()
+{
+ return bpath_class_.init().get_type();
+}
+
+GType Bpath::get_base_type()
+{
+ return gnome_canvas_bpath_get_type();
+}
+
+
+Glib::PropertyProxy<gpointer> Bpath::property_bpath()
+{
+ return Glib::PropertyProxy<gpointer>(this, "bpath");
+}
+
+Glib::PropertyProxy_ReadOnly<gpointer> Bpath::property_bpath() const
+{
+ return Glib::PropertyProxy_ReadOnly<gpointer>(this, "bpath");
+}
+
+
+} // namespace Canvas
+
+} // namespace Gnome
+
+
diff --git a/libs/libgnomecanvasmm/libgnomecanvasmm/bpath.h b/libs/libgnomecanvasmm/libgnomecanvasmm/bpath.h
new file mode 100644
index 0000000000..145b087a2e
--- /dev/null
+++ b/libs/libgnomecanvasmm/libgnomecanvasmm/bpath.h
@@ -0,0 +1,148 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _LIBGNOMECANVASMM_BPATH_H
+#define _LIBGNOMECANVASMM_BPATH_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* bpath.h
+ *
+ *
+ * Copyright (C) 2002 The libgnomecanvasmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <libgnomecanvasmm/shape.h>
+#include <libgnomecanvasmm/path-def.h>
+#include <libgnomecanvas/gnome-canvas-bpath.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GnomeCanvasBpath GnomeCanvasBpath;
+typedef struct _GnomeCanvasBpathClass GnomeCanvasBpathClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gnome
+{
+
+namespace Canvas
+{ class Bpath_Class; } // namespace Canvas
+
+} // namespace Gnome
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+
+class Bpath : public Shape
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Bpath CppObjectType;
+ typedef Bpath_Class CppClassType;
+ typedef GnomeCanvasBpath BaseObjectType;
+ typedef GnomeCanvasBpathClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~Bpath();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class Bpath_Class;
+ static CppClassType bpath_class_;
+
+ // noncopyable
+ Bpath(const Bpath&);
+ Bpath& operator=(const Bpath&);
+
+protected:
+ explicit Bpath(const Glib::ConstructParams& construct_params);
+ explicit Bpath(GnomeCanvasBpath* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GnomeCanvasBpath* gobj() { return reinterpret_cast<GnomeCanvasBpath*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GnomeCanvasBpath* gobj() const { return reinterpret_cast<GnomeCanvasBpath*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+public:
+ explicit Bpath(Group& parent);
+
+ // This property stores a pointer to GnomeCanvasPathDef
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<gpointer> property_bpath() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<gpointer> property_bpath() const;
+
+
+ void set_bpath(const Glib::RefPtr<PathDef>& path);
+
+
+};
+
+} /* namespace Canvas */
+
+} /* namespace Gnome */
+
+
+namespace Glib
+{
+ /** @relates Gnome::Canvas::Bpath
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gnome::Canvas::Bpath* wrap(GnomeCanvasBpath* object, bool take_copy = false);
+}
+#endif /* _LIBGNOMECANVASMM_BPATH_H */
+
diff --git a/libs/libgnomecanvasmm/libgnomecanvasmm/canvas.cc b/libs/libgnomecanvasmm/libgnomecanvasmm/canvas.cc
new file mode 100644
index 0000000000..a02ab3e580
--- /dev/null
+++ b/libs/libgnomecanvasmm/libgnomecanvasmm/canvas.cc
@@ -0,0 +1,533 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <libgnomecanvasmm/canvas.h>
+#include <libgnomecanvasmm/private/canvas_p.h>
+
+// -*- C++ -*-
+/* $Id$ */
+
+/* canvas.cc
+ *
+ * Copyright (C) 1998 EMC Capital Management Inc.
+ * Developed by Havoc Pennington <hp@pobox.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtk/gtk.h>
+
+#include <libgnomecanvasmm/group.h>
+#include <libgnomecanvasmm/item.h>
+#include <libgnomecanvasmm/wrap_init.h>
+#include <libgnomecanvas/gnome-canvas-util.h>
+
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+bool
+Canvas::get_color(const Glib::ustring& spec, Gdk::Color& color) const
+{
+ GdkColor* pColor = 0;
+ gboolean result = gnome_canvas_get_color(const_cast<GnomeCanvas*>(gobj()),
+ const_cast<gchar*>(spec.c_str()),
+ pColor);
+ color = Glib::wrap(pColor);
+ return (result == TRUE);
+}
+
+
+CanvasAA::CanvasAA()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Canvas(Glib::ConstructParams(canvas_class_.init(), "aa", TRUE, (char*) 0))
+{
+ //Note that the use of Glib::ConstructParams() here required use of _GMMPROC_PROTECTED_GCLASS in cavas.hg.
+
+ //gtk_widget_push_colormap (gdk_rgb_get_cmap ());
+ //ObjectBase::initialize ((GObject*)g_object_new (get_type (),
+ // "aa", true,
+ // NULL));
+ //gtk_widget_pop_colormap();
+}
+
+CanvasAA::~CanvasAA()
+{
+}
+
+Art::AffineTrans Canvas::w2c_affine() const
+{
+ double pAffine[6];
+ gnome_canvas_w2c_affine(const_cast<GnomeCanvas*>(gobj()), pAffine);
+
+ return Art::AffineTrans(pAffine);
+}
+
+} /* namespace Canvas */
+} /* namespace Gnome */
+
+
+namespace
+{
+
+void Canvas_signal_draw_background_callback(GnomeCanvas* self, GdkDrawable* p0,gint p1,gint p2,gint p3,gint p4,void* data)
+{
+ using namespace Gnome::Canvas;
+ typedef sigc::slot< void,const Glib::RefPtr<Gdk::Drawable>&,int,int,int,int > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::wrap(p0, true)
+, p1
+, p2
+, p3
+, p4
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo Canvas_signal_draw_background_info =
+{
+ "draw_background",
+ (GCallback) &Canvas_signal_draw_background_callback,
+ (GCallback) &Canvas_signal_draw_background_callback
+};
+
+
+void Canvas_signal_render_background_callback(GnomeCanvas* self, GnomeCanvasBuf* p0,void* data)
+{
+ using namespace Gnome::Canvas;
+ typedef sigc::slot< void,GnomeCanvasBuf* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(p0);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo Canvas_signal_render_background_info =
+{
+ "render_background",
+ (GCallback) &Canvas_signal_render_background_callback,
+ (GCallback) &Canvas_signal_render_background_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gnome::Canvas::Canvas* wrap(GnomeCanvas* object, bool take_copy)
+{
+ return dynamic_cast<Gnome::Canvas::Canvas *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Canvas_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Canvas_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gnome_canvas_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Canvas_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->request_update = &request_update_vfunc_callback;
+ klass->draw_background = &draw_background_callback;
+ klass->render_background = &render_background_callback;
+}
+
+void Canvas_Class::request_update_vfunc_callback(GnomeCanvas* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->request_update_vfunc();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->request_update)
+ (*base->request_update)(self);
+ }
+}
+
+
+void Canvas_Class::draw_background_callback(GnomeCanvas* self, GdkDrawable* p0, gint p1, gint p2, gint p3, gint p4)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_draw_background(Glib::wrap(p0, true)
+, p1
+, p2
+, p3
+, p4
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->draw_background)
+ (*base->draw_background)(self, p0, p1, p2, p3, p4);
+ }
+}
+
+void Canvas_Class::render_background_callback(GnomeCanvas* self, GnomeCanvasBuf* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_render_background(p0);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->render_background)
+ (*base->render_background)(self, p0);
+ }
+}
+
+
+Glib::ObjectBase* Canvas_Class::wrap_new(GObject* o)
+{
+ return manage(new Canvas((GnomeCanvas*)(o)));
+
+}
+
+
+/* The implementation: */
+
+Canvas::Canvas(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Layout(construct_params)
+{
+ }
+
+Canvas::Canvas(GnomeCanvas* castitem)
+:
+ Gtk::Layout((GtkLayout*)(castitem))
+{
+ }
+
+Canvas::~Canvas()
+{
+ destroy_();
+}
+
+Canvas::CppClassType Canvas::canvas_class_; // initialize static member
+
+GType Canvas::get_type()
+{
+ return canvas_class_.init().get_type();
+}
+
+GType Canvas::get_base_type()
+{
+ return gnome_canvas_get_type();
+}
+
+
+Canvas::Canvas()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Gtk::Layout(Glib::ConstructParams(canvas_class_.init()))
+{
+ }
+
+Group* Canvas::root() const
+{
+ return Glib::wrap(gnome_canvas_root(const_cast<GnomeCanvas*>(gobj())));
+}
+
+void Canvas::set_scroll_region(double x1, double y1, double x2, double y2)
+{
+ gnome_canvas_set_scroll_region(gobj(), x1, y1, x2, y2);
+}
+
+void Canvas::get_scroll_region(double& x1, double& y1, double& x2, double& y2) const
+{
+ gnome_canvas_get_scroll_region(const_cast<GnomeCanvas*>(gobj()), &(x1), &(y1), &(x2), &(y2));
+}
+
+void Canvas::set_center_scroll_region(bool center)
+{
+ gnome_canvas_set_center_scroll_region(gobj(), static_cast<int>(center));
+}
+
+bool Canvas::get_center_scroll_region() const
+{
+ return gnome_canvas_get_center_scroll_region(const_cast<GnomeCanvas*>(gobj()));
+}
+
+void Canvas::set_pixels_per_unit(double n)
+{
+ gnome_canvas_set_pixels_per_unit(gobj(), n);
+}
+
+void Canvas::scroll_to(int x, int y)
+{
+ gnome_canvas_scroll_to(gobj(), x, y);
+}
+
+void Canvas::get_scroll_offsets(int& cx, int& cy) const
+{
+ gnome_canvas_get_scroll_offsets(const_cast<GnomeCanvas*>(gobj()), &cx, &cy);
+}
+
+void Canvas::update_now()
+{
+ gnome_canvas_update_now(gobj());
+}
+
+Item* Canvas::get_item_at(double x, double y) const
+{
+ return Glib::wrap(gnome_canvas_get_item_at(const_cast<GnomeCanvas*>(gobj()), x, y));
+}
+
+void Canvas::request_redraw(int x1, int y1, int x2, int y2)
+{
+ gnome_canvas_request_redraw(gobj(), x1, y1, x2, y2);
+}
+
+void Canvas::request_redraw(ArtUta* uta)
+{
+ gnome_canvas_request_redraw_uta(gobj(), uta);
+}
+
+void Canvas::w2c(double wx, double wy, int& cx, int& cy) const
+{
+ gnome_canvas_w2c(const_cast<GnomeCanvas*>(gobj()), wx, wy, &cx, &cy);
+}
+
+void Canvas::w2c(double wx, double wy, double& cx, double& cy) const
+{
+ gnome_canvas_w2c_d(const_cast<GnomeCanvas*>(gobj()), wx, wy, &(cx), &(cy));
+}
+
+void Canvas::c2w(int cx, int cy, double& wx, double& wy) const
+{
+ gnome_canvas_c2w(const_cast<GnomeCanvas*>(gobj()), cx, cy, &(wx), &(wy));
+}
+
+void Canvas::window_to_world(double winx, double winy, double& worldx, double& worldy) const
+{
+ gnome_canvas_window_to_world(const_cast<GnomeCanvas*>(gobj()), winx, winy, &(worldx), &(worldy));
+}
+
+void Canvas::world_to_window(double worldx, double worldy, double& winx, double& winy) const
+{
+ gnome_canvas_world_to_window(const_cast<GnomeCanvas*>(gobj()), worldx, worldy, &(winx), &(winy));
+}
+
+gulong Canvas::get_color_pixel(guint rgba) const
+{
+ return gnome_canvas_get_color_pixel(const_cast<GnomeCanvas*>(gobj()), rgba);
+}
+
+void Canvas::set_stipple_origin(const Glib::RefPtr<Gdk::GC>& gc)
+{
+ gnome_canvas_set_stipple_origin(gobj(), Glib::unwrap(gc));
+}
+
+void Canvas::set_dither(Gdk::RgbDither dither)
+{
+ gnome_canvas_set_dither(gobj(), ((GdkRgbDither)(dither)));
+}
+
+Gdk::RgbDither Canvas::get_dither() const
+{
+ return ((Gdk::RgbDither)(gnome_canvas_get_dither(const_cast<GnomeCanvas*>(gobj()))));
+}
+
+void Canvas::update_svp(ArtSVP** p_svp, ArtSVP* new_svp)
+{
+ gnome_canvas_update_svp(gobj(), p_svp, new_svp);
+}
+
+void Canvas::update_svp_clip(ArtSVP** p_svp, ArtSVP* new_svp, ArtSVP* clip_svp)
+{
+ gnome_canvas_update_svp_clip(gobj(), p_svp, new_svp, clip_svp);
+}
+
+double Canvas::get_pixels_per_unit() const
+{
+ return gobj()->pixels_per_unit;
+}
+
+
+Glib::SignalProxy5< void,const Glib::RefPtr<Gdk::Drawable>&,int,int,int,int > Canvas::signal_draw_background()
+{
+ return Glib::SignalProxy5< void,const Glib::RefPtr<Gdk::Drawable>&,int,int,int,int >(this, &Canvas_signal_draw_background_info);
+}
+
+Glib::SignalProxy1< void,GnomeCanvasBuf* > Canvas::signal_render_background()
+{
+ return Glib::SignalProxy1< void,GnomeCanvasBuf* >(this, &Canvas_signal_render_background_info);
+}
+
+
+Glib::PropertyProxy<bool> Canvas::property_aa()
+{
+ return Glib::PropertyProxy<bool>(this, "aa");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Canvas::property_aa() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "aa");
+}
+
+
+void Gnome::Canvas::Canvas::on_draw_background(const Glib::RefPtr<Gdk::Drawable>& drawable, int x, int y, int width, int height)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->draw_background)
+ (*base->draw_background)(gobj(),Glib::unwrap(drawable),x,y,width,height);
+}
+
+void Gnome::Canvas::Canvas::on_render_background(GnomeCanvasBuf* buf)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->render_background)
+ (*base->render_background)(gobj(),buf);
+}
+
+
+void Gnome::Canvas::Canvas::request_update_vfunc()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->request_update)
+ (*base->request_update)(gobj());
+}
+
+
+} // namespace Canvas
+
+} // namespace Gnome
+
+
diff --git a/libs/libgnomecanvasmm/libgnomecanvasmm/canvas.h b/libs/libgnomecanvasmm/libgnomecanvasmm/canvas.h
new file mode 100644
index 0000000000..c7ee6e8d71
--- /dev/null
+++ b/libs/libgnomecanvasmm/libgnomecanvasmm/canvas.h
@@ -0,0 +1,443 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _LIBGNOMECANVASMM_CANVAS_H
+#define _LIBGNOMECANVASMM_CANVAS_H
+
+#include <glibmm.h>
+
+// -*- C++ -*-
+/* $Id$ */
+
+/* canvas.h
+ *
+ * Copyright (C) 1998 EMC Capital Management Inc.
+ * Developed by Havoc Pennington <hp@pobox.com>
+ *
+ * Copyright (C) 1999 The Gtk-- Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <libgnomecanvas/gnome-canvas.h>
+#include <libgnomecanvasmm/affinetrans.h>
+#include <gtkmm/layout.h>
+#include <gdkmm/color.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GnomeCanvas GnomeCanvas;
+typedef struct _GnomeCanvasClass GnomeCanvasClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gnome
+{
+
+namespace Canvas
+{ class Canvas_Class; } // namespace Canvas
+
+} // namespace Gnome
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+class Item;
+class Group;
+
+/** Canvas functions usually operate in either World coordinates
+ * (units for the entire canvas), or Canvas coordinates (pixels starting
+ * at 0,0 in the top left). There are functions to transform from
+ * one to the other.
+ */
+
+class Canvas : public Gtk::Layout
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Canvas CppObjectType;
+ typedef Canvas_Class CppClassType;
+ typedef GnomeCanvas BaseObjectType;
+ typedef GnomeCanvasClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~Canvas();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+protected:
+ friend class Canvas_Class;
+ static CppClassType canvas_class_;
+
+ // noncopyable
+ Canvas(const Canvas&);
+ Canvas& operator=(const Canvas&);
+
+protected:
+ explicit Canvas(const Glib::ConstructParams& construct_params);
+ explicit Canvas(GnomeCanvas* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GnomeCanvas* gobj() { return reinterpret_cast<GnomeCanvas*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GnomeCanvas* gobj() const { return reinterpret_cast<GnomeCanvas*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_draw_background(const Glib::RefPtr<Gdk::Drawable>& drawable, int x, int y, int width, int height);
+ virtual void on_render_background(GnomeCanvasBuf* buf);
+
+
+private:
+;
+public:
+ Canvas();
+
+ //Allow CanvasAA to access the canvas_class_ member.
+
+
+ //: Get the root canvas item
+
+ /** Queries the root group of a canvas.
+ * @return The root group of the specified canvas.
+ */
+ Group* root() const;
+
+ //: Limits of scroll region
+
+ /** Sets the scrolling region of a canvas to the specified rectangle. The canvas
+ * will then be able to scroll only within this region. The view of the canvas
+ * is adjusted as appropriate to display as much of the new region as possible.
+ * @param x1 Leftmost limit of the scrolling region.
+ * @param y1 Upper limit of the scrolling region.
+ * @param x2 Rightmost limit of the scrolling region.
+ * @param y2 Lower limit of the scrolling region.
+ */
+ void set_scroll_region(double x1, double y1, double x2, double y2);
+
+ //: Get limits of scroll region
+
+ /** Queries the scrolling region of a canvas.
+ * @param x1 Leftmost limit of the scrolling region (return value).
+ * @param y1 Upper limit of the scrolling region (return value).
+ * @param x2 Rightmost limit of the scrolling region (return value).
+ * @param y2 Lower limit of the scrolling region (return value).
+ */
+ void get_scroll_region(double& x1, double& y1, double& x2, double& y2) const;
+
+
+ /** When the scrolling region of the canvas is smaller than the canvas window,
+ * e.g.\ the allocation of the canvas, it can be either centered on the window
+ * or simply made to be on the upper-left corner on the window. This function
+ * lets you configure this property.
+ * @param center_scroll_region Whether to center the scrolling region in the canvas
+ * window when it is smaller than the canvas' allocation.
+ */
+ void set_center_scroll_region(bool center);
+
+
+ /** Returns whether the canvas is set to center the scrolling region in the window
+ * if the former is smaller than the canvas' allocation.
+ * @return Whether the scroll region is being centered in the canvas window.
+ */
+ bool get_center_scroll_region() const;
+
+ //: Set the pixels/world coordinates ratio
+ //- With no arguments sets to default of 1.0.
+
+ /** Sets the zooming factor of a canvas by specifying the number of pixels that
+ * correspond to one canvas unit.
+ *
+ * The anchor point for zooming, i.e. the point that stays fixed and all others
+ * zoom inwards or outwards from it, depends on whether the canvas is set to
+ * center the scrolling region or not. You can control this using the
+ * set_center_scroll_region() function. If the canvas is set to
+ * center the scroll region, then the center of the canvas window is used as the
+ * anchor point for zooming. Otherwise, the upper-left corner of the canvas
+ * window is used as the anchor point.
+ * @param n The number of pixels that correspond to one canvas unit.
+ */
+ void set_pixels_per_unit(double n = 1.0);
+
+ //: Shift window.
+ //- Makes a canvas scroll to the specified offsets, given in canvas pixel
+ //- units.
+ //- The canvas will adjust the view so that it is not outside the scrolling
+ //- region. This function is typically not used, as it is better to hook
+ //- scrollbars to the canvas layout's scrolling adjusments.
+
+ /** Makes a canvas scroll to the specified offsets, given in canvas pixel units.
+ * The canvas will adjust the view so that it is not outside the scrolling
+ * region. This function is typically not used, as it is better to hook
+ * scrollbars to the canvas layout's scrolling adjusments.
+ * @param cx Horizontal scrolling offset in canvas pixel units.
+ * @param cy Vertical scrolling offset in canvas pixel units.
+ */
+ void scroll_to(int x, int y);
+
+ //: Scroll offsets in canvas pixel coordinates.
+
+ /** Queries the scrolling offsets of a canvas. The values are returned in canvas
+ * pixel units.
+ * @param cx Horizontal scrolling offset (return value).
+ * @param cy Vertical scrolling offset (return value).
+ */
+ void get_scroll_offsets(int& cx, int& cy) const;
+
+ //: Repaint immediately, don't wait for idle loop
+ //- normally the canvas queues repainting and does it in an
+ //- idle loop
+
+ /** Forces an immediate update and redraw of a canvas. If the canvas does not
+ * have any pending update or redraw requests, then no action is taken. This is
+ * typically only used by applications that need explicit control of when the
+ * display is updated, like games. It is not needed by normal applications.
+ */
+ void update_now();
+
+ //: Find an item at a location.
+ //- Looks for the item that is under the specified position, which must be
+ //- specified in world coordinates. Arguments are in world coordinates.
+ //- Returns 0 if no item is at that
+ //- location.
+
+ /** Looks for the item that is under the specified position, which must be
+ * specified in world coordinates.
+ * @param x X position in world coordinates.
+ * @param y Y position in world coordinates.
+ * @return The sought item, or <tt>0</tt> if no item is at the specified
+ * coordinates.
+ */
+ Item* get_item_at(double x, double y) const;
+
+
+ //: Repaint small area (internal)
+ //- Used only by item implementations. Request an eventual redraw
+ //- of the region, which includes x1,y1 but not x2,y2
+
+ /** Convenience function that informs a canvas that the specified rectangle needs
+ * to be repainted. This function converts the rectangle to a microtile array
+ * and feeds it to request_redraw_uta(). The rectangle includes
+ * @a x1 and @a y1 , but not @a x2 and @a y2 . To be used only by item implementations.
+ * @param x1 Leftmost coordinate of the rectangle to be redrawn.
+ * @param y1 Upper coordinate of the rectangle to be redrawn.
+ * @param x2 Rightmost coordinate of the rectangle to be redrawn, plus 1.
+ * @param y2 Lower coordinate of the rectangle to be redrawn, plus 1.
+ */
+ void request_redraw(int x1, int y1, int x2, int y2);
+ //TODO: Investigate ArtUta.
+
+ /** Informs a canvas that the specified area, given as a microtile array, needs
+ * to be repainted. To be used only by item implementations.
+ * @param uta Microtile array that specifies the area to be redrawn. It will
+ * be freed by this function, so the argument you pass will be invalid
+ * after you call this function.
+ */
+ void request_redraw(ArtUta* uta);
+
+ Art::AffineTrans w2c_affine() const;
+
+
+ //: Convert from World to canvas coordinates (units for the entire canvas)
+ //: to Canvas coordinates (pixels starting at 0,0 in the top left
+ //: of the visible area). The relationship depends on the current
+ //: scroll position and the pixels_per_unit ratio (zoom factor)
+
+ /** Converts world coordinates into canvas pixel coordinates.
+ * @param wx World X coordinate.
+ * @param wy World Y coordinate.
+ * @param cx X pixel coordinate (return value).
+ * @param cy Y pixel coordinate (return value).
+ */
+ void w2c(double wx, double wy, int& cx, int& cy) const;
+
+ /** Converts world coordinates into canvas pixel coordinates. This version
+ * @param wx World X coordinate.
+ * @param wy World Y coordinate.
+ * @param cx X pixel coordinate (return value).
+ * @param cy Y pixel coordinate (return value).
+ * @return Coordinates in floating point coordinates, for greater precision.
+ */
+ void w2c(double wx, double wy, double& cx, double& cy) const;
+
+ //: From Canvas to World
+
+ /** Converts canvas pixel coordinates to world coordinates.
+ * @param cx Canvas pixel X coordinate.
+ * @param cy Canvas pixel Y coordinate.
+ * @param wx X world coordinate (return value).
+ * @param wy Y world coordinate (return value).
+ */
+ void c2w(int cx, int cy, double& wx, double& wy) const;
+
+ //: Convert from Window coordinates to world coordinates.
+ //- Window coordinates are based of the widget's GdkWindow.
+ //- This is fairly low-level and not generally useful.
+
+ /** Converts window-relative coordinates into world coordinates. You can use
+ * this when you need to convert mouse coordinates into world coordinates, for
+ * example.
+ * @param winx Window-relative X coordinate.
+ * @param winy Window-relative Y coordinate.
+ * @param worldx X world coordinate (return value).
+ * @param worldy Y world coordinate (return value).
+ */
+ void window_to_world (double winx,double winy, double& worldx,double& worldy) const;
+
+ //: Convert from world coordinates to Window coordinates.
+ //- Window coordinates are based of the widget's GdkWindow.
+ //- This is fairly low-level and not generally useful.
+
+ /** Converts world coordinates into window-relative coordinates.
+ * @param worldx World X coordinate.
+ * @param worldy World Y coordinate.
+ * @param winx X window-relative coordinate.
+ * @param winy Y window-relative coordinate.
+ */
+ void world_to_window (double worldx, double worldy, double& winx, double& winy) const;
+
+ //: Parse color spec string and allocate it into the GdkColor.
+ bool get_color(const Glib::ustring& spec, Gdk::Color& color) const;
+
+
+/* Allocates a color from the RGB value passed into this function. */
+
+ /** Allocates a color from the RGBA value passed into this function. The alpha
+ * opacity value is discarded, since normal X colors do not support it.
+ * @param rgba RGBA color specification.
+ * @return Allocated pixel value corresponding to the specified color.
+ */
+ gulong get_color_pixel(guint rgba) const;
+
+ /** Sets the stipple origin of the specified GC as is appropriate for the canvas,
+ * so that it will be aligned with other stipple patterns used by canvas items.
+ * This is typically only needed by item implementations.
+ * @param gc GC on which to set the stipple origin.
+ */
+ void set_stipple_origin(const Glib::RefPtr<Gdk::GC>& gc);
+
+ /** Controls dithered rendering for antialiased canvases. The value of
+ * dither should be Gdk::RGB_DITHER_NONE, Gdk::RGB_DITHER_NORMAL, or
+ * Gdk::RGB_DITHER_MAX. The default canvas setting is
+ * Gdk::RGB_DITHER_NORMAL.
+ * @param dither Type of dithering used to render an antialiased canvas.
+ */
+ void set_dither(Gdk::RgbDither dither);
+
+ /** Returns the type of dithering used to render an antialiased canvas.
+ * @return The dither setting.
+ */
+ Gdk::RgbDither get_dither() const;
+
+
+ //TODO: Look at ArtSVP.
+
+ /** Sets the svp to the new value, requesting repaint on what's changed. This
+ * function takes responsibility for freeing new_svp.
+ * @param p_svp A pointer to the existing svp.
+ * @param new_svp The new svp.
+ */
+ void update_svp(ArtSVP** p_svp, ArtSVP* new_svp);
+
+ /** Sets the svp to the new value, clipping if necessary, and requesting repaint
+ * on what's changed. This function takes responsibility for freeing new_svp.
+ * @param p_svp A pointer to the existing svp.
+ * @param new_svp The new svp.
+ * @param clip_svp A clip path, if non-null.
+ */
+ void update_svp_clip(ArtSVP** p_svp, ArtSVP* new_svp, ArtSVP* clip_svp);
+
+ // The following are simply accessed via the struct in C,
+ // but Federico reports that they are meant to be used.
+ //: Get the pixels per unit.
+ double get_pixels_per_unit() const;
+
+ //: Draw the background for the area given.
+ //- This method is only used for non-antialiased canvases.
+
+
+ Glib::SignalProxy5< void,const Glib::RefPtr<Gdk::Drawable>&,int,int,int,int > signal_draw_background();
+
+ // Render the background for the buffer given.
+ //- The buf data structure contains both a pointer to a packed 24-bit
+ //- RGB array, and the coordinates.
+ //- This method is only used for antialiased canvases.
+
+
+ Glib::SignalProxy1< void,GnomeCanvasBuf* > signal_render_background();
+
+ //: Private Virtual methods for groping the canvas inside bonobo.
+ virtual void request_update_vfunc();
+
+ // Whether the canvas is in antialiased mode or not.
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_aa() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_aa() const;
+
+
+};
+
+//: Antialiased Canvas.
+//- Constructor takes care of push/pop actions of the colormap.
+class CanvasAA : public Canvas
+{
+ public:
+ CanvasAA();
+ virtual ~CanvasAA();
+};
+
+} /* namespace Canvas */
+} /* namespace Gnome */
+
+
+namespace Glib
+{
+ /** @relates Gnome::Canvas::Canvas
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gnome::Canvas::Canvas* wrap(GnomeCanvas* object, bool take_copy = false);
+}
+#endif /* _LIBGNOMECANVASMM_CANVAS_H */
+
diff --git a/libs/libgnomecanvasmm/libgnomecanvasmm/ellipse.cc b/libs/libgnomecanvasmm/libgnomecanvasmm/ellipse.cc
new file mode 100644
index 0000000000..ecc2402516
--- /dev/null
+++ b/libs/libgnomecanvasmm/libgnomecanvasmm/ellipse.cc
@@ -0,0 +1,147 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <libgnomecanvasmm/ellipse.h>
+#include <libgnomecanvasmm/private/ellipse_p.h>
+
+// -*- C++ -*-
+/* $Id$ */
+
+/* ellipse.cc
+ *
+ * Copyright (C) 1998 EMC Capital Management Inc.
+ * Developed by Havoc Pennington <hp@pobox.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+Ellipse::Ellipse(Group& parentx, double x1, double y1, double x2, double y2)
+ : RectEllipse(GNOME_CANVAS_RE(g_object_new(get_type(), 0)))
+{
+ item_construct(parentx);
+ set("x1",x1,"y1",y1,"x2",x2,"y2",y2,0);
+}
+
+Ellipse::Ellipse(Group& parentx)
+ : RectEllipse(GNOME_CANVAS_RE(g_object_new(get_type(), 0)))
+{
+ item_construct(parentx);
+}
+
+} /* namespace Canvas */
+} /* namespace Gnome */
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gnome::Canvas::Ellipse* wrap(GnomeCanvasEllipse* object, bool take_copy)
+{
+ return dynamic_cast<Gnome::Canvas::Ellipse *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Ellipse_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Ellipse_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gnome_canvas_ellipse_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Ellipse_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* Ellipse_Class::wrap_new(GObject* o)
+{
+ return manage(new Ellipse((GnomeCanvasEllipse*)(o)));
+
+}
+
+
+/* The implementation: */
+
+Ellipse::Ellipse(const Glib::ConstructParams& construct_params)
+:
+ RectEllipse(construct_params)
+{
+ }
+
+Ellipse::Ellipse(GnomeCanvasEllipse* castitem)
+:
+ RectEllipse((GnomeCanvasRE*)(castitem))
+{
+ }
+
+Ellipse::~Ellipse()
+{
+ destroy_();
+}
+
+Ellipse::CppClassType Ellipse::ellipse_class_; // initialize static member
+
+GType Ellipse::get_type()
+{
+ return ellipse_class_.init().get_type();
+}
+
+GType Ellipse::get_base_type()
+{
+ return gnome_canvas_ellipse_get_type();
+}
+
+
+} // namespace Canvas
+
+} // namespace Gnome
+
+
diff --git a/libs/libgnomecanvasmm/libgnomecanvasmm/ellipse.h b/libs/libgnomecanvasmm/libgnomecanvasmm/ellipse.h
new file mode 100644
index 0000000000..e085dc45e8
--- /dev/null
+++ b/libs/libgnomecanvasmm/libgnomecanvasmm/ellipse.h
@@ -0,0 +1,130 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _LIBGNOMECANVASMM_ELLIPSE_H
+#define _LIBGNOMECANVASMM_ELLIPSE_H
+
+#include <glibmm.h>
+
+// -*- C++ -*-
+/* $Id$ */
+
+/* ellipse.h
+ *
+ * Copyright (C) 1998 EMC Capital Management Inc.
+ * Developed by Havoc Pennington <hp@pobox.com>
+ *
+ * Copyright (C) 1999 The Gtk-- Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <libgnomecanvasmm/item.h>
+#include <libgnomecanvasmm/group.h>
+#include <libgnomecanvasmm/rect-ellipse.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GnomeCanvasEllipse GnomeCanvasEllipse;
+typedef struct _GnomeCanvasEllipseClass GnomeCanvasEllipseClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gnome
+{
+
+namespace Canvas
+{ class Ellipse_Class; } // namespace Canvas
+
+} // namespace Gnome
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+
+class Ellipse : public RectEllipse
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Ellipse CppObjectType;
+ typedef Ellipse_Class CppClassType;
+ typedef GnomeCanvasEllipse BaseObjectType;
+ typedef GnomeCanvasEllipseClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~Ellipse();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class Ellipse_Class;
+ static CppClassType ellipse_class_;
+
+ // noncopyable
+ Ellipse(const Ellipse&);
+ Ellipse& operator=(const Ellipse&);
+
+protected:
+ explicit Ellipse(const Glib::ConstructParams& construct_params);
+ explicit Ellipse(GnomeCanvasEllipse* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GnomeCanvasEllipse* gobj() { return reinterpret_cast<GnomeCanvasEllipse*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GnomeCanvasEllipse* gobj() const { return reinterpret_cast<GnomeCanvasEllipse*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+;
+
+public:
+ explicit Ellipse(Group& parent);
+ Ellipse(Group& parent, double x1, double y1, double x2, double y2);
+
+
+};
+
+} /* namespace Canvas */
+} /* namespace Gnome */
+namespace Glib
+{
+ /** @relates Gnome::Canvas::Ellipse
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gnome::Canvas::Ellipse* wrap(GnomeCanvasEllipse* object, bool take_copy = false);
+}
+#endif /* _LIBGNOMECANVASMM_ELLIPSE_H */
+
diff --git a/libs/libgnomecanvasmm/libgnomecanvasmm/group.cc b/libs/libgnomecanvasmm/libgnomecanvasmm/group.cc
new file mode 100644
index 0000000000..90c9c97466
--- /dev/null
+++ b/libs/libgnomecanvasmm/libgnomecanvasmm/group.cc
@@ -0,0 +1,170 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <libgnomecanvasmm/group.h>
+#include <libgnomecanvasmm/private/group_p.h>
+
+// -*- C++ -*-
+/* $Id$ */
+
+/* group.cc
+ *
+ * Copyright (C) 1998 EMC Capital Management Inc.
+ * Developed by Havoc Pennington <hp@pobox.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+Group::Group(Group& parentx, double x, double y)
+ : Item(GNOME_CANVAS_ITEM(g_object_new(get_type(), 0)))
+{
+ item_construct(parentx);
+ set("x", x, "y", y, 0);
+}
+
+} /* namespace Canvas */
+} /* namespace Gnome */
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gnome::Canvas::Group* wrap(GnomeCanvasGroup* object, bool take_copy)
+{
+ return dynamic_cast<Gnome::Canvas::Group *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Group_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Group_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gnome_canvas_group_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Group_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* Group_Class::wrap_new(GObject* o)
+{
+ return manage(new Group((GnomeCanvasGroup*)(o)));
+
+}
+
+
+/* The implementation: */
+
+Group::Group(const Glib::ConstructParams& construct_params)
+:
+ Item(construct_params)
+{
+ }
+
+Group::Group(GnomeCanvasGroup* castitem)
+:
+ Item((GnomeCanvasItem*)(castitem))
+{
+ }
+
+Group::~Group()
+{
+ destroy_();
+}
+
+Group::CppClassType Group::group_class_; // initialize static member
+
+GType Group::get_type()
+{
+ return group_class_.init().get_type();
+}
+
+GType Group::get_base_type()
+{
+ return gnome_canvas_group_get_type();
+}
+
+
+Group::Group()
+:
+ Glib::ObjectBase(0), //Mark this class as gtkmmproc-generated, rather than a custom class, to allow vfunc optimisations.
+ Item(Glib::ConstructParams(group_class_.init()))
+{
+ }
+
+
+Glib::PropertyProxy<double> Group::property_x()
+{
+ return Glib::PropertyProxy<double>(this, "x");
+}
+
+Glib::PropertyProxy_ReadOnly<double> Group::property_x() const
+{
+ return Glib::PropertyProxy_ReadOnly<double>(this, "x");
+}
+
+Glib::PropertyProxy<double> Group::property_y()
+{
+ return Glib::PropertyProxy<double>(this, "y");
+}
+
+Glib::PropertyProxy_ReadOnly<double> Group::property_y() const
+{
+ return Glib::PropertyProxy_ReadOnly<double>(this, "y");
+}
+
+
+} // namespace Canvas
+
+} // namespace Gnome
+
+
diff --git a/libs/libgnomecanvasmm/libgnomecanvasmm/group.h b/libs/libgnomecanvasmm/libgnomecanvasmm/group.h
new file mode 100644
index 0000000000..ef359297dd
--- /dev/null
+++ b/libs/libgnomecanvasmm/libgnomecanvasmm/group.h
@@ -0,0 +1,164 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _LIBGNOMECANVASMM_GROUP_H
+#define _LIBGNOMECANVASMM_GROUP_H
+
+#include <glibmm.h>
+
+// -*- C++ -*-
+/* $Id$ */
+
+/* group.h
+ *
+ * Copyright (C) 1998 EMC Capital Management Inc.
+ * Developed by Havoc Pennington <hp@pobox.com>
+ *
+ * Copyright (C) 1999 The Gtk-- Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <libgnomecanvasmm/item.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GnomeCanvasGroup GnomeCanvasGroup;
+typedef struct _GnomeCanvasGroupClass GnomeCanvasGroupClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gnome
+{
+
+namespace Canvas
+{ class Group_Class; } // namespace Canvas
+
+} // namespace Gnome
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+class Canvas;
+
+
+class Group : public Item
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Group CppObjectType;
+ typedef Group_Class CppClassType;
+ typedef GnomeCanvasGroup BaseObjectType;
+ typedef GnomeCanvasGroupClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~Group();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class Group_Class;
+ static CppClassType group_class_;
+
+ // noncopyable
+ Group(const Group&);
+ Group& operator=(const Group&);
+
+protected:
+ explicit Group(const Glib::ConstructParams& construct_params);
+ explicit Group(GnomeCanvasGroup* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GnomeCanvasGroup* gobj() { return reinterpret_cast<GnomeCanvasGroup*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GnomeCanvasGroup* gobj() const { return reinterpret_cast<GnomeCanvasGroup*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+;
+public:
+ friend class Canvas;
+ explicit Group(Group& parent, double x = 0, double y = 0);
+ Group();
+
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<double> property_x() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<double> property_x() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<double> property_y() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<double> property_y() const;
+
+
+};
+
+} /* namespace Canvas */
+} /* namespace Gnome */
+
+namespace Glib
+{
+ /** @relates Gnome::Canvas::Group
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gnome::Canvas::Group* wrap(GnomeCanvasGroup* object, bool take_copy = false);
+}
+#endif /* _LIBGNOMECANVASMM_GROUP_H */
+
diff --git a/libs/libgnomecanvasmm/libgnomecanvasmm/init.cc b/libs/libgnomecanvasmm/libgnomecanvasmm/init.cc
new file mode 100644
index 0000000000..dfc47613ad
--- /dev/null
+++ b/libs/libgnomecanvasmm/libgnomecanvasmm/init.cc
@@ -0,0 +1,37 @@
+/* init.cc
+ *
+ * Copyright (C) 2001 The libgnomeuimm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <libgnomecanvasmm/init.h>
+#include <gtkmm/main.h>
+#include <libgnomecanvasmm/wrap_init.h>
+
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+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 libgnomecanvasmm classes.
+}
+
+} /* namespace Canvas */
+} /* namespace Gnome */
diff --git a/libs/libgnomecanvasmm/libgnomecanvasmm/init.h b/libs/libgnomecanvasmm/libgnomecanvasmm/init.h
new file mode 100644
index 0000000000..c915c918cf
--- /dev/null
+++ b/libs/libgnomecanvasmm/libgnomecanvasmm/init.h
@@ -0,0 +1,37 @@
+#ifndef _LIBGNOMEUIMM_INIT_H
+#define _LIBGNOMEUIMM_INIT_H
+
+/* init.h
+ *
+ * Copyright (C) 2001 The libgnomeuimm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+/* Initialize libgnomecanvas wrap table:
+ * You still need a Gtk::Main instance, or a subclass such as Gnome::Main.
+ */
+void init();
+
+} /* namespace Canvas */
+} /* namespace Gnome */
+
+#endif // _LIBGNOMEUIMM_INIT_H
diff --git a/libs/libgnomecanvasmm/libgnomecanvasmm/item.cc b/libs/libgnomecanvasmm/libgnomecanvasmm/item.cc
new file mode 100644
index 0000000000..b39c34ad89
--- /dev/null
+++ b/libs/libgnomecanvasmm/libgnomecanvasmm/item.cc
@@ -0,0 +1,908 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <libgnomecanvasmm/item.h>
+#include <libgnomecanvasmm/private/item_p.h>
+
+// -*- C++ -*-
+/* $Id$ */
+
+/* item.cc
+ *
+ * Copyright (C) 1998 EMC Capital Management Inc.
+ * Developed by Havoc Pennington <hp@pobox.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+extern "C"
+{
+#include <stdarg.h>
+}
+
+#include <libgnomecanvasmm/canvas.h>
+#include <libgnomecanvasmm/group.h>
+#include <libgnomecanvas/gnome-canvas-util.h>
+
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+//This function creates an empty va_list instead of just passing 0 to gnome_canvas_item_construct().
+//This is necessary on the alpha platform.
+//It needs to be a separate helper function because we need a ... argument.
+static void
+item_construct_helper(GnomeCanvasItem *item, GnomeCanvasGroup *group, ...)
+{
+ va_list va;
+ va_start(va, group);
+ gnome_canvas_item_construct(item, group, 0, va);
+ va_end(va);
+}
+
+void
+Item::item_construct(Group& group)
+{
+ item_construct_helper(GNOME_CANVAS_ITEM(gobj()), group.gobj()); //With no ... arguments.
+}
+
+void
+Item::item_construct(Group& group, const gchar* first_arg_name,
+ va_list ap)
+{
+ gnome_canvas_item_construct(GNOME_CANVAS_ITEM(gobj()), group.gobj(),
+ first_arg_name,
+ ap);
+}
+
+void
+Item::set(const gchar* first_arg_name, ...)
+{
+ va_list args;
+ va_start(args,first_arg_name);
+ gnome_canvas_item_set_valist(gobj(), first_arg_name, args);
+ va_end(args);
+}
+
+int Item::grab(unsigned int event_mask, const Gdk::Cursor& cursor, guint32 etime)
+{
+ return gnome_canvas_item_grab(gobj(), event_mask, const_cast<GdkCursor*>(cursor.gobj()), etime);
+}
+
+int Item::grab(unsigned int event_mask, guint32 etime)
+{
+ return gnome_canvas_item_grab(gobj(), event_mask, 0, etime);
+}
+
+void
+Item::affine_relative(const Art::AffineTrans &affine)
+{
+ gnome_canvas_item_affine_relative (gobj(), affine.gobj());
+}
+
+void
+Item::affine_absolute (const Art::AffineTrans &affine)
+{
+ gnome_canvas_item_affine_absolute (gobj(), affine.gobj());
+}
+
+Art::AffineTrans
+Item::get_i2w_affine() const
+{
+ double tmp[6] = {0};
+
+ gnome_canvas_item_i2w_affine(const_cast<GnomeCanvasItem*>(gobj()), tmp);
+ return Art::AffineTrans(tmp);
+}
+
+Art::AffineTrans
+Item::get_i2c_affine() const
+{
+ double tmp[6] = {0};
+
+ gnome_canvas_item_i2c_affine(const_cast<GnomeCanvasItem*>(gobj()), tmp);
+ return Art::AffineTrans(tmp);
+}
+
+} /* namespace Canvas */
+} /* namespace Gnome */
+
+
+namespace
+{
+
+gboolean Item_signal_event_callback(GnomeCanvasItem* self, GdkEvent* p0,void* data)
+{
+ using namespace Gnome::Canvas;
+ typedef sigc::slot< bool,GdkEvent* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ return static_cast<int>((*static_cast<SlotType*>(slot))(p0));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+gboolean Item_signal_event_notify_callback(GnomeCanvasItem* self, GdkEvent* p0, void* data)
+{
+ using namespace Gnome::Canvas;
+ typedef sigc::slot< void,GdkEvent* > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(p0);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+const Glib::SignalProxyInfo Item_signal_event_info =
+{
+ "event",
+ (GCallback) &Item_signal_event_callback,
+ (GCallback) &Item_signal_event_notify_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gnome::Canvas::Item* wrap(GnomeCanvasItem* object, bool take_copy)
+{
+ return dynamic_cast<Gnome::Canvas::Item *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Item_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Item_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gnome_canvas_item_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Item_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->update = &update_vfunc_callback;
+ klass->realize = &realize_vfunc_callback;
+ klass->unrealize = &unrealize_vfunc_callback;
+ klass->map = &map_vfunc_callback;
+ klass->unmap = &unmap_vfunc_callback;
+ klass->coverage = &coverage_vfunc_callback;
+ klass->draw = &draw_vfunc_callback;
+ klass->render = &render_vfunc_callback;
+ klass->point = &point_vfunc_callback;
+ klass->bounds = &bounds_vfunc_callback;
+ klass->event = &event_callback;
+}
+
+void Item_Class::update_vfunc_callback(GnomeCanvasItem* self, double* affine, ArtSVP* clip_path, int flags)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->update_vfunc(affine, clip_path, flags);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->update)
+ (*base->update)(self, affine, clip_path, flags);
+ }
+}
+
+void Item_Class::realize_vfunc_callback(GnomeCanvasItem* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->realize_vfunc();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->realize)
+ (*base->realize)(self);
+ }
+}
+
+void Item_Class::unrealize_vfunc_callback(GnomeCanvasItem* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->unrealize_vfunc();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->unrealize)
+ (*base->unrealize)(self);
+ }
+}
+
+void Item_Class::map_vfunc_callback(GnomeCanvasItem* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->map_vfunc();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->map)
+ (*base->map)(self);
+ }
+}
+
+void Item_Class::unmap_vfunc_callback(GnomeCanvasItem* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->unmap_vfunc();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->unmap)
+ (*base->unmap)(self);
+ }
+}
+
+ArtUta* Item_Class::coverage_vfunc_callback(GnomeCanvasItem* self)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return obj->coverage_vfunc();
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->coverage)
+ return (*base->coverage)(self);
+ }
+
+ typedef ArtUta* RType;
+ return RType();
+}
+
+void Item_Class::draw_vfunc_callback(GnomeCanvasItem* self, GdkDrawable* drawable, int x, int y, int width, int height)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->draw_vfunc(Glib::wrap(drawable, true)
+, x, y, width, height);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->draw)
+ (*base->draw)(self, drawable, x, y, width, height);
+ }
+}
+
+void Item_Class::render_vfunc_callback(GnomeCanvasItem* self, GnomeCanvasBuf* buf)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->render_vfunc(buf);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->render)
+ (*base->render)(self, buf);
+ }
+}
+
+double Item_Class::point_vfunc_callback(GnomeCanvasItem* self, double x, double y, int cx, int cy, GnomeCanvasItem** actual_item)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return obj->point_vfunc(x, y, cx, cy, actual_item);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->point)
+ return (*base->point)(self, x, y, cx, cy, actual_item);
+ }
+
+ typedef double RType;
+ return RType();
+}
+
+void Item_Class::bounds_vfunc_callback(GnomeCanvasItem* self, double* x1, double* y1, double* x2, double* y2)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->bounds_vfunc(x1, y1, x2, y2);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->bounds)
+ (*base->bounds)(self, x1, y1, x2, y2);
+ }
+}
+
+
+gboolean Item_Class::event_callback(GnomeCanvasItem* self, GdkEvent* p0)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ return static_cast<int>(obj->on_event(p0));
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->event)
+ return (*base->event)(self, p0);
+ }
+
+ typedef gboolean RType;
+ return RType();
+}
+
+
+Glib::ObjectBase* Item_Class::wrap_new(GObject* o)
+{
+ return manage(new Item((GnomeCanvasItem*)(o)));
+
+}
+
+
+/* The implementation: */
+
+Item::Item(const Glib::ConstructParams& construct_params)
+:
+ Gtk::Object(construct_params)
+{
+ }
+
+Item::Item(GnomeCanvasItem* castitem)
+:
+ Gtk::Object((GtkObject*)(castitem))
+{
+ }
+
+Item::~Item()
+{
+ destroy_();
+}
+
+Item::CppClassType Item::item_class_; // initialize static member
+
+GType Item::get_type()
+{
+ return item_class_.init().get_type();
+}
+
+GType Item::get_base_type()
+{
+ return gnome_canvas_item_get_type();
+}
+
+
+void Item::move(double dx, double dy)
+{
+ gnome_canvas_item_move(gobj(), dx, dy);
+}
+
+void Item::raise(int positions)
+{
+ gnome_canvas_item_raise(gobj(), positions);
+}
+
+void Item::lower(int positions)
+{
+ gnome_canvas_item_lower(gobj(), positions);
+}
+
+void Item::raise_to_top()
+{
+ gnome_canvas_item_raise_to_top(gobj());
+}
+
+void Item::lower_to_bottom()
+{
+ gnome_canvas_item_lower_to_bottom(gobj());
+}
+
+void Item::ungrab(guint32 etime)
+{
+ gnome_canvas_item_ungrab(gobj(), etime);
+}
+
+void Item::w2i(double& x, double& y)
+{
+ gnome_canvas_item_w2i(gobj(), &(x), &(y));
+}
+
+void Item::i2w(double& x, double& y)
+{
+ gnome_canvas_item_i2w(gobj(), &(x), &(y));
+}
+
+void Item::grab_focus()
+{
+ gnome_canvas_item_grab_focus(gobj());
+}
+
+void Item::get_bounds(double& x1, double& y1, double& x2, double& y2) const
+{
+ gnome_canvas_item_get_bounds(const_cast<GnomeCanvasItem*>(gobj()), &(x1), &(y1), &(x2), &(y2));
+}
+
+void Item::show()
+{
+ gnome_canvas_item_show(gobj());
+}
+
+void Item::hide()
+{
+ gnome_canvas_item_hide(gobj());
+}
+
+void Item::reparent(Group& new_group)
+{
+ gnome_canvas_item_reparent(gobj(), (new_group).gobj());
+}
+
+Canvas* Item::get_canvas() const
+{
+ return Glib::wrap(gobj()->canvas);
+}
+
+void Item::request_update()
+{
+ gnome_canvas_item_request_update(gobj());
+}
+
+void Item::reset_bounds()
+{
+ gnome_canvas_item_reset_bounds(gobj());
+}
+
+void Item::update_svp(ArtSVP ** p_svp, ArtSVP * new_svp)
+{
+ gnome_canvas_item_update_svp(gobj(), p_svp, new_svp);
+}
+
+void Item::update_svp_clip(ArtSVP ** p_svp, ArtSVP * new_svp, ArtSVP * clip_svp)
+{
+ gnome_canvas_item_update_svp_clip(gobj(), p_svp, new_svp, clip_svp);
+}
+
+void Item::request_redraw_svp(const ArtSVP* svp)
+{
+ gnome_canvas_item_request_redraw_svp(gobj(), svp);
+}
+
+void Item::update_bbox(int x1, int y1, int x2, int y2)
+{
+ gnome_canvas_update_bbox(gobj(), x1, y1, x2, y2);
+}
+
+
+Glib::SignalProxy1< bool,GdkEvent* > Item::signal_event()
+{
+ return Glib::SignalProxy1< bool,GdkEvent* >(this, &Item_signal_event_info);
+}
+
+
+Glib::PropertyProxy<Group*> Item::property_parent()
+{
+ return Glib::PropertyProxy<Group*>(this, "parent");
+}
+
+Glib::PropertyProxy_ReadOnly<Group*> Item::property_parent() const
+{
+ return Glib::PropertyProxy_ReadOnly<Group*>(this, "parent");
+}
+
+
+bool Gnome::Canvas::Item::on_event(GdkEvent* p1)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->event)
+ return (*base->event)(gobj(),p1);
+
+ typedef bool RType;
+ return RType();
+}
+
+
+void Gnome::Canvas::Item::update_vfunc(double* affine, ArtSVP* clip_path, int flags)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->update)
+ (*base->update)(gobj(),affine,clip_path,flags);
+}
+
+void Gnome::Canvas::Item::realize_vfunc()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->realize)
+ (*base->realize)(gobj());
+}
+
+void Gnome::Canvas::Item::unrealize_vfunc()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->unrealize)
+ (*base->unrealize)(gobj());
+}
+
+void Gnome::Canvas::Item::map_vfunc()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->map)
+ (*base->map)(gobj());
+}
+
+void Gnome::Canvas::Item::unmap_vfunc()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->unmap)
+ (*base->unmap)(gobj());
+}
+
+ArtUta* Gnome::Canvas::Item::coverage_vfunc()
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->coverage)
+ return (*base->coverage)(gobj());
+
+ typedef ArtUta* RType;
+ return RType();
+}
+
+void Gnome::Canvas::Item::draw_vfunc(const Glib::RefPtr<Gdk::Drawable>& drawable, int x, int y, int width, int height)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->draw)
+ (*base->draw)(gobj(),Glib::unwrap(drawable),x,y,width,height);
+}
+
+void Gnome::Canvas::Item::render_vfunc(GnomeCanvasBuf* buf)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->render)
+ (*base->render)(gobj(),buf);
+}
+
+double Gnome::Canvas::Item::point_vfunc(double x, double y, int cx, int cy, GnomeCanvasItem** actual_item)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->point)
+ return (*base->point)(gobj(),x,y,cx,cy,actual_item);
+
+ typedef double RType;
+ return RType();
+}
+
+void Gnome::Canvas::Item::bounds_vfunc(double* x1, double* y1, double* x2, double* y2)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->bounds)
+ (*base->bounds)(gobj(),x1,y1,x2,y2);
+}
+
+
+} // namespace Canvas
+
+} // namespace Gnome
+
+
diff --git a/libs/libgnomecanvasmm/libgnomecanvasmm/item.h b/libs/libgnomecanvasmm/libgnomecanvasmm/item.h
new file mode 100644
index 0000000000..9265b2018f
--- /dev/null
+++ b/libs/libgnomecanvasmm/libgnomecanvasmm/item.h
@@ -0,0 +1,370 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _LIBGNOMECANVASMM_ITEM_H
+#define _LIBGNOMECANVASMM_ITEM_H
+
+#include <glibmm.h>
+
+// -*- C++ -*-
+/* $Id$ */
+
+/* item.h
+ *
+ * Copyright (C) 1998 EMC Capital Management Inc.
+ * Developed by Havoc Pennington <hp@pobox.com>
+ *
+ * Copyright (C) 1999 The Gtk-- Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/object.h>
+#include <gdkmm/cursor.h>
+#include <libgnomecanvas/gnome-canvas.h>
+
+#include <libgnomecanvasmm/point.h>
+#include <libgnomecanvasmm/affinetrans.h>
+#include <libgnomecanvasmm/properties.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GnomeCanvasItem GnomeCanvasItem;
+typedef struct _GnomeCanvasItemClass GnomeCanvasItemClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gnome
+{
+
+namespace Canvas
+{ class Item_Class; } // namespace Canvas
+
+} // namespace Gnome
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+class Canvas;
+class Group;
+
+
+class Item : public Gtk::Object
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Item CppObjectType;
+ typedef Item_Class CppClassType;
+ typedef GnomeCanvasItem BaseObjectType;
+ typedef GnomeCanvasItemClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~Item();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class Item_Class;
+ static CppClassType item_class_;
+
+ // noncopyable
+ Item(const Item&);
+ Item& operator=(const Item&);
+
+protected:
+ explicit Item(const Glib::ConstructParams& construct_params);
+ explicit Item(GnomeCanvasItem* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GnomeCanvasItem* gobj() { return reinterpret_cast<GnomeCanvasItem*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GnomeCanvasItem* gobj() const { return reinterpret_cast<GnomeCanvasItem*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual bool on_event(GdkEvent* p1);
+
+
+private:
+
+
+public:
+
+ //: Move an item by the specified amount
+
+ /** Moves a canvas item by creating an affine transformation matrix for
+ * translation by using the specified values. This happens in item
+ * local coordinate system, so if you have nontrivial transform, it
+ * most probably does not do, what you want.
+ * @param dx Horizontal offset.
+ * @param dy Vertical offset.
+ */
+ void move(double dx, double dy);
+
+ //: Raise an item in the z-order of its parent group by the specified
+ //: number of positions. If the number is zero, then the item will
+ //: be made the topmost of its parent group.
+
+ /** Raises the item in its parent's stack by the specified number of positions.
+ * If the number of positions is greater than the distance to the top of the
+ * stack, then the item is put at the top.
+ * @param positions Number of steps to raise the item.
+ */
+ void raise(int positions);
+
+ //: Lower an item in the z-order of its parent group by the specified
+ //: number of positions. If the number is zero, then the item will be
+ //: made the bottommost of its parent group. */
+
+ /** Lowers the item in its parent's stack by the specified number of positions.
+ * If the number of positions is greater than the distance to the bottom of the
+ * stack, then the item is put at the bottom.
+ * @param positions Number of steps to lower the item.
+ */
+ void lower(int positions);
+
+ //: Raise an item to the top of its parent group's z-order.
+
+ /** Raises an item to the top of its parent's stack.
+ */
+ void raise_to_top();
+
+ //: Lower an item to the bottom of its parent group's z-order
+
+ /** Lowers an item to the bottom of its parent's stack.
+ */
+ void lower_to_bottom();
+
+ //: Grab the mouse for the specified item. Only the events in
+ //: event_mask will be reported. If cursor is non-NULL, it will be
+ //: used during the duration of the grab. Time is a proper X event
+ //: time parameter. Returns the same values as XGrabPointer().
+ int grab(unsigned int event_mask, const Gdk::Cursor& cursor, guint32 etime);
+ int grab(unsigned int event_mask, guint32 etime);
+
+
+ //: Ungrabs the mouse -- the specified item must be the same that was
+ //: passed to gnome_canvas_item_grab(). Time is a proper X event
+ //: time parameter.
+
+ /** Ungrabs the item, which must have been grabbed in the canvas, and ungrabs the
+ * mouse.
+ * @param etime The timestamp for ungrabbing the mouse.
+ */
+ void ungrab(guint32 etime);
+
+ //: These functions convert from a coordinate system to another. "w"
+ //: is world coordinates and "i" is item coordinates.
+
+ /** Converts a coordinate pair from world coordinates to item-relative
+ * coordinates.
+ * @param x X coordinate to convert (input/output value).
+ * @param y Y coordinate to convert (input/output value).
+ */
+ void w2i(double& x, double& y);
+
+ /** Converts a coordinate pair from item-relative coordinates to world
+ * coordinates.
+ * @param x X coordinate to convert (input/output value).
+ * @param y Y coordinate to convert (input/output value).
+ */
+ void i2w(double& x, double& y);
+
+ //: Used to send all of the keystroke events to a specific item as well
+ //: as GDK_FOCUS_CHANGE events.
+
+ /** Makes the specified item take the keyboard focus, so all keyboard events will
+ * be sent to it. If the canvas widget itself did not have the focus, it grabs
+ * it as well.
+ */
+ void grab_focus();
+
+ //: Fetch the bounding box of the item. The bounding box may not be
+ //: exactly tight, but the canvas items will do the best they can.
+
+ /** Queries the bounding box of a canvas item. The bounds are returned in the
+ * coordinate system of the item's parent.
+ * @param x1 Leftmost edge of the bounding box (return value).
+ * @param y1 Upper edge of the bounding box (return value).
+ * @param x2 Rightmost edge of the bounding box (return value).
+ * @param y2 Lower edge of the bounding box (return value).
+ */
+ void get_bounds(double& x1, double& y1, double& x2, double& y2) const;
+
+ //: Make the item visible
+
+ /** Shows a canvas item. If the item was already shown, then no action is taken.
+ */
+ void show();
+
+ //: Hide the item
+
+ /** Hides a canvas item. If the item was already hidden, then no action is
+ * taken.
+ */
+ void hide();
+
+ //: Apply a relative affine transformation to the item
+ void affine_relative(const Art::AffineTrans &affine);
+
+
+ //: Apply an absolute affine transformation to the item
+ void affine_absolute(const Art::AffineTrans &affine);
+
+
+ //: Gets the affine transform that converts from item-relative
+ //: coordinates to world coordinates
+ Art::AffineTrans get_i2w_affine() const;
+
+
+ //: Gets the affine transform that converts from item-relative
+ //: coordinates to canvas pixel coordinates
+ Art::AffineTrans get_i2c_affine() const;
+
+
+ /** Changes the parent of the specified item to be the new group. The item keeps
+ * its group-relative coordinates as for its old parent, so the item may change
+ * its absolute position within the canvas.
+ * @param new_group A canvas group.
+ */
+ void reparent(Group& new_group);
+
+ /// Returns the canvas we're on.
+ Canvas* get_canvas() const;
+
+ virtual void update_vfunc(double* affine, ArtSVP* clip_path, int flags);
+ virtual void realize_vfunc();
+ virtual void unrealize_vfunc();
+ virtual void map_vfunc();
+ virtual void unmap_vfunc();
+ virtual ArtUta* coverage_vfunc();
+ virtual void draw_vfunc(const Glib::RefPtr<Gdk::Drawable>& drawable, int x, int y, int width, int height);
+ virtual void render_vfunc(GnomeCanvasBuf* buf);
+ virtual double point_vfunc(double x, double y, int cx, int cy, GnomeCanvasItem** actual_item);
+ virtual void bounds_vfunc(double* x1, double* y1, double* x2, double* y2);
+
+ //: Signal: an event ocurred for an item of this type. The(x, y)
+ //: coordinates are in the canvas world coordinate system.
+
+
+ Glib::SignalProxy1< bool,GdkEvent* > signal_event();
+
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Group*> property_parent() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Group*> property_parent() const;
+
+
+protected:
+
+ //- For class children use only
+ void item_construct(Group& group);
+
+ //- Unsafe version - can't use a _gtk_string here, C++ doesn't like
+ //- classes being passed before ellipses('...') args
+ void item_construct(Group& group, const gchar* first_arg_name,
+ va_list ap);
+
+ //- Set arguments - For class children use only
+ void set(const gchar* first_arg_name, ...);
+
+ //: Request that the update method eventually get called. This should be used
+ //: only by item implementations.
+
+ /** To be used only by item implementations. Requests that the canvas queue an
+ * update for the specified item.
+ */
+ void request_update();
+
+
+ /** Resets the bounding box of a canvas item to an empty rectangle.
+ */
+ void reset_bounds();
+
+ /** Sets the svp to the new value, requesting repaint on what's changed. This
+ * function takes responsibility for freeing new_svp. This routine also adds the
+ * svp's bbox to the item's.
+ * @param p_svp A pointer to the existing svp.
+ * @param new_svp The new svp.
+ */
+ void update_svp(ArtSVP **p_svp, ArtSVP *new_svp);
+
+ /** Sets the svp to the new value, clipping if necessary, and requesting repaint
+ * on what's changed. This function takes responsibility for freeing new_svp.
+ * @param p_svp A pointer to the existing svp.
+ * @param new_svp The new svp.
+ * @param clip_svp A clip path, if non-null.
+ */
+ void update_svp_clip(ArtSVP **p_svp, ArtSVP *new_svp, ArtSVP *clip_svp);
+
+ /** Request redraw of the svp if in aa mode, or the entire item in in xlib mode.
+ * @param svp The svp that needs to be redrawn.
+ */
+ void request_redraw_svp(const ArtSVP* svp);
+
+ /** Sets the bbox to the new value, requesting full repaint.
+ * @param item The canvas item needing update.
+ * @param x1 Left coordinate of the new bounding box.
+ * @param y1 Top coordinate of the new bounding box.
+ * @param x2 Right coordinate of the new bounding box.
+ * @param y2 Bottom coordinate of the new bounding box.
+ */
+ void update_bbox(int x1, int y1, int x2, int y2);
+
+
+};
+
+} /* namespace Canvas */
+} /* namespace Gnome */
+
+namespace Glib
+{
+ /** @relates Gnome::Canvas::Item
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gnome::Canvas::Item* wrap(GnomeCanvasItem* object, bool take_copy = false);
+}
+#endif /* _LIBGNOMECANVASMM_ITEM_H */
+
diff --git a/libs/libgnomecanvasmm/libgnomecanvasmm/line.cc b/libs/libgnomecanvasmm/libgnomecanvasmm/line.cc
new file mode 100644
index 0000000000..5b12c69ba6
--- /dev/null
+++ b/libs/libgnomecanvasmm/libgnomecanvasmm/line.cc
@@ -0,0 +1,388 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <libgnomecanvasmm/line.h>
+#include <libgnomecanvasmm/private/line_p.h>
+
+/* $Id$ */
+
+/* line.ccg
+ *
+ * Copyright (C) 1998 EMC Capital Management Inc.
+ * Developed by Havoc Pennington <hp@pobox.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+//#include <libgnomecanvasmm/group.h>
+
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+Points::Points(size_type nbpoints)
+: std::vector<Art::Point>(nbpoints), points_(0), owned_(false)
+{}
+
+Points::Points(GnomeCanvasPoints *castitem)
+: points_(castitem),owned_(false)
+{
+ reserve(points_->num_points);
+
+ //GnomeCanvasPoints has an array of doubles, used 2 at a time:
+ int i = 0;
+ for(iterator it = begin(); i < points_->num_points; i += 2, ++it)
+ {
+ (*it).set_x(points_->coords[i]);
+ (*it).set_y(points_->coords[i+1]);
+ }
+}
+
+Points::~Points()
+{
+ if (owned_ && points_)
+ gnome_canvas_points_free(points_);
+}
+
+Points::operator bool() const
+{
+ return (!is_null());
+}
+
+bool Points::is_null() const
+{
+ return size() == 0;
+}
+
+GnomeCanvasPoints* Points::_gobj() const
+{
+ int i = 0;
+
+ if(!points_)
+ {
+ points_ = gnome_canvas_points_new(size());
+ owned_ = true;
+ }
+ else if(size() != static_cast<unsigned int>(points_->num_points))
+ {
+ if (owned_)
+ gnome_canvas_points_free(points_);
+
+ points_ = gnome_canvas_points_new(size());
+ owned_ = true;
+ }
+
+ for(const_iterator it = begin(); it != end(); ++it, i+=2)
+ {
+ points_->coords[i] = (*it).get_x();
+ points_->coords[i+1] = (*it).get_y();
+ }
+
+ return points_;
+}
+
+
+Line::Line(Group& parentx)
+ : Item(GNOME_CANVAS_ITEM(g_object_new(get_type(),0)))
+{
+ item_construct(parentx);
+}
+
+Line::Line(Group& parentx, const Points& points)
+ : Item(GNOME_CANVAS_ITEM(g_object_new(get_type(),0)))
+{
+ item_construct(parentx);
+ property_points().set_value(points);
+}
+
+} /* namespace Canvas */
+} /* namespace Gnome */
+
+
+// static
+GType Glib::Value<Gnome::Canvas::Points>::value_type()
+{
+ return Gnome::Canvas::Points::get_type();
+}
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gnome::Canvas::Line* wrap(GnomeCanvasLine* object, bool take_copy)
+{
+ return dynamic_cast<Gnome::Canvas::Line *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Line_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Line_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gnome_canvas_line_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Line_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* Line_Class::wrap_new(GObject* o)
+{
+ return manage(new Line((GnomeCanvasLine*)(o)));
+
+}
+
+
+/* The implementation: */
+
+Line::Line(const Glib::ConstructParams& construct_params)
+:
+ Item(construct_params)
+{
+ }
+
+Line::Line(GnomeCanvasLine* castitem)
+:
+ Item((GnomeCanvasItem*)(castitem))
+{
+ }
+
+Line::~Line()
+{
+ destroy_();
+}
+
+Line::CppClassType Line::line_class_; // initialize static member
+
+GType Line::get_type()
+{
+ return line_class_.init().get_type();
+}
+
+GType Line::get_base_type()
+{
+ return gnome_canvas_line_get_type();
+}
+
+
+Glib::PropertyProxy<Points> Line::property_points()
+{
+ return Glib::PropertyProxy<Points>(this, "points");
+}
+
+Glib::PropertyProxy_ReadOnly<Points> Line::property_points() const
+{
+ return Glib::PropertyProxy_ReadOnly<Points>(this, "points");
+}
+
+Glib::PropertyProxy<Glib::ustring> Line::property_fill_color()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "fill-color");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> Line::property_fill_color() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "fill-color");
+}
+
+Glib::PropertyProxy<Gdk::Color> Line::property_fill_color_gdk()
+{
+ return Glib::PropertyProxy<Gdk::Color>(this, "fill-color-gdk");
+}
+
+Glib::PropertyProxy_ReadOnly<Gdk::Color> Line::property_fill_color_gdk() const
+{
+ return Glib::PropertyProxy_ReadOnly<Gdk::Color>(this, "fill-color-gdk");
+}
+
+Glib::PropertyProxy<guint> Line::property_fill_color_rgba()
+{
+ return Glib::PropertyProxy<guint>(this, "fill-color-rgba");
+}
+
+Glib::PropertyProxy_ReadOnly<guint> Line::property_fill_color_rgba() const
+{
+ return Glib::PropertyProxy_ReadOnly<guint>(this, "fill-color-rgba");
+}
+
+Glib::PropertyProxy< Glib::RefPtr<Gdk::Bitmap> > Line::property_fill_stipple()
+{
+ return Glib::PropertyProxy< Glib::RefPtr<Gdk::Bitmap> >(this, "fill-stipple");
+}
+
+Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Bitmap> > Line::property_fill_stipple() const
+{
+ return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Bitmap> >(this, "fill-stipple");
+}
+
+Glib::PropertyProxy<guint> Line::property_width_pixels()
+{
+ return Glib::PropertyProxy<guint>(this, "width-pixels");
+}
+
+Glib::PropertyProxy_ReadOnly<guint> Line::property_width_pixels() const
+{
+ return Glib::PropertyProxy_ReadOnly<guint>(this, "width-pixels");
+}
+
+Glib::PropertyProxy<double> Line::property_width_units()
+{
+ return Glib::PropertyProxy<double>(this, "width-units");
+}
+
+Glib::PropertyProxy_ReadOnly<double> Line::property_width_units() const
+{
+ return Glib::PropertyProxy_ReadOnly<double>(this, "width-units");
+}
+
+Glib::PropertyProxy<Gdk::CapStyle> Line::property_cap_style()
+{
+ return Glib::PropertyProxy<Gdk::CapStyle>(this, "cap-style");
+}
+
+Glib::PropertyProxy_ReadOnly<Gdk::CapStyle> Line::property_cap_style() const
+{
+ return Glib::PropertyProxy_ReadOnly<Gdk::CapStyle>(this, "cap-style");
+}
+
+Glib::PropertyProxy<Gdk::JoinStyle> Line::property_join_style()
+{
+ return Glib::PropertyProxy<Gdk::JoinStyle>(this, "join-style");
+}
+
+Glib::PropertyProxy_ReadOnly<Gdk::JoinStyle> Line::property_join_style() const
+{
+ return Glib::PropertyProxy_ReadOnly<Gdk::JoinStyle>(this, "join-style");
+}
+
+Glib::PropertyProxy<Gdk::LineStyle> Line::property_line_style()
+{
+ return Glib::PropertyProxy<Gdk::LineStyle>(this, "line-style");
+}
+
+Glib::PropertyProxy_ReadOnly<Gdk::LineStyle> Line::property_line_style() const
+{
+ return Glib::PropertyProxy_ReadOnly<Gdk::LineStyle>(this, "line-style");
+}
+
+Glib::PropertyProxy<bool> Line::property_first_arrowhead()
+{
+ return Glib::PropertyProxy<bool>(this, "first-arrowhead");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Line::property_first_arrowhead() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "first-arrowhead");
+}
+
+Glib::PropertyProxy<bool> Line::property_last_arrowhead()
+{
+ return Glib::PropertyProxy<bool>(this, "last-arrowhead");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Line::property_last_arrowhead() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "last-arrowhead");
+}
+
+Glib::PropertyProxy<bool> Line::property_smooth()
+{
+ return Glib::PropertyProxy<bool>(this, "smooth");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Line::property_smooth() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "smooth");
+}
+
+Glib::PropertyProxy<guint> Line::property_spline_steps()
+{
+ return Glib::PropertyProxy<guint>(this, "spline-steps");
+}
+
+Glib::PropertyProxy_ReadOnly<guint> Line::property_spline_steps() const
+{
+ return Glib::PropertyProxy_ReadOnly<guint>(this, "spline-steps");
+}
+
+Glib::PropertyProxy<double> Line::property_arrow_shape_a()
+{
+ return Glib::PropertyProxy<double>(this, "arrow-shape-a");
+}
+
+Glib::PropertyProxy_ReadOnly<double> Line::property_arrow_shape_a() const
+{
+ return Glib::PropertyProxy_ReadOnly<double>(this, "arrow-shape-a");
+}
+
+Glib::PropertyProxy<double> Line::property_arrow_shape_b()
+{
+ return Glib::PropertyProxy<double>(this, "arrow-shape-b");
+}
+
+Glib::PropertyProxy_ReadOnly<double> Line::property_arrow_shape_b() const
+{
+ return Glib::PropertyProxy_ReadOnly<double>(this, "arrow-shape-b");
+}
+
+Glib::PropertyProxy<double> Line::property_arrow_shape_c()
+{
+ return Glib::PropertyProxy<double>(this, "arrow-shape-c");
+}
+
+Glib::PropertyProxy_ReadOnly<double> Line::property_arrow_shape_c() const
+{
+ return Glib::PropertyProxy_ReadOnly<double>(this, "arrow-shape-c");
+}
+
+
+} // namespace Canvas
+
+} // namespace Gnome
+
+
diff --git a/libs/libgnomecanvasmm/libgnomecanvasmm/line.h b/libs/libgnomecanvasmm/libgnomecanvasmm/line.h
new file mode 100644
index 0000000000..ab792c8abd
--- /dev/null
+++ b/libs/libgnomecanvasmm/libgnomecanvasmm/line.h
@@ -0,0 +1,461 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _LIBGNOMECANVASMM_LINE_H
+#define _LIBGNOMECANVASMM_LINE_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* line.h
+ *
+ * Copyright (C) 1998 EMC Capital Management Inc.
+ * Developed by Havoc Pennington <hp@pobox.com>
+ *
+ * Copyright (C) 1999 The Gtk-- Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <libgnomecanvasmm/item.h>
+#include <libgnomecanvas/gnome-canvas-line.h>
+#include <libgnomecanvas/gnome-canvas-util.h>
+#include <libgnomecanvas/libgnomecanvas.h>
+#include <vector>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GnomeCanvasLine GnomeCanvasLine;
+typedef struct _GnomeCanvasLineClass GnomeCanvasLineClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gnome
+{
+
+namespace Canvas
+{ class Line_Class; } // namespace Canvas
+
+} // namespace Gnome
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+class GnomeGroup;
+
+// Sample use of Gnome_CanvasPoints :
+
+// Gnome_CanvasPoints points;
+//
+// points.push_back(Art::Point(0, 0));
+// points.push_back(Art::Point(100,0));
+// points.push_back(Art::Point(0,100));
+// points.push_back(Art::Point(100,100));
+//
+// line = new Gnome_CanvasLine(&m_canvasgroup,points);
+
+//using std::vector;
+
+/** Wrapper for GnomeCanvasPoints.
+ * GnomeCanvasPoints is actually a BoxedType,
+ * but this acts in a similar way, with the advantage of acting like a std::vector.
+ */
+class Points : public std::vector<Art::Point>
+{
+public:
+ Points(size_type nbpoints = 0);
+ explicit Points(GnomeCanvasPoints* castitem);
+ ~Points();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef GnomeCanvasPoints BaseObjectType; //So that this works with tempaltes that are intended for normal BoxedTypes.
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ operator bool() const;
+ bool is_null() const;
+
+ const GnomeCanvasPoints* gobj() const { return _gobj(); }
+ GnomeCanvasPoints* gobj() { return _gobj(); }
+ static GType get_type () { return GNOME_TYPE_CANVAS_POINTS; }
+
+protected:
+ GnomeCanvasPoints* _gobj() const;
+ mutable GnomeCanvasPoints* points_;
+ mutable bool owned_;
+};
+
+
+class Line : public Item
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Line CppObjectType;
+ typedef Line_Class CppClassType;
+ typedef GnomeCanvasLine BaseObjectType;
+ typedef GnomeCanvasLineClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~Line();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class Line_Class;
+ static CppClassType line_class_;
+
+ // noncopyable
+ Line(const Line&);
+ Line& operator=(const Line&);
+
+protected:
+ explicit Line(const Glib::ConstructParams& construct_params);
+ explicit Line(GnomeCanvasLine* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GnomeCanvasLine* gobj() { return reinterpret_cast<GnomeCanvasLine*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GnomeCanvasLine* gobj() const { return reinterpret_cast<GnomeCanvasLine*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+public:
+ explicit Line(Group& parent);
+ Line(Group& parent, const Points& points);
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Points> property_points() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Points> property_points() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_fill_color() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_fill_color() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Gdk::Color> property_fill_color_gdk() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Gdk::Color> property_fill_color_gdk() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<guint> property_fill_color_rgba() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<guint> property_fill_color_rgba() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy< Glib::RefPtr<Gdk::Bitmap> > property_fill_stipple() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Bitmap> > property_fill_stipple() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<guint> property_width_pixels() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<guint> property_width_pixels() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<double> property_width_units() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<double> property_width_units() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Gdk::CapStyle> property_cap_style() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Gdk::CapStyle> property_cap_style() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Gdk::JoinStyle> property_join_style() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Gdk::JoinStyle> property_join_style() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Gdk::LineStyle> property_line_style() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Gdk::LineStyle> property_line_style() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_first_arrowhead() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_first_arrowhead() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_last_arrowhead() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_last_arrowhead() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_smooth() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_smooth() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<guint> property_spline_steps() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<guint> property_spline_steps() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<double> property_arrow_shape_a() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<double> property_arrow_shape_a() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<double> property_arrow_shape_b() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<double> property_arrow_shape_b() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<double> property_arrow_shape_c() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<double> property_arrow_shape_c() const;
+
+
+};
+
+} /* namespace Canvas */
+} /* namespace Gnome */
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+namespace Glib
+{
+
+template <>
+class Value<Gnome::Canvas::Points> : public Value_Boxed<Gnome::Canvas::Points>
+{
+public:
+ static GType value_type() G_GNUC_CONST;
+};
+
+} // namespace Glib
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+namespace Glib
+{
+ /** @relates Gnome::Canvas::Line
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gnome::Canvas::Line* wrap(GnomeCanvasLine* object, bool take_copy = false);
+}
+#endif /* _LIBGNOMECANVASMM_LINE_H */
+
diff --git a/libs/libgnomecanvasmm/libgnomecanvasmm/path-def.cc b/libs/libgnomecanvasmm/libgnomecanvasmm/path-def.cc
new file mode 100644
index 0000000000..528c3f8153
--- /dev/null
+++ b/libs/libgnomecanvasmm/libgnomecanvasmm/path-def.cc
@@ -0,0 +1,249 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <libgnomecanvasmm/path-def.h>
+#include <libgnomecanvasmm/private/path-def_p.h>
+
+/* path-def.cc
+ *
+ * Copyright (C) 2002 The libgnomecanvasmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+namespace Gnome
+{
+
+namespace Canvas
+{
+Gnome::Art::Point PathDef::currentpoint() const
+{
+ Gnome::Art::Point point;
+ gnome_canvas_path_def_currentpoint(gobj(), point.gobj());
+ return point;
+}
+
+
+} /* namespace Canvas */
+
+} /* namespace Gnome */
+
+namespace
+{
+} // anonymous namespace
+
+
+/* Why reinterpret_cast<PathDef*>(gobject) is needed:
+ *
+ * A PathDef instance is in fact always a GnomeCanvasPathDef instance.
+ * Unfortunately, GnomeCanvasPathDef cannot be a member of PathDef,
+ * because it is an opaque struct. Also, the C interface does not provide
+ * any hooks to install a destroy notification handler, thus we cannot
+ * wrap it dynamically either.
+ *
+ * The cast works because PathDef does not have any member data, and
+ * it is impossible to derive from it. This is ensured by not implementing
+ * the (protected) default constructor. The ctor is protected rather than
+ * private just to avoid a compile warning.
+ */
+
+namespace Glib
+{
+
+Glib::RefPtr<Gnome::Canvas::PathDef> wrap(GnomeCanvasPathDef* object, bool take_copy)
+{
+ if(take_copy && object)
+ gnome_canvas_path_def_duplicate(object);
+
+ // See the comment at the top of this file, if you want to know why the cast works.
+ return Glib::RefPtr<Gnome::Canvas::PathDef>(reinterpret_cast<Gnome::Canvas::PathDef*>(object));
+}
+
+} // namespace Glib
+
+
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+
+// static
+Glib::RefPtr<PathDef> PathDef::create()
+{
+ // See the comment at the top of this file, if you want to know why the cast works.
+ return Glib::RefPtr<PathDef>(reinterpret_cast<PathDef*>(gnome_canvas_path_def_new()));
+}
+
+void PathDef::reference() const
+{
+ // See the comment at the top of this file, if you want to know why the cast works.
+ gnome_canvas_path_def_duplicate(reinterpret_cast<GnomeCanvasPathDef*>(const_cast<PathDef*>(this)));
+}
+
+void PathDef::unreference() const
+{
+ // See the comment at the top of this file, if you want to know why the cast works.
+ gnome_canvas_path_def_unref(reinterpret_cast<GnomeCanvasPathDef*>(const_cast<PathDef*>(this)));
+}
+
+GnomeCanvasPathDef* PathDef::gobj()
+{
+ // See the comment at the top of this file, if you want to know why the cast works.
+ return reinterpret_cast<GnomeCanvasPathDef*>(this);
+}
+
+const GnomeCanvasPathDef* PathDef::gobj() const
+{
+ // See the comment at the top of this file, if you want to know why the cast works.
+ return reinterpret_cast<const GnomeCanvasPathDef*>(this);
+}
+
+GnomeCanvasPathDef* PathDef::gobj_copy() const
+{
+ // See the comment at the top of this file, if you want to know why the cast works.
+ GnomeCanvasPathDef *const gobject = reinterpret_cast<GnomeCanvasPathDef*>(const_cast<PathDef*>(this));
+ gnome_canvas_path_def_duplicate(gobject);
+ return gobject;
+}
+
+
+Glib::RefPtr<PathDef> PathDef::create(int length)
+{
+ return Glib::wrap(gnome_canvas_path_def_new_sized(length));
+}
+
+Glib::RefPtr<PathDef> PathDef::create(ArtBpath& bpath)
+{
+ return Glib::wrap(gnome_canvas_path_def_new_from_bpath(&(bpath)));
+}
+
+Glib::RefPtr<PathDef> PathDef::open_parts()
+{
+ return Glib::wrap(gnome_canvas_path_def_open_parts(gobj()));
+}
+
+Glib::RefPtr<PathDef> PathDef::closed_parts()
+{
+ return Glib::wrap(gnome_canvas_path_def_closed_parts(gobj()));
+}
+
+Glib::RefPtr<PathDef> PathDef::close_all()
+{
+ return Glib::wrap(gnome_canvas_path_def_close_all(gobj()));
+}
+
+void PathDef::finish()
+{
+ gnome_canvas_path_def_finish(gobj());
+}
+
+void PathDef::ensure_space(int space)
+{
+ gnome_canvas_path_def_ensure_space(gobj(), space);
+}
+
+void PathDef::reset()
+{
+ gnome_canvas_path_def_reset(gobj());
+}
+
+void PathDef::moveto(double x, double y)
+{
+ gnome_canvas_path_def_moveto(gobj(), x, y);
+}
+
+void PathDef::lineto(double x, double y)
+{
+ gnome_canvas_path_def_lineto(gobj(), x, y);
+}
+
+void PathDef::lineto_moving(double x, double y)
+{
+ gnome_canvas_path_def_lineto_moving(gobj(), x, y);
+}
+
+void PathDef::curveto(double x1, double y1, double x2, double y2, double x3, double y3)
+{
+ gnome_canvas_path_def_curveto(gobj(), x1, y1, x2, y2, x3, y3);
+}
+
+void PathDef::closepath()
+{
+ gnome_canvas_path_def_closepath(gobj());
+}
+
+void PathDef::closepath_current()
+{
+ gnome_canvas_path_def_closepath_current(gobj());
+}
+
+ArtBpath* PathDef::get_bpath() const
+{
+ return gnome_canvas_path_def_bpath(const_cast<GnomeCanvasPathDef*>(gobj()));
+}
+
+ArtBpath* PathDef::first_bpath() const
+{
+ return gnome_canvas_path_def_first_bpath(const_cast<GnomeCanvasPathDef*>(gobj()));
+}
+
+ArtBpath* PathDef::last_bpath() const
+{
+ return gnome_canvas_path_def_last_bpath(const_cast<GnomeCanvasPathDef*>(gobj()));
+}
+
+bool PathDef::is_empty() const
+{
+ return gnome_canvas_path_def_is_empty(const_cast<GnomeCanvasPathDef*>(gobj()));
+}
+
+int PathDef::length() const
+{
+ return gnome_canvas_path_def_length(const_cast<GnomeCanvasPathDef*>(gobj()));
+}
+
+bool PathDef::has_currentpoint() const
+{
+ return gnome_canvas_path_def_has_currentpoint(const_cast<GnomeCanvasPathDef*>(gobj()));
+}
+
+bool PathDef::any_open() const
+{
+ return gnome_canvas_path_def_any_open(const_cast<GnomeCanvasPathDef*>(gobj()));
+}
+
+bool PathDef::all_open() const
+{
+ return gnome_canvas_path_def_all_open(const_cast<GnomeCanvasPathDef*>(gobj()));
+}
+
+bool PathDef::any_closed() const
+{
+ return gnome_canvas_path_def_any_closed(const_cast<GnomeCanvasPathDef*>(gobj()));
+}
+
+bool PathDef::all_closed() const
+{
+ return gnome_canvas_path_def_all_closed(const_cast<GnomeCanvasPathDef*>(gobj()));
+}
+
+
+} // namespace Canvas
+
+} // namespace Gnome
+
+
diff --git a/libs/libgnomecanvasmm/libgnomecanvasmm/path-def.h b/libs/libgnomecanvasmm/libgnomecanvasmm/path-def.h
new file mode 100644
index 0000000000..4f528f5806
--- /dev/null
+++ b/libs/libgnomecanvasmm/libgnomecanvasmm/path-def.h
@@ -0,0 +1,284 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _LIBGNOMECANVASMM_PATH_DEF_H
+#define _LIBGNOMECANVASMM_PATH_DEF_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* path-def.h
+ *
+ *
+ * Copyright (C) 2002 The libgnomecanvasmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <libgnomecanvasmm/point.h>
+#include <glibmm/containers.h>
+#include <libgnomecanvas/gnome-canvas-path-def.h>
+#include <libart_lgpl/art_bpath.h>
+#include <libart_lgpl/art_point.h>
+#include <libart_lgpl/art_bpath.h>
+
+
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+class PathDef
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef PathDef CppObjectType;
+ typedef GnomeCanvasPathDef BaseObjectType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ static Glib::RefPtr<PathDef> create();
+
+ // For use with Glib::RefPtr<> only.
+ void reference() const;
+ void unreference() const;
+
+ ///Provides access to the underlying C instance.
+ GnomeCanvasPathDef* gobj();
+
+ ///Provides access to the underlying C instance.
+ const GnomeCanvasPathDef* gobj() const;
+
+ ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
+ GnomeCanvasPathDef* gobj_copy() const;
+
+protected:
+ // Do not derive this. Gnome::Canvas::PathDef can neither be constructed nor deleted.
+ PathDef();
+ void operator delete(void*, size_t);
+
+private:
+ // noncopyable
+ PathDef(const PathDef&);
+ PathDef& operator=(const PathDef&);
+
+
+public:
+ //gtkmmproc error: gnome_canvas_path_def_new : method defs lookup failed (1)
+
+ /** This funtion creates a new #gnome_canvas_path_def with @a length
+ * number of points allocated. It is useful, if you know the exact
+ * number of points in path, so you can avoid automatic point
+ * array reallocation.
+ * @param length Number of points to allocate for the path.
+ * @return The new canvas path definition.
+ */
+ static Glib::RefPtr<PathDef> create(int length);
+
+ /** This function constructs a new #gnome_canvas_path_def and uses the
+ * passed @a bpath as the contents. The passed bpath should not be
+ * static as the path definition is editable when constructed with
+ * this function. Also, passed bpath will be freed with art_free, if
+ * path is destroyed, so use it with caution.
+ * For constructing a #gnome_canvas_path_def
+ * from (non-modifiable) bpath use
+ * #gnome_canvas_path_def_new_from_static_bpath.
+ * @param bpath Libart bezier path.
+ * @return The new canvas path definition that is populated with the
+ * passed bezier path, if the @a bpath is bad <tt>0</tt> is returned.
+ */
+ static Glib::RefPtr<PathDef> create(ArtBpath& bpath);
+
+ //GnomeCanvasPathDef * gnome_canvas_path_def_new_from_static_bpath (ArtBpath * bpath);
+ //GnomeCanvasPathDef * gnome_canvas_path_def_new_from_foreign_bpath (ArtBpath * bpath);
+
+ //GnomeCanvasPathDef * gnome_canvas_path_def_concat (const GSList * list);
+ //GSList * gnome_canvas_path_def_split (const GnomeCanvasPathDef * path);
+
+ /** This function creates a new GnomeCanvasPathDef that contains all of
+ * the open segments on the passed @a path .
+ * @return A new GnomeCanvasPathDef that contains all of the open segemtns in @a path .
+ */
+ Glib::RefPtr<PathDef> open_parts();
+
+ /** This function returns a new GnomeCanvasPathDef that contains the
+ * all of close parts of passed @a path .
+ * @return A new GnomeCanvasPathDef that contains all of the closed
+ * parts of passed @a path .
+ */
+ Glib::RefPtr<PathDef> closed_parts();
+
+ /** This function closes all of the open segments in the passed path
+ * and returns a new GnomeCanvasPathDef.
+ * @return A GnomeCanvasPathDef that contains the contents of @a path
+ * but has modified the path is fully closed.
+ */
+ Glib::RefPtr<PathDef> close_all();
+
+
+ /** Trims dynamic point array to exact length of path.
+ */
+ void finish();
+
+ /** This function ensures that enough space for @a space points is
+ * allocated at the end of the path.
+ * @param space Number of points to guarantee are allocated at the end of
+ * the path.
+ */
+ void ensure_space(int space);
+
+
+ /** This function clears the contents of the passed @a path .
+ */
+ void reset();
+
+
+ /** This function adds starts new subpath on @a path , and sets its
+ * starting point to @a x and @a y . If current subpath is empty, it
+ * simply changes its starting coordinates to new values.
+ * @param x X coordinate.
+ * @param y Y coordinate.
+ */
+ void moveto(double x, double y);
+
+ /** This function add a line segment to the passed @a path with the
+ * specified @a x and @a y coordinates.
+ * @param x X coordinate.
+ * @param y Y coordinate.
+ */
+ void lineto(double x, double y);
+
+
+ /** This functions adds a new line segment with loose endpoint to the path, or
+ * if endpoint is already loose, changes its coordinates to @a x , @a y . You
+ * can change the coordinates of loose endpoint as many times as you want,
+ * the last ones set will be fixed, if you continue line. This is useful
+ * for handling drawing with mouse.
+ * @param x X coordinate.
+ * @param y Y coordinate.
+ */
+ void lineto_moving(double x, double y);
+
+ /** This function adds a bezier curve segment to the path definition.
+ * @param x0 First control point x coordinate.
+ * @param y0 First control point y coordinate.
+ * @param x1 Second control point x coordinate.
+ * @param y1 Second control point y coordinate.
+ * @param x2 End of curve x coordinate.
+ * @param y2 End of curve y coordinate.
+ */
+ void curveto(double x1, double y1, double x2, double y2, double x3, double y3);
+
+ /** This function closes the last subpath of @a path , adding a ART_LINETO to
+ * subpath starting point, if needed and changing starting pathcode to
+ * ART_MOVETO
+ */
+ void closepath();
+
+
+ /** This function closes the last subpath by setting the coordinates of
+ * the endpoint of the last segment (line or curve) to starting point.
+ */
+ void closepath_current();
+
+ Gnome::Art::Point currentpoint() const;
+
+
+ /** This function returns a ArtBpath that consists of the path
+ * definition.
+ * @return ArtBpath.
+ */
+ ArtBpath* get_bpath() const;
+
+ /** This function returns the first ArtBpath point in the definition.
+ * @return ArtBpath being the first point in the path definition or
+ * null if no points are defined.
+ */
+ ArtBpath* first_bpath() const;
+
+ /** This function returns pointer to the last ArtBpath segment in the path
+ * definition.
+ * @return ArtBpath, being the last segment in the path definition or
+ * null if no line segments have been defined.
+ */
+ ArtBpath* last_bpath() const;
+
+
+ /** This function is a boolean test to see if the path is empty,
+ * meaning containing no line segments.
+ * @return Boolean, indicating if the path is empty.
+ */
+ bool is_empty() const;
+
+ /** This function returns the length of the path definition. Not
+ * Euclidian length of the path but rather the number of points on the
+ * path.
+ * @return Integer, number of points on the path.
+ */
+ int length() const;
+
+ /** This function is a boolean test checking to see if the path has a
+ * current point defined. Current point will be set by line operators,
+ * and cleared by closing subpath.
+ * @return Boolean, indicating if the path has a current point defined.
+ */
+ bool has_currentpoint() const;
+
+ /** This function returns a boolean value indicating if the path has
+ * any open segments.
+ * @return Boolean, indicating if the path has any open segments.
+ */
+ bool any_open() const;
+
+ /** This function returns a boolean value indicating if the path only
+ * contains open segments.
+ * @return Boolean, indicating if the path has all open segments.
+ */
+ bool all_open() const;
+
+ /** This function returns a boolean valid indicating if the path has
+ * any closed segements.
+ * @return Boolean, indicating if the path has any closed segments.
+ */
+ bool any_closed() const;
+
+ /** This function returns a boolean value indicating if the path only
+ * contains closed segments.
+ * @return Boolean, indicating if the path has all closed segments.
+ */
+ bool all_closed() const;
+
+
+};
+
+} /* namespace Canvas */
+
+} /* namespace Gnome */
+
+
+namespace Glib
+{
+
+ /** @relates Gnome::Canvas::PathDef
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Glib::RefPtr<Gnome::Canvas::PathDef> wrap(GnomeCanvasPathDef* object, bool take_copy = false);
+
+} // namespace Glib
+
+#endif /* _LIBGNOMECANVASMM_PATH_DEF_H */
+
diff --git a/libs/libgnomecanvasmm/libgnomecanvasmm/pixbuf.cc b/libs/libgnomecanvasmm/libgnomecanvasmm/pixbuf.cc
new file mode 100644
index 0000000000..c0b49a70dc
--- /dev/null
+++ b/libs/libgnomecanvasmm/libgnomecanvasmm/pixbuf.cc
@@ -0,0 +1,277 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <libgnomecanvasmm/pixbuf.h>
+#include <libgnomecanvasmm/private/pixbuf_p.h>
+
+/* $Id$ */
+
+/* pixbuf.cc
+ *
+ * Copyright (C) 2002 The libgnomecanvasmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+Pixbuf::Pixbuf (Group& parent,
+ double x, double y,
+ const Glib::RefPtr<Gdk::Pixbuf>& image)
+ : Item (GNOME_CANVAS_ITEM (g_object_new (get_type (), NULL)))
+{
+ item_construct (parent);
+ set ("x", x,
+ "y", y,
+ "pixbuf", image->gobj (),
+ "width", (double) gdk_pixbuf_get_width (image->gobj ()),
+ "height", (double) gdk_pixbuf_get_height (image->gobj ()),
+ NULL);
+}
+
+
+Pixbuf::Pixbuf (Group& parent)
+ : Item (GNOME_CANVAS_ITEM (g_object_new (get_type (), NULL)))
+{
+ item_construct (parent);
+}
+
+
+}
+
+}
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gnome::Canvas::Pixbuf* wrap(GnomeCanvasPixbuf* object, bool take_copy)
+{
+ return dynamic_cast<Gnome::Canvas::Pixbuf *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Pixbuf_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Pixbuf_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gnome_canvas_pixbuf_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Pixbuf_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* Pixbuf_Class::wrap_new(GObject* o)
+{
+ return manage(new Pixbuf((GnomeCanvasPixbuf*)(o)));
+
+}
+
+
+/* The implementation: */
+
+Pixbuf::Pixbuf(const Glib::ConstructParams& construct_params)
+:
+ Item(construct_params)
+{
+ }
+
+Pixbuf::Pixbuf(GnomeCanvasPixbuf* castitem)
+:
+ Item((GnomeCanvasItem*)(castitem))
+{
+ }
+
+Pixbuf::~Pixbuf()
+{
+ destroy_();
+}
+
+Pixbuf::CppClassType Pixbuf::pixbuf_class_; // initialize static member
+
+GType Pixbuf::get_type()
+{
+ return pixbuf_class_.init().get_type();
+}
+
+GType Pixbuf::get_base_type()
+{
+ return gnome_canvas_pixbuf_get_type();
+}
+
+
+Glib::PropertyProxy< Glib::RefPtr<Gdk::Pixbuf> > Pixbuf::property_pixbuf()
+{
+ return Glib::PropertyProxy< Glib::RefPtr<Gdk::Pixbuf> >(this, "pixbuf");
+}
+
+Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Pixbuf> > Pixbuf::property_pixbuf() const
+{
+ return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Pixbuf> >(this, "pixbuf");
+}
+
+Glib::PropertyProxy<double> Pixbuf::property_width()
+{
+ return Glib::PropertyProxy<double>(this, "width");
+}
+
+Glib::PropertyProxy_ReadOnly<double> Pixbuf::property_width() const
+{
+ return Glib::PropertyProxy_ReadOnly<double>(this, "width");
+}
+
+Glib::PropertyProxy<bool> Pixbuf::property_width_set()
+{
+ return Glib::PropertyProxy<bool>(this, "width-set");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Pixbuf::property_width_set() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "width-set");
+}
+
+Glib::PropertyProxy<bool> Pixbuf::property_width_in_pixels()
+{
+ return Glib::PropertyProxy<bool>(this, "width-in-pixels");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Pixbuf::property_width_in_pixels() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "width-in-pixels");
+}
+
+Glib::PropertyProxy<double> Pixbuf::property_height()
+{
+ return Glib::PropertyProxy<double>(this, "height");
+}
+
+Glib::PropertyProxy_ReadOnly<double> Pixbuf::property_height() const
+{
+ return Glib::PropertyProxy_ReadOnly<double>(this, "height");
+}
+
+Glib::PropertyProxy<bool> Pixbuf::property_height_set()
+{
+ return Glib::PropertyProxy<bool>(this, "height-set");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Pixbuf::property_height_set() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "height-set");
+}
+
+Glib::PropertyProxy<bool> Pixbuf::property_height_in_pixels()
+{
+ return Glib::PropertyProxy<bool>(this, "height-in-pixels");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Pixbuf::property_height_in_pixels() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "height-in-pixels");
+}
+
+Glib::PropertyProxy<double> Pixbuf::property_x()
+{
+ return Glib::PropertyProxy<double>(this, "x");
+}
+
+Glib::PropertyProxy_ReadOnly<double> Pixbuf::property_x() const
+{
+ return Glib::PropertyProxy_ReadOnly<double>(this, "x");
+}
+
+Glib::PropertyProxy<bool> Pixbuf::property_x_in_pixels()
+{
+ return Glib::PropertyProxy<bool>(this, "x-in-pixels");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Pixbuf::property_x_in_pixels() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "x-in-pixels");
+}
+
+Glib::PropertyProxy<double> Pixbuf::property_y()
+{
+ return Glib::PropertyProxy<double>(this, "y");
+}
+
+Glib::PropertyProxy_ReadOnly<double> Pixbuf::property_y() const
+{
+ return Glib::PropertyProxy_ReadOnly<double>(this, "y");
+}
+
+Glib::PropertyProxy<bool> Pixbuf::property_y_in_pixels()
+{
+ return Glib::PropertyProxy<bool>(this, "y-in-pixels");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Pixbuf::property_y_in_pixels() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "y-in-pixels");
+}
+
+Glib::PropertyProxy<Gtk::AnchorType> Pixbuf::property_anchor()
+{
+ return Glib::PropertyProxy<Gtk::AnchorType>(this, "anchor");
+}
+
+Glib::PropertyProxy_ReadOnly<Gtk::AnchorType> Pixbuf::property_anchor() const
+{
+ return Glib::PropertyProxy_ReadOnly<Gtk::AnchorType>(this, "anchor");
+}
+
+
+} // namespace Canvas
+
+} // namespace Gnome
+
+
diff --git a/libs/libgnomecanvasmm/libgnomecanvasmm/pixbuf.h b/libs/libgnomecanvasmm/libgnomecanvasmm/pixbuf.h
new file mode 100644
index 0000000000..6b7922318e
--- /dev/null
+++ b/libs/libgnomecanvasmm/libgnomecanvasmm/pixbuf.h
@@ -0,0 +1,321 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _LIBGNOMECANVASMM_PIXBUF_H
+#define _LIBGNOMECANVASMM_PIXBUF_H
+
+#include <glibmm.h>
+
+// -*- C++ -*-
+/* $Id$ */
+
+/* pixbuf.h
+ *
+ *
+ * Copyright (C) 2002 The libgnomecanvasmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gdkmm/pixbuf.h>
+#include <gtkmm/enums.h>
+#include <libgnomecanvasmm/item.h>
+#include <libgnomecanvas/gnome-canvas-pixbuf.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GnomeCanvasPixbuf GnomeCanvasPixbuf;
+typedef struct _GnomeCanvasPixbufClass GnomeCanvasPixbufClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gnome
+{
+
+namespace Canvas
+{ class Pixbuf_Class; } // namespace Canvas
+
+} // namespace Gnome
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+
+class Pixbuf : public Item
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Pixbuf CppObjectType;
+ typedef Pixbuf_Class CppClassType;
+ typedef GnomeCanvasPixbuf BaseObjectType;
+ typedef GnomeCanvasPixbufClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~Pixbuf();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class Pixbuf_Class;
+ static CppClassType pixbuf_class_;
+
+ // noncopyable
+ Pixbuf(const Pixbuf&);
+ Pixbuf& operator=(const Pixbuf&);
+
+protected:
+ explicit Pixbuf(const Glib::ConstructParams& construct_params);
+ explicit Pixbuf(GnomeCanvasPixbuf* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GnomeCanvasPixbuf* gobj() { return reinterpret_cast<GnomeCanvasPixbuf*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GnomeCanvasPixbuf* gobj() const { return reinterpret_cast<GnomeCanvasPixbuf*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+public:
+ Pixbuf(Group& parent, double x, double y, const Glib::RefPtr<Gdk::Pixbuf>& image);
+ explicit Pixbuf(Group& parent);
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy< Glib::RefPtr<Gdk::Pixbuf> > property_pixbuf() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Pixbuf> > property_pixbuf() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<double> property_width() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<double> property_width() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_width_set() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_width_set() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_width_in_pixels() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_width_in_pixels() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<double> property_height() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<double> property_height() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_height_set() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_height_set() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_height_in_pixels() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_height_in_pixels() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<double> property_x() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<double> property_x() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_x_in_pixels() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_x_in_pixels() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<double> property_y() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<double> property_y() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_y_in_pixels() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_y_in_pixels() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Gtk::AnchorType> property_anchor() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Gtk::AnchorType> property_anchor() const;
+
+
+};
+
+} /* namespace Canvas */
+} /* namespace Gnome */
+
+namespace Glib
+{
+ /** @relates Gnome::Canvas::Pixbuf
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gnome::Canvas::Pixbuf* wrap(GnomeCanvasPixbuf* object, bool take_copy = false);
+}
+#endif /* _LIBGNOMECANVASMM_PIXBUF_H */
+
diff --git a/libs/libgnomecanvasmm/libgnomecanvasmm/point.cc b/libs/libgnomecanvasmm/libgnomecanvasmm/point.cc
new file mode 100644
index 0000000000..051312b0c3
--- /dev/null
+++ b/libs/libgnomecanvasmm/libgnomecanvasmm/point.cc
@@ -0,0 +1,117 @@
+/* point.cc
+ *
+ * Copyright (C) 1999 The gnomemm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <libgnomecanvasmm/point.h>
+
+namespace Gnome
+{
+
+namespace Art
+{
+
+Point::Point(const ArtPoint& artpoint)
+{
+ m_ArtPoint = artpoint;
+}
+
+Point::Point(gdouble x /* = 0.0 */, gdouble y /* = 0.0 */)
+{
+ m_ArtPoint.x = x;
+ m_ArtPoint.y = y;
+}
+
+Point::Point(const Point& src)
+{
+ operator=(src);
+}
+
+Point& Point::operator=(const Point& src)
+{
+ m_ArtPoint = src.m_ArtPoint;
+ return *this;
+}
+
+Point::~Point()
+{
+}
+
+gdouble Point::get_x() const
+{
+ return m_ArtPoint.x;
+}
+
+void Point::set_x(gdouble x)
+{
+ m_ArtPoint.x = x;
+}
+
+gdouble Point::get_y() const
+{
+ return m_ArtPoint.y;
+}
+
+void Point::set_y(gdouble y)
+{
+ m_ArtPoint.y = y;
+}
+
+Point Point::operator+(const Point& p2)
+{
+ return Point(get_x() + p2.get_x(), get_y() + p2.get_y());
+}
+
+Point Point::operator-(const Point& p2)
+{
+ return Point(get_x() - p2.get_x(), get_y() - p2.get_y());
+}
+
+Point const & Point::operator+=(const Point& other)
+{
+ set_x(get_x() + other.get_x());
+ set_y(get_y() + other.get_y());
+ return *this;
+}
+
+Point const & Point::operator-=(const Point& other)
+{
+ set_x(get_x() - other.get_x());
+ set_y(get_y() - other.get_y());
+ return *this;
+}
+
+ArtPoint* Point::gobj()
+{
+ return &m_ArtPoint;
+}
+
+const ArtPoint* Point::gobj() const
+{
+ return &m_ArtPoint;
+}
+
+
+} //namespace Art
+
+} //namespace Gnome
+
+
+std::ostream& operator<<(std::ostream& out, const Gnome::Art::Point& p)
+{
+ return out << '(' << p.get_x() << ", " << p.get_y() << ')';
+}
diff --git a/libs/libgnomecanvasmm/libgnomecanvasmm/point.h b/libs/libgnomecanvasmm/libgnomecanvasmm/point.h
new file mode 100644
index 0000000000..e548116073
--- /dev/null
+++ b/libs/libgnomecanvasmm/libgnomecanvasmm/point.h
@@ -0,0 +1,74 @@
+#ifndef _LIBGNOMECANVASMM_POINT_H
+#define _LIBGNOMECANVASMM_POINT_H
+
+// -*- C++ -*-
+/* $Id$ */
+
+/* point.h
+ *
+ * Copyright (C) 1999 The gnomemm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <libgnomecanvas/gnome-canvas.h>
+//#include <libgnomecanvasmm/types.h>
+#include <iostream>
+
+namespace Gnome
+{
+
+namespace Art
+{
+
+/** Wrapper for ArtPoint struct.
+ * Used by AffineTrans and CanvasPoints.
+ */
+class Point
+{
+public:
+ Point(gdouble x = 0.0, gdouble y = 0.0);
+ Point(const ArtPoint& artpoint);
+ Point(const Point& src);
+ Point& operator=(const Point& src);
+ ~Point();
+
+ gdouble get_x() const;
+ void set_x(gdouble x);
+ gdouble get_y() const;
+ void set_y(gdouble y);
+
+ Point operator+(const Point& p2);
+ Point operator-(const Point& p2);
+ Point const & operator+=(const Point& other);
+ Point const & operator-=(const Point& other);
+
+ ArtPoint* gobj();
+ const ArtPoint* gobj() const;
+
+ protected:
+ //GnomeCanvasPoints uses arrays of double, 2 at a time, which is the same as a set of ArtPoints
+ //because an ArtPoint struct only has 2 double members.
+ ArtPoint m_ArtPoint;
+};
+
+} //namespace Art
+
+} //namespace Gnome
+
+std::ostream& operator<<(std::ostream& out, const Gnome::Art::Point& p);
+
+#endif /* _LIBGNOMECANVASMM_POINT_H */
+
diff --git a/libs/libgnomecanvasmm/libgnomecanvasmm/polygon.cc b/libs/libgnomecanvasmm/libgnomecanvasmm/polygon.cc
new file mode 100644
index 0000000000..08eb1b60bc
--- /dev/null
+++ b/libs/libgnomecanvasmm/libgnomecanvasmm/polygon.cc
@@ -0,0 +1,156 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <libgnomecanvasmm/polygon.h>
+#include <libgnomecanvasmm/private/polygon_p.h>
+
+/* $Id$ */
+
+/* polygon.ccg
+ *
+ * Copyright (C) 1999 The Gtk-- Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+Polygon::Polygon(Group& parent,const Points& points)
+ : Shape(GNOME_CANVAS_SHAPE(g_object_new(get_type(),0)))
+{
+ item_construct(parent);
+ property_points().set_value(points);
+}
+
+Polygon::Polygon(Group& parent)
+ : Shape(GNOME_CANVAS_SHAPE(g_object_new(get_type(),0)))
+{
+ item_construct(parent);
+}
+
+} /* namespace Canvas */
+} /* namespace Gnome */
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gnome::Canvas::Polygon* wrap(GnomeCanvasPolygon* object, bool take_copy)
+{
+ return dynamic_cast<Gnome::Canvas::Polygon *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Polygon_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Polygon_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gnome_canvas_polygon_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Polygon_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* Polygon_Class::wrap_new(GObject* o)
+{
+ return manage(new Polygon((GnomeCanvasPolygon*)(o)));
+
+}
+
+
+/* The implementation: */
+
+Polygon::Polygon(const Glib::ConstructParams& construct_params)
+:
+ Shape(construct_params)
+{
+ }
+
+Polygon::Polygon(GnomeCanvasPolygon* castitem)
+:
+ Shape((GnomeCanvasShape*)(castitem))
+{
+ }
+
+Polygon::~Polygon()
+{
+ destroy_();
+}
+
+Polygon::CppClassType Polygon::polygon_class_; // initialize static member
+
+GType Polygon::get_type()
+{
+ return polygon_class_.init().get_type();
+}
+
+GType Polygon::get_base_type()
+{
+ return gnome_canvas_polygon_get_type();
+}
+
+
+Glib::PropertyProxy<Points> Polygon::property_points()
+{
+ return Glib::PropertyProxy<Points>(this, "points");
+}
+
+Glib::PropertyProxy_ReadOnly<Points> Polygon::property_points() const
+{
+ return Glib::PropertyProxy_ReadOnly<Points>(this, "points");
+}
+
+
+} // namespace Canvas
+
+} // namespace Gnome
+
+
diff --git a/libs/libgnomecanvasmm/libgnomecanvasmm/polygon.h b/libs/libgnomecanvasmm/libgnomecanvasmm/polygon.h
new file mode 100644
index 0000000000..1d6dad5e55
--- /dev/null
+++ b/libs/libgnomecanvasmm/libgnomecanvasmm/polygon.h
@@ -0,0 +1,144 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _LIBGNOMECANVASMM_POLYGON_H
+#define _LIBGNOMECANVASMM_POLYGON_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+
+/* polygon.hg
+ *
+ * Copyright (C) 1999 The Gtk-- Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <libgnomecanvasmm/shape.h>
+#include <libgnomecanvasmm/line.h>
+#include <libgnomecanvas/gnome-canvas-polygon.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GnomeCanvasPolygon GnomeCanvasPolygon;
+typedef struct _GnomeCanvasPolygonClass GnomeCanvasPolygonClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gnome
+{
+
+namespace Canvas
+{ class Polygon_Class; } // namespace Canvas
+
+} // namespace Gnome
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+
+class Polygon : public Shape
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Polygon CppObjectType;
+ typedef Polygon_Class CppClassType;
+ typedef GnomeCanvasPolygon BaseObjectType;
+ typedef GnomeCanvasPolygonClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~Polygon();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class Polygon_Class;
+ static CppClassType polygon_class_;
+
+ // noncopyable
+ Polygon(const Polygon&);
+ Polygon& operator=(const Polygon&);
+
+protected:
+ explicit Polygon(const Glib::ConstructParams& construct_params);
+ explicit Polygon(GnomeCanvasPolygon* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GnomeCanvasPolygon* gobj() { return reinterpret_cast<GnomeCanvasPolygon*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GnomeCanvasPolygon* gobj() const { return reinterpret_cast<GnomeCanvasPolygon*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+public:
+ Polygon(Group& parent, const Points& points);
+ explicit Polygon(Group& parent);
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Points> property_points() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Points> property_points() const;
+
+
+};
+
+} /* namespace Canvas */
+} /* namespace Gnome */
+
+
+namespace Glib
+{
+ /** @relates Gnome::Canvas::Polygon
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gnome::Canvas::Polygon* wrap(GnomeCanvasPolygon* object, bool take_copy = false);
+}
+#endif /* _LIBGNOMECANVASMM_POLYGON_H */
+
diff --git a/libs/libgnomecanvasmm/libgnomecanvasmm/private/bpath_p.h b/libs/libgnomecanvasmm/libgnomecanvasmm/private/bpath_p.h
new file mode 100644
index 0000000000..4c6d727306
--- /dev/null
+++ b/libs/libgnomecanvasmm/libgnomecanvasmm/private/bpath_p.h
@@ -0,0 +1,49 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _LIBGNOMECANVASMM_BPATH_P_H
+#define _LIBGNOMECANVASMM_BPATH_P_H
+#include <libgnomecanvasmm/private/shape_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+class Bpath_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Bpath CppObjectType;
+ typedef GnomeCanvasBpath BaseObjectType;
+ typedef GnomeCanvasBpathClass BaseClassType;
+ typedef Shape_Class CppClassParent;
+ typedef GnomeCanvasShapeClass BaseClassParent;
+
+ friend class Bpath;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Canvas
+
+} // namespace Gnome
+
+#endif /* _LIBGNOMECANVASMM_BPATH_P_H */
+
diff --git a/libs/libgnomecanvasmm/libgnomecanvasmm/private/canvas_p.h b/libs/libgnomecanvasmm/libgnomecanvasmm/private/canvas_p.h
new file mode 100644
index 0000000000..48b08937c5
--- /dev/null
+++ b/libs/libgnomecanvasmm/libgnomecanvasmm/private/canvas_p.h
@@ -0,0 +1,52 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _LIBGNOMECANVASMM_CANVAS_P_H
+#define _LIBGNOMECANVASMM_CANVAS_P_H
+#include <gtkmm/private/layout_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+class Canvas_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Canvas CppObjectType;
+ typedef GnomeCanvas BaseObjectType;
+ typedef GnomeCanvasClass BaseClassType;
+ typedef Gtk::Layout_Class CppClassParent;
+ typedef GtkLayoutClass BaseClassParent;
+
+ friend class Canvas;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void draw_background_callback(GnomeCanvas* self, GdkDrawable* p0, gint p1, gint p2, gint p3, gint p4);
+ static void render_background_callback(GnomeCanvas* self, GnomeCanvasBuf* p0);
+
+ //Callbacks (virtual functions):
+ static void request_update_vfunc_callback(GnomeCanvas* self);
+};
+
+
+} // namespace Canvas
+
+} // namespace Gnome
+
+#endif /* _LIBGNOMECANVASMM_CANVAS_P_H */
+
diff --git a/libs/libgnomecanvasmm/libgnomecanvasmm/private/ellipse_p.h b/libs/libgnomecanvasmm/libgnomecanvasmm/private/ellipse_p.h
new file mode 100644
index 0000000000..513b1a945c
--- /dev/null
+++ b/libs/libgnomecanvasmm/libgnomecanvasmm/private/ellipse_p.h
@@ -0,0 +1,49 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _LIBGNOMECANVASMM_ELLIPSE_P_H
+#define _LIBGNOMECANVASMM_ELLIPSE_P_H
+#include <libgnomecanvasmm/private/rect-ellipse_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+class Ellipse_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Ellipse CppObjectType;
+ typedef GnomeCanvasEllipse BaseObjectType;
+ typedef GnomeCanvasEllipseClass BaseClassType;
+ typedef RectEllipse_Class CppClassParent;
+ typedef GnomeCanvasREClass BaseClassParent;
+
+ friend class Ellipse;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Canvas
+
+} // namespace Gnome
+
+#endif /* _LIBGNOMECANVASMM_ELLIPSE_P_H */
+
diff --git a/libs/libgnomecanvasmm/libgnomecanvasmm/private/group_p.h b/libs/libgnomecanvasmm/libgnomecanvasmm/private/group_p.h
new file mode 100644
index 0000000000..95a2ecff44
--- /dev/null
+++ b/libs/libgnomecanvasmm/libgnomecanvasmm/private/group_p.h
@@ -0,0 +1,49 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _LIBGNOMECANVASMM_GROUP_P_H
+#define _LIBGNOMECANVASMM_GROUP_P_H
+#include <libgnomecanvasmm/private/item_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+class Group_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Group CppObjectType;
+ typedef GnomeCanvasGroup BaseObjectType;
+ typedef GnomeCanvasGroupClass BaseClassType;
+ typedef Item_Class CppClassParent;
+ typedef GnomeCanvasItemClass BaseClassParent;
+
+ friend class Group;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Canvas
+
+} // namespace Gnome
+
+#endif /* _LIBGNOMECANVASMM_GROUP_P_H */
+
diff --git a/libs/libgnomecanvasmm/libgnomecanvasmm/private/item_p.h b/libs/libgnomecanvasmm/libgnomecanvasmm/private/item_p.h
new file mode 100644
index 0000000000..d898eb8304
--- /dev/null
+++ b/libs/libgnomecanvasmm/libgnomecanvasmm/private/item_p.h
@@ -0,0 +1,60 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _LIBGNOMECANVASMM_ITEM_P_H
+#define _LIBGNOMECANVASMM_ITEM_P_H
+#include <gtkmm/private/object_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+class Item_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Item CppObjectType;
+ typedef GnomeCanvasItem BaseObjectType;
+ typedef GnomeCanvasItemClass BaseClassType;
+ typedef Gtk::Object_Class CppClassParent;
+ typedef GtkObjectClass BaseClassParent;
+
+ friend class Item;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static gboolean event_callback(GnomeCanvasItem* self, GdkEvent* p0);
+
+ //Callbacks (virtual functions):
+ static void update_vfunc_callback(GnomeCanvasItem* self, double* affine, ArtSVP* clip_path, int flags);
+ static void realize_vfunc_callback(GnomeCanvasItem* self);
+ static void unrealize_vfunc_callback(GnomeCanvasItem* self);
+ static void map_vfunc_callback(GnomeCanvasItem* self);
+ static void unmap_vfunc_callback(GnomeCanvasItem* self);
+ static ArtUta* coverage_vfunc_callback(GnomeCanvasItem* self);
+ static void draw_vfunc_callback(GnomeCanvasItem* self, GdkDrawable* drawable, int x, int y, int width, int height);
+ static void render_vfunc_callback(GnomeCanvasItem* self, GnomeCanvasBuf* buf);
+ static double point_vfunc_callback(GnomeCanvasItem* self, double x, double y, int cx, int cy, GnomeCanvasItem** actual_item);
+ static void bounds_vfunc_callback(GnomeCanvasItem* self, double* x1, double* y1, double* x2, double* y2);
+};
+
+
+} // namespace Canvas
+
+} // namespace Gnome
+
+#endif /* _LIBGNOMECANVASMM_ITEM_P_H */
+
diff --git a/libs/libgnomecanvasmm/libgnomecanvasmm/private/line_p.h b/libs/libgnomecanvasmm/libgnomecanvasmm/private/line_p.h
new file mode 100644
index 0000000000..819ad6ee7c
--- /dev/null
+++ b/libs/libgnomecanvasmm/libgnomecanvasmm/private/line_p.h
@@ -0,0 +1,49 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _LIBGNOMECANVASMM_LINE_P_H
+#define _LIBGNOMECANVASMM_LINE_P_H
+#include <libgnomecanvasmm/private/item_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+class Line_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Line CppObjectType;
+ typedef GnomeCanvasLine BaseObjectType;
+ typedef GnomeCanvasLineClass BaseClassType;
+ typedef Item_Class CppClassParent;
+ typedef GnomeCanvasItemClass BaseClassParent;
+
+ friend class Line;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Canvas
+
+} // namespace Gnome
+
+#endif /* _LIBGNOMECANVASMM_LINE_P_H */
+
diff --git a/libs/libgnomecanvasmm/libgnomecanvasmm/private/path-def_p.h b/libs/libgnomecanvasmm/libgnomecanvasmm/private/path-def_p.h
new file mode 100644
index 0000000000..b7ccc3f278
--- /dev/null
+++ b/libs/libgnomecanvasmm/libgnomecanvasmm/private/path-def_p.h
@@ -0,0 +1,6 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _LIBGNOMECANVASMM_PATH_DEF_P_H
+#define _LIBGNOMECANVASMM_PATH_DEF_P_H
+#endif /* _LIBGNOMECANVASMM_PATH_DEF_P_H */
+
diff --git a/libs/libgnomecanvasmm/libgnomecanvasmm/private/pixbuf_p.h b/libs/libgnomecanvasmm/libgnomecanvasmm/private/pixbuf_p.h
new file mode 100644
index 0000000000..54e464677a
--- /dev/null
+++ b/libs/libgnomecanvasmm/libgnomecanvasmm/private/pixbuf_p.h
@@ -0,0 +1,49 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _LIBGNOMECANVASMM_PIXBUF_P_H
+#define _LIBGNOMECANVASMM_PIXBUF_P_H
+#include <libgnomecanvasmm/private/item_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+class Pixbuf_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Pixbuf CppObjectType;
+ typedef GnomeCanvasPixbuf BaseObjectType;
+ typedef GnomeCanvasPixbufClass BaseClassType;
+ typedef Item_Class CppClassParent;
+ typedef GnomeCanvasItemClass BaseClassParent;
+
+ friend class Pixbuf;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Canvas
+
+} // namespace Gnome
+
+#endif /* _LIBGNOMECANVASMM_PIXBUF_P_H */
+
diff --git a/libs/libgnomecanvasmm/libgnomecanvasmm/private/polygon_p.h b/libs/libgnomecanvasmm/libgnomecanvasmm/private/polygon_p.h
new file mode 100644
index 0000000000..2ca067cf7b
--- /dev/null
+++ b/libs/libgnomecanvasmm/libgnomecanvasmm/private/polygon_p.h
@@ -0,0 +1,49 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _LIBGNOMECANVASMM_POLYGON_P_H
+#define _LIBGNOMECANVASMM_POLYGON_P_H
+#include <libgnomecanvasmm/private/shape_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+class Polygon_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Polygon CppObjectType;
+ typedef GnomeCanvasPolygon BaseObjectType;
+ typedef GnomeCanvasPolygonClass BaseClassType;
+ typedef Shape_Class CppClassParent;
+ typedef GnomeCanvasShapeClass BaseClassParent;
+
+ friend class Polygon;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Canvas
+
+} // namespace Gnome
+
+#endif /* _LIBGNOMECANVASMM_POLYGON_P_H */
+
diff --git a/libs/libgnomecanvasmm/libgnomecanvasmm/private/rect-ellipse_p.h b/libs/libgnomecanvasmm/libgnomecanvasmm/private/rect-ellipse_p.h
new file mode 100644
index 0000000000..73913352bb
--- /dev/null
+++ b/libs/libgnomecanvasmm/libgnomecanvasmm/private/rect-ellipse_p.h
@@ -0,0 +1,49 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _LIBGNOMECANVASMM_RECT_ELLIPSE_P_H
+#define _LIBGNOMECANVASMM_RECT_ELLIPSE_P_H
+#include <libgnomecanvasmm/private/shape_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+class RectEllipse_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef RectEllipse CppObjectType;
+ typedef GnomeCanvasRE BaseObjectType;
+ typedef GnomeCanvasREClass BaseClassType;
+ typedef Shape_Class CppClassParent;
+ typedef GnomeCanvasShapeClass BaseClassParent;
+
+ friend class RectEllipse;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Canvas
+
+} // namespace Gnome
+
+#endif /* _LIBGNOMECANVASMM_RECT_ELLIPSE_P_H */
+
diff --git a/libs/libgnomecanvasmm/libgnomecanvasmm/private/rect_p.h b/libs/libgnomecanvasmm/libgnomecanvasmm/private/rect_p.h
new file mode 100644
index 0000000000..a42c84fd15
--- /dev/null
+++ b/libs/libgnomecanvasmm/libgnomecanvasmm/private/rect_p.h
@@ -0,0 +1,49 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _LIBGNOMECANVASMM_RECT_P_H
+#define _LIBGNOMECANVASMM_RECT_P_H
+#include <libgnomecanvasmm/private/rect-ellipse_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+class Rect_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Rect CppObjectType;
+ typedef GnomeCanvasRect BaseObjectType;
+ typedef GnomeCanvasRectClass BaseClassType;
+ typedef RectEllipse_Class CppClassParent;
+ typedef GnomeCanvasREClass BaseClassParent;
+
+ friend class Rect;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Canvas
+
+} // namespace Gnome
+
+#endif /* _LIBGNOMECANVASMM_RECT_P_H */
+
diff --git a/libs/libgnomecanvasmm/libgnomecanvasmm/private/rich-text_p.h b/libs/libgnomecanvasmm/libgnomecanvasmm/private/rich-text_p.h
new file mode 100644
index 0000000000..90fa63a557
--- /dev/null
+++ b/libs/libgnomecanvasmm/libgnomecanvasmm/private/rich-text_p.h
@@ -0,0 +1,50 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _LIBGNOMECANVASMM_RICH_TEXT_P_H
+#define _LIBGNOMECANVASMM_RICH_TEXT_P_H
+#include <libgnomecanvasmm/private/item_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+class RichText_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef RichText CppObjectType;
+ typedef GnomeCanvasRichText BaseObjectType;
+ typedef GnomeCanvasRichTextClass BaseClassType;
+ typedef Item_Class CppClassParent;
+ typedef GnomeCanvasItemClass BaseClassParent;
+
+ friend class RichText;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+ static void tag_changed_callback(GnomeCanvasRichText* self, GtkTextTag* tag);
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Canvas
+
+} // namespace Gnome
+
+#endif /* _LIBGNOMECANVASMM_RICH_TEXT_P_H */
+
diff --git a/libs/libgnomecanvasmm/libgnomecanvasmm/private/shape_p.h b/libs/libgnomecanvasmm/libgnomecanvasmm/private/shape_p.h
new file mode 100644
index 0000000000..f0fac4d6f2
--- /dev/null
+++ b/libs/libgnomecanvasmm/libgnomecanvasmm/private/shape_p.h
@@ -0,0 +1,49 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _LIBGNOMECANVASMM_SHAPE_P_H
+#define _LIBGNOMECANVASMM_SHAPE_P_H
+#include <libgnomecanvasmm/private/item_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+class Shape_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Shape CppObjectType;
+ typedef GnomeCanvasShape BaseObjectType;
+ typedef GnomeCanvasShapeClass BaseClassType;
+ typedef Item_Class CppClassParent;
+ typedef GnomeCanvasItemClass BaseClassParent;
+
+ friend class Shape;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Canvas
+
+} // namespace Gnome
+
+#endif /* _LIBGNOMECANVASMM_SHAPE_P_H */
+
diff --git a/libs/libgnomecanvasmm/libgnomecanvasmm/private/text_p.h b/libs/libgnomecanvasmm/libgnomecanvasmm/private/text_p.h
new file mode 100644
index 0000000000..f15e8e5a50
--- /dev/null
+++ b/libs/libgnomecanvasmm/libgnomecanvasmm/private/text_p.h
@@ -0,0 +1,49 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _LIBGNOMECANVASMM_TEXT_P_H
+#define _LIBGNOMECANVASMM_TEXT_P_H
+#include <libgnomecanvasmm/private/item_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+class Text_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Text CppObjectType;
+ typedef GnomeCanvasText BaseObjectType;
+ typedef GnomeCanvasTextClass BaseClassType;
+ typedef Item_Class CppClassParent;
+ typedef GnomeCanvasItemClass BaseClassParent;
+
+ friend class Text;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Canvas
+
+} // namespace Gnome
+
+#endif /* _LIBGNOMECANVASMM_TEXT_P_H */
+
diff --git a/libs/libgnomecanvasmm/libgnomecanvasmm/private/widget_p.h b/libs/libgnomecanvasmm/libgnomecanvasmm/private/widget_p.h
new file mode 100644
index 0000000000..22fede33de
--- /dev/null
+++ b/libs/libgnomecanvasmm/libgnomecanvasmm/private/widget_p.h
@@ -0,0 +1,49 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _LIBGNOMECANVASMM_WIDGET_P_H
+#define _LIBGNOMECANVASMM_WIDGET_P_H
+#include <libgnomecanvasmm/private/item_p.h>
+
+#include <glibmm/class.h>
+
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+class Widget_Class : public Glib::Class
+{
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Widget CppObjectType;
+ typedef GnomeCanvasWidget BaseObjectType;
+ typedef GnomeCanvasWidgetClass BaseClassType;
+ typedef Item_Class CppClassParent;
+ typedef GnomeCanvasItemClass BaseClassParent;
+
+ friend class Widget;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ const Glib::Class& init();
+
+ static void class_init_function(void* g_class, void* class_data);
+
+ static Glib::ObjectBase* wrap_new(GObject*);
+
+protected:
+
+ //Callbacks (default signal handlers):
+ //These will call the *_impl member methods, which will then call the existing default signal callbacks, if any.
+ //You could prevent the original default signal handlers being called by overriding the *_impl method.
+
+ //Callbacks (virtual functions):
+};
+
+
+} // namespace Canvas
+
+} // namespace Gnome
+
+#endif /* _LIBGNOMECANVASMM_WIDGET_P_H */
+
diff --git a/libs/libgnomecanvasmm/libgnomecanvasmm/properties.cc b/libs/libgnomecanvasmm/libgnomecanvasmm/properties.cc
new file mode 100644
index 0000000000..f786e57836
--- /dev/null
+++ b/libs/libgnomecanvasmm/libgnomecanvasmm/properties.cc
@@ -0,0 +1,238 @@
+// -*- c++ -*-
+/* $Id$ */
+
+/* properties.cc
+ *
+ * Copyright (C) 2002 The Free Software Foundation
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <libgnomecanvasmm/properties.h>
+
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+namespace Properties
+{
+
+PropertyBase::PropertyBase(const char* name)
+: name_(name)
+{}
+
+PropertyBase::~PropertyBase()
+{}
+
+const char* PropertyBase::get_name() const
+{
+ return name_;
+}
+
+/////////////////////////////
+// Property<Gdk::Color>
+
+Property<Gdk::Color>::Property(const char* name, const Gdk::Color& value) :
+ PropertyBase(name),
+ value_(value),
+ value_gobj_used_(true),
+ value_string_used_(false),
+ value_rgba_(0)
+{}
+
+Property<Gdk::Color>::Property(const char* name, const Glib::ustring& color) :
+ PropertyBase(name),
+ value_gobj_used_(false),
+ value_string_(color),
+ value_string_used_ (true),
+ value_rgba_(0)
+{}
+
+Property<Gdk::Color>::Property(const char* name, const guint& rgba_color) :
+ PropertyBase(name),
+ value_gobj_used_(false),
+ value_string_used_(false),
+ value_rgba_(rgba_color)
+{}
+
+void Property<Gdk::Color>::set_value_in_object(Glib::Object& object) const
+{
+ //Set the appropriate property name with the appropriately-typed value:
+ if(value_string_used_) {
+
+ Glib::PropertyProxy<Glib::ustring> proxy(&object, get_name());
+ if (value_string_ == "")
+ proxy.reset_value ();
+ else
+ proxy.set_value(value_string_);
+
+ } else if(value_gobj_used_) {
+
+ Glib::PropertyProxy<Gdk::Color> proxy(&object, get_name());
+ proxy.set_value(value_);
+
+ } else {
+
+ Glib::PropertyProxy<guint> proxy(&object, get_name());
+ proxy.set_value(value_rgba_);
+ }
+}
+
+/////////////////////////////
+// Property<Pango::FontDescription>
+Property<Pango::FontDescription>::Property(const char* name, const Pango::FontDescription& value) :
+ PropertyBase(name),
+ value_(value)
+{}
+
+Property<Pango::FontDescription>::Property(const char* name, const Glib::ustring& font) :
+ PropertyBase(name),
+ value_(0),
+ value_string_(font)
+{}
+
+void Property<Pango::FontDescription>::set_value_in_object(Glib::Object& object) const
+{
+ if(value_string_.size())
+ {
+ Glib::PropertyProxy<Glib::ustring> proxy(&object, get_name());
+ proxy.set_value(value_string_);
+ }
+ else
+ {
+ Glib::PropertyProxy<Pango::FontDescription> proxy(&object, get_name());
+ proxy.set_value(value_);
+ }
+}
+
+
+/////////////////////////////
+// Property< Glib::RefPtr<Gdk::Bitmap> >
+Property< Glib::RefPtr<Gdk::Bitmap> >::Property(const char* name, const Glib::RefPtr<Gdk::Bitmap>& value)
+ : PropertyBase(name),
+ value_(value)
+{}
+
+void Property< Glib::RefPtr<Gdk::Bitmap> >::set_value_in_object(Glib::Object& object) const
+{
+ Glib::PropertyProxy< Glib::RefPtr<Gdk::Bitmap> > proxy(&object, get_name());
+ proxy.set_value(value_);
+}
+
+
+font::font(const Pango::FontDescription& v)
+ : Property<Pango::FontDescription>("font-desc", v)
+{}
+
+font::font(const Glib::ustring& v)
+ : Property<Pango::FontDescription>("font", v)
+{}
+
+fill_color::fill_color(const Gdk::Color& v)
+ : Property<Gdk::Color>("fill_color_gdk",v)
+{}
+
+fill_color::fill_color(const Glib::ustring& v)
+ : Property<Gdk::Color>("fill_color",v)
+{}
+
+outline_color::outline_color(const Gdk::Color& v)
+ : Property<Gdk::Color>("outline_color_gdk", v)
+{}
+
+outline_color::outline_color(const Glib::ustring& v)
+ : Property<Gdk::Color>("outline_color", v)
+{}
+
+// GNOMEMM_PROPERTY_IMPL(C++ name, C property name, C++ type)
+#define GNOMEMM_PROPERTY_IMPL(N,N2,T) \
+N::N(const T& v) \
+ : Property<T >(#N2, v) \
+{}
+
+// CanvasLine
+GNOMEMM_PROPERTY_IMPL(arrow_shape_a,arrow_shape_a,double)
+GNOMEMM_PROPERTY_IMPL(arrow_shape_b,arrow_shape_b,double)
+GNOMEMM_PROPERTY_IMPL(arrow_shape_c,arrow_shape_c,double)
+GNOMEMM_PROPERTY_IMPL(cap_style,cap_style,Gdk::CapStyle)
+GNOMEMM_PROPERTY_IMPL(first_arrowhead,first_arrowhead,bool)
+GNOMEMM_PROPERTY_IMPL(join_style,join_style,Gdk::JoinStyle)
+GNOMEMM_PROPERTY_IMPL(last_arrowhead,last_arrowhead,bool)
+GNOMEMM_PROPERTY_IMPL(line_style,line_style,Gdk::LineStyle)
+GNOMEMM_PROPERTY_IMPL(smooth,smooth,bool)
+GNOMEMM_PROPERTY_IMPL(spline_steps,spline_steps,guint)
+
+// CanvasText
+GNOMEMM_PROPERTY_IMPL(clip,clip,bool)
+GNOMEMM_PROPERTY_IMPL(clip_height,clip_height,double)
+GNOMEMM_PROPERTY_IMPL(clip_width,clip_width,double)
+GNOMEMM_PROPERTY_IMPL(wrap_mode,wrap_mode,Gtk::WrapMode)
+GNOMEMM_PROPERTY_IMPL(justification,justification,Gtk::Justification)
+GNOMEMM_PROPERTY_IMPL(direction,direction,Gtk::DirectionType)
+GNOMEMM_PROPERTY_IMPL(text_height,text_height,double)
+GNOMEMM_PROPERTY_IMPL(text_width,text_width,double)
+GNOMEMM_PROPERTY_IMPL(x_offset,x_offset,double)
+GNOMEMM_PROPERTY_IMPL(y_offset,y_offset,double)
+GNOMEMM_PROPERTY_IMPL(text,text,Glib::ustring)
+GNOMEMM_PROPERTY_IMPL(markup,markup,Glib::ustring)
+GNOMEMM_PROPERTY_IMPL(editable,editable,bool)
+GNOMEMM_PROPERTY_IMPL(visible,visible,bool)
+GNOMEMM_PROPERTY_IMPL(cursor_visible,cursor_visible,bool)
+GNOMEMM_PROPERTY_IMPL(cursor_blink,cursor_blink,bool)
+GNOMEMM_PROPERTY_IMPL(grow_height,grow_height,bool)
+GNOMEMM_PROPERTY_IMPL(pixels_above_lines,pixels_above_lines,int)
+GNOMEMM_PROPERTY_IMPL(pixels_below_lines,pixels_below_lines,int)
+GNOMEMM_PROPERTY_IMPL(pixels_inside_wrap,pixels_inside_wrap,int)
+GNOMEMM_PROPERTY_IMPL(left_margin,left_margin,int)
+GNOMEMM_PROPERTY_IMPL(right_margin,right_margin,int)
+GNOMEMM_PROPERTY_IMPL(indent,indent,int)
+
+// CanvasWidget
+GNOMEMM_PROPERTY_IMPL(size_pixels,size_pixels,bool)
+
+// CanvasImage, CanvasWidget
+GNOMEMM_PROPERTY_IMPL(height,height,double)
+GNOMEMM_PROPERTY_IMPL(width,width,double)
+
+// CanvasRect, CanvasEllipse
+GNOMEMM_PROPERTY_IMPL(x1,x1,double)
+GNOMEMM_PROPERTY_IMPL(x2,x2,double)
+GNOMEMM_PROPERTY_IMPL(y1,y1,double)
+GNOMEMM_PROPERTY_IMPL(y2,y2,double)
+
+// CanvasImage, CanvasText, CanvasWidget
+GNOMEMM_PROPERTY_IMPL(anchor,anchor,Gtk::AnchorType)
+
+// CanvasPolygon, CanvasRect, CanvasEllipse
+GNOMEMM_PROPERTY_IMPL(outline_stipple,outline_stipple,Glib::RefPtr<Gdk::Bitmap>)
+GNOMEMM_PROPERTY_IMPL(wind,wind,guint)
+GNOMEMM_PROPERTY_IMPL(miterlimit,miterlimit,double)
+
+// CanvasLine, CanvasPolygon, CanvasRect, CanvasEllipse
+GNOMEMM_PROPERTY_IMPL(width_pixels,width_pixels,guint)
+GNOMEMM_PROPERTY_IMPL(width_units,width_units,double)
+
+// CanvasGroup, CanvasImage, CanvasText, CanvasWidget
+GNOMEMM_PROPERTY_IMPL(x,x,double)
+GNOMEMM_PROPERTY_IMPL(y,y,double)
+
+// CanvasLine, CanvasPolygon, CanvasRect, CanvasEllipse, CanvasText
+GNOMEMM_PROPERTY_IMPL(fill_stipple,fill_stipple,Glib::RefPtr<Gdk::Bitmap>)
+
+} /* namespace Properties */
+} /* namespace Canvas */
+} /* namespace Gnome */
diff --git a/libs/libgnomecanvasmm/libgnomecanvasmm/properties.h b/libs/libgnomecanvasmm/libgnomecanvasmm/properties.h
new file mode 100644
index 0000000000..c25025f18d
--- /dev/null
+++ b/libs/libgnomecanvasmm/libgnomecanvasmm/properties.h
@@ -0,0 +1,248 @@
+#ifndef _LIBGNOMECANVASMM_PROPERTIES_H_
+#define _LIBGNOMECANVASMM_PROPERTIES_H_
+
+// -*- c++ -*-
+/* $Id$ */
+
+/* properties.h
+ *
+ * Copyright (C) 1999-2002 The Free Software Foundation
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+//#include <gtk/gtkpacker.h> //For GtkAnchorType.
+
+
+#include <glibmm/propertyproxy.h>
+#include <gdkmm/color.h>
+#include <gdkmm/bitmap.h>
+#include <pangomm/fontdescription.h>
+#include <gtkmm/enums.h>
+
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+namespace Properties
+{
+
+class PropertyBase
+{
+public:
+ PropertyBase(const char* name);
+ ~PropertyBase();
+
+ const char* get_name() const;
+
+protected:
+ const char* name_;
+};
+
+template <class T_Value>
+class Property : public PropertyBase
+{
+public:
+ Property(const char* name, const T_Value& value)
+ : PropertyBase(name), value_(value)
+ {}
+
+ void set_value_in_object(Glib::Object& object) const
+ {
+ Glib::PropertyProxy<T_Value> proxy(&object, get_name());
+ proxy.set_value(value_);
+ }
+
+protected:
+ T_Value value_;
+};
+
+
+/** Allow use of << operator on objects:
+ * For instance:
+ * canvasgroup << Gnome::Canvas::CanvasHelpers::x(2);
+ */
+template <class O, class T>
+O& operator << (O& object, const Property<T>& property)
+{
+ property.set_value_in_object(object);
+ return object;
+}
+
+/********* specializations *********/
+
+//Colors can be specified with a string or a Gdk::Color, or an rgba guint.
+template<>
+class Property<Gdk::Color> : public PropertyBase
+{
+public:
+ Property(const char* name, const Gdk::Color& value);
+ Property(const char* name, const Glib::ustring& color);
+ Property(const char* name, const guint& rgba_color);
+
+ void set_value_in_object(Glib::Object& object) const;
+
+protected:
+ Gdk::Color value_;
+ bool value_gobj_used_; //Whether the Gdk::Value was intialised in the constructor.
+ Glib::ustring value_string_;
+ bool value_string_used_;
+ guint value_rgba_;
+};
+
+//Font can be specified with a string or a Pango::FontDescription.
+template<>
+class Property<Pango::FontDescription> : public PropertyBase
+{
+public:
+ Property(const char* name, const Pango::FontDescription& value);
+ Property(const char* name, const Glib::ustring& font);
+
+ void set_value_in_object(Glib::Object& object) const;
+
+protected:
+ Pango::FontDescription value_;
+ Glib::ustring value_string_;
+};
+
+
+//We now define some specific properties.
+//Some of these are unusual, so we define them manually.
+//Others are regular so we define them with a macro:
+
+
+class font : public Property<Pango::FontDescription> //Used by CanvasText.
+{
+public:
+ font(const Pango::FontDescription& v);
+
+ font(const Glib::ustring& v);
+};
+
+template<>
+class Property< Glib::RefPtr<Gdk::Bitmap> > : public PropertyBase
+{
+public:
+ Property(const char* name, const Glib::RefPtr<Gdk::Bitmap>& value);
+
+ void set_value_in_object(Glib::Object& object) const;
+
+protected:
+ Glib::RefPtr<Gdk::Bitmap> value_;
+};
+
+class fill_color : public Property<Gdk::Color>
+{
+public:
+ fill_color(const Gdk::Color& v);
+
+ fill_color(const Glib::ustring& v);
+};
+
+class outline_color : public Property<Gdk::Color>
+{
+public:
+ outline_color(const Gdk::Color& v);
+
+ outline_color(const Glib::ustring& v);
+};
+
+
+// GNOMEMM_PROPERTY(C++ name, C property name, C++ type)
+#define GNOMEMM_PROPERTY(N,N2,T) \
+class N : public Property<T > \
+{ \
+public: \
+ N(const T& v); \
+};
+
+
+// CanvasLine
+GNOMEMM_PROPERTY(arrow_shape_a,arrow_shape_a,double)
+GNOMEMM_PROPERTY(arrow_shape_b,arrow_shape_b,double)
+GNOMEMM_PROPERTY(arrow_shape_c,arrow_shape_c,double)
+GNOMEMM_PROPERTY(cap_style,cap_style,Gdk::CapStyle)
+GNOMEMM_PROPERTY(first_arrowhead,first_arrowhead,bool)
+GNOMEMM_PROPERTY(join_style,join_style,Gdk::JoinStyle)
+GNOMEMM_PROPERTY(last_arrowhead,last_arrowhead,bool)
+GNOMEMM_PROPERTY(line_style,line_style,Gdk::LineStyle)
+GNOMEMM_PROPERTY(smooth,smooth,bool)
+GNOMEMM_PROPERTY(spline_steps,spline_steps,guint)
+
+// CanvasText
+GNOMEMM_PROPERTY(clip,clip,bool)
+GNOMEMM_PROPERTY(clip_height,clip_height,double)
+GNOMEMM_PROPERTY(clip_width,clip_width,double)
+GNOMEMM_PROPERTY(justification,justification,Gtk::Justification)
+GNOMEMM_PROPERTY(direction,direction,Gtk::DirectionType)
+GNOMEMM_PROPERTY(wrap_mode,wrap_mode,Gtk::WrapMode)
+GNOMEMM_PROPERTY(text_height,text_height,double)
+GNOMEMM_PROPERTY(text_width,text_width,double)
+GNOMEMM_PROPERTY(x_offset,x_offset,double)
+GNOMEMM_PROPERTY(y_offset,y_offset,double)
+GNOMEMM_PROPERTY(text,text,Glib::ustring)
+GNOMEMM_PROPERTY(markup,markup,Glib::ustring)
+GNOMEMM_PROPERTY(editable,editable,bool)
+GNOMEMM_PROPERTY(visible,visible,bool)
+GNOMEMM_PROPERTY(cursor_visible,cursor_visible,bool)
+GNOMEMM_PROPERTY(cursor_blink,cursor_blink,bool)
+GNOMEMM_PROPERTY(grow_height,grow_height,bool)
+GNOMEMM_PROPERTY(pixels_above_lines,pixels_above_lines,int)
+GNOMEMM_PROPERTY(pixels_below_lines,pixels_below_lines,int)
+GNOMEMM_PROPERTY(pixels_inside_wrap,pixels_inside_wrap,int)
+GNOMEMM_PROPERTY(left_margin,left_margin,int)
+GNOMEMM_PROPERTY(right_margin,right_margin,int)
+GNOMEMM_PROPERTY(indent,indent,int)
+
+// CanvasWidget
+GNOMEMM_PROPERTY(size_pixels,size_pixels,bool)
+
+// CanvasImage, CanvasWidget
+GNOMEMM_PROPERTY(height,height,double)
+GNOMEMM_PROPERTY(width,width,double)
+
+// CanvasRect, CanvasEllipse
+GNOMEMM_PROPERTY(x1,x1,double)
+GNOMEMM_PROPERTY(x2,x2,double)
+GNOMEMM_PROPERTY(y1,y1,double)
+GNOMEMM_PROPERTY(y2,y2,double)
+
+// CanvasImage, CanvasText, CanvasWidget
+GNOMEMM_PROPERTY(anchor,anchor,Gtk::AnchorType)
+
+// CanvasPolygon, CanvasRect, CanvasEllipse
+GNOMEMM_PROPERTY(outline_stipple,outline_stipple,Glib::RefPtr<Gdk::Bitmap>)
+GNOMEMM_PROPERTY(wind,wind,guint)
+GNOMEMM_PROPERTY(miterlimit,miterlimit,double)
+
+// CanvasLine, CanvasPolygon, CanvasRect, CanvasEllipse
+GNOMEMM_PROPERTY(width_pixels,width_pixels,guint)
+GNOMEMM_PROPERTY(width_units,width_units,double)
+
+// CanvasGroup, CanvasImage, CanvasText, CanvasWidget
+GNOMEMM_PROPERTY(x,x,double)
+GNOMEMM_PROPERTY(y,y,double)
+
+// CanvasLine, CanvasPolygon, CanvasRect, CanvasEllipse, CanvasText
+GNOMEMM_PROPERTY(fill_stipple,fill_stipple,Glib::RefPtr<Gdk::Bitmap>)
+
+} /* namespace Properties */
+} /* namespace Canvas */
+} /* namespace Gnome */
+
+#endif /* _LIBGNOMECANVASMM_PROPERTIES_H_ */
+
diff --git a/libs/libgnomecanvasmm/libgnomecanvasmm/rect-ellipse.cc b/libs/libgnomecanvasmm/libgnomecanvasmm/rect-ellipse.cc
new file mode 100644
index 0000000000..2733963ce0
--- /dev/null
+++ b/libs/libgnomecanvasmm/libgnomecanvasmm/rect-ellipse.cc
@@ -0,0 +1,180 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <libgnomecanvasmm/rect-ellipse.h>
+#include <libgnomecanvasmm/private/rect-ellipse_p.h>
+
+/* $Id$ */
+
+/* ellipse.cc
+ *
+ * Copyright (C) 1998 EMC Capital Management Inc.
+ * Developed by Havoc Pennington <hp@pobox.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+RectEllipse::RectEllipse(Group& parent)
+ : Shape(GNOME_CANVAS_SHAPE(g_object_new(get_type(),0)))
+{
+ item_construct(parent);
+}
+
+} /* namespace Canvas */
+} /* namespace Gnome */
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gnome::Canvas::RectEllipse* wrap(GnomeCanvasRE* object, bool take_copy)
+{
+ return dynamic_cast<Gnome::Canvas::RectEllipse *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& RectEllipse_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &RectEllipse_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gnome_canvas_re_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void RectEllipse_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* RectEllipse_Class::wrap_new(GObject* o)
+{
+ return manage(new RectEllipse((GnomeCanvasRE*)(o)));
+
+}
+
+
+/* The implementation: */
+
+RectEllipse::RectEllipse(const Glib::ConstructParams& construct_params)
+:
+ Shape(construct_params)
+{
+ }
+
+RectEllipse::RectEllipse(GnomeCanvasRE* castitem)
+:
+ Shape((GnomeCanvasShape*)(castitem))
+{
+ }
+
+RectEllipse::~RectEllipse()
+{
+ destroy_();
+}
+
+RectEllipse::CppClassType RectEllipse::rectellipse_class_; // initialize static member
+
+GType RectEllipse::get_type()
+{
+ return rectellipse_class_.init().get_type();
+}
+
+GType RectEllipse::get_base_type()
+{
+ return gnome_canvas_re_get_type();
+}
+
+
+Glib::PropertyProxy<double> RectEllipse::property_x1()
+{
+ return Glib::PropertyProxy<double>(this, "x1");
+}
+
+Glib::PropertyProxy_ReadOnly<double> RectEllipse::property_x1() const
+{
+ return Glib::PropertyProxy_ReadOnly<double>(this, "x1");
+}
+
+Glib::PropertyProxy<double> RectEllipse::property_y1()
+{
+ return Glib::PropertyProxy<double>(this, "y1");
+}
+
+Glib::PropertyProxy_ReadOnly<double> RectEllipse::property_y1() const
+{
+ return Glib::PropertyProxy_ReadOnly<double>(this, "y1");
+}
+
+Glib::PropertyProxy<double> RectEllipse::property_x2()
+{
+ return Glib::PropertyProxy<double>(this, "x2");
+}
+
+Glib::PropertyProxy_ReadOnly<double> RectEllipse::property_x2() const
+{
+ return Glib::PropertyProxy_ReadOnly<double>(this, "x2");
+}
+
+Glib::PropertyProxy<double> RectEllipse::property_y2()
+{
+ return Glib::PropertyProxy<double>(this, "y2");
+}
+
+Glib::PropertyProxy_ReadOnly<double> RectEllipse::property_y2() const
+{
+ return Glib::PropertyProxy_ReadOnly<double>(this, "y2");
+}
+
+
+} // namespace Canvas
+
+} // namespace Gnome
+
+
diff --git a/libs/libgnomecanvasmm/libgnomecanvasmm/rect-ellipse.h b/libs/libgnomecanvasmm/libgnomecanvasmm/rect-ellipse.h
new file mode 100644
index 0000000000..9982ce34b2
--- /dev/null
+++ b/libs/libgnomecanvasmm/libgnomecanvasmm/rect-ellipse.h
@@ -0,0 +1,196 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _LIBGNOMECANVASMM_RECT_ELLIPSE_H
+#define _LIBGNOMECANVASMM_RECT_ELLIPSE_H
+
+#include <glibmm.h>
+
+// -*- C++ -*-
+/* $Id$ */
+
+/* canvas-ellipse.h
+ *
+ * Copyright (C) 1998 EMC Capital Management Inc.
+ * Developed by Havoc Pennington <hp@pobox.com>
+ *
+ * Copyright (C) 1999 The Gtk-- Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <libgnomecanvasmm/shape.h>
+//#include <libgnomecanvasmm/group.h>
+#include <libgnomecanvas/gnome-canvas-rect-ellipse.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GnomeCanvasRE GnomeCanvasRE;
+typedef struct _GnomeCanvasREClass GnomeCanvasREClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gnome
+{
+
+namespace Canvas
+{ class RectEllipse_Class; } // namespace Canvas
+
+} // namespace Gnome
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+/** Abstract class for all rectangular shapes
+ * Corresponds to GnomeCanvasRE in libgnomecanvas
+ */
+
+class RectEllipse : public Shape
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef RectEllipse CppObjectType;
+ typedef RectEllipse_Class CppClassType;
+ typedef GnomeCanvasRE BaseObjectType;
+ typedef GnomeCanvasREClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~RectEllipse();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class RectEllipse_Class;
+ static CppClassType rectellipse_class_;
+
+ // noncopyable
+ RectEllipse(const RectEllipse&);
+ RectEllipse& operator=(const RectEllipse&);
+
+protected:
+ explicit RectEllipse(const Glib::ConstructParams& construct_params);
+ explicit RectEllipse(GnomeCanvasRE* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GnomeCanvasRE* gobj() { return reinterpret_cast<GnomeCanvasRE*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GnomeCanvasRE* gobj() const { return reinterpret_cast<GnomeCanvasRE*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+public:
+ explicit RectEllipse(Group& parent);
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<double> property_x1() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<double> property_x1() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<double> property_y1() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<double> property_y1() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<double> property_x2() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<double> property_x2() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<double> property_y2() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<double> property_y2() const;
+
+
+};
+
+} /* namespace Canvas */
+} /* namespace Gnome */
+
+namespace Glib
+{
+ /** @relates Gnome::Canvas::RectEllipse
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gnome::Canvas::RectEllipse* wrap(GnomeCanvasRE* object, bool take_copy = false);
+}
+#endif /* _LIBGNOMECANVASMM_RECT_ELLIPSE_H */
+
diff --git a/libs/libgnomecanvasmm/libgnomecanvasmm/rect.cc b/libs/libgnomecanvasmm/libgnomecanvasmm/rect.cc
new file mode 100644
index 0000000000..68bc53a756
--- /dev/null
+++ b/libs/libgnomecanvasmm/libgnomecanvasmm/rect.cc
@@ -0,0 +1,146 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <libgnomecanvasmm/rect.h>
+#include <libgnomecanvasmm/private/rect_p.h>
+
+/* $Id$ */
+
+/* rect.c
+ *
+ * Copyright (C) 1998 EMC Capital Management Inc.
+ * Developed by Havoc Pennington <hp@pobox.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+Rect::Rect(Group& parentx, double x1, double y1, double x2, double y2)
+: RectEllipse(GNOME_CANVAS_RE(g_object_new(get_type(),0)))
+{
+ item_construct(parentx);
+ set("x1",x1,"y1",y1,"x2",x2,"y2",y2,0);
+}
+
+Rect::Rect(Group& parentx)
+: RectEllipse(GNOME_CANVAS_RE(g_object_new(get_type(),0)))
+{
+ item_construct(parentx);
+}
+
+} /* namespace Canvas */
+} /* namespace Gnome */
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gnome::Canvas::Rect* wrap(GnomeCanvasRect* object, bool take_copy)
+{
+ return dynamic_cast<Gnome::Canvas::Rect *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Rect_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Rect_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gnome_canvas_rect_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Rect_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* Rect_Class::wrap_new(GObject* o)
+{
+ return manage(new Rect((GnomeCanvasRect*)(o)));
+
+}
+
+
+/* The implementation: */
+
+Rect::Rect(const Glib::ConstructParams& construct_params)
+:
+ RectEllipse(construct_params)
+{
+ }
+
+Rect::Rect(GnomeCanvasRect* castitem)
+:
+ RectEllipse((GnomeCanvasRE*)(castitem))
+{
+ }
+
+Rect::~Rect()
+{
+ destroy_();
+}
+
+Rect::CppClassType Rect::rect_class_; // initialize static member
+
+GType Rect::get_type()
+{
+ return rect_class_.init().get_type();
+}
+
+GType Rect::get_base_type()
+{
+ return gnome_canvas_rect_get_type();
+}
+
+
+} // namespace Canvas
+
+} // namespace Gnome
+
+
diff --git a/libs/libgnomecanvasmm/libgnomecanvasmm/rect.h b/libs/libgnomecanvasmm/libgnomecanvasmm/rect.h
new file mode 100644
index 0000000000..cebd0c4655
--- /dev/null
+++ b/libs/libgnomecanvasmm/libgnomecanvasmm/rect.h
@@ -0,0 +1,132 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _LIBGNOMECANVASMM_RECT_H
+#define _LIBGNOMECANVASMM_RECT_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* rect.h
+ *
+ * Copyright (C) 1998 EMC Capital Management Inc.
+ * Developed by Havoc Pennington <hp@pobox.com>
+ *
+ * Copyright (C) 1999 The Gtk-- Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <libgnomecanvasmm/item.h>
+#include <libgnomecanvasmm/group.h>
+#include <libgnomecanvasmm/rect-ellipse.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GnomeCanvasRect GnomeCanvasRect;
+typedef struct _GnomeCanvasRectClass GnomeCanvasRectClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gnome
+{
+
+namespace Canvas
+{ class Rect_Class; } // namespace Canvas
+
+} // namespace Gnome
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+//class Group;
+
+
+class Rect : public RectEllipse
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Rect CppObjectType;
+ typedef Rect_Class CppClassType;
+ typedef GnomeCanvasRect BaseObjectType;
+ typedef GnomeCanvasRectClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~Rect();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class Rect_Class;
+ static CppClassType rect_class_;
+
+ // noncopyable
+ Rect(const Rect&);
+ Rect& operator=(const Rect&);
+
+protected:
+ explicit Rect(const Glib::ConstructParams& construct_params);
+ explicit Rect(GnomeCanvasRect* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GnomeCanvasRect* gobj() { return reinterpret_cast<GnomeCanvasRect*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GnomeCanvasRect* gobj() const { return reinterpret_cast<GnomeCanvasRect*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+
+public:
+ Rect(Group& parent, double x1, double y1, double x2, double y2);
+ explicit Rect(Group& parent);
+
+
+};
+
+} /* namespace Canvas */
+} /* namespace Gnome */
+
+namespace Glib
+{
+ /** @relates Gnome::Canvas::Rect
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gnome::Canvas::Rect* wrap(GnomeCanvasRect* object, bool take_copy = false);
+}
+#endif /* _LIBGNOMECANVASMM_RECT_H */
+
diff --git a/libs/libgnomecanvasmm/libgnomecanvasmm/rich-text.cc b/libs/libgnomecanvasmm/libgnomecanvasmm/rich-text.cc
new file mode 100644
index 0000000000..87978b2b1b
--- /dev/null
+++ b/libs/libgnomecanvasmm/libgnomecanvasmm/rich-text.cc
@@ -0,0 +1,475 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <libgnomecanvasmm/rich-text.h>
+#include <libgnomecanvasmm/private/rich-text_p.h>
+
+/* $Id$ */
+
+/* rich-text.cc
+ *
+ * Copyright (C) 2002 The libgnomecanvasmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+RichText::RichText (Group& parent,
+ double x, double y,
+ const Glib::ustring& text)
+ : Item (GNOME_CANVAS_ITEM (g_object_new (get_type (), NULL)))
+{
+ item_construct (parent);
+ set ("x", x,
+ "y", y,
+ "text", text.c_str (),
+ NULL);
+}
+
+RichText::RichText (Group& parent)
+ : Item (GNOME_CANVAS_ITEM (g_object_new (get_type (), NULL)))
+{
+ item_construct (parent);
+}
+
+RichText::iterator RichText::get_iter_at_location(int x, int y) const
+{
+ iterator iter;
+ gnome_canvas_rich_text_get_iter_at_location(const_cast<GnomeCanvasRichText*>(gobj()), iter.gobj(), x, y);
+ return iter;
+}
+
+
+}
+
+}
+
+
+namespace
+{
+
+void RichText_signal_tag_changed_callback(GnomeCanvasRichText* self, GtkTextTag* tag,void* data)
+{
+ using namespace Gnome::Canvas;
+ typedef sigc::slot< void,const Glib::RefPtr<Gtk::TextTag>& > SlotType;
+
+ // Do not try to call a signal on a disassociated wrapper.
+ if(Glib::ObjectBase::_get_current_wrapper((GObject*) self))
+ {
+ try
+ {
+ if(sigc::slot_base *const slot = Glib::SignalProxyNormal::data_to_slot(data))
+ (*static_cast<SlotType*>(slot))(Glib::wrap(tag, true)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+}
+
+const Glib::SignalProxyInfo RichText_signal_tag_changed_info =
+{
+ "tag_changed",
+ (GCallback) &RichText_signal_tag_changed_callback,
+ (GCallback) &RichText_signal_tag_changed_callback
+};
+
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gnome::Canvas::RichText* wrap(GnomeCanvasRichText* object, bool take_copy)
+{
+ return dynamic_cast<Gnome::Canvas::RichText *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& RichText_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &RichText_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gnome_canvas_rich_text_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void RichText_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+ klass->tag_changed = &tag_changed_callback;
+}
+
+
+void RichText_Class::tag_changed_callback(GnomeCanvasRichText* self, GtkTextTag* tag)
+{
+ CppObjectType *const obj = dynamic_cast<CppObjectType*>(
+ Glib::ObjectBase::_get_current_wrapper((GObject*)self));
+
+ // Non-gtkmmproc-generated custom classes implicitly call the default
+ // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
+ // generated classes can use this optimisation, which avoids the unnecessary
+ // parameter conversions if there is no possibility of the virtual function
+ // being overridden:
+ if(obj && obj->is_derived_())
+ {
+ try // Trap C++ exceptions which would normally be lost because this is a C callback.
+ {
+ // Call the virtual member method, which derived classes might override.
+ obj->on_tag_changed(Glib::wrap(tag, true)
+);
+ }
+ catch(...)
+ {
+ Glib::exception_handlers_invoke();
+ }
+ }
+ else
+ {
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(self)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ // Call the original underlying C function:
+ if(base && base->tag_changed)
+ (*base->tag_changed)(self, tag);
+ }
+}
+
+
+Glib::ObjectBase* RichText_Class::wrap_new(GObject* o)
+{
+ return manage(new RichText((GnomeCanvasRichText*)(o)));
+
+}
+
+
+/* The implementation: */
+
+RichText::RichText(const Glib::ConstructParams& construct_params)
+:
+ Item(construct_params)
+{
+ }
+
+RichText::RichText(GnomeCanvasRichText* castitem)
+:
+ Item((GnomeCanvasItem*)(castitem))
+{
+ }
+
+RichText::~RichText()
+{
+ destroy_();
+}
+
+RichText::CppClassType RichText::richtext_class_; // initialize static member
+
+GType RichText::get_type()
+{
+ return richtext_class_.init().get_type();
+}
+
+GType RichText::get_base_type()
+{
+ return gnome_canvas_rich_text_get_type();
+}
+
+
+void RichText::cut_clipboard()
+{
+ gnome_canvas_rich_text_cut_clipboard(gobj());
+}
+
+void RichText::copy_clipboard()
+{
+ gnome_canvas_rich_text_copy_clipboard(gobj());
+}
+
+void RichText::paste_clipboard()
+{
+ gnome_canvas_rich_text_paste_clipboard(gobj());
+}
+
+void RichText::set_buffer(const Glib::RefPtr<Gtk::TextBuffer>& buffer)
+{
+ gnome_canvas_rich_text_set_buffer(gobj(), Glib::unwrap(buffer));
+}
+
+Glib::RefPtr<Gtk::TextBuffer> RichText::get_buffer() const
+{
+ return Glib::wrap(gnome_canvas_rich_text_get_buffer(const_cast<GnomeCanvasRichText*>(gobj())));
+}
+
+void RichText::get_iter_location(const iterator& iter, Gdk::Rectangle& location) const
+{
+ gnome_canvas_rich_text_get_iter_location(const_cast<GnomeCanvasRichText*>(gobj()), (iter).gobj(), (location).gobj());
+}
+
+
+Glib::SignalProxy1< void,const Glib::RefPtr<Gtk::TextTag>& > RichText::signal_tag_changed()
+{
+ return Glib::SignalProxy1< void,const Glib::RefPtr<Gtk::TextTag>& >(this, &RichText_signal_tag_changed_info);
+}
+
+
+Glib::PropertyProxy<Glib::ustring> RichText::property_text()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "text");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> RichText::property_text() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "text");
+}
+
+Glib::PropertyProxy<double> RichText::property_x()
+{
+ return Glib::PropertyProxy<double>(this, "x");
+}
+
+Glib::PropertyProxy_ReadOnly<double> RichText::property_x() const
+{
+ return Glib::PropertyProxy_ReadOnly<double>(this, "x");
+}
+
+Glib::PropertyProxy<double> RichText::property_y()
+{
+ return Glib::PropertyProxy<double>(this, "y");
+}
+
+Glib::PropertyProxy_ReadOnly<double> RichText::property_y() const
+{
+ return Glib::PropertyProxy_ReadOnly<double>(this, "y");
+}
+
+Glib::PropertyProxy<double> RichText::property_width()
+{
+ return Glib::PropertyProxy<double>(this, "width");
+}
+
+Glib::PropertyProxy_ReadOnly<double> RichText::property_width() const
+{
+ return Glib::PropertyProxy_ReadOnly<double>(this, "width");
+}
+
+Glib::PropertyProxy<double> RichText::property_height()
+{
+ return Glib::PropertyProxy<double>(this, "height");
+}
+
+Glib::PropertyProxy_ReadOnly<double> RichText::property_height() const
+{
+ return Glib::PropertyProxy_ReadOnly<double>(this, "height");
+}
+
+Glib::PropertyProxy<bool> RichText::property_editable()
+{
+ return Glib::PropertyProxy<bool>(this, "editable");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> RichText::property_editable() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "editable");
+}
+
+Glib::PropertyProxy<bool> RichText::property_visible()
+{
+ return Glib::PropertyProxy<bool>(this, "visible");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> RichText::property_visible() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "visible");
+}
+
+Glib::PropertyProxy<bool> RichText::property_cursor_visible()
+{
+ return Glib::PropertyProxy<bool>(this, "cursor-visible");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> RichText::property_cursor_visible() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "cursor-visible");
+}
+
+Glib::PropertyProxy<bool> RichText::property_cursor_blink()
+{
+ return Glib::PropertyProxy<bool>(this, "cursor-blink");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> RichText::property_cursor_blink() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "cursor-blink");
+}
+
+Glib::PropertyProxy<bool> RichText::property_grow_height()
+{
+ return Glib::PropertyProxy<bool>(this, "grow-height");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> RichText::property_grow_height() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "grow-height");
+}
+
+Glib::PropertyProxy<Gtk::WrapMode> RichText::property_wrap_mode()
+{
+ return Glib::PropertyProxy<Gtk::WrapMode>(this, "wrap-mode");
+}
+
+Glib::PropertyProxy_ReadOnly<Gtk::WrapMode> RichText::property_wrap_mode() const
+{
+ return Glib::PropertyProxy_ReadOnly<Gtk::WrapMode>(this, "wrap-mode");
+}
+
+Glib::PropertyProxy<Gtk::Justification> RichText::property_justification()
+{
+ return Glib::PropertyProxy<Gtk::Justification>(this, "justification");
+}
+
+Glib::PropertyProxy_ReadOnly<Gtk::Justification> RichText::property_justification() const
+{
+ return Glib::PropertyProxy_ReadOnly<Gtk::Justification>(this, "justification");
+}
+
+Glib::PropertyProxy<Gtk::DirectionType> RichText::property_direction()
+{
+ return Glib::PropertyProxy<Gtk::DirectionType>(this, "direction");
+}
+
+Glib::PropertyProxy_ReadOnly<Gtk::DirectionType> RichText::property_direction() const
+{
+ return Glib::PropertyProxy_ReadOnly<Gtk::DirectionType>(this, "direction");
+}
+
+Glib::PropertyProxy<Gtk::AnchorType> RichText::property_anchor()
+{
+ return Glib::PropertyProxy<Gtk::AnchorType>(this, "anchor");
+}
+
+Glib::PropertyProxy_ReadOnly<Gtk::AnchorType> RichText::property_anchor() const
+{
+ return Glib::PropertyProxy_ReadOnly<Gtk::AnchorType>(this, "anchor");
+}
+
+Glib::PropertyProxy<int> RichText::property_pixels_above_lines()
+{
+ return Glib::PropertyProxy<int>(this, "pixels-above-lines");
+}
+
+Glib::PropertyProxy_ReadOnly<int> RichText::property_pixels_above_lines() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "pixels-above-lines");
+}
+
+Glib::PropertyProxy<int> RichText::property_pixels_below_lines()
+{
+ return Glib::PropertyProxy<int>(this, "pixels-below-lines");
+}
+
+Glib::PropertyProxy_ReadOnly<int> RichText::property_pixels_below_lines() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "pixels-below-lines");
+}
+
+Glib::PropertyProxy<int> RichText::property_pixels_inside_wrap()
+{
+ return Glib::PropertyProxy<int>(this, "pixels-inside-wrap");
+}
+
+Glib::PropertyProxy_ReadOnly<int> RichText::property_pixels_inside_wrap() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "pixels-inside-wrap");
+}
+
+Glib::PropertyProxy<int> RichText::property_left_margin()
+{
+ return Glib::PropertyProxy<int>(this, "left-margin");
+}
+
+Glib::PropertyProxy_ReadOnly<int> RichText::property_left_margin() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "left-margin");
+}
+
+Glib::PropertyProxy<int> RichText::property_right_margin()
+{
+ return Glib::PropertyProxy<int>(this, "right-margin");
+}
+
+Glib::PropertyProxy_ReadOnly<int> RichText::property_right_margin() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "right-margin");
+}
+
+Glib::PropertyProxy<int> RichText::property_indent()
+{
+ return Glib::PropertyProxy<int>(this, "indent");
+}
+
+Glib::PropertyProxy_ReadOnly<int> RichText::property_indent() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "indent");
+}
+
+
+void Gnome::Canvas::RichText::on_tag_changed(const Glib::RefPtr<Gtk::TextTag>& tag)
+{
+ BaseClassType *const base = static_cast<BaseClassType*>(
+ g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_)) // Get the parent class of the object class (The original underlying C class).
+ );
+
+ if(base && base->tag_changed)
+ (*base->tag_changed)(gobj(),Glib::unwrap(tag));
+}
+
+
+} // namespace Canvas
+
+} // namespace Gnome
+
+
diff --git a/libs/libgnomecanvasmm/libgnomecanvasmm/rich-text.h b/libs/libgnomecanvasmm/libgnomecanvasmm/rich-text.h
new file mode 100644
index 0000000000..32af1680e4
--- /dev/null
+++ b/libs/libgnomecanvasmm/libgnomecanvasmm/rich-text.h
@@ -0,0 +1,472 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _LIBGNOMECANVASMM_RICH_TEXT_H
+#define _LIBGNOMECANVASMM_RICH_TEXT_H
+
+#include <glibmm.h>
+
+// -*- C++ -*-
+/* $Id$ */
+
+/* rich-text.h
+ *
+ *
+ * Copyright (C) 2002 The libgnomecanvasmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtkmm/textbuffer.h>
+#include <libgnomecanvasmm/item.h>
+#include <libgnomecanvas/gnome-canvas-rich-text.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GnomeCanvasRichText GnomeCanvasRichText;
+typedef struct _GnomeCanvasRichTextClass GnomeCanvasRichTextClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gnome
+{
+
+namespace Canvas
+{ class RichText_Class; } // namespace Canvas
+
+} // namespace Gnome
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+
+class RichText : public Item
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef RichText CppObjectType;
+ typedef RichText_Class CppClassType;
+ typedef GnomeCanvasRichText BaseObjectType;
+ typedef GnomeCanvasRichTextClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~RichText();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class RichText_Class;
+ static CppClassType richtext_class_;
+
+ // noncopyable
+ RichText(const RichText&);
+ RichText& operator=(const RichText&);
+
+protected:
+ explicit RichText(const Glib::ConstructParams& construct_params);
+ explicit RichText(GnomeCanvasRichText* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GnomeCanvasRichText* gobj() { return reinterpret_cast<GnomeCanvasRichText*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GnomeCanvasRichText* gobj() const { return reinterpret_cast<GnomeCanvasRichText*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+ virtual void on_tag_changed(const Glib::RefPtr<Gtk::TextTag>& tag);
+
+
+private:
+
+
+public:
+ typedef Gtk::TextIter iterator;
+
+ RichText(Group& parent, double x, double y, const Glib::ustring& text);
+ explicit RichText(Group& parent);
+
+
+ void cut_clipboard();
+
+ void copy_clipboard();
+
+ void paste_clipboard();
+
+
+ void set_buffer(const Glib::RefPtr<Gtk::TextBuffer>& buffer);
+
+ Glib::RefPtr<Gtk::TextBuffer> get_buffer() const;
+
+
+ void get_iter_location(const iterator& iter, Gdk::Rectangle& location) const;
+ iterator get_iter_at_location(int x, int y) const;
+
+
+ Glib::SignalProxy1< void,const Glib::RefPtr<Gtk::TextTag>& > signal_tag_changed();
+
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_text() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_text() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<double> property_x() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<double> property_x() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<double> property_y() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<double> property_y() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<double> property_width() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<double> property_width() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<double> property_height() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<double> property_height() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_editable() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_editable() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_visible() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_visible() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_cursor_visible() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_cursor_visible() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_cursor_blink() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_cursor_blink() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_grow_height() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_grow_height() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Gtk::WrapMode> property_wrap_mode() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Gtk::WrapMode> property_wrap_mode() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Gtk::Justification> property_justification() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Gtk::Justification> property_justification() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Gtk::DirectionType> property_direction() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Gtk::DirectionType> property_direction() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Gtk::AnchorType> property_anchor() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Gtk::AnchorType> property_anchor() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_pixels_above_lines() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_pixels_above_lines() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_pixels_below_lines() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_pixels_below_lines() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_pixels_inside_wrap() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_pixels_inside_wrap() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_left_margin() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_left_margin() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_right_margin() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_right_margin() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_indent() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_indent() const;
+
+
+};
+
+} /* namespace Canvas */
+} /* namespace Gnome */
+
+namespace Glib
+{
+ /** @relates Gnome::Canvas::RichText
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gnome::Canvas::RichText* wrap(GnomeCanvasRichText* object, bool take_copy = false);
+}
+#endif /* _LIBGNOMECANVASMM_RICH_TEXT_H */
+
diff --git a/libs/libgnomecanvasmm/libgnomecanvasmm/shape.cc b/libs/libgnomecanvasmm/libgnomecanvasmm/shape.cc
new file mode 100644
index 0000000000..98dedc0cf8
--- /dev/null
+++ b/libs/libgnomecanvasmm/libgnomecanvasmm/shape.cc
@@ -0,0 +1,272 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <libgnomecanvasmm/shape.h>
+#include <libgnomecanvasmm/private/shape_p.h>
+
+/* shape.cc
+ *
+ * Copyright (C) 2002 The libgnomecanvasmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gnome::Canvas::Shape* wrap(GnomeCanvasShape* object, bool take_copy)
+{
+ return dynamic_cast<Gnome::Canvas::Shape *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Shape_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Shape_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gnome_canvas_shape_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Shape_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* Shape_Class::wrap_new(GObject* o)
+{
+ return manage(new Shape((GnomeCanvasShape*)(o)));
+
+}
+
+
+/* The implementation: */
+
+Shape::Shape(const Glib::ConstructParams& construct_params)
+:
+ Item(construct_params)
+{
+ }
+
+Shape::Shape(GnomeCanvasShape* castitem)
+:
+ Item((GnomeCanvasItem*)(castitem))
+{
+ }
+
+Shape::~Shape()
+{
+ destroy_();
+}
+
+Shape::CppClassType Shape::shape_class_; // initialize static member
+
+GType Shape::get_type()
+{
+ return shape_class_.init().get_type();
+}
+
+GType Shape::get_base_type()
+{
+ return gnome_canvas_shape_get_type();
+}
+
+
+Glib::PropertyProxy_WriteOnly<Glib::ustring> Shape::property_fill_color()
+{
+ return Glib::PropertyProxy_WriteOnly<Glib::ustring>(this, "fill-color");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> Shape::property_fill_color() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "fill-color");
+}
+
+Glib::PropertyProxy<Gdk::Color> Shape::property_fill_color_gdk()
+{
+ return Glib::PropertyProxy<Gdk::Color>(this, "fill-color-gdk");
+}
+
+Glib::PropertyProxy_ReadOnly<Gdk::Color> Shape::property_fill_color_gdk() const
+{
+ return Glib::PropertyProxy_ReadOnly<Gdk::Color>(this, "fill-color-gdk");
+}
+
+Glib::PropertyProxy<guint> Shape::property_fill_color_rgba()
+{
+ return Glib::PropertyProxy<guint>(this, "fill-color-rgba");
+}
+
+Glib::PropertyProxy_ReadOnly<guint> Shape::property_fill_color_rgba() const
+{
+ return Glib::PropertyProxy_ReadOnly<guint>(this, "fill-color-rgba");
+}
+
+Glib::PropertyProxy_WriteOnly<Glib::ustring> Shape::property_outline_color()
+{
+ return Glib::PropertyProxy_WriteOnly<Glib::ustring>(this, "outline-color");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> Shape::property_outline_color() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "outline-color");
+}
+
+Glib::PropertyProxy<Gdk::Color> Shape::property_outline_color_gdk()
+{
+ return Glib::PropertyProxy<Gdk::Color>(this, "outline-color-gdk");
+}
+
+Glib::PropertyProxy_ReadOnly<Gdk::Color> Shape::property_outline_color_gdk() const
+{
+ return Glib::PropertyProxy_ReadOnly<Gdk::Color>(this, "outline-color-gdk");
+}
+
+Glib::PropertyProxy<guint> Shape::property_outline_color_rgba()
+{
+ return Glib::PropertyProxy<guint>(this, "outline-color-rgba");
+}
+
+Glib::PropertyProxy_ReadOnly<guint> Shape::property_outline_color_rgba() const
+{
+ return Glib::PropertyProxy_ReadOnly<guint>(this, "outline-color-rgba");
+}
+
+Glib::PropertyProxy< Glib::RefPtr<Gdk::Bitmap> > Shape::property_fill_stipple()
+{
+ return Glib::PropertyProxy< Glib::RefPtr<Gdk::Bitmap> >(this, "fill-stipple");
+}
+
+Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Bitmap> > Shape::property_fill_stipple() const
+{
+ return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Bitmap> >(this, "fill-stipple");
+}
+
+Glib::PropertyProxy< Glib::RefPtr<Gdk::Bitmap> > Shape::property_outline_stipple()
+{
+ return Glib::PropertyProxy< Glib::RefPtr<Gdk::Bitmap> >(this, "outline-stipple");
+}
+
+Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Bitmap> > Shape::property_outline_stipple() const
+{
+ return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Bitmap> >(this, "outline-stipple");
+}
+
+Glib::PropertyProxy<guint> Shape::property_width_pixels()
+{
+ return Glib::PropertyProxy<guint>(this, "width-pixels");
+}
+
+Glib::PropertyProxy_ReadOnly<guint> Shape::property_width_pixels() const
+{
+ return Glib::PropertyProxy_ReadOnly<guint>(this, "width-pixels");
+}
+
+Glib::PropertyProxy_WriteOnly<double> Shape::property_width_units()
+{
+ return Glib::PropertyProxy_WriteOnly<double>(this, "width-units");
+}
+
+Glib::PropertyProxy_ReadOnly<double> Shape::property_width_units() const
+{
+ return Glib::PropertyProxy_ReadOnly<double>(this, "width-units");
+}
+
+Glib::PropertyProxy<Gdk::CapStyle> Shape::property_cap_style()
+{
+ return Glib::PropertyProxy<Gdk::CapStyle>(this, "cap-style");
+}
+
+Glib::PropertyProxy_ReadOnly<Gdk::CapStyle> Shape::property_cap_style() const
+{
+ return Glib::PropertyProxy_ReadOnly<Gdk::CapStyle>(this, "cap-style");
+}
+
+Glib::PropertyProxy<Gdk::JoinStyle> Shape::property_join_style()
+{
+ return Glib::PropertyProxy<Gdk::JoinStyle>(this, "join-style");
+}
+
+Glib::PropertyProxy_ReadOnly<Gdk::JoinStyle> Shape::property_join_style() const
+{
+ return Glib::PropertyProxy_ReadOnly<Gdk::JoinStyle>(this, "join-style");
+}
+
+Glib::PropertyProxy<guint> Shape::property_wind()
+{
+ return Glib::PropertyProxy<guint>(this, "wind");
+}
+
+Glib::PropertyProxy_ReadOnly<guint> Shape::property_wind() const
+{
+ return Glib::PropertyProxy_ReadOnly<guint>(this, "wind");
+}
+
+Glib::PropertyProxy<double> Shape::property_miterlimit()
+{
+ return Glib::PropertyProxy<double>(this, "miterlimit");
+}
+
+Glib::PropertyProxy_ReadOnly<double> Shape::property_miterlimit() const
+{
+ return Glib::PropertyProxy_ReadOnly<double>(this, "miterlimit");
+}
+
+Glib::PropertyProxy<ArtVpathDash*> Shape::property_dash()
+{
+ return Glib::PropertyProxy<ArtVpathDash*>(this, "dash");
+}
+
+Glib::PropertyProxy_ReadOnly<ArtVpathDash*> Shape::property_dash() const
+{
+ return Glib::PropertyProxy_ReadOnly<ArtVpathDash*>(this, "dash");
+}
+
+
+} // namespace Canvas
+
+} // namespace Gnome
+
+
diff --git a/libs/libgnomecanvasmm/libgnomecanvasmm/shape.h b/libs/libgnomecanvasmm/libgnomecanvasmm/shape.h
new file mode 100644
index 0000000000..e1ff6e84f0
--- /dev/null
+++ b/libs/libgnomecanvasmm/libgnomecanvasmm/shape.h
@@ -0,0 +1,368 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _LIBGNOMECANVASMM_SHAPE_H
+#define _LIBGNOMECANVASMM_SHAPE_H
+
+#include <glibmm.h>
+
+// -*- C++ -*-
+/* $Id$ */
+
+/* shape.h
+ *
+ *
+ * Copyright (C) 2002 The libgnomecanvasmm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <libgnomecanvasmm/item.h>
+#include <libgnomecanvas/gnome-canvas-shape.h>
+#include <libart_lgpl/art_vpath_dash.h> //For ArtVpathDash
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GnomeCanvasShape GnomeCanvasShape;
+typedef struct _GnomeCanvasShapeClass GnomeCanvasShapeClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gnome
+{
+
+namespace Canvas
+{ class Shape_Class; } // namespace Canvas
+
+} // namespace Gnome
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+
+class Shape : public Item
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Shape CppObjectType;
+ typedef Shape_Class CppClassType;
+ typedef GnomeCanvasShape BaseObjectType;
+ typedef GnomeCanvasShapeClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~Shape();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class Shape_Class;
+ static CppClassType shape_class_;
+
+ // noncopyable
+ Shape(const Shape&);
+ Shape& operator=(const Shape&);
+
+protected:
+ explicit Shape(const Glib::ConstructParams& construct_params);
+ explicit Shape(GnomeCanvasShape* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GnomeCanvasShape* gobj() { return reinterpret_cast<GnomeCanvasShape*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GnomeCanvasShape* gobj() const { return reinterpret_cast<GnomeCanvasShape*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+
+public:
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_WriteOnly<Glib::ustring> property_fill_color() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_fill_color() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Gdk::Color> property_fill_color_gdk() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Gdk::Color> property_fill_color_gdk() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<guint> property_fill_color_rgba() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<guint> property_fill_color_rgba() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_WriteOnly<Glib::ustring> property_outline_color() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_outline_color() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Gdk::Color> property_outline_color_gdk() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Gdk::Color> property_outline_color_gdk() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<guint> property_outline_color_rgba() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<guint> property_outline_color_rgba() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy< Glib::RefPtr<Gdk::Bitmap> > property_fill_stipple() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Bitmap> > property_fill_stipple() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy< Glib::RefPtr<Gdk::Bitmap> > property_outline_stipple() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Bitmap> > property_outline_stipple() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<guint> property_width_pixels() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<guint> property_width_pixels() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_WriteOnly<double> property_width_units() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<double> property_width_units() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Gdk::CapStyle> property_cap_style() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Gdk::CapStyle> property_cap_style() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Gdk::JoinStyle> property_join_style() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Gdk::JoinStyle> property_join_style() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<guint> property_wind() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<guint> property_wind() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<double> property_miterlimit() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<double> property_miterlimit() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<ArtVpathDash*> property_dash() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<ArtVpathDash*> property_dash() const;
+ //TODO: Look at ArtVpathDash to see if it should be wrapped.
+
+
+};
+
+} /* namespace Canvas */
+} /* namespace Gnome */
+
+namespace Glib
+{
+ /** @relates Gnome::Canvas::Shape
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gnome::Canvas::Shape* wrap(GnomeCanvasShape* object, bool take_copy = false);
+}
+#endif /* _LIBGNOMECANVASMM_SHAPE_H */
+
diff --git a/libs/libgnomecanvasmm/libgnomecanvasmm/text.cc b/libs/libgnomecanvasmm/libgnomecanvasmm/text.cc
new file mode 100644
index 0000000000..62ccc4b981
--- /dev/null
+++ b/libs/libgnomecanvasmm/libgnomecanvasmm/text.cc
@@ -0,0 +1,557 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <libgnomecanvasmm/text.h>
+#include <libgnomecanvasmm/private/text_p.h>
+
+/* $Id$ */
+
+/* text.cc
+ *
+ * Copyright (C) 1998 EMC Capital Management Inc.
+ * Developed by Havoc Pennington <hp@pobox.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+Text::Text(Group& parentx, double x, double y, const Glib::ustring& text)
+ : Item(GNOME_CANVAS_ITEM(g_object_new(get_type(), 0)))
+{
+ item_construct(parentx);
+ set("x", x, "y", y, "text", text.c_str(), 0);
+}
+
+Text::Text(Group& parentx)
+ : Item(GNOME_CANVAS_ITEM(g_object_new(get_type(), 0)))
+{
+ item_construct(parentx);
+}
+
+} /* namespace Canvas */
+} /* namespace Gnome */
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gnome::Canvas::Text* wrap(GnomeCanvasText* object, bool take_copy)
+{
+ return dynamic_cast<Gnome::Canvas::Text *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Text_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Text_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gnome_canvas_text_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Text_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* Text_Class::wrap_new(GObject* o)
+{
+ return manage(new Text((GnomeCanvasText*)(o)));
+
+}
+
+
+/* The implementation: */
+
+Text::Text(const Glib::ConstructParams& construct_params)
+:
+ Item(construct_params)
+{
+ }
+
+Text::Text(GnomeCanvasText* castitem)
+:
+ Item((GnomeCanvasItem*)(castitem))
+{
+ }
+
+Text::~Text()
+{
+ destroy_();
+}
+
+Text::CppClassType Text::text_class_; // initialize static member
+
+GType Text::get_type()
+{
+ return text_class_.init().get_type();
+}
+
+GType Text::get_base_type()
+{
+ return gnome_canvas_text_get_type();
+}
+
+
+Glib::PropertyProxy<Glib::ustring> Text::property_text()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "text");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> Text::property_text() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "text");
+}
+
+Glib::PropertyProxy_WriteOnly<Glib::ustring> Text::property_markup()
+{
+ return Glib::PropertyProxy_WriteOnly<Glib::ustring>(this, "markup");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> Text::property_markup() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "markup");
+}
+
+Glib::PropertyProxy<double> Text::property_x()
+{
+ return Glib::PropertyProxy<double>(this, "x");
+}
+
+Glib::PropertyProxy_ReadOnly<double> Text::property_x() const
+{
+ return Glib::PropertyProxy_ReadOnly<double>(this, "x");
+}
+
+Glib::PropertyProxy<double> Text::property_y()
+{
+ return Glib::PropertyProxy<double>(this, "y");
+}
+
+Glib::PropertyProxy_ReadOnly<double> Text::property_y() const
+{
+ return Glib::PropertyProxy_ReadOnly<double>(this, "y");
+}
+
+Glib::PropertyProxy<Glib::ustring> Text::property_font()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "font");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> Text::property_font() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "font");
+}
+
+Glib::PropertyProxy<Pango::FontDescription> Text::property_font_desc()
+{
+ return Glib::PropertyProxy<Pango::FontDescription>(this, "font-desc");
+}
+
+Glib::PropertyProxy_ReadOnly<Pango::FontDescription> Text::property_font_desc() const
+{
+ return Glib::PropertyProxy_ReadOnly<Pango::FontDescription>(this, "font-desc");
+}
+
+Glib::PropertyProxy<Glib::ustring> Text::property_family()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "family");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> Text::property_family() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "family");
+}
+
+Glib::PropertyProxy<bool> Text::property_family_set()
+{
+ return Glib::PropertyProxy<bool>(this, "family-set");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Text::property_family_set() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "family-set");
+}
+
+Glib::PropertyProxy<Pango::AttrList> Text::property_attributes()
+{
+ return Glib::PropertyProxy<Pango::AttrList>(this, "attributes");
+}
+
+Glib::PropertyProxy_ReadOnly<Pango::AttrList> Text::property_attributes() const
+{
+ return Glib::PropertyProxy_ReadOnly<Pango::AttrList>(this, "attributes");
+}
+
+Glib::PropertyProxy<Pango::Style> Text::property_style()
+{
+ return Glib::PropertyProxy<Pango::Style>(this, "style");
+}
+
+Glib::PropertyProxy_ReadOnly<Pango::Style> Text::property_style() const
+{
+ return Glib::PropertyProxy_ReadOnly<Pango::Style>(this, "style");
+}
+
+Glib::PropertyProxy<bool> Text::property_style_set()
+{
+ return Glib::PropertyProxy<bool>(this, "style-set");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Text::property_style_set() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "style-set");
+}
+
+Glib::PropertyProxy<Pango::Variant> Text::property_variant()
+{
+ return Glib::PropertyProxy<Pango::Variant>(this, "variant");
+}
+
+Glib::PropertyProxy_ReadOnly<Pango::Variant> Text::property_variant() const
+{
+ return Glib::PropertyProxy_ReadOnly<Pango::Variant>(this, "variant");
+}
+
+Glib::PropertyProxy<bool> Text::property_variant_set()
+{
+ return Glib::PropertyProxy<bool>(this, "variant-set");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Text::property_variant_set() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "variant-set");
+}
+
+Glib::PropertyProxy<int> Text::property_weight()
+{
+ return Glib::PropertyProxy<int>(this, "weight");
+}
+
+Glib::PropertyProxy_ReadOnly<int> Text::property_weight() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "weight");
+}
+
+Glib::PropertyProxy<bool> Text::property_weight_set()
+{
+ return Glib::PropertyProxy<bool>(this, "weight-set");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Text::property_weight_set() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "weight-set");
+}
+
+Glib::PropertyProxy<Pango::Weight> Text::property_stretch()
+{
+ return Glib::PropertyProxy<Pango::Weight>(this, "stretch");
+}
+
+Glib::PropertyProxy_ReadOnly<Pango::Weight> Text::property_stretch() const
+{
+ return Glib::PropertyProxy_ReadOnly<Pango::Weight>(this, "stretch");
+}
+
+Glib::PropertyProxy<bool> Text::property_stretch_set()
+{
+ return Glib::PropertyProxy<bool>(this, "stretch-set");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Text::property_stretch_set() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "stretch-set");
+}
+
+Glib::PropertyProxy<int> Text::property_size()
+{
+ return Glib::PropertyProxy<int>(this, "size");
+}
+
+Glib::PropertyProxy_ReadOnly<int> Text::property_size() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "size");
+}
+
+Glib::PropertyProxy<bool> Text::property_size_set()
+{
+ return Glib::PropertyProxy<bool>(this, "size-set");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Text::property_size_set() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "size-set");
+}
+
+Glib::PropertyProxy<double> Text::property_size_points()
+{
+ return Glib::PropertyProxy<double>(this, "size-points");
+}
+
+Glib::PropertyProxy_ReadOnly<double> Text::property_size_points() const
+{
+ return Glib::PropertyProxy_ReadOnly<double>(this, "size-points");
+}
+
+Glib::PropertyProxy<bool> Text::property_strikethrough()
+{
+ return Glib::PropertyProxy<bool>(this, "strikethrough");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Text::property_strikethrough() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "strikethrough");
+}
+
+Glib::PropertyProxy<bool> Text::property_strikethrough_set()
+{
+ return Glib::PropertyProxy<bool>(this, "strikethrough-set");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Text::property_strikethrough_set() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "strikethrough-set");
+}
+
+Glib::PropertyProxy<Pango::Underline> Text::property_underline()
+{
+ return Glib::PropertyProxy<Pango::Underline>(this, "underline");
+}
+
+Glib::PropertyProxy_ReadOnly<Pango::Underline> Text::property_underline() const
+{
+ return Glib::PropertyProxy_ReadOnly<Pango::Underline>(this, "underline");
+}
+
+Glib::PropertyProxy<bool> Text::property_underline_set()
+{
+ return Glib::PropertyProxy<bool>(this, "underline-set");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Text::property_underline_set() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "underline-set");
+}
+
+Glib::PropertyProxy<int> Text::property_rise()
+{
+ return Glib::PropertyProxy<int>(this, "rise");
+}
+
+Glib::PropertyProxy_ReadOnly<int> Text::property_rise() const
+{
+ return Glib::PropertyProxy_ReadOnly<int>(this, "rise");
+}
+
+Glib::PropertyProxy<bool> Text::property_rise_set()
+{
+ return Glib::PropertyProxy<bool>(this, "rise-set");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Text::property_rise_set() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "rise-set");
+}
+
+Glib::PropertyProxy<double> Text::property_scale()
+{
+ return Glib::PropertyProxy<double>(this, "scale");
+}
+
+Glib::PropertyProxy_ReadOnly<double> Text::property_scale() const
+{
+ return Glib::PropertyProxy_ReadOnly<double>(this, "scale");
+}
+
+Glib::PropertyProxy<bool> Text::property_scale_set()
+{
+ return Glib::PropertyProxy<bool>(this, "scale-set");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Text::property_scale_set() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "scale-set");
+}
+
+Glib::PropertyProxy<Gtk::AnchorType> Text::property_anchor()
+{
+ return Glib::PropertyProxy<Gtk::AnchorType>(this, "anchor");
+}
+
+Glib::PropertyProxy_ReadOnly<Gtk::AnchorType> Text::property_anchor() const
+{
+ return Glib::PropertyProxy_ReadOnly<Gtk::AnchorType>(this, "anchor");
+}
+
+Glib::PropertyProxy<Gtk::Justification> Text::property_justification()
+{
+ return Glib::PropertyProxy<Gtk::Justification>(this, "justification");
+}
+
+Glib::PropertyProxy_ReadOnly<Gtk::Justification> Text::property_justification() const
+{
+ return Glib::PropertyProxy_ReadOnly<Gtk::Justification>(this, "justification");
+}
+
+Glib::PropertyProxy<double> Text::property_clip_width()
+{
+ return Glib::PropertyProxy<double>(this, "clip-width");
+}
+
+Glib::PropertyProxy_ReadOnly<double> Text::property_clip_width() const
+{
+ return Glib::PropertyProxy_ReadOnly<double>(this, "clip-width");
+}
+
+Glib::PropertyProxy<double> Text::property_clip_height()
+{
+ return Glib::PropertyProxy<double>(this, "clip-height");
+}
+
+Glib::PropertyProxy_ReadOnly<double> Text::property_clip_height() const
+{
+ return Glib::PropertyProxy_ReadOnly<double>(this, "clip-height");
+}
+
+Glib::PropertyProxy<bool> Text::property_clip()
+{
+ return Glib::PropertyProxy<bool>(this, "clip");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Text::property_clip() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "clip");
+}
+
+Glib::PropertyProxy<double> Text::property_x_offset()
+{
+ return Glib::PropertyProxy<double>(this, "x-offset");
+}
+
+Glib::PropertyProxy_ReadOnly<double> Text::property_x_offset() const
+{
+ return Glib::PropertyProxy_ReadOnly<double>(this, "x-offset");
+}
+
+Glib::PropertyProxy<double> Text::property_y_offset()
+{
+ return Glib::PropertyProxy<double>(this, "y-offset");
+}
+
+Glib::PropertyProxy_ReadOnly<double> Text::property_y_offset() const
+{
+ return Glib::PropertyProxy_ReadOnly<double>(this, "y-offset");
+}
+
+Glib::PropertyProxy<Glib::ustring> Text::property_fill_color()
+{
+ return Glib::PropertyProxy<Glib::ustring>(this, "fill-color");
+}
+
+Glib::PropertyProxy_ReadOnly<Glib::ustring> Text::property_fill_color() const
+{
+ return Glib::PropertyProxy_ReadOnly<Glib::ustring>(this, "fill-color");
+}
+
+Glib::PropertyProxy<Gdk::Color> Text::property_fill_color_gdk()
+{
+ return Glib::PropertyProxy<Gdk::Color>(this, "fill-color-gdk");
+}
+
+Glib::PropertyProxy_ReadOnly<Gdk::Color> Text::property_fill_color_gdk() const
+{
+ return Glib::PropertyProxy_ReadOnly<Gdk::Color>(this, "fill-color-gdk");
+}
+
+Glib::PropertyProxy<guint> Text::property_fill_color_rgba()
+{
+ return Glib::PropertyProxy<guint>(this, "fill-color-rgba");
+}
+
+Glib::PropertyProxy_ReadOnly<guint> Text::property_fill_color_rgba() const
+{
+ return Glib::PropertyProxy_ReadOnly<guint>(this, "fill-color-rgba");
+}
+
+Glib::PropertyProxy< Glib::RefPtr<Gdk::Bitmap> > Text::property_fill_stipple()
+{
+ return Glib::PropertyProxy< Glib::RefPtr<Gdk::Bitmap> >(this, "fill-stipple");
+}
+
+Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Bitmap> > Text::property_fill_stipple() const
+{
+ return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Bitmap> >(this, "fill-stipple");
+}
+
+Glib::PropertyProxy<double> Text::property_text_width()
+{
+ return Glib::PropertyProxy<double>(this, "text-width");
+}
+
+Glib::PropertyProxy_ReadOnly<double> Text::property_text_width() const
+{
+ return Glib::PropertyProxy_ReadOnly<double>(this, "text-width");
+}
+
+Glib::PropertyProxy<double> Text::property_text_height()
+{
+ return Glib::PropertyProxy<double>(this, "text-height");
+}
+
+Glib::PropertyProxy_ReadOnly<double> Text::property_text_height() const
+{
+ return Glib::PropertyProxy_ReadOnly<double>(this, "text-height");
+}
+
+
+} // namespace Canvas
+
+} // namespace Gnome
+
+
diff --git a/libs/libgnomecanvasmm/libgnomecanvasmm/text.h b/libs/libgnomecanvasmm/libgnomecanvasmm/text.h
new file mode 100644
index 0000000000..d73285c5af
--- /dev/null
+++ b/libs/libgnomecanvasmm/libgnomecanvasmm/text.h
@@ -0,0 +1,788 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _LIBGNOMECANVASMM_TEXT_H
+#define _LIBGNOMECANVASMM_TEXT_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* text.h
+ *
+ * Copyright (C) 1998 EMC Capital Management Inc.
+ * Developed by Havoc Pennington <hp@pobox.com>
+ *
+ * Copyright (C) 1999 The Gtk-- Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <libgnomecanvasmm/item.h>
+#include <pangomm/attrlist.h>
+#include <gtkmm/enums.h>
+#include <libgnomecanvas/gnome-canvas-text.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GnomeCanvasText GnomeCanvasText;
+typedef struct _GnomeCanvasTextClass GnomeCanvasTextClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gnome
+{
+
+namespace Canvas
+{ class Text_Class; } // namespace Canvas
+
+} // namespace Gnome
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+class Group;
+
+
+class Text : public Item
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Text CppObjectType;
+ typedef Text_Class CppClassType;
+ typedef GnomeCanvasText BaseObjectType;
+ typedef GnomeCanvasTextClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~Text();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class Text_Class;
+ static CppClassType text_class_;
+
+ // noncopyable
+ Text(const Text&);
+ Text& operator=(const Text&);
+
+protected:
+ explicit Text(const Glib::ConstructParams& construct_params);
+ explicit Text(GnomeCanvasText* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GnomeCanvasText* gobj() { return reinterpret_cast<GnomeCanvasText*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GnomeCanvasText* gobj() const { return reinterpret_cast<GnomeCanvasText*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+public:
+ Text(Group& parent, double x, double y, const Glib::ustring& text);
+ explicit Text(Group& parent);
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_text() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_text() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_WriteOnly<Glib::ustring> property_markup() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_markup() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<double> property_x() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<double> property_x() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<double> property_y() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<double> property_y() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_font() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_font() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Pango::FontDescription> property_font_desc() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Pango::FontDescription> property_font_desc() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_family() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_family() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_family_set() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_family_set() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Pango::AttrList> property_attributes() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Pango::AttrList> property_attributes() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Pango::Style> property_style() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Pango::Style> property_style() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_style_set() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_style_set() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Pango::Variant> property_variant() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Pango::Variant> property_variant() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_variant_set() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_variant_set() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_weight() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_weight() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_weight_set() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_weight_set() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Pango::Weight> property_stretch() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Pango::Weight> property_stretch() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_stretch_set() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_stretch_set() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_size() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_size() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_size_set() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_size_set() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<double> property_size_points() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<double> property_size_points() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_strikethrough() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_strikethrough() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_strikethrough_set() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_strikethrough_set() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Pango::Underline> property_underline() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Pango::Underline> property_underline() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_underline_set() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_underline_set() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<int> property_rise() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<int> property_rise() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_rise_set() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_rise_set() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<double> property_scale() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<double> property_scale() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_scale_set() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_scale_set() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Gtk::AnchorType> property_anchor() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Gtk::AnchorType> property_anchor() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Gtk::Justification> property_justification() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Gtk::Justification> property_justification() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<double> property_clip_width() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<double> property_clip_width() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<double> property_clip_height() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<double> property_clip_height() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_clip() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_clip() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<double> property_x_offset() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<double> property_x_offset() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<double> property_y_offset() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<double> property_y_offset() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Glib::ustring> property_fill_color() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Glib::ustring> property_fill_color() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Gdk::Color> property_fill_color_gdk() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Gdk::Color> property_fill_color_gdk() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<guint> property_fill_color_rgba() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<guint> property_fill_color_rgba() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy< Glib::RefPtr<Gdk::Bitmap> > property_fill_stipple() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gdk::Bitmap> > property_fill_stipple() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<double> property_text_width() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<double> property_text_width() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<double> property_text_height() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<double> property_text_height() const;
+
+
+};
+
+} /* namespace Canvas */
+} /* namespace Gnome */
+
+namespace Glib
+{
+ /** @relates Gnome::Canvas::Text
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gnome::Canvas::Text* wrap(GnomeCanvasText* object, bool take_copy = false);
+}
+#endif /* _LIBGNOMECANVASMM_TEXT_H */
+
diff --git a/libs/libgnomecanvasmm/libgnomecanvasmm/widget.cc b/libs/libgnomecanvasmm/libgnomecanvasmm/widget.cc
new file mode 100644
index 0000000000..ab9709f629
--- /dev/null
+++ b/libs/libgnomecanvasmm/libgnomecanvasmm/widget.cc
@@ -0,0 +1,220 @@
+// Generated by gtkmmproc -- DO NOT MODIFY!
+
+#include <libgnomecanvasmm/widget.h>
+#include <libgnomecanvasmm/private/widget_p.h>
+
+/* $Id$ */
+
+/* widget.cc
+ *
+ * Copyright (C) 1998 EMC Capital Management Inc.
+ * Developed by Havoc Pennington <hp@pobox.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#include <stdarg.h>
+#include <gtkmm/widget.h>
+
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+Widget::Widget(Group& parentx, double x, double y,
+ Gtk::Widget& w)
+ : Item(GNOME_CANVAS_ITEM(g_object_new(get_type(),0)))
+{
+ item_construct(parentx);
+ set("x", x, "y", y, "widget",w.gobj(), 0);
+}
+
+Widget::Widget(Group& parentx)
+ : Item(GNOME_CANVAS_ITEM(g_object_new(get_type(),0)))
+{
+ item_construct(parentx);
+}
+
+} /* namespace Canvas */
+} /* namespace Gnome */
+
+
+namespace
+{
+} // anonymous namespace
+
+
+namespace Glib
+{
+
+Gnome::Canvas::Widget* wrap(GnomeCanvasWidget* object, bool take_copy)
+{
+ return dynamic_cast<Gnome::Canvas::Widget *> (Glib::wrap_auto ((GObject*)(object), take_copy));
+}
+
+} /* namespace Glib */
+
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+
+/* The *_Class implementation: */
+
+const Glib::Class& Widget_Class::init()
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &Widget_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(gnome_canvas_widget_get_type());
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+ }
+
+ return *this;
+}
+
+void Widget_Class::class_init_function(void* g_class, void* class_data)
+{
+ BaseClassType *const klass = static_cast<BaseClassType*>(g_class);
+ CppClassParent::class_init_function(klass, class_data);
+
+}
+
+
+Glib::ObjectBase* Widget_Class::wrap_new(GObject* o)
+{
+ return manage(new Widget((GnomeCanvasWidget*)(o)));
+
+}
+
+
+/* The implementation: */
+
+Widget::Widget(const Glib::ConstructParams& construct_params)
+:
+ Item(construct_params)
+{
+ }
+
+Widget::Widget(GnomeCanvasWidget* castitem)
+:
+ Item((GnomeCanvasItem*)(castitem))
+{
+ }
+
+Widget::~Widget()
+{
+ destroy_();
+}
+
+Widget::CppClassType Widget::widget_class_; // initialize static member
+
+GType Widget::get_type()
+{
+ return widget_class_.init().get_type();
+}
+
+GType Widget::get_base_type()
+{
+ return gnome_canvas_widget_get_type();
+}
+
+
+Glib::PropertyProxy<Gtk::Widget*> Widget::property_widget()
+{
+ return Glib::PropertyProxy<Gtk::Widget*>(this, "widget");
+}
+
+Glib::PropertyProxy_ReadOnly<Gtk::Widget*> Widget::property_widget() const
+{
+ return Glib::PropertyProxy_ReadOnly<Gtk::Widget*>(this, "widget");
+}
+
+Glib::PropertyProxy<double> Widget::property_x()
+{
+ return Glib::PropertyProxy<double>(this, "x");
+}
+
+Glib::PropertyProxy_ReadOnly<double> Widget::property_x() const
+{
+ return Glib::PropertyProxy_ReadOnly<double>(this, "x");
+}
+
+Glib::PropertyProxy<double> Widget::property_y()
+{
+ return Glib::PropertyProxy<double>(this, "y");
+}
+
+Glib::PropertyProxy_ReadOnly<double> Widget::property_y() const
+{
+ return Glib::PropertyProxy_ReadOnly<double>(this, "y");
+}
+
+Glib::PropertyProxy<double> Widget::property_width()
+{
+ return Glib::PropertyProxy<double>(this, "width");
+}
+
+Glib::PropertyProxy_ReadOnly<double> Widget::property_width() const
+{
+ return Glib::PropertyProxy_ReadOnly<double>(this, "width");
+}
+
+Glib::PropertyProxy<double> Widget::property_height()
+{
+ return Glib::PropertyProxy<double>(this, "height");
+}
+
+Glib::PropertyProxy_ReadOnly<double> Widget::property_height() const
+{
+ return Glib::PropertyProxy_ReadOnly<double>(this, "height");
+}
+
+Glib::PropertyProxy<Gtk::AnchorType> Widget::property_anchor()
+{
+ return Glib::PropertyProxy<Gtk::AnchorType>(this, "anchor");
+}
+
+Glib::PropertyProxy_ReadOnly<Gtk::AnchorType> Widget::property_anchor() const
+{
+ return Glib::PropertyProxy_ReadOnly<Gtk::AnchorType>(this, "anchor");
+}
+
+Glib::PropertyProxy<bool> Widget::property_size_pixels()
+{
+ return Glib::PropertyProxy<bool>(this, "size-pixels");
+}
+
+Glib::PropertyProxy_ReadOnly<bool> Widget::property_size_pixels() const
+{
+ return Glib::PropertyProxy_ReadOnly<bool>(this, "size-pixels");
+}
+
+
+} // namespace Canvas
+
+} // namespace Gnome
+
+
diff --git a/libs/libgnomecanvasmm/libgnomecanvasmm/widget.h b/libs/libgnomecanvasmm/libgnomecanvasmm/widget.h
new file mode 100644
index 0000000000..0a087f23b3
--- /dev/null
+++ b/libs/libgnomecanvasmm/libgnomecanvasmm/widget.h
@@ -0,0 +1,244 @@
+// -*- c++ -*-
+// Generated by gtkmmproc -- DO NOT MODIFY!
+#ifndef _LIBGNOMECANVASMM_WIDGET_H
+#define _LIBGNOMECANVASMM_WIDGET_H
+
+#include <glibmm.h>
+
+/* $Id$ */
+
+/* widget.h
+ *
+ * Copyright (C) 1998 EMC Capital Management Inc.
+ * Developed by Havoc Pennington <hp@pobox.com>
+ *
+ * Copyright (C) 1999 The Gtk-- Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <libgnomecanvasmm/item.h>
+#include <libgnomecanvas/gnome-canvas-widget.h>
+#include <gtkmm/widget.h>
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+typedef struct _GnomeCanvasWidget GnomeCanvasWidget;
+typedef struct _GnomeCanvasWidgetClass GnomeCanvasWidgetClass;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+
+namespace Gnome
+{
+
+namespace Canvas
+{ class Widget_Class; } // namespace Canvas
+
+} // namespace Gnome
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+class Group;
+
+
+class Widget : public Item
+{
+ public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ typedef Widget CppObjectType;
+ typedef Widget_Class CppClassType;
+ typedef GnomeCanvasWidget BaseObjectType;
+ typedef GnomeCanvasWidgetClass BaseClassType;
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+ virtual ~Widget();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+private:
+ friend class Widget_Class;
+ static CppClassType widget_class_;
+
+ // noncopyable
+ Widget(const Widget&);
+ Widget& operator=(const Widget&);
+
+protected:
+ explicit Widget(const Glib::ConstructParams& construct_params);
+ explicit Widget(GnomeCanvasWidget* castitem);
+
+#endif /* DOXYGEN_SHOULD_SKIP_THIS */
+
+public:
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ static GType get_type() G_GNUC_CONST;
+ static GType get_base_type() G_GNUC_CONST;
+#endif
+
+ ///Provides access to the underlying C GtkObject.
+ GnomeCanvasWidget* gobj() { return reinterpret_cast<GnomeCanvasWidget*>(gobject_); }
+
+ ///Provides access to the underlying C GtkObject.
+ const GnomeCanvasWidget* gobj() const { return reinterpret_cast<GnomeCanvasWidget*>(gobject_); }
+
+
+public:
+ //C++ methods used to invoke GTK+ virtual functions:
+
+protected:
+ //GTK+ Virtual Functions (override these to change behaviour):
+
+ //Default Signal Handlers::
+
+
+private:
+
+public:
+ Widget(Group& parent, double x, double y, Gtk::Widget& w);
+ explicit Widget(Group& parent);
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Gtk::Widget*> property_widget() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Gtk::Widget*> property_widget() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<double> property_x() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<double> property_x() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<double> property_y() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<double> property_y() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<double> property_width() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<double> property_width() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<double> property_height() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<double> property_height() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<Gtk::AnchorType> property_anchor() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<Gtk::AnchorType> property_anchor() const;
+
+ /**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy<bool> property_size_pixels() ;
+
+/**
+ *
+ * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
+ * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
+ * the value of the property changes.
+ */
+ Glib::PropertyProxy_ReadOnly<bool> property_size_pixels() const;
+
+
+};
+
+} /* namespace Canvas */
+} /* namespace Gnome */
+
+
+namespace Glib
+{
+ /** @relates Gnome::Canvas::Widget
+ * @param object The C instance
+ * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
+ * @result A C++ instance that wraps this C instance.
+ */
+ Gnome::Canvas::Widget* wrap(GnomeCanvasWidget* object, bool take_copy = false);
+}
+#endif /* _LIBGNOMECANVASMM_WIDGET_H */
+
diff --git a/libs/libgnomecanvasmm/libgnomecanvasmm/wrap_init.cc b/libs/libgnomecanvasmm/libgnomecanvasmm/wrap_init.cc
new file mode 100644
index 0000000000..dc7ccd26f1
--- /dev/null
+++ b/libs/libgnomecanvasmm/libgnomecanvasmm/wrap_init.cc
@@ -0,0 +1,116 @@
+
+#include <glib.h>
+
+// Disable the 'const' function attribute of the get_type() functions.
+// GCC would optimize them out because we don't use the return value.
+#undef G_GNUC_CONST
+#define G_GNUC_CONST /* empty */
+
+#include <libgnomecanvasmm/wrap_init.h>
+#include <glibmm/error.h>
+#include <glibmm/object.h>
+
+// #include the widget headers so that we can call the get_type() static methods:
+
+#include "canvas.h"
+#include "ellipse.h"
+#include "rect.h"
+#include "group.h"
+#include "item.h"
+#include "line.h"
+#include "polygon.h"
+#include "rect-ellipse.h"
+#include "shape.h"
+#include "pixbuf.h"
+#include "rich-text.h"
+#include "text.h"
+#include "widget.h"
+#include "path-def.h"
+#include "bpath.h"
+
+extern "C"
+{
+
+//Declarations of the *_get_type() functions:
+
+GType gnome_canvas_bpath_get_type(void);
+GType gnome_canvas_get_type(void);
+GType gnome_canvas_ellipse_get_type(void);
+GType gnome_canvas_group_get_type(void);
+GType gnome_canvas_item_get_type(void);
+GType gnome_canvas_line_get_type(void);
+GType gnome_canvas_pixbuf_get_type(void);
+GType gnome_canvas_polygon_get_type(void);
+GType gnome_canvas_rect_get_type(void);
+GType gnome_canvas_re_get_type(void);
+GType gnome_canvas_rich_text_get_type(void);
+GType gnome_canvas_shape_get_type(void);
+GType gnome_canvas_text_get_type(void);
+GType gnome_canvas_widget_get_type(void);
+
+//Declarations of the *_error_quark() functions:
+
+} // extern "C"
+
+
+//Declarations of the *_Class::wrap_new() methods, instead of including all the private headers:
+
+namespace Gnome { namespace Canvas { class Bpath_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; } }
+namespace Gnome { namespace Canvas { class Canvas_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; } }
+namespace Gnome { namespace Canvas { class Ellipse_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; } }
+namespace Gnome { namespace Canvas { class Group_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; } }
+namespace Gnome { namespace Canvas { class Item_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; } }
+namespace Gnome { namespace Canvas { class Line_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; } }
+namespace Gnome { namespace Canvas { class Pixbuf_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; } }
+namespace Gnome { namespace Canvas { class Polygon_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; } }
+namespace Gnome { namespace Canvas { class Rect_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; } }
+namespace Gnome { namespace Canvas { class RectEllipse_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; } }
+namespace Gnome { namespace Canvas { class RichText_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; } }
+namespace Gnome { namespace Canvas { class Shape_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; } }
+namespace Gnome { namespace Canvas { class Text_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; } }
+namespace Gnome { namespace Canvas { class Widget_Class { public: static Glib::ObjectBase* wrap_new(GObject*); }; } }
+
+namespace Gnome { namespace Canvas {
+
+void wrap_init()
+{
+ // Register Error domains:
+
+// Map gtypes to gtkmm wrapper-creation functions:
+ Glib::wrap_register(gnome_canvas_bpath_get_type(), &Gnome::Canvas::Bpath_Class::wrap_new);
+ Glib::wrap_register(gnome_canvas_get_type(), &Gnome::Canvas::Canvas_Class::wrap_new);
+ Glib::wrap_register(gnome_canvas_ellipse_get_type(), &Gnome::Canvas::Ellipse_Class::wrap_new);
+ Glib::wrap_register(gnome_canvas_group_get_type(), &Gnome::Canvas::Group_Class::wrap_new);
+ Glib::wrap_register(gnome_canvas_item_get_type(), &Gnome::Canvas::Item_Class::wrap_new);
+ Glib::wrap_register(gnome_canvas_line_get_type(), &Gnome::Canvas::Line_Class::wrap_new);
+ Glib::wrap_register(gnome_canvas_pixbuf_get_type(), &Gnome::Canvas::Pixbuf_Class::wrap_new);
+ Glib::wrap_register(gnome_canvas_polygon_get_type(), &Gnome::Canvas::Polygon_Class::wrap_new);
+ Glib::wrap_register(gnome_canvas_rect_get_type(), &Gnome::Canvas::Rect_Class::wrap_new);
+ Glib::wrap_register(gnome_canvas_re_get_type(), &Gnome::Canvas::RectEllipse_Class::wrap_new);
+ Glib::wrap_register(gnome_canvas_rich_text_get_type(), &Gnome::Canvas::RichText_Class::wrap_new);
+ Glib::wrap_register(gnome_canvas_shape_get_type(), &Gnome::Canvas::Shape_Class::wrap_new);
+ Glib::wrap_register(gnome_canvas_text_get_type(), &Gnome::Canvas::Text_Class::wrap_new);
+ Glib::wrap_register(gnome_canvas_widget_get_type(), &Gnome::Canvas::Widget_Class::wrap_new);
+
+ // Register the gtkmm gtypes:
+ Gnome::Canvas::Bpath::get_type();
+ Gnome::Canvas::Canvas::get_type();
+ Gnome::Canvas::Ellipse::get_type();
+ Gnome::Canvas::Group::get_type();
+ Gnome::Canvas::Item::get_type();
+ Gnome::Canvas::Line::get_type();
+ Gnome::Canvas::Pixbuf::get_type();
+ Gnome::Canvas::Polygon::get_type();
+ Gnome::Canvas::Rect::get_type();
+ Gnome::Canvas::RectEllipse::get_type();
+ Gnome::Canvas::RichText::get_type();
+ Gnome::Canvas::Shape::get_type();
+ Gnome::Canvas::Text::get_type();
+ Gnome::Canvas::Widget::get_type();
+
+} // wrap_init()
+
+} //Canvas
+} //Gnome
+
+
diff --git a/libs/libgnomecanvasmm/libgnomecanvasmm/wrap_init.h b/libs/libgnomecanvasmm/libgnomecanvasmm/wrap_init.h
new file mode 100644
index 0000000000..0438dc43e3
--- /dev/null
+++ b/libs/libgnomecanvasmm/libgnomecanvasmm/wrap_init.h
@@ -0,0 +1,36 @@
+#ifndef _LIBGNOMECANVASMM_WRAP_INIT_H
+#define _LIBGNOMECANVASMM_WRAP_INIT_H
+
+/* wrap_init.h
+ *
+ * Copyright (C) 1998-2001 The libgnomeuimm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+// wrap_init.cc is generated by tools/generate_wrap_init.pl
+
+namespace Gnome
+{
+
+namespace Canvas
+{
+
+void wrap_init();
+
+} /* namespace Canvas */
+} /* namespace Gnome */
+
+#endif // _LIBGNOMECANVASMM_WRAP_INIT_H
diff --git a/libs/libgnomecanvasmm/libgnomecanvasmmconfig.h b/libs/libgnomecanvasmm/libgnomecanvasmmconfig.h
new file mode 100644
index 0000000000..a1d3378c29
--- /dev/null
+++ b/libs/libgnomecanvasmm/libgnomecanvasmmconfig.h
@@ -0,0 +1,11 @@
+#ifndef _LIBGNOMEUIMM_CONFIG_H
+#define _LIBGNOMEUIMM_CONFIG_H 1
+
+#include <gtkmmconfig.h>
+
+/* version numbers */
+#define LIBGNOMEUIMM_MAJOR_VERSION 2
+#define LIBGNOMEUIMM_MINOR_VERSION 10
+#define LIBGNOMEUIMM_MICRO_VERSION 0
+
+#endif /* _LIBGNOMEUIMM_CONFIG_H */
diff --git a/libs/midi++2/.cvsignore b/libs/midi++2/.cvsignore
new file mode 100644
index 0000000000..b1322ae10d
--- /dev/null
+++ b/libs/midi++2/.cvsignore
@@ -0,0 +1,3 @@
+libmidi++.pc
+libmidi++.spec
+version.cc
diff --git a/libs/midi++2/AUTHORS b/libs/midi++2/AUTHORS
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/libs/midi++2/AUTHORS
diff --git a/libs/midi++2/COPYING b/libs/midi++2/COPYING
new file mode 100644
index 0000000000..d60c31a97a
--- /dev/null
+++ b/libs/midi++2/COPYING
@@ -0,0 +1,340 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/libs/midi++2/ChangeLog b/libs/midi++2/ChangeLog
new file mode 100644
index 0000000000..c40b4b5e82
--- /dev/null
+++ b/libs/midi++2/ChangeLog
@@ -0,0 +1,9 @@
+2005-05-08 Taybin Rutkin <taybin@earthlink.net>
+ * Brought up Jesse's CoreMIDI threading fix.
+
+2005-04-14 Taybin Rutkin <taybin@earthlink.net>
+ * Brought up Paul's parser fix from midi++ 1.16.
+
+2005-04-01 Taybin Rutkin <taybin@earthlink.net>
+ * Updated for sigc++-2.0.
+ * Incremented version number to 2.0.0.
diff --git a/libs/midi++2/NEWS b/libs/midi++2/NEWS
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/libs/midi++2/NEWS
diff --git a/libs/midi++2/README b/libs/midi++2/README
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/libs/midi++2/README
diff --git a/libs/midi++2/SConscript b/libs/midi++2/SConscript
new file mode 100644
index 0000000000..7c2d3964ce
--- /dev/null
+++ b/libs/midi++2/SConscript
@@ -0,0 +1,48 @@
+# -*- python -*-
+
+import glob
+
+Import('env libraries')
+
+midi2 = env.Copy()
+midi2.Merge([ libraries['sigc2'], libraries['xml'], libraries['pbd3'] ])
+
+domain = 'midipp'
+
+midi2.Append(DOMAIN=domain,MAJOR=2,MINOR=1,MICRO=1)
+
+sources = Split("""
+fd_midiport.cc
+fifomidi.cc
+midi.cc
+midichannel.cc
+midicontrollable.cc
+midifactory.cc
+midimanager.cc
+midiparser.cc
+midiport.cc
+mmc.cc
+mtc.cc
+port_request.cc
+version.cc
+""")
+
+sysdep_sources = Split ("""
+alsa_sequencer_midiport.cc
+coremidi_midiport.cc
+""")
+
+if env['SYSMIDI'] == 'CoreMIDI':
+ sysdep_src = [ 'coremidi_midiport.cc' ]
+ midi2.Append (CCFLAGS="-DWITH_COREMIDI")
+else:
+ sysdep_src = [ 'alsa_sequencer_midiport.cc' ]
+ midi2.Append (CCFLAGS="-DWITH_ALSA")
+
+midi2.Append(CCFLAGS="-D_REENTRANT -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE")
+midi2.Append(CCFLAGS="-DLIBSIGC_DISABLE_DEPRECATED")
+
+midi2.VersionBuild(['version.cc','midi++/version.h'], 'SConscript')
+
+libmidi2 = midi2.StaticLibrary('midi++', [ sources, sysdep_src ])
+Default(libmidi2)
diff --git a/libs/midi++2/alsa_sequencer_midiport.cc b/libs/midi++2/alsa_sequencer_midiport.cc
new file mode 100644
index 0000000000..e0f6ad33e9
--- /dev/null
+++ b/libs/midi++2/alsa_sequencer_midiport.cc
@@ -0,0 +1,156 @@
+/*
+ Copyright (C) 2004 Paul Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#include <fcntl.h>
+#include <cerrno>
+
+#include <midi++/types.h>
+#include <midi++/alsa_sequencer.h>
+#include <midi++/port_request.h>
+
+//#define DOTRACE 1
+
+#ifdef DOTRACE
+#define TR_FN() (cerr << __FUNCTION__ << endl)
+#define TR_VAL(v) (cerr << __FILE__ " " << __LINE__ << " " #v "=" << v << endl)
+#else
+#define TR_FN()
+#define TR_VAL(v)
+#endif
+
+
+
+
+using namespace std;
+using namespace MIDI;
+
+ALSA_SequencerMidiPort::ALSA_SequencerMidiPort (PortRequest &req)
+ : Port (req)
+ , seq (0)
+ , decoder (0)
+ , encoder (0)
+{
+ TR_FN();
+ int err;
+ if (0 <= (err = CreatePorts (req)) &&
+ 0 <= (err = snd_midi_event_new (1024, &decoder)) && // Length taken from ARDOUR::Session::midi_read ()
+ 0 <= (err = snd_midi_event_new (64, &encoder))) { // Length taken from ARDOUR::Session::mmc_buffer
+ snd_midi_event_init (decoder);
+ snd_midi_event_init (encoder);
+ _ok = true;
+ req.status = PortRequest::OK;
+ } else
+ req.status = PortRequest::Unknown;
+}
+
+ALSA_SequencerMidiPort::~ALSA_SequencerMidiPort ()
+{
+ if (decoder)
+ snd_midi_event_free (decoder);
+ if (encoder)
+ snd_midi_event_free (encoder);
+ if (seq)
+ snd_seq_close (seq);
+}
+
+int ALSA_SequencerMidiPort::selectable () const
+{
+ struct pollfd pfd[1];
+ if (0 <= snd_seq_poll_descriptors (seq, pfd, 1, POLLIN | POLLOUT)) {
+ return pfd[0].fd;
+ }
+ return -1;
+}
+
+int ALSA_SequencerMidiPort::write (byte *msg, size_t msglen)
+{
+ TR_FN ();
+ int R;
+ snd_midi_event_reset_encode (encoder);
+ int nwritten = snd_midi_event_encode (encoder, msg, msglen, &SEv);
+ TR_VAL (nwritten);
+ if (0 < nwritten) {
+ if (0 <= (R = snd_seq_event_output (seq, &SEv)) &&
+ 0 <= (R = snd_seq_drain_output (seq))) {
+ bytes_written += nwritten;
+ if (output_parser) {
+ output_parser->raw_preparse (*output_parser, msg, nwritten);
+ for (int i = 0; i < nwritten; i++) {
+ output_parser->scanner (msg[i]);
+ }
+ output_parser->raw_postparse (*output_parser, msg, nwritten);
+ }
+ return nwritten;
+ } else {
+ TR_VAL(R);
+ return R;
+ }
+ } else
+ return nwritten;
+}
+
+int ALSA_SequencerMidiPort::read (byte *buf, size_t max)
+{
+ TR_FN();
+ int err;
+ snd_seq_event_t *ev;
+ if (0 <= (err = snd_seq_event_input (seq, &ev))) {
+ TR_VAL(err);
+ err = snd_midi_event_decode (decoder, buf, max, ev);
+ }
+
+ if (err > 0) {
+ bytes_read += err;
+
+ if (input_parser) {
+ input_parser->raw_preparse (*input_parser, buf, err);
+ for (int i = 0; i < err; i++) {
+ input_parser->scanner (buf[i]);
+ }
+ input_parser->raw_postparse (*input_parser, buf, err);
+ }
+ }
+ return -ENOENT == err ? 0 : err;
+}
+
+int ALSA_SequencerMidiPort::CreatePorts (PortRequest &req)
+{
+ int err;
+ if (0 <= (err = snd_seq_open(&seq, "default", SND_SEQ_OPEN_DUPLEX,
+ (req.mode & O_NONBLOCK) ? SND_SEQ_NONBLOCK : 0))) {
+ snd_seq_set_client_name (seq, req.devname);
+ unsigned int caps = 0;
+ if (req.mode == O_WRONLY || req.mode == O_RDWR)
+ caps |= SND_SEQ_PORT_CAP_WRITE | SND_SEQ_PORT_CAP_SUBS_WRITE;
+ if (req.mode == O_RDONLY || req.mode == O_RDWR)
+ caps |= SND_SEQ_PORT_CAP_READ | SND_SEQ_PORT_CAP_SUBS_READ;
+ err = snd_seq_create_simple_port (seq, req.tagname, caps, SND_SEQ_PORT_TYPE_MIDI_GENERIC);
+ if (err >= 0) {
+ port_id = err;
+ snd_seq_ev_clear (&SEv);
+ snd_seq_ev_set_source (&SEv, port_id);
+ snd_seq_ev_set_subs (&SEv);
+ snd_seq_ev_set_direct (&SEv);
+ } else
+ snd_seq_close (seq);
+ }
+ return err;
+}
+
diff --git a/libs/midi++2/coremidi_midiport.cc b/libs/midi++2/coremidi_midiport.cc
new file mode 100644
index 0000000000..8d1d927b7b
--- /dev/null
+++ b/libs/midi++2/coremidi_midiport.cc
@@ -0,0 +1,144 @@
+/*
+ Copyright (C) 2004 Paul Davis
+ Copyright (C) 2004 Grame
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+*/
+
+#include <fcntl.h>
+#include <cerrno>
+
+#include <midi++/coremidi_midiport.h>
+#include <midi++/types.h>
+#include <midi++/port_request.h>
+#include <mach/mach_time.h>
+
+#include <pbd/pthread_utils.h>
+
+using namespace std;
+using namespace MIDI;
+
+MIDITimeStamp CoreMidi_MidiPort::MIDIGetCurrentHostTime()
+{
+ return mach_absolute_time();
+}
+
+CoreMidi_MidiPort::CoreMidi_MidiPort (PortRequest &req) : Port (req)
+{
+ firstrecv = true;
+ int err;
+ if (0 == (err = Open(req))) {
+ _ok = true;
+ req.status = PortRequest::OK;
+ } else
+ req.status = PortRequest::Unknown;
+}
+
+CoreMidi_MidiPort::~CoreMidi_MidiPort () {Close();}
+
+void CoreMidi_MidiPort::Close ()
+{
+ if (midi_destination) MIDIEndpointDispose(midi_destination);
+ if (midi_source) MIDIEndpointDispose(midi_source);
+ if (midi_client) MIDIClientDispose(midi_client);
+}
+
+int CoreMidi_MidiPort::write (byte *msg, size_t msglen)
+{
+ OSStatus err;
+ MIDIPacketList* pktlist = (MIDIPacketList*)midi_buffer;
+ MIDIPacket* packet = MIDIPacketListInit(pktlist);
+ packet = MIDIPacketListAdd(pktlist,sizeof(midi_buffer),packet,MIDIGetCurrentHostTime(),msglen,msg);
+
+ if (packet) {
+
+ err = MIDIReceived(midi_source,pktlist);
+ if (err != noErr) {
+ //error << "MIDIReceived error" << err << endmsg.
+ }
+
+ bytes_written += msglen;
+ return msglen;
+ }else{
+ return 0;
+ }
+}
+
+int CoreMidi_MidiPort::Open (PortRequest &req)
+{
+ OSStatus err;
+ CFStringRef coutputStr;
+ string str;
+
+ coutputStr = CFStringCreateWithCString(0, req.devname, CFStringGetSystemEncoding());
+ err = MIDIClientCreate(coutputStr, 0, 0, &midi_client);
+ CFRelease(coutputStr);
+ if (!midi_client) {
+ //error << "Cannot open CoreMidi client : " << err << endmsg.
+ goto error;
+ }
+
+ str = req.tagname + string("_in");
+ coutputStr = CFStringCreateWithCString(0, str.c_str(), CFStringGetSystemEncoding());
+ err = MIDIDestinationCreate(midi_client, coutputStr, read_proc, this, &midi_destination);
+ CFRelease(coutputStr);
+ if (!midi_destination) {
+ //error << "Cannot create CoreMidi destination : " << err << endmsg.
+ goto error;
+ }
+
+ str = req.tagname + string("_out");
+ coutputStr = CFStringCreateWithCString(0, str.c_str(), CFStringGetSystemEncoding());
+ err = MIDISourceCreate(midi_client, coutputStr, &midi_source);
+ CFRelease(coutputStr);
+ if (!midi_source) {
+ //error << "Cannot create CoreMidi source : " << err << endmsg.
+ goto error;
+ }
+
+ return err;
+
+error:
+ Close();
+ return err;
+}
+
+void CoreMidi_MidiPort::read_proc (const MIDIPacketList *pktlist, void *refCon, void *connRefCon)
+{
+ CoreMidi_MidiPort* driver = (CoreMidi_MidiPort*)refCon;
+ MIDIPacket *packet = (MIDIPacket *)pktlist->packet;
+
+ if (driver->firstrecv) {
+ driver->firstrecv = false;
+ PBD::ThreadCreated (pthread_self(), "COREMIDI");
+ }
+
+ for (unsigned int i = 0; i < pktlist->numPackets; ++i) {
+
+ driver->bytes_read += packet->length;
+
+ if (driver->input_parser) {
+ driver->input_parser->raw_preparse (*driver->input_parser, packet->data, packet->length);
+ for (int i = 0; i < packet->length; i++) {
+ driver->input_parser->scanner (packet->data[i]);
+ }
+ driver->input_parser->raw_postparse (*driver->input_parser, packet->data, packet->length);
+ }
+
+ packet = MIDIPacketNext(packet);
+ }
+}
+
diff --git a/libs/midi++2/fd_midiport.cc b/libs/midi++2/fd_midiport.cc
new file mode 100644
index 0000000000..2ced63c259
--- /dev/null
+++ b/libs/midi++2/fd_midiport.cc
@@ -0,0 +1,181 @@
+/*
+ Copyright (C) 1999 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#include <fcntl.h>
+#include <cerrno>
+
+#include <pbd/error.h>
+#include <pbd/pathscanner.h>
+
+#include <midi++/types.h>
+#include <midi++/fd_midiport.h>
+
+using namespace std;
+using namespace MIDI;
+
+string *FD_MidiPort::midi_dirpath = 0;
+string *FD_MidiPort::midi_filename_pattern = 0;
+
+FD_MidiPort::FD_MidiPort (PortRequest &req,
+ const string &dirpath,
+ const string &pattern)
+ : Port (req)
+{
+ open (req);
+
+ if (_fd < 0) {
+ switch (errno) {
+ case EBUSY:
+ error << "MIDI: port device in use" << endmsg;
+ req.status = PortRequest::Busy;
+ break;
+ case ENOENT:
+ error << "MIDI: no such port device" << endmsg;
+ req.status = PortRequest::NoSuchFile;
+ break;
+ case EACCES:
+ error << "MIDI: access to port denied" << endmsg;
+ req.status = PortRequest::NotAllowed;
+ break;
+ default:
+ req.status = PortRequest::Unknown;
+ }
+ } else {
+ _ok = true;
+ req.status = PortRequest::OK;
+
+ if (midi_dirpath == 0) {
+ midi_dirpath = new string (dirpath);
+ midi_filename_pattern = new string (pattern);
+ }
+
+ if (req.mode & O_NONBLOCK == 0) {
+ /* we unconditionally set O_NONBLOCK during
+ open, but the request didn't ask for it,
+ so remove it.
+ */
+
+ int flags = fcntl (_fd, F_GETFL, 0);
+ fcntl (_fd, F_SETFL, flags & ~(O_NONBLOCK));
+ }
+ }
+}
+
+void
+FD_MidiPort::open (PortRequest &req)
+
+{
+ int mode = req.mode | O_NONBLOCK;
+ _fd = ::open (req.devname, mode);
+}
+
+vector<string *> *
+FD_MidiPort::list_devices ()
+
+{
+ PathScanner scanner;
+
+ return scanner (*midi_dirpath, *midi_filename_pattern, false, true);
+}
+
+int
+FD_MidiPort::selectable () const
+
+{
+ long flags;
+
+ /* turn on non-blocking mode, since we plan to use select/poll
+ to tell us when there is data to read.
+ */
+
+ flags = fcntl (_fd, F_GETFL);
+ flags |= O_NONBLOCK;
+
+ if (fcntl (_fd, F_SETFL, flags)) {
+ error << "FD_MidiPort: could not turn on non-blocking mode"
+ << " (" << strerror (errno)
+ << ')'
+ << endmsg;
+
+ return -1;
+ }
+
+ return _fd;
+}
+
+
+int
+FD_MidiPort::do_slow_write (byte *msg, unsigned int msglen)
+
+{
+ size_t n;
+ size_t i;
+
+ for (n = 0; n < msglen; n++) {
+
+ if (::write (_fd, &msg[n], 1) != 1) {
+ break;
+ }
+
+ bytes_written++;
+ for (i = 0; i < slowdown * 10000; i++);
+ }
+
+
+ if (n && output_parser) {
+ output_parser->raw_preparse (*output_parser, msg, n);
+ for (unsigned int i = 0; i < n; i++) {
+ output_parser->scanner (msg[i]);
+ }
+ output_parser->raw_postparse (*output_parser, msg, n);
+ }
+
+ return n;
+}
+
+int
+FD_MidiPort::read (byte* buf, size_t max)
+{
+ int nread;
+
+ if ((_mode & O_ACCMODE) == O_WRONLY) {
+ return -EACCES;
+ }
+
+ // cerr << "MIDI: read up to " << max << " from " << _fd << " (" << name() << ')' << endl;
+
+ if ((nread = ::read (_fd, buf, max)) > 0) {
+ bytes_read += nread;
+
+ // cerr << " read " << nread << endl;
+
+ if (input_parser) {
+ input_parser->raw_preparse
+ (*input_parser, buf, nread);
+ for (int i = 0; i < nread; i++) {
+ input_parser->scanner (buf[i]);
+ }
+ input_parser->raw_postparse
+ (*input_parser, buf, nread);
+ }
+ }
+
+ return nread;
+}
diff --git a/libs/midi++2/fifomidi.cc b/libs/midi++2/fifomidi.cc
new file mode 100644
index 0000000000..7bb126ddeb
--- /dev/null
+++ b/libs/midi++2/fifomidi.cc
@@ -0,0 +1,44 @@
+/*
+ Copyright (C) 1998-99 Paul Barton-Davis
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#include <fcntl.h>
+#include <unistd.h>
+#include <errno.h>
+
+#include <midi++/types.h>
+#include <midi++/fifomidi.h>
+
+using namespace MIDI;
+
+FIFO_MidiPort::FIFO_MidiPort (PortRequest &req)
+ : FD_MidiPort (req, ".", "midi")
+
+{
+}
+
+void
+FIFO_MidiPort::open (PortRequest &req)
+
+{
+ /* This is a placeholder for the fun-and-games I think we will
+ need to do with FIFO's.
+ */
+
+ _fd = ::open (req.devname, req.mode|O_NDELAY);
+}
diff --git a/libs/midi++2/libmidi++.pc.in b/libs/midi++2/libmidi++.pc.in
new file mode 100644
index 0000000000..10be08c7a7
--- /dev/null
+++ b/libs/midi++2/libmidi++.pc.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@/midi++
+
+Name: libmidi++
+Version: @VERSION@
+Description: libmidi++, a C++ library for handling MIDI I/O, including MMC and MTC
+Requires: libpbd
+Libs: -L${libdir} -lmidipp @AUDIO_LIBS@ @NON_PKG_LIBS@
+Cflags: -I${includedir} @NON_PKG_CFLAGS@
diff --git a/libs/midi++2/libmidi++.spec.in b/libs/midi++2/libmidi++.spec.in
new file mode 100644
index 0000000000..fbeb6a263a
--- /dev/null
+++ b/libs/midi++2/libmidi++.spec.in
@@ -0,0 +1,71 @@
+Summary: A high level MIDI handling library.
+%define lib_name midi++
+Name: lib%{lib_name}
+Version: @VERSION@
+Release: 2
+Copyright: GPL
+Source: ftp://ftp.quasimodo.org/pub/libs/midi++/current/%{name}-%{version}.tar.gz
+Url: http://www.quasimodo.org
+Vendor: Paul Barton Davis <pbd@op.net>
+Packager: jfm3 <jfm3@acm.org>
+Group: System Environment/Libraries
+Prefix: %{_prefix}
+BuildRoot: %{_tmppath}/%{name}-%{version}-root
+
+%description
+
+libmidi++ is a C++ library that uses libsigc++ to make handling MIDI
+I/O from MIDI hardware trivial. You can attach "callbacks" to any
+MIDI input or output event, ranging from each individual byte, to a
+particular message type on a particular channel. It also provides
+channel "state".
+
+%prep
+%setup -q
+
+%build
+CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" ./configure $ARCH_FLAGS --prefix=%{prefix}
+make
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d -m 755 $RPM_BUILD_ROOT%{prefix}/{{include,lib}/%{lib_name}}
+make install INSTALL="%(which install) -p" prefix=$RPM_BUILD_ROOT%{prefix}
+
+%post
+/sbin/ldconfig
+
+%postun
+/sbin/ldconfig
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root)
+%doc README AUTHORS NEWS COPYING*
+%{prefix}/lib/libmidipp.so*
+
+%package devel
+Summary: A high level MIDI handling library -- develper version.
+Group: System Environment/Libraries
+
+%description devel
+
+libmidi++ is a C++ library that uses libsigc++ to make handling MIDI
+I/O from MIDI hardware trivial. You can attach "callbacks" to any
+MIDI input or output event, ranging from each individual byte, to a
+particular message type on a particular channel. It also provides
+channel "state".
+
+This package holds static libraries and headers needed by developers
+who wish to use libmidi++ in their programs.
+
+%files devel
+%defattr(-,root,root)
+%{prefix}/include/midi++/*
+%{prefix}/lib/libmidipp.a
+%{prefix}/lib/libmidipp.la
+%{prefix}/bin/midi++-config
+%{prefix}/share/aclocal/midi++.m4
+%{prefix}/share/aclocal/midi.m4
diff --git a/libs/midi++2/midi++/.DS_Store b/libs/midi++2/midi++/.DS_Store
new file mode 100644
index 0000000000..5008ddfcf5
--- /dev/null
+++ b/libs/midi++2/midi++/.DS_Store
Binary files differ
diff --git a/libs/midi++2/midi++/.cvsignore b/libs/midi++2/midi++/.cvsignore
new file mode 100644
index 0000000000..67020331ba
--- /dev/null
+++ b/libs/midi++2/midi++/.cvsignore
@@ -0,0 +1 @@
+version.h
diff --git a/libs/midi++2/midi++/alsa_rawmidi.h b/libs/midi++2/midi++/alsa_rawmidi.h
new file mode 100644
index 0000000000..655b673174
--- /dev/null
+++ b/libs/midi++2/midi++/alsa_rawmidi.h
@@ -0,0 +1,43 @@
+/*
+ Copyright (C) 1998-99 Paul Barton-Davis
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef __alsa_rawmidi_h__
+#define __alsa_rawmidi_h__
+
+#include <vector>
+#include <string>
+
+#include <fcntl.h>
+#include <unistd.h>
+
+#include <midi++/port.h>
+#include <midi++/fd_midiport.h>
+
+class ALSA_RawMidiPort : public MIDI::FD_MidiPort
+
+{
+ public:
+ ALSA_RawMidiPort (MIDI::PortRequest &req)
+ : FD_MidiPort (req, "/dev/snd", "midi") {}
+ virtual ~ALSA_RawMidiPort () {}
+};
+
+
+#endif // __alsa_rawmidi_h__
+
diff --git a/libs/midi++2/midi++/alsa_sequencer.h b/libs/midi++2/midi++/alsa_sequencer.h
new file mode 100644
index 0000000000..8ddb2a7dd7
--- /dev/null
+++ b/libs/midi++2/midi++/alsa_sequencer.h
@@ -0,0 +1,63 @@
+/*
+ Copyright (C) 2004 Paul Davis
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef __alsa_sequencer_midiport_h__
+#define __alsa_sequencer_midiport_h__
+
+#include <vector>
+#include <string>
+
+#include <fcntl.h>
+#include <unistd.h>
+
+#include <alsa/asoundlib.h>
+#include <midi++/port.h>
+
+namespace MIDI {
+
+class ALSA_SequencerMidiPort : public Port
+
+{
+ public:
+ ALSA_SequencerMidiPort (PortRequest &req);
+ virtual ~ALSA_SequencerMidiPort ();
+
+ /* select(2)/poll(2)-based I/O */
+
+ virtual int selectable() const;
+
+ protected:
+ /* Direct I/O */
+
+ int write (byte *msg, size_t msglen);
+ int read (byte *buf, size_t max);
+
+ private:
+ snd_seq_t *seq;
+ snd_midi_event_t *decoder, *encoder;
+ int port_id;
+ snd_seq_event_t SEv;
+ int CreatePorts(PortRequest &req);
+
+};
+
+}; /* namespace MIDI */
+
+#endif // __alsa_sequencer_midiport_h__
+
diff --git a/libs/midi++2/midi++/channel.h b/libs/midi++2/midi++/channel.h
new file mode 100644
index 0000000000..1efde3cb93
--- /dev/null
+++ b/libs/midi++2/midi++/channel.h
@@ -0,0 +1,161 @@
+/*
+ Copyright (C) 1998-99 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef __midichannel_h__
+#define __midichannel_h__
+
+#include <queue>
+
+#include <sigc++/sigc++.h>
+
+#include <midi++/types.h>
+#include <midi++/parser.h>
+
+namespace MIDI {
+
+class Port;
+
+class Channel : public sigc::trackable {
+
+ public:
+ Channel (byte channel_number, Port &);
+
+ Port &midi_port() { return port; }
+ byte channel() { return channel_number; }
+ byte program() { return program_number; }
+ byte bank() { return bank_number; }
+ byte pressure () { return chanpress; }
+ byte poly_pressure (byte n) { return polypress[n]; }
+
+ byte last_note_on () {
+ return _last_note_on;
+ }
+ byte last_on_velocity () {
+ return _last_on_velocity;
+ }
+ byte last_note_off () {
+ return _last_note_off;
+ }
+ byte last_off_velocity () {
+ return _last_off_velocity;
+ }
+
+ pitchbend_t pitchbend () {
+ return pitch_bend;
+ }
+
+ controller_value_t controller_value (byte n) {
+ return controller_val[n%128];
+ }
+
+ controller_value_t *controller_addr (byte n) {
+ return &controller_val[n%128];
+ }
+
+ void set_controller (byte n, byte val) {
+ controller_val[n%128] = val;
+ }
+
+ int channel_msg (byte id, byte val1, byte val2);
+
+ int all_notes_off () {
+ return channel_msg (MIDI::controller, 123, 0);
+ }
+
+ int control (byte id, byte value) {
+ return channel_msg (MIDI::controller, id, value);
+ }
+
+ int note_on (byte note, byte velocity) {
+ return channel_msg (MIDI::on, note, velocity);
+ }
+
+ int note_off (byte note, byte velocity) {
+ return channel_msg (MIDI::off, note, velocity);
+ }
+
+ int aftertouch (byte value) {
+ return channel_msg (MIDI::chanpress, value, 0);
+ }
+
+ int poly_aftertouch (byte note, byte value) {
+ return channel_msg (MIDI::polypress, note, value);
+ }
+
+ int program_change (byte value) {
+ return channel_msg (MIDI::program, value, 0);
+ }
+
+ int pitchbend (byte msb, byte lsb) {
+ return channel_msg (MIDI::pitchbend, lsb, msb);
+ }
+
+ protected:
+ friend class Port;
+ void connect_input_signals ();
+ void connect_output_signals ();
+
+ private:
+ Port &port;
+
+ /* Current channel values */
+
+ byte channel_number;
+ byte bank_number;
+ byte program_number;
+ byte rpn_msb;
+ byte rpn_lsb;
+ byte nrpn_msb;
+ byte nrpn_lsb;
+ byte chanpress;
+ byte polypress[128];
+ bool controller_14bit[128];
+ controller_value_t controller_val[128];
+ byte controller_msb[128];
+ byte controller_lsb[128];
+ byte _last_note_on;
+ byte _last_on_velocity;
+ byte _last_note_off;
+ byte _last_off_velocity;
+ pitchbend_t pitch_bend;
+ bool _omni;
+ bool _poly;
+ bool _mono;
+ size_t _notes_on;
+
+ void reset (bool notes_off = true);
+
+ void process_note_off (Parser &, EventTwoBytes *);
+ void process_note_on (Parser &, EventTwoBytes *);
+ void process_controller (Parser &, EventTwoBytes *);
+ void process_polypress (Parser &, EventTwoBytes *);
+ void process_program_change (Parser &, byte);
+ void process_chanpress (Parser &, byte);
+ void process_pitchbend (Parser &, pitchbend_t);
+ void process_reset (Parser &);
+};
+
+}; /* namespace MIDI */
+
+#endif // __midichannel_h__
+
+
+
+
diff --git a/libs/midi++2/midi++/controllable.h b/libs/midi++2/midi++/controllable.h
new file mode 100644
index 0000000000..3fa108bb46
--- /dev/null
+++ b/libs/midi++2/midi++/controllable.h
@@ -0,0 +1,92 @@
+/*
+ Copyright (C) 1998-99 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef __qm_midicontrollable_h__
+#define __qm_midicontrollable_h__
+
+#include <string>
+
+#include <sigc++/sigc++.h>
+
+#include <midi++/types.h>
+
+namespace MIDI {
+
+class Channel;
+class Port;
+class Parser;
+
+class Controllable : public sigc::trackable
+{
+ public:
+ Controllable (Port *, bool bistate = false);
+ virtual ~Controllable ();
+
+ void midi_rebind (Port *, channel_t channel=-1);
+ void midi_forget ();
+ void learn_about_external_control ();
+ void stop_learning ();
+ void drop_external_control ();
+
+ virtual void set_value (float) = 0;
+
+ sigc::signal<void> learning_started;
+ sigc::signal<void> learning_stopped;
+
+ bool get_control_info (channel_t&, eventType&, byte&);
+ void set_control_type (channel_t, eventType, byte);
+
+ bool get_midi_feedback () { return feedback; }
+ void set_midi_feedback (bool val) { feedback = val; }
+
+ Port * get_port() { return port; }
+
+ std::string control_description() const { return _control_description; }
+
+ void send_midi_feedback (float);
+
+ private:
+ bool bistate;
+ int midi_msg_id; /* controller ID or note number */
+ sigc::connection midi_sense_connection[2];
+ sigc::connection midi_learn_connection;
+ size_t connections;
+ Port* port;
+ eventType control_type;
+ byte control_additional;
+ channel_t control_channel;
+ std::string _control_description;
+ bool feedback;
+
+ void midi_receiver (Parser &p, byte *, size_t);
+ void midi_sense_note (Parser &, EventTwoBytes *, bool is_on);
+ void midi_sense_note_on (Parser &p, EventTwoBytes *tb);
+ void midi_sense_note_off (Parser &p, EventTwoBytes *tb);
+ void midi_sense_controller (Parser &, EventTwoBytes *);
+ void midi_sense_program_change (Parser &, byte);
+ void midi_sense_pitchbend (Parser &, pitchbend_t);
+
+ void bind_midi (channel_t, eventType, byte);
+};
+
+}; /* namespace MIDI */
+
+#endif // __qm_midicontrollable_h__
+
diff --git a/libs/midi++2/midi++/coremidi_midiport.h b/libs/midi++2/midi++/coremidi_midiport.h
new file mode 100644
index 0000000000..e02a225784
--- /dev/null
+++ b/libs/midi++2/midi++/coremidi_midiport.h
@@ -0,0 +1,67 @@
+/*
+ Copyright (C) 2004 Paul Davis
+ Copyright (C) 2004 Grame
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ÊSee the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ */
+
+#ifndef __coremidi_midiport_h__
+#define __coremidi_midiport_h__
+
+#include <list>
+#include <string>
+
+#include <fcntl.h>
+#include <unistd.h>
+
+#include <midi++/port.h>
+
+#include <CoreMIDI/CoreMIDI.h>
+
+namespace MIDI {
+
+ class CoreMidi_MidiPort:public Port {
+ public:
+ CoreMidi_MidiPort(PortRequest & req);
+ virtual ~ CoreMidi_MidiPort();
+
+ virtual int selectable() const {
+ return -1;
+ }
+ protected:
+ /* Direct I/O */
+ int write(byte * msg, size_t msglen);
+ int read(byte * buf, size_t max) {
+ return 0;
+ } /* CoreMidi callback */
+ static void read_proc(const MIDIPacketList * pktlist,
+ void *refCon, void *connRefCon);
+
+ private:
+ byte midi_buffer[1024];
+ MIDIClientRef midi_client;
+ MIDIEndpointRef midi_destination;
+ MIDIEndpointRef midi_source;
+
+ int Open(PortRequest & req);
+ void Close();
+ static MIDITimeStamp MIDIGetCurrentHostTime();
+
+ bool firstrecv;
+ };
+
+}; /* namespace MIDI */
+
+#endif // __coremidi_midiport_h__
diff --git a/libs/midi++2/midi++/factory.h b/libs/midi++2/midi++/factory.h
new file mode 100644
index 0000000000..1543f68cdc
--- /dev/null
+++ b/libs/midi++2/midi++/factory.h
@@ -0,0 +1,40 @@
+/*
+ Copyright (C) 1998-99 Paul Barton-Davis
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef __midi_factory_h__
+#define __midi_factory_h__
+
+#include <vector>
+#include <string>
+
+#include <midi++/port.h>
+
+namespace MIDI {
+
+class PortFactory {
+ public:
+ Port *create_port (PortRequest &req);
+
+ static void add_port_request (std::vector<PortRequest *> &reqs,
+ const std::string &reqstr);
+};
+
+}; /* namespace MIDI */
+
+#endif // __midi_factory_h__
diff --git a/libs/midi++2/midi++/fd_midiport.h b/libs/midi++2/midi++/fd_midiport.h
new file mode 100644
index 0000000000..853af9d7b4
--- /dev/null
+++ b/libs/midi++2/midi++/fd_midiport.h
@@ -0,0 +1,94 @@
+/*
+ Copyright (C) 1999 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef __fd_midiport_h__
+#define __fd_midiport_h__
+
+#include <vector>
+#include <string>
+#include <cerrno>
+
+#include <cerrno>
+#include <fcntl.h>
+#include <unistd.h>
+
+#include <midi++/port.h>
+#include <midi++/port_request.h>
+
+namespace MIDI {
+
+class FD_MidiPort : public Port
+
+{
+ public:
+ FD_MidiPort (PortRequest &req,
+ const std::string &dirpath,
+ const std::string &pattern);
+
+ virtual ~FD_MidiPort () {
+ ::close (_fd);
+ }
+
+ virtual int selectable() const;
+ static std::vector<std::string *> *list_devices ();
+
+ protected:
+ int _fd;
+ virtual void open (PortRequest &req);
+
+ virtual int write (byte *msg, size_t msglen) {
+ int nwritten;
+
+ if ((_mode & O_ACCMODE) == O_RDONLY) {
+ return -EACCES;
+ }
+
+ if (slowdown) {
+ return do_slow_write (msg, msglen);
+ }
+
+ if ((nwritten = ::write (_fd, msg, msglen)) > 0) {
+ bytes_written += nwritten;
+
+ if (output_parser) {
+ output_parser->raw_preparse
+ (*output_parser, msg, nwritten);
+ for (int i = 0; i < nwritten; i++) {
+ output_parser->scanner (msg[i]);
+ }
+ output_parser->raw_postparse
+ (*output_parser, msg, nwritten);
+ }
+ }
+ return nwritten;
+ }
+
+ virtual int read (byte *buf, size_t max);
+
+ private:
+ static std::string *midi_dirpath;
+ static std::string *midi_filename_pattern;
+
+ int do_slow_write (byte *msg, unsigned int msglen);
+};
+
+}; /*namespace MIDI */
+
+#endif // __fd_midiport_h__
diff --git a/libs/midi++2/midi++/fifomidi.h b/libs/midi++2/midi++/fifomidi.h
new file mode 100644
index 0000000000..eb8778d4d5
--- /dev/null
+++ b/libs/midi++2/midi++/fifomidi.h
@@ -0,0 +1,47 @@
+/*
+ Copyright (C) 1998-99 Paul Barton-Davis
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef __fifomidi_h__
+#define __fifomidi_h__
+
+#include <fcntl.h>
+#include <vector>
+#include <string>
+#include <unistd.h>
+
+#include <midi++/port.h>
+#include <midi++/port_request.h>
+#include <midi++/fd_midiport.h>
+
+namespace MIDI {
+
+class FIFO_MidiPort : public MIDI::FD_MidiPort
+
+{
+ public:
+ FIFO_MidiPort (PortRequest &req);
+ ~FIFO_MidiPort () {};
+
+ private:
+ void open (PortRequest &req);
+};
+
+}; /* namespace MIDI */
+
+#endif // __fifomidi_h__
diff --git a/libs/midi++2/midi++/manager.h b/libs/midi++2/midi++/manager.h
new file mode 100644
index 0000000000..4889aad8c9
--- /dev/null
+++ b/libs/midi++2/midi++/manager.h
@@ -0,0 +1,88 @@
+/*
+ Copyright (C) 1998 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef __midi_manager_h__
+#define __midi_manager_h__
+
+#include <map>
+#include <string>
+
+#include <midi++/types.h>
+#include <midi++/port.h>
+
+namespace MIDI {
+
+class Manager {
+ public:
+ ~Manager ();
+
+ Port *add_port (PortRequest &);
+ int remove_port (std::string port);
+
+ Port *port (std::string name);
+ Port *port (size_t number);
+
+ size_t nports () { return ports_by_device.size(); }
+
+ /* defaults for clients who are not picky */
+
+ Port *inputPort;
+ Port *outputPort;
+ channel_t inputChannelNumber;
+ channel_t outputChannelNumber;
+
+ int set_input_port (size_t port);
+ int set_input_port (std::string);
+ int set_output_port (size_t port);
+ int set_output_port (std::string);
+ int set_input_channel (channel_t);
+ int set_output_channel (channel_t);
+
+ int foreach_port (int (*func)(const Port &, size_t n, void *),
+ void *arg);
+
+ typedef std::map<std::string, Port *> PortMap;
+
+ const PortMap& get_midi_ports() const { return ports_by_tag; }
+
+ static Manager *instance () {
+ if (theManager == 0) {
+ theManager = new Manager;
+ }
+ return theManager;
+ }
+
+ static int parse_port_request (std::string str, Port::Type type);
+
+ private:
+ /* This is a SINGLETON pattern */
+
+ Manager ();
+
+ static Manager *theManager;
+ PortMap ports_by_device; /* canonical */
+ PortMap ports_by_tag; /* may contain duplicate Ports */
+
+ void close_ports ();
+};
+
+}; /* namespace MIDI */
+
+#endif // __midi_manager_h__
diff --git a/libs/midi++2/midi++/mmc.h b/libs/midi++2/midi++/mmc.h
new file mode 100644
index 0000000000..7b51b33a72
--- /dev/null
+++ b/libs/midi++2/midi++/mmc.h
@@ -0,0 +1,261 @@
+/*
+ Copyright (C) 2000 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef __midipp_mmc_h_h__
+#define __midipp_mmc_h_h__
+
+#include <sigc++/sigc++.h>
+#include <midi++/types.h>
+
+namespace MIDI {
+
+class Port;
+class Parser;
+
+class MachineControl : public sigc::trackable
+
+{
+ public:
+ typedef byte CommandSignature[60];
+ typedef byte ResponseSignature[60];
+
+ enum Command {
+ cmdStop = 0x1,
+ cmdPlay = 0x2,
+ cmdDeferredPlay = 0x3,
+ cmdFastForward = 0x4,
+ cmdRewind = 0x5,
+ cmdRecordStrobe = 0x6,
+
+ cmdRecordExit = 0x7,
+ cmdRecordPause = 0x8,
+ cmdPause = 0x9,
+ cmdEject = 0xA,
+ cmdChase = 0xB,
+ cmdCommandErrorReset = 0xC,
+ cmdMmcReset = 0xD,
+
+ cmdIllegalMackieJogStart = 0x20,
+ cmdIllegalMackieJogStop = 0x21,
+
+ cmdWrite = 0x40,
+ cmdMaskedWrite = 0x41,
+ cmdRead = 0x42,
+ cmdUpdate = 0x43,
+ cmdLocate = 0x44,
+ cmdVariablePlay = 0x45,
+ cmdSearch = 0x46,
+
+ cmdShuttle = 0x47,
+ cmdStep = 0x48,
+ cmdAssignSystemMaster = 0x49,
+ cmdGeneratorCommand = 0x4A,
+ cmdMtcCommand = 0x4B,
+ cmdMove = 0x4C,
+ cmdAdd = 0x4D,
+
+ cmdSubtract = 0x4E,
+ cmdDropFrameAdjust = 0x4F,
+ cmdProcedure = 0x50,
+ cmdEvent = 0x51,
+ cmdGroup = 0x52,
+ cmdCommandSegment = 0x53,
+ cmdDeferredVariablePlay = 0x54,
+
+ cmdRecordStrobeVariable = 0x55,
+
+ cmdWait = 0x7C,
+ cmdResume = 0x7F,
+ };
+
+ MachineControl (Port &port,
+ float MMCVersion,
+ CommandSignature &cs,
+ ResponseSignature &rs);
+
+ Port &port() { return _port; }
+
+ void set_device_id (byte id);
+ static bool is_mmc (byte *sysex_buf, size_t len);
+
+ /* Signals to connect to if you want to run "callbacks"
+ when certain MMC commands are received.
+ */
+
+ sigc::signal<void,MachineControl &> Stop;
+ sigc::signal<void,MachineControl &> Play;
+ sigc::signal<void,MachineControl &> DeferredPlay;
+ sigc::signal<void,MachineControl &> FastForward;
+ sigc::signal<void,MachineControl &> Rewind;
+ sigc::signal<void,MachineControl &> RecordStrobe;
+ sigc::signal<void,MachineControl &> RecordExit;
+ sigc::signal<void,MachineControl &> RecordPause;
+ sigc::signal<void,MachineControl &> Pause;
+ sigc::signal<void,MachineControl &> Eject;
+ sigc::signal<void,MachineControl &> Chase;
+ sigc::signal<void,MachineControl &> CommandErrorReset;
+ sigc::signal<void,MachineControl &> MmcReset;
+
+ sigc::signal<void,MachineControl &> JogStart;
+ sigc::signal<void,MachineControl &> JogStop;
+
+ sigc::signal<void,MachineControl &> Write;
+ sigc::signal<void,MachineControl &> MaskedWrite;
+ sigc::signal<void,MachineControl &> Read;
+ sigc::signal<void,MachineControl &> Update;
+ sigc::signal<void,MachineControl &> VariablePlay;
+ sigc::signal<void,MachineControl &> Search;
+ sigc::signal<void,MachineControl &> AssignSystemMaster;
+ sigc::signal<void,MachineControl &> GeneratorCommand;
+ sigc::signal<void,MachineControl &> MidiTimeCodeCommand;
+ sigc::signal<void,MachineControl &> Move;
+ sigc::signal<void,MachineControl &> Add;
+ sigc::signal<void,MachineControl &> Subtract;
+ sigc::signal<void,MachineControl &> DropFrameAdjust;
+ sigc::signal<void,MachineControl &> Procedure;
+ sigc::signal<void,MachineControl &> Event;
+ sigc::signal<void,MachineControl &> Group;
+ sigc::signal<void,MachineControl &> CommandSegment;
+ sigc::signal<void,MachineControl &> DeferredVariablePlay;
+ sigc::signal<void,MachineControl &> RecordStrobeVariable;
+ sigc::signal<void,MachineControl &> Wait;
+ sigc::signal<void,MachineControl &> Resume;
+
+ /* The second argument is the shuttle speed, the third is
+ true if the direction is "forwards", false for "reverse"
+ */
+
+ sigc::signal<void,MachineControl &,float,bool> Shuttle;
+
+ /* The second argument specifies the desired track record enabled
+ status.
+ */
+
+ sigc::signal<void,MachineControl &,size_t,bool>
+ TrackRecordStatusChange;
+
+ /* The second argument points to a byte array containing
+ the locate target value in MMC Standard Time Code
+ format (5 bytes, roughly: hrs/mins/secs/frames/subframes)
+ */
+
+ sigc::signal<void,MachineControl &, const byte *> Locate;
+
+ /* The second argument is the number of steps to jump */
+
+ sigc::signal<void,MachineControl &, int> Step;
+
+ protected:
+
+#define MMC_NTRACKS 48
+
+ /* MMC Information fields (think "registers") */
+
+ CommandSignature commandSignature;
+ ResponseSignature responseSignature;
+
+ byte updateRate;
+ byte responseError;
+ byte commandError;
+ byte commandErrorLevel;
+
+ byte motionControlTally;
+ byte velocityTally;
+ byte stopMode;
+ byte fastMode;
+ byte recordMode;
+ byte recordStatus;
+ bool trackRecordStatus[MMC_NTRACKS];
+ bool trackRecordReady[MMC_NTRACKS];
+ byte globalMonitor;
+ byte recordMonitor;
+ byte trackSyncMonitor;
+ byte trackInputMonitor;
+ byte stepLength;
+ byte playSpeedReference;
+ byte fixedSpeed;
+ byte lifterDefeat;
+ byte controlDisable;
+ byte trackMute;
+ byte failure;
+ byte selectedTimeCode;
+ byte shortSelectedTimeCode;
+ byte timeStandard;
+ byte selectedTimeCodeSource;
+ byte selectedTimeCodeUserbits;
+ byte selectedMasterCode;
+ byte requestedOffset;
+ byte actualOffset;
+ byte lockDeviation;
+ byte shortSelectedMasterCode;
+ byte shortRequestedOffset;
+ byte shortActualOffset;
+ byte shortLockDeviation;
+ byte resolvedPlayMode;
+ byte chaseMode;
+ byte generatorTimeCode;
+ byte shortGeneratorTimeCode;
+ byte generatorCommandTally;
+ byte generatorSetUp;
+ byte generatorUserbits;
+ byte vitcInsertEnable;
+ byte midiTimeCodeInput;
+ byte shortMidiTimeCodeInput;
+ byte midiTimeCodeCommandTally;
+ byte midiTimeCodeSetUp;
+ byte gp0;
+ byte gp1;
+ byte gp2;
+ byte gp3;
+ byte gp4;
+ byte gp5;
+ byte gp6;
+ byte gp7;
+ byte shortGp0;
+ byte shortGp1;
+ byte shortGp2;
+ byte shortGp3;
+ byte shortGp4;
+ byte shortGp5;
+ byte shortGp6;
+ byte shortGp7;
+ byte procedureResponse;
+ byte eventResponse;
+ byte responseSegment;
+ byte wait;
+ byte resume;
+
+ private:
+ byte _device_id;
+ MIDI::Port &_port;
+
+ void process_mmc_message (Parser &p, byte *, size_t len);
+
+ int do_masked_write (byte *, size_t len);
+ int do_locate (byte *, size_t len);
+ int do_step (byte *, size_t len);
+ int do_shuttle (byte *, size_t len);
+
+ void write_track_record_ready (byte *, size_t len);
+};
+
+}; /* namespace MIDI */
+
+#endif /* __midipp_mmc_h_h__ */
diff --git a/libs/midi++2/midi++/nullmidi.h b/libs/midi++2/midi++/nullmidi.h
new file mode 100644
index 0000000000..a94b1015b0
--- /dev/null
+++ b/libs/midi++2/midi++/nullmidi.h
@@ -0,0 +1,62 @@
+/*
+ Copyright (C) 1998-99 Paul Barton-Davis
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef __nullmidi_h__
+#define __nullmidi_h__
+
+#include <fcntl.h>
+#include <vector>
+#include <string>
+
+#include <midi++/port.h>
+#include <midi++/port_request.h>
+
+namespace MIDI {
+
+class Null_MidiPort : public Port
+
+{
+ public:
+ Null_MidiPort (PortRequest &req)
+ : Port (req) {
+
+ /* reset devname and tagname */
+
+ _devname = "nullmidi";
+ _tagname = "null";
+ _type = Port::Null;
+ _ok = true;
+ }
+
+ virtual ~Null_MidiPort () {};
+
+ virtual int write (byte *msg, size_t msglen) {
+ return msglen;
+ }
+
+ virtual int read (byte *buf, size_t max) {
+ return 0;
+ }
+
+ virtual int selectable() const { return -1; }
+};
+
+}; /* namespace MIDI */
+
+#endif // __nullmidi_h__
diff --git a/libs/midi++2/midi++/parser.h b/libs/midi++2/midi++/parser.h
new file mode 100644
index 0000000000..4ac07cc15d
--- /dev/null
+++ b/libs/midi++2/midi++/parser.h
@@ -0,0 +1,189 @@
+/*
+ Copyright (C) 1998 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef __midi_parse_h__
+#define __midi_parse_h__
+
+#include <string>
+#include <iostream>
+
+#include <sigc++/sigc++.h>
+
+#include <midi++/types.h>
+
+namespace MIDI {
+
+class Port;
+class Parser;
+
+typedef sigc::signal<void, Parser &, byte> OneByteSignal;
+typedef sigc::signal<void, Parser &, EventTwoBytes *> TwoByteSignal;
+typedef sigc::signal<void, Parser &, pitchbend_t> PitchBendSignal;
+typedef sigc::signal<void, Parser &, byte *, size_t> Signal;
+
+class Parser : public sigc::trackable {
+ public:
+ Parser (Port &p);
+ ~Parser ();
+
+ /* signals that anyone can connect to */
+
+ OneByteSignal bank_change;
+ TwoByteSignal note_on;
+ TwoByteSignal note_off;
+ TwoByteSignal poly_pressure;
+ OneByteSignal pressure;
+ OneByteSignal program_change;
+ PitchBendSignal pitchbend;
+ TwoByteSignal controller;
+
+ OneByteSignal channel_bank_change[16];
+ TwoByteSignal channel_note_on[16];
+ TwoByteSignal channel_note_off[16];
+ TwoByteSignal channel_poly_pressure[16];
+ OneByteSignal channel_pressure[16];
+ OneByteSignal channel_program_change[16];
+ PitchBendSignal channel_pitchbend[16];
+ TwoByteSignal channel_controller[16];
+ sigc::signal<void, Parser &> channel_active_preparse[16];
+ sigc::signal<void, Parser &> channel_active_postparse[16];
+
+ OneByteSignal mtc_quarter_frame;
+
+ Signal raw_preparse;
+ Signal raw_postparse;
+ Signal any;
+ Signal sysex;
+ Signal mmc;
+ Signal position;
+ Signal song;
+
+ Signal mtc;
+ sigc::signal<void,Parser&> mtc_qtr;
+
+ sigc::signal<void, Parser &> all_notes_off;
+ sigc::signal<void, Parser &> tune;
+ sigc::signal<void, Parser &> timing;
+ sigc::signal<void, Parser &> start;
+ sigc::signal<void, Parser &> stop;
+ sigc::signal<void, Parser &> contineu; /* note spelling */
+ sigc::signal<void, Parser &> active_sense;
+ sigc::signal<void, Parser &> reset;
+ sigc::signal<void, Parser &> eox;
+
+ /* This should really be protected, but then derivatives of Port
+ can't access it.
+ */
+
+ void scanner (byte c);
+
+ size_t *message_counts() { return message_counter; }
+ const char *midi_event_type_name (MIDI::eventType);
+ void trace (bool onoff, std::ostream *o, const std::string &prefix = "");
+ bool tracing() { return trace_stream != 0; }
+ Port &port() { return _port; }
+
+ void set_offline (bool);
+ bool offline() const { return _offline; }
+ sigc::signal<void> OfflineStatusChanged;
+
+ sigc::signal<int, byte *, size_t> edit;
+
+ void set_mmc_forwarding (bool yn) {
+ _mmc_forward = yn;
+ }
+
+ /* MTC */
+
+ enum MTC_Status {
+ MTC_Stopped = 0,
+ MTC_Forward,
+ MTC_Backward
+ };
+
+ MTC_FPS mtc_fps() const { return _mtc_fps; }
+ MTC_Status mtc_running() const { return _mtc_running; }
+ const byte *mtc_current() const { return _mtc_time; }
+ bool mtc_locked() const { return _mtc_locked; }
+
+ sigc::signal<void,MTC_Status> mtc_status;
+ sigc::signal<bool> mtc_skipped;
+ sigc::signal<void,const byte*,bool> mtc_time;
+
+ void set_mtc_forwarding (bool yn) {
+ _mtc_forward = yn;
+ }
+
+ void reset_mtc_state ();
+
+ private:
+ Port &_port;
+ /* tracing */
+
+ std::ostream *trace_stream;
+ std::string trace_prefix;
+ void trace_event (Parser &p, byte *msg, size_t len);
+ sigc::connection trace_connection;
+
+ size_t message_counter[256];
+
+ enum ParseState {
+ NEEDSTATUS,
+ NEEDONEBYTE,
+ NEEDTWOBYTES,
+ VARIABLELENGTH
+ };
+ ParseState state;
+ unsigned char *msgbuf;
+ int msglen;
+ int msgindex;
+ MIDI::eventType msgtype;
+ channel_t channel;
+ bool _offline;
+ bool runnable;
+ bool was_runnable;
+ bool _mmc_forward;
+ bool _mtc_forward;
+ int expected_mtc_quarter_frame_code;
+ byte _mtc_time[4];
+ byte _qtr_mtc_time[4];
+ unsigned long consecutive_qtr_frame_cnt;
+ MTC_FPS _mtc_fps;
+ MTC_Status _mtc_running;
+ bool _mtc_locked;
+ byte last_qtr_frame;
+
+ ParseState pre_variable_state;
+ MIDI::eventType pre_variable_msgtype;
+ byte last_status_byte;
+
+ void channel_msg (byte);
+ void realtime_msg (byte);
+ void system_msg (byte);
+ void signal (byte *msg, size_t msglen);
+ bool possible_mmc (byte *msg, size_t msglen);
+ bool possible_mtc (byte *msg, size_t msglen);
+ void process_mtc_quarter_frame (byte *msg);
+};
+
+}; /* namespace MIDI */
+
+#endif // __midi_parse_h__
+
diff --git a/libs/midi++2/midi++/port.h b/libs/midi++2/midi++/port.h
new file mode 100644
index 0000000000..81e28615d0
--- /dev/null
+++ b/libs/midi++2/midi++/port.h
@@ -0,0 +1,147 @@
+/*
+ Copyright (C) 1998-99 Paul Barton-Davis
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef __libmidi_port_h__
+#define __libmidi_port_h__
+
+#include <string>
+
+#include <sigc++/sigc++.h>
+
+#include <pbd/selectable.h>
+#include <midi++/types.h>
+#include <midi++/parser.h>
+
+namespace MIDI {
+
+class Channel;
+class PortRequest;
+
+class Port : public sigc::trackable {
+ public:
+ enum Type {
+ Unknown,
+ ALSA_RawMidi,
+ ALSA_Sequencer,
+ CoreMidi_MidiPort,
+ Null,
+ FIFO,
+ };
+
+
+ Port (PortRequest &);
+ virtual ~Port ();
+
+ /* Direct I/O */
+
+ virtual int write (byte *msg, size_t msglen) = 0;
+ virtual int read (byte *buf, size_t max) = 0;
+
+ /* slowdown i/o to a loop of single byte emissions
+ interspersed with a busy loop of 10000 * this value.
+
+ This may be ignored by a particular instance
+ of this virtual class. See FD_MidiPort for an
+ example of where it used.
+ */
+
+ void set_slowdown (size_t n) { slowdown = n; }
+
+ /* select(2)/poll(2)-based I/O */
+
+ virtual int selectable() const = 0;
+
+ void selector_read_callback (Select::Selectable *, Select::Condition);
+
+ static void xforms_read_callback (int cond, int fd, void *ptr);
+ static void gtk_read_callback (void *ptr, int fd, int cond);
+
+ static void write_callback (byte *msg, unsigned int len, void *);
+
+ Channel *channel (channel_t chn) {
+ return _channel[chn&0x7F];
+ }
+
+ Parser *input() { return input_parser; }
+ Parser *output() { return output_parser; }
+
+ void iostat (int *written, int *read,
+ const size_t **in_counts,
+ const size_t **out_counts) {
+
+ *written = bytes_written;
+ *read = bytes_read;
+ if (input_parser) {
+ *in_counts = input_parser->message_counts();
+ } else {
+ *in_counts = 0;
+ }
+ if (output_parser) {
+ *out_counts = output_parser->message_counts();
+ } else {
+ *out_counts = 0;
+ }
+ }
+
+ int midimsg (byte *msg, size_t len) {
+ return !(write (msg, len) == (int) len);
+ }
+
+ int three_byte_msg (byte a, byte b, byte c) {
+ byte msg[3];
+
+ msg[0] = a;
+ msg[1] = b;
+ msg[2] = c;
+
+ return !(write (msg, 3) == 3);
+ }
+
+ int clock ();
+
+ const char *device () const { return _devname.c_str(); }
+ const char *name () const { return _tagname.c_str(); }
+ Type type () const { return _type; }
+ int mode () const { return _mode; }
+ bool ok () const { return _ok; }
+ size_t number () const { return _number; }
+
+ protected:
+ bool _ok;
+ Type _type;
+ std::string _devname;
+ std::string _tagname;
+ int _mode;
+ size_t _number;
+ Channel *_channel[16];
+ sigc::connection thru_connection;
+ unsigned int bytes_written;
+ unsigned int bytes_read;
+ Parser *input_parser;
+ Parser *output_parser;
+ size_t slowdown;
+
+ private:
+ static size_t nports;
+};
+
+}; /* namespace MIDI */
+
+#endif // __libmidi_port_h__
+
diff --git a/libs/midi++2/midi++/port_request.h b/libs/midi++2/midi++/port_request.h
new file mode 100644
index 0000000000..28a0d1d70b
--- /dev/null
+++ b/libs/midi++2/midi++/port_request.h
@@ -0,0 +1,60 @@
+/*
+ Copyright (C) 1999 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef __midi_port_request_h__
+#define __midi_port_request_h__
+
+#include <string>
+
+namespace MIDI {
+
+struct PortRequest {
+ enum Status {
+ Unknown,
+ OK,
+ Busy,
+ NoSuchFile,
+ TypeUnsupported,
+ NotAllowed
+ };
+ const char *devname;
+ const char *tagname;
+ int mode;
+ Port::Type type;
+ Status status;
+
+ PortRequest () {
+ devname = 0;
+ tagname = 0;
+ mode = 0;
+ type = Port::Unknown;
+ status = Unknown;
+ }
+
+ PortRequest (const std::string &xdev,
+ const std::string &xtag,
+ const std::string &xmode,
+ const std::string &xtype);
+};
+
+}; /* namespace MIDI */
+
+#endif // __midi_port_request_h__
+
diff --git a/libs/midi++2/midi++/types.h b/libs/midi++2/midi++/types.h
new file mode 100644
index 0000000000..b9d9bf33e7
--- /dev/null
+++ b/libs/midi++2/midi++/types.h
@@ -0,0 +1,69 @@
+#ifndef __midi_types_h__
+#define __midi_types_h__
+
+namespace MIDI {
+
+ typedef char channel_t;
+ typedef float controller_value_t;
+ typedef unsigned char byte;
+ typedef unsigned short pitchbend_t;
+
+ enum eventType {
+ none = 0x0,
+ raw = 0xF4, /* undefined in MIDI spec */
+ any = 0xF5, /* undefined in MIDI spec */
+ off = 0x80,
+ on = 0x90,
+ controller = 0xB0,
+ program = 0xC0,
+ chanpress = 0xD0,
+ polypress = 0xA0,
+ pitchbend = 0xE0,
+ sysex = 0xF0,
+ mtc_quarter = 0xF1,
+ position = 0xF2,
+ song = 0xF3,
+ tune = 0xF6,
+ eox = 0xF7,
+ timing = 0xF8,
+ start = 0xFA,
+ contineu = 0xFB, /* note spelling */
+ stop = 0xFC,
+ active = 0xFE,
+ reset = 0xFF
+ };
+
+ extern const char *controller_names[];
+ byte decode_controller_name (const char *name);
+
+ struct EventTwoBytes {
+ union {
+ byte note_number;
+ byte controller_number;
+ };
+ union {
+ byte velocity;
+ byte value;
+ };
+ };
+
+ enum MTC_FPS {
+ MTC_24_FPS = 0,
+ MTC_25_FPS = 1,
+ MTC_30_FPS_DROP = 2,
+ MTC_30_FPS = 3
+ };
+
+ enum MTC_Status {
+ MTC_Stopped = 0,
+ MTC_Forward,
+ MTC_Backward,
+ };
+
+}; /* namespace MIDI */
+
+#endif // __midi_types_h__
+
+
+
+
diff --git a/libs/midi++2/midi.cc b/libs/midi++2/midi.cc
new file mode 100644
index 0000000000..7c2dc835fb
--- /dev/null
+++ b/libs/midi++2/midi.cc
@@ -0,0 +1,170 @@
+/*
+ Copyright (C) 1998 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#include <string>
+#include <cstdlib>
+#include <midi++/types.h>
+
+const char *MIDI::controller_names[] = {
+ "bank (0)",
+ "mod (1)",
+ "breath (2)",
+ "ctrl 3",
+ "foot (4)",
+ "port tm (5)",
+ "data msb (6)",
+ "volume (7)",
+ "balance (8)",
+ "ctrl 9",
+ "pan (10)",
+ "express (11)",
+ "ctrl 12",
+ "ctrl 13",
+ "ctrl 14",
+ "ctrl 15",
+ "gpc 1",
+ "gpc 2",
+ "gpc 3",
+ "gpc 4",
+ "ctrl 20",
+ "ctrl 21",
+ "ctrl 22",
+ "ctrl 23",
+ "ctrl 24",
+ "ctrl 25",
+ "ctrl 26",
+ "ctrl 27",
+ "ctrl 28",
+ "ctrl 29",
+ "ctrl 30",
+ "ctrl 31",
+ "lsb 0 (32)",
+ "lsb 1 (33)",
+ "lsb 2 (34)",
+ "lsb 3 (35)",
+ "lsb 4 (36)",
+ "lsb 5 (37)",
+ "lsb 6 (38)",
+ "lsb 7 (39)",
+ "lsb 8 (40)",
+ "lsb 9 (41)",
+ "lsb 10 (42)",
+ "lsb 11 (43)",
+ "lsb 12 (44)",
+ "lsb 13 (45)",
+ "lsb 14 (46)",
+ "lsb 15 (47)",
+ "lsb 16 (48)",
+ "lsb 17 (49)",
+ "lsb 18 (50)",
+ "lsb 19 (51)",
+ "lsb 20 (52)",
+ "lsb 21 (53)",
+ "lsb 22 (54)",
+ "lsb 23 (55)",
+ "lsb 24 (56)",
+ "lsb 25 (57)",
+ "lsb 26 (58)",
+ "lsb 27 (59)",
+ "lsb 28 (60)",
+ "lsb 29 (61)",
+ "lsb 30 (62)",
+ "lsb 31 (63)",
+ "sustain (64)",
+ "portamento (65)",
+ "sostenuto (66)",
+ "soft ped (67)",
+ "ctrl 68",
+ "hold 2 (69)",
+ "ctrl 70",
+ "ctrl 71",
+ "ctrl 72",
+ "ctrl 73",
+ "ctrl 74",
+ "ctrl 75",
+ "ctrl 76",
+ "ctrl 77",
+ "ctrl 78",
+ "ctrl 79",
+ "gpc 5 (80)",
+ "gpc 6 (81)",
+ "gpc 7 (82)",
+ "gpc 8 (83)",
+ "ctrl 84",
+ "ctrl 85",
+ "ctrl 86",
+ "ctrl 87",
+ "ctrl 88",
+ "ctrl 89",
+ "ctrl 90",
+ "fx dpth (91)",
+ "tremolo (92)",
+ "chorus (93)",
+ "detune (94)",
+ "phaser (95)",
+ "data inc (96)",
+ "data dec (97)",
+ "nrpn lsb (98)",
+ "nrpn msg (99)",
+ "rpn lsb (100)",
+ "rpn msb (101)",
+ "ctrl 102",
+ "ctrl 103",
+ "ctrl 104",
+ "ctrl 105",
+ "ctrl 106",
+ "ctrl 107",
+ "ctrl 108",
+ "ctrl 109",
+ "ctrl 110",
+ "ctrl 111",
+ "ctrl 112",
+ "ctrl 113",
+ "ctrl 114",
+ "ctrl 115",
+ "ctrl 116",
+ "ctrl 117",
+ "ctrl 118",
+ "ctrl 119",
+ "snd off (120)",
+ "rst ctrl (121)",
+ "local (122)",
+ "notes off (123)",
+ "omni off (124)",
+ "omni on (125)",
+ "mono on (126)",
+ "poly on (127)",
+ 0
+};
+
+MIDI::byte
+MIDI::decode_controller_name (const char *name)
+
+{
+ char *lparen;
+ size_t len;
+
+ if ((lparen = strrchr (name, '(')) != 0) {
+ return atoi (lparen+1);
+ } else {
+ len = strcspn (name, "0123456789");
+ return atoi (name+len);
+ }
+}
diff --git a/libs/midi++2/midichannel.cc b/libs/midi++2/midichannel.cc
new file mode 100644
index 0000000000..a6759b7962
--- /dev/null
+++ b/libs/midi++2/midichannel.cc
@@ -0,0 +1,304 @@
+/*
+ Copyright (C) 1998-99 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#include <midi++/types.h>
+#include <midi++/port.h>
+#include <midi++/channel.h>
+
+using namespace sigc;
+using namespace MIDI;
+
+Channel::Channel (byte channelnum, Port &p) : port (p)
+{
+ channel_number = channelnum;
+
+ reset (false);
+}
+
+void
+Channel::connect_input_signals ()
+
+{
+ port.input()->channel_pressure[channel_number].connect
+ (mem_fun (*this, &Channel::process_chanpress));
+ port.input()->channel_note_on[channel_number].connect
+ (mem_fun (*this, &Channel::process_note_on));
+ port.input()->channel_note_off[channel_number].connect
+ (mem_fun (*this, &Channel::process_note_off));
+ port.input()->channel_poly_pressure[channel_number].connect
+ (mem_fun (*this, &Channel::process_polypress));
+ port.input()->channel_program_change[channel_number].connect
+ (mem_fun (*this, &Channel::process_program_change));
+ port.input()->channel_controller[channel_number].connect
+ (mem_fun (*this, &Channel::process_controller));
+ port.input()->channel_pitchbend[channel_number].connect
+ (mem_fun (*this, &Channel::process_pitchbend));
+ port.input()->reset.connect (mem_fun (*this, &Channel::process_reset));
+}
+
+void
+Channel::connect_output_signals ()
+
+{
+ port.output()->channel_pressure[channel_number].connect
+ (mem_fun (*this, &Channel::process_chanpress));
+ port.output()->channel_note_on[channel_number].connect
+ (mem_fun (*this, &Channel::process_note_on));
+ port.output()->channel_note_off[channel_number].connect
+ (mem_fun (*this, &Channel::process_note_off));
+ port.output()->channel_poly_pressure[channel_number].connect
+ (mem_fun (*this, &Channel::process_polypress));
+ port.output()->channel_program_change[channel_number].connect
+ (mem_fun (*this, &Channel::process_program_change));
+ port.output()->channel_controller[channel_number].connect
+ (mem_fun (*this, &Channel::process_controller));
+ port.output()->channel_pitchbend[channel_number].connect
+ (mem_fun (*this, &Channel::process_pitchbend));
+ port.output()->reset.connect (mem_fun (*this, &Channel::process_reset));
+}
+
+void
+Channel::reset (bool notes_off)
+{
+ program_number = channel_number;
+ bank_number = 0;
+ pitch_bend = 0;
+
+ _last_note_on = 0;
+ _last_note_off = 0;
+ _last_on_velocity = 0;
+ _last_off_velocity = 0;
+
+ if (notes_off) {
+ all_notes_off ();
+ }
+
+ memset (polypress, 0, sizeof (polypress));
+ memset (controller_msb, 0, sizeof (controller_msb));
+ memset (controller_lsb, 0, sizeof (controller_lsb));
+
+ /* zero all controllers XXX not necessarily the right thing */
+
+ memset (controller_val, 0, sizeof (controller_val));
+
+ for (int n = 0; n < 128; n++) {
+ controller_14bit[n] = false;
+ }
+
+ rpn_msb = 0;
+ rpn_lsb = 0;
+ nrpn_msb = 0;
+ nrpn_lsb = 0;
+
+ _omni = true;
+ _poly = false;
+ _mono = true;
+ _notes_on = 0;
+}
+
+void
+Channel::process_note_off (Parser &parser, EventTwoBytes *tb)
+
+{
+ _last_note_off = tb->note_number;
+ _last_off_velocity = tb->velocity;
+
+ if (_notes_on) {
+ _notes_on--;
+ }
+}
+
+void
+Channel::process_note_on (Parser &parser, EventTwoBytes *tb)
+
+{
+ _last_note_on = tb->note_number;
+ _last_on_velocity = tb->velocity;
+ _notes_on++;
+}
+
+void
+Channel::process_controller (Parser &parser, EventTwoBytes *tb)
+
+{
+ unsigned short cv;
+
+ /* XXX arguably need a lock here to protect non-atomic changes
+ to controller_val[...]. or rather, need to make sure that
+ all changes *are* atomic.
+ */
+
+ if (tb->controller_number <= 31) { /* unsigned: no test for >= 0 */
+
+ /* if this controller is already known to use 14 bits,
+ then treat this value as the MSB, and combine it
+ with the existing LSB.
+
+ otherwise, just treat it as a 7 bit value, and set
+ it directly.
+ */
+
+ cv = (unsigned short) controller_val[tb->controller_number];
+
+ if (controller_14bit[tb->controller_number]) {
+ cv = ((tb->value << 7) | (cv & 0x7f));
+ } else {
+ cv = tb->value;
+ }
+
+ controller_val[tb->controller_number] = (controller_value_t)cv;
+
+ } else if ((tb->controller_number >= 32 &&
+ tb->controller_number <= 63)) {
+
+ cv = (unsigned short) controller_val[tb->controller_number];
+
+ /* LSB for CC 0-31 arrived.
+
+ If this is the first time (i.e. its currently
+ flagged as a 7 bit controller), mark the
+ controller as 14 bit, adjust the existing value
+ to be the MSB, and OR-in the new LSB value.
+
+ otherwise, OR-in the new low 7bits with the old
+ high 7.
+ */
+
+ int cn = tb->controller_number - 32;
+
+ if (controller_14bit[cn] == false) {
+ controller_14bit[cn] = true;
+ cv = (cv << 7) | (tb->value & 0x7f);
+ } else {
+ cv = (cv & 0x3f80) | (tb->value & 0x7f);
+ }
+
+ controller_val[tb->controller_number] =
+ (controller_value_t) cv;
+ } else {
+
+ /* controller can only take 7 bit values */
+
+ controller_val[tb->controller_number] =
+ (controller_value_t) tb->value;
+ }
+
+ /* bank numbers are special, in that they have their own signal
+ */
+
+ if (tb->controller_number == 0) {
+ bank_number = (unsigned short) controller_val[0];
+ if (port.input()) {
+ port.input()->bank_change (*port.input(), bank_number);
+ port.input()->channel_bank_change[channel_number]
+ (*port.input(), bank_number);
+ }
+ }
+
+}
+
+void
+Channel::process_program_change (Parser &parser, byte val)
+
+{
+ program_number = val;
+}
+
+void
+Channel::process_chanpress (Parser &parser, byte val)
+
+{
+ chanpress = val;
+}
+
+void
+Channel::process_polypress (Parser &parser, EventTwoBytes *tb)
+
+{
+ polypress[tb->note_number] = tb->value;
+}
+
+void
+Channel::process_pitchbend (Parser &parser, pitchbend_t val)
+
+{
+ pitch_bend = val;
+}
+
+void
+Channel::process_reset (Parser &parser)
+
+{
+ reset ();
+}
+
+int
+Channel::channel_msg (byte id, byte val1, byte val2)
+
+{
+ unsigned char msg[3];
+ int len = 0;
+
+ msg[0] = id | (channel_number & 0xf);
+
+ switch (id) {
+ case off:
+ msg[1] = val1 & 0x7F;
+ msg[2] = val2 & 0x7F;
+ len = 3;
+ break;
+
+ case on:
+ msg[1] = val1 & 0x7F;
+ msg[2] = val2 & 0x7F;
+ len = 3;
+ break;
+
+ case MIDI::polypress:
+ msg[1] = val1 & 0x7F;
+ msg[2] = val2 & 0x7F;
+ len = 3;
+ break;
+
+ case controller:
+ msg[1] = val1 & 0x7F;
+ msg[2] = val2 & 0x7F;
+ len = 3;
+ break;
+
+ case MIDI::program:
+ msg[1] = val1 & 0x7F;
+ len = 2;
+ break;
+
+ case MIDI::chanpress:
+ msg[1] = val1 & 0x7F;
+ len = 2;
+ break;
+
+ case MIDI::pitchbend:
+ msg[1] = val1 & 0x7F;
+ msg[2] = val2 & 0x7F;
+ len = 3;
+ break;
+ }
+
+ return port.midimsg (msg, len);
+}
diff --git a/libs/midi++2/midicontrollable.cc b/libs/midi++2/midicontrollable.cc
new file mode 100644
index 0000000000..f17782f3c4
--- /dev/null
+++ b/libs/midi++2/midicontrollable.cc
@@ -0,0 +1,325 @@
+/*
+ Copyright (C) 1998-99 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#include <cstdio> /* for sprintf, sigh */
+#include <pbd/error.h>
+#include <midi++/port.h>
+#include <midi++/channel.h>
+#include <midi++/controllable.h>
+
+using namespace sigc;
+using namespace MIDI;
+
+Controllable::Controllable (Port *p, bool is_bistate)
+{
+ control_type = none;
+ _control_description = "MIDI Control: none";
+ control_additional = (byte) -1;
+ bistate = is_bistate;
+ connections = 0;
+ feedback = true; // for now
+
+ /* use channel 0 ("1") as the initial channel */
+
+ midi_rebind (p, 0);
+}
+
+Controllable::~Controllable ()
+{
+ drop_external_control ();
+}
+
+void
+Controllable::midi_forget ()
+{
+ /* stop listening for incoming messages, but retain
+ our existing event + type information.
+ */
+
+ if (connections > 0) {
+ midi_sense_connection[0].disconnect ();
+ }
+
+ if (connections > 1) {
+ midi_sense_connection[1].disconnect ();
+ }
+
+ connections = 0;
+ midi_learn_connection.disconnect ();
+
+}
+
+void
+Controllable::midi_rebind (Port *p, channel_t c)
+{
+ if ((port = p) == 0) {
+ midi_forget ();
+ } else {
+ if (c >= 0) {
+ bind_midi (c, control_type, control_additional);
+ } else {
+ midi_forget ();
+ }
+ }
+}
+
+void
+Controllable::learn_about_external_control ()
+{
+ drop_external_control ();
+
+ if (port) {
+ midi_learn_connection = port->input()->any.connect (mem_fun (*this, &Controllable::midi_receiver));
+ learning_started ();
+
+ } else {
+ info << "No MIDI port specified - external control disabled" << endmsg;
+ }
+}
+
+void
+Controllable::stop_learning ()
+{
+ midi_learn_connection.disconnect ();
+}
+
+void
+Controllable::drop_external_control ()
+{
+ if (connections > 0) {
+ midi_sense_connection[0].disconnect ();
+ }
+ if (connections > 1) {
+ midi_sense_connection[1].disconnect ();
+ }
+
+ connections = 0;
+ midi_learn_connection.disconnect ();
+
+ control_type = none;
+ control_additional = (byte) -1;
+}
+
+void
+Controllable::midi_sense_note_on (Parser &p, EventTwoBytes *tb)
+{
+ midi_sense_note (p, tb, true);
+}
+
+void
+Controllable::midi_sense_note_off (Parser &p, EventTwoBytes *tb)
+{
+ midi_sense_note (p, tb, false);
+}
+
+void
+Controllable::midi_sense_note (Parser &p, EventTwoBytes *msg, bool is_on)
+{
+ if (!bistate) {
+ set_value (msg->note_number/127.0);
+ } else {
+
+ /* Note: parser handles the use of zero velocity to
+ mean note off. if we get called with is_on=true, then we
+ got a *real* note on.
+ */
+
+ if (msg->note_number == control_additional) {
+ set_value (is_on ? 1 : 0);
+ }
+ }
+}
+
+void
+Controllable::midi_sense_controller (Parser &, EventTwoBytes *msg)
+{
+ if (control_additional == msg->controller_number) {
+ if (!bistate) {
+ set_value (msg->value/127.0);
+ } else {
+ if (msg->value > 64.0) {
+ set_value (1);
+ } else {
+ set_value (0);
+ }
+ }
+ }
+}
+
+void
+Controllable::midi_sense_program_change (Parser &p, byte msg)
+{
+ /* XXX program change messages make no sense for bistates */
+
+ if (!bistate) {
+ set_value (msg/127.0);
+ }
+}
+
+void
+Controllable::midi_sense_pitchbend (Parser &p, pitchbend_t pb)
+{
+ /* pitchbend messages make no sense for bistates */
+
+ /* XXX gack - get rid of assumption about typeof pitchbend_t */
+
+ set_value ((pb/(float) SHRT_MAX));
+}
+
+void
+Controllable::midi_receiver (Parser &p, byte *msg, size_t len)
+{
+ /* we only respond to channel messages */
+
+ if ((msg[0] & 0xF0) < 0x80 || (msg[0] & 0xF0) > 0xE0) {
+ return;
+ }
+
+ /* if the our port doesn't do input anymore, forget it ... */
+
+ if (!port->input()) {
+ return;
+ }
+
+ bind_midi ((channel_t) (msg[0] & 0xf), eventType (msg[0] & 0xF0), msg[1]);
+
+ learning_stopped ();
+}
+
+void
+Controllable::bind_midi (channel_t chn, eventType ev, MIDI::byte additional)
+{
+ char buf[64];
+
+ drop_external_control ();
+
+ control_type = ev;
+ control_channel = chn;
+ control_additional = additional;
+
+ if (port == 0 || port->input() == 0) {
+ return;
+ }
+
+ Parser& p = *port->input();
+
+ int chn_i = chn;
+ switch (ev) {
+ case MIDI::off:
+ midi_sense_connection[0] = p.channel_note_off[chn_i].connect
+ (mem_fun (*this, &Controllable::midi_sense_note_off));
+
+ /* if this is a bistate, connect to noteOn as well,
+ and we'll toggle back and forth between the two.
+ */
+
+ if (bistate) {
+ midi_sense_connection[1] = p.channel_note_on[chn_i].connect
+ (mem_fun (*this, &Controllable::midi_sense_note_on));
+ connections = 2;
+ } else {
+ connections = 1;
+ }
+ _control_description = "MIDI control: NoteOff";
+ break;
+
+ case MIDI::on:
+ midi_sense_connection[0] = p.channel_note_on[chn_i].connect
+ (mem_fun (*this, &Controllable::midi_sense_note_on));
+ if (bistate) {
+ midi_sense_connection[1] = p.channel_note_off[chn_i].connect
+ (mem_fun (*this, &Controllable::midi_sense_note_off));
+ connections = 2;
+ } else {
+ connections = 1;
+ }
+ _control_description = "MIDI control: NoteOn";
+ break;
+
+ case MIDI::controller:
+ midi_sense_connection[0] = p.channel_controller[chn_i].connect
+ (mem_fun (*this, &Controllable::midi_sense_controller));
+ connections = 1;
+ snprintf (buf, sizeof (buf), "MIDI control: Controller %d", control_additional);
+ _control_description = buf;
+ break;
+
+ case MIDI::program:
+ if (!bistate) {
+ midi_sense_connection[0] = p.channel_program_change[chn_i].connect
+ (mem_fun (*this,
+ &Controllable::midi_sense_program_change));
+ connections = 1;
+ _control_description = "MIDI control: ProgramChange";
+ }
+ break;
+
+ case MIDI::pitchbend:
+ if (!bistate) {
+ midi_sense_connection[0] = p.channel_pitchbend[chn_i].connect
+ (mem_fun (*this, &Controllable::midi_sense_pitchbend));
+ connections = 1;
+ _control_description = "MIDI control: Pitchbend";
+ }
+ break;
+
+ default:
+ break;
+ }
+}
+
+void
+Controllable::set_control_type (channel_t chn, eventType ev, MIDI::byte additional)
+{
+ bind_midi (chn, ev, additional);
+}
+
+bool
+Controllable::get_control_info (channel_t& chn, eventType& ev, byte& additional)
+{
+ if (control_type == none) {
+ chn = -1;
+ return false;
+ }
+
+ ev = control_type;
+ chn = control_channel;
+ additional = control_additional;
+
+ return true;
+}
+
+
+void
+Controllable::send_midi_feedback (float val)
+{
+ byte msg[3];
+
+ if (port == 0 || control_type == none) {
+ return;
+ }
+
+ msg[0] = (control_type & 0xF0) | (control_channel & 0xF);
+ msg[1] = control_additional;
+ msg[2] = (byte) (val * 127.0f);
+
+ port->write (msg, 3);
+}
+
diff --git a/libs/midi++2/midifactory.cc b/libs/midi++2/midifactory.cc
new file mode 100644
index 0000000000..38baada204
--- /dev/null
+++ b/libs/midi++2/midifactory.cc
@@ -0,0 +1,95 @@
+/*
+ Copyright (C) 1998-99 Paul Barton-Davis
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#include <midi++/types.h>
+#include <midi++/factory.h>
+#include <midi++/nullmidi.h>
+#include <midi++/fifomidi.h>
+
+#ifdef WITH_ALSA
+#include <midi++/alsa_sequencer.h>
+#include <midi++/alsa_rawmidi.h>
+#endif // WITH_ALSA
+
+#ifdef WITH_COREMIDI
+#include <midi++/coremidi_midiport.h>
+#endif // WITH_COREMIDI
+
+
+using namespace std;
+using namespace MIDI;
+
+Port *
+PortFactory::create_port (PortRequest &req)
+
+{
+ Port *port;
+
+ switch (req.type) {
+#ifdef WITH_ALSA
+ case Port::ALSA_RawMidi:
+ port = new ALSA_RawMidiPort (req);
+ break;
+
+ case Port::ALSA_Sequencer:
+ port = new ALSA_SequencerMidiPort (req);
+ break;
+#endif // WITH_ALSA
+
+#if WITH_COREMIDI
+ case Port::CoreMidi_MidiPort:
+ port = new CoreMidi_MidiPort (req);
+ break;
+#endif // WITH_COREMIDI
+
+ case Port::Null:
+ port = new Null_MidiPort (req);
+ break;
+
+ case Port::FIFO:
+ port = new FIFO_MidiPort (req);
+ break;
+
+ default:
+ req.status = PortRequest::TypeUnsupported;
+ return 0;
+ }
+
+ req.status = PortRequest::OK;
+
+ return port;
+}
+
+void
+PortFactory::add_port_request (vector<PortRequest *> &reqs,
+ const string &str)
+
+{
+ PortRequest *req;
+
+ req = new PortRequest;
+ req->devname = strdup (str.c_str());
+ req->tagname = strdup (str.c_str());
+
+ req->mode = O_RDWR;
+ req->type = Port::ALSA_RawMidi;
+
+ reqs.push_back (req);
+}
+
diff --git a/libs/midi++2/midimanager.cc b/libs/midi++2/midimanager.cc
new file mode 100644
index 0000000000..7b3ed7d336
--- /dev/null
+++ b/libs/midi++2/midimanager.cc
@@ -0,0 +1,374 @@
+/*
+ Copyright (C) 1998-99 Paul Barton-Davis
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#include <fcntl.h>
+#include <pbd/error.h>
+#include <pbd/basename.h>
+
+#include <midi++/types.h>
+#include <midi++/manager.h>
+#include <midi++/factory.h>
+#include <midi++/channel.h>
+#include <midi++/port_request.h>
+
+using namespace std;
+using namespace MIDI;
+
+Manager *Manager::theManager = 0;
+
+Manager::Manager ()
+
+{
+ inputPort = 0;
+ outputPort = 0;
+ inputChannelNumber = 0;
+ outputChannelNumber = 0;
+}
+
+Manager::~Manager ()
+
+{
+ PortMap::iterator i;
+
+ for (i = ports_by_device.begin(); i != ports_by_device.end(); i++) {
+ delete (*i).second;
+ }
+
+ ports_by_device.erase (ports_by_device.begin(), ports_by_device.end());
+ ports_by_tag.erase (ports_by_tag.begin(), ports_by_tag.end());
+
+ if (theManager == this) {
+ theManager = 0;
+ }
+}
+
+Port *
+Manager::add_port (PortRequest &req)
+
+{
+ PortFactory factory;
+ Port *port;
+ PortMap::iterator existing;
+ pair<string, Port *> newpair;
+
+ if ((existing = ports_by_device.find (req.devname)) !=
+ ports_by_device.end()) {
+
+ port = (*existing).second;
+ if (port->mode() == req.mode) {
+
+ /* Same mode - reuse the port, and just
+ create a new tag entry.
+ */
+
+ newpair.first = req.tagname;
+ newpair.second = port;
+
+ ports_by_tag.insert (newpair);
+ return port;
+ }
+
+ /* If the existing is duplex, and this request
+ is not, then fail, because most drivers won't
+ allow opening twice with duplex and non-duplex
+ operation.
+ */
+
+ if ((req.mode == O_RDWR && port->mode() != O_RDWR) ||
+ (req.mode != O_RDWR && port->mode() == O_RDWR)) {
+ error << "MIDIManager: port tagged \""
+ << req.tagname
+ << "\" cannot be opened duplex and non-duplex"
+ << endmsg;
+ return 0;
+ }
+
+ /* modes must be different or complementary */
+ }
+
+
+ port = factory.create_port (req);
+
+ if (port == 0) {
+ return 0;
+ }
+
+ if (!port->ok()) {
+ delete port;
+ return 0;
+ }
+
+ newpair.first = port->name();
+ newpair.second = port;
+ ports_by_tag.insert (newpair);
+
+ newpair.first = port->device();
+ newpair.second = port;
+ ports_by_device.insert (newpair);
+
+ /* first port added becomes the default input
+ port.
+ */
+
+ if (inputPort == 0) {
+ inputPort = port;
+ }
+
+ if (outputPort == 0) {
+ outputPort = port;
+ }
+
+ return port;
+}
+
+int
+Manager::remove_port (string name)
+{
+ PortMap::iterator res;
+
+ if ((res = ports_by_device.find (name)) == ports_by_device.end()) {
+ return -1;
+ }
+
+ ports_by_device.erase (res);
+ ports_by_device.erase ((*res).second->name());
+
+ delete (*res).second;
+
+ return 0;
+}
+
+int
+Manager::set_input_port (string tag)
+{
+ PortMap::iterator res;
+ bool found = false;
+
+ for (res = ports_by_tag.begin(); res != ports_by_tag.end(); res++) {
+ if (tag == (*res).first) {
+ found = true;
+ break;
+ }
+ }
+
+ if (!found) {
+ return -1;
+ }
+
+ inputPort = (*res).second;
+
+ return 0;
+}
+
+int
+Manager::set_input_port (size_t portnum)
+
+{
+ PortMap::iterator res;
+
+ for (res = ports_by_tag.begin(); res != ports_by_tag.end(); res++) {
+ if ((*res).second->number() == portnum) {
+ inputPort = (*res).second;
+ return 0;
+ }
+ }
+
+ return -1;
+}
+
+int
+Manager::set_output_port (string tag)
+
+{
+ PortMap::iterator res;
+ bool found = false;
+
+ for (res = ports_by_tag.begin(); res != ports_by_tag.end(); res++) {
+ if (tag == (*res).first) {
+ found = true;
+ break;
+ }
+ }
+
+ if (!found) {
+ return -1;
+ }
+
+ // XXX send a signal to say we're about to change output ports
+
+ if (outputPort) {
+ for (channel_t chan = 0; chan < 16; chan++) {
+ outputPort->channel (chan)->all_notes_off ();
+ }
+ }
+ outputPort = (*res).second;
+
+ // XXX send a signal to say we've changed output ports
+
+ return 0;
+}
+
+int
+Manager::set_output_port (size_t portnum)
+
+{
+ PortMap::iterator res;
+
+ for (res = ports_by_tag.begin(); res != ports_by_tag.end(); res++) {
+ if ((*res).second->number() == portnum) {
+ outputPort = (*res).second;
+ return 0;
+ }
+ }
+
+ return -1;
+}
+
+Port *
+Manager::port (string name)
+{
+ PortMap::iterator res;
+
+ for (res = ports_by_tag.begin(); res != ports_by_tag.end(); res++) {
+ if (name == (*res).first) {
+ return (*res).second;
+ }
+ }
+
+ return 0;
+}
+
+Port *
+Manager::port (size_t portnum)
+
+{
+ PortMap::iterator res;
+
+ for (res = ports_by_tag.begin(); res != ports_by_tag.end(); res++) {
+ if ((*res).second->number() == portnum) {
+ return (*res).second;
+ }
+ }
+
+ return 0;
+}
+
+int
+Manager::foreach_port (int (*func)(const Port &, size_t, void *),
+ void *arg)
+
+{
+ PortMap::const_iterator i;
+ int retval;
+ int n;
+
+ for (n = 0, i = ports_by_device.begin();
+ i != ports_by_device.end(); i++, n++) {
+
+ if ((retval = func (*((*i).second), n, arg)) != 0) {
+ return retval;
+ }
+ }
+
+ return 0;
+}
+
+int
+Manager::parse_port_request (string str, Port::Type type)
+{
+ PortRequest *req;
+ string::size_type colon;
+ string tag;
+
+ if (str.length() == 0) {
+ error << "MIDI: missing port specification" << endmsg;
+ return -1;
+ }
+
+ /* Port specifications look like:
+
+ devicename
+ devicename:tagname
+ devicename:tagname:mode
+
+ where
+
+ "devicename" is the full path to the requested file
+
+ "tagname" (optional) is the name used to refer to the
+ port. If not given, PBD::basename (devicename)
+ will be used.
+
+ "mode" (optional) is either "r" or "w" or something else.
+ if it is "r", the port will be opened
+ read-only, if "w", the port will be opened
+ write-only. Any other value, or no mode
+ specification at all, will cause the port to
+ be opened for reading and writing.
+ */
+
+ req = new PortRequest;
+ colon = str.find_first_of (':');
+
+ if (colon != string::npos) {
+ req->devname = strdup (str.substr (0, colon).c_str());
+ } else {
+ req->devname = strdup (str.c_str());
+ }
+
+ if (colon < str.length()) {
+
+ tag = str.substr (colon+1);
+
+ /* see if there is a mode specification in the tag part */
+
+ colon = tag.find_first_of (':');
+
+ if (colon != string::npos) {
+ string modestr;
+
+ req->tagname = strdup (tag.substr (0, colon).c_str());
+
+ modestr = tag.substr (colon+1);
+ if (modestr == "r") {
+ req->mode = O_RDONLY;
+ } else if (modestr == "w") {
+ req->mode = O_WRONLY;
+ } else {
+ req->mode = O_RDWR;
+ }
+
+ } else {
+ req->tagname = strdup (tag.c_str());
+ req->mode = O_RDWR;
+ }
+
+ } else {
+ req->tagname = strdup (PBD::basename (req->devname));
+ req->mode = O_RDWR;
+ }
+
+ req->type = type;
+
+ if (MIDI::Manager::instance()->add_port (*req) == 0) {
+ return -1;
+ }
+
+ return 0;
+}
diff --git a/libs/midi++2/midiparser.cc b/libs/midi++2/midiparser.cc
new file mode 100644
index 0000000000..04ac2728f1
--- /dev/null
+++ b/libs/midi++2/midiparser.cc
@@ -0,0 +1,800 @@
+/*
+ Copyright (C) 1998 Paul Barton-Davis
+
+ This file was inspired by the MIDI parser for KeyKit by
+ Tim Thompson.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#include <cstdlib>
+#include <unistd.h>
+#include <string>
+#include <iostream>
+
+#include <midi++/types.h>
+#include <midi++/parser.h>
+#include <midi++/port.h>
+#include <midi++/mmc.h>
+#include <pbd/transmitter.h>
+
+using namespace std;
+using namespace sigc;
+using namespace MIDI;
+
+const char *
+Parser::midi_event_type_name (eventType t)
+
+{
+ switch (t) {
+ case none:
+ return "no midi messages";
+
+ case raw:
+ return "raw midi data";
+
+ case MIDI::any:
+ return "any midi message";
+
+ case off:
+ return "note off";
+
+ case on:
+ return "note on";
+
+ case polypress:
+ return "aftertouch";
+
+ case MIDI::controller:
+ return "controller";
+
+ case program:
+ return "program change";
+
+ case chanpress:
+ return "channel pressure";
+
+ case MIDI::pitchbend:
+ return "pitch bend";
+
+ case MIDI::sysex:
+ return "system exclusive";
+
+ case MIDI::song:
+ return "song position";
+
+ case MIDI::tune:
+ return "tune";
+
+ case MIDI::eox:
+ return "end of sysex";
+
+ case MIDI::timing:
+ return "timing";
+
+ case MIDI::start:
+ return "start";
+
+ case MIDI::stop:
+ return "continue";
+
+ case MIDI::contineu:
+ return "stop";
+
+ case active:
+ return "active sense";
+
+ default:
+ return "unknow MIDI event type";
+ }
+};
+
+Parser::Parser (Port &p)
+ : _port (p)
+
+{
+ trace_stream = 0;
+ trace_prefix = "";
+ memset (message_counter, 0, sizeof (message_counter[0]) * 256);
+ msgindex = 0;
+ msgtype = none;
+ msglen = 256;
+ msgbuf = (unsigned char *) malloc (msglen);
+ msgbuf[msgindex++] = 0x90;
+ _mmc_forward = false;
+ reset_mtc_state ();
+ _offline = false;
+
+ /* this hack deals with the possibility of our first MIDI
+ bytes being running status messages.
+ */
+
+ channel_msg (0x90);
+ state = NEEDSTATUS;
+
+ pre_variable_state = NEEDSTATUS;
+ pre_variable_msgtype = none;
+}
+
+Parser::~Parser ()
+
+{
+ delete msgbuf;
+}
+
+void
+Parser::trace_event (Parser &p, byte *msg, size_t len)
+
+{
+ eventType type;
+ ostream *o;
+
+ if ((o = trace_stream) == NULL) { /* can be asynchronously removed */
+ return;
+ }
+
+ type = (eventType) (msg[0]&0xF0);
+
+ switch (type) {
+ case off:
+ *o << trace_prefix
+ << "Channel "
+ << (msg[0]&0xF)+1
+ << " NoteOff NoteNum "
+ << (int) msg[1]
+ << " Vel "
+ << (int) msg[2]
+ << endmsg;
+ break;
+
+ case on:
+ *o << trace_prefix
+ << "Channel "
+ << (msg[0]&0xF)+1
+ << " NoteOn NoteNum "
+ << (int) msg[1]
+ << " Vel "
+ << (int) msg[2]
+ << endmsg;
+ break;
+
+ case polypress:
+ *o << trace_prefix
+ << "Channel "
+ << (msg[0]&0xF)+1
+ << " PolyPressure"
+ << (int) msg[1]
+ << endmsg;
+ break;
+
+ case MIDI::controller:
+ *o << trace_prefix
+ << "Channel "
+ << (msg[0]&0xF)+1
+ << " Controller "
+ << (int) msg[1]
+ << " Value "
+ << (int) msg[2]
+ << endmsg;
+ break;
+
+ case program:
+ *o << trace_prefix
+ << "Channel "
+ << (msg[0]&0xF)+1
+ << " Program Change ProgNum "
+ << (int) msg[1]
+ << endmsg;
+ break;
+
+ case chanpress:
+ *o << trace_prefix
+ << "Channel "
+ << (msg[0]&0xF)+1
+ << " Channel Pressure "
+ << (int) msg[1]
+ << endmsg;
+ break;
+
+ case MIDI::pitchbend:
+ *o << trace_prefix
+ << "Channel "
+ << (msg[0]&0xF)+1
+ << " Pitch Bend "
+ << ((msg[1]<<7)|msg[2])
+ << endmsg;
+ break;
+
+ case MIDI::sysex:
+ if (len == 1) {
+ switch (msg[0]) {
+ case 0xf8:
+ *o << trace_prefix
+ << "Clock"
+ << endmsg;
+ break;
+ case 0xfa:
+ *o << trace_prefix
+ << "Start"
+ << endmsg;
+ break;
+ case 0xfb:
+ *o << trace_prefix
+ << "Continue"
+ << endmsg;
+ break;
+ case 0xfc:
+ *o << trace_prefix
+ << "Stop"
+ << endmsg;
+ break;
+ case 0xfe:
+ *o << trace_prefix
+ << "Active Sense"
+ << endmsg;
+ break;
+ case 0xff:
+ *o << trace_prefix
+ << "System Reset"
+ << endmsg;
+ break;
+ default:
+ *o << trace_prefix
+ << "System Exclusive (1 byte : " << hex << (int) *msg << dec << ')'
+ << endmsg;
+ break;
+ }
+ } else {
+ *o << trace_prefix
+ << "System Exclusive (" << len << ") = [ " << hex;
+ for (unsigned int i = 0; i < len; ++i) {
+ *o << (int) msgbuf[i] << ' ';
+ }
+ *o << dec << ']' << endmsg;
+
+ }
+ break;
+
+ case MIDI::song:
+ *o << trace_prefix << "Song" << endmsg;
+ break;
+
+ case MIDI::tune:
+ *o << trace_prefix << "Tune" << endmsg;
+ break;
+
+ case MIDI::eox:
+ *o << trace_prefix << "End-of-System Exclusive" << endmsg;
+ break;
+
+ case MIDI::timing:
+ *o << trace_prefix << "Timing" << endmsg;
+ break;
+
+ case MIDI::start:
+ *o << trace_prefix << "Start" << endmsg;
+ break;
+
+ case MIDI::stop:
+ *o << trace_prefix << "Stop" << endmsg;
+ break;
+
+ case MIDI::contineu:
+ *o << trace_prefix << "Continue" << endmsg;
+ break;
+
+ case active:
+ *o << trace_prefix << "Active Sense" << endmsg;
+ break;
+
+ default:
+ *o << trace_prefix << "Unrecognized MIDI message" << endmsg;
+ break;
+ }
+}
+
+void
+Parser::trace (bool onoff, ostream *o, const string &prefix)
+
+{
+ trace_connection.disconnect ();
+
+ if (onoff) {
+ trace_stream = o;
+ trace_prefix = prefix;
+ trace_connection = any.connect
+ (mem_fun (*this, &Parser::trace_event));
+ } else {
+ trace_prefix = "";
+ trace_stream = 0;
+ }
+}
+
+void
+Parser::scanner (unsigned char inbyte)
+{
+ bool statusbit;
+
+ // cerr << "parse: " << hex << (int) inbyte << dec << " state = " << state << " msgindex = " << msgindex << " runnable = " << runnable << endl;
+
+ /* Check active sensing early, so it doesn't interrupt sysex.
+
+ NOTE: active sense messages are not considered to fit under
+ "any" for the purposes of callbacks. If a caller wants
+ active sense messages handled, which is unlikely, then
+ they can just ask for it specifically. They are so unlike
+ every other MIDI message in terms of semantics that its
+ counter-productive to treat them similarly.
+ */
+
+ if (inbyte == 0xfe) {
+ message_counter[inbyte]++;
+ if (!_offline) {
+ active_sense (*this);
+ }
+ return;
+ }
+
+ /* If necessary, allocate larger message buffer. */
+
+ if (msgindex >= msglen) {
+ msglen *= 2;
+ msgbuf = (unsigned char *) realloc (msgbuf, msglen);
+ }
+
+ /*
+ Real time messages can occur ANYPLACE,
+ but do not interrupt running status.
+ */
+
+ bool rtmsg = false;
+
+ switch (inbyte) {
+ case 0xf8:
+ rtmsg = true;
+ break;
+ case 0xfa:
+ rtmsg = true;
+ break;
+ case 0xfb:
+ rtmsg = true;
+ break;
+ case 0xfc:
+ rtmsg = true;
+ break;
+ case 0xfd:
+ rtmsg = true;
+ break;
+ case 0xfe:
+ rtmsg = true;
+ break;
+ case 0xff:
+ rtmsg = true;
+ break;
+ }
+
+ if (rtmsg) {
+ if (edit (&inbyte, 1) >= 0 && !_offline) {
+ realtime_msg (inbyte);
+ }
+
+ return;
+ }
+
+ statusbit = (inbyte & 0x80);
+
+ /*
+ * Variable length messages (ie. the 'system exclusive')
+ * can be terminated by the next status byte, not necessarily
+ * an EOX. Actually, since EOX is a status byte, this
+ * code ALWAYS handles the end of a VARIABLELENGTH message.
+ */
+
+ if (state == VARIABLELENGTH && statusbit) {
+ /* The message has ended, so process it */
+
+ /* add EOX to any sysex message */
+
+ if (inbyte == MIDI::eox) {
+ msgbuf[msgindex++] = inbyte;
+ }
+
+#if 0
+ cerr << "SYSEX: " << hex;
+ for (unsigned int i = 0; i < msgindex; ++i) {
+ cerr << (int) msgbuf[i] << ' ';
+ }
+ cerr << dec << endl;
+#endif
+ if (msgindex > 0 && edit (msgbuf, msgindex) >= 0) {
+ if (!possible_mmc (msgbuf, msgindex) || _mmc_forward) {
+ if (!possible_mtc (msgbuf, msgindex) || _mtc_forward) {
+ if (!_offline) {
+ sysex (*this, msgbuf, msgindex);
+ }
+ }
+ }
+ if (!_offline) {
+ any (*this, msgbuf, msgindex);
+ }
+ }
+ }
+
+ /*
+ * Status bytes always start a new message, except EOX
+ */
+
+ if (statusbit) {
+
+ msgindex = 0;
+
+ if (inbyte == MIDI::eox) {
+ /* return to the state we had pre-sysex */
+
+ state = pre_variable_state;
+ runnable = was_runnable;
+ msgtype = pre_variable_msgtype;
+
+ if (state != NEEDSTATUS && runnable) {
+ msgbuf[msgindex++] = last_status_byte;
+ }
+ } else {
+ msgbuf[msgindex++] = inbyte;
+ if ((inbyte & 0xf0) == 0xf0) {
+ system_msg (inbyte);
+ runnable = false;
+ } else {
+ channel_msg (inbyte);
+ }
+ }
+
+ return;
+ }
+
+ /*
+ * We've got a Data byte.
+ */
+
+ msgbuf[msgindex++] = inbyte;
+
+ switch (state) {
+ case NEEDSTATUS:
+ /*
+ * We shouldn't get here, since in NEEDSTATUS mode
+ * we're expecting a new status byte, NOT any
+ * data bytes. On the other hand, some equipment
+ * with leaky modwheels and the like might be
+ * sending data bytes as part of running controller
+ * messages, so just handle it silently.
+ */
+ break;
+
+ case NEEDTWOBYTES:
+ /* wait for the second byte */
+ if (msgindex < 3)
+ return;
+ /*FALLTHRU*/
+
+ case NEEDONEBYTE:
+ /* We've completed a 1 or 2 byte message. */
+
+ if (edit (msgbuf, msgindex) == 0) {
+
+ /* message not cancelled by an editor */
+
+ message_counter[msgbuf[0] & 0xF0]++;
+
+ if (!_offline) {
+ signal (msgbuf, msgindex);
+ }
+ }
+
+ if (runnable) {
+ /* In Runnable mode, we reset the message
+ index, but keep the callbacks_pending and state the
+ same. This provides the "running status
+ byte" feature.
+ */
+ msgindex = 1;
+ } else {
+ /* If not Runnable, reset to NEEDSTATUS mode */
+ state = NEEDSTATUS;
+ }
+ break;
+
+ case VARIABLELENGTH:
+ /* nothing to do */
+ break;
+ }
+ return;
+}
+
+/*
+ * realtime_msg(inbyte)
+ *
+ * Call the real-time function for the specified byte, immediately.
+ * These can occur anywhere, so they don't change the state.
+ */
+
+void
+Parser::realtime_msg(unsigned char inbyte)
+
+{
+ message_counter[inbyte]++;
+
+ if (_offline) {
+ return;
+ }
+
+ switch (inbyte) {
+ case 0xf8:
+ timing (*this);
+ break;
+ case 0xfa:
+ start (*this);
+ break;
+ case 0xfb:
+ contineu (*this);
+ break;
+ case 0xfc:
+ stop (*this);
+ break;
+ case 0xfe:
+ /* !!! active sense message in realtime_msg: should not reach here
+ */
+ break;
+ case 0xff:
+ reset (*this);
+ break;
+ }
+
+ any (*this, &inbyte, 1);
+}
+
+/*
+ * channel_msg(inbyte)
+ *
+ * Interpret a Channel (voice or mode) Message status byte.
+ */
+
+void
+Parser::channel_msg(unsigned char inbyte)
+{
+ last_status_byte = inbyte;
+ runnable = true; /* Channel messages can use running status */
+
+ /* The high 4 bits, which determine the type of channel message. */
+
+ switch (inbyte&0xF0) {
+ case 0x80:
+ msgtype = off;
+ state = NEEDTWOBYTES;
+ break;
+ case 0x90:
+ msgtype = on;
+ state = NEEDTWOBYTES;
+ break;
+ case 0xa0:
+ msgtype = polypress;
+ state = NEEDTWOBYTES;
+ break;
+ case 0xb0:
+ msgtype = MIDI::controller;
+ state = NEEDTWOBYTES;
+ break;
+ case 0xc0:
+ msgtype = program;
+ state = NEEDONEBYTE;
+ break;
+ case 0xd0:
+ msgtype = chanpress;
+ state = NEEDONEBYTE;
+ break;
+ case 0xe0:
+ msgtype = MIDI::pitchbend;
+ state = NEEDTWOBYTES;
+ break;
+ }
+}
+
+/*
+ * system_msg(inbyte)
+ *
+ * Initialize (and possibly emit) the signals for the
+ * specified byte. Set the state that the state-machine
+ * should go into. If the signal is not emitted
+ * immediately, it will be when the state machine gets to
+ * the end of the MIDI message.
+ */
+
+void
+Parser::system_msg (unsigned char inbyte)
+{
+ message_counter[inbyte]++;
+
+ switch (inbyte) {
+ case 0xf0:
+ pre_variable_msgtype = msgtype;
+ pre_variable_state = state;
+ was_runnable = runnable;
+ msgtype = MIDI::sysex;
+ state = VARIABLELENGTH;
+ break;
+ case 0xf1:
+ msgtype = MIDI::mtc_quarter;
+ state = NEEDONEBYTE;
+ break;
+ case 0xf2:
+ msgtype = MIDI::position;
+ state = NEEDTWOBYTES;
+ break;
+ case 0xf3:
+ msgtype = MIDI::song;
+ state = NEEDONEBYTE;
+ break;
+ case 0xf6:
+ if (!_offline) {
+ tune (*this);
+ }
+ state = NEEDSTATUS;
+ break;
+ case 0xf7:
+ break;
+ }
+
+ // all these messages will be sent via any()
+ // when they are complete.
+ // any (*this, &inbyte, 1);
+}
+
+void
+Parser::signal (byte *msg, size_t len)
+{
+ channel_t chan = msg[0]&0xF;
+ int chan_i = chan;
+
+ switch (msgtype) {
+ case none:
+ break;
+
+ case off:
+ channel_active_preparse[chan_i] (*this);
+ note_off (*this, (EventTwoBytes *) &msg[1]);
+ channel_note_off[chan_i]
+ (*this, (EventTwoBytes *) &msg[1]);
+ channel_active_postparse[chan_i] (*this);
+ break;
+
+ case on:
+ channel_active_preparse[chan_i] (*this);
+
+ /* Hack to deal with MIDI sources that use velocity=0
+ instead of noteOff.
+ */
+
+ if (msg[2] == 0) {
+ note_off (*this, (EventTwoBytes *) &msg[1]);
+ channel_note_off[chan_i]
+ (*this, (EventTwoBytes *) &msg[1]);
+ } else {
+ note_on (*this, (EventTwoBytes *) &msg[1]);
+ channel_note_on[chan_i]
+ (*this, (EventTwoBytes *) &msg[1]);
+ }
+
+ channel_active_postparse[chan_i] (*this);
+ break;
+
+ case MIDI::controller:
+ channel_active_preparse[chan_i] (*this);
+ controller (*this, (EventTwoBytes *) &msg[1]);
+ channel_controller[chan_i]
+ (*this, (EventTwoBytes *) &msg[1]);
+ channel_active_postparse[chan_i] (*this);
+ break;
+
+ case program:
+ channel_active_preparse[chan_i] (*this);
+ program_change (*this, msg[1]);
+ channel_program_change[chan_i] (*this, msg[1]);
+ channel_active_postparse[chan_i] (*this);
+ break;
+
+ case chanpress:
+ channel_active_preparse[chan_i] (*this);
+ pressure (*this, msg[1]);
+ channel_pressure[chan_i] (*this, msg[1]);
+ channel_active_postparse[chan_i] (*this);
+ break;
+
+ case polypress:
+ channel_active_preparse[chan_i] (*this);
+ poly_pressure (*this, (EventTwoBytes *) &msg[1]);
+ channel_poly_pressure[chan_i]
+ (*this, (EventTwoBytes *) &msg[1]);
+ channel_active_postparse[chan_i] (*this);
+ break;
+
+ case MIDI::pitchbend:
+ channel_active_preparse[chan_i] (*this);
+ pitchbend (*this, (msg[1]<<7)|msg[2]);
+ channel_pitchbend[chan_i] (*this, (msg[1]<<7)|msg[2]);
+ channel_active_postparse[chan_i] (*this);
+ break;
+
+ case MIDI::sysex:
+ sysex (*this, msg, len);
+ break;
+
+ case MIDI::mtc_quarter:
+ process_mtc_quarter_frame (msg);
+ mtc_quarter_frame (*this, *msg);
+ break;
+
+ case MIDI::position:
+ position (*this, msg, len);
+ break;
+
+ case MIDI::song:
+ song (*this, msg, len);
+ break;
+
+ case MIDI::tune:
+ tune (*this);
+
+ default:
+ /* XXX some kind of warning ? */
+ break;
+ }
+
+ any (*this, msg, len);
+}
+
+bool
+Parser::possible_mmc (byte *msg, size_t msglen)
+{
+ if (!MachineControl::is_mmc (msg, msglen)) {
+ return false;
+ }
+
+ /* hand over the just the interior MMC part of
+ the sysex msg without the leading 0xF0
+ */
+
+ if (!_offline) {
+ mmc (*this, &msg[1], msglen - 1);
+ }
+
+ return true;
+}
+
+void
+Parser::set_offline (bool yn)
+{
+ if (_offline != yn) {
+ _offline = yn;
+ OfflineStatusChanged ();
+
+ /* this hack deals with the possibility of our first MIDI
+ bytes being running status messages.
+ */
+
+ channel_msg (0x90);
+ state = NEEDSTATUS;
+ }
+}
+
diff --git a/libs/midi++2/midiport.cc b/libs/midi++2/midiport.cc
new file mode 100644
index 0000000000..6d374ed8c0
--- /dev/null
+++ b/libs/midi++2/midiport.cc
@@ -0,0 +1,131 @@
+/*
+ Copyright (C) 1998 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#include <cstdio>
+#include <fcntl.h>
+
+#include <midi++/types.h>
+#include <midi++/port.h>
+#include <midi++/channel.h>
+#include <midi++/port_request.h>
+
+using namespace Select;
+using namespace MIDI;
+
+size_t Port::nports = 0;
+
+Port::Port (PortRequest &req)
+
+{
+ _ok = false; /* derived class must set to true if constructor
+ succeeds.
+ */
+
+ bytes_written = 0;
+ bytes_read = 0;
+ input_parser = 0;
+ output_parser = 0;
+ slowdown = 0;
+
+ _devname = req.devname;
+ _tagname = req.tagname;
+ _mode = req.mode;
+ _number = nports++;
+
+ if (_mode == O_RDONLY || _mode == O_RDWR) {
+ input_parser = new Parser (*this);
+ } else {
+ input_parser = 0;
+ }
+
+ if (_mode == O_WRONLY || _mode == O_RDWR) {
+ output_parser = new Parser (*this);
+ } else {
+ output_parser = 0;
+ }
+
+ for (int i = 0; i < 16; i++) {
+ _channel[i] = new Channel (i, *this);
+
+ if (input_parser) {
+ _channel[i]->connect_input_signals ();
+ }
+
+ if (output_parser) {
+ _channel[i]->connect_output_signals ();
+ }
+ }
+}
+
+
+Port::~Port ()
+
+{
+ for (int i = 0; i < 16; i++) {
+ delete _channel[i];
+ }
+}
+
+int
+Port::clock ()
+
+{
+ static byte clockmsg = 0xf8;
+
+ if (_mode != O_RDONLY) {
+ return midimsg (&clockmsg, 1);
+ }
+
+ return 0;
+}
+
+void
+Port::selector_read_callback (Selectable *s, Select::Condition cond)
+
+{
+ byte buf[64];
+ read (buf, sizeof (buf));
+}
+
+void
+Port::xforms_read_callback (int cond, int fd, void *ptr)
+
+{
+ byte buf[64];
+
+ ((Port *)ptr)->read (buf, sizeof (buf));
+}
+
+void
+Port::gtk_read_callback (void *ptr, int fd, int cond)
+
+{
+ byte buf[64];
+
+ ((Port *)ptr)->read (buf, sizeof (buf));
+}
+
+void
+Port::write_callback (byte *msg, unsigned int len, void *ptr)
+
+{
+ ((Port *)ptr)->write (msg, len);
+}
+
diff --git a/libs/midi++2/miditrace.cc b/libs/midi++2/miditrace.cc
new file mode 100644
index 0000000000..d7c65d9f29
--- /dev/null
+++ b/libs/midi++2/miditrace.cc
@@ -0,0 +1,64 @@
+#include <cstdio>
+#include <fcntl.h>
+
+#include <pbd/error.h>
+#include <pbd/textreceiver.h>
+
+Transmitter error (Transmitter::Error);
+Transmitter info (Transmitter::Info);
+Transmitter warning (Transmitter::Warning);
+Transmitter fatal (Transmitter::Fatal);
+TextReceiver text_receiver ("mmctest");
+
+#include "midi++/port.h"
+#include "midi++/port_request.h"
+#include "midi++/manager.h"
+
+using namespace MIDI;
+
+Port *port;
+PortRequest midi_device;
+
+int
+setup_midi ()
+
+{
+ midi_device.devname = "/dev/snd/midiC0D0";
+ midi_device.tagname = "trident";
+ midi_device.mode = O_RDWR;
+ midi_device.type = Port::ALSA_RawMidi;
+
+ if ((port = MIDI::Manager::instance()->add_port (midi_device)) == 0) {
+ info << "MIDI port is not valid" << endmsg;
+ return -1;
+ }
+
+ return 0;
+}
+
+main (int argc, char *argv[])
+
+{
+ byte buf[1];
+
+ text_receiver.listen_to (error);
+ text_receiver.listen_to (info);
+ text_receiver.listen_to (fatal);
+ text_receiver.listen_to (warning);
+
+ if (setup_midi ()) {
+ exit (1);
+ }
+
+ port->input()->trace (true, &cout);
+
+ while (1) {
+ if (port->read (buf, 1) < 0) {
+ error << "cannot read byte"
+ << endmsg;
+ break;
+ }
+ }
+}
+
+
diff --git a/libs/midi++2/mmc.cc b/libs/midi++2/mmc.cc
new file mode 100644
index 0000000000..a0de774329
--- /dev/null
+++ b/libs/midi++2/mmc.cc
@@ -0,0 +1,577 @@
+/*
+ Copyright (C) 2000 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#include <map>
+
+#include <pbd/error.h>
+#include <midi++/mmc.h>
+#include <midi++/port.h>
+#include <midi++/parser.h>
+
+using namespace std;
+using namespace MIDI;
+
+static std::map<int,string> mmc_cmd_map;
+static void build_mmc_cmd_map ()
+{
+ pair<int,string> newpair;
+
+ newpair.first = 0x1;
+ newpair.second = "Stop";
+ mmc_cmd_map.insert (newpair);
+
+ newpair.first = 0x2;
+ newpair.second = "Play";
+ mmc_cmd_map.insert (newpair);
+
+ newpair.first = 0x3;
+ newpair.second = "DeferredPlay";
+ mmc_cmd_map.insert (newpair);
+
+ newpair.first = 0x4;
+ newpair.second = "FastForward";
+ mmc_cmd_map.insert (newpair);
+
+ newpair.first = 0x5;
+ newpair.second = "Rewind";
+ mmc_cmd_map.insert (newpair);
+
+ newpair.first = 0x6;
+ newpair.second = "RecordStrobe";
+ mmc_cmd_map.insert (newpair);
+
+ newpair.first = 0x7;
+ newpair.second = "RecordExit";
+ mmc_cmd_map.insert (newpair);
+
+ newpair.first = 0x8;
+ newpair.second = "RecordPause";
+ mmc_cmd_map.insert (newpair);
+
+ newpair.first = 0x9;
+ newpair.second = "Pause";
+ mmc_cmd_map.insert (newpair);
+
+ newpair.first = 0xA;
+ newpair.second = "Eject";
+ mmc_cmd_map.insert (newpair);
+
+ newpair.first = 0xB;
+ newpair.second = "Chase";
+ mmc_cmd_map.insert (newpair);
+
+ newpair.first = 0xC;
+ newpair.second = "CommandErrorReset";
+ mmc_cmd_map.insert (newpair);
+
+ newpair.first = 0xD;
+ newpair.second = "MmcReset";
+ mmc_cmd_map.insert (newpair);
+
+ newpair.first = 0x20;
+ newpair.second = "Illegal Mackie Jog Start";
+ mmc_cmd_map.insert (newpair);
+
+ newpair.first = 0x21;
+ newpair.second = "Illegal Mackie Jog Stop";
+ mmc_cmd_map.insert (newpair);
+
+ newpair.first = 0x40;
+ newpair.second = "Write";
+ mmc_cmd_map.insert (newpair);
+
+ newpair.first = 0x41;
+ newpair.second = "MaskedWrite";
+ mmc_cmd_map.insert (newpair);
+
+ newpair.first = 0x42;
+ newpair.second = "Read";
+ mmc_cmd_map.insert (newpair);
+
+ newpair.first = 0x43;
+ newpair.second = "Update";
+ mmc_cmd_map.insert (newpair);
+
+ newpair.first = 0x44;
+ newpair.second = "Locate";
+ mmc_cmd_map.insert (newpair);
+
+ newpair.first = 0x45;
+ newpair.second = "VariablePlay";
+ mmc_cmd_map.insert (newpair);
+
+ newpair.first = 0x46;
+ newpair.second = "Search";
+ mmc_cmd_map.insert (newpair);
+
+ newpair.first = 0x47;
+ newpair.second = "Shuttle";
+ mmc_cmd_map.insert (newpair);
+
+ newpair.first = 0x48;
+ newpair.second = "Step";
+ mmc_cmd_map.insert (newpair);
+
+ newpair.first = 0x49;
+ newpair.second = "AssignSystemMaster";
+ mmc_cmd_map.insert (newpair);
+
+ newpair.first = 0x4A;
+ newpair.second = "GeneratorCommand";
+ mmc_cmd_map.insert (newpair);
+
+ newpair.first = 0x4B;
+ newpair.second = "MtcCommand";
+ mmc_cmd_map.insert (newpair);
+
+ newpair.first = 0x4C;
+ newpair.second = "Move";
+ mmc_cmd_map.insert (newpair);
+
+ newpair.first = 0x4D;
+ newpair.second = "Add";
+ mmc_cmd_map.insert (newpair);
+
+ newpair.first = 0x4E;
+ newpair.second = "Subtract";
+ mmc_cmd_map.insert (newpair);
+
+ newpair.first = 0x4F;
+ newpair.second = "DropFrameAdjust";
+ mmc_cmd_map.insert (newpair);
+
+ newpair.first = 0x50;
+ newpair.second = "Procedure";
+ mmc_cmd_map.insert (newpair);
+
+ newpair.first = 0x51;
+ newpair.second = "Event";
+ mmc_cmd_map.insert (newpair);
+
+ newpair.first = 0x52;
+ newpair.second = "Group";
+ mmc_cmd_map.insert (newpair);
+
+ newpair.first = 0x53;
+ newpair.second = "CommandSegment";
+ mmc_cmd_map.insert (newpair);
+
+ newpair.first = 0x54;
+ newpair.second = "DeferredVariablePlay";
+ mmc_cmd_map.insert (newpair);
+
+ newpair.first = 0x55;
+ newpair.second = "RecordStrobeVariable";
+ mmc_cmd_map.insert (newpair);
+
+ newpair.first = 0x7C;
+ newpair.second = "Wait";
+ mmc_cmd_map.insert (newpair);
+
+ newpair.first = 0x7F;
+ newpair.second = "Resume";
+ mmc_cmd_map.insert (newpair);
+}
+
+
+MachineControl::MachineControl (Port &p, float version,
+ CommandSignature &csig,
+ ResponseSignature &rsig)
+
+ : _port (p)
+{
+ Parser *parser;
+
+ build_mmc_cmd_map ();
+
+ _device_id = 1;
+
+ if ((parser = _port.input()) != 0) {
+ parser->mmc.connect
+ (mem_fun (*this, &MachineControl::process_mmc_message));
+ } else {
+ warning << "MMC connected to a non-input port: useless!"
+ << endmsg;
+ }
+}
+
+void
+MachineControl::set_device_id (byte id)
+
+{
+ _device_id = id & 0x7f;
+}
+
+bool
+MachineControl::is_mmc (byte *sysex_buf, size_t len)
+
+{
+ if (len < 4 || len > 48) {
+ return false;
+ }
+
+ if (sysex_buf[1] != 0x7f) {
+ return false;
+ }
+
+ if (sysex_buf[3] != 0x6 && /* MMC Command */
+ sysex_buf[3] != 0x7) { /* MMC Response */
+ return false;
+ }
+
+ return true;
+}
+
+void
+MachineControl::process_mmc_message (Parser &p, byte *msg, size_t len)
+
+{
+ size_t skiplen;
+ byte *mmc_msg;
+ bool single_byte;
+
+ /* Reject if its not for us. 0x7f is the "all-call" device ID */
+
+ /* msg[0] = 0x7f (MMC sysex ID(
+ msg[1] = device ID
+ msg[2] = 0x6 (MMC command) or 0x7 (MMC response)
+ msg[3] = MMC command code
+ msg[4] = (typically) byte count for following part of command
+ */
+
+#if 0
+ cerr << "*** MMC message: len = " << len << "\n\t";
+ for (size_t i = 0; i < len; i++) {
+ cerr << hex << (int) msg[i] << dec << ' ';
+ }
+ cerr << endl;
+#endif
+
+ if (msg[1] != 0x7f && msg[1] != _device_id) {
+ return;
+ }
+
+ mmc_msg = &msg[3];
+ len -= 3;
+
+ do {
+
+ single_byte = false;
+
+ /* this works for all non-single-byte "counted"
+ commands. we set it to 1 for the exceptions.
+ */
+
+ std::map<int,string>::iterator x = mmc_cmd_map.find ((int)mmc_msg[0]);
+ string cmdname = "unknown";
+
+ if (x != mmc_cmd_map.end()) {
+ cmdname = (*x).second;
+ }
+
+#if 0
+ cerr << "+++ MMC type "
+ << hex
+ << ((int) *mmc_msg)
+ << dec
+ << " \"" << cmdname << "\" "
+ << " len = " << len
+ << endl;
+#endif
+
+ switch (*mmc_msg) {
+
+ /* SINGLE-BYTE, UNCOUNTED COMMANDS */
+
+ case cmdStop:
+ Stop (*this);
+ single_byte = true;
+ break;
+
+ case cmdPlay:
+ Play (*this);
+ single_byte = true;
+ break;
+
+ case cmdDeferredPlay:
+ DeferredPlay (*this);
+ single_byte = true;
+ break;
+
+ case cmdFastForward:
+ FastForward (*this);
+ single_byte = true;
+ break;
+
+ case cmdRewind:
+ Rewind (*this);
+ single_byte = true;
+ break;
+
+ case cmdRecordStrobe:
+ RecordStrobe (*this);
+ single_byte = true;
+ break;
+
+ case cmdRecordExit:
+ RecordExit (*this);
+ single_byte = true;
+ break;
+
+ case cmdRecordPause:
+ RecordPause (*this);
+ single_byte = true;
+ break;
+
+ case cmdPause:
+ Pause (*this);
+ single_byte = true;
+ break;
+
+ case cmdEject:
+ Eject (*this);
+ single_byte = true;
+ break;
+
+ case cmdChase:
+ Chase (*this);
+ single_byte = true;
+ break;
+
+ case cmdCommandErrorReset:
+ CommandErrorReset (*this);
+ single_byte = true;
+ break;
+
+ case cmdMmcReset:
+ MmcReset (*this);
+ single_byte = true;
+ break;
+
+ case cmdIllegalMackieJogStart:
+ JogStart (*this);
+ single_byte = true;
+ break;
+
+ case cmdIllegalMackieJogStop:
+ JogStop (*this);
+ single_byte = true;
+ break;
+
+ /* END OF SINGLE-BYTE, UNCOUNTED COMMANDS */
+
+ case cmdMaskedWrite:
+ do_masked_write (mmc_msg, len);
+ break;
+
+ case cmdLocate:
+ do_locate (mmc_msg, len);
+ break;
+
+ case cmdShuttle:
+ do_shuttle (mmc_msg, len);
+ break;
+
+ case cmdStep:
+ do_step (mmc_msg, len);
+ break;
+
+ case cmdWrite:
+ case cmdRead:
+ case cmdUpdate:
+ case cmdVariablePlay:
+ case cmdSearch:
+ case cmdAssignSystemMaster:
+ case cmdGeneratorCommand:
+ case cmdMtcCommand:
+ case cmdMove:
+ case cmdAdd:
+ case cmdSubtract:
+ case cmdDropFrameAdjust:
+ case cmdProcedure:
+ case cmdEvent:
+ case cmdGroup:
+ case cmdCommandSegment:
+ case cmdDeferredVariablePlay:
+ case cmdRecordStrobeVariable:
+ case cmdWait:
+ case cmdResume:
+ error << "MIDI::MachineControl: unimplemented MMC command "
+ << hex << (int) *mmc_msg << dec
+ << endmsg;
+
+ break;
+
+ default:
+ error << "MIDI::MachineControl: unknown MMC command "
+ << hex << (int) *mmc_msg << dec
+ << endmsg;
+
+ break;
+ }
+
+ /* increase skiplen to cover the command byte and
+ count byte (if it existed).
+ */
+
+ if (!single_byte) {
+ skiplen = mmc_msg[1] + 2;
+ } else {
+ skiplen = 1;
+ }
+
+ if (len <= skiplen) {
+ break;
+ }
+
+ mmc_msg += skiplen;
+ len -= skiplen;
+
+ } while (len > 1); /* skip terminating EOX byte */
+}
+
+int
+MachineControl::do_masked_write (byte *msg, size_t len)
+
+{
+ /* return the number of bytes "consumed" */
+
+ int retval = msg[1] + 2; /* bytes following + 2 */
+
+ switch (msg[2]) {
+ case 0x4f: /* Track Record Ready Status */
+ write_track_record_ready (&msg[3], len - 3);
+ break;
+
+ default:
+ warning << "MIDI::MachineControl: masked write to "
+ << hex << (int) msg[2] << dec
+ << " not implemented"
+ << endmsg;
+ }
+
+ return retval;
+}
+
+void
+MachineControl::write_track_record_ready (byte *msg, size_t len)
+
+{
+ size_t n;
+ size_t base_track;
+
+ /* Bits 0-4 of the first byte are for special tracks:
+
+ bit 0: video
+ bit 1: reserved
+ bit 2: time code
+ bit 3: aux track a
+ bit 4: aux track b
+
+ */
+
+ /* XXX check needed to make sure we don't go outside the
+ support number of tracks.
+ */
+
+ base_track = (msg[0] * 7) - 5;
+
+ for (n = 0; n < 7; n++) {
+ if (msg[1] & (1<<n)) {
+
+ /* Only touch tracks that have the "mask"
+ bit set.
+ */
+
+ if (msg[2] & (1<<n)) {
+ trackRecordStatus[base_track+n] = true;
+ TrackRecordStatusChange (*this, base_track+n,
+ true);
+ } else {
+ trackRecordStatus[base_track+n] = false;
+ TrackRecordStatusChange (*this, base_track+n,
+ false);
+ }
+ }
+
+ }
+}
+
+int
+MachineControl::do_locate (byte *msg, size_t msglen)
+
+{
+ if (msg[2] == 0) {
+ warning << "MIDI::MMC: locate [I/F] command not supported"
+ << endmsg;
+ return 0;
+ }
+
+ /* regular "target" locate command */
+
+ Locate (*this, &msg[3]);
+ return 0;
+}
+
+int
+MachineControl::do_step (byte *msg, size_t msglen)
+{
+ int steps = msg[2] & 0x3f;
+
+ if (msg[2] & 0x40) {
+ steps = -steps;
+ }
+
+ Step (*this, steps);
+ return 0;
+}
+
+int
+MachineControl::do_shuttle (byte *msg, size_t msglen)
+
+{
+ size_t forward;
+ byte sh = msg[2];
+ byte sm = msg[3];
+ byte sl = msg[4];
+ size_t left_shift;
+ size_t integral;
+ size_t fractional;
+ float shuttle_speed;
+
+ if (sh & (1<<6)) {
+ forward = false;
+ } else {
+ forward = true;
+ }
+
+ left_shift = (sh & 0x38);
+
+ integral = ((sh & 0x7) << left_shift) | (sm >> (7 - left_shift));
+ fractional = ((sm << left_shift) << 7) | sl;
+
+ shuttle_speed = integral +
+ ((float)fractional / (1 << (14 - left_shift)));
+
+ Shuttle (*this, shuttle_speed, forward);
+
+ return 0;
+}
+
diff --git a/libs/midi++2/mmctest.cc b/libs/midi++2/mmctest.cc
new file mode 100644
index 0000000000..25ea964ded
--- /dev/null
+++ b/libs/midi++2/mmctest.cc
@@ -0,0 +1,112 @@
+#include <cstdio>
+#include <fcntl.h>
+
+#include <pbd/error.h>
+#include <pbd/textreceiver.h>
+
+Transmitter error (Transmitter::Error);
+Transmitter info (Transmitter::Info);
+Transmitter warning (Transmitter::Warning);
+Transmitter fatal (Transmitter::Fatal);
+TextReceiver text_receiver ("mmctest");
+
+#include "midi++/port.h"
+#include "midi++/port_request.h"
+#include "midi++/manager.h"
+#include "midi++/mmc.h"
+
+using namespace MIDI;
+
+Port *port;
+PortRequest midi_device;
+Parser *parser;
+MachineControl *mmc;
+MachineControl::CommandSignature cs;
+MachineControl::ResponseSignature rs;
+
+int
+setup_midi ()
+
+{
+ midi_device.devname = "/dev/snd/midiC0D0";
+ midi_device.tagname = "trident";
+ midi_device.mode = O_RDWR;
+ midi_device.type = Port::ALSA_RawMidi;
+
+ if ((port = MIDI::Manager::instance()->add_port (midi_device)) == 0) {
+ info << "MIDI port is not valid" << endmsg;
+ return -1;
+ }
+
+ mmc = new MachineControl (*port, 0.0, cs, rs);
+
+ return 0;
+}
+
+void
+do_deferred_play (MachineControl &mmc)
+
+{
+ cout << "Deferred Play" << endl;
+}
+
+void
+do_stop (MachineControl &mmc)
+
+{
+ cout << "Stop" << endl;
+}
+
+void
+do_ffwd (MachineControl &mmc)
+
+{
+ cout << "Fast Forward" << endl;
+}
+
+void
+do_rewind (MachineControl &mmc)
+
+{
+ cout << "Rewind" << endl;
+}
+
+void
+do_record_status (MachineControl &mmc, size_t track, bool enabled)
+
+{
+ cout << "Track " << track + 1 << (enabled ? " enabled" : " disabled")
+ << endl;
+}
+
+main (int argc, char *argv[])
+
+{
+ byte buf[1];
+
+ text_receiver.listen_to (error);
+ text_receiver.listen_to (info);
+ text_receiver.listen_to (fatal);
+ text_receiver.listen_to (warning);
+
+ if (setup_midi ()) {
+ exit (1);
+ }
+
+
+ mmc->DeferredPlay.connect (mem_fun (do_deferred_play));
+ mmc->FastForward.connect (mem_fun (do_ffwd));
+ mmc->Rewind.connect (mem_fun (do_rewind));
+ mmc->Stop.connect (mem_fun (do_stop));
+ mmc->TrackRecordStatusChange.connect (mem_fun (do_record_status));
+
+ while (1) {
+ if (port->read (buf, 1) < 0) {
+ error << "cannot read byte"
+ << endmsg;
+ break;
+ }
+ }
+}
+
+
diff --git a/libs/midi++2/mtc.cc b/libs/midi++2/mtc.cc
new file mode 100644
index 0000000000..19fdb1fabd
--- /dev/null
+++ b/libs/midi++2/mtc.cc
@@ -0,0 +1,329 @@
+/*
+ Copyright (C) 2004 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#include <cstdlib>
+#include <unistd.h>
+#include <string>
+#include <iostream>
+
+#include <midi++/types.h>
+#include <midi++/parser.h>
+#include <midi++/port.h>
+#include <midi++/mmc.h>
+#include <pbd/transmitter.h>
+
+using namespace std;
+using namespace sigc;
+using namespace MIDI;
+
+bool
+Parser::possible_mtc (byte *sysex_buf, size_t msglen)
+{
+ byte fake_mtc_time[4];
+
+ if (msglen != 10 || sysex_buf[0] != 0xf0 || sysex_buf[1] != 0x7f || sysex_buf[3] != 0x01 || sysex_buf[4] != 0x01) {
+ return false;
+ }
+
+ /* full MTC */
+
+ fake_mtc_time[0] = sysex_buf[8]; // frames
+ fake_mtc_time[1] = sysex_buf[7]; // minutes
+ fake_mtc_time[2] = sysex_buf[6]; // seconds
+ fake_mtc_time[3] = (sysex_buf[5] & 0x1f); // hours
+
+ _mtc_fps = MTC_FPS ((sysex_buf[5] & 0x60) >> 5); // fps
+
+ /* wait for first quarter frame, which could indicate forwards
+ or backwards ...
+ */
+
+ reset_mtc_state ();
+
+ /* emit signals */
+
+ mtc (*this, &sysex_buf[1], msglen - 1);
+ mtc_time (fake_mtc_time, true);
+ mtc_status (MTC_Stopped);
+
+ return true;
+}
+
+void
+Parser::reset_mtc_state ()
+{
+ _mtc_forward = false;
+ _mtc_running = MTC_Stopped;
+ _mtc_locked = false;
+ expected_mtc_quarter_frame_code = 0;
+ memset (_mtc_time, 0, sizeof (_mtc_time));
+ memset (_qtr_mtc_time, 0, sizeof (_mtc_time));
+ consecutive_qtr_frame_cnt = 0;
+ last_qtr_frame = 0;
+}
+
+void
+Parser::process_mtc_quarter_frame (byte *msg)
+{
+ int which_quarter_frame = (msg[1] & 0xf0) >> 4;
+
+ /* Is it an expected frame?
+ Remember, the first can be frame 7 or frame 0,
+ depending on the direction of the MTC generator ...
+ */
+
+#if 0
+ cerr << "MTC: (state = " << _mtc_running << ") "
+ << which_quarter_frame << " vs. " << expected_mtc_quarter_frame_code
+ << " consecutive ? " << consecutive_qtr_frame_cnt
+ << endl;
+#endif
+
+ if (_mtc_running == MTC_Stopped) {
+
+ /* we are stopped but are seeing qtr frame messages */
+
+ if (consecutive_qtr_frame_cnt == 0) {
+
+ /* first quarter frame */
+
+ if (which_quarter_frame != 0 && which_quarter_frame != 7) {
+
+ last_qtr_frame = which_quarter_frame;
+ consecutive_qtr_frame_cnt++;
+ }
+
+ // cerr << "first seen qframe = " << (int) last_qtr_frame << endl;
+
+ return;
+
+ } else if (consecutive_qtr_frame_cnt == 1) {
+
+ /* third quarter frame */
+
+ // cerr << "second seen qframe = " << (int) which_quarter_frame << endl;
+
+ if (last_qtr_frame < which_quarter_frame) {
+ _mtc_running = MTC_Forward;
+ } else if (last_qtr_frame > which_quarter_frame) {
+ _mtc_running = MTC_Backward;
+ }
+
+ mtc_status (_mtc_running);
+ }
+
+ switch (_mtc_running) {
+ case MTC_Forward:
+ if (which_quarter_frame == 7) {
+ expected_mtc_quarter_frame_code = 0;
+ } else {
+ expected_mtc_quarter_frame_code = which_quarter_frame + 1;
+ }
+ break;
+
+ case MTC_Backward:
+ if (which_quarter_frame == 0) {
+ expected_mtc_quarter_frame_code = 7;
+
+ } else {
+ expected_mtc_quarter_frame_code = which_quarter_frame - 1;
+ }
+ break;
+
+ case MTC_Stopped:
+ break;
+ }
+
+ } else {
+
+ /* already running */
+
+// for testing bad MIDI connections etc.
+// if ((random() % 500) < 10) {
+
+ if (which_quarter_frame != expected_mtc_quarter_frame_code) {
+
+ consecutive_qtr_frame_cnt = 0;
+
+#ifdef DEBUG_MTC
+ cerr << "MTC: (state = " << _mtc_running << ") "
+ << which_quarter_frame << " vs. " << expected_mtc_quarter_frame_code << endl;
+#endif
+
+ /* tell listener(s) that we skipped. if they return
+ true, just ignore this in terms of it being an error.
+ */
+
+ if (1) { /* mtc_skipped () */
+
+ /* no error, reset next expected frame */
+
+ switch (_mtc_running) {
+ case MTC_Forward:
+ if (which_quarter_frame == 7) {
+ expected_mtc_quarter_frame_code = 0;
+ } else {
+ expected_mtc_quarter_frame_code = which_quarter_frame + 1;
+ }
+ break;
+
+ case MTC_Backward:
+ if (which_quarter_frame == 0) {
+ expected_mtc_quarter_frame_code = 7;
+
+ } else {
+ expected_mtc_quarter_frame_code = which_quarter_frame - 1;
+ }
+ break;
+
+ case MTC_Stopped:
+ break;
+ }
+
+#ifdef DEBUG_MTC
+ cerr << "SKIPPED, next expected = " << expected_mtc_quarter_frame_code << endl;
+#endif
+ return;
+ }
+
+ /* go back to waiting for the first frame */
+
+ expected_mtc_quarter_frame_code = 0;
+ memset (_qtr_mtc_time, 0, sizeof (_qtr_mtc_time));
+
+ _mtc_running = MTC_Stopped;
+ _mtc_locked = false;
+ mtc_status (MTC_Stopped);
+
+ return;
+
+ } else {
+
+ /* received qtr frame matched expected */
+ consecutive_qtr_frame_cnt++;
+
+ }
+ }
+
+ /* time code is looking good */
+
+ switch (which_quarter_frame) {
+ case 0: // frames LS nibble
+ _qtr_mtc_time[0] |= msg[1] & 0xf;
+ break;
+
+ case 1: // frames MS nibble
+ _qtr_mtc_time[0] |= (msg[1] & 0xf)<<4;
+ break;
+
+ case 2: // seconds LS nibble
+ _qtr_mtc_time[1] |= msg[1] & 0xf;
+ break;
+
+ case 3: // seconds MS nibble
+ _qtr_mtc_time[1] |= (msg[1] & 0xf)<<4;
+ break;
+
+ case 4: // minutes LS nibble
+ _qtr_mtc_time[2] |= msg[1] & 0xf;
+ break;
+
+ case 5: // minutes MS nibble
+ _qtr_mtc_time[2] |= (msg[1] & 0xf)<<4;
+ break;
+
+ case 6: // hours LS nibble
+ _qtr_mtc_time[3] |= msg[1] & 0xf;
+ break;
+
+ case 7:
+
+ /* last quarter frame msg has the MS bit of
+ the hour in bit 0, and the SMPTE FPS type
+ in bits 5 and 6
+ */
+
+ _qtr_mtc_time[3] |= ((msg[1] & 0x1) << 4);
+ _mtc_fps = MTC_FPS ((msg[1] & 0x6) >> 1);
+ break;
+
+ default:
+ /*NOTREACHED*/
+ break;
+
+ }
+
+ mtc_qtr (*this); /* EMIT_SIGNAL */
+
+ // mtc (*this, &msg[1], msglen - 1);
+
+ switch (_mtc_running) {
+ case MTC_Forward:
+ if ((which_quarter_frame == 7)) {
+
+ /* we've reached the final of 8 quarter frame messages.
+ store the time, reset the pending time holder,
+ and signal anyone who wants to know the time.
+ */
+
+ if (consecutive_qtr_frame_cnt >= 8) {
+ memcpy (_mtc_time, _qtr_mtc_time, sizeof (_mtc_time));
+ memset (_qtr_mtc_time, 0, sizeof (_qtr_mtc_time));
+ if (!_mtc_locked) {
+ _mtc_locked = true;
+ }
+ mtc_time (_mtc_time, false);
+ }
+ expected_mtc_quarter_frame_code = 0;
+
+ } else {
+ expected_mtc_quarter_frame_code = which_quarter_frame + 1;
+ }
+ break;
+
+ case MTC_Backward:
+ if (which_quarter_frame == 0) {
+
+ /* we've reached the final of 8 quarter frame messages.
+ store the time, reset the pending time holder,
+ and signal anyone who wants to know the time.
+ */
+
+ if (consecutive_qtr_frame_cnt >= 8) {
+ memcpy (_mtc_time, _qtr_mtc_time, sizeof (_mtc_time));
+ memset (_qtr_mtc_time, 0, sizeof (_qtr_mtc_time));
+ if (!_mtc_locked) {
+ _mtc_locked = true;
+ }
+ mtc_time (_mtc_time, false);
+ }
+
+ expected_mtc_quarter_frame_code = 7;
+
+ } else {
+ expected_mtc_quarter_frame_code = which_quarter_frame - 1;
+ }
+ break;
+
+ default:
+ break;
+ }
+
+}
diff --git a/libs/midi++2/port_request.cc b/libs/midi++2/port_request.cc
new file mode 100644
index 0000000000..d081bdb570
--- /dev/null
+++ b/libs/midi++2/port_request.cc
@@ -0,0 +1,80 @@
+/*
+ Copyright (C) 2000 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#include <fcntl.h>
+#include <string.h>
+#include <midi++/port.h>
+#include <midi++/port_request.h>
+
+using namespace std;
+using namespace MIDI;
+
+PortRequest::PortRequest (const string &xdev,
+ const string &xtag,
+ const string &xmode,
+ const string &xtype)
+
+{
+ status = OK;
+
+ devname = strdup (xdev.c_str());
+ tagname = strdup (xtag.c_str());
+
+ if (xmode == "output" ||
+ xmode == "out" ||
+ xmode == "OUTPUT" ||
+ xmode == "OUT") {
+ mode = O_WRONLY;
+
+ } else if (xmode == "input" ||
+ xmode == "in" ||
+ xmode == "INPUT" ||
+ xmode == "IN") {
+ mode = O_RDONLY;
+
+ } else if (xmode == "duplex" ||
+ xmode == "DUPLEX" ||
+ xmode == "inout" ||
+ xmode == "INOUT") {
+ mode = O_RDWR;
+ } else {
+ status = Unknown;
+ }
+
+ if (xtype == "ALSA/RAW" ||
+ xtype == "alsa/raw") {
+ type = Port::ALSA_RawMidi;
+ } else if (xtype == "ALSA/SEQUENCER" ||
+ xtype == "alsa/sequencer") {
+ type = Port::ALSA_Sequencer;
+ } else if (xtype == "COREMIDI" ||
+ xtype == "coremidi") {
+ type = Port::CoreMidi_MidiPort;
+ } else if (xtype == "NULL" ||
+ xtype == "null") {
+ type = Port::Null;
+ } else if (xtype == "FIFO" ||
+ xtype == "fifo") {
+ type = Port::FIFO;
+ } else {
+ status = Unknown;
+ }
+}
+
diff --git a/libs/pbd3/.cvsignore b/libs/pbd3/.cvsignore
new file mode 100644
index 0000000000..232255cb47
--- /dev/null
+++ b/libs/pbd3/.cvsignore
@@ -0,0 +1,3 @@
+libpbd.pc
+libpbd.spec
+version.cc
diff --git a/libs/pbd3/AUTHORS b/libs/pbd3/AUTHORS
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/libs/pbd3/AUTHORS
diff --git a/libs/pbd3/COPYING b/libs/pbd3/COPYING
new file mode 100644
index 0000000000..d60c31a97a
--- /dev/null
+++ b/libs/pbd3/COPYING
@@ -0,0 +1,340 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/libs/pbd3/ChangeLog b/libs/pbd3/ChangeLog
new file mode 100644
index 0000000000..adbde9b0d4
--- /dev/null
+++ b/libs/pbd3/ChangeLog
@@ -0,0 +1,6 @@
+2005-4-1 Taybin Rutkin <taybin@earthlink.net>
+ * Updated to support sigc++-2.0.
+ * Incremented version to 3.0.0.
+
+2004-8-4 Taybin Rutkin <taybin@earthlink.net>
+ * Added support for gcc-3.4
diff --git a/libs/pbd3/NEWS b/libs/pbd3/NEWS
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/libs/pbd3/NEWS
diff --git a/libs/pbd3/README b/libs/pbd3/README
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/libs/pbd3/README
diff --git a/libs/pbd3/SConscript b/libs/pbd3/SConscript
new file mode 100644
index 0000000000..0ab6b72f12
--- /dev/null
+++ b/libs/pbd3/SConscript
@@ -0,0 +1,44 @@
+# -*- python -*-
+
+import glob
+
+Import('env libraries')
+
+pbd3 = env.Copy()
+
+domain = 'libpbd'
+pbd3.Append(DOMAIN=domain,MAJOR=3,MINOR=0,MICRO=1)
+
+pbd3_files = Split("""
+basename.cc
+dirname.cc
+dmalloc.cc
+ftw.cc
+mountpoint.cc
+pathscanner.cc
+pool.cc
+pthread_utils.cc
+receiver.cc
+strsplit.cc
+textreceiver.cc
+transmitter.cc
+undo.cc
+unescape.cc
+version.cc
+xml++.cc
+""")
+
+conf = Configure(pbd3)
+if conf.CheckFunc('getmntent'):
+ conf.env.Append(CCFLAGS="-DHAVE_GETMNTENT")
+pbd3 = conf.Finish()
+
+pbd3.Merge ([ libraries['sigc2'], libraries['xml'] ])
+
+pbd3.Append(CCFLAGS="-D_REENTRANT -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE")
+pbd3.Append(CCFLAGS="-DLIBSIGC_DISABLE_DEPRECATED")
+
+pbd3.VersionBuild(['version.cc','pbd/version.h'], 'SConscript')
+
+libpbd3 = pbd3.StaticLibrary('pbd', pbd3_files)
+Default(libpbd3)
diff --git a/libs/pbd3/basename.cc b/libs/pbd3/basename.cc
new file mode 100644
index 0000000000..b8c5c64d91
--- /dev/null
+++ b/libs/pbd3/basename.cc
@@ -0,0 +1,47 @@
+#include <iostream>
+#include <string.h>
+#include <pbd/basename.h>
+
+char *
+PBD::basename (const char *path)
+
+{
+ char *slash;
+
+ if ((slash = strrchr (path, '/')) == 0) {
+ return strdup (path);
+ }
+
+ if (*(slash+1) == '\0') {
+ return strdup ("");
+ }
+
+ return strdup (slash+1);
+}
+
+std::string
+PBD::basename (const std::string str)
+{
+ std::string::size_type slash = str.find_last_of ('/');
+
+ if (slash == std::string::npos) {
+ return str;
+ }
+
+ return str.substr (slash+1);
+}
+
+std::string
+PBD::basename_nosuffix (const std::string str)
+{
+ std::string::size_type slash = str.find_last_of ('/');
+ std::string noslash;
+
+ if (slash == std::string::npos) {
+ noslash = str;
+ } else {
+ noslash = str.substr (slash+1);
+ }
+
+ return noslash.substr (0, noslash.find_last_of ('.'));
+}
diff --git a/libs/pbd3/dirname.cc b/libs/pbd3/dirname.cc
new file mode 100644
index 0000000000..8945b6e969
--- /dev/null
+++ b/libs/pbd3/dirname.cc
@@ -0,0 +1,51 @@
+#include <cstdio>
+#include <cstdlib>
+#include <string>
+#include <pbd/dirname.h>
+
+
+char *
+PBD::dirname (const char *path)
+
+{
+ char *slash;
+ size_t len;
+ char *ret;
+
+ if ((slash = strrchr (path, '/')) == 0) {
+ return strdup (path);
+ }
+
+ if (*(slash+1) == '\0') {
+ return strdup ("");
+ }
+
+ len = (size_t) (slash - path);
+ ret = (char *) malloc (sizeof (char) * (len + 1));
+
+ snprintf (ret, len, "%*s", len, path);
+ return ret;
+}
+
+std::string
+PBD::dirname (const std::string str)
+{
+ std::string::size_type slash = str.find_last_of ('/');
+ std::string dir;
+
+ if (slash == std::string::npos) {
+ return str;
+ }
+
+ /* remove trailing multiple slashes (legal under POSIX) */
+
+ dir = str.substr (0, slash);
+ slash = dir.length();
+
+ while (slash > 1 && dir[slash-1] == '/') {
+ slash--;
+ dir = dir.substr (0, slash);
+ }
+
+ return dir;
+}
diff --git a/libs/pbd3/dmalloc.cc b/libs/pbd3/dmalloc.cc
new file mode 100644
index 0000000000..0e730946c8
--- /dev/null
+++ b/libs/pbd3/dmalloc.cc
@@ -0,0 +1,102 @@
+/*
+ * file that facilitates C++ program debugging.
+ *
+ * Copyright 1995 by Gray Watson
+ *
+ * This file is part of the dmalloc package.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * NON-COMMERCIAL purpose and without fee is hereby granted, provided
+ * that the above copyright notice and this permission notice appear
+ * in all copies, and that the name of Gray Watson not be used in
+ * advertising or publicity pertaining to distribution of the document
+ * or software without specific, written prior permission.
+ *
+ * Please see the PERMISSIONS file or contact the author for information
+ * about commercial licenses.
+ *
+ * Gray Watson makes no representations about the suitability of the
+ * software described herein for any purpose. It is provided "as is"
+ * without express or implied warranty.
+ *
+ * The author may be contacted via http://www.letters.com/~gray/
+ *
+ * $Id$
+ */
+
+/*
+ * This file is used to effectively redirect new to the more familiar
+ * malloc and delete to the more familiar free so they can be debugged
+ * with the debug malloc library.. They also give the known error
+ * behavior, too.
+ *
+ * Compile and link this in with the C++ program you want to debug.
+ *
+ * NOTE: I am not a C++ hacker so feedback in the form of other hints
+ * and ideas for C++ users would be much appreciated.
+ */
+
+#ifdef DEBUG_MALLOC
+
+extern "C" {
+#include <stdlib.h>
+#include <dmalloc.h>
+#include "/usr/local/src/dmalloc-4.1.2/return.h"
+}
+
+/*
+ * An overload function for the C++ new.
+ */
+void *
+operator new(size_t size)
+{
+ char *file;
+ GET_RET_ADDR(file);
+
+ /* handle correct C++ semantics for an alloc of size 0 */
+
+ if (size == 0) size = 1;
+
+ return _malloc_leap(file, 0, size);
+}
+
+/*
+ * An overload function for the C++ new[].
+ */
+void *
+operator new[](size_t size)
+{
+ char *file;
+ GET_RET_ADDR(file);
+
+ /* handle correct C++ semantics for an alloc of size 0 */
+
+ if (size == 0) size = 1;
+
+ return _malloc_leap(file, 0, size);
+}
+
+/*
+ * An overload function for the C++ delete.
+ */
+void
+operator delete(void *pnt)
+{
+ char *file;
+ GET_RET_ADDR(file);
+ _free_leap(file, 0, pnt);
+}
+
+/*
+ * An overload function for the C++ delete[]. Thanks to Jens Krinke
+ * <j.krinke@gmx.de>
+ */
+void
+operator delete[](void *pnt)
+{
+ char *file;
+ GET_RET_ADDR(file);
+ _free_leap(file, 0, pnt);
+}
+
+#endif
diff --git a/libs/pbd3/ftw.cc b/libs/pbd3/ftw.cc
new file mode 100644
index 0000000000..ea7162c22e
--- /dev/null
+++ b/libs/pbd3/ftw.cc
@@ -0,0 +1,220 @@
+/*
+ Copyright (c) 2003 by Joel Baker.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ 3. Neither the name of the Author nor the names of any contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.
+*/
+
+#include <string>
+#include <sys/types.h> /* Because fts(3) says so */
+#include <sys/stat.h>
+#include <fts.h>
+#include <alloca.h>
+
+#include <unistd.h> /* We want strcpy */
+
+#include <cerrno> /* Because errno is our friend */
+
+#ifndef __USE_XOPEN_EXTENDED /* We need nftw values, since we implement it */
+#define __USE_XOPEN_EXTENDED
+#endif
+
+#include <pbd/ftw.h>
+
+/* I like symbolic values - this is only used in this file. */
+
+enum __ftw_modes {
+ MODE_FTW,
+ MODE_NFTW
+};
+
+/* Prototype this so that we can have it later */
+
+static int __ftw_core(const char *, void*, int, int, enum __ftw_modes);
+
+/*
+ * The external function calls are really just wrappers around __ftw_core,
+ * since the work they do is 90% the same.
+ */
+
+int ftw (const char *dir, __ftw_func_t func, int descr) {
+ return __ftw_core(dir, (void*)func, descr, 0, MODE_FTW);
+}
+
+int nftw (const char *dir, __nftw_func_t func, int descr, int flags) {
+ return __ftw_core(dir, (void*)func, descr, flags, MODE_NFTW);
+}
+
+/*
+typedef int (*__ftw_func_t) \
+ (const char *file, const struct stat status, int flag);
+typedef int (*__nftw_func_t) \
+ (const char *file, const struct stat status, int flag, struct FTW detail);
+*/
+
+static int __ftw_core(const char *dir, void* func, int descr, int flags,
+ enum __ftw_modes mode) {
+ FTS *hierarchy = 0;
+ FTSENT *entry = 0;
+ int fts_options;
+ char *paths[2];
+ int ftw_flag = 0, func_ret = 0;
+ struct FTW ftw_st;
+ int skip_entry;
+ __ftw_func_t ftw_func;
+ __nftw_func_t nftw_func;
+
+ /* We need at least one descriptor to call fts */
+
+ if (descr < 1) {
+ errno = EINVAL;
+ return -1;
+ }
+
+ /* Decide which mode we're running in, and set the FTS options suitably. */
+
+ if (MODE_NFTW == mode) { /* NFTW mode, with all the bells and whistles. */
+ fts_options = (flags & FTW_PHYS) ? FTS_PHYSICAL : FTS_LOGICAL;
+ fts_options |= (flags & FTW_CHDIR) ? FTS_NOCHDIR : 0;
+ fts_options |= (flags & FTW_MOUNT) ? FTS_XDEV : 0;
+ } else { /* We must be in FTW mode. Nothing else makes sense. */
+ fts_options = FTS_LOGICAL;
+ }
+
+ /* FTW gets a const char *, but FTS expects a null-term array of them. */
+
+ if (!(paths[0] = (char*) alloca(strlen(dir) + 1))) {
+ errno = ENOMEM; /* This is stack... we probably just died anyway. */
+ return -1;
+ }
+
+ strcpy(paths[0], dir);
+ paths[1] = 0; /* null */
+
+ /* Open the file hierarchy. */
+
+ if (!(hierarchy = fts_open(paths, fts_options, 0))) {
+ if (EACCES == errno) {
+ return 0;
+ } else {
+ return -1;
+ }
+ }
+
+ /* The main loop. Is it not nifty? Worship the loop. */
+
+ bool first = true;
+ while ((entry = fts_read(hierarchy))) {
+ skip_entry = 0;
+ std::string path_name = entry->fts_path;
+
+ switch (entry->fts_info) {
+
+ case FTS_D:
+ if ((MODE_NFTW != mode) || !(flags & FTW_DEPTH)) {
+ if (first) {
+ path_name = path_name.substr(0, path_name.size() - 1);
+ first = false;
+ }
+ ftw_flag = FTW_D;
+ } else {
+ skip_entry = 1;
+ }
+ break;
+
+ case FTS_DNR:
+ ftw_flag = FTW_DNR;
+ break;
+
+ case FTS_F:
+ ftw_flag = FTW_F;
+ break;
+
+ case FTS_SL:
+ ftw_flag = FTW_SL;
+ break;
+
+ case FTS_NS:
+ ftw_flag = FTW_NS;
+ break;
+
+ /* Values that should only occur in nftw mode */
+
+ case FTS_SLNONE:
+ if (MODE_NFTW == mode) {
+ ftw_flag = FTW_SLN;
+ } else {
+ ftw_flag = FTW_SL;
+ }
+ break;
+
+ case FTS_DP:
+ if ((MODE_NFTW == mode) && (flags & FTW_DEPTH)) {
+ ftw_flag = FTW_D;
+ } else {
+ skip_entry = 1;
+ }
+ break;
+
+ default:
+ /* I'm not sure this is right, but we don't have a valid FTW
+ * type to call with, so cowardice seems the better part of
+ * guessing.
+ */
+
+ skip_entry = 1;
+ }
+
+ if (MODE_FTW == mode) {
+ ftw_func = (__ftw_func_t) func;
+ func_ret = (*ftw_func)
+ (path_name.c_str(), entry->fts_statp, ftw_flag);
+ } else if (MODE_NFTW == mode) {
+ ftw_st.base = (entry->fts_pathlen - entry->fts_namelen);
+ ftw_st.level = entry->fts_level;
+
+ nftw_func = (__nftw_func_t) func;
+ func_ret = (*nftw_func)
+ (path_name.c_str(), entry->fts_statp, ftw_flag, &ftw_st);
+ }
+
+ if (0 != func_ret) {
+ return func_ret;
+ }
+ }
+
+ if (0 != errno) { /* fts_read returned NULL, and set errno - bail */
+ return -1;
+ }
+
+ /* The janitors will be upset if we don't clean up after ourselves. */
+
+ if (0 != fts_close(hierarchy)) {
+ return -1;
+ }
+
+ return 0;
+}
diff --git a/libs/pbd3/libpbd.pc.in b/libs/pbd3/libpbd.pc.in
new file mode 100644
index 0000000000..14d0208845
--- /dev/null
+++ b/libs/pbd3/libpbd.pc.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@/pbd
+
+Name: libpbd
+Version: @VERSION@
+Description: libpbd, a library of useful, generic C++ objects
+Requires:
+Libs: -L${libdir} -lpbd @NON_PKG_LIBS@
+Cflags: -I${includedir} @NON_PKG_CFLAGS@
diff --git a/libs/pbd3/libpbd.spec.in b/libs/pbd3/libpbd.spec.in
new file mode 100644
index 0000000000..d50622d638
--- /dev/null
+++ b/libs/pbd3/libpbd.spec.in
@@ -0,0 +1,70 @@
+Summary: A general purpose programming library
+%define lib_name pbd
+Name: lib%{lib_name}
+Version: @VERSION@
+Release: 2
+Copyright: GPL
+Source: .
+Url: http://www.quasimodo.org
+Vendor: Paul Davis <paul@linuxaudiosystems.com>
+Packager: jfm3 <jfm3@acm.org>
+Group: System Environment/Libraries
+Prefix: %{_prefix}
+BuildRoot: %{_tmppath}/%{name}-%{version}-root
+
+%description
+
+This library implements a number of programming utilities used by Paul
+Davis (formerly Paul Barton-Davis, hence the name). It is used in
+some of his Open Source software projects. See
+http://ardour.sf.net/ for examples.
+
+%prep
+%setup -q
+
+%build
+CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" ./configure $ARCH_FLAGS --prefix=%{prefix}
+make
+
+%install
+rm -rf $RPM_BUILD_ROOT
+install -d -m 755 $RPM_BUILD_ROOT%{prefix}/{{include,lib}/%{lib_name}}
+make install INSTALL="%(which install) -p" prefix=$RPM_BUILD_ROOT%{prefix}
+
+%post
+/sbin/ldconfig
+
+%postun
+/sbin/ldconfig
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(-,root,root)
+%doc README AUTHORS NEWS COPYING*
+%{prefix}/lib/libpbd.so*
+
+%package devel
+Summary: A general purpose programming library -- developer version.
+Group: System Environment/Libraries
+
+%description devel
+
+This library implements a number of programming utilities used by Paul
+Davis (formerly Paul Barton-Davis, hence the name). It is used in
+some of his Open Source software projects. See
+http://ardour.sf.net/ for examples.
+
+This package holds static libraries and headers needed by developers
+who wish to use libpbd in their programs.
+
+%files devel
+%defattr(-,root,root)
+%{prefix}/include/pbd/*
+%{prefix}/lib/libpbd.a
+%{prefix}/lib/libpbd.la
+%{prefix}/bin/pbd-config
+%{prefix}/share/aclocal/pbd.m4
+%{prefix}/share/aclocal/unique_args.m4
+
diff --git a/libs/pbd3/mountpoint.cc b/libs/pbd3/mountpoint.cc
new file mode 100644
index 0000000000..160f5e921c
--- /dev/null
+++ b/libs/pbd3/mountpoint.cc
@@ -0,0 +1,113 @@
+/*
+ Copyright (C) 2002 Paul Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#include <cstdio>
+#include <string>
+#include <limits.h>
+
+#include <pbd/mountpoint.h>
+
+using std::string;
+
+#if HAVE_GETMNTENT
+#include <mntent.h>
+
+struct mntent_sorter {
+ bool operator() (const mntent *a, const mntent *b) {
+ return strcmp (a->mnt_dir, b->mnt_dir);
+ }
+};
+
+string
+mountpoint (string path)
+{
+ FILE *mntf;
+ mntent *mnt;
+ unsigned int maxmatch = 0;
+ unsigned int matchlen;
+ const char *cpath = path.c_str();
+ char best[PATH_MAX+1];
+
+ if ((mntf = setmntent ("/etc/mtab", "r")) == 0) {
+ return "";
+ }
+
+ best[0] = '\0';
+
+ while ((mnt = getmntent (mntf))) {
+ unsigned int n;
+
+ n = 0;
+ matchlen = 0;
+
+ /* note: strcmp's semantics are not
+ strict enough to use for this.
+ */
+
+ while (cpath[n] && mnt->mnt_dir[n]) {
+ if (cpath[n] != mnt->mnt_dir[n]) {
+ break;
+ }
+ matchlen++;
+ n++;
+ }
+
+ if (cpath[matchlen] == '\0') {
+
+ endmntent (mntf);
+ return mnt->mnt_dir;
+
+ } else {
+
+ if (matchlen > maxmatch) {
+ snprintf (best, sizeof(best), "%s", mnt->mnt_dir);
+ maxmatch = matchlen;
+ }
+ }
+ }
+
+ endmntent (mntf);
+
+ return best;
+}
+
+#else // no getmntent()
+
+#include <sys/param.h>
+#include <sys/ucred.h>
+#include <sys/mount.h>
+
+string
+mountpoint (string path)
+{
+//XXX IMPLEMENT ME using getmntinfo() or getfsstat().
+ return "/";
+}
+#endif
+
+#ifdef TEST_MOUNTPOINT
+
+main (int argc, char *argv[])
+{
+ printf ("mp of %s = %s\n", argv[1], mountpoint (argv[1]).c_str());
+ exit (0);
+}
+
+#endif
diff --git a/libs/pbd3/pathscanner.cc b/libs/pbd3/pathscanner.cc
new file mode 100644
index 0000000000..5b96284a90
--- /dev/null
+++ b/libs/pbd3/pathscanner.cc
@@ -0,0 +1,201 @@
+/*
+ Copyright (C) 1998-99 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#include <cstdlib>
+#include <cstdio>
+#include <vector>
+#include <dirent.h>
+
+#include <pbd/error.h>
+#include <pbd/pathscanner.h>
+#include <pbd/stl_delete.h>
+
+vector<string *> *
+PathScanner::operator() (const string &dirpath, const string &regexp,
+ bool match_fullpath, bool return_fullpath,
+ long limit)
+
+{
+ int err;
+ char msg[256];
+
+ if ((err = regcomp (&compiled_pattern, regexp.c_str(),
+ REG_EXTENDED|REG_NOSUB))) {
+
+ regerror (err, &compiled_pattern,
+ msg, sizeof (msg));
+
+ error << "Cannot compile soundfile regexp for use ("
+ << msg
+ << ")"
+ << endmsg;
+
+ return 0;
+ }
+
+ return run_scan (dirpath, &PathScanner::regexp_filter,
+ (bool (*)(const string &, void *)) 0,
+ 0,
+ match_fullpath,
+ return_fullpath,
+ limit);
+}
+
+vector<string *> *
+PathScanner::run_scan (const string &dirpath,
+ bool (PathScanner::*memberfilter)(const string &),
+ bool (*filter)(const string &, void *),
+ void *arg,
+ bool match_fullpath, bool return_fullpath,
+ long limit)
+
+{
+ vector<string *> *result = 0;
+ DIR *dir;
+ struct dirent *finfo;
+ char *pathcopy = strdup (dirpath.c_str());
+ char *thisdir;
+ char fullpath[PATH_MAX+1];
+ string search_str;
+ string *newstr;
+ long nfound = 0;
+
+ if ((thisdir = strtok (pathcopy, ":")) == 0 ||
+ strlen (thisdir) == 0) {
+ free (pathcopy);
+ return 0;
+ }
+
+ result = new vector<string *>;
+
+ do {
+
+ if ((dir = opendir (thisdir)) == 0) {
+ continue;
+ }
+
+ while ((finfo = readdir (dir)) != 0) {
+
+ snprintf (fullpath, sizeof(fullpath), "%s/%s",
+ thisdir, finfo->d_name);
+
+ if (match_fullpath) {
+ search_str = fullpath;
+ } else {
+ search_str = finfo->d_name;
+ }
+
+ /* handle either type of function ptr */
+
+ if (memberfilter) {
+ if (!(this->*memberfilter)(search_str)) {
+ continue;
+ }
+ } else {
+ if (!filter(search_str, arg)) {
+ continue;
+ }
+ }
+
+ if (return_fullpath) {
+ newstr = new string (fullpath);
+ } else {
+ newstr = new string (finfo->d_name);
+ }
+
+ result->push_back (newstr);
+ nfound++;
+ }
+
+ closedir (dir);
+
+ } while ((limit < 0 || (nfound < limit)) && (thisdir = strtok (0, ":")));
+
+ free (pathcopy);
+ return result;
+}
+
+string *
+PathScanner::find_first (const string &dirpath,
+ const string &regexp,
+ bool match_fullpath,
+ bool return_fullpath)
+{
+ vector<string *> *res;
+ string *ret;
+ int err;
+ char msg[256];
+
+ if ((err = regcomp (&compiled_pattern, regexp.c_str(),
+ REG_EXTENDED|REG_NOSUB))) {
+
+ regerror (err, &compiled_pattern,
+ msg, sizeof (msg));
+
+ error << "Cannot compile soundfile regexp for use (" << msg << ")" << endmsg;
+
+
+ return 0;
+ }
+
+ res = run_scan (dirpath,
+ &PathScanner::regexp_filter,
+ (bool (*)(const string &, void *)) 0,
+ 0,
+ match_fullpath,
+ return_fullpath,
+ 1);
+
+ if (res->size() == 0) {
+ ret = 0;
+ } else {
+ ret = res->front();
+ }
+ vector_delete (res);
+ delete res;
+ return ret;
+}
+
+string *
+PathScanner::find_first (const string &dirpath,
+ bool (*filter)(const string &, void *),
+ void *arg,
+ bool match_fullpath,
+ bool return_fullpath)
+{
+ vector<string *> *res;
+ string *ret;
+
+ res = run_scan (dirpath,
+ (bool (PathScanner::*)(const string &)) 0,
+ filter,
+ 0,
+ match_fullpath,
+ return_fullpath, 1);
+
+ if (res->size() == 0) {
+ ret = 0;
+ } else {
+ ret = res->front();
+ }
+ vector_delete (res);
+ delete res;
+ return ret;
+}
diff --git a/libs/pbd3/pbd-config.in b/libs/pbd3/pbd-config.in
new file mode 100644
index 0000000000..4c53125b59
--- /dev/null
+++ b/libs/pbd3/pbd-config.in
@@ -0,0 +1,232 @@
+#!/bin/sh
+
+af_libs=
+af_cflags=
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+
+
+##
+## Define usage()
+##
+usage()
+{
+ cat <<EOF
+Usage: pbd-config [OPTIONS] [LIBRARIES]
+Options:
+ --cflags print pre-processor and compiler flags
+ --libs print library linking information
+ --libs-dirs only print the -L/-R part of --libs
+ --libs-names only print the -l part of --libs
+ --help display this help and exit
+ --macros print the path to m4 macros
+
+ --prefix[=DIR]
+ --exec_prefix[=DIR]
+ --version output pbd version information
+Libraries:
+ pbd
+EOF
+ exit $1
+}
+
+##
+## Process options
+##
+parse()
+{
+# we must be called with at least one argument
+if test $# -eq 0; then
+ usage 1 1>&2
+fi
+
+# at least one option should be selected
+case "$1" in
+ --*)
+ ;;
+ *)
+ usage 1 1>&2
+ ;;
+esac
+
+# grab all -- arguments
+while test $# -gt 0; do
+ case "$1" in
+ -*=*) af_optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) af_optarg= ;;
+ esac
+
+ case $1 in
+ --help)
+ usage 0 0>&2
+ ;;
+ --cflags)
+ af_echo_cflags=yes
+ ;;
+ --libs)
+ af_echo_libs_L=yes
+ af_echo_libs_l=yes
+ ;;
+ --libs-dirs)
+ af_echo_libs_L=yes
+ ;;
+ --libs-names)
+ af_echo_libs_l=yes
+ ;;
+ --macros*)
+
+echo -I @prefix@/include/pbd/macros
+exit
+
+ ;;
+ --prefix=*)
+ prefix=$af_optarg
+ af_prefix_set=yes
+ ;;
+ --prefix)
+ af_echo_prefix=yes
+ ;;
+ --exec_prefix=*)
+ exec_prefix=$af_optarg
+ af_exec_prefix_set=yes
+ ;;
+ --exec_prefix)
+ af_echo_exec_prefix=yes
+ ;;
+ --version)
+ af_echo_version=yes
+ ;;
+ --*)
+ usage 1 1>&2
+ ;;
+ *)
+ break
+ ;;
+ esac
+ shift
+done
+
+# if we have a default library use it
+if test $# -eq 0; then
+if test "X$af_lib_default" != "X"; then
+ af_lib__AF_LIB_DEFAULT=yes
+ return
+fi
+fi
+
+while test $# -gt 0; do
+ case $1 in
+ pbd)
+ af_lib_pbd=yes
+ ;;
+ *)
+ usage 1 1>&2
+ ;;
+ esac
+ shift
+done
+}
+
+print_result()
+{
+if test "X$af_echo_cflags" = "Xyes"; then
+ af_all_flags="$af_cflags"
+fi
+
+if test "X$af_echo_libs_L" = "Xyes" || test "X$af_echo_libs_l" = "Xyes"; then
+ af_all_flags="$af_all_flags $af_libs"
+fi
+
+if test -z "$af_all_flags" || test "X$af_all_flags" = "X "; then
+ exit 1
+fi
+
+# Straight out any possible duplicates, but be careful to
+# get `-lfoo -lbar -lbaz' for `-lfoo -lbaz -lbar -lbaz'
+af_other_flags=
+af_lib_L_flags=
+af_rev_libs=
+for i in $af_all_flags; do
+ case "$i" in
+ # a library, save it for later, in reverse order
+ -l*) af_rev_libs="$i $af_rev_libs" ;;
+ -L*|-R*)
+ if test "X$af_echo_libs_L" = "Xyes"; then
+ case " $af_lib_L_flags " in
+ *\ $i\ *) ;; # already there
+ *) af_lib_L_flags="$af_lib_L_flags $i" ;; # add it to output
+ esac
+ fi;;
+ *)
+ case " $af_other_flags " in
+ *\ $i\ *) ;; # already there
+ *) af_other_flags="$af_other_flags $i" ;; # add it to output
+ esac ;;
+ esac
+done
+
+af_ord_libs=
+if test "X$af_echo_libs_l" = "Xyes"; then
+ for i in $af_rev_libs; do
+ case " $af_ord_libs " in
+ *\ $i\ *) ;; # already there
+ *) af_ord_libs="$i $af_ord_libs" ;; # add it to output in reverse order
+ esac
+ done
+fi
+
+echo $af_other_flags $af_lib_L_flags $af_ord_libs
+}
+
+##
+## Main Body
+##
+
+parse $*
+
+
+##
+## Initialize names
+##
+
+
+
+
+
+if test "X$af_echo_prefix" = "Xyes"; then
+ echo $prefix
+fi
+
+if test "X$af_echo_exec_prefix" = "Xyes"; then
+ echo $exec_prefix
+fi
+
+if test "X$af_echo_version" = "Xyes"; then
+ echo @LIBPBD_VERSION@
+ exit 0
+fi
+
+
+##
+## Libraries
+##
+
+#dummy because this should always be selected
+
+
+if test "@includedir@" != /usr/include ; then
+ includes="-I@includedir@"
+fi
+if test "@libdir@" != /usr/lib ; then
+ libs="-L@libdir@"
+fi
+af_cflags="$af_cflags $includes @SIGC_CFLAGS@"
+af_libs="$libs -lpbd @PBD_LIBS@ $af_libs"
+
+
+
+
+print_result
+
+exit 0
+
diff --git a/libs/pbd3/pbd/.DS_Store b/libs/pbd3/pbd/.DS_Store
new file mode 100644
index 0000000000..5008ddfcf5
--- /dev/null
+++ b/libs/pbd3/pbd/.DS_Store
Binary files differ
diff --git a/libs/pbd3/pbd/.cvsignore b/libs/pbd3/pbd/.cvsignore
new file mode 100644
index 0000000000..67020331ba
--- /dev/null
+++ b/libs/pbd3/pbd/.cvsignore
@@ -0,0 +1 @@
+version.h
diff --git a/libs/pbd3/pbd/abstract_ui.h b/libs/pbd3/pbd/abstract_ui.h
new file mode 100644
index 0000000000..0c845c15cd
--- /dev/null
+++ b/libs/pbd3/pbd/abstract_ui.h
@@ -0,0 +1,67 @@
+/*
+ Copyright (C) 1998-99 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef __pbd_abstract_ui_h__
+#define __pbd_abstract_ui_h__
+
+#include <pbd/receiver.h>
+#include <sigc++/sigc++.h>
+
+class Touchable;
+
+class AbstractUI : public Receiver
+{
+ public:
+ enum RequestType {
+ ErrorMessage,
+ Quit,
+ CallSlot,
+ CallSlotLocked,
+ TouchDisplay,
+ StateChange,
+ SetTip,
+ AddIdle,
+ AddTimeout,
+ };
+
+ bool ok() { return _ok; }
+
+ AbstractUI () {}
+ virtual ~AbstractUI() {}
+
+ virtual void run (Receiver &old_receiver) = 0;
+ virtual void quit () = 0;
+ virtual bool running () = 0;
+ virtual void request (RequestType) = 0;
+ virtual void touch_display (Touchable *) = 0;
+ virtual void call_slot (sigc::slot<void>) = 0;
+ virtual bool caller_is_gui_thread() = 0;
+
+ /* needed to be a receiver ... */
+
+ virtual void receive (Transmitter::Channel, const char *) = 0;
+
+ protected:
+ bool _ok;
+};
+
+#endif // __pbd_abstract_ui_h__
+
+
diff --git a/libs/pbd3/pbd/atomic.h b/libs/pbd3/pbd/atomic.h
new file mode 100644
index 0000000000..81e76f41fa
--- /dev/null
+++ b/libs/pbd3/pbd/atomic.h
@@ -0,0 +1,1232 @@
+/*
+ Copyright (C) 2001 Paul Davis and others (see below)
+ Code derived from various headers from the Linux kernel.
+ Copyright attributions maintained where present.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef __libpbd_atomic_h__
+#define __libpbd_atomic_h__
+
+#ifdef HAVE_SMP /* a macro we control, to manage ... */
+#define CONFIG_SMP /* ... the macro the kernel headers use */
+#endif
+
+#if defined(__powerpc__) || defined(__ppc__)
+
+/*
+ * BK Id: SCCS/s.atomic.h 1.15 10/28/01 10:37:22 trini
+ */
+/*
+ * PowerPC atomic operations
+ */
+
+#ifndef _ASM_PPC_ATOMIC_H_
+#define _ASM_PPC_ATOMIC_H_
+
+typedef struct { volatile int counter; } atomic_t;
+
+
+#define ATOMIC_INIT(i) { (i) }
+
+#define atomic_read(v) ((v)->counter)
+#define atomic_set(v,i) (((v)->counter) = (i))
+
+extern void atomic_clear_mask(unsigned long mask, unsigned long *addr);
+extern void atomic_set_mask(unsigned long mask, unsigned long *addr);
+
+#ifdef CONFIG_SMP
+#define SMP_ISYNC "\n\tisync"
+#else
+#define SMP_ISYNC
+#endif
+
+static __inline__ void atomic_add(int a, atomic_t *v)
+{
+ int t;
+
+ __asm__ __volatile__(
+"1: lwarx %0,0,%3\n\
+ add %0,%2,%0\n\
+ stwcx. %0,0,%3\n\
+ bne- 1b"
+ : "=&r" (t), "=m" (v->counter)
+ : "r" (a), "r" (&v->counter), "m" (v->counter)
+ : "cc");
+}
+
+static __inline__ int atomic_add_return(int a, atomic_t *v)
+{
+ int t;
+
+ __asm__ __volatile__(
+"1: lwarx %0,0,%2\n\
+ add %0,%1,%0\n\
+ stwcx. %0,0,%2\n\
+ bne- 1b"
+ SMP_ISYNC
+ : "=&r" (t)
+ : "r" (a), "r" (&v->counter)
+ : "cc", "memory");
+
+ return t;
+}
+
+static __inline__ void atomic_sub(int a, atomic_t *v)
+{
+ int t;
+
+ __asm__ __volatile__(
+"1: lwarx %0,0,%3\n\
+ subf %0,%2,%0\n\
+ stwcx. %0,0,%3\n\
+ bne- 1b"
+ : "=&r" (t), "=m" (v->counter)
+ : "r" (a), "r" (&v->counter), "m" (v->counter)
+ : "cc");
+}
+
+static __inline__ int atomic_sub_return(int a, atomic_t *v)
+{
+ int t;
+
+ __asm__ __volatile__(
+"1: lwarx %0,0,%2\n\
+ subf %0,%1,%0\n\
+ stwcx. %0,0,%2\n\
+ bne- 1b"
+ SMP_ISYNC
+ : "=&r" (t)
+ : "r" (a), "r" (&v->counter)
+ : "cc", "memory");
+
+ return t;
+}
+
+static __inline__ void atomic_inc(atomic_t *v)
+{
+ int t;
+
+ __asm__ __volatile__(
+"1: lwarx %0,0,%2\n\
+ addic %0,%0,1\n\
+ stwcx. %0,0,%2\n\
+ bne- 1b"
+ : "=&r" (t), "=m" (v->counter)
+ : "r" (&v->counter), "m" (v->counter)
+ : "cc");
+}
+
+static __inline__ int atomic_inc_return(atomic_t *v)
+{
+ int t;
+
+ __asm__ __volatile__(
+"1: lwarx %0,0,%1\n\
+ addic %0,%0,1\n\
+ stwcx. %0,0,%1\n\
+ bne- 1b"
+ SMP_ISYNC
+ : "=&r" (t)
+ : "r" (&v->counter)
+ : "cc", "memory");
+
+ return t;
+}
+
+static __inline__ void atomic_dec(atomic_t *v)
+{
+ int t;
+
+ __asm__ __volatile__(
+"1: lwarx %0,0,%2\n\
+ addic %0,%0,-1\n\
+ stwcx. %0,0,%2\n\
+ bne- 1b"
+ : "=&r" (t), "=m" (v->counter)
+ : "r" (&v->counter), "m" (v->counter)
+ : "cc");
+}
+
+static __inline__ int atomic_dec_return(atomic_t *v)
+{
+ int t;
+
+ __asm__ __volatile__(
+"1: lwarx %0,0,%1\n\
+ addic %0,%0,-1\n\
+ stwcx. %0,0,%1\n\
+ bne- 1b"
+ SMP_ISYNC
+ : "=&r" (t)
+ : "r" (&v->counter)
+ : "cc", "memory");
+
+ return t;
+}
+
+#define atomic_sub_and_test(a, v) (atomic_sub_return((a), (v)) == 0)
+#define atomic_dec_and_test(v) (atomic_dec_return((v)) == 0)
+
+/*
+ * Atomically test *v and decrement if it is greater than 0.
+ * The function returns the old value of *v minus 1.
+ */
+static __inline__ int atomic_dec_if_positive(atomic_t *v)
+{
+ int t;
+
+ __asm__ __volatile__(
+"1: lwarx %0,0,%1\n\
+ addic. %0,%0,-1\n\
+ blt- 2f\n\
+ stwcx. %0,0,%1\n\
+ bne- 1b"
+ SMP_ISYNC
+ "\n\
+2:" : "=&r" (t)
+ : "r" (&v->counter)
+ : "cc", "memory");
+
+ return t;
+}
+
+#define smp_mb__before_atomic_dec() smp_mb()
+#define smp_mb__after_atomic_dec() smp_mb()
+#define smp_mb__before_atomic_inc() smp_mb()
+#define smp_mb__after_atomic_inc() smp_mb()
+
+#endif /* _ASM_PPC_ATOMIC_H_ */
+
+/***********************************************************************/
+
+# else /* !PPC */
+
+#if defined(__i386__) || defined(__x86_64__)
+
+#ifndef __ARCH_I386_ATOMIC__
+#define __ARCH_I386_ATOMIC__
+
+/*
+ * Atomic operations that C can't guarantee us. Useful for
+ * resource counting etc..
+ */
+
+#ifdef CONFIG_SMP
+#define SMP_LOCK "lock ; "
+#else
+#define SMP_LOCK ""
+#endif
+
+/*
+ * Make sure gcc doesn't try to be clever and move things around
+ * on us. We need to use _exactly_ the address the user gave us,
+ * not some alias that contains the same information.
+ */
+typedef struct { volatile int counter; } atomic_t;
+
+#define ATOMIC_INIT(i) { (i) }
+
+/**
+ * atomic_read - read atomic variable
+ * @v: pointer of type atomic_t
+ *
+ * Atomically reads the value of @v. Note that the guaranteed
+ * useful range of an atomic_t is only 24 bits.
+ */
+#define atomic_read(v) ((v)->counter)
+
+/**
+ * atomic_set - set atomic variable
+ * @v: pointer of type atomic_t
+ * @i: required value
+ *
+ * Atomically sets the value of @v to @i. Note that the guaranteed
+ * useful range of an atomic_t is only 24 bits.
+ */
+#define atomic_set(v,i) (((v)->counter) = (i))
+
+/**
+ * atomic_add - add integer to atomic variable
+ * @i: integer value to add
+ * @v: pointer of type atomic_t
+ *
+ * Atomically adds @i to @v. Note that the guaranteed useful range
+ * of an atomic_t is only 24 bits.
+ */
+static __inline__ void atomic_add(int i, atomic_t *v)
+{
+ __asm__ __volatile__(
+ SMP_LOCK "addl %1,%0"
+ :"=m" (v->counter)
+ :"ir" (i), "m" (v->counter));
+}
+
+/**
+ * atomic_sub - subtract the atomic variable
+ * @i: integer value to subtract
+ * @v: pointer of type atomic_t
+ *
+ * Atomically subtracts @i from @v. Note that the guaranteed
+ * useful range of an atomic_t is only 24 bits.
+ */
+static __inline__ void atomic_sub(int i, atomic_t *v)
+{
+ __asm__ __volatile__(
+ SMP_LOCK "subl %1,%0"
+ :"=m" (v->counter)
+ :"ir" (i), "m" (v->counter));
+}
+
+/**
+ * atomic_sub_and_test - subtract value from variable and test result
+ * @i: integer value to subtract
+ * @v: pointer of type atomic_t
+ *
+ * Atomically subtracts @i from @v and returns
+ * true if the result is zero, or false for all
+ * other cases. Note that the guaranteed
+ * useful range of an atomic_t is only 24 bits.
+ */
+static __inline__ int atomic_sub_and_test(int i, atomic_t *v)
+{
+ unsigned char c;
+
+ __asm__ __volatile__(
+ SMP_LOCK "subl %2,%0; sete %1"
+ :"=m" (v->counter), "=qm" (c)
+ :"ir" (i), "m" (v->counter) : "memory");
+ return c;
+}
+
+/**
+ * atomic_inc - increment atomic variable
+ * @v: pointer of type atomic_t
+ *
+ * Atomically increments @v by 1. Note that the guaranteed
+ * useful range of an atomic_t is only 24 bits.
+ */
+static __inline__ void atomic_inc(atomic_t *v)
+{
+ __asm__ __volatile__(
+ SMP_LOCK "incl %0"
+ :"=m" (v->counter)
+ :"m" (v->counter));
+}
+
+/**
+ * atomic_dec - decrement atomic variable
+ * @v: pointer of type atomic_t
+ *
+ * Atomically decrements @v by 1. Note that the guaranteed
+ * useful range of an atomic_t is only 24 bits.
+ */
+static __inline__ void atomic_dec(atomic_t *v)
+{
+ __asm__ __volatile__(
+ SMP_LOCK "decl %0"
+ :"=m" (v->counter)
+ :"m" (v->counter));
+}
+
+/**
+ * atomic_dec_and_test - decrement and test
+ * @v: pointer of type atomic_t
+ *
+ * Atomically decrements @v by 1 and
+ * returns true if the result is 0, or false for all other
+ * cases. Note that the guaranteed
+ * useful range of an atomic_t is only 24 bits.
+ */
+static __inline__ int atomic_dec_and_test(atomic_t *v)
+{
+ unsigned char c;
+
+ __asm__ __volatile__(
+ SMP_LOCK "decl %0; sete %1"
+ :"=m" (v->counter), "=qm" (c)
+ :"m" (v->counter) : "memory");
+ return c != 0;
+}
+
+/**
+ * atomic_inc_and_test - increment and test
+ * @v: pointer of type atomic_t
+ *
+ * Atomically increments @v by 1
+ * and returns true if the result is zero, or false for all
+ * other cases. Note that the guaranteed
+ * useful range of an atomic_t is only 24 bits.
+ */
+static __inline__ int atomic_inc_and_test(atomic_t *v)
+{
+ unsigned char c;
+
+ __asm__ __volatile__(
+ SMP_LOCK "incl %0; sete %1"
+ :"=m" (v->counter), "=qm" (c)
+ :"m" (v->counter) : "memory");
+ return c != 0;
+}
+
+/**
+ * atomic_add_negative - add and test if negative
+ * @v: pointer of type atomic_t
+ * @i: integer value to add
+ *
+ * Atomically adds @i to @v and returns true
+ * if the result is negative, or false when
+ * result is greater than or equal to zero. Note that the guaranteed
+ * useful range of an atomic_t is only 24 bits.
+ */
+static __inline__ int atomic_add_negative(int i, atomic_t *v)
+{
+ unsigned char c;
+
+ __asm__ __volatile__(
+ SMP_LOCK "addl %2,%0; sets %1"
+ :"=m" (v->counter), "=qm" (c)
+ :"ir" (i), "m" (v->counter) : "memory");
+ return c;
+}
+
+/* These are x86-specific, used by some header files */
+#define atomic_clear_mask(mask, addr) \
+__asm__ __volatile__(SMP_LOCK "andl %0,%1" \
+: : "r" (~(mask)),"m" (*addr) : "memory")
+
+#define atomic_set_mask(mask, addr) \
+__asm__ __volatile__(SMP_LOCK "orl %0,%1" \
+: : "r" (mask),"m" (*addr) : "memory")
+
+/* Atomic operations are already serializing on x86 */
+#define smp_mb__before_atomic_dec() barrier()
+#define smp_mb__after_atomic_dec() barrier()
+#define smp_mb__before_atomic_inc() barrier()
+#define smp_mb__after_atomic_inc() barrier()
+
+#endif /* __ARCH_I386_ATOMIC__ */
+
+/***********************************************************************/
+
+#else /* !PPC && !i386 */
+
+#ifdef __sparc__
+
+/* atomic.h: These still suck, but the I-cache hit rate is higher.
+ *
+ * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
+ * Copyright (C) 2000 Anton Blanchard (anton@linuxcare.com.au)
+ */
+
+#ifndef __ARCH_SPARC_ATOMIC__
+#define __ARCH_SPARC_ATOMIC__
+
+typedef struct { volatile int counter; } atomic_t;
+
+#ifndef CONFIG_SMP
+
+#define ATOMIC_INIT(i) { (i) }
+#define atomic_read(v) ((v)->counter)
+#define atomic_set(v, i) (((v)->counter) = i)
+
+#else
+/* We do the bulk of the actual work out of line in two common
+ * routines in assembler, see arch/sparc/lib/atomic.S for the
+ * "fun" details.
+ *
+ * For SMP the trick is you embed the spin lock byte within
+ * the word, use the low byte so signedness is easily retained
+ * via a quick arithmetic shift. It looks like this:
+ *
+ * ----------------------------------------
+ * | signed 24-bit counter value | lock | atomic_t
+ * ----------------------------------------
+ * 31 8 7 0
+ */
+
+#define ATOMIC_INIT(i) { (i << 8) }
+
+static __inline__ int atomic_read(atomic_t *v)
+{
+ int ret = v->counter;
+
+ while(ret & 0xff)
+ ret = v->counter;
+
+ return ret >> 8;
+}
+
+#define atomic_set(v, i) (((v)->counter) = ((i) << 8))
+#endif
+
+static __inline__ int __atomic_add(int i, atomic_t *v)
+{
+ register volatile int *ptr asm("g1");
+ register int increment asm("g2");
+
+ ptr = &v->counter;
+ increment = i;
+
+ __asm__ __volatile__(
+ "mov %%o7, %%g4\n\t"
+ "call ___atomic_add\n\t"
+ " add %%o7, 8, %%o7\n"
+ : "=&r" (increment)
+ : "0" (increment), "r" (ptr)
+ : "g3", "g4", "g7", "memory", "cc");
+
+ return increment;
+}
+
+static __inline__ int __atomic_sub(int i, atomic_t *v)
+{
+ register volatile int *ptr asm("g1");
+ register int increment asm("g2");
+
+ ptr = &v->counter;
+ increment = i;
+
+ __asm__ __volatile__(
+ "mov %%o7, %%g4\n\t"
+ "call ___atomic_sub\n\t"
+ " add %%o7, 8, %%o7\n"
+ : "=&r" (increment)
+ : "0" (increment), "r" (ptr)
+ : "g3", "g4", "g7", "memory", "cc");
+
+ return increment;
+}
+
+#define atomic_add(i, v) ((void)__atomic_add((i), (v)))
+#define atomic_sub(i, v) ((void)__atomic_sub((i), (v)))
+
+#define atomic_dec_return(v) __atomic_sub(1, (v))
+#define atomic_inc_return(v) __atomic_add(1, (v))
+
+#define atomic_sub_and_test(i, v) (__atomic_sub((i), (v)) == 0)
+#define atomic_dec_and_test(v) (__atomic_sub(1, (v)) == 0)
+
+#define atomic_inc(v) ((void)__atomic_add(1, (v)))
+#define atomic_dec(v) ((void)__atomic_sub(1, (v)))
+
+#define atomic_add_negative(i, v) (__atomic_add((i), (v)) < 0)
+
+/* Atomic operations are already serializing */
+#define smp_mb__before_atomic_dec() barrier()
+#define smp_mb__after_atomic_dec() barrier()
+#define smp_mb__before_atomic_inc() barrier()
+#define smp_mb__after_atomic_inc() barrier()
+
+
+#endif /* !(__ARCH_SPARC_ATOMIC__) */
+
+/***********************************************************************/
+
+#else
+
+#ifdef __ia64__
+
+#ifndef __ARCH_IA64_ATOMIC__
+#define __ARCH_IA64_ATOMIC__
+
+typedef volatile int atomic_t;
+
+inline
+int
+atomic_read (const atomic_t * a)
+{
+ return *a;
+}
+
+inline
+void
+atomic_set(atomic_t *a, int v)
+{
+ *a = v;
+}
+
+inline
+void
+atomic_inc (atomic_t *v)
+{
+ int old, r;
+
+ do {
+ old = atomic_read(v);
+ __asm__ __volatile__ ("mov ar.ccv=%0;;" :: "rO" (old));
+ __asm__ __volatile__ ("cmpxchg4.acq %0=[%1],%2,ar.ccv"
+ : "=r"(r) : "r"(v), "r"(old + 1)
+ : "memory");
+ } while (r != old);
+}
+
+inline
+void
+atomic_dec (atomic_t *v)
+{
+ int old, r;
+
+ do {
+ old = atomic_read(v);
+ __asm__ __volatile__ ("mov ar.ccv=%0;;" :: "rO" (old));
+ __asm__ __volatile__ ("cmpxchg4.acq %0=[%1],%2,ar.ccv"
+ : "=r"(r) : "r"(v), "r"(old - 1)
+ : "memory");
+ } while (r != old);
+}
+
+inline
+int
+atomic_dec_and_test (atomic_t *v)
+{
+ int old, r;
+
+ do {
+ old = atomic_read(v);
+ __asm__ __volatile__ ("mov ar.ccv=%0;;" :: "rO" (old));
+ __asm__ __volatile__ ("cmpxchg4.acq %0=[%1],%2,ar.ccv"
+ : "=r"(r) : "r"(v), "r"(old - 1)
+ : "memory");
+ } while (r != old);
+ return old != 1;
+}
+
+#endif /* !(__ARCH_IA64_ATOMIC__) */
+
+#else
+
+#ifdef __alpha__
+
+#ifndef _ALPHA_ATOMIC_H
+#define _ALPHA_ATOMIC_H
+
+/*
+ * Atomic operations that C can't guarantee us. Useful for
+ * resource counting etc...
+ *
+ * But use these as seldom as possible since they are much slower
+ * than regular operations.
+ */
+
+
+/*
+ * Counter is volatile to make sure gcc doesn't try to be clever
+ * and move things around on us. We need to use _exactly_ the address
+ * the user gave us, not some alias that contains the same information.
+ */
+typedef struct { volatile int counter; } atomic_t;
+
+#define ATOMIC_INIT(i) ( (atomic_t) { (i) } )
+
+#define atomic_read(v) ((v)->counter)
+#define atomic_set(v,i) ((v)->counter = (i))
+
+/*
+ * To get proper branch prediction for the main line, we must branch
+ * forward to code at the end of this object's .text section, then
+ * branch back to restart the operation.
+ */
+
+static __inline__ void atomic_add(int i, atomic_t * v)
+{
+ unsigned long temp;
+ __asm__ __volatile__(
+ "1: ldl_l %0,%1\n"
+ " addl %0,%2,%0\n"
+ " stl_c %0,%1\n"
+ " beq %0,2f\n"
+ ".subsection 2\n"
+ "2: br 1b\n"
+ ".previous"
+ :"=&r" (temp), "=m" (v->counter)
+ :"Ir" (i), "m" (v->counter));
+}
+
+static __inline__ void atomic_sub(int i, atomic_t * v)
+{
+ unsigned long temp;
+ __asm__ __volatile__(
+ "1: ldl_l %0,%1\n"
+ " subl %0,%2,%0\n"
+ " stl_c %0,%1\n"
+ " beq %0,2f\n"
+ ".subsection 2\n"
+ "2: br 1b\n"
+ ".previous"
+ :"=&r" (temp), "=m" (v->counter)
+ :"Ir" (i), "m" (v->counter));
+}
+
+/*
+ * Same as above, but return the result value
+ */
+static __inline__ long atomic_add_return(int i, atomic_t * v)
+{
+ long temp, result;
+ __asm__ __volatile__(
+ "1: ldl_l %0,%1\n"
+ " addl %0,%3,%2\n"
+ " addl %0,%3,%0\n"
+ " stl_c %0,%1\n"
+ " beq %0,2f\n"
+ " mb\n"
+ ".subsection 2\n"
+ "2: br 1b\n"
+ ".previous"
+ :"=&r" (temp), "=m" (v->counter), "=&r" (result)
+ :"Ir" (i), "m" (v->counter) : "memory");
+ return result;
+}
+
+static __inline__ long atomic_sub_return(int i, atomic_t * v)
+{
+ long temp, result;
+ __asm__ __volatile__(
+ "1: ldl_l %0,%1\n"
+ " subl %0,%3,%2\n"
+ " subl %0,%3,%0\n"
+ " stl_c %0,%1\n"
+ " beq %0,2f\n"
+ " mb\n"
+ ".subsection 2\n"
+ "2: br 1b\n"
+ ".previous"
+ :"=&r" (temp), "=m" (v->counter), "=&r" (result)
+ :"Ir" (i), "m" (v->counter) : "memory");
+ return result;
+}
+
+#define atomic_dec_return(v) atomic_sub_return(1,(v))
+#define atomic_inc_return(v) atomic_add_return(1,(v))
+
+#define atomic_sub_and_test(i,v) (atomic_sub_return((i), (v)) == 0)
+#define atomic_dec_and_test(v) (atomic_sub_return(1, (v)) == 0)
+
+#define atomic_inc(v) atomic_add(1,(v))
+#define atomic_dec(v) atomic_sub(1,(v))
+
+#define smp_mb__before_atomic_dec() smp_mb()
+#define smp_mb__after_atomic_dec() smp_mb()
+#define smp_mb__before_atomic_inc() smp_mb()
+#define smp_mb__after_atomic_inc() smp_mb()
+
+#endif /* _ALPHA_ATOMIC_H */
+
+#else
+
+#ifdef __s390__
+
+#ifndef __ARCH_S390_ATOMIC__
+#define __ARCH_S390_ATOMIC__
+
+/*
+ * include/asm-s390/atomic.h
+ *
+ * S390 version
+ * Copyright (C) 1999,2000 IBM Deutschland Entwicklung GmbH, IBM Corporation
+ * Author(s): Martin Schwidefsky (schwidefsky@de.ibm.com),
+ * Denis Joseph Barrow
+ *
+ * Derived from "include/asm-i386/bitops.h"
+ * Copyright (C) 1992, Linus Torvalds
+ *
+ */
+
+/*
+ * Atomic operations that C can't guarantee us. Useful for
+ * resource counting etc..
+ * S390 uses 'Compare And Swap' for atomicity in SMP enviroment
+ */
+
+typedef struct { volatile int counter; } __attribute__ ((aligned (4))) atomic_t;
+#define ATOMIC_INIT(i) { (i) }
+
+#define atomic_eieio() __asm__ __volatile__ ("BCR 15,0")
+
+#define __CS_LOOP(old_val, new_val, ptr, op_val, op_string) \
+ __asm__ __volatile__(" l %0,0(%2)\n" \
+ "0: lr %1,%0\n" \
+ op_string " %1,%3\n" \
+ " cs %0,%1,0(%2)\n" \
+ " jl 0b" \
+ : "=&d" (old_val), "=&d" (new_val) \
+ : "a" (ptr), "d" (op_val) : "cc" );
+
+#define atomic_read(v) ((v)->counter)
+#define atomic_set(v,i) (((v)->counter) = (i))
+
+static __inline__ void atomic_add(int i, atomic_t *v)
+{
+ int old_val, new_val;
+ __CS_LOOP(old_val, new_val, v, i, "ar");
+}
+
+static __inline__ int atomic_add_return (int i, atomic_t *v)
+{
+ int old_val, new_val;
+ __CS_LOOP(old_val, new_val, v, i, "ar");
+ return new_val;
+}
+
+static __inline__ int atomic_add_negative(int i, atomic_t *v)
+{
+ int old_val, new_val;
+ __CS_LOOP(old_val, new_val, v, i, "ar");
+ return new_val < 0;
+}
+
+static __inline__ void atomic_sub(int i, atomic_t *v)
+{
+ int old_val, new_val;
+ __CS_LOOP(old_val, new_val, v, i, "sr");
+}
+
+static __inline__ void atomic_inc(volatile atomic_t *v)
+{
+ int old_val, new_val;
+ __CS_LOOP(old_val, new_val, v, 1, "ar");
+}
+
+static __inline__ int atomic_inc_return(volatile atomic_t *v)
+{
+ int old_val, new_val;
+ __CS_LOOP(old_val, new_val, v, 1, "ar");
+ return new_val;
+}
+
+static __inline__ int atomic_inc_and_test(volatile atomic_t *v)
+{
+ int old_val, new_val;
+ __CS_LOOP(old_val, new_val, v, 1, "ar");
+ return new_val != 0;
+}
+
+static __inline__ void atomic_dec(volatile atomic_t *v)
+{
+ int old_val, new_val;
+ __CS_LOOP(old_val, new_val, v, 1, "sr");
+}
+
+static __inline__ int atomic_dec_return(volatile atomic_t *v)
+{
+ int old_val, new_val;
+ __CS_LOOP(old_val, new_val, v, 1, "sr");
+ return new_val;
+}
+
+static __inline__ int atomic_dec_and_test(volatile atomic_t *v)
+{
+ int old_val, new_val;
+ __CS_LOOP(old_val, new_val, v, 1, "sr");
+ return new_val == 0;
+}
+
+static __inline__ void atomic_clear_mask(unsigned long mask, atomic_t *v)
+{
+ int old_val, new_val;
+ __CS_LOOP(old_val, new_val, v, ~mask, "nr");
+}
+
+static __inline__ void atomic_set_mask(unsigned long mask, atomic_t *v)
+{
+ int old_val, new_val;
+ __CS_LOOP(old_val, new_val, v, mask, "or");
+}
+
+/*
+ returns 0 if expected_oldval==value in *v ( swap was successful )
+ returns 1 if unsuccessful.
+*/
+static __inline__ int
+atomic_compare_and_swap(int expected_oldval,int new_val,atomic_t *v)
+{
+ int retval;
+
+ __asm__ __volatile__(
+ " lr 0,%2\n"
+ " cs 0,%3,0(%1)\n"
+ " ipm %0\n"
+ " srl %0,28\n"
+ "0:"
+ : "=&d" (retval)
+ : "a" (v), "d" (expected_oldval) , "d" (new_val)
+ : "0", "cc");
+ return retval;
+}
+
+/*
+ Spin till *v = expected_oldval then swap with newval.
+ */
+static __inline__ void
+atomic_compare_and_swap_spin(int expected_oldval,int new_val,atomic_t *v)
+{
+ __asm__ __volatile__(
+ "0: lr 0,%1\n"
+ " cs 0,%2,0(%0)\n"
+ " jl 0b\n"
+ : : "a" (v), "d" (expected_oldval) , "d" (new_val)
+ : "cc", "0" );
+}
+
+#define smp_mb__before_atomic_dec() smp_mb()
+#define smp_mb__after_atomic_dec() smp_mb()
+#define smp_mb__before_atomic_inc() smp_mb()
+#define smp_mb__after_atomic_inc() smp_mb()
+
+#endif /* __ARCH_S390_ATOMIC __ */
+
+#else
+
+#ifdef __mips__
+
+/*
+ * Atomic operations that C can't guarantee us. Useful for
+ * resource counting etc..
+ *
+ * But use these as seldom as possible since they are much more slower
+ * than regular operations.
+ *
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License. See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 1996, 1997, 2000 by Ralf Baechle
+ */
+#ifndef __ASM_ATOMIC_H
+#define __ASM_ATOMIC_H
+
+typedef struct { volatile int counter; } atomic_t;
+
+#define ATOMIC_INIT(i) { (i) }
+
+/*
+ * atomic_read - read atomic variable
+ * @v: pointer of type atomic_t
+ *
+ * Atomically reads the value of @v. Note that the guaranteed
+ * useful range of an atomic_t is only 24 bits.
+ */
+#define atomic_read(v) ((v)->counter)
+
+/*
+ * atomic_set - set atomic variable
+ * @v: pointer of type atomic_t
+ * @i: required value
+ *
+ * Atomically sets the value of @v to @i. Note that the guaranteed
+ * useful range of an atomic_t is only 24 bits.
+ */
+#define atomic_set(v,i) ((v)->counter = (i))
+
+/*
+ * ... while for MIPS II and better we can use ll/sc instruction. This
+ * implementation is SMP safe ...
+ */
+
+/*
+ * atomic_add - add integer to atomic variable
+ * @i: integer value to add
+ * @v: pointer of type atomic_t
+ *
+ * Atomically adds @i to @v. Note that the guaranteed useful range
+ * of an atomic_t is only 24 bits.
+ */
+extern __inline__ void atomic_add(int i, atomic_t * v)
+{
+ unsigned long temp;
+
+ __asm__ __volatile__(
+ ".set push # atomic_add\n"
+ ".set mips2 \n"
+ "1: ll %0, %1 \n"
+ " addu %0, %2 \n"
+ " sc %0, %1 \n"
+ " beqz %0, 1b \n"
+ ".set pop \n"
+ : "=&r" (temp), "=m" (v->counter)
+ : "Ir" (i), "m" (v->counter));
+}
+
+/*
+ * atomic_sub - subtract the atomic variable
+ * @i: integer value to subtract
+ * @v: pointer of type atomic_t
+ *
+ * Atomically subtracts @i from @v. Note that the guaranteed
+ * useful range of an atomic_t is only 24 bits.
+ */
+extern __inline__ void atomic_sub(int i, atomic_t * v)
+{
+ unsigned long temp;
+
+ __asm__ __volatile__(
+ ".set push # atomic_sub\n"
+ ".set mips2 \n"
+ "1: ll %0, %1 \n"
+ " subu %0, %2 \n"
+ " sc %0, %1 \n"
+ " beqz %0, 1b \n"
+ ".set pop \n"
+ : "=&r" (temp), "=m" (v->counter)
+ : "Ir" (i), "m" (v->counter));
+}
+
+/*
+ * Same as above, but return the result value
+ */
+extern __inline__ int atomic_add_return(int i, atomic_t * v)
+{
+ unsigned long temp, result;
+
+ __asm__ __volatile__(
+ ".set push # atomic_add_return\n"
+ ".set mips2 \n"
+ ".set noreorder \n"
+ "1: ll %1, %2 \n"
+ " addu %0, %1, %3 \n"
+ " sc %0, %2 \n"
+ " beqz %0, 1b \n"
+ " addu %0, %1, %3 \n"
+ " sync \n"
+ ".set pop \n"
+ : "=&r" (result), "=&r" (temp), "=m" (v->counter)
+ : "Ir" (i), "m" (v->counter)
+ : "memory");
+
+ return result;
+}
+
+extern __inline__ int atomic_sub_return(int i, atomic_t * v)
+{
+ unsigned long temp, result;
+
+ __asm__ __volatile__(
+ ".set push # atomic_sub_return\n"
+ ".set mips2 \n"
+ ".set noreorder \n"
+ "1: ll %1, %2 \n"
+ " subu %0, %1, %3 \n"
+ " sc %0, %2 \n"
+ " beqz %0, 1b \n"
+ " subu %0, %1, %3 \n"
+ " sync \n"
+ ".set pop \n"
+ : "=&r" (result), "=&r" (temp), "=m" (v->counter)
+ : "Ir" (i), "m" (v->counter)
+ : "memory");
+
+ return result;
+}
+
+#define atomic_dec_return(v) atomic_sub_return(1,(v))
+#define atomic_inc_return(v) atomic_add_return(1,(v))
+
+/*
+ * atomic_sub_and_test - subtract value from variable and test result
+ * @i: integer value to subtract
+ * @v: pointer of type atomic_t
+ *
+ * Atomically subtracts @i from @v and returns
+ * true if the result is zero, or false for all
+ * other cases. Note that the guaranteed
+ * useful range of an atomic_t is only 24 bits.
+ */
+#define atomic_sub_and_test(i,v) (atomic_sub_return((i), (v)) == 0)
+
+/*
+ * atomic_inc_and_test - increment and test
+ * @v: pointer of type atomic_t
+ *
+ * Atomically increments @v by 1
+ * and returns true if the result is zero, or false for all
+ * other cases. Note that the guaranteed
+ * useful range of an atomic_t is only 24 bits.
+ */
+#define atomic_inc_and_test(v) (atomic_inc_return(1, (v)) == 0)
+
+/*
+ * atomic_dec_and_test - decrement by 1 and test
+ * @v: pointer of type atomic_t
+ *
+ * Atomically decrements @v by 1 and
+ * returns true if the result is 0, or false for all other
+ * cases. Note that the guaranteed
+ * useful range of an atomic_t is only 24 bits.
+ */
+#define atomic_dec_and_test(v) (atomic_sub_return(1, (v)) == 0)
+
+/*
+ * atomic_inc - increment atomic variable
+ * @v: pointer of type atomic_t
+ *
+ * Atomically increments @v by 1. Note that the guaranteed
+ * useful range of an atomic_t is only 24 bits.
+ */
+#define atomic_inc(v) atomic_add(1,(v))
+
+/*
+ * atomic_dec - decrement and test
+ * @v: pointer of type atomic_t
+ *
+ * Atomically decrements @v by 1. Note that the guaranteed
+ * useful range of an atomic_t is only 24 bits.
+ */
+#define atomic_dec(v) atomic_sub(1,(v))
+
+/*
+ * atomic_add_negative - add and test if negative
+ * @v: pointer of type atomic_t
+ * @i: integer value to add
+ *
+ * Atomically adds @i to @v and returns true
+ * if the result is negative, or false when
+ * result is greater than or equal to zero. Note that the guaranteed
+ * useful range of an atomic_t is only 24 bits.
+ *
+ * Currently not implemented for MIPS.
+ */
+
+/* Atomic operations are already serializing */
+#define smp_mb__before_atomic_dec() smp_mb()
+#define smp_mb__after_atomic_dec() smp_mb()
+#define smp_mb__before_atomic_inc() smp_mb()
+#define smp_mb__after_atomic_inc() smp_mb()
+
+#endif /* __ASM_ATOMIC_H */
+
+#else
+
+#if defined(__m68k__)
+
+#ifndef __ARCH_M68K_ATOMIC__
+#define __ARCH_M68K_ATOMIC__
+
+/*
+ * Atomic operations that C can't guarantee us. Useful for
+ * resource counting etc..
+ */
+
+/*
+ * We do not have SMP m68k systems, so we don't have to deal with that.
+ */
+
+typedef struct { int counter; } atomic_t;
+#define ATOMIC_INIT(i) { (i) }
+
+#define atomic_read(v) ((v)->counter)
+#define atomic_set(v, i) (((v)->counter) = i)
+
+static __inline__ void atomic_add(int i, atomic_t *v)
+{
+ __asm__ __volatile__("addl %1,%0" : "=m" (*v) : "id" (i), "0" (*v));
+}
+
+static __inline__ void atomic_sub(int i, atomic_t *v)
+{
+ __asm__ __volatile__("subl %1,%0" : "=m" (*v) : "id" (i), "0" (*v));
+}
+
+static __inline__ void atomic_inc(volatile atomic_t *v)
+{
+ __asm__ __volatile__("addql #1,%0" : "=m" (*v): "0" (*v));
+}
+
+static __inline__ void atomic_dec(volatile atomic_t *v)
+{
+ __asm__ __volatile__("subql #1,%0" : "=m" (*v): "0" (*v));
+}
+
+static __inline__ int atomic_dec_and_test(volatile atomic_t *v)
+{
+ char c;
+ __asm__ __volatile__("subql #1,%1; seq %0" : "=d" (c), "=m" (*v): "1" (*v));
+ return c != 0;
+}
+
+#define atomic_clear_mask(mask, v) \
+ __asm__ __volatile__("andl %1,%0" : "=m" (*v) : "id" (~(mask)),"0"(*v))
+
+#define atomic_set_mask(mask, v) \
+ __asm__ __volatile__("orl %1,%0" : "=m" (*v) : "id" (mask),"0"(*v))
+
+/* Atomic operations are already serializing */
+#define smp_mb__before_atomic_dec() barrier()
+#define smp_mb__after_atomic_dec() barrier()
+#define smp_mb__before_atomic_inc() barrier()
+#define smp_mb__after_atomic_inc() barrier()
+
+#endif /* __ARCH_M68K_ATOMIC __ */
+
+#else
+
+#warning libs/pbd has no implementation of strictly atomic operations for your hardware.
+
+#define __NO_STRICT_ATOMIC
+#ifdef __NO_STRICT_ATOMIC
+
+/*
+ * Because the implementations from the kernel (where all these come
+ * from) use cli and spinlocks for hppa and arm...
+ */
+
+typedef struct { volatile int counter; } atomic_t;
+
+#define ATOMIC_INIT(i) ( (atomic_t) { (i) } )
+
+#define atomic_read(v) ((v)->counter)
+#define atomic_set(v,i) ((v)->counter = (i))
+
+static __inline__ void atomic_inc(atomic_t *v)
+{
+ v->counter++;
+}
+
+static __inline__ void atomic_dec(atomic_t *v)
+{
+ v->counter--;
+}
+
+static __inline__ int atomic_dec_and_test(atomic_t *v)
+{
+ int res;
+ v->counter--;
+ res = v->counter;
+ return res == 0;
+}
+
+static __inline__ int atomic_inc_and_test(atomic_t *v)
+{
+ int res;
+ v->counter++;
+ res = v->counter;
+ return res == 0;
+}
+
+# endif /* __NO_STRICT_ATOMIC */
+# endif /* m68k */
+# endif /* mips */
+# endif /* s390 */
+# endif /* alpha */
+# endif /* ia64 */
+# endif /* sparc */
+# endif /* i386 */
+# endif /* ppc */
+
+#endif /* __libpbd_atomic_h__ */
+
diff --git a/libs/pbd3/pbd/basename.h b/libs/pbd3/pbd/basename.h
new file mode 100644
index 0000000000..01f40b6b6a
--- /dev/null
+++ b/libs/pbd3/pbd/basename.h
@@ -0,0 +1,15 @@
+#ifndef __stupid_basename_h__
+#define __stupid_basename_h__
+
+#include <string>
+
+namespace PBD
+{
+
+extern char *basename (const char *);
+extern std::string basename (const std::string);
+extern std::string basename_nosuffix (const std::string);
+
+};
+
+#endif // __stupid_basename_h__
diff --git a/libs/pbd3/pbd/compose.h b/libs/pbd3/pbd/compose.h
new file mode 100644
index 0000000000..9a65a3e0b1
--- /dev/null
+++ b/libs/pbd3/pbd/compose.h
@@ -0,0 +1,393 @@
+/* Defines String::compose(fmt, arg...) for easy, i18n-friendly
+ * composition of strings.
+ *
+ * Version 1.0.
+ *
+ * Copyright (c) 2002 Ole Laursen <olau@hardworking.dk>.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
+ * USA.
+ */
+
+//
+// Basic usage is like
+//
+// std::cout << String::compose("This is a %1x%2 matrix.", rows, cols);
+//
+// See http://www.cs.auc.dk/~olau/compose/ or the included README.compose for
+// more details.
+//
+
+#ifndef STRING_COMPOSE_H
+#define STRING_COMPOSE_H
+
+#include <sstream>
+#include <string>
+#include <list>
+#include <map> // for multimap
+
+namespace StringPrivate
+{
+ // the actual composition class - using string::compose is cleaner, so we
+ // hide it here
+ class Composition
+ {
+ public:
+ // initialize and prepare format string on the form "text %1 text %2 etc."
+ explicit Composition(std::string fmt);
+
+ // supply an replacement argument starting from %1
+ template <typename T>
+ Composition &arg(const T &obj);
+
+ // compose and return string
+ std::string str() const;
+
+ private:
+ std::ostringstream os;
+ int arg_no;
+
+ // we store the output as a list - when the output string is requested, the
+ // list is concatenated to a string; this way we can keep iterators into
+ // the list instead of into a string where they're possibly invalidated on
+ // inserting a specification string
+ typedef std::list<std::string> output_list;
+ output_list output;
+
+ // the initial parse of the format string fills in the specification map
+ // with positions for each of the various %?s
+ typedef std::multimap<int, output_list::iterator> specification_map;
+ specification_map specs;
+ };
+
+ // helper for converting spec string numbers
+ inline int char_to_int(char c)
+ {
+ switch (c) {
+ case '0': return 0;
+ case '1': return 1;
+ case '2': return 2;
+ case '3': return 3;
+ case '4': return 4;
+ case '5': return 5;
+ case '6': return 6;
+ case '7': return 7;
+ case '8': return 8;
+ case '9': return 9;
+ default: return -1000;
+ }
+ }
+
+ inline bool is_number(int n)
+ {
+ switch (n) {
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ return true;
+
+ default:
+ return false;
+ }
+ }
+
+
+ // implementation of class Composition
+ template <typename T>
+ inline Composition &Composition::arg(const T &obj)
+ {
+ os << obj;
+
+ std::string rep = os.str();
+
+ if (!rep.empty()) { // manipulators don't produce output
+ for (specification_map::const_iterator i = specs.lower_bound(arg_no),
+ end = specs.upper_bound(arg_no); i != end; ++i) {
+ output_list::iterator pos = i->second;
+ ++pos;
+
+ output.insert(pos, rep);
+ }
+
+ os.str(std::string());
+ //os.clear();
+ ++arg_no;
+ }
+
+ return *this;
+ }
+
+ inline Composition::Composition(std::string fmt)
+ : arg_no(1)
+ {
+ std::string::size_type b = 0, i = 0;
+
+ // fill in output with the strings between the %1 %2 %3 etc. and
+ // fill in specs with the positions
+ while (i < fmt.length()) {
+ if (fmt[i] == '%' && i + 1 < fmt.length()) {
+ if (fmt[i + 1] == '%') { // catch %%
+ fmt.replace(i, 2, "%");
+ ++i;
+ }
+ else if (is_number(fmt[i + 1])) { // aha! a spec!
+ // save string
+ output.push_back(fmt.substr(b, i - b));
+
+ int n = 1; // number of digits
+ int spec_no = 0;
+
+ do {
+ spec_no += char_to_int(fmt[i + n]);
+ spec_no *= 10;
+ ++n;
+ } while (i + n < fmt.length() && is_number(fmt[i + n]));
+
+ spec_no /= 10;
+ output_list::iterator pos = output.end();
+ --pos; // safe since we have just inserted a string>
+
+ specs.insert(specification_map::value_type(spec_no, pos));
+
+ // jump over spec string
+ i += n;
+ b = i;
+ }
+ else
+ ++i;
+ }
+ else
+ ++i;
+ }
+
+ if (i - b > 0) // add the rest of the string
+ output.push_back(fmt.substr(b, i - b));
+ }
+
+ inline std::string Composition::str() const
+ {
+ // assemble string
+ std::string str;
+
+ for (output_list::const_iterator i = output.begin(), end = output.end();
+ i != end; ++i)
+ str += *i;
+
+ return str;
+ }
+}
+
+// now for the real thing(s)
+//namespace String
+//{
+ // a series of functions which accept a format string on the form "text %1
+ // more %2 less %3" and a number of templated parameters and spits out the
+ // composited string
+ template <typename T1>
+ inline std::string compose(const std::string &fmt, const T1 &o1)
+ {
+ StringPrivate::Composition c(fmt);
+ c.arg(o1);
+ return c.str();
+ }
+
+ template <typename T1, typename T2>
+ inline std::string compose(const std::string &fmt,
+ const T1 &o1, const T2 &o2)
+ {
+ StringPrivate::Composition c(fmt);
+ c.arg(o1).arg(o2);
+ return c.str();
+ }
+
+ template <typename T1, typename T2, typename T3>
+ inline std::string compose(const std::string &fmt,
+ const T1 &o1, const T2 &o2, const T3 &o3)
+ {
+ StringPrivate::Composition c(fmt);
+ c.arg(o1).arg(o2).arg(o3);
+ return c.str();
+ }
+
+ template <typename T1, typename T2, typename T3, typename T4>
+ inline std::string compose(const std::string &fmt,
+ const T1 &o1, const T2 &o2, const T3 &o3,
+ const T4 &o4)
+ {
+ StringPrivate::Composition c(fmt);
+ c.arg(o1).arg(o2).arg(o3).arg(o4);
+ return c.str();
+ }
+
+ template <typename T1, typename T2, typename T3, typename T4, typename T5>
+ inline std::string compose(const std::string &fmt,
+ const T1 &o1, const T2 &o2, const T3 &o3,
+ const T4 &o4, const T5 &o5)
+ {
+ StringPrivate::Composition c(fmt);
+ c.arg(o1).arg(o2).arg(o3).arg(o4).arg(o5);
+ return c.str();
+ }
+
+ template <typename T1, typename T2, typename T3, typename T4, typename T5,
+ typename T6>
+ inline std::string compose(const std::string &fmt,
+ const T1 &o1, const T2 &o2, const T3 &o3,
+ const T4 &o4, const T5 &o5, const T6 &o6)
+ {
+ StringPrivate::Composition c(fmt);
+ c.arg(o1).arg(o2).arg(o3).arg(o4).arg(o5).arg(o6);
+ return c.str();
+ }
+
+ template <typename T1, typename T2, typename T3, typename T4, typename T5,
+ typename T6, typename T7>
+ inline std::string compose(const std::string &fmt,
+ const T1 &o1, const T2 &o2, const T3 &o3,
+ const T4 &o4, const T5 &o5, const T6 &o6,
+ const T7 &o7)
+ {
+ StringPrivate::Composition c(fmt);
+ c.arg(o1).arg(o2).arg(o3).arg(o4).arg(o5).arg(o6).arg(o7);
+ return c.str();
+ }
+
+ template <typename T1, typename T2, typename T3, typename T4, typename T5,
+ typename T6, typename T7, typename T8>
+ inline std::string compose(const std::string &fmt,
+ const T1 &o1, const T2 &o2, const T3 &o3,
+ const T4 &o4, const T5 &o5, const T6 &o6,
+ const T7 &o7, const T8 &o8)
+ {
+ StringPrivate::Composition c(fmt);
+ c.arg(o1).arg(o2).arg(o3).arg(o4).arg(o5).arg(o6).arg(o7).arg(o8);
+ return c.str();
+ }
+
+ template <typename T1, typename T2, typename T3, typename T4, typename T5,
+ typename T6, typename T7, typename T8, typename T9>
+ inline std::string compose(const std::string &fmt,
+ const T1 &o1, const T2 &o2, const T3 &o3,
+ const T4 &o4, const T5 &o5, const T6 &o6,
+ const T7 &o7, const T8 &o8, const T9 &o9)
+ {
+ StringPrivate::Composition c(fmt);
+ c.arg(o1).arg(o2).arg(o3).arg(o4).arg(o5).arg(o6).arg(o7).arg(o8).arg(o9);
+ return c.str();
+ }
+
+ template <typename T1, typename T2, typename T3, typename T4, typename T5,
+ typename T6, typename T7, typename T8, typename T9, typename T10>
+ inline std::string compose(const std::string &fmt,
+ const T1 &o1, const T2 &o2, const T3 &o3,
+ const T4 &o4, const T5 &o5, const T6 &o6,
+ const T7 &o7, const T8 &o8, const T9 &o9,
+ const T10 &o10)
+ {
+ StringPrivate::Composition c(fmt);
+ c.arg(o1).arg(o2).arg(o3).arg(o4).arg(o5).arg(o6).arg(o7).arg(o8).arg(o9)
+ .arg(o10);
+ return c.str();
+ }
+
+ template <typename T1, typename T2, typename T3, typename T4, typename T5,
+ typename T6, typename T7, typename T8, typename T9, typename T10,
+ typename T11>
+ inline std::string compose(const std::string &fmt,
+ const T1 &o1, const T2 &o2, const T3 &o3,
+ const T4 &o4, const T5 &o5, const T6 &o6,
+ const T7 &o7, const T8 &o8, const T9 &o9,
+ const T10 &o10, const T11 &o11)
+ {
+ StringPrivate::Composition c(fmt);
+ c.arg(o1).arg(o2).arg(o3).arg(o4).arg(o5).arg(o6).arg(o7).arg(o8).arg(o9)
+ .arg(o10).arg(o11);
+ return c.str();
+ }
+
+ template <typename T1, typename T2, typename T3, typename T4, typename T5,
+ typename T6, typename T7, typename T8, typename T9, typename T10,
+ typename T11, typename T12>
+ inline std::string compose(const std::string &fmt,
+ const T1 &o1, const T2 &o2, const T3 &o3,
+ const T4 &o4, const T5 &o5, const T6 &o6,
+ const T7 &o7, const T8 &o8, const T9 &o9,
+ const T10 &o10, const T11 &o11, const T12 &o12)
+ {
+ StringPrivate::Composition c(fmt);
+ c.arg(o1).arg(o2).arg(o3).arg(o4).arg(o5).arg(o6).arg(o7).arg(o8).arg(o9)
+ .arg(o10).arg(o11).arg(o12);
+ return c.str();
+ }
+
+ template <typename T1, typename T2, typename T3, typename T4, typename T5,
+ typename T6, typename T7, typename T8, typename T9, typename T10,
+ typename T11, typename T12, typename T13>
+ inline std::string compose(const std::string &fmt,
+ const T1 &o1, const T2 &o2, const T3 &o3,
+ const T4 &o4, const T5 &o5, const T6 &o6,
+ const T7 &o7, const T8 &o8, const T9 &o9,
+ const T10 &o10, const T11 &o11, const T12 &o12,
+ const T13 &o13)
+ {
+ StringPrivate::Composition c(fmt);
+ c.arg(o1).arg(o2).arg(o3).arg(o4).arg(o5).arg(o6).arg(o7).arg(o8).arg(o9)
+ .arg(o10).arg(o11).arg(o12).arg(o13);
+ return c.str();
+ }
+
+ template <typename T1, typename T2, typename T3, typename T4, typename T5,
+ typename T6, typename T7, typename T8, typename T9, typename T10,
+ typename T11, typename T12, typename T13, typename T14>
+ inline std::string compose(const std::string &fmt,
+ const T1 &o1, const T2 &o2, const T3 &o3,
+ const T4 &o4, const T5 &o5, const T6 &o6,
+ const T7 &o7, const T8 &o8, const T9 &o9,
+ const T10 &o10, const T11 &o11, const T12 &o12,
+ const T13 &o13, const T14 &o14)
+ {
+ StringPrivate::Composition c(fmt);
+ c.arg(o1).arg(o2).arg(o3).arg(o4).arg(o5).arg(o6).arg(o7).arg(o8).arg(o9)
+ .arg(o10).arg(o11).arg(o12).arg(o13).arg(o14);
+ return c.str();
+ }
+
+ template <typename T1, typename T2, typename T3, typename T4, typename T5,
+ typename T6, typename T7, typename T8, typename T9, typename T10,
+ typename T11, typename T12, typename T13, typename T14,
+ typename T15>
+ inline std::string compose(const std::string &fmt,
+ const T1 &o1, const T2 &o2, const T3 &o3,
+ const T4 &o4, const T5 &o5, const T6 &o6,
+ const T7 &o7, const T8 &o8, const T9 &o9,
+ const T10 &o10, const T11 &o11, const T12 &o12,
+ const T13 &o13, const T14 &o14, const T15 &o15)
+ {
+ StringPrivate::Composition c(fmt);
+ c.arg(o1).arg(o2).arg(o3).arg(o4).arg(o5).arg(o6).arg(o7).arg(o8).arg(o9)
+ .arg(o10).arg(o11).arg(o12).arg(o13).arg(o14).arg(o15);
+ return c.str();
+ }
+//}
+
+
+#endif // STRING_COMPOSE_H
diff --git a/libs/pbd3/pbd/datum.h b/libs/pbd3/pbd/datum.h
new file mode 100644
index 0000000000..1f2704b429
--- /dev/null
+++ b/libs/pbd3/pbd/datum.h
@@ -0,0 +1,57 @@
+/*
+ Copyright (C) 1998-99 Paul Barton-Davis
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef __qm_datum_h__
+#define __qm_datum_h__
+
+/* A basic data type used whenever we want to represent
+ something that might be a string or a number.
+*/
+
+struct Datum {
+ enum Type {
+ String,
+ Numeric,
+ };
+ Type type;
+ union {
+ const char *str;
+ float n;
+ };
+
+ Datum &operator=(float val) {
+ type = Numeric;
+ n = val;
+ return *this;
+ }
+
+ Datum &operator=(int val) {
+ type = Numeric;
+ n=(float) val;
+ return *this;
+ }
+
+ Datum &operator=(const char *val) {
+ type = String;
+ str = val;
+ return *this;
+ }
+};
+
+#endif // __qm_datum_h__
diff --git a/libs/pbd3/pbd/dirname.h b/libs/pbd3/pbd/dirname.h
new file mode 100644
index 0000000000..5e63ddb55d
--- /dev/null
+++ b/libs/pbd3/pbd/dirname.h
@@ -0,0 +1,11 @@
+#ifndef __stupid_dirname_h__
+#define __stupid_dirname_h__
+
+
+#include <string>
+
+namespace PBD {
+ extern char *dirname (const char *);
+ extern std::string dirname (const std::string);
+}
+#endif // __stupid_dirname_h__
diff --git a/libs/pbd3/pbd/ellipsoid.h b/libs/pbd3/pbd/ellipsoid.h
new file mode 100644
index 0000000000..3758e415c2
--- /dev/null
+++ b/libs/pbd3/pbd/ellipsoid.h
@@ -0,0 +1,74 @@
+/*
+ Copyright (C) 1998-99 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef __qm_ellipsoid_h__
+#define __qm_ellipsoid_h__
+
+struct Arc
+{
+ int rect_x;
+ int rect_y;
+ int rect_h;
+ int rect_w;
+ int start_angle;
+ int arc_angle;
+ bool counter_clockwise;
+};
+
+class Ellipsoid
+{
+ int start_x;
+ int end_x;
+ int start_y;
+ int end_y;
+ static const unsigned int narcs;
+
+ public:
+ Arc arc[2];
+
+ Ellipsoid () {
+ start_x = -1;
+ end_x = -1;
+ }
+
+ bool ready() { return start_x != -1 && end_x != -1; }
+ void set_start (int x, int y);
+ void set_end (int x, int y);
+ void compute ();
+
+ void set_start_angle (int n, int which_arc = -1) {
+ if (which_arc < 0) {
+ arc[0].start_angle = n * 64;
+ arc[1].start_angle = n * 64;
+ } else if (which_arc < (int) narcs) {
+ arc[which_arc].start_angle = n * 64;
+ }
+ }
+ void set_arc_angle (int n, int which_arc = -1) {
+ if (which_arc < 0) {
+ arc[0].arc_angle = n * 64;
+ arc[1].arc_angle = n * 64;
+ } else if (which_arc < (int) narcs) {
+ arc[which_arc].arc_angle = n * 64;
+ }
+ }
+};
+
+#endif // __qm_ellipsoid_h__
diff --git a/libs/pbd3/pbd/error.h b/libs/pbd3/pbd/error.h
new file mode 100644
index 0000000000..cb822e6210
--- /dev/null
+++ b/libs/pbd3/pbd/error.h
@@ -0,0 +1,30 @@
+/*
+ Copyright (C) 1998-99 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+#ifndef __libmisc_error_h__
+#define __libmisc_error_h__
+
+#include "transmitter.h"
+
+extern Transmitter error;
+extern Transmitter info;
+extern Transmitter warning;
+extern Transmitter fatal;
+
+#endif // __libmisc_error_h__
diff --git a/libs/pbd3/pbd/failed_constructor.h b/libs/pbd3/pbd/failed_constructor.h
new file mode 100644
index 0000000000..62eb6c0d71
--- /dev/null
+++ b/libs/pbd3/pbd/failed_constructor.h
@@ -0,0 +1,11 @@
+#ifndef __pbd_failed_constructor_h__
+#define __pbd_failed_constructor_h__
+
+#include <exception>
+
+class failed_constructor : public std::exception {
+ public:
+ virtual const char *what() const throw() { return "failed constructor"; }
+};
+
+#endif /* __pbd_failed_constructor_h__ */
diff --git a/libs/pbd3/pbd/fastlog.h b/libs/pbd3/pbd/fastlog.h
new file mode 100644
index 0000000000..4e9050cb8b
--- /dev/null
+++ b/libs/pbd3/pbd/fastlog.h
@@ -0,0 +1,38 @@
+/* Copyright unknown. Code by Laurent de Soras <laurent@ohmforce.com>.
+ */
+
+#ifndef __pbd_fastlog_h__
+#define __pbd_fastlog_h__
+
+#include <math.h> /* for HUGE_VAL */
+
+static inline float fast_log2 (float val)
+{
+ /* don't use reinterpret_cast<> because that prevents this
+ from being used by pure C code (for example, GnomeCanvasItems)
+ */
+ int * const exp_ptr = (int *)(&val);
+ int x = *exp_ptr;
+ const int log_2 = ((x >> 23) & 255) - 128;
+ x &= ~(255 << 23);
+ x += 127 << 23;
+ *exp_ptr = x;
+
+ val = ((-1.0f/3) * val + 2) * val - 2.0f/3; // (1)
+
+ return (val + log_2);
+}
+
+static inline float fast_log (const float val)
+{
+ return (fast_log2 (val) * 0.69314718f);
+}
+
+static inline float fast_log10 (const float val)
+{
+ return fast_log2(val) / 3.312500f;
+}
+
+static inline float minus_infinity() { return -HUGE_VAL; }
+
+#endif /* __pbd_fastlog_h__ */
diff --git a/libs/pbd3/pbd/foreach.h b/libs/pbd3/pbd/foreach.h
new file mode 100644
index 0000000000..5102d81bb0
--- /dev/null
+++ b/libs/pbd3/pbd/foreach.h
@@ -0,0 +1,42 @@
+/*
+ Copyright (C) 2002 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef __lib_pbd_foreach_h__
+#define __lib_pbd_foreach_h__
+
+template<class Iter, class T> void foreach (Iter first, Iter last, void (T::*method)()) {
+ for (; first != last; ++first) {
+ ((*first).*method)();
+ }
+}
+
+template<class Iter, class T, class A> void foreach (Iter first, Iter last, void (T::*method)(A a), A arg) {
+ for (; first != last; ++first) {
+ ((*first).*method)(arg);
+ }
+}
+
+template<class Iter, class T, class A1, class A2> void foreach (Iter first, Iter last, void (T::*method)(A1, A2), A1 arg1, A2 arg2) {
+ for (; first != last; ++first) {
+ ((*first).*method)(arg1, arg2);
+ }
+}
+
+#endif /* __lib_pbd_foreach_h__ */
diff --git a/libs/pbd3/pbd/forkexec.h b/libs/pbd3/pbd/forkexec.h
new file mode 100644
index 0000000000..2af3711390
--- /dev/null
+++ b/libs/pbd3/pbd/forkexec.h
@@ -0,0 +1,9 @@
+#ifndef __forkexec_h__
+#define __forkexec_h__
+
+#include <unistd.h>
+
+pid_t forkexec(char **argv, char **envp, int outpipe[2], int inpipe[2]);
+pid_t forkexec_cmd(char *cmd, char **envp, int outpipe[2], int inpipe[2]);
+
+#endif // __forkexec_h__
diff --git a/libs/pbd3/pbd/ftw.h b/libs/pbd3/pbd/ftw.h
new file mode 100644
index 0000000000..9acf8a6967
--- /dev/null
+++ b/libs/pbd3/pbd/ftw.h
@@ -0,0 +1,106 @@
+/*
+ Copyright (c) 2003 by Joel Baker.
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ 1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+ 2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+ 3. Neither the name of the Author nor the names of any contributors
+ may be used to endorse or promote products derived from this software
+ without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ SUCH DAMAGE.
+*/
+
+#ifndef _FTW_H
+#define _FTW_H
+
+#include <sys/stat.h>
+
+/* Enumerated values for 'flag' when calling [n]ftw */
+
+enum {
+ FTW_D, /* Directories */
+ FTW_DNR, /* Unreadable directory */
+ FTW_F, /* Regular files */
+ FTW_SL, /* Symbolic link */
+ FTW_NS, /* stat(2) failed */
+
+#ifdef __USE_XOPEN_EXTENDED /* X/Open */
+
+/* Flags for nftw only */
+
+ FTW_DP, /* Directory, subdirs visited */
+ FTW_SLN, /* Dangling symlink */
+
+#endif /* __USE_XOPEN_EXTENDED */
+};
+
+#ifdef __USE_XOPEN_EXTENDED /* X/Open */
+
+/* Enumerated values for 'flags' when calling nftw */
+
+enum {
+ FTW_CHDIR = 1, /* Do a chdir(2) when entering a directory */
+ FTW_DEPTH = 2, /* Report files first (before directory) */
+ FTW_MOUNT = 4, /* Single filesystem */
+ FTW_PHYS = 8 /* Physical walk; ignore symlinks */
+};
+
+#define FTW_PHYS FTW_PHYS
+#define FTW_MOUNT FTW_MOUNT
+#define FTW_CHDIR FTW_CHDIR
+#define FTW_DEPTH FTW_DEPTH
+
+/* FTW struct for callbacks from nftw */
+
+struct FTW {
+ int base;
+ int level;
+};
+
+#endif /* __USE_XOPEN_EXTENDED */
+
+/* Typecasts for callback functions */
+
+typedef int (*__ftw_func_t) \
+ (const char *file, const struct stat *status, int flag);
+
+#ifdef __USE_XOPEN_EXTENDED /* X/Open */
+
+typedef int (*__nftw_func_t) \
+ (const char *file, const struct stat *status, int flag, struct FTW *detail);
+
+#endif /* __USE_XOPEN_EXTENDED */
+
+/* ftw: walk a directory tree, calling a function for each element */
+
+extern int ftw (const char *dir, __ftw_func_t func, int descr);
+
+#ifdef __USE_XOPEN_EXTENDED /* X/Open */
+
+/* nftw: walk a directory tree, calling a function for each element; much
+ * like ftw, but with behavior flags and minty freshness.
+ */
+
+extern int nftw (const char *dir, __nftw_func_t func, int descr, int flags);
+
+#endif /* __USE_XOPEN_EXTENDED */
+
+#endif /* _FTW_H */
diff --git a/libs/pbd3/pbd/irix_platform.h b/libs/pbd3/pbd/irix_platform.h
new file mode 100644
index 0000000000..f948554f26
--- /dev/null
+++ b/libs/pbd3/pbd/irix_platform.h
@@ -0,0 +1,20 @@
+#ifndef __irix_platform__
+#define __irix_platform__
+
+#include <pbd/platform.h>
+
+class IrixPlatform : public Platform {
+ public:
+ IrixPlatform () : Platform () {};
+ virtual ~IrixPlatform ();
+
+ virtual int pre_config ();
+ virtual int post_config ();
+ virtual int pre_ui ();
+ virtual int post_ui ();
+
+ virtual int dsp_startup();
+};
+
+
+#endif // __irix_platform__
diff --git a/libs/pbd3/pbd/linux_platform.h b/libs/pbd3/pbd/linux_platform.h
new file mode 100644
index 0000000000..74822a9d89
--- /dev/null
+++ b/libs/pbd3/pbd/linux_platform.h
@@ -0,0 +1,41 @@
+/*
+ Copyright (C) 1999 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef __linux_platform_h__
+#define __linux_platform_h__
+
+#include <pbd/platform.h>
+
+class LinuxPlatform : public Platform
+
+{
+ public:
+ LinuxPlatform ();
+ ~LinuxPlatform () {};
+
+ int pre_config ();
+ int post_config ();
+ int pre_ui ();
+ int post_ui ();
+
+ int dsp_startup() { return 0; }
+};
+
+#endif // __linux_platform_h__
diff --git a/libs/pbd3/pbd/lock_free_fifo.h b/libs/pbd3/pbd/lock_free_fifo.h
new file mode 100644
index 0000000000..cbe653fcb5
--- /dev/null
+++ b/libs/pbd3/pbd/lock_free_fifo.h
@@ -0,0 +1,86 @@
+/*
+ Copyright (C) 2000 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef __pbd_lockfree_fifo_h__
+#define __pbd_lockfree_fifo_h__
+
+#include <sys/types.h>
+#include <cstdlib>
+
+template<class T>
+class LockFreeFIFO
+{
+public:
+ LockFreeFIFO (int sz) {
+ size = sz;
+ push_ptr = 0;
+ pop_ptr = 0;
+ buf = new T[size];
+ };
+
+ virtual ~LockFreeFIFO() {
+ delete [] buf;
+ }
+
+
+ int pop (T& r) {
+ if (pop_ptr == push_ptr) {
+ return -1;
+ } else {
+ r = buf[pop_ptr];
+ pop_ptr++;
+ if (pop_ptr >= size) {
+ pop_ptr = 0;
+ }
+ return 0;
+ }
+ }
+
+ int top (T& r) {
+ if (pop_ptr == push_ptr) {
+ return -1;
+ } else {
+ r = buf[pop_ptr];
+ return 0;
+ }
+ }
+
+ int push (T& t) {
+ if ((size_t) abs (static_cast<int>(push_ptr - pop_ptr)) < size) {
+ buf[push_ptr] = t;
+ push_ptr++;
+ if (push_ptr >= size) {
+ push_ptr = 0;
+ }
+ return 0;
+ } else {
+ return -1;
+ }
+ }
+
+ protected:
+ T *buf;
+ volatile size_t push_ptr;
+ volatile size_t pop_ptr;
+ size_t size;
+};
+
+
+#endif /* __pbd_lockfree_fifo_h__ */
diff --git a/libs/pbd3/pbd/lockmonitor.h b/libs/pbd3/pbd/lockmonitor.h
new file mode 100644
index 0000000000..8fad66f83e
--- /dev/null
+++ b/libs/pbd3/pbd/lockmonitor.h
@@ -0,0 +1,194 @@
+/*
+ Copyright (C) 2000 Paul Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef __pbd_lockmonitor_h__
+#define __pbd_lockmonitor_h__
+
+#include <pthread.h>
+#include <pbd/pthread_spinlock.h>
+
+#undef DEBUG_LOCK_MONITOR
+
+#ifdef DEBUG_LOCK_MONITOR
+#include <iostream>
+#include <ardour/cycles.h>
+#endif
+
+namespace PBD
+{
+class Lock {
+ public:
+ Lock() { pthread_mutex_init (&_mutex, 0); }
+ virtual ~Lock() {}
+
+ virtual int lock () { return pthread_mutex_lock (&_mutex); }
+ virtual int unlock() { return pthread_mutex_unlock (&_mutex); }
+
+ pthread_mutex_t *mutex() { return &_mutex; }
+
+ protected:
+ pthread_mutex_t _mutex;
+};
+
+class NonBlockingLock : public Lock {
+ public:
+ NonBlockingLock() {}
+ ~NonBlockingLock(){}
+
+ int lock () { return pthread_mutex_lock (&_mutex); }
+ int trylock () { return pthread_mutex_trylock (&_mutex); }
+ int unlock() { return pthread_mutex_unlock (&_mutex); }
+};
+
+class LockMonitor
+{
+ public:
+ LockMonitor (Lock& lck, unsigned long l, const char *f)
+ : lock (lck)
+#ifdef DEBUG_LOCK_MONITOR
+ , line (l), file (f)
+#endif
+ {
+
+#ifdef DEBUG_LOCK_MONITOR
+ unsigned long long when;
+ when = get_cycles();
+ cerr << when << " lock " << &lock << " at " << line << " in " << file << endl;
+#endif
+ lock.lock ();
+#ifdef DEBUG_LOCK_MONITOR
+ when = get_cycles();
+ cerr << '\t' << when
+ << " locked: "
+ << &lock << " at "
+ << line << " in " << file << endl;
+#endif
+ }
+
+ ~LockMonitor () {
+ lock.unlock ();
+#ifdef DEBUG_LOCK_MONITOR
+ unsigned long long when;
+ when = get_cycles();
+ cerr << '\t' << when << ' '
+ << " UNLOCKED "
+ << &lock << " at "
+ << line << " in " << file << endl;
+#endif
+ }
+ private:
+ Lock& lock;
+#ifdef DEBUG_LOCK_MONITOR
+ unsigned long line;
+ const char * file;
+#endif
+};
+
+class TentativeLockMonitor
+{
+ public:
+ TentativeLockMonitor (NonBlockingLock& lck, unsigned long l, const char *f)
+ : lock (lck)
+#ifdef DEBUG_LOCK_MONITOR
+ , line (l), file (f)
+#endif
+ {
+
+#ifdef DEBUG_LOCK_MONITOR
+ unsigned long long when;
+ when = get_cycles();
+ cerr << when << " tentative lock " << &lock << " at " << line << " in " << file << endl;
+#endif
+ _locked = (lock.trylock() == 0);
+
+#ifdef DEBUG_LOCK_MONITOR
+ when = get_cycles();
+ cerr << '\t' << when << ' '
+ << _locked
+ << " lock: "
+ << &lock << " at "
+ << line << " in " << file << endl;
+#endif
+ }
+
+ ~TentativeLockMonitor () {
+ if (_locked) {
+ lock.unlock ();
+#ifdef DEBUG_LOCK_MONITOR
+ unsigned long long when;
+ when = get_cycles();
+ cerr << '\t' << when << ' '
+ << " UNLOCKED "
+ << &lock << " at "
+ << line << " in " << file << endl;
+#endif
+ }
+ }
+
+ bool locked() { return _locked; }
+
+ private:
+ NonBlockingLock& lock;
+ bool _locked;
+#ifdef DEBUG_LOCK_MONITOR
+ unsigned long line;
+ const char * file;
+#endif
+};
+
+class SpinLockMonitor
+{
+ public:
+ SpinLockMonitor (pthread_mutex_t *lck, unsigned long l, const char *f)
+ : lock (lck)
+#ifdef DEBUG_LOCK_MONITOR
+ , line (l), file (f)
+#endif
+ {
+
+#ifdef DEBUG_LOCK_MONITOR
+ unsigned long long when;
+ when = get_cycles();
+ cerr << when << " spinlock " << lck << " at " << line << " in " << file << endl;
+#endif
+ pthread_mutex_spinlock (lck);
+#ifdef DEBUG_LOCK_MONITOR
+ when = get_cycles();
+ cerr << '\t' << when
+ << " locked at "
+ << &lock << " at "
+ << line << " in " << file << endl;
+#endif
+ }
+
+ ~SpinLockMonitor () {
+ pthread_mutex_unlock (lock);
+ }
+ private:
+ pthread_mutex_t *lock;
+#ifdef DEBUG_LOCK_MONITOR
+ unsigned long line;
+ const char * file;
+#endif
+};
+
+} /* namespace */
+
+#endif /* __pbd_lockmonitor_h__*/
diff --git a/libs/pbd3/pbd/mountpoint.h b/libs/pbd3/pbd/mountpoint.h
new file mode 100644
index 0000000000..86ccc58190
--- /dev/null
+++ b/libs/pbd3/pbd/mountpoint.h
@@ -0,0 +1,28 @@
+/*
+ Copyright (C) 1998-99 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef __pbd_mountpoint_h__
+#define __pbd_mountpoint_h__
+
+#include <string>
+
+std::string mountpoint (std::string path);
+
+#endif // __pbd_mountpoint_h__
diff --git a/libs/pbd3/pbd/pathscanner.h b/libs/pbd3/pbd/pathscanner.h
new file mode 100644
index 0000000000..346e7858c4
--- /dev/null
+++ b/libs/pbd3/pbd/pathscanner.h
@@ -0,0 +1,66 @@
+#ifndef __libmisc_pathscanner_h__
+#define __libmisc_pathscanner_h__
+
+#include <vector>
+#include <string>
+#include <regex.h>
+
+using std::string;
+using std::vector;
+
+class PathScanner
+
+{
+ public:
+ vector<string *> *operator() (const string &dirpath,
+ bool (*filter)(const string &, void *arg),
+ void *arg,
+ bool match_fullpath = true,
+ bool return_fullpath = true,
+ long limit = -1) {
+ return run_scan (dirpath,
+ (bool (PathScanner::*)(const string &)) 0,
+ filter,
+ arg,
+ match_fullpath,
+ return_fullpath,
+ limit);
+ }
+
+ vector<string *> *operator() (const string &dirpath,
+ const string &regexp,
+ bool match_fullpath = true,
+ bool return_fullpath = true,
+ long limit = -1);
+
+
+ string *find_first (const string &dirpath,
+ const string &regexp,
+ bool match_fullpath = true,
+ bool return_fullpath = true);
+
+ string *find_first (const string &dirpath,
+ bool (*filter)(const string &, void *),
+ void *arg,
+ bool match_fullpath = true,
+ bool return_fullpath = true);
+
+ private:
+ regex_t compiled_pattern;
+
+ bool regexp_filter (const string &str) {
+ return regexec (&compiled_pattern, str.c_str(), 0, 0, 0) == 0;
+ }
+
+ vector<string *> *run_scan (const string &dirpath,
+ bool (PathScanner::*mfilter) (const string &),
+ bool (*filter)(const string &, void *),
+ void *arg,
+ bool match_fullpath,
+ bool return_fullpath,
+ long limit);
+
+
+};
+
+#endif // __libmisc_pathscanner_h__
diff --git a/libs/pbd3/pbd/platform.h b/libs/pbd3/pbd/platform.h
new file mode 100644
index 0000000000..761195a31b
--- /dev/null
+++ b/libs/pbd3/pbd/platform.h
@@ -0,0 +1,45 @@
+/*
+ Copyright (C) 1999 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef __qm_platform_h__
+#define __qm_platform_h__
+
+class Platform
+
+{
+ public:
+ Platform () {
+ thePlatform = this;
+ }
+ virtual ~Platform () {}
+
+ virtual int pre_config () { return 0;}
+ virtual int post_config () { return 0;}
+ virtual int pre_ui () { return 0; }
+ virtual int post_ui () { return 0; }
+ virtual int dsp_startup() { return 0; }
+
+ static Platform *instance() { return thePlatform; }
+
+ private:
+ static Platform *thePlatform;
+};
+
+#endif // __qm_platform_h__
diff --git a/libs/pbd3/pbd/platform_factory.h b/libs/pbd3/pbd/platform_factory.h
new file mode 100644
index 0000000000..d5255ea212
--- /dev/null
+++ b/libs/pbd3/pbd/platform_factory.h
@@ -0,0 +1,12 @@
+#ifndef __platform_factory__
+#define __platform_factory__
+
+#include <pbd/platform.h>
+
+class PlatformFactory {
+public:
+ static Platform* create_platform ();
+};
+
+
+#endif // __platform_factory__
diff --git a/libs/pbd3/pbd/pool.h b/libs/pbd3/pbd/pool.h
new file mode 100644
index 0000000000..c8e9740acd
--- /dev/null
+++ b/libs/pbd3/pbd/pool.h
@@ -0,0 +1,74 @@
+/*
+ Copyright (C) 1998-99 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef __qm_pool_h__
+#define __qm_pool_h__
+
+#include <vector>
+#include <string>
+#include <pthread.h>
+#include <pbd/ringbuffer.h>
+
+class Pool
+{
+ public:
+ Pool (std::string name, unsigned long item_size, unsigned long nitems);
+ virtual ~Pool ();
+
+ virtual void *alloc ();
+ virtual void release (void *);
+
+ std::string name() const { return _name; }
+
+ private:
+ RingBuffer<void*>* free_list;
+ std::string _name;
+ void *block;
+};
+
+class SingleAllocMultiReleasePool : public Pool
+{
+ public:
+ SingleAllocMultiReleasePool (std::string name, unsigned long item_size, unsigned long nitems);
+ ~SingleAllocMultiReleasePool ();
+
+ virtual void *alloc ();
+ virtual void release (void *);
+
+ private:
+ pthread_mutex_t lock;
+};
+
+
+class MultiAllocSingleReleasePool : public Pool
+{
+ public:
+ MultiAllocSingleReleasePool (std::string name, unsigned long item_size, unsigned long nitems);
+ ~MultiAllocSingleReleasePool ();
+
+ virtual void *alloc ();
+ virtual void release (void *);
+
+ private:
+ pthread_mutex_t lock;
+};
+
+
+#endif // __qm_pool_h__
diff --git a/libs/pbd3/pbd/position.h b/libs/pbd3/pbd/position.h
new file mode 100644
index 0000000000..c8241af085
--- /dev/null
+++ b/libs/pbd3/pbd/position.h
@@ -0,0 +1,38 @@
+/*
+ Copyright (C) 1998-99 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef __qui_position_h__
+#define __qui_position_h__
+
+enum Position {
+ Top,
+ Left,
+ Right,
+ Bottom,
+ UpperLeft,
+ LowerLeft,
+ UpperRight,
+ LowerRight,
+ Center,
+ Nowhere,
+};
+
+
+#endif // __qui_position_h__
diff --git a/libs/pbd3/pbd/precision_timer.h b/libs/pbd3/pbd/precision_timer.h
new file mode 100644
index 0000000000..a103b4800d
--- /dev/null
+++ b/libs/pbd3/pbd/precision_timer.h
@@ -0,0 +1,61 @@
+/*
+ Copyright (C) 1998-99 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef __precision_timer_h__
+#define __precision_timer_h__
+
+#include <pbd/cycles.h>
+
+typedef cycles_t precision_time_t;
+
+class PrecisionTimer {
+ public:
+ PrecisionTimer ();
+
+ /* returns current time in microseconds since
+ the time base was created (which may be
+ the same as when the PrecisionTimer was
+ created or it may not).
+ */
+
+#ifdef PBD_HAVE_CYCLE_COUNTER
+
+ precision_time_t current () {
+ return get_cycles() / cycles_per_usec;
+ }
+
+#else /* !HAVE_CYCLE_COUNTER */
+
+ precision_time_t current () {
+ struct timeval now;
+ gettimeofday (&now, 0);
+ return (precision_time_t) ((now.tv_sec * 1000000) + now.tv_usec);
+ }
+
+#endif /* HAVE_CYCLE_COUNTER */
+
+ private:
+ int get_mhz();
+ static precision_time_t cycles_per_usec;
+};
+
+#endif // __precision_timer.h
+
+
diff --git a/libs/pbd3/pbd/pthread_spinlock.h b/libs/pbd3/pbd/pthread_spinlock.h
new file mode 100644
index 0000000000..71835221fa
--- /dev/null
+++ b/libs/pbd3/pbd/pthread_spinlock.h
@@ -0,0 +1,29 @@
+/*
+ Copyright (C) 1998-99 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+#ifndef __pthread_mutex_spinlock_h__
+#define __pthread_mutex_spinlock_h__
+
+#include <pthread.h>
+
+extern unsigned int pthread_calibrate_spinlimit ();
+extern void pthread_set_spinlimit (unsigned int spins);
+extern int pthread_mutex_spinlock (pthread_mutex_t *mp);
+
+#endif // __pthread_mutex_spinlock_h__
diff --git a/libs/pbd3/pbd/pthread_utils.h b/libs/pbd3/pbd/pthread_utils.h
new file mode 100644
index 0000000000..9c7cefd3e4
--- /dev/null
+++ b/libs/pbd3/pbd/pthread_utils.h
@@ -0,0 +1,21 @@
+#ifndef __pbd_pthread_utils__
+#define __pbd_pthread_utils__
+
+#include <pthread.h>
+#include <signal.h>
+#include <string>
+
+#include <sigc++/sigc++.h>
+
+int pthread_create_and_store (std::string name, pthread_t *thread, pthread_attr_t *attr, void * (*start_routine)(void *), void * arg);
+void pthread_cancel_one (pthread_t thread);
+void pthread_kill_all (int signum);
+void pthread_cancel_all ();
+void pthread_exit_pbd (void* status);
+std::string pthread_name ();
+
+namespace PBD {
+ extern sigc::signal<void,pthread_t,std::string> ThreadCreated;
+}
+
+#endif /* __pbd_pthread_utils__ */
diff --git a/libs/pbd3/pbd/rcpointer.h b/libs/pbd3/pbd/rcpointer.h
new file mode 100644
index 0000000000..c634208437
--- /dev/null
+++ b/libs/pbd3/pbd/rcpointer.h
@@ -0,0 +1,61 @@
+/*
+ Copyright (C) 1998-99 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef __qm_rcpointer_h__
+#define __qm_rcpointer_h__
+
+template<class T> class RCPointer {
+ public:
+ T *operator->() { return _ptr; }
+ bool operator==(T *p) { return _ptr == p; }
+ bool operator!=(T *p) { return _ptr != p; }
+
+ int refcount() { return _ptr->count; }
+
+ RCPointer () { _ptr = 0; }
+
+ RCPointer (T *p) : _ptr (p) {
+ if (_ptr) _ptr->count++;
+ }
+
+ RCPointer (const RCPointer& r) : _ptr (r._ptr) {
+ if (_ptr) _ptr->count++;
+ }
+
+ RCPointer &operator= (const RCPointer &r) {
+ if (_ptr == r._ptr) return *this;
+ if (_ptr && --_ptr->count == 0) {
+ delete _ptr;
+ }
+ _ptr = r._ptr;
+ if (_ptr) _ptr->count++;
+ return *this;
+ }
+ ~RCPointer () {
+ if (_ptr && --_ptr->count == 0) {
+ delete _ptr;
+ }
+ }
+
+ private:
+ T *_ptr;
+};
+
+#endif // __qm_rcpointer_h__
diff --git a/libs/pbd3/pbd/receiver.h b/libs/pbd3/pbd/receiver.h
new file mode 100644
index 0000000000..b55e28f5ee
--- /dev/null
+++ b/libs/pbd3/pbd/receiver.h
@@ -0,0 +1,50 @@
+/*
+ Copyright (C) 1998-99 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef __libmisc_receiver_h__
+#define __libmisc_receiver_h__
+
+#include <vector>
+
+#include <sigc++/sigc++.h>
+
+#include "transmitter.h"
+
+using std::vector;
+
+class strstream;
+
+class Receiver : public sigc::trackable
+{
+ public:
+ Receiver ();
+ virtual ~Receiver ();
+
+ void listen_to (Transmitter &);
+ void hangup ();
+
+ protected:
+ virtual void receive (Transmitter::Channel, const char *) = 0;
+
+ private:
+ vector<sigc::connection *> connections;
+};
+
+#endif // __libmisc_receiver_h__
diff --git a/libs/pbd3/pbd/relation.h b/libs/pbd3/pbd/relation.h
new file mode 100644
index 0000000000..f28aaecfa1
--- /dev/null
+++ b/libs/pbd3/pbd/relation.h
@@ -0,0 +1,35 @@
+/*
+ Copyright (C) 1999 Paul Barton-Davis
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef __pbd_relation_h__
+#define __pbd_relation_h__
+
+enum RelationalCondition {
+ Equal = 0,
+ NotEqual,
+ LessThan,
+ LessThanOrEqual,
+ GreaterThan,
+ GreaterThanOrEqual,
+ Changed,
+
+ NumConditions
+};
+
+#endif // __pbd_relation_h__
diff --git a/libs/pbd3/pbd/restartable_rw.h b/libs/pbd3/pbd/restartable_rw.h
new file mode 100644
index 0000000000..ee84e4e295
--- /dev/null
+++ b/libs/pbd3/pbd/restartable_rw.h
@@ -0,0 +1,7 @@
+#ifndef __libmisc_restartable_rw__h__
+#define __libmisc_restartable_rw__h__
+
+extern int restartable_write (int fd, unsigned char *buf, size_t cnt);
+extern int restartable_read (int fd, unsigned char *buf, size_t cnt);
+
+#endif // __libmisc_restartable_rw__h__
diff --git a/libs/pbd3/pbd/ringbuffer.h b/libs/pbd3/pbd/ringbuffer.h
new file mode 100644
index 0000000000..cca9cbfc01
--- /dev/null
+++ b/libs/pbd3/pbd/ringbuffer.h
@@ -0,0 +1,283 @@
+/*
+ Copyright (C) 2000 Paul Davis & Benno Senoner
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef ringbuffer_h
+#define ringbuffer_h
+
+#include <sys/mman.h>
+#include <pbd/atomic.h>
+
+template<class T>
+class RingBuffer
+{
+ public:
+ RingBuffer (size_t sz) {
+ size_t power_of_two;
+
+ for (power_of_two = 1; 1U<<power_of_two < sz; power_of_two++);
+
+ size = 1<<power_of_two;
+ size_mask = size;
+ size_mask -= 1;
+ buf = new T[size];
+ reset ();
+
+ };
+
+ virtual ~RingBuffer() {
+ delete [] buf;
+ }
+
+ void reset () {
+ /* !!! NOT THREAD SAFE !!! */
+ atomic_set (&write_ptr, 0);
+ atomic_set (&read_ptr, 0);
+ }
+
+ void set (size_t r, size_t w) {
+ /* !!! NOT THREAD SAFE !!! */
+ atomic_set (&write_ptr, w);
+ atomic_set (&read_ptr, r);
+ }
+
+ size_t read (T *dest, size_t cnt);
+ size_t write (T *src, size_t cnt);
+
+ struct rw_vector {
+ T *buf[2];
+ size_t len[2];
+ };
+
+ void get_read_vector (rw_vector *);
+ void get_write_vector (rw_vector *);
+
+ void decrement_read_ptr (size_t cnt) {
+ atomic_set (&read_ptr, (atomic_read(&read_ptr) - cnt) & size_mask);
+ }
+
+ void increment_read_ptr (size_t cnt) {
+ atomic_set (&read_ptr, (atomic_read(&read_ptr) + cnt) & size_mask);
+ }
+
+ void increment_write_ptr (size_t cnt) {
+ atomic_set (&write_ptr, (atomic_read(&write_ptr) + cnt) & size_mask);
+ }
+
+ size_t write_space () {
+ size_t w, r;
+
+ w = atomic_read (&write_ptr);
+ r = atomic_read (&read_ptr);
+
+ if (w > r) {
+ return ((r - w + size) & size_mask) - 1;
+ } else if (w < r) {
+ return (r - w) - 1;
+ } else {
+ return size - 1;
+ }
+ }
+
+ size_t read_space () {
+ size_t w, r;
+
+ w = atomic_read (&write_ptr);
+ r = atomic_read (&read_ptr);
+
+ if (w > r) {
+ return w - r;
+ } else {
+ return (w - r + size) & size_mask;
+ }
+ }
+
+ T *buffer () { return buf; }
+ size_t get_write_ptr () const { return atomic_read (&write_ptr); }
+ size_t get_read_ptr () const { return atomic_read (&read_ptr); }
+ size_t bufsize () const { return size; }
+
+ protected:
+ T *buf;
+ size_t size;
+ atomic_t write_ptr;
+ atomic_t read_ptr;
+ size_t size_mask;
+};
+
+template<class T> size_t
+RingBuffer<T>::read (T *dest, size_t cnt)
+{
+ size_t free_cnt;
+ size_t cnt2;
+ size_t to_read;
+ size_t n1, n2;
+ size_t priv_read_ptr;
+
+ priv_read_ptr=atomic_read(&read_ptr);
+
+ if ((free_cnt = read_space ()) == 0) {
+ return 0;
+ }
+
+ to_read = cnt > free_cnt ? free_cnt : cnt;
+
+ cnt2 = priv_read_ptr + to_read;
+
+ if (cnt2 > size) {
+ n1 = size - priv_read_ptr;
+ n2 = cnt2 & size_mask;
+ } else {
+ n1 = to_read;
+ n2 = 0;
+ }
+
+ memcpy (dest, &buf[priv_read_ptr], n1 * sizeof (T));
+ priv_read_ptr = (priv_read_ptr + n1) & size_mask;
+
+ if (n2) {
+ memcpy (dest+n1, buf, n2 * sizeof (T));
+ priv_read_ptr = n2;
+ }
+
+ atomic_set(&read_ptr, priv_read_ptr);
+ return to_read;
+}
+
+template<class T> size_t
+RingBuffer<T>::write (T *src, size_t cnt)
+
+{
+ size_t free_cnt;
+ size_t cnt2;
+ size_t to_write;
+ size_t n1, n2;
+ size_t priv_write_ptr;
+
+ priv_write_ptr=atomic_read(&write_ptr);
+
+ if ((free_cnt = write_space ()) == 0) {
+ return 0;
+ }
+
+ to_write = cnt > free_cnt ? free_cnt : cnt;
+
+ cnt2 = priv_write_ptr + to_write;
+
+ if (cnt2 > size) {
+ n1 = size - priv_write_ptr;
+ n2 = cnt2 & size_mask;
+ } else {
+ n1 = to_write;
+ n2 = 0;
+ }
+
+ memcpy (&buf[priv_write_ptr], src, n1 * sizeof (T));
+ priv_write_ptr = (priv_write_ptr + n1) & size_mask;
+
+ if (n2) {
+ memcpy (buf, src+n1, n2 * sizeof (T));
+ priv_write_ptr = n2;
+ }
+
+ atomic_set(&write_ptr, priv_write_ptr);
+ return to_write;
+}
+
+template<class T> void
+RingBuffer<T>::get_read_vector (RingBuffer<T>::rw_vector *vec)
+
+{
+ size_t free_cnt;
+ size_t cnt2;
+ size_t w, r;
+
+ w = atomic_read (&write_ptr);
+ r = atomic_read (&read_ptr);
+
+ if (w > r) {
+ free_cnt = w - r;
+ } else {
+ free_cnt = (w - r + size) & size_mask;
+ }
+
+ cnt2 = r + free_cnt;
+
+ if (cnt2 > size) {
+ /* Two part vector: the rest of the buffer after the
+ current write ptr, plus some from the start of
+ the buffer.
+ */
+
+ vec->buf[0] = &buf[r];
+ vec->len[0] = size - r;
+ vec->buf[1] = buf;
+ vec->len[1] = cnt2 & size_mask;
+
+ } else {
+
+ /* Single part vector: just the rest of the buffer */
+
+ vec->buf[0] = &buf[r];
+ vec->len[0] = free_cnt;
+ vec->len[1] = 0;
+ }
+}
+
+template<class T> void
+RingBuffer<T>::get_write_vector (RingBuffer<T>::rw_vector *vec)
+
+{
+ size_t free_cnt;
+ size_t cnt2;
+ size_t w, r;
+
+ w = atomic_read (&write_ptr);
+ r = atomic_read (&read_ptr);
+
+ if (w > r) {
+ free_cnt = ((r - w + size) & size_mask) - 1;
+ } else if (w < r) {
+ free_cnt = (r - w) - 1;
+ } else {
+ free_cnt = size - 1;
+ }
+
+ cnt2 = w + free_cnt;
+
+ if (cnt2 > size) {
+
+ /* Two part vector: the rest of the buffer after the
+ current write ptr, plus some from the start of
+ the buffer.
+ */
+
+ vec->buf[0] = &buf[w];
+ vec->len[0] = size - w;
+ vec->buf[1] = buf;
+ vec->len[1] = cnt2 & size_mask;
+ } else {
+ vec->buf[0] = &buf[w];
+ vec->len[0] = free_cnt;
+ vec->len[1] = 0;
+ }
+}
+
+
+#endif /* __ringbuffer_h__ */
diff --git a/libs/pbd3/pbd/ringbufferNPT.h b/libs/pbd3/pbd/ringbufferNPT.h
new file mode 100644
index 0000000000..d0562ec76b
--- /dev/null
+++ b/libs/pbd3/pbd/ringbufferNPT.h
@@ -0,0 +1,272 @@
+/*
+ Copyright (C) 2000 Paul Davis & Benno Senoner
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef ringbuffer_npt_h
+#define ringbuffer_npt_h
+
+#include <sys/mman.h>
+#include <pbd/atomic.h>
+
+template<class T>
+class RingBufferNPT
+{
+ public:
+ RingBufferNPT (size_t sz) {
+ size = sz;
+ buf = new T[size];
+ reset ();
+
+ };
+
+ virtual ~RingBufferNPT() {
+ delete [] buf;
+ }
+
+ void reset () {
+ /* !!! NOT THREAD SAFE !!! */
+ atomic_set (&write_ptr, 0);
+ atomic_set (&read_ptr, 0);
+ }
+
+ void set (size_t r, size_t w) {
+ /* !!! NOT THREAD SAFE !!! */
+ atomic_set (&write_ptr, w);
+ atomic_set (&read_ptr, r);
+ }
+
+ size_t read (T *dest, size_t cnt);
+ size_t write (T *src, size_t cnt);
+
+ struct rw_vector {
+ T *buf[2];
+ size_t len[2];
+ };
+
+ void get_read_vector (rw_vector *);
+ void get_write_vector (rw_vector *);
+
+ void decrement_read_ptr (size_t cnt) {
+ atomic_set (&read_ptr, (atomic_read(&read_ptr) - cnt) % size);
+ }
+
+ void increment_read_ptr (size_t cnt) {
+ atomic_set (&read_ptr, (atomic_read(&read_ptr) + cnt) % size);
+ }
+
+ void increment_write_ptr (size_t cnt) {
+ atomic_set (&write_ptr, (atomic_read(&write_ptr) + cnt) % size);
+ }
+
+ size_t write_space () {
+ size_t w, r;
+
+ w = atomic_read (&write_ptr);
+ r = atomic_read (&read_ptr);
+
+ if (w > r) {
+ return ((r - w + size) % size) - 1;
+ } else if (w < r) {
+ return (r - w) - 1;
+ } else {
+ return size - 1;
+ }
+ }
+
+ size_t read_space () {
+ size_t w, r;
+
+ w = atomic_read (&write_ptr);
+ r = atomic_read (&read_ptr);
+
+ if (w > r) {
+ return w - r;
+ } else {
+ return (w - r + size) % size;
+ }
+ }
+
+ T *buffer () { return buf; }
+ size_t get_write_ptr () const { return atomic_read (&write_ptr); }
+ size_t get_read_ptr () const { return atomic_read (&read_ptr); }
+ size_t bufsize () const { return size; }
+
+ protected:
+ T *buf;
+ size_t size;
+ atomic_t write_ptr;
+ atomic_t read_ptr;
+};
+
+template<class T> size_t
+RingBufferNPT<T>::read (T *dest, size_t cnt)
+{
+ size_t free_cnt;
+ size_t cnt2;
+ size_t to_read;
+ size_t n1, n2;
+ size_t priv_read_ptr;
+
+ priv_read_ptr=atomic_read(&read_ptr);
+
+ if ((free_cnt = read_space ()) == 0) {
+ return 0;
+ }
+
+ to_read = cnt > free_cnt ? free_cnt : cnt;
+
+ cnt2 = priv_read_ptr + to_read;
+
+ if (cnt2 > size) {
+ n1 = size - priv_read_ptr;
+ n2 = cnt2 % size;
+ } else {
+ n1 = to_read;
+ n2 = 0;
+ }
+
+ memcpy (dest, &buf[priv_read_ptr], n1 * sizeof (T));
+ priv_read_ptr = (priv_read_ptr + n1) % size;
+
+ if (n2) {
+ memcpy (dest+n1, buf, n2 * sizeof (T));
+ priv_read_ptr = n2;
+ }
+
+ atomic_set(&read_ptr, priv_read_ptr);
+ return to_read;
+}
+
+template<class T> size_t
+RingBufferNPT<T>::write (T *src, size_t cnt)
+{
+ size_t free_cnt;
+ size_t cnt2;
+ size_t to_write;
+ size_t n1, n2;
+ size_t priv_write_ptr;
+
+ priv_write_ptr=atomic_read(&write_ptr);
+
+ if ((free_cnt = write_space ()) == 0) {
+ return 0;
+ }
+
+ to_write = cnt > free_cnt ? free_cnt : cnt;
+
+ cnt2 = priv_write_ptr + to_write;
+
+ if (cnt2 > size) {
+ n1 = size - priv_write_ptr;
+ n2 = cnt2 % size;
+ } else {
+ n1 = to_write;
+ n2 = 0;
+ }
+
+ memcpy (&buf[priv_write_ptr], src, n1 * sizeof (T));
+ priv_write_ptr = (priv_write_ptr + n1) % size;
+
+ if (n2) {
+ memcpy (buf, src+n1, n2 * sizeof (T));
+ priv_write_ptr = n2;
+ }
+
+ atomic_set(&write_ptr, priv_write_ptr);
+ return to_write;
+}
+
+template<class T> void
+RingBufferNPT<T>::get_read_vector (RingBufferNPT<T>::rw_vector *vec)
+{
+ size_t free_cnt;
+ size_t cnt2;
+ size_t w, r;
+
+ w = atomic_read (&write_ptr);
+ r = atomic_read (&read_ptr);
+
+ if (w > r) {
+ free_cnt = w - r;
+ } else {
+ free_cnt = (w - r + size) % size;
+ }
+
+ cnt2 = r + free_cnt;
+
+ if (cnt2 > size) {
+ /* Two part vector: the rest of the buffer after the
+ current write ptr, plus some from the start of
+ the buffer.
+ */
+
+ vec->buf[0] = &buf[r];
+ vec->len[0] = size - r;
+ vec->buf[1] = buf;
+ vec->len[1] = cnt2 % size;
+
+ } else {
+
+ /* Single part vector: just the rest of the buffer */
+
+ vec->buf[0] = &buf[r];
+ vec->len[0] = free_cnt;
+ vec->len[1] = 0;
+ }
+}
+
+template<class T> void
+RingBufferNPT<T>::get_write_vector (RingBufferNPT<T>::rw_vector *vec)
+{
+ size_t free_cnt;
+ size_t cnt2;
+ size_t w, r;
+
+ w = atomic_read (&write_ptr);
+ r = atomic_read (&read_ptr);
+
+ if (w > r) {
+ free_cnt = ((r - w + size) % size) - 1;
+ } else if (w < r) {
+ free_cnt = (r - w) - 1;
+ } else {
+ free_cnt = size - 1;
+ }
+
+ cnt2 = w + free_cnt;
+
+ if (cnt2 > size) {
+
+ /* Two part vector: the rest of the buffer after the
+ current write ptr, plus some from the start of
+ the buffer.
+ */
+
+ vec->buf[0] = &buf[w];
+ vec->len[0] = size - w;
+ vec->buf[1] = buf;
+ vec->len[1] = cnt2 % size;
+ } else {
+ vec->buf[0] = &buf[w];
+ vec->len[0] = free_cnt;
+ vec->len[1] = 0;
+ }
+}
+
+#endif /* __ringbuffer_npt_h__ */
diff --git a/libs/pbd3/pbd/rt.h b/libs/pbd3/pbd/rt.h
new file mode 100644
index 0000000000..aa954fcd42
--- /dev/null
+++ b/libs/pbd3/pbd/rt.h
@@ -0,0 +1,25 @@
+/*
+ Copyright (C) 1998-99 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+#ifndef __libmisc_rt_h__
+#define __libmisc_rt_h__
+
+extern int become_real_time_thread (int rt_priorty = 10, bool fifo = true);
+
+#endif // __libmisc_rt_h__
diff --git a/libs/pbd3/pbd/rtthread.h b/libs/pbd3/pbd/rtthread.h
new file mode 100644
index 0000000000..b99c69ba79
--- /dev/null
+++ b/libs/pbd3/pbd/rtthread.h
@@ -0,0 +1,30 @@
+/*
+ Copyright (C) 1998-99 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+#ifndef __rtthread_h__
+#define __rtthread_h__
+
+#include <pthread.h>
+
+extern int pthread_create_realtime (pthread_t *new_thread,
+ void *(*start)(void *), void *arg,
+ int priority = 10);
+
+
+#endif // __rtthread_h__
diff --git a/libs/pbd3/pbd/scale.h b/libs/pbd3/pbd/scale.h
new file mode 100644
index 0000000000..0384ae52aa
--- /dev/null
+++ b/libs/pbd3/pbd/scale.h
@@ -0,0 +1,53 @@
+/*
+ Copyright (C) 2000 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef __pbd_scale_h__
+#define __pbd_scale_h__
+
+#include <cmath>
+
+inline float
+scale (float value, float lower, float upper)
+{
+ return fabs (lower + value) / (upper-lower);
+}
+
+inline float
+scale_with_range (float value, float lower, float range)
+{
+ return fabs (lower + value) / range;
+}
+
+
+inline float
+scale_to (float value, float lower, float upper, float to)
+{
+ return (fabs (lower + value) / (upper-lower)) * to;
+}
+
+inline float
+scale_to_with_range (float value, float lower, float range, float to)
+{
+ return (fabs (lower + value) / range) * to;
+}
+
+#endif /* __pbd_scale_h__ */
+
+
diff --git a/libs/pbd3/pbd/selectable.h b/libs/pbd3/pbd/selectable.h
new file mode 100644
index 0000000000..470bc3cfcc
--- /dev/null
+++ b/libs/pbd3/pbd/selectable.h
@@ -0,0 +1,102 @@
+/*
+ Copyright (C) 1998-99 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef __selectable_h__
+#define __selectable_h__
+
+#include <list>
+#include <string>
+#include <stdio.h>
+
+#include <sigc++/sigc++.h>
+
+#include <sys/types.h>
+
+namespace Select {
+ enum Condition {
+ Readable = 0x1,
+ Writable = 0x2,
+ Exception = 0x4
+ };
+
+class Selectable : public sigc::trackable
+
+{
+ public:
+ Selectable (int fd);
+ Selectable (const std::string &, int flags, int mode = 0);
+ Selectable (FILE *);
+ ~Selectable ();
+
+ sigc::signal<void,Selectable *,Select::Condition> readable;
+ sigc::signal<void,Selectable *,Select::Condition> writable;
+ sigc::signal<void,Selectable *,Select::Condition> exceptioned;
+
+ int fd() { return _fd; }
+ bool ok() { return _ok; }
+
+ protected:
+ void selected (unsigned int condition);
+ int condition;
+ int _fd;
+
+ friend class Selector;
+
+ private:
+ enum {
+ fromFD,
+ fromPath,
+ fromFILE
+ };
+
+ bool _ok;
+ int _type;
+ std::string path;
+};
+
+class Selector {
+ private:
+ int post_select (fd_set *, fd_set *, fd_set *);
+ int _max_fd;
+
+ typedef std::list<Selectable *> Selectables;
+ Selectables selectables;
+ pthread_mutex_t list_lock;
+
+ static bool use_list_lock;
+
+ public:
+ Selector ();
+
+ void multithreaded (bool yn) {
+ use_list_lock = yn;
+ }
+
+ void add (int condition, Selectable *s);
+ void remove (Selectable *);
+ int select (unsigned long usecs);
+};
+
+
+
+} /* namespace */
+
+
+#endif // __selectable_h__
diff --git a/libs/pbd3/pbd/solaris_platform.h b/libs/pbd3/pbd/solaris_platform.h
new file mode 100644
index 0000000000..6f39a77f73
--- /dev/null
+++ b/libs/pbd3/pbd/solaris_platform.h
@@ -0,0 +1,41 @@
+/*
+ Copyright (C) 1999 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef __solaris_platform_h__
+#define __solaris_platform_h__
+
+#include <pbd/platform.h>
+
+class SolarisPlatform : public Platform
+{
+ public:
+ SolarisPlatform () : Platform () {};
+ ~SolarisPlatform () {};
+
+ int pre_config ();
+ int post_config ();
+ int pre_ui ();
+ int post_ui ();
+
+ int dsp_startup() { return 0; }
+
+};
+
+#endif // __solaris_platform_h__
diff --git a/libs/pbd3/pbd/stl_delete.h b/libs/pbd3/pbd/stl_delete.h
new file mode 100644
index 0000000000..6e5bfa0734
--- /dev/null
+++ b/libs/pbd3/pbd/stl_delete.h
@@ -0,0 +1,89 @@
+/*
+ Copyright (C) 1998-99 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef __libmisc_stl_delete_h__
+#define __libmisc_stl_delete_h__
+
+/* To actually use any of these deletion functions, you need to
+ first include the revelant container type header.
+*/
+#if defined(_CPP_VECTOR) || defined(_GLIBCXX_VECTOR) || defined(__SGI_STL_VECTOR)
+template<class T> void vector_delete (std::vector<T *> *vec)
+{
+ typename std::vector<T *>::iterator i;
+
+ for (i = vec->begin(); i != vec->end(); i++) {
+ delete *i;
+ }
+ vec->clear ();
+}
+#endif // _CPP_VECTOR || _GLIBCXX_VECTOR || __SGI_STL_VECTOR
+
+#if defined(_CPP_MAP) || defined(_GLIBCXX_MAP) || defined(__SGI_STL_MAP)
+template<class K, class T> void map_delete (std::map<K, T *> *m)
+{
+ typename std::map<K, T *>::iterator i;
+
+ for (i = m->begin(); i != m->end(); i++) {
+ delete (*i).second;
+ }
+ m->clear ();
+}
+#endif // _CPP_MAP || _GLIBCXX_MAP || __SGI_STL_MAP
+
+#if defined(_CPP_LIST) || defined(_GLIBCXX_LIST) || defined(__SGI_STL_LIST)
+template<class T> void list_delete (std::list<T *> *l)
+{
+ typename std::list<T *>::iterator i;
+
+ for (i = l->begin(); i != l->end(); i++) {
+ delete (*i);
+ }
+
+ l->clear ();
+}
+#endif // _CPP_LIST || _GLIBCXX_LIST || __SGI_STL_LIST
+
+#if defined(_CPP_SLIST) || defined(_GLIBCXX_SLIST) || defined(__SGI_STL_SLIST)
+template<class T> void slist_delete (std::slist<T *> *l)
+{
+ typename std::slist<T *>::iterator i;
+
+ for (i = l->begin(); i != l->end(); i++) {
+ delete (*i);
+ }
+
+ l->clear ();
+}
+#endif // _CPP_SLIST || _GLIBCXX_SLIST || __SGI_STL_SLIST
+
+#if defined(_CPP_SET) || defined(_GLIBCXX_SET) || defined(__SGI_STL_SET)
+template<class T> void set_delete (std::set<T *> *sset)
+{
+ typename std::set<T *>::iterator i;
+
+ for (i = sset->begin(); i != sset->end(); i++) {
+ delete *i;
+ }
+ sset->erase (sset->begin(), sset->end());
+}
+#endif // _CPP_SET || _GLIBCXX_SET || __SGI_STL_SET
+
+#endif // __libmisc_stl_delete_h__
diff --git a/libs/pbd3/pbd/stl_functors.h b/libs/pbd3/pbd/stl_functors.h
new file mode 100644
index 0000000000..4a96e91a28
--- /dev/null
+++ b/libs/pbd3/pbd/stl_functors.h
@@ -0,0 +1,93 @@
+/*
+ Copyright (C) 1998-99 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef __stl_functors_h__
+#define __stl_functors_h__
+
+#include <string>
+
+#ifndef LESS_STRING_P
+struct less<std::string *> {
+ bool operator()(std::string *s1, std::string *s2) const {
+ return *s1 < *s2;
+ }
+};
+#define LESS_STRING_P
+#endif // LESS_STRING_P
+
+#ifndef LESS_CONST_STRING_P
+struct less<const std::string *> {
+ bool operator()(const std::string *s1, const std::string *s2) const {
+ return *s1 < *s2;
+ }
+};
+#define LESS_CONST_STRING_P
+#endif // LESS_CONST_STRING_P
+
+#ifndef LESS_CONST_CHAR_P
+struct less<const char *>
+{
+ bool operator()(const char* s1, const char* s2) const {
+ return strcmp(s1, s2) < 0;
+ }
+};
+#define LESS_CONST_CHAR_P
+#endif // LESS_CONST_CHAR_P
+
+#ifndef LESS_CONST_FLOAT_P
+struct less<const float *>
+{
+ bool operator()(const float *n1, const float *n2) const {
+ return *n1 < *n2;
+ }
+};
+#define LESS_CONST_FLOAT_P
+#endif // LESS_CONST_FLOAT_P
+
+#ifndef EQUAL_TO_CONST_CHAR_P
+struct equal_to<const char *>
+{
+ bool operator()(const char *s1, const char *s2) const {
+ return strcmp (s1, s2) == 0;
+ }
+};
+#define EQUAL_TO_CONST_CHAR_P
+#endif // EQUAL_TO_CONST_CHAR_P
+
+#ifndef EQUAL_TO_STRING_P
+struct equal_to<std::string *>
+{
+ bool operator()(const std::string *s1, const std::string *s2) const {
+ return *s1 == *s2;
+ }
+};
+#define EQUAL_TO_STRING_P
+#endif // EQUAL_TO_STRING_P
+
+#ifndef LESS_CONST_STRING_R
+struct less<const std::string &> {
+ bool operator() (const std::string &s1, const std::string &s2) {
+ return s1 < s2;
+ }
+};
+#define LESS_CONST_STRING_R
+#endif // EQUAL_TO_STRING_P
+
+#endif // __stl_functors_h__
diff --git a/libs/pbd3/pbd/strsplit.h b/libs/pbd3/pbd/strsplit.h
new file mode 100644
index 0000000000..e55ad1c825
--- /dev/null
+++ b/libs/pbd3/pbd/strsplit.h
@@ -0,0 +1,9 @@
+#ifndef __pbd_strplit_h__
+#define __pbd_strplit_h__
+
+#include <string>
+#include <vector>
+
+extern void split (std::string, std::vector<std::string>&, char);
+
+#endif // __pbd_strplit_h__
diff --git a/libs/pbd3/pbd/strsub.h b/libs/pbd3/pbd/strsub.h
new file mode 100644
index 0000000000..c5bfb1ade4
--- /dev/null
+++ b/libs/pbd3/pbd/strsub.h
@@ -0,0 +1,25 @@
+/*
+ Copyright (C) 1998-99 Paul Barton-Davis
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef __libmisc_strsub_h__
+#define __libmisc_strsub_h__
+
+extern char *strsub (char *str, const char *target, const char *replacement);
+
+#endif // __libmisc_strsub_h__
diff --git a/libs/pbd3/pbd/textreceiver.h b/libs/pbd3/pbd/textreceiver.h
new file mode 100644
index 0000000000..b8bfe5bc78
--- /dev/null
+++ b/libs/pbd3/pbd/textreceiver.h
@@ -0,0 +1,44 @@
+/*
+ Copyright (C) 1998-99 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef __libmisc_textreceiver_h__
+#define __libmisc_textreceiver_h__
+
+#include <string>
+
+#include "receiver.h"
+
+using std::string;
+using std::cout;
+using std::endl;
+
+class TextReceiver : public Receiver
+{
+ public:
+ TextReceiver (const string &n);
+
+ protected:
+ void receive (Transmitter::Channel, const char *);
+
+ private:
+ string name;
+};
+
+#endif //__libmisc_textreceiver_h__
diff --git a/libs/pbd3/pbd/thread.h b/libs/pbd3/pbd/thread.h
new file mode 100644
index 0000000000..c1d5c3c78d
--- /dev/null
+++ b/libs/pbd3/pbd/thread.h
@@ -0,0 +1,127 @@
+/*
+ Copyright (C) 1998-99 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef __qm_thread_h__
+#define __qm_thread_h__
+
+#include <pthread.h>
+
+/* A generic base class for Quasimodo objects requiring their own
+ thread to do work.
+*/
+
+class QMThread
+
+{
+ public:
+ QMThread (const char *name,
+ void *(start)(void *), void *,
+ bool realtime = false, int rt_priority = 10);
+
+ virtual ~QMThread();
+
+ int run ();
+ void poke ();
+ void pause ();
+ void stop ();
+ void *wait ();
+
+ /* This doesn't guarantee anything about the state of
+ the thread, but if you do things the right way, and
+ make sure that the do_work() routine checks
+ work_no_more() at the right times, and that the
+ thread is awake, then calling this will cause
+ the thread to exit fairly quickly.
+ */
+
+ void halt() { _must_exit = true ; }
+
+ void exit (void *status);
+ pthread_t thread_id() { return _thread; }
+
+ bool thread_ok () { return _have_thread; }
+ bool thread_active() { return _thread_active; }
+
+ bool thread_running () {
+ /* XXX not atomic */
+ return _running && _thread_active;
+ }
+
+ bool thread_waiting () { return _thread_waiting; }
+
+ static void try_to_kill_all_threads() {
+ all_threads_must_die = true;
+ }
+
+ protected:
+ void *main ();
+
+ bool work_no_more () { return (!_running || _must_exit || all_threads_must_die); }
+
+ bool myself () {
+ return pthread_equal (_thread, pthread_self());
+ }
+
+ void suspend() {
+ _running = false;
+ }
+
+ void lock (pthread_mutex_t *lock) {
+ pthread_mutex_lock (lock);
+ }
+
+ void unlock (pthread_mutex_t *lock) {
+ pthread_mutex_unlock (lock);
+ }
+
+ virtual void *do_work () = 0;
+
+ private:
+ const char *_name;
+ bool _must_exit;
+ bool _running;
+ bool _thread_active;
+ bool _thread_waiting;
+ bool _have_thread;
+
+ size_t work_cnt;
+
+ pthread_mutex_t status_lock;
+ pthread_cond_t wake_up; /* protected by status_lock */
+ pthread_cond_t asleep; /* protected by status_lock */
+ pthread_cond_t running; /* protected by status_lock */
+ pthread_cond_t exited; /* protected by status_lock */
+ pthread_t _thread;
+
+ void lock () {
+ pthread_mutex_lock (&status_lock);
+ }
+
+ void unlock () {
+ pthread_mutex_unlock (&status_lock);
+ }
+
+ static bool all_threads_must_die;
+
+ static void signal_catcher (int sig);
+ void setup_signals ();
+};
+
+#endif // __qm_thread_h__
diff --git a/libs/pbd3/pbd/thrown_error.h b/libs/pbd3/pbd/thrown_error.h
new file mode 100644
index 0000000000..83cf8acfac
--- /dev/null
+++ b/libs/pbd3/pbd/thrown_error.h
@@ -0,0 +1,39 @@
+/*
+ Copyright (C) 1998-99 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+#ifndef __qm_thrown_error_h__
+#define __qm_thrown_error_h__
+
+#include "transmitter.h"
+
+#define SAFE_THROW(T) \
+ T *sent = new T; \
+ (*sent) << rdbuf(); \
+ throw sent
+
+class ThrownError : public Transmitter {
+ public:
+ ThrownError () : Transmitter (Transmitter::Throw) {}
+ protected:
+ virtual void deliver () = 0;
+};
+
+#endif // __qm_thrown_error_h__
+
+
diff --git a/libs/pbd3/pbd/touchable.h b/libs/pbd3/pbd/touchable.h
new file mode 100644
index 0000000000..0298574dfa
--- /dev/null
+++ b/libs/pbd3/pbd/touchable.h
@@ -0,0 +1,89 @@
+/*
+ Copyright (C) 1999 Paul Barton-Davis
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef __pbd_touchable_h__
+#define __pbd_touchable_h__
+
+class Touchable
+{
+ public:
+ Touchable() : _delete_after_touch (false) {}
+ virtual ~Touchable() {}
+
+ void set_delete_after_touch (bool yn) { _delete_after_touch = yn; }
+ bool delete_after_touch() const { return _delete_after_touch; }
+
+ virtual void touch () = 0;
+
+ protected:
+ bool _delete_after_touch;
+};
+
+template<class T>
+class DynamicTouchable : public Touchable
+{
+ public:
+ DynamicTouchable (T& t, void (T::*m)(void))
+ : object (t), method (m) { set_delete_after_touch (true); }
+
+ void touch () {
+ (object.*method)();
+ }
+
+ protected:
+ T& object;
+ void (T::*method)(void);
+};
+
+template<class T1, class T2>
+class DynamicTouchable1 : public Touchable
+{
+ public:
+ DynamicTouchable1 (T1& t, void (T1::*m)(T2), T2 a)
+ : object (t), method (m), arg (a) { set_delete_after_touch (true); }
+
+ void touch () {
+ (object.*method)(arg);
+ }
+
+ protected:
+ T1& object;
+ void (T1::*method)(T2);
+ T2 arg;
+};
+
+template<class T1, class T2, class T3>
+class DynamicTouchable2 : public Touchable
+{
+ public:
+ DynamicTouchable2 (T1& t, void (T1::*m)(T2, T3), T2 a1, T3 a2)
+ : object (t), method (m), arg1 (a1), arg2 (a2) { set_delete_after_touch (true); }
+
+ void touch () {
+ (object.*method)(arg1, arg2);
+ }
+
+ protected:
+ T1& object;
+ void (T1::*method)(T2,T3);
+ T2 arg1;
+ T3 arg2;
+};
+
+#endif // __pbd_touchable_h__
diff --git a/libs/pbd3/pbd/transmitter.h b/libs/pbd3/pbd/transmitter.h
new file mode 100644
index 0000000000..07fc266bce
--- /dev/null
+++ b/libs/pbd3/pbd/transmitter.h
@@ -0,0 +1,109 @@
+/*
+ Copyright (C) 1998-99 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef __libmisc_transmitter_h__
+#define __libmisc_transmitter_h__
+
+#include <sstream>
+#include <iostream>
+
+#include <sigc++/sigc++.h>
+
+using std::cout;
+using std::cerr;
+using std::endl;
+
+class Transmitter : public std::stringstream
+
+{
+ public:
+ enum Channel {
+ Info,
+ Error,
+ Warning,
+ Fatal,
+ Throw
+ };
+
+ Transmitter (Channel);
+
+ sigc::signal<void,Channel, const char *> &sender() {
+ return *send;
+ }
+
+ bool does_not_return ();
+
+ protected:
+ virtual void deliver ();
+ friend std::ostream& endmsg (std::ostream &);
+
+ private:
+ Channel channel;
+ sigc::signal<void, Channel, const char *> *send;
+
+ sigc::signal<void, Channel, const char *> info;
+ sigc::signal<void, Channel, const char *> warning;
+ sigc::signal<void, Channel, const char *> error;
+ sigc::signal<void, Channel, const char *> fatal;
+};
+
+/* for EGCS 2.91.66, if this function is not compiled within the same
+ compilation unit as the one where a ThrownError is thrown, then
+ nothing will catch the error. This is a pretty small function, so
+ inlining it here seems like a reasonable workaround.
+*/
+
+inline std::ostream &
+endmsg (std::ostream &ostr)
+
+{
+ Transmitter *t;
+
+ /* There is a serious bug in the Cygnus/GCC libstdc++ library:
+ cout is not actually an ostream, but a trick was played
+ to make the compiler think that it is. This will cause
+ the dynamic_cast<> to fail with SEGV. So, first check to
+ see if ostr == cout, and handle it specially.
+ */
+
+ if (&ostr == &cout) {
+ cout << endl;
+ return ostr;
+ } else if (&ostr == &cerr) {
+ cerr << endl;
+ return ostr;
+ }
+
+ if ((t = dynamic_cast<Transmitter *> (&ostr)) != 0) {
+ t->deliver ();
+ } else {
+ /* hmm. not a Transmitter, so just put a newline on
+ it and assume that that will be enough.
+ */
+
+ ostr << endl;
+ }
+
+ return ostr;
+}
+
+extern "C" { void pbd_c_error (const char *); }
+
+#endif // __libmisc_transmitter_h__
diff --git a/libs/pbd3/pbd/types.h b/libs/pbd3/pbd/types.h
new file mode 100644
index 0000000000..52f067fd04
--- /dev/null
+++ b/libs/pbd3/pbd/types.h
@@ -0,0 +1,32 @@
+/*
+ Copyright (C) 1999 Paul Barton-Davis
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef __pbd_types_h__
+#define __pbd_types_h__
+
+typedef unsigned char byte;
+typedef char int8;
+typedef unsigned short uint16;
+typedef short int16;
+typedef unsigned int uint32;
+typedef int int32;
+typedef unsigned long long int uint64;
+typedef long long int int64;
+
+#endif // __pbd_types_h__
diff --git a/libs/pbd3/pbd/undo.h b/libs/pbd3/pbd/undo.h
new file mode 100644
index 0000000000..f067635ed3
--- /dev/null
+++ b/libs/pbd3/pbd/undo.h
@@ -0,0 +1,96 @@
+/*
+ Copyright (C) 2002 Brett Viren & Paul Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#ifndef __lib_pbd_undo_h__
+#define __lib_pbd_undo_h__
+
+#include <string>
+#include <list>
+#include <sigc++/slot.h>
+#include <sys/time.h>
+
+using std::string;
+using std::list;
+
+typedef sigc::slot<void> UndoAction;
+
+class UndoCommand
+{
+ public:
+ UndoCommand ();
+ UndoCommand (const UndoCommand&);
+ UndoCommand& operator= (const UndoCommand&);
+
+ void clear ();
+
+ void add_undo (const UndoAction&);
+ void add_redo (const UndoAction&);
+ void add_redo_no_execute (const UndoAction&);
+
+ void undo();
+ void redo();
+
+ void set_name (const string& str) {
+ _name = str;
+ }
+ const string& name() const { return _name; }
+
+ void set_timestamp (struct timeval &t) {
+ _timestamp = t;
+ }
+
+ const struct timeval& timestamp() const {
+ return _timestamp;
+ }
+
+ private:
+ list<UndoAction> redo_actions;
+ list<UndoAction> undo_actions;
+ struct timeval _timestamp;
+ string _name;
+};
+
+class UndoHistory
+{
+ public:
+ UndoHistory() {}
+ ~UndoHistory() {}
+
+ void add (UndoCommand uc);
+ void undo (unsigned int n);
+ void redo (unsigned int n);
+
+ unsigned long undo_depth() const { return UndoList.size(); }
+ unsigned long redo_depth() const { return RedoList.size(); }
+
+ string next_undo() const { return (UndoList.empty() ? string("") : UndoList.back().name()); }
+ string next_redo() const { return (RedoList.empty() ? string("") : RedoList.back().name()); }
+
+ void clear ();
+ void clear_undo ();
+ void clear_redo ();
+
+ private:
+ list<UndoCommand> UndoList;
+ list<UndoCommand> RedoList;
+};
+
+
+#endif /* __lib_pbd_undo_h__ */
diff --git a/libs/pbd3/pbd/unescape.h b/libs/pbd3/pbd/unescape.h
new file mode 100644
index 0000000000..6596a86113
--- /dev/null
+++ b/libs/pbd3/pbd/unescape.h
@@ -0,0 +1,6 @@
+#ifndef __unescape_h__
+#define __unescape_h__
+
+void unescape (char *);
+
+#endif // __unescape_h__
diff --git a/libs/pbd3/pbd/xml++.h b/libs/pbd3/pbd/xml++.h
new file mode 100644
index 0000000000..993cb22fdf
--- /dev/null
+++ b/libs/pbd3/pbd/xml++.h
@@ -0,0 +1,127 @@
+/* xml++.h
+ * libxml++ and this file are copyright (C) 2000 by Ari Johnson, and
+ * are covered by the GNU Lesser General Public License, which should be
+ * included with libxml++ as the file COPYING.
+ */
+
+#include <string>
+#include <list>
+#include <map>
+#include <cstdio>
+#include <cstdarg>
+
+#include <libxml/parser.h>
+#include <libxml/tree.h>
+
+#ifndef __XML_H
+#define __XML_H
+
+using std::string;
+using std::map;
+using std::list;
+
+class XMLTree;
+class XMLNode;
+class XMLProperty;
+
+typedef list<XMLNode *> XMLNodeList;
+typedef XMLNodeList::iterator XMLNodeIterator;
+typedef XMLNodeList::const_iterator XMLNodeConstIterator;
+typedef list<XMLProperty*> XMLPropertyList;
+typedef XMLPropertyList::iterator XMLPropertyIterator;
+typedef XMLPropertyList::const_iterator XMLPropertyConstIterator;
+typedef map<string, XMLProperty*> XMLPropertyMap;
+
+class XMLTree {
+private:
+ string _filename;
+ XMLNode *_root;
+ int _compression;
+ bool _initialized;
+
+public:
+ XMLTree();
+ XMLTree(const string &fn);
+ XMLTree(const XMLTree *);
+ ~XMLTree();
+
+ bool initialized() const { return _initialized; };
+ XMLNode *root() const { return _root; };
+ XMLNode *set_root(XMLNode *n) { return _root = n; };
+
+ const string & filename() const { return _filename; };
+ const string & set_filename(const string &fn) { return _filename = fn; };
+
+ int compression() const { return _compression; };
+ int set_compression(int);
+
+ bool read();
+ bool read(const string &fn) { set_filename(fn); return read(); };
+ bool read_buffer(const string &);
+
+ bool write() const;
+ bool write(const string &fn) { set_filename(fn); return write(); };
+
+ void debug (FILE*) const;
+
+ const string & write_buffer() const;
+};
+
+class XMLNode {
+private:
+ bool _initialized;
+ string _name;
+ bool _is_content;
+ string _content;
+ XMLNodeList _children;
+ XMLPropertyList _proplist;
+ XMLPropertyMap _propmap;
+
+public:
+ XMLNode(const string &);
+ XMLNode(const string &, const string &);
+ XMLNode(const XMLNode&);
+ ~XMLNode();
+
+ bool initialized() const { return _initialized; };
+ const string name() const { return _name; };
+
+ bool is_content() const { return _is_content; };
+ const string & content() const { return _content; };
+ const string & set_content(const string &);
+ XMLNode *add_content(const string & = string());
+
+ const XMLNodeList & children(const string & = string()) const;
+ XMLNode *add_child(const string &);
+ XMLNode *add_child_copy(const XMLNode&);
+ void add_child_nocopy (XMLNode&);
+
+ const XMLPropertyList & properties() const { return _proplist; };
+ XMLProperty *property(const string &);
+ const XMLProperty *property(const string &n) const
+ { return ((XMLNode *) this)->property(n); };
+ XMLProperty *add_property(const string &, const string & = string());
+ void remove_property(const string &);
+
+ /** Remove all nodes with the name passed to remove_nodes */
+ void remove_nodes(const string &);
+ /** Remove and delete all nodes with the name passed to remove_nodes */
+ void remove_nodes_and_delete(const string &);
+};
+
+class XMLProperty {
+private:
+ string _name;
+ string _value;
+
+public:
+ XMLProperty(const string &n, const string &v = string());
+ ~XMLProperty();
+
+ const string & name() const { return _name; };
+ const string & value() const { return _value; };
+ const string & set_value(const string &v) { return _value = v; };
+};
+
+#endif /* __XML_H */
+
diff --git a/libs/pbd3/pool.cc b/libs/pbd3/pool.cc
new file mode 100644
index 0000000000..f05d88381c
--- /dev/null
+++ b/libs/pbd3/pool.cc
@@ -0,0 +1,135 @@
+/*
+ Copyright (C) 1998-99 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#include <iostream>
+#include <sys/mman.h>
+#include <vector>
+
+#include <pbd/pool.h>
+#include <pbd/error.h>
+#include <pbd/stl_delete.h>
+#include <pbd/pthread_utils.h>
+
+using namespace std;
+
+Pool::Pool (string n, unsigned long item_size, unsigned long nitems)
+{
+ _name = n;
+
+ free_list = new RingBuffer<void*> (nitems);
+
+ /* since some overloaded ::operator new() might use this,
+ its important that we use a "lower level" allocator to
+ get more space.
+ */
+
+ block = malloc (nitems * item_size);
+
+ void **ptrlist = (void **) malloc (sizeof (void *) * nitems);
+
+ for (unsigned long i = 0; i < nitems; i++) {
+ ptrlist[i] = static_cast<void *> (static_cast<char*>(block) + (i * item_size));
+ }
+
+ free_list->write (ptrlist, nitems);
+
+ free (ptrlist);
+}
+
+Pool::~Pool ()
+{
+ free (block);
+}
+
+void *
+Pool::alloc ()
+{
+ void *ptr;
+
+// cerr << _name << " pool " << " alloc, thread = " << pthread_name() << " space = " << free_list->read_space() << endl;
+
+ if (free_list->read (&ptr, 1) < 1) {
+ fatal << "CRITICAL: " << _name << " POOL OUT OF MEMORY - RECOMPILE WITH LARGER SIZE!!" << endmsg;
+ /*NOTREACHED*/
+ return 0;
+ } else {
+ return ptr;
+ }
+};
+
+void
+Pool::release (void *ptr)
+{
+ free_list->write (&ptr, 1);
+// cerr << _name << ": release, now has " << free_list->read_space() << endl;
+}
+
+/*---------------------------------------------*/
+
+MultiAllocSingleReleasePool::MultiAllocSingleReleasePool (string n, unsigned long isize, unsigned long nitems)
+ : Pool (n, isize, nitems)
+{
+ pthread_mutex_init (&lock, 0);
+}
+
+MultiAllocSingleReleasePool::~MultiAllocSingleReleasePool ()
+{
+}
+
+SingleAllocMultiReleasePool::SingleAllocMultiReleasePool (string n, unsigned long isize, unsigned long nitems)
+ : Pool (n, isize, nitems)
+{
+ pthread_mutex_init (&lock, 0);
+}
+
+SingleAllocMultiReleasePool::~SingleAllocMultiReleasePool ()
+{
+}
+
+void*
+MultiAllocSingleReleasePool::alloc ()
+{
+ void *ptr;
+ pthread_mutex_lock (&lock);
+ ptr = Pool::alloc ();
+ pthread_mutex_unlock (&lock);
+ return ptr;
+}
+
+void
+MultiAllocSingleReleasePool::release (void* ptr)
+{
+ Pool::release (ptr);
+}
+
+void*
+SingleAllocMultiReleasePool::alloc ()
+{
+ return Pool::alloc ();
+}
+
+void
+SingleAllocMultiReleasePool::release (void* ptr)
+{
+ pthread_mutex_lock (&lock);
+ Pool::release (ptr);
+ pthread_mutex_unlock (&lock);
+}
+
diff --git a/libs/pbd3/pthread_utils.cc b/libs/pbd3/pthread_utils.cc
new file mode 100644
index 0000000000..6ef29e3605
--- /dev/null
+++ b/libs/pbd3/pthread_utils.cc
@@ -0,0 +1,133 @@
+/*
+ Copyright (C) 2002 Paul Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#include <map>
+#include <iostream>
+#include <string>
+
+#include <pbd/pthread_utils.h>
+
+using std::string;
+using std::cerr;
+using std::endl;
+
+typedef std::map<string,pthread_t> ThreadMap;
+static ThreadMap all_threads;
+static pthread_mutex_t thread_map_lock = PTHREAD_MUTEX_INITIALIZER;
+
+namespace PBD {
+ sigc::signal<void,pthread_t,std::string> ThreadCreated;
+}
+
+using namespace PBD;
+
+int
+pthread_create_and_store (string name, pthread_t *thread, pthread_attr_t *attr, void * (*start_routine)(void *), void * arg)
+{
+ int ret;
+
+ if ((ret = pthread_create (thread, attr, start_routine, arg)) == 0) {
+ std::pair<string,pthread_t> newpair;
+ newpair.first = name;
+ newpair.second = *thread;
+
+ pthread_mutex_lock (&thread_map_lock);
+ all_threads.insert (newpair);
+
+ pthread_mutex_unlock (&thread_map_lock);
+ }
+
+ return ret;
+}
+
+string
+pthread_name ()
+{
+ pthread_t self = pthread_self();
+ string str;
+
+ pthread_mutex_lock (&thread_map_lock);
+ for (ThreadMap::iterator i = all_threads.begin(); i != all_threads.end(); ++i) {
+ if (i->second == self) {
+ str = i->first;
+ pthread_mutex_unlock (&thread_map_lock);
+ return str;
+ }
+ }
+ pthread_mutex_unlock (&thread_map_lock);
+ return "unknown";
+}
+
+void
+pthread_kill_all (int signum)
+{
+ pthread_mutex_lock (&thread_map_lock);
+ for (ThreadMap::iterator i = all_threads.begin(); i != all_threads.end(); ++i) {
+ if (i->second != pthread_self()) {
+ pthread_kill (i->second, signum);
+ }
+ }
+ all_threads.clear();
+ pthread_mutex_unlock (&thread_map_lock);
+}
+
+void
+pthread_cancel_all ()
+{
+ pthread_mutex_lock (&thread_map_lock);
+ for (ThreadMap::iterator i = all_threads.begin(); i != all_threads.end(); ++i) {
+ if (i->second != pthread_self()) {
+ pthread_cancel (i->second);
+ }
+ }
+ all_threads.clear();
+ pthread_mutex_unlock (&thread_map_lock);
+}
+
+void
+pthread_cancel_one (pthread_t thread)
+{
+ pthread_mutex_lock (&thread_map_lock);
+ for (ThreadMap::iterator i = all_threads.begin(); i != all_threads.end(); ++i) {
+ if (i->second == thread) {
+ all_threads.erase (i);
+ break;
+ }
+ }
+
+ pthread_cancel (thread);
+ pthread_mutex_unlock (&thread_map_lock);
+}
+
+void
+pthread_exit_pbd (void* status)
+{
+ pthread_t thread = pthread_self();
+
+ pthread_mutex_lock (&thread_map_lock);
+ for (ThreadMap::iterator i = all_threads.begin(); i != all_threads.end(); ++i) {
+ if (i->second == thread) {
+ all_threads.erase (i);
+ break;
+ }
+ }
+ pthread_mutex_unlock (&thread_map_lock);
+ pthread_exit (status);
+}
diff --git a/libs/pbd3/receiver.cc b/libs/pbd3/receiver.cc
new file mode 100644
index 0000000000..5e7c10de70
--- /dev/null
+++ b/libs/pbd3/receiver.cc
@@ -0,0 +1,58 @@
+/*
+ Copyright (C) 1998-99 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#include <vector>
+
+#include <pbd/receiver.h>
+#include <pbd/transmitter.h>
+
+using namespace sigc;
+
+Receiver::Receiver () {}
+
+Receiver::~Receiver ()
+
+{
+ hangup ();
+}
+
+void
+Receiver::hangup ()
+{
+ vector<sigc::connection *>::iterator i;
+
+ for (i = connections.begin(); i != connections.end (); i++) {
+ (*i)->disconnect ();
+ delete *i;
+ }
+
+ connections.erase (connections.begin(), connections.end());
+}
+
+void
+Receiver::listen_to (Transmitter &transmitter)
+
+{
+ sigc::connection *c = new sigc::connection;
+
+ (*c) = transmitter.sender().connect(mem_fun(*this, &Receiver::receive));
+
+ connections.push_back (c);
+}
diff --git a/libs/pbd3/strsplit.cc b/libs/pbd3/strsplit.cc
new file mode 100644
index 0000000000..7f29a77887
--- /dev/null
+++ b/libs/pbd3/strsplit.cc
@@ -0,0 +1,41 @@
+#include <pbd/strsplit.h>
+
+using namespace std;
+
+void
+split (string str, vector<string>& result, char splitchar)
+{
+ string::size_type pos;
+ string remaining;
+ string::size_type len = str.length();
+ int cnt;
+
+ cnt = 0;
+
+ if (str.empty()) {
+ return;
+ }
+
+ for (string::size_type n = 0; n < len; ++n) {
+ if (str[n] == splitchar) {
+ cnt++;
+ }
+ }
+
+ if (cnt == 0) {
+ result.push_back (str);
+ return;
+ }
+
+ remaining = str;
+
+ while ((pos = remaining.find_first_of (':')) != string::npos) {
+ result.push_back (remaining.substr (0, pos));
+ remaining = remaining.substr (pos+1);
+ }
+
+ if (remaining.length()) {
+
+ result.push_back (remaining);
+ }
+}
diff --git a/libs/pbd3/textreceiver.cc b/libs/pbd3/textreceiver.cc
new file mode 100644
index 0000000000..43620e9830
--- /dev/null
+++ b/libs/pbd3/textreceiver.cc
@@ -0,0 +1,66 @@
+/*
+ Copyright (C) 1998-99 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#include <iostream>
+#include <cstdlib>
+
+#include <pbd/textreceiver.h>
+
+TextReceiver::TextReceiver (const string &n)
+
+{
+ name = n;
+}
+
+void
+TextReceiver::receive (Transmitter::Channel chn, const char *str)
+
+{
+ const char *prefix = "";
+
+ switch (chn) {
+ case Transmitter::Error:
+ prefix = ": [ERROR]: ";
+ break;
+ case Transmitter::Info:
+ prefix = ": [INFO]: ";
+ break;
+ case Transmitter::Warning:
+ prefix = ": [WARNING]: ";
+ break;
+ case Transmitter::Fatal:
+ prefix = ": [FATAL]: ";
+ break;
+ case Transmitter::Throw:
+ /* this isn't supposed to happen */
+ abort ();
+ }
+
+ /* note: iostreams are already thread-safe: no external
+ lock required.
+ */
+
+ cout << name << prefix << str << endl;
+
+ if (chn == Transmitter::Fatal) {
+ exit (9);
+ }
+}
+
diff --git a/libs/pbd3/transmitter.cc b/libs/pbd3/transmitter.cc
new file mode 100644
index 0000000000..09823a7991
--- /dev/null
+++ b/libs/pbd3/transmitter.cc
@@ -0,0 +1,115 @@
+/*
+ Copyright (C) 1998-99 Paul Barton-Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#include <cstdlib>
+#include <signal.h>
+#include <iostream>
+#include <string>
+
+#include <pbd/transmitter.h>
+
+using std::string;
+using std::ios;
+
+Transmitter::Transmitter (Channel c)
+
+{
+ channel = c;
+ switch (c) {
+ case Error:
+ send = &error;
+ break;
+ case Warning:
+ send = &warning;
+ break;
+ case Info:
+ send = &info;
+ break;
+ case Fatal:
+ send = &fatal;
+ break;
+ case Throw:
+ /* we should never call Transmitter::deliver
+ for thrown messages (because its overridden in the
+ class heirarchy). force a segv if we do.
+ */
+ send = 0;
+ break;
+ }
+}
+
+void
+Transmitter::deliver ()
+
+{
+ string foo;
+
+ /* NOTE: this is just a default action for a Transmitter or a
+ derived class. Any class can override this to produce some
+ other action when deliver() is called.
+ */
+
+ *this << '\0';
+
+ /* send the SigC++ signal */
+
+ foo = str();
+ (*send) (channel, foo.c_str());
+
+ /* XXX when or how can we delete this ? */
+ // delete foo;
+
+ /* return to a pristine state */
+
+ clear ();
+ seekp (0, ios::beg);
+ seekg (0, ios::beg);
+
+ /* do the right thing if this should not return */
+
+ if (does_not_return()) {
+ sigset_t mask;
+
+ sigemptyset (&mask);
+ sigsuspend (&mask);
+ /*NOTREACHED*/
+ exit (1);
+ }
+}
+
+bool
+Transmitter::does_not_return ()
+
+{
+ if (channel == Fatal || channel == Throw) {
+ return true;
+ } else {
+ return false;
+ }
+}
+
+extern "C" {
+ void pbd_c_error (const char *str)
+
+ {
+ extern Transmitter error;
+ error << str << endmsg;
+ }
+}
diff --git a/libs/pbd3/undo.cc b/libs/pbd3/undo.cc
new file mode 100644
index 0000000000..0af1cc2e7a
--- /dev/null
+++ b/libs/pbd3/undo.cc
@@ -0,0 +1,144 @@
+/*
+ Copyright (C) 2001 Brett Viren & Paul Davis
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+ $Id$
+*/
+
+#include <iostream>
+
+#include <pbd/undo.h>
+
+using namespace std;
+using namespace sigc;
+
+UndoCommand::UndoCommand ()
+{
+}
+
+UndoCommand::UndoCommand (const UndoCommand& rhs)
+{
+ _name = rhs._name;
+ clear ();
+ undo_actions.insert(undo_actions.end(),rhs.undo_actions.begin(),rhs.undo_actions.end());
+ redo_actions.insert(redo_actions.end(),rhs.redo_actions.begin(),rhs.redo_actions.end());
+}
+
+UndoCommand&
+UndoCommand::operator= (const UndoCommand& rhs)
+{
+ if (this == &rhs) return *this;
+ _name = rhs._name;
+ clear ();
+ undo_actions.insert(undo_actions.end(),rhs.undo_actions.begin(),rhs.undo_actions.end());
+ redo_actions.insert(redo_actions.end(),rhs.redo_actions.begin(),rhs.redo_actions.end());
+ return *this;
+}
+
+void
+UndoCommand::add_undo (const UndoAction& action)
+{
+ undo_actions.push_back (action);
+}
+
+void
+UndoCommand::add_redo (const UndoAction& action)
+{
+ redo_actions.push_back (action);
+ redo_actions.back()(); // operator()
+}
+
+void
+UndoCommand::add_redo_no_execute (const UndoAction& action)
+{
+ redo_actions.push_back (action);
+}
+
+void
+UndoCommand::clear ()
+{
+ undo_actions.clear ();
+ redo_actions.clear ();
+}
+
+void
+UndoCommand::undo ()
+{
+ for (list<UndoAction>::reverse_iterator i = undo_actions.rbegin(); i != undo_actions.rend(); ++i) {
+ (*i)();
+ }
+}
+
+void
+UndoCommand::redo ()
+{
+ for (list<UndoAction>::iterator i = redo_actions.begin(); i != redo_actions.end(); ++i) {
+ (*i)();
+ }
+}
+
+void
+UndoHistory::add (UndoCommand uc)
+{
+ UndoList.push_back (uc);
+}
+
+void
+UndoHistory::undo (unsigned int n)
+{
+ while (n--) {
+ if (UndoList.size() == 0) {
+ return;
+ }
+ UndoCommand uc = UndoList.back ();
+ UndoList.pop_back ();
+ uc.undo ();
+ RedoList.push_back (uc);
+ }
+}
+
+void
+UndoHistory::redo (unsigned int n)
+{
+ while (n--) {
+ if (RedoList.size() == 0) {
+ return;
+ }
+ UndoCommand cmd = RedoList.back ();
+ RedoList.pop_back ();
+ cmd.redo ();
+ UndoList.push_back (cmd);
+ }
+}
+
+void
+UndoHistory::clear_redo ()
+{
+ RedoList.clear ();
+}
+
+void
+UndoHistory::clear_undo ()
+{
+ UndoList.clear ();
+}
+
+void
+UndoHistory::clear ()
+{
+ RedoList.clear ();
+ UndoList.clear ();
+}
diff --git a/libs/pbd3/unescape.cc b/libs/pbd3/unescape.cc
new file mode 100644
index 0000000000..2c79740e4a
--- /dev/null
+++ b/libs/pbd3/unescape.cc
@@ -0,0 +1,137 @@
+#include <cstdlib>
+
+#include <pbd/unescape.h>
+
+void
+unescape (char *str)
+
+{
+ char *p;
+ bool escaped;
+ long offset;
+ char octal[4];
+ int noct;
+ char hex[3];
+ int nhex;
+
+ escaped = false;
+ offset = 0;
+ octal[3] = '\0';
+ hex[2] = '\0';
+
+ p = str;
+
+ while (*p) {
+ if (!escaped) {
+ if (*p == '\\') {
+ escaped = true;
+ } else {
+ *(p-offset) = *p;
+ }
+ p++;
+ continue;
+ }
+
+ switch (*p) {
+ case 'f':
+ offset++;
+ *(p-offset) = '\f';
+ break;
+ case 'r':
+ offset++;
+ *(p-offset) = '\r';
+ break;
+
+ case 'v':
+ offset++;
+ *(p-offset) = '\v';
+ break;
+
+ case 'n':
+ offset++;
+ *(p-offset) = '\n';
+ break;
+
+ case 't':
+ offset++;
+ *(p-offset) = '\t';
+ break;
+
+ case 'b':
+ offset++;
+ *(p-offset) = '\b';
+ break;
+
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ noct = 0;
+ while (noct < 3 &&
+ (*p >= '0' && *p <= '7')) {
+ octal[noct++] = *p;
+ offset++;
+ p++;
+ }
+ p--;
+ *(p-offset) = strtol (octal, 0, 8);
+ break;
+
+ case 'x':
+ nhex = 0;
+ p++;
+ offset++;
+
+ while (nhex < 2 &&
+ ((*p >= '0' && *p <= '9') ||
+ (*p >= 'a' && *p <= 'f') ||
+ (*p >= 'A' && *p <= 'F'))) {
+ hex[nhex++] = *p;
+ offset++;
+ p++;
+ }
+ p--;
+ *(p-offset) = strtol (hex, 0, 16);
+ break;
+
+ case '\\':
+ offset++;
+ *(p-offset) = '\\';
+ break;
+
+ case '"':
+ offset++;
+ *(p-offset) = '"';
+ break;
+
+ case '\'':
+ offset++;
+ *(p-offset) = '\'';
+ break;
+
+ default:
+ *(p-offset) = *p;
+ }
+
+ escaped = false;
+ p++;
+ }
+
+ *(p-offset) = '\0';
+}
+
+#ifdef TEST
+#include <cstdio>
+
+main (int argc, char *argv[])
+
+{
+ unescape (argv[1]);
+ printf ("%s\n", argv[1]);
+}
+
+#endif
diff --git a/libs/pbd3/xml++.cc b/libs/pbd3/xml++.cc
new file mode 100644
index 0000000000..2dbf2a861f
--- /dev/null
+++ b/libs/pbd3/xml++.cc
@@ -0,0 +1,416 @@
+/* xml++.cc
+ * libxml++ and this file are copyright (C) 2000 by Ari Johnson, and
+ * are covered by the GNU Lesser General Public License, which should be
+ * included with libxml++ as the file COPYING.
+ */
+
+#include <pbd/xml++.h>
+#include <libxml/debugXML.h>
+
+static XMLNode *readnode(xmlNodePtr);
+static void writenode(xmlDocPtr, XMLNode *, xmlNodePtr, int);
+
+XMLTree::XMLTree()
+ : _filename(),
+ _root(),
+ _compression(0),
+ _initialized(false)
+{
+}
+
+XMLTree::XMLTree(const string &fn)
+ : _filename(fn),
+ _root(0),
+ _compression(0),
+ _initialized(false)
+{
+ read();
+}
+
+XMLTree::XMLTree(const XMLTree * from)
+{
+ _filename = from->filename();
+ _root = new XMLNode(*from->root());
+ _compression = from->compression();
+ _initialized = true;
+}
+
+XMLTree::~XMLTree()
+{
+ if (_initialized && _root)
+ delete _root;
+}
+
+int
+XMLTree::set_compression(int c)
+{
+ if (c > 9)
+ c = 9;
+
+ if (c < 0)
+ c = 0;
+
+ _compression = c;
+
+ return _compression;
+}
+
+bool
+XMLTree::read(void)
+{
+ xmlDocPtr doc;
+
+ if (_root) {
+ delete _root;
+ _root = 0;
+ }
+
+ xmlKeepBlanksDefault(0);
+
+ doc = xmlParseFile(_filename.c_str());
+ if (!doc) {
+ _initialized = false;
+ return false;
+ }
+
+ _root = readnode(xmlDocGetRootElement(doc));
+ xmlFreeDoc(doc);
+ _initialized = true;
+
+ return true;
+}
+
+bool
+XMLTree::read_buffer(const string & buffer)
+{
+ xmlDocPtr doc;
+
+ _filename = "";
+
+ if (_root) {
+ delete _root;
+ _root = 0;
+ }
+
+ doc = xmlParseMemory((char *) buffer.c_str(), buffer.length());
+ if (!doc) {
+ _initialized = false;
+ return false;
+ }
+
+ _root = readnode(xmlDocGetRootElement(doc));
+ xmlFreeDoc(doc);
+ _initialized = true;
+
+ return true;
+}
+
+bool
+XMLTree::write(void) const
+{
+ xmlDocPtr doc;
+ XMLNodeList children;
+ int result;
+
+ xmlKeepBlanksDefault(0);
+ doc = xmlNewDoc((xmlChar *) "1.0");
+ xmlSetDocCompressMode(doc, _compression);
+ writenode(doc, _root, doc->children, 1);
+ result = xmlSaveFormatFile(_filename.c_str(), doc, 1);
+ xmlFreeDoc(doc);
+
+ if (result == -1)
+ return false;
+
+ return true;
+}
+
+void
+XMLTree::debug(FILE* out) const
+{
+ xmlDocPtr doc;
+ XMLNodeList children;
+
+ xmlKeepBlanksDefault(0);
+ doc = xmlNewDoc((xmlChar *) "1.0");
+ xmlSetDocCompressMode(doc, _compression);
+ writenode(doc, _root, doc->children, 1);
+ xmlDebugDumpDocument (out, doc);
+ xmlFreeDoc(doc);
+}
+
+const string &
+XMLTree::write_buffer(void) const
+{
+ static string retval;
+ char *ptr;
+ int len;
+ xmlDocPtr doc;
+ XMLNodeList children;
+
+ xmlKeepBlanksDefault(0);
+ doc = xmlNewDoc((xmlChar *) "1.0");
+ xmlSetDocCompressMode(doc, _compression);
+ writenode(doc, _root, doc->children, 1);
+ xmlDocDumpMemory(doc, (xmlChar **) & ptr, &len);
+ xmlFreeDoc(doc);
+
+ retval = ptr;
+
+ free(ptr);
+
+ return retval;
+}
+
+XMLNode::XMLNode(const string & n)
+ : _name(n), _is_content(false), _content(string())
+{
+
+ if (_name.empty())
+ _initialized = false;
+ else
+ _initialized = true;
+}
+
+XMLNode::XMLNode(const string & n, const string & c)
+ :_name(string()), _is_content(true), _content(c)
+{
+ _initialized = true;
+}
+
+XMLNode::XMLNode(const XMLNode& from)
+ : _initialized(false)
+{
+ XMLPropertyList props;
+ XMLPropertyIterator curprop;
+ XMLNodeList nodes;
+ XMLNodeIterator curnode;
+
+ _name = from.name();
+ set_content(from.content());
+
+ props = from.properties();
+ for (curprop = props.begin(); curprop != props.end(); curprop++)
+ add_property((*curprop)->name(), (*curprop)->value());
+
+ nodes = from.children();
+ for (curnode = nodes.begin(); curnode != nodes.end(); curnode++)
+ add_child_copy(**curnode);
+}
+
+XMLNode::~XMLNode()
+{
+ XMLNodeIterator curchild;
+ XMLPropertyIterator curprop;
+
+ for (curchild = _children.begin(); curchild != _children.end();
+ curchild++)
+ delete *curchild;
+
+ for (curprop = _proplist.begin(); curprop != _proplist.end();
+ curprop++)
+ delete *curprop;
+}
+
+const string &
+XMLNode::set_content(const string & c)
+{
+ if (c.empty())
+ _is_content = false;
+ else
+ _is_content = true;
+
+ _content = c;
+
+ return _content;
+}
+
+const XMLNodeList &
+XMLNode::children(const string & n) const
+{
+ static XMLNodeList retval;
+ XMLNodeConstIterator cur;
+
+ if (n.length() == 0)
+ return _children;
+
+ retval.erase(retval.begin(), retval.end());
+
+ for (cur = _children.begin(); cur != _children.end(); cur++)
+ if ((*cur)->name() == n)
+ retval.insert(retval.end(), *cur);
+
+ return retval;
+}
+
+XMLNode *
+XMLNode::add_child(const string & n)
+{
+ return add_child_copy(XMLNode (n));
+}
+
+void
+XMLNode::add_child_nocopy (XMLNode& n)
+{
+ _children.insert(_children.end(), &n);
+}
+
+XMLNode *
+XMLNode::add_child_copy(const XMLNode& n)
+{
+ XMLNode *copy = new XMLNode (n);
+ _children.insert(_children.end(), copy);
+ return copy;
+}
+
+XMLNode *
+XMLNode::add_content(const string & c)
+{
+ return add_child_copy(XMLNode (string(), c));
+}
+
+XMLProperty *
+XMLNode::property(const string & n)
+{
+ if (_propmap.find(n) == _propmap.end())
+ return 0;
+ return _propmap[n];
+}
+
+XMLProperty *
+XMLNode::add_property(const string & n, const string & v)
+{
+ if(_propmap.find(n) != _propmap.end()){
+ remove_property(n);
+ }
+
+ XMLProperty *tmp = new XMLProperty(n, v);
+
+ if (!tmp)
+ return 0;
+
+ _propmap[tmp->name()] = tmp;
+ _proplist.insert(_proplist.end(), tmp);
+
+ return tmp;
+}
+
+void
+XMLNode::remove_property(const string & n)
+{
+ if (_propmap.find(n) != _propmap.end()) {
+ _proplist.remove(_propmap[n]);
+ _propmap.erase(n);
+ }
+}
+
+void
+XMLNode::remove_nodes(const string & n)
+{
+ XMLNodeIterator i = _children.begin();
+ XMLNodeIterator tmp;
+
+ while (i != _children.end()) {
+ tmp = i;
+ ++tmp;
+ if ((*i)->name() == n) {
+ _children.erase (i);
+ }
+ i = tmp;
+ }
+}
+
+void
+XMLNode::remove_nodes_and_delete(const string & n)
+{
+ XMLNodeIterator i = _children.begin();
+ XMLNodeIterator tmp;
+
+ while (i != _children.end()) {
+ tmp = i;
+ ++tmp;
+ if ((*i)->name() == n) {
+ delete *i;
+ _children.erase (i);
+ }
+ i = tmp;
+ }
+}
+
+XMLProperty::XMLProperty(const string &n, const string &v)
+ : _name(n),
+ _value(v)
+{
+}
+
+XMLProperty::~XMLProperty()
+{
+}
+
+static XMLNode *
+readnode(xmlNodePtr node)
+{
+ string name, content;
+ xmlNodePtr child;
+ XMLNode *tmp;
+ xmlAttrPtr attr;
+
+ if (node->name)
+ name = (char *) node->name;
+ else
+ name = string();
+
+ tmp = new XMLNode(name);
+
+ for (attr = node->properties; attr; attr = attr->next) {
+ name = (char *) attr->name;
+ content = "";
+ if (attr->children)
+ content = (char *) attr->children->content;
+ tmp->add_property(name, content);
+ }
+
+ if (node->content)
+ tmp->set_content((char *) node->content);
+ else
+ tmp->set_content(string());
+
+ for (child = node->children; child; child = child->next)
+ tmp->add_child_nocopy (*readnode(child));
+
+ return tmp;
+}
+
+static void
+writenode(xmlDocPtr doc, XMLNode * n, xmlNodePtr p, int root =
+ 0)
+{
+ XMLPropertyList props;
+ XMLPropertyIterator curprop;
+ XMLNodeList children;
+ XMLNodeIterator curchild;
+ xmlNodePtr node;
+
+ if (root)
+ node = doc->children =
+ xmlNewDocNode(doc, 0, (xmlChar *) n->name().c_str(), 0);
+
+ else
+ node = xmlNewChild(p, 0, (xmlChar *) n->name().c_str(), 0);
+
+ if (n->is_content()) {
+ node->type = XML_TEXT_NODE;
+ xmlNodeSetContentLen(node, (const xmlChar *) n->content().c_str(),
+ n->content().length());
+ }
+
+ props = n->properties();
+ for (curprop = props.begin(); curprop != props.end(); curprop++)
+ xmlSetProp(node, (xmlChar *) (*curprop)->name().c_str(),
+ (xmlChar *) (*curprop)->value().c_str());
+
+ children = n->children();
+ for (curchild = children.begin(); curchild != children.end();
+ curchild++)
+ writenode(doc, *curchild, node);
+}
diff --git a/libs/sigc++2/.cvsignore b/libs/sigc++2/.cvsignore
new file mode 100644
index 0000000000..d505773e75
--- /dev/null
+++ b/libs/sigc++2/.cvsignore
@@ -0,0 +1,18 @@
+Makefile
+Makefile.in
+aclocal.m4
+autom4te.cache
+config.guess
+config.log
+config.status
+config.sub
+depcomp
+install-sh
+libsigc++-2.0.spec
+libtool
+ltmain.sh
+missing
+sigc++-2.0.pc
+stamp-h1
+configure
+sigc++config.h
diff --git a/libs/sigc++2/AUTHORS b/libs/sigc++2/AUTHORS
new file mode 100644
index 0000000000..000671ac0a
--- /dev/null
+++ b/libs/sigc++2/AUTHORS
@@ -0,0 +1,8 @@
+Martin Schulze <mschulze@cvs.gnome.org>
+Murray Cumming <murrayc@murrayc.com>
+Cedric Gustin <cedric.gustin@swing.be> (win32 support)
+Timothy M. Shead <tshead@k-3d.com> and James Lin <jameslin@vmware.com> (MSVC support)
+Damien Carbery <Damien.Carbery@Sun.COM> (Sun FORTE C++ support)
+Takashi Takekawa <takekawa@users.sourceforge.jp> (Intel C++ support)
+Andreas Rottmann <rottmann@users.sourceforge.net> (make system)
+Karl Einar Nelson <kenelson@ece.ucdavis.edu> (initial version 1.9.4)
diff --git a/libs/sigc++2/COPYING b/libs/sigc++2/COPYING
new file mode 100644
index 0000000000..c4792dd27a
--- /dev/null
+++ b/libs/sigc++2/COPYING
@@ -0,0 +1,515 @@
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations
+below.
+
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+^L
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it
+becomes
+a de-facto standard. To achieve this, non-free programs must be
+allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+^L
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control
+compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+^L
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+^L
+ 6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ d) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ e) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+^L
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+^L
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply, and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License
+may add an explicit geographical distribution limitation excluding those
+countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+^L
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+^L
+ How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms
+of the ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library.
+It is safest to attach them to the start of each source file to most
+effectively convey the exclusion of warranty; and each file should
+have at least the "copyright" line and a pointer to where the full
+notice is found.
+
+
+ <one line to give the library's name and a brief idea of what it
+does.>
+ Copyright (C) <year> <name of author>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+Also add information on how to contact you by electronic and paper
+mail.
+
+You should also get your employer (if you work as a programmer) or
+your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James
+Random Hacker.
+
+ <signature of Ty Coon>, 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
+
+
diff --git a/libs/sigc++2/ChangeLog b/libs/sigc++2/ChangeLog
new file mode 100644
index 0000000000..8e02aef058
--- /dev/null
+++ b/libs/sigc++2/ChangeLog
@@ -0,0 +1,1249 @@
+2004-10-12 Martin Schulze <mschulze@cvs.gnome.org>
+
+ * MSVC_Net2003/*/*.vcproj, MSVC_Net2003/blank.cpp: Fix project files
+ to compile out-of-the-box and add dummy file so that .cc files get
+ recognized as c++ code files (patch from Timothy M. Shead).
+
+2004-10-10 Martin Schulze <mschulze@cvs.gnome.org>
+
+ * sigc++/signal_base.{h,cc}, sigc++/functors/slot_base.{h,cc},
+ sigc++/functors/macros/slot.h.m4: If SIGC_NEW_DELETE_IN_LIBRARY_ONLY
+ is defined, implement signal_base::operator new/delete and
+ slot_rep::operator new/delete (suggested by Timothy M. Shead).
+ Remove old work-around from 2004-10-02 since it didn't work.
+
+2004-10-07 Martin Schulze <mschulze@cvs.gnome.org>
+
+ * configure.ac: Update for libtool 1.5a (with support for Intel C++).
+ * MSVC_Net2003/sigc++config.h: Remove bogus '#define'
+ (reported by Timothy M. Shead <tshead@k-3d.com>).
+
+2004-10-02 Martin Schulze <mschulze@cvs.gnome.org>
+
+ * configure.ac: Bump version number to 2.0.6.
+ * NEWS: Add ChangeLog summary for version 2.0.6.
+
+2004-10-02 Martin Schulze <mschulze@cvs.gnome.org>
+
+ * sigc++/functors/slot_base.{h,cc}, sigc++/functors/macros/slot.h.m4:
+ Rename (typed_)slot_rep::detach to (typed_)slot_rep::destroy.
+ Call the dtor of the functor stored in typed_slot_rep from destroy().
+ A cleaner solution would be to add an additional "virtual" function
+ that calls 'delete' or a real virtual dtor. However, this would be
+ less efficient and might break the ABI. (Fixes #152323.)
+
+2004-10-02 Martin Schulze <mschulze@cvs.gnome.org>
+
+ * sigc++config.h.in, MSVC_Net2003/sigc++config.h,
+ sigc++/signal_base.cc, sigc++/functors/slot_base.{h,cc},
+ sigc++/functors/macros/slot.h.m4: Define and use new macro
+ SIGC_NEW_DELETE_IN_LIBRARY_ONLY to ABI-compatibly move
+ all calls to new and delete into non-inline library code.
+
+2004-09-26 Martin Schulze <mschulze@cvs.gnome.org>
+
+ * sigc++/adaptors/lambda/macros/group.h.m4: Add a missing
+ template keyword in the definition of deduce_result_type::type
+ (hopefully fixes #152327).
+
+2004-09-26 Martin Schulze <mschulze@cvs.gnome.org>
+
+ * sigc++/macros/object_slot.h.m4: Use correct bound_mem_functor
+ variants for const (volatile) methods (fixes #148744).
+
+2004-09-01 Martin Schulze <mschulze@cvs.gnome.org>
+
+ * docs/index.html: Correct link to lambda module.
+
+2004-09-01 Martin Schulze <mschulze@cvs.gnome.org>
+
+ * README: Update compatibility section.
+
+2.0.5:
+
+2004-09-01 Martin Schulze <mschulze@cvs.gnome.org>
+
+ * MSVC_Net2003/Makefile.am: Add sigc++config.h to EXTRA_DIST.
+ * configure.ac: Bump version number to 2.0.5.
+ * NEWS: Add ChangeLog summary for version 2.0.5.
+
+2.0.4:
+
+2004-08-21 Martin Schulze <mschulze@cvs.gnome.org>
+
+ * tests/test_lambda.cc: Use sigc::var("\n") instead of sigc::ref("\n").
+ Comment out the affected lines, nevertheless.
+ Sun FORTE and Compaq C++ can handle neither sigc::ref("\n") nor
+ sigc::var("\n"). I see more chances fixing sigc::var("\n").
+ * sigc++/adaptors/lambda/macros/base.h.m4: Add a comment about a
+ possible work around for sigc::var("\n") compiler problems.
+ * tests/test_compatibility.cc: Remove a 'const' keyword that prevents
+ the test case from compiling with the Sun FORTE.
+ * tests/test_trackable.cc: Remove a 'virtual' keyword and an unused
+ variable to avoid compiler warnings.
+ * NEWS: Add ChangeLog summary for version 2.0.4.
+
+2004-08-03 Martin Schulze <mschulze@cvs.gnome.org>
+
+ * scripts/cxx.m4, sigc++config.h.in, configure.ac,
+ sigc++/adaptors/lambda/macros/operator.h.m4, tests/test_lambda.cc:
+ Rollback change from 2004-07-15: configure check
+ SIGC_OPERATOR_OVERLOAD_AMBIGUITY is not needed - the overload
+ ambiguity doesn't occur if the lambda operators take all arguments
+ as const reference.
+ * configure.ac: Bump version number to 2.0.4.
+
+2004-08-03 James Lin <slimjimmy@mail.com>
+
+ * Added SIGC_API qualifier to all externally-visible non-template
+ classes/structs.
+ * Added #include <sigc++config.h> to the files that use SIGC_API.
+ * Added empty SIGC_API definition to sigc++config.h.in for non-MSVC
+ compilers. I'm not sure if this is the right place to put this
+ (probably not).
+ * Added MSVC-specific sigc++config.h to the MSVC project directory.
+ (The comment in it probably should be edited.)
+ * Changed MSVC project settings to output a multi-threaded DLL, set
+ the include paths to work (hopefully) out-of-the-box. Disabled
+ precompiled headers, since they just complicate things and
+ shouldn't be necessary for such a relatively project.
+
+2004-08-01 Martin Schulze <mschulze@cvs.gnome.org>
+
+ * sigc++/type_traits.h: Remove type_trait<>::instance()
+ (was unimplemented and unused; caused problems with the MSVC).
+
+2004-07-23 Martin Schulze <mschulze@cvs.gnome.org>
+
+ * Makefile.am: Fix typo concerning distribution of libsigc++-2.0.spec.
+ * AUTHORS: Mention our contributors for platforms Sun FORTE and Intel C++.
+
+2004-07-15 Martin Schulze <mschulze@cvs.gnome.org>
+
+ * *.h.m4: Don't call operator()() in sun_forte_workaround(); rather copy
+ operator()(). Calling operator()() makes a copy of the arguments causing
+ wrong results if an argument type is a reference. Hopefully fixes #147311.
+
+2004-07-15 Martin Schulze <mschulze@cvs.gnome.org>
+
+ * tests/test_lambda.cc: Break "std::cout << [expr] << a << std::endl;"
+ into "std::cout << [expr]; std::cout << a << std::endl;".
+ I hope this fixes #147313 where the right values for "[expr]" but wrong
+ values for "a" were written to std::cout for some compiler with optimizations
+ turned off.
+
+2004-07-15 Martin Schulze <mschulze@cvs.gnome.org>
+
+ * sigc++/adaptors/lambda/macros/operator.h.m4: Correct return type deduction
+ of lambda expressions in lambda_operator*::operator()(). Might be related to
+ bug #147313.
+ * sigc++/adaptors/lambda/macros/group.h.m4: Use m4 macro _P_().
+
+2004-07-15 Martin Schulze <mschulze@cvs.gnome.org>
+
+ * scripts/cxx.m4, sigc++config.h.in, configure.ac,
+ sigc++/adaptors/lambda/macros/operator.h.m4, tests/test_lambda.cc:
+ Add configure check SIGC_OPERATOR_OVERLOAD_AMBIGUITY for a SUN FORTE
+ compiler problem (bug #147391). Use it to decide whether the lambda
+ action operators may be overloaded (not doing so restricts the API slightly).
+ * sigc++/adaptors/lambda/macros/operator.h.m4: Add some doxygen comments
+ and remove attic code.
+ * sigc++/adaptors/lambda/macros/base.h.m4:
+ Add templates unwrap_lambda_type and unwrap_lambda_value() to support
+ the non-overloaded lambda action operators. Also add some doxygen comments
+ and remove attic code.
+ * sigc++/adaptors/lambda/macros/group.h.m4: Fix a bug that resulted in
+ gargabe values being passed on to the functor contained in the group adaptor
+ (partly fixes #147313).
+
+2004-07-11 Martin Schulze <mschulze@cvs.gnome.org>
+
+ * scripts/cxx.m4, sigc++config.h.in, configure.ac, *.h.m4:
+ Split SIGC_CXX_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ into SIGC_CXX_GCC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ and SIGC_CXX_MSVC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD.
+ Remove LIBSIGC_TEMPLATE_PREFIX. Add template keyword to
+ SIGC_WORKAROUND_OPERATOR_PARENTHESES depending on the configure checks.
+ Should fix the compiler problems with MSVC.
+
+2004-07-11 Martin Schulze <mschulze@cvs.gnome.org>
+
+ * examples/hello_world.cc: Use sigc::ptr_fun instead of std::ptr_fun.
+ (fixes bug #144846)
+
+2004-07-11 Eric Bourque <ericb@computer.org>
+
+ * libsigc++-2.0.spec.in: new file
+ * configure.ac : patched generate spec file
+ * .cvsignore: ignore generated file (Martin Schulze)
+ * Makefile.am: distribute spec file (Martin Schulze)
+
+2004-07-11 Murray Cumming <murrayc@murrayc.com>
+
+ * sigc++/connection.cc: Added some comments.
+ * sigc++/trackable.cc: operator=(): Check for self-asignment, though I
+ do not know of any actual bug that this fixes. Added some comments.
+ * sigc++/trackable.h Added some doxygen documentation.
+
+2004-07-09 Murray Cumming <murrayc@murrayc.com>
+
+ * tests/: Added test_disconnect_during_emit.cc, to prove that this
+ works.
+
+2004-07-08 Murray Cumming <murrayc@murrayc.com>
+
+ * tests/test_retype_return.cc: foo::operator(int): return a
+ value. The SUN Forte 5.5 compiler complains about this, as it should.
+
+2004-07-08 Murray Cumming <murrayc@murrayc.com>
+
+ * sigc++/macros/signal.h.m4: class signal*: Rename the slot_list
+ typedef to slot_list_type, because there is already a template class
+ called slot_type. SUN Forte 5.5 seems to complain about this and I am
+ not surprised. The old typdef is still there for backwards
+ compatibility, except when building with SUN Forte.
+
+2004-07-07 Murray Cumming <murrayc@murrayc.com>
+
+ * scripts/cxx.m4: SIGC_CXX_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD():
+ Don't define the SIGC_TEMPLATE_SPECIALIZATOIN_OPERATOR_OVERLOAD C
+ macro at all if the test fails. This might fix the build on SUN Forte.
+ * sigc++/functors/macros/mem_fun.h.m4: Default constructor: Initialize
+ the func_ptr_ member variable. I have no evidence that this solves any
+ problems, but it worried me.
+ * sigc++/functors/slot_base.h: operator bool(): Correct documentation,
+ to use @code instead of <code>
+ * sigc++/macros/signal.h.m4: Remove the documentation for the
+ parameters named first and last, because they do not exist.
+
+2004-05-31 Martin Schulze <mschulze@cvs.gnome.org>
+
+ * autogen.sh: Add '--force'-flag to the 'libtoolize'-command (bug #143425).
+
+2.0.3:
+
+2004-05-30 Martin Schulze <mschulze@cvs.gnome.org>
+
+ * configure.ac: Bump version number to 2.0.3.
+ * NEWS: Add ChangeLog summary for version 2.0.3.
+ * sigc++/macros/signal.h.m4: Fix segfault on emission of unconnected signal.
+ * tests/test_signal.cc, tests/test_accumulated.cc: Emit unconnected signal.
+ * sigc++/macros/object_slot.h.m4: Suppress compiler warning at
+ dynamic_cast<>-test (tested by Christof Petig/Timothy M. Shead).
+
+2.0.2:
+
+2004-05-22 Martin Schulze <mschulze@cvs.gnome.org>
+
+ * configure.ac: Bump version number to 2.0.2.
+ * NEWS: Add ChangeLog summary for version 2.0.2.
+
+2004-05-20 Martin Schulze <mschulze@cvs.gnome.org>
+
+ * sigc++/macros/signal.h.m4: If a custom accumulator is specified
+ invoke it on signal emission even if the signal's slot list is empty.
+ (This used to be the case in libsigc++-1.2 as pointed out by Timothy.)
+
+2004-05-20 Martin Schulze <mschulze@cvs.gnome.org>
+
+ * sigc++/macros/object_slot.h.m4: Suppress compiler warning at
+ dynamic_cast<>-test (suggested by Timothy M. Shead).
+
+2004-05-01 Martin Schulze <mschulze@cvs.gnome.org>
+
+ * README: Updated for libsigc++-2.0.
+
+2.0.1:
+
+2004-04-27 Martin Schulze <mschulze@cvs.gnome.org>
+
+ * configure.ac: Bump version number to 2.0.1.
+ * NEWS: Add ChangeLog summary for version 2.0.1.
+ * sigc++/adaptors/lambda/macros/base.h.m4: Fixed documentation.
+ * sigc++/adaptors/macros/bind.h.m4: Hide work-arounds from doxygen.
+ * scripts/cxx.m4, sigc++config.h.in, configure.ac,
+ sigc++/adaptors/macros/bind.h.m4: Removed configure check. It
+ showed that the Apple gcc can also compile the sophisticated version
+ of the work-around.
+
+2004-04-26 Martin Schulze <mschulze@cvs.gnome.org>
+
+ * sigc++/macros/object_slot.h.m4: Modified test for SigC::Object
+ inheritance so that it also works if SigC::Object is virtual base.
+ (Fixes bug 141094 reported by Jonathan Brandmeyer)
+
+2004-04-26 Martin Schulze <mschulze@cvs.gnome.org>
+
+ * scripts/cxx.m4: Updated the configure check. It would probably
+ have succeeded on the Apple.
+
+2004-04-26 Martin Schulze <mschulze@cvs.gnome.org>
+
+ * sigc++/adaptors/macros/bind.h.m4: Add work-arounds for
+ bind<-1>::deduce_result_type compilation error on Apple gcc 3.3.
+ * scripts/cxx.m4, sigc++config.h.in, configure.ac: Add configure
+ check for the compilation error above.
+ * sigc++/adaptors/lambda/macros/operator.h.m4: Replace _A with
+ _Aa. _A is a reserved keyword on Apple gcc 3.3 (Spundun Bhatt).
+ (fixes bug #10444 reported by Spundun Bhatt)
+
+2004-04-19 Martin Schulze <mschulze@cvs.gnome.org>
+
+ * sigc++/signal_base.cc: Fixed serious bug in signal_base::impl():
+ Only reference a newly created object (initial reference).
+ (This fixes bug #140269 reported by Andris.)
+
+2004-04-19 Murray Cumming <murrayc@murrayc.com>
+
+ * scripts/cxx.m4: Updated the operator() template check, because it
+ failed with gcc 3.4 (from cvs). Apparently the template keyword can
+ only be used from another template.
+
+2.0.0:
+
+2004-04-06 Martin Schulze <mschulze@cvs.gnome.org>
+
+ * configure.ac: Bump version number to 2.0.0.
+ * NEWS: Add ChangeLog summary for version 2.0.0.
+ * TODO, AUTHORS: Bring up to date.
+ * sigc++-2.0.pc.in, Makefile.am: 1.9 -> 2.0
+ * Added more documentation.
+
+2004-04-10 Murray Cumming <murrayc@murrayc.com>
+
+ * sigc++/connection.[h|cc]: Implement blocked() to avoid undefined
+ symbol linker error.
+
+2004-04-08 Murray Cumming <murrayc@murrayc.com>
+
+ * dist the scripts directory.
+
+1.9.16:
+
+2004-04-06 Martin Schulze <teebaum@cvs.gnome.org>
+
+ * configure.ac: Bump version number to 1.9.16.
+ * NEWS: Add ChangeLog summary for version 1.9.16.
+
+2004-04-02 Murray Cumming <murrayc@murrayc.com>
+
+ * sigc++/connection.cc: Make block() and unblock() always return a
+ value, to fix compiler warnings. Patch from bug #138620 by
+ Alexander Nedotsukov.
+
+2004-04-02 Murray Cumming <murrayc@murrayc.com>
+
+ * Fix the compile of examples/member_method.cc. Bug #131701 from
+ Kirill Smelkov. I also made the examples build as part of the regular
+ build.
+
+2004-04-02 Murray Cumming <murrayc@murrayc.com>
+
+ * sigc++config.h.m4: Remove every undef apart from the one we need, to
+ avoid clashes, because we #include this in a public header.
+
+2004-03-25 Murray Cumming <murrayc@murrayc.com>
+
+ * scripts/cxx.m4, configure.in, sigc++config.h.in: Rename the
+ template_keyword check to template_specialization, because the problem
+ is with or without the keyword.
+ * sigc++/adaptors/macros/adaptor_trait.h.m4: Define
+ SIGC_WORKAROUND_OPERATOR_PARENTHESES, which calls either operator() or
+ sun_forte_workaround() depending on the result of the compiler test.
+ * many .m4 files: Add sun_forte_workaround methods that call the
+ operator() methods. Put them in #ifdefs so that only SUN Forte C++
+ sees them.
+
+2004-03-22 Murray Cumming <murrayc@murrayc.com>
+
+ * Makefile.am, sigc++/Makfile.am: Fix the sigc++config.h.in disting,
+ to fix make distcheck.
+
+2004-03-21 Murray Cumming <murrayc@murrayc.com>
+
+ * Rename config.h.in to sigc++config.h.in so that gtkmm does not
+ include some other config.h at strange times - fixes a problem in
+ the gtkmm demos. This should really be in the sigc++ directory, but
+ that seems to add that as an include path, which causes the STL
+ headers to include sigc++/signal.h instead of some STL signal.h header.
+
+2004-03-20 Murray Cumming <murrayc@murrayc.com>
+
+ * Makefile.am: Install the config.h platform-specific header.
+ * sigc++-2.0.pc.in: Report the include path for config.h
+
+2004-03-20 Murray Cumming <murrayc@murrayc.com>
+
+ * Added config.h.in, using autoheader, from which config.h will be
+ generated, so we can detect compiler features.
+ * configure.ac: Added AC_CONFIG_HEADER(config.h) to generate config.h
+ from config.h.in.
+ * scripts/cxx.m4: Added this directory and file, with a
+ SIGC_CXX_TEMPLATE_KEYWORD_OPERATOR_OVERLOAD macro that defines
+ the SIGC_TEMPLATE_KEYWORD_OPERATOR_OVERLOAD C macro.
+ * autogen.sh: Added -I scripts to the aclocal call, so that it finds
+ the m4 macro for configure.ac.
+ * sigc++/adapators/macros/adaptor_trait.h.m4: Include config.h and
+ use SIGC_TEMPLATE_KEYOWRD_OPERATOR_OVERLOAD.
+
+2004-03-18 Martin Schulze <mschulze@cvs.gnome.org>
+
+ * tests/test_mem_fun.cc, tests/test_ptr_fun.cc: Don't test
+ making functors from overloaded methods with partial template
+ specialization. Not portable among different compilers (SUN FORTE).
+ * adaptors/macros/apdaptor_trait.h.m4: Only gcc seems to use the
+ notation A.template operator()<...>(...) => adapt preprocessor check
+ for #define LIBSIGC_TEMPLATE_PREFIX. TODO: replace with configure check.
+
+2004-03-13 Murray Cumming <murrayc@murrayc.com>
+
+ * g++ 3.4 (pre-release) build fixes:
+ * sigc++/macros/signal.h.m4: slot_iterator_buf::operator*():
+ Use blocked() and empty() instead of non-existant blocked_and_empty().
+ * sigc++/functors/macros/mem_fun.h.m4: memfun_functor*::operator()():
+ Use this->func_ptr_ instead of just func_ptr_.
+ * sigc++/adaptors/macros/deduce_result_type.h.m4: Use
+ T_functor::template deduce_result_type<> instead of just
+ T_functor::deduce_result_type<>.
+ * sigc++/adaptors/lambda/macros/base.h.m4, operator.h.m4, group.h.m4::
+ Use template keyword again. operator[](): Use this->value_ instead of
+ just value_.
+ * sigc++/adaptors/lambda/macros/bind/m4: Use template keyword, and
+ this-> again.
+ * sigc++/adaptors/macros/compose.h.m4, hide.h.m4, bind_return.h.m4,
+ exception_catch.h.m4:
+ rettype.h.m4, rettype_return.h.m4: Use template keyword,and this-> again
+
+1.9.15:
+
+2004-02-27 Martin Schulze <teebaum@cvs.gnome.org>
+
+ * configure.ac: Bump version number to 1.9.15.
+ * NEWS: Add ChangeLog summary for version 1.9.15.
+
+2004-02-27 Martin Schulze <teebaum@cvs.gnome.org>
+
+ * sigc++/functors/macros/slot.h.m4: Make the unnumbered slot templates'
+ copy ctors use the copy ctors of the base class. Fixes bug #24698.
+ * tests/test_slot.cc: Test copy ctor (Bryan Forbes).
+
+2004-02-27 Martin Schulze <teebaum@cvs.gnome.org>
+
+ * tests/type_functor_trait.cc: Bring it up-to-date (use sigc::ref).
+ Make it work with the SUN Forte.
+
+2004-02-24 Martin Schulze <teebaum@cvs.gnome.org>
+
+ * sigc++/type_traits.h: Make is_base_and_derived<> work with the SUN Forte.
+
+2004-02-19 Martin Schulze <teebaum@cvs.gnome.org>
+
+ * sigc++/type_traits.h: Make is_base_and_derived<> platform independant.
+ * sigc++/adaptors/lambda/macros/base.h.m4: Make lambda_core<> ctors
+ explicit. Remove an unused ctor from lambda_core<T_type, true>.
+
+2004-02-14 Martin Schulze <teebaum@cvs.gnome.org>
+
+ * sigc++/functors/slot_base.h, sigc++/functors/macros/slot.h.m4:
+ Move some documentation to slot_base.h.
+ * sigc++/signal_base.h, sigc++/macros/signal.h.m4:
+ Move some documentation to signal_base.h.
+
+ API addition:
+ * sigc++/functors/macros/slot.h.m4: Add numbered slot# templates.
+ Make unnumbered slot templates inherit from slot#.
+
+ API change:
+ * sigc++/functors/macros/mem_fun.h.m4: Allow for methods of the object's
+ base types to be passed into sigc::mem_fun(). (Used to be the case in
+ libsigc++-1.2).
+
+2004-02-13 Murray Cumming <murrayc@usa.net>
+
+ * sigc++/functors/slot_base.[h|cc], sigc++/trackable.[h|cc]: Create
+ and use a typedef for the destroy_notify callback functions, to avoid
+ confusion function pointer declaration syntax in the API.
+
+2004-02-13 Murray Cumming <murrayc@murrayc.com>
+
+ * Moved implementation to .cc files:
+ * sigc++/functors/: Added slot_base.[h|cc] which contains non-template
+ code that was previsouly in the generated functors/slot.h and
+ non-generated slot.cc files. All non-inline implementation is now in
+ the .cc file.
+ * sigc++/functors/macros/slot.m4: Removed the code that has been moved
+ to slot_base.[h|cc].
+ * sigc++/: Added signal_base.[h|cc] which contains non-template code
+ that was previously in the generated signal.h and non-generated
+ signal.cc file. All non-inline implementation is now in the .cc file.
+ * sigc++/macros/signal.m4: Removed the code that ahs been moved to
+ signal.cc
+ * sigc++/connector.[h|cc]: method implementation moved to the .cc file.
+
+1.9.14:
+
+2004-02-13 Martin Schulze <teebaum@cvs.gnome.org>
+
+ * configure.ac: Bump version number to 1.9.14.
+ * NEWS: Add ChangeLog summary for version 1.9.14.
+
+2004-02-09 Murray Cumming <murrayc@usa.net>
+
+ * sigc++/functors/macros/slot.h.m4: slot_base: Added operator bool(), needed to
+ check for a slot that is created with the default constructor. This was
+ present in libsigc++ 1.2 also.
+
+2004-02-06 Murray Cumming <murrayc@usa.net>
+
+ * Makefile.am: Build the docs directory, by adding it to SUBDIRS.
+ * docs/Doxyfile.in: Updated to be more glibmm-like.
+ * Added some @deprecated doxygen bits.
+ * sigc++/macros/signal.h.m4: Call base constructor from signal_base
+ constructor - this is an error-as-warning when building gtkmm.
+
+1.9.13:
+
+2003-11-30 Martin Schulze <teebaum@cvs.gnome.org>
+
+ * configure.ac: Bump version number to 1.9.13.
+ * NEWS: Add ChangeLog summary for version 1.9.13.
+ * Makefile.am, MSVC_Net2003/Makefile.am, configure.ac:
+ Distribute MS .Net project files.
+ * sigc++/adaptors/macros/[bind,hide].h.m4: Correct and add
+ documentation. Make hide_functor ctor explicit.
+
+2003-11-11 Martin Schulze <teebaum@cvs.gnome.org>
+
+ * sigc++/adaptors/macros/[bind,hide].h.m4: Change to zero-based
+ argument index in numbered bind() and hide() overload
+ (Agreement on the mailing list).
+ Support binding up to CALL_SIZE arguments with one bind adaptor.
+ (Requested by joey yandle and others).
+ Only support binding of multiple arguments in unnumberd overloads
+ to keep the API simple (Requested by Murray Cumming).
+ * tests/test_[bind,hide,functor_trait].cc, sigc++/bind.h:
+ Reflect API changes in compatibility module and test cases.
+
+2003-11-10 Martin Schulze <teebaum@cvs.gnome.org>
+
+ * sigc++/adaptors/macros/[bind,hide].h.m4: Add unnumbered
+ bind() and hide() overloads to make specifying the argument
+ position optional (Proposed by Jeff Franks).
+ * tests/test_[bind,hide].cc: Test unnumbered bind() and hide().
+ * sigc++/adaptors/macros/adaptor_trait.h.m4:
+ Change "#ifdef MSVC" to "#ifdef _MSC_VER" (Roel Vanhout).
+
+2003-11-09 Martin Schulze <teebaum@cvs.gnome.org>
+
+ * sigc++/functors/macros/slot.h.m4: Change functor type in
+ typed_slot_rep to adaptor_trait::adaptor_type<T_functor>
+ and use explicit function template instantiation in
+ internal::slot_call::call_it(). Avoids copying of arguments
+ in call_it() and enables binding of object instances
+ to class methods through bind() (Reported by Jeff Franks).
+ * tests/test_bind.cc: Test binding object instances to
+ class methods through bind().
+ * sigc++/adaptors/adaptors.h: Include retype[_result].h.
+ * sigc++/adaptors/macros/adaptor_trait.h.m4:
+ - Add documentation.
+ - Mark some c-tors as explicit.
+ - Remove ununsed operator T_functor&() from adaptor_functor.
+ * sigc++/adaptors/macros/deduce_result_type.h.m4:
+ Rewrite parts of the documentation.
+ * sigc++/adaptors/macros/bind.h.m4: Add documentation.
+ * sigc++/functors/macros/mem_fun.h.m4: Remove unnecessary
+ explicit markers. Minor fixes to documentation.
+ * sigc++/functors/macros/functor_trait.h.m4:
+ Minor fixes to documentation.
+
+1.9.12:
+
+2003-11-04 Martin Schulze <teebaum@cvs.gnome.org>
+
+ * configure.ac: Bump version number to 1.9.12.
+ * NEWS: Add ChangeLog summary for version 1.9.12.
+
+2003-11-03 Martin Schulze <teebaum@cvs.gnome.org>
+
+ * sigc++/macros/signal.h.m4: Document accumulators.
+ Move slot_iterator_buf into namespace internal. Since
+ accumulators have the iterator type as a template argument
+ there is no need to expose this very internal type.
+ * sigc++/functors/macros/*.m4: Regroup documentation.
+ Documentation of the core parts of the library should be
+ complete by now.
+
+2003-11-02 Martin Schulze <teebaum@cvs.gnome.org>
+
+ * Improve documentation of the core parts of the library.
+ * tests/test_ptr_fun.cc: Test ptr_fun() with static
+ member functions.
+
+2003-11-02 Martin Schulze <teebaum@cvs.gnome.org>
+
+ * Move all .m4 files into new subdirectories
+ sigc++/[...]/macros. Install the .m4 files on
+ "make install" (Reported by Ron Steinke).
+
+2003-11-01 Martin Schulze <teebaum@cvs.gnome.org>
+
+ * sigc++/[class,method,object]_slot.h.m4: Include
+ sigc++/functors/mem_fun.h (Reported by Ron Steinke).
+
+2003-11-01 Martin Schulze <teebaum@cvs.gnome.org>
+
+ * sigc++/adaptors/lambda/operator.h.m4: Add negation
+ operator I have completely overlooked until now.
+ * sigc++/tests/test_lambda.cc: Test negation operator.
+
+2003-11-01 Martin Schulze <teebaum@cvs.gnome.org>
+
+ * sigc++/[class_slot,method_slot,object_slot,hide].h.m4,
+ sigc++/signal.h.m4, sigc++/functors/mem_fun.h.m4:
+ - Use a shorter notation for ..._mem_function variants.
+ - Change order of mem_funcotr<>'s template arguments to
+ match std::mem_fun_t and to be more consistent with adaptors.
+ - Use ::sigc::slot's implicit ctor in compatibility module.
+ * sigc++/adaptors/lambda/operator.h.m4: Change some
+ lambda action names to match action names in std.
+
+ API addition:
+ * sigc++/adaptors/retype.h.m4: New file adding
+ adaptor retype.
+ * sigc++/Makefile.am: Build and distribute new file.
+ * tests/test_retype.cc: New file testing adaptor retype.
+ * MSVC_Net2003/tests/test_retype/test_reytype.vcproj,
+ tests/Makefile.am: Build and distribute new test case.
+
+2003-11-01 Martin Schulze <teebaum@cvs.gnome.org>
+
+ * MSVC_Net2003: New directory containing project
+ files for Visual Studio .Net 2003.
+ Credits to Roel Vanhout <roel@riks.nl>!
+
+2003-11-01 Martin Schulze <teebaum@cvs.gnome.org>
+
+ * sigc++/retype.h.m4: Use LIBSIGC_TEMPLATE_PREFIX
+ in explicit function template instantiations.
+ * sigc++/type_traits.h: Add template specialization
+ for arrays (T_type[N]) to disable non-working member
+ type_trait<T_type[N]>::instance().
+ * sigc++/visit_each.h: Remove more disturbing
+ limit_derived_target<>::operator() overloads.
+ (Should have noticed earlier that they are unnecessary.)
+ * sigc++/adaptors/deduce_result_type.h.m4,
+ sigc++/adaptors/lambda/operator.h.m4,
+ sigc++/functors/functor_trait.h.m4,
+ tests/test_[bind,compose,exception_catch,hide,lambda].cc:
+ Completely removed support for typeof(). We don't need
+ it any more and it is completely non-standard!
+
+2003-10-30 Cedric Gustin <cedric.gustin@swing.be>
+
+ * configure.ac: Added test of win32 platform. Commented
+ out AM_DISABLE_SHARED (DLLs are shared libraries).
+ * sigc++/Makefile.am: added a few LDFLAGS for win32
+ DLLs.
+
+2003-10-30 Martin Schulze <teebaum@cvs.gnome.org>
+
+ * sigc++/signal.h.m4: Add SigC::Signal#<>::slot().
+ * sigc++/slot.h.m4: Comment out make_slot() work-around.
+ * sigc++/adaptors/bind.h.m4: Remove unnecessary brackets
+ in template argument lists. They are confusing MSVC.
+ * sigc++/adaptors/*.h.m4, sigc++/adaptors/lambda/*.h.m4:
+ Use LIBSIGC_TEMPLATE_PREFIX in explicit function
+ template instantiations.
+ * sigc++/tests/test_*.cc:
+ - Include <string> where std::string is used.
+ - Use double instead of float.
+
+2003-10-27 Martin Schulze <teebaum@cvs.gnome.org>
+
+ * sigc++/retype.h.m4: Cleanup.
+ * TODO: Bring it up to date.
+
+1.9.11:
+
+2003-10-26 Martin Schulze <teebaum@cvs.gnome.org>
+
+ * configure.ac: Bump version number to 1.9.11.
+ * NEWS: Add ChangeLog summary for version 1.9.11.
+
+2003-10-26 Martin Schulze <teebaum@cvs.gnome.org>
+
+ Compatiblity module:
+ * sigc++/signal.h.m4: Move definition of compatiblity
+ classes SigC::SignalN to here.
+ * sigc++/connection.h:
+ - Add connection::connected().
+ - Add compatibility typedef SigC::Connection.
+ * sigc++/bind.h, sigc++/bind_return.h,
+ sigc++/class_slot.h.m4, sigc++/hide.h.m4,
+ sigc++/method_slot.h.m4, sigc++/object.h,
+ sigc++/object_slot.h.m4, sigc++/retype.h.m4,
+ sigc++/retype_return.h sigc++/slot.h.m4,
+ sigc++/compatibility.h:
+ New files to complete compatibility module.
+ Split content of compatibility.h.m4 among the new files.
+ * sigc++/compatibility.h.m4: Removed.
+ * Makefile.am: Build and distribute new files.
+ * tests/test_compatibility.cc: Test new stuff.
+
+ Fixes:
+ * sigc++/functors/slot.h.m4: Fix copy constructor and
+ operator=() of slot template.
+ * sigc++/adaptors/bind.h.m4: Fix deduce_result_type
+ template specializations. bind<0>() probably compiles
+ with gcc-3.3, now.
+
+2003-10-26 Martin Schulze <teebaum@cvs.gnome.org>
+
+ Fixes:
+ * sigc++/functors/slot.{cc,h.m4}:
+ - Fix notification process: don't defer detaching of a
+ slot from all referred trackables during signal emission!
+ - Size optimization: replace virtual functions from
+ struct typed_slot_rep with function pointers in slot_rep
+ (reduces size of a typical typed_slot_rep instantiation
+ by 30% !!!).
+ * tests/test_slot.cc: Test sigc::slot more thoroughly.
+ * sigc++/functors/mem_fun.h.m4: Fix visit_each().
+ * sigc++/adaptos/bind_return.h.m4: Add support for
+ sigc::ref().
+ * tests/test_bind_return.cc: Use sigc::ref().
+ * sigc++/signal.h.m4: Avoid compiler warning about
+ uninitialized variable r_ in emit().
+ * sigc++/visit_each.h: Cleanup.
+
+ API additions:
+ * sigc++/adpators/lambda/operators.h.m4: Add
+ lambda actions sigc::{reinterpret,static,dynamic}_cast_
+ to support explicit parameter conversion.
+ * tests/test_lambda.cc: Test sigc::static_cast_.
+ * sigc++/adaptors/retype_return.h.m4: New file adding
+ adaptor retype_return (and hide_return).
+ * sigc++/Makefile.am: Build and distribute new file.
+ * tests/test_retype_return.cc: New file testing
+ adaptor retype_return (and hide_return).
+ * tests/Makefile.am: Build and distribute new test case.
+
+2003-10-25 Martin Schulze <teebaum@cvs.gnome.org>
+
+ * sigc++/visit_each.h: Remove disturbing
+ limit_derived_target<>::operator() overloads.
+ * sigc++/adaptors/bind.h.m4: Add support for sigc::ref().
+ * tests/test_bind.cc: Test sigc::ref().
+ * sigc++/adaptors/lambda/{operator,group,base}.h.m4:
+ - Move support for sigc::ref() from lambda_core<> into
+ lambda operator and lambda group creator functions.
+ - Add missing visit_each() overload for lambda<> template.
+ * tests/test_lambda.cc: Test auto-disconnection.
+ TODO: Fix a strange bug that leads to "Bus error"
+ during auto-disconnection.
+
+1.9.10:
+
+2003-10-23 Martin Schulze <teebaum@cvs.gnome.org>
+
+ * configure.ac: Bump version number to 1.9.10.
+ * NEWS: Add ChangeLog summary for version 1.9.10.
+
+2003-10-23 Martin Schulze <teebaum@cvs.gnome.org>
+
+ * sigc++/functors/{functor_trait,slot}.h.m4:
+ Move definition of struct nil into functor_trait.h.
+
+2003-10-23 Martin Schulze <teebaum@cvs.gnome.org>
+
+ * configure.ac: Disable typeof() compiler checks.
+ * sigc++/adaptors/bind.h.m4: Remove unnecessary
+ deduce_result_type<> template specializations.
+
+2003-10-20 Martin Schulze <teebaum@cvs.gnome.org>
+
+ * sigc++/adaptors/compose.h.m4:
+ Correct order of typedefs for good. (Patch from Jeff Franks.)
+
+1.9.9:
+
+2003-10-20 Martin Schulze <teebaum@cvs.gnome.org>
+
+ * sigc++/connection.h: Add constructor that takes
+ a sigc::slot_base& to support 3rd-party slot lists
+ like they are used in glibmm/gtkmm.
+ * sigc++/functors/slot.h.m4: Make sigc::slot::call_type public.
+ (Fixes compile problems reported by Jeff Franks.)
+ * sig++/type_traits.h: Don't use long long in
+ sigc::is_base_and_derived.
+ (Fixes compile problems reported by Jeff Franks.)
+ * sigc++/adaptors/{bind,compose,hide,exception_catch}.h.m4:
+ Correct order of typedefs. (Repoted by Jeff Franks.)
+ * configure.ac: Bump version number to 1.9.9.
+ * NEWS: Add ChangeLog summary for version 1.9.9.
+
+1.9.8:
+
+2003-10-19 Martin Schulze <teebaum@cvs.gnome.org>
+
+ * sigc++/functors/slot.h.m4: Define doxygen group functors.
+ * configure.ac: Bump version number to 1.9.8.
+ * NEWS: Add ChangeLog summary for version 1.9.8.
+
+2003-10-19 Martin Schulze <teebaum@cvs.gnome.org>
+
+ * NEWS: Add announces of versions 1.9.6 and 1.9.7.
+ * sigc++/compatibility.h.m4: New file. Defines namespace SigC.
+ namespace SigC should be API compatible to libsigc++-1.2.
+ * sigc++/Makefile.am: Build compatibility.h.
+ * tests/test_compatibility.cc, tests/Makefile.am:
+ Add test case for compatibility module.
+ * docs/index.html: Change group names.
+ * sigc++/sigc++.h: Include connection.h.
+ * sigc++/connection.{cc,h}:
+ - Rename dependency to destroy_notify_callback.
+ - Change parameter name in set_slot() from d to data.
+ - Fix operator=(): Add "return *this;"
+ - Get rid of namespace functor.
+ - Corrections in documentation.
+ * sigc++/signal.{cc,h.m4}:
+ - Add reference counter to signal_impl. Replaces "bool destroy_".
+ - Move signal_base, slot_iterator[_buf], slot_list out of
+ namespace internal. They are part of the public API.
+ - Add convenience function signal#::make_slot().
+ - Get rid of namespace functor.
+ - Corrections in documentation.
+ * sigc++/trackable.{cc,h}:
+ - Rename dependency to destroy_notify_callback.
+ - Rename trackable::clear() to trackable::notify_callbacks().
+ - Corrections in documentation.
+ * sigc++/type_traits.h: Add documentation.
+ * sigc++/visit_each.h:
+ - Get rid of namespace functor.
+ - Add documentation.
+ * sigc++/adaptors[/lambda]/*: Get rid of namespace functor.
+ * sigc++/functors/{functor_trait.h,ptr_fun.h.m4,mem_fun.h.m4}:
+ - Get rid of namespace functor.
+ - Corrections in documentation / add documentation.
+ * sigc++/functors/slot.{cc,h.m4}:
+ - Move slot_base out of namespace internal. It's public API.
+ - Get rid of one-letter-parameter-names.
+ - Get rid of namespace functor.
+ - Corrections in documentation.
+ * tests/*.cc: Get rid of "using namespace ...".
+
+2003-09-10 Martin Schulze <teebaum@cvs.gnome.org>
+
+ * sigc++/adaptors/lambda/{base,operators}.h.m4:
+ Add subscript ([]) and assign (=) operator. I think there are now
+ enough operators available to make any future power user happy.
+ The only one missing is the comma operator and if we added it
+ the logical consequence would be to also add if(), switch(), do(),
+ etc. lambda expressions which are really out of place in libsigc++.
+ * sigc++/type_traits.h: Fix is_base_and_derived<> for const types.
+ * tests/test_lambda.cc: Test new operators.
+
+1.9.7:
+
+2003-09-05 Martin Schulze <teebaum@cvs.gnome.org>
+
+ * configure.ac: Bump version number to 1.9.7.
+
+2003-09-03 Martin Schulze <teebaum@cvs.gnome.org>
+
+ * sigc++/adaptors/lambda/operator.h.m4:
+ - Restructure so that the size of the generated source file stays
+ reasonable for 34 operators: There are only two lambda templates
+ lambda_operator and lambda_operator_unary. The action is an additional
+ template parameter. A small template lambda_action[_unary] is specialized
+ for all actions.
+ - Add most operators that boost::lambda supports. Missing operators are
+ "=", "[]", "," and support for pointer arithmetic. I don't know if it's
+ worth adding these. In libsigc++, the purpose of lambda operators is to
+ provide some extra functionality for the group adaptor.
+ * tests/test_lambda.cc:
+ Test pre-increment, address and dereference operator.
+
+2003-08-31 Martin Schulze <teebaum@cvs.gnome.org>
+
+ * sigc++/reference_wrapper.h, sigc++/type_traits.h, sigc++/Makefile.am:
+ New file reference_wrapper.h provides ref() to specify that adaptors/lambdas
+ should take a reference to the object passed into ref() instead of a copy.
+ * tests/test_lambda.cc:
+ - Test group() with mem_fun().
+ - Use ref() where lambdas should store references to objects.
+ - Test var() and constant().
+ * sigc++/adaptors/lambda/base.h.m4:
+ - Support ref() in return type deduction.
+ - Add var() and constant() which create lambdas for usage with lambda operators.
+ * sigc++/adaptors/lambda/operator.h.m4:
+ - Fix return type deduction.
+ - Remove operator{+,-,*,...} overloads added on 2003-08-29. ref() is way cleaner.
+ * sigc++/adaptors/lambda/group.h.m4,
+ sigc++/adaptors/bind.h.m4, sigc++/adaptors/compose.h.m4,
+ sigc++/adaptors/exception_catch.h.m4, sigc++/adaptors/hide.h.m4:
+ Fix return type deduction.
+
+2003-08-29 Martin Schulze <teebaum@cvs.gnome.org>
+
+ * tests/test_lambda.cc: Add more tests.
+ * sigc++/adaptors/lambda/select.h.m4, sigc++/adaptors/lambda/lambda.cc.m4:
+ Make _1, _2, ... constant.
+ * sigc++/adaptors/lambda/operator.h.m4:
+ Add operator{+,-,*,...} overloads to distinguish between const and non-const objects.
+ Store references to non-const objects rather than copies.
+ This allows expressions like e.g. std::cout << _1.
+ * sigc++/adaptors/lambda/base.h.m4, sigc++/adaptors/lambda/group.h.m4:
+ Remove void specializations. Functors returning void are tested and work fine.
+
+2003-08-27 Martin Schulze <teebaum@cvs.gnome.org>
+
+ * tests/test_callof.cc, tests/test_deduce_result_type.cc:
+ Rename, correct and improve this test case.
+ * tests/Makefile.am: Build and run test_deduce_result_type
+ instead of test_callof.
+
+2003-08-27 Martin Schulze <teebaum@cvs.gnome.org>
+
+ * Update TODO.
+
+2003-08-27 Martin Schulze <teebaum@cvs.gnome.org>
+
+ * sigc++/adaptors/hide.h.m4: Remove usage of callof_ignore_arg<>.
+ * sigc++/callof.h.m4, sigc++/adaptors/deduce_result_type.h.m4,
+ sigc++/functors/functor_trait.h.m4:
+ Remove the first and move deduce_result_type templates from
+ functor_trait.h.m4 into new file deduce_result_type.h.m4.
+ * sigc++/Makefile.am, sigc++/sigc++.h, sigc++/adaptors/adaptor_trait.h.m4:
+ Build and include sigc++/adaptors/deduce_result_type.h instead of callof.h.
+ * sigc++/functors/slot.h.m4: Document struct nil.
+
+2003-08-24 Martin Schulze <teebaum@cvs.gnome.org>
+
+ * sigc++/functors/functor_trait.h.m4: Simplify usage of convenience
+ macro SIGC_FUNCTORS_HAVE_RESULT_TYPE:
+ namespace sigc{ namespace functor{ SIGC_FUNCTORS_HAVE_RESULT_TYPE }}
+
+2003-08-24 Martin Schulze <teebaum@cvs.gnome.org>
+
+ * sigc++/functors/functor_trait.h,m4, sigc++/adaptors[/lambda]/*.h.m4:
+ Merge adaptor return type deduction and typeof() into
+ sigc::functor::deduce_result_type. Use it for all adaptors.
+ * tests/test_compose.cc: Only test multi-type get-functor if
+ typeof() if supported.
+
+2003-08-24 Martin Schulze <teebaum@cvs.gnome.org>
+
+ * sigc++/adaptors[/lambda]/*.h.m4:
+ - Remove unnecessary void specializations. In fact, only the one
+ for sigc::functor::exception_catch<> is needed and I don't really
+ understand why. For the lambda stuff the void specializatoins are
+ just commented out at the moment.
+ - Make typeof() optional. Surprisingly, I got the lambda stuff working
+ without typeof()! The test suite doesn't catch all cases yet, so maybe
+ some thing are still not working.
+ TODO: Implement configure check.
+ * tests/test_bind.cc, tests/test_compose.cc tests/test_exception_catch.cc,
+ tests/test_hide.cc, tests/test_lambda.cc:
+ Only test multiple functor return types if typeof() is supported.
+
+2003-08-06 Martin Schulze <teebaum@cvs.gnome.org>
+
+ * sigc++/trackable.{cc,h}: Add function trackable::clear().
+
+2003-06-24 Andreas Rottmann <rottmann@users.sourceforge.net>
+
+ * TODO: Minor tweaks.
+
+2003-06-23 Andreas Rottmann <rottmann@users.sourceforge.net>
+
+ * docs/reference/Doxyfile.in: Use these variables.
+ * docs/reference/Makefile.am (html/index.html): Provide doxygen
+ with SRCDIR and TOP_SRCDIR environment variables.
+
+ * sigc++/functors/slot.h.m4: Make slot::call_type typedef public;
+ this fixes a g++ 3.3 error in signal.h.
+
+ * sigc++/signal.h.m4: Make the signal::accumulated class public;
+ this fixes a g++ 3.3 error in test_accumulated.cc.
+
+2003-06-15 Martin Schulze <teebaum@cvs.gnome.org>
+
+ * sigc++/functor/slot.h.m4: Correct typing error in docs.
+ * sigc++/functor/ptr_fun.h.m4: Document the whole thing.
+
+2003-05-31 Murray Cumming <murrayc@usa.net>
+
+ * Reference documentation: Rearranged the groups to make it all
+ a bit more like the libsigc++ 1.2 reference documentation.
+ Corrected some spelling and grammar too.
+ This needs a lot of work. The text is very hard to read and it's
+ generally not appropriate for a user of the code who doesn't
+ care about the internals. But it's not impossible - our examples
+ should show us what we need to say in the documentation.
+ We probably need some more groups for the extra stuff, like we do
+ in libsigc++ 1.2.
+
+2003-05-29 Martin Schulze <teebaum@cvs.gnome.org>
+
+ * sigc++/signal.h.m4: Fix documentation.
+ * sigc++/connection.h, sigc++/functor/slot.h.m4:
+ Document the whole thing.
+
+2003-05-29 Martin Schulze <teebaum@cvs.gnome.org>
+
+ * sigc++/signal.h.m4:
+ - Remove bogus operator() from unnumbered signal<> and
+ signal<>::accumulated templates.
+ - Document the whole thing.
+
+ * docs/index.html: Fix some links.
+
+2003-04-06 Martin Schulze <MHL.Schulze@t-online.de>
+
+ * TODO, configure.ac, Makefile.am, docs/*:
+ Add Doxygen framework.
+
+2003-04-06 Martin Schulze <MHL.Schulze@t-online.de>
+
+ * sigc++/callof.h.m4, sigc++/adaptors/*, tests/test_callof.cc:
+ Move sigc::callof<> to sigc::functor::internal::callof<>.
+
+ * sigc++/functors/mem_fun.h.m4, tests/test_mem_fun.cc:
+ Add new types [bound_][const_]volatile_mem_functor, visit_each()
+ and mem_fun() overloads for volatile qualifier.
+ Add ctor overloads in bound_*mem_functor and mem_fun() overloads
+ that take reference instead of pointer.
+
+2003-03-26 Martin Schulze <MHL.Schulze@t-online.de>
+
+ * Change "closure" to "slot" throughout sigc++2 (file names,
+ class names, member variables, documentation, etc.).
+
+2003-03-26 Martin Schulze <MHL.Schulze@t-online.de>
+
+ * TODO: Rewrite to reflect recent changes as well as recent discussions.
+
+2003-03-24 Martin Schulze <MHL.Schulze@t-online.de>
+
+ * sigc++/adaptors/bind_return.h.m4: Make the adaptor's data member
+ public so that visit_each() can access it.
+
+ * sigc++/adaptors/lambda/*.h.m4: More fixes. Add a note about
+ malfunctioning typeof() (probably compiler bug in gcc-3.2).
+
+ * tests/*.cc: Test references. Fix compose equivalent in test_lambda.
+
+2003-03-24 Martin Schulze <MHL.Schulze@t-online.de>
+
+ * sigc++/Makefile.am, sigc++/functors/functor_trait.h[.m4],
+ sigc++/adaptors/adaptor_trait.h.m4: Move detection of function
+ and member method pointers' return types from adaptor_trait into
+ functor_trait. (We'll use functor_trait rather than adaptor_trait for
+ our lambda stuff.) functor_trait.h needs to be generated from .m4 now.
+
+ * sigc++/functors/functor_trait.h.m4: Add convenience macros:
+ - SIGC_FUNCTORS_HAVE_RESULT_TYPE indicates that the existance of
+ T_functor::result_type should be assumed for all unknown functors.
+ - SIGC_FUNCTOR_TRAIT(T_functor, T_result) explicitly specifies the
+ result type of a functor.
+ ("typename functor_trait<T_functor>::result_type") is used to
+ determine the return type of our adaptors' operator()() overloads.
+
+ * sigc++/adaptors/[lambda/]*.h.m4: Various fixes in visit_each() and
+ operator()() overloads to make these operator()() overloads usable.
+ Most of them were just commented out before. Some adaptor types also
+ have void specializations, now.
+
+ * sigc++/adaptors/lambda/group.h.m4: Change syntax from
+ "[some_functor] % grp([args])" to "group([some_functor], [args])"
+ like we agreed on the ml some time ago.
+
+ * sigc++/tests/test_[all adaptors].cc: Test stuff that didn't work
+ before.
+
+2003-03-22 Murray Cumming <murrayc@usa.net>
+
+ * Added pgk-config file, from a mystery person in bug #108857
+
+2003-03-22 Martin Schulze <MHL.Schulze@t-online.de>
+
+ * tests/test_bind.cc: Test and show how to use functor_trait
+ for user defined or 3rd-party functors so that a
+ bind<0>([functor],[arg1])() call with no arguments can return a value.
+
+2003-03-20 Martin Schulze <MHL.Schulze@t-online.de>
+
+ * sigc++/callof.h.m4: Add explanations. Comment in / create templates
+ callof_safe[#]. Unfortunately they don't work for functors with overloaded
+ operator() so we don't use it for now. At least everything is documented.
+
+ * sigc++/functors/functor_trait.h, sigc++/functors/*.h.m4: Add back
+ functor_base compiler hint. We're using it now in adaptor_functor<>.
+
+ * sigc++/adaptors/{adaptor_trait,bind}.h.m4: Make operator() overloads
+ with no arguments return the result of the functor invocation.
+ Fix multiple bind<0>().
+ * tests/test_bind.cc: Test the stuff that's working now.
+
+2003-03-16 Murray Cumming <murrayc@usa.net>
+
+ * Added sigc++/sigc++.h, like in libsigc++ 1.2
+ * examples: Added member_method example, which uses a class method
+ and which demonstrates disconnection.
+
+1.9.6:
+
+2003-03-11 Andreas Rottmann <rottmann@users.sourceforge.net>
+
+ * sigc++/Makefile.am: Use substitution references instead of
+ $(patsubst). Is shorter and fixes the strange-dirs-in-dist-tarball
+ bug.
+
+2003-03-09 Martin Schulze <MHL.Schulze@t-online.de>
+
+ * sigc++/connection.h: Add block() capability.
+
+2003-03-09 Martin Schulze <MHL.Schulze@t-online.de>
+
+ * sigc++/signal.{cc,h.m4}: Add flag signal_impl::destroy_
+ and function signal_impl::destroy(). Use them to defer
+ the destruction of the signal_impl object during signal
+ emission.
+
+ * tests/test_disconnect.cc: Add tests for the connection
+ class and for deleting signals during emission.
+
+2003-03-09 Martin Schulze <MHL.Schulze@t-online.de>
+
+ * sigc++/connection.{cc,h}, sigc++/Makefile.am:
+ - New files that add a connection class. Objects of this
+ class are constructed from closure list iterators and can
+ be used to disconnect the refered closure. As opposed to
+ iterators they stay valid beyond the lifetime of the closure.
+
+2003-03-09 Martin Schulze <MHL.Schulze@t-online.de>
+
+ * sigc++/functors/closure.{cc,h.m4}, sigc++/signal.cc:
+ - Rename closure_{base,rep}::[set_]dependency_ -> [set_]parent_.
+ - Make closure_rep inherit trackable. This allows for
+ connection objects that stay valid beyond the life time
+ of the refered closure.
+ - Make some one-line-functions inline again.
+
+2003-03-08 Martin Schulze <MHL.Schulze@t-online.de>
+
+ * sigc++/trackable.cc: BUGFIX in trackable_dep_list::clear()
+
+2003-03-08 Andreas Rottmann <rottmann@users.sourceforge.net>
+
+ * sigc++/Makefile.am: Rewritten so we can build lambda cleanly.
+ * sigc++/Makefile.am_fragment: Removed.
+
+ * sigc++/functors/Makfile.am: Removed.
+ * sigc++/adaptors/Makefile.am: Removed.
+ * sigc++/adaptors/lambda/Makefile.am: Removed.
+ * configure.ac (AC_OUTPUT): Remove the above Makefiles.
+
+ * tests/Makefile.am: Re-included lambda test.
+
+2003-03-07 Martin Schulze <MHL.Schulze@t-online.de>
+
+ * sigc++/signal.{cc,h.m4}:
+ - signal_emit#<>: New templates replacing signal#<>::caller.
+ The purpose of these templates is implementing the emit
+ function and optimizing signal emission for the case that
+ no accumulator is used via template specializations.
+ - default_accumulator<>: Removed. The default for T_accumulator
+ in signal#<> now is nil. An example how to use accumulators
+ is available in tests/test_accumulator.cc.
+ - signal_{base,impl}: Move the implementation of signal_base's
+ interface to signal_impl. An object of this class is
+ dynamically allocated when first connecting a closure to
+ the signal. This drastically reduces the size of empty signals
+ and allows for future addition of a reference counter to make
+ it safe to delete a signal during emission.
+ - Directly work on closure_rep during signal emission. This
+ seems to be quicker than using the closure templates.
+ - Document the classes. Restructure the header file a bit.
+
+ * sigc++/functors/closure.h.m4: Make closure_base::rep_ data
+ member public, so that signal emission can directly work on it.
+
+ * tests/test_size.cc: Add an entry for signal_impl.
+
+2003-03-07 Martin Schulze <MHL.Schulze@t-online.de>
+
+ * sigc++/functors/closure.{cc,h.m4}:
+ - closure_base: BUGFIXES in ~closure_base() and operator=().
+ - Mark some functions with the inline keyword. This seems to
+ help gcc 3.2 to optimize signal emission and (dis)connection.
+ - Document the classes. Restructure the header file a bit.
+
+2003-03-07 Martin Schulze <MHL.Schulze@t-online.de>
+
+ * sigc++/trackable.{cc,h}: Make trackable allocate a
+ trackable_dep_list object dynamically when adding the first
+ dependency. (This reduces the size of objects, that are not
+ refered by a closure by 4 bytes (50%) and increases the size
+ of objects that are refered by a closure by 4 bytes (50%)
+ on a 32 bit architecture => This reduces total memory use
+ when >50% of the trackables are not refered by a closure.)
+ Document the classes.
+
+2003-03-05 Martin Schulze <MHL.Schulze@t-online.de>
+
+ * tests/Makefile.am, tests/test_size.cc, tests/test_accumulated.cc:
+ Add two test cases. test_size is showing the size of public and
+ internal structures. (Which apart from empty signals are smaller
+ than the sizes of the equivalent libsigc++-1.2 structures.)
+ test_accumulated is a test for the template signal<>::accumulated<>
+ at the same time showing the use of accumulators in libsigc++2.
+
+ * Offtopic: My note about binary sizes from 2003-02-10 is wrong.
+ Stripped libsigc++2 test binaries are about 8-10k in size.
+
+2003-03-05 Martin Schulze <MHL.Schulze@t-online.de>
+
+ * sigc++/visit_each.h: BUGFIX in template specialization
+ limit_derive_target<T_Target*,T_action>::with_type<false,T_type>:
+ Add non-const overloads for static void execute_() avoiding
+ compile time errors.
+
+2003-02-16 Martin Schulze <MHL.Schulze@t-online.de>
+
+ * tests/Makefile.am, tests/test_disconnect.cc:
+ Add testcase with a mixed connection & disconnection sequence.
+
+2003-02-16 Martin Schulze <MHL.Schulze@t-online.de>
+
+ * sigc++/signal.cc: Bugfix in signal_base::insert():
+ Set notification function in the newly created copy of
+ slot_ rather than in slot_ itself.
+
+2003-02-10 Martin Schulze <MHL.Schulze@t-online.de>
+
+ * sigc++/signal.h.m4: Comment in typedefs for iterator types in
+ the signal#<> class template. Make signal#<>::connect() return an
+ iterator for convenience.
+ (Note that the first change increases the binary size of
+ tests/test_signal from 201k to 204k, the second change to 206k.)
+
+2003-01-23 Murray Cumming <murrayc@usa.net>
+
+ * sigc++/adaptors/lambda is disable temporarily (not built and
+ not distributed) because it gets built before its parent
+ directory, but #includes generated sources in the parent directory.
+
+2003-01-22 Murray Cumming <murrayc@usa.net>
+
+ * Added Andreas Rottman's example.
+
+2003-01-22 Murray Cumming <murrayc@usa.net>
+
+ * Applied Andreas Rottman's make dist fixes.
+
+2003-01-14 Murray Cumming <murrayc@usa.net>
+
+ * Added whitespace to make the code more readable.
+
diff --git a/libs/sigc++2/INSTALL b/libs/sigc++2/INSTALL
new file mode 100644
index 0000000000..a4b34144dc
--- /dev/null
+++ b/libs/sigc++2/INSTALL
@@ -0,0 +1,229 @@
+Copyright 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software
+Foundation, Inc.
+
+ This file is free documentation; the Free Software Foundation gives
+unlimited permission to copy, distribute and modify it.
+
+Basic Installation
+==================
+
+ These are generic installation instructions.
+
+ The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation. It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions. Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+ It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring. (Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.)
+
+ If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release. If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+ The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'. You only need
+`configure.ac' if you want to change it or regenerate `configure' using
+a newer version of `autoconf'.
+
+The simplest way to compile this package is:
+
+ 1. `cd' to the directory containing the package's source code and type
+ `./configure' to configure the package for your system. If you're
+ using `csh' on an old version of System V, you might need to type
+ `sh ./configure' instead to prevent `csh' from trying to execute
+ `configure' itself.
+
+ Running `configure' takes awhile. While running, it prints some
+ messages telling which features it is checking for.
+
+ 2. Type `make' to compile the package.
+
+ 3. Optionally, type `make check' to run any self-tests that come with
+ the package.
+
+ 4. Type `make install' to install the programs and any data files and
+ documentation.
+
+ 5. You can remove the program binaries and object files from the
+ source code directory by typing `make clean'. To also remove the
+ files that `configure' created (so you can compile the package for
+ a different kind of computer), type `make distclean'. There is
+ also a `make maintainer-clean' target, but that is intended mainly
+ for the package's developers. If you use it, you may have to get
+ all sorts of other programs in order to regenerate files that came
+ with the distribution.
+
+Compilers and Options
+=====================
+
+ Some systems require unusual options for compilation or linking that
+the `configure' script does not know about. Run `./configure --help'
+for details on some of the pertinent environment variables.
+
+ You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment. Here
+is an example:
+
+ ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
+
+ *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+ You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory. To do this, you must use a version of `make' that
+supports the `VPATH' variable, such as GNU `make'. `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script. `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+ If you have to use a `make' that does not support the `VPATH'
+variable, you have to compile the package for one architecture at a
+time in the source code directory. After you have installed the
+package for one architecture, use `make distclean' before reconfiguring
+for another architecture.
+
+Installation Names
+==================
+
+ By default, `make install' will install the package's files in
+`/usr/local/bin', `/usr/local/man', etc. You can specify an
+installation prefix other than `/usr/local' by giving `configure' the
+option `--prefix=PATH'.
+
+ You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files. If you
+give `configure' the option `--exec-prefix=PATH', the package will use
+PATH as the prefix for installing programs and libraries.
+Documentation and other data files will still use the regular prefix.
+
+ In addition, if you use an unusual directory layout you can give
+options like `--bindir=PATH' to specify different values for particular
+kinds of files. Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.
+
+ If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+ Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System). The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+ For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Specifying the System Type
+==========================
+
+ There may be some features `configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on. Usually, assuming the package is built to be run on the
+_same_ architectures, `configure' can figure that out, but if it prints
+a message saying it cannot guess the machine type, give it the
+`--build=TYPE' option. TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+ CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+ OS KERNEL-OS
+
+ See the file `config.sub' for the possible values of each field. If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+ If you are _building_ compiler tools for cross-compiling, you should
+use the `--target=TYPE' option to select the type of system they will
+produce code for.
+
+ If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+ If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists. Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+ Variables not defined in a site shell script can be set in the
+environment passed to `configure'. However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost. In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'. For example:
+
+ ./configure CC=/usr/local2/bin/gcc
+
+will cause the specified gcc to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+`configure' Invocation
+======================
+
+ `configure' recognizes the following options to control how it
+operates.
+
+`--help'
+`-h'
+ Print a summary of the options to `configure', and exit.
+
+`--version'
+`-V'
+ Print the version of Autoconf used to generate the `configure'
+ script, and exit.
+
+`--cache-file=FILE'
+ Enable the cache: use and save the results of the tests in FILE,
+ traditionally `config.cache'. FILE defaults to `/dev/null' to
+ disable caching.
+
+`--config-cache'
+`-C'
+ Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+ Do not print messages saying which checks are being made. To
+ suppress all normal output, redirect it to `/dev/null' (any error
+ messages will still be shown).
+
+`--srcdir=DIR'
+ Look for the package's source code in directory DIR. Usually
+ `configure' can determine that directory automatically.
+
+`configure' also accepts some other, not widely useful, options. Run
+`configure --help' for more details.
+
diff --git a/libs/sigc++2/Makefile.am b/libs/sigc++2/Makefile.am
new file mode 100644
index 0000000000..03d67389c6
--- /dev/null
+++ b/libs/sigc++2/Makefile.am
@@ -0,0 +1,30 @@
+
+# it includes all the autostuff automatically, you just name the
+# other stuff here
+EXTRA_DIST = autogen.sh sigc++config.h.in libsigc++-2.0.spec.in
+# ACLOCAL_FLAGS = -I scripts
+
+SUBDIRS = sigc++
+DIST_SUBDIRS = $(SUBDIRS)
+
+sigc_configdir = $(libdir)/sigc++-2.0/include
+sigc_config_DATA = sigc++config.h
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = sigc++-2.0.pc
+
+all-local:
+ @echo "*** Everything completed ***"
+
+dist-hook:
+ @echo; echo; \
+ echo "**********************************************************"; \
+ echo "* IMPORTANT NOTICE: *"; \
+ echo "* *"; \
+ echo "* Be sure you have done a complete build before running *"; \
+ echo "* 'make dist' or 'make distcheck', because otherwise *"; \
+ echo "* the tarball will _not_ contain the dependency rules *"; \
+ echo "* generated by the compiler. *"; \
+ echo "**********************************************************"; \
+ echo; echo \
+ cp libsigc++-2.0.spec $(distdir)
diff --git a/libs/sigc++2/NEWS b/libs/sigc++2/NEWS
new file mode 100644
index 0000000000..83c29f5626
--- /dev/null
+++ b/libs/sigc++2/NEWS
@@ -0,0 +1,232 @@
+*** libsigc++ 2.0:
+
+libsigc++ implements a typesafe callback system for standard C++. It
+allows you to define signals and to connect those signals to any
+callback function, either global or a member function, regardless of
+whether it is static or virtual.
+
+libsigc++ is used by gtkmm to wrap the GTK+ signal system. It does not depend
+on GTK or gtkmm.
+
+libsigc++ 2.0 uses modern C++ mechanisms to achieve a highly flexible,
+yet typesafe callback system. It supports all features of libsigc++ 1.2
+and improves upon it with a simpler and more powerful API.
+
+This version of libsigc++ needs GNU g++ 3.2 or higher to compile.
+
+
+*** ChangeLog summary:
+
+2.0.6:
+
+* Fixed a memory leak in sigc::slot.
+* Fixed compilation for gcc-3.4.
+* Fixed compilation for Intel C++ compiler (upgraded libtool).
+* Fixed project files for MSVC .Net (Timothy M. Shead).
+* Fixed segfaults when compiled with MSVC .Net 2003 (moved
+ all calls to new and delete into non-inline library code).
+* In the compatibility module use correct bound_mem_functor
+ variants for const (volatile) methods when creating a slot.
+* Minor documentation fix.
+* Resolved bugs: #152327 #148744 #152323 #151404 #153143
+
+2.0.5:
+
+* Distribute pregenerated configuration header for MSVC .Net.
+
+2.0.4:
+
+* Fixed warnings and compiler errors in the test cases.
+* Added a new test case (Murray Cumming).
+* Fixed 'hello_world' example.
+* Don't test optional features that fail with the Sun FORTE.
+* Fixes for the Sun FORTE to compile out-of-the-box
+ (Damien Carbery, Murray Cumming, Martin Schulze).
+* Fixes for MSVC to build a DLL out-of-the-box (James Lin).
+* Improved compiler specific configuration during 'configure'.
+* Added rmp description file libsigc++-2.0.spec (Eric Bourque).
+* Minor documentation improvements (Murray Cumming).
+* Resolved bugs: #147311 #147313 #147391 #144846 #145541
+
+2.0.3:
+
+* Fix segfault on emission of unconnected signal.
+* Test emission of unconnected signals in the test case.
+* Suppress compiler warning at dynamic_cast<>-test for good.
+ (Help from Christof Petig and Timothy M. Shead.)
+
+2.0.2:
+
+* Suppress compiler warning in compatibility module at
+ dynamic_cast<>-test (fix suggested by Timothy M. Shead).
+* If a custom accumulator is specified invoke it on signal
+ emission even if the signal's slot list is empty. (This used
+ to be the case in libsigc++-1.2 as pointed out by Timothy.)
+
+2.0.1:
+
+* Fixed serious bug in reference counting in sigc::signal_base::impl().
+* Fixed SigC::Object-derivation check in SigC::slot() compatibility module.
+* Fixed compilation on Apple gcc 3.3 (assisted by Spundun Bhatt).
+* Fixed configure check for gcc 3.4 (Murray Cumming).
+
+2.0.0:
+
+* Implemented sigc::connection::blocked() (Murray Cumming).
+* Added the scripts directory to the make dist target (Murray Cumming).
+* Added more documentation (Martin Schulze).
+
+1.9.16:
+
+* Fixed compiler warning in sigc::connection (Alexander Nedotsukov, Murray Cumming).
+* Fixed examples and made them part of the regular build (Murray Cumming).
+* Added header sigc++config.h for configure time checks (Murray Cumming).
+* Added configure time checks to determine the correct syntax
+ for explicit template method specializations (Murray Cumming).
+* Removed code using partial specializations of overloaded template methods
+ from test cases. SUN Forte doesn't support this feature (Martin Schulze).
+* Fixed compilation for gcc 3.4 (Murray Cumming).
+
+1.9.15:
+
+API additions:
+* Add numbered slot# templates.
+* Allow for methods of the object's base types to be passed into sigc::mem_fun().
+
+Other fixes and cleanups:
+* Make is_base_and_derived template compatible with the SUN Forte.
+* Non-template code moved from .m4 macro source to .h/.cc files (Murray Cumming).
+* Implementation moved to .cc files (Murray Cumming).
+* More fixes for the SUN Forte. Make some more ctors explicit.
+
+1.9.14:
+
+* Added sigc::slot_base::operator bool() (Murray Cumming).
+* Build docs directory by default (Murray Cumming).
+* Fixed minor doxygen issues (Murray Cumming).
+* Fixed compiler warning in signal.h (Murray Cumming).
+
+1.9.13:
+
+* Fixed passing references through sigc::slot (Reported by Jeff Franks).
+* Enabled binding of objects to method slots through sigc::bind().
+* Reworked sigc::bind() API: Made the template argument for the
+ parameter position zero-based and optional. Added overloads for
+ binding of up to 7 arguments at a time when no position is specified.
+* Reworked sigc::hide() API: Made the template argument for the
+ parameter position zero-based and optional.
+* Fixed compilation problems with MSVC .Net 2003 (Roel Vanhout).
+* Distribute MSVC .Net 2003 project files in the tarballs.
+* Improved and extended documentation.
+* Minor cleanups.
+
+1.9.12:
+
+* Added adaptor retype(). With this final API addition all adaptors
+ are in place that are available in libsigc++-1.2.
+* Added negation lambda operator. Use STL names for lambda actions.
+* Remove formerly disabled support for gcc extension typeof().
+* Added project files for MS Visual Studio .Net 2003. (Roel Vanhout)
+* Make libsigc++2 compile with .Net 2003. (Roel Vanhout, Martin Schulze)
+* Build shared version of libsigc++2 by default. (Cedric Gustin)
+* Add support for win32 platform. (Cedric Gustin)
+* Install .m4 files. (requested by Ron Steinke)
+* Cleaned up functors.
+* Restructured and completed documentation of the core library parts.
+
+1.9.11:
+
+API Additions and important bug fixes:
+* Compatibility module completed. libsigc++-1.2 filenames are preserved.
+* Fixed critical bug in auto-disconnection: don't defer detaching
+ of a slot from all referred trackables during signal emission.
+* Reduced size of slots significantly.
+* Fixed support for sigc::ref() in adaptors.
+* Fixed sigc::visit_each(): only hit targets that are passed by
+ reference; pass bound members in bound_member_functor by reference.
+* Add lambda actions sigc::{reinterpret,static,dynamic}_cast_
+ to support explicit parameter conversion.
+* Add adaptors sigc::retype_return<>() and sigc::hide_return().
+
+Minor fixes:
+* Fixed return type deduction for bind<0>.
+ libsigc++-1.9.11 should compile with gcc-3.3.
+* Fixed copy constructor and operator=() of slot template.
+* Fixed a compiler warning in signal_emit#<>::emit().
+* Improved test case.
+
+1.9.10:
+
+* Fix compiler issues with gcc-3.3.2 (patch from Jeff Franks).
+* Remove compiler check for the gcc extension typeof().
+* Simplify bind_functor templates.
+* Move definition of struct nil into functor_trait.h.
+
+1.9.9:
+
+* Add a constructor to sigc::connection that takes a slot_base&
+ to support user defined slot lists like they are used in gtkmm.
+* Fix compiler issues with gcc-3.3.2 (reported by Jeff Franks).
+
+1.9.8:
+
+* Add compatibility module that defines namespace SigC.
+ namespace SigC should be API compatible to libsigc++-1.2.
+ Currently only the core parts of the library are supported.
+ Adaptors are still to follow.
+* Fix connection::operator=(). Include connection.h in sigc++.h.
+* Get rid of namespace functor.
+* Rename dependency to destroy_notify_callback.
+* Rename trackable::clear() to trackable::notify_callbacks().
+* Move slot_base, signal_base, slot_iterator[_buf], slot_list
+ out of namespace internal. They are public API.
+* Add reference counter to signal_impl enabling signals
+ to share the underlying information.
+* Add convenience function signal#::make_slot().
+* Get rid of one-letter-parameter-names.
+* Get rid of "using namespace ..." in the test cases.
+* Add lambda operators subscript ([]) and assign (=).
+* Fix is_base_and_derived<> for const types.
+* New and updated documentation.
+* Add previous announces to file NEWS.
+
+1.9.7:
+
+* Added sigc++/sigc++.h. (Murray Cumming)
+* Added member_method example. (Murray Cumming)
+* Renamed closure to slot.
+* Fixed issues with gcc-3.3. (Adreas Rottmann)
+* Removed unnecessary void specializations.
+* Made adaptors' operator()() (overload with no arguments) return a value.
+* Made visit_each() support adaptors.
+* Overhauled return type deduction to make it work without typeof().
+* Added convinience macros SIGC_FUNCTORS_HAVE_RESULT_TYPE and
+SIGC_FUNCTOR_TRAIT(T_functor, T_result) to make return type deduction system
+support 3rd-party funtors.
+* Changed syntax of group adaptor from "[functor] % grp([lambdas])" to "group
+([functor], [lambdas])".
+* Made many fixes to lambda functionality.
+* Added var() and constant() lambda creators.
+* Added many lambda operators.
+* Added ref() which creates a reference wrapper to enable storage of
+references in bind and group adaptors.
+* Expanded test suite.
+* Added documentation. (Corrections by Murray Cumming)
+
+1.9.6:
+
+* First public release of the unstable 2.0 generation.
+ libsigc++ 2.0 uses modern C++ mechanisms to achieve a highly
+ flexible, yet typesafe callback system. It supports all features of
+ libsigc++ 1.2 and improves upon it by:
+ - No need to specify the number of arguments in signal definitions.
+ - Connection of any compatible (=implicitly convertable) functor
+ to a signal.
+ - Implicit type conversions of parameters during signal emission.
+ - Lambda adaptor for complete restructuring of functor parameter
+ lists in one line (subject to changes).
+ - Signal has a fully featured stl style list interface.
+ - A convinient accumulator API (replacing the old marshaller API).
+ - Removal of unnecessary memory management functionality.
+ - Lightweight class "trackable" for use as base class of your
+ class hierarchy replaces class "Object".
diff --git a/libs/sigc++2/README b/libs/sigc++2/README
new file mode 100644
index 0000000000..f90f8f055a
--- /dev/null
+++ b/libs/sigc++2/README
@@ -0,0 +1,72 @@
+libsigc++ -- The Typesafe Callback Framework for C++
+
+
+General information:
+
+ libsigc++ implements a typesafe callback system for standard C++. It
+ allows you to define signals and to connect those signals to any
+ callback function, either global or a member function, regardless of
+ whether it is static or virtual.
+
+ libsigc++ is used by gtkmm to wrap the GTK+ signal system. It does not
+ depend on GTK or gtkmm.
+
+ Further information about the major release 2.0 is available on the
+ libsigc++ project home page: http://libsigc.sourceforge.net/
+
+
+License information:
+
+ Distribution of library and components is under the LGPL as listed in the
+ file COPYING. Examples and tests are Public Domain.
+
+
+Contact information:
+ Maintainer: mailto: mschulze@cvs.gnome.org
+ Maillist: mailto: libsigc-list@gnome.org
+ Homepage: http://libsigc.sourceforge.net
+ Online reference documentation: http://libsigc.sourceforge.net/libsigc2/docs/
+ Ftp: http://ftp.gnome.org/pub/GNOME/sources/libsigc++/2.0/
+ CVS:
+
+
+Overview of the distribution:
+
+ docs/ documentation on the signal system
+ docs/reference/ reference documentation
+
+ examples/ examples of various signal functions
+
+ sigc++/ source for library
+ sigc++/macros/ .m4 files used to auto-generate source files
+ sigc++/functors/ source for library (various functors)
+ sigc++/functors/macros/ .m4 files used to auto-generate source files
+ sigc++/adaptors/ source for library (various adaptors)
+ sigc++/adaptors/macros/ .m4 files used to auto-generate source files
+ sigc++/adpators/lambda/ source for library (lambda library)
+ sigc++/adpators/lambda/macros/ .m4 files used to auto-generate source files
+
+ scripts/ automake junk
+
+ tests/ programs testing and verifying proper behaviour
+
+ MSVC_Net2003/ project files for building the library with MSVC .NET 2003
+
+
+Compatibility:
+
+ Compatible compilers must supports the following recent c++ techniques:
+ * Partial template (function) specialization.
+ * Explicit template (member) function instantiation.
+ * Treat void return as normal return.
+
+ This release has only been tested with gcc-3.3. It should at least also compile with:
+ * gcc >= 3.2
+ * cygwin (gcc >= 3.2)
+ * mingw32
+ * Microsoft Visual Studio .Net 2003
+ * Sun Forte C++ compiler >= 5.5
+ * Compaq C++ compiler
+ * Intel compiler
+ Please report any troubles you encounter with these compilers!
+ You are also invited to try a compiler that is not listed above.
diff --git a/libs/sigc++2/SConscript b/libs/sigc++2/SConscript
new file mode 100644
index 0000000000..a9d5649e7b
--- /dev/null
+++ b/libs/sigc++2/SConscript
@@ -0,0 +1,13 @@
+import glob
+import os
+
+sigc2_files = glob.glob('sigc++/*.cc') + glob.glob('sigc++/functors/*.cc') + glob.glob('sigc++/adaptors/lambda/*.cc')
+
+Import('env')
+sigc2 = env.Copy()
+
+sigc2_configure_script = sigc2.Command ('configure', 'configure.ac', 'cd libs/sigc++2; ./autogen.sh; cd -', ENV=os.environ)
+sigc2_config_h = sigc2.Command('sigc++config.h', [sigc2_configure_script, 'sigc++config.h.in'], 'cd libs/sigc++2; ./configure; cd -', ENV=os.environ)
+
+libsigc2 = sigc2.StaticLibrary('sigc++2', sigc2_files)
+Default([sigc2_config_h, libsigc2])
diff --git a/libs/sigc++2/TODO b/libs/sigc++2/TODO
new file mode 100644
index 0000000000..7ea792aeb0
--- /dev/null
+++ b/libs/sigc++2/TODO
@@ -0,0 +1,66 @@
+Compatibility:
+
+- Fix compilation for SUN FORTE C++ 5.5.
+
+
+Configure checks and Makefile issues:
+
+- When you use a single Makefile.am for
+ several directories (in sigc++2, all under sigc++/ is ruled by a
+ single Makefile.am with the new build system), you have a problem when
+ you do a build where $(srcdir) != $(builddir), since in the build-tree
+ the necessary subdirectories are not created. So I have to find a
+ place where to create this directories, in case they do not exist.
+ This is only an issue for clean CVS checkouts, however (Andy)
+
+
+sigc++-1.2 compatibility:
+
+- Verify completeness.
+
+
+documentation:
+
+- Improve documentation: Make groups (see index.html). Exclude stuff to make
+ the html output readable.
+
+- Add documentation for adaptors and accumulators.
+
+
+basic functionality:
+
+- I don't understand what is meant by "stl-pointer-like functions" (Martin):
+
+ slot should have the full set of stl pointer like functions. (Karl Nelson)
+
+
+lambda functionality (I don't understand this (Martin)):
+
+- Add support for _R to force references down into
+ the stack frame of lambda. Ie.
+
+ A a;
+ (_1+_2)(1,a); // fail if no "operator int() const"
+
+- Call groups in lambda. (Huh, that appears to be in group?)
+
+
+Old TODO's that should be almost finished (Martin):
+
+- Fine-tooth comb the code looking for missing operator =() function
+ and missing copy constructors.
+
+- Improve and expand the test suite. There are a lot of combinations which
+ should be valid but haven't been tested which are likely to result in
+ wierd compiler errors if something wasn't done consistantly.
+
+
+Old TODO's that should be finished (Martin):
+
+- Improve signal#, it currently is just barely functional.
+- Add iterator support and stl like functionality to signal.
+
+- Add blocking capablity to slot.
+
+- Deinline/move to .cc where possible to move functions into the
+ library to reduce resulting binary size.
diff --git a/libs/sigc++2/autogen.sh b/libs/sigc++2/autogen.sh
new file mode 100755
index 0000000000..c58ddd27a2
--- /dev/null
+++ b/libs/sigc++2/autogen.sh
@@ -0,0 +1,18 @@
+#! /bin/sh
+
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+
+echo "Adding libtools."
+libtoolize --automake --copy --force
+
+echo "Building macros."
+aclocal -I "$srcdir/scripts" $ACLOCAL_FLAGS
+
+echo "Building makefiles."
+automake --add-missing --copy
+
+echo "Building configure."
+autoconf
+
+rm -f config.cache
diff --git a/libs/sigc++2/configure.ac b/libs/sigc++2/configure.ac
new file mode 100644
index 0000000000..14c0ee6a7f
--- /dev/null
+++ b/libs/sigc++2/configure.ac
@@ -0,0 +1,64 @@
+dnl Configure.in
+dnl
+dnl Source for generating compiler independent libraries.
+dnl
+
+dnl INIT is required name a file which is unique to the package
+dnl just to prevent someone from copying the configure to the wrong package.
+AC_INIT(sigc++)
+
+dnl This version stuff is just for the packaging section of the tool.
+dnl thus make format_package-0.0.1.tar.gz
+FP_MAJOR_VERSION=2
+FP_MINOR_VERSION=0
+FP_MICRO_VERSION=6
+FP_VERSION=$FP_MAJOR_VERSION.$FP_MINOR_VERSION.$FP_MICRO_VERSION
+
+dnl For automake.
+VERSION=$FP_VERSION
+PACKAGE=libsigc++
+
+dnl Initialize automake stuff
+AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
+
+dnl Specify a configuration file:
+AC_CONFIG_HEADER(sigc++config.h)
+
+dnl disable autoheader
+AUTOHEADER=':'
+
+dnl Maintainer support (autodependencies and packaging)
+AM_MAINTAINER_MODE
+
+dnl Using C compiler
+AC_PROG_CC
+AC_PROG_CPP
+
+dnl Using libtool
+AC_CONFIG_MACRO_DIR(scripts)
+LT_INIT
+dnl AM_PROG_LIBTOOL
+
+dnl Using C++ compiler
+AC_PROG_CXX
+AC_LANG_CPLUSPLUS
+
+SIGC_CXX_GCC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD()
+
+if test "X$config_error" = "Xyes" ; then
+ AC_ERROR(
+[One or more of the required compiler features is missing.
+If you believe this is in error, please consult the config.log file
+for further details.
+])
+fi
+
+
+# Generate output
+AC_OUTPUT([
+ Makefile
+ sigc++-2.0.pc
+
+ sigc++/Makefile
+ libsigc++-2.0.spec
+])
diff --git a/libs/sigc++2/libsigc++-2.0.spec.in b/libs/sigc++2/libsigc++-2.0.spec.in
new file mode 100644
index 0000000000..7dc756c6ce
--- /dev/null
+++ b/libs/sigc++2/libsigc++-2.0.spec.in
@@ -0,0 +1,91 @@
+Summary: The Typesafe Signal Framework for C++
+Name: @PACKAGE@
+Version: @VERSION@
+Release: 1
+License: LGPL
+Group: System Environment/Libraries
+Packager: Eric Bourque <ericb@computer.org>
+URL: http://libsigc.sourceforge.net/
+Source0: http://ftp.gnome.org/pub/GNOME/sources/libsigc++/2.0/%{name}-%{version}.tar.bz2
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
+
+%description
+
+This library implements a full callback system for use in widget
+libraries, abstract interfaces, and general programming. Originally
+part of the Gtk-- widget set, %name is now a seperate library to
+provide for more general use. It is the most complete library of its
+kind with the ablity to connect an abstract callback to a class
+method, function, or function object. It contains adaptor classes for
+connection of dissimilar callbacks and has an ease of use unmatched by
+other C++ callback libraries.
+
+Package GTK-- (gtkmm), which is a C++ binding to the GTK+ library,
+starting with version 1.1.2, uses %name.
+
+Due to C++ ABI changes, this will only work with the gcc version which
+the distribution was supplied with. If you got your rpm from any
+previous version, please rebuild from spec!
+
+%package devel
+Summary: Development tools for the Typesafe Signal Framework for C++
+Group: Development/Libraries
+Requires: %name = %version
+
+%description devel
+The %name-devel package contains the static libraries and header files
+needed for development with %name.
+
+%package examples
+Summary: Examples and tests for the Typesafe Signal Framework for C++
+Group: Development/Libraries
+Requires: %name-devel = %version
+
+%description examples
+The %name-devel package contains source code of
+example and test programs for %name.
+
+
+%prep
+%setup -q
+
+%build
+./configure --prefix=/usr
+make
+
+%install
+rm -rf $RPM_BUILD_ROOT
+make DESTDIR=$RPM_BUILD_ROOT install
+mkdir -p -m 755 $RPM_BUILD_ROOT/%{_libdir}/sigc++-2.0
+cp -a examples tests $RPM_BUILD_ROOT/%{_libdir}/sigc++-2.0
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+
+%files
+%defattr(-,root,root,-)
+%{_libdir}/libsigc*.so*
+%doc /usr/share/doc/libsigc-2.0
+
+%files devel
+/usr/include/sigc++-2.0
+%{_libdir}/pkgconfig/*
+%{_libdir}/libsigc*.a
+%{_libdir}/libsigc*.la
+%dir %{_libdir}/sigc++-2.0
+%dir %{_libdir}/sigc++-2.0/include
+%{_libdir}/sigc++-2.0/include/sigc++config.h
+
+%files examples
+%{_libdir}/sigc++-2.0/examples
+%{_libdir}/sigc++-2.0/tests
+
+%changelog
+* Tue Jun 29 2004 Eric Bourque <ericb@computer.org> - 2.0-1
+- Initial build.
+
diff --git a/libs/sigc++2/scripts/cxx.m4 b/libs/sigc++2/scripts/cxx.m4
new file mode 100644
index 0000000000..8753b53827
--- /dev/null
+++ b/libs/sigc++2/scripts/cxx.m4
@@ -0,0 +1,94 @@
+dnl
+dnl SIGC_CXX_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD()
+dnl
+dnl
+AC_DEFUN([SIGC_CXX_GCC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD],[
+AC_MSG_CHECKING([if C++ compiler supports the use of a particular specialization when calling operator() template methods.])
+AC_TRY_COMPILE(
+[
+ #include <iostream>
+
+ class Thing
+ {
+ public:
+ Thing()
+ {}
+
+ template <class T>
+ void operator()(T a, T b)
+ {
+ T c = a + b;
+ std::cout << c << std::endl;
+ }
+ };
+
+ template<class T2>
+ class OtherThing
+ {
+ public:
+ void do_something()
+ {
+ Thing thing_;
+ thing_.template operator()<T2>(1, 2);
+ //This fails with or without the template keyword, on SUN Forte C++ 5.3, 5.4, and 5.5:
+ }
+ };
+],
+[
+ OtherThing<int> thing;
+ thing.do_something();
+],
+[
+ sigcm_cxx_gcc_template_specialization_operator_overload=yes
+ AC_DEFINE([SIGC_GCC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD],[1],[does the C++ compiler support the use of a particular specialization when calling operator() template methods.])
+ AC_MSG_RESULT([$sigcm_cxx_gcc_template_specialization_operator_overload])
+],[
+ sigcm_cxx_gcc_template_specialization_operator_overload=no
+ AC_MSG_RESULT([$sigcm_cxx_gcc_template_specialization_operator_overload])
+])
+])
+AC_DEFUN([SIGC_CXX_MSVC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD],[
+AC_MSG_CHECKING([if C++ compiler supports the use of a particular specialization when calling operator() template methods omitting the template keyword.])
+AC_TRY_COMPILE(
+[
+ #include <iostream>
+
+ class Thing
+ {
+ public:
+ Thing()
+ {}
+
+ template <class T>
+ void operator()(T a, T b)
+ {
+ T c = a + b;
+ std::cout << c << std::endl;
+ }
+ };
+
+ template<class T2>
+ class OtherThing
+ {
+ public:
+ void do_something()
+ {
+ Thing thing_;
+ thing_.operator()<T2>(1, 2);
+ //This fails with or without the template keyword, on SUN Forte C++ 5.3, 5.4, and 5.5:
+ }
+ };
+],
+[
+ OtherThing<int> thing;
+ thing.do_something();
+],
+[
+ sigcm_cxx_msvc_template_specialization_operator_overload=yes
+ AC_DEFINE([SIGC_MSVC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD],[1],[does the C++ compiler support the use of a particular specialization when calling operator() template methods omitting the template keyword.])
+ AC_MSG_RESULT([$sigcm_cxx_msvc_template_specialization_operator_overload])
+],[
+ sigcm_cxx_msvc_template_specialization_operator_overload=no
+ AC_MSG_RESULT([$sigcm_cxx_msvc_template_specialization_operator_overload])
+])
+])
diff --git a/libs/sigc++2/scripts/libtool.m4 b/libs/sigc++2/scripts/libtool.m4
new file mode 100644
index 0000000000..1ceda32823
--- /dev/null
+++ b/libs/sigc++2/scripts/libtool.m4
@@ -0,0 +1,5767 @@
+# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
+
+m4_define([_LT_COPYING], [dnl
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004
+# Free Software Foundation, Inc.
+#
+# This file is part of GNU Libtool:
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+])
+
+# serial 49 LT_INIT
+
+
+# LT_PREREQ(VERSION)
+# ------------------
+# Complain and exit if this libtool version is less that VERSION.
+m4_define([LT_PREREQ],
+[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
+ [m4_default([$3],
+ [m4_fatal([Libtool version $1 or higher is required],
+ 63)])],
+ [$2])])
+
+
+# LT_INIT([OPTIONS])
+# --------------------------
+AC_DEFUN([LT_INIT],
+[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
+dnl Autoconf doesn't catch unexpanded LT_ macros by default:
+m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
+m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW)$])dnl
+dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
+dnl unless we require an AC_DEFUNed macro:
+AC_REQUIRE([LTOPTIONS_VERSION])dnl
+AC_REQUIRE([LTSUGAR_VERSION])dnl
+AC_REQUIRE([LTVERSION_VERSION])dnl
+AC_REQUIRE([_LT_PROG_LTMAIN])dnl
+AC_BEFORE([$0], [LT_LANG])dnl
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ltmain"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+AC_SUBST(LIBTOOL)dnl
+
+# Set options
+_LT_SET_OPTIONS([$1])dnl
+
+_LT_SETUP
+
+# Only expand once:
+m4_define([LT_INIT])
+])# _LT_INIT
+
+# Old names:
+AU_DEFUN([AC_PROG_LIBTOOL], [LT_INIT])
+AU_DEFUN([AM_PROG_LIBTOOL], [LT_INIT])
+
+
+# _LT_SETUP
+# ---------
+m4_define([_LT_SETUP],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+_LT_DECL([], [host_alias], [0], [The host system])dnl
+_LT_DECL([], [host], [0])dnl
+dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_PROG_LD])dnl
+AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
+AC_REQUIRE([AC_PROG_NM])dnl
+dnl
+AC_REQUIRE([AC_PROG_LN_S])dnl
+test -z "$LN_S" && LN_S="ln -s"
+_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
+dnl
+AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
+AC_REQUIRE([AC_LIBTOOL_SYS_OLD_ARCHIVE])dnl
+AC_REQUIRE([AC_LIBTOOL_SYS_MAX_CMD_LEN])dnl
+AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
+AC_REQUIRE([AC_OBJEXT])dnl
+_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
+AC_REQUIRE([AC_EXEEXT])dnl
+_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
+dnl
+
+_LT_CONFIG_LIBTOOL_INIT([
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes INIT.
+if test -n "\${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+])
+if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+
+AC_LIBTOOL_OBJDIR
+
+AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
+_LT_AC_PROG_ECHO_BACKSLASH
+
+case $host_os in
+aix3*)
+ # AIX sometimes has problems with the GCC collect2 program. For some
+ # reason, if we set the COLLECT_NAMES environment variable, the problems
+ # vanish in a puff of smoke.
+ if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+ fi
+ ;;
+esac
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='sed -e s/^X//'
+[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
+
+# Same as above, but do not quote variable references.
+[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+# Constants:
+rm="rm -f"
+
+# Global variables:
+default_ofile=libtool
+ofile="$default_ofile"
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except M$VC,
+# which needs '.lib').
+libext=a
+
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LD" && LD=ld
+test -z "$ac_objext" && ac_objext=o
+
+cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
+
+# Only perform the check for file, if the check method requires it
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+case $deplibs_check_method in
+file_magic*)
+ if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+ AC_PATH_MAGIC
+ fi
+ ;;
+esac
+
+AC_ARG_ENABLE([libtool-lock],
+ [AC_HELP_STRING([--disable-libtool-lock],
+ [avoid locking (might break parallel builds)])])
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Use C for the default configuration in the libtool script
+_LT_LANG_C_CONFIG
+_LT_LANG_DEFAULT_CONFIG
+_LT_CONFIG_COMMANDS
+])# _LT_SETUP
+
+
+# _LT_PROG_LTMAIN
+# ---------------
+# In libtool itself `ltmain.sh' is in the build tree, but everything else
+# ships it in the source tree, for completeness, if we find a copy in the
+# build tree use that before falling back to auxdir.
+#
+# Note that this code is called both from `configure', and `config.status'
+# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
+# `config.status' has no value for ac_aux_dir unless we are using Automake,
+# so we pass a copy along to make sure it has a sensible value anyway.
+AC_DEFUN([_LT_PROG_LTMAIN],
+[_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
+case $ac_aux_dir in
+ $srcdir) ltmain=./ltmain.sh ;;
+ $srcdir/*) ltmain=`expr "$ac_aux_dir" : "$srcdir/\(.*\)"`/ltmain.sh ;;
+esac
+test -f "$ltmain" || ltmain="$ac_aux_dir/ltmain.sh"
+])# _LT_PROG_LTMAIN
+
+
+
+## ------------------------------------- ##
+## Accumulate code for creating libtool. ##
+## ------------------------------------- ##
+
+# So that we can recreate a full libtool script including additional
+# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
+# in macros and then make a single call at the end using the `libtool'
+# label.
+
+# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
+# ----------------------------------------
+# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
+m4_define([_LT_CONFIG_LIBTOOL_INIT],
+[m4_ifval([$1],
+ [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
+ [$1
+])])])
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_INIT])
+
+# _LT_CONFIG_LIBTOOL([COMMANDS])
+# ------------------------------
+# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
+m4_define([_LT_CONFIG_LIBTOOL],
+[m4_ifval([$1],
+ [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
+ [$1
+])])])
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
+
+
+# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
+# ---------------------------------------------------
+m4_define([_LT_CONFIG_SAVE_COMMANDS],
+[_LT_CONFIG_LIBTOOL([$1])
+_LT_CONFIG_LIBTOOL_INIT([$2])
+])
+
+
+# _LT_FORMAT_COMMENT([COMMENT])
+# -----------------------------
+# Add leading comment marks to the start of each line, and a trailing
+# full-stop to the whole comment if one is not present already.
+m4_define([_LT_FORMAT_COMMENT],
+[m4_ifval([$1], [
+m4_bpatsubst([$1], [^ *], [# ])]m4_bmatch([$1], [[!?.]$], [], [.])
+)])
+
+
+
+## ------------------------ ##
+## FIXME: Eliminate VARNAME ##
+## ------------------------ ##
+
+# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
+# -------------------------------------------------------------------
+# CONFIGNAME is the name given to the value in the libtool script.
+# VARNAME is the (base) name used in the configure script.
+# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
+# VARNAME. Any other value will be used directly.
+m4_define([_LT_DECL],
+[lt_if_append_uniq([lt_decl_varnames], [$2], [[, ]],
+ [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
+ [m4_ifval([$1], [$1], [$2])])
+ lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
+ m4_ifval([$4],
+ [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
+ lt_dict_add_subkey([lt_decl_dict], [$2],
+ [tagged?], [m4_ifval([$5], [yes], [no])])])
+])
+
+
+# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
+# --------------------------------------------------------
+m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
+
+
+# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
+# -------------------------------------------------
+m4_define([lt_decl_tag_varnames],
+[_lt_decl_filter([tagged?], [yes], $@)])
+m4_define([_lt_decl_filter],
+[m4_case([$#],
+ [0], [m4_fatal([$0: too few arguments: $#])],
+ [1], [m4_fatal([$0: too few arguments: $#: $1])],
+ [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
+ [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
+ [lt_dict_filter([lt_decl_dict], $@)])[]dnl
+])
+
+
+# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
+# ---------------------------------------------------
+m4_define([lt_decl_quote_varnames],
+[_lt_decl_filter([value], [1], $@)])
+
+# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
+# ----------------------------------------------------
+m4_define([lt_decl_dquote_varnames],
+[_lt_decl_filter([value], [2], $@)])
+
+
+# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
+# ----------------------------------------------------
+m4_define([lt_decl_varnames_tagged],
+[_$0(m4_quote(m4_default([$1], [[, ]])),
+ m4_quote(m4_if([$2], [],
+ m4_quote(lt_decl_tag_varnames),
+ m4_quote(m4_shift($@)))),
+ m4_split(m4_normalize(m4_quote(_LT_TAGS))))])
+m4_define([_lt_decl_varnames_tagged], [lt_combine([$1], [$2], [_], $3)])
+
+
+# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
+# ------------------------------------------------
+m4_define([lt_decl_all_varnames],
+[_$0(m4_quote(m4_default([$1], [[, ]])),
+ m4_if([$2], [],
+ m4_quote(lt_decl_varnames),
+ m4_quote(m4_shift($@))))[]dnl
+])
+m4_define([_lt_decl_all_varnames],
+[lt_join($@, lt_decl_varnames_tagged([$1],
+ lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
+])
+
+
+# _LT_CONFIG_STATUS_DECLARE([VARNAME])
+# ------------------------------------
+# Quote a variable value, and forward it to `config.status' so that its
+# declaration there will have the same value as in `configure'. VARNAME
+# must have a single quote delimited value for this to work.
+m4_define([_LT_CONFIG_STATUS_DECLARE],
+[$1='`$echo "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
+
+
+# _LT_CONFIG_STATUS_DECLARATIONS
+# ------------------------------
+# We delimit libtool config variables with single quotes, so when
+# we write them to config.status, we have to be sure to quote all
+# embedded single quotes properly. In configure, this macro expands
+# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
+#
+# <var>='`$echo "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
+m4_define([_LT_CONFIG_STATUS_DECLARATIONS],
+[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
+ [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
+
+
+# _LT_LIBTOOL_TAGS
+# ----------------
+# Output comment and list of tags supported by the script
+m4_define([_LT_LIBTOOL_TAGS],
+[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
+available_tags="[]_LT_TAGS[]"dnl
+])
+
+# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
+# -----------------------------------
+# Extract the dictionary values for VARNAME (optionally with TAG) and
+# expand to a commented shell variable setting:
+#
+# # Some comment about what VAR is for.
+# visible_name=$lt_internal_name
+m4_define([_LT_LIBTOOL_DECLARE],
+[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
+ [description])))[]dnl
+m4_pushdef([_libtool_name],
+ m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
+m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
+ [0], [_libtool_name=[$]$1],
+ [1], [_libtool_name=$lt_[]$1],
+ [2], [_libtool_name=$lt_[]$1],
+ [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
+m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
+])
+
+# _LT_LIBTOOL_CONFIG_VARS
+# -----------------------
+# Produce commented declarations of non-tagged libtool config variables
+# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
+# script. Tagged libtool config variables (even for the LIBTOOL CONFIG
+# section) are produced by _LT_LIBTOOL_TAG_VARS.
+m4_define([_LT_LIBTOOL_CONFIG_VARS],
+[m4_foreach([_lt_var],
+ m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
+ [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
+
+# _LT_LIBTOOL_TAG_VARS(TAG)
+# -------------------------
+m4_define([_LT_LIBTOOL_TAG_VARS],
+[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
+ [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
+
+
+# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
+# ---------------------------------
+m4_define([_LT_AC_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
+
+
+# _LT_CONFIG_COMMANDS
+# -------------------
+# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
+# variables for single and double quote escaping we saved from calls
+# to _LT_DECL, we can put quote escaped variables declarations
+# into `config.status', and then the shell code to quote escape them in
+# for loops in `config.status'. Finally, any additional code accumulated
+# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
+m4_define([_LT_CONFIG_COMMANDS],
+[AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+if test "X${CDPATH+set}" = Xset; then CDPATH=${ZSH_VERSION+.}:; export CDPATH; fi
+
+sed_quote_subst='$sed_quote_subst'
+double_quote_subst='$double_quote_subst'
+delay_variable_subst='$delay_variable_subst'
+_LT_CONFIG_STATUS_DECLARATIONS
+LTCC='$LTCC'
+compiler='$compiler_DEFAULT'
+
+# Quote evaled strings.
+for var in lt_decl_all_varnames([[ ]], lt_decl_quote_varnames); do
+ eval "lt_\$var=\\\\\\"\\\`\\\$echo \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+done
+
+# Double-quote double-evaled strings.
+for var in lt_decl_all_varnames([[ ]], lt_decl_dquote_varnames); do
+ eval "lt_\$var=\\\\\\"\\\`\\\$echo \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+done
+
+# Fix-up fallback echo if it was mangled by the above quoting rules.
+case \$lt_echo in
+*'\\\[$]0 --fallback-echo"')dnl "
+ lt_echo=\`\$echo "X\$lt_echo" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
+ ;;
+esac
+
+_LT_OUTPUT_LIBTOOL_INIT
+])
+])#_LT_CONFIG_COMMANDS
+
+
+# _LT_CONFIG(TAG)
+# ----------------------------
+# If TAG is the built-in tag, create an initial libtool script with a
+# default configuration from the untagged config vars. Otherwise add code
+# to config.status for appending the configuration named by TAG from the
+# matching tagged config vars.
+m4_define([_LT_CONFIG],
+[_LT_CONFIG_SAVE_COMMANDS([
+ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
+ m4_if(_LT_TAG, [C], [
+ # See if we are running on zsh, and set the options which allow our
+ # commands through without removal of \ escapes.
+ if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+ fi
+
+ cfgfile="${ofile}T"
+ trap "$rm \"$cfgfile\"; exit 1" 1 2 15
+ $rm -f "$cfgfile"
+
+ cat <<_LT_EOF >> "$cfgfile"
+#! $SHELL
+
+# `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by config.status (GNU $PACKAGE$TIMESTAMP) $VERSION
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+_LT_COPYING
+
+_LT_LIBTOOL_TAGS
+
+# ### BEGIN LIBTOOL CONFIG
+_LT_LIBTOOL_CONFIG_VARS
+_LT_LIBTOOL_TAG_VARS
+# ### END LIBTOOL CONFIG
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
+
+_LT_EOF
+
+ case $host_os in
+ aix3*)
+ cat <<\_LT_EOF >> "$cfgfile"
+# AIX sometimes has problems with the GCC collect2 program. For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+fi
+_LT_EOF
+ ;;
+ esac
+
+ _LT_PROG_LTMAIN
+
+ # We use sed instead of cat because bash on DJGPP gets confused if
+ # if finds mixed CR/LF and LF-only lines. Since sed operates in
+ # text mode, it properly converts lines to CR/LF. This bash problem
+ # is reportedly fixed, but why not run on old versions too?
+ sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
+
+ mv -f "$cfgfile" "$ofile" ||
+ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+ chmod +x "$ofile"
+],
+[cat <<_LT_EOF >> "$ofile"
+
+dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
+dnl in a comment (ie after a #).
+# ### BEGIN LIBTOOL TAG CONFIG: $1
+_LT_LIBTOOL_TAG_VARS(_LT_TAG)
+# ### END LIBTOOL TAG CONFIG: $1
+_LT_EOF
+])dnl /m4_if
+],
+[m4_if([$1], [], [
+ PACKAGE='$PACKAGE'
+ VERSION='$VERSION'
+ TIMESTAMP='$TIMESTAMP'
+ rm='$rm'
+ ofile='$ofile'], [])
+])dnl /_LT_CONFIG_SAVE_COMMANDS
+])# _LT_CONFIG
+
+
+# C support is built-in for now
+m4_define([_LT_LANG_C_enabled], [])
+m4_define([_LT_TAGS], [])
+
+# LT_LANG(LANG)
+# -------------
+# Enable libtool support for the given language if not already enabled.
+AC_DEFUN([LT_LANG],
+[m4_case([$1],
+ [C], [_LT_LANG(C)],
+ [C++], [_LT_LANG(CXX)],
+ [Java], [_LT_LANG(GCJ)],
+ [Fortran 77], [_LT_LANG(F77)],
+ [Windows Resource], [_LT_LANG(RC)],
+ [m4_ifdef([_LT_LANG_]$1[_CONFIG],
+ [_LT_LANG($1)],
+ [m4_fatal([$0: unsupported language: "$1"])])])dnl
+])# LT_LANG
+
+# _LT_LANG(LANGNAME)
+# ------------------
+m4_define([_LT_LANG],
+[m4_ifdef([_LT_LANG_]$1[_enabled], [],
+ [m4_append([_LT_TAGS], [$1 ])dnl
+ m4_define([_LT_LANG_]$1[_enabled], [])dnl
+ _LT_LANG_$1_CONFIG($1)])dnl
+])# _LT_LANG
+
+# _LT_LANG_DEFAULT_CONFIG
+# -----------------------
+m4_define([_LT_LANG_DEFAULT_CONFIG],
+[AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [LT_LANG(CXX)],
+ [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
+
+AC_PROVIDE_IFELSE([AC_PROG_F77],
+ [LT_LANG(F77)],
+ [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
+
+dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
+dnl pulling things in needlessly.
+AC_PROVIDE_IFELSE([AC_PROG_GCJ],
+ [LT_LANG(GCJ)],
+ [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
+ [LT_LANG(GCJ)],
+ [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
+ [LT_LANG(GCJ)],
+ [m4_ifdef([AC_PROG_GCJ],
+ [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
+ m4_ifdef([A][M_PROG_GCJ],
+ [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
+ m4_ifdef([LT_PROG_GCJ],
+ [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
+
+AC_PROVIDE_IFELSE([LT_PROG_RC],
+ [LT_LANG(RC)],
+ [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
+])# _LT_LANG_DEFAULT_CONFIG
+
+# Obsolete macros
+AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
+AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
+AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java])])
+
+
+# _LT_AC_SYS_COMPILER
+# -------------------
+AC_DEFUN([_LT_AC_SYS_COMPILER],
+[AC_REQUIRE([AC_PROG_CC])dnl
+
+_LT_DECL([LTCC], [CC], [1], [A C compiler])
+_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
+_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU C compiler?])
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+])# _LT_AC_SYS_COMPILER
+
+
+# _LT_AC_SYS_LIBPATH_AIX
+# ----------------------
+# Links a minimal program and checks the executable
+# for the system default hardcoded library path. In most cases,
+# this is /usr/lib:/lib, but when the MPI compilers are used
+# the location of the communication and MPI libs are included too.
+# If we don't find anything, use the default library path according
+# to the aix ld manual.
+m4_define([_LT_AC_SYS_LIBPATH_AIX],
+[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`; fi],[])
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+])# _LT_AC_SYS_LIBPATH_AIX
+
+
+# _LT_AC_SHELL_INIT(ARG)
+# ----------------------
+m4_define([_LT_AC_SHELL_INIT],
+[ifdef([AC_DIVERSION_NOTICE],
+ [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
+ [AC_DIVERT_PUSH(NOTICE)])
+$1
+AC_DIVERT_POP
+])# _LT_AC_SHELL_INIT
+
+
+# _LT_AC_PROG_ECHO_BACKSLASH
+# --------------------------
+# Add some code to the start of the generated configure script which
+# will find an echo command which doesn't interpret backslashes.
+m4_define([_LT_AC_PROG_ECHO_BACKSLASH],
+[_LT_AC_SHELL_INIT([
+# Check that we are running under the correct shell.
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+case X$ECHO in
+X*--fallback-echo)
+ # Remove one level of quotation (which was required for Make).
+ ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
+ ;;
+esac
+
+echo=${ECHO-echo}
+if test "X[$]1" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+elif test "X[$]1" = X--fallback-echo; then
+ # Avoid inline document here, it may be left over
+ :
+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
+ # Yippee, $echo works!
+ :
+else
+ # Restart under the correct shell.
+ exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
+fi
+
+if test "X[$]1" = X--fallback-echo; then
+ # used as fallback echo
+ shift
+ cat <<_LT_EOF
+[$]*
+_LT_EOF
+ exit 0
+fi
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
+
+if test -z "$ECHO"; then
+if test "X${echo_test_string+set}" != Xset; then
+# find a string as large as possible, as long as the shell can cope with it
+ for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
+ # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
+ if (echo_test_string="`eval $cmd`") 2>/dev/null &&
+ echo_test_string="`eval $cmd`" &&
+ (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
+ then
+ break
+ fi
+ done
+fi
+
+if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ :
+else
+ # The Solaris, AIX, and Digital Unix default echo programs unquote
+ # backslashes. This makes it impossible to quote backslashes using
+ # echo "$something" | sed 's/\\/\\\\/g'
+ #
+ # So, first we look for a working echo in the user's PATH.
+
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for dir in $PATH /usr/ucb; do
+ IFS="$lt_save_ifs"
+ if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+ test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ echo="$dir/echo"
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+
+ if test "X$echo" = Xecho; then
+ # We didn't find a better echo, so look for alternatives.
+ if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ # This shell has a builtin print -r that does the trick.
+ echo='print -r'
+ elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
+ test "X$CONFIG_SHELL" != X/bin/ksh; then
+ # If we have ksh, try running configure again with it.
+ ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+ export ORIGINAL_CONFIG_SHELL
+ CONFIG_SHELL=/bin/ksh
+ export CONFIG_SHELL
+ exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
+ else
+ # Try using printf.
+ echo='printf %s\n'
+ if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ # Cool, printf works
+ :
+ elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+ test "X$echo_testing_string" = 'X\t' &&
+ echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
+ export CONFIG_SHELL
+ SHELL="$CONFIG_SHELL"
+ export SHELL
+ echo="$CONFIG_SHELL [$]0 --fallback-echo"
+ elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+ test "X$echo_testing_string" = 'X\t' &&
+ echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ echo="$CONFIG_SHELL [$]0 --fallback-echo"
+ else
+ # maybe with a smaller string...
+ prev=:
+
+ for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
+ if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
+ then
+ break
+ fi
+ prev="$cmd"
+ done
+
+ if test "$prev" != 'sed 50q "[$]0"'; then
+ echo_test_string=`eval $prev`
+ export echo_test_string
+ exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
+ else
+ # Oops. We lost completely, so just stick with echo.
+ echo=echo
+ fi
+ fi
+ fi
+ fi
+fi
+fi
+
+# Copy echo and quote the copy suitably for passing to libtool from
+# the Makefile, instead of quoting the original, which is used later.
+ECHO=$echo
+if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
+ ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
+fi
+
+AC_SUBST(ECHO)
+])
+_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
+_LT_DECL([], [echo], [1],
+ [An echo program that does not interpret backslashes])
+])# _LT_AC_PROG_ECHO_BACKSLASH
+
+
+# _LT_AC_LOCK
+# -----------
+AC_DEFUN([_LT_AC_LOCK],
+[AC_REQUIRE([AC_OBJEXT])dnl
+AC_ARG_ENABLE([libtool-lock],
+ [AC_HELP_STRING([--disable-libtool-lock],
+ [avoid locking (might break parallel builds)])])
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *ELF-32*)
+ HPUX_IA64_MODE="32"
+ ;;
+ *ELF-64*)
+ HPUX_IA64_MODE="64"
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+*-*-irix6*)
+ # Find out which ABI we are using.
+ echo '[#]line __oline__ "configure"' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -melf32bsmip"
+ ;;
+ *N32*)
+ LD="${LD-ld} -melf32bmipn32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -melf64bmip"
+ ;;
+ esac
+ else
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -32"
+ ;;
+ *N32*)
+ LD="${LD-ld} -n32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -64"
+ ;;
+ esac
+ fi
+ fi
+ rm -rf conftest*
+ ;;
+
+x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case "`/usr/bin/file conftest.o`" in
+ *32-bit*)
+ case $host in
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+ ppc64-*linux*|powerpc64-*linux*)
+ LD="${LD-ld} -m elf32ppclinux"
+ ;;
+ s390x-*linux*)
+ LD="${LD-ld} -m elf_s390"
+ ;;
+ sparc64-*linux*)
+ LD="${LD-ld} -m elf32_sparc"
+ ;;
+ esac
+ ;;
+ *64-bit*)
+ case $host in
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ ppc*-*linux*|powerpc*-*linux*)
+ LD="${LD-ld} -m elf64ppc"
+ ;;
+ s390*-*linux*)
+ LD="${LD-ld} -m elf64_s390"
+ ;;
+ sparc*-*linux*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+
+*-*-sco3.2v5*)
+ # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+ SAVE_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -belf"
+ AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
+ [AC_LANG_PUSH(C)
+ AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
+ AC_LANG_POP])
+ if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+ CFLAGS="$SAVE_CFLAGS"
+ fi
+ ;;
+esac
+
+need_locks="$enable_libtool_lock"
+])# _LT_AC_LOCK
+
+
+# AC_LIBTOOL_SYS_OLD_ARCHIVE
+# --------------------------
+AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE],
+[AC_CHECK_TOOL(AR, ar, false)
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
+_LT_DECL([], [AR], [1], [The archiver])
+_LT_DECL([], [AR_FLAGS], [1])
+
+AC_CHECK_TOOL(STRIP, strip, :)
+test -z "$STRIP" && STRIP=:
+_LT_DECL([], [STRIP], [1], [A symbol stripping program])
+
+AC_CHECK_TOOL(RANLIB, ranlib, :)
+test -z "$RANLIB" && RANLIB=:
+_LT_DECL([], [RANLIB], [1],
+ [Commands used to install an old-style archive])
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+ case $host_os in
+ openbsd*)
+ old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
+ ;;
+ *)
+ old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
+ ;;
+ esac
+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+fi
+_LT_DECL([], [old_postinstall_cmds], [2])
+_LT_DECL([], [old_postuninstall_cmds], [2])
+_LT_TAGDECL([], [old_archive_cmds], [2],
+ [Commands used to build an old-style archive])
+])# AC_LIBTOOL_SYS_OLD_ARCHIVE
+
+
+# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------------------
+# Check whether the given compiler option works
+AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
+[AC_REQUIRE([AC_OBJEXT])dnl
+AC_REQUIRE([LT_AC_PROG_SED])dnl
+AC_CACHE_CHECK([$1], [$2],
+ [$2=no
+ m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
+ printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$3"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
+ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test ! -s conftest.err; then
+ $2=yes
+ fi
+ fi
+ $rm conftest*
+])
+
+if test x"[$]$2" = xyes; then
+ m4_if([$5], , :, [$5])
+else
+ m4_if([$6], , :, [$6])
+fi
+])# AC_LIBTOOL_COMPILER_OPTION
+
+
+# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+# [ACTION-SUCCESS], [ACTION-FAILURE])
+# ------------------------------------------------------------
+# Check whether the given compiler option works
+m4_define([AC_LIBTOOL_LINKER_OPTION],
+[AC_CACHE_CHECK([$1], [$2],
+ [$2=no
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $3"
+ printf "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&AS_MESSAGE_LOG_FD
+ else
+ $2=yes
+ fi
+ fi
+ $rm conftest*
+ LDFLAGS="$save_LDFLAGS"
+])
+
+if test x"[$]$2" = xyes; then
+ m4_if([$4], , :, [$4])
+else
+ m4_if([$5], , :, [$5])
+fi
+])# AC_LIBTOOL_LINKER_OPTION
+
+
+# AC_LIBTOOL_SYS_MAX_CMD_LEN
+# --------------------------
+AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+# find the maximum length of command line arguments
+AC_MSG_CHECKING([the maximum length of command line arguments])
+AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
+ i=0
+ teststring="ABCD"
+
+ case $build_os in
+ msdosdjgpp*)
+ # On DJGPP, this test can blow up pretty badly due to problems in libc
+ # (any single argument exceeding 2000 bytes causes a buffer overrun
+ # during glob expansion). Even if it were fixed, the result of this
+ # check would be larger than it should be.
+ lt_cv_sys_max_cmd_len=12288; # 12K is about right
+ ;;
+
+ gnu*)
+ # Under GNU Hurd, this test is not required because there is
+ # no limit to the length of command line arguments.
+ # Libtool will interpret -1 as no limit whatsoever
+ lt_cv_sys_max_cmd_len=-1;
+ ;;
+
+ cygwin* | mingw*)
+ # On Win9x/ME, this test blows up -- it succeeds, but takes
+ # about 5 minutes as the teststring grows exponentially.
+ # Worse, since 9x/ME are not pre-emptively multitasking,
+ # you end up with a "frozen" computer, even though with patience
+ # the test eventually succeeds (with a max line length of 256k).
+ # Instead, let's just punt: use the minimum linelength reported by
+ # all of the supported platforms: 8192 (on NT/2K/XP).
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ amigaos*)
+ # On AmigaOS with pdksh, this test takes hours, literally.
+ # So we just punt and use a minimum line length of 8192.
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ *)
+ # Make teststring a little bigger before we do anything with it.
+ # a 1K string should be a reasonable start.
+ for i in 1 2 3 4 5 6 7 8 ; do
+ teststring=$teststring$teststring
+ done
+ # If test is not a shell built-in, we'll probably end up computing a
+ # maximum length that is only half of the actual maximum length, but
+ # we can't tell.
+ while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
+ = "XX$teststring$teststring") >/dev/null 2>&1 &&
+ test $i != 17 # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ teststring=$teststring$teststring
+ done
+ # Only check the string length outside the loop.
+ lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+ teststring=
+ # Add a significant safety factor because C++ compilers can tack on massive
+ # amounts of additional arguments before passing them to the linker.
+ # It appears as though 1/2 is a usable value.
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+ ;;
+ esac
+])
+if test -n $lt_cv_sys_max_cmd_len ; then
+ AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
+else
+ AC_MSG_RESULT(none)
+fi
+_LT_DECL([max_cmd_len], [lt_cv_sys_max_cmd_len], [0],
+ [What is the maximum length of a command?])
+])# AC_LIBTOOL_SYS_MAX_CMD_LEN
+
+
+# _LT_AC_CHECK_DLFCN
+# --------------------
+AC_DEFUN([_LT_AC_CHECK_DLFCN],
+[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
+])# _LT_AC_CHECK_DLFCN
+
+
+# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
+# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
+# ------------------------------------------------------------------
+AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
+[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
+if test "$cross_compiling" = yes; then :
+ [$4]
+else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+[#line __oline__ "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+#ifdef __cplusplus
+extern "C" void exit (int);
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ /* dlclose (self); */
+ }
+
+ exit (status);
+}]
+_LT_EOF
+ if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
+ (./conftest; exit; ) 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) $1 ;;
+ x$lt_dlneed_uscore) $2 ;;
+ x$lt_unknown|x*) $3 ;;
+ esac
+ else :
+ # compilation failed
+ $3
+ fi
+fi
+rm -fr conftest*
+])# _LT_AC_TRY_DLOPEN_SELF
+
+
+# AC_LIBTOOL_DLOPEN_SELF
+# -------------------
+AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
+[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
+if test "x$enable_dlopen" != xyes; then
+ enable_dlopen=unknown
+ enable_dlopen_self=unknown
+ enable_dlopen_self_static=unknown
+else
+ lt_cv_dlopen=no
+ lt_cv_dlopen_libs=
+
+ case $host_os in
+ beos*)
+ lt_cv_dlopen="load_add_on"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ;;
+
+ mingw* | pw32*)
+ lt_cv_dlopen="LoadLibrary"
+ lt_cv_dlopen_libs=
+ ;;
+
+ cygwin*)
+ lt_cv_dlopen="dlopen"
+ lt_cv_dlopen_libs=
+ ;;
+
+ darwin*)
+ # if libdl is installed we need to link against it
+ AC_CHECK_LIB([dl], [dlopen],
+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
+ lt_cv_dlopen="dyld"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ])
+ ;;
+
+ *)
+ AC_CHECK_FUNC([shl_load],
+ [lt_cv_dlopen="shl_load"],
+ [AC_CHECK_LIB([dld], [shl_load],
+ [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
+ [AC_CHECK_FUNC([dlopen],
+ [lt_cv_dlopen="dlopen"],
+ [AC_CHECK_LIB([dl], [dlopen],
+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
+ [AC_CHECK_LIB([svld], [dlopen],
+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
+ [AC_CHECK_LIB([dld], [dld_link],
+ [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
+ ])
+ ])
+ ])
+ ])
+ ])
+ ;;
+ esac
+
+ if test "x$lt_cv_dlopen" != xno; then
+ enable_dlopen=yes
+ else
+ enable_dlopen=no
+ fi
+
+ case $lt_cv_dlopen in
+ dlopen)
+ save_CPPFLAGS="$CPPFLAGS"
+ test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+ save_LDFLAGS="$LDFLAGS"
+ eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+ save_LIBS="$LIBS"
+ LIBS="$lt_cv_dlopen_libs $LIBS"
+
+ AC_CACHE_CHECK([whether a program can dlopen itself],
+ lt_cv_dlopen_self, [dnl
+ _LT_AC_TRY_DLOPEN_SELF(
+ lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
+ lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
+ ])
+
+ if test "x$lt_cv_dlopen_self" = xyes; then
+ LDFLAGS="$LDFLAGS $link_static_flag"
+ AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
+ lt_cv_dlopen_self_static, [dnl
+ _LT_AC_TRY_DLOPEN_SELF(
+ lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
+ lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
+ ])
+ fi
+
+ CPPFLAGS="$save_CPPFLAGS"
+ LDFLAGS="$save_LDFLAGS"
+ LIBS="$save_LIBS"
+ ;;
+ esac
+
+ case $lt_cv_dlopen_self in
+ yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+ *) enable_dlopen_self=unknown ;;
+ esac
+
+ case $lt_cv_dlopen_self_static in
+ yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+ *) enable_dlopen_self_static=unknown ;;
+ esac
+fi
+_LT_DECL([dlopen_support], [enable_dlopen], [0],
+ [Whether dlopen is supported])
+_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
+ [Whether dlopen of programs is supported])
+_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
+ [Whether dlopen of statically linked programs is supported])
+])# AC_LIBTOOL_DLOPEN_SELF
+
+
+# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
+# ---------------------------------
+# Check to see if options -c and -o are simultaneously supported by compiler
+AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
+[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
+AC_REQUIRE([AC_OBJEXT])dnl
+AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
+ [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
+ [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
+ $rm -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
+ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&AS_MESSAGE_LOG_FD
+ echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test ! -s out/conftest.err; then
+ _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+ fi
+ fi
+ chmod u+w .
+ $rm conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
+ $rm out/* && rmdir out
+ cd ..
+ rmdir conftest
+ $rm conftest*
+])
+_LT_DECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
+ [Does compiler simultaneously support -c and -o options?])
+])# AC_LIBTOOL_PROG_CC_C_O
+
+
+# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
+# -----------------------------------------
+# Check to see if we can do hard links to lock some files if needed
+AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
+[AC_REQUIRE([AC_LIBTOOL_PROG_CC_C_O])dnl
+AC_REQUIRE([_LT_AC_LOCK])dnl
+
+hard_links="nottested"
+if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
+ # do not overwrite the value of need_locks provided by the user
+ AC_MSG_CHECKING([if we can lock with hard links])
+ hard_links=yes
+ $rm conftest*
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ touch conftest.a
+ ln conftest.a conftest.b 2>&5 || hard_links=no
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ AC_MSG_RESULT([$hard_links])
+ if test "$hard_links" = no; then
+ AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
+ need_locks=warn
+ fi
+else
+ need_locks=no
+fi
+_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
+])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
+
+
+# AC_LIBTOOL_OBJDIR
+# -----------------
+AC_DEFUN([AC_LIBTOOL_OBJDIR],
+[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
+[rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+ lt_cv_objdir=.libs
+else
+ # MS-DOS does not allow filenames that begin with a dot.
+ lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null])
+objdir=$lt_cv_objdir
+_LT_DECL([], [objdir], [0],
+ [The name of the directory that contains temporary libtool files])dnl
+])# AC_LIBTOOL_OBJDIR
+
+
+# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
+# ----------------------------------------------
+# Check hardcoding attributes.
+AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
+[AC_MSG_CHECKING([how to hardcode library paths into programs])
+_LT_AC_TAGVAR(hardcode_action, $1)=
+if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
+ test -n "$_LT_AC_TAGVAR(runpath_var $1)" ||
+ test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then
+
+ # We can hardcode non-existant directories.
+ if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
+ # If the only mechanism to avoid hardcoding is shlibpath_var, we
+ # have to relink, otherwise we might link with an installed library
+ # when we should be linking with a yet-to-be-installed one
+ ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
+ test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
+ # Linking always hardcodes the temporary library directory.
+ _LT_AC_TAGVAR(hardcode_action, $1)=relink
+ else
+ # We can link without hardcoding, and we can hardcode nonexisting dirs.
+ _LT_AC_TAGVAR(hardcode_action, $1)=immediate
+ fi
+else
+ # We cannot hardcode anything, or else we can only hardcode existing
+ # directories.
+ _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
+fi
+AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
+
+if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink ||
+ test "$_LT_AC_TAGVAR(inherit_rpath, $1)" = yes; then
+ # Fast installation is not supported
+ enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+ test "$enable_shared" = no; then
+ # Fast installation is not necessary
+ enable_fast_install=needless
+fi
+_LT_TAGDECL([], [hardcode_action], [0],
+ [How to hardcode a shared library path into an executable])
+])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
+
+
+# AC_LIBTOOL_SYS_LIB_STRIP
+# ------------------------
+AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
+[AC_REQUIRE([LT_AC_PROG_EGREP])
+striplib=
+old_striplib=
+AC_MSG_CHECKING([whether stripping libraries is possible])
+if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+ test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+ test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+ AC_MSG_RESULT([yes])
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+ case $host_os in
+ darwin*)
+ if test -n "$STRIP" ; then
+ striplib="$STRIP -x"
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+fi
+ ;;
+ *)
+ AC_MSG_RESULT([no])
+ ;;
+ esac
+fi
+_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
+_LT_DECL([], [striplib], [1])
+])# AC_LIBTOOL_SYS_LIB_STRIP
+
+
+# AC_LIBTOOL_SYS_DYNAMIC_LINKER
+# -----------------------------
+# PORTME Fill in your ld.so characteristics
+AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
+[AC_REQUIRE([LT_AC_PROG_EGREP])
+AC_MSG_CHECKING([dynamic linker characteristics])
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+if test "$GCC" = yes; then
+ sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if echo "$sys_lib_search_path_spec" | $GREP ';' >/dev/null ; then
+ # if the path contains ";" then we assume it to be the separator
+ # otherwise default to the standard path separator (i.e. ":") - it is
+ # assumed that no part of a normal pathname contains ";" but that should
+ # okay in the real world where ";" in dirpaths is itself problematic.
+ sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+else
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+ shlibpath_var=LIBPATH
+
+ # AIX 3 has no versioning support, so we append a major version to the name.
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+
+aix4* | aix5*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ hardcode_into_libs=yes
+ if test "$host_cpu" = ia64; then
+ # AIX 5 supports IA64
+ library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ else
+ # With GCC up to 2.95.x, collect2 would create an import file
+ # for dependence libraries. The import file would start with
+ # the line `#! .'. This would cause the generated library to
+ # depend on `.', always an invalid library. This was fixed in
+ # development snapshots of GCC prior to 3.0.
+ case $host_os in
+ aix4 | aix4.[[01]] | aix4.[[01]].*)
+ if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+ echo ' yes '
+ echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+ :
+ else
+ can_build_shared=no
+ fi
+ ;;
+ esac
+ # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+ # soname into executable. Probably we can add versioning support to
+ # collect2, so additional links can be useful in future.
+ if test "$aix_use_runtimelinking" = yes; then
+ # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+ # instead of lib<name>.a to let people know that these are not
+ # typical AIX shared libraries.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ else
+ # We preserve .a as extension for shared libraries through AIX4.2
+ # and later when we are not doing run time linking.
+ library_names_spec='${libname}${release}.a $libname.a'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ fi
+ shlibpath_var=LIBPATH
+ fi
+ ;;
+
+amigaos*)
+ if test "$host_cpu" = m68k; then
+ library_names_spec='$libname.ixlibrary $libname.a'
+ # Create ${libname}_ixlibrary.a entries in /sys/libs.
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+ else
+ dynamic_linker=no
+ fi
+ ;;
+
+beos*)
+ library_names_spec='${libname}${shared_ext}'
+ dynamic_linker="$host_os ld.so"
+ shlibpath_var=LIBRARY_PATH
+ ;;
+
+bsdi4*)
+ version_type=linux
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+ # the default ld.so.conf also contains /usr/contrib/lib and
+ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+ # libtool to hard-code these into programs
+ ;;
+
+cygwin* | mingw* | pw32*)
+ version_type=windows
+ shrext_cmds=".dll"
+ need_version=no
+ need_lib_prefix=no
+
+ case $GCC,$host_os in
+ yes,cygwin* | yes,mingw* | yes,pw32*)
+ library_names_spec='$libname.dll.a'
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \${file}`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $rm \$dlpath'
+ shlibpath_overrides_runpath=yes
+
+ case $host_os in
+ cygwin*)
+ # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+ soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+ sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+ ;;
+ mingw*)
+ # MinGW DLLs use traditional 'lib' prefix
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+ sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if echo "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
+ # It is most probably a Windows format PATH printed by
+ # mingw gcc, but we are running on Cygwin. Gcc prints its search
+ # path with ; separators, and with drive letters. We can handle the
+ # drive letters (cygwin fileutils understands them), so leave them,
+ # especially as we might pass files found there to a mingw objdump,
+ # which wouldn't understand a cygwinified path. Ahh.
+ sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ ;;
+ pw32*)
+ # pw32 DLLs use 'pw' prefix rather than 'lib'
+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ ;;
+ esac
+ ;;
+
+ *)
+ library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
+ ;;
+ esac
+ dynamic_linker='Win32 ld.exe'
+ # FIXME: first we should search . and the directory the executable is in
+ shlibpath_var=PATH
+ ;;
+
+darwin* | rhapsody*)
+ dynamic_linker="$host_os dyld"
+ version_type=darwin
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+ soname_spec='${libname}${release}${major}$shared_ext'
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+ shrext_cmds='$(test .$module = .yes && echo .so || echo .dylib)'
+ # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
+ if test "$GCC" = yes; then
+ sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | $GREP "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
+ else
+ sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
+ fi
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
+
+dgux*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+freebsd1*)
+ dynamic_linker=no
+ ;;
+
+kfreebsd*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='GNU ld.so'
+ ;;
+
+freebsd*)
+ objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
+ version_type=freebsd-$objformat
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ need_version=no
+ need_lib_prefix=no
+ ;;
+ freebsd-*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ need_version=yes
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+ freebsd2*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[01]* | freebsdelf3.[01]*)
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ *) # from 3.2 on
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+ esac
+ ;;
+
+gnu*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ hardcode_into_libs=yes
+ ;;
+
+hpux9* | hpux10* | hpux11*)
+ # Give a soname corresponding to the major version so that dld.sl refuses to
+ # link against other versions.
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ case "$host_cpu" in
+ ia64*)
+ shrext_cmds='.so'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.so"
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ if test "X$HPUX_IA64_MODE" = X32; then
+ sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+ else
+ sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+ fi
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ hppa*64*)
+ shrext_cmds='.sl'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ *)
+ shrext_cmds='.sl'
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=SHLIB_PATH
+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+ esac
+ # HP-UX runs *really* slowly unless shared libraries are mode 555.
+ postinstall_cmds='chmod 555 $lib'
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $host_os in
+ nonstopux*) version_type=nonstopux ;;
+ *)
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ version_type=linux
+ else
+ version_type=irix
+ fi ;;
+ esac
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+ case $host_os in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in # libtool.m4 will add one of these switches to LD
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+ libsuff= shlibsuff= libmagic=32-bit;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+ libsuff=32 shlibsuff=N32 libmagic=N32;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+ libsuff=64 shlibsuff=64 libmagic=64-bit;;
+ *) libsuff= shlibsuff= libmagic=never-match;;
+ esac
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+ sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+ hardcode_into_libs=yes
+ ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+ dynamic_linker=no
+ ;;
+
+# This must be Linux ELF.
+linux*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ # Append ld.so.conf contents to the search path
+ if test -f /etc/ld.so.conf; then
+ lt_ld_extra=`$SED -e 's/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g' /etc/ld.so.conf | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ fi
+
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
+ # powerpc, because MkLinux only supported shared libraries with the
+ # GNU dynamic linker. Since this was broken with cross compilers,
+ # most powerpc-linux boxes support dynamic linking these days and
+ # people can always --disable-shared, the test was removed, and we
+ # assume the GNU/Linux dynamic linker is in use.
+ dynamic_linker='GNU/Linux ld.so'
+ ;;
+
+knetbsd*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='GNU ld.so'
+ ;;
+
+netbsd*)
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ dynamic_linker='NetBSD (a.out) ld.so'
+ else
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='NetBSD ld.elf_so'
+ fi
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+
+newsos6)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ ;;
+
+nto-qnx*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ ;;
+
+openbsd*)
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=yes
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ case $host_os in
+ openbsd2.[[89]] | openbsd2.[[89]].*)
+ shlibpath_overrides_runpath=no
+ ;;
+ *)
+ shlibpath_overrides_runpath=yes
+ ;;
+ esac
+ else
+ shlibpath_overrides_runpath=yes
+ fi
+ ;;
+
+os2*)
+ libname_spec='$name'
+ shrext_cmds=".dll"
+ need_lib_prefix=no
+ library_names_spec='$libname${shared_ext} $libname.a'
+ dynamic_linker='OS/2 ld.exe'
+ shlibpath_var=LIBPATH
+ ;;
+
+osf3* | osf4* | osf5*)
+ version_type=osf
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+ ;;
+
+sco3.2v5*)
+ version_type=osf
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+solaris*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ # ldd complains unless libraries are executable
+ postinstall_cmds='chmod +x $lib'
+ ;;
+
+sunos4*)
+ version_type=sunos
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ if test "$with_gnu_ld" = yes; then
+ need_lib_prefix=no
+ fi
+ need_version=yes
+ ;;
+
+sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_vendor in
+ sni)
+ shlibpath_overrides_runpath=no
+ need_lib_prefix=no
+ runpath_var=LD_RUN_PATH
+ ;;
+ siemens)
+ need_lib_prefix=no
+ ;;
+ motorola)
+ need_lib_prefix=no
+ need_version=no
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+ ;;
+ esac
+ ;;
+
+sysv4*MP*)
+ if test -d /usr/nec ;then
+ version_type=linux
+ library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+ soname_spec='$libname${shared_ext}.$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ fi
+ ;;
+
+uts4*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+*)
+ dynamic_linker=no
+ ;;
+esac
+AC_MSG_RESULT([$dynamic_linker])
+test "$dynamic_linker" = no && can_build_shared=no
+_LT_DECL([], [need_lib_prefix], [0],
+ [Do we need the "lib" prefix for modules?])
+_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
+_LT_DECL([], [version_type], [0], [Library versioning type])
+_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
+_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
+_LT_DECL([], [shlibpath_overrides_runpath], [0],
+ [Is shibpath searched before the hard-coded library search path?])
+_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
+_LT_DECL([], [library_names_spec], [1],
+ [List of archive names. First name is the real one, the rest are links.
+ The last name is the one that the linker finds with -lNAME])
+_LT_DECL([], [soname_spec], [1],
+ [The coded name of the library, if different from the real name])
+_LT_DECL([], [postinstall_cmds], [2],
+ [Command to use after installation of a shared archive])
+_LT_DECL([], [postuninstall_cmds], [2],
+ [Command to use after uninstallation of a shared archive])
+_LT_DECL([], [finish_cmds], [2],
+ [Commands used to finish a libtool library installation in a directory])
+_LT_DECL([], [finish_eval], [1],
+ [As "finish_cmds", except a single script fragment to be evaled but
+ not shown])
+_LT_DECL([], [hardcode_into_libs], [0],
+ [Whether we should hardcode library paths into libraries])
+_LT_DECL([], [sys_lib_search_path_spec], [2],
+ [Compile-time system search path for libraries])
+_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
+ [Run-time system search path for libraries])
+])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
+
+
+# AC_PATH_TOOL_PREFIX
+# -------------------
+# find a file program which can recognise shared library
+AC_DEFUN([AC_PATH_TOOL_PREFIX],
+[AC_REQUIRE([LT_AC_PROG_EGREP])dnl
+AC_MSG_CHECKING([for $1])
+AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
+[case $MAGIC_CMD in
+[[\\/*] | ?:[\\/]*])
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ ;;
+*)
+ lt_save_MAGIC_CMD="$MAGIC_CMD"
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+dnl $ac_dummy forces splitting on constant user-supplied paths.
+dnl POSIX.2 word splitting is done only on the output of word expansions,
+dnl not every word. This closes a longstanding sh security hole.
+ ac_dummy="m4_if([$2], , $PATH, [$2])"
+ for ac_dir in $ac_dummy; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$1; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/$1"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+ MAGIC_CMD="$lt_save_MAGIC_CMD"
+ ;;
+esac])
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+ AC_MSG_RESULT($MAGIC_CMD)
+else
+ AC_MSG_RESULT(no)
+fi
+_LT_DECL([], [MAGIC_CMD], [0],
+ [Used to examine libraries when file_magic_cmd begins "file"])dnl
+])# AC_PATH_TOOL_PREFIX
+
+
+# AC_PATH_MAGIC
+# -------------
+# find a file program which can recognise a shared library
+AC_DEFUN([AC_PATH_MAGIC],
+[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+ if test -n "$ac_tool_prefix"; then
+ AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
+ else
+ MAGIC_CMD=:
+ fi
+fi
+])# AC_PATH_MAGIC
+
+
+# AC_PROG_LD
+# ----------
+# find the pathname to the GNU or non-GNU linker
+AC_DEFUN([AC_PROG_LD],
+[AC_ARG_WITH([gnu-ld],
+ [AC_HELP_STRING([--with-gnu-ld],
+ [assume the C compiler uses GNU ld @<:@default=no@:>@])],
+ [test "$withval" = no || with_gnu_ld=yes],
+ [with_gnu_ld=no])
+AC_REQUIRE([LT_AC_PROG_SED])dnl
+AC_REQUIRE([LT_AC_PROG_EGREP])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ AC_MSG_CHECKING([for ld used by $CC])
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [[\\/]]* | ?:[[\\/]]*)
+ re_direlt='/[[^/]][[^/]]*/\.\./'
+ # Canonicalize the pathname of ld
+ ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
+ while echo $ac_prog | $GREP "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ AC_MSG_CHECKING([for GNU ld])
+else
+ AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(lt_cv_path_LD,
+[if test -z "$LD"; then
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ lt_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some GNU ld's only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break
+ ;;
+ *)
+ test "$with_gnu_ld" != yes && break
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+else
+ lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+ AC_MSG_RESULT($LD)
+else
+ AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+AC_PROG_LD_GNU
+AC_SUBST([LD])
+
+_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
+])# AC_PROG_LD
+
+# Old name:
+AU_DEFUN([AM_PROG_LD], [AC_PROG_LD])
+
+
+# AC_PROG_LD_GNU
+# --------------
+AC_DEFUN([AC_PROG_LD_GNU],
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+*)
+ lt_cv_prog_gnu_ld=no
+ ;;
+esac])
+with_gnu_ld=$lt_cv_prog_gnu_ld
+])# AC_PROG_LD_GNU
+
+
+# AC_PROG_LD_RELOAD_FLAG
+# ----------------------
+# find reload flag for linker
+# -- PORTME Some linkers may need a different reload flag.
+AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
+[AC_CACHE_CHECK([for $LD option to reload object files],
+ lt_cv_ld_reload_flag,
+ [lt_cv_ld_reload_flag='-r'])
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+ darwin*)
+ if test "$GCC" = yes; then
+ reload_cmds='$CC -nostdlib ${wl}-r -o $output$reload_objs'
+ else
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
+ fi
+ ;;
+esac
+_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
+_LT_DECL([], [reload_cmds], [2])dnl
+])# AC_PROG_LD_RELOAD_FLAG
+
+
+# AC_DEPLIBS_CHECK_METHOD
+# -----------------------
+# how to check for library dependencies
+# -- PORTME fill in with the dynamic library characteristics
+AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
+[AC_REQUIRE([LT_AC_PROG_EGREP])
+AC_CACHE_CHECK([how to recognise dependent libraries],
+lt_cv_deplibs_check_method,
+[lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix4* | aix5*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+beos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+bsdi4*)
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
+ lt_cv_file_magic_test_file=/shlib/libc.so
+ ;;
+
+cygwin*)
+ # func_win32_libid is a shell function defined in ltmain.sh
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ ;;
+
+ # Base MSYS/MinGW do not provide the 'file' command needed by
+ # func_win32_libid shell function, so use a weaker test based on 'objdump'.
+mingw* | pw32*)
+ lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ ;;
+
+darwin* | rhapsody*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+freebsd* | kfreebsd*-gnu)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ case $host_cpu in
+ i*86 )
+ # Not sure whether the presence of OpenBSD here was a mistake.
+ # Let's accept both of them until this is cleared up.
+ lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+ ;;
+ esac
+ else
+ lt_cv_deplibs_check_method=pass_all
+ fi
+ ;;
+
+gnu*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+hpux10.20* | hpux11*)
+ lt_cv_file_magic_cmd=/usr/bin/file
+ case "$host_cpu" in
+ ia64*)
+ lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
+ lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+ ;;
+ hppa*64*)
+ [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
+ lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+ ;;
+ *)
+ lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
+ lt_cv_file_magic_test_file=/usr/lib/libc.sl
+ ;;
+ esac
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $LD in
+ *-32|*"-32 ") libmagic=32-bit;;
+ *-n32|*"-n32 ") libmagic=N32;;
+ *-64|*"-64 ") libmagic=64-bit;;
+ *) libmagic=never-match;;
+ esac
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+# This must be Linux ELF.
+linux*)
+ case $host_cpu in
+ alpha*|hppa*|i*86|ia64*|m68*|mips*|powerpc*|sparc*|s390*|sh*)
+ lt_cv_deplibs_check_method=pass_all ;;
+ *)
+ # glibc up to 2.1.1 does not perform some relocations on ARM
+ # this will be overridden with pass_all, but let us keep it just in case
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
+ esac
+ lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+netbsd* | knetbsd*-gnu)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
+ fi
+ ;;
+
+newos6*)
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=/usr/lib/libnls.so
+ ;;
+
+nto-qnx*)
+ lt_cv_deplibs_check_method=unknown
+ ;;
+
+openbsd*)
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
+ else
+ lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
+ fi
+ ;;
+
+osf3* | osf4* | osf5*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sco3.2v5*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+solaris*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ case $host_vendor in
+ motorola)
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+ ;;
+ ncr)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ sequent)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
+ ;;
+ sni)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
+ lt_cv_file_magic_test_file=/lib/libc.so
+ ;;
+ siemens)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ esac
+ ;;
+
+sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+esac
+])
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+
+_LT_DECL([], [deplibs_check_method], [1],
+ [Method to check whether dependent libraries are shared objects])
+_LT_DECL([], [file_magic_cmd], [1],
+ [Command to use when deplibs_check_method == "file_magic"])
+])# AC_DEPLIBS_CHECK_METHOD
+
+
+# AC_PROG_NM
+# ----------
+# find the pathname to a BSD-compatible name lister
+AC_DEFUN([AC_PROG_NM],
+[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
+[if test -n "$NM"; then
+ # Let the user override the test.
+ lt_cv_path_NM="$NM"
+else
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ tmp_nm="$ac_dir/${ac_tool_prefix}nm"
+ if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+ # Check to see if the nm accepts a BSD-compat flag.
+ # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+ # nm: unknown option "B" ignored
+ # Tru64's nm complains that /dev/null is an invalid object file
+ case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+ */dev/null* | *'Invalid file or object type'*)
+ lt_cv_path_NM="$tmp_nm -B"
+ break
+ ;;
+ *)
+ case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+ */dev/null*)
+ lt_cv_path_NM="$tmp_nm -p"
+ break
+ ;;
+ *)
+ lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+ continue # so that we can try to find one that supports BSD flags
+ ;;
+ esac
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+ test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
+fi])
+NM="$lt_cv_path_NM"
+test -z "$NM" && NM=nm
+AC_SUBST([NM])
+_LT_DECL([], [NM], [1], [A BSD-compatible nm program])dnl
+])# AC_PROG_NM
+
+# Old name:
+AU_DEFUN([AM_PROG_NM], [AC_PROG_NM])
+
+
+# AC_CHECK_LIBM
+# -------------
+# check for math library
+AC_DEFUN([AC_CHECK_LIBM],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+LIBM=
+case $host in
+*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
+ # These system don't have libm, or don't need it
+ ;;
+*-ncr-sysv4.3*)
+ AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
+ AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
+ ;;
+*)
+ AC_CHECK_LIB(m, cos, LIBM="-lm")
+ ;;
+esac
+])# AC_CHECK_LIBM
+
+
+# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
+# -----------------------------------
+# sets LIBLTDL to the link flags for the libltdl convenience library and
+# LTDLINCL to the include flags for the libltdl header and adds
+# --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
+# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
+# DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
+# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
+# '${top_srcdir}/' (note the single quotes!). If your package is not
+# flat and you're not using automake, define top_builddir and
+# top_srcdir appropriately in the Makefiles.
+AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
+[case $enable_ltdl_convenience in
+ no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
+ "") enable_ltdl_convenience=yes
+ ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
+ esac
+ LIBLTDL='${top_builddir}/'m4_if($#, 1,[$1], ['libltdl'])/libltdlc.la
+ LTDLINCL='-I${top_srcdir}/'m4_if($#, 1, [$1], ['libltdl'])
+ # For backwards non-gettext consistent compatibility...
+ INCLTDL="$LTDLINCL"
+])# AC_LIBLTDL_CONVENIENCE
+
+
+# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
+# -----------------------------------
+# sets LIBLTDL to the link flags for the libltdl installable library and
+# LTDLINCL to the include flags for the libltdl header and adds
+# --enable-ltdl-install to the configure arguments. Note that LIBLTDL
+# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
+# DIRECTORY is not provided and an installed libltdl is not found, it is
+# assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
+# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
+# quotes!). If your package is not flat and you're not using automake,
+# define top_builddir and top_srcdir appropriately in the Makefiles.
+# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
+AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
+[AC_CHECK_LIB(ltdl, lt_dlinit,
+ [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
+ [if test x"$enable_ltdl_install" = xno; then
+ AC_MSG_WARN([libltdl not installed, but installation disabled])
+ else
+ enable_ltdl_install=yes
+ fi
+ ])
+ if test x"$enable_ltdl_install" = x"yes"; then
+ ac_configure_args="$ac_configure_args --enable-ltdl-install"
+ LIBLTDL='${top_builddir}/'m4_if($#, 1, [$1], ['libltdl'])/libltdl.la
+ LTDLINCL='-I${top_srcdir}/'m4_if($#, 1, [$1], ['libltdl'])
+ else
+ ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
+ LIBLTDL="-lltdl"
+ LTDLINCL=
+ fi
+ # For backwards non-gettext consistent compatibility...
+ INCLTDL="$LTDLINCL"
+])# AC_LIBLTDL_INSTALLABLE
+
+
+# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
+# -------------------------------------------
+AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
+[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
+
+_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+
+if test "$GCC" = yes; then
+ _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+
+ AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
+ lt_cv_prog_compiler_rtti_exceptions,
+ [-fno-rtti -fno-exceptions], [],
+ [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
+fi
+_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
+ [Compiler flag to turn off builtin functions])
+])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
+
+
+# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
+# ---------------------------------
+AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([LT_AC_PROG_EGREP])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_PROG_LD])dnl
+AC_REQUIRE([AC_PROG_NM])dnl
+AC_REQUIRE([AC_OBJEXT])dnl
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+AC_MSG_CHECKING([command to parse $NM output from $compiler object])
+AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
+[
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix. What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[[BCDEGRST]]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
+
+# Transform the above into a raw symbol and a C symbol.
+symxfrm='\1 \2\3 \3'
+
+# Transform an extracted symbol line into a proper C declaration
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+ symcode='[[BCDT]]'
+ ;;
+cygwin* | mingw* | pw32*)
+ symcode='[[ABCDGISTW]]'
+ ;;
+hpux*) # Its linker distinguishes data from code symbols
+ if test "$host_cpu" = ia64; then
+ symcode='[[ABCDEGRST]]'
+ fi
+ lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+ lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
+ ;;
+irix* | nonstopux*)
+ symcode='[[BCDEGRST]]'
+ ;;
+osf*)
+ symcode='[[BCDEGQRST]]'
+ ;;
+solaris* | sysv5*)
+ symcode='[[BDRT]]'
+ ;;
+sysv4)
+ symcode='[[DFNSTU]]'
+ ;;
+esac
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+ opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+ ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+ symcode='[[ABCDGIRSTW]]' ;;
+esac
+
+# Try without a prefix undercore, then with it.
+for ac_symprfx in "" "_"; do
+
+ # Write the raw and C identifiers.
+ lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
+
+ # Check to see that the pipe works correctly.
+ pipe_works=no
+
+ rm -f conftest*
+ cat > conftest.$ac_ext <<_LT_EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+_LT_EOF
+
+ if AC_TRY_EVAL(ac_compile); then
+ # Now try to grab the symbols.
+ nlist=conftest.nm
+ if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
+ # Try sorting and uniquifying the output.
+ if sort "$nlist" | uniq > "$nlist"T; then
+ mv -f "$nlist"T "$nlist"
+ else
+ rm -f "$nlist"T
+ fi
+
+ # Make sure that we snagged all the symbols we need.
+ if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+ if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+ cat <<_LT_EOF > conftest.$ac_ext
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+_LT_EOF
+ # Now generate the symbol file.
+ eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
+
+ cat <<_LT_EOF >> conftest.$ac_ext
+#if defined (__STDC__) && __STDC__
+# define lt_ptr_t void *
+#else
+# define lt_ptr_t char *
+# define const
+#endif
+
+/* The mapping between symbol names and symbols. */
+const struct {
+ const char *name;
+ lt_ptr_t address;
+}
+lt_preloaded_symbols[[]] =
+{
+_LT_EOF
+ $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+ cat <<\_LT_EOF >> conftest.$ac_ext
+ {0, (lt_ptr_t) 0}
+};
+
+#ifdef __cplusplus
+}
+#endif
+_LT_EOF
+ # Now try linking the two files.
+ mv conftest.$ac_objext conftstm.$ac_objext
+ lt_save_LIBS="$LIBS"
+ lt_save_CFLAGS="$CFLAGS"
+ LIBS="conftstm.$ac_objext"
+ CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
+ if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
+ pipe_works=yes
+ fi
+ LIBS="$lt_save_LIBS"
+ CFLAGS="$lt_save_CFLAGS"
+ else
+ echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
+ cat conftest.$ac_ext >&5
+ fi
+ rm -f conftest* conftst*
+
+ # Do not use the global_symbol_pipe unless it works.
+ if test "$pipe_works" = yes; then
+ break
+ else
+ lt_cv_sys_global_symbol_pipe=
+ fi
+done
+])
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+ lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+ AC_MSG_RESULT(failed)
+else
+ AC_MSG_RESULT(ok)
+fi
+
+_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
+ [Take the output of nm and produce a listing of raw symbols and C names])
+_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
+ [Transform the output of nm in a proper C declaration])
+_LT_DECL([global_symbol_to_c_name_address],
+ [lt_cv_sys_global_symbol_to_c_name_address], [1],
+ [Transform the output of nm in a C name address pair])
+]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
+
+
+# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
+# ---------------------------------------
+AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
+[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
+_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
+
+AC_MSG_CHECKING([for $compiler option to produce PIC])
+m4_if([$1], [CXX], [
+ # C++ specific cases for pic, static, wl, etc.
+ if test "$GXX" = yes; then
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+ ;;
+ amigaos*)
+ if test "$host_cpu" = m68k; then
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+ fi
+ ;;
+ beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+ mingw* | os2* | pw32*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+ ;;
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+ ;;
+ *djgpp*)
+ # DJGPP does not support shared libraries at all
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+ ;;
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+ fi
+ ;;
+ hpux*)
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+ # not for PA HP-UX.
+ case "$host_cpu" in
+ hppa*64*|ia64*)
+ ;;
+ *)
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ ;;
+ *)
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ else
+ case $host_os in
+ aix4* | aix5*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ else
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+ chorus*)
+ case $cc_basename in
+ cxch68)
+ # Green Hills C++ Compiler
+ # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+ ;;
+ esac
+ ;;
+ darwin*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ case "$cc_basename" in
+ xlc*)
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ ;;
+ esac
+ ;;
+ dgux*)
+ case $cc_basename in
+ ec++)
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ ;;
+ ghcx)
+ # Green Hills C++ Compiler
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ freebsd* | kfreebsd*-gnu)
+ # FreeBSD uses GNU C++
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ case $cc_basename in
+ CC)
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
+ if test "$host_cpu" != ia64; then
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ fi
+ ;;
+ aCC)
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
+ case "$host_cpu" in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ ;;
+ esac
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ irix5* | irix6* | nonstopux*)
+ case $cc_basename in
+ CC)
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ # CC pic flag -KPIC is the default.
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ linux*)
+ case $cc_basename in
+ KCC)
+ # KAI C++ Compiler
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ icpc)
+ # Intel C++
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ cxx)
+ # Compaq C++
+ # Make sure the PIC flag is empty. It appears that all Alpha
+ # Linux and Compaq Tru64 Unix objects are PIC.
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ lynxos*)
+ ;;
+ m88k*)
+ ;;
+ mvs*)
+ case $cc_basename in
+ cxx)
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ netbsd*)
+ ;;
+ osf3* | osf4* | osf5*)
+ case $cc_basename in
+ KCC)
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+ ;;
+ RCC)
+ # Rational C++ 2.4.1
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ ;;
+ cxx)
+ # Digital/Compaq C++
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # Make sure the PIC flag is empty. It appears that all Alpha
+ # Linux and Compaq Tru64 Unix objects are PIC.
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ psos*)
+ ;;
+ sco*)
+ case $cc_basename in
+ CC)
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ solaris*)
+ case $cc_basename in
+ CC)
+ # Sun C++ 4.2, 5.x and Centerline C++
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ ;;
+ gcx)
+ # Green Hills C++ Compiler
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ sunos4*)
+ case $cc_basename in
+ CC)
+ # Sun C++ 4.x
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ lcc)
+ # Lucid
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ tandem*)
+ case $cc_basename in
+ NCC)
+ # NonStop-UX NCC 3.20
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ unixware*)
+ ;;
+ vxworks*)
+ ;;
+ *)
+ _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ ;;
+ esac
+ fi
+],
+[
+ if test "$GCC" = yes; then
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+ ;;
+
+ amigaos*)
+ if test "$host_cpu" = m68k; then
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+ fi
+ ;;
+
+ beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+
+ mingw* | pw32* | os2*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+ ;;
+
+ msdosdjgpp*)
+ # Just because we use GCC doesn't mean we suddenly get shared libraries
+ # on systems that don't support them.
+ _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ enable_shared=no
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+ fi
+ ;;
+
+ hpux*)
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+ # not for PA HP-UX.
+ case "$host_cpu" in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ ;;
+
+ *)
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ else
+ # PORTME Check for flag to pass linker flags through the system compiler.
+ case $host_os in
+ aix*)
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ else
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+ darwin*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ case "$cc_basename" in
+ xlc*)
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ ;;
+ esac
+ ;;
+
+ mingw* | pw32* | os2*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
+ ;;
+
+ hpux9* | hpux10* | hpux11*)
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+ # not for PA HP-UX.
+ case "$host_cpu" in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ ;;
+ esac
+ # Is there a better lt_prog_compiler_static that works with the bundled CC?
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # PIC (with -KPIC) is the default.
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+
+ newsos6)
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ linux*)
+ case $CC in
+ icc* | ecc*)
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ ccc*)
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # All Alpha code is PIC.
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+ esac
+ ;;
+
+ osf3* | osf4* | osf5*)
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # All OSF/1 code is PIC.
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+
+ sco3.2v5*)
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
+ ;;
+
+ solaris*)
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ sunos4*)
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec ;then
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+ ;;
+
+ uts4*)
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ *)
+ _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ ;;
+ esac
+ fi
+])
+case "$host_os" in
+ # For platforms which do not support PIC, -DPIC is meaningless:
+ *djgpp*)
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+ ;;
+ *)
+ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
+ ;;
+esac
+AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
+_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
+ [How to pass a linker flag through the compiler])
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
+ AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
+ [_LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1)],
+ [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
+ [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
+ "" | " "*) ;;
+ *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
+ esac],
+ [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
+fi
+_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
+ [Additional compiler flags for building library objects])
+
+#
+# Check to make sure the static flag actually works.
+#
+AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
+ _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
+ $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
+ [],
+ [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
+_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
+ [Compiler flag to prevent dynamic linking])
+])# AC_LIBTOOL_PROG_COMPILER_PIC
+
+
+# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
+# ------------------------------------
+# See if the linker supports building shared libraries.
+AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
+[AC_REQUIRE([LT_AC_PROG_EGREP])dnl
+AC_REQUIRE([AC_PROG_LD])dnl
+AC_REQUIRE([AC_PROG_NM])dnl
+AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
+AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+m4_if([$1], [CXX], [
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ case $host_os in
+ aix4* | aix5*)
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to AIX nm, but means don't demangle with GNU nm
+ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+ else
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+ fi
+ ;;
+ pw32*)
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
+ ;;
+ cygwin* | mingw*)
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
+ ;;
+ *)
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ ;;
+ esac
+], [
+ runpath_var=
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=
+ _LT_AC_TAGVAR(always_export_symbols, $1)=no
+ _LT_AC_TAGVAR(archive_cmds, $1)=
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
+ _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ _LT_AC_TAGVAR(hardcode_automatic, $1)=no
+ _LT_AC_TAGVAR(hardcode_direct, $1)=no
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+ _LT_AC_TAGVAR(inherit_rpath, $1)=no
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
+ _LT_AC_TAGVAR(module_cmds, $1)=
+ _LT_AC_TAGVAR(module_expsym_cmds, $1)=
+ _LT_AC_TAGVAR(old_archive_from_new_cmds, $1)=
+ _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
+ _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+ # include_expsyms should be a list of space-separated symbols to be *always*
+ # included in the symbol list
+ _LT_AC_TAGVAR(include_expsyms, $1)=
+ # exclude_expsyms can be an extended regexp of symbols to exclude
+ # it will be wrapped by ` (' and `)$', so one must not match beginning or
+ # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+ # as well as any symbol that contains `d'.
+ _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
+ # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+ # platforms (ab)use it in PIC code, but their linkers get confused if
+ # the symbol is explicitly referenced. Since portable code cannot
+ # rely on this symbol name, it's probably fine to never include it in
+ # preloaded symbol tables.
+ extract_expsyms_cmds=
+
+ case $host_os in
+ cygwin* | mingw* | pw32*)
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ if test "$GCC" != yes; then
+ with_gnu_ld=no
+ fi
+ ;;
+ openbsd*)
+ with_gnu_ld=no
+ ;;
+ esac
+
+ _LT_AC_TAGVAR(ld_shlibs, $1)=yes
+ if test "$with_gnu_ld" = yes; then
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ wlarc='${wl}'
+
+ # See if GNU ld supports shared libraries.
+ case $host_os in
+ aix3* | aix4* | aix5*)
+ # On AIX/PPC, the GNU linker is very broken
+ if test "$host_cpu" != ia64; then
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support. If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+_LT_EOF
+ fi
+ ;;
+
+ amigaos*)
+ if test "$host_cpu" = m68k; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+ fi
+
+ # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
+ # that the semantics of dynamic libraries on AmigaOS, at least up
+ # to version 4, is to share data among multiple programs linked
+ # with the same dynamic library. Since this doesn't match the
+ # behavior of shared libraries on other platforms, we can't use
+ # them.
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ else
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ cygwin* | mingw* | pw32*)
+ # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+ # as there is no search path for DLLs.
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_AC_TAGVAR(always_export_symbols, $1)=no
+ _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+ wlarc=
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ fi
+ ;;
+
+ solaris* | sysv5*)
+ if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ sunos4*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ wlarc=
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ linux*)
+ if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ case `$LD -v 2>&1` in
+ *\ [01].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+ *\ 2.11.*) ;; # other 2.11 versions
+ *) supports_anon_versioning=yes ;;
+ esac
+ if test "x$supports_anon_versioning" = xyes; then
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~$echo "local: *; };" >> $output_objdir/$libname.ver~$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ else
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)=$_LT_AC_TAGVAR(archive_cmds, $1)
+ fi
+ else
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ *)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+
+ if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
+ runpath_var=LD_RUN_PATH
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ else
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+ fi
+ fi
+ else
+ # PORTME fill in a description of your system's linker (not GNU ld)
+ case $host_os in
+ aix3*)
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+ # Note: this linker hardcodes the directories in LIBPATH if there
+ # are no directories specified by -L.
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+ if test "$GCC" = yes && test -z "$link_static_flag"; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
+ fi
+ ;;
+
+ aix4* | aix5*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ exp_sym_flag='-Bexport'
+ no_entry_flag=""
+ else
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to AIX nm, but means don't demangle with GNU nm
+ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+ else
+ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
+ fi
+ aix_use_runtimelinking=no
+
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # need to do runtime linking.
+ case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
+ for ld_flag in $LDFLAGS; do
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+ aix_use_runtimelinking=yes
+ break
+ fi
+ done
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+ _LT_AC_TAGVAR(archive_cmds, $1)=''
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+
+ if test "$GCC" = yes; then
+ case $host_os in aix4.[012]|aix4.[012].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" &&
+ strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ else
+ # We have old collect2
+ _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+ fi
+ esac
+ shared_flag='-shared'
+ else
+ # not using gcc
+ if test "$host_cpu" = ia64; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag='${wl}-G'
+ else
+ shared_flag='${wl}-bM:SRE'
+ fi
+ fi
+ fi
+
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to export.
+ _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+ if test "$aix_use_runtimelinking" = yes; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ _LT_AC_SYS_LIBPATH_AIX
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; then
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ _LT_AC_SYS_LIBPATH_AIX
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+ # -bexpall does not export symbols beginning with underscore (_)
+ _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+ # Exported symbols can be pulled into shared objects from archives
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+ # This is similar to how AIX traditionally builds it's shared libraries.
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
+
+ amigaos*)
+ if test "$host_cpu" = m68k; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+ fi
+ # see comment about different semantics on the GNU ld section
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ bsdi4*)
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
+ ;;
+
+ cygwin* | mingw* | pw32*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=".dll"
+ # FIXME: Setting linknames here is a bad hack.
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
+ # The linker will automatically build a .lib file if we build a DLL.
+ _LT_AC_TAGVAR(old_archive_from_new_cmds, $1)='true'
+ # FIXME: Should let the user specify the lib program.
+ _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
+ fix_srcfile_path='`cygpath -w "$srcfile"`'
+ _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ ;;
+
+ darwin* | rhapsody*)
+ case "$host_os" in
+ rhapsody* | darwin1.[[012]])
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
+ ;;
+ *) # Darwin 1.3 on
+ if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${Wl}suppress'
+ else
+ case ${MACOSX_DEPLOYMENT_TARGET} in
+ 10.[[012]])
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+ ;;
+ 10.*)
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_AC_TAGVAR(hardcode_direct, $1)=no
+ _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+ if test "$GCC" = yes ; then
+ output_verbose_link_cmd='echo'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+ _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+ # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ else
+ case "$cc_basename" in
+ xlc*)
+ output_verbose_link_cmd='echo'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+ _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+ # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ ;;
+ *)
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ fi
+ ;;
+ dgux*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ freebsd1*)
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+ # support. Future versions do this automatically, but an explicit c++rt0.o
+ # does not break anything, and helps significantly (at the cost of a little
+ # extra space).
+ freebsd2.2*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+ freebsd2*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+ freebsd* | kfreebsd*-gnu)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ hpux9*)
+ if test "$GCC" = yes; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ fi
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ ;;
+
+ hpux10* | hpux11*)
+ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+ case "$host_cpu" in
+ hppa*64*|ia64*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ else
+ case "$host_cpu" in
+ hppa*64*|ia64*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
+ ;;
+ *)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+ ;;
+ esac
+ fi
+ if test "$with_gnu_ld" = no; then
+ case "$host_cpu" in
+ hppa*64*)
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_AC_TAGVAR(hardcode_direct, $1)=no
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+ ia64*)
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=no
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+ ;;
+ *)
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+ ;;
+ esac
+ fi
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ if test "$GCC" = yes; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
+ fi
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_AC_TAGVAR(inherit_rpath, $1)=yes
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
+ fi
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ newsos6)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ openbsd*)
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ else
+ case $host_os in
+ openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ ;;
+ *)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
+ ;;
+
+ os2*)
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+ _LT_AC_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+ ;;
+
+ osf3*)
+ if test "$GCC" = yes; then
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+ fi
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+ ;;
+
+ osf4* | osf5*) # as osf3* with the addition of -msym flag
+ if test "$GCC" = yes; then
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ else
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
+ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
+
+ # Both c and cxx compiler support -rpath directly
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ fi
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+ ;;
+
+ sco3.2v5*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+ runpath_var=LD_RUN_PATH
+ hardcode_runpath_var=yes
+ ;;
+
+ solaris*)
+ _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
+ if test "$GCC" = yes; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
+ fi
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ case $host_os in
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+ *) # Supported since Solaris 2.6 (maybe 2.5.1?)
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
+ esac
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+
+ sunos4*)
+ if test "x$host_vendor" = xsequent; then
+ # Use $CC to link under sequent, because it throws in some extra .o
+ # files that make .init and .fini sections work.
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ sysv4)
+ case $host_vendor in
+ sni)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
+ ;;
+ siemens)
+ ## LD is ld it makes a PLAMLIB
+ ## CC just makes a GrossModule.
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=no
+ ;;
+ motorola)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
+ ;;
+ esac
+ runpath_var='LD_RUN_PATH'
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ sysv4.3*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ runpath_var=LD_RUN_PATH
+ hardcode_runpath_var=yes
+ _LT_AC_TAGVAR(ld_shlibs, $1)=yes
+ fi
+ ;;
+
+ sysv4.2uw2*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ hardcode_runpath_var=yes
+ runpath_var=LD_RUN_PATH
+ ;;
+
+ sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
+ _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
+ if test "$GCC" = yes; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ runpath_var='LD_RUN_PATH'
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ sysv5*)
+ _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
+ # $CC -shared without GNU ld will not create a library from C++
+ # object files and a static libstdc++, better avoid it by now
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ runpath_var='LD_RUN_PATH'
+ ;;
+
+ uts4*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ *)
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+
+ if test x$host_vendor = xsni; then
+ case $host in
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ export_dynamic_flag_spec='${wl}-Blargedynsym'
+ ;;
+ esac
+ fi
+ fi
+])
+AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
+test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
+_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
+_LT_DECL([], [extract_expsyms_cmds], [2],
+ [The commands to extract the exported symbol list from a shared archive])
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+_LT_DECL([], [variables_saved_for_relink], [1],
+ [Variables whose values should be saved in libtool wrapper scripts and
+ restored at link time])
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
+x|xyes)
+ # Assume -lc should be added
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+
+ if test "$enable_shared" = yes && test "$GCC" = yes; then
+ case $_LT_AC_TAGVAR(archive_cmds, $1) in
+ *'~'*)
+ # FIXME: we may have to deal with multi-command sequences.
+ ;;
+ '$CC '*)
+ # Test whether the compiler implicitly links with -lc since on some
+ # systems, -lgcc has to come before -lc. If gcc already passes -lc
+ # to ld, don't add -lc before -lgcc.
+ AC_MSG_CHECKING([whether -lc should be explicitly linked in])
+ $rm conftest*
+ printf "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
+ soname=conftest
+ lib=conftest
+ libobjs=conftest.$ac_objext
+ deplibs=
+ wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
+ compiler_flags=-v
+ linker_flags=-v
+ verstring=
+ output_objdir=.
+ libname=conftest
+ lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=
+ if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
+ then
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+ else
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+ fi
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi
+ $rm conftest*
+ AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
+ ;;
+ esac
+ fi
+ ;;
+esac
+
+_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
+ [Whether or not to add -lc for building shared libraries])
+_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
+ [enable_shared_with_static_runtimes], [0],
+ [Whether or not to disallow shared libs when runtime libs are static])
+_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
+ [Compiler flag to allow reflexive dlopens])
+_LT_TAGDECL([], [whole_archive_flag_spec], [1],
+ [Compiler flag to generate shared objects directly from archives])
+_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
+ [Create an old-style archive from a shared archive])
+_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
+ [Create a temporary old-style archive to link instead of a shared archive])
+_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
+_LT_TAGDECL([], [archive_expsym_cmds], [2])
+_LT_TAGDECL([], [module_cmds], [2],
+ [Commands used to build a loadable module if different from building
+ a shared archive.])
+_LT_TAGDECL([], [module_expsym_cmds], [2])
+_LT_TAGDECL([], [allow_undefined_flag], [1],
+ [Flag that allows shared libraries with undefined symbols to be built])
+_LT_TAGDECL([], [no_undefined_flag], [1],
+ [Flag that enforces no undefined symbols])
+_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
+ [Flag to hardcode $libdir into a binary during linking.
+ This must work even if $libdir does not exist])
+_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
+ [If ld is used when linking, flag to hardcode $libdir into a binary
+ during linking. This must work even if $libdir does not exist])
+_LT_TAGDECL([], [hardcode_libdir_separator], [1],
+ [Whether we need a single "-rpath" flag with a separated argument])
+_LT_TAGDECL([], [hardcode_direct], [0],
+ [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+ DIR into the resulting binary])
+_LT_TAGDECL([], [hardcode_minus_L], [0],
+ [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+ into the resulting binary])
+_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
+ [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+ into the resulting binary])
+_LT_TAGDECL([], [hardcode_automatic], [0],
+ [Set to "yes" if building a shared library automatically hardcodes DIR
+ into the library and all subsequent libraries and executables linked
+ against it])
+_LT_TAGDECL([], [inherit_rpath], [0],
+ [Set to yes if linker adds runtime paths of dependent libraries
+ to runtime path list])
+_LT_TAGDECL([], [link_all_deplibs], [0],
+ [Whether libtool must link a program against all its dependency libraries])
+_LT_TAGDECL([], [fix_srcfile_path], [1],
+ [Fix the shell variable $srcfile for the compiler])
+_LT_TAGDECL([], [always_export_symbols], [0],
+ [Set to "yes" if exported symbols are required])
+_LT_TAGDECL([], [export_symbols_cmds], [2],
+ [The commands to list exported symbols])
+_LT_TAGDECL([], [exclude_expsyms], [1],
+ [Symbols that should not be listed in the preloaded symbols])
+_LT_TAGDECL([], [include_expsyms], [1],
+ [Symbols that must always be exported])
+dnl FIXME: Not yet implemented
+dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
+dnl [Compiler flag to generate thread safe objects])
+])# AC_LIBTOOL_PROG_LD_SHLIBS
+
+
+# _LT_LANG_C_CONFIG([TAG])
+# ------------------------
+# Ensure that the configuration variables for a C compiler are suitably
+# defined. These variables are subsequently used by _LT_CONFIG to write
+# the compiler configuration to `libtool'.
+m4_define([_LT_LANG_C_CONFIG],
+[AC_REQUIRE([LT_AC_PROG_EGREP])
+lt_save_CC="$CC"
+AC_LANG_PUSH(C)
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}\n'
+
+_LT_AC_SYS_COMPILER
+# Save the default compiler, since it gets overwritten when the other
+# tags are being tested, and _LT_AC_TAGVAR(compiler, []) is a NOP.
+compiler_DEFAULT=$CC
+
+#
+# Check for any special shared library compilation flags.
+#
+_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
+if test "$GCC" = no; then
+ case $host_os in
+ sco3.2v5*)
+ _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
+ ;;
+ esac
+fi
+if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
+ AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
+ if echo "$old_CC $old_CFLAGS " | $GREP "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then :
+ else
+ AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
+ _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
+ fi
+fi
+
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
+ AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
+ AC_LIBTOOL_PROG_COMPILER_PIC($1)
+ AC_LIBTOOL_PROG_CC_C_O($1)
+ AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+ AC_LIBTOOL_PROG_LD_SHLIBS($1)
+ AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+ AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+ AC_LIBTOOL_SYS_LIB_STRIP
+ AC_LIBTOOL_DLOPEN_SELF($1)
+
+ # Report which library types will actually be built
+ AC_MSG_CHECKING([if libtool supports shared libraries])
+ AC_MSG_RESULT([$can_build_shared])
+
+ AC_MSG_CHECKING([whether to build shared libraries])
+ test "$can_build_shared" = "no" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case "$host_os" in
+ aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+
+ aix4* | aix5*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
+ ;;
+ esac
+ AC_MSG_RESULT([$enable_shared])
+
+ AC_MSG_CHECKING([whether to build static libraries])
+ # Make sure either enable_shared or enable_static is yes.
+ test "$enable_shared" = yes || enable_static=yes
+ AC_MSG_RESULT([$enable_static])
+
+ _LT_CONFIG($1)
+fi
+AC_LANG_POP
+CC="$lt_save_CC"
+])# _LT_LANG_C_CONFIG
+
+
+# _LT_LANG_CXX_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for a C++ compiler are suitably
+# defined. These variables are subsequently used by _LT_CONFIG to write
+# the compiler configuration to `libtool'.
+m4_define([_LT_LANG_CXX_CONFIG],
+[AC_LANG_PUSH(C++)
+AC_REQUIRE([LT_AC_PROG_EGREP])
+AC_REQUIRE([AC_PROG_CXX])
+AC_REQUIRE([AC_PROG_CXXCPP])
+
+_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_AC_TAGVAR(allow_undefined_flag, $1)=
+_LT_AC_TAGVAR(always_export_symbols, $1)=no
+_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
+_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_AC_TAGVAR(hardcode_direct, $1)=no
+_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+_LT_AC_TAGVAR(hardcode_automatic, $1)=no
+_LT_AC_TAGVAR(inherit_rpath, $1)=no
+_LT_AC_TAGVAR(module_cmds, $1)=
+_LT_AC_TAGVAR(module_expsym_cmds, $1)=
+_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_AC_TAGVAR(no_undefined_flag, $1)=
+_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for C++ test sources.
+ac_ext=cc
+
+# Object file extension for compiled C++ test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_AC_SYS_COMPILER
+
+# Allow CC to be a program name with arguments.
+lt_save_CC=$CC
+lt_save_LD=$LD
+lt_save_GCC=$GCC
+GCC=$GXX
+lt_save_with_gnu_ld=$with_gnu_ld
+lt_save_path_LD=$lt_cv_path_LD
+if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+ lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+else
+ unset lt_cv_prog_gnu_ld
+fi
+if test -n "${lt_cv_path_LDCXX+set}"; then
+ lt_cv_path_LD=$lt_cv_path_LDCXX
+else
+ unset lt_cv_path_LD
+fi
+test -z "${LDCXX+set}" || LD=$LDCXX
+CC=${CXX-"c++"}
+compiler=$CC
+_LT_AC_TAGVAR(compiler, $1)=$CC
+cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
+
+if test -n "$compiler"; then
+ # We don't want -fno-exception when compiling C++ code, so set the
+ # no_builtin_flag separately
+ if test "$GXX" = yes; then
+ _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+ else
+ _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+ fi
+
+ if test "$GXX" = yes; then
+ # Set up default GNU C++ configuration
+
+ AC_PROG_LD
+
+ # Check if GNU C++ uses GNU ld as the underlying linker, since the
+ # archiving commands below assume that GNU ld is being used.
+ if test "$with_gnu_ld" = yes; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+ # investigate it a little bit more. (MM)
+ wlarc='${wl}'
+
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if eval "`$CC -print-prog-name=ld` --help 2>&1" |
+ $GREP 'no-whole-archive' > /dev/null; then
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ else
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+ fi
+ else
+ with_gnu_ld=no
+ wlarc=
+
+ # A generic and very simple default shared library creation
+ # command for GNU C++ for the case where it uses the native
+ # linker, instead of GNU ld. If possible, this setting should
+ # overridden to take advantage of the native linker features on
+ # the platform it is being used on.
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ fi
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+
+ else
+ GXX=no
+ with_gnu_ld=no
+ wlarc=
+ fi
+
+ # PORTME: fill in a description of your system's C++ link characteristics
+ AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+ _LT_AC_TAGVAR(ld_shlibs, $1)=yes
+ case $host_os in
+ aix3*)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ aix4* | aix5*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ exp_sym_flag='-Bexport'
+ no_entry_flag=""
+ else
+ aix_use_runtimelinking=no
+
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # need to do runtime linking.
+ case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
+ for ld_flag in $LDFLAGS; do
+ case $ld_flag in
+ *-brtl*)
+ aix_use_runtimelinking=yes
+ break
+ ;;
+ esac
+ done
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+ _LT_AC_TAGVAR(archive_cmds, $1)=''
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+
+ if test "$GXX" = yes; then
+ case $host_os in aix4.[012]|aix4.[012].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" &&
+ strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ else
+ # We have old collect2
+ _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+ fi
+ esac
+ shared_flag='-shared'
+ else
+ # not using gcc
+ if test "$host_cpu" = ia64; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag='${wl}-G'
+ else
+ shared_flag='${wl}-bM:SRE'
+ fi
+ fi
+ fi
+
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to export.
+ _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+ if test "$aix_use_runtimelinking" = yes; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
+ # Determine the default libpath from the value encoded in an empty
+ # executable.
+ _LT_AC_SYS_LIBPATH_AIX
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; then
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ _LT_AC_SYS_LIBPATH_AIX
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+ # -bexpall does not export symbols beginning with underscore (_)
+ _LT_AC_TAGVAR(always_export_symbols, $1)=yes
+ # Exported symbols can be pulled into shared objects from archives
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
+ # This is similar to how AIX traditionally builds it's shared libraries.
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
+ chorus*)
+ case $cc_basename in
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ cygwin* | mingw* | pw32*)
+ # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+ # as there is no search path for DLLs.
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_AC_TAGVAR(always_export_symbols, $1)=no
+ _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
+ else
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ darwin* | rhapsody*)
+ case "$host_os" in
+ rhapsody* | darwin1.[[012]])
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
+ ;;
+ *) # Darwin 1.3 on
+ if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${Wl}suppress'
+ else
+ case ${MACOSX_DEPLOYMENT_TARGET} in
+ 10.[[012]])
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
+ ;;
+ 10.*)
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_AC_TAGVAR(hardcode_direct, $1)=no
+ _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+
+ if test "$GXX" = yes ; then
+ lt_int_apple_cc_single_mod=no
+ output_verbose_link_cmd='echo'
+ if $CC -dumpspecs 2>&1 | $GREP 'single_module' >/dev/null ; then
+ lt_int_apple_cc_single_mod=yes
+ fi
+ if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
+ fi
+ _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+ # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
+ if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ else
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ fi
+ _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ else
+ case "$cc_basename" in
+ xlc*)
+ output_verbose_link_cmd='echo'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
+ _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
+ # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ ;;
+ *)
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ fi
+ ;;
+
+ dgux*)
+ case $cc_basename in
+ ec++)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ ghcx)
+ # Green Hills C++ Compiler
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+ freebsd[12]*)
+ # C++ shared libraries reported to be fairly broken before switch to ELF
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ freebsd-elf*)
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+ ;;
+ freebsd* | kfreebsd*-gnu)
+ # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+ # conventions
+ _LT_AC_TAGVAR(ld_shlibs, $1)=yes
+ ;;
+ gnu*)
+ ;;
+ hpux9*)
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+ # but as the default
+ # location of the library.
+
+ case $cc_basename in
+ CC)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ aCC)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ else
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+ hpux10*|hpux11*)
+ if test $with_gnu_ld = no; then
+ case "$host_cpu" in
+ hppa*64*)
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+ ;;
+ ia64*)
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ ;;
+ *)
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ ;;
+ esac
+ fi
+ case "$host_cpu" in
+ hppa*64*)
+ _LT_AC_TAGVAR(hardcode_direct, $1)=no
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+ ia64*)
+ _LT_AC_TAGVAR(hardcode_direct, $1)=no
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+ # but as the default
+ # location of the library.
+ ;;
+ *)
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+ # but as the default
+ # location of the library.
+ ;;
+ esac
+
+ case $cc_basename in
+ CC)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ aCC)
+ case "$host_cpu" in
+ hppa*64*|ia64*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
+ ;;
+ *)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ esac
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ if test $with_gnu_ld = no; then
+ case "$host_cpu" in
+ ia64*|hppa*64*)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
+ ;;
+ *)
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ esac
+ fi
+ else
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+ irix5* | irix6*)
+ case $cc_basename in
+ CC)
+ # SGI C++
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+
+ # Archives containing C++ object files must be created using
+ # "CC -ar", where "CC" is the IRIX C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ if test "$with_gnu_ld" = no; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+ else
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
+ fi
+ fi
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+ esac
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_AC_TAGVAR(inherit_rpath, $1)=yes
+ ;;
+ linux*)
+ case $cc_basename in
+ KCC)
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+ # KCC will only create a shared library if the output file
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ # to its proper name (with version) after linking.
+ _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+
+ # Archives containing C++ object files must be created using
+ # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+ _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+ ;;
+ icpc)
+ # Intel C++
+ with_gnu_ld=yes
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+ ;;
+ cxx)
+ # Compaq C++
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+
+ runpath_var=LD_RUN_PATH
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+ ;;
+ esac
+ ;;
+ lynxos*)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ m88k*)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ mvs*)
+ case $cc_basename in
+ cxx)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+ wlarc=
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_AC_TAGVAR(hardcode_direct, $1)=yes
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ fi
+ # Workaround some broken pre-1.5 toolchains
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+ ;;
+ osf3*)
+ case $cc_basename in
+ KCC)
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+ # KCC will only create a shared library if the output file
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ # to its proper name (with version) after linking.
+ _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Archives containing C++ object files must be created using
+ # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+ _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+
+ ;;
+ RCC)
+ # Rational C++ 2.4.1
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ cxx)
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+ ;;
+ *)
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+
+ else
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+ osf4* | osf5*)
+ case $cc_basename in
+ KCC)
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+ # KCC will only create a shared library if the output file
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ # to its proper name (with version) after linking.
+ _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Archives containing C++ object files must be created using
+ # the KAI C++ compiler.
+ _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
+ ;;
+ RCC)
+ # Rational C++ 2.4.1
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ cxx)
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
+ echo "-hidden">> $lib.exp~
+ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~
+ $rm $lib.exp'
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+ ;;
+ *)
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+
+ else
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+ psos*)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ sco*)
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+ case $cc_basename in
+ CC)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+ sunos4*)
+ case $cc_basename in
+ CC)
+ # Sun C++ 4.x
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ lcc)
+ # Lucid
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+ solaris*)
+ case $cc_basename in
+ CC)
+ # Sun C++ 4.2, 5.x and Centerline C++
+ _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+ $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
+ case $host_os in
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
+ *)
+ # The C++ compiler is used as linker so we must use $wl
+ # flag to pass the commands to the underlying system
+ # linker. We must also pass each convience library through
+ # to the system linker between allextract/defaultextract.
+ # The C++ compiler will combine linker options so we
+ # cannot just pass the convience library names through
+ # without $wl.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
+ ;;
+ esac
+ _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
+
+ # Archives containing C++ object files must be created using
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ gcx)
+ # Green Hills C++ Compiler
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+
+ # The C++ compiler must be used to create the archive.
+ _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+ ;;
+ *)
+ # GNU C++ compiler with Solaris linker
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
+ if $CC --version | $GREP -v '^2\.7' > /dev/null; then
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP \"\-L\""
+ else
+ # g++ 2.7 appears to require `-G' NOT `-shared' on this
+ # platform.
+ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+ _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
+ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP \"\-L\""
+ fi
+
+ _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
+ fi
+ ;;
+ esac
+ ;;
+ sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
+ _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+ ;;
+ tandem*)
+ case $cc_basename in
+ NCC)
+ # NonStop-UX NCC 3.20
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+ vxworks*)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_AC_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
+ test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+ _LT_AC_TAGVAR(GCC, $1)="$GXX"
+ _LT_AC_TAGVAR(LD, $1)="$LD"
+
+ ## CAVEAT EMPTOR:
+ ## There is no encapsulation within the following macros, do not change
+ ## the running order or otherwise move them around unless you know exactly
+ ## what you are doing...
+ AC_LIBTOOL_POSTDEP_PREDEP($1)
+ AC_LIBTOOL_PROG_COMPILER_PIC($1)
+ AC_LIBTOOL_PROG_CC_C_O($1)
+ AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+ AC_LIBTOOL_PROG_LD_SHLIBS($1)
+ AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+ AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+ AC_LIBTOOL_SYS_LIB_STRIP
+ AC_LIBTOOL_DLOPEN_SELF($1)
+
+ _LT_CONFIG($1)
+fi
+
+AC_LANG_POP
+CC=$lt_save_CC
+LDCXX=$LD
+LD=$lt_save_LD
+GCC=$lt_save_GCC
+with_gnu_ldcxx=$with_gnu_ld
+with_gnu_ld=$lt_save_with_gnu_ld
+lt_cv_path_LDCXX=$lt_cv_path_LD
+lt_cv_path_LD=$lt_save_path_LD
+lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
+lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+])# _LT_LANG_CXX_CONFIG
+
+
+# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
+# ------------------------------------
+# Figure out "hidden" library dependencies from verbose
+# compiler output when linking a shared library.
+# Parse the compiler output and extract the necessary
+# objects, libraries and library flags.
+AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
+# Dependencies to place before and after the object being linked:
+_LT_AC_TAGVAR(predep_objects, $1)=
+_LT_AC_TAGVAR(postdep_objects, $1)=
+_LT_AC_TAGVAR(predeps, $1)=
+_LT_AC_TAGVAR(postdeps, $1)=
+_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
+
+dnl we can't use the lt_simple_compile_test_code here,
+dnl because it contains code intended for an executable,
+dnl not a library. It's possible we should let each
+dnl tag define a new lt_????_link_test_code variable,
+dnl but it's only used here...
+m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
+int a;
+void foo (void) { a = 0; }
+_LT_EOF
+], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
+class Foo
+{
+public:
+ Foo (void) { a = 0; }
+private:
+ int a;
+};
+_LT_EOF
+], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
+ subroutine foo
+ implicit none
+ integer*4 a
+ a=0
+ return
+ end
+_LT_EOF
+], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
+public class foo {
+ private int a;
+ public void bar (void) {
+ a = 0;
+ }
+};
+_LT_EOF
+])
+dnl Parse the compiler output and extract the necessary
+dnl objects, libraries and library flags.
+if AC_TRY_EVAL(ac_compile); then
+ # Parse the compiler output and extract the necessary
+ # objects, libraries and library flags.
+
+ # Sentinel used to keep track of whether or not we are before
+ # the conftest object file.
+ pre_test_object_deps_done=no
+
+ # The `*' in the case matches for architectures that use `case' in
+ # $output_verbose_cmd can trigger glob expansion during the loop
+ # eval without this substitution.
+ output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
+
+ for p in `eval $output_verbose_link_cmd`; do
+ case $p in
+
+ -L* | -R* | -l*)
+ # Some compilers place space between "-{L,R}" and the path.
+ # Remove the space.
+ if test $p = "-L" ||
+ test $p = "-R"; then
+ prev=$p
+ continue
+ else
+ prev=
+ fi
+
+ if test "$pre_test_object_deps_done" = no; then
+ case $p in
+ -L* | -R*)
+ # Internal compiler library paths should come after those
+ # provided the user. The postdeps already come after the
+ # user supplied libs so there is no need to process them.
+ if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
+ _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
+ else
+ _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
+ fi
+ ;;
+ # The "-l" case would never come before the object being
+ # linked, so don't bother handling this case.
+ esac
+ else
+ if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
+ _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
+ else
+ _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
+ fi
+ fi
+ ;;
+
+ *.$objext)
+ # This assumes that the test object file only shows up
+ # once in the compiler output.
+ if test "$p" = "conftest.$objext"; then
+ pre_test_object_deps_done=yes
+ continue
+ fi
+
+ if test "$pre_test_object_deps_done" = no; then
+ if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
+ _LT_AC_TAGVAR(predep_objects, $1)="$p"
+ else
+ _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
+ fi
+ else
+ if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
+ _LT_AC_TAGVAR(postdep_objects, $1)="$p"
+ else
+ _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
+ fi
+ fi
+ ;;
+
+ *) ;; # Ignore the rest.
+
+ esac
+ done
+
+ # Clean up.
+ rm -f a.out a.exe
+else
+ echo "libtool.m4: error: problem compiling $1 test program"
+fi
+
+$rm -f confest.$objext
+
+case " $_LT_AC_TAGVAR(postdeps, $1) " in
+*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
+esac
+_LT_TAGDECL([], [predep_objects], [1],
+ [Dependencies to place before and after the objects being linked to
+ create a shared library])
+_LT_TAGDECL([], [postdep_objects], [1])
+_LT_TAGDECL([], [predeps], [1])
+_LT_TAGDECL([], [postdeps], [1])
+_LT_TAGDECL([], [compiler_lib_search_path], [1],
+ [The library search path used internally by the compiler when linking
+ a shared library])
+])# AC_LIBTOOL_POSTDEP_PREDEP
+
+# _LT_LANG_F77_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for a Fortran 77 compiler are
+# suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_define([_LT_LANG_F77_CONFIG],
+[AC_REQUIRE([AC_PROG_F77])
+AC_LANG_PUSH(Fortran 77)
+
+_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_AC_TAGVAR(allow_undefined_flag, $1)=
+_LT_AC_TAGVAR(always_export_symbols, $1)=no
+_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
+_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_AC_TAGVAR(hardcode_direct, $1)=no
+_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
+_LT_AC_TAGVAR(hardcode_automatic, $1)=no
+_LT_AC_TAGVAR(inherit_rpath, $1)=no
+_LT_AC_TAGVAR(module_cmds, $1)=
+_LT_AC_TAGVAR(module_expsym_cmds, $1)=
+_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_AC_TAGVAR(no_undefined_flag, $1)=
+_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for f77 test sources.
+ac_ext=f
+
+# Object file extension for compiled f77 test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code=" subroutine t\n return\n end\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code=" program t\n end\n"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_AC_SYS_COMPILER
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${F77-"f77"}
+compiler=$CC
+_LT_AC_TAGVAR(compiler, $1)=$CC
+cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
+
+if test -n "$compiler"; then
+ AC_MSG_CHECKING([if libtool supports shared libraries])
+ AC_MSG_RESULT([$can_build_shared])
+
+ AC_MSG_CHECKING([whether to build shared libraries])
+ test "$can_build_shared" = "no" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case "$host_os" in
+ aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+ aix4* | aix5*)
+ test "$enable_shared" = yes && enable_static=no
+ ;;
+ esac
+ AC_MSG_RESULT([$enable_shared])
+
+ AC_MSG_CHECKING([whether to build static libraries])
+ # Make sure either enable_shared or enable_static is yes.
+ test "$enable_shared" = yes || enable_static=yes
+ AC_MSG_RESULT([$enable_static])
+
+ test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+ _LT_AC_TAGVAR(GCC, $1)="$G77"
+ _LT_AC_TAGVAR(LD, $1)="$LD"
+
+ ## CAVEAT EMPTOR:
+ ## There is no encapsulation within the following macros, do not change
+ ## the running order or otherwise move them around unless you know exactly
+ ## what you are doing...
+ AC_LIBTOOL_PROG_COMPILER_PIC($1)
+ AC_LIBTOOL_PROG_CC_C_O($1)
+ AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+ AC_LIBTOOL_PROG_LD_SHLIBS($1)
+ AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+ AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+ AC_LIBTOOL_SYS_LIB_STRIP
+
+ _LT_CONFIG($1)
+fi
+
+AC_LANG_POP
+CC="$lt_save_CC"
+])# _LT_LANG_F77_CONFIG
+
+
+# _LT_LANG_GCJ_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for the GNU Java Compiler compiler
+# are suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_define([_LT_LANG_GCJ_CONFIG],
+[AC_REQUIRE([LT_PROG_GCJ])
+AC_LANG_SAVE
+
+# Source file extension for Java test sources.
+ac_ext=java
+
+# Object file extension for compiled Java test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="class foo {}\n"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_AC_SYS_COMPILER
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${GCJ-"gcj"}
+compiler=$CC
+_LT_AC_TAGVAR(compiler, $1)=$CC
+
+# GCJ did not exist at the time GCC didn't implicitly link libc in.
+_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
+ AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
+ AC_LIBTOOL_PROG_COMPILER_PIC($1)
+ AC_LIBTOOL_PROG_CC_C_O($1)
+ AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
+ AC_LIBTOOL_PROG_LD_SHLIBS($1)
+ AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
+ AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
+ AC_LIBTOOL_SYS_LIB_STRIP
+ AC_LIBTOOL_DLOPEN_SELF($1)
+
+ _LT_CONFIG($1)
+fi
+
+AC_LANG_RESTORE
+CC="$lt_save_CC"
+])# _LT_LANG_GCJ_CONFIG
+
+
+# _LT_LANG_RC_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for the Windows resource compiler
+# are suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_define([_LT_LANG_RC_CONFIG],
+[AC_REQUIRE([LT_PROG_RC])
+AC_LANG_SAVE
+
+# Source file extension for RC test sources.
+ac_ext=rc
+
+# Object file extension for compiled RC test sources.
+objext=o
+_LT_AC_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
+
+# Code to be used in simple link tests
+lt_simple_link_test_code="$lt_simple_compile_test_code"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_AC_SYS_COMPILER
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+CC=${RC-"windres"}
+compiler=$CC
+_LT_AC_TAGVAR(compiler, $1)=$CC
+_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+
+if test -n "$compiler"; then
+ :
+ _LT_CONFIG($1)
+fi
+
+AC_LANG_RESTORE
+CC="$lt_save_CC"
+])# _LT_LANG_RC_CONFIG
+
+
+AC_DEFUN([LT_PROG_GCJ],
+[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
+ [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
+ [AC_CHECK_TOOL(GCJ, gcj,)
+ test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
+ AC_SUBST(GCJFLAGS)])])dnl
+])
+AU_DEFUN([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
+
+AC_DEFUN([LT_PROG_RC],
+[AC_CHECK_TOOL(RC, windres,)
+])
+AU_DEFUN([LT_AC_PROG_RC], [LT_PROG_RC])
+
+
+# LT_AC_PROG_EGREP
+# ----------------
+# If we don't have a new enough Autoconf to choose the best grep
+# available, choose the one first in the user's PATH.
+AC_DEFUN([LT_AC_PROG_EGREP],
+[AC_REQUIRE([AC_PROG_EGREP])
+test -z "$GREP" && GREP=grep
+_LT_DECL([], [GREP], [1], [A grep program that handles long line])
+_LT_DECL([], [EGREP], [1], [An ERE matcher])
+])
+
+
+# LT_AC_PROG_SED
+# --------------
+# Check for a fully-functional sed program, that truncates
+# as few characters as possible. Prefer GNU sed if found.
+AC_DEFUN([LT_AC_PROG_SED],
+[AC_PROG_SED
+test -z "$SED" && SED=sed
+_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
+_LT_DECL([], [Xsed], ["\$SED -e s/^X//"],
+ [Sed that helps us avoid accidentally triggering echo(1) options like -n])
+])# LT_AC_PROG_SED
+
+m4_ifndef([AC_PROG_SED], [
+############################################################
+# NOTE: This macro has been submitted for inclusion into #
+# GNU Autoconf as AC_PROG_SED. When it is available in #
+# a released version of Autoconf we should remove this #
+# macro and use it instead. #
+############################################################
+
+m4_define([AC_PROG_SED],
+[AC_MSG_CHECKING([for a sed that does not truncate output])
+AC_CACHE_VAL(lt_cv_path_SED,
+[# Loop through the user's path and test for sed and gsed.
+# Then use that list of sed's as ones to test for truncation.
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for lt_ac_prog in sed gsed; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
+ lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
+ fi
+ done
+ done
+done
+lt_ac_max=0
+lt_ac_count=0
+# Add /usr/xpg4/bin/sed as it is typically found on Solaris
+# along with /bin/sed that truncates output.
+for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
+ test ! -f $lt_ac_sed && break
+ cat /dev/null > conftest.in
+ lt_ac_count=0
+ echo $ECHO_N "0123456789$ECHO_C" >conftest.in
+ # Check for GNU sed and select it if it is found.
+ if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
+ lt_cv_path_SED=$lt_ac_sed
+ break
+ fi
+ while true; do
+ cat conftest.in conftest.in >conftest.tmp
+ mv conftest.tmp conftest.in
+ cp conftest.in conftest.nl
+ echo >>conftest.nl
+ $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
+ cmp -s conftest.out conftest.nl || break
+ # 10000 chars as input seems more than enough
+ test $lt_ac_count -gt 10 && break
+ lt_ac_count=`expr $lt_ac_count + 1`
+ if test $lt_ac_count -gt $lt_ac_max; then
+ lt_ac_max=$lt_ac_count
+ lt_cv_path_SED=$lt_ac_sed
+ fi
+ done
+done
+SED=$lt_cv_path_SED
+AC_SUBST([SED])
+])
+AC_MSG_RESULT([$SED])
+])#AC_PROG_SED
+])#m4_ifndef
diff --git a/libs/sigc++2/scripts/ltoptions.m4 b/libs/sigc++2/scripts/ltoptions.m4
new file mode 100644
index 0000000000..ea3089d330
--- /dev/null
+++ b/libs/sigc++2/scripts/ltoptions.m4
@@ -0,0 +1,358 @@
+# Helper functions for option handling. -*- Autoconf -*-
+# Written by Gary V. Vaughan <gary@gnu.org>
+
+# Copyright (C) 2004 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 1
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
+
+
+# _LT_MANGLE_OPTION(NAME)
+# -----------------------
+m4_define([_LT_MANGLE_OPTION],
+[[_LT_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+
+# _LT_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME. Other NAMEs are saved as a flag.
+m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1]))])
+
+
+# _LT_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+m4_define([_LT_IF_OPTION],
+[m4_ifdef(_LT_MANGLE_OPTION([$1]), [$2], [$3])])
+
+
+# _LT_UNLESS_OPTIONS(OPTIONS, IF-NOT-SET)
+# ---------------------------------------
+# Execute IF-NOT-SET if all OPTIONS are not set.
+m4_define([_LT_UNLESS_OPTIONS],
+[AC_FOREACH([_LT_Option], [$1],
+ [m4_ifdef(_LT_MANGLE_OPTION(_LT_Option),
+ [m4_define([$0_found])])])[]dnl
+m4_ifdef([$0_found], [m4_undefine([$0_found])], [$2
+])[]dnl
+])
+
+
+# _LT_SET_OPTIONS(OPTIONS)
+# ------------------------
+# OPTIONS is a space-separated list of Automake options.
+# If any OPTION has a handler macro declared with LT_OPTION_DEFINE,
+# despatch to that macro; otherwise complain about the unknown option
+# and exit.
+m4_define([_LT_SET_OPTIONS],
+[AC_FOREACH([_LT_Option], [$1],
+ [_LT_SET_OPTION(_LT_Option)
+ m4_ifdef(_LT_MANGLE_DEFUN(_LT_Option),
+ _LT_MANGLE_DEFUN(_LT_Option),
+ [m4_fatal([Unknown option `]_LT_Option[' to LT][_INIT_LIBTOOL])])
+ ])dnl
+dnl
+dnl Simply set some default values (i.e off) if boolean options were not
+dnl specified:
+_LT_UNLESS_OPTIONS([dlopen], enable_dlopen=no)
+_LT_UNLESS_OPTIONS([win32-dll], enable_win32_dll=no)
+dnl
+dnl If no reference was made to various pairs of opposing options, then
+dnl we run the default mode handler for the pair. For example, if neither
+dnl `shared' nor `disable-shared' was passed, we enable building of shared
+dnl archives by default:
+_LT_UNLESS_OPTIONS([shared disable-shared], [_LT_ENABLE_SHARED])
+_LT_UNLESS_OPTIONS([static disable-static], [_LT_ENABLE_STATIC])
+_LT_UNLESS_OPTIONS([pic-only no-pic], [_LT_WITH_PIC])
+_LT_UNLESS_OPTIONS([fast-install disable-fast-install],
+ [_LT_ENABLE_FAST_INSTALL])
+])# _LT_SET_OPTIONS
+
+
+## ----------------------------------------- ##
+## Macros to handle LT_INIT_LIBTOOL options. ##
+## ----------------------------------------- ##
+
+m4_define([_LT_MANGLE_DEFUN],
+[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1]), [[^A-Z0-9_]], [_])])
+
+
+# LT_OPTION_DEFINE(NAME, CODE)
+# ----------------------------
+m4_define([LT_OPTION_DEFINE],
+[m4_define(_LT_MANGLE_DEFUN([$1]), [$2])[]dnl
+])# LT_OPTION_DEFINE
+
+
+# dlopen
+# ------
+LT_OPTION_DEFINE([dlopen], [enable_dlopen=yes])
+
+AU_DEFUN([AC_LIBTOOL_DLOPEN],
+[_LT_SET_OPTION([dlopen])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `dlopen' option into LT_LIBTOOL_INIT's first parameter.])
+])
+
+
+# win32-dll
+# ---------
+# Declare package support for building win32 dll's.
+LT_OPTION_DEFINE([win32-dll],
+[enable_win32_dll=yes
+
+case $host in
+*-*-cygwin* | *-*-mingw* | *-*-pw32*)
+ AC_CHECK_TOOL(AS, as, false)
+ AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+ AC_CHECK_TOOL(OBJDUMP, objdump, false)
+ ;;
+esac
+
+test -z "$AS" && AS=as
+_LT_DECL([], [AS], [0], [Assembler program])dnl
+
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
+])# win32-dll
+
+AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
+[_LT_SET_OPTION([win32-dll])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `win32-dll' option into LT_LIBTOOL_INIT's first parameter.])
+])
+
+
+# _LT_ENABLE_SHARED([DEFAULT])
+# ----------------------------
+# implement the --enable-shared flag, and supports the `shared' and
+# `disable-shared' LT_INIT_LIBTOOL options.
+# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_SHARED],
+[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([shared],
+ [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
+ [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
+ *)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac],
+ [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
+
+ _LT_DECL([build_libtool_libs], [enable_shared], [0],
+ [Whether or not to build shared libraries])
+])# _LT_ENABLE_SHARED
+
+LT_OPTION_DEFINE([shared], [_LT_ENABLE_SHARED([yes])])
+LT_OPTION_DEFINE([disable-shared], [_LT_ENABLE_SHARED([no])])
+
+# Old names:
+AU_DEFUN([AC_ENABLE_SHARED],
+[_LT_SET_OPTION([shared])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `shared' option into LT_LIBTOOL_INIT's first parameter.])
+])
+
+AU_DEFUN([AM_ENABLE_SHARED],
+[_LT_SET_OPTION([shared])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `shared' option into LT_LIBTOOL_INIT's first parameter.])
+])
+
+AU_DEFUN([AC_DISABLE_SHARED],
+[_LT_SET_OPTION([disable-shared])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `disable-shared' option into LT_LIBTOOL_INIT's first parameter.])
+])
+
+AU_DEFUN([AM_DISABLE_SHARED],
+[_LT_SET_OPTION([disable-shared])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `disable-shared' option into LT_LIBTOOL_INIT's first parameter.])
+])
+
+
+# _LT_ENABLE_STATIC([DEFAULT])
+# ----------------------------
+# implement the --enable-static flag, and support the `static' and
+# `disable-static' LT_INIT_LIBTOOL options.
+# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_STATIC],
+[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([static],
+ [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
+ [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_static=yes ;;
+ no) enable_static=no ;;
+ *)
+ enable_static=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_static=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac],
+ [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
+
+ _LT_DECL([build_old_libs], [enable_static], [0],
+ [Whether or not to build static libraries])
+])# _LT_ENABLE_STATIC
+
+LT_OPTION_DEFINE([static], [_LT_ENABLE_STATIC([yes])])
+LT_OPTION_DEFINE([disable-static], [_LT_ENABLE_STATIC([no])])
+
+# Old names:
+AU_DEFUN([AC_ENABLE_STATIC],
+[_LT_SET_OPTION([static])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `static' option into LT_LIBTOOL_INIT's first parameter.])
+])
+
+AU_DEFUN([AM_ENABLE_STATIC],
+[_LT_SET_OPTION([static])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `static' option into LT_LIBTOOL_INIT's first parameter.])
+])
+
+AU_DEFUN([AC_DISABLE_STATIC],
+[_LT_SET_OPTION([disable-static])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `disable-static' option into LT_LIBTOOL_INIT's first parameter.])
+])
+
+AU_DEFUN([AM_DISABLE_STATIC],
+[_LT_SET_OPTION([disable-static])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `disable-static' option into LT_LIBTOOL_INIT's first parameter.])
+])
+
+
+# _LT_ENABLE_FAST_INSTALL([DEFAULT])
+# ----------------------------------
+# implement the --enable-fast-install flag, and support the `fast-install'
+# and `disable-fast-install' LT_INIT_LIBTOOL options.
+# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_FAST_INSTALL],
+[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([fast-install],
+ [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
+ [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_fast_install=yes ;;
+ no) enable_fast_install=no ;;
+ *)
+ enable_fast_install=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_fast_install=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac],
+ [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
+
+_LT_DECL([fast_install], [enable_fast_install], [0],
+ [Whether or not to optimize for fast installation])dnl
+])# _LT_ENABLE_FAST_INSTALL
+
+LT_OPTION_DEFINE([fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
+LT_OPTION_DEFINE([disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
+
+# Old names:
+AU_DEFUN([AC_ENABLE_FAST_INSTALL],
+[_LT_SET_OPTION([fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `fast-install' option into LT_LIBTOOL_INIT's first parameter.])
+])
+
+AU_DEFUN([AC_DISABLE_FAST_INSTALL],
+[_LT_SET_OPTION([disable-fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `disable-fast-install' option into LT_LIBTOOL_INIT's first parameter.])
+])
+
+
+# _LT_WITH_PIC([MODE])
+# --------------------
+# implement the --with-pic flag, and support the `pic-only' and `no-pic'
+# LT_INIT_LIBTOOL options.
+# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
+m4_define([_LT_WITH_PIC],
+[AC_ARG_WITH([pic],
+ [AC_HELP_STRING([--with-pic],
+ [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
+ [pic_mode="$withval"],
+ [pic_mode=default])
+
+test -z "$pic_mode" && pic_mode=m4_if($#, 1, $1, default)
+
+_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
+])# _LT_WITH_PIC
+
+LT_OPTION_DEFINE([pic-only], [_LT_WITH_PIC([yes])])
+LT_OPTION_DEFINE([no-pic], [_LT_WITH_PIC([no])])
+
+# Old name:
+AU_DEFUN([AC_LIBTOOL_PIC_MODE],
+[_LT_SET_OPTION([pic-only])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `pic-only' option into LT_LIBTOOL_INIT's first parameter.])
+])
diff --git a/libs/sigc++2/scripts/ltsugar.m4 b/libs/sigc++2/scripts/ltsugar.m4
new file mode 100644
index 0000000000..c0f31aa63d
--- /dev/null
+++ b/libs/sigc++2/scripts/ltsugar.m4
@@ -0,0 +1,115 @@
+# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
+#
+# Copyright (C) 2004 Free Software Foundation, Inc.
+# Written by Gary V. Vaughan.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# serial 1
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
+
+
+# lt_join(SEP, ARG1, [ARG2...])
+# -----------------------------
+# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
+# associated separator.
+m4_define([lt_join],
+[m4_case([$#],
+ [0], [m4_fatal([$0: too few arguments: $#])],
+ [1], [],
+ [2], [[$2]],
+ [m4_ifval([$2],
+ [m4_ifval([$3],
+ [[$2][$1][]$0([$1], m4_shiftn(2, $@))],
+ [m4_if([$#], [3],
+ [$2],
+ [$0([$1], [$2], m4_shiftn(3, $@))])])],
+ [$0([$1], m4_shiftn(2, $@))])])[]dnl
+])
+
+
+# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
+# ----------------------------------------------------------
+# Produce a SEP delimited list of all paired combinations of elements of
+# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
+# has the form PREFIXmINFIXSUFFIXn.
+m4_define([lt_combine],
+[m4_if([$2], [[]], [],
+ [lt_join(m4_quote(m4_default([$1], [, ])),
+ _$0([$1], m4_car($2)[$3], m4_shiftn(3, $@)),
+ $0([$1], m4_cdr($2), m4_shiftn(2, $@)))])])
+m4_define([_lt_combine],
+[m4_if([$3], [], [],
+ [lt_join(m4_quote(m4_default([$1], [, ])),
+ [$2$3],
+ $0([$1], [$2], m4_shiftn(3, $@)))])[]dnl
+])
+
+
+# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
+# -----------------------------------------------------------------------
+# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
+# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
+m4_define([lt_if_append_uniq],
+[m4_ifdef([$1],
+ [m4_bmatch($3[]m4_defn([$1])$3, $3[]m4_re_escape([$2])$3,
+ [$5],
+ [m4_append([$1], [$2], [$3])$4])],
+ [m4_append([$1], [$2], [$3])$4])])
+
+
+# lt_dict_add(DICT, KEY, VALUE)
+# -----------------------------
+m4_define([lt_dict_add],
+[m4_define([$1($2)], [$4])])
+
+
+# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
+# --------------------------------------------
+m4_define([lt_dict_add_subkey],
+[m4_define([$1($2:$3)], [$4])])
+
+
+# lt_dict_fetch(DICT, KEY, [SUBKEY])
+# ----------------------------------
+m4_define([lt_dict_fetch],
+[m4_ifval([$3],
+ m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
+ m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
+
+
+# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
+# -----------------------------------------------------------------
+m4_define([lt_if_dict_fetch],
+[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
+ [$5],
+ [$6])])
+
+
+# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
+# ------------------------------------------------------------
+m4_define([lt_dict_filter],
+[m4_if([$5], [], [],
+ [lt_join(m4_quote(m4_default([$4], [[, ]])),
+ m4_quote(lt_if_dict_fetch([$1], [$5], [$2], [$3], [$5])),
+ m4_quote($0([$1], [$2], [$3], [$4], m4_shiftn(5, $@))))])dnl
+])
diff --git a/libs/sigc++2/scripts/ltversion.m4 b/libs/sigc++2/scripts/ltversion.m4
new file mode 100644
index 0000000000..8b8db37ad4
--- /dev/null
+++ b/libs/sigc++2/scripts/ltversion.m4
@@ -0,0 +1,15 @@
+# ltversion.m4 -- version numbers -*- Autoconf -*-
+# Generated from ltversion.in; do not edit by hand.
+
+# serial 1467
+# This file is part of GNU Libtool
+
+m4_define([LT_PACKAGE_VERSION], [])
+m4_define([LT_PACKAGE_REVISION], [1.1467])
+
+AC_DEFUN([LTVERSION_VERSION],
+[macro_version=''
+macro_revision='1.1467'
+_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
+_LT_DECL(, macro_revision, 0)
+])
diff --git a/libs/sigc++2/sigc++-2.0.pc.in b/libs/sigc++2/sigc++-2.0.pc.in
new file mode 100644
index 0000000000..7c55753531
--- /dev/null
+++ b/libs/sigc++2/sigc++-2.0.pc.in
@@ -0,0 +1,10 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: libsigc++ 2
+Description: Typesafe signal and callback system for C++
+Version: @VERSION@
+Libs: -L${libdir} -lsigc-2.0
+Cflags: -I${includedir}/sigc++-2.0 -I${libdir}/sigc++-2.0/include
diff --git a/libs/sigc++2/sigc++/.cvsignore b/libs/sigc++2/sigc++/.cvsignore
new file mode 100644
index 0000000000..051d1bd50b
--- /dev/null
+++ b/libs/sigc++2/sigc++/.cvsignore
@@ -0,0 +1,3 @@
+Makefile
+Makefile.in
+.deps
diff --git a/libs/sigc++2/sigc++/Makefile.am b/libs/sigc++2/sigc++/Makefile.am
new file mode 100644
index 0000000000..45fe09d0c1
--- /dev/null
+++ b/libs/sigc++2/sigc++/Makefile.am
@@ -0,0 +1,96 @@
+# Base (./)
+base_m4 = template.macros.m4 signal.h.m4 slot.h.m4 method_slot.h.m4 \
+ object_slot.h.m4 class_slot.h.m4 hide.h.m4 retype.h.m4
+base_built_cc =
+base_built_h = signal.h slot.h method_slot.h \
+ object_slot.h class_slot.h hide.h retype.h
+
+signal.cc : signal.h signal_base.h functors/slot.h functors/slot_base.h functors/mem_fun.h functors/functor_trait.h
+
+# Functors (functors/)
+functors_m4 = functor_trait.h.m4 slot.h.m4 ptr_fun.h.m4 mem_fun.h.m4
+functors_built_cc =
+functors_built_h = functor_trait.h slot.h ptr_fun.h mem_fun.h
+
+functors/slot.cc : functors/slot.h functors/slot_base.h functors/functor_trait.h
+
+# Adaptors (adaptors/)
+adaptors_m4 = deduce_result_type.h.m4 adaptor_trait.h.m4 bind.h.m4 bind_return.h.m4 \
+ retype_return.h.m4 hide.h.m4 retype.h.m4 compose.h.m4 exception_catch.h.m4
+adaptors_built_cc =
+adaptors_built_h = deduce_result_type.h adaptor_trait.h bind.h bind_return.h \
+ retype_return.h hide.h retype.h compose.h exception_catch.h
+
+# Lambda (adaptors/lambda)
+lambda_m4 = base.h.m4 select.h.m4 operator.h.m4 group.h.m4 lambda.cc.m4
+lambda_built_cc = lambda.cc
+lambda_built_h = base.h select.h operator.h group.h
+
+adaptors/lambda/lambda.cc : adaptors/lambda/select.h adaptors/lambda/base.h \
+ adaptors/adaptor_trait.h adaptors/deduce_result_type.h \
+ functors/ptr_fun.h functors/mem_fun.h functors/functor_trait.h
+
+# Subdirectories needed also in the build dir
+build_subdirs = functors adaptors adaptors/lambda
+
+# Combine all the above parts with right directories prefixed
+sigc_m4 = $(base_m4:%=macros/%) \
+ $(functors_m4:%=functors/macros/%) \
+ $(adaptors_m4:%=adaptors/macros/%) \
+ $(lambda_m4:%=adaptors/lambda/macros/%)
+sigc_built_cc = $(base_built_cc) \
+ $(functors_built_cc:%=functors/%) \
+ $(adaptors_built_cc:%=adaptors/%) \
+ $(lambda_built_cc:%=adaptors/lambda/%)
+sigc_built_h = $(base_built_h) \
+ $(functors_built_h:%=functors/%) \
+ $(adaptors_built_h:%=adaptors/%) \
+ $(lambda_built_h:%=adaptors/lambda/%)
+
+EXTRA_DIST = $(sigc_m4) $(sigc_built_h) $(sigc_built_cc)
+
+# install the headers
+library_includedir = $(includedir)/sigc++-2.0/sigc++
+nobase_library_include_HEADERS = $(sigc_m4) $(sigc_built_h) \
+ sigc++.h connection.h trackable.h reference_wrapper.h type_traits.h visit_each.h \
+ object.h retype_return.h bind.h bind_return.h compatibility.h signal_base.h \
+ functors/functors.h \
+ functors/slot_base.h \
+ adaptors/adaptors.h \
+ adaptors/lambda/lambda.h
+
+# build the library
+lib_LTLIBRARIES = libsigc-2.0.la
+libsigc_2_0_la_SOURCES = signal.cc signal_base.cc trackable.cc connection.cc \
+ functors/slot.cc functors/slot_base.cc \
+ adaptors/lambda/lambda.cc
+libsigc_2_0_la_LDFLAGS =
+BUILT_SOURCES = $(sigc_built_h) $(sigc_built_cc)
+
+CLEANFILES = build-subdirs-stamp
+
+# Remove the generated sources during maintainer-clean:
+MAINTAINERCLEANFILES = $(built_sources)
+
+M4_DIR = $(top_srcdir)/sigc++/macros
+
+# Rules to generate .h and .cc from .h.m4 and .cc.m4:
+%.h: macros/%.h.m4 $(M4_DIR)/template.macros.m4
+ $(M4) $(M4_INCLUDES) $(DEFINES) -I $(M4_DIR) -I macros $< > $@
+
+%.cc: macros/%.cc.m4 $(M4_DIR)/template.macros.m4
+ $(M4) $(M4_INCLUDES) $(DEFINES) -I $(M4_DIR) -I macros $< > $@
+
+# This would be a necessary target for VPATH builds from a clean CVS checkout,
+# but I'm not sure where to invoke it... [rotty]
+build-subdirs-stamp:
+ for dir in $(build_subdirs); do \
+ test -d $$dir || mkdir $$dir; \
+ done
+ touch build-subdirs-stamp
+
+# Remove current directory from DEFAULT_INCLUDES because signal.h has
+# the same name as a standard header:
+DEFAULT_INCLUDES =
+AM_CPPFLAGS = -I$(top_srcdir) -I$(top_builddir)
+
diff --git a/libs/sigc++2/sigc++/adaptors/adaptor_trait.h b/libs/sigc++2/sigc++/adaptors/adaptor_trait.h
new file mode 100644
index 0000000000..8b618d7450
--- /dev/null
+++ b/libs/sigc++2/sigc++/adaptors/adaptor_trait.h
@@ -0,0 +1,362 @@
+// -*- c++ -*-
+/* Do not edit! -- generated file */
+#ifndef _SIGC_ADAPTORS_MACROS_ADAPTOR_TRAITHM4_
+#define _SIGC_ADAPTORS_MACROS_ADAPTOR_TRAITHM4_
+#include <sigc++config.h> //To get SIGC_TEMPLATE_KEYWORD_OPERATOR_OVERLOAD
+#include <sigc++/visit_each.h>
+#include <sigc++/functors/functor_trait.h>
+#include <sigc++/functors/ptr_fun.h>
+#include <sigc++/functors/mem_fun.h>
+#include <sigc++/adaptors/deduce_result_type.h>
+
+namespace sigc {
+
+// Call either operator()<>() or sun_forte_workaround<>(),
+// depending on the compiler:
+#ifdef SIGC_GCC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ #define SIGC_WORKAROUND_OPERATOR_PARENTHESES template operator()
+ #define SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+#else
+ #ifdef SIGC_MSVC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ #define SIGC_WORKAROUND_OPERATOR_PARENTHESES operator()
+ #define SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ #else
+ #define SIGC_WORKAROUND_OPERATOR_PARENTHESES sun_forte_workaround
+ #endif
+#endif
+
+
+template <class T_functor> struct adapts;
+
+/** @defgroup adaptors Adaptors
+ * Adaptors are functors that alter the signature of a functor's
+ * operator()().
+ *
+ * The adaptor types libsigc++ provides
+ * are created with bind(), bind_return(), hide(), hide_return(),
+ * retype_return(), retype(), compose(), exception_catch() and group().
+ *
+ * You can easily derive your own adaptor type from sigc::adapts.
+ */
+
+/** Converts an arbitrary functor into an adaptor type.
+ * All adaptor tyes in libsigc++ are unnumbered and have
+ * a <tt>template operator()</tt> member of every argument count
+ * they support. These functions in turn invoke a stored adaptor's
+ * <tt>template operator()</tt> processing the arguments and return
+ * value in a characteristic manner. Explicit function template
+ * instantiation is used to pass type hints thus saving copy costs.
+ *
+ * adaptor_functor is a glue between adaptors and arbitrary functors
+ * that just passes on the arguments. You won't use this type directly.
+ *
+ * The template argument @e T_functor determines the type of stored
+ * functor.
+ *
+ * @ingroup adaptors
+ */
+template <class T_functor>
+struct adaptor_functor : public adaptor_base
+{
+ template <class T_arg1=void,class T_arg2=void,class T_arg3=void,class T_arg4=void,class T_arg5=void,class T_arg6=void,class T_arg7=void>
+ struct deduce_result_type
+ { typedef typename sigc::deduce_result_type<T_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type type; };
+ typedef typename functor_trait<T_functor>::result_type result_type;
+
+ /** Invokes the wrapped functor passing on the arguments.
+ * @return The return value of the functor invocation.
+ */
+ result_type
+ operator()() const;
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ result_type sun_forte_workaround() const
+ { return operator(); }
+ #endif
+
+ /** Invokes the wrapped functor passing on the arguments.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1>
+ typename deduce_result_type<T_arg1>::type
+ operator()(T_arg1 _A_arg1) const
+ { return functor_(_A_arg1); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1>
+ typename deduce_result_type<T_arg1>::type
+ sun_forte_workaround(T_arg1 _A_arg1) const
+ { //Just calling operator() tries to copy the argument:
+ return functor_(_A_arg1);
+ }
+ #endif
+
+ /** Invokes the wrapped functor passing on the arguments.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2>
+ typename deduce_result_type<T_arg1,T_arg2>::type
+ operator()(T_arg1 _A_arg1,T_arg2 _A_arg2) const
+ { return functor_(_A_arg1,_A_arg2); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2>
+ typename deduce_result_type<T_arg1,T_arg2>::type
+ sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2) const
+ { //Just calling operator() tries to copy the argument:
+ return functor_(_A_arg1,_A_arg2);
+ }
+ #endif
+
+ /** Invokes the wrapped functor passing on the arguments.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3>::type
+ operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3) const
+ { return functor_(_A_arg1,_A_arg2,_A_arg3); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3>::type
+ sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3) const
+ { //Just calling operator() tries to copy the argument:
+ return functor_(_A_arg1,_A_arg2,_A_arg3);
+ }
+ #endif
+
+ /** Invokes the wrapped functor passing on the arguments.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @param _A_arg4 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type
+ operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4) const
+ { return functor_(_A_arg1,_A_arg2,_A_arg3,_A_arg4); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type
+ sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4) const
+ { //Just calling operator() tries to copy the argument:
+ return functor_(_A_arg1,_A_arg2,_A_arg3,_A_arg4);
+ }
+ #endif
+
+ /** Invokes the wrapped functor passing on the arguments.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @param _A_arg4 Argument to be passed on to the functor.
+ * @param _A_arg5 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type
+ operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5) const
+ { return functor_(_A_arg1,_A_arg2,_A_arg3,_A_arg4,_A_arg5); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type
+ sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5) const
+ { //Just calling operator() tries to copy the argument:
+ return functor_(_A_arg1,_A_arg2,_A_arg3,_A_arg4,_A_arg5);
+ }
+ #endif
+
+ /** Invokes the wrapped functor passing on the arguments.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @param _A_arg4 Argument to be passed on to the functor.
+ * @param _A_arg5 Argument to be passed on to the functor.
+ * @param _A_arg6 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type
+ operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5,T_arg6 _A_arg6) const
+ { return functor_(_A_arg1,_A_arg2,_A_arg3,_A_arg4,_A_arg5,_A_arg6); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type
+ sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5,T_arg6 _A_arg6) const
+ { //Just calling operator() tries to copy the argument:
+ return functor_(_A_arg1,_A_arg2,_A_arg3,_A_arg4,_A_arg5,_A_arg6);
+ }
+ #endif
+
+ /** Invokes the wrapped functor passing on the arguments.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @param _A_arg4 Argument to be passed on to the functor.
+ * @param _A_arg5 Argument to be passed on to the functor.
+ * @param _A_arg6 Argument to be passed on to the functor.
+ * @param _A_arg7 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type
+ operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5,T_arg6 _A_arg6,T_arg7 _A_arg7) const
+ { return functor_(_A_arg1,_A_arg2,_A_arg3,_A_arg4,_A_arg5,_A_arg6,_A_arg7); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type
+ sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5,T_arg6 _A_arg6,T_arg7 _A_arg7) const
+ { //Just calling operator() tries to copy the argument:
+ return functor_(_A_arg1,_A_arg2,_A_arg3,_A_arg4,_A_arg5,_A_arg6,_A_arg7);
+ }
+ #endif
+
+ /// Constructs an invalid functor.
+ adaptor_functor()
+ {}
+
+ /** Constructs an adaptor_functor object that wraps the passed functor.
+ * @param _A_functor Functor to invoke from operator()().
+ */
+ explicit adaptor_functor(const T_functor& _A_functor)
+ : functor_(_A_functor)
+ {}
+
+ /** Constructs an adaptor_functor object that wraps the passed (member)
+ * function pointer.
+ * @param _A_type Pointer to function or class method to invoke from operator()().
+ */
+ template <class T_type>
+ explicit adaptor_functor(const T_type& _A_type)
+ : functor_(_A_type)
+ {}
+
+ /// Functor that is invoked from operator()().
+ mutable T_functor functor_;
+};
+
+template <class T_functor>
+typename adaptor_functor<T_functor>::result_type
+adaptor_functor<T_functor>::operator()() const
+ { return functor_(); }
+
+
+/** Performs a functor on each of the targets of a functor.
+ * The function overload for sigc::adaptor_functor performs a functor
+ * on the functor stored in the sigc::adaptor_functor object.
+ *
+ * @ingroup adaptors
+ */
+template <class T_action, class T_functor>
+void visit_each(const T_action& _A_action,
+ const adaptor_functor<T_functor>& _A_target)
+{
+ visit_each(_A_action, _A_target.functor_);
+}
+
+
+/** Trait that specifies what is the adaptor version of a functor type.
+ * Template specializations for sigc::adaptor_base derived functors,
+ * for function pointers and for class methods are provided.
+ *
+ * The template argument @e T_functor is the functor type to convert.
+ * @e I_isadaptor indicates whether @e T_functor inherits from sigc::adaptor_base.
+ *
+ * @ingroup adaptors
+ */
+template <class T_functor, bool I_isadaptor = is_base_and_derived<adaptor_base, T_functor>::value> struct adaptor_trait;
+
+/** Trait that specifies what is the adaptor version of a functor type.
+ * This template specialization is used for types that inherit from adaptor_base.
+ * adaptor_type is equal to @p T_functor in this case.
+ */
+template <class T_functor>
+struct adaptor_trait<T_functor, true>
+{
+ typedef typename T_functor::result_type result_type;
+ typedef T_functor functor_type;
+ typedef T_functor adaptor_type;
+};
+
+/** Trait that specifies what is the adaptor version of a functor type.
+ * This template specialization is used for arbitrary functors,
+ * for function pointers and for class methods are provided.
+ * The latter are converted into @p pointer_functor or @p mem_functor types.
+ * adaptor_type is equal to @p adaptor_functor<functor_type>.
+ */
+template <class T_functor>
+struct adaptor_trait<T_functor, false>
+{
+ typedef typename functor_trait<T_functor>::result_type result_type;
+ typedef typename functor_trait<T_functor>::functor_type functor_type;
+ typedef adaptor_functor<functor_type> adaptor_type;
+};
+
+
+/** Base type for adaptors.
+ * adapts wraps adaptors, functors, function pointers and class methods.
+ * It contains a single member functor which is always a sigc::adaptor_base.
+ * The typedef adaptor_type defines the exact type that is used
+ * to store the adaptor, functor, function pointer or class method passed
+ * into the constructor. It differs from @e T_functor unless @e T_functor
+ * inherits from sigc::adaptor_base.
+ *
+ * @par Example of a simple adaptor:
+ * @code
+ * template <T_functor>
+ * struct my_adpator : public sigc::adapts<T_functor>
+ * {
+ * template <class T_arg1=void, class T_arg2=void>
+ * struct deduce_result_type
+ * { typedef typename sigc::deduce_result_type<T_functor, T_arg1, T_arg2>::type type; };
+ * typedef typename sigc::functor_trait<T_functor>::result_type result_type;
+ *
+ * result_type
+ * operator()() const;
+ *
+ * template <class T_arg1>
+ * typename deduce_result_type<T_arg1>::type
+ * operator()(T_arg1 _A_arg1) const;
+ *
+ * template <class T_arg1, class T_arg2>
+ * typename deduce_result_type<T_arg1, T_arg2>::type
+ * operator()(T_arg1 _A_arg1, class T_arg2) const;
+ *
+ * explicit adaptor_functor(const T_functor& _A_functor) // Constructs a my_functor object that wraps the passed functor.
+ * : sigc::adapts<T_functor>(_A_functor) {}
+ *
+ * mutable T_functor functor_; // Functor that is invoked from operator()().
+ * };
+ * @endcode
+ *
+ * @ingroup adaptors
+ */
+template <class T_functor>
+struct adapts : public adaptor_base
+{
+ typedef typename adaptor_trait<T_functor>::result_type result_type;
+ typedef typename adaptor_trait<T_functor>::adaptor_type adaptor_type;
+
+ /** Constructs an adaptor that wraps the passed functor.
+ * @param _A_functor Functor to invoke from operator()().
+ */
+ explicit adapts(const T_functor& _A_functor)
+ : functor_(_A_functor)
+ {}
+
+ /// Adaptor that is invoked from operator()().
+ mutable adaptor_type functor_;
+};
+
+} /* namespace sigc */
+#endif /* _SIGC_ADAPTORS_MACROS_ADAPTOR_TRAITHM4_ */
diff --git a/libs/sigc++2/sigc++/adaptors/adaptors.h b/libs/sigc++2/sigc++/adaptors/adaptors.h
new file mode 100644
index 0000000000..950063b122
--- /dev/null
+++ b/libs/sigc++2/sigc++/adaptors/adaptors.h
@@ -0,0 +1,32 @@
+// -*- c++ -*-
+/*
+ * Copyright 2002, The libsigc++ Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+#ifndef _SIGC_ADAPTOR_HPP_
+#define _SIGC_ADAPTOR_HPP_
+
+#include <sigc++/adaptors/bind.h>
+#include <sigc++/adaptors/bind_return.h>
+#include <sigc++/adaptors/hide.h>
+#include <sigc++/adaptors/retype_return.h>
+#include <sigc++/adaptors/retype.h>
+#include <sigc++/adaptors/compose.h>
+#include <sigc++/adaptors/exception_catch.h>
+#include <sigc++/adaptors/lambda/lambda.h>
+
+#endif /* _SIGC_ADAPTOR_HPP_ */
diff --git a/libs/sigc++2/sigc++/adaptors/bind.h b/libs/sigc++2/sigc++/adaptors/bind.h
new file mode 100644
index 0000000000..81edaf7934
--- /dev/null
+++ b/libs/sigc++2/sigc++/adaptors/bind.h
@@ -0,0 +1,2262 @@
+// -*- c++ -*-
+/* Do not edit! -- generated file */
+#ifndef _SIGC_ADAPTORS_MACROS_BINDHM4_
+#define _SIGC_ADAPTORS_MACROS_BINDHM4_
+#include <sigc++/adaptors/adaptor_trait.h>
+
+namespace sigc {
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+
+namespace internal {
+
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+struct count_void
+ { static const int value=0; };
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+struct count_void<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,void>
+ { static const int value=1; };
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+struct count_void<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,void,void>
+ { static const int value=2; };
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+struct count_void<T_arg1,T_arg2,T_arg3,T_arg4,void,void,void>
+ { static const int value=3; };
+template <class T_arg1,class T_arg2,class T_arg3>
+struct count_void<T_arg1,T_arg2,T_arg3,void,void,void,void>
+ { static const int value=4; };
+template <class T_arg1,class T_arg2>
+struct count_void<T_arg1,T_arg2,void,void,void,void,void>
+ { static const int value=5; };
+template <class T_arg1>
+struct count_void<T_arg1,void,void,void,void,void,void>
+ { static const int value=6; };
+template <>
+struct count_void<void,void,void,void,void,void,void>
+ { static const int value=7; };
+
+} /* namespace internal */
+
+#endif /*DOXYGEN_SHOULD_SKIP_THIS*/
+
+
+/** @defgroup bind bind(), bind_return()
+ * sigc::bind() alters an arbitrary functor by fixing arguments to certain values.
+ * Up to 7 arguments can be bound at a time.
+ * For single argument binding overloads of sigc::bind() are provided that let you
+ * specify the zero-based position of the argument to fix with the first template parameter.
+ * (A value of @p -1 fixes the last argument so sigc::bind<-1>() gives the same result as sigc::bind().)
+ * The types of the arguments can optionally be specified if not deduced.
+ *
+ * @par Examples:
+ * @code
+ * void foo(int, int, int);
+ * // single argument binding ...
+ * sigc::bind(&foo,1)(2,3); //fixes the last (third) argument and calls foo(2,3,1)
+ * sigc::bind<-1>(&foo,1)(2,3); //same as bind(&foo,1)(2,3) (calls foo(2,3,1))
+ * sigc::bind<0>(&foo,1)(2,3); //fixes the first argument and calls foo(1,2,3)
+ * sigc::bind<1>(&foo,1)(2,3); //fixes the second argument and calls foo(2,1,3)
+ * sigc::bind<2>(&foo,1)(2,3); //fixes the third argument and calls foo(2,3,1)
+ * // multi argument binding ...
+ * sigc::bind(&foo,1,2)(3); //fixes the last two arguments and calls foo(3,1,2)
+ * sigc::bind(&foo,1,2,3)(); //fixes all three arguments and calls foo(1,2,3)
+ * @endcode
+ *
+ * The functor sigc::bind() returns can be passed into
+ * sigc::signal::connect() directly.
+ *
+ * @par Example:
+ * @code
+ * sigc::signal<void> some_signal;
+ * void foo(int);
+ * some_signal.connect(sigc::bind(&foo,1));
+ * @endcode
+ *
+ * sigc::bind_return() alters an arbitrary functor by
+ * fixing its return value to a certain value.
+ *
+ * @par Example:
+ * @code
+ * void foo();
+ * std::cout << sigc::bind_return(&foo, 5)(); // calls foo() and returns 5
+ * @endcode
+ *
+ * You can bind references to functors by passing the objects through
+ * the sigc::ref() helper function.
+ *
+ * @par Example:
+ * @code
+ * int some_int;
+ * sigc::signal<void> some_signal;
+ * void foo(int&);
+ * some_signal.connect(sigc::bind(&foo,sigc::ref(some_int)));
+ * @endcode
+ *
+ * If you bind an object of a sigc::trackable derived type to a functor
+ * by reference, a slot assigned to the bind adaptor is cleared automatically
+ * when the object goes out of scope.
+ *
+ * @par Example:
+ * @code
+ * struct bar : public sigc::trackable {} some_bar;
+ * sigc::signal<void> some_signal;
+ * void foo(bar&);
+ * some_signal.connect(sigc::bind(&foo,sigc::ref(some_bar)));
+ * // disconnected automatically if some_bar goes out of scope
+ * @endcode
+ *
+ * For a more powerful version of this functionality see the lambda
+ * library adaptor sigc::group() which can bind, hide and reorder
+ * arguments arbitrarily. Although sigc::group() is more flexible,
+ * sigc::bind() provides a means of binding parameters when then total
+ * number of parameters called is variable.
+ *
+ * @ingroup adaptors
+ */
+
+/** Adaptor that binds an argument to the wrapped functor.
+ * Use the convenience function sigc::bind() to create an instance of sigc::bind_functor.
+ *
+ * The following template arguments are used:
+ * - @e I_location Zero-based position of the argument to fix (@p -1 for the last argument).
+
+ * - @e T_type1 Type of the 1st bound argument.
+ * - @e T_type2 Type of the 2st bound argument.
+ * - @e T_type3 Type of the 3st bound argument.
+ * - @e T_type4 Type of the 4st bound argument.
+ * - @e T_type5 Type of the 5st bound argument.
+ * - @e T_type6 Type of the 6st bound argument.
+ * - @e T_type7 Type of the 7st bound argument.
+ * - @e T_functor Type of the functor to wrap.
+ *
+ * @ingroup bind
+ */
+template <int I_location, class T_functor, class T_type1=nil,class T_type2=nil,class T_type3=nil,class T_type4=nil,class T_type5=nil,class T_type6=nil,class T_type7=nil>
+struct bind_functor;
+
+/** Adaptor that binds an argument to the wrapped functor.
+ * This template specialization fixes the 1th argument of the wrapped functor.
+ *
+ * @ingroup bind
+ */
+template <class T_functor, class T_bound>
+struct bind_functor<0, T_functor, T_bound> : public adapts<T_functor>
+{
+ typedef typename adapts<T_functor>::adaptor_type adaptor_type;
+
+ template <class T_arg1=void,class T_arg2=void,class T_arg3=void,class T_arg4=void,class T_arg5=void,class T_arg6=void,class T_arg7=void>
+ struct deduce_result_type
+ { typedef typename adaptor_type::template deduce_result_type<typename type_trait<T_bound>::pass, typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg5>::pass, typename type_trait<T_arg6>::pass>::type type; };
+ typedef typename adaptor_type::result_type result_type;
+
+ /** Invokes the wrapped functor passing on the bound argument only.
+ * @return The return value of the functor invocation.
+ */
+ result_type
+ operator()();
+
+ /** Invokes the wrapped functor passing on the arguments.
+ * bound_ is passed as the 1th argument.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1>
+ typename deduce_result_type<T_arg1>::type
+ operator()(T_arg1 _A_arg1)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_bound>::pass, typename type_trait<T_arg1>::pass>
+ (bound_, _A_arg1);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1>
+ typename deduce_result_type<T_arg1>::type
+ sun_forte_workaround(T_arg1 _A_arg1)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_bound>::pass, typename type_trait<T_arg1>::pass>
+ (bound_, _A_arg1);
+ }
+ #endif
+
+ /** Invokes the wrapped functor passing on the arguments.
+ * bound_ is passed as the 1th argument.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2>
+ typename deduce_result_type<T_arg1,T_arg2>::type
+ operator()(T_arg1 _A_arg1,T_arg2 _A_arg2)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_bound>::pass, typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass>
+ (bound_, _A_arg1, _A_arg2);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2>
+ typename deduce_result_type<T_arg1,T_arg2>::type
+ sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_bound>::pass, typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass>
+ (bound_, _A_arg1, _A_arg2);
+ }
+ #endif
+
+ /** Invokes the wrapped functor passing on the arguments.
+ * bound_ is passed as the 1th argument.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3>::type
+ operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_bound>::pass, typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass>
+ (bound_, _A_arg1, _A_arg2, _A_arg3);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3>::type
+ sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_bound>::pass, typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass>
+ (bound_, _A_arg1, _A_arg2, _A_arg3);
+ }
+ #endif
+
+ /** Invokes the wrapped functor passing on the arguments.
+ * bound_ is passed as the 1th argument.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @param _A_arg4 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type
+ operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_bound>::pass, typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass>
+ (bound_, _A_arg1, _A_arg2, _A_arg3, _A_arg4);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type
+ sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_bound>::pass, typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass>
+ (bound_, _A_arg1, _A_arg2, _A_arg3, _A_arg4);
+ }
+ #endif
+
+ /** Invokes the wrapped functor passing on the arguments.
+ * bound_ is passed as the 1th argument.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @param _A_arg4 Argument to be passed on to the functor.
+ * @param _A_arg5 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type
+ operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_bound>::pass, typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg5>::pass>
+ (bound_, _A_arg1, _A_arg2, _A_arg3, _A_arg4, _A_arg5);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type
+ sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_bound>::pass, typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg5>::pass>
+ (bound_, _A_arg1, _A_arg2, _A_arg3, _A_arg4, _A_arg5);
+ }
+ #endif
+
+ /** Invokes the wrapped functor passing on the arguments.
+ * bound_ is passed as the 1th argument.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @param _A_arg4 Argument to be passed on to the functor.
+ * @param _A_arg5 Argument to be passed on to the functor.
+ * @param _A_arg6 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type
+ operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5,T_arg6 _A_arg6)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_bound>::pass, typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg5>::pass, typename type_trait<T_arg6>::pass>
+ (bound_, _A_arg1, _A_arg2, _A_arg3, _A_arg4, _A_arg5, _A_arg6);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type
+ sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5,T_arg6 _A_arg6)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_bound>::pass, typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg5>::pass, typename type_trait<T_arg6>::pass>
+ (bound_, _A_arg1, _A_arg2, _A_arg3, _A_arg4, _A_arg5, _A_arg6);
+ }
+ #endif
+
+ /** Constructs a bind_functor object that binds an argument to the passed functor.
+ * @param _A_functor Functor to invoke from operator()().
+ * @param _A_bound Argument to bind to the functor.
+ */
+ bind_functor(typename type_trait<T_functor>::take _A_func, typename type_trait<T_bound>::take _A_bound)
+ : adapts<T_functor>(_A_func), bound_(_A_bound)
+ {}
+
+ /// The argument bound to the functor.
+ T_bound bound_;
+};
+
+template <class T_functor, class T_bound>
+typename bind_functor<0, T_functor, T_bound>::result_type
+bind_functor<0, T_functor, T_bound>::operator()()
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_bound>::pass> (bound_); }
+
+/** Adaptor that binds an argument to the wrapped functor.
+ * This template specialization fixes the 2th argument of the wrapped functor.
+ *
+ * @ingroup bind
+ */
+template <class T_functor, class T_bound>
+struct bind_functor<1, T_functor, T_bound> : public adapts<T_functor>
+{
+ typedef typename adapts<T_functor>::adaptor_type adaptor_type;
+
+ template <class T_arg1=void,class T_arg2=void,class T_arg3=void,class T_arg4=void,class T_arg5=void,class T_arg6=void,class T_arg7=void>
+ struct deduce_result_type
+ { typedef typename adaptor_type::template deduce_result_type<typename type_trait<T_arg1>::pass, typename type_trait<T_bound>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg5>::pass, typename type_trait<T_arg6>::pass>::type type; };
+ typedef typename adaptor_type::result_type result_type;
+
+ /** Invokes the wrapped functor passing on the bound argument only.
+ * @return The return value of the functor invocation.
+ */
+ result_type
+ operator()();
+
+ /** Invokes the wrapped functor passing on the arguments.
+ * bound_ is passed as the 2th argument.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1>
+ typename deduce_result_type<T_arg1>::type
+ operator()(T_arg1 _A_arg1)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_bound>::pass>
+ (_A_arg1, bound_);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1>
+ typename deduce_result_type<T_arg1>::type
+ sun_forte_workaround(T_arg1 _A_arg1)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_bound>::pass>
+ (_A_arg1, bound_);
+ }
+ #endif
+
+ /** Invokes the wrapped functor passing on the arguments.
+ * bound_ is passed as the 2th argument.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2>
+ typename deduce_result_type<T_arg1,T_arg2>::type
+ operator()(T_arg1 _A_arg1,T_arg2 _A_arg2)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_bound>::pass, typename type_trait<T_arg2>::pass>
+ (_A_arg1, bound_, _A_arg2);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2>
+ typename deduce_result_type<T_arg1,T_arg2>::type
+ sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_bound>::pass, typename type_trait<T_arg2>::pass>
+ (_A_arg1, bound_, _A_arg2);
+ }
+ #endif
+
+ /** Invokes the wrapped functor passing on the arguments.
+ * bound_ is passed as the 2th argument.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3>::type
+ operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_bound>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass>
+ (_A_arg1, bound_, _A_arg2, _A_arg3);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3>::type
+ sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_bound>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass>
+ (_A_arg1, bound_, _A_arg2, _A_arg3);
+ }
+ #endif
+
+ /** Invokes the wrapped functor passing on the arguments.
+ * bound_ is passed as the 2th argument.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @param _A_arg4 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type
+ operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_bound>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass>
+ (_A_arg1, bound_, _A_arg2, _A_arg3, _A_arg4);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type
+ sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_bound>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass>
+ (_A_arg1, bound_, _A_arg2, _A_arg3, _A_arg4);
+ }
+ #endif
+
+ /** Invokes the wrapped functor passing on the arguments.
+ * bound_ is passed as the 2th argument.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @param _A_arg4 Argument to be passed on to the functor.
+ * @param _A_arg5 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type
+ operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_bound>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg5>::pass>
+ (_A_arg1, bound_, _A_arg2, _A_arg3, _A_arg4, _A_arg5);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type
+ sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_bound>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg5>::pass>
+ (_A_arg1, bound_, _A_arg2, _A_arg3, _A_arg4, _A_arg5);
+ }
+ #endif
+
+ /** Invokes the wrapped functor passing on the arguments.
+ * bound_ is passed as the 2th argument.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @param _A_arg4 Argument to be passed on to the functor.
+ * @param _A_arg5 Argument to be passed on to the functor.
+ * @param _A_arg6 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type
+ operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5,T_arg6 _A_arg6)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_bound>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg5>::pass, typename type_trait<T_arg6>::pass>
+ (_A_arg1, bound_, _A_arg2, _A_arg3, _A_arg4, _A_arg5, _A_arg6);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type
+ sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5,T_arg6 _A_arg6)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_bound>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg5>::pass, typename type_trait<T_arg6>::pass>
+ (_A_arg1, bound_, _A_arg2, _A_arg3, _A_arg4, _A_arg5, _A_arg6);
+ }
+ #endif
+
+ /** Constructs a bind_functor object that binds an argument to the passed functor.
+ * @param _A_functor Functor to invoke from operator()().
+ * @param _A_bound Argument to bind to the functor.
+ */
+ bind_functor(typename type_trait<T_functor>::take _A_func, typename type_trait<T_bound>::take _A_bound)
+ : adapts<T_functor>(_A_func), bound_(_A_bound)
+ {}
+
+ /// The argument bound to the functor.
+ T_bound bound_;
+};
+
+template <class T_functor, class T_bound>
+typename bind_functor<1, T_functor, T_bound>::result_type
+bind_functor<1, T_functor, T_bound>::operator()()
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_bound>::pass> (bound_); }
+
+/** Adaptor that binds an argument to the wrapped functor.
+ * This template specialization fixes the 3th argument of the wrapped functor.
+ *
+ * @ingroup bind
+ */
+template <class T_functor, class T_bound>
+struct bind_functor<2, T_functor, T_bound> : public adapts<T_functor>
+{
+ typedef typename adapts<T_functor>::adaptor_type adaptor_type;
+
+ template <class T_arg1=void,class T_arg2=void,class T_arg3=void,class T_arg4=void,class T_arg5=void,class T_arg6=void,class T_arg7=void>
+ struct deduce_result_type
+ { typedef typename adaptor_type::template deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass, typename type_trait<T_bound>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg5>::pass, typename type_trait<T_arg6>::pass>::type type; };
+ typedef typename adaptor_type::result_type result_type;
+
+ /** Invokes the wrapped functor passing on the bound argument only.
+ * @return The return value of the functor invocation.
+ */
+ result_type
+ operator()();
+
+ /** Invokes the wrapped functor passing on the arguments.
+ * bound_ is passed as the 3th argument.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2>
+ typename deduce_result_type<T_arg1,T_arg2>::type
+ operator()(T_arg1 _A_arg1,T_arg2 _A_arg2)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass, typename type_trait<T_bound>::pass>
+ (_A_arg1,_A_arg2, bound_);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2>
+ typename deduce_result_type<T_arg1,T_arg2>::type
+ sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass, typename type_trait<T_bound>::pass>
+ (_A_arg1,_A_arg2, bound_);
+ }
+ #endif
+
+ /** Invokes the wrapped functor passing on the arguments.
+ * bound_ is passed as the 3th argument.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3>::type
+ operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass, typename type_trait<T_bound>::pass, typename type_trait<T_arg3>::pass>
+ (_A_arg1,_A_arg2, bound_, _A_arg3);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3>::type
+ sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass, typename type_trait<T_bound>::pass, typename type_trait<T_arg3>::pass>
+ (_A_arg1,_A_arg2, bound_, _A_arg3);
+ }
+ #endif
+
+ /** Invokes the wrapped functor passing on the arguments.
+ * bound_ is passed as the 3th argument.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @param _A_arg4 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type
+ operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass, typename type_trait<T_bound>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass>
+ (_A_arg1,_A_arg2, bound_, _A_arg3, _A_arg4);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type
+ sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass, typename type_trait<T_bound>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass>
+ (_A_arg1,_A_arg2, bound_, _A_arg3, _A_arg4);
+ }
+ #endif
+
+ /** Invokes the wrapped functor passing on the arguments.
+ * bound_ is passed as the 3th argument.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @param _A_arg4 Argument to be passed on to the functor.
+ * @param _A_arg5 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type
+ operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass, typename type_trait<T_bound>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg5>::pass>
+ (_A_arg1,_A_arg2, bound_, _A_arg3, _A_arg4, _A_arg5);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type
+ sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass, typename type_trait<T_bound>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg5>::pass>
+ (_A_arg1,_A_arg2, bound_, _A_arg3, _A_arg4, _A_arg5);
+ }
+ #endif
+
+ /** Invokes the wrapped functor passing on the arguments.
+ * bound_ is passed as the 3th argument.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @param _A_arg4 Argument to be passed on to the functor.
+ * @param _A_arg5 Argument to be passed on to the functor.
+ * @param _A_arg6 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type
+ operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5,T_arg6 _A_arg6)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass, typename type_trait<T_bound>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg5>::pass, typename type_trait<T_arg6>::pass>
+ (_A_arg1,_A_arg2, bound_, _A_arg3, _A_arg4, _A_arg5, _A_arg6);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type
+ sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5,T_arg6 _A_arg6)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass, typename type_trait<T_bound>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg5>::pass, typename type_trait<T_arg6>::pass>
+ (_A_arg1,_A_arg2, bound_, _A_arg3, _A_arg4, _A_arg5, _A_arg6);
+ }
+ #endif
+
+ /** Constructs a bind_functor object that binds an argument to the passed functor.
+ * @param _A_functor Functor to invoke from operator()().
+ * @param _A_bound Argument to bind to the functor.
+ */
+ bind_functor(typename type_trait<T_functor>::take _A_func, typename type_trait<T_bound>::take _A_bound)
+ : adapts<T_functor>(_A_func), bound_(_A_bound)
+ {}
+
+ /// The argument bound to the functor.
+ T_bound bound_;
+};
+
+template <class T_functor, class T_bound>
+typename bind_functor<2, T_functor, T_bound>::result_type
+bind_functor<2, T_functor, T_bound>::operator()()
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_bound>::pass> (bound_); }
+
+/** Adaptor that binds an argument to the wrapped functor.
+ * This template specialization fixes the 4th argument of the wrapped functor.
+ *
+ * @ingroup bind
+ */
+template <class T_functor, class T_bound>
+struct bind_functor<3, T_functor, T_bound> : public adapts<T_functor>
+{
+ typedef typename adapts<T_functor>::adaptor_type adaptor_type;
+
+ template <class T_arg1=void,class T_arg2=void,class T_arg3=void,class T_arg4=void,class T_arg5=void,class T_arg6=void,class T_arg7=void>
+ struct deduce_result_type
+ { typedef typename adaptor_type::template deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass, typename type_trait<T_bound>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg5>::pass, typename type_trait<T_arg6>::pass>::type type; };
+ typedef typename adaptor_type::result_type result_type;
+
+ /** Invokes the wrapped functor passing on the bound argument only.
+ * @return The return value of the functor invocation.
+ */
+ result_type
+ operator()();
+
+ /** Invokes the wrapped functor passing on the arguments.
+ * bound_ is passed as the 4th argument.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3>::type
+ operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass, typename type_trait<T_bound>::pass>
+ (_A_arg1,_A_arg2,_A_arg3, bound_);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3>::type
+ sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass, typename type_trait<T_bound>::pass>
+ (_A_arg1,_A_arg2,_A_arg3, bound_);
+ }
+ #endif
+
+ /** Invokes the wrapped functor passing on the arguments.
+ * bound_ is passed as the 4th argument.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @param _A_arg4 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type
+ operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass, typename type_trait<T_bound>::pass, typename type_trait<T_arg4>::pass>
+ (_A_arg1,_A_arg2,_A_arg3, bound_, _A_arg4);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type
+ sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass, typename type_trait<T_bound>::pass, typename type_trait<T_arg4>::pass>
+ (_A_arg1,_A_arg2,_A_arg3, bound_, _A_arg4);
+ }
+ #endif
+
+ /** Invokes the wrapped functor passing on the arguments.
+ * bound_ is passed as the 4th argument.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @param _A_arg4 Argument to be passed on to the functor.
+ * @param _A_arg5 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type
+ operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass, typename type_trait<T_bound>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg5>::pass>
+ (_A_arg1,_A_arg2,_A_arg3, bound_, _A_arg4, _A_arg5);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type
+ sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass, typename type_trait<T_bound>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg5>::pass>
+ (_A_arg1,_A_arg2,_A_arg3, bound_, _A_arg4, _A_arg5);
+ }
+ #endif
+
+ /** Invokes the wrapped functor passing on the arguments.
+ * bound_ is passed as the 4th argument.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @param _A_arg4 Argument to be passed on to the functor.
+ * @param _A_arg5 Argument to be passed on to the functor.
+ * @param _A_arg6 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type
+ operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5,T_arg6 _A_arg6)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass, typename type_trait<T_bound>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg5>::pass, typename type_trait<T_arg6>::pass>
+ (_A_arg1,_A_arg2,_A_arg3, bound_, _A_arg4, _A_arg5, _A_arg6);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type
+ sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5,T_arg6 _A_arg6)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass, typename type_trait<T_bound>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg5>::pass, typename type_trait<T_arg6>::pass>
+ (_A_arg1,_A_arg2,_A_arg3, bound_, _A_arg4, _A_arg5, _A_arg6);
+ }
+ #endif
+
+ /** Constructs a bind_functor object that binds an argument to the passed functor.
+ * @param _A_functor Functor to invoke from operator()().
+ * @param _A_bound Argument to bind to the functor.
+ */
+ bind_functor(typename type_trait<T_functor>::take _A_func, typename type_trait<T_bound>::take _A_bound)
+ : adapts<T_functor>(_A_func), bound_(_A_bound)
+ {}
+
+ /// The argument bound to the functor.
+ T_bound bound_;
+};
+
+template <class T_functor, class T_bound>
+typename bind_functor<3, T_functor, T_bound>::result_type
+bind_functor<3, T_functor, T_bound>::operator()()
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_bound>::pass> (bound_); }
+
+/** Adaptor that binds an argument to the wrapped functor.
+ * This template specialization fixes the 5th argument of the wrapped functor.
+ *
+ * @ingroup bind
+ */
+template <class T_functor, class T_bound>
+struct bind_functor<4, T_functor, T_bound> : public adapts<T_functor>
+{
+ typedef typename adapts<T_functor>::adaptor_type adaptor_type;
+
+ template <class T_arg1=void,class T_arg2=void,class T_arg3=void,class T_arg4=void,class T_arg5=void,class T_arg6=void,class T_arg7=void>
+ struct deduce_result_type
+ { typedef typename adaptor_type::template deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass, typename type_trait<T_bound>::pass, typename type_trait<T_arg5>::pass, typename type_trait<T_arg6>::pass>::type type; };
+ typedef typename adaptor_type::result_type result_type;
+
+ /** Invokes the wrapped functor passing on the bound argument only.
+ * @return The return value of the functor invocation.
+ */
+ result_type
+ operator()();
+
+ /** Invokes the wrapped functor passing on the arguments.
+ * bound_ is passed as the 5th argument.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @param _A_arg4 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type
+ operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass, typename type_trait<T_bound>::pass>
+ (_A_arg1,_A_arg2,_A_arg3,_A_arg4, bound_);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type
+ sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass, typename type_trait<T_bound>::pass>
+ (_A_arg1,_A_arg2,_A_arg3,_A_arg4, bound_);
+ }
+ #endif
+
+ /** Invokes the wrapped functor passing on the arguments.
+ * bound_ is passed as the 5th argument.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @param _A_arg4 Argument to be passed on to the functor.
+ * @param _A_arg5 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type
+ operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass, typename type_trait<T_bound>::pass, typename type_trait<T_arg5>::pass>
+ (_A_arg1,_A_arg2,_A_arg3,_A_arg4, bound_, _A_arg5);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type
+ sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass, typename type_trait<T_bound>::pass, typename type_trait<T_arg5>::pass>
+ (_A_arg1,_A_arg2,_A_arg3,_A_arg4, bound_, _A_arg5);
+ }
+ #endif
+
+ /** Invokes the wrapped functor passing on the arguments.
+ * bound_ is passed as the 5th argument.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @param _A_arg4 Argument to be passed on to the functor.
+ * @param _A_arg5 Argument to be passed on to the functor.
+ * @param _A_arg6 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type
+ operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5,T_arg6 _A_arg6)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass, typename type_trait<T_bound>::pass, typename type_trait<T_arg5>::pass, typename type_trait<T_arg6>::pass>
+ (_A_arg1,_A_arg2,_A_arg3,_A_arg4, bound_, _A_arg5, _A_arg6);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type
+ sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5,T_arg6 _A_arg6)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass, typename type_trait<T_bound>::pass, typename type_trait<T_arg5>::pass, typename type_trait<T_arg6>::pass>
+ (_A_arg1,_A_arg2,_A_arg3,_A_arg4, bound_, _A_arg5, _A_arg6);
+ }
+ #endif
+
+ /** Constructs a bind_functor object that binds an argument to the passed functor.
+ * @param _A_functor Functor to invoke from operator()().
+ * @param _A_bound Argument to bind to the functor.
+ */
+ bind_functor(typename type_trait<T_functor>::take _A_func, typename type_trait<T_bound>::take _A_bound)
+ : adapts<T_functor>(_A_func), bound_(_A_bound)
+ {}
+
+ /// The argument bound to the functor.
+ T_bound bound_;
+};
+
+template <class T_functor, class T_bound>
+typename bind_functor<4, T_functor, T_bound>::result_type
+bind_functor<4, T_functor, T_bound>::operator()()
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_bound>::pass> (bound_); }
+
+/** Adaptor that binds an argument to the wrapped functor.
+ * This template specialization fixes the 6th argument of the wrapped functor.
+ *
+ * @ingroup bind
+ */
+template <class T_functor, class T_bound>
+struct bind_functor<5, T_functor, T_bound> : public adapts<T_functor>
+{
+ typedef typename adapts<T_functor>::adaptor_type adaptor_type;
+
+ template <class T_arg1=void,class T_arg2=void,class T_arg3=void,class T_arg4=void,class T_arg5=void,class T_arg6=void,class T_arg7=void>
+ struct deduce_result_type
+ { typedef typename adaptor_type::template deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass, typename type_trait<T_bound>::pass, typename type_trait<T_arg6>::pass>::type type; };
+ typedef typename adaptor_type::result_type result_type;
+
+ /** Invokes the wrapped functor passing on the bound argument only.
+ * @return The return value of the functor invocation.
+ */
+ result_type
+ operator()();
+
+ /** Invokes the wrapped functor passing on the arguments.
+ * bound_ is passed as the 6th argument.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @param _A_arg4 Argument to be passed on to the functor.
+ * @param _A_arg5 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type
+ operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass, typename type_trait<T_bound>::pass>
+ (_A_arg1,_A_arg2,_A_arg3,_A_arg4,_A_arg5, bound_);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type
+ sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass, typename type_trait<T_bound>::pass>
+ (_A_arg1,_A_arg2,_A_arg3,_A_arg4,_A_arg5, bound_);
+ }
+ #endif
+
+ /** Invokes the wrapped functor passing on the arguments.
+ * bound_ is passed as the 6th argument.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @param _A_arg4 Argument to be passed on to the functor.
+ * @param _A_arg5 Argument to be passed on to the functor.
+ * @param _A_arg6 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type
+ operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5,T_arg6 _A_arg6)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass, typename type_trait<T_bound>::pass, typename type_trait<T_arg6>::pass>
+ (_A_arg1,_A_arg2,_A_arg3,_A_arg4,_A_arg5, bound_, _A_arg6);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type
+ sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5,T_arg6 _A_arg6)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass, typename type_trait<T_bound>::pass, typename type_trait<T_arg6>::pass>
+ (_A_arg1,_A_arg2,_A_arg3,_A_arg4,_A_arg5, bound_, _A_arg6);
+ }
+ #endif
+
+ /** Constructs a bind_functor object that binds an argument to the passed functor.
+ * @param _A_functor Functor to invoke from operator()().
+ * @param _A_bound Argument to bind to the functor.
+ */
+ bind_functor(typename type_trait<T_functor>::take _A_func, typename type_trait<T_bound>::take _A_bound)
+ : adapts<T_functor>(_A_func), bound_(_A_bound)
+ {}
+
+ /// The argument bound to the functor.
+ T_bound bound_;
+};
+
+template <class T_functor, class T_bound>
+typename bind_functor<5, T_functor, T_bound>::result_type
+bind_functor<5, T_functor, T_bound>::operator()()
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_bound>::pass> (bound_); }
+
+/** Adaptor that binds an argument to the wrapped functor.
+ * This template specialization fixes the 7th argument of the wrapped functor.
+ *
+ * @ingroup bind
+ */
+template <class T_functor, class T_bound>
+struct bind_functor<6, T_functor, T_bound> : public adapts<T_functor>
+{
+ typedef typename adapts<T_functor>::adaptor_type adaptor_type;
+
+ template <class T_arg1=void,class T_arg2=void,class T_arg3=void,class T_arg4=void,class T_arg5=void,class T_arg6=void,class T_arg7=void>
+ struct deduce_result_type
+ { typedef typename adaptor_type::template deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass, typename type_trait<T_bound>::pass>::type type; };
+ typedef typename adaptor_type::result_type result_type;
+
+ /** Invokes the wrapped functor passing on the bound argument only.
+ * @return The return value of the functor invocation.
+ */
+ result_type
+ operator()();
+
+ /** Invokes the wrapped functor passing on the arguments.
+ * bound_ is passed as the 7th argument.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @param _A_arg4 Argument to be passed on to the functor.
+ * @param _A_arg5 Argument to be passed on to the functor.
+ * @param _A_arg6 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type
+ operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5,T_arg6 _A_arg6)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass, typename type_trait<T_bound>::pass>
+ (_A_arg1,_A_arg2,_A_arg3,_A_arg4,_A_arg5,_A_arg6, bound_);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type
+ sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5,T_arg6 _A_arg6)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass, typename type_trait<T_bound>::pass>
+ (_A_arg1,_A_arg2,_A_arg3,_A_arg4,_A_arg5,_A_arg6, bound_);
+ }
+ #endif
+
+ /** Constructs a bind_functor object that binds an argument to the passed functor.
+ * @param _A_functor Functor to invoke from operator()().
+ * @param _A_bound Argument to bind to the functor.
+ */
+ bind_functor(typename type_trait<T_functor>::take _A_func, typename type_trait<T_bound>::take _A_bound)
+ : adapts<T_functor>(_A_func), bound_(_A_bound)
+ {}
+
+ /// The argument bound to the functor.
+ T_bound bound_;
+};
+
+template <class T_functor, class T_bound>
+typename bind_functor<6, T_functor, T_bound>::result_type
+bind_functor<6, T_functor, T_bound>::operator()()
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_bound>::pass> (bound_); }
+
+/** Performs a functor on each of the targets of a functor.
+ * The function overload for sigc::bind_functor performs a functor on the
+ * functor and on the object instances stored in the sigc::bind_functor object.
+ *
+ * @ingroup bind
+ */
+template <class T_action, int T_loc, class T_functor, class T_bound>
+void visit_each(const T_action& _A_action,
+ const bind_functor<T_loc, T_functor, T_bound>& _A_target)
+{
+ visit_each(_A_action, _A_target.functor_);
+ visit_each(_A_action, _A_target.bound_);
+}
+
+/** Adaptor that binds 1 argument(s) to the wrapped functor.
+ * This template specialization fixes the last 1 argument(s) of the wrapped functor.
+ *
+ * @ingroup bind
+ */
+template <class T_functor, class T_type1>
+struct bind_functor<-1, T_functor, T_type1> : public adapts<T_functor>
+{
+ typedef typename adapts<T_functor>::adaptor_type adaptor_type;
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ template <int count, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ struct deduce_result_type_internal
+ { typedef typename adaptor_type::template deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass, typename type_trait<T_type1>::pass>::type type; };
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ struct deduce_result_type_internal<2, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>
+ { typedef typename adaptor_type::template deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass, typename type_trait<T_type1>::pass>::type type; };
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ struct deduce_result_type_internal<3, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>
+ { typedef typename adaptor_type::template deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass, typename type_trait<T_type1>::pass>::type type; };
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ struct deduce_result_type_internal<4, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>
+ { typedef typename adaptor_type::template deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass, typename type_trait<T_type1>::pass>::type type; };
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ struct deduce_result_type_internal<5, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>
+ { typedef typename adaptor_type::template deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass, typename type_trait<T_type1>::pass>::type type; };
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ struct deduce_result_type_internal<6, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>
+ { typedef typename adaptor_type::template deduce_result_type<typename type_trait<T_arg1>::pass, typename type_trait<T_type1>::pass>::type type; };
+#endif /*DOXYGEN_SHOULD_SKIP_THIS*/
+
+ template <class T_arg1=void,class T_arg2=void,class T_arg3=void,class T_arg4=void,class T_arg5=void,class T_arg6=void,class T_arg7=void>
+ struct deduce_result_type {
+ typedef typename deduce_result_type_internal<internal::count_void<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::value,
+ T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type type;
+ };
+ typedef typename adaptor_type::result_type result_type;
+
+ /** Invokes the wrapped functor passing on the bound argument only.
+ * @return The return value of the functor invocation.
+ */
+ result_type
+ operator()();
+
+ /** Invokes the wrapped functor passing on the arguments.
+ * The last 1 argument(s) are fixed.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1>
+ typename deduce_result_type<T_arg1>::type
+ operator()(T_arg1 _A_arg1)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_type1>::pass>
+ (_A_arg1, bound1_);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1>
+ typename deduce_result_type<T_arg1>::type
+ sun_forte_workaround(T_arg1 _A_arg1)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_type1>::pass>
+ (_A_arg1, bound1_);
+ }
+ #endif
+
+ /** Invokes the wrapped functor passing on the arguments.
+ * The last 1 argument(s) are fixed.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2>
+ typename deduce_result_type<T_arg1,T_arg2>::type
+ operator()(T_arg1 _A_arg1,T_arg2 _A_arg2)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass, typename type_trait<T_type1>::pass>
+ (_A_arg1,_A_arg2, bound1_);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2>
+ typename deduce_result_type<T_arg1,T_arg2>::type
+ sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass, typename type_trait<T_type1>::pass>
+ (_A_arg1,_A_arg2, bound1_);
+ }
+ #endif
+
+ /** Invokes the wrapped functor passing on the arguments.
+ * The last 1 argument(s) are fixed.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3>::type
+ operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass, typename type_trait<T_type1>::pass>
+ (_A_arg1,_A_arg2,_A_arg3, bound1_);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3>::type
+ sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass, typename type_trait<T_type1>::pass>
+ (_A_arg1,_A_arg2,_A_arg3, bound1_);
+ }
+ #endif
+
+ /** Invokes the wrapped functor passing on the arguments.
+ * The last 1 argument(s) are fixed.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @param _A_arg4 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type
+ operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass, typename type_trait<T_type1>::pass>
+ (_A_arg1,_A_arg2,_A_arg3,_A_arg4, bound1_);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type
+ sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass, typename type_trait<T_type1>::pass>
+ (_A_arg1,_A_arg2,_A_arg3,_A_arg4, bound1_);
+ }
+ #endif
+
+ /** Invokes the wrapped functor passing on the arguments.
+ * The last 1 argument(s) are fixed.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @param _A_arg4 Argument to be passed on to the functor.
+ * @param _A_arg5 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type
+ operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass, typename type_trait<T_type1>::pass>
+ (_A_arg1,_A_arg2,_A_arg3,_A_arg4,_A_arg5, bound1_);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type
+ sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass, typename type_trait<T_type1>::pass>
+ (_A_arg1,_A_arg2,_A_arg3,_A_arg4,_A_arg5, bound1_);
+ }
+ #endif
+
+ /** Invokes the wrapped functor passing on the arguments.
+ * The last 1 argument(s) are fixed.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @param _A_arg4 Argument to be passed on to the functor.
+ * @param _A_arg5 Argument to be passed on to the functor.
+ * @param _A_arg6 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type
+ operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5,T_arg6 _A_arg6)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass, typename type_trait<T_type1>::pass>
+ (_A_arg1,_A_arg2,_A_arg3,_A_arg4,_A_arg5,_A_arg6, bound1_);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type
+ sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5,T_arg6 _A_arg6)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass, typename type_trait<T_type1>::pass>
+ (_A_arg1,_A_arg2,_A_arg3,_A_arg4,_A_arg5,_A_arg6, bound1_);
+ }
+ #endif
+
+ /** Constructs a bind_functor object that binds an argument to the passed functor.
+ * @param _A_functor Functor to invoke from operator()().
+ * @param _A_bound Argument to bind to the functor.
+ */
+ bind_functor(typename type_trait<T_functor>::take _A_func, typename type_trait<T_type1>::take _A_bound1)
+ : adapts<T_functor>(_A_func), bound1_(_A_bound1)
+ {}
+
+ /// The argument bound to the functor.
+ T_type1 bound1_;
+};
+
+template <class T_functor, class T_type1>
+typename bind_functor<-1, T_functor, T_type1>::result_type
+bind_functor<-1, T_functor, T_type1>::operator()()
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_type1>::pass> (bound1_); }
+
+/** Performs a functor on each of the targets of a functor.
+ * The function overload for sigc::bind_functor performs a functor on the
+ * functor and on the object instances stored in the sigc::bind_functor object.
+ *
+ * @ingroup bind
+ */
+template <class T_action, class T_functor, class T_type1>
+void visit_each(const T_action& _A_action,
+ const bind_functor<-1, T_functor, T_type1>& _A_target)
+{
+ visit_each(_A_action, _A_target.functor_);
+ visit_each(_A_action, _A_target.bound1_);
+}
+
+/** Adaptor that binds 2 argument(s) to the wrapped functor.
+ * This template specialization fixes the last 2 argument(s) of the wrapped functor.
+ *
+ * @ingroup bind
+ */
+template <class T_functor, class T_type1,class T_type2>
+struct bind_functor<-1, T_functor, T_type1,T_type2> : public adapts<T_functor>
+{
+ typedef typename adapts<T_functor>::adaptor_type adaptor_type;
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ template <int count, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ struct deduce_result_type_internal
+ { typedef typename adaptor_type::template deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass, typename type_trait<T_type1>::pass,typename type_trait<T_type2>::pass>::type type; };
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ struct deduce_result_type_internal<3, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>
+ { typedef typename adaptor_type::template deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass, typename type_trait<T_type1>::pass,typename type_trait<T_type2>::pass>::type type; };
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ struct deduce_result_type_internal<4, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>
+ { typedef typename adaptor_type::template deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass, typename type_trait<T_type1>::pass,typename type_trait<T_type2>::pass>::type type; };
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ struct deduce_result_type_internal<5, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>
+ { typedef typename adaptor_type::template deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass, typename type_trait<T_type1>::pass,typename type_trait<T_type2>::pass>::type type; };
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ struct deduce_result_type_internal<6, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>
+ { typedef typename adaptor_type::template deduce_result_type<typename type_trait<T_arg1>::pass, typename type_trait<T_type1>::pass,typename type_trait<T_type2>::pass>::type type; };
+#endif /*DOXYGEN_SHOULD_SKIP_THIS*/
+
+ template <class T_arg1=void,class T_arg2=void,class T_arg3=void,class T_arg4=void,class T_arg5=void,class T_arg6=void,class T_arg7=void>
+ struct deduce_result_type {
+ typedef typename deduce_result_type_internal<internal::count_void<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::value,
+ T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type type;
+ };
+ typedef typename adaptor_type::result_type result_type;
+
+ /** Invokes the wrapped functor passing on the bound argument only.
+ * @return The return value of the functor invocation.
+ */
+ result_type
+ operator()();
+
+ /** Invokes the wrapped functor passing on the arguments.
+ * The last 2 argument(s) are fixed.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1>
+ typename deduce_result_type<T_arg1>::type
+ operator()(T_arg1 _A_arg1)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_type1>::pass,typename type_trait<T_type2>::pass>
+ (_A_arg1, bound1_,bound2_);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1>
+ typename deduce_result_type<T_arg1>::type
+ sun_forte_workaround(T_arg1 _A_arg1)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_type1>::pass,typename type_trait<T_type2>::pass>
+ (_A_arg1, bound1_,bound2_);
+ }
+ #endif
+
+ /** Invokes the wrapped functor passing on the arguments.
+ * The last 2 argument(s) are fixed.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2>
+ typename deduce_result_type<T_arg1,T_arg2>::type
+ operator()(T_arg1 _A_arg1,T_arg2 _A_arg2)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass, typename type_trait<T_type1>::pass,typename type_trait<T_type2>::pass>
+ (_A_arg1,_A_arg2, bound1_,bound2_);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2>
+ typename deduce_result_type<T_arg1,T_arg2>::type
+ sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass, typename type_trait<T_type1>::pass,typename type_trait<T_type2>::pass>
+ (_A_arg1,_A_arg2, bound1_,bound2_);
+ }
+ #endif
+
+ /** Invokes the wrapped functor passing on the arguments.
+ * The last 2 argument(s) are fixed.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3>::type
+ operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass, typename type_trait<T_type1>::pass,typename type_trait<T_type2>::pass>
+ (_A_arg1,_A_arg2,_A_arg3, bound1_,bound2_);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3>::type
+ sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass, typename type_trait<T_type1>::pass,typename type_trait<T_type2>::pass>
+ (_A_arg1,_A_arg2,_A_arg3, bound1_,bound2_);
+ }
+ #endif
+
+ /** Invokes the wrapped functor passing on the arguments.
+ * The last 2 argument(s) are fixed.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @param _A_arg4 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type
+ operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass, typename type_trait<T_type1>::pass,typename type_trait<T_type2>::pass>
+ (_A_arg1,_A_arg2,_A_arg3,_A_arg4, bound1_,bound2_);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type
+ sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass, typename type_trait<T_type1>::pass,typename type_trait<T_type2>::pass>
+ (_A_arg1,_A_arg2,_A_arg3,_A_arg4, bound1_,bound2_);
+ }
+ #endif
+
+ /** Invokes the wrapped functor passing on the arguments.
+ * The last 2 argument(s) are fixed.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @param _A_arg4 Argument to be passed on to the functor.
+ * @param _A_arg5 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type
+ operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass, typename type_trait<T_type1>::pass,typename type_trait<T_type2>::pass>
+ (_A_arg1,_A_arg2,_A_arg3,_A_arg4,_A_arg5, bound1_,bound2_);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type
+ sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4,T_arg5 _A_arg5)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass, typename type_trait<T_type1>::pass,typename type_trait<T_type2>::pass>
+ (_A_arg1,_A_arg2,_A_arg3,_A_arg4,_A_arg5, bound1_,bound2_);
+ }
+ #endif
+
+ /** Constructs a bind_functor object that binds an argument to the passed functor.
+ * @param _A_functor Functor to invoke from operator()().
+ * @param _A_bound Argument to bind to the functor.
+ */
+ bind_functor(typename type_trait<T_functor>::take _A_func, typename type_trait<T_type1>::take _A_bound1,typename type_trait<T_type2>::take _A_bound2)
+ : adapts<T_functor>(_A_func), bound1_(_A_bound1),bound2_(_A_bound2)
+ {}
+
+ /// The argument bound to the functor.
+ T_type1 bound1_;
+ T_type2 bound2_;
+};
+
+template <class T_functor, class T_type1,class T_type2>
+typename bind_functor<-1, T_functor, T_type1,T_type2>::result_type
+bind_functor<-1, T_functor, T_type1,T_type2>::operator()()
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_type1>::pass,typename type_trait<T_type2>::pass> (bound1_,bound2_); }
+
+/** Performs a functor on each of the targets of a functor.
+ * The function overload for sigc::bind_functor performs a functor on the
+ * functor and on the object instances stored in the sigc::bind_functor object.
+ *
+ * @ingroup bind
+ */
+template <class T_action, class T_functor, class T_type1,class T_type2>
+void visit_each(const T_action& _A_action,
+ const bind_functor<-1, T_functor, T_type1,T_type2>& _A_target)
+{
+ visit_each(_A_action, _A_target.functor_);
+ visit_each(_A_action, _A_target.bound1_);
+ visit_each(_A_action, _A_target.bound2_);
+}
+
+/** Adaptor that binds 3 argument(s) to the wrapped functor.
+ * This template specialization fixes the last 3 argument(s) of the wrapped functor.
+ *
+ * @ingroup bind
+ */
+template <class T_functor, class T_type1,class T_type2,class T_type3>
+struct bind_functor<-1, T_functor, T_type1,T_type2,T_type3> : public adapts<T_functor>
+{
+ typedef typename adapts<T_functor>::adaptor_type adaptor_type;
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ template <int count, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ struct deduce_result_type_internal
+ { typedef typename adaptor_type::template deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass, typename type_trait<T_type1>::pass,typename type_trait<T_type2>::pass,typename type_trait<T_type3>::pass>::type type; };
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ struct deduce_result_type_internal<4, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>
+ { typedef typename adaptor_type::template deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass, typename type_trait<T_type1>::pass,typename type_trait<T_type2>::pass,typename type_trait<T_type3>::pass>::type type; };
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ struct deduce_result_type_internal<5, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>
+ { typedef typename adaptor_type::template deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass, typename type_trait<T_type1>::pass,typename type_trait<T_type2>::pass,typename type_trait<T_type3>::pass>::type type; };
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ struct deduce_result_type_internal<6, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>
+ { typedef typename adaptor_type::template deduce_result_type<typename type_trait<T_arg1>::pass, typename type_trait<T_type1>::pass,typename type_trait<T_type2>::pass,typename type_trait<T_type3>::pass>::type type; };
+#endif /*DOXYGEN_SHOULD_SKIP_THIS*/
+
+ template <class T_arg1=void,class T_arg2=void,class T_arg3=void,class T_arg4=void,class T_arg5=void,class T_arg6=void,class T_arg7=void>
+ struct deduce_result_type {
+ typedef typename deduce_result_type_internal<internal::count_void<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::value,
+ T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type type;
+ };
+ typedef typename adaptor_type::result_type result_type;
+
+ /** Invokes the wrapped functor passing on the bound argument only.
+ * @return The return value of the functor invocation.
+ */
+ result_type
+ operator()();
+
+ /** Invokes the wrapped functor passing on the arguments.
+ * The last 3 argument(s) are fixed.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1>
+ typename deduce_result_type<T_arg1>::type
+ operator()(T_arg1 _A_arg1)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_type1>::pass,typename type_trait<T_type2>::pass,typename type_trait<T_type3>::pass>
+ (_A_arg1, bound1_,bound2_,bound3_);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1>
+ typename deduce_result_type<T_arg1>::type
+ sun_forte_workaround(T_arg1 _A_arg1)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_type1>::pass,typename type_trait<T_type2>::pass,typename type_trait<T_type3>::pass>
+ (_A_arg1, bound1_,bound2_,bound3_);
+ }
+ #endif
+
+ /** Invokes the wrapped functor passing on the arguments.
+ * The last 3 argument(s) are fixed.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2>
+ typename deduce_result_type<T_arg1,T_arg2>::type
+ operator()(T_arg1 _A_arg1,T_arg2 _A_arg2)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass, typename type_trait<T_type1>::pass,typename type_trait<T_type2>::pass,typename type_trait<T_type3>::pass>
+ (_A_arg1,_A_arg2, bound1_,bound2_,bound3_);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2>
+ typename deduce_result_type<T_arg1,T_arg2>::type
+ sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass, typename type_trait<T_type1>::pass,typename type_trait<T_type2>::pass,typename type_trait<T_type3>::pass>
+ (_A_arg1,_A_arg2, bound1_,bound2_,bound3_);
+ }
+ #endif
+
+ /** Invokes the wrapped functor passing on the arguments.
+ * The last 3 argument(s) are fixed.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3>::type
+ operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass, typename type_trait<T_type1>::pass,typename type_trait<T_type2>::pass,typename type_trait<T_type3>::pass>
+ (_A_arg1,_A_arg2,_A_arg3, bound1_,bound2_,bound3_);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3>::type
+ sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass, typename type_trait<T_type1>::pass,typename type_trait<T_type2>::pass,typename type_trait<T_type3>::pass>
+ (_A_arg1,_A_arg2,_A_arg3, bound1_,bound2_,bound3_);
+ }
+ #endif
+
+ /** Invokes the wrapped functor passing on the arguments.
+ * The last 3 argument(s) are fixed.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @param _A_arg4 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type
+ operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass, typename type_trait<T_type1>::pass,typename type_trait<T_type2>::pass,typename type_trait<T_type3>::pass>
+ (_A_arg1,_A_arg2,_A_arg3,_A_arg4, bound1_,bound2_,bound3_);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type
+ sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3,T_arg4 _A_arg4)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass, typename type_trait<T_type1>::pass,typename type_trait<T_type2>::pass,typename type_trait<T_type3>::pass>
+ (_A_arg1,_A_arg2,_A_arg3,_A_arg4, bound1_,bound2_,bound3_);
+ }
+ #endif
+
+ /** Constructs a bind_functor object that binds an argument to the passed functor.
+ * @param _A_functor Functor to invoke from operator()().
+ * @param _A_bound Argument to bind to the functor.
+ */
+ bind_functor(typename type_trait<T_functor>::take _A_func, typename type_trait<T_type1>::take _A_bound1,typename type_trait<T_type2>::take _A_bound2,typename type_trait<T_type3>::take _A_bound3)
+ : adapts<T_functor>(_A_func), bound1_(_A_bound1),bound2_(_A_bound2),bound3_(_A_bound3)
+ {}
+
+ /// The argument bound to the functor.
+ T_type1 bound1_;
+ T_type2 bound2_;
+ T_type3 bound3_;
+};
+
+template <class T_functor, class T_type1,class T_type2,class T_type3>
+typename bind_functor<-1, T_functor, T_type1,T_type2,T_type3>::result_type
+bind_functor<-1, T_functor, T_type1,T_type2,T_type3>::operator()()
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_type1>::pass,typename type_trait<T_type2>::pass,typename type_trait<T_type3>::pass> (bound1_,bound2_,bound3_); }
+
+/** Performs a functor on each of the targets of a functor.
+ * The function overload for sigc::bind_functor performs a functor on the
+ * functor and on the object instances stored in the sigc::bind_functor object.
+ *
+ * @ingroup bind
+ */
+template <class T_action, class T_functor, class T_type1,class T_type2,class T_type3>
+void visit_each(const T_action& _A_action,
+ const bind_functor<-1, T_functor, T_type1,T_type2,T_type3>& _A_target)
+{
+ visit_each(_A_action, _A_target.functor_);
+ visit_each(_A_action, _A_target.bound1_);
+ visit_each(_A_action, _A_target.bound2_);
+ visit_each(_A_action, _A_target.bound3_);
+}
+
+/** Adaptor that binds 4 argument(s) to the wrapped functor.
+ * This template specialization fixes the last 4 argument(s) of the wrapped functor.
+ *
+ * @ingroup bind
+ */
+template <class T_functor, class T_type1,class T_type2,class T_type3,class T_type4>
+struct bind_functor<-1, T_functor, T_type1,T_type2,T_type3,T_type4> : public adapts<T_functor>
+{
+ typedef typename adapts<T_functor>::adaptor_type adaptor_type;
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ template <int count, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ struct deduce_result_type_internal
+ { typedef typename adaptor_type::template deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass, typename type_trait<T_type1>::pass,typename type_trait<T_type2>::pass,typename type_trait<T_type3>::pass,typename type_trait<T_type4>::pass>::type type; };
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ struct deduce_result_type_internal<5, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>
+ { typedef typename adaptor_type::template deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass, typename type_trait<T_type1>::pass,typename type_trait<T_type2>::pass,typename type_trait<T_type3>::pass,typename type_trait<T_type4>::pass>::type type; };
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ struct deduce_result_type_internal<6, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>
+ { typedef typename adaptor_type::template deduce_result_type<typename type_trait<T_arg1>::pass, typename type_trait<T_type1>::pass,typename type_trait<T_type2>::pass,typename type_trait<T_type3>::pass,typename type_trait<T_type4>::pass>::type type; };
+#endif /*DOXYGEN_SHOULD_SKIP_THIS*/
+
+ template <class T_arg1=void,class T_arg2=void,class T_arg3=void,class T_arg4=void,class T_arg5=void,class T_arg6=void,class T_arg7=void>
+ struct deduce_result_type {
+ typedef typename deduce_result_type_internal<internal::count_void<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::value,
+ T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type type;
+ };
+ typedef typename adaptor_type::result_type result_type;
+
+ /** Invokes the wrapped functor passing on the bound argument only.
+ * @return The return value of the functor invocation.
+ */
+ result_type
+ operator()();
+
+ /** Invokes the wrapped functor passing on the arguments.
+ * The last 4 argument(s) are fixed.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1>
+ typename deduce_result_type<T_arg1>::type
+ operator()(T_arg1 _A_arg1)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_type1>::pass,typename type_trait<T_type2>::pass,typename type_trait<T_type3>::pass,typename type_trait<T_type4>::pass>
+ (_A_arg1, bound1_,bound2_,bound3_,bound4_);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1>
+ typename deduce_result_type<T_arg1>::type
+ sun_forte_workaround(T_arg1 _A_arg1)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_type1>::pass,typename type_trait<T_type2>::pass,typename type_trait<T_type3>::pass,typename type_trait<T_type4>::pass>
+ (_A_arg1, bound1_,bound2_,bound3_,bound4_);
+ }
+ #endif
+
+ /** Invokes the wrapped functor passing on the arguments.
+ * The last 4 argument(s) are fixed.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2>
+ typename deduce_result_type<T_arg1,T_arg2>::type
+ operator()(T_arg1 _A_arg1,T_arg2 _A_arg2)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass, typename type_trait<T_type1>::pass,typename type_trait<T_type2>::pass,typename type_trait<T_type3>::pass,typename type_trait<T_type4>::pass>
+ (_A_arg1,_A_arg2, bound1_,bound2_,bound3_,bound4_);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2>
+ typename deduce_result_type<T_arg1,T_arg2>::type
+ sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass, typename type_trait<T_type1>::pass,typename type_trait<T_type2>::pass,typename type_trait<T_type3>::pass,typename type_trait<T_type4>::pass>
+ (_A_arg1,_A_arg2, bound1_,bound2_,bound3_,bound4_);
+ }
+ #endif
+
+ /** Invokes the wrapped functor passing on the arguments.
+ * The last 4 argument(s) are fixed.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3>::type
+ operator()(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass, typename type_trait<T_type1>::pass,typename type_trait<T_type2>::pass,typename type_trait<T_type3>::pass,typename type_trait<T_type4>::pass>
+ (_A_arg1,_A_arg2,_A_arg3, bound1_,bound2_,bound3_,bound4_);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3>::type
+ sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2,T_arg3 _A_arg3)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass, typename type_trait<T_type1>::pass,typename type_trait<T_type2>::pass,typename type_trait<T_type3>::pass,typename type_trait<T_type4>::pass>
+ (_A_arg1,_A_arg2,_A_arg3, bound1_,bound2_,bound3_,bound4_);
+ }
+ #endif
+
+ /** Constructs a bind_functor object that binds an argument to the passed functor.
+ * @param _A_functor Functor to invoke from operator()().
+ * @param _A_bound Argument to bind to the functor.
+ */
+ bind_functor(typename type_trait<T_functor>::take _A_func, typename type_trait<T_type1>::take _A_bound1,typename type_trait<T_type2>::take _A_bound2,typename type_trait<T_type3>::take _A_bound3,typename type_trait<T_type4>::take _A_bound4)
+ : adapts<T_functor>(_A_func), bound1_(_A_bound1),bound2_(_A_bound2),bound3_(_A_bound3),bound4_(_A_bound4)
+ {}
+
+ /// The argument bound to the functor.
+ T_type1 bound1_;
+ T_type2 bound2_;
+ T_type3 bound3_;
+ T_type4 bound4_;
+};
+
+template <class T_functor, class T_type1,class T_type2,class T_type3,class T_type4>
+typename bind_functor<-1, T_functor, T_type1,T_type2,T_type3,T_type4>::result_type
+bind_functor<-1, T_functor, T_type1,T_type2,T_type3,T_type4>::operator()()
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_type1>::pass,typename type_trait<T_type2>::pass,typename type_trait<T_type3>::pass,typename type_trait<T_type4>::pass> (bound1_,bound2_,bound3_,bound4_); }
+
+/** Performs a functor on each of the targets of a functor.
+ * The function overload for sigc::bind_functor performs a functor on the
+ * functor and on the object instances stored in the sigc::bind_functor object.
+ *
+ * @ingroup bind
+ */
+template <class T_action, class T_functor, class T_type1,class T_type2,class T_type3,class T_type4>
+void visit_each(const T_action& _A_action,
+ const bind_functor<-1, T_functor, T_type1,T_type2,T_type3,T_type4>& _A_target)
+{
+ visit_each(_A_action, _A_target.functor_);
+ visit_each(_A_action, _A_target.bound1_);
+ visit_each(_A_action, _A_target.bound2_);
+ visit_each(_A_action, _A_target.bound3_);
+ visit_each(_A_action, _A_target.bound4_);
+}
+
+/** Adaptor that binds 5 argument(s) to the wrapped functor.
+ * This template specialization fixes the last 5 argument(s) of the wrapped functor.
+ *
+ * @ingroup bind
+ */
+template <class T_functor, class T_type1,class T_type2,class T_type3,class T_type4,class T_type5>
+struct bind_functor<-1, T_functor, T_type1,T_type2,T_type3,T_type4,T_type5> : public adapts<T_functor>
+{
+ typedef typename adapts<T_functor>::adaptor_type adaptor_type;
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ template <int count, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ struct deduce_result_type_internal
+ { typedef typename adaptor_type::template deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass, typename type_trait<T_type1>::pass,typename type_trait<T_type2>::pass,typename type_trait<T_type3>::pass,typename type_trait<T_type4>::pass,typename type_trait<T_type5>::pass>::type type; };
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ struct deduce_result_type_internal<6, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>
+ { typedef typename adaptor_type::template deduce_result_type<typename type_trait<T_arg1>::pass, typename type_trait<T_type1>::pass,typename type_trait<T_type2>::pass,typename type_trait<T_type3>::pass,typename type_trait<T_type4>::pass,typename type_trait<T_type5>::pass>::type type; };
+#endif /*DOXYGEN_SHOULD_SKIP_THIS*/
+
+ template <class T_arg1=void,class T_arg2=void,class T_arg3=void,class T_arg4=void,class T_arg5=void,class T_arg6=void,class T_arg7=void>
+ struct deduce_result_type {
+ typedef typename deduce_result_type_internal<internal::count_void<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::value,
+ T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type type;
+ };
+ typedef typename adaptor_type::result_type result_type;
+
+ /** Invokes the wrapped functor passing on the bound argument only.
+ * @return The return value of the functor invocation.
+ */
+ result_type
+ operator()();
+
+ /** Invokes the wrapped functor passing on the arguments.
+ * The last 5 argument(s) are fixed.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1>
+ typename deduce_result_type<T_arg1>::type
+ operator()(T_arg1 _A_arg1)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_type1>::pass,typename type_trait<T_type2>::pass,typename type_trait<T_type3>::pass,typename type_trait<T_type4>::pass,typename type_trait<T_type5>::pass>
+ (_A_arg1, bound1_,bound2_,bound3_,bound4_,bound5_);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1>
+ typename deduce_result_type<T_arg1>::type
+ sun_forte_workaround(T_arg1 _A_arg1)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_type1>::pass,typename type_trait<T_type2>::pass,typename type_trait<T_type3>::pass,typename type_trait<T_type4>::pass,typename type_trait<T_type5>::pass>
+ (_A_arg1, bound1_,bound2_,bound3_,bound4_,bound5_);
+ }
+ #endif
+
+ /** Invokes the wrapped functor passing on the arguments.
+ * The last 5 argument(s) are fixed.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2>
+ typename deduce_result_type<T_arg1,T_arg2>::type
+ operator()(T_arg1 _A_arg1,T_arg2 _A_arg2)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass, typename type_trait<T_type1>::pass,typename type_trait<T_type2>::pass,typename type_trait<T_type3>::pass,typename type_trait<T_type4>::pass,typename type_trait<T_type5>::pass>
+ (_A_arg1,_A_arg2, bound1_,bound2_,bound3_,bound4_,bound5_);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2>
+ typename deduce_result_type<T_arg1,T_arg2>::type
+ sun_forte_workaround(T_arg1 _A_arg1,T_arg2 _A_arg2)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass, typename type_trait<T_type1>::pass,typename type_trait<T_type2>::pass,typename type_trait<T_type3>::pass,typename type_trait<T_type4>::pass,typename type_trait<T_type5>::pass>
+ (_A_arg1,_A_arg2, bound1_,bound2_,bound3_,bound4_,bound5_);
+ }
+ #endif
+
+ /** Constructs a bind_functor object that binds an argument to the passed functor.
+ * @param _A_functor Functor to invoke from operator()().
+ * @param _A_bound Argument to bind to the functor.
+ */
+ bind_functor(typename type_trait<T_functor>::take _A_func, typename type_trait<T_type1>::take _A_bound1,typename type_trait<T_type2>::take _A_bound2,typename type_trait<T_type3>::take _A_bound3,typename type_trait<T_type4>::take _A_bound4,typename type_trait<T_type5>::take _A_bound5)
+ : adapts<T_functor>(_A_func), bound1_(_A_bound1),bound2_(_A_bound2),bound3_(_A_bound3),bound4_(_A_bound4),bound5_(_A_bound5)
+ {}
+
+ /// The argument bound to the functor.
+ T_type1 bound1_;
+ T_type2 bound2_;
+ T_type3 bound3_;
+ T_type4 bound4_;
+ T_type5 bound5_;
+};
+
+template <class T_functor, class T_type1,class T_type2,class T_type3,class T_type4,class T_type5>
+typename bind_functor<-1, T_functor, T_type1,T_type2,T_type3,T_type4,T_type5>::result_type
+bind_functor<-1, T_functor, T_type1,T_type2,T_type3,T_type4,T_type5>::operator()()
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_type1>::pass,typename type_trait<T_type2>::pass,typename type_trait<T_type3>::pass,typename type_trait<T_type4>::pass,typename type_trait<T_type5>::pass> (bound1_,bound2_,bound3_,bound4_,bound5_); }
+
+/** Performs a functor on each of the targets of a functor.
+ * The function overload for sigc::bind_functor performs a functor on the
+ * functor and on the object instances stored in the sigc::bind_functor object.
+ *
+ * @ingroup bind
+ */
+template <class T_action, class T_functor, class T_type1,class T_type2,class T_type3,class T_type4,class T_type5>
+void visit_each(const T_action& _A_action,
+ const bind_functor<-1, T_functor, T_type1,T_type2,T_type3,T_type4,T_type5>& _A_target)
+{
+ visit_each(_A_action, _A_target.functor_);
+ visit_each(_A_action, _A_target.bound1_);
+ visit_each(_A_action, _A_target.bound2_);
+ visit_each(_A_action, _A_target.bound3_);
+ visit_each(_A_action, _A_target.bound4_);
+ visit_each(_A_action, _A_target.bound5_);
+}
+
+/** Adaptor that binds 6 argument(s) to the wrapped functor.
+ * This template specialization fixes the last 6 argument(s) of the wrapped functor.
+ *
+ * @ingroup bind
+ */
+template <class T_functor, class T_type1,class T_type2,class T_type3,class T_type4,class T_type5,class T_type6>
+struct bind_functor<-1, T_functor, T_type1,T_type2,T_type3,T_type4,T_type5,T_type6> : public adapts<T_functor>
+{
+ typedef typename adapts<T_functor>::adaptor_type adaptor_type;
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ template <int count, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ struct deduce_result_type_internal
+ { typedef typename adaptor_type::template deduce_result_type<typename type_trait<T_arg1>::pass, typename type_trait<T_type1>::pass,typename type_trait<T_type2>::pass,typename type_trait<T_type3>::pass,typename type_trait<T_type4>::pass,typename type_trait<T_type5>::pass,typename type_trait<T_type6>::pass>::type type; };
+#endif /*DOXYGEN_SHOULD_SKIP_THIS*/
+
+ template <class T_arg1=void,class T_arg2=void,class T_arg3=void,class T_arg4=void,class T_arg5=void,class T_arg6=void,class T_arg7=void>
+ struct deduce_result_type {
+ typedef typename deduce_result_type_internal<internal::count_void<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::value,
+ T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type type;
+ };
+ typedef typename adaptor_type::result_type result_type;
+
+ /** Invokes the wrapped functor passing on the bound argument only.
+ * @return The return value of the functor invocation.
+ */
+ result_type
+ operator()();
+
+ /** Invokes the wrapped functor passing on the arguments.
+ * The last 6 argument(s) are fixed.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1>
+ typename deduce_result_type<T_arg1>::type
+ operator()(T_arg1 _A_arg1)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_type1>::pass,typename type_trait<T_type2>::pass,typename type_trait<T_type3>::pass,typename type_trait<T_type4>::pass,typename type_trait<T_type5>::pass,typename type_trait<T_type6>::pass>
+ (_A_arg1, bound1_,bound2_,bound3_,bound4_,bound5_,bound6_);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1>
+ typename deduce_result_type<T_arg1>::type
+ sun_forte_workaround(T_arg1 _A_arg1)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_type1>::pass,typename type_trait<T_type2>::pass,typename type_trait<T_type3>::pass,typename type_trait<T_type4>::pass,typename type_trait<T_type5>::pass,typename type_trait<T_type6>::pass>
+ (_A_arg1, bound1_,bound2_,bound3_,bound4_,bound5_,bound6_);
+ }
+ #endif
+
+ /** Constructs a bind_functor object that binds an argument to the passed functor.
+ * @param _A_functor Functor to invoke from operator()().
+ * @param _A_bound Argument to bind to the functor.
+ */
+ bind_functor(typename type_trait<T_functor>::take _A_func, typename type_trait<T_type1>::take _A_bound1,typename type_trait<T_type2>::take _A_bound2,typename type_trait<T_type3>::take _A_bound3,typename type_trait<T_type4>::take _A_bound4,typename type_trait<T_type5>::take _A_bound5,typename type_trait<T_type6>::take _A_bound6)
+ : adapts<T_functor>(_A_func), bound1_(_A_bound1),bound2_(_A_bound2),bound3_(_A_bound3),bound4_(_A_bound4),bound5_(_A_bound5),bound6_(_A_bound6)
+ {}
+
+ /// The argument bound to the functor.
+ T_type1 bound1_;
+ T_type2 bound2_;
+ T_type3 bound3_;
+ T_type4 bound4_;
+ T_type5 bound5_;
+ T_type6 bound6_;
+};
+
+template <class T_functor, class T_type1,class T_type2,class T_type3,class T_type4,class T_type5,class T_type6>
+typename bind_functor<-1, T_functor, T_type1,T_type2,T_type3,T_type4,T_type5,T_type6>::result_type
+bind_functor<-1, T_functor, T_type1,T_type2,T_type3,T_type4,T_type5,T_type6>::operator()()
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_type1>::pass,typename type_trait<T_type2>::pass,typename type_trait<T_type3>::pass,typename type_trait<T_type4>::pass,typename type_trait<T_type5>::pass,typename type_trait<T_type6>::pass> (bound1_,bound2_,bound3_,bound4_,bound5_,bound6_); }
+
+/** Performs a functor on each of the targets of a functor.
+ * The function overload for sigc::bind_functor performs a functor on the
+ * functor and on the object instances stored in the sigc::bind_functor object.
+ *
+ * @ingroup bind
+ */
+template <class T_action, class T_functor, class T_type1,class T_type2,class T_type3,class T_type4,class T_type5,class T_type6>
+void visit_each(const T_action& _A_action,
+ const bind_functor<-1, T_functor, T_type1,T_type2,T_type3,T_type4,T_type5,T_type6>& _A_target)
+{
+ visit_each(_A_action, _A_target.functor_);
+ visit_each(_A_action, _A_target.bound1_);
+ visit_each(_A_action, _A_target.bound2_);
+ visit_each(_A_action, _A_target.bound3_);
+ visit_each(_A_action, _A_target.bound4_);
+ visit_each(_A_action, _A_target.bound5_);
+ visit_each(_A_action, _A_target.bound6_);
+}
+
+/** Adaptor that binds 7 argument(s) to the wrapped functor.
+ * This template specialization fixes the last 7 argument(s) of the wrapped functor.
+ *
+ * @ingroup bind
+ */
+template <class T_functor, class T_type1,class T_type2,class T_type3,class T_type4,class T_type5,class T_type6,class T_type7>
+struct bind_functor<-1, T_functor, T_type1,T_type2,T_type3,T_type4,T_type5,T_type6,T_type7> : public adapts<T_functor>
+{
+ typedef typename adapts<T_functor>::adaptor_type adaptor_type;
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+ template <int count, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ struct deduce_result_type_internal
+ { typedef typename adaptor_type::template deduce_result_type<typename type_trait<T_type1>::pass,typename type_trait<T_type2>::pass,typename type_trait<T_type3>::pass,typename type_trait<T_type4>::pass,typename type_trait<T_type5>::pass,typename type_trait<T_type6>::pass,typename type_trait<T_type7>::pass>::type type; };
+#endif /*DOXYGEN_SHOULD_SKIP_THIS*/
+
+ template <class T_arg1=void,class T_arg2=void,class T_arg3=void,class T_arg4=void,class T_arg5=void,class T_arg6=void,class T_arg7=void>
+ struct deduce_result_type {
+ typedef typename deduce_result_type_internal<internal::count_void<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::value,
+ T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type type;
+ };
+ typedef typename adaptor_type::result_type result_type;
+
+ /** Invokes the wrapped functor passing on the bound argument only.
+ * @return The return value of the functor invocation.
+ */
+ result_type
+ operator()();
+
+ /** Constructs a bind_functor object that binds an argument to the passed functor.
+ * @param _A_functor Functor to invoke from operator()().
+ * @param _A_bound Argument to bind to the functor.
+ */
+ bind_functor(typename type_trait<T_functor>::take _A_func, typename type_trait<T_type1>::take _A_bound1,typename type_trait<T_type2>::take _A_bound2,typename type_trait<T_type3>::take _A_bound3,typename type_trait<T_type4>::take _A_bound4,typename type_trait<T_type5>::take _A_bound5,typename type_trait<T_type6>::take _A_bound6,typename type_trait<T_type7>::take _A_bound7)
+ : adapts<T_functor>(_A_func), bound1_(_A_bound1),bound2_(_A_bound2),bound3_(_A_bound3),bound4_(_A_bound4),bound5_(_A_bound5),bound6_(_A_bound6),bound7_(_A_bound7)
+ {}
+
+ /// The argument bound to the functor.
+ T_type1 bound1_;
+ T_type2 bound2_;
+ T_type3 bound3_;
+ T_type4 bound4_;
+ T_type5 bound5_;
+ T_type6 bound6_;
+ T_type7 bound7_;
+};
+
+template <class T_functor, class T_type1,class T_type2,class T_type3,class T_type4,class T_type5,class T_type6,class T_type7>
+typename bind_functor<-1, T_functor, T_type1,T_type2,T_type3,T_type4,T_type5,T_type6,T_type7>::result_type
+bind_functor<-1, T_functor, T_type1,T_type2,T_type3,T_type4,T_type5,T_type6,T_type7>::operator()()
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_type1>::pass,typename type_trait<T_type2>::pass,typename type_trait<T_type3>::pass,typename type_trait<T_type4>::pass,typename type_trait<T_type5>::pass,typename type_trait<T_type6>::pass,typename type_trait<T_type7>::pass> (bound1_,bound2_,bound3_,bound4_,bound5_,bound6_,bound7_); }
+
+/** Performs a functor on each of the targets of a functor.
+ * The function overload for sigc::bind_functor performs a functor on the
+ * functor and on the object instances stored in the sigc::bind_functor object.
+ *
+ * @ingroup bind
+ */
+template <class T_action, class T_functor, class T_type1,class T_type2,class T_type3,class T_type4,class T_type5,class T_type6,class T_type7>
+void visit_each(const T_action& _A_action,
+ const bind_functor<-1, T_functor, T_type1,T_type2,T_type3,T_type4,T_type5,T_type6,T_type7>& _A_target)
+{
+ visit_each(_A_action, _A_target.functor_);
+ visit_each(_A_action, _A_target.bound1_);
+ visit_each(_A_action, _A_target.bound2_);
+ visit_each(_A_action, _A_target.bound3_);
+ visit_each(_A_action, _A_target.bound4_);
+ visit_each(_A_action, _A_target.bound5_);
+ visit_each(_A_action, _A_target.bound6_);
+ visit_each(_A_action, _A_target.bound7_);
+}
+
+
+/** Creates an adaptor of type sigc::bind_functor which binds the passed argument to the passed functor.
+ * The optional template argument @e I_location specifies the zero-based
+ * position of the argument to be fixed (@p -1 stands for the last argument).
+ *
+ * @param _A_func Functor that should be wrapped.
+ * @param _A_b1 Argument to bind to @e _A_func.
+ * @return Adaptor that executes @e _A_func with the bound argument on invokation.
+ *
+ * @ingroup bind
+ */
+template <int I_location, class T_bound1, class T_functor>
+inline bind_functor<I_location, T_functor, typename unwrap_reference<T_bound1>::type>
+bind(const T_functor& _A_func, T_bound1 _A_b1)
+{
+ return bind_functor<I_location, T_functor, typename unwrap_reference<T_bound1>::type>
+ (_A_func, _A_b1);
+}
+
+/** Creates an adaptor of type sigc::bind_functor which fixes the last 1 argument(s) of the passed functor.
+ * This function overload fixes the last 1 argument(s) of @e _A_func.
+ *
+ * @param _A_func Functor that should be wrapped.
+ * @param _A_b1 Argument to bind to @e _A_func.
+ * @return Adaptor that executes _A_func with the bound argument on invokation.
+ *
+ * @ingroup bind
+ */
+template <class T_type1, class T_functor>
+inline bind_functor<-1, T_functor,
+ typename unwrap_reference<T_type1>::type>
+bind(const T_functor& _A_func, T_type1 _A_b1)
+{ return bind_functor<-1, T_functor,
+ typename unwrap_reference<T_type1>::type>
+ (_A_func, _A_b1);
+}
+
+/** Creates an adaptor of type sigc::bind_functor which fixes the last 2 argument(s) of the passed functor.
+ * This function overload fixes the last 2 argument(s) of @e _A_func.
+ *
+ * @param _A_func Functor that should be wrapped.
+ * @param _A_b1 Argument to bind to @e _A_func.
+ * @param _A_b2 Argument to bind to @e _A_func.
+ * @return Adaptor that executes _A_func with the bound argument on invokation.
+ *
+ * @ingroup bind
+ */
+template <class T_type1,class T_type2, class T_functor>
+inline bind_functor<-1, T_functor,
+ typename unwrap_reference<T_type1>::type,
+ typename unwrap_reference<T_type2>::type>
+bind(const T_functor& _A_func, T_type1 _A_b1,T_type2 _A_b2)
+{ return bind_functor<-1, T_functor,
+ typename unwrap_reference<T_type1>::type,
+ typename unwrap_reference<T_type2>::type>
+ (_A_func, _A_b1,_A_b2);
+}
+
+/** Creates an adaptor of type sigc::bind_functor which fixes the last 3 argument(s) of the passed functor.
+ * This function overload fixes the last 3 argument(s) of @e _A_func.
+ *
+ * @param _A_func Functor that should be wrapped.
+ * @param _A_b1 Argument to bind to @e _A_func.
+ * @param _A_b2 Argument to bind to @e _A_func.
+ * @param _A_b3 Argument to bind to @e _A_func.
+ * @return Adaptor that executes _A_func with the bound argument on invokation.
+ *
+ * @ingroup bind
+ */
+template <class T_type1,class T_type2,class T_type3, class T_functor>
+inline bind_functor<-1, T_functor,
+ typename unwrap_reference<T_type1>::type,
+ typename unwrap_reference<T_type2>::type,
+ typename unwrap_reference<T_type3>::type>
+bind(const T_functor& _A_func, T_type1 _A_b1,T_type2 _A_b2,T_type3 _A_b3)
+{ return bind_functor<-1, T_functor,
+ typename unwrap_reference<T_type1>::type,
+ typename unwrap_reference<T_type2>::type,
+ typename unwrap_reference<T_type3>::type>
+ (_A_func, _A_b1,_A_b2,_A_b3);
+}
+
+/** Creates an adaptor of type sigc::bind_functor which fixes the last 4 argument(s) of the passed functor.
+ * This function overload fixes the last 4 argument(s) of @e _A_func.
+ *
+ * @param _A_func Functor that should be wrapped.
+ * @param _A_b1 Argument to bind to @e _A_func.
+ * @param _A_b2 Argument to bind to @e _A_func.
+ * @param _A_b3 Argument to bind to @e _A_func.
+ * @param _A_b4 Argument to bind to @e _A_func.
+ * @return Adaptor that executes _A_func with the bound argument on invokation.
+ *
+ * @ingroup bind
+ */
+template <class T_type1,class T_type2,class T_type3,class T_type4, class T_functor>
+inline bind_functor<-1, T_functor,
+ typename unwrap_reference<T_type1>::type,
+ typename unwrap_reference<T_type2>::type,
+ typename unwrap_reference<T_type3>::type,
+ typename unwrap_reference<T_type4>::type>
+bind(const T_functor& _A_func, T_type1 _A_b1,T_type2 _A_b2,T_type3 _A_b3,T_type4 _A_b4)
+{ return bind_functor<-1, T_functor,
+ typename unwrap_reference<T_type1>::type,
+ typename unwrap_reference<T_type2>::type,
+ typename unwrap_reference<T_type3>::type,
+ typename unwrap_reference<T_type4>::type>
+ (_A_func, _A_b1,_A_b2,_A_b3,_A_b4);
+}
+
+/** Creates an adaptor of type sigc::bind_functor which fixes the last 5 argument(s) of the passed functor.
+ * This function overload fixes the last 5 argument(s) of @e _A_func.
+ *
+ * @param _A_func Functor that should be wrapped.
+ * @param _A_b1 Argument to bind to @e _A_func.
+ * @param _A_b2 Argument to bind to @e _A_func.
+ * @param _A_b3 Argument to bind to @e _A_func.
+ * @param _A_b4 Argument to bind to @e _A_func.
+ * @param _A_b5 Argument to bind to @e _A_func.
+ * @return Adaptor that executes _A_func with the bound argument on invokation.
+ *
+ * @ingroup bind
+ */
+template <class T_type1,class T_type2,class T_type3,class T_type4,class T_type5, class T_functor>
+inline bind_functor<-1, T_functor,
+ typename unwrap_reference<T_type1>::type,
+ typename unwrap_reference<T_type2>::type,
+ typename unwrap_reference<T_type3>::type,
+ typename unwrap_reference<T_type4>::type,
+ typename unwrap_reference<T_type5>::type>
+bind(const T_functor& _A_func, T_type1 _A_b1,T_type2 _A_b2,T_type3 _A_b3,T_type4 _A_b4,T_type5 _A_b5)
+{ return bind_functor<-1, T_functor,
+ typename unwrap_reference<T_type1>::type,
+ typename unwrap_reference<T_type2>::type,
+ typename unwrap_reference<T_type3>::type,
+ typename unwrap_reference<T_type4>::type,
+ typename unwrap_reference<T_type5>::type>
+ (_A_func, _A_b1,_A_b2,_A_b3,_A_b4,_A_b5);
+}
+
+/** Creates an adaptor of type sigc::bind_functor which fixes the last 6 argument(s) of the passed functor.
+ * This function overload fixes the last 6 argument(s) of @e _A_func.
+ *
+ * @param _A_func Functor that should be wrapped.
+ * @param _A_b1 Argument to bind to @e _A_func.
+ * @param _A_b2 Argument to bind to @e _A_func.
+ * @param _A_b3 Argument to bind to @e _A_func.
+ * @param _A_b4 Argument to bind to @e _A_func.
+ * @param _A_b5 Argument to bind to @e _A_func.
+ * @param _A_b6 Argument to bind to @e _A_func.
+ * @return Adaptor that executes _A_func with the bound argument on invokation.
+ *
+ * @ingroup bind
+ */
+template <class T_type1,class T_type2,class T_type3,class T_type4,class T_type5,class T_type6, class T_functor>
+inline bind_functor<-1, T_functor,
+ typename unwrap_reference<T_type1>::type,
+ typename unwrap_reference<T_type2>::type,
+ typename unwrap_reference<T_type3>::type,
+ typename unwrap_reference<T_type4>::type,
+ typename unwrap_reference<T_type5>::type,
+ typename unwrap_reference<T_type6>::type>
+bind(const T_functor& _A_func, T_type1 _A_b1,T_type2 _A_b2,T_type3 _A_b3,T_type4 _A_b4,T_type5 _A_b5,T_type6 _A_b6)
+{ return bind_functor<-1, T_functor,
+ typename unwrap_reference<T_type1>::type,
+ typename unwrap_reference<T_type2>::type,
+ typename unwrap_reference<T_type3>::type,
+ typename unwrap_reference<T_type4>::type,
+ typename unwrap_reference<T_type5>::type,
+ typename unwrap_reference<T_type6>::type>
+ (_A_func, _A_b1,_A_b2,_A_b3,_A_b4,_A_b5,_A_b6);
+}
+
+/** Creates an adaptor of type sigc::bind_functor which fixes the last 7 argument(s) of the passed functor.
+ * This function overload fixes the last 7 argument(s) of @e _A_func.
+ *
+ * @param _A_func Functor that should be wrapped.
+ * @param _A_b1 Argument to bind to @e _A_func.
+ * @param _A_b2 Argument to bind to @e _A_func.
+ * @param _A_b3 Argument to bind to @e _A_func.
+ * @param _A_b4 Argument to bind to @e _A_func.
+ * @param _A_b5 Argument to bind to @e _A_func.
+ * @param _A_b6 Argument to bind to @e _A_func.
+ * @param _A_b7 Argument to bind to @e _A_func.
+ * @return Adaptor that executes _A_func with the bound argument on invokation.
+ *
+ * @ingroup bind
+ */
+template <class T_type1,class T_type2,class T_type3,class T_type4,class T_type5,class T_type6,class T_type7, class T_functor>
+inline bind_functor<-1, T_functor,
+ typename unwrap_reference<T_type1>::type,
+ typename unwrap_reference<T_type2>::type,
+ typename unwrap_reference<T_type3>::type,
+ typename unwrap_reference<T_type4>::type,
+ typename unwrap_reference<T_type5>::type,
+ typename unwrap_reference<T_type6>::type,
+ typename unwrap_reference<T_type7>::type>
+bind(const T_functor& _A_func, T_type1 _A_b1,T_type2 _A_b2,T_type3 _A_b3,T_type4 _A_b4,T_type5 _A_b5,T_type6 _A_b6,T_type7 _A_b7)
+{ return bind_functor<-1, T_functor,
+ typename unwrap_reference<T_type1>::type,
+ typename unwrap_reference<T_type2>::type,
+ typename unwrap_reference<T_type3>::type,
+ typename unwrap_reference<T_type4>::type,
+ typename unwrap_reference<T_type5>::type,
+ typename unwrap_reference<T_type6>::type,
+ typename unwrap_reference<T_type7>::type>
+ (_A_func, _A_b1,_A_b2,_A_b3,_A_b4,_A_b5,_A_b6,_A_b7);
+}
+
+
+} /* namespace sigc */
+#endif /* _SIGC_ADAPTORS_MACROS_BINDHM4_ */
diff --git a/libs/sigc++2/sigc++/adaptors/bind_return.h b/libs/sigc++2/sigc++/adaptors/bind_return.h
new file mode 100644
index 0000000000..40e3524090
--- /dev/null
+++ b/libs/sigc++2/sigc++/adaptors/bind_return.h
@@ -0,0 +1,204 @@
+// -*- c++ -*-
+/* Do not edit! -- generated file */
+#ifndef _SIGC_ADAPTORS_MACROS_BIND_RETURNHM4_
+#define _SIGC_ADAPTORS_MACROS_BIND_RETURNHM4_
+#include <sigc++/adaptors/adaptor_trait.h>
+
+namespace sigc {
+
+/** Adaptor that fixes the return value of the wrapped functor.
+ * Use the convenience function sigc::bind_return() to create an instance of sigc::bind_return_functor.
+ *
+ * The following template arguments are used:
+ * - @e T_return Type of the fixed return value.
+ * - @e T_functor Type of the functor to wrap.
+ *
+ * @ingroup bind
+ */
+template <class T_return, class T_functor>
+struct bind_return_functor : public adapts<T_functor>
+{
+ template <class T_arg1=void,class T_arg2=void,class T_arg3=void,class T_arg4=void,class T_arg5=void,class T_arg6=void,class T_arg7=void>
+ struct deduce_result_type
+ { typedef T_return type; };
+ typedef T_return result_type;
+
+ /** Invokes the wrapped functor dropping its return value.
+ * @return The fixed return value.
+ */
+ T_return operator()();
+
+ /** Invokes the wrapped functor passing on the arguments.,
+ * @param _A_arg%1 Argument to be passed on to the functor.)
+ * @return The fixed return value.
+ */
+ template <class T_arg1>
+ inline T_return operator()(T_arg1 _A_a1)
+ { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass>
+ (_A_a1); return ret_value_;
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1>
+ inline T_return sun_forte_workaround(T_arg1 _A_a1)
+ { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass>
+ (_A_a1); return ret_value_;
+ }
+ #endif
+
+ /** Invokes the wrapped functor passing on the arguments.,
+ * @param _A_arg%1 Argument to be passed on to the functor.)
+ * @return The fixed return value.
+ */
+ template <class T_arg1,class T_arg2>
+ inline T_return operator()(T_arg1 _A_a1,T_arg2 _A_a2)
+ { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass>
+ (_A_a1,_A_a2); return ret_value_;
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2>
+ inline T_return sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2)
+ { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass>
+ (_A_a1,_A_a2); return ret_value_;
+ }
+ #endif
+
+ /** Invokes the wrapped functor passing on the arguments.,
+ * @param _A_arg%1 Argument to be passed on to the functor.)
+ * @return The fixed return value.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3>
+ inline T_return operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3)
+ { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass>
+ (_A_a1,_A_a2,_A_a3); return ret_value_;
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3>
+ inline T_return sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3)
+ { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass>
+ (_A_a1,_A_a2,_A_a3); return ret_value_;
+ }
+ #endif
+
+ /** Invokes the wrapped functor passing on the arguments.,
+ * @param _A_arg%1 Argument to be passed on to the functor.)
+ * @return The fixed return value.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ inline T_return operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4)
+ { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass>
+ (_A_a1,_A_a2,_A_a3,_A_a4); return ret_value_;
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ inline T_return sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4)
+ { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass>
+ (_A_a1,_A_a2,_A_a3,_A_a4); return ret_value_;
+ }
+ #endif
+
+ /** Invokes the wrapped functor passing on the arguments.,
+ * @param _A_arg%1 Argument to be passed on to the functor.)
+ * @return The fixed return value.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ inline T_return operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5)
+ { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass>
+ (_A_a1,_A_a2,_A_a3,_A_a4,_A_a5); return ret_value_;
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ inline T_return sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5)
+ { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass>
+ (_A_a1,_A_a2,_A_a3,_A_a4,_A_a5); return ret_value_;
+ }
+ #endif
+
+ /** Invokes the wrapped functor passing on the arguments.,
+ * @param _A_arg%1 Argument to be passed on to the functor.)
+ * @return The fixed return value.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ inline T_return operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6)
+ { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass>
+ (_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6); return ret_value_;
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ inline T_return sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6)
+ { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass>
+ (_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6); return ret_value_;
+ }
+ #endif
+
+ /** Invokes the wrapped functor passing on the arguments.,
+ * @param _A_arg%1 Argument to be passed on to the functor.)
+ * @return The fixed return value.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ inline T_return operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6,T_arg7 _A_a7)
+ { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass,typename type_trait<T_arg7>::pass>
+ (_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7); return ret_value_;
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ inline T_return sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6,T_arg7 _A_a7)
+ { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass,typename type_trait<T_arg7>::pass>
+ (_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7); return ret_value_;
+ }
+ #endif
+
+
+ /** Constructs a bind_return_functor object that fixes the return value to @p _A_ret_value.
+ * @param _A_functor Functor to invoke from operator()().
+ * @param _A_ret_value Value to return from operator()().
+ */
+ bind_return_functor(typename type_trait<T_functor>::take _A_functor, typename type_trait<T_return>::take _A_ret_value)
+ : adapts<T_functor>(_A_functor), ret_value_(_A_ret_value)
+ {}
+
+ /// The fixed return value.
+ T_return ret_value_; // public, so that visit_each() can access it
+};
+
+template <class T_return, class T_functor>
+T_return bind_return_functor<T_return, T_functor>::operator()()
+ { this->functor_(); return ret_value_; }
+
+
+/** Performs a functor on each of the targets of a functor.
+ * The function overload for sigc::bind_return_functor performs a functor on the
+ * functor and on the object instance stored in the sigc::bind_return_functor object.
+ *
+ * @ingroup bind
+ */
+template <class T_action, class T_return, class T_functor>
+void visit_each(const T_action& _A_action,
+ const bind_return_functor<T_return, T_functor>& _A_target)
+{
+ visit_each(_A_action, _A_target.ret_value_);
+ visit_each(_A_action, _A_target.functor_);
+}
+
+
+/** Creates an adaptor of type sigc::bind_return_functor which fixes the return value of the passed functor to the passed argument.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @param _A_ret_value Argument to fix the return value of @e _A_functor to.
+ * @return Adaptor that executes @e _A_functor on invokation and returns @e _A_ret_value.
+ *
+ * @ingroup bind
+ */
+template <class T_return, class T_functor>
+inline bind_return_functor<typename unwrap_reference<T_return>::type, T_functor>
+bind_return(const T_functor& _A_functor, T_return _A_ret_value)
+{ return bind_return_functor<typename unwrap_reference<T_return>::type, T_functor>(_A_functor, _A_ret_value); }
+
+} /* namespace sigc */
+#endif /* _SIGC_ADAPTORS_MACROS_BIND_RETURNHM4_ */
diff --git a/libs/sigc++2/sigc++/adaptors/compose.h b/libs/sigc++2/sigc++/adaptors/compose.h
new file mode 100644
index 0000000000..0f098ff2df
--- /dev/null
+++ b/libs/sigc++2/sigc++/adaptors/compose.h
@@ -0,0 +1,294 @@
+// -*- c++ -*-
+/* Do not edit! -- generated file */
+
+#ifndef _SIGC_ADAPTORS_MACROS_COMPOSEHM4_
+#define _SIGC_ADAPTORS_MACROS_COMPOSEHM4_
+#include <sigc++/adaptors/adaptor_trait.h>
+
+namespace sigc {
+
+/** @defgroup compose compose()
+ * sigc::compose() combines two or three arbitrary functors.
+ * On invokation parameters are passed on to one or two getter functor(s).
+ * The return value(s) are then passed on to the setter function.
+ *
+ * @par Examples:
+ * @code
+ * float square_root(float a) { return sqrtf(a); }
+ * float sum(float a, float b) { return a+b; }
+ * std::cout << sigc::compose(&square_root, &sum)(9, 16); // calls square_root(sum(3,6))
+ * std::cout << sigc::compose(&sum, &square_root, &square_root)(9); // calls sum(square_root(9), square_root(9))
+ * @endcode
+ *
+ * The functor sigc::compose() returns can be passed into
+ * sigc::signal::connect() directly.
+ *
+ * @par Example:
+ * @code
+ * sigc::signal<float,float,float> some_signal;
+ * some_signal.connect(sigc::compose(&square_root, &sum));
+ * @endcode
+ *
+ * For a more powerful version of this functionality see the lambda
+ * library adaptor sigc::group() which can bind, hide and reorder
+ * arguments arbitrarily. Although sigc::group() is more flexible,
+ * sigc::bind() provides a means of binding parameters when then total
+ * number of parameters called is variable.
+ *
+ * @ingroup adaptors
+ */
+
+/** Adaptor that combines two functors.
+ * Use the convenience function sigc::compose() to create an instance of sigc::compose1_functor.
+ *
+ * The following template arguments are used:
+ * - @e T_setter Type of the setter functor to wrap.
+ * - @e T_getter Type of the getter functor to wrap.
+ *
+ * @ingroup compose
+ */
+template <class T_setter, class T_getter>
+struct compose1_functor : public adapts<T_setter>
+{
+ typedef typename adapts<T_setter>::adaptor_type adaptor_type;
+
+ template <class T_arg1=void,class T_arg2=void,class T_arg3=void,class T_arg4=void,class T_arg5=void,class T_arg6=void,class T_arg7=void>
+ struct deduce_result_type
+ { typedef typename adaptor_type::template deduce_result_type<
+ typename sigc::deduce_result_type<T_getter, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type
+ >::type type; };
+ typedef typename adaptor_type::result_type result_type;
+
+ result_type
+ operator()();
+
+ template <class T_arg1>
+ typename deduce_result_type<T_arg1>::type
+ operator()(T_arg1 _A_a1)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename sigc::deduce_result_type<T_getter, T_arg1>::type>
+ (get_(_A_a1));
+ }
+
+ template <class T_arg1,class T_arg2>
+ typename deduce_result_type<T_arg1,T_arg2>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename sigc::deduce_result_type<T_getter, T_arg1,T_arg2>::type>
+ (get_(_A_a1,_A_a2));
+ }
+
+ template <class T_arg1,class T_arg2,class T_arg3>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename sigc::deduce_result_type<T_getter, T_arg1,T_arg2,T_arg3>::type>
+ (get_(_A_a1,_A_a2,_A_a3));
+ }
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename sigc::deduce_result_type<T_getter, T_arg1,T_arg2,T_arg3,T_arg4>::type>
+ (get_(_A_a1,_A_a2,_A_a3,_A_a4));
+ }
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename sigc::deduce_result_type<T_getter, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type>
+ (get_(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5));
+ }
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename sigc::deduce_result_type<T_getter, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type>
+ (get_(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6));
+ }
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6,T_arg7 _A_a7)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename sigc::deduce_result_type<T_getter, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type>
+ (get_(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7));
+ }
+
+
+ /** Constructs a compose1_functor object that combines the passed functors.
+ * @param _A_setter Functor that receives the return values of the invokation of @e _A_getter1 and @e _A_getter2.
+ * @param _A_getter1 Functor to invoke from operator()().
+ * @param _A_getter2 Functor to invoke from operator()().
+ */
+ compose1_functor(const T_setter& _A_setter, const T_getter& _A_getter)
+ : adapts<T_setter>(_A_setter), get_(_A_getter)
+ {}
+
+ T_getter get_; // public, so that visit_each() can access it
+};
+
+template <class T_setter, class T_getter>
+typename compose1_functor<T_setter, T_getter>::result_type
+compose1_functor<T_setter, T_getter>::operator()()
+ { return this->functor_(get_()); }
+
+/** Adaptor that combines three functors.
+ * Use the convenience function sigc::compose() to create an instance of sigc::compose2_functor.
+ *
+ * The following template arguments are used:
+ * - @e T_setter Type of the setter functor to wrap.
+ * - @e T_getter1 Type of the first getter functor to wrap.
+ * - @e T_getter2 Type of the second getter functor to wrap.
+ *
+ * @ingroup compose
+ */
+template <class T_setter, class T_getter1, class T_getter2>
+struct compose2_functor : public adapts<T_setter>
+{
+ typedef typename adapts<T_setter>::adaptor_type adaptor_type;
+
+ template <class T_arg1=void,class T_arg2=void,class T_arg3=void,class T_arg4=void,class T_arg5=void,class T_arg6=void,class T_arg7=void>
+ struct deduce_result_type
+ { typedef typename adaptor_type::template deduce_result_type<
+ typename sigc::deduce_result_type<T_getter1, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type,
+ typename sigc::deduce_result_type<T_getter2, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type
+ >::type result_type; };
+ typedef typename adaptor_type::result_type result_type;
+
+ result_type
+ operator()();
+
+ template <class T_arg1>
+ typename deduce_result_type<T_arg1>::type
+ operator()(T_arg1 _A_a1)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename sigc::deduce_result_type<T_getter1, T_arg1>::type,
+ typename sigc::deduce_result_type<T_getter2, T_arg1>::type>
+ (get1_(_A_a1), get2_(_A_a1));
+ }
+
+ template <class T_arg1,class T_arg2>
+ typename deduce_result_type<T_arg1,T_arg2>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename sigc::deduce_result_type<T_getter1, T_arg1,T_arg2>::type,
+ typename sigc::deduce_result_type<T_getter2, T_arg1,T_arg2>::type>
+ (get1_(_A_a1,_A_a2), get2_(_A_a1,_A_a2));
+ }
+
+ template <class T_arg1,class T_arg2,class T_arg3>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename sigc::deduce_result_type<T_getter1, T_arg1,T_arg2,T_arg3>::type,
+ typename sigc::deduce_result_type<T_getter2, T_arg1,T_arg2,T_arg3>::type>
+ (get1_(_A_a1,_A_a2,_A_a3), get2_(_A_a1,_A_a2,_A_a3));
+ }
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename sigc::deduce_result_type<T_getter1, T_arg1,T_arg2,T_arg3,T_arg4>::type,
+ typename sigc::deduce_result_type<T_getter2, T_arg1,T_arg2,T_arg3,T_arg4>::type>
+ (get1_(_A_a1,_A_a2,_A_a3,_A_a4), get2_(_A_a1,_A_a2,_A_a3,_A_a4));
+ }
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename sigc::deduce_result_type<T_getter1, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type,
+ typename sigc::deduce_result_type<T_getter2, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type>
+ (get1_(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5), get2_(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5));
+ }
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename sigc::deduce_result_type<T_getter1, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type,
+ typename sigc::deduce_result_type<T_getter2, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type>
+ (get1_(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6), get2_(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6));
+ }
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6,T_arg7 _A_a7)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename sigc::deduce_result_type<T_getter1, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type,
+ typename sigc::deduce_result_type<T_getter2, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type>
+ (get1_(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7), get2_(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7));
+ }
+
+
+ /** Constructs a compose2_functor object that combines the passed functors.
+ * @param _A_setter Functor that receives the return values of the invokation of @e _A_getter1 and @e _A_getter2.
+ * @param _A_getter1 Functor to invoke from operator()().
+ * @param _A_getter2 Functor to invoke from operator()().
+ */
+ compose2_functor(const T_setter& _A_setter,
+ const T_getter1& _A_getter1,
+ const T_getter2& _A_getter2)
+ : adapts<T_setter>(_A_setter), get1_(_A_getter1), get2_(_A_getter2)
+ {}
+
+ T_getter1 get1_; // public, so that visit_each() can access it
+ T_getter2 get2_; // public, so that visit_each() can access it
+};
+
+template <class T_setter, class T_getter1, class T_getter2>
+typename compose2_functor<T_setter, T_getter1, T_getter2>::result_type
+compose2_functor<T_setter, T_getter1, T_getter2>::operator()()
+ { return this->functor_(get1_(), get2_()); }
+
+
+/** Performs a functor on each of the targets of a functor.
+ * The function overload for sigc::compose1_functor performs a functor on the
+ * functors stored in the sigc::compose1_functor object.
+ *
+ * @ingroup compose
+ */
+template <class T_action, class T_setter, class T_getter>
+void visit_each(const T_action& _A_action,
+ const compose1_functor<T_setter, T_getter>& _A_target)
+{
+ visit_each(_A_action, _A_target.functor_);
+ visit_each(_A_action, _A_target.get_);
+}
+
+/** Performs a functor on each of the targets of a functor.
+ * The function overload for sigc::compose2_functor performs a functor on the
+ * functors stored in the sigc::compose2_functor object.
+ *
+ * @ingroup compose
+ */
+template <class T_action, class T_setter, class T_getter1, class T_getter2>
+void visit_each(const T_action& _A_action,
+ const compose2_functor<T_setter, T_getter1, T_getter2>& _A_target)
+{
+ visit_each(_A_action, _A_target.functor_);
+ visit_each(_A_action, _A_target.get1_);
+ visit_each(_A_action, _A_target.get2_);
+}
+
+
+/** Creates an adaptor of type sigc::compose1_functor which combines two functors.
+ *
+ * @param _A_setter Functor that receives the return value of the invokation of @e _A_getter.
+ * @param _A_getter Functor to invoke from operator()().
+ * @return Adaptor that executes @e _A_setter with the value returned from invokation of @e _A_getter.
+ *
+ * @ingroup compose
+ */
+template <class T_setter, class T_getter>
+inline compose1_functor<T_setter, T_getter>
+compose(const T_setter& _A_setter, const T_getter& _A_getter)
+ { return compose1_functor<T_setter, T_getter>(_A_setter, _A_getter); }
+
+/** Creates an adaptor of type sigc::compose2_functor which combines three functors.
+ *
+ * @param _A_setter Functor that receives the return values of the invokation of @e _A_getter1 and @e _A_getter2.
+ * @param _A_getter1 Functor to invoke from operator()().
+ * @param _A_getter2 Functor to invoke from operator()().
+ * @return Adaptor that executes @e _A_setter with the values return from invokation of @e _A_getter1 and @e _A_getter2.
+ *
+ * @ingroup compose
+ */
+template <class T_setter, class T_getter1, class T_getter2>
+inline compose2_functor<T_setter, T_getter1, T_getter2>
+compose(const T_setter& _A_setter, const T_getter1& _A_getter1, const T_getter2& _A_getter2)
+ { return compose2_functor<T_setter, T_getter1, T_getter2>(_A_setter, _A_getter1, _A_getter2); }
+
+} /* namespace sigc */
+#endif /* _SIGC_ADAPTORS_MACROS_COMPOSEHM4_ */
diff --git a/libs/sigc++2/sigc++/adaptors/deduce_result_type.h b/libs/sigc++2/sigc++/adaptors/deduce_result_type.h
new file mode 100644
index 0000000000..397bb50ff7
--- /dev/null
+++ b/libs/sigc++2/sigc++/adaptors/deduce_result_type.h
@@ -0,0 +1,121 @@
+// -*- c++ -*-
+/* Do not edit! -- generated file */
+/*
+*/
+#ifndef _SIGC_ADAPTORS_MACROS_DEDUCE_RESULT_TYPEHM4_
+#define _SIGC_ADAPTORS_MACROS_DEDUCE_RESULT_TYPEHM4_
+#include <sigc++/functors/functor_trait.h>
+
+
+namespace sigc {
+
+/** A hint to the compiler.
+ * Functors which have all methods based on templates
+ * should publicly inherit from this hint and define
+ * a nested template class @p deduce_result_type that
+ * can be used to deduce the methods' return types.
+ *
+ * adaptor_base inherits from the functor_base hint so
+ * derived types should also have a result_type defined.
+ *
+ * Adaptors don't inherit from this type directly. They use
+ * use sigc::adapts as a base type instead. sigc::adaptors
+ * wraps arbitrary functor types as well as function pointers
+ * and class methods.
+ *
+ * @ingroup adaptors
+ */
+struct adaptor_base : public functor_base {};
+
+
+/** Deduce the return type of a functor.
+ * <tt>typename deduce_result_type<functor_type, list of arg_types>::type</tt>
+ * deduces a functor's result type if @p functor_type inherits from
+ * sigc::functor_base and defines @p result_type or if @p functor_type
+ * is actually a (member) function type. Multi-type functors are not
+ * supported.
+ *
+ * sigc++ adaptors use
+ * <tt>typename deduce_result_type<functor_type, list of arg_types>::type</tt>
+ * to determine the return type of their <tt>templated operator()</tt> overloads.
+ *
+ * Adaptors in turn define a nested template class @p deduce_result_type
+ * that is used by template specializations of the global deduce_result_type
+ * template to correctly deduce the return types of the adaptor's suitable
+ * <tt>template operator()</tt> overload.
+ *
+ * @ingroup adaptors
+ */
+template <class T_functor,
+ class T_arg1=void,class T_arg2=void,class T_arg3=void,class T_arg4=void,class T_arg5=void,class T_arg6=void,class T_arg7=void,
+ bool I_derives_adaptor_base=is_base_and_derived<adaptor_base,T_functor>::value>
+struct deduce_result_type
+ { typedef typename functor_trait<T_functor>::result_type type; };
+
+/** Deduce the return type of a functor.
+ * This is the template specialization of the sigc::deduce_result_type template
+ * for 0 arguments.
+ */
+template <class T_functor>
+struct deduce_result_type<T_functor, void,void,void,void,void,void,void, true>
+ { typedef typename T_functor::template deduce_result_type<>::type type; };
+
+/** Deduce the return type of a functor.
+ * This is the template specialization of the sigc::deduce_result_type template
+ * for 1 arguments.
+ */
+template <class T_functor, class T_arg1>
+struct deduce_result_type<T_functor, T_arg1, void,void,void,void,void,void, true>
+ { typedef typename T_functor::template deduce_result_type<T_arg1>::type type; };
+
+/** Deduce the return type of a functor.
+ * This is the template specialization of the sigc::deduce_result_type template
+ * for 2 arguments.
+ */
+template <class T_functor, class T_arg1,class T_arg2>
+struct deduce_result_type<T_functor, T_arg1,T_arg2, void,void,void,void,void, true>
+ { typedef typename T_functor::template deduce_result_type<T_arg1,T_arg2>::type type; };
+
+/** Deduce the return type of a functor.
+ * This is the template specialization of the sigc::deduce_result_type template
+ * for 3 arguments.
+ */
+template <class T_functor, class T_arg1,class T_arg2,class T_arg3>
+struct deduce_result_type<T_functor, T_arg1,T_arg2,T_arg3, void,void,void,void, true>
+ { typedef typename T_functor::template deduce_result_type<T_arg1,T_arg2,T_arg3>::type type; };
+
+/** Deduce the return type of a functor.
+ * This is the template specialization of the sigc::deduce_result_type template
+ * for 4 arguments.
+ */
+template <class T_functor, class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+struct deduce_result_type<T_functor, T_arg1,T_arg2,T_arg3,T_arg4, void,void,void, true>
+ { typedef typename T_functor::template deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type type; };
+
+/** Deduce the return type of a functor.
+ * This is the template specialization of the sigc::deduce_result_type template
+ * for 5 arguments.
+ */
+template <class T_functor, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+struct deduce_result_type<T_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5, void,void, true>
+ { typedef typename T_functor::template deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type type; };
+
+/** Deduce the return type of a functor.
+ * This is the template specialization of the sigc::deduce_result_type template
+ * for 6 arguments.
+ */
+template <class T_functor, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+struct deduce_result_type<T_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6, void, true>
+ { typedef typename T_functor::template deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type type; };
+
+/** Deduce the return type of a functor.
+ * This is the template specialization of the sigc::deduce_result_type template
+ * for 7 arguments.
+ */
+template <class T_functor, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+struct deduce_result_type<T_functor, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7, true>
+ { typedef typename T_functor::template deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type type; };
+
+
+} /* namespace sigc */
+#endif /* _SIGC_ADAPTORS_MACROS_DEDUCE_RESULT_TYPEHM4_ */
diff --git a/libs/sigc++2/sigc++/adaptors/exception_catch.h b/libs/sigc++2/sigc++/adaptors/exception_catch.h
new file mode 100644
index 0000000000..cd7c41e67d
--- /dev/null
+++ b/libs/sigc++2/sigc++/adaptors/exception_catch.h
@@ -0,0 +1,319 @@
+// -*- c++ -*-
+/* Do not edit! -- generated file */
+#ifndef _SIGC_ADAPTORS_MACROS_EXCEPTION_CATCHHM4_
+#define _SIGC_ADAPTORS_MACROS_EXCEPTION_CATCHHM4_
+#include <sigc++/adaptors/adaptor_trait.h>
+
+namespace sigc {
+
+/*
+ functor adaptor: exception_catch(functor, catcher)
+
+ usage:
+
+
+ Future directions:
+ The catcher should be told what type of return it needs to
+ return for multiple type functors, to do this the user
+ will need to derive from catcher_base.
+*/
+/** @defgroup exception_catch exception_catch()
+ * sigc::exception_catch() catches an exception thrown from within
+ * the wrapped functor and directs it to a catcher functor.
+ * This catcher can then rethrow the exception and catch it with the proper type.
+ *
+ * Note that the catcher is expected to return the same type
+ * as the wrapped functor so that normal flow can continue.
+ *
+ * Catchers can be cascaded to catch multiple types because uncaught
+ * rethrown exceptions proceed to the next catcher adaptor.
+ *
+ * @par Examples:
+ * @code
+ * struct my_catch
+ * {
+ * int operator()()
+ * {
+ * try { throw; }
+ * catch (std::range_error e) // catch what types we know
+ * { std::cerr << "caught " << e.what() << std::endl; }
+ * return 1;
+ * }
+ * }
+ * int foo(); // throws std::range_error
+ * sigc::exception_catch(&foo, my_catch())();
+ * @endcode
+ *
+ * The functor sigc::execption_catch() returns can be passed into
+ * sigc::signal::connect() directly.
+ *
+ * @par Example:
+ * @code
+ * sigc::signal<int> some_signal;
+ * some_signal.connect(sigc::exception_catch(&foo, my_catch));
+ * @endcode
+ *
+ * @ingroup adaptors
+ */
+
+template <class T_functor, class T_catcher, class T_return = typename adapts<T_functor>::result_type>
+struct exception_catch_functor : public adapts<T_functor>
+{
+ typedef typename adapts<T_functor>::adaptor_type adaptor_type;
+
+ template <class T_arg1=void,class T_arg2=void,class T_arg3=void,class T_arg4=void,class T_arg5=void,class T_arg6=void,class T_arg7=void>
+ struct deduce_result_type
+ { typedef typename adaptor_type::template deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass,typename type_trait<T_arg7>::pass>::type type; };
+ typedef T_return result_type;
+
+ result_type
+ operator()();
+
+ template <class T_arg1>
+ typename deduce_result_type<T_arg1>::type
+ operator()(T_arg1 _A_a1)
+ {
+ try
+ {
+ return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass>
+ (_A_a1);
+ }
+ catch (...)
+ { return catcher_(); }
+ }
+
+ template <class T_arg1,class T_arg2>
+ typename deduce_result_type<T_arg1,T_arg2>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2)
+ {
+ try
+ {
+ return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass>
+ (_A_a1,_A_a2);
+ }
+ catch (...)
+ { return catcher_(); }
+ }
+
+ template <class T_arg1,class T_arg2,class T_arg3>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3)
+ {
+ try
+ {
+ return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass>
+ (_A_a1,_A_a2,_A_a3);
+ }
+ catch (...)
+ { return catcher_(); }
+ }
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4)
+ {
+ try
+ {
+ return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass>
+ (_A_a1,_A_a2,_A_a3,_A_a4);
+ }
+ catch (...)
+ { return catcher_(); }
+ }
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5)
+ {
+ try
+ {
+ return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass>
+ (_A_a1,_A_a2,_A_a3,_A_a4,_A_a5);
+ }
+ catch (...)
+ { return catcher_(); }
+ }
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6)
+ {
+ try
+ {
+ return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass>
+ (_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6);
+ }
+ catch (...)
+ { return catcher_(); }
+ }
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6,T_arg7 _A_a7)
+ {
+ try
+ {
+ return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass,typename type_trait<T_arg7>::pass>
+ (_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7);
+ }
+ catch (...)
+ { return catcher_(); }
+ }
+
+ exception_catch_functor(const T_functor& _A_func,
+ const T_catcher& _A_catcher)
+ : adapts<T_functor>(_A_func), catcher_(_A_catcher)
+ {}
+
+ protected:
+ T_catcher catcher_;
+};
+
+template <class T_functor, class T_catcher, class T_return>
+typename exception_catch_functor<T_functor, T_catcher, T_return>::result_type
+exception_catch_functor<T_functor, T_catcher, T_return>::operator()()
+ {
+ try
+ { return this->functor_(); }
+ catch (...)
+ { return catcher_(); }
+ }
+
+// void specialization
+template <class T_functor, class T_catcher>
+struct exception_catch_functor<T_functor, T_catcher, void> : public adapts<T_functor>
+{
+ typedef void result_type;
+ typedef typename adapts<T_functor>::adaptor_type adaptor_type;
+
+ void
+ operator()();
+
+ template <class T_arg1>
+ typename deduce_result_type<T_arg1>::type
+ operator()(T_arg1 _A_a1)
+ {
+ try
+ {
+ return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass>
+ (_A_a1);
+ }
+ catch (...)
+ { return catcher_(); }
+ }
+
+ template <class T_arg1,class T_arg2>
+ typename deduce_result_type<T_arg1,T_arg2>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2)
+ {
+ try
+ {
+ return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass>
+ (_A_a1,_A_a2);
+ }
+ catch (...)
+ { return catcher_(); }
+ }
+
+ template <class T_arg1,class T_arg2,class T_arg3>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3)
+ {
+ try
+ {
+ return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass>
+ (_A_a1,_A_a2,_A_a3);
+ }
+ catch (...)
+ { return catcher_(); }
+ }
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4)
+ {
+ try
+ {
+ return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass>
+ (_A_a1,_A_a2,_A_a3,_A_a4);
+ }
+ catch (...)
+ { return catcher_(); }
+ }
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5)
+ {
+ try
+ {
+ return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass>
+ (_A_a1,_A_a2,_A_a3,_A_a4,_A_a5);
+ }
+ catch (...)
+ { return catcher_(); }
+ }
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6)
+ {
+ try
+ {
+ return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass>
+ (_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6);
+ }
+ catch (...)
+ { return catcher_(); }
+ }
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6,T_arg7 _A_a7)
+ {
+ try
+ {
+ return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass,typename type_trait<T_arg7>::pass>
+ (_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7);
+ }
+ catch (...)
+ { return catcher_(); }
+ }
+
+ exception_catch_functor() {}
+ exception_catch_functor(const T_functor& _A_func,
+ const T_catcher& _A_catcher)
+ : adapts<T_functor>(_A_func), catcher_(_A_catcher)
+ {}
+ ~exception_catch_functor() {}
+
+ protected:
+ T_catcher catcher_;
+};
+
+template <class T_functor, class T_catcher>
+void exception_catch_functor<T_functor, T_catcher, void>::operator()()
+ {
+ try
+ { this->functor_(); } // I don't understand why void return doesn't work here (Martin)
+ catch (...)
+ { this->catcher_(); }
+ }
+
+
+template <class T_action, class T_functor, class T_catcher, class T_return>
+void visit_each(const T_action& _A_action,
+ const exception_catch_functor<T_functor, T_catcher, T_return>& _A_target)
+{
+ visit_each(_A_action, _A_target.functor_);
+ visit_each(_A_action, _A_target.catcher_);
+}
+
+
+template <class T_functor, class T_catcher>
+inline exception_catch_functor<T_functor, T_catcher>
+exception_catch(const T_functor& _A_func, const T_catcher& _A_catcher)
+ { return exception_catch_functor<T_functor, T_catcher>(_A_func, _A_catcher); }
+
+} /* namespace sigc */
+#endif /* _SIGC_ADAPTORS_MACROS_EXCEPTION_CATCHHM4_ */
diff --git a/libs/sigc++2/sigc++/adaptors/hide.h b/libs/sigc++2/sigc++/adaptors/hide.h
new file mode 100644
index 0000000000..1b820fea6b
--- /dev/null
+++ b/libs/sigc++2/sigc++/adaptors/hide.h
@@ -0,0 +1,1063 @@
+// -*- c++ -*-
+/* Do not edit! -- generated file */
+#ifndef _SIGC_ADAPTORS_MACROS_HIDEHM4_
+#define _SIGC_ADAPTORS_MACROS_HIDEHM4_
+#include <sigc++/adaptors/adaptor_trait.h>
+
+namespace sigc {
+
+/** @defgroup hide hide(), hide_return()
+ * sigc::hide() alters an arbitrary functor in that it adds a parameter
+ * whose value is ignored on invocation of the returned functor.
+ * Thus you can discard one or more of the arguments of a signal.
+ *
+ * You may optionally specify the zero-based position of the parameter
+ * to ignore as a template argument. The default is to ignore the last
+ * parameter.
+ * (A value of @p -1 adds a parameter at the end so sigc::hide<-1>() gives the same result as sigc::hide().)
+ *
+ * The type of the parameter can optionally be specified if not deduced.
+ *
+ * @par Examples:
+ * @code
+ * void foo(int, int);
+ * // single argument hiding ...
+ * sigc::hide(&foo)(1,2,3); // adds a dummy parameter at the back and calls foo(1,2)
+ * sigc::hide<-1>(&foo)(1,2,3); // same as sigc::hide(&foo)(1,2,3) (calls foo(1,2))
+ * sigc::hide<0>(&foo)(1,2,3); // adds a dummy parameter at the beginning and calls foo(2,3)
+ * sigc::hide<1>(&foo)(1,2,3); // adds a dummy parameter in the middle and calls foo(1,3)
+ * sigc::hide<2>(&foo)(1,2,3); // adds a dummy parameter at the back and calls foo(1,2)
+ * // multiple argument hiding ...
+ * sigc::hide(sigc::hide(&foo))(1,2,3,4); // adds two dummy parameters at the back and calls foo(1,2)
+ * @endcode
+ *
+ * The functor sigc::hide() returns can be passed into
+ * sigc::signal::connect() directly.
+ *
+ * @par Example:
+ * @code
+ * sigc::signal<void,int> some_signal;
+ * void foo();
+ * some_signal.connect(sigc::hide(&foo));
+ * @endcode
+ *
+ * sigc::hide_return() alters an arbitrary functor by
+ * dropping its return value, thus converting it to a void functor.
+ *
+ * For a more powerful version of this functionality see the lambda
+ * library adaptor sigc::group() which can bind, hide and reorder
+ * arguments arbitrarily. Although sigc::group() is more flexible,
+ * sigc::hide() provides a means of hiding parameters when then total
+ * number of parameters called is variable.
+ *
+ * @ingroup adaptors
+ */
+
+/** Adaptor that adds a dummy parameter to the wrapped functor.
+ * Use the convenience function sigc::hide() to create an instance of sigc::hide_functor.
+ *
+ * The following template arguments are used:
+ * - @e I_location Zero-based position of the dummy parameter (@p -1 for the last parameter).
+ * - @e T_type Type of the dummy parameter.
+ * - @e T_functor Type of the functor to wrap.
+ *
+ * @ingroup hide
+ */
+template <int I_location, class T_functor>
+struct hide_functor;
+
+/** Adaptor that adds a dummy parameter to the wrapped functor.
+ * This template specialization ignores the value of the last parameter in operator()().
+ *
+ * @ingroup hide
+ */
+template <class T_functor>
+struct hide_functor <-1, T_functor> : public adapts<T_functor>
+{
+ typedef typename adapts<T_functor>::adaptor_type adaptor_type;
+
+ template <class T_arg1=void,class T_arg2=void,class T_arg3=void,class T_arg4=void,class T_arg5=void,class T_arg6=void,class T_arg7=void>
+ struct deduce_result_type
+ { typedef typename adaptor_type::template deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass>::type type; };
+ typedef typename adaptor_type::result_type result_type;
+
+ /** Invokes the wrapped functor ignoring the only argument.
+ * @param _A_arg%1 Argument to be ignored.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1>
+ typename deduce_result_type<T_arg1>::type
+ operator()(T_arg1 _A_a1)
+ { return this->functor_(); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1>
+ typename deduce_result_type<T_arg1>::type
+ sun_forte_workaround(T_arg1 _A_a1)
+ { return this->functor_(); }
+ #endif
+
+ /** Invokes the wrapped functor ignoring the last argument.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be ignored.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2>
+ typename deduce_result_type<T_arg1,T_arg2>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass>
+ (_A_a1); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2>
+ typename deduce_result_type<T_arg1,T_arg2>::type
+ sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass>
+ (_A_a1); }
+ #endif
+
+ /** Invokes the wrapped functor ignoring the last argument.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be ignored.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass>
+ (_A_a1, _A_a2); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3>::type
+ sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass>
+ (_A_a1, _A_a2); }
+ #endif
+
+ /** Invokes the wrapped functor ignoring the last argument.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @param _A_arg4 Argument to be ignored.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass>
+ (_A_a1, _A_a2, _A_a3); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type
+ sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass>
+ (_A_a1, _A_a2, _A_a3); }
+ #endif
+
+ /** Invokes the wrapped functor ignoring the last argument.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @param _A_arg4 Argument to be passed on to the functor.
+ * @param _A_arg5 Argument to be ignored.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass>
+ (_A_a1, _A_a2, _A_a3, _A_a4); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type
+ sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass>
+ (_A_a1, _A_a2, _A_a3, _A_a4); }
+ #endif
+
+ /** Invokes the wrapped functor ignoring the last argument.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @param _A_arg4 Argument to be passed on to the functor.
+ * @param _A_arg5 Argument to be passed on to the functor.
+ * @param _A_arg6 Argument to be ignored.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg5>::pass>
+ (_A_a1, _A_a2, _A_a3, _A_a4, _A_a5); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type
+ sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg5>::pass>
+ (_A_a1, _A_a2, _A_a3, _A_a4, _A_a5); }
+ #endif
+
+ /** Invokes the wrapped functor ignoring the last argument.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @param _A_arg4 Argument to be passed on to the functor.
+ * @param _A_arg5 Argument to be passed on to the functor.
+ * @param _A_arg6 Argument to be passed on to the functor.
+ * @param _A_arg7 Argument to be ignored.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6,T_arg7 _A_a7)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg5>::pass, typename type_trait<T_arg6>::pass>
+ (_A_a1, _A_a2, _A_a3, _A_a4, _A_a5, _A_a6); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type
+ sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6,T_arg7 _A_a7)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg5>::pass, typename type_trait<T_arg6>::pass>
+ (_A_a1, _A_a2, _A_a3, _A_a4, _A_a5, _A_a6); }
+ #endif
+
+
+ /** Constructs a hide_functor object that adds a dummy parameter to the passed functor.
+ * @param _A_functor Functor to invoke from operator()().
+ */
+ explicit hide_functor(const T_functor& _A_func)
+ : adapts<T_functor>(_A_func)
+ {}
+};
+
+/** Adaptor that adds a dummy parameter to the wrapped functor.
+ * This template specialization ignores the value of the 0th parameter in operator()().
+ *
+ * @ingroup hide
+ */
+template <class T_functor>
+struct hide_functor <0, T_functor> : public adapts<T_functor>
+{
+ typedef typename adapts<T_functor>::adaptor_type adaptor_type;
+
+ template <class T_arg1=void,class T_arg2=void,class T_arg3=void,class T_arg4=void,class T_arg5=void,class T_arg6=void,class T_arg7=void>
+ struct deduce_result_type
+ { typedef typename adaptor_type::template deduce_result_type<typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg5>::pass, typename type_trait<T_arg6>::pass, typename type_trait<T_arg7>::pass>::type type; };
+ typedef typename adaptor_type::result_type result_type;
+
+ /** Invokes the wrapped functor ignoring the only argument.
+ * @param _A_arg%1 Argument to be ignored.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1>
+ typename deduce_result_type<T_arg1>::type
+ operator()(T_arg1 _A_a1)
+ { return this->functor_(); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1>
+ typename deduce_result_type<T_arg1>::type
+ sun_forte_workaround(T_arg1 _A_a1)
+ { return this->functor_(); }
+ #endif
+
+ /** Invokes the wrapped functor ignoring the 1th argument.
+ * @param _A_arg1 Argument to be ignored.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2>
+ typename deduce_result_type<T_arg1,T_arg2>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg2>::pass>
+ (_A_a2); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2>
+ typename deduce_result_type<T_arg1,T_arg2>::type
+ sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg2>::pass>
+ (_A_a2); }
+ #endif
+
+ /** Invokes the wrapped functor ignoring the 1th argument.
+ * @param _A_arg1 Argument to be ignored.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass>
+ (_A_a2, _A_a3); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3>::type
+ sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass>
+ (_A_a2, _A_a3); }
+ #endif
+
+ /** Invokes the wrapped functor ignoring the 1th argument.
+ * @param _A_arg1 Argument to be ignored.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @param _A_arg4 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass>
+ (_A_a2, _A_a3, _A_a4); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type
+ sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass>
+ (_A_a2, _A_a3, _A_a4); }
+ #endif
+
+ /** Invokes the wrapped functor ignoring the 1th argument.
+ * @param _A_arg1 Argument to be ignored.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @param _A_arg4 Argument to be passed on to the functor.
+ * @param _A_arg5 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg5>::pass>
+ (_A_a2, _A_a3, _A_a4, _A_a5); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type
+ sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg5>::pass>
+ (_A_a2, _A_a3, _A_a4, _A_a5); }
+ #endif
+
+ /** Invokes the wrapped functor ignoring the 1th argument.
+ * @param _A_arg1 Argument to be ignored.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @param _A_arg4 Argument to be passed on to the functor.
+ * @param _A_arg5 Argument to be passed on to the functor.
+ * @param _A_arg6 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg5>::pass, typename type_trait<T_arg6>::pass>
+ (_A_a2, _A_a3, _A_a4, _A_a5, _A_a6); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type
+ sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg5>::pass, typename type_trait<T_arg6>::pass>
+ (_A_a2, _A_a3, _A_a4, _A_a5, _A_a6); }
+ #endif
+
+ /** Invokes the wrapped functor ignoring the 1th argument.
+ * @param _A_arg1 Argument to be ignored.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @param _A_arg4 Argument to be passed on to the functor.
+ * @param _A_arg5 Argument to be passed on to the functor.
+ * @param _A_arg6 Argument to be passed on to the functor.
+ * @param _A_arg7 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6,T_arg7 _A_a7)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg5>::pass, typename type_trait<T_arg6>::pass, typename type_trait<T_arg7>::pass>
+ (_A_a2, _A_a3, _A_a4, _A_a5, _A_a6, _A_a7); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type
+ sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6,T_arg7 _A_a7)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg5>::pass, typename type_trait<T_arg6>::pass, typename type_trait<T_arg7>::pass>
+ (_A_a2, _A_a3, _A_a4, _A_a5, _A_a6, _A_a7); }
+ #endif
+
+
+ /** Constructs a hide_functor object that adds a dummy parameter to the passed functor.
+ * @param _A_functor Functor to invoke from operator()().
+ */
+ explicit hide_functor(const T_functor& _A_func)
+ : adapts<T_functor>(_A_func)
+ {}
+};
+
+/** Adaptor that adds a dummy parameter to the wrapped functor.
+ * This template specialization ignores the value of the 1th parameter in operator()().
+ *
+ * @ingroup hide
+ */
+template <class T_functor>
+struct hide_functor <1, T_functor> : public adapts<T_functor>
+{
+ typedef typename adapts<T_functor>::adaptor_type adaptor_type;
+
+ template <class T_arg1=void,class T_arg2=void,class T_arg3=void,class T_arg4=void,class T_arg5=void,class T_arg6=void,class T_arg7=void>
+ struct deduce_result_type
+ { typedef typename adaptor_type::template deduce_result_type<typename type_trait<T_arg1>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg5>::pass, typename type_trait<T_arg6>::pass, typename type_trait<T_arg7>::pass>::type type; };
+ typedef typename adaptor_type::result_type result_type;
+
+ /** Invokes the wrapped functor ignoring the 2th argument.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be ignored.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2>
+ typename deduce_result_type<T_arg1,T_arg2>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass>
+ (_A_a1); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2>
+ typename deduce_result_type<T_arg1,T_arg2>::type
+ sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass>
+ (_A_a1); }
+ #endif
+
+ /** Invokes the wrapped functor ignoring the 2th argument.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be ignored.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_arg3>::pass>
+ (_A_a1, _A_a3); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3>::type
+ sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_arg3>::pass>
+ (_A_a1, _A_a3); }
+ #endif
+
+ /** Invokes the wrapped functor ignoring the 2th argument.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be ignored.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @param _A_arg4 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass>
+ (_A_a1, _A_a3, _A_a4); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type
+ sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass>
+ (_A_a1, _A_a3, _A_a4); }
+ #endif
+
+ /** Invokes the wrapped functor ignoring the 2th argument.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be ignored.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @param _A_arg4 Argument to be passed on to the functor.
+ * @param _A_arg5 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg5>::pass>
+ (_A_a1, _A_a3, _A_a4, _A_a5); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type
+ sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg5>::pass>
+ (_A_a1, _A_a3, _A_a4, _A_a5); }
+ #endif
+
+ /** Invokes the wrapped functor ignoring the 2th argument.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be ignored.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @param _A_arg4 Argument to be passed on to the functor.
+ * @param _A_arg5 Argument to be passed on to the functor.
+ * @param _A_arg6 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg5>::pass, typename type_trait<T_arg6>::pass>
+ (_A_a1, _A_a3, _A_a4, _A_a5, _A_a6); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type
+ sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg5>::pass, typename type_trait<T_arg6>::pass>
+ (_A_a1, _A_a3, _A_a4, _A_a5, _A_a6); }
+ #endif
+
+ /** Invokes the wrapped functor ignoring the 2th argument.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be ignored.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @param _A_arg4 Argument to be passed on to the functor.
+ * @param _A_arg5 Argument to be passed on to the functor.
+ * @param _A_arg6 Argument to be passed on to the functor.
+ * @param _A_arg7 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6,T_arg7 _A_a7)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg5>::pass, typename type_trait<T_arg6>::pass, typename type_trait<T_arg7>::pass>
+ (_A_a1, _A_a3, _A_a4, _A_a5, _A_a6, _A_a7); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type
+ sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6,T_arg7 _A_a7)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg5>::pass, typename type_trait<T_arg6>::pass, typename type_trait<T_arg7>::pass>
+ (_A_a1, _A_a3, _A_a4, _A_a5, _A_a6, _A_a7); }
+ #endif
+
+
+ /** Constructs a hide_functor object that adds a dummy parameter to the passed functor.
+ * @param _A_functor Functor to invoke from operator()().
+ */
+ explicit hide_functor(const T_functor& _A_func)
+ : adapts<T_functor>(_A_func)
+ {}
+};
+
+/** Adaptor that adds a dummy parameter to the wrapped functor.
+ * This template specialization ignores the value of the 2th parameter in operator()().
+ *
+ * @ingroup hide
+ */
+template <class T_functor>
+struct hide_functor <2, T_functor> : public adapts<T_functor>
+{
+ typedef typename adapts<T_functor>::adaptor_type adaptor_type;
+
+ template <class T_arg1=void,class T_arg2=void,class T_arg3=void,class T_arg4=void,class T_arg5=void,class T_arg6=void,class T_arg7=void>
+ struct deduce_result_type
+ { typedef typename adaptor_type::template deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg5>::pass, typename type_trait<T_arg6>::pass, typename type_trait<T_arg7>::pass>::type type; };
+ typedef typename adaptor_type::result_type result_type;
+
+ /** Invokes the wrapped functor ignoring the 3th argument.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be ignored.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass>
+ (_A_a1, _A_a2); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3>::type
+ sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass>
+ (_A_a1, _A_a2); }
+ #endif
+
+ /** Invokes the wrapped functor ignoring the 3th argument.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be ignored.
+ * @param _A_arg4 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg4>::pass>
+ (_A_a1, _A_a2, _A_a4); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type
+ sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg4>::pass>
+ (_A_a1, _A_a2, _A_a4); }
+ #endif
+
+ /** Invokes the wrapped functor ignoring the 3th argument.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be ignored.
+ * @param _A_arg4 Argument to be passed on to the functor.
+ * @param _A_arg5 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg5>::pass>
+ (_A_a1, _A_a2, _A_a4, _A_a5); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type
+ sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg5>::pass>
+ (_A_a1, _A_a2, _A_a4, _A_a5); }
+ #endif
+
+ /** Invokes the wrapped functor ignoring the 3th argument.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be ignored.
+ * @param _A_arg4 Argument to be passed on to the functor.
+ * @param _A_arg5 Argument to be passed on to the functor.
+ * @param _A_arg6 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg5>::pass, typename type_trait<T_arg6>::pass>
+ (_A_a1, _A_a2, _A_a4, _A_a5, _A_a6); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type
+ sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg5>::pass, typename type_trait<T_arg6>::pass>
+ (_A_a1, _A_a2, _A_a4, _A_a5, _A_a6); }
+ #endif
+
+ /** Invokes the wrapped functor ignoring the 3th argument.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be ignored.
+ * @param _A_arg4 Argument to be passed on to the functor.
+ * @param _A_arg5 Argument to be passed on to the functor.
+ * @param _A_arg6 Argument to be passed on to the functor.
+ * @param _A_arg7 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6,T_arg7 _A_a7)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg5>::pass, typename type_trait<T_arg6>::pass, typename type_trait<T_arg7>::pass>
+ (_A_a1, _A_a2, _A_a4, _A_a5, _A_a6, _A_a7); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type
+ sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6,T_arg7 _A_a7)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg5>::pass, typename type_trait<T_arg6>::pass, typename type_trait<T_arg7>::pass>
+ (_A_a1, _A_a2, _A_a4, _A_a5, _A_a6, _A_a7); }
+ #endif
+
+
+ /** Constructs a hide_functor object that adds a dummy parameter to the passed functor.
+ * @param _A_functor Functor to invoke from operator()().
+ */
+ explicit hide_functor(const T_functor& _A_func)
+ : adapts<T_functor>(_A_func)
+ {}
+};
+
+/** Adaptor that adds a dummy parameter to the wrapped functor.
+ * This template specialization ignores the value of the 3th parameter in operator()().
+ *
+ * @ingroup hide
+ */
+template <class T_functor>
+struct hide_functor <3, T_functor> : public adapts<T_functor>
+{
+ typedef typename adapts<T_functor>::adaptor_type adaptor_type;
+
+ template <class T_arg1=void,class T_arg2=void,class T_arg3=void,class T_arg4=void,class T_arg5=void,class T_arg6=void,class T_arg7=void>
+ struct deduce_result_type
+ { typedef typename adaptor_type::template deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass, typename type_trait<T_arg5>::pass, typename type_trait<T_arg6>::pass, typename type_trait<T_arg7>::pass>::type type; };
+ typedef typename adaptor_type::result_type result_type;
+
+ /** Invokes the wrapped functor ignoring the 4th argument.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @param _A_arg4 Argument to be ignored.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass>
+ (_A_a1, _A_a2, _A_a3); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type
+ sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass>
+ (_A_a1, _A_a2, _A_a3); }
+ #endif
+
+ /** Invokes the wrapped functor ignoring the 4th argument.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @param _A_arg4 Argument to be ignored.
+ * @param _A_arg5 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg5>::pass>
+ (_A_a1, _A_a2, _A_a3, _A_a5); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type
+ sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg5>::pass>
+ (_A_a1, _A_a2, _A_a3, _A_a5); }
+ #endif
+
+ /** Invokes the wrapped functor ignoring the 4th argument.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @param _A_arg4 Argument to be ignored.
+ * @param _A_arg5 Argument to be passed on to the functor.
+ * @param _A_arg6 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg5>::pass, typename type_trait<T_arg6>::pass>
+ (_A_a1, _A_a2, _A_a3, _A_a5, _A_a6); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type
+ sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg5>::pass, typename type_trait<T_arg6>::pass>
+ (_A_a1, _A_a2, _A_a3, _A_a5, _A_a6); }
+ #endif
+
+ /** Invokes the wrapped functor ignoring the 4th argument.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @param _A_arg4 Argument to be ignored.
+ * @param _A_arg5 Argument to be passed on to the functor.
+ * @param _A_arg6 Argument to be passed on to the functor.
+ * @param _A_arg7 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6,T_arg7 _A_a7)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg5>::pass, typename type_trait<T_arg6>::pass, typename type_trait<T_arg7>::pass>
+ (_A_a1, _A_a2, _A_a3, _A_a5, _A_a6, _A_a7); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type
+ sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6,T_arg7 _A_a7)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg5>::pass, typename type_trait<T_arg6>::pass, typename type_trait<T_arg7>::pass>
+ (_A_a1, _A_a2, _A_a3, _A_a5, _A_a6, _A_a7); }
+ #endif
+
+
+ /** Constructs a hide_functor object that adds a dummy parameter to the passed functor.
+ * @param _A_functor Functor to invoke from operator()().
+ */
+ explicit hide_functor(const T_functor& _A_func)
+ : adapts<T_functor>(_A_func)
+ {}
+};
+
+/** Adaptor that adds a dummy parameter to the wrapped functor.
+ * This template specialization ignores the value of the 4th parameter in operator()().
+ *
+ * @ingroup hide
+ */
+template <class T_functor>
+struct hide_functor <4, T_functor> : public adapts<T_functor>
+{
+ typedef typename adapts<T_functor>::adaptor_type adaptor_type;
+
+ template <class T_arg1=void,class T_arg2=void,class T_arg3=void,class T_arg4=void,class T_arg5=void,class T_arg6=void,class T_arg7=void>
+ struct deduce_result_type
+ { typedef typename adaptor_type::template deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass, typename type_trait<T_arg6>::pass, typename type_trait<T_arg7>::pass>::type type; };
+ typedef typename adaptor_type::result_type result_type;
+
+ /** Invokes the wrapped functor ignoring the 5th argument.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @param _A_arg4 Argument to be passed on to the functor.
+ * @param _A_arg5 Argument to be ignored.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass>
+ (_A_a1, _A_a2, _A_a3, _A_a4); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type
+ sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass>
+ (_A_a1, _A_a2, _A_a3, _A_a4); }
+ #endif
+
+ /** Invokes the wrapped functor ignoring the 5th argument.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @param _A_arg4 Argument to be passed on to the functor.
+ * @param _A_arg5 Argument to be ignored.
+ * @param _A_arg6 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg6>::pass>
+ (_A_a1, _A_a2, _A_a3, _A_a4, _A_a6); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type
+ sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg6>::pass>
+ (_A_a1, _A_a2, _A_a3, _A_a4, _A_a6); }
+ #endif
+
+ /** Invokes the wrapped functor ignoring the 5th argument.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @param _A_arg4 Argument to be passed on to the functor.
+ * @param _A_arg5 Argument to be ignored.
+ * @param _A_arg6 Argument to be passed on to the functor.
+ * @param _A_arg7 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6,T_arg7 _A_a7)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg6>::pass, typename type_trait<T_arg7>::pass>
+ (_A_a1, _A_a2, _A_a3, _A_a4, _A_a6, _A_a7); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type
+ sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6,T_arg7 _A_a7)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg6>::pass, typename type_trait<T_arg7>::pass>
+ (_A_a1, _A_a2, _A_a3, _A_a4, _A_a6, _A_a7); }
+ #endif
+
+
+ /** Constructs a hide_functor object that adds a dummy parameter to the passed functor.
+ * @param _A_functor Functor to invoke from operator()().
+ */
+ explicit hide_functor(const T_functor& _A_func)
+ : adapts<T_functor>(_A_func)
+ {}
+};
+
+/** Adaptor that adds a dummy parameter to the wrapped functor.
+ * This template specialization ignores the value of the 5th parameter in operator()().
+ *
+ * @ingroup hide
+ */
+template <class T_functor>
+struct hide_functor <5, T_functor> : public adapts<T_functor>
+{
+ typedef typename adapts<T_functor>::adaptor_type adaptor_type;
+
+ template <class T_arg1=void,class T_arg2=void,class T_arg3=void,class T_arg4=void,class T_arg5=void,class T_arg6=void,class T_arg7=void>
+ struct deduce_result_type
+ { typedef typename adaptor_type::template deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass, typename type_trait<T_arg7>::pass>::type type; };
+ typedef typename adaptor_type::result_type result_type;
+
+ /** Invokes the wrapped functor ignoring the 6th argument.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @param _A_arg4 Argument to be passed on to the functor.
+ * @param _A_arg5 Argument to be passed on to the functor.
+ * @param _A_arg6 Argument to be ignored.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg5>::pass>
+ (_A_a1, _A_a2, _A_a3, _A_a4, _A_a5); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type
+ sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg5>::pass>
+ (_A_a1, _A_a2, _A_a3, _A_a4, _A_a5); }
+ #endif
+
+ /** Invokes the wrapped functor ignoring the 6th argument.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @param _A_arg4 Argument to be passed on to the functor.
+ * @param _A_arg5 Argument to be passed on to the functor.
+ * @param _A_arg6 Argument to be ignored.
+ * @param _A_arg7 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6,T_arg7 _A_a7)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg5>::pass, typename type_trait<T_arg7>::pass>
+ (_A_a1, _A_a2, _A_a3, _A_a4, _A_a5, _A_a7); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type
+ sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6,T_arg7 _A_a7)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg5>::pass, typename type_trait<T_arg7>::pass>
+ (_A_a1, _A_a2, _A_a3, _A_a4, _A_a5, _A_a7); }
+ #endif
+
+
+ /** Constructs a hide_functor object that adds a dummy parameter to the passed functor.
+ * @param _A_functor Functor to invoke from operator()().
+ */
+ explicit hide_functor(const T_functor& _A_func)
+ : adapts<T_functor>(_A_func)
+ {}
+};
+
+/** Adaptor that adds a dummy parameter to the wrapped functor.
+ * This template specialization ignores the value of the 6th parameter in operator()().
+ *
+ * @ingroup hide
+ */
+template <class T_functor>
+struct hide_functor <6, T_functor> : public adapts<T_functor>
+{
+ typedef typename adapts<T_functor>::adaptor_type adaptor_type;
+
+ template <class T_arg1=void,class T_arg2=void,class T_arg3=void,class T_arg4=void,class T_arg5=void,class T_arg6=void,class T_arg7=void>
+ struct deduce_result_type
+ { typedef typename adaptor_type::template deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass>::type type; };
+ typedef typename adaptor_type::result_type result_type;
+
+ /** Invokes the wrapped functor ignoring the 7th argument.
+ * @param _A_arg1 Argument to be passed on to the functor.
+ * @param _A_arg2 Argument to be passed on to the functor.
+ * @param _A_arg3 Argument to be passed on to the functor.
+ * @param _A_arg4 Argument to be passed on to the functor.
+ * @param _A_arg5 Argument to be passed on to the functor.
+ * @param _A_arg6 Argument to be passed on to the functor.
+ * @param _A_arg7 Argument to be ignored.
+ * @return The return value of the functor invocation.
+ */
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6,T_arg7 _A_a7)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg5>::pass, typename type_trait<T_arg6>::pass>
+ (_A_a1, _A_a2, _A_a3, _A_a4, _A_a5, _A_a6); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type
+ sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6,T_arg7 _A_a7)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass, typename type_trait<T_arg2>::pass, typename type_trait<T_arg3>::pass, typename type_trait<T_arg4>::pass, typename type_trait<T_arg5>::pass, typename type_trait<T_arg6>::pass>
+ (_A_a1, _A_a2, _A_a3, _A_a4, _A_a5, _A_a6); }
+ #endif
+
+
+ /** Constructs a hide_functor object that adds a dummy parameter to the passed functor.
+ * @param _A_functor Functor to invoke from operator()().
+ */
+ explicit hide_functor(const T_functor& _A_func)
+ : adapts<T_functor>(_A_func)
+ {}
+};
+
+
+/** Performs a functor on each of the targets of a functor.
+ * The function overload for sigc::hide_functor performs a functor on the
+ * functor stored in the sigc::hide_functor object.
+ *
+ * @ingroup hide
+ */
+template <class T_action, int I_location, class T_functor>
+void visit_each(const T_action& _A_action,
+ const hide_functor<I_location, T_functor>& _A_target)
+{
+ visit_each(_A_action, _A_target.functor_);
+}
+
+
+/** Creates an adaptor of type sigc::hide_functor which adds a dummy parameter to the passed functor.
+ * The optional template argument @e I_location specifies the zero-based
+ * position of the dummy parameter in the returned functor (@p -1 stands for the last parameter).
+ *
+ * @param _A_func Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_func ignoring the value of the dummy parameter.
+ *
+ * @ingroup hide
+ */
+template <int I_location, class T_functor>
+inline hide_functor<I_location, T_functor>
+hide(const T_functor& _A_func)
+ { return hide_functor<I_location, T_functor>(_A_func); }
+
+/** Creates an adaptor of type sigc::hide_functor which adds a dummy parameter to the passed functor.
+ * This overload adds a dummy parameter at the back of the functor's parameter list.
+ *
+ * @param _A_func Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_func ignoring the value of the last parameter.
+ *
+ * @ingroup hide
+ */
+template <class T_functor>
+inline hide_functor<-1, T_functor>
+hide(const T_functor& _A_func)
+ { return hide_functor<-1, T_functor> (_A_func); }
+
+} /* namespace sigc */
+#endif /* _SIGC_ADAPTORS_MACROS_HIDEHM4_ */
diff --git a/libs/sigc++2/sigc++/adaptors/lambda/base.h b/libs/sigc++2/sigc++/adaptors/lambda/base.h
new file mode 100644
index 0000000000..6a2c402c89
--- /dev/null
+++ b/libs/sigc++2/sigc++/adaptors/lambda/base.h
@@ -0,0 +1,392 @@
+// -*- c++ -*-
+/* Do not edit! -- generated file */
+#ifndef _SIGC_LAMBDA_BASE_HPP_
+#define _SIGC_LAMBDA_BASE_HPP_
+#include <sigc++/adaptors/adaptor_trait.h>
+
+namespace sigc {
+
+/** @defgroup lambdas Lambdas
+ * libsigc++ ships with basic lambda functionality and the sigc::group adaptor that uses lambdas to transform a functor's parameter list.
+ *
+ * The lambda selectors sigc::_1, sigc::_2, ..., sigc::_9 are used to select the
+ * first, second, ..., nineth argument from a list.
+ *
+ * @par Examples:
+ * @code
+ * std::cout << sigc::_1(10,20,30); // returns 10
+ * std::cout << sigc::_2(10,20,30); // returns 20
+ * ...
+ * @endcode
+ *
+ * Operators are defined so that lambda selectors can be used e.g. as placeholders in
+ * arithmetic expressions.
+ *
+ * @par Examples:
+ * @code
+ * std::cout << (sigc::_1 + 5)(3); // returns (3 + 5)
+ * std::cout << (sigc::_1 * sigc::_2)(7,10); // returns (7 * 10)
+ * @endcode
+ */
+
+/** A hint to the compiler.
+ * All lambda types publically inherit from this hint.
+ *
+ * @ingroup lambdas
+ */
+struct lambda_base : public adaptor_base {};
+
+// Forward declaration of lambda.
+template <class T_type> struct lambda;
+
+
+namespace internal {
+
+/** Abstracts lambda functionality.
+ * Objects of this type store a value that may be of type lambda itself.
+ * In this case, operator()() executes the lambda (a lambda is always a functor at the same time).
+ * Otherwise, operator()() simply returns the stored value.
+ */
+template <class T_type, bool I_islambda = is_base_and_derived<lambda_base, T_type>::value> struct lambda_core;
+
+/// Abstracts lambda functionality (template specialization for lambda values).
+template <class T_type>
+struct lambda_core<T_type, true> : public lambda_base
+{
+ template <class T_arg1=void,class T_arg2=void,class T_arg3=void,class T_arg4=void,class T_arg5=void,class T_arg6=void,class T_arg7=void>
+ struct deduce_result_type
+ { typedef typename T_type::template deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass,typename type_trait<T_arg7>::pass>::type type; };
+ typedef typename T_type::result_type result_type;
+ typedef T_type lambda_type;
+
+ result_type
+ operator()() const;
+
+ template <class T_arg1>
+ typename deduce_result_type<T_arg1>::type
+ operator ()(T_arg1 _A_1) const
+ { return value_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass>
+ (_A_1);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1>
+ typename deduce_result_type<T_arg1>::type
+ sun_forte_workaround(T_arg1 _A_1) const
+ { return value_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass>
+ (_A_1);
+ }
+ #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+
+ template <class T_arg1,class T_arg2>
+ typename deduce_result_type<T_arg1,T_arg2>::type
+ operator ()(T_arg1 _A_1,T_arg2 _A_2) const
+ { return value_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass>
+ (_A_1,_A_2);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2>
+ typename deduce_result_type<T_arg1,T_arg2>::type
+ sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2) const
+ { return value_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass>
+ (_A_1,_A_2);
+ }
+ #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+
+ template <class T_arg1,class T_arg2,class T_arg3>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3>::type
+ operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3) const
+ { return value_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass>
+ (_A_1,_A_2,_A_3);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3>::type
+ sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3) const
+ { return value_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass>
+ (_A_1,_A_2,_A_3);
+ }
+ #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type
+ operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4) const
+ { return value_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass>
+ (_A_1,_A_2,_A_3,_A_4);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type
+ sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4) const
+ { return value_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass>
+ (_A_1,_A_2,_A_3,_A_4);
+ }
+ #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type
+ operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5) const
+ { return value_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass>
+ (_A_1,_A_2,_A_3,_A_4,_A_5);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type
+ sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5) const
+ { return value_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass>
+ (_A_1,_A_2,_A_3,_A_4,_A_5);
+ }
+ #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type
+ operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6) const
+ { return value_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass>
+ (_A_1,_A_2,_A_3,_A_4,_A_5,_A_6);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type
+ sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6) const
+ { return value_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass>
+ (_A_1,_A_2,_A_3,_A_4,_A_5,_A_6);
+ }
+ #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type
+ operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6,T_arg7 _A_7) const
+ { return value_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass,typename type_trait<T_arg7>::pass>
+ (_A_1,_A_2,_A_3,_A_4,_A_5,_A_6,_A_7);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type
+ sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6,T_arg7 _A_7) const
+ { return value_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass,typename type_trait<T_arg7>::pass>
+ (_A_1,_A_2,_A_3,_A_4,_A_5,_A_6,_A_7);
+ }
+ #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+
+ lambda_core() {}
+
+ explicit lambda_core(const T_type& v)
+ : value_(v) {}
+
+ T_type value_;
+};
+
+template <class T_type>
+typename lambda_core<T_type, true>::result_type
+lambda_core<T_type, true>::operator()() const
+ { return value_(); }
+
+
+/// Abstracts lambda functionality (template specialization for other value types).
+template <class T_type>
+struct lambda_core<T_type, false> : public lambda_base
+{
+ template <class T_arg1=void,class T_arg2=void,class T_arg3=void,class T_arg4=void,class T_arg5=void,class T_arg6=void,class T_arg7=void>
+ struct deduce_result_type
+ { typedef T_type type; };
+ typedef T_type result_type; // all operator() overloads return T_type.
+ typedef lambda<T_type> lambda_type;
+
+ result_type operator()() const;
+
+ template <class T_arg1>
+ result_type operator ()(T_arg1 _A_1) const
+ { return value_; }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1>
+ result_type sun_forte_workaround(T_arg1 _A_1) const
+ { return value_; }
+ #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+
+ template <class T_arg1,class T_arg2>
+ result_type operator ()(T_arg1 _A_1,T_arg2 _A_2) const
+ { return value_; }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2>
+ result_type sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2) const
+ { return value_; }
+ #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+
+ template <class T_arg1,class T_arg2,class T_arg3>
+ result_type operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3) const
+ { return value_; }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3>
+ result_type sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3) const
+ { return value_; }
+ #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ result_type operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4) const
+ { return value_; }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ result_type sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4) const
+ { return value_; }
+ #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ result_type operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5) const
+ { return value_; }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ result_type sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5) const
+ { return value_; }
+ #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ result_type operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6) const
+ { return value_; }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ result_type sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6) const
+ { return value_; }
+ #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ result_type operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6,T_arg7 _A_7) const
+ { return value_; }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ result_type sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6,T_arg7 _A_7) const
+ { return value_; }
+ #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+
+ explicit lambda_core(typename type_trait<T_type>::take v)
+ : value_(v) {}
+
+ T_type value_;
+};
+
+template <class T_type>
+typename lambda_core<T_type, false>::result_type lambda_core<T_type, false>::operator()() const
+ { return value_; }
+
+} /* namespace internal */
+
+
+template <class T_action, class T_functor, bool I_islambda>
+void visit_each(const T_action& _A_action,
+ const internal::lambda_core<T_functor, I_islambda>& _A_target)
+{
+ visit_each(_A_action, _A_target.value_);
+}
+
+
+// forward declarations for lambda operators other<subscript> and other<assign>
+template <class T_type>
+struct other;
+struct subscript;
+struct assign;
+
+template <class T_action, class T_type1, class T_type2>
+struct lambda_operator;
+
+template <class T_type>
+struct unwrap_lambda_type;
+
+
+/** Lambda type.
+ * Objects of this type store a value that may be of type lambda itself.
+ * In this case, operator()() executes the lambda (a lambda is always a functor at the same time).
+ * Otherwise, operator()() simply returns the stored value.
+ * The assign and subscript operators are defined to return a lambda operator.
+ *
+ * @ingroup lambdas
+ */
+template <class T_type>
+struct lambda : public internal::lambda_core<T_type>
+{
+ typedef lambda<T_type> self;
+
+ lambda()
+ {}
+
+ lambda(typename type_trait<T_type>::take v)
+ : internal::lambda_core<T_type>(v)
+ {}
+
+ // operators for other<subscript>
+ template <class T_arg>
+ lambda<lambda_operator<other<subscript>, self, typename unwrap_lambda_type<T_arg>::type> >
+ operator [] (const T_arg& a) const
+ { typedef lambda_operator<other<subscript>, self, typename unwrap_lambda_type<T_arg>::type> lambda_operator_type;
+ return lambda<lambda_operator_type>(lambda_operator_type(this->value_, unwrap_lambda_value(a))); }
+
+ // operators for other<assign>
+ template <class T_arg>
+ lambda<lambda_operator<other<assign>, self, typename unwrap_lambda_type<T_arg>::type> >
+ operator = (const T_arg& a) const
+ { typedef lambda_operator<other<assign>, self, typename unwrap_lambda_type<T_arg>::type> lambda_operator_type;
+ return lambda<lambda_operator_type>(lambda_operator_type(this->value_, unwrap_lambda_value(a))); }
+};
+
+
+template <class T_action, class T_type>
+void visit_each(const T_action& _A_action,
+ const lambda<T_type>& _A_target)
+{
+ visit_each(_A_action, _A_target.value_);
+}
+
+
+/// Converts a reference into a lambda object.
+template <class T_type>
+lambda<T_type&> var(T_type& v)
+{ return lambda<T_type&>(v); }
+
+/// Converts a constant reference into a lambda object.
+template <class T_type>
+lambda<const T_type&> var(const T_type& v)
+{ return lambda<const T_type&>(v); }
+
+
+/** Deduces the type of the object stored in an object of the passed lambda type.
+ * If the type passed as template argument is no lambda type,
+ * type is defined to unwrap_reference<T_type>::type.
+ */
+template <class T_type>
+struct unwrap_lambda_type
+{ typedef typename unwrap_reference<T_type>::type type; };
+
+template <class T_type>
+struct unwrap_lambda_type<lambda<T_type> >
+{ typedef T_type type; };
+
+
+/** Gets the object stored inside a lambda object.
+ * Returns the object passed as argument if it is not of type lambda.
+ */
+template <class T_type>
+T_type& unwrap_lambda_value(T_type& a)
+{ return a; }
+
+template <class T_type>
+const T_type& unwrap_lambda_value(const T_type& a)
+{ return a; }
+
+template <class T_type>
+const T_type& unwrap_lambda_value(const lambda<T_type>& a)
+{ return a.value_; }
+
+} /* namespace sigc */
+
+#endif /* _SIGC_LAMBDA_BASE_HPP_ */
diff --git a/libs/sigc++2/sigc++/adaptors/lambda/group.h b/libs/sigc++2/sigc++/adaptors/lambda/group.h
new file mode 100644
index 0000000000..7b7525dc41
--- /dev/null
+++ b/libs/sigc++2/sigc++/adaptors/lambda/group.h
@@ -0,0 +1,734 @@
+// -*- c++ -*-
+/* Do not edit! -- generated file */
+#ifndef _SIGC_ADAPTORS_LAMBDA_MACROS_GROUPHM4_
+#define _SIGC_ADAPTORS_LAMBDA_MACROS_GROUPHM4_
+#include <sigc++/adaptors/lambda/base.h>
+
+/** @defgroup group_ group()
+ * sigc::group() alters an arbitrary functor by rebuilding its arguments from one or more lambda expressions.
+ * For each parameter that should be passed to the wrapped functor one lambda expression
+ * has to be passed into group(). Lambda selectors can be used as placeholders for the
+ * arguments passed into the new functor. Arguments that don't have a placeholder in one
+ * of the lambda expressions are dropped.
+ *
+ * @par Examples:
+ * @code
+ * void foo(int, int);
+ * int bar(int);
+ * // argument binding ...
+ * sigc::group(&foo,10,sigc::_1)(20); //fixes the first argument and calls foo(10,20)
+ * sigc::group(&foo,sigc::_1,30)(40); //fixes the second argument and calls foo(40,30)
+ * // argument reordering ...
+ * sigc::group(&foo,sigc::_2,sigc::_1)(1,2); //calls foo(2,1)
+ * // argument hiding ...
+ * sigc::group(&foo,sigc::_1,sigc::_2)(1,2,3); //calls foo(1,2)
+ * // functor composition ...
+ * sigc::group(&foo,sigc::_1,sigc::group(&bar,sigc::_2))(1,2); //calls foo(1,bar(2))
+ * // algebraic expressions ...
+ * sigc::group(&foo,sigc::_1*sigc::_2,sigc::_1/sigc::_2)(6,3); //calls foo(6*3,6/3)
+ * @endcode
+ *
+ * The functor sigc::group() returns can be passed into
+ * sigc::signal::connect() directly.
+ *
+ * @par Example:
+ * @code
+ * sigc::signal<void,int,int> some_signal;
+ * void foo(int);
+ * some_signal.connect(sigc::group(&foo,sigc::_2));
+ * @endcode
+ *
+ * Like in sigc::bind() you can bind references to functors by passing the objects
+ * through the sigc::ref() helper function.
+ *
+ * @par Example:
+ * @code
+ * int some_int;
+ * sigc::signal<void> some_signal;
+ * void foo(int&);
+ * some_signal.connect(sigc::group(&foo,sigc::ref(some_int)));
+ * @endcode
+ *
+ * If you bind an object of a sigc::trackable derived type to a functor
+ * by reference, a slot assigned to the group adaptor is cleared automatically
+ * when the object goes out of scope.
+ *
+ * @par Example:
+ * @code
+ * struct bar : public sigc::trackable {} some_bar;
+ * sigc::signal<void> some_signal;
+ * void foo(bar&);
+ * some_signal.connect(sigc::group(&foo,sigc::ref(some_bar)));
+ * // disconnected automatically if some_bar goes out of scope
+ * @endcode
+ *
+ * @ingroup adaptors, lambdas
+ */
+
+namespace sigc {
+
+template <class T_functor, class T_type1>
+struct lambda_group1 : public lambda_base
+{
+ typedef typename functor_trait<T_functor>::result_type result_type;
+ typedef typename lambda<T_type1>::lambda_type value1_type;
+ typedef typename adaptor_trait<T_functor>::adaptor_type functor_type;
+
+ template <class T_arg1=void,class T_arg2=void,class T_arg3=void,class T_arg4=void,class T_arg5=void,class T_arg6=void,class T_arg7=void>
+ struct deduce_result_type
+ { typedef typename functor_type::template deduce_result_type<
+ typename value1_type::template deduce_result_type<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass,typename type_trait<T_arg7>::pass>::type
+ >::type type; };
+
+ result_type
+ operator ()() const;
+
+ template <class T_arg1>
+ typename deduce_result_type<T_arg1>::type
+ operator() (T_arg1 _A_1) const
+ { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename value1_type::template deduce_result_type<T_arg1>::type>(
+ this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass>(_A_1)); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1>
+ typename deduce_result_type<T_arg1>::type
+ sun_forte_workaround (T_arg1 _A_1) const
+ { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename value1_type::template deduce_result_type<T_arg1>::type>(
+ this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass>(_A_1)); }
+ #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+
+ template <class T_arg1,class T_arg2>
+ typename deduce_result_type<T_arg1,T_arg2>::type
+ operator() (T_arg1 _A_1,T_arg2 _A_2) const
+ { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename value1_type::template deduce_result_type<T_arg1,T_arg2>::type>(
+ this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass>(_A_1,_A_2)); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2>
+ typename deduce_result_type<T_arg1,T_arg2>::type
+ sun_forte_workaround (T_arg1 _A_1,T_arg2 _A_2) const
+ { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename value1_type::template deduce_result_type<T_arg1,T_arg2>::type>(
+ this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass>(_A_1,_A_2)); }
+ #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+
+ template <class T_arg1,class T_arg2,class T_arg3>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3>::type
+ operator() (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3) const
+ { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename value1_type::template deduce_result_type<T_arg1,T_arg2,T_arg3>::type>(
+ this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass>(_A_1,_A_2,_A_3)); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3>::type
+ sun_forte_workaround (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3) const
+ { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename value1_type::template deduce_result_type<T_arg1,T_arg2,T_arg3>::type>(
+ this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass>(_A_1,_A_2,_A_3)); }
+ #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type
+ operator() (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4) const
+ { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename value1_type::template deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type>(
+ this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass>(_A_1,_A_2,_A_3,_A_4)); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type
+ sun_forte_workaround (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4) const
+ { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename value1_type::template deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type>(
+ this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass>(_A_1,_A_2,_A_3,_A_4)); }
+ #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type
+ operator() (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5) const
+ { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename value1_type::template deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type>(
+ this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass>(_A_1,_A_2,_A_3,_A_4,_A_5)); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type
+ sun_forte_workaround (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5) const
+ { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename value1_type::template deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type>(
+ this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass>(_A_1,_A_2,_A_3,_A_4,_A_5)); }
+ #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type
+ operator() (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6) const
+ { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename value1_type::template deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type>(
+ this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass>(_A_1,_A_2,_A_3,_A_4,_A_5,_A_6)); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type
+ sun_forte_workaround (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6) const
+ { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename value1_type::template deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type>(
+ this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass>(_A_1,_A_2,_A_3,_A_4,_A_5,_A_6)); }
+ #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type
+ operator() (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6,T_arg7 _A_7) const
+ { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename value1_type::template deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type>(
+ this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass,typename type_trait<T_arg7>::pass>(_A_1,_A_2,_A_3,_A_4,_A_5,_A_6,_A_7)); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type
+ sun_forte_workaround (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6,T_arg7 _A_7) const
+ { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename value1_type::template deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type>(
+ this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass,typename type_trait<T_arg7>::pass>(_A_1,_A_2,_A_3,_A_4,_A_5,_A_6,_A_7)); }
+ #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+
+ lambda_group1(typename type_trait<T_functor>::take _A_func, typename type_trait<T_type1>::take _A_1)
+ : value1_(_A_1), func_(_A_func) {}
+
+ value1_type value1_;
+ mutable functor_type func_;
+};
+
+template <class T_functor, class T_type1>
+typename lambda_group1<T_functor, T_type1>::result_type
+lambda_group1<T_functor, T_type1>::operator ()() const
+ { return func_(value1_()); }
+
+
+template <class T_action, class T_functor, class T_type1>
+void visit_each(const T_action& _A_action,
+ const lambda_group1<T_functor, T_type1>& _A_target)
+{
+ visit_each(_A_action, _A_target.value1_);
+ visit_each(_A_action, _A_target.func_);
+}
+
+
+template <class T_functor, class T_type1,class T_type2>
+struct lambda_group2 : public lambda_base
+{
+ typedef typename functor_trait<T_functor>::result_type result_type;
+ typedef typename lambda<T_type1>::lambda_type value1_type;
+ typedef typename lambda<T_type2>::lambda_type value2_type;
+ typedef typename adaptor_trait<T_functor>::adaptor_type functor_type;
+
+ template <class T_arg1=void,class T_arg2=void,class T_arg3=void,class T_arg4=void,class T_arg5=void,class T_arg6=void,class T_arg7=void>
+ struct deduce_result_type
+ { typedef typename functor_type::template deduce_result_type<
+ typename value1_type::template deduce_result_type<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass,typename type_trait<T_arg7>::pass>::type,
+ typename value2_type::template deduce_result_type<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass,typename type_trait<T_arg7>::pass>::type
+ >::type type; };
+
+ result_type
+ operator ()() const;
+
+ template <class T_arg1>
+ typename deduce_result_type<T_arg1>::type
+ operator() (T_arg1 _A_1) const
+ { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename value1_type::template deduce_result_type<T_arg1>::type,
+ typename value2_type::template deduce_result_type<T_arg1>::type>(
+ this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass>(_A_1),
+ this->value2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass>(_A_1)); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1>
+ typename deduce_result_type<T_arg1>::type
+ sun_forte_workaround (T_arg1 _A_1) const
+ { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename value1_type::template deduce_result_type<T_arg1>::type,
+ typename value2_type::template deduce_result_type<T_arg1>::type>(
+ this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass>(_A_1),
+ this->value2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass>(_A_1)); }
+ #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+
+ template <class T_arg1,class T_arg2>
+ typename deduce_result_type<T_arg1,T_arg2>::type
+ operator() (T_arg1 _A_1,T_arg2 _A_2) const
+ { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename value1_type::template deduce_result_type<T_arg1,T_arg2>::type,
+ typename value2_type::template deduce_result_type<T_arg1,T_arg2>::type>(
+ this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass>(_A_1,_A_2),
+ this->value2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass>(_A_1,_A_2)); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2>
+ typename deduce_result_type<T_arg1,T_arg2>::type
+ sun_forte_workaround (T_arg1 _A_1,T_arg2 _A_2) const
+ { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename value1_type::template deduce_result_type<T_arg1,T_arg2>::type,
+ typename value2_type::template deduce_result_type<T_arg1,T_arg2>::type>(
+ this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass>(_A_1,_A_2),
+ this->value2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass>(_A_1,_A_2)); }
+ #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+
+ template <class T_arg1,class T_arg2,class T_arg3>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3>::type
+ operator() (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3) const
+ { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename value1_type::template deduce_result_type<T_arg1,T_arg2,T_arg3>::type,
+ typename value2_type::template deduce_result_type<T_arg1,T_arg2,T_arg3>::type>(
+ this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass>(_A_1,_A_2,_A_3),
+ this->value2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass>(_A_1,_A_2,_A_3)); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3>::type
+ sun_forte_workaround (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3) const
+ { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename value1_type::template deduce_result_type<T_arg1,T_arg2,T_arg3>::type,
+ typename value2_type::template deduce_result_type<T_arg1,T_arg2,T_arg3>::type>(
+ this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass>(_A_1,_A_2,_A_3),
+ this->value2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass>(_A_1,_A_2,_A_3)); }
+ #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type
+ operator() (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4) const
+ { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename value1_type::template deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type,
+ typename value2_type::template deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type>(
+ this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass>(_A_1,_A_2,_A_3,_A_4),
+ this->value2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass>(_A_1,_A_2,_A_3,_A_4)); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type
+ sun_forte_workaround (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4) const
+ { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename value1_type::template deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type,
+ typename value2_type::template deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type>(
+ this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass>(_A_1,_A_2,_A_3,_A_4),
+ this->value2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass>(_A_1,_A_2,_A_3,_A_4)); }
+ #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type
+ operator() (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5) const
+ { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename value1_type::template deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type,
+ typename value2_type::template deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type>(
+ this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass>(_A_1,_A_2,_A_3,_A_4,_A_5),
+ this->value2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass>(_A_1,_A_2,_A_3,_A_4,_A_5)); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type
+ sun_forte_workaround (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5) const
+ { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename value1_type::template deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type,
+ typename value2_type::template deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type>(
+ this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass>(_A_1,_A_2,_A_3,_A_4,_A_5),
+ this->value2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass>(_A_1,_A_2,_A_3,_A_4,_A_5)); }
+ #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type
+ operator() (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6) const
+ { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename value1_type::template deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type,
+ typename value2_type::template deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type>(
+ this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass>(_A_1,_A_2,_A_3,_A_4,_A_5,_A_6),
+ this->value2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass>(_A_1,_A_2,_A_3,_A_4,_A_5,_A_6)); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type
+ sun_forte_workaround (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6) const
+ { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename value1_type::template deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type,
+ typename value2_type::template deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type>(
+ this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass>(_A_1,_A_2,_A_3,_A_4,_A_5,_A_6),
+ this->value2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass>(_A_1,_A_2,_A_3,_A_4,_A_5,_A_6)); }
+ #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type
+ operator() (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6,T_arg7 _A_7) const
+ { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename value1_type::template deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type,
+ typename value2_type::template deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type>(
+ this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass,typename type_trait<T_arg7>::pass>(_A_1,_A_2,_A_3,_A_4,_A_5,_A_6,_A_7),
+ this->value2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass,typename type_trait<T_arg7>::pass>(_A_1,_A_2,_A_3,_A_4,_A_5,_A_6,_A_7)); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type
+ sun_forte_workaround (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6,T_arg7 _A_7) const
+ { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename value1_type::template deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type,
+ typename value2_type::template deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type>(
+ this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass,typename type_trait<T_arg7>::pass>(_A_1,_A_2,_A_3,_A_4,_A_5,_A_6,_A_7),
+ this->value2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass,typename type_trait<T_arg7>::pass>(_A_1,_A_2,_A_3,_A_4,_A_5,_A_6,_A_7)); }
+ #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+
+ lambda_group2(typename type_trait<T_functor>::take _A_func, typename type_trait<T_type1>::take _A_1,typename type_trait<T_type2>::take _A_2)
+ : value1_(_A_1),value2_(_A_2), func_(_A_func) {}
+
+ value1_type value1_;
+ value2_type value2_;
+ mutable functor_type func_;
+};
+
+template <class T_functor, class T_type1,class T_type2>
+typename lambda_group2<T_functor, T_type1,T_type2>::result_type
+lambda_group2<T_functor, T_type1,T_type2>::operator ()() const
+ { return func_(value1_(),value2_()); }
+
+
+template <class T_action, class T_functor, class T_type1,class T_type2>
+void visit_each(const T_action& _A_action,
+ const lambda_group2<T_functor, T_type1,T_type2>& _A_target)
+{
+ visit_each(_A_action, _A_target.value1_);
+ visit_each(_A_action, _A_target.value2_);
+ visit_each(_A_action, _A_target.func_);
+}
+
+
+template <class T_functor, class T_type1,class T_type2,class T_type3>
+struct lambda_group3 : public lambda_base
+{
+ typedef typename functor_trait<T_functor>::result_type result_type;
+ typedef typename lambda<T_type1>::lambda_type value1_type;
+ typedef typename lambda<T_type2>::lambda_type value2_type;
+ typedef typename lambda<T_type3>::lambda_type value3_type;
+ typedef typename adaptor_trait<T_functor>::adaptor_type functor_type;
+
+ template <class T_arg1=void,class T_arg2=void,class T_arg3=void,class T_arg4=void,class T_arg5=void,class T_arg6=void,class T_arg7=void>
+ struct deduce_result_type
+ { typedef typename functor_type::template deduce_result_type<
+ typename value1_type::template deduce_result_type<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass,typename type_trait<T_arg7>::pass>::type,
+ typename value2_type::template deduce_result_type<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass,typename type_trait<T_arg7>::pass>::type,
+ typename value3_type::template deduce_result_type<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass,typename type_trait<T_arg7>::pass>::type
+ >::type type; };
+
+ result_type
+ operator ()() const;
+
+ template <class T_arg1>
+ typename deduce_result_type<T_arg1>::type
+ operator() (T_arg1 _A_1) const
+ { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename value1_type::template deduce_result_type<T_arg1>::type,
+ typename value2_type::template deduce_result_type<T_arg1>::type,
+ typename value3_type::template deduce_result_type<T_arg1>::type>(
+ this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass>(_A_1),
+ this->value2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass>(_A_1),
+ this->value3_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass>(_A_1)); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1>
+ typename deduce_result_type<T_arg1>::type
+ sun_forte_workaround (T_arg1 _A_1) const
+ { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename value1_type::template deduce_result_type<T_arg1>::type,
+ typename value2_type::template deduce_result_type<T_arg1>::type,
+ typename value3_type::template deduce_result_type<T_arg1>::type>(
+ this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass>(_A_1),
+ this->value2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass>(_A_1),
+ this->value3_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass>(_A_1)); }
+ #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+
+ template <class T_arg1,class T_arg2>
+ typename deduce_result_type<T_arg1,T_arg2>::type
+ operator() (T_arg1 _A_1,T_arg2 _A_2) const
+ { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename value1_type::template deduce_result_type<T_arg1,T_arg2>::type,
+ typename value2_type::template deduce_result_type<T_arg1,T_arg2>::type,
+ typename value3_type::template deduce_result_type<T_arg1,T_arg2>::type>(
+ this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass>(_A_1,_A_2),
+ this->value2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass>(_A_1,_A_2),
+ this->value3_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass>(_A_1,_A_2)); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2>
+ typename deduce_result_type<T_arg1,T_arg2>::type
+ sun_forte_workaround (T_arg1 _A_1,T_arg2 _A_2) const
+ { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename value1_type::template deduce_result_type<T_arg1,T_arg2>::type,
+ typename value2_type::template deduce_result_type<T_arg1,T_arg2>::type,
+ typename value3_type::template deduce_result_type<T_arg1,T_arg2>::type>(
+ this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass>(_A_1,_A_2),
+ this->value2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass>(_A_1,_A_2),
+ this->value3_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass>(_A_1,_A_2)); }
+ #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+
+ template <class T_arg1,class T_arg2,class T_arg3>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3>::type
+ operator() (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3) const
+ { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename value1_type::template deduce_result_type<T_arg1,T_arg2,T_arg3>::type,
+ typename value2_type::template deduce_result_type<T_arg1,T_arg2,T_arg3>::type,
+ typename value3_type::template deduce_result_type<T_arg1,T_arg2,T_arg3>::type>(
+ this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass>(_A_1,_A_2,_A_3),
+ this->value2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass>(_A_1,_A_2,_A_3),
+ this->value3_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass>(_A_1,_A_2,_A_3)); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3>::type
+ sun_forte_workaround (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3) const
+ { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename value1_type::template deduce_result_type<T_arg1,T_arg2,T_arg3>::type,
+ typename value2_type::template deduce_result_type<T_arg1,T_arg2,T_arg3>::type,
+ typename value3_type::template deduce_result_type<T_arg1,T_arg2,T_arg3>::type>(
+ this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass>(_A_1,_A_2,_A_3),
+ this->value2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass>(_A_1,_A_2,_A_3),
+ this->value3_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass>(_A_1,_A_2,_A_3)); }
+ #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type
+ operator() (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4) const
+ { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename value1_type::template deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type,
+ typename value2_type::template deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type,
+ typename value3_type::template deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type>(
+ this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass>(_A_1,_A_2,_A_3,_A_4),
+ this->value2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass>(_A_1,_A_2,_A_3,_A_4),
+ this->value3_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass>(_A_1,_A_2,_A_3,_A_4)); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type
+ sun_forte_workaround (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4) const
+ { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename value1_type::template deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type,
+ typename value2_type::template deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type,
+ typename value3_type::template deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type>(
+ this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass>(_A_1,_A_2,_A_3,_A_4),
+ this->value2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass>(_A_1,_A_2,_A_3,_A_4),
+ this->value3_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass>(_A_1,_A_2,_A_3,_A_4)); }
+ #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type
+ operator() (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5) const
+ { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename value1_type::template deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type,
+ typename value2_type::template deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type,
+ typename value3_type::template deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type>(
+ this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass>(_A_1,_A_2,_A_3,_A_4,_A_5),
+ this->value2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass>(_A_1,_A_2,_A_3,_A_4,_A_5),
+ this->value3_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass>(_A_1,_A_2,_A_3,_A_4,_A_5)); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type
+ sun_forte_workaround (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5) const
+ { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename value1_type::template deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type,
+ typename value2_type::template deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type,
+ typename value3_type::template deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type>(
+ this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass>(_A_1,_A_2,_A_3,_A_4,_A_5),
+ this->value2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass>(_A_1,_A_2,_A_3,_A_4,_A_5),
+ this->value3_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass>(_A_1,_A_2,_A_3,_A_4,_A_5)); }
+ #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type
+ operator() (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6) const
+ { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename value1_type::template deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type,
+ typename value2_type::template deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type,
+ typename value3_type::template deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type>(
+ this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass>(_A_1,_A_2,_A_3,_A_4,_A_5,_A_6),
+ this->value2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass>(_A_1,_A_2,_A_3,_A_4,_A_5,_A_6),
+ this->value3_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass>(_A_1,_A_2,_A_3,_A_4,_A_5,_A_6)); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type
+ sun_forte_workaround (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6) const
+ { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename value1_type::template deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type,
+ typename value2_type::template deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type,
+ typename value3_type::template deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type>(
+ this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass>(_A_1,_A_2,_A_3,_A_4,_A_5,_A_6),
+ this->value2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass>(_A_1,_A_2,_A_3,_A_4,_A_5,_A_6),
+ this->value3_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass>(_A_1,_A_2,_A_3,_A_4,_A_5,_A_6)); }
+ #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type
+ operator() (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6,T_arg7 _A_7) const
+ { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename value1_type::template deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type,
+ typename value2_type::template deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type,
+ typename value3_type::template deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type>(
+ this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass,typename type_trait<T_arg7>::pass>(_A_1,_A_2,_A_3,_A_4,_A_5,_A_6,_A_7),
+ this->value2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass,typename type_trait<T_arg7>::pass>(_A_1,_A_2,_A_3,_A_4,_A_5,_A_6,_A_7),
+ this->value3_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass,typename type_trait<T_arg7>::pass>(_A_1,_A_2,_A_3,_A_4,_A_5,_A_6,_A_7)); }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type
+ sun_forte_workaround (T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6,T_arg7 _A_7) const
+ { return this->func_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename value1_type::template deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type,
+ typename value2_type::template deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type,
+ typename value3_type::template deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type>(
+ this->value1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass,typename type_trait<T_arg7>::pass>(_A_1,_A_2,_A_3,_A_4,_A_5,_A_6,_A_7),
+ this->value2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass,typename type_trait<T_arg7>::pass>(_A_1,_A_2,_A_3,_A_4,_A_5,_A_6,_A_7),
+ this->value3_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<
+ typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass,typename type_trait<T_arg7>::pass>(_A_1,_A_2,_A_3,_A_4,_A_5,_A_6,_A_7)); }
+ #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+
+ lambda_group3(typename type_trait<T_functor>::take _A_func, typename type_trait<T_type1>::take _A_1,typename type_trait<T_type2>::take _A_2,typename type_trait<T_type3>::take _A_3)
+ : value1_(_A_1),value2_(_A_2),value3_(_A_3), func_(_A_func) {}
+
+ value1_type value1_;
+ value2_type value2_;
+ value3_type value3_;
+ mutable functor_type func_;
+};
+
+template <class T_functor, class T_type1,class T_type2,class T_type3>
+typename lambda_group3<T_functor, T_type1,T_type2,T_type3>::result_type
+lambda_group3<T_functor, T_type1,T_type2,T_type3>::operator ()() const
+ { return func_(value1_(),value2_(),value3_()); }
+
+
+template <class T_action, class T_functor, class T_type1,class T_type2,class T_type3>
+void visit_each(const T_action& _A_action,
+ const lambda_group3<T_functor, T_type1,T_type2,T_type3>& _A_target)
+{
+ visit_each(_A_action, _A_target.value1_);
+ visit_each(_A_action, _A_target.value2_);
+ visit_each(_A_action, _A_target.value3_);
+ visit_each(_A_action, _A_target.func_);
+}
+
+
+
+template <class T_functor, class T_type1>
+lambda<lambda_group1<T_functor, typename unwrap_reference<T_type1>::type> >
+group(const T_functor& _A_func, T_type1 _A_1)
+{
+ typedef lambda_group1<T_functor, typename unwrap_reference<T_type1>::type> T_lambda;
+ return lambda<T_lambda>(T_lambda(_A_func, _A_1));
+}
+
+template <class T_functor, class T_type1,class T_type2>
+lambda<lambda_group2<T_functor, typename unwrap_reference<T_type1>::type,typename unwrap_reference<T_type2>::type> >
+group(const T_functor& _A_func, T_type1 _A_1,T_type2 _A_2)
+{
+ typedef lambda_group2<T_functor, typename unwrap_reference<T_type1>::type,typename unwrap_reference<T_type2>::type> T_lambda;
+ return lambda<T_lambda>(T_lambda(_A_func, _A_1,_A_2));
+}
+
+template <class T_functor, class T_type1,class T_type2,class T_type3>
+lambda<lambda_group3<T_functor, typename unwrap_reference<T_type1>::type,typename unwrap_reference<T_type2>::type,typename unwrap_reference<T_type3>::type> >
+group(const T_functor& _A_func, T_type1 _A_1,T_type2 _A_2,T_type3 _A_3)
+{
+ typedef lambda_group3<T_functor, typename unwrap_reference<T_type1>::type,typename unwrap_reference<T_type2>::type,typename unwrap_reference<T_type3>::type> T_lambda;
+ return lambda<T_lambda>(T_lambda(_A_func, _A_1,_A_2,_A_3));
+}
+
+
+
+} /* namespace sigc */
+#endif /* _SIGC_ADAPTORS_LAMBDA_MACROS_GROUPHM4_ */
diff --git a/libs/sigc++2/sigc++/adaptors/lambda/lambda.cc b/libs/sigc++2/sigc++/adaptors/lambda/lambda.cc
new file mode 100644
index 0000000000..78fd516df2
--- /dev/null
+++ b/libs/sigc++2/sigc++/adaptors/lambda/lambda.cc
@@ -0,0 +1,15 @@
+// -*- c++ -*-
+/* Do not edit! -- generated file */
+#include <sigc++/adaptors/lambda/select.h>
+
+namespace sigc {
+
+const lambda<internal::lambda_select1> _1;
+const lambda<internal::lambda_select2> _2;
+const lambda<internal::lambda_select3> _3;
+const lambda<internal::lambda_select4> _4;
+const lambda<internal::lambda_select5> _5;
+const lambda<internal::lambda_select6> _6;
+const lambda<internal::lambda_select7> _7;
+
+} /* namespace sigc */
diff --git a/libs/sigc++2/sigc++/adaptors/lambda/lambda.h b/libs/sigc++2/sigc++/adaptors/lambda/lambda.h
new file mode 100644
index 0000000000..487522ad10
--- /dev/null
+++ b/libs/sigc++2/sigc++/adaptors/lambda/lambda.h
@@ -0,0 +1,28 @@
+// -*- c++ -*-
+/*
+ * Copyright 2002, The libsigc++ Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+#ifndef _SIGC_LAMBDA_HPP_
+#define _SIGC_LAMBDA_HPP_
+
+#include <sigc++/adaptors/lambda/base.h>
+#include <sigc++/adaptors/lambda/select.h>
+#include <sigc++/adaptors/lambda/operator.h>
+#include <sigc++/adaptors/lambda/group.h>
+
+#endif /* _SIGC_LAMBDA_HPP_ */
diff --git a/libs/sigc++2/sigc++/adaptors/lambda/operator.h b/libs/sigc++2/sigc++/adaptors/lambda/operator.h
new file mode 100644
index 0000000000..5d9e00bcde
--- /dev/null
+++ b/libs/sigc++2/sigc++/adaptors/lambda/operator.h
@@ -0,0 +1,1697 @@
+// -*- c++ -*-
+/* Do not edit! -- generated file */
+#ifndef _SIGC_LAMBDA_OPERATOR_HPP_
+#define _SIGC_LAMBDA_OPERATOR_HPP_
+#include <sigc++/adaptors/lambda/base.h>
+
+namespace sigc {
+
+/** Deduces the base type of a reference or a pointer.
+ * @ingroup internal
+ */
+template <class T_type>
+struct dereference_trait
+ { typedef void type; };
+
+template <class T_type>
+struct dereference_trait<T_type*>
+ { typedef T_type type; };
+
+template <class T_type>
+struct dereference_trait<const T_type*>
+ { typedef const T_type type; };
+
+template <class T_type>
+struct dereference_trait<T_type*&>
+ { typedef T_type type; };
+
+template <class T_type>
+struct dereference_trait<const T_type*&>
+ { typedef const T_type type; };
+
+template <class T_type>
+struct dereference_trait<T_type* const&>
+ { typedef T_type type; };
+
+template <class T_type>
+struct dereference_trait<const T_type* const&>
+ { typedef const T_type type; };
+
+template <class T_type>
+struct arithmetic {};
+
+template <class T_type>
+struct bitwise {};
+
+template <class T_type>
+struct logical {};
+
+template <class T_type>
+struct relational {};
+
+template <class T_type>
+struct arithmetic_assign {};
+
+template <class T_type>
+struct bitwise_assign {};
+
+template <class T_type>
+struct other {};
+
+template <class T_type>
+struct unary_arithmetic {};
+
+template <class T_type>
+struct unary_bitwise {};
+
+template <class T_type>
+struct unary_logical {};
+
+template <class T_type>
+struct unary_other {};
+
+template <class T_type>
+struct cast_ {};
+
+struct plus {};
+struct minus {};
+struct multiplies {};
+struct divides {};
+struct modulus {};
+struct leftshift {};
+struct rightshift {};
+struct and_ {};
+struct or_ {};
+struct xor_ {};
+struct less {};
+struct greater {};
+struct less_equal {};
+struct greater_equal {};
+struct equal_to {};
+struct not_equal_to {};
+struct subscript {};
+struct assign {};
+struct pre_increment {};
+struct pre_decrement {};
+struct negate {};
+struct not_ {};
+struct address {};
+struct dereference {};
+struct reinterpret_ {};
+struct static_ {};
+struct dynamic_ {};
+
+template <class T_action, class T_test1, class T_test2>
+struct lambda_action_deduce_result_type
+ { typedef typename type_trait<T_test1>::type type; }; // TODO: e.g. T_test1=int, T_test2=double yields int but it should yield double !
+
+template <class T_action, class T_test1, class T_test2>
+struct lambda_action_deduce_result_type<logical<T_action>, T_test1, T_test2>
+ { typedef bool type; };
+
+template <class T_action, class T_test1, class T_test2>
+struct lambda_action_deduce_result_type<relational<T_action>, T_test1, T_test2>
+ { typedef bool type; };
+
+template <class T_action, class T_test1, class T_test2>
+struct lambda_action_deduce_result_type<arithmetic_assign<T_action>, T_test1, T_test2>
+ { typedef T_test1 type; };
+
+template <class T_action, class T_test1, class T_test2>
+struct lambda_action_deduce_result_type<bitwise_assign<T_action>, T_test1, T_test2>
+ { typedef T_test1 type; };
+
+template <class T_test1, class T_test2>
+struct lambda_action_deduce_result_type<other<subscript>, T_test1, T_test2>
+ { typedef typename type_trait<typename dereference_trait<T_test1>::type>::pass type; };
+
+template <class T_action, class T_test>
+struct lambda_action_unary_deduce_result_type
+ { typedef typename type_trait<T_test>::type type; };
+
+template <class T_action, class T_type, class T_test>
+struct lambda_action_convert_deduce_result_type
+ { typedef typename type_trait<T_type>::type type; };
+
+template <class T_action, class T_test>
+struct lambda_action_unary_deduce_result_type<unary_logical<T_action>, T_test>
+ { typedef bool type; };
+
+template <class T_test>
+struct lambda_action_unary_deduce_result_type<unary_other<address>, T_test>
+ { typedef typename type_trait<T_test>::pointer type; };
+
+template <class T_test>
+struct lambda_action_unary_deduce_result_type<unary_other<dereference>, T_test>
+ { typedef typename type_trait<typename dereference_trait<T_test>::type>::pass type; };
+
+
+
+template <class T_action>
+struct lambda_action {};
+
+template <class T_action>
+struct lambda_action_unary {};
+
+template <class T_action, class T_type>
+struct lambda_action_convert {};
+
+template <>
+struct lambda_action<arithmetic<plus> >
+{
+ template <class T_arg1, class T_arg2>
+ static typename lambda_action_deduce_result_type<arithmetic<plus>, T_arg1, T_arg2>::type
+ do_action(T_arg1 _A_1, T_arg2 _A_2)
+ { return _A_1 + _A_2; }
+};
+
+template <>
+struct lambda_action<arithmetic<minus> >
+{
+ template <class T_arg1, class T_arg2>
+ static typename lambda_action_deduce_result_type<arithmetic<minus>, T_arg1, T_arg2>::type
+ do_action(T_arg1 _A_1, T_arg2 _A_2)
+ { return _A_1 - _A_2; }
+};
+
+template <>
+struct lambda_action<arithmetic<multiplies> >
+{
+ template <class T_arg1, class T_arg2>
+ static typename lambda_action_deduce_result_type<arithmetic<multiplies>, T_arg1, T_arg2>::type
+ do_action(T_arg1 _A_1, T_arg2 _A_2)
+ { return _A_1 * _A_2; }
+};
+
+template <>
+struct lambda_action<arithmetic<divides> >
+{
+ template <class T_arg1, class T_arg2>
+ static typename lambda_action_deduce_result_type<arithmetic<divides>, T_arg1, T_arg2>::type
+ do_action(T_arg1 _A_1, T_arg2 _A_2)
+ { return _A_1 / _A_2; }
+};
+
+template <>
+struct lambda_action<arithmetic<modulus> >
+{
+ template <class T_arg1, class T_arg2>
+ static typename lambda_action_deduce_result_type<arithmetic<modulus>, T_arg1, T_arg2>::type
+ do_action(T_arg1 _A_1, T_arg2 _A_2)
+ { return _A_1 % _A_2; }
+};
+
+template <>
+struct lambda_action<bitwise<leftshift> >
+{
+ template <class T_arg1, class T_arg2>
+ static typename lambda_action_deduce_result_type<bitwise<leftshift>, T_arg1, T_arg2>::type
+ do_action(T_arg1 _A_1, T_arg2 _A_2)
+ { return _A_1 << _A_2; }
+};
+
+template <>
+struct lambda_action<bitwise<rightshift> >
+{
+ template <class T_arg1, class T_arg2>
+ static typename lambda_action_deduce_result_type<bitwise<rightshift>, T_arg1, T_arg2>::type
+ do_action(T_arg1 _A_1, T_arg2 _A_2)
+ { return _A_1 >> _A_2; }
+};
+
+template <>
+struct lambda_action<bitwise<and_> >
+{
+ template <class T_arg1, class T_arg2>
+ static typename lambda_action_deduce_result_type<bitwise<and_>, T_arg1, T_arg2>::type
+ do_action(T_arg1 _A_1, T_arg2 _A_2)
+ { return _A_1 & _A_2; }
+};
+
+template <>
+struct lambda_action<bitwise<or_> >
+{
+ template <class T_arg1, class T_arg2>
+ static typename lambda_action_deduce_result_type<bitwise<or_>, T_arg1, T_arg2>::type
+ do_action(T_arg1 _A_1, T_arg2 _A_2)
+ { return _A_1 | _A_2; }
+};
+
+template <>
+struct lambda_action<bitwise<xor_> >
+{
+ template <class T_arg1, class T_arg2>
+ static typename lambda_action_deduce_result_type<bitwise<xor_>, T_arg1, T_arg2>::type
+ do_action(T_arg1 _A_1, T_arg2 _A_2)
+ { return _A_1 ^ _A_2; }
+};
+
+template <>
+struct lambda_action<logical<and_> >
+{
+ template <class T_arg1, class T_arg2>
+ static typename lambda_action_deduce_result_type<logical<and_>, T_arg1, T_arg2>::type
+ do_action(T_arg1 _A_1, T_arg2 _A_2)
+ { return _A_1 && _A_2; }
+};
+
+template <>
+struct lambda_action<logical<or_> >
+{
+ template <class T_arg1, class T_arg2>
+ static typename lambda_action_deduce_result_type<logical<or_>, T_arg1, T_arg2>::type
+ do_action(T_arg1 _A_1, T_arg2 _A_2)
+ { return _A_1 || _A_2; }
+};
+
+template <>
+struct lambda_action<relational<less> >
+{
+ template <class T_arg1, class T_arg2>
+ static typename lambda_action_deduce_result_type<relational<less>, T_arg1, T_arg2>::type
+ do_action(T_arg1 _A_1, T_arg2 _A_2)
+ { return _A_1 < _A_2; }
+};
+
+template <>
+struct lambda_action<relational<greater> >
+{
+ template <class T_arg1, class T_arg2>
+ static typename lambda_action_deduce_result_type<relational<greater>, T_arg1, T_arg2>::type
+ do_action(T_arg1 _A_1, T_arg2 _A_2)
+ { return _A_1 > _A_2; }
+};
+
+template <>
+struct lambda_action<relational<less_equal> >
+{
+ template <class T_arg1, class T_arg2>
+ static typename lambda_action_deduce_result_type<relational<less_equal>, T_arg1, T_arg2>::type
+ do_action(T_arg1 _A_1, T_arg2 _A_2)
+ { return _A_1 <= _A_2; }
+};
+
+template <>
+struct lambda_action<relational<greater_equal> >
+{
+ template <class T_arg1, class T_arg2>
+ static typename lambda_action_deduce_result_type<relational<greater_equal>, T_arg1, T_arg2>::type
+ do_action(T_arg1 _A_1, T_arg2 _A_2)
+ { return _A_1 >= _A_2; }
+};
+
+template <>
+struct lambda_action<relational<equal_to> >
+{
+ template <class T_arg1, class T_arg2>
+ static typename lambda_action_deduce_result_type<relational<equal_to>, T_arg1, T_arg2>::type
+ do_action(T_arg1 _A_1, T_arg2 _A_2)
+ { return _A_1 == _A_2; }
+};
+
+template <>
+struct lambda_action<relational<not_equal_to> >
+{
+ template <class T_arg1, class T_arg2>
+ static typename lambda_action_deduce_result_type<relational<not_equal_to>, T_arg1, T_arg2>::type
+ do_action(T_arg1 _A_1, T_arg2 _A_2)
+ { return _A_1 != _A_2; }
+};
+
+template <>
+struct lambda_action<arithmetic_assign<plus> >
+{
+ template <class T_arg1, class T_arg2>
+ static typename lambda_action_deduce_result_type<arithmetic_assign<plus>, T_arg1, T_arg2>::type
+ do_action(T_arg1 _A_1, T_arg2 _A_2)
+ { return _A_1 += _A_2; }
+};
+
+template <>
+struct lambda_action<arithmetic_assign<minus> >
+{
+ template <class T_arg1, class T_arg2>
+ static typename lambda_action_deduce_result_type<arithmetic_assign<minus>, T_arg1, T_arg2>::type
+ do_action(T_arg1 _A_1, T_arg2 _A_2)
+ { return _A_1 -= _A_2; }
+};
+
+template <>
+struct lambda_action<arithmetic_assign<multiplies> >
+{
+ template <class T_arg1, class T_arg2>
+ static typename lambda_action_deduce_result_type<arithmetic_assign<multiplies>, T_arg1, T_arg2>::type
+ do_action(T_arg1 _A_1, T_arg2 _A_2)
+ { return _A_1 *= _A_2; }
+};
+
+template <>
+struct lambda_action<arithmetic_assign<divides> >
+{
+ template <class T_arg1, class T_arg2>
+ static typename lambda_action_deduce_result_type<arithmetic_assign<divides>, T_arg1, T_arg2>::type
+ do_action(T_arg1 _A_1, T_arg2 _A_2)
+ { return _A_1 /= _A_2; }
+};
+
+template <>
+struct lambda_action<arithmetic_assign<modulus> >
+{
+ template <class T_arg1, class T_arg2>
+ static typename lambda_action_deduce_result_type<arithmetic_assign<modulus>, T_arg1, T_arg2>::type
+ do_action(T_arg1 _A_1, T_arg2 _A_2)
+ { return _A_1 %= _A_2; }
+};
+
+template <>
+struct lambda_action<bitwise_assign<leftshift> >
+{
+ template <class T_arg1, class T_arg2>
+ static typename lambda_action_deduce_result_type<bitwise_assign<leftshift>, T_arg1, T_arg2>::type
+ do_action(T_arg1 _A_1, T_arg2 _A_2)
+ { return _A_1 <<= _A_2; }
+};
+
+template <>
+struct lambda_action<bitwise_assign<rightshift> >
+{
+ template <class T_arg1, class T_arg2>
+ static typename lambda_action_deduce_result_type<bitwise_assign<rightshift>, T_arg1, T_arg2>::type
+ do_action(T_arg1 _A_1, T_arg2 _A_2)
+ { return _A_1 >>= _A_2; }
+};
+
+template <>
+struct lambda_action<bitwise_assign<and_> >
+{
+ template <class T_arg1, class T_arg2>
+ static typename lambda_action_deduce_result_type<bitwise_assign<and_>, T_arg1, T_arg2>::type
+ do_action(T_arg1 _A_1, T_arg2 _A_2)
+ { return _A_1 &= _A_2; }
+};
+
+template <>
+struct lambda_action<bitwise_assign<or_> >
+{
+ template <class T_arg1, class T_arg2>
+ static typename lambda_action_deduce_result_type<bitwise_assign<or_>, T_arg1, T_arg2>::type
+ do_action(T_arg1 _A_1, T_arg2 _A_2)
+ { return _A_1 |= _A_2; }
+};
+
+template <>
+struct lambda_action<bitwise_assign<xor_> >
+{
+ template <class T_arg1, class T_arg2>
+ static typename lambda_action_deduce_result_type<bitwise_assign<xor_>, T_arg1, T_arg2>::type
+ do_action(T_arg1 _A_1, T_arg2 _A_2)
+ { return _A_1 ^= _A_2; }
+};
+
+template <>
+struct lambda_action<other<subscript> >
+{
+ template <class T_arg1, class T_arg2>
+ static typename lambda_action_deduce_result_type<other<subscript>, T_arg1, T_arg2>::type
+ do_action(T_arg1 _A_1, T_arg2 _A_2)
+ { return _A_1[_A_2]; }
+};
+
+template <>
+struct lambda_action<other<assign> >
+{
+ template <class T_arg1, class T_arg2>
+ static typename lambda_action_deduce_result_type<other<assign>, T_arg1, T_arg2>::type
+ do_action(T_arg1 _A_1, T_arg2 _A_2)
+ { return _A_1 = _A_2; }
+};
+
+template <>
+struct lambda_action_unary<unary_arithmetic<pre_increment> >
+{
+ template <class T_arg>
+ static typename lambda_action_unary_deduce_result_type<unary_arithmetic<pre_increment>, T_arg>::type
+ do_action(T_arg _Aa)
+ { return ++_Aa; }
+};
+
+template <>
+struct lambda_action_unary<unary_arithmetic<pre_decrement> >
+{
+ template <class T_arg>
+ static typename lambda_action_unary_deduce_result_type<unary_arithmetic<pre_decrement>, T_arg>::type
+ do_action(T_arg _Aa)
+ { return --_Aa; }
+};
+
+template <>
+struct lambda_action_unary<unary_arithmetic<negate> >
+{
+ template <class T_arg>
+ static typename lambda_action_unary_deduce_result_type<unary_arithmetic<negate>, T_arg>::type
+ do_action(T_arg _Aa)
+ { return -_Aa; }
+};
+
+template <>
+struct lambda_action_unary<unary_bitwise<not_> >
+{
+ template <class T_arg>
+ static typename lambda_action_unary_deduce_result_type<unary_bitwise<not_>, T_arg>::type
+ do_action(T_arg _Aa)
+ { return ~_Aa; }
+};
+
+template <>
+struct lambda_action_unary<unary_logical<not_> >
+{
+ template <class T_arg>
+ static typename lambda_action_unary_deduce_result_type<unary_logical<not_>, T_arg>::type
+ do_action(T_arg _Aa)
+ { return !_Aa; }
+};
+
+template <>
+struct lambda_action_unary<unary_other<address> >
+{
+ template <class T_arg>
+ static typename lambda_action_unary_deduce_result_type<unary_other<address>, T_arg>::type
+ do_action(T_arg _Aa)
+ { return &_Aa; }
+};
+
+template <>
+struct lambda_action_unary<unary_other<dereference> >
+{
+ template <class T_arg>
+ static typename lambda_action_unary_deduce_result_type<unary_other<dereference>, T_arg>::type
+ do_action(T_arg _Aa)
+ { return *_Aa; }
+};
+
+template <class T_type>
+struct lambda_action_convert<cast_<reinterpret_>, T_type>
+{
+ template <class T_arg>
+ static typename lambda_action_convert_deduce_result_type<cast_<reinterpret_>, T_type, T_arg>::type
+ do_action(T_arg _Aa)
+ { return reinterpret_cast<T_type>(_Aa); }
+};
+
+template <class T_type>
+struct lambda_action_convert<cast_<static_>, T_type>
+{
+ template <class T_arg>
+ static typename lambda_action_convert_deduce_result_type<cast_<static_>, T_type, T_arg>::type
+ do_action(T_arg _Aa)
+ { return static_cast<T_type>(_Aa); }
+};
+
+template <class T_type>
+struct lambda_action_convert<cast_<dynamic_>, T_type>
+{
+ template <class T_arg>
+ static typename lambda_action_convert_deduce_result_type<cast_<dynamic_>, T_type, T_arg>::type
+ do_action(T_arg _Aa)
+ { return dynamic_cast<T_type>(_Aa); }
+};
+
+
+
+template <class T_action, class T_type1, class T_type2>
+struct lambda_operator : public lambda_base
+{
+ typedef typename lambda<T_type1>::lambda_type arg1_type;
+ typedef typename lambda<T_type2>::lambda_type arg2_type;
+
+ template <class T_arg1=void,class T_arg2=void,class T_arg3=void,class T_arg4=void,class T_arg5=void,class T_arg6=void,class T_arg7=void>
+ struct deduce_result_type
+ { typedef typename arg1_type::template deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass,typename type_trait<T_arg7>::pass>::type left_type;
+ typedef typename arg2_type::template deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass,typename type_trait<T_arg7>::pass>::type right_type;
+ typedef typename lambda_action_deduce_result_type<T_action, left_type, right_type>::type type;
+ };
+ typedef typename lambda_action_deduce_result_type<
+ T_action,
+ typename arg1_type::result_type,
+ typename arg2_type::result_type
+ >::type result_type;
+
+ result_type
+ operator ()() const;
+
+ template <class T_arg1>
+ typename deduce_result_type<T_arg1>::type
+ operator ()(T_arg1 _A_1) const
+ {
+ return lambda_action<T_action>::template do_action<
+ typename deduce_result_type<typename type_trait<T_arg1>::pass>::left_type,
+ typename deduce_result_type<typename type_trait<T_arg1>::pass>::right_type>
+ (arg1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass>
+ (_A_1),
+ arg2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass>
+ (_A_1));
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1>
+ typename deduce_result_type<T_arg1>::type
+ sun_forte_workaround(T_arg1 _A_1) const
+ {
+ return lambda_action<T_action>::template do_action<
+ typename deduce_result_type<typename type_trait<T_arg1>::pass>::left_type,
+ typename deduce_result_type<typename type_trait<T_arg1>::pass>::right_type>
+ (arg1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass>
+ (_A_1),
+ arg2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass>
+ (_A_1));
+ }
+ #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+
+ template <class T_arg1,class T_arg2>
+ typename deduce_result_type<T_arg1,T_arg2>::type
+ operator ()(T_arg1 _A_1,T_arg2 _A_2) const
+ {
+ return lambda_action<T_action>::template do_action<
+ typename deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass>::left_type,
+ typename deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass>::right_type>
+ (arg1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass>
+ (_A_1,_A_2),
+ arg2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass>
+ (_A_1,_A_2));
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2>
+ typename deduce_result_type<T_arg1,T_arg2>::type
+ sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2) const
+ {
+ return lambda_action<T_action>::template do_action<
+ typename deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass>::left_type,
+ typename deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass>::right_type>
+ (arg1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass>
+ (_A_1,_A_2),
+ arg2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass>
+ (_A_1,_A_2));
+ }
+ #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+
+ template <class T_arg1,class T_arg2,class T_arg3>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3>::type
+ operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3) const
+ {
+ return lambda_action<T_action>::template do_action<
+ typename deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass>::left_type,
+ typename deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass>::right_type>
+ (arg1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass>
+ (_A_1,_A_2,_A_3),
+ arg2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass>
+ (_A_1,_A_2,_A_3));
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3>::type
+ sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3) const
+ {
+ return lambda_action<T_action>::template do_action<
+ typename deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass>::left_type,
+ typename deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass>::right_type>
+ (arg1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass>
+ (_A_1,_A_2,_A_3),
+ arg2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass>
+ (_A_1,_A_2,_A_3));
+ }
+ #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type
+ operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4) const
+ {
+ return lambda_action<T_action>::template do_action<
+ typename deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass>::left_type,
+ typename deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass>::right_type>
+ (arg1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass>
+ (_A_1,_A_2,_A_3,_A_4),
+ arg2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass>
+ (_A_1,_A_2,_A_3,_A_4));
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type
+ sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4) const
+ {
+ return lambda_action<T_action>::template do_action<
+ typename deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass>::left_type,
+ typename deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass>::right_type>
+ (arg1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass>
+ (_A_1,_A_2,_A_3,_A_4),
+ arg2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass>
+ (_A_1,_A_2,_A_3,_A_4));
+ }
+ #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type
+ operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5) const
+ {
+ return lambda_action<T_action>::template do_action<
+ typename deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass>::left_type,
+ typename deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass>::right_type>
+ (arg1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass>
+ (_A_1,_A_2,_A_3,_A_4,_A_5),
+ arg2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass>
+ (_A_1,_A_2,_A_3,_A_4,_A_5));
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type
+ sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5) const
+ {
+ return lambda_action<T_action>::template do_action<
+ typename deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass>::left_type,
+ typename deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass>::right_type>
+ (arg1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass>
+ (_A_1,_A_2,_A_3,_A_4,_A_5),
+ arg2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass>
+ (_A_1,_A_2,_A_3,_A_4,_A_5));
+ }
+ #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type
+ operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6) const
+ {
+ return lambda_action<T_action>::template do_action<
+ typename deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass>::left_type,
+ typename deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass>::right_type>
+ (arg1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass>
+ (_A_1,_A_2,_A_3,_A_4,_A_5,_A_6),
+ arg2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass>
+ (_A_1,_A_2,_A_3,_A_4,_A_5,_A_6));
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type
+ sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6) const
+ {
+ return lambda_action<T_action>::template do_action<
+ typename deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass>::left_type,
+ typename deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass>::right_type>
+ (arg1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass>
+ (_A_1,_A_2,_A_3,_A_4,_A_5,_A_6),
+ arg2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass>
+ (_A_1,_A_2,_A_3,_A_4,_A_5,_A_6));
+ }
+ #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type
+ operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6,T_arg7 _A_7) const
+ {
+ return lambda_action<T_action>::template do_action<
+ typename deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass,typename type_trait<T_arg7>::pass>::left_type,
+ typename deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass,typename type_trait<T_arg7>::pass>::right_type>
+ (arg1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass,typename type_trait<T_arg7>::pass>
+ (_A_1,_A_2,_A_3,_A_4,_A_5,_A_6,_A_7),
+ arg2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass,typename type_trait<T_arg7>::pass>
+ (_A_1,_A_2,_A_3,_A_4,_A_5,_A_6,_A_7));
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type
+ sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6,T_arg7 _A_7) const
+ {
+ return lambda_action<T_action>::template do_action<
+ typename deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass,typename type_trait<T_arg7>::pass>::left_type,
+ typename deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass,typename type_trait<T_arg7>::pass>::right_type>
+ (arg1_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass,typename type_trait<T_arg7>::pass>
+ (_A_1,_A_2,_A_3,_A_4,_A_5,_A_6,_A_7),
+ arg2_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass,typename type_trait<T_arg7>::pass>
+ (_A_1,_A_2,_A_3,_A_4,_A_5,_A_6,_A_7));
+ }
+ #endif //SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+
+ lambda_operator(typename type_trait<T_type1>::take a1, typename type_trait<T_type2>::take a2 )
+ : arg1_(a1), arg2_(a2) {}
+
+ arg1_type arg1_;
+ arg2_type arg2_;
+};
+
+template <class T_action, class T_type1, class T_type2>
+typename lambda_operator<T_action, T_type1, T_type2>::result_type
+lambda_operator<T_action, T_type1, T_type2>::operator ()() const
+ { return lambda_action<T_action>::template do_action<
+ typename arg1_type::result_type,
+ typename arg2_type::result_type>
+ (arg1_(), arg2_()); }
+
+template <class T_action, class T_lambda_action, class T_arg1, class T_arg2>
+void visit_each(const T_action& _A_action,
+ const lambda_operator<T_lambda_action, T_arg1, T_arg2>& _A_target)
+{
+ visit_each(_A_action, _A_target.arg1_);
+ visit_each(_A_action, _A_target.arg2_);
+}
+
+
+template <class T_action, class T_type>
+struct lambda_operator_unary : public lambda_base
+{
+ typedef typename lambda<T_type>::lambda_type arg_type;
+
+ template <class T_arg1=void,class T_arg2=void,class T_arg3=void,class T_arg4=void,class T_arg5=void,class T_arg6=void,class T_arg7=void>
+ struct deduce_result_type
+ { typedef typename arg_type::template deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass,typename type_trait<T_arg7>::pass>::type operand_type;
+ typedef typename lambda_action_unary_deduce_result_type<T_action, operand_type>::type type;
+ };
+ typedef typename lambda_action_unary_deduce_result_type<
+ T_action,
+ typename arg_type::result_type
+ >::type result_type;
+
+ result_type
+ operator ()() const;
+
+ template <class T_arg1>
+ typename deduce_result_type<T_arg1>::type
+ operator ()(T_arg1 _A_1) const
+ {
+ return lambda_action_unary<T_action>::template do_action<
+ typename deduce_result_type<typename type_trait<T_arg1>::pass>::operand_type>
+ (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass>
+ (_A_1));
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1>
+ typename deduce_result_type<T_arg1>::type
+ sun_forte_workaround(T_arg1 _A_1) const
+ {
+ return lambda_action_unary<T_action>::template do_action<
+ typename deduce_result_type<typename type_trait<T_arg1>::pass>::operand_type>
+ (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass>
+ (_A_1));
+ }
+ #endif
+
+ template <class T_arg1,class T_arg2>
+ typename deduce_result_type<T_arg1,T_arg2>::type
+ operator ()(T_arg1 _A_1,T_arg2 _A_2) const
+ {
+ return lambda_action_unary<T_action>::template do_action<
+ typename deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass>::operand_type>
+ (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass>
+ (_A_1,_A_2));
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2>
+ typename deduce_result_type<T_arg1,T_arg2>::type
+ sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2) const
+ {
+ return lambda_action_unary<T_action>::template do_action<
+ typename deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass>::operand_type>
+ (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass>
+ (_A_1,_A_2));
+ }
+ #endif
+
+ template <class T_arg1,class T_arg2,class T_arg3>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3>::type
+ operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3) const
+ {
+ return lambda_action_unary<T_action>::template do_action<
+ typename deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass>::operand_type>
+ (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass>
+ (_A_1,_A_2,_A_3));
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3>::type
+ sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3) const
+ {
+ return lambda_action_unary<T_action>::template do_action<
+ typename deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass>::operand_type>
+ (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass>
+ (_A_1,_A_2,_A_3));
+ }
+ #endif
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type
+ operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4) const
+ {
+ return lambda_action_unary<T_action>::template do_action<
+ typename deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass>::operand_type>
+ (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass>
+ (_A_1,_A_2,_A_3,_A_4));
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type
+ sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4) const
+ {
+ return lambda_action_unary<T_action>::template do_action<
+ typename deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass>::operand_type>
+ (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass>
+ (_A_1,_A_2,_A_3,_A_4));
+ }
+ #endif
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type
+ operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5) const
+ {
+ return lambda_action_unary<T_action>::template do_action<
+ typename deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass>::operand_type>
+ (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass>
+ (_A_1,_A_2,_A_3,_A_4,_A_5));
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type
+ sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5) const
+ {
+ return lambda_action_unary<T_action>::template do_action<
+ typename deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass>::operand_type>
+ (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass>
+ (_A_1,_A_2,_A_3,_A_4,_A_5));
+ }
+ #endif
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type
+ operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6) const
+ {
+ return lambda_action_unary<T_action>::template do_action<
+ typename deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass>::operand_type>
+ (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass>
+ (_A_1,_A_2,_A_3,_A_4,_A_5,_A_6));
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type
+ sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6) const
+ {
+ return lambda_action_unary<T_action>::template do_action<
+ typename deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass>::operand_type>
+ (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass>
+ (_A_1,_A_2,_A_3,_A_4,_A_5,_A_6));
+ }
+ #endif
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type
+ operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6,T_arg7 _A_7) const
+ {
+ return lambda_action_unary<T_action>::template do_action<
+ typename deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass,typename type_trait<T_arg7>::pass>::operand_type>
+ (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass,typename type_trait<T_arg7>::pass>
+ (_A_1,_A_2,_A_3,_A_4,_A_5,_A_6,_A_7));
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type
+ sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6,T_arg7 _A_7) const
+ {
+ return lambda_action_unary<T_action>::template do_action<
+ typename deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass,typename type_trait<T_arg7>::pass>::operand_type>
+ (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass,typename type_trait<T_arg7>::pass>
+ (_A_1,_A_2,_A_3,_A_4,_A_5,_A_6,_A_7));
+ }
+ #endif
+
+ lambda_operator_unary(typename type_trait<T_type>::take a)
+ : arg_(a) {}
+
+ arg_type arg_;
+};
+
+template <class T_action, class T_type>
+typename lambda_operator_unary<T_action, T_type>::result_type
+lambda_operator_unary<T_action, T_type>::operator ()() const
+ { return lambda_action_unary<T_action>::template do_action<
+ typename arg_type::result_type>
+ (arg_()); }
+
+template <class T_action, class T_lambda_action, class T_arg>
+void visit_each(const T_action& _A_action,
+ const lambda_operator_unary<T_lambda_action, T_arg>& _A_target)
+{
+ visit_each(_A_action, _A_target.arg_);
+}
+
+
+template <class T_action, class T_type, class T_arg>
+struct lambda_operator_convert : public lambda_base
+{
+ typedef typename lambda<T_arg>::lambda_type arg_type;
+
+ template <class T_arg1=void,class T_arg2=void,class T_arg3=void,class T_arg4=void,class T_arg5=void,class T_arg6=void,class T_arg7=void>
+ struct deduce_result_type
+ { typedef typename arg_type::template deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass,typename type_trait<T_arg7>::pass>::type operand_type;
+ typedef typename lambda_action_convert_deduce_result_type<T_action, T_type, operand_type>::type type;
+ };
+ typedef typename lambda_action_convert_deduce_result_type<
+ T_action, T_type,
+ typename arg_type::result_type
+ >::type result_type;
+
+ result_type
+ operator ()() const;
+
+ template <class T_arg1>
+ typename deduce_result_type<T_arg1>::type
+ operator ()(T_arg1 _A_1) const
+ {
+ return lambda_action_convert<T_action, T_type>::template do_action<
+ typename deduce_result_type<typename type_trait<T_arg1>::pass>::operand_type>
+ (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass>
+ (_A_1));
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1>
+ typename deduce_result_type<T_arg1>::type
+ sun_forte_workaround(T_arg1 _A_1) const
+ {
+ return lambda_action_convert<T_action, T_type>::template do_action<
+ typename deduce_result_type<typename type_trait<T_arg1>::pass>::operand_type>
+ (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass>
+ (_A_1));
+ }
+ #endif
+
+ template <class T_arg1,class T_arg2>
+ typename deduce_result_type<T_arg1,T_arg2>::type
+ operator ()(T_arg1 _A_1,T_arg2 _A_2) const
+ {
+ return lambda_action_convert<T_action, T_type>::template do_action<
+ typename deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass>::operand_type>
+ (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass>
+ (_A_1,_A_2));
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2>
+ typename deduce_result_type<T_arg1,T_arg2>::type
+ sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2) const
+ {
+ return lambda_action_convert<T_action, T_type>::template do_action<
+ typename deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass>::operand_type>
+ (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass>
+ (_A_1,_A_2));
+ }
+ #endif
+
+ template <class T_arg1,class T_arg2,class T_arg3>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3>::type
+ operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3) const
+ {
+ return lambda_action_convert<T_action, T_type>::template do_action<
+ typename deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass>::operand_type>
+ (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass>
+ (_A_1,_A_2,_A_3));
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3>::type
+ sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3) const
+ {
+ return lambda_action_convert<T_action, T_type>::template do_action<
+ typename deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass>::operand_type>
+ (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass>
+ (_A_1,_A_2,_A_3));
+ }
+ #endif
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type
+ operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4) const
+ {
+ return lambda_action_convert<T_action, T_type>::template do_action<
+ typename deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass>::operand_type>
+ (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass>
+ (_A_1,_A_2,_A_3,_A_4));
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type
+ sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4) const
+ {
+ return lambda_action_convert<T_action, T_type>::template do_action<
+ typename deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass>::operand_type>
+ (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass>
+ (_A_1,_A_2,_A_3,_A_4));
+ }
+ #endif
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type
+ operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5) const
+ {
+ return lambda_action_convert<T_action, T_type>::template do_action<
+ typename deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass>::operand_type>
+ (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass>
+ (_A_1,_A_2,_A_3,_A_4,_A_5));
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type
+ sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5) const
+ {
+ return lambda_action_convert<T_action, T_type>::template do_action<
+ typename deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass>::operand_type>
+ (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass>
+ (_A_1,_A_2,_A_3,_A_4,_A_5));
+ }
+ #endif
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type
+ operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6) const
+ {
+ return lambda_action_convert<T_action, T_type>::template do_action<
+ typename deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass>::operand_type>
+ (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass>
+ (_A_1,_A_2,_A_3,_A_4,_A_5,_A_6));
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type
+ sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6) const
+ {
+ return lambda_action_convert<T_action, T_type>::template do_action<
+ typename deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass>::operand_type>
+ (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass>
+ (_A_1,_A_2,_A_3,_A_4,_A_5,_A_6));
+ }
+ #endif
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type
+ operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6,T_arg7 _A_7) const
+ {
+ return lambda_action_convert<T_action, T_type>::template do_action<
+ typename deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass,typename type_trait<T_arg7>::pass>::operand_type>
+ (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass,typename type_trait<T_arg7>::pass>
+ (_A_1,_A_2,_A_3,_A_4,_A_5,_A_6,_A_7));
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type
+ sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6,T_arg7 _A_7) const
+ {
+ return lambda_action_convert<T_action, T_type>::template do_action<
+ typename deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass,typename type_trait<T_arg7>::pass>::operand_type>
+ (arg_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass,typename type_trait<T_arg7>::pass>
+ (_A_1,_A_2,_A_3,_A_4,_A_5,_A_6,_A_7));
+ }
+ #endif
+
+ lambda_operator_convert(typename type_trait<T_arg>::take a)
+ : arg_(a) {}
+
+ arg_type arg_;
+};
+
+template <class T_action, class T_type, class T_arg>
+typename lambda_operator_convert<T_action, T_type, T_arg>::result_type
+lambda_operator_convert<T_action, T_type, T_arg>::operator ()() const
+ { return lambda_action_convert<T_action, T_type>::template do_action<
+ typename arg_type::result_type>
+ (arg_()); }
+
+template <class T_action, class T_lambda_action, class T_type, class T_arg>
+void visit_each(const T_action& _A_action,
+ const lambda_operator_convert<T_lambda_action, T_type, T_arg>& _A_target)
+{
+ visit_each(_A_action, _A_target.arg_);
+}
+
+
+// Operators for lambda action arithmetic<plus>. At least one of the arguments needs to be of type lamdba, hence the overloads.
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<arithmetic<plus>, T_arg1, T_arg2> >
+operator + (const lambda<T_arg1>& a1, const lambda<T_arg2>& a2)
+{ typedef lambda_operator<arithmetic<plus>, T_arg1, T_arg2> operator_type;
+ return lambda<operator_type>(operator_type(a1.value_,a2.value_)); }
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<arithmetic<plus>, T_arg1, typename unwrap_reference<T_arg2>::type> >
+operator + (const lambda<T_arg1>& a1, const T_arg2& a2)
+{ typedef lambda_operator<arithmetic<plus>, T_arg1, typename unwrap_reference<T_arg2>::type> operator_type;
+ return lambda<operator_type>(operator_type(a1.value_,a2)); }
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<arithmetic<plus>, typename unwrap_reference<T_arg1>::type, T_arg2> >
+operator + (const T_arg1& a1, const lambda<T_arg2>& a2)
+{ typedef lambda_operator<arithmetic<plus>, typename unwrap_reference<T_arg1>::type, T_arg2> operator_type;
+ return lambda<operator_type>(operator_type(a1,a2.value_)); }
+
+// Operators for lambda action arithmetic<minus>. At least one of the arguments needs to be of type lamdba, hence the overloads.
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<arithmetic<minus>, T_arg1, T_arg2> >
+operator - (const lambda<T_arg1>& a1, const lambda<T_arg2>& a2)
+{ typedef lambda_operator<arithmetic<minus>, T_arg1, T_arg2> operator_type;
+ return lambda<operator_type>(operator_type(a1.value_,a2.value_)); }
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<arithmetic<minus>, T_arg1, typename unwrap_reference<T_arg2>::type> >
+operator - (const lambda<T_arg1>& a1, const T_arg2& a2)
+{ typedef lambda_operator<arithmetic<minus>, T_arg1, typename unwrap_reference<T_arg2>::type> operator_type;
+ return lambda<operator_type>(operator_type(a1.value_,a2)); }
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<arithmetic<minus>, typename unwrap_reference<T_arg1>::type, T_arg2> >
+operator - (const T_arg1& a1, const lambda<T_arg2>& a2)
+{ typedef lambda_operator<arithmetic<minus>, typename unwrap_reference<T_arg1>::type, T_arg2> operator_type;
+ return lambda<operator_type>(operator_type(a1,a2.value_)); }
+
+// Operators for lambda action arithmetic<multiplies>. At least one of the arguments needs to be of type lamdba, hence the overloads.
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<arithmetic<multiplies>, T_arg1, T_arg2> >
+operator * (const lambda<T_arg1>& a1, const lambda<T_arg2>& a2)
+{ typedef lambda_operator<arithmetic<multiplies>, T_arg1, T_arg2> operator_type;
+ return lambda<operator_type>(operator_type(a1.value_,a2.value_)); }
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<arithmetic<multiplies>, T_arg1, typename unwrap_reference<T_arg2>::type> >
+operator * (const lambda<T_arg1>& a1, const T_arg2& a2)
+{ typedef lambda_operator<arithmetic<multiplies>, T_arg1, typename unwrap_reference<T_arg2>::type> operator_type;
+ return lambda<operator_type>(operator_type(a1.value_,a2)); }
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<arithmetic<multiplies>, typename unwrap_reference<T_arg1>::type, T_arg2> >
+operator * (const T_arg1& a1, const lambda<T_arg2>& a2)
+{ typedef lambda_operator<arithmetic<multiplies>, typename unwrap_reference<T_arg1>::type, T_arg2> operator_type;
+ return lambda<operator_type>(operator_type(a1,a2.value_)); }
+
+// Operators for lambda action arithmetic<divides>. At least one of the arguments needs to be of type lamdba, hence the overloads.
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<arithmetic<divides>, T_arg1, T_arg2> >
+operator / (const lambda<T_arg1>& a1, const lambda<T_arg2>& a2)
+{ typedef lambda_operator<arithmetic<divides>, T_arg1, T_arg2> operator_type;
+ return lambda<operator_type>(operator_type(a1.value_,a2.value_)); }
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<arithmetic<divides>, T_arg1, typename unwrap_reference<T_arg2>::type> >
+operator / (const lambda<T_arg1>& a1, const T_arg2& a2)
+{ typedef lambda_operator<arithmetic<divides>, T_arg1, typename unwrap_reference<T_arg2>::type> operator_type;
+ return lambda<operator_type>(operator_type(a1.value_,a2)); }
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<arithmetic<divides>, typename unwrap_reference<T_arg1>::type, T_arg2> >
+operator / (const T_arg1& a1, const lambda<T_arg2>& a2)
+{ typedef lambda_operator<arithmetic<divides>, typename unwrap_reference<T_arg1>::type, T_arg2> operator_type;
+ return lambda<operator_type>(operator_type(a1,a2.value_)); }
+
+// Operators for lambda action arithmetic<modulus>. At least one of the arguments needs to be of type lamdba, hence the overloads.
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<arithmetic<modulus>, T_arg1, T_arg2> >
+operator % (const lambda<T_arg1>& a1, const lambda<T_arg2>& a2)
+{ typedef lambda_operator<arithmetic<modulus>, T_arg1, T_arg2> operator_type;
+ return lambda<operator_type>(operator_type(a1.value_,a2.value_)); }
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<arithmetic<modulus>, T_arg1, typename unwrap_reference<T_arg2>::type> >
+operator % (const lambda<T_arg1>& a1, const T_arg2& a2)
+{ typedef lambda_operator<arithmetic<modulus>, T_arg1, typename unwrap_reference<T_arg2>::type> operator_type;
+ return lambda<operator_type>(operator_type(a1.value_,a2)); }
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<arithmetic<modulus>, typename unwrap_reference<T_arg1>::type, T_arg2> >
+operator % (const T_arg1& a1, const lambda<T_arg2>& a2)
+{ typedef lambda_operator<arithmetic<modulus>, typename unwrap_reference<T_arg1>::type, T_arg2> operator_type;
+ return lambda<operator_type>(operator_type(a1,a2.value_)); }
+
+// Operators for lambda action bitwise<leftshift>. At least one of the arguments needs to be of type lamdba, hence the overloads.
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<bitwise<leftshift>, T_arg1, T_arg2> >
+operator << (const lambda<T_arg1>& a1, const lambda<T_arg2>& a2)
+{ typedef lambda_operator<bitwise<leftshift>, T_arg1, T_arg2> operator_type;
+ return lambda<operator_type>(operator_type(a1.value_,a2.value_)); }
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<bitwise<leftshift>, T_arg1, typename unwrap_reference<T_arg2>::type> >
+operator << (const lambda<T_arg1>& a1, const T_arg2& a2)
+{ typedef lambda_operator<bitwise<leftshift>, T_arg1, typename unwrap_reference<T_arg2>::type> operator_type;
+ return lambda<operator_type>(operator_type(a1.value_,a2)); }
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<bitwise<leftshift>, typename unwrap_reference<T_arg1>::type, T_arg2> >
+operator << (const T_arg1& a1, const lambda<T_arg2>& a2)
+{ typedef lambda_operator<bitwise<leftshift>, typename unwrap_reference<T_arg1>::type, T_arg2> operator_type;
+ return lambda<operator_type>(operator_type(a1,a2.value_)); }
+
+// Operators for lambda action bitwise<rightshift>. At least one of the arguments needs to be of type lamdba, hence the overloads.
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<bitwise<rightshift>, T_arg1, T_arg2> >
+operator >> (const lambda<T_arg1>& a1, const lambda<T_arg2>& a2)
+{ typedef lambda_operator<bitwise<rightshift>, T_arg1, T_arg2> operator_type;
+ return lambda<operator_type>(operator_type(a1.value_,a2.value_)); }
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<bitwise<rightshift>, T_arg1, typename unwrap_reference<T_arg2>::type> >
+operator >> (const lambda<T_arg1>& a1, const T_arg2& a2)
+{ typedef lambda_operator<bitwise<rightshift>, T_arg1, typename unwrap_reference<T_arg2>::type> operator_type;
+ return lambda<operator_type>(operator_type(a1.value_,a2)); }
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<bitwise<rightshift>, typename unwrap_reference<T_arg1>::type, T_arg2> >
+operator >> (const T_arg1& a1, const lambda<T_arg2>& a2)
+{ typedef lambda_operator<bitwise<rightshift>, typename unwrap_reference<T_arg1>::type, T_arg2> operator_type;
+ return lambda<operator_type>(operator_type(a1,a2.value_)); }
+
+// Operators for lambda action bitwise<and_>. At least one of the arguments needs to be of type lamdba, hence the overloads.
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<bitwise<and_>, T_arg1, T_arg2> >
+operator & (const lambda<T_arg1>& a1, const lambda<T_arg2>& a2)
+{ typedef lambda_operator<bitwise<and_>, T_arg1, T_arg2> operator_type;
+ return lambda<operator_type>(operator_type(a1.value_,a2.value_)); }
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<bitwise<and_>, T_arg1, typename unwrap_reference<T_arg2>::type> >
+operator & (const lambda<T_arg1>& a1, const T_arg2& a2)
+{ typedef lambda_operator<bitwise<and_>, T_arg1, typename unwrap_reference<T_arg2>::type> operator_type;
+ return lambda<operator_type>(operator_type(a1.value_,a2)); }
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<bitwise<and_>, typename unwrap_reference<T_arg1>::type, T_arg2> >
+operator & (const T_arg1& a1, const lambda<T_arg2>& a2)
+{ typedef lambda_operator<bitwise<and_>, typename unwrap_reference<T_arg1>::type, T_arg2> operator_type;
+ return lambda<operator_type>(operator_type(a1,a2.value_)); }
+
+// Operators for lambda action bitwise<or_>. At least one of the arguments needs to be of type lamdba, hence the overloads.
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<bitwise<or_>, T_arg1, T_arg2> >
+operator | (const lambda<T_arg1>& a1, const lambda<T_arg2>& a2)
+{ typedef lambda_operator<bitwise<or_>, T_arg1, T_arg2> operator_type;
+ return lambda<operator_type>(operator_type(a1.value_,a2.value_)); }
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<bitwise<or_>, T_arg1, typename unwrap_reference<T_arg2>::type> >
+operator | (const lambda<T_arg1>& a1, const T_arg2& a2)
+{ typedef lambda_operator<bitwise<or_>, T_arg1, typename unwrap_reference<T_arg2>::type> operator_type;
+ return lambda<operator_type>(operator_type(a1.value_,a2)); }
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<bitwise<or_>, typename unwrap_reference<T_arg1>::type, T_arg2> >
+operator | (const T_arg1& a1, const lambda<T_arg2>& a2)
+{ typedef lambda_operator<bitwise<or_>, typename unwrap_reference<T_arg1>::type, T_arg2> operator_type;
+ return lambda<operator_type>(operator_type(a1,a2.value_)); }
+
+// Operators for lambda action bitwise<xor_>. At least one of the arguments needs to be of type lamdba, hence the overloads.
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<bitwise<xor_>, T_arg1, T_arg2> >
+operator ^ (const lambda<T_arg1>& a1, const lambda<T_arg2>& a2)
+{ typedef lambda_operator<bitwise<xor_>, T_arg1, T_arg2> operator_type;
+ return lambda<operator_type>(operator_type(a1.value_,a2.value_)); }
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<bitwise<xor_>, T_arg1, typename unwrap_reference<T_arg2>::type> >
+operator ^ (const lambda<T_arg1>& a1, const T_arg2& a2)
+{ typedef lambda_operator<bitwise<xor_>, T_arg1, typename unwrap_reference<T_arg2>::type> operator_type;
+ return lambda<operator_type>(operator_type(a1.value_,a2)); }
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<bitwise<xor_>, typename unwrap_reference<T_arg1>::type, T_arg2> >
+operator ^ (const T_arg1& a1, const lambda<T_arg2>& a2)
+{ typedef lambda_operator<bitwise<xor_>, typename unwrap_reference<T_arg1>::type, T_arg2> operator_type;
+ return lambda<operator_type>(operator_type(a1,a2.value_)); }
+
+// Operators for lambda action logical<and_>. At least one of the arguments needs to be of type lamdba, hence the overloads.
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<logical<and_>, T_arg1, T_arg2> >
+operator && (const lambda<T_arg1>& a1, const lambda<T_arg2>& a2)
+{ typedef lambda_operator<logical<and_>, T_arg1, T_arg2> operator_type;
+ return lambda<operator_type>(operator_type(a1.value_,a2.value_)); }
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<logical<and_>, T_arg1, typename unwrap_reference<T_arg2>::type> >
+operator && (const lambda<T_arg1>& a1, const T_arg2& a2)
+{ typedef lambda_operator<logical<and_>, T_arg1, typename unwrap_reference<T_arg2>::type> operator_type;
+ return lambda<operator_type>(operator_type(a1.value_,a2)); }
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<logical<and_>, typename unwrap_reference<T_arg1>::type, T_arg2> >
+operator && (const T_arg1& a1, const lambda<T_arg2>& a2)
+{ typedef lambda_operator<logical<and_>, typename unwrap_reference<T_arg1>::type, T_arg2> operator_type;
+ return lambda<operator_type>(operator_type(a1,a2.value_)); }
+
+// Operators for lambda action logical<or_>. At least one of the arguments needs to be of type lamdba, hence the overloads.
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<logical<or_>, T_arg1, T_arg2> >
+operator || (const lambda<T_arg1>& a1, const lambda<T_arg2>& a2)
+{ typedef lambda_operator<logical<or_>, T_arg1, T_arg2> operator_type;
+ return lambda<operator_type>(operator_type(a1.value_,a2.value_)); }
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<logical<or_>, T_arg1, typename unwrap_reference<T_arg2>::type> >
+operator || (const lambda<T_arg1>& a1, const T_arg2& a2)
+{ typedef lambda_operator<logical<or_>, T_arg1, typename unwrap_reference<T_arg2>::type> operator_type;
+ return lambda<operator_type>(operator_type(a1.value_,a2)); }
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<logical<or_>, typename unwrap_reference<T_arg1>::type, T_arg2> >
+operator || (const T_arg1& a1, const lambda<T_arg2>& a2)
+{ typedef lambda_operator<logical<or_>, typename unwrap_reference<T_arg1>::type, T_arg2> operator_type;
+ return lambda<operator_type>(operator_type(a1,a2.value_)); }
+
+// Operators for lambda action relational<less>. At least one of the arguments needs to be of type lamdba, hence the overloads.
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<relational<less>, T_arg1, T_arg2> >
+operator < (const lambda<T_arg1>& a1, const lambda<T_arg2>& a2)
+{ typedef lambda_operator<relational<less>, T_arg1, T_arg2> operator_type;
+ return lambda<operator_type>(operator_type(a1.value_,a2.value_)); }
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<relational<less>, T_arg1, typename unwrap_reference<T_arg2>::type> >
+operator < (const lambda<T_arg1>& a1, const T_arg2& a2)
+{ typedef lambda_operator<relational<less>, T_arg1, typename unwrap_reference<T_arg2>::type> operator_type;
+ return lambda<operator_type>(operator_type(a1.value_,a2)); }
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<relational<less>, typename unwrap_reference<T_arg1>::type, T_arg2> >
+operator < (const T_arg1& a1, const lambda<T_arg2>& a2)
+{ typedef lambda_operator<relational<less>, typename unwrap_reference<T_arg1>::type, T_arg2> operator_type;
+ return lambda<operator_type>(operator_type(a1,a2.value_)); }
+
+// Operators for lambda action relational<greater>. At least one of the arguments needs to be of type lamdba, hence the overloads.
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<relational<greater>, T_arg1, T_arg2> >
+operator > (const lambda<T_arg1>& a1, const lambda<T_arg2>& a2)
+{ typedef lambda_operator<relational<greater>, T_arg1, T_arg2> operator_type;
+ return lambda<operator_type>(operator_type(a1.value_,a2.value_)); }
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<relational<greater>, T_arg1, typename unwrap_reference<T_arg2>::type> >
+operator > (const lambda<T_arg1>& a1, const T_arg2& a2)
+{ typedef lambda_operator<relational<greater>, T_arg1, typename unwrap_reference<T_arg2>::type> operator_type;
+ return lambda<operator_type>(operator_type(a1.value_,a2)); }
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<relational<greater>, typename unwrap_reference<T_arg1>::type, T_arg2> >
+operator > (const T_arg1& a1, const lambda<T_arg2>& a2)
+{ typedef lambda_operator<relational<greater>, typename unwrap_reference<T_arg1>::type, T_arg2> operator_type;
+ return lambda<operator_type>(operator_type(a1,a2.value_)); }
+
+// Operators for lambda action relational<less_equal>. At least one of the arguments needs to be of type lamdba, hence the overloads.
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<relational<less_equal>, T_arg1, T_arg2> >
+operator <= (const lambda<T_arg1>& a1, const lambda<T_arg2>& a2)
+{ typedef lambda_operator<relational<less_equal>, T_arg1, T_arg2> operator_type;
+ return lambda<operator_type>(operator_type(a1.value_,a2.value_)); }
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<relational<less_equal>, T_arg1, typename unwrap_reference<T_arg2>::type> >
+operator <= (const lambda<T_arg1>& a1, const T_arg2& a2)
+{ typedef lambda_operator<relational<less_equal>, T_arg1, typename unwrap_reference<T_arg2>::type> operator_type;
+ return lambda<operator_type>(operator_type(a1.value_,a2)); }
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<relational<less_equal>, typename unwrap_reference<T_arg1>::type, T_arg2> >
+operator <= (const T_arg1& a1, const lambda<T_arg2>& a2)
+{ typedef lambda_operator<relational<less_equal>, typename unwrap_reference<T_arg1>::type, T_arg2> operator_type;
+ return lambda<operator_type>(operator_type(a1,a2.value_)); }
+
+// Operators for lambda action relational<greater_equal>. At least one of the arguments needs to be of type lamdba, hence the overloads.
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<relational<greater_equal>, T_arg1, T_arg2> >
+operator >= (const lambda<T_arg1>& a1, const lambda<T_arg2>& a2)
+{ typedef lambda_operator<relational<greater_equal>, T_arg1, T_arg2> operator_type;
+ return lambda<operator_type>(operator_type(a1.value_,a2.value_)); }
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<relational<greater_equal>, T_arg1, typename unwrap_reference<T_arg2>::type> >
+operator >= (const lambda<T_arg1>& a1, const T_arg2& a2)
+{ typedef lambda_operator<relational<greater_equal>, T_arg1, typename unwrap_reference<T_arg2>::type> operator_type;
+ return lambda<operator_type>(operator_type(a1.value_,a2)); }
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<relational<greater_equal>, typename unwrap_reference<T_arg1>::type, T_arg2> >
+operator >= (const T_arg1& a1, const lambda<T_arg2>& a2)
+{ typedef lambda_operator<relational<greater_equal>, typename unwrap_reference<T_arg1>::type, T_arg2> operator_type;
+ return lambda<operator_type>(operator_type(a1,a2.value_)); }
+
+// Operators for lambda action relational<equal_to>. At least one of the arguments needs to be of type lamdba, hence the overloads.
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<relational<equal_to>, T_arg1, T_arg2> >
+operator == (const lambda<T_arg1>& a1, const lambda<T_arg2>& a2)
+{ typedef lambda_operator<relational<equal_to>, T_arg1, T_arg2> operator_type;
+ return lambda<operator_type>(operator_type(a1.value_,a2.value_)); }
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<relational<equal_to>, T_arg1, typename unwrap_reference<T_arg2>::type> >
+operator == (const lambda<T_arg1>& a1, const T_arg2& a2)
+{ typedef lambda_operator<relational<equal_to>, T_arg1, typename unwrap_reference<T_arg2>::type> operator_type;
+ return lambda<operator_type>(operator_type(a1.value_,a2)); }
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<relational<equal_to>, typename unwrap_reference<T_arg1>::type, T_arg2> >
+operator == (const T_arg1& a1, const lambda<T_arg2>& a2)
+{ typedef lambda_operator<relational<equal_to>, typename unwrap_reference<T_arg1>::type, T_arg2> operator_type;
+ return lambda<operator_type>(operator_type(a1,a2.value_)); }
+
+// Operators for lambda action relational<not_equal_to>. At least one of the arguments needs to be of type lamdba, hence the overloads.
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<relational<not_equal_to>, T_arg1, T_arg2> >
+operator != (const lambda<T_arg1>& a1, const lambda<T_arg2>& a2)
+{ typedef lambda_operator<relational<not_equal_to>, T_arg1, T_arg2> operator_type;
+ return lambda<operator_type>(operator_type(a1.value_,a2.value_)); }
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<relational<not_equal_to>, T_arg1, typename unwrap_reference<T_arg2>::type> >
+operator != (const lambda<T_arg1>& a1, const T_arg2& a2)
+{ typedef lambda_operator<relational<not_equal_to>, T_arg1, typename unwrap_reference<T_arg2>::type> operator_type;
+ return lambda<operator_type>(operator_type(a1.value_,a2)); }
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<relational<not_equal_to>, typename unwrap_reference<T_arg1>::type, T_arg2> >
+operator != (const T_arg1& a1, const lambda<T_arg2>& a2)
+{ typedef lambda_operator<relational<not_equal_to>, typename unwrap_reference<T_arg1>::type, T_arg2> operator_type;
+ return lambda<operator_type>(operator_type(a1,a2.value_)); }
+
+// Operators for lambda action arithmetic_assign<plus>. At least one of the arguments needs to be of type lamdba, hence the overloads.
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<arithmetic_assign<plus>, T_arg1, T_arg2> >
+operator += (const lambda<T_arg1>& a1, const lambda<T_arg2>& a2)
+{ typedef lambda_operator<arithmetic_assign<plus>, T_arg1, T_arg2> operator_type;
+ return lambda<operator_type>(operator_type(a1.value_,a2.value_)); }
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<arithmetic_assign<plus>, T_arg1, typename unwrap_reference<T_arg2>::type> >
+operator += (const lambda<T_arg1>& a1, const T_arg2& a2)
+{ typedef lambda_operator<arithmetic_assign<plus>, T_arg1, typename unwrap_reference<T_arg2>::type> operator_type;
+ return lambda<operator_type>(operator_type(a1.value_,a2)); }
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<arithmetic_assign<plus>, typename unwrap_reference<T_arg1>::type, T_arg2> >
+operator += (const T_arg1& a1, const lambda<T_arg2>& a2)
+{ typedef lambda_operator<arithmetic_assign<plus>, typename unwrap_reference<T_arg1>::type, T_arg2> operator_type;
+ return lambda<operator_type>(operator_type(a1,a2.value_)); }
+
+// Operators for lambda action arithmetic_assign<minus>. At least one of the arguments needs to be of type lamdba, hence the overloads.
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<arithmetic_assign<minus>, T_arg1, T_arg2> >
+operator -= (const lambda<T_arg1>& a1, const lambda<T_arg2>& a2)
+{ typedef lambda_operator<arithmetic_assign<minus>, T_arg1, T_arg2> operator_type;
+ return lambda<operator_type>(operator_type(a1.value_,a2.value_)); }
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<arithmetic_assign<minus>, T_arg1, typename unwrap_reference<T_arg2>::type> >
+operator -= (const lambda<T_arg1>& a1, const T_arg2& a2)
+{ typedef lambda_operator<arithmetic_assign<minus>, T_arg1, typename unwrap_reference<T_arg2>::type> operator_type;
+ return lambda<operator_type>(operator_type(a1.value_,a2)); }
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<arithmetic_assign<minus>, typename unwrap_reference<T_arg1>::type, T_arg2> >
+operator -= (const T_arg1& a1, const lambda<T_arg2>& a2)
+{ typedef lambda_operator<arithmetic_assign<minus>, typename unwrap_reference<T_arg1>::type, T_arg2> operator_type;
+ return lambda<operator_type>(operator_type(a1,a2.value_)); }
+
+// Operators for lambda action arithmetic_assign<multiplies>. At least one of the arguments needs to be of type lamdba, hence the overloads.
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<arithmetic_assign<multiplies>, T_arg1, T_arg2> >
+operator *= (const lambda<T_arg1>& a1, const lambda<T_arg2>& a2)
+{ typedef lambda_operator<arithmetic_assign<multiplies>, T_arg1, T_arg2> operator_type;
+ return lambda<operator_type>(operator_type(a1.value_,a2.value_)); }
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<arithmetic_assign<multiplies>, T_arg1, typename unwrap_reference<T_arg2>::type> >
+operator *= (const lambda<T_arg1>& a1, const T_arg2& a2)
+{ typedef lambda_operator<arithmetic_assign<multiplies>, T_arg1, typename unwrap_reference<T_arg2>::type> operator_type;
+ return lambda<operator_type>(operator_type(a1.value_,a2)); }
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<arithmetic_assign<multiplies>, typename unwrap_reference<T_arg1>::type, T_arg2> >
+operator *= (const T_arg1& a1, const lambda<T_arg2>& a2)
+{ typedef lambda_operator<arithmetic_assign<multiplies>, typename unwrap_reference<T_arg1>::type, T_arg2> operator_type;
+ return lambda<operator_type>(operator_type(a1,a2.value_)); }
+
+// Operators for lambda action arithmetic_assign<divides>. At least one of the arguments needs to be of type lamdba, hence the overloads.
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<arithmetic_assign<divides>, T_arg1, T_arg2> >
+operator /= (const lambda<T_arg1>& a1, const lambda<T_arg2>& a2)
+{ typedef lambda_operator<arithmetic_assign<divides>, T_arg1, T_arg2> operator_type;
+ return lambda<operator_type>(operator_type(a1.value_,a2.value_)); }
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<arithmetic_assign<divides>, T_arg1, typename unwrap_reference<T_arg2>::type> >
+operator /= (const lambda<T_arg1>& a1, const T_arg2& a2)
+{ typedef lambda_operator<arithmetic_assign<divides>, T_arg1, typename unwrap_reference<T_arg2>::type> operator_type;
+ return lambda<operator_type>(operator_type(a1.value_,a2)); }
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<arithmetic_assign<divides>, typename unwrap_reference<T_arg1>::type, T_arg2> >
+operator /= (const T_arg1& a1, const lambda<T_arg2>& a2)
+{ typedef lambda_operator<arithmetic_assign<divides>, typename unwrap_reference<T_arg1>::type, T_arg2> operator_type;
+ return lambda<operator_type>(operator_type(a1,a2.value_)); }
+
+// Operators for lambda action arithmetic_assign<modulus>. At least one of the arguments needs to be of type lamdba, hence the overloads.
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<arithmetic_assign<modulus>, T_arg1, T_arg2> >
+operator %= (const lambda<T_arg1>& a1, const lambda<T_arg2>& a2)
+{ typedef lambda_operator<arithmetic_assign<modulus>, T_arg1, T_arg2> operator_type;
+ return lambda<operator_type>(operator_type(a1.value_,a2.value_)); }
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<arithmetic_assign<modulus>, T_arg1, typename unwrap_reference<T_arg2>::type> >
+operator %= (const lambda<T_arg1>& a1, const T_arg2& a2)
+{ typedef lambda_operator<arithmetic_assign<modulus>, T_arg1, typename unwrap_reference<T_arg2>::type> operator_type;
+ return lambda<operator_type>(operator_type(a1.value_,a2)); }
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<arithmetic_assign<modulus>, typename unwrap_reference<T_arg1>::type, T_arg2> >
+operator %= (const T_arg1& a1, const lambda<T_arg2>& a2)
+{ typedef lambda_operator<arithmetic_assign<modulus>, typename unwrap_reference<T_arg1>::type, T_arg2> operator_type;
+ return lambda<operator_type>(operator_type(a1,a2.value_)); }
+
+// Operators for lambda action bitwise_assign<leftshift>. At least one of the arguments needs to be of type lamdba, hence the overloads.
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<bitwise_assign<leftshift>, T_arg1, T_arg2> >
+operator <<= (const lambda<T_arg1>& a1, const lambda<T_arg2>& a2)
+{ typedef lambda_operator<bitwise_assign<leftshift>, T_arg1, T_arg2> operator_type;
+ return lambda<operator_type>(operator_type(a1.value_,a2.value_)); }
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<bitwise_assign<leftshift>, T_arg1, typename unwrap_reference<T_arg2>::type> >
+operator <<= (const lambda<T_arg1>& a1, const T_arg2& a2)
+{ typedef lambda_operator<bitwise_assign<leftshift>, T_arg1, typename unwrap_reference<T_arg2>::type> operator_type;
+ return lambda<operator_type>(operator_type(a1.value_,a2)); }
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<bitwise_assign<leftshift>, typename unwrap_reference<T_arg1>::type, T_arg2> >
+operator <<= (const T_arg1& a1, const lambda<T_arg2>& a2)
+{ typedef lambda_operator<bitwise_assign<leftshift>, typename unwrap_reference<T_arg1>::type, T_arg2> operator_type;
+ return lambda<operator_type>(operator_type(a1,a2.value_)); }
+
+// Operators for lambda action bitwise_assign<rightshift>. At least one of the arguments needs to be of type lamdba, hence the overloads.
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<bitwise_assign<rightshift>, T_arg1, T_arg2> >
+operator >>= (const lambda<T_arg1>& a1, const lambda<T_arg2>& a2)
+{ typedef lambda_operator<bitwise_assign<rightshift>, T_arg1, T_arg2> operator_type;
+ return lambda<operator_type>(operator_type(a1.value_,a2.value_)); }
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<bitwise_assign<rightshift>, T_arg1, typename unwrap_reference<T_arg2>::type> >
+operator >>= (const lambda<T_arg1>& a1, const T_arg2& a2)
+{ typedef lambda_operator<bitwise_assign<rightshift>, T_arg1, typename unwrap_reference<T_arg2>::type> operator_type;
+ return lambda<operator_type>(operator_type(a1.value_,a2)); }
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<bitwise_assign<rightshift>, typename unwrap_reference<T_arg1>::type, T_arg2> >
+operator >>= (const T_arg1& a1, const lambda<T_arg2>& a2)
+{ typedef lambda_operator<bitwise_assign<rightshift>, typename unwrap_reference<T_arg1>::type, T_arg2> operator_type;
+ return lambda<operator_type>(operator_type(a1,a2.value_)); }
+
+// Operators for lambda action bitwise_assign<and_>. At least one of the arguments needs to be of type lamdba, hence the overloads.
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<bitwise_assign<and_>, T_arg1, T_arg2> >
+operator &= (const lambda<T_arg1>& a1, const lambda<T_arg2>& a2)
+{ typedef lambda_operator<bitwise_assign<and_>, T_arg1, T_arg2> operator_type;
+ return lambda<operator_type>(operator_type(a1.value_,a2.value_)); }
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<bitwise_assign<and_>, T_arg1, typename unwrap_reference<T_arg2>::type> >
+operator &= (const lambda<T_arg1>& a1, const T_arg2& a2)
+{ typedef lambda_operator<bitwise_assign<and_>, T_arg1, typename unwrap_reference<T_arg2>::type> operator_type;
+ return lambda<operator_type>(operator_type(a1.value_,a2)); }
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<bitwise_assign<and_>, typename unwrap_reference<T_arg1>::type, T_arg2> >
+operator &= (const T_arg1& a1, const lambda<T_arg2>& a2)
+{ typedef lambda_operator<bitwise_assign<and_>, typename unwrap_reference<T_arg1>::type, T_arg2> operator_type;
+ return lambda<operator_type>(operator_type(a1,a2.value_)); }
+
+// Operators for lambda action bitwise_assign<or_>. At least one of the arguments needs to be of type lamdba, hence the overloads.
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<bitwise_assign<or_>, T_arg1, T_arg2> >
+operator |= (const lambda<T_arg1>& a1, const lambda<T_arg2>& a2)
+{ typedef lambda_operator<bitwise_assign<or_>, T_arg1, T_arg2> operator_type;
+ return lambda<operator_type>(operator_type(a1.value_,a2.value_)); }
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<bitwise_assign<or_>, T_arg1, typename unwrap_reference<T_arg2>::type> >
+operator |= (const lambda<T_arg1>& a1, const T_arg2& a2)
+{ typedef lambda_operator<bitwise_assign<or_>, T_arg1, typename unwrap_reference<T_arg2>::type> operator_type;
+ return lambda<operator_type>(operator_type(a1.value_,a2)); }
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<bitwise_assign<or_>, typename unwrap_reference<T_arg1>::type, T_arg2> >
+operator |= (const T_arg1& a1, const lambda<T_arg2>& a2)
+{ typedef lambda_operator<bitwise_assign<or_>, typename unwrap_reference<T_arg1>::type, T_arg2> operator_type;
+ return lambda<operator_type>(operator_type(a1,a2.value_)); }
+
+// Operators for lambda action bitwise_assign<xor_>. At least one of the arguments needs to be of type lamdba, hence the overloads.
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<bitwise_assign<xor_>, T_arg1, T_arg2> >
+operator ^= (const lambda<T_arg1>& a1, const lambda<T_arg2>& a2)
+{ typedef lambda_operator<bitwise_assign<xor_>, T_arg1, T_arg2> operator_type;
+ return lambda<operator_type>(operator_type(a1.value_,a2.value_)); }
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<bitwise_assign<xor_>, T_arg1, typename unwrap_reference<T_arg2>::type> >
+operator ^= (const lambda<T_arg1>& a1, const T_arg2& a2)
+{ typedef lambda_operator<bitwise_assign<xor_>, T_arg1, typename unwrap_reference<T_arg2>::type> operator_type;
+ return lambda<operator_type>(operator_type(a1.value_,a2)); }
+template <class T_arg1, class T_arg2>
+lambda<lambda_operator<bitwise_assign<xor_>, typename unwrap_reference<T_arg1>::type, T_arg2> >
+operator ^= (const T_arg1& a1, const lambda<T_arg2>& a2)
+{ typedef lambda_operator<bitwise_assign<xor_>, typename unwrap_reference<T_arg1>::type, T_arg2> operator_type;
+ return lambda<operator_type>(operator_type(a1,a2.value_)); }
+
+// Operator for lambda action unary_arithmetic<pre_increment>.
+template <class T_arg>
+lambda<lambda_operator_unary<unary_arithmetic<pre_increment>, T_arg> >
+operator ++ (const lambda<T_arg>& a)
+{ typedef lambda_operator_unary<unary_arithmetic<pre_increment>, T_arg> operator_type;
+ return lambda<operator_type>(operator_type(a.value_)); }
+
+// Operator for lambda action unary_arithmetic<pre_decrement>.
+template <class T_arg>
+lambda<lambda_operator_unary<unary_arithmetic<pre_decrement>, T_arg> >
+operator -- (const lambda<T_arg>& a)
+{ typedef lambda_operator_unary<unary_arithmetic<pre_decrement>, T_arg> operator_type;
+ return lambda<operator_type>(operator_type(a.value_)); }
+
+// Operator for lambda action unary_arithmetic<negate>.
+template <class T_arg>
+lambda<lambda_operator_unary<unary_arithmetic<negate>, T_arg> >
+operator - (const lambda<T_arg>& a)
+{ typedef lambda_operator_unary<unary_arithmetic<negate>, T_arg> operator_type;
+ return lambda<operator_type>(operator_type(a.value_)); }
+
+// Operator for lambda action unary_bitwise<not_>.
+template <class T_arg>
+lambda<lambda_operator_unary<unary_bitwise<not_>, T_arg> >
+operator ~ (const lambda<T_arg>& a)
+{ typedef lambda_operator_unary<unary_bitwise<not_>, T_arg> operator_type;
+ return lambda<operator_type>(operator_type(a.value_)); }
+
+// Operator for lambda action unary_logical<not_>.
+template <class T_arg>
+lambda<lambda_operator_unary<unary_logical<not_>, T_arg> >
+operator ! (const lambda<T_arg>& a)
+{ typedef lambda_operator_unary<unary_logical<not_>, T_arg> operator_type;
+ return lambda<operator_type>(operator_type(a.value_)); }
+
+// Operator for lambda action unary_other<address>.
+template <class T_arg>
+lambda<lambda_operator_unary<unary_other<address>, T_arg> >
+operator & (const lambda<T_arg>& a)
+{ typedef lambda_operator_unary<unary_other<address>, T_arg> operator_type;
+ return lambda<operator_type>(operator_type(a.value_)); }
+
+// Operator for lambda action unary_other<dereference>.
+template <class T_arg>
+lambda<lambda_operator_unary<unary_other<dereference>, T_arg> >
+operator * (const lambda<T_arg>& a)
+{ typedef lambda_operator_unary<unary_other<dereference>, T_arg> operator_type;
+ return lambda<operator_type>(operator_type(a.value_)); }
+
+// Creators for lambda action cast_<reinterpret_>.
+template <class T_type, class T_arg>
+lambda<lambda_operator_convert<cast_<reinterpret_>, T_type, typename unwrap_lambda_type<T_arg>::type> >
+reinterpret_cast_(const T_arg& a)
+{ typedef lambda_operator_convert<cast_<reinterpret_>, T_type, typename unwrap_lambda_type<T_arg>::type> operator_type;
+ return lambda<operator_type>(operator_type(unwrap_lambda_value(a))); }
+
+// Creators for lambda action cast_<static_>.
+template <class T_type, class T_arg>
+lambda<lambda_operator_convert<cast_<static_>, T_type, typename unwrap_lambda_type<T_arg>::type> >
+static_cast_(const T_arg& a)
+{ typedef lambda_operator_convert<cast_<static_>, T_type, typename unwrap_lambda_type<T_arg>::type> operator_type;
+ return lambda<operator_type>(operator_type(unwrap_lambda_value(a))); }
+
+// Creators for lambda action cast_<dynamic_>.
+template <class T_type, class T_arg>
+lambda<lambda_operator_convert<cast_<dynamic_>, T_type, typename unwrap_lambda_type<T_arg>::type> >
+dynamic_cast_(const T_arg& a)
+{ typedef lambda_operator_convert<cast_<dynamic_>, T_type, typename unwrap_lambda_type<T_arg>::type> operator_type;
+ return lambda<operator_type>(operator_type(unwrap_lambda_value(a))); }
+
+
+} /* namespace sigc */
+
+#endif /* _SIGC_LAMBDA_OPERATOR_HPP_ */
diff --git a/libs/sigc++2/sigc++/adaptors/lambda/select.h b/libs/sigc++2/sigc++/adaptors/lambda/select.h
new file mode 100644
index 0000000000..7cbf3eccfb
--- /dev/null
+++ b/libs/sigc++2/sigc++/adaptors/lambda/select.h
@@ -0,0 +1,346 @@
+// -*- c++ -*-
+/* Do not edit! -- generated file */
+#ifndef _SIGC_LAMBDA_SELECT_HPP_
+#define _SIGC_LAMBDA_SELECT_HPP_
+#include <sigc++/adaptors/lambda/base.h>
+
+namespace sigc {
+
+namespace internal {
+struct lambda_select1 : public lambda_base
+{
+ template <class T_arg1=void,class T_arg2=void,class T_arg3=void,class T_arg4=void,class T_arg5=void,class T_arg6=void,class T_arg7=void>
+ struct deduce_result_type
+ { typedef T_arg1 type; };
+ typedef void result_type; // no operator ()() overload
+
+ void operator ()() const; // not implemented
+ template <class T_arg1>
+ T_arg1 operator ()(T_arg1 _A_1) const { return _A_1; }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1>
+ //Does not work: T_arg1 sun_forte_workaround(T_arg1 _A_1) const { return operator()( _A_1 ); }
+ T_arg1 sun_forte_workaround(T_arg1 _A_1) const { return _A_1; }
+ #endif
+
+ template <class T_arg1,class T_arg2>
+ T_arg1 operator ()(T_arg1 _A_1,T_arg2 _A_2) const { return _A_1; }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2>
+ //Does not work: T_arg1 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2) const { return operator()( _A_1,_A_2 ); }
+ T_arg1 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2) const { return _A_1; }
+ #endif
+
+ template <class T_arg1,class T_arg2,class T_arg3>
+ T_arg1 operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3) const { return _A_1; }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3>
+ //Does not work: T_arg1 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3) const { return operator()( _A_1,_A_2,_A_3 ); }
+ T_arg1 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3) const { return _A_1; }
+ #endif
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ T_arg1 operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4) const { return _A_1; }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ //Does not work: T_arg1 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4) const { return operator()( _A_1,_A_2,_A_3,_A_4 ); }
+ T_arg1 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4) const { return _A_1; }
+ #endif
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ T_arg1 operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5) const { return _A_1; }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ //Does not work: T_arg1 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5) const { return operator()( _A_1,_A_2,_A_3,_A_4,_A_5 ); }
+ T_arg1 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5) const { return _A_1; }
+ #endif
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ T_arg1 operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6) const { return _A_1; }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ //Does not work: T_arg1 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6) const { return operator()( _A_1,_A_2,_A_3,_A_4,_A_5,_A_6 ); }
+ T_arg1 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6) const { return _A_1; }
+ #endif
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ T_arg1 operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6,T_arg7 _A_7) const { return _A_1; }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ //Does not work: T_arg1 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6,T_arg7 _A_7) const { return operator()( _A_1,_A_2,_A_3,_A_4,_A_5,_A_6,_A_7 ); }
+ T_arg1 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6,T_arg7 _A_7) const { return _A_1; }
+ #endif
+
+};
+
+struct lambda_select2 : public lambda_base
+{
+ template <class T_arg1=void,class T_arg2=void,class T_arg3=void,class T_arg4=void,class T_arg5=void,class T_arg6=void,class T_arg7=void>
+ struct deduce_result_type
+ { typedef T_arg2 type; };
+ typedef void result_type; // no operator ()() overload
+
+ void operator ()() const; // not implemented
+ template <class T_arg1,class T_arg2>
+ T_arg2 operator ()(T_arg1 _A_1,T_arg2 _A_2) const { return _A_2; }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2>
+ //Does not work: T_arg2 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2) const { return operator()( _A_1,_A_2 ); }
+ T_arg2 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2) const { return _A_2; }
+ #endif
+
+ template <class T_arg1,class T_arg2,class T_arg3>
+ T_arg2 operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3) const { return _A_2; }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3>
+ //Does not work: T_arg2 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3) const { return operator()( _A_1,_A_2,_A_3 ); }
+ T_arg2 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3) const { return _A_2; }
+ #endif
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ T_arg2 operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4) const { return _A_2; }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ //Does not work: T_arg2 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4) const { return operator()( _A_1,_A_2,_A_3,_A_4 ); }
+ T_arg2 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4) const { return _A_2; }
+ #endif
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ T_arg2 operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5) const { return _A_2; }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ //Does not work: T_arg2 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5) const { return operator()( _A_1,_A_2,_A_3,_A_4,_A_5 ); }
+ T_arg2 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5) const { return _A_2; }
+ #endif
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ T_arg2 operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6) const { return _A_2; }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ //Does not work: T_arg2 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6) const { return operator()( _A_1,_A_2,_A_3,_A_4,_A_5,_A_6 ); }
+ T_arg2 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6) const { return _A_2; }
+ #endif
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ T_arg2 operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6,T_arg7 _A_7) const { return _A_2; }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ //Does not work: T_arg2 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6,T_arg7 _A_7) const { return operator()( _A_1,_A_2,_A_3,_A_4,_A_5,_A_6,_A_7 ); }
+ T_arg2 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6,T_arg7 _A_7) const { return _A_2; }
+ #endif
+
+};
+
+struct lambda_select3 : public lambda_base
+{
+ template <class T_arg1=void,class T_arg2=void,class T_arg3=void,class T_arg4=void,class T_arg5=void,class T_arg6=void,class T_arg7=void>
+ struct deduce_result_type
+ { typedef T_arg3 type; };
+ typedef void result_type; // no operator ()() overload
+
+ void operator ()() const; // not implemented
+ template <class T_arg1,class T_arg2,class T_arg3>
+ T_arg3 operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3) const { return _A_3; }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3>
+ //Does not work: T_arg3 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3) const { return operator()( _A_1,_A_2,_A_3 ); }
+ T_arg3 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3) const { return _A_3; }
+ #endif
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ T_arg3 operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4) const { return _A_3; }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ //Does not work: T_arg3 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4) const { return operator()( _A_1,_A_2,_A_3,_A_4 ); }
+ T_arg3 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4) const { return _A_3; }
+ #endif
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ T_arg3 operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5) const { return _A_3; }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ //Does not work: T_arg3 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5) const { return operator()( _A_1,_A_2,_A_3,_A_4,_A_5 ); }
+ T_arg3 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5) const { return _A_3; }
+ #endif
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ T_arg3 operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6) const { return _A_3; }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ //Does not work: T_arg3 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6) const { return operator()( _A_1,_A_2,_A_3,_A_4,_A_5,_A_6 ); }
+ T_arg3 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6) const { return _A_3; }
+ #endif
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ T_arg3 operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6,T_arg7 _A_7) const { return _A_3; }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ //Does not work: T_arg3 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6,T_arg7 _A_7) const { return operator()( _A_1,_A_2,_A_3,_A_4,_A_5,_A_6,_A_7 ); }
+ T_arg3 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6,T_arg7 _A_7) const { return _A_3; }
+ #endif
+
+};
+
+struct lambda_select4 : public lambda_base
+{
+ template <class T_arg1=void,class T_arg2=void,class T_arg3=void,class T_arg4=void,class T_arg5=void,class T_arg6=void,class T_arg7=void>
+ struct deduce_result_type
+ { typedef T_arg4 type; };
+ typedef void result_type; // no operator ()() overload
+
+ void operator ()() const; // not implemented
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ T_arg4 operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4) const { return _A_4; }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ //Does not work: T_arg4 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4) const { return operator()( _A_1,_A_2,_A_3,_A_4 ); }
+ T_arg4 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4) const { return _A_4; }
+ #endif
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ T_arg4 operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5) const { return _A_4; }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ //Does not work: T_arg4 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5) const { return operator()( _A_1,_A_2,_A_3,_A_4,_A_5 ); }
+ T_arg4 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5) const { return _A_4; }
+ #endif
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ T_arg4 operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6) const { return _A_4; }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ //Does not work: T_arg4 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6) const { return operator()( _A_1,_A_2,_A_3,_A_4,_A_5,_A_6 ); }
+ T_arg4 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6) const { return _A_4; }
+ #endif
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ T_arg4 operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6,T_arg7 _A_7) const { return _A_4; }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ //Does not work: T_arg4 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6,T_arg7 _A_7) const { return operator()( _A_1,_A_2,_A_3,_A_4,_A_5,_A_6,_A_7 ); }
+ T_arg4 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6,T_arg7 _A_7) const { return _A_4; }
+ #endif
+
+};
+
+struct lambda_select5 : public lambda_base
+{
+ template <class T_arg1=void,class T_arg2=void,class T_arg3=void,class T_arg4=void,class T_arg5=void,class T_arg6=void,class T_arg7=void>
+ struct deduce_result_type
+ { typedef T_arg5 type; };
+ typedef void result_type; // no operator ()() overload
+
+ void operator ()() const; // not implemented
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ T_arg5 operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5) const { return _A_5; }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ //Does not work: T_arg5 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5) const { return operator()( _A_1,_A_2,_A_3,_A_4,_A_5 ); }
+ T_arg5 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5) const { return _A_5; }
+ #endif
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ T_arg5 operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6) const { return _A_5; }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ //Does not work: T_arg5 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6) const { return operator()( _A_1,_A_2,_A_3,_A_4,_A_5,_A_6 ); }
+ T_arg5 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6) const { return _A_5; }
+ #endif
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ T_arg5 operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6,T_arg7 _A_7) const { return _A_5; }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ //Does not work: T_arg5 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6,T_arg7 _A_7) const { return operator()( _A_1,_A_2,_A_3,_A_4,_A_5,_A_6,_A_7 ); }
+ T_arg5 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6,T_arg7 _A_7) const { return _A_5; }
+ #endif
+
+};
+
+struct lambda_select6 : public lambda_base
+{
+ template <class T_arg1=void,class T_arg2=void,class T_arg3=void,class T_arg4=void,class T_arg5=void,class T_arg6=void,class T_arg7=void>
+ struct deduce_result_type
+ { typedef T_arg6 type; };
+ typedef void result_type; // no operator ()() overload
+
+ void operator ()() const; // not implemented
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ T_arg6 operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6) const { return _A_6; }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ //Does not work: T_arg6 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6) const { return operator()( _A_1,_A_2,_A_3,_A_4,_A_5,_A_6 ); }
+ T_arg6 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6) const { return _A_6; }
+ #endif
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ T_arg6 operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6,T_arg7 _A_7) const { return _A_6; }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ //Does not work: T_arg6 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6,T_arg7 _A_7) const { return operator()( _A_1,_A_2,_A_3,_A_4,_A_5,_A_6,_A_7 ); }
+ T_arg6 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6,T_arg7 _A_7) const { return _A_6; }
+ #endif
+
+};
+
+struct lambda_select7 : public lambda_base
+{
+ template <class T_arg1=void,class T_arg2=void,class T_arg3=void,class T_arg4=void,class T_arg5=void,class T_arg6=void,class T_arg7=void>
+ struct deduce_result_type
+ { typedef T_arg7 type; };
+ typedef void result_type; // no operator ()() overload
+
+ void operator ()() const; // not implemented
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ T_arg7 operator ()(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6,T_arg7 _A_7) const { return _A_7; }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ //Does not work: T_arg7 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6,T_arg7 _A_7) const { return operator()( _A_1,_A_2,_A_3,_A_4,_A_5,_A_6,_A_7 ); }
+ T_arg7 sun_forte_workaround(T_arg1 _A_1,T_arg2 _A_2,T_arg3 _A_3,T_arg4 _A_4,T_arg5 _A_5,T_arg6 _A_6,T_arg7 _A_7) const { return _A_7; }
+ #endif
+
+};
+
+
+} /* namespace internal */
+
+extern SIGC_API const lambda<internal::lambda_select1> _1;
+extern SIGC_API const lambda<internal::lambda_select2> _2;
+extern SIGC_API const lambda<internal::lambda_select3> _3;
+extern SIGC_API const lambda<internal::lambda_select4> _4;
+extern SIGC_API const lambda<internal::lambda_select5> _5;
+extern SIGC_API const lambda<internal::lambda_select6> _6;
+extern SIGC_API const lambda<internal::lambda_select7> _7;
+
+
+} /* namespace sigc */
+
+#endif /* _SIGC_LAMBDA_SELECT_HPP_ */
diff --git a/libs/sigc++2/sigc++/adaptors/retype.h b/libs/sigc++2/sigc++/adaptors/retype.h
new file mode 100644
index 0000000000..502959d3cd
--- /dev/null
+++ b/libs/sigc++2/sigc++/adaptors/retype.h
@@ -0,0 +1,1247 @@
+// -*- c++ -*-
+/* Do not edit! -- generated file */
+#ifndef _SIGC_ADAPTORS_MACROS_RETYPEHM4_
+#define _SIGC_ADAPTORS_MACROS_RETYPEHM4_
+#include <sigc++/adaptors/adaptor_trait.h>
+#include <sigc++/functors/ptr_fun.h>
+#include <sigc++/functors/mem_fun.h>
+#include <sigc++/functors/slot.h>
+
+namespace sigc {
+
+/** @defgroup retype retype(), retype_return()
+ * sigc::retype() alters a sigc::pointer_functor, a sigc::mem_functor or a sigc::slot
+ * in that it makes C-style casts to the functor's parameter types
+ * of all parameters passed through operator()().
+ *
+ * Use this adaptor for inline conversion between numeric or other simple types.
+ * @par Example:
+ * @code
+ * void foo(int);
+ * sigc::retype(sigc::ptr_fun(&foo))(5.7F); // calls foo(5)
+ * @endcode
+ *
+ * The functor sigc::retype() returns can be passed into
+ * sigc::signal::connect() directly.
+ *
+ * @par Example:
+ * @code
+ * sigc::signal<void,float> some_signal;
+ * void foo(int);
+ * some_signal.connect(sigc::retype(sigc::ptr_fun(&foo)));
+ * @endcode
+ *
+ * This adaptor builds an exception in that it only works on sig::pointer_functor,
+ * sigc::mem_functor and sigc::slot because it needs sophisticated information about
+ * the parameter types that cannot be deduced from arbitrary functor types.
+ *
+ * sigc::retype_return() alters the return type of an arbitrary functor.
+ * Like in sigc::retype() a C-style cast is preformed. Usage sigc::retype_return() is
+ * not restricted to libsigc++ functor types but you need to
+ * specify the new return type as a template parameter.
+ *
+ * @par Example:
+ * @code
+ * float foo();
+ * std::cout << sigc::retype_return<int>(&foo)(); // converts foo's return value to an integer
+ * @endcode
+ *
+ * @ingroup adaptors
+ */
+
+/** Adaptor that performs C-style casts on the parameters passed on to the functor.
+ * Use the convenience function sigc::retype() to create an instance of retype_functor.
+ *
+ * The following template arguments are used:
+ * - @e T_functor Type of the functor to wrap.
+ * - @e T_type1 Type of @e T_functor's 1th argument.
+ * - @e T_type2 Type of @e T_functor's 2th argument.
+ * - @e T_type3 Type of @e T_functor's 3th argument.
+ * - @e T_type4 Type of @e T_functor's 4th argument.
+ * - @e T_type5 Type of @e T_functor's 5th argument.
+ * - @e T_type6 Type of @e T_functor's 6th argument.
+ * - @e T_type7 Type of @e T_functor's 7th argument.
+ *
+ * @ingroup retype
+ */
+template <class T_functor, class T_type1=nil,class T_type2=nil,class T_type3=nil,class T_type4=nil,class T_type5=nil,class T_type6=nil,class T_type7=nil>
+struct retype_functor
+ : public adapts<T_functor>
+{
+ typedef typename adapts<T_functor>::adaptor_type adaptor_type;
+
+ template <class T_arg1=void,class T_arg2=void,class T_arg3=void,class T_arg4=void,class T_arg5=void,class T_arg6=void,class T_arg7=void>
+ struct deduce_result_type
+ { typedef typename adaptor_type::template deduce_result_type<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass,typename type_trait<T_arg7>::pass>::type type; };
+ typedef typename adapts<T_functor>::result_type result_type;
+
+ result_type operator()();
+
+ template <class T_arg1>
+ typename deduce_result_type<T_arg1>::type
+ operator()(T_arg1 _A_a1)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_type1>::take>
+ ((T_type1)_A_a1);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1>
+ typename deduce_result_type<T_arg1>::type
+ sun_forte_workaround(T_arg1 _A_a1)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_type1>::take>
+ ((T_type1)_A_a1);
+ }
+ #endif
+
+ template <class T_arg1,class T_arg2>
+ typename deduce_result_type<T_arg1,T_arg2>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_type1>::take,typename type_trait<T_type2>::take>
+ ((T_type1)_A_a1,(T_type2)_A_a2);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2>
+ typename deduce_result_type<T_arg1,T_arg2>::type
+ sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_type1>::take,typename type_trait<T_type2>::take>
+ ((T_type1)_A_a1,(T_type2)_A_a2);
+ }
+ #endif
+
+ template <class T_arg1,class T_arg2,class T_arg3>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_type1>::take,typename type_trait<T_type2>::take,typename type_trait<T_type3>::take>
+ ((T_type1)_A_a1,(T_type2)_A_a2,(T_type3)_A_a3);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3>::type
+ sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_type1>::take,typename type_trait<T_type2>::take,typename type_trait<T_type3>::take>
+ ((T_type1)_A_a1,(T_type2)_A_a2,(T_type3)_A_a3);
+ }
+ #endif
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_type1>::take,typename type_trait<T_type2>::take,typename type_trait<T_type3>::take,typename type_trait<T_type4>::take>
+ ((T_type1)_A_a1,(T_type2)_A_a2,(T_type3)_A_a3,(T_type4)_A_a4);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4>::type
+ sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_type1>::take,typename type_trait<T_type2>::take,typename type_trait<T_type3>::take,typename type_trait<T_type4>::take>
+ ((T_type1)_A_a1,(T_type2)_A_a2,(T_type3)_A_a3,(T_type4)_A_a4);
+ }
+ #endif
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_type1>::take,typename type_trait<T_type2>::take,typename type_trait<T_type3>::take,typename type_trait<T_type4>::take,typename type_trait<T_type5>::take>
+ ((T_type1)_A_a1,(T_type2)_A_a2,(T_type3)_A_a3,(T_type4)_A_a4,(T_type5)_A_a5);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::type
+ sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_type1>::take,typename type_trait<T_type2>::take,typename type_trait<T_type3>::take,typename type_trait<T_type4>::take,typename type_trait<T_type5>::take>
+ ((T_type1)_A_a1,(T_type2)_A_a2,(T_type3)_A_a3,(T_type4)_A_a4,(T_type5)_A_a5);
+ }
+ #endif
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_type1>::take,typename type_trait<T_type2>::take,typename type_trait<T_type3>::take,typename type_trait<T_type4>::take,typename type_trait<T_type5>::take,typename type_trait<T_type6>::take>
+ ((T_type1)_A_a1,(T_type2)_A_a2,(T_type3)_A_a3,(T_type4)_A_a4,(T_type5)_A_a5,(T_type6)_A_a6);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::type
+ sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_type1>::take,typename type_trait<T_type2>::take,typename type_trait<T_type3>::take,typename type_trait<T_type4>::take,typename type_trait<T_type5>::take,typename type_trait<T_type6>::take>
+ ((T_type1)_A_a1,(T_type2)_A_a2,(T_type3)_A_a3,(T_type4)_A_a4,(T_type5)_A_a5,(T_type6)_A_a6);
+ }
+ #endif
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type
+ operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6,T_arg7 _A_a7)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_type1>::take,typename type_trait<T_type2>::take,typename type_trait<T_type3>::take,typename type_trait<T_type4>::take,typename type_trait<T_type5>::take,typename type_trait<T_type6>::take,typename type_trait<T_type7>::take>
+ ((T_type1)_A_a1,(T_type2)_A_a2,(T_type3)_A_a3,(T_type4)_A_a4,(T_type5)_A_a5,(T_type6)_A_a6,(T_type7)_A_a7);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ typename deduce_result_type<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::type
+ sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6,T_arg7 _A_a7)
+ { return this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_type1>::take,typename type_trait<T_type2>::take,typename type_trait<T_type3>::take,typename type_trait<T_type4>::take,typename type_trait<T_type5>::take,typename type_trait<T_type6>::take,typename type_trait<T_type7>::take>
+ ((T_type1)_A_a1,(T_type2)_A_a2,(T_type3)_A_a3,(T_type4)_A_a4,(T_type5)_A_a5,(T_type6)_A_a6,(T_type7)_A_a7);
+ }
+ #endif
+
+
+ /** Constructs a retype_functor object that performs C-style casts on the parameters passed on to the functor.
+ * @param _A_functor Functor to invoke from operator()().
+ */
+ explicit retype_functor(typename type_trait<T_functor>::take _A_functor)
+ : adapts<T_functor>(_A_functor)
+ {}
+};
+
+template <class T_functor, class T_type1,class T_type2,class T_type3,class T_type4,class T_type5,class T_type6,class T_type7>
+typename retype_functor<T_functor, T_type1,T_type2,T_type3,T_type4,T_type5,T_type6,T_type7>::result_type
+retype_functor<T_functor, T_type1,T_type2,T_type3,T_type4,T_type5,T_type6,T_type7>::operator()()
+ { return this->functor_(); }
+
+
+/** Performs a functor on each of the targets of a functor.
+ * The function overload for sigc::retype_functor performs a functor on the
+ * functor stored in the sigc::retype_functor object.
+ *
+ * @ingroup retype
+ */
+template <class T_action, class T_functor, class T_type1,class T_type2,class T_type3,class T_type4,class T_type5,class T_type6,class T_type7>
+void visit_each(const T_action& _A_action,
+ const retype_functor<T_functor, T_type1,T_type2,T_type3,T_type4,T_type5,T_type6,T_type7>& _A_target)
+{
+ visit_each(_A_action, _A_target.functor_);
+}
+
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::slot.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+inline retype_functor<slot<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7>, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7 >
+retype(const slot<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>& _A_functor)
+{ return retype_functor<slot<T_return, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7>, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7 >
+ (_A_functor); }
+
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::pointer_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return>
+inline retype_functor<pointer_functor0<T_return> >
+retype(const pointer_functor0<T_return>& _A_functor)
+{ return retype_functor<pointer_functor0<T_return> >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::pointer_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_arg1, class T_return>
+inline retype_functor<pointer_functor1<T_arg1, T_return>, T_arg1 >
+retype(const pointer_functor1<T_arg1, T_return>& _A_functor)
+{ return retype_functor<pointer_functor1<T_arg1, T_return>, T_arg1 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::pointer_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_arg1,class T_arg2, class T_return>
+inline retype_functor<pointer_functor2<T_arg1, T_arg2, T_return>, T_arg1,T_arg2 >
+retype(const pointer_functor2<T_arg1,T_arg2, T_return>& _A_functor)
+{ return retype_functor<pointer_functor2<T_arg1, T_arg2, T_return>, T_arg1,T_arg2 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::pointer_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_arg1,class T_arg2,class T_arg3, class T_return>
+inline retype_functor<pointer_functor3<T_arg1, T_arg2, T_arg3, T_return>, T_arg1,T_arg2,T_arg3 >
+retype(const pointer_functor3<T_arg1,T_arg2,T_arg3, T_return>& _A_functor)
+{ return retype_functor<pointer_functor3<T_arg1, T_arg2, T_arg3, T_return>, T_arg1,T_arg2,T_arg3 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::pointer_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4, class T_return>
+inline retype_functor<pointer_functor4<T_arg1, T_arg2, T_arg3, T_arg4, T_return>, T_arg1,T_arg2,T_arg3,T_arg4 >
+retype(const pointer_functor4<T_arg1,T_arg2,T_arg3,T_arg4, T_return>& _A_functor)
+{ return retype_functor<pointer_functor4<T_arg1, T_arg2, T_arg3, T_arg4, T_return>, T_arg1,T_arg2,T_arg3,T_arg4 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::pointer_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5, class T_return>
+inline retype_functor<pointer_functor5<T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_return>, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5 >
+retype(const pointer_functor5<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5, T_return>& _A_functor)
+{ return retype_functor<pointer_functor5<T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_return>, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::pointer_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6, class T_return>
+inline retype_functor<pointer_functor6<T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_return>, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6 >
+retype(const pointer_functor6<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6, T_return>& _A_functor)
+{ return retype_functor<pointer_functor6<T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_return>, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::pointer_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7, class T_return>
+inline retype_functor<pointer_functor7<T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7, T_return>, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7 >
+retype(const pointer_functor7<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7, T_return>& _A_functor)
+{ return retype_functor<pointer_functor7<T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7, T_return>, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7 >
+ (_A_functor); }
+
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj>
+inline retype_functor<mem_functor0<T_return, T_obj> >
+retype(const mem_functor0<T_return, T_obj>& _A_functor)
+{ return retype_functor<mem_functor0<T_return, T_obj> >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj, class T_arg1>
+inline retype_functor<mem_functor1<T_return, T_obj, T_arg1>, T_arg1 >
+retype(const mem_functor1<T_return, T_obj, T_arg1>& _A_functor)
+{ return retype_functor<mem_functor1<T_return, T_obj, T_arg1>, T_arg1 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2>
+inline retype_functor<mem_functor2<T_return, T_obj, T_arg1, T_arg2>, T_arg1,T_arg2 >
+retype(const mem_functor2<T_return, T_obj, T_arg1,T_arg2>& _A_functor)
+{ return retype_functor<mem_functor2<T_return, T_obj, T_arg1, T_arg2>, T_arg1,T_arg2 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3>
+inline retype_functor<mem_functor3<T_return, T_obj, T_arg1, T_arg2, T_arg3>, T_arg1,T_arg2,T_arg3 >
+retype(const mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>& _A_functor)
+{ return retype_functor<mem_functor3<T_return, T_obj, T_arg1, T_arg2, T_arg3>, T_arg1,T_arg2,T_arg3 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+inline retype_functor<mem_functor4<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4>, T_arg1,T_arg2,T_arg3,T_arg4 >
+retype(const mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>& _A_functor)
+{ return retype_functor<mem_functor4<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4>, T_arg1,T_arg2,T_arg3,T_arg4 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+inline retype_functor<mem_functor5<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5>, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5 >
+retype(const mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>& _A_functor)
+{ return retype_functor<mem_functor5<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5>, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+inline retype_functor<mem_functor6<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6>, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6 >
+retype(const mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>& _A_functor)
+{ return retype_functor<mem_functor6<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6>, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+inline retype_functor<mem_functor7<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7>, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7 >
+retype(const mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>& _A_functor)
+{ return retype_functor<mem_functor7<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7>, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::const_mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj>
+inline retype_functor<const_mem_functor0<T_return, T_obj> >
+retype(const const_mem_functor0<T_return, T_obj>& _A_functor)
+{ return retype_functor<const_mem_functor0<T_return, T_obj> >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::const_mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj, class T_arg1>
+inline retype_functor<const_mem_functor1<T_return, T_obj, T_arg1>, T_arg1 >
+retype(const const_mem_functor1<T_return, T_obj, T_arg1>& _A_functor)
+{ return retype_functor<const_mem_functor1<T_return, T_obj, T_arg1>, T_arg1 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::const_mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2>
+inline retype_functor<const_mem_functor2<T_return, T_obj, T_arg1, T_arg2>, T_arg1,T_arg2 >
+retype(const const_mem_functor2<T_return, T_obj, T_arg1,T_arg2>& _A_functor)
+{ return retype_functor<const_mem_functor2<T_return, T_obj, T_arg1, T_arg2>, T_arg1,T_arg2 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::const_mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3>
+inline retype_functor<const_mem_functor3<T_return, T_obj, T_arg1, T_arg2, T_arg3>, T_arg1,T_arg2,T_arg3 >
+retype(const const_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>& _A_functor)
+{ return retype_functor<const_mem_functor3<T_return, T_obj, T_arg1, T_arg2, T_arg3>, T_arg1,T_arg2,T_arg3 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::const_mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+inline retype_functor<const_mem_functor4<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4>, T_arg1,T_arg2,T_arg3,T_arg4 >
+retype(const const_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>& _A_functor)
+{ return retype_functor<const_mem_functor4<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4>, T_arg1,T_arg2,T_arg3,T_arg4 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::const_mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+inline retype_functor<const_mem_functor5<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5>, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5 >
+retype(const const_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>& _A_functor)
+{ return retype_functor<const_mem_functor5<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5>, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::const_mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+inline retype_functor<const_mem_functor6<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6>, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6 >
+retype(const const_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>& _A_functor)
+{ return retype_functor<const_mem_functor6<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6>, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::const_mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+inline retype_functor<const_mem_functor7<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7>, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7 >
+retype(const const_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>& _A_functor)
+{ return retype_functor<const_mem_functor7<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7>, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::volatile_mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj>
+inline retype_functor<volatile_mem_functor0<T_return, T_obj> >
+retype(const volatile_mem_functor0<T_return, T_obj>& _A_functor)
+{ return retype_functor<volatile_mem_functor0<T_return, T_obj> >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::volatile_mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj, class T_arg1>
+inline retype_functor<volatile_mem_functor1<T_return, T_obj, T_arg1>, T_arg1 >
+retype(const volatile_mem_functor1<T_return, T_obj, T_arg1>& _A_functor)
+{ return retype_functor<volatile_mem_functor1<T_return, T_obj, T_arg1>, T_arg1 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::volatile_mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2>
+inline retype_functor<volatile_mem_functor2<T_return, T_obj, T_arg1, T_arg2>, T_arg1,T_arg2 >
+retype(const volatile_mem_functor2<T_return, T_obj, T_arg1,T_arg2>& _A_functor)
+{ return retype_functor<volatile_mem_functor2<T_return, T_obj, T_arg1, T_arg2>, T_arg1,T_arg2 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::volatile_mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3>
+inline retype_functor<volatile_mem_functor3<T_return, T_obj, T_arg1, T_arg2, T_arg3>, T_arg1,T_arg2,T_arg3 >
+retype(const volatile_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>& _A_functor)
+{ return retype_functor<volatile_mem_functor3<T_return, T_obj, T_arg1, T_arg2, T_arg3>, T_arg1,T_arg2,T_arg3 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::volatile_mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+inline retype_functor<volatile_mem_functor4<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4>, T_arg1,T_arg2,T_arg3,T_arg4 >
+retype(const volatile_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>& _A_functor)
+{ return retype_functor<volatile_mem_functor4<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4>, T_arg1,T_arg2,T_arg3,T_arg4 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::volatile_mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+inline retype_functor<volatile_mem_functor5<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5>, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5 >
+retype(const volatile_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>& _A_functor)
+{ return retype_functor<volatile_mem_functor5<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5>, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::volatile_mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+inline retype_functor<volatile_mem_functor6<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6>, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6 >
+retype(const volatile_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>& _A_functor)
+{ return retype_functor<volatile_mem_functor6<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6>, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::volatile_mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+inline retype_functor<volatile_mem_functor7<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7>, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7 >
+retype(const volatile_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>& _A_functor)
+{ return retype_functor<volatile_mem_functor7<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7>, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::const_volatile_mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj>
+inline retype_functor<const_volatile_mem_functor0<T_return, T_obj> >
+retype(const const_volatile_mem_functor0<T_return, T_obj>& _A_functor)
+{ return retype_functor<const_volatile_mem_functor0<T_return, T_obj> >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::const_volatile_mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj, class T_arg1>
+inline retype_functor<const_volatile_mem_functor1<T_return, T_obj, T_arg1>, T_arg1 >
+retype(const const_volatile_mem_functor1<T_return, T_obj, T_arg1>& _A_functor)
+{ return retype_functor<const_volatile_mem_functor1<T_return, T_obj, T_arg1>, T_arg1 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::const_volatile_mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2>
+inline retype_functor<const_volatile_mem_functor2<T_return, T_obj, T_arg1, T_arg2>, T_arg1,T_arg2 >
+retype(const const_volatile_mem_functor2<T_return, T_obj, T_arg1,T_arg2>& _A_functor)
+{ return retype_functor<const_volatile_mem_functor2<T_return, T_obj, T_arg1, T_arg2>, T_arg1,T_arg2 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::const_volatile_mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3>
+inline retype_functor<const_volatile_mem_functor3<T_return, T_obj, T_arg1, T_arg2, T_arg3>, T_arg1,T_arg2,T_arg3 >
+retype(const const_volatile_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>& _A_functor)
+{ return retype_functor<const_volatile_mem_functor3<T_return, T_obj, T_arg1, T_arg2, T_arg3>, T_arg1,T_arg2,T_arg3 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::const_volatile_mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+inline retype_functor<const_volatile_mem_functor4<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4>, T_arg1,T_arg2,T_arg3,T_arg4 >
+retype(const const_volatile_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>& _A_functor)
+{ return retype_functor<const_volatile_mem_functor4<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4>, T_arg1,T_arg2,T_arg3,T_arg4 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::const_volatile_mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+inline retype_functor<const_volatile_mem_functor5<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5>, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5 >
+retype(const const_volatile_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>& _A_functor)
+{ return retype_functor<const_volatile_mem_functor5<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5>, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::const_volatile_mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+inline retype_functor<const_volatile_mem_functor6<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6>, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6 >
+retype(const const_volatile_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>& _A_functor)
+{ return retype_functor<const_volatile_mem_functor6<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6>, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::const_volatile_mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+inline retype_functor<const_volatile_mem_functor7<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7>, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7 >
+retype(const const_volatile_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>& _A_functor)
+{ return retype_functor<const_volatile_mem_functor7<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7>, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::bound_mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj>
+inline retype_functor<bound_mem_functor0<T_return, T_obj> >
+retype(const bound_mem_functor0<T_return, T_obj>& _A_functor)
+{ return retype_functor<bound_mem_functor0<T_return, T_obj> >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::bound_mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj, class T_arg1>
+inline retype_functor<bound_mem_functor1<T_return, T_obj, T_arg1>, T_arg1 >
+retype(const bound_mem_functor1<T_return, T_obj, T_arg1>& _A_functor)
+{ return retype_functor<bound_mem_functor1<T_return, T_obj, T_arg1>, T_arg1 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::bound_mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2>
+inline retype_functor<bound_mem_functor2<T_return, T_obj, T_arg1, T_arg2>, T_arg1,T_arg2 >
+retype(const bound_mem_functor2<T_return, T_obj, T_arg1,T_arg2>& _A_functor)
+{ return retype_functor<bound_mem_functor2<T_return, T_obj, T_arg1, T_arg2>, T_arg1,T_arg2 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::bound_mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3>
+inline retype_functor<bound_mem_functor3<T_return, T_obj, T_arg1, T_arg2, T_arg3>, T_arg1,T_arg2,T_arg3 >
+retype(const bound_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>& _A_functor)
+{ return retype_functor<bound_mem_functor3<T_return, T_obj, T_arg1, T_arg2, T_arg3>, T_arg1,T_arg2,T_arg3 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::bound_mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+inline retype_functor<bound_mem_functor4<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4>, T_arg1,T_arg2,T_arg3,T_arg4 >
+retype(const bound_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>& _A_functor)
+{ return retype_functor<bound_mem_functor4<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4>, T_arg1,T_arg2,T_arg3,T_arg4 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::bound_mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+inline retype_functor<bound_mem_functor5<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5>, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5 >
+retype(const bound_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>& _A_functor)
+{ return retype_functor<bound_mem_functor5<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5>, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::bound_mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+inline retype_functor<bound_mem_functor6<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6>, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6 >
+retype(const bound_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>& _A_functor)
+{ return retype_functor<bound_mem_functor6<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6>, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::bound_mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+inline retype_functor<bound_mem_functor7<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7>, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7 >
+retype(const bound_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>& _A_functor)
+{ return retype_functor<bound_mem_functor7<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7>, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::bound_const_mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj>
+inline retype_functor<bound_const_mem_functor0<T_return, T_obj> >
+retype(const bound_const_mem_functor0<T_return, T_obj>& _A_functor)
+{ return retype_functor<bound_const_mem_functor0<T_return, T_obj> >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::bound_const_mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj, class T_arg1>
+inline retype_functor<bound_const_mem_functor1<T_return, T_obj, T_arg1>, T_arg1 >
+retype(const bound_const_mem_functor1<T_return, T_obj, T_arg1>& _A_functor)
+{ return retype_functor<bound_const_mem_functor1<T_return, T_obj, T_arg1>, T_arg1 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::bound_const_mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2>
+inline retype_functor<bound_const_mem_functor2<T_return, T_obj, T_arg1, T_arg2>, T_arg1,T_arg2 >
+retype(const bound_const_mem_functor2<T_return, T_obj, T_arg1,T_arg2>& _A_functor)
+{ return retype_functor<bound_const_mem_functor2<T_return, T_obj, T_arg1, T_arg2>, T_arg1,T_arg2 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::bound_const_mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3>
+inline retype_functor<bound_const_mem_functor3<T_return, T_obj, T_arg1, T_arg2, T_arg3>, T_arg1,T_arg2,T_arg3 >
+retype(const bound_const_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>& _A_functor)
+{ return retype_functor<bound_const_mem_functor3<T_return, T_obj, T_arg1, T_arg2, T_arg3>, T_arg1,T_arg2,T_arg3 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::bound_const_mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+inline retype_functor<bound_const_mem_functor4<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4>, T_arg1,T_arg2,T_arg3,T_arg4 >
+retype(const bound_const_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>& _A_functor)
+{ return retype_functor<bound_const_mem_functor4<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4>, T_arg1,T_arg2,T_arg3,T_arg4 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::bound_const_mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+inline retype_functor<bound_const_mem_functor5<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5>, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5 >
+retype(const bound_const_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>& _A_functor)
+{ return retype_functor<bound_const_mem_functor5<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5>, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::bound_const_mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+inline retype_functor<bound_const_mem_functor6<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6>, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6 >
+retype(const bound_const_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>& _A_functor)
+{ return retype_functor<bound_const_mem_functor6<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6>, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::bound_const_mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+inline retype_functor<bound_const_mem_functor7<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7>, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7 >
+retype(const bound_const_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>& _A_functor)
+{ return retype_functor<bound_const_mem_functor7<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7>, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::bound_volatile_mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj>
+inline retype_functor<bound_volatile_mem_functor0<T_return, T_obj> >
+retype(const bound_volatile_mem_functor0<T_return, T_obj>& _A_functor)
+{ return retype_functor<bound_volatile_mem_functor0<T_return, T_obj> >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::bound_volatile_mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj, class T_arg1>
+inline retype_functor<bound_volatile_mem_functor1<T_return, T_obj, T_arg1>, T_arg1 >
+retype(const bound_volatile_mem_functor1<T_return, T_obj, T_arg1>& _A_functor)
+{ return retype_functor<bound_volatile_mem_functor1<T_return, T_obj, T_arg1>, T_arg1 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::bound_volatile_mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2>
+inline retype_functor<bound_volatile_mem_functor2<T_return, T_obj, T_arg1, T_arg2>, T_arg1,T_arg2 >
+retype(const bound_volatile_mem_functor2<T_return, T_obj, T_arg1,T_arg2>& _A_functor)
+{ return retype_functor<bound_volatile_mem_functor2<T_return, T_obj, T_arg1, T_arg2>, T_arg1,T_arg2 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::bound_volatile_mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3>
+inline retype_functor<bound_volatile_mem_functor3<T_return, T_obj, T_arg1, T_arg2, T_arg3>, T_arg1,T_arg2,T_arg3 >
+retype(const bound_volatile_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>& _A_functor)
+{ return retype_functor<bound_volatile_mem_functor3<T_return, T_obj, T_arg1, T_arg2, T_arg3>, T_arg1,T_arg2,T_arg3 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::bound_volatile_mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+inline retype_functor<bound_volatile_mem_functor4<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4>, T_arg1,T_arg2,T_arg3,T_arg4 >
+retype(const bound_volatile_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>& _A_functor)
+{ return retype_functor<bound_volatile_mem_functor4<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4>, T_arg1,T_arg2,T_arg3,T_arg4 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::bound_volatile_mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+inline retype_functor<bound_volatile_mem_functor5<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5>, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5 >
+retype(const bound_volatile_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>& _A_functor)
+{ return retype_functor<bound_volatile_mem_functor5<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5>, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::bound_volatile_mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+inline retype_functor<bound_volatile_mem_functor6<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6>, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6 >
+retype(const bound_volatile_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>& _A_functor)
+{ return retype_functor<bound_volatile_mem_functor6<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6>, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::bound_volatile_mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+inline retype_functor<bound_volatile_mem_functor7<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7>, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7 >
+retype(const bound_volatile_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>& _A_functor)
+{ return retype_functor<bound_volatile_mem_functor7<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7>, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::bound_const_volatile_mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj>
+inline retype_functor<bound_const_volatile_mem_functor0<T_return, T_obj> >
+retype(const bound_const_volatile_mem_functor0<T_return, T_obj>& _A_functor)
+{ return retype_functor<bound_const_volatile_mem_functor0<T_return, T_obj> >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::bound_const_volatile_mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj, class T_arg1>
+inline retype_functor<bound_const_volatile_mem_functor1<T_return, T_obj, T_arg1>, T_arg1 >
+retype(const bound_const_volatile_mem_functor1<T_return, T_obj, T_arg1>& _A_functor)
+{ return retype_functor<bound_const_volatile_mem_functor1<T_return, T_obj, T_arg1>, T_arg1 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::bound_const_volatile_mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2>
+inline retype_functor<bound_const_volatile_mem_functor2<T_return, T_obj, T_arg1, T_arg2>, T_arg1,T_arg2 >
+retype(const bound_const_volatile_mem_functor2<T_return, T_obj, T_arg1,T_arg2>& _A_functor)
+{ return retype_functor<bound_const_volatile_mem_functor2<T_return, T_obj, T_arg1, T_arg2>, T_arg1,T_arg2 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::bound_const_volatile_mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3>
+inline retype_functor<bound_const_volatile_mem_functor3<T_return, T_obj, T_arg1, T_arg2, T_arg3>, T_arg1,T_arg2,T_arg3 >
+retype(const bound_const_volatile_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>& _A_functor)
+{ return retype_functor<bound_const_volatile_mem_functor3<T_return, T_obj, T_arg1, T_arg2, T_arg3>, T_arg1,T_arg2,T_arg3 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::bound_const_volatile_mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+inline retype_functor<bound_const_volatile_mem_functor4<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4>, T_arg1,T_arg2,T_arg3,T_arg4 >
+retype(const bound_const_volatile_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>& _A_functor)
+{ return retype_functor<bound_const_volatile_mem_functor4<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4>, T_arg1,T_arg2,T_arg3,T_arg4 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::bound_const_volatile_mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+inline retype_functor<bound_const_volatile_mem_functor5<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5>, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5 >
+retype(const bound_const_volatile_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>& _A_functor)
+{ return retype_functor<bound_const_volatile_mem_functor5<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5>, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::bound_const_volatile_mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+inline retype_functor<bound_const_volatile_mem_functor6<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6>, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6 >
+retype(const bound_const_volatile_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>& _A_functor)
+{ return retype_functor<bound_const_volatile_mem_functor6<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6>, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6 >
+ (_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_functor which performs C-style casts on the parameters passed on to the functor.
+ * This function template specialization works on sigc::bound_const_volatile_mem_functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing C-style casts on the paramters passed on.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+inline retype_functor<bound_const_volatile_mem_functor7<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7>, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7 >
+retype(const bound_const_volatile_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>& _A_functor)
+{ return retype_functor<bound_const_volatile_mem_functor7<T_return, T_obj, T_arg1, T_arg2, T_arg3, T_arg4, T_arg5, T_arg6, T_arg7>, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7 >
+ (_A_functor); }
+
+
+} /* namespace sigc */
+#endif /* _SIGC_ADAPTORS_MACROS_RETYPEHM4_ */
diff --git a/libs/sigc++2/sigc++/adaptors/retype_return.h b/libs/sigc++2/sigc++/adaptors/retype_return.h
new file mode 100644
index 0000000000..ea413a0b30
--- /dev/null
+++ b/libs/sigc++2/sigc++/adaptors/retype_return.h
@@ -0,0 +1,308 @@
+// -*- c++ -*-
+/* Do not edit! -- generated file */
+#ifndef _SIGC_ADAPTORS_MACROS_RETYPE_RETURNHM4_
+#define _SIGC_ADAPTORS_MACROS_RETYPE_RETURNHM4_
+#include <sigc++/adaptors/adaptor_trait.h>
+
+namespace sigc {
+
+/** Adaptor that perform a C-style cast on the return value of a functor.
+ * Use the convenience function sigc::retype_return() to create an instance of retype_return_functor.
+ *
+ * The following template arguments are used:
+ * - @e T_return Target type of the C-style cast.
+ * - @e T_functor Type of the functor to wrap.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_functor>
+struct retype_return_functor : public adapts<T_functor>
+{
+ template <class T_arg1=void,class T_arg2=void,class T_arg3=void,class T_arg4=void,class T_arg5=void,class T_arg6=void,class T_arg7=void>
+ struct deduce_result_type
+ { typedef T_return type; };
+ typedef T_return result_type;
+
+ T_return operator()();
+
+ template <class T_arg1>
+ inline T_return operator()(T_arg1 _A_a1)
+ { return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass>
+ (_A_a1));
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1>
+ inline T_return sun_forte_workaround(T_arg1 _A_a1)
+ { return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass>
+ (_A_a1));
+ }
+ #endif
+
+ template <class T_arg1,class T_arg2>
+ inline T_return operator()(T_arg1 _A_a1,T_arg2 _A_a2)
+ { return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass>
+ (_A_a1,_A_a2));
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2>
+ inline T_return sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2)
+ { return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass>
+ (_A_a1,_A_a2));
+ }
+ #endif
+
+ template <class T_arg1,class T_arg2,class T_arg3>
+ inline T_return operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3)
+ { return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass>
+ (_A_a1,_A_a2,_A_a3));
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3>
+ inline T_return sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3)
+ { return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass>
+ (_A_a1,_A_a2,_A_a3));
+ }
+ #endif
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ inline T_return operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4)
+ { return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass>
+ (_A_a1,_A_a2,_A_a3,_A_a4));
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ inline T_return sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4)
+ { return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass>
+ (_A_a1,_A_a2,_A_a3,_A_a4));
+ }
+ #endif
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ inline T_return operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5)
+ { return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass>
+ (_A_a1,_A_a2,_A_a3,_A_a4,_A_a5));
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ inline T_return sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5)
+ { return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass>
+ (_A_a1,_A_a2,_A_a3,_A_a4,_A_a5));
+ }
+ #endif
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ inline T_return operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6)
+ { return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass>
+ (_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6));
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ inline T_return sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6)
+ { return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass>
+ (_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6));
+ }
+ #endif
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ inline T_return operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6,T_arg7 _A_a7)
+ { return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass,typename type_trait<T_arg7>::pass>
+ (_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7));
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ inline T_return sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6,T_arg7 _A_a7)
+ { return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass,typename type_trait<T_arg7>::pass>
+ (_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7));
+ }
+ #endif
+
+ retype_return_functor() {}
+
+ /** Constructs a retype_return_functor object that perform a C-style cast on the return value of the passed functor.
+ * @param _A_functor Functor to invoke from operator()().
+ */
+ explicit retype_return_functor(typename type_trait<T_functor>::take _A_functor)
+ : adapts<T_functor>(_A_functor)
+ {}
+};
+
+template <class T_return, class T_functor>
+T_return retype_return_functor<T_return, T_functor>::operator()()
+ { return T_return(this->functor_()); }
+
+
+/** Adaptor that perform a C-style cast on the return value of a functor.
+ * This template specialization is for a void return. It drops the return value of the functor it invokes.
+ * Use the convenience function sigc::hide_return() to create an instance of sigc::retype_return_functor<void>.
+ *
+ * @ingroup retype
+ */
+/* The void specialization needed because of explicit cast to T_return.
+ */
+template <class T_functor>
+struct retype_return_functor<void, T_functor> : public adapts<T_functor>
+{
+ template <class T_arg1=void,class T_arg2=void,class T_arg3=void,class T_arg4=void,class T_arg5=void,class T_arg6=void,class T_arg7=void>
+ struct deduce_result_type
+ { typedef void type; };
+ typedef void result_type;
+
+ void operator()();
+
+ template <class T_arg1>
+ inline void operator()(T_arg1 _A_a1)
+ { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass>
+ (_A_a1);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1>
+ inline void sun_forte_workaround(T_arg1 _A_a1)
+ { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass>
+ (_A_a1);
+ }
+ #endif
+
+ template <class T_arg1,class T_arg2>
+ inline void operator()(T_arg1 _A_a1,T_arg2 _A_a2)
+ { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass>
+ (_A_a1,_A_a2);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2>
+ inline void sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2)
+ { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass>
+ (_A_a1,_A_a2);
+ }
+ #endif
+
+ template <class T_arg1,class T_arg2,class T_arg3>
+ inline void operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3)
+ { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass>
+ (_A_a1,_A_a2,_A_a3);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3>
+ inline void sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3)
+ { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass>
+ (_A_a1,_A_a2,_A_a3);
+ }
+ #endif
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ inline void operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4)
+ { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass>
+ (_A_a1,_A_a2,_A_a3,_A_a4);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ inline void sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4)
+ { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass>
+ (_A_a1,_A_a2,_A_a3,_A_a4);
+ }
+ #endif
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ inline void operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5)
+ { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass>
+ (_A_a1,_A_a2,_A_a3,_A_a4,_A_a5);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ inline void sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5)
+ { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass>
+ (_A_a1,_A_a2,_A_a3,_A_a4,_A_a5);
+ }
+ #endif
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ inline void operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6)
+ { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass>
+ (_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ inline void sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6)
+ { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass>
+ (_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6);
+ }
+ #endif
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ inline void operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6,T_arg7 _A_a7)
+ { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass,typename type_trait<T_arg7>::pass>
+ (_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7);
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ inline void sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6,T_arg7 _A_a7)
+ { this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::pass,typename type_trait<T_arg2>::pass,typename type_trait<T_arg3>::pass,typename type_trait<T_arg4>::pass,typename type_trait<T_arg5>::pass,typename type_trait<T_arg6>::pass,typename type_trait<T_arg7>::pass>
+ (_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7);
+ }
+ #endif
+
+ retype_return_functor() {}
+ retype_return_functor(typename type_trait<T_functor>::take _A_functor)
+ : adapts<T_functor>(_A_functor)
+ {}
+};
+
+template <class T_functor>
+void retype_return_functor<void, T_functor>::operator()()
+ { this->functor_(); }
+
+
+/** Performs a functor on each of the targets of a functor.
+ * The function overload for sigc::retype_return_functor performs a functor on the
+ * functor stored in the sigc::retype_return_functor object.
+ *
+ * @ingroup retype
+ */
+template <class T_action, class T_return, class T_functor>
+void visit_each(const T_action& _A_action,
+ const retype_return_functor<T_return, T_functor>& _A_target)
+{
+ visit_each(_A_action, _A_target.functor_);
+}
+
+
+/** Creates an adaptor of type sigc::retype_return_functor which performs a C-style cast on the return value of the passed functor.
+ * The template argument @e T_return specifies the target type of the cast.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor performing a C-style casts on the return value.
+ *
+ * @ingroup retype
+ */
+template <class T_return, class T_functor>
+inline retype_return_functor<T_return, T_functor>
+retype_return(const T_functor& _A_functor)
+ { return retype_return_functor<T_return, T_functor>(_A_functor); }
+
+/** Creates an adaptor of type sigc::retype_return_functor which drops the return value of the passed functor.
+ *
+ * @param _A_functor Functor that should be wrapped.
+ * @return Adaptor that executes @e _A_functor dropping its return value.
+ *
+ * @ingroup hide
+ */
+template <class T_functor>
+inline retype_return_functor<void, T_functor>
+hide_return(const T_functor& _A_functor)
+ { return retype_return_functor<void, T_functor>(_A_functor); }
+
+} /* namespace sigc */
+#endif /* _SIGC_ADAPTORS_MACROS_RETYPE_RETURNHM4_ */
diff --git a/libs/sigc++2/sigc++/bind.h b/libs/sigc++2/sigc++/bind.h
new file mode 100644
index 0000000000..bebf08b58b
--- /dev/null
+++ b/libs/sigc++2/sigc++/bind.h
@@ -0,0 +1,65 @@
+/*
+ * Copyright 2002, The libsigc++ Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+#ifndef _SIGC_BIND_HPP_
+#define _SIGC_BIND_HPP_
+
+#include <sigc++/adaptors/bind.h>
+
+#ifndef LIBSIGC_DISABLE_DEPRECATED
+
+namespace SigC {
+
+template <class T_bound1, class T_functor>
+inline ::sigc::bind_functor<-1, T_functor,
+ typename ::sigc::unwrap_reference<T_bound1>::type>
+bind(const T_functor& _A_functor, T_bound1 _A_b1)
+{ return ::sigc::bind_functor<-1, T_functor,
+ typename ::sigc::unwrap_reference<T_bound1>::type>
+ (_A_functor, _A_b1);
+}
+
+template <class T_bound1, class T_bound2, class T_functor>
+inline ::sigc::bind_functor<-1, T_functor,
+ typename ::sigc::unwrap_reference<T_bound1>::type,
+ typename ::sigc::unwrap_reference<T_bound2>::type>
+bind(const T_functor& _A_functor, T_bound1 _A_b1, T_bound2 _A_b2)
+{ return ::sigc::bind_functor<-1, T_functor,
+ typename ::sigc::unwrap_reference<T_bound1>::type,
+ typename ::sigc::unwrap_reference<T_bound2>::type>
+ (_A_functor, _A_b1, _A_b2);
+}
+
+template <class T_bound1, class T_bound2, class T_bound3, class T_functor>
+inline ::sigc::bind_functor<-1, T_functor,
+ typename ::sigc::unwrap_reference<T_bound1>::type,
+ typename ::sigc::unwrap_reference<T_bound2>::type,
+ typename ::sigc::unwrap_reference<T_bound3>::type>
+bind(const T_functor& _A_functor, T_bound1 _A_b1, T_bound2 _A_b2,T_bound3 _A_b3)
+{ return ::sigc::bind_functor<-1, T_functor,
+ typename ::sigc::unwrap_reference<T_bound1>::type,
+ typename ::sigc::unwrap_reference<T_bound2>::type,
+ typename ::sigc::unwrap_reference<T_bound3>::type>
+ (_A_functor, _A_b1, _A_b2, _A_b3);
+}
+
+}
+
+#endif /* LIBSIGC_DISABLE_DEPRECATED */
+
+#endif /* _SIGC_BIND_HPP_ */
diff --git a/libs/sigc++2/sigc++/bind_return.h b/libs/sigc++2/sigc++/bind_return.h
new file mode 100644
index 0000000000..a0796cf2c3
--- /dev/null
+++ b/libs/sigc++2/sigc++/bind_return.h
@@ -0,0 +1,34 @@
+/*
+ * Copyright 2002, The libsigc++ Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+#ifndef _SIGC_BIND_RETURN_HPP_
+#define _SIGC_BIND_RETURN_HPP_
+
+#include <sigc++/adaptors/bind_return.h>
+
+#ifndef LIBSIGC_DISABLE_DEPRECATED
+
+namespace SigC {
+
+using ::sigc::bind_return;
+
+}
+
+#endif /* LIBSIGC_DISABLE_DEPRECATED */
+
+#endif /* _SIGC_BIND_RETURN_HPP_ */
diff --git a/libs/sigc++2/sigc++/class_slot.h b/libs/sigc++2/sigc++/class_slot.h
new file mode 100644
index 0000000000..df644bfd04
--- /dev/null
+++ b/libs/sigc++2/sigc++/class_slot.h
@@ -0,0 +1,568 @@
+// -*- c++ -*-
+/* Do not edit! -- generated file */
+
+
+#ifndef _SIGC_MACROS_CLASS_SLOTHM4_
+#define _SIGC_MACROS_CLASS_SLOTHM4_
+
+#include <sigc++/slot.h>
+#include <sigc++/functors/mem_fun.h>
+
+#ifndef LIBSIGC_DISABLE_DEPRECATED
+
+namespace SigC {
+
+// slot_class()
+/** Creates a functor of type SigC::Slot0 that encapsulates a method and an object instance.
+ *
+ * This function is part of the compatibility module and therefore deprecated.
+ * Use sigc::mem_fun() instead.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_obj>
+inline Slot0<T_return>
+slot_class( T_obj& _A_obj, T_return (T_obj::*_A_func)() )
+{ return ::sigc::bound_mem_functor0<T_return, T_obj>(_A_obj, _A_func); }
+
+/** Creates a functor of type SigC::Slot1 that encapsulates a method and an object instance.
+ *
+ * This function is part of the compatibility module and therefore deprecated.
+ * Use sigc::mem_fun() instead.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1, class T_obj>
+inline Slot1<T_return, T_arg1>
+slot_class( T_obj& _A_obj, T_return (T_obj::*_A_func)(T_arg1) )
+{ return ::sigc::bound_mem_functor1<T_return, T_obj, T_arg1>(_A_obj, _A_func); }
+
+/** Creates a functor of type SigC::Slot2 that encapsulates a method and an object instance.
+ *
+ * This function is part of the compatibility module and therefore deprecated.
+ * Use sigc::mem_fun() instead.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2, class T_obj>
+inline Slot2<T_return, T_arg1,T_arg2>
+slot_class( T_obj& _A_obj, T_return (T_obj::*_A_func)(T_arg1,T_arg2) )
+{ return ::sigc::bound_mem_functor2<T_return, T_obj, T_arg1,T_arg2>(_A_obj, _A_func); }
+
+/** Creates a functor of type SigC::Slot3 that encapsulates a method and an object instance.
+ *
+ * This function is part of the compatibility module and therefore deprecated.
+ * Use sigc::mem_fun() instead.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3, class T_obj>
+inline Slot3<T_return, T_arg1,T_arg2,T_arg3>
+slot_class( T_obj& _A_obj, T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3) )
+{ return ::sigc::bound_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>(_A_obj, _A_func); }
+
+/** Creates a functor of type SigC::Slot4 that encapsulates a method and an object instance.
+ *
+ * This function is part of the compatibility module and therefore deprecated.
+ * Use sigc::mem_fun() instead.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4, class T_obj>
+inline Slot4<T_return, T_arg1,T_arg2,T_arg3,T_arg4>
+slot_class( T_obj& _A_obj, T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) )
+{ return ::sigc::bound_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>(_A_obj, _A_func); }
+
+/** Creates a functor of type SigC::Slot5 that encapsulates a method and an object instance.
+ *
+ * This function is part of the compatibility module and therefore deprecated.
+ * Use sigc::mem_fun() instead.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5, class T_obj>
+inline Slot5<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>
+slot_class( T_obj& _A_obj, T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) )
+{ return ::sigc::bound_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>(_A_obj, _A_func); }
+
+/** Creates a functor of type SigC::Slot6 that encapsulates a method and an object instance.
+ *
+ * This function is part of the compatibility module and therefore deprecated.
+ * Use sigc::mem_fun() instead.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6, class T_obj>
+inline Slot6<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>
+slot_class( T_obj& _A_obj, T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) )
+{ return ::sigc::bound_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>(_A_obj, _A_func); }
+
+/** Creates a functor of type SigC::Slot7 that encapsulates a method and an object instance.
+ *
+ * This function is part of the compatibility module and therefore deprecated.
+ * Use sigc::mem_fun() instead.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7, class T_obj>
+inline Slot7<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>
+slot_class( T_obj& _A_obj, T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) )
+{ return ::sigc::bound_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>(_A_obj, _A_func); }
+
+
+/** Creates a functor of type SigC::Slot0 that encapsulates a const method and an object instance.
+ *
+ * This function is part of the compatibility module and therefore deprecated.
+ * Use sigc::mem_fun() instead.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_obj>
+inline Slot0<T_return>
+slot_class(const T_obj& _A_obj, T_return (T_obj::*_A_func)() const)
+{ return ::sigc::bound_const_mem_functor0<T_return, T_obj>(_A_obj, _A_func); }
+
+/** Creates a functor of type SigC::Slot1 that encapsulates a const method and an object instance.
+ *
+ * This function is part of the compatibility module and therefore deprecated.
+ * Use sigc::mem_fun() instead.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1, class T_obj>
+inline Slot1<T_return, T_arg1>
+slot_class(const T_obj& _A_obj, T_return (T_obj::*_A_func)(T_arg1) const)
+{ return ::sigc::bound_const_mem_functor1<T_return, T_obj, T_arg1>(_A_obj, _A_func); }
+
+/** Creates a functor of type SigC::Slot2 that encapsulates a const method and an object instance.
+ *
+ * This function is part of the compatibility module and therefore deprecated.
+ * Use sigc::mem_fun() instead.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2, class T_obj>
+inline Slot2<T_return, T_arg1,T_arg2>
+slot_class(const T_obj& _A_obj, T_return (T_obj::*_A_func)(T_arg1,T_arg2) const)
+{ return ::sigc::bound_const_mem_functor2<T_return, T_obj, T_arg1,T_arg2>(_A_obj, _A_func); }
+
+/** Creates a functor of type SigC::Slot3 that encapsulates a const method and an object instance.
+ *
+ * This function is part of the compatibility module and therefore deprecated.
+ * Use sigc::mem_fun() instead.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3, class T_obj>
+inline Slot3<T_return, T_arg1,T_arg2,T_arg3>
+slot_class(const T_obj& _A_obj, T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3) const)
+{ return ::sigc::bound_const_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>(_A_obj, _A_func); }
+
+/** Creates a functor of type SigC::Slot4 that encapsulates a const method and an object instance.
+ *
+ * This function is part of the compatibility module and therefore deprecated.
+ * Use sigc::mem_fun() instead.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4, class T_obj>
+inline Slot4<T_return, T_arg1,T_arg2,T_arg3,T_arg4>
+slot_class(const T_obj& _A_obj, T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) const)
+{ return ::sigc::bound_const_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>(_A_obj, _A_func); }
+
+/** Creates a functor of type SigC::Slot5 that encapsulates a const method and an object instance.
+ *
+ * This function is part of the compatibility module and therefore deprecated.
+ * Use sigc::mem_fun() instead.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5, class T_obj>
+inline Slot5<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>
+slot_class(const T_obj& _A_obj, T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) const)
+{ return ::sigc::bound_const_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>(_A_obj, _A_func); }
+
+/** Creates a functor of type SigC::Slot6 that encapsulates a const method and an object instance.
+ *
+ * This function is part of the compatibility module and therefore deprecated.
+ * Use sigc::mem_fun() instead.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6, class T_obj>
+inline Slot6<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>
+slot_class(const T_obj& _A_obj, T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) const)
+{ return ::sigc::bound_const_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>(_A_obj, _A_func); }
+
+/** Creates a functor of type SigC::Slot7 that encapsulates a const method and an object instance.
+ *
+ * This function is part of the compatibility module and therefore deprecated.
+ * Use sigc::mem_fun() instead.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7, class T_obj>
+inline Slot7<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>
+slot_class(const T_obj& _A_obj, T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) const)
+{ return ::sigc::bound_const_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>(_A_obj, _A_func); }
+
+
+/** Creates a functor of type SigC::Slot0 that encapsulates a volatile method and an object instance.
+ *
+ * This function is part of the compatibility module and therefore deprecated.
+ * Use sigc::mem_fun() instead.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_obj>
+inline Slot0<T_return>
+slot_class( T_obj& _A_obj, T_return (T_obj::*_A_func)() volatile)
+{ return ::sigc::bound_volatile_mem_functor0<T_return, T_obj>(_A_obj, _A_func); }
+
+/** Creates a functor of type SigC::Slot1 that encapsulates a volatile method and an object instance.
+ *
+ * This function is part of the compatibility module and therefore deprecated.
+ * Use sigc::mem_fun() instead.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1, class T_obj>
+inline Slot1<T_return, T_arg1>
+slot_class( T_obj& _A_obj, T_return (T_obj::*_A_func)(T_arg1) volatile)
+{ return ::sigc::bound_volatile_mem_functor1<T_return, T_obj, T_arg1>(_A_obj, _A_func); }
+
+/** Creates a functor of type SigC::Slot2 that encapsulates a volatile method and an object instance.
+ *
+ * This function is part of the compatibility module and therefore deprecated.
+ * Use sigc::mem_fun() instead.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2, class T_obj>
+inline Slot2<T_return, T_arg1,T_arg2>
+slot_class( T_obj& _A_obj, T_return (T_obj::*_A_func)(T_arg1,T_arg2) volatile)
+{ return ::sigc::bound_volatile_mem_functor2<T_return, T_obj, T_arg1,T_arg2>(_A_obj, _A_func); }
+
+/** Creates a functor of type SigC::Slot3 that encapsulates a volatile method and an object instance.
+ *
+ * This function is part of the compatibility module and therefore deprecated.
+ * Use sigc::mem_fun() instead.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3, class T_obj>
+inline Slot3<T_return, T_arg1,T_arg2,T_arg3>
+slot_class( T_obj& _A_obj, T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3) volatile)
+{ return ::sigc::bound_volatile_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>(_A_obj, _A_func); }
+
+/** Creates a functor of type SigC::Slot4 that encapsulates a volatile method and an object instance.
+ *
+ * This function is part of the compatibility module and therefore deprecated.
+ * Use sigc::mem_fun() instead.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4, class T_obj>
+inline Slot4<T_return, T_arg1,T_arg2,T_arg3,T_arg4>
+slot_class( T_obj& _A_obj, T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) volatile)
+{ return ::sigc::bound_volatile_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>(_A_obj, _A_func); }
+
+/** Creates a functor of type SigC::Slot5 that encapsulates a volatile method and an object instance.
+ *
+ * This function is part of the compatibility module and therefore deprecated.
+ * Use sigc::mem_fun() instead.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5, class T_obj>
+inline Slot5<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>
+slot_class( T_obj& _A_obj, T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) volatile)
+{ return ::sigc::bound_volatile_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>(_A_obj, _A_func); }
+
+/** Creates a functor of type SigC::Slot6 that encapsulates a volatile method and an object instance.
+ *
+ * This function is part of the compatibility module and therefore deprecated.
+ * Use sigc::mem_fun() instead.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6, class T_obj>
+inline Slot6<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>
+slot_class( T_obj& _A_obj, T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) volatile)
+{ return ::sigc::bound_volatile_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>(_A_obj, _A_func); }
+
+/** Creates a functor of type SigC::Slot7 that encapsulates a volatile method and an object instance.
+ *
+ * This function is part of the compatibility module and therefore deprecated.
+ * Use sigc::mem_fun() instead.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7, class T_obj>
+inline Slot7<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>
+slot_class( T_obj& _A_obj, T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) volatile)
+{ return ::sigc::bound_volatile_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>(_A_obj, _A_func); }
+
+
+/** Creates a functor of type SigC::Slot0 that encapsulates a const volatile method and an object instance.
+ *
+ * This function is part of the compatibility module and therefore deprecated.
+ * Use sigc::mem_fun() instead.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_obj>
+inline Slot0<T_return>
+slot_class(const T_obj& _A_obj, T_return (T_obj::*_A_func)() const volatile)
+{ return ::sigc::bound_const_volatile_mem_functor0<T_return, T_obj>(_A_obj, _A_func); }
+
+/** Creates a functor of type SigC::Slot1 that encapsulates a const volatile method and an object instance.
+ *
+ * This function is part of the compatibility module and therefore deprecated.
+ * Use sigc::mem_fun() instead.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1, class T_obj>
+inline Slot1<T_return, T_arg1>
+slot_class(const T_obj& _A_obj, T_return (T_obj::*_A_func)(T_arg1) const volatile)
+{ return ::sigc::bound_const_volatile_mem_functor1<T_return, T_obj, T_arg1>(_A_obj, _A_func); }
+
+/** Creates a functor of type SigC::Slot2 that encapsulates a const volatile method and an object instance.
+ *
+ * This function is part of the compatibility module and therefore deprecated.
+ * Use sigc::mem_fun() instead.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2, class T_obj>
+inline Slot2<T_return, T_arg1,T_arg2>
+slot_class(const T_obj& _A_obj, T_return (T_obj::*_A_func)(T_arg1,T_arg2) const volatile)
+{ return ::sigc::bound_const_volatile_mem_functor2<T_return, T_obj, T_arg1,T_arg2>(_A_obj, _A_func); }
+
+/** Creates a functor of type SigC::Slot3 that encapsulates a const volatile method and an object instance.
+ *
+ * This function is part of the compatibility module and therefore deprecated.
+ * Use sigc::mem_fun() instead.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3, class T_obj>
+inline Slot3<T_return, T_arg1,T_arg2,T_arg3>
+slot_class(const T_obj& _A_obj, T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3) const volatile)
+{ return ::sigc::bound_const_volatile_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>(_A_obj, _A_func); }
+
+/** Creates a functor of type SigC::Slot4 that encapsulates a const volatile method and an object instance.
+ *
+ * This function is part of the compatibility module and therefore deprecated.
+ * Use sigc::mem_fun() instead.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4, class T_obj>
+inline Slot4<T_return, T_arg1,T_arg2,T_arg3,T_arg4>
+slot_class(const T_obj& _A_obj, T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) const volatile)
+{ return ::sigc::bound_const_volatile_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>(_A_obj, _A_func); }
+
+/** Creates a functor of type SigC::Slot5 that encapsulates a const volatile method and an object instance.
+ *
+ * This function is part of the compatibility module and therefore deprecated.
+ * Use sigc::mem_fun() instead.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5, class T_obj>
+inline Slot5<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>
+slot_class(const T_obj& _A_obj, T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) const volatile)
+{ return ::sigc::bound_const_volatile_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>(_A_obj, _A_func); }
+
+/** Creates a functor of type SigC::Slot6 that encapsulates a const volatile method and an object instance.
+ *
+ * This function is part of the compatibility module and therefore deprecated.
+ * Use sigc::mem_fun() instead.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6, class T_obj>
+inline Slot6<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>
+slot_class(const T_obj& _A_obj, T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) const volatile)
+{ return ::sigc::bound_const_volatile_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>(_A_obj, _A_func); }
+
+/** Creates a functor of type SigC::Slot7 that encapsulates a const volatile method and an object instance.
+ *
+ * This function is part of the compatibility module and therefore deprecated.
+ * Use sigc::mem_fun() instead.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7, class T_obj>
+inline Slot7<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>
+slot_class(const T_obj& _A_obj, T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) const volatile)
+{ return ::sigc::bound_const_volatile_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>(_A_obj, _A_func); }
+
+
+
+}
+
+#endif
+#endif /* _SIGC_MACROS_CLASS_SLOTHM4_ */
diff --git a/libs/sigc++2/sigc++/compatibility.h b/libs/sigc++2/sigc++/compatibility.h
new file mode 100644
index 0000000000..3c5006c0f0
--- /dev/null
+++ b/libs/sigc++2/sigc++/compatibility.h
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2002, The libsigc++ Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+#ifndef _SIGC_COMPATIBILITY_HPP_
+#define _SIGC_COMPATIBILITY_HPP_
+
+#include <sigc++/signal.h>
+#include <sigc++/connection.h>
+#include <sigc++/object_slot.h>
+
+#ifndef LIBSIGC_DISABLE_DEPRECATED
+
+namespace SigC {
+
+/** @defgroup compat Compatibility module
+ * This set of types and functions provides an API that is compatible to
+ * libsigc++-1.2. Some internal structures of libsigc++-1.2 are not available.
+ *
+ * All types and functions that are defined in namespace SigC are deprecated.
+ * Use the new libsigc++2 API that is defined in namespace sigc.
+ */
+
+}
+
+#endif /* LIBSIGC_DISABLE_DEPRECATED */
+
+#endif /* _SIGC_COMPATIBILITY_HPP_ */
diff --git a/libs/sigc++2/sigc++/connection.cc b/libs/sigc++2/sigc++/connection.cc
new file mode 100644
index 0000000000..8f4363482f
--- /dev/null
+++ b/libs/sigc++2/sigc++/connection.cc
@@ -0,0 +1,111 @@
+// -*- c++ -*-
+/*
+ * Copyright 2002, The libsigc++ Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+
+#include <sigc++/connection.h>
+using namespace std;
+
+namespace sigc {
+
+connection::connection()
+: slot_(0)
+{}
+
+connection::connection(const connection& c)
+: slot_(c.slot_)
+{
+ //Let the connection forget about the signal handler when the handler object dies:
+ if (slot_)
+ slot_->add_destroy_notify_callback(this, &notify);
+}
+
+connection::connection(slot_base& sl)
+: slot_(&sl)
+{
+ //Let the connection forget about the signal handler when the handler object dies:
+ slot_->add_destroy_notify_callback(this, &notify);
+}
+
+connection& connection::operator=(const connection& c)
+{
+ set_slot(c.slot_);
+ return *this;
+}
+
+connection::~connection()
+{
+ if (slot_)
+ slot_->remove_destroy_notify_callback(this);
+}
+
+bool connection::empty() const
+{
+ return (!slot_ || slot_->empty());
+}
+
+bool connection::connected() const
+{
+ return !empty();
+}
+
+bool connection::blocked() const
+{
+ return (slot_ ? slot_->blocked() : false);
+}
+
+bool connection::block(bool should_block)
+{
+ return (slot_ ? slot_->block(should_block) : false);
+}
+
+bool connection::unblock()
+{
+ return (slot_ ? slot_->unblock() : false);
+}
+
+void connection::disconnect()
+{
+ if (slot_)
+ slot_->disconnect(); // This notifies slot_'s parent.
+}
+
+connection::operator bool()
+{
+ return !empty();
+}
+
+void connection::set_slot(slot_base* sl)
+{
+ if (slot_)
+ slot_->remove_destroy_notify_callback(this);
+
+ slot_ = sl;
+
+ if (slot_)
+ slot_->add_destroy_notify_callback(this, &notify);
+}
+
+void* connection::notify(void* data)
+{
+ connection* self = (connection*)data;
+ self->slot_ = 0;
+ return 0;
+}
+
+} /* namespace sigc */
diff --git a/libs/sigc++2/sigc++/connection.h b/libs/sigc++2/sigc++/connection.h
new file mode 100644
index 0000000000..170db55618
--- /dev/null
+++ b/libs/sigc++2/sigc++/connection.h
@@ -0,0 +1,154 @@
+/*
+ * Copyright 2002, The libsigc++ Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+#ifndef _SIGC_CONNECTION_HPP_
+#define _SIGC_CONNECTION_HPP_
+#include <sigc++config.h>
+#include <sigc++/signal.h>
+
+namespace sigc {
+
+/** Convinience class for safe disconnection.
+ * Iterators must not be used beyond the lifetime of the list
+ * they work on. A connection object can be created from a
+ * slot list iterator and may safely be used to disconnect
+ * the referred slot at any time (disconnect()). If the slot
+ * has already been destroyed, disconnect() does nothing. empty() or
+ * operator bool() can be used to test whether the connection is
+ * still active. The connection can be blocked (block(), unblock()).
+ *
+ * This is possible because the connection object gets notified
+ * when the referred slot dies (notify()).
+ *
+ * @ingroup signal
+ */
+struct SIGC_API connection
+{
+ /** Constructs an empty connection object. */
+ connection();
+
+ /** Constructs a connection object copying an existing one.
+ * @param c The connection object to make a copy from.
+ */
+ connection(const connection& c);
+
+ /** Constructs a connection object from a slot list iterator.
+ * @param it The slot list iterator to take the slot from.
+ */
+ template <typename T_slot>
+ connection(const slot_iterator<T_slot>& it) : slot_(&(*it))
+ { if (slot_) slot_->add_destroy_notify_callback(this, &notify); }
+
+ /** Constructs a connection object from a slot object.
+ * This is only useful if you create your own slot list.
+ * @param sl The slot to operate on.
+ */
+ explicit connection(slot_base& sl);
+
+ /** Overrides this connection object copying another one.
+ * @param c The connection object to make a copy from.
+ */
+ connection& operator=(const connection& c);
+
+ /** Overrides this connection object with another slot list iterator.
+ * @param it The new slot list iterator to take the slot from.
+ */
+ template <typename T_slot>
+ connection& operator=(const slot_iterator<T_slot>& it)
+ { set_slot(&(*it)); return *this; }
+
+ ~connection();
+
+ /** Returns whether the connection is still active.
+ * @return @p false if the connection is still active.
+ */
+ bool empty() const;
+
+ /** Returns whether the connection is still active.
+ * @return @p true if the connection is still active.
+ */
+ bool connected() const;
+
+ /** Returns whether the connection is blocked.
+ * @return @p true if the connection is blocked.
+ */
+ bool blocked() const;
+
+ /** Sets or unsets the blocking state of this connection.
+ * See slot_base::block() for details.
+ * @param should_block Indicates whether the blocking state should be set or unset.
+ * @return @p true if the connection has been in blocking state before.
+ */
+ bool block(bool should_block = true);
+
+ /** Unsets the blocking state of this connection.
+ * @return @p true if the connection has been in blocking state before.
+ */
+ bool unblock();
+
+ /// Disconnects the referred slot.
+ void disconnect();
+
+ /** Returns whether the connection is still active.
+ * @return @p true if the connection is still active.
+ */
+ operator bool();
+
+ /** Callback that is executed when the referred slot is destroyed.
+ * @param d The connection object notified (@p this).
+ */
+ static void* notify(void* data);
+
+private:
+ void set_slot(slot_base* sl);
+
+ /* Referred slot. Set to zero from notify().
+ * A value of zero indicates an "empty" connection.
+ */
+ slot_base* slot_;
+};
+
+} /* namespace sigc */
+
+
+#ifndef LIBSIGC_DISABLE_DEPRECATED
+
+namespace SigC {
+
+/** Convinience class for safe disconnection.
+ * Iterators must not be used beyond the lifetime of the list
+ * they work on. A connection object can be created from a
+ * slot list iterator and may safely be used to disconnect
+ * the referred slot at any time (disconnect()). If the slot
+ * has already been destroyed, disconnect() does nothing. empty() or
+ * operator bool() can be used to test whether the connection is
+ * still active. The connection can be blocked (block(), unblock()).
+ *
+ * This is possible because the connection object gets notified
+ * when the referred slot dies (notify()).
+ *
+ * @deprecated Use sigc::connection instead.
+ * @ingroup compat
+ */
+typedef ::sigc::connection Connection;
+
+}
+
+#endif /* LIBSIGC_DISABLE_DEPRECATED */
+
+#endif /* _SIGC_TRACKABLE_HPP_ */
diff --git a/libs/sigc++2/sigc++/functors/functor_trait.h b/libs/sigc++2/sigc++/functors/functor_trait.h
new file mode 100644
index 0000000000..656d010414
--- /dev/null
+++ b/libs/sigc++2/sigc++/functors/functor_trait.h
@@ -0,0 +1,307 @@
+// -*- c++ -*-
+/* Do not edit! -- generated file */
+/*
+ Trait functor_trait<functor>:
+
+ This trait allows the user to specific what is the return type
+ of any type. It has been overloaded to detect the return type and
+ the functor version of function pointers and class methods as well.
+
+ To populate the return type of user defined and third party functors
+ use the macro SIGC_FUNCTOR_TRAIT(T_functor,T_return) in
+ namespace sigc. Multi-type functors are only partly supported.
+ Try specifying the return type of the functor's operator()() overload.
+
+ Alternatively, you can derive your functors from functor_base and
+ place "typedef T_return result_type;" in the class definition.
+
+ Use SIGC_FUNCTORS_HAVE_RESULT_TYPE if you want sigc++ to assume that
+ result_type is defined in all user defined or 3rd-party functors
+ (except those you specify a return type explicitly with SIGC_FUNCTOR_TRAIT()).
+
+*/
+#ifndef _SIGC_FUNCTORS_MACROS_FUNCTOR_TRAITHM4_
+#define _SIGC_FUNCTORS_MACROS_FUNCTOR_TRAITHM4_
+#include <sigc++/type_traits.h>
+
+
+namespace sigc {
+
+/** nil struct type.
+ * The nil struct type is used as default template argument in the
+ * unnumbered sigc::signal and sigc::slot templates.
+ *
+ * @ingroup signal
+ * @ingroup slot
+ */
+struct nil;
+
+
+/** @defgroup functors Functors
+ * Functors are copyable types that define operator()().
+ *
+ * Types that define operator()() overloads with different return types are referred to
+ * as multi-type functors. Multi-type functors are only partly supported in libsigc++.
+ *
+ * Closures are functors that store all information needed to invoke a callback from operator()().
+ *
+ * Adaptors are functors that alter the signature of a functor's operator()().
+ *
+ * libsigc++ defines numerous functors, closures and adaptors.
+ * Since libsigc++ is a callback libaray, most functors are also closures.
+ * The documentation doesn't distinguish between functors and closures.
+ *
+ * The basic functor types libsigc++ provides are created with ptr_fun() and mem_fun()
+ * and can be converted into slots implicitly.
+ * The set of adaptors that ships with libsigc++ is documented in the equally named module.
+ */
+
+/** A hint to the compiler.
+ * All functors which define @p result_type should publically inherit from this hint.
+ *
+ * @ingroup functors
+ */
+struct functor_base {};
+
+
+template <class T_functor, bool I_derives_functor_base=is_base_and_derived<functor_base,T_functor>::value>
+struct functor_trait
+{
+ typedef void result_type;
+ typedef T_functor functor_type;
+};
+
+template <class T_functor>
+struct functor_trait<T_functor,true>
+{
+ typedef typename T_functor::result_type result_type;
+ typedef T_functor functor_type;
+};
+
+/** If you want to mix functors from a different library with libsigc++ and
+ * these functors define @p result_type simply use this macro inside namespace sigc like so:
+ * @code
+ * namespace sigc { SIGC_FUNCTORS_HAVE_RESULT_TYPE }
+ * @endcode
+ *
+ * @ingroup functors
+ */
+#define SIGC_FUNCTORS_HAVE_RESULT_TYPE \
+template <class T_functor> \
+struct functor_trait<T_functor,false> \
+{ \
+ typedef typename T_functor::result_type result_type; \
+ typedef T_functor functor_type; \
+};
+
+/** If you want to mix functors from a different library with libsigc++ and
+ * these functors don't define @p result_type use this macro inside namespace sigc
+ * to expose the return type of the functors like so:
+ * @code
+ * namespace sigc {
+ * SIGC_FUNCTOR_TRAIT(first_functor_type, return_type_of_first_functor_type)
+ * SIGC_FUNCTOR_TRAIT(second_functor_type, return_type_of_second_functor_type)
+ * ...
+ * }
+ * @endcode
+ *
+ * @ingroup functors
+ */
+#define SIGC_FUNCTOR_TRAIT(T_functor,T_return) \
+template <> \
+struct functor_trait<T_functor,false> \
+{ \
+ typedef T_return result_type; \
+ typedef T_functor functor_type; \
+};
+
+// detect the return type and the functor version of non-functor types.
+template <class T_return> class pointer_functor0;
+template <class T_return>
+struct functor_trait<T_return (*)(), false>
+{
+ typedef T_return result_type;
+ typedef pointer_functor0<T_return> functor_type;
+};
+
+template <class T_arg1, class T_return> class pointer_functor1;
+template <class T_arg1, class T_return>
+struct functor_trait<T_return (*)(T_arg1), false>
+{
+ typedef T_return result_type;
+ typedef pointer_functor1<T_arg1, T_return> functor_type;
+};
+
+template <class T_arg1,class T_arg2, class T_return> class pointer_functor2;
+template <class T_arg1,class T_arg2, class T_return>
+struct functor_trait<T_return (*)(T_arg1,T_arg2), false>
+{
+ typedef T_return result_type;
+ typedef pointer_functor2<T_arg1,T_arg2, T_return> functor_type;
+};
+
+template <class T_arg1,class T_arg2,class T_arg3, class T_return> class pointer_functor3;
+template <class T_arg1,class T_arg2,class T_arg3, class T_return>
+struct functor_trait<T_return (*)(T_arg1,T_arg2,T_arg3), false>
+{
+ typedef T_return result_type;
+ typedef pointer_functor3<T_arg1,T_arg2,T_arg3, T_return> functor_type;
+};
+
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4, class T_return> class pointer_functor4;
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4, class T_return>
+struct functor_trait<T_return (*)(T_arg1,T_arg2,T_arg3,T_arg4), false>
+{
+ typedef T_return result_type;
+ typedef pointer_functor4<T_arg1,T_arg2,T_arg3,T_arg4, T_return> functor_type;
+};
+
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5, class T_return> class pointer_functor5;
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5, class T_return>
+struct functor_trait<T_return (*)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5), false>
+{
+ typedef T_return result_type;
+ typedef pointer_functor5<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5, T_return> functor_type;
+};
+
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6, class T_return> class pointer_functor6;
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6, class T_return>
+struct functor_trait<T_return (*)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6), false>
+{
+ typedef T_return result_type;
+ typedef pointer_functor6<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6, T_return> functor_type;
+};
+
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7, class T_return> class pointer_functor7;
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7, class T_return>
+struct functor_trait<T_return (*)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7), false>
+{
+ typedef T_return result_type;
+ typedef pointer_functor7<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7, T_return> functor_type;
+};
+
+
+template <class T_return, class T_obj> class mem_functor0;
+template <class T_return, class T_obj> class const_mem_functor0;
+template <class T_return, class T_obj>
+struct functor_trait<T_return (T_obj::*)(), false>
+{
+ typedef T_return result_type;
+ typedef mem_functor0<T_return, T_obj> functor_type;
+};
+template <class T_return, class T_obj>
+struct functor_trait<T_return (T_obj::*)() const, false>
+{
+ typedef T_return result_type;
+ typedef const_mem_functor0<T_return, T_obj> functor_type;
+};
+
+template <class T_arg1, class T_return, class T_obj> class mem_functor1;
+template <class T_arg1, class T_return, class T_obj> class const_mem_functor1;
+template <class T_arg1, class T_return, class T_obj>
+struct functor_trait<T_return (T_obj::*)(T_arg1), false>
+{
+ typedef T_return result_type;
+ typedef mem_functor1<T_arg1, T_return, T_obj> functor_type;
+};
+template <class T_arg1, class T_return, class T_obj>
+struct functor_trait<T_return (T_obj::*)(T_arg1) const, false>
+{
+ typedef T_return result_type;
+ typedef const_mem_functor1<T_arg1, T_return, T_obj> functor_type;
+};
+
+template <class T_arg1,class T_arg2, class T_return, class T_obj> class mem_functor2;
+template <class T_arg1,class T_arg2, class T_return, class T_obj> class const_mem_functor2;
+template <class T_arg1,class T_arg2, class T_return, class T_obj>
+struct functor_trait<T_return (T_obj::*)(T_arg1,T_arg2), false>
+{
+ typedef T_return result_type;
+ typedef mem_functor2<T_arg1,T_arg2, T_return, T_obj> functor_type;
+};
+template <class T_arg1,class T_arg2, class T_return, class T_obj>
+struct functor_trait<T_return (T_obj::*)(T_arg1,T_arg2) const, false>
+{
+ typedef T_return result_type;
+ typedef const_mem_functor2<T_arg1,T_arg2, T_return, T_obj> functor_type;
+};
+
+template <class T_arg1,class T_arg2,class T_arg3, class T_return, class T_obj> class mem_functor3;
+template <class T_arg1,class T_arg2,class T_arg3, class T_return, class T_obj> class const_mem_functor3;
+template <class T_arg1,class T_arg2,class T_arg3, class T_return, class T_obj>
+struct functor_trait<T_return (T_obj::*)(T_arg1,T_arg2,T_arg3), false>
+{
+ typedef T_return result_type;
+ typedef mem_functor3<T_arg1,T_arg2,T_arg3, T_return, T_obj> functor_type;
+};
+template <class T_arg1,class T_arg2,class T_arg3, class T_return, class T_obj>
+struct functor_trait<T_return (T_obj::*)(T_arg1,T_arg2,T_arg3) const, false>
+{
+ typedef T_return result_type;
+ typedef const_mem_functor3<T_arg1,T_arg2,T_arg3, T_return, T_obj> functor_type;
+};
+
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4, class T_return, class T_obj> class mem_functor4;
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4, class T_return, class T_obj> class const_mem_functor4;
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4, class T_return, class T_obj>
+struct functor_trait<T_return (T_obj::*)(T_arg1,T_arg2,T_arg3,T_arg4), false>
+{
+ typedef T_return result_type;
+ typedef mem_functor4<T_arg1,T_arg2,T_arg3,T_arg4, T_return, T_obj> functor_type;
+};
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4, class T_return, class T_obj>
+struct functor_trait<T_return (T_obj::*)(T_arg1,T_arg2,T_arg3,T_arg4) const, false>
+{
+ typedef T_return result_type;
+ typedef const_mem_functor4<T_arg1,T_arg2,T_arg3,T_arg4, T_return, T_obj> functor_type;
+};
+
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5, class T_return, class T_obj> class mem_functor5;
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5, class T_return, class T_obj> class const_mem_functor5;
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5, class T_return, class T_obj>
+struct functor_trait<T_return (T_obj::*)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5), false>
+{
+ typedef T_return result_type;
+ typedef mem_functor5<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5, T_return, T_obj> functor_type;
+};
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5, class T_return, class T_obj>
+struct functor_trait<T_return (T_obj::*)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) const, false>
+{
+ typedef T_return result_type;
+ typedef const_mem_functor5<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5, T_return, T_obj> functor_type;
+};
+
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6, class T_return, class T_obj> class mem_functor6;
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6, class T_return, class T_obj> class const_mem_functor6;
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6, class T_return, class T_obj>
+struct functor_trait<T_return (T_obj::*)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6), false>
+{
+ typedef T_return result_type;
+ typedef mem_functor6<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6, T_return, T_obj> functor_type;
+};
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6, class T_return, class T_obj>
+struct functor_trait<T_return (T_obj::*)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) const, false>
+{
+ typedef T_return result_type;
+ typedef const_mem_functor6<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6, T_return, T_obj> functor_type;
+};
+
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7, class T_return, class T_obj> class mem_functor7;
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7, class T_return, class T_obj> class const_mem_functor7;
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7, class T_return, class T_obj>
+struct functor_trait<T_return (T_obj::*)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7), false>
+{
+ typedef T_return result_type;
+ typedef mem_functor7<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7, T_return, T_obj> functor_type;
+};
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7, class T_return, class T_obj>
+struct functor_trait<T_return (T_obj::*)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) const, false>
+{
+ typedef T_return result_type;
+ typedef const_mem_functor7<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7, T_return, T_obj> functor_type;
+};
+
+
+
+} /* namespace sigc */
+#endif /* _SIGC_FUNCTORS_MACROS_FUNCTOR_TRAITHM4_ */
diff --git a/libs/sigc++2/sigc++/functors/functors.h b/libs/sigc++2/sigc++/functors/functors.h
new file mode 100644
index 0000000000..3a9619c21d
--- /dev/null
+++ b/libs/sigc++2/sigc++/functors/functors.h
@@ -0,0 +1,27 @@
+// -*- c++ -*-
+/*
+ * Copyright 2002, The libsigc++ Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+#ifndef _SIGC_FUNCTOR_HPP_
+#define _SIGC_FUNCTOR_HPP_
+
+#include <sigc++/functors/slot.h>
+#include <sigc++/functors/ptr_fun.h>
+#include <sigc++/functors/mem_fun.h>
+
+#endif /* _SIGC_FUNCTOR_HPP_ */
diff --git a/libs/sigc++2/sigc++/functors/mem_fun.h b/libs/sigc++2/sigc++/functors/mem_fun.h
new file mode 100644
index 0000000000..2bd7cde67f
--- /dev/null
+++ b/libs/sigc++2/sigc++/functors/mem_fun.h
@@ -0,0 +1,5976 @@
+// -*- c++ -*-
+/* Do not edit! -- generated file */
+
+
+// implementation notes:
+// - we do not use bind here, because it would introduce
+// an extra copy and complicate the header include order if bind is
+// to have automatic conversion for member pointers.
+#ifndef _SIGC_FUNCTORS_MACROS_MEM_FUNHM4_
+#define _SIGC_FUNCTORS_MACROS_MEM_FUNHM4_
+#include <sigc++/type_traits.h>
+#include <sigc++/functors/functor_trait.h>
+
+namespace sigc {
+
+/** @defgroup mem_fun mem_fun()
+ * mem_fun() is used to convert a pointer to a method to a functor.
+ *
+ * Optionally a reference or pointer to an object can be bound to the functor.
+ * Note that only if the object type inherits from sigc::trackable
+ * the slot is cleared automatically when the object goes out of scope!
+ *
+ * If the member function pointer is to an overloaded type, you must specify
+ * the types using template arguments starting with the first argument.
+ * It is not necessary to supply the return type.
+ *
+ * @par Example:
+ * @code
+ * struct foo : public sigc::trackable
+ * {
+ * void bar(int) {}
+ * };
+ * foo my_foo;
+ * sigc::slot<void, int> sl = sigc::mem_fun(my_foo, &foo::bar);
+ * @endcode
+ *
+ * For const methods mem_fun() takes a const reference or pointer to an object.
+ *
+ * @par Example:
+ * @code
+ * struct foo : public sigc::trackable
+ * {
+ * void bar(int) const {}
+ * };
+ * const foo my_foo;
+ * sigc::slot<void, int> sl = sigc::mem_fun(my_foo, &foo::bar);
+ * @endcode
+ *
+ * Use mem_fun#() if there is an abiguity as to the number of arguments.
+ *
+ * @par Example:
+ * @code
+ * struct foo : public sigc::trackable
+ * {
+ * void bar(int) {}
+ * void bar(float) {}
+ * void bar(int, int) {}
+ * };
+ * foo my_foo;
+ * sigc::slot<void, int> sl = sigc::mem_fun1<int>(my_foo, &foo::bar);
+ * @endcode
+ *
+ * @ingroup functors
+ */
+
+/** mem_functor0 wraps methods with 0 argument(s).
+ * Use the convenience function mem_fun() to create an instance of mem_functor0.
+ *
+ * The following template arguments are used:
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj>
+class mem_functor0 : public functor_base
+{
+public:
+ typedef T_return (T_obj::*function_type)() ;
+ typedef T_return result_type;
+
+ /// Constructs an invalid functor.
+ mem_functor0() : func_ptr_(0) {}
+
+ /** Constructs a mem_functor0 object that wraps the passed method.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ explicit mem_functor0(function_type _A_func) : func_ptr_(_A_func) {}
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Pointer to instance the method should operate on.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(T_obj* _A_obj) const
+ { return (_A_obj->*(this->func_ptr_))(); }
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Reference to instance the method should operate on.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(T_obj& _A_obj) const
+ { return (_A_obj.*func_ptr_)(); }
+
+protected:
+ function_type func_ptr_;
+};
+
+/** mem_functor1 wraps methods with 1 argument(s).
+ * Use the convenience function mem_fun() to create an instance of mem_functor1.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_arg1>
+class mem_functor1 : public functor_base
+{
+public:
+ typedef T_return (T_obj::*function_type)(T_arg1) ;
+ typedef T_return result_type;
+
+ /// Constructs an invalid functor.
+ mem_functor1() : func_ptr_(0) {}
+
+ /** Constructs a mem_functor1 object that wraps the passed method.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ explicit mem_functor1(function_type _A_func) : func_ptr_(_A_func) {}
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Pointer to instance the method should operate on.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(T_obj* _A_obj, typename type_trait<T_arg1>::take _A_a1) const
+ { return (_A_obj->*(this->func_ptr_))(_A_a1); }
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Reference to instance the method should operate on.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(T_obj& _A_obj, typename type_trait<T_arg1>::take _A_a1) const
+ { return (_A_obj.*func_ptr_)(_A_a1); }
+
+protected:
+ function_type func_ptr_;
+};
+
+/** mem_functor2 wraps methods with 2 argument(s).
+ * Use the convenience function mem_fun() to create an instance of mem_functor2.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2>
+class mem_functor2 : public functor_base
+{
+public:
+ typedef T_return (T_obj::*function_type)(T_arg1,T_arg2) ;
+ typedef T_return result_type;
+
+ /// Constructs an invalid functor.
+ mem_functor2() : func_ptr_(0) {}
+
+ /** Constructs a mem_functor2 object that wraps the passed method.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ explicit mem_functor2(function_type _A_func) : func_ptr_(_A_func) {}
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Pointer to instance the method should operate on.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(T_obj* _A_obj, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2) const
+ { return (_A_obj->*(this->func_ptr_))(_A_a1,_A_a2); }
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Reference to instance the method should operate on.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(T_obj& _A_obj, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2) const
+ { return (_A_obj.*func_ptr_)(_A_a1,_A_a2); }
+
+protected:
+ function_type func_ptr_;
+};
+
+/** mem_functor3 wraps methods with 3 argument(s).
+ * Use the convenience function mem_fun() to create an instance of mem_functor3.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ * - @e T_arg3 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3>
+class mem_functor3 : public functor_base
+{
+public:
+ typedef T_return (T_obj::*function_type)(T_arg1,T_arg2,T_arg3) ;
+ typedef T_return result_type;
+
+ /// Constructs an invalid functor.
+ mem_functor3() : func_ptr_(0) {}
+
+ /** Constructs a mem_functor3 object that wraps the passed method.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ explicit mem_functor3(function_type _A_func) : func_ptr_(_A_func) {}
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Pointer to instance the method should operate on.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(T_obj* _A_obj, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3) const
+ { return (_A_obj->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3); }
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Reference to instance the method should operate on.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(T_obj& _A_obj, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3) const
+ { return (_A_obj.*func_ptr_)(_A_a1,_A_a2,_A_a3); }
+
+protected:
+ function_type func_ptr_;
+};
+
+/** mem_functor4 wraps methods with 4 argument(s).
+ * Use the convenience function mem_fun() to create an instance of mem_functor4.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ * - @e T_arg3 Argument type used in the definition of operator()().
+ * - @e T_arg4 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+class mem_functor4 : public functor_base
+{
+public:
+ typedef T_return (T_obj::*function_type)(T_arg1,T_arg2,T_arg3,T_arg4) ;
+ typedef T_return result_type;
+
+ /// Constructs an invalid functor.
+ mem_functor4() : func_ptr_(0) {}
+
+ /** Constructs a mem_functor4 object that wraps the passed method.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ explicit mem_functor4(function_type _A_func) : func_ptr_(_A_func) {}
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Pointer to instance the method should operate on.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @param _A_a4 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(T_obj* _A_obj, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4) const
+ { return (_A_obj->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4); }
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Reference to instance the method should operate on.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @param _A_a4 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(T_obj& _A_obj, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4) const
+ { return (_A_obj.*func_ptr_)(_A_a1,_A_a2,_A_a3,_A_a4); }
+
+protected:
+ function_type func_ptr_;
+};
+
+/** mem_functor5 wraps methods with 5 argument(s).
+ * Use the convenience function mem_fun() to create an instance of mem_functor5.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ * - @e T_arg3 Argument type used in the definition of operator()().
+ * - @e T_arg4 Argument type used in the definition of operator()().
+ * - @e T_arg5 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+class mem_functor5 : public functor_base
+{
+public:
+ typedef T_return (T_obj::*function_type)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) ;
+ typedef T_return result_type;
+
+ /// Constructs an invalid functor.
+ mem_functor5() : func_ptr_(0) {}
+
+ /** Constructs a mem_functor5 object that wraps the passed method.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ explicit mem_functor5(function_type _A_func) : func_ptr_(_A_func) {}
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Pointer to instance the method should operate on.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @param _A_a4 Argument to be passed on to the method.
+ * @param _A_a5 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(T_obj* _A_obj, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5) const
+ { return (_A_obj->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5); }
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Reference to instance the method should operate on.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @param _A_a4 Argument to be passed on to the method.
+ * @param _A_a5 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(T_obj& _A_obj, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5) const
+ { return (_A_obj.*func_ptr_)(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5); }
+
+protected:
+ function_type func_ptr_;
+};
+
+/** mem_functor6 wraps methods with 6 argument(s).
+ * Use the convenience function mem_fun() to create an instance of mem_functor6.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ * - @e T_arg3 Argument type used in the definition of operator()().
+ * - @e T_arg4 Argument type used in the definition of operator()().
+ * - @e T_arg5 Argument type used in the definition of operator()().
+ * - @e T_arg6 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+class mem_functor6 : public functor_base
+{
+public:
+ typedef T_return (T_obj::*function_type)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) ;
+ typedef T_return result_type;
+
+ /// Constructs an invalid functor.
+ mem_functor6() : func_ptr_(0) {}
+
+ /** Constructs a mem_functor6 object that wraps the passed method.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ explicit mem_functor6(function_type _A_func) : func_ptr_(_A_func) {}
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Pointer to instance the method should operate on.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @param _A_a4 Argument to be passed on to the method.
+ * @param _A_a5 Argument to be passed on to the method.
+ * @param _A_a6 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(T_obj* _A_obj, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5,typename type_trait<T_arg6>::take _A_a6) const
+ { return (_A_obj->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6); }
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Reference to instance the method should operate on.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @param _A_a4 Argument to be passed on to the method.
+ * @param _A_a5 Argument to be passed on to the method.
+ * @param _A_a6 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(T_obj& _A_obj, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5,typename type_trait<T_arg6>::take _A_a6) const
+ { return (_A_obj.*func_ptr_)(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6); }
+
+protected:
+ function_type func_ptr_;
+};
+
+/** mem_functor7 wraps methods with 7 argument(s).
+ * Use the convenience function mem_fun() to create an instance of mem_functor7.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ * - @e T_arg3 Argument type used in the definition of operator()().
+ * - @e T_arg4 Argument type used in the definition of operator()().
+ * - @e T_arg5 Argument type used in the definition of operator()().
+ * - @e T_arg6 Argument type used in the definition of operator()().
+ * - @e T_arg7 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+class mem_functor7 : public functor_base
+{
+public:
+ typedef T_return (T_obj::*function_type)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) ;
+ typedef T_return result_type;
+
+ /// Constructs an invalid functor.
+ mem_functor7() : func_ptr_(0) {}
+
+ /** Constructs a mem_functor7 object that wraps the passed method.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ explicit mem_functor7(function_type _A_func) : func_ptr_(_A_func) {}
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Pointer to instance the method should operate on.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @param _A_a4 Argument to be passed on to the method.
+ * @param _A_a5 Argument to be passed on to the method.
+ * @param _A_a6 Argument to be passed on to the method.
+ * @param _A_a7 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(T_obj* _A_obj, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5,typename type_trait<T_arg6>::take _A_a6,typename type_trait<T_arg7>::take _A_a7) const
+ { return (_A_obj->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7); }
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Reference to instance the method should operate on.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @param _A_a4 Argument to be passed on to the method.
+ * @param _A_a5 Argument to be passed on to the method.
+ * @param _A_a6 Argument to be passed on to the method.
+ * @param _A_a7 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(T_obj& _A_obj, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5,typename type_trait<T_arg6>::take _A_a6,typename type_trait<T_arg7>::take _A_a7) const
+ { return (_A_obj.*func_ptr_)(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7); }
+
+protected:
+ function_type func_ptr_;
+};
+
+/** const_mem_functor0 wraps const methods with 0 argument(s).
+ * Use the convenience function mem_fun() to create an instance of const_mem_functor0.
+ *
+ * The following template arguments are used:
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj>
+class const_mem_functor0 : public functor_base
+{
+public:
+ typedef T_return (T_obj::*function_type)() const;
+ typedef T_return result_type;
+
+ /// Constructs an invalid functor.
+ const_mem_functor0() : func_ptr_(0) {}
+
+ /** Constructs a const_mem_functor0 object that wraps the passed method.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ explicit const_mem_functor0(function_type _A_func) : func_ptr_(_A_func) {}
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Pointer to instance the method should operate on.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(const T_obj* _A_obj) const
+ { return (_A_obj->*(this->func_ptr_))(); }
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Reference to instance the method should operate on.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(const T_obj& _A_obj) const
+ { return (_A_obj.*func_ptr_)(); }
+
+protected:
+ function_type func_ptr_;
+};
+
+/** const_mem_functor1 wraps const methods with 1 argument(s).
+ * Use the convenience function mem_fun() to create an instance of const_mem_functor1.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_arg1>
+class const_mem_functor1 : public functor_base
+{
+public:
+ typedef T_return (T_obj::*function_type)(T_arg1) const;
+ typedef T_return result_type;
+
+ /// Constructs an invalid functor.
+ const_mem_functor1() : func_ptr_(0) {}
+
+ /** Constructs a const_mem_functor1 object that wraps the passed method.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ explicit const_mem_functor1(function_type _A_func) : func_ptr_(_A_func) {}
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Pointer to instance the method should operate on.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(const T_obj* _A_obj, typename type_trait<T_arg1>::take _A_a1) const
+ { return (_A_obj->*(this->func_ptr_))(_A_a1); }
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Reference to instance the method should operate on.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(const T_obj& _A_obj, typename type_trait<T_arg1>::take _A_a1) const
+ { return (_A_obj.*func_ptr_)(_A_a1); }
+
+protected:
+ function_type func_ptr_;
+};
+
+/** const_mem_functor2 wraps const methods with 2 argument(s).
+ * Use the convenience function mem_fun() to create an instance of const_mem_functor2.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2>
+class const_mem_functor2 : public functor_base
+{
+public:
+ typedef T_return (T_obj::*function_type)(T_arg1,T_arg2) const;
+ typedef T_return result_type;
+
+ /// Constructs an invalid functor.
+ const_mem_functor2() : func_ptr_(0) {}
+
+ /** Constructs a const_mem_functor2 object that wraps the passed method.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ explicit const_mem_functor2(function_type _A_func) : func_ptr_(_A_func) {}
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Pointer to instance the method should operate on.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(const T_obj* _A_obj, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2) const
+ { return (_A_obj->*(this->func_ptr_))(_A_a1,_A_a2); }
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Reference to instance the method should operate on.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(const T_obj& _A_obj, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2) const
+ { return (_A_obj.*func_ptr_)(_A_a1,_A_a2); }
+
+protected:
+ function_type func_ptr_;
+};
+
+/** const_mem_functor3 wraps const methods with 3 argument(s).
+ * Use the convenience function mem_fun() to create an instance of const_mem_functor3.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ * - @e T_arg3 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3>
+class const_mem_functor3 : public functor_base
+{
+public:
+ typedef T_return (T_obj::*function_type)(T_arg1,T_arg2,T_arg3) const;
+ typedef T_return result_type;
+
+ /// Constructs an invalid functor.
+ const_mem_functor3() : func_ptr_(0) {}
+
+ /** Constructs a const_mem_functor3 object that wraps the passed method.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ explicit const_mem_functor3(function_type _A_func) : func_ptr_(_A_func) {}
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Pointer to instance the method should operate on.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(const T_obj* _A_obj, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3) const
+ { return (_A_obj->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3); }
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Reference to instance the method should operate on.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(const T_obj& _A_obj, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3) const
+ { return (_A_obj.*func_ptr_)(_A_a1,_A_a2,_A_a3); }
+
+protected:
+ function_type func_ptr_;
+};
+
+/** const_mem_functor4 wraps const methods with 4 argument(s).
+ * Use the convenience function mem_fun() to create an instance of const_mem_functor4.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ * - @e T_arg3 Argument type used in the definition of operator()().
+ * - @e T_arg4 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+class const_mem_functor4 : public functor_base
+{
+public:
+ typedef T_return (T_obj::*function_type)(T_arg1,T_arg2,T_arg3,T_arg4) const;
+ typedef T_return result_type;
+
+ /// Constructs an invalid functor.
+ const_mem_functor4() : func_ptr_(0) {}
+
+ /** Constructs a const_mem_functor4 object that wraps the passed method.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ explicit const_mem_functor4(function_type _A_func) : func_ptr_(_A_func) {}
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Pointer to instance the method should operate on.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @param _A_a4 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(const T_obj* _A_obj, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4) const
+ { return (_A_obj->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4); }
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Reference to instance the method should operate on.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @param _A_a4 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(const T_obj& _A_obj, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4) const
+ { return (_A_obj.*func_ptr_)(_A_a1,_A_a2,_A_a3,_A_a4); }
+
+protected:
+ function_type func_ptr_;
+};
+
+/** const_mem_functor5 wraps const methods with 5 argument(s).
+ * Use the convenience function mem_fun() to create an instance of const_mem_functor5.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ * - @e T_arg3 Argument type used in the definition of operator()().
+ * - @e T_arg4 Argument type used in the definition of operator()().
+ * - @e T_arg5 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+class const_mem_functor5 : public functor_base
+{
+public:
+ typedef T_return (T_obj::*function_type)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) const;
+ typedef T_return result_type;
+
+ /// Constructs an invalid functor.
+ const_mem_functor5() : func_ptr_(0) {}
+
+ /** Constructs a const_mem_functor5 object that wraps the passed method.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ explicit const_mem_functor5(function_type _A_func) : func_ptr_(_A_func) {}
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Pointer to instance the method should operate on.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @param _A_a4 Argument to be passed on to the method.
+ * @param _A_a5 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(const T_obj* _A_obj, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5) const
+ { return (_A_obj->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5); }
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Reference to instance the method should operate on.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @param _A_a4 Argument to be passed on to the method.
+ * @param _A_a5 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(const T_obj& _A_obj, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5) const
+ { return (_A_obj.*func_ptr_)(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5); }
+
+protected:
+ function_type func_ptr_;
+};
+
+/** const_mem_functor6 wraps const methods with 6 argument(s).
+ * Use the convenience function mem_fun() to create an instance of const_mem_functor6.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ * - @e T_arg3 Argument type used in the definition of operator()().
+ * - @e T_arg4 Argument type used in the definition of operator()().
+ * - @e T_arg5 Argument type used in the definition of operator()().
+ * - @e T_arg6 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+class const_mem_functor6 : public functor_base
+{
+public:
+ typedef T_return (T_obj::*function_type)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) const;
+ typedef T_return result_type;
+
+ /// Constructs an invalid functor.
+ const_mem_functor6() : func_ptr_(0) {}
+
+ /** Constructs a const_mem_functor6 object that wraps the passed method.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ explicit const_mem_functor6(function_type _A_func) : func_ptr_(_A_func) {}
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Pointer to instance the method should operate on.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @param _A_a4 Argument to be passed on to the method.
+ * @param _A_a5 Argument to be passed on to the method.
+ * @param _A_a6 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(const T_obj* _A_obj, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5,typename type_trait<T_arg6>::take _A_a6) const
+ { return (_A_obj->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6); }
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Reference to instance the method should operate on.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @param _A_a4 Argument to be passed on to the method.
+ * @param _A_a5 Argument to be passed on to the method.
+ * @param _A_a6 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(const T_obj& _A_obj, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5,typename type_trait<T_arg6>::take _A_a6) const
+ { return (_A_obj.*func_ptr_)(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6); }
+
+protected:
+ function_type func_ptr_;
+};
+
+/** const_mem_functor7 wraps const methods with 7 argument(s).
+ * Use the convenience function mem_fun() to create an instance of const_mem_functor7.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ * - @e T_arg3 Argument type used in the definition of operator()().
+ * - @e T_arg4 Argument type used in the definition of operator()().
+ * - @e T_arg5 Argument type used in the definition of operator()().
+ * - @e T_arg6 Argument type used in the definition of operator()().
+ * - @e T_arg7 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+class const_mem_functor7 : public functor_base
+{
+public:
+ typedef T_return (T_obj::*function_type)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) const;
+ typedef T_return result_type;
+
+ /// Constructs an invalid functor.
+ const_mem_functor7() : func_ptr_(0) {}
+
+ /** Constructs a const_mem_functor7 object that wraps the passed method.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ explicit const_mem_functor7(function_type _A_func) : func_ptr_(_A_func) {}
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Pointer to instance the method should operate on.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @param _A_a4 Argument to be passed on to the method.
+ * @param _A_a5 Argument to be passed on to the method.
+ * @param _A_a6 Argument to be passed on to the method.
+ * @param _A_a7 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(const T_obj* _A_obj, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5,typename type_trait<T_arg6>::take _A_a6,typename type_trait<T_arg7>::take _A_a7) const
+ { return (_A_obj->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7); }
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Reference to instance the method should operate on.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @param _A_a4 Argument to be passed on to the method.
+ * @param _A_a5 Argument to be passed on to the method.
+ * @param _A_a6 Argument to be passed on to the method.
+ * @param _A_a7 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(const T_obj& _A_obj, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5,typename type_trait<T_arg6>::take _A_a6,typename type_trait<T_arg7>::take _A_a7) const
+ { return (_A_obj.*func_ptr_)(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7); }
+
+protected:
+ function_type func_ptr_;
+};
+
+/** volatile_mem_functor0 wraps volatile methods with 0 argument(s).
+ * Use the convenience function mem_fun() to create an instance of volatile_mem_functor0.
+ *
+ * The following template arguments are used:
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj>
+class volatile_mem_functor0 : public functor_base
+{
+public:
+ typedef T_return (T_obj::*function_type)() volatile;
+ typedef T_return result_type;
+
+ /// Constructs an invalid functor.
+ volatile_mem_functor0() : func_ptr_(0) {}
+
+ /** Constructs a volatile_mem_functor0 object that wraps the passed method.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ explicit volatile_mem_functor0(function_type _A_func) : func_ptr_(_A_func) {}
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Pointer to instance the method should operate on.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(T_obj* _A_obj) const
+ { return (_A_obj->*(this->func_ptr_))(); }
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Reference to instance the method should operate on.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(T_obj& _A_obj) const
+ { return (_A_obj.*func_ptr_)(); }
+
+protected:
+ function_type func_ptr_;
+};
+
+/** volatile_mem_functor1 wraps volatile methods with 1 argument(s).
+ * Use the convenience function mem_fun() to create an instance of volatile_mem_functor1.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_arg1>
+class volatile_mem_functor1 : public functor_base
+{
+public:
+ typedef T_return (T_obj::*function_type)(T_arg1) volatile;
+ typedef T_return result_type;
+
+ /// Constructs an invalid functor.
+ volatile_mem_functor1() : func_ptr_(0) {}
+
+ /** Constructs a volatile_mem_functor1 object that wraps the passed method.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ explicit volatile_mem_functor1(function_type _A_func) : func_ptr_(_A_func) {}
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Pointer to instance the method should operate on.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(T_obj* _A_obj, typename type_trait<T_arg1>::take _A_a1) const
+ { return (_A_obj->*(this->func_ptr_))(_A_a1); }
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Reference to instance the method should operate on.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(T_obj& _A_obj, typename type_trait<T_arg1>::take _A_a1) const
+ { return (_A_obj.*func_ptr_)(_A_a1); }
+
+protected:
+ function_type func_ptr_;
+};
+
+/** volatile_mem_functor2 wraps volatile methods with 2 argument(s).
+ * Use the convenience function mem_fun() to create an instance of volatile_mem_functor2.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2>
+class volatile_mem_functor2 : public functor_base
+{
+public:
+ typedef T_return (T_obj::*function_type)(T_arg1,T_arg2) volatile;
+ typedef T_return result_type;
+
+ /// Constructs an invalid functor.
+ volatile_mem_functor2() : func_ptr_(0) {}
+
+ /** Constructs a volatile_mem_functor2 object that wraps the passed method.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ explicit volatile_mem_functor2(function_type _A_func) : func_ptr_(_A_func) {}
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Pointer to instance the method should operate on.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(T_obj* _A_obj, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2) const
+ { return (_A_obj->*(this->func_ptr_))(_A_a1,_A_a2); }
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Reference to instance the method should operate on.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(T_obj& _A_obj, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2) const
+ { return (_A_obj.*func_ptr_)(_A_a1,_A_a2); }
+
+protected:
+ function_type func_ptr_;
+};
+
+/** volatile_mem_functor3 wraps volatile methods with 3 argument(s).
+ * Use the convenience function mem_fun() to create an instance of volatile_mem_functor3.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ * - @e T_arg3 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3>
+class volatile_mem_functor3 : public functor_base
+{
+public:
+ typedef T_return (T_obj::*function_type)(T_arg1,T_arg2,T_arg3) volatile;
+ typedef T_return result_type;
+
+ /// Constructs an invalid functor.
+ volatile_mem_functor3() : func_ptr_(0) {}
+
+ /** Constructs a volatile_mem_functor3 object that wraps the passed method.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ explicit volatile_mem_functor3(function_type _A_func) : func_ptr_(_A_func) {}
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Pointer to instance the method should operate on.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(T_obj* _A_obj, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3) const
+ { return (_A_obj->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3); }
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Reference to instance the method should operate on.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(T_obj& _A_obj, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3) const
+ { return (_A_obj.*func_ptr_)(_A_a1,_A_a2,_A_a3); }
+
+protected:
+ function_type func_ptr_;
+};
+
+/** volatile_mem_functor4 wraps volatile methods with 4 argument(s).
+ * Use the convenience function mem_fun() to create an instance of volatile_mem_functor4.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ * - @e T_arg3 Argument type used in the definition of operator()().
+ * - @e T_arg4 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+class volatile_mem_functor4 : public functor_base
+{
+public:
+ typedef T_return (T_obj::*function_type)(T_arg1,T_arg2,T_arg3,T_arg4) volatile;
+ typedef T_return result_type;
+
+ /// Constructs an invalid functor.
+ volatile_mem_functor4() : func_ptr_(0) {}
+
+ /** Constructs a volatile_mem_functor4 object that wraps the passed method.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ explicit volatile_mem_functor4(function_type _A_func) : func_ptr_(_A_func) {}
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Pointer to instance the method should operate on.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @param _A_a4 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(T_obj* _A_obj, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4) const
+ { return (_A_obj->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4); }
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Reference to instance the method should operate on.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @param _A_a4 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(T_obj& _A_obj, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4) const
+ { return (_A_obj.*func_ptr_)(_A_a1,_A_a2,_A_a3,_A_a4); }
+
+protected:
+ function_type func_ptr_;
+};
+
+/** volatile_mem_functor5 wraps volatile methods with 5 argument(s).
+ * Use the convenience function mem_fun() to create an instance of volatile_mem_functor5.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ * - @e T_arg3 Argument type used in the definition of operator()().
+ * - @e T_arg4 Argument type used in the definition of operator()().
+ * - @e T_arg5 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+class volatile_mem_functor5 : public functor_base
+{
+public:
+ typedef T_return (T_obj::*function_type)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) volatile;
+ typedef T_return result_type;
+
+ /// Constructs an invalid functor.
+ volatile_mem_functor5() : func_ptr_(0) {}
+
+ /** Constructs a volatile_mem_functor5 object that wraps the passed method.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ explicit volatile_mem_functor5(function_type _A_func) : func_ptr_(_A_func) {}
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Pointer to instance the method should operate on.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @param _A_a4 Argument to be passed on to the method.
+ * @param _A_a5 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(T_obj* _A_obj, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5) const
+ { return (_A_obj->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5); }
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Reference to instance the method should operate on.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @param _A_a4 Argument to be passed on to the method.
+ * @param _A_a5 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(T_obj& _A_obj, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5) const
+ { return (_A_obj.*func_ptr_)(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5); }
+
+protected:
+ function_type func_ptr_;
+};
+
+/** volatile_mem_functor6 wraps volatile methods with 6 argument(s).
+ * Use the convenience function mem_fun() to create an instance of volatile_mem_functor6.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ * - @e T_arg3 Argument type used in the definition of operator()().
+ * - @e T_arg4 Argument type used in the definition of operator()().
+ * - @e T_arg5 Argument type used in the definition of operator()().
+ * - @e T_arg6 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+class volatile_mem_functor6 : public functor_base
+{
+public:
+ typedef T_return (T_obj::*function_type)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) volatile;
+ typedef T_return result_type;
+
+ /// Constructs an invalid functor.
+ volatile_mem_functor6() : func_ptr_(0) {}
+
+ /** Constructs a volatile_mem_functor6 object that wraps the passed method.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ explicit volatile_mem_functor6(function_type _A_func) : func_ptr_(_A_func) {}
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Pointer to instance the method should operate on.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @param _A_a4 Argument to be passed on to the method.
+ * @param _A_a5 Argument to be passed on to the method.
+ * @param _A_a6 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(T_obj* _A_obj, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5,typename type_trait<T_arg6>::take _A_a6) const
+ { return (_A_obj->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6); }
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Reference to instance the method should operate on.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @param _A_a4 Argument to be passed on to the method.
+ * @param _A_a5 Argument to be passed on to the method.
+ * @param _A_a6 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(T_obj& _A_obj, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5,typename type_trait<T_arg6>::take _A_a6) const
+ { return (_A_obj.*func_ptr_)(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6); }
+
+protected:
+ function_type func_ptr_;
+};
+
+/** volatile_mem_functor7 wraps volatile methods with 7 argument(s).
+ * Use the convenience function mem_fun() to create an instance of volatile_mem_functor7.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ * - @e T_arg3 Argument type used in the definition of operator()().
+ * - @e T_arg4 Argument type used in the definition of operator()().
+ * - @e T_arg5 Argument type used in the definition of operator()().
+ * - @e T_arg6 Argument type used in the definition of operator()().
+ * - @e T_arg7 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+class volatile_mem_functor7 : public functor_base
+{
+public:
+ typedef T_return (T_obj::*function_type)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) volatile;
+ typedef T_return result_type;
+
+ /// Constructs an invalid functor.
+ volatile_mem_functor7() : func_ptr_(0) {}
+
+ /** Constructs a volatile_mem_functor7 object that wraps the passed method.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ explicit volatile_mem_functor7(function_type _A_func) : func_ptr_(_A_func) {}
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Pointer to instance the method should operate on.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @param _A_a4 Argument to be passed on to the method.
+ * @param _A_a5 Argument to be passed on to the method.
+ * @param _A_a6 Argument to be passed on to the method.
+ * @param _A_a7 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(T_obj* _A_obj, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5,typename type_trait<T_arg6>::take _A_a6,typename type_trait<T_arg7>::take _A_a7) const
+ { return (_A_obj->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7); }
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Reference to instance the method should operate on.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @param _A_a4 Argument to be passed on to the method.
+ * @param _A_a5 Argument to be passed on to the method.
+ * @param _A_a6 Argument to be passed on to the method.
+ * @param _A_a7 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(T_obj& _A_obj, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5,typename type_trait<T_arg6>::take _A_a6,typename type_trait<T_arg7>::take _A_a7) const
+ { return (_A_obj.*func_ptr_)(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7); }
+
+protected:
+ function_type func_ptr_;
+};
+
+/** const_volatile_mem_functor0 wraps const volatile methods with 0 argument(s).
+ * Use the convenience function mem_fun() to create an instance of const_volatile_mem_functor0.
+ *
+ * The following template arguments are used:
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj>
+class const_volatile_mem_functor0 : public functor_base
+{
+public:
+ typedef T_return (T_obj::*function_type)() const volatile;
+ typedef T_return result_type;
+
+ /// Constructs an invalid functor.
+ const_volatile_mem_functor0() : func_ptr_(0) {}
+
+ /** Constructs a const_volatile_mem_functor0 object that wraps the passed method.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ explicit const_volatile_mem_functor0(function_type _A_func) : func_ptr_(_A_func) {}
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Pointer to instance the method should operate on.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(const T_obj* _A_obj) const
+ { return (_A_obj->*(this->func_ptr_))(); }
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Reference to instance the method should operate on.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(const T_obj& _A_obj) const
+ { return (_A_obj.*func_ptr_)(); }
+
+protected:
+ function_type func_ptr_;
+};
+
+/** const_volatile_mem_functor1 wraps const volatile methods with 1 argument(s).
+ * Use the convenience function mem_fun() to create an instance of const_volatile_mem_functor1.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_arg1>
+class const_volatile_mem_functor1 : public functor_base
+{
+public:
+ typedef T_return (T_obj::*function_type)(T_arg1) const volatile;
+ typedef T_return result_type;
+
+ /// Constructs an invalid functor.
+ const_volatile_mem_functor1() : func_ptr_(0) {}
+
+ /** Constructs a const_volatile_mem_functor1 object that wraps the passed method.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ explicit const_volatile_mem_functor1(function_type _A_func) : func_ptr_(_A_func) {}
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Pointer to instance the method should operate on.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(const T_obj* _A_obj, typename type_trait<T_arg1>::take _A_a1) const
+ { return (_A_obj->*(this->func_ptr_))(_A_a1); }
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Reference to instance the method should operate on.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(const T_obj& _A_obj, typename type_trait<T_arg1>::take _A_a1) const
+ { return (_A_obj.*func_ptr_)(_A_a1); }
+
+protected:
+ function_type func_ptr_;
+};
+
+/** const_volatile_mem_functor2 wraps const volatile methods with 2 argument(s).
+ * Use the convenience function mem_fun() to create an instance of const_volatile_mem_functor2.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2>
+class const_volatile_mem_functor2 : public functor_base
+{
+public:
+ typedef T_return (T_obj::*function_type)(T_arg1,T_arg2) const volatile;
+ typedef T_return result_type;
+
+ /// Constructs an invalid functor.
+ const_volatile_mem_functor2() : func_ptr_(0) {}
+
+ /** Constructs a const_volatile_mem_functor2 object that wraps the passed method.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ explicit const_volatile_mem_functor2(function_type _A_func) : func_ptr_(_A_func) {}
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Pointer to instance the method should operate on.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(const T_obj* _A_obj, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2) const
+ { return (_A_obj->*(this->func_ptr_))(_A_a1,_A_a2); }
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Reference to instance the method should operate on.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(const T_obj& _A_obj, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2) const
+ { return (_A_obj.*func_ptr_)(_A_a1,_A_a2); }
+
+protected:
+ function_type func_ptr_;
+};
+
+/** const_volatile_mem_functor3 wraps const volatile methods with 3 argument(s).
+ * Use the convenience function mem_fun() to create an instance of const_volatile_mem_functor3.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ * - @e T_arg3 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3>
+class const_volatile_mem_functor3 : public functor_base
+{
+public:
+ typedef T_return (T_obj::*function_type)(T_arg1,T_arg2,T_arg3) const volatile;
+ typedef T_return result_type;
+
+ /// Constructs an invalid functor.
+ const_volatile_mem_functor3() : func_ptr_(0) {}
+
+ /** Constructs a const_volatile_mem_functor3 object that wraps the passed method.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ explicit const_volatile_mem_functor3(function_type _A_func) : func_ptr_(_A_func) {}
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Pointer to instance the method should operate on.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(const T_obj* _A_obj, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3) const
+ { return (_A_obj->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3); }
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Reference to instance the method should operate on.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(const T_obj& _A_obj, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3) const
+ { return (_A_obj.*func_ptr_)(_A_a1,_A_a2,_A_a3); }
+
+protected:
+ function_type func_ptr_;
+};
+
+/** const_volatile_mem_functor4 wraps const volatile methods with 4 argument(s).
+ * Use the convenience function mem_fun() to create an instance of const_volatile_mem_functor4.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ * - @e T_arg3 Argument type used in the definition of operator()().
+ * - @e T_arg4 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+class const_volatile_mem_functor4 : public functor_base
+{
+public:
+ typedef T_return (T_obj::*function_type)(T_arg1,T_arg2,T_arg3,T_arg4) const volatile;
+ typedef T_return result_type;
+
+ /// Constructs an invalid functor.
+ const_volatile_mem_functor4() : func_ptr_(0) {}
+
+ /** Constructs a const_volatile_mem_functor4 object that wraps the passed method.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ explicit const_volatile_mem_functor4(function_type _A_func) : func_ptr_(_A_func) {}
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Pointer to instance the method should operate on.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @param _A_a4 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(const T_obj* _A_obj, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4) const
+ { return (_A_obj->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4); }
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Reference to instance the method should operate on.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @param _A_a4 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(const T_obj& _A_obj, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4) const
+ { return (_A_obj.*func_ptr_)(_A_a1,_A_a2,_A_a3,_A_a4); }
+
+protected:
+ function_type func_ptr_;
+};
+
+/** const_volatile_mem_functor5 wraps const volatile methods with 5 argument(s).
+ * Use the convenience function mem_fun() to create an instance of const_volatile_mem_functor5.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ * - @e T_arg3 Argument type used in the definition of operator()().
+ * - @e T_arg4 Argument type used in the definition of operator()().
+ * - @e T_arg5 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+class const_volatile_mem_functor5 : public functor_base
+{
+public:
+ typedef T_return (T_obj::*function_type)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) const volatile;
+ typedef T_return result_type;
+
+ /// Constructs an invalid functor.
+ const_volatile_mem_functor5() : func_ptr_(0) {}
+
+ /** Constructs a const_volatile_mem_functor5 object that wraps the passed method.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ explicit const_volatile_mem_functor5(function_type _A_func) : func_ptr_(_A_func) {}
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Pointer to instance the method should operate on.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @param _A_a4 Argument to be passed on to the method.
+ * @param _A_a5 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(const T_obj* _A_obj, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5) const
+ { return (_A_obj->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5); }
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Reference to instance the method should operate on.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @param _A_a4 Argument to be passed on to the method.
+ * @param _A_a5 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(const T_obj& _A_obj, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5) const
+ { return (_A_obj.*func_ptr_)(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5); }
+
+protected:
+ function_type func_ptr_;
+};
+
+/** const_volatile_mem_functor6 wraps const volatile methods with 6 argument(s).
+ * Use the convenience function mem_fun() to create an instance of const_volatile_mem_functor6.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ * - @e T_arg3 Argument type used in the definition of operator()().
+ * - @e T_arg4 Argument type used in the definition of operator()().
+ * - @e T_arg5 Argument type used in the definition of operator()().
+ * - @e T_arg6 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+class const_volatile_mem_functor6 : public functor_base
+{
+public:
+ typedef T_return (T_obj::*function_type)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) const volatile;
+ typedef T_return result_type;
+
+ /// Constructs an invalid functor.
+ const_volatile_mem_functor6() : func_ptr_(0) {}
+
+ /** Constructs a const_volatile_mem_functor6 object that wraps the passed method.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ explicit const_volatile_mem_functor6(function_type _A_func) : func_ptr_(_A_func) {}
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Pointer to instance the method should operate on.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @param _A_a4 Argument to be passed on to the method.
+ * @param _A_a5 Argument to be passed on to the method.
+ * @param _A_a6 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(const T_obj* _A_obj, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5,typename type_trait<T_arg6>::take _A_a6) const
+ { return (_A_obj->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6); }
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Reference to instance the method should operate on.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @param _A_a4 Argument to be passed on to the method.
+ * @param _A_a5 Argument to be passed on to the method.
+ * @param _A_a6 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(const T_obj& _A_obj, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5,typename type_trait<T_arg6>::take _A_a6) const
+ { return (_A_obj.*func_ptr_)(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6); }
+
+protected:
+ function_type func_ptr_;
+};
+
+/** const_volatile_mem_functor7 wraps const volatile methods with 7 argument(s).
+ * Use the convenience function mem_fun() to create an instance of const_volatile_mem_functor7.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ * - @e T_arg3 Argument type used in the definition of operator()().
+ * - @e T_arg4 Argument type used in the definition of operator()().
+ * - @e T_arg5 Argument type used in the definition of operator()().
+ * - @e T_arg6 Argument type used in the definition of operator()().
+ * - @e T_arg7 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+class const_volatile_mem_functor7 : public functor_base
+{
+public:
+ typedef T_return (T_obj::*function_type)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) const volatile;
+ typedef T_return result_type;
+
+ /// Constructs an invalid functor.
+ const_volatile_mem_functor7() : func_ptr_(0) {}
+
+ /** Constructs a const_volatile_mem_functor7 object that wraps the passed method.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ explicit const_volatile_mem_functor7(function_type _A_func) : func_ptr_(_A_func) {}
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Pointer to instance the method should operate on.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @param _A_a4 Argument to be passed on to the method.
+ * @param _A_a5 Argument to be passed on to the method.
+ * @param _A_a6 Argument to be passed on to the method.
+ * @param _A_a7 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(const T_obj* _A_obj, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5,typename type_trait<T_arg6>::take _A_a6,typename type_trait<T_arg7>::take _A_a7) const
+ { return (_A_obj->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7); }
+
+ /** Execute the wrapped method operating on the passed instance.
+ * @param _A_obj Reference to instance the method should operate on.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @param _A_a4 Argument to be passed on to the method.
+ * @param _A_a5 Argument to be passed on to the method.
+ * @param _A_a6 Argument to be passed on to the method.
+ * @param _A_a7 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(const T_obj& _A_obj, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5,typename type_trait<T_arg6>::take _A_a6,typename type_trait<T_arg7>::take _A_a7) const
+ { return (_A_obj.*func_ptr_)(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7); }
+
+protected:
+ function_type func_ptr_;
+};
+
+/** bound_mem_functor0 encapsulates a method with 0 arguments and an object instance.
+ * Use the convenience function mem_fun() to create an instance of bound_mem_functor0.
+ *
+ * The following template arguments are used:
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj>
+class bound_mem_functor0
+ : public mem_functor0<T_return, T_obj>
+{
+ typedef mem_functor0<T_return, T_obj> base_type_;
+public:
+ typedef typename base_type_::function_type function_type;
+
+ /** Constructs a bound_mem_functor0 object that wraps the passed method.
+ * @param _A_obj Pointer to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_mem_functor0( T_obj* _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(_A_obj) {}
+
+ /** Constructs a bound_mem_functor0 object that wraps the passed method.
+ * @param _A_obj Reference to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_mem_functor0( T_obj& _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+
+ /** Execute the wrapped method operating on the stored instance.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()() const
+ { return (obj_ptr_->*(this->func_ptr_))(); }
+
+//protected:
+ /// Pointer to stored object instance.
+ T_obj *obj_ptr_;
+};
+
+/** Performs a functor on each of the targets of a functor.
+ * The function overload for sigc::bound_mem_functor performs a functor
+ * on the object instance stored in the sigc::bound_mem_functor object.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_action, class T_return, class T_obj>
+void visit_each(const T_action& _A_action,
+ const bound_mem_functor0<T_return, T_obj>& _A_target)
+{
+ visit_each(_A_action, *_A_target.obj_ptr_);
+}
+
+/** bound_mem_functor1 encapsulates a method with 1 arguments and an object instance.
+ * Use the convenience function mem_fun() to create an instance of bound_mem_functor1.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_arg1>
+class bound_mem_functor1
+ : public mem_functor1<T_return, T_obj, T_arg1>
+{
+ typedef mem_functor1<T_return, T_obj, T_arg1> base_type_;
+public:
+ typedef typename base_type_::function_type function_type;
+
+ /** Constructs a bound_mem_functor1 object that wraps the passed method.
+ * @param _A_obj Pointer to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_mem_functor1( T_obj* _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(_A_obj) {}
+
+ /** Constructs a bound_mem_functor1 object that wraps the passed method.
+ * @param _A_obj Reference to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_mem_functor1( T_obj& _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+
+ /** Execute the wrapped method operating on the stored instance.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(typename type_trait<T_arg1>::take _A_a1) const
+ { return (obj_ptr_->*(this->func_ptr_))(_A_a1); }
+
+//protected:
+ /// Pointer to stored object instance.
+ T_obj *obj_ptr_;
+};
+
+/** Performs a functor on each of the targets of a functor.
+ * The function overload for sigc::bound_mem_functor performs a functor
+ * on the object instance stored in the sigc::bound_mem_functor object.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_action, class T_return, class T_obj, class T_arg1>
+void visit_each(const T_action& _A_action,
+ const bound_mem_functor1<T_return, T_obj, T_arg1>& _A_target)
+{
+ visit_each(_A_action, *_A_target.obj_ptr_);
+}
+
+/** bound_mem_functor2 encapsulates a method with 2 arguments and an object instance.
+ * Use the convenience function mem_fun() to create an instance of bound_mem_functor2.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2>
+class bound_mem_functor2
+ : public mem_functor2<T_return, T_obj, T_arg1,T_arg2>
+{
+ typedef mem_functor2<T_return, T_obj, T_arg1,T_arg2> base_type_;
+public:
+ typedef typename base_type_::function_type function_type;
+
+ /** Constructs a bound_mem_functor2 object that wraps the passed method.
+ * @param _A_obj Pointer to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_mem_functor2( T_obj* _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(_A_obj) {}
+
+ /** Constructs a bound_mem_functor2 object that wraps the passed method.
+ * @param _A_obj Reference to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_mem_functor2( T_obj& _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+
+ /** Execute the wrapped method operating on the stored instance.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2) const
+ { return (obj_ptr_->*(this->func_ptr_))(_A_a1,_A_a2); }
+
+//protected:
+ /// Pointer to stored object instance.
+ T_obj *obj_ptr_;
+};
+
+/** Performs a functor on each of the targets of a functor.
+ * The function overload for sigc::bound_mem_functor performs a functor
+ * on the object instance stored in the sigc::bound_mem_functor object.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_action, class T_return, class T_obj, class T_arg1,class T_arg2>
+void visit_each(const T_action& _A_action,
+ const bound_mem_functor2<T_return, T_obj, T_arg1,T_arg2>& _A_target)
+{
+ visit_each(_A_action, *_A_target.obj_ptr_);
+}
+
+/** bound_mem_functor3 encapsulates a method with 3 arguments and an object instance.
+ * Use the convenience function mem_fun() to create an instance of bound_mem_functor3.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ * - @e T_arg3 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3>
+class bound_mem_functor3
+ : public mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>
+{
+ typedef mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3> base_type_;
+public:
+ typedef typename base_type_::function_type function_type;
+
+ /** Constructs a bound_mem_functor3 object that wraps the passed method.
+ * @param _A_obj Pointer to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_mem_functor3( T_obj* _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(_A_obj) {}
+
+ /** Constructs a bound_mem_functor3 object that wraps the passed method.
+ * @param _A_obj Reference to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_mem_functor3( T_obj& _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+
+ /** Execute the wrapped method operating on the stored instance.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3) const
+ { return (obj_ptr_->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3); }
+
+//protected:
+ /// Pointer to stored object instance.
+ T_obj *obj_ptr_;
+};
+
+/** Performs a functor on each of the targets of a functor.
+ * The function overload for sigc::bound_mem_functor performs a functor
+ * on the object instance stored in the sigc::bound_mem_functor object.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_action, class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3>
+void visit_each(const T_action& _A_action,
+ const bound_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>& _A_target)
+{
+ visit_each(_A_action, *_A_target.obj_ptr_);
+}
+
+/** bound_mem_functor4 encapsulates a method with 4 arguments and an object instance.
+ * Use the convenience function mem_fun() to create an instance of bound_mem_functor4.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ * - @e T_arg3 Argument type used in the definition of operator()().
+ * - @e T_arg4 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+class bound_mem_functor4
+ : public mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>
+{
+ typedef mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4> base_type_;
+public:
+ typedef typename base_type_::function_type function_type;
+
+ /** Constructs a bound_mem_functor4 object that wraps the passed method.
+ * @param _A_obj Pointer to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_mem_functor4( T_obj* _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(_A_obj) {}
+
+ /** Constructs a bound_mem_functor4 object that wraps the passed method.
+ * @param _A_obj Reference to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_mem_functor4( T_obj& _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+
+ /** Execute the wrapped method operating on the stored instance.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @param _A_a4 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4) const
+ { return (obj_ptr_->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4); }
+
+//protected:
+ /// Pointer to stored object instance.
+ T_obj *obj_ptr_;
+};
+
+/** Performs a functor on each of the targets of a functor.
+ * The function overload for sigc::bound_mem_functor performs a functor
+ * on the object instance stored in the sigc::bound_mem_functor object.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_action, class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+void visit_each(const T_action& _A_action,
+ const bound_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>& _A_target)
+{
+ visit_each(_A_action, *_A_target.obj_ptr_);
+}
+
+/** bound_mem_functor5 encapsulates a method with 5 arguments and an object instance.
+ * Use the convenience function mem_fun() to create an instance of bound_mem_functor5.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ * - @e T_arg3 Argument type used in the definition of operator()().
+ * - @e T_arg4 Argument type used in the definition of operator()().
+ * - @e T_arg5 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+class bound_mem_functor5
+ : public mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>
+{
+ typedef mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5> base_type_;
+public:
+ typedef typename base_type_::function_type function_type;
+
+ /** Constructs a bound_mem_functor5 object that wraps the passed method.
+ * @param _A_obj Pointer to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_mem_functor5( T_obj* _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(_A_obj) {}
+
+ /** Constructs a bound_mem_functor5 object that wraps the passed method.
+ * @param _A_obj Reference to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_mem_functor5( T_obj& _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+
+ /** Execute the wrapped method operating on the stored instance.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @param _A_a4 Argument to be passed on to the method.
+ * @param _A_a5 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5) const
+ { return (obj_ptr_->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5); }
+
+//protected:
+ /// Pointer to stored object instance.
+ T_obj *obj_ptr_;
+};
+
+/** Performs a functor on each of the targets of a functor.
+ * The function overload for sigc::bound_mem_functor performs a functor
+ * on the object instance stored in the sigc::bound_mem_functor object.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_action, class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+void visit_each(const T_action& _A_action,
+ const bound_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>& _A_target)
+{
+ visit_each(_A_action, *_A_target.obj_ptr_);
+}
+
+/** bound_mem_functor6 encapsulates a method with 6 arguments and an object instance.
+ * Use the convenience function mem_fun() to create an instance of bound_mem_functor6.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ * - @e T_arg3 Argument type used in the definition of operator()().
+ * - @e T_arg4 Argument type used in the definition of operator()().
+ * - @e T_arg5 Argument type used in the definition of operator()().
+ * - @e T_arg6 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+class bound_mem_functor6
+ : public mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>
+{
+ typedef mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6> base_type_;
+public:
+ typedef typename base_type_::function_type function_type;
+
+ /** Constructs a bound_mem_functor6 object that wraps the passed method.
+ * @param _A_obj Pointer to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_mem_functor6( T_obj* _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(_A_obj) {}
+
+ /** Constructs a bound_mem_functor6 object that wraps the passed method.
+ * @param _A_obj Reference to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_mem_functor6( T_obj& _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+
+ /** Execute the wrapped method operating on the stored instance.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @param _A_a4 Argument to be passed on to the method.
+ * @param _A_a5 Argument to be passed on to the method.
+ * @param _A_a6 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5,typename type_trait<T_arg6>::take _A_a6) const
+ { return (obj_ptr_->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6); }
+
+//protected:
+ /// Pointer to stored object instance.
+ T_obj *obj_ptr_;
+};
+
+/** Performs a functor on each of the targets of a functor.
+ * The function overload for sigc::bound_mem_functor performs a functor
+ * on the object instance stored in the sigc::bound_mem_functor object.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_action, class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+void visit_each(const T_action& _A_action,
+ const bound_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>& _A_target)
+{
+ visit_each(_A_action, *_A_target.obj_ptr_);
+}
+
+/** bound_mem_functor7 encapsulates a method with 7 arguments and an object instance.
+ * Use the convenience function mem_fun() to create an instance of bound_mem_functor7.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ * - @e T_arg3 Argument type used in the definition of operator()().
+ * - @e T_arg4 Argument type used in the definition of operator()().
+ * - @e T_arg5 Argument type used in the definition of operator()().
+ * - @e T_arg6 Argument type used in the definition of operator()().
+ * - @e T_arg7 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+class bound_mem_functor7
+ : public mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>
+{
+ typedef mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7> base_type_;
+public:
+ typedef typename base_type_::function_type function_type;
+
+ /** Constructs a bound_mem_functor7 object that wraps the passed method.
+ * @param _A_obj Pointer to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_mem_functor7( T_obj* _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(_A_obj) {}
+
+ /** Constructs a bound_mem_functor7 object that wraps the passed method.
+ * @param _A_obj Reference to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_mem_functor7( T_obj& _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+
+ /** Execute the wrapped method operating on the stored instance.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @param _A_a4 Argument to be passed on to the method.
+ * @param _A_a5 Argument to be passed on to the method.
+ * @param _A_a6 Argument to be passed on to the method.
+ * @param _A_a7 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5,typename type_trait<T_arg6>::take _A_a6,typename type_trait<T_arg7>::take _A_a7) const
+ { return (obj_ptr_->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7); }
+
+//protected:
+ /// Pointer to stored object instance.
+ T_obj *obj_ptr_;
+};
+
+/** Performs a functor on each of the targets of a functor.
+ * The function overload for sigc::bound_mem_functor performs a functor
+ * on the object instance stored in the sigc::bound_mem_functor object.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_action, class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+void visit_each(const T_action& _A_action,
+ const bound_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>& _A_target)
+{
+ visit_each(_A_action, *_A_target.obj_ptr_);
+}
+
+/** bound_const_mem_functor0 encapsulates a const method with 0 arguments and an object instance.
+ * Use the convenience function mem_fun() to create an instance of bound_const_mem_functor0.
+ *
+ * The following template arguments are used:
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj>
+class bound_const_mem_functor0
+ : public const_mem_functor0<T_return, T_obj>
+{
+ typedef const_mem_functor0<T_return, T_obj> base_type_;
+public:
+ typedef typename base_type_::function_type function_type;
+
+ /** Constructs a bound_const_mem_functor0 object that wraps the passed method.
+ * @param _A_obj Pointer to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_const_mem_functor0(const T_obj* _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(_A_obj) {}
+
+ /** Constructs a bound_const_mem_functor0 object that wraps the passed method.
+ * @param _A_obj Reference to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_const_mem_functor0(const T_obj& _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+
+ /** Execute the wrapped method operating on the stored instance.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()() const
+ { return (obj_ptr_->*(this->func_ptr_))(); }
+
+//protected:
+ /// Pointer to stored object instance.
+ const T_obj *obj_ptr_;
+};
+
+/** Performs a functor on each of the targets of a functor.
+ * The function overload for sigc::bound_const_mem_functor performs a functor
+ * on the object instance stored in the sigc::bound_const_mem_functor object.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_action, class T_return, class T_obj>
+void visit_each(const T_action& _A_action,
+ const bound_const_mem_functor0<T_return, T_obj>& _A_target)
+{
+ visit_each(_A_action, *_A_target.obj_ptr_);
+}
+
+/** bound_const_mem_functor1 encapsulates a const method with 1 arguments and an object instance.
+ * Use the convenience function mem_fun() to create an instance of bound_const_mem_functor1.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_arg1>
+class bound_const_mem_functor1
+ : public const_mem_functor1<T_return, T_obj, T_arg1>
+{
+ typedef const_mem_functor1<T_return, T_obj, T_arg1> base_type_;
+public:
+ typedef typename base_type_::function_type function_type;
+
+ /** Constructs a bound_const_mem_functor1 object that wraps the passed method.
+ * @param _A_obj Pointer to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_const_mem_functor1(const T_obj* _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(_A_obj) {}
+
+ /** Constructs a bound_const_mem_functor1 object that wraps the passed method.
+ * @param _A_obj Reference to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_const_mem_functor1(const T_obj& _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+
+ /** Execute the wrapped method operating on the stored instance.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(typename type_trait<T_arg1>::take _A_a1) const
+ { return (obj_ptr_->*(this->func_ptr_))(_A_a1); }
+
+//protected:
+ /// Pointer to stored object instance.
+ const T_obj *obj_ptr_;
+};
+
+/** Performs a functor on each of the targets of a functor.
+ * The function overload for sigc::bound_const_mem_functor performs a functor
+ * on the object instance stored in the sigc::bound_const_mem_functor object.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_action, class T_return, class T_obj, class T_arg1>
+void visit_each(const T_action& _A_action,
+ const bound_const_mem_functor1<T_return, T_obj, T_arg1>& _A_target)
+{
+ visit_each(_A_action, *_A_target.obj_ptr_);
+}
+
+/** bound_const_mem_functor2 encapsulates a const method with 2 arguments and an object instance.
+ * Use the convenience function mem_fun() to create an instance of bound_const_mem_functor2.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2>
+class bound_const_mem_functor2
+ : public const_mem_functor2<T_return, T_obj, T_arg1,T_arg2>
+{
+ typedef const_mem_functor2<T_return, T_obj, T_arg1,T_arg2> base_type_;
+public:
+ typedef typename base_type_::function_type function_type;
+
+ /** Constructs a bound_const_mem_functor2 object that wraps the passed method.
+ * @param _A_obj Pointer to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_const_mem_functor2(const T_obj* _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(_A_obj) {}
+
+ /** Constructs a bound_const_mem_functor2 object that wraps the passed method.
+ * @param _A_obj Reference to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_const_mem_functor2(const T_obj& _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+
+ /** Execute the wrapped method operating on the stored instance.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2) const
+ { return (obj_ptr_->*(this->func_ptr_))(_A_a1,_A_a2); }
+
+//protected:
+ /// Pointer to stored object instance.
+ const T_obj *obj_ptr_;
+};
+
+/** Performs a functor on each of the targets of a functor.
+ * The function overload for sigc::bound_const_mem_functor performs a functor
+ * on the object instance stored in the sigc::bound_const_mem_functor object.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_action, class T_return, class T_obj, class T_arg1,class T_arg2>
+void visit_each(const T_action& _A_action,
+ const bound_const_mem_functor2<T_return, T_obj, T_arg1,T_arg2>& _A_target)
+{
+ visit_each(_A_action, *_A_target.obj_ptr_);
+}
+
+/** bound_const_mem_functor3 encapsulates a const method with 3 arguments and an object instance.
+ * Use the convenience function mem_fun() to create an instance of bound_const_mem_functor3.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ * - @e T_arg3 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3>
+class bound_const_mem_functor3
+ : public const_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>
+{
+ typedef const_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3> base_type_;
+public:
+ typedef typename base_type_::function_type function_type;
+
+ /** Constructs a bound_const_mem_functor3 object that wraps the passed method.
+ * @param _A_obj Pointer to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_const_mem_functor3(const T_obj* _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(_A_obj) {}
+
+ /** Constructs a bound_const_mem_functor3 object that wraps the passed method.
+ * @param _A_obj Reference to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_const_mem_functor3(const T_obj& _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+
+ /** Execute the wrapped method operating on the stored instance.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3) const
+ { return (obj_ptr_->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3); }
+
+//protected:
+ /// Pointer to stored object instance.
+ const T_obj *obj_ptr_;
+};
+
+/** Performs a functor on each of the targets of a functor.
+ * The function overload for sigc::bound_const_mem_functor performs a functor
+ * on the object instance stored in the sigc::bound_const_mem_functor object.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_action, class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3>
+void visit_each(const T_action& _A_action,
+ const bound_const_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>& _A_target)
+{
+ visit_each(_A_action, *_A_target.obj_ptr_);
+}
+
+/** bound_const_mem_functor4 encapsulates a const method with 4 arguments and an object instance.
+ * Use the convenience function mem_fun() to create an instance of bound_const_mem_functor4.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ * - @e T_arg3 Argument type used in the definition of operator()().
+ * - @e T_arg4 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+class bound_const_mem_functor4
+ : public const_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>
+{
+ typedef const_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4> base_type_;
+public:
+ typedef typename base_type_::function_type function_type;
+
+ /** Constructs a bound_const_mem_functor4 object that wraps the passed method.
+ * @param _A_obj Pointer to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_const_mem_functor4(const T_obj* _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(_A_obj) {}
+
+ /** Constructs a bound_const_mem_functor4 object that wraps the passed method.
+ * @param _A_obj Reference to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_const_mem_functor4(const T_obj& _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+
+ /** Execute the wrapped method operating on the stored instance.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @param _A_a4 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4) const
+ { return (obj_ptr_->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4); }
+
+//protected:
+ /// Pointer to stored object instance.
+ const T_obj *obj_ptr_;
+};
+
+/** Performs a functor on each of the targets of a functor.
+ * The function overload for sigc::bound_const_mem_functor performs a functor
+ * on the object instance stored in the sigc::bound_const_mem_functor object.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_action, class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+void visit_each(const T_action& _A_action,
+ const bound_const_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>& _A_target)
+{
+ visit_each(_A_action, *_A_target.obj_ptr_);
+}
+
+/** bound_const_mem_functor5 encapsulates a const method with 5 arguments and an object instance.
+ * Use the convenience function mem_fun() to create an instance of bound_const_mem_functor5.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ * - @e T_arg3 Argument type used in the definition of operator()().
+ * - @e T_arg4 Argument type used in the definition of operator()().
+ * - @e T_arg5 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+class bound_const_mem_functor5
+ : public const_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>
+{
+ typedef const_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5> base_type_;
+public:
+ typedef typename base_type_::function_type function_type;
+
+ /** Constructs a bound_const_mem_functor5 object that wraps the passed method.
+ * @param _A_obj Pointer to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_const_mem_functor5(const T_obj* _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(_A_obj) {}
+
+ /** Constructs a bound_const_mem_functor5 object that wraps the passed method.
+ * @param _A_obj Reference to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_const_mem_functor5(const T_obj& _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+
+ /** Execute the wrapped method operating on the stored instance.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @param _A_a4 Argument to be passed on to the method.
+ * @param _A_a5 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5) const
+ { return (obj_ptr_->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5); }
+
+//protected:
+ /// Pointer to stored object instance.
+ const T_obj *obj_ptr_;
+};
+
+/** Performs a functor on each of the targets of a functor.
+ * The function overload for sigc::bound_const_mem_functor performs a functor
+ * on the object instance stored in the sigc::bound_const_mem_functor object.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_action, class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+void visit_each(const T_action& _A_action,
+ const bound_const_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>& _A_target)
+{
+ visit_each(_A_action, *_A_target.obj_ptr_);
+}
+
+/** bound_const_mem_functor6 encapsulates a const method with 6 arguments and an object instance.
+ * Use the convenience function mem_fun() to create an instance of bound_const_mem_functor6.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ * - @e T_arg3 Argument type used in the definition of operator()().
+ * - @e T_arg4 Argument type used in the definition of operator()().
+ * - @e T_arg5 Argument type used in the definition of operator()().
+ * - @e T_arg6 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+class bound_const_mem_functor6
+ : public const_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>
+{
+ typedef const_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6> base_type_;
+public:
+ typedef typename base_type_::function_type function_type;
+
+ /** Constructs a bound_const_mem_functor6 object that wraps the passed method.
+ * @param _A_obj Pointer to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_const_mem_functor6(const T_obj* _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(_A_obj) {}
+
+ /** Constructs a bound_const_mem_functor6 object that wraps the passed method.
+ * @param _A_obj Reference to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_const_mem_functor6(const T_obj& _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+
+ /** Execute the wrapped method operating on the stored instance.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @param _A_a4 Argument to be passed on to the method.
+ * @param _A_a5 Argument to be passed on to the method.
+ * @param _A_a6 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5,typename type_trait<T_arg6>::take _A_a6) const
+ { return (obj_ptr_->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6); }
+
+//protected:
+ /// Pointer to stored object instance.
+ const T_obj *obj_ptr_;
+};
+
+/** Performs a functor on each of the targets of a functor.
+ * The function overload for sigc::bound_const_mem_functor performs a functor
+ * on the object instance stored in the sigc::bound_const_mem_functor object.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_action, class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+void visit_each(const T_action& _A_action,
+ const bound_const_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>& _A_target)
+{
+ visit_each(_A_action, *_A_target.obj_ptr_);
+}
+
+/** bound_const_mem_functor7 encapsulates a const method with 7 arguments and an object instance.
+ * Use the convenience function mem_fun() to create an instance of bound_const_mem_functor7.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ * - @e T_arg3 Argument type used in the definition of operator()().
+ * - @e T_arg4 Argument type used in the definition of operator()().
+ * - @e T_arg5 Argument type used in the definition of operator()().
+ * - @e T_arg6 Argument type used in the definition of operator()().
+ * - @e T_arg7 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+class bound_const_mem_functor7
+ : public const_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>
+{
+ typedef const_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7> base_type_;
+public:
+ typedef typename base_type_::function_type function_type;
+
+ /** Constructs a bound_const_mem_functor7 object that wraps the passed method.
+ * @param _A_obj Pointer to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_const_mem_functor7(const T_obj* _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(_A_obj) {}
+
+ /** Constructs a bound_const_mem_functor7 object that wraps the passed method.
+ * @param _A_obj Reference to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_const_mem_functor7(const T_obj& _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+
+ /** Execute the wrapped method operating on the stored instance.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @param _A_a4 Argument to be passed on to the method.
+ * @param _A_a5 Argument to be passed on to the method.
+ * @param _A_a6 Argument to be passed on to the method.
+ * @param _A_a7 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5,typename type_trait<T_arg6>::take _A_a6,typename type_trait<T_arg7>::take _A_a7) const
+ { return (obj_ptr_->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7); }
+
+//protected:
+ /// Pointer to stored object instance.
+ const T_obj *obj_ptr_;
+};
+
+/** Performs a functor on each of the targets of a functor.
+ * The function overload for sigc::bound_const_mem_functor performs a functor
+ * on the object instance stored in the sigc::bound_const_mem_functor object.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_action, class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+void visit_each(const T_action& _A_action,
+ const bound_const_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>& _A_target)
+{
+ visit_each(_A_action, *_A_target.obj_ptr_);
+}
+
+/** bound_volatile_mem_functor0 encapsulates a volatile method with 0 arguments and an object instance.
+ * Use the convenience function mem_fun() to create an instance of bound_volatile_mem_functor0.
+ *
+ * The following template arguments are used:
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj>
+class bound_volatile_mem_functor0
+ : public volatile_mem_functor0<T_return, T_obj>
+{
+ typedef volatile_mem_functor0<T_return, T_obj> base_type_;
+public:
+ typedef typename base_type_::function_type function_type;
+
+ /** Constructs a bound_volatile_mem_functor0 object that wraps the passed method.
+ * @param _A_obj Pointer to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_volatile_mem_functor0( T_obj* _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(_A_obj) {}
+
+ /** Constructs a bound_volatile_mem_functor0 object that wraps the passed method.
+ * @param _A_obj Reference to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_volatile_mem_functor0( T_obj& _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+
+ /** Execute the wrapped method operating on the stored instance.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()() const
+ { return (obj_ptr_->*(this->func_ptr_))(); }
+
+//protected:
+ /// Pointer to stored object instance.
+ T_obj *obj_ptr_;
+};
+
+/** Performs a functor on each of the targets of a functor.
+ * The function overload for sigc::bound_volatile_mem_functor performs a functor
+ * on the object instance stored in the sigc::bound_volatile_mem_functor object.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_action, class T_return, class T_obj>
+void visit_each(const T_action& _A_action,
+ const bound_volatile_mem_functor0<T_return, T_obj>& _A_target)
+{
+ visit_each(_A_action, *_A_target.obj_ptr_);
+}
+
+/** bound_volatile_mem_functor1 encapsulates a volatile method with 1 arguments and an object instance.
+ * Use the convenience function mem_fun() to create an instance of bound_volatile_mem_functor1.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_arg1>
+class bound_volatile_mem_functor1
+ : public volatile_mem_functor1<T_return, T_obj, T_arg1>
+{
+ typedef volatile_mem_functor1<T_return, T_obj, T_arg1> base_type_;
+public:
+ typedef typename base_type_::function_type function_type;
+
+ /** Constructs a bound_volatile_mem_functor1 object that wraps the passed method.
+ * @param _A_obj Pointer to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_volatile_mem_functor1( T_obj* _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(_A_obj) {}
+
+ /** Constructs a bound_volatile_mem_functor1 object that wraps the passed method.
+ * @param _A_obj Reference to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_volatile_mem_functor1( T_obj& _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+
+ /** Execute the wrapped method operating on the stored instance.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(typename type_trait<T_arg1>::take _A_a1) const
+ { return (obj_ptr_->*(this->func_ptr_))(_A_a1); }
+
+//protected:
+ /// Pointer to stored object instance.
+ T_obj *obj_ptr_;
+};
+
+/** Performs a functor on each of the targets of a functor.
+ * The function overload for sigc::bound_volatile_mem_functor performs a functor
+ * on the object instance stored in the sigc::bound_volatile_mem_functor object.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_action, class T_return, class T_obj, class T_arg1>
+void visit_each(const T_action& _A_action,
+ const bound_volatile_mem_functor1<T_return, T_obj, T_arg1>& _A_target)
+{
+ visit_each(_A_action, *_A_target.obj_ptr_);
+}
+
+/** bound_volatile_mem_functor2 encapsulates a volatile method with 2 arguments and an object instance.
+ * Use the convenience function mem_fun() to create an instance of bound_volatile_mem_functor2.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2>
+class bound_volatile_mem_functor2
+ : public volatile_mem_functor2<T_return, T_obj, T_arg1,T_arg2>
+{
+ typedef volatile_mem_functor2<T_return, T_obj, T_arg1,T_arg2> base_type_;
+public:
+ typedef typename base_type_::function_type function_type;
+
+ /** Constructs a bound_volatile_mem_functor2 object that wraps the passed method.
+ * @param _A_obj Pointer to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_volatile_mem_functor2( T_obj* _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(_A_obj) {}
+
+ /** Constructs a bound_volatile_mem_functor2 object that wraps the passed method.
+ * @param _A_obj Reference to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_volatile_mem_functor2( T_obj& _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+
+ /** Execute the wrapped method operating on the stored instance.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2) const
+ { return (obj_ptr_->*(this->func_ptr_))(_A_a1,_A_a2); }
+
+//protected:
+ /// Pointer to stored object instance.
+ T_obj *obj_ptr_;
+};
+
+/** Performs a functor on each of the targets of a functor.
+ * The function overload for sigc::bound_volatile_mem_functor performs a functor
+ * on the object instance stored in the sigc::bound_volatile_mem_functor object.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_action, class T_return, class T_obj, class T_arg1,class T_arg2>
+void visit_each(const T_action& _A_action,
+ const bound_volatile_mem_functor2<T_return, T_obj, T_arg1,T_arg2>& _A_target)
+{
+ visit_each(_A_action, *_A_target.obj_ptr_);
+}
+
+/** bound_volatile_mem_functor3 encapsulates a volatile method with 3 arguments and an object instance.
+ * Use the convenience function mem_fun() to create an instance of bound_volatile_mem_functor3.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ * - @e T_arg3 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3>
+class bound_volatile_mem_functor3
+ : public volatile_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>
+{
+ typedef volatile_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3> base_type_;
+public:
+ typedef typename base_type_::function_type function_type;
+
+ /** Constructs a bound_volatile_mem_functor3 object that wraps the passed method.
+ * @param _A_obj Pointer to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_volatile_mem_functor3( T_obj* _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(_A_obj) {}
+
+ /** Constructs a bound_volatile_mem_functor3 object that wraps the passed method.
+ * @param _A_obj Reference to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_volatile_mem_functor3( T_obj& _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+
+ /** Execute the wrapped method operating on the stored instance.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3) const
+ { return (obj_ptr_->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3); }
+
+//protected:
+ /// Pointer to stored object instance.
+ T_obj *obj_ptr_;
+};
+
+/** Performs a functor on each of the targets of a functor.
+ * The function overload for sigc::bound_volatile_mem_functor performs a functor
+ * on the object instance stored in the sigc::bound_volatile_mem_functor object.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_action, class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3>
+void visit_each(const T_action& _A_action,
+ const bound_volatile_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>& _A_target)
+{
+ visit_each(_A_action, *_A_target.obj_ptr_);
+}
+
+/** bound_volatile_mem_functor4 encapsulates a volatile method with 4 arguments and an object instance.
+ * Use the convenience function mem_fun() to create an instance of bound_volatile_mem_functor4.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ * - @e T_arg3 Argument type used in the definition of operator()().
+ * - @e T_arg4 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+class bound_volatile_mem_functor4
+ : public volatile_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>
+{
+ typedef volatile_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4> base_type_;
+public:
+ typedef typename base_type_::function_type function_type;
+
+ /** Constructs a bound_volatile_mem_functor4 object that wraps the passed method.
+ * @param _A_obj Pointer to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_volatile_mem_functor4( T_obj* _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(_A_obj) {}
+
+ /** Constructs a bound_volatile_mem_functor4 object that wraps the passed method.
+ * @param _A_obj Reference to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_volatile_mem_functor4( T_obj& _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+
+ /** Execute the wrapped method operating on the stored instance.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @param _A_a4 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4) const
+ { return (obj_ptr_->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4); }
+
+//protected:
+ /// Pointer to stored object instance.
+ T_obj *obj_ptr_;
+};
+
+/** Performs a functor on each of the targets of a functor.
+ * The function overload for sigc::bound_volatile_mem_functor performs a functor
+ * on the object instance stored in the sigc::bound_volatile_mem_functor object.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_action, class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+void visit_each(const T_action& _A_action,
+ const bound_volatile_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>& _A_target)
+{
+ visit_each(_A_action, *_A_target.obj_ptr_);
+}
+
+/** bound_volatile_mem_functor5 encapsulates a volatile method with 5 arguments and an object instance.
+ * Use the convenience function mem_fun() to create an instance of bound_volatile_mem_functor5.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ * - @e T_arg3 Argument type used in the definition of operator()().
+ * - @e T_arg4 Argument type used in the definition of operator()().
+ * - @e T_arg5 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+class bound_volatile_mem_functor5
+ : public volatile_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>
+{
+ typedef volatile_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5> base_type_;
+public:
+ typedef typename base_type_::function_type function_type;
+
+ /** Constructs a bound_volatile_mem_functor5 object that wraps the passed method.
+ * @param _A_obj Pointer to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_volatile_mem_functor5( T_obj* _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(_A_obj) {}
+
+ /** Constructs a bound_volatile_mem_functor5 object that wraps the passed method.
+ * @param _A_obj Reference to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_volatile_mem_functor5( T_obj& _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+
+ /** Execute the wrapped method operating on the stored instance.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @param _A_a4 Argument to be passed on to the method.
+ * @param _A_a5 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5) const
+ { return (obj_ptr_->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5); }
+
+//protected:
+ /// Pointer to stored object instance.
+ T_obj *obj_ptr_;
+};
+
+/** Performs a functor on each of the targets of a functor.
+ * The function overload for sigc::bound_volatile_mem_functor performs a functor
+ * on the object instance stored in the sigc::bound_volatile_mem_functor object.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_action, class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+void visit_each(const T_action& _A_action,
+ const bound_volatile_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>& _A_target)
+{
+ visit_each(_A_action, *_A_target.obj_ptr_);
+}
+
+/** bound_volatile_mem_functor6 encapsulates a volatile method with 6 arguments and an object instance.
+ * Use the convenience function mem_fun() to create an instance of bound_volatile_mem_functor6.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ * - @e T_arg3 Argument type used in the definition of operator()().
+ * - @e T_arg4 Argument type used in the definition of operator()().
+ * - @e T_arg5 Argument type used in the definition of operator()().
+ * - @e T_arg6 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+class bound_volatile_mem_functor6
+ : public volatile_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>
+{
+ typedef volatile_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6> base_type_;
+public:
+ typedef typename base_type_::function_type function_type;
+
+ /** Constructs a bound_volatile_mem_functor6 object that wraps the passed method.
+ * @param _A_obj Pointer to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_volatile_mem_functor6( T_obj* _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(_A_obj) {}
+
+ /** Constructs a bound_volatile_mem_functor6 object that wraps the passed method.
+ * @param _A_obj Reference to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_volatile_mem_functor6( T_obj& _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+
+ /** Execute the wrapped method operating on the stored instance.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @param _A_a4 Argument to be passed on to the method.
+ * @param _A_a5 Argument to be passed on to the method.
+ * @param _A_a6 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5,typename type_trait<T_arg6>::take _A_a6) const
+ { return (obj_ptr_->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6); }
+
+//protected:
+ /// Pointer to stored object instance.
+ T_obj *obj_ptr_;
+};
+
+/** Performs a functor on each of the targets of a functor.
+ * The function overload for sigc::bound_volatile_mem_functor performs a functor
+ * on the object instance stored in the sigc::bound_volatile_mem_functor object.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_action, class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+void visit_each(const T_action& _A_action,
+ const bound_volatile_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>& _A_target)
+{
+ visit_each(_A_action, *_A_target.obj_ptr_);
+}
+
+/** bound_volatile_mem_functor7 encapsulates a volatile method with 7 arguments and an object instance.
+ * Use the convenience function mem_fun() to create an instance of bound_volatile_mem_functor7.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ * - @e T_arg3 Argument type used in the definition of operator()().
+ * - @e T_arg4 Argument type used in the definition of operator()().
+ * - @e T_arg5 Argument type used in the definition of operator()().
+ * - @e T_arg6 Argument type used in the definition of operator()().
+ * - @e T_arg7 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+class bound_volatile_mem_functor7
+ : public volatile_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>
+{
+ typedef volatile_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7> base_type_;
+public:
+ typedef typename base_type_::function_type function_type;
+
+ /** Constructs a bound_volatile_mem_functor7 object that wraps the passed method.
+ * @param _A_obj Pointer to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_volatile_mem_functor7( T_obj* _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(_A_obj) {}
+
+ /** Constructs a bound_volatile_mem_functor7 object that wraps the passed method.
+ * @param _A_obj Reference to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_volatile_mem_functor7( T_obj& _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+
+ /** Execute the wrapped method operating on the stored instance.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @param _A_a4 Argument to be passed on to the method.
+ * @param _A_a5 Argument to be passed on to the method.
+ * @param _A_a6 Argument to be passed on to the method.
+ * @param _A_a7 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5,typename type_trait<T_arg6>::take _A_a6,typename type_trait<T_arg7>::take _A_a7) const
+ { return (obj_ptr_->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7); }
+
+//protected:
+ /// Pointer to stored object instance.
+ T_obj *obj_ptr_;
+};
+
+/** Performs a functor on each of the targets of a functor.
+ * The function overload for sigc::bound_volatile_mem_functor performs a functor
+ * on the object instance stored in the sigc::bound_volatile_mem_functor object.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_action, class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+void visit_each(const T_action& _A_action,
+ const bound_volatile_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>& _A_target)
+{
+ visit_each(_A_action, *_A_target.obj_ptr_);
+}
+
+/** bound_const_volatile_mem_functor0 encapsulates a const volatile method with 0 arguments and an object instance.
+ * Use the convenience function mem_fun() to create an instance of bound_const_volatile_mem_functor0.
+ *
+ * The following template arguments are used:
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj>
+class bound_const_volatile_mem_functor0
+ : public const_volatile_mem_functor0<T_return, T_obj>
+{
+ typedef const_volatile_mem_functor0<T_return, T_obj> base_type_;
+public:
+ typedef typename base_type_::function_type function_type;
+
+ /** Constructs a bound_const_volatile_mem_functor0 object that wraps the passed method.
+ * @param _A_obj Pointer to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_const_volatile_mem_functor0(const T_obj* _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(_A_obj) {}
+
+ /** Constructs a bound_const_volatile_mem_functor0 object that wraps the passed method.
+ * @param _A_obj Reference to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_const_volatile_mem_functor0(const T_obj& _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+
+ /** Execute the wrapped method operating on the stored instance.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()() const
+ { return (obj_ptr_->*(this->func_ptr_))(); }
+
+//protected:
+ /// Pointer to stored object instance.
+ const T_obj *obj_ptr_;
+};
+
+/** Performs a functor on each of the targets of a functor.
+ * The function overload for sigc::bound_const_volatile_mem_functor performs a functor
+ * on the object instance stored in the sigc::bound_const_volatile_mem_functor object.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_action, class T_return, class T_obj>
+void visit_each(const T_action& _A_action,
+ const bound_const_volatile_mem_functor0<T_return, T_obj>& _A_target)
+{
+ visit_each(_A_action, *_A_target.obj_ptr_);
+}
+
+/** bound_const_volatile_mem_functor1 encapsulates a const volatile method with 1 arguments and an object instance.
+ * Use the convenience function mem_fun() to create an instance of bound_const_volatile_mem_functor1.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_arg1>
+class bound_const_volatile_mem_functor1
+ : public const_volatile_mem_functor1<T_return, T_obj, T_arg1>
+{
+ typedef const_volatile_mem_functor1<T_return, T_obj, T_arg1> base_type_;
+public:
+ typedef typename base_type_::function_type function_type;
+
+ /** Constructs a bound_const_volatile_mem_functor1 object that wraps the passed method.
+ * @param _A_obj Pointer to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_const_volatile_mem_functor1(const T_obj* _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(_A_obj) {}
+
+ /** Constructs a bound_const_volatile_mem_functor1 object that wraps the passed method.
+ * @param _A_obj Reference to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_const_volatile_mem_functor1(const T_obj& _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+
+ /** Execute the wrapped method operating on the stored instance.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(typename type_trait<T_arg1>::take _A_a1) const
+ { return (obj_ptr_->*(this->func_ptr_))(_A_a1); }
+
+//protected:
+ /// Pointer to stored object instance.
+ const T_obj *obj_ptr_;
+};
+
+/** Performs a functor on each of the targets of a functor.
+ * The function overload for sigc::bound_const_volatile_mem_functor performs a functor
+ * on the object instance stored in the sigc::bound_const_volatile_mem_functor object.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_action, class T_return, class T_obj, class T_arg1>
+void visit_each(const T_action& _A_action,
+ const bound_const_volatile_mem_functor1<T_return, T_obj, T_arg1>& _A_target)
+{
+ visit_each(_A_action, *_A_target.obj_ptr_);
+}
+
+/** bound_const_volatile_mem_functor2 encapsulates a const volatile method with 2 arguments and an object instance.
+ * Use the convenience function mem_fun() to create an instance of bound_const_volatile_mem_functor2.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2>
+class bound_const_volatile_mem_functor2
+ : public const_volatile_mem_functor2<T_return, T_obj, T_arg1,T_arg2>
+{
+ typedef const_volatile_mem_functor2<T_return, T_obj, T_arg1,T_arg2> base_type_;
+public:
+ typedef typename base_type_::function_type function_type;
+
+ /** Constructs a bound_const_volatile_mem_functor2 object that wraps the passed method.
+ * @param _A_obj Pointer to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_const_volatile_mem_functor2(const T_obj* _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(_A_obj) {}
+
+ /** Constructs a bound_const_volatile_mem_functor2 object that wraps the passed method.
+ * @param _A_obj Reference to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_const_volatile_mem_functor2(const T_obj& _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+
+ /** Execute the wrapped method operating on the stored instance.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2) const
+ { return (obj_ptr_->*(this->func_ptr_))(_A_a1,_A_a2); }
+
+//protected:
+ /// Pointer to stored object instance.
+ const T_obj *obj_ptr_;
+};
+
+/** Performs a functor on each of the targets of a functor.
+ * The function overload for sigc::bound_const_volatile_mem_functor performs a functor
+ * on the object instance stored in the sigc::bound_const_volatile_mem_functor object.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_action, class T_return, class T_obj, class T_arg1,class T_arg2>
+void visit_each(const T_action& _A_action,
+ const bound_const_volatile_mem_functor2<T_return, T_obj, T_arg1,T_arg2>& _A_target)
+{
+ visit_each(_A_action, *_A_target.obj_ptr_);
+}
+
+/** bound_const_volatile_mem_functor3 encapsulates a const volatile method with 3 arguments and an object instance.
+ * Use the convenience function mem_fun() to create an instance of bound_const_volatile_mem_functor3.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ * - @e T_arg3 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3>
+class bound_const_volatile_mem_functor3
+ : public const_volatile_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>
+{
+ typedef const_volatile_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3> base_type_;
+public:
+ typedef typename base_type_::function_type function_type;
+
+ /** Constructs a bound_const_volatile_mem_functor3 object that wraps the passed method.
+ * @param _A_obj Pointer to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_const_volatile_mem_functor3(const T_obj* _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(_A_obj) {}
+
+ /** Constructs a bound_const_volatile_mem_functor3 object that wraps the passed method.
+ * @param _A_obj Reference to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_const_volatile_mem_functor3(const T_obj& _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+
+ /** Execute the wrapped method operating on the stored instance.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3) const
+ { return (obj_ptr_->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3); }
+
+//protected:
+ /// Pointer to stored object instance.
+ const T_obj *obj_ptr_;
+};
+
+/** Performs a functor on each of the targets of a functor.
+ * The function overload for sigc::bound_const_volatile_mem_functor performs a functor
+ * on the object instance stored in the sigc::bound_const_volatile_mem_functor object.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_action, class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3>
+void visit_each(const T_action& _A_action,
+ const bound_const_volatile_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>& _A_target)
+{
+ visit_each(_A_action, *_A_target.obj_ptr_);
+}
+
+/** bound_const_volatile_mem_functor4 encapsulates a const volatile method with 4 arguments and an object instance.
+ * Use the convenience function mem_fun() to create an instance of bound_const_volatile_mem_functor4.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ * - @e T_arg3 Argument type used in the definition of operator()().
+ * - @e T_arg4 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+class bound_const_volatile_mem_functor4
+ : public const_volatile_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>
+{
+ typedef const_volatile_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4> base_type_;
+public:
+ typedef typename base_type_::function_type function_type;
+
+ /** Constructs a bound_const_volatile_mem_functor4 object that wraps the passed method.
+ * @param _A_obj Pointer to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_const_volatile_mem_functor4(const T_obj* _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(_A_obj) {}
+
+ /** Constructs a bound_const_volatile_mem_functor4 object that wraps the passed method.
+ * @param _A_obj Reference to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_const_volatile_mem_functor4(const T_obj& _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+
+ /** Execute the wrapped method operating on the stored instance.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @param _A_a4 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4) const
+ { return (obj_ptr_->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4); }
+
+//protected:
+ /// Pointer to stored object instance.
+ const T_obj *obj_ptr_;
+};
+
+/** Performs a functor on each of the targets of a functor.
+ * The function overload for sigc::bound_const_volatile_mem_functor performs a functor
+ * on the object instance stored in the sigc::bound_const_volatile_mem_functor object.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_action, class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+void visit_each(const T_action& _A_action,
+ const bound_const_volatile_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>& _A_target)
+{
+ visit_each(_A_action, *_A_target.obj_ptr_);
+}
+
+/** bound_const_volatile_mem_functor5 encapsulates a const volatile method with 5 arguments and an object instance.
+ * Use the convenience function mem_fun() to create an instance of bound_const_volatile_mem_functor5.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ * - @e T_arg3 Argument type used in the definition of operator()().
+ * - @e T_arg4 Argument type used in the definition of operator()().
+ * - @e T_arg5 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+class bound_const_volatile_mem_functor5
+ : public const_volatile_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>
+{
+ typedef const_volatile_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5> base_type_;
+public:
+ typedef typename base_type_::function_type function_type;
+
+ /** Constructs a bound_const_volatile_mem_functor5 object that wraps the passed method.
+ * @param _A_obj Pointer to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_const_volatile_mem_functor5(const T_obj* _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(_A_obj) {}
+
+ /** Constructs a bound_const_volatile_mem_functor5 object that wraps the passed method.
+ * @param _A_obj Reference to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_const_volatile_mem_functor5(const T_obj& _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+
+ /** Execute the wrapped method operating on the stored instance.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @param _A_a4 Argument to be passed on to the method.
+ * @param _A_a5 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5) const
+ { return (obj_ptr_->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5); }
+
+//protected:
+ /// Pointer to stored object instance.
+ const T_obj *obj_ptr_;
+};
+
+/** Performs a functor on each of the targets of a functor.
+ * The function overload for sigc::bound_const_volatile_mem_functor performs a functor
+ * on the object instance stored in the sigc::bound_const_volatile_mem_functor object.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_action, class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+void visit_each(const T_action& _A_action,
+ const bound_const_volatile_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>& _A_target)
+{
+ visit_each(_A_action, *_A_target.obj_ptr_);
+}
+
+/** bound_const_volatile_mem_functor6 encapsulates a const volatile method with 6 arguments and an object instance.
+ * Use the convenience function mem_fun() to create an instance of bound_const_volatile_mem_functor6.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ * - @e T_arg3 Argument type used in the definition of operator()().
+ * - @e T_arg4 Argument type used in the definition of operator()().
+ * - @e T_arg5 Argument type used in the definition of operator()().
+ * - @e T_arg6 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+class bound_const_volatile_mem_functor6
+ : public const_volatile_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>
+{
+ typedef const_volatile_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6> base_type_;
+public:
+ typedef typename base_type_::function_type function_type;
+
+ /** Constructs a bound_const_volatile_mem_functor6 object that wraps the passed method.
+ * @param _A_obj Pointer to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_const_volatile_mem_functor6(const T_obj* _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(_A_obj) {}
+
+ /** Constructs a bound_const_volatile_mem_functor6 object that wraps the passed method.
+ * @param _A_obj Reference to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_const_volatile_mem_functor6(const T_obj& _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+
+ /** Execute the wrapped method operating on the stored instance.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @param _A_a4 Argument to be passed on to the method.
+ * @param _A_a5 Argument to be passed on to the method.
+ * @param _A_a6 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5,typename type_trait<T_arg6>::take _A_a6) const
+ { return (obj_ptr_->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6); }
+
+//protected:
+ /// Pointer to stored object instance.
+ const T_obj *obj_ptr_;
+};
+
+/** Performs a functor on each of the targets of a functor.
+ * The function overload for sigc::bound_const_volatile_mem_functor performs a functor
+ * on the object instance stored in the sigc::bound_const_volatile_mem_functor object.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_action, class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+void visit_each(const T_action& _A_action,
+ const bound_const_volatile_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>& _A_target)
+{
+ visit_each(_A_action, *_A_target.obj_ptr_);
+}
+
+/** bound_const_volatile_mem_functor7 encapsulates a const volatile method with 7 arguments and an object instance.
+ * Use the convenience function mem_fun() to create an instance of bound_const_volatile_mem_functor7.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ * - @e T_arg3 Argument type used in the definition of operator()().
+ * - @e T_arg4 Argument type used in the definition of operator()().
+ * - @e T_arg5 Argument type used in the definition of operator()().
+ * - @e T_arg6 Argument type used in the definition of operator()().
+ * - @e T_arg7 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ * - @e T_obj The object type.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+class bound_const_volatile_mem_functor7
+ : public const_volatile_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>
+{
+ typedef const_volatile_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7> base_type_;
+public:
+ typedef typename base_type_::function_type function_type;
+
+ /** Constructs a bound_const_volatile_mem_functor7 object that wraps the passed method.
+ * @param _A_obj Pointer to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_const_volatile_mem_functor7(const T_obj* _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(_A_obj) {}
+
+ /** Constructs a bound_const_volatile_mem_functor7 object that wraps the passed method.
+ * @param _A_obj Reference to instance the method will operate on.
+ * @param _A_func Pointer to method will be invoked from operator()().
+ */
+ bound_const_volatile_mem_functor7(const T_obj& _A_obj, function_type _A_func)
+ : base_type_(_A_func), obj_ptr_(&_A_obj) {}
+
+ /** Execute the wrapped method operating on the stored instance.
+ * @param _A_a1 Argument to be passed on to the method.
+ * @param _A_a2 Argument to be passed on to the method.
+ * @param _A_a3 Argument to be passed on to the method.
+ * @param _A_a4 Argument to be passed on to the method.
+ * @param _A_a5 Argument to be passed on to the method.
+ * @param _A_a6 Argument to be passed on to the method.
+ * @param _A_a7 Argument to be passed on to the method.
+ * @return The return value of the method invocation.
+ */
+ T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5,typename type_trait<T_arg6>::take _A_a6,typename type_trait<T_arg7>::take _A_a7) const
+ { return (obj_ptr_->*(this->func_ptr_))(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7); }
+
+//protected:
+ /// Pointer to stored object instance.
+ const T_obj *obj_ptr_;
+};
+
+/** Performs a functor on each of the targets of a functor.
+ * The function overload for sigc::bound_const_volatile_mem_functor performs a functor
+ * on the object instance stored in the sigc::bound_const_volatile_mem_functor object.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_action, class T_return, class T_obj, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+void visit_each(const T_action& _A_action,
+ const bound_const_volatile_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>& _A_target)
+{
+ visit_each(_A_action, *_A_target.obj_ptr_);
+}
+
+
+// numbered
+/** Creates a functor of type sigc::mem_functor0 which wraps a method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj>
+inline mem_functor0<T_return, T_obj>
+mem_fun0(T_return (T_obj::*_A_func)() )
+{ return mem_functor0<T_return, T_obj>(_A_func); }
+
+/** Creates a functor of type sigc::mem_functor1 which wraps a method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1, class T_return, class T_obj>
+inline mem_functor1<T_return, T_obj, T_arg1>
+mem_fun1(T_return (T_obj::*_A_func)(T_arg1) )
+{ return mem_functor1<T_return, T_obj, T_arg1>(_A_func); }
+
+/** Creates a functor of type sigc::mem_functor2 which wraps a method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2, class T_return, class T_obj>
+inline mem_functor2<T_return, T_obj, T_arg1,T_arg2>
+mem_fun2(T_return (T_obj::*_A_func)(T_arg1,T_arg2) )
+{ return mem_functor2<T_return, T_obj, T_arg1,T_arg2>(_A_func); }
+
+/** Creates a functor of type sigc::mem_functor3 which wraps a method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3, class T_return, class T_obj>
+inline mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>
+mem_fun3(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3) )
+{ return mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>(_A_func); }
+
+/** Creates a functor of type sigc::mem_functor4 which wraps a method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4, class T_return, class T_obj>
+inline mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>
+mem_fun4(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) )
+{ return mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>(_A_func); }
+
+/** Creates a functor of type sigc::mem_functor5 which wraps a method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5, class T_return, class T_obj>
+inline mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>
+mem_fun5(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) )
+{ return mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>(_A_func); }
+
+/** Creates a functor of type sigc::mem_functor6 which wraps a method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6, class T_return, class T_obj>
+inline mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>
+mem_fun6(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) )
+{ return mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>(_A_func); }
+
+/** Creates a functor of type sigc::mem_functor7 which wraps a method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7, class T_return, class T_obj>
+inline mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>
+mem_fun7(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) )
+{ return mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>(_A_func); }
+
+/** Creates a functor of type sigc::const_mem_functor0 which wraps a const method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj>
+inline const_mem_functor0<T_return, T_obj>
+mem_fun0(T_return (T_obj::*_A_func)() const)
+{ return const_mem_functor0<T_return, T_obj>(_A_func); }
+
+/** Creates a functor of type sigc::const_mem_functor1 which wraps a const method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1, class T_return, class T_obj>
+inline const_mem_functor1<T_return, T_obj, T_arg1>
+mem_fun1(T_return (T_obj::*_A_func)(T_arg1) const)
+{ return const_mem_functor1<T_return, T_obj, T_arg1>(_A_func); }
+
+/** Creates a functor of type sigc::const_mem_functor2 which wraps a const method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2, class T_return, class T_obj>
+inline const_mem_functor2<T_return, T_obj, T_arg1,T_arg2>
+mem_fun2(T_return (T_obj::*_A_func)(T_arg1,T_arg2) const)
+{ return const_mem_functor2<T_return, T_obj, T_arg1,T_arg2>(_A_func); }
+
+/** Creates a functor of type sigc::const_mem_functor3 which wraps a const method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3, class T_return, class T_obj>
+inline const_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>
+mem_fun3(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3) const)
+{ return const_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>(_A_func); }
+
+/** Creates a functor of type sigc::const_mem_functor4 which wraps a const method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4, class T_return, class T_obj>
+inline const_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>
+mem_fun4(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) const)
+{ return const_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>(_A_func); }
+
+/** Creates a functor of type sigc::const_mem_functor5 which wraps a const method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5, class T_return, class T_obj>
+inline const_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>
+mem_fun5(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) const)
+{ return const_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>(_A_func); }
+
+/** Creates a functor of type sigc::const_mem_functor6 which wraps a const method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6, class T_return, class T_obj>
+inline const_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>
+mem_fun6(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) const)
+{ return const_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>(_A_func); }
+
+/** Creates a functor of type sigc::const_mem_functor7 which wraps a const method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7, class T_return, class T_obj>
+inline const_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>
+mem_fun7(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) const)
+{ return const_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>(_A_func); }
+
+/** Creates a functor of type sigc::volatile_mem_functor0 which wraps a volatile method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj>
+inline volatile_mem_functor0<T_return, T_obj>
+mem_fun0(T_return (T_obj::*_A_func)() volatile)
+{ return volatile_mem_functor0<T_return, T_obj>(_A_func); }
+
+/** Creates a functor of type sigc::volatile_mem_functor1 which wraps a volatile method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1, class T_return, class T_obj>
+inline volatile_mem_functor1<T_return, T_obj, T_arg1>
+mem_fun1(T_return (T_obj::*_A_func)(T_arg1) volatile)
+{ return volatile_mem_functor1<T_return, T_obj, T_arg1>(_A_func); }
+
+/** Creates a functor of type sigc::volatile_mem_functor2 which wraps a volatile method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2, class T_return, class T_obj>
+inline volatile_mem_functor2<T_return, T_obj, T_arg1,T_arg2>
+mem_fun2(T_return (T_obj::*_A_func)(T_arg1,T_arg2) volatile)
+{ return volatile_mem_functor2<T_return, T_obj, T_arg1,T_arg2>(_A_func); }
+
+/** Creates a functor of type sigc::volatile_mem_functor3 which wraps a volatile method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3, class T_return, class T_obj>
+inline volatile_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>
+mem_fun3(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3) volatile)
+{ return volatile_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>(_A_func); }
+
+/** Creates a functor of type sigc::volatile_mem_functor4 which wraps a volatile method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4, class T_return, class T_obj>
+inline volatile_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>
+mem_fun4(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) volatile)
+{ return volatile_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>(_A_func); }
+
+/** Creates a functor of type sigc::volatile_mem_functor5 which wraps a volatile method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5, class T_return, class T_obj>
+inline volatile_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>
+mem_fun5(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) volatile)
+{ return volatile_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>(_A_func); }
+
+/** Creates a functor of type sigc::volatile_mem_functor6 which wraps a volatile method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6, class T_return, class T_obj>
+inline volatile_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>
+mem_fun6(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) volatile)
+{ return volatile_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>(_A_func); }
+
+/** Creates a functor of type sigc::volatile_mem_functor7 which wraps a volatile method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7, class T_return, class T_obj>
+inline volatile_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>
+mem_fun7(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) volatile)
+{ return volatile_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>(_A_func); }
+
+/** Creates a functor of type sigc::const_volatile_mem_functor0 which wraps a const volatile method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj>
+inline const_volatile_mem_functor0<T_return, T_obj>
+mem_fun0(T_return (T_obj::*_A_func)() const volatile)
+{ return const_volatile_mem_functor0<T_return, T_obj>(_A_func); }
+
+/** Creates a functor of type sigc::const_volatile_mem_functor1 which wraps a const volatile method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1, class T_return, class T_obj>
+inline const_volatile_mem_functor1<T_return, T_obj, T_arg1>
+mem_fun1(T_return (T_obj::*_A_func)(T_arg1) const volatile)
+{ return const_volatile_mem_functor1<T_return, T_obj, T_arg1>(_A_func); }
+
+/** Creates a functor of type sigc::const_volatile_mem_functor2 which wraps a const volatile method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2, class T_return, class T_obj>
+inline const_volatile_mem_functor2<T_return, T_obj, T_arg1,T_arg2>
+mem_fun2(T_return (T_obj::*_A_func)(T_arg1,T_arg2) const volatile)
+{ return const_volatile_mem_functor2<T_return, T_obj, T_arg1,T_arg2>(_A_func); }
+
+/** Creates a functor of type sigc::const_volatile_mem_functor3 which wraps a const volatile method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3, class T_return, class T_obj>
+inline const_volatile_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>
+mem_fun3(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3) const volatile)
+{ return const_volatile_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>(_A_func); }
+
+/** Creates a functor of type sigc::const_volatile_mem_functor4 which wraps a const volatile method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4, class T_return, class T_obj>
+inline const_volatile_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>
+mem_fun4(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) const volatile)
+{ return const_volatile_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>(_A_func); }
+
+/** Creates a functor of type sigc::const_volatile_mem_functor5 which wraps a const volatile method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5, class T_return, class T_obj>
+inline const_volatile_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>
+mem_fun5(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) const volatile)
+{ return const_volatile_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>(_A_func); }
+
+/** Creates a functor of type sigc::const_volatile_mem_functor6 which wraps a const volatile method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6, class T_return, class T_obj>
+inline const_volatile_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>
+mem_fun6(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) const volatile)
+{ return const_volatile_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>(_A_func); }
+
+/** Creates a functor of type sigc::const_volatile_mem_functor7 which wraps a const volatile method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7, class T_return, class T_obj>
+inline const_volatile_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>
+mem_fun7(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) const volatile)
+{ return const_volatile_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>(_A_func); }
+
+/** Creates a functor of type sigc::bound_mem_functor0 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_obj2>
+inline bound_mem_functor0<T_return, T_obj>
+mem_fun0(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)() )
+{ return bound_mem_functor0<T_return, T_obj>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_mem_functor0 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_obj2>
+inline bound_mem_functor0<T_return, T_obj>
+mem_fun0(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)() )
+{ return bound_mem_functor0<T_return, T_obj>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_mem_functor1 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1, class T_return, class T_obj, class T_obj2>
+inline bound_mem_functor1<T_return, T_obj, T_arg1>
+mem_fun1(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1) )
+{ return bound_mem_functor1<T_return, T_obj, T_arg1>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_mem_functor1 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1, class T_return, class T_obj, class T_obj2>
+inline bound_mem_functor1<T_return, T_obj, T_arg1>
+mem_fun1(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1) )
+{ return bound_mem_functor1<T_return, T_obj, T_arg1>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_mem_functor2 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2, class T_return, class T_obj, class T_obj2>
+inline bound_mem_functor2<T_return, T_obj, T_arg1,T_arg2>
+mem_fun2(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2) )
+{ return bound_mem_functor2<T_return, T_obj, T_arg1,T_arg2>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_mem_functor2 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2, class T_return, class T_obj, class T_obj2>
+inline bound_mem_functor2<T_return, T_obj, T_arg1,T_arg2>
+mem_fun2(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2) )
+{ return bound_mem_functor2<T_return, T_obj, T_arg1,T_arg2>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_mem_functor3 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3, class T_return, class T_obj, class T_obj2>
+inline bound_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>
+mem_fun3(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3) )
+{ return bound_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_mem_functor3 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3, class T_return, class T_obj, class T_obj2>
+inline bound_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>
+mem_fun3(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3) )
+{ return bound_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_mem_functor4 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4, class T_return, class T_obj, class T_obj2>
+inline bound_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>
+mem_fun4(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) )
+{ return bound_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_mem_functor4 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4, class T_return, class T_obj, class T_obj2>
+inline bound_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>
+mem_fun4(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) )
+{ return bound_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_mem_functor5 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5, class T_return, class T_obj, class T_obj2>
+inline bound_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>
+mem_fun5(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) )
+{ return bound_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_mem_functor5 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5, class T_return, class T_obj, class T_obj2>
+inline bound_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>
+mem_fun5(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) )
+{ return bound_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_mem_functor6 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6, class T_return, class T_obj, class T_obj2>
+inline bound_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>
+mem_fun6(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) )
+{ return bound_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_mem_functor6 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6, class T_return, class T_obj, class T_obj2>
+inline bound_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>
+mem_fun6(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) )
+{ return bound_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_mem_functor7 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7, class T_return, class T_obj, class T_obj2>
+inline bound_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>
+mem_fun7(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) )
+{ return bound_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_mem_functor7 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7, class T_return, class T_obj, class T_obj2>
+inline bound_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>
+mem_fun7(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) )
+{ return bound_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_mem_functor0 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_obj2>
+inline bound_const_mem_functor0<T_return, T_obj>
+mem_fun0(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)() const)
+{ return bound_const_mem_functor0<T_return, T_obj>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_mem_functor0 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_obj2>
+inline bound_const_mem_functor0<T_return, T_obj>
+mem_fun0(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)() const)
+{ return bound_const_mem_functor0<T_return, T_obj>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_mem_functor1 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1, class T_return, class T_obj, class T_obj2>
+inline bound_const_mem_functor1<T_return, T_obj, T_arg1>
+mem_fun1(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1) const)
+{ return bound_const_mem_functor1<T_return, T_obj, T_arg1>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_mem_functor1 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1, class T_return, class T_obj, class T_obj2>
+inline bound_const_mem_functor1<T_return, T_obj, T_arg1>
+mem_fun1(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1) const)
+{ return bound_const_mem_functor1<T_return, T_obj, T_arg1>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_mem_functor2 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2, class T_return, class T_obj, class T_obj2>
+inline bound_const_mem_functor2<T_return, T_obj, T_arg1,T_arg2>
+mem_fun2(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2) const)
+{ return bound_const_mem_functor2<T_return, T_obj, T_arg1,T_arg2>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_mem_functor2 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2, class T_return, class T_obj, class T_obj2>
+inline bound_const_mem_functor2<T_return, T_obj, T_arg1,T_arg2>
+mem_fun2(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2) const)
+{ return bound_const_mem_functor2<T_return, T_obj, T_arg1,T_arg2>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_mem_functor3 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3, class T_return, class T_obj, class T_obj2>
+inline bound_const_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>
+mem_fun3(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3) const)
+{ return bound_const_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_mem_functor3 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3, class T_return, class T_obj, class T_obj2>
+inline bound_const_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>
+mem_fun3(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3) const)
+{ return bound_const_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_mem_functor4 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4, class T_return, class T_obj, class T_obj2>
+inline bound_const_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>
+mem_fun4(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) const)
+{ return bound_const_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_mem_functor4 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4, class T_return, class T_obj, class T_obj2>
+inline bound_const_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>
+mem_fun4(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) const)
+{ return bound_const_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_mem_functor5 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5, class T_return, class T_obj, class T_obj2>
+inline bound_const_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>
+mem_fun5(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) const)
+{ return bound_const_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_mem_functor5 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5, class T_return, class T_obj, class T_obj2>
+inline bound_const_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>
+mem_fun5(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) const)
+{ return bound_const_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_mem_functor6 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6, class T_return, class T_obj, class T_obj2>
+inline bound_const_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>
+mem_fun6(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) const)
+{ return bound_const_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_mem_functor6 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6, class T_return, class T_obj, class T_obj2>
+inline bound_const_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>
+mem_fun6(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) const)
+{ return bound_const_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_mem_functor7 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7, class T_return, class T_obj, class T_obj2>
+inline bound_const_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>
+mem_fun7(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) const)
+{ return bound_const_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_mem_functor7 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7, class T_return, class T_obj, class T_obj2>
+inline bound_const_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>
+mem_fun7(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) const)
+{ return bound_const_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_volatile_mem_functor0 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_obj2>
+inline bound_volatile_mem_functor0<T_return, T_obj>
+mem_fun0(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)() volatile)
+{ return bound_volatile_mem_functor0<T_return, T_obj>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_volatile_mem_functor0 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_obj2>
+inline bound_volatile_mem_functor0<T_return, T_obj>
+mem_fun0(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)() volatile)
+{ return bound_volatile_mem_functor0<T_return, T_obj>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_volatile_mem_functor1 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1, class T_return, class T_obj, class T_obj2>
+inline bound_volatile_mem_functor1<T_return, T_obj, T_arg1>
+mem_fun1(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1) volatile)
+{ return bound_volatile_mem_functor1<T_return, T_obj, T_arg1>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_volatile_mem_functor1 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1, class T_return, class T_obj, class T_obj2>
+inline bound_volatile_mem_functor1<T_return, T_obj, T_arg1>
+mem_fun1(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1) volatile)
+{ return bound_volatile_mem_functor1<T_return, T_obj, T_arg1>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_volatile_mem_functor2 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2, class T_return, class T_obj, class T_obj2>
+inline bound_volatile_mem_functor2<T_return, T_obj, T_arg1,T_arg2>
+mem_fun2(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2) volatile)
+{ return bound_volatile_mem_functor2<T_return, T_obj, T_arg1,T_arg2>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_volatile_mem_functor2 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2, class T_return, class T_obj, class T_obj2>
+inline bound_volatile_mem_functor2<T_return, T_obj, T_arg1,T_arg2>
+mem_fun2(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2) volatile)
+{ return bound_volatile_mem_functor2<T_return, T_obj, T_arg1,T_arg2>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_volatile_mem_functor3 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3, class T_return, class T_obj, class T_obj2>
+inline bound_volatile_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>
+mem_fun3(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3) volatile)
+{ return bound_volatile_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_volatile_mem_functor3 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3, class T_return, class T_obj, class T_obj2>
+inline bound_volatile_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>
+mem_fun3(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3) volatile)
+{ return bound_volatile_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_volatile_mem_functor4 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4, class T_return, class T_obj, class T_obj2>
+inline bound_volatile_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>
+mem_fun4(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) volatile)
+{ return bound_volatile_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_volatile_mem_functor4 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4, class T_return, class T_obj, class T_obj2>
+inline bound_volatile_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>
+mem_fun4(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) volatile)
+{ return bound_volatile_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_volatile_mem_functor5 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5, class T_return, class T_obj, class T_obj2>
+inline bound_volatile_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>
+mem_fun5(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) volatile)
+{ return bound_volatile_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_volatile_mem_functor5 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5, class T_return, class T_obj, class T_obj2>
+inline bound_volatile_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>
+mem_fun5(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) volatile)
+{ return bound_volatile_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_volatile_mem_functor6 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6, class T_return, class T_obj, class T_obj2>
+inline bound_volatile_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>
+mem_fun6(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) volatile)
+{ return bound_volatile_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_volatile_mem_functor6 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6, class T_return, class T_obj, class T_obj2>
+inline bound_volatile_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>
+mem_fun6(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) volatile)
+{ return bound_volatile_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_volatile_mem_functor7 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7, class T_return, class T_obj, class T_obj2>
+inline bound_volatile_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>
+mem_fun7(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) volatile)
+{ return bound_volatile_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_volatile_mem_functor7 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7, class T_return, class T_obj, class T_obj2>
+inline bound_volatile_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>
+mem_fun7(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) volatile)
+{ return bound_volatile_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_volatile_mem_functor0 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_obj2>
+inline bound_const_volatile_mem_functor0<T_return, T_obj>
+mem_fun0(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)() const volatile)
+{ return bound_const_volatile_mem_functor0<T_return, T_obj>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_volatile_mem_functor0 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_obj2>
+inline bound_const_volatile_mem_functor0<T_return, T_obj>
+mem_fun0(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)() const volatile)
+{ return bound_const_volatile_mem_functor0<T_return, T_obj>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_volatile_mem_functor1 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1, class T_return, class T_obj, class T_obj2>
+inline bound_const_volatile_mem_functor1<T_return, T_obj, T_arg1>
+mem_fun1(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1) const volatile)
+{ return bound_const_volatile_mem_functor1<T_return, T_obj, T_arg1>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_volatile_mem_functor1 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1, class T_return, class T_obj, class T_obj2>
+inline bound_const_volatile_mem_functor1<T_return, T_obj, T_arg1>
+mem_fun1(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1) const volatile)
+{ return bound_const_volatile_mem_functor1<T_return, T_obj, T_arg1>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_volatile_mem_functor2 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2, class T_return, class T_obj, class T_obj2>
+inline bound_const_volatile_mem_functor2<T_return, T_obj, T_arg1,T_arg2>
+mem_fun2(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2) const volatile)
+{ return bound_const_volatile_mem_functor2<T_return, T_obj, T_arg1,T_arg2>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_volatile_mem_functor2 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2, class T_return, class T_obj, class T_obj2>
+inline bound_const_volatile_mem_functor2<T_return, T_obj, T_arg1,T_arg2>
+mem_fun2(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2) const volatile)
+{ return bound_const_volatile_mem_functor2<T_return, T_obj, T_arg1,T_arg2>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_volatile_mem_functor3 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3, class T_return, class T_obj, class T_obj2>
+inline bound_const_volatile_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>
+mem_fun3(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3) const volatile)
+{ return bound_const_volatile_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_volatile_mem_functor3 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3, class T_return, class T_obj, class T_obj2>
+inline bound_const_volatile_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>
+mem_fun3(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3) const volatile)
+{ return bound_const_volatile_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_volatile_mem_functor4 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4, class T_return, class T_obj, class T_obj2>
+inline bound_const_volatile_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>
+mem_fun4(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) const volatile)
+{ return bound_const_volatile_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_volatile_mem_functor4 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4, class T_return, class T_obj, class T_obj2>
+inline bound_const_volatile_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>
+mem_fun4(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) const volatile)
+{ return bound_const_volatile_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_volatile_mem_functor5 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5, class T_return, class T_obj, class T_obj2>
+inline bound_const_volatile_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>
+mem_fun5(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) const volatile)
+{ return bound_const_volatile_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_volatile_mem_functor5 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5, class T_return, class T_obj, class T_obj2>
+inline bound_const_volatile_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>
+mem_fun5(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) const volatile)
+{ return bound_const_volatile_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_volatile_mem_functor6 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6, class T_return, class T_obj, class T_obj2>
+inline bound_const_volatile_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>
+mem_fun6(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) const volatile)
+{ return bound_const_volatile_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_volatile_mem_functor6 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6, class T_return, class T_obj, class T_obj2>
+inline bound_const_volatile_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>
+mem_fun6(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) const volatile)
+{ return bound_const_volatile_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_volatile_mem_functor7 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7, class T_return, class T_obj, class T_obj2>
+inline bound_const_volatile_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>
+mem_fun7(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) const volatile)
+{ return bound_const_volatile_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_volatile_mem_functor7 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7, class T_return, class T_obj, class T_obj2>
+inline bound_const_volatile_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>
+mem_fun7(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) const volatile)
+{ return bound_const_volatile_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>(_A_obj, _A_func); }
+
+
+// unnumbered
+/** Creates a functor of type sigc::mem_functor0 which wraps a method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj>
+inline mem_functor0<T_return, T_obj>
+mem_fun(T_return (T_obj::*_A_func)() )
+{ return mem_functor0<T_return, T_obj>(_A_func); }
+
+/** Creates a functor of type sigc::mem_functor1 which wraps a method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1, class T_return, class T_obj>
+inline mem_functor1<T_return, T_obj, T_arg1>
+mem_fun(T_return (T_obj::*_A_func)(T_arg1) )
+{ return mem_functor1<T_return, T_obj, T_arg1>(_A_func); }
+
+/** Creates a functor of type sigc::mem_functor2 which wraps a method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2, class T_return, class T_obj>
+inline mem_functor2<T_return, T_obj, T_arg1,T_arg2>
+mem_fun(T_return (T_obj::*_A_func)(T_arg1,T_arg2) )
+{ return mem_functor2<T_return, T_obj, T_arg1,T_arg2>(_A_func); }
+
+/** Creates a functor of type sigc::mem_functor3 which wraps a method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3, class T_return, class T_obj>
+inline mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>
+mem_fun(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3) )
+{ return mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>(_A_func); }
+
+/** Creates a functor of type sigc::mem_functor4 which wraps a method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4, class T_return, class T_obj>
+inline mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>
+mem_fun(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) )
+{ return mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>(_A_func); }
+
+/** Creates a functor of type sigc::mem_functor5 which wraps a method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5, class T_return, class T_obj>
+inline mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>
+mem_fun(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) )
+{ return mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>(_A_func); }
+
+/** Creates a functor of type sigc::mem_functor6 which wraps a method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6, class T_return, class T_obj>
+inline mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>
+mem_fun(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) )
+{ return mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>(_A_func); }
+
+/** Creates a functor of type sigc::mem_functor7 which wraps a method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7, class T_return, class T_obj>
+inline mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>
+mem_fun(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) )
+{ return mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>(_A_func); }
+
+/** Creates a functor of type sigc::const_mem_functor0 which wraps a const method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj>
+inline const_mem_functor0<T_return, T_obj>
+mem_fun(T_return (T_obj::*_A_func)() const)
+{ return const_mem_functor0<T_return, T_obj>(_A_func); }
+
+/** Creates a functor of type sigc::const_mem_functor1 which wraps a const method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1, class T_return, class T_obj>
+inline const_mem_functor1<T_return, T_obj, T_arg1>
+mem_fun(T_return (T_obj::*_A_func)(T_arg1) const)
+{ return const_mem_functor1<T_return, T_obj, T_arg1>(_A_func); }
+
+/** Creates a functor of type sigc::const_mem_functor2 which wraps a const method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2, class T_return, class T_obj>
+inline const_mem_functor2<T_return, T_obj, T_arg1,T_arg2>
+mem_fun(T_return (T_obj::*_A_func)(T_arg1,T_arg2) const)
+{ return const_mem_functor2<T_return, T_obj, T_arg1,T_arg2>(_A_func); }
+
+/** Creates a functor of type sigc::const_mem_functor3 which wraps a const method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3, class T_return, class T_obj>
+inline const_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>
+mem_fun(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3) const)
+{ return const_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>(_A_func); }
+
+/** Creates a functor of type sigc::const_mem_functor4 which wraps a const method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4, class T_return, class T_obj>
+inline const_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>
+mem_fun(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) const)
+{ return const_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>(_A_func); }
+
+/** Creates a functor of type sigc::const_mem_functor5 which wraps a const method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5, class T_return, class T_obj>
+inline const_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>
+mem_fun(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) const)
+{ return const_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>(_A_func); }
+
+/** Creates a functor of type sigc::const_mem_functor6 which wraps a const method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6, class T_return, class T_obj>
+inline const_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>
+mem_fun(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) const)
+{ return const_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>(_A_func); }
+
+/** Creates a functor of type sigc::const_mem_functor7 which wraps a const method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7, class T_return, class T_obj>
+inline const_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>
+mem_fun(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) const)
+{ return const_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>(_A_func); }
+
+/** Creates a functor of type sigc::volatile_mem_functor0 which wraps a volatile method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj>
+inline volatile_mem_functor0<T_return, T_obj>
+mem_fun(T_return (T_obj::*_A_func)() volatile)
+{ return volatile_mem_functor0<T_return, T_obj>(_A_func); }
+
+/** Creates a functor of type sigc::volatile_mem_functor1 which wraps a volatile method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1, class T_return, class T_obj>
+inline volatile_mem_functor1<T_return, T_obj, T_arg1>
+mem_fun(T_return (T_obj::*_A_func)(T_arg1) volatile)
+{ return volatile_mem_functor1<T_return, T_obj, T_arg1>(_A_func); }
+
+/** Creates a functor of type sigc::volatile_mem_functor2 which wraps a volatile method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2, class T_return, class T_obj>
+inline volatile_mem_functor2<T_return, T_obj, T_arg1,T_arg2>
+mem_fun(T_return (T_obj::*_A_func)(T_arg1,T_arg2) volatile)
+{ return volatile_mem_functor2<T_return, T_obj, T_arg1,T_arg2>(_A_func); }
+
+/** Creates a functor of type sigc::volatile_mem_functor3 which wraps a volatile method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3, class T_return, class T_obj>
+inline volatile_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>
+mem_fun(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3) volatile)
+{ return volatile_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>(_A_func); }
+
+/** Creates a functor of type sigc::volatile_mem_functor4 which wraps a volatile method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4, class T_return, class T_obj>
+inline volatile_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>
+mem_fun(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) volatile)
+{ return volatile_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>(_A_func); }
+
+/** Creates a functor of type sigc::volatile_mem_functor5 which wraps a volatile method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5, class T_return, class T_obj>
+inline volatile_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>
+mem_fun(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) volatile)
+{ return volatile_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>(_A_func); }
+
+/** Creates a functor of type sigc::volatile_mem_functor6 which wraps a volatile method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6, class T_return, class T_obj>
+inline volatile_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>
+mem_fun(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) volatile)
+{ return volatile_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>(_A_func); }
+
+/** Creates a functor of type sigc::volatile_mem_functor7 which wraps a volatile method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7, class T_return, class T_obj>
+inline volatile_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>
+mem_fun(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) volatile)
+{ return volatile_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>(_A_func); }
+
+/** Creates a functor of type sigc::const_volatile_mem_functor0 which wraps a const volatile method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj>
+inline const_volatile_mem_functor0<T_return, T_obj>
+mem_fun(T_return (T_obj::*_A_func)() const volatile)
+{ return const_volatile_mem_functor0<T_return, T_obj>(_A_func); }
+
+/** Creates a functor of type sigc::const_volatile_mem_functor1 which wraps a const volatile method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1, class T_return, class T_obj>
+inline const_volatile_mem_functor1<T_return, T_obj, T_arg1>
+mem_fun(T_return (T_obj::*_A_func)(T_arg1) const volatile)
+{ return const_volatile_mem_functor1<T_return, T_obj, T_arg1>(_A_func); }
+
+/** Creates a functor of type sigc::const_volatile_mem_functor2 which wraps a const volatile method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2, class T_return, class T_obj>
+inline const_volatile_mem_functor2<T_return, T_obj, T_arg1,T_arg2>
+mem_fun(T_return (T_obj::*_A_func)(T_arg1,T_arg2) const volatile)
+{ return const_volatile_mem_functor2<T_return, T_obj, T_arg1,T_arg2>(_A_func); }
+
+/** Creates a functor of type sigc::const_volatile_mem_functor3 which wraps a const volatile method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3, class T_return, class T_obj>
+inline const_volatile_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>
+mem_fun(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3) const volatile)
+{ return const_volatile_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>(_A_func); }
+
+/** Creates a functor of type sigc::const_volatile_mem_functor4 which wraps a const volatile method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4, class T_return, class T_obj>
+inline const_volatile_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>
+mem_fun(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) const volatile)
+{ return const_volatile_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>(_A_func); }
+
+/** Creates a functor of type sigc::const_volatile_mem_functor5 which wraps a const volatile method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5, class T_return, class T_obj>
+inline const_volatile_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>
+mem_fun(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) const volatile)
+{ return const_volatile_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>(_A_func); }
+
+/** Creates a functor of type sigc::const_volatile_mem_functor6 which wraps a const volatile method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6, class T_return, class T_obj>
+inline const_volatile_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>
+mem_fun(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) const volatile)
+{ return const_volatile_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>(_A_func); }
+
+/** Creates a functor of type sigc::const_volatile_mem_functor7 which wraps a const volatile method.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7, class T_return, class T_obj>
+inline const_volatile_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>
+mem_fun(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) const volatile)
+{ return const_volatile_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>(_A_func); }
+
+/** Creates a functor of type sigc::bound_mem_functor0 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_obj2>
+inline bound_mem_functor0<T_return, T_obj>
+mem_fun(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)() )
+{ return bound_mem_functor0<T_return, T_obj>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_mem_functor0 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_obj2>
+inline bound_mem_functor0<T_return, T_obj>
+mem_fun(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)() )
+{ return bound_mem_functor0<T_return, T_obj>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_mem_functor1 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1, class T_return, class T_obj, class T_obj2>
+inline bound_mem_functor1<T_return, T_obj, T_arg1>
+mem_fun(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1) )
+{ return bound_mem_functor1<T_return, T_obj, T_arg1>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_mem_functor1 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1, class T_return, class T_obj, class T_obj2>
+inline bound_mem_functor1<T_return, T_obj, T_arg1>
+mem_fun(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1) )
+{ return bound_mem_functor1<T_return, T_obj, T_arg1>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_mem_functor2 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2, class T_return, class T_obj, class T_obj2>
+inline bound_mem_functor2<T_return, T_obj, T_arg1,T_arg2>
+mem_fun(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2) )
+{ return bound_mem_functor2<T_return, T_obj, T_arg1,T_arg2>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_mem_functor2 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2, class T_return, class T_obj, class T_obj2>
+inline bound_mem_functor2<T_return, T_obj, T_arg1,T_arg2>
+mem_fun(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2) )
+{ return bound_mem_functor2<T_return, T_obj, T_arg1,T_arg2>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_mem_functor3 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3, class T_return, class T_obj, class T_obj2>
+inline bound_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>
+mem_fun(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3) )
+{ return bound_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_mem_functor3 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3, class T_return, class T_obj, class T_obj2>
+inline bound_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>
+mem_fun(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3) )
+{ return bound_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_mem_functor4 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4, class T_return, class T_obj, class T_obj2>
+inline bound_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>
+mem_fun(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) )
+{ return bound_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_mem_functor4 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4, class T_return, class T_obj, class T_obj2>
+inline bound_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>
+mem_fun(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) )
+{ return bound_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_mem_functor5 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5, class T_return, class T_obj, class T_obj2>
+inline bound_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>
+mem_fun(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) )
+{ return bound_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_mem_functor5 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5, class T_return, class T_obj, class T_obj2>
+inline bound_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>
+mem_fun(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) )
+{ return bound_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_mem_functor6 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6, class T_return, class T_obj, class T_obj2>
+inline bound_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>
+mem_fun(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) )
+{ return bound_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_mem_functor6 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6, class T_return, class T_obj, class T_obj2>
+inline bound_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>
+mem_fun(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) )
+{ return bound_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_mem_functor7 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7, class T_return, class T_obj, class T_obj2>
+inline bound_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>
+mem_fun(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) )
+{ return bound_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_mem_functor7 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7, class T_return, class T_obj, class T_obj2>
+inline bound_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>
+mem_fun(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) )
+{ return bound_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_mem_functor0 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_obj2>
+inline bound_const_mem_functor0<T_return, T_obj>
+mem_fun(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)() const)
+{ return bound_const_mem_functor0<T_return, T_obj>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_mem_functor0 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_obj2>
+inline bound_const_mem_functor0<T_return, T_obj>
+mem_fun(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)() const)
+{ return bound_const_mem_functor0<T_return, T_obj>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_mem_functor1 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1, class T_return, class T_obj, class T_obj2>
+inline bound_const_mem_functor1<T_return, T_obj, T_arg1>
+mem_fun(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1) const)
+{ return bound_const_mem_functor1<T_return, T_obj, T_arg1>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_mem_functor1 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1, class T_return, class T_obj, class T_obj2>
+inline bound_const_mem_functor1<T_return, T_obj, T_arg1>
+mem_fun(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1) const)
+{ return bound_const_mem_functor1<T_return, T_obj, T_arg1>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_mem_functor2 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2, class T_return, class T_obj, class T_obj2>
+inline bound_const_mem_functor2<T_return, T_obj, T_arg1,T_arg2>
+mem_fun(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2) const)
+{ return bound_const_mem_functor2<T_return, T_obj, T_arg1,T_arg2>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_mem_functor2 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2, class T_return, class T_obj, class T_obj2>
+inline bound_const_mem_functor2<T_return, T_obj, T_arg1,T_arg2>
+mem_fun(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2) const)
+{ return bound_const_mem_functor2<T_return, T_obj, T_arg1,T_arg2>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_mem_functor3 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3, class T_return, class T_obj, class T_obj2>
+inline bound_const_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>
+mem_fun(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3) const)
+{ return bound_const_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_mem_functor3 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3, class T_return, class T_obj, class T_obj2>
+inline bound_const_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>
+mem_fun(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3) const)
+{ return bound_const_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_mem_functor4 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4, class T_return, class T_obj, class T_obj2>
+inline bound_const_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>
+mem_fun(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) const)
+{ return bound_const_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_mem_functor4 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4, class T_return, class T_obj, class T_obj2>
+inline bound_const_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>
+mem_fun(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) const)
+{ return bound_const_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_mem_functor5 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5, class T_return, class T_obj, class T_obj2>
+inline bound_const_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>
+mem_fun(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) const)
+{ return bound_const_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_mem_functor5 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5, class T_return, class T_obj, class T_obj2>
+inline bound_const_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>
+mem_fun(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) const)
+{ return bound_const_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_mem_functor6 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6, class T_return, class T_obj, class T_obj2>
+inline bound_const_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>
+mem_fun(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) const)
+{ return bound_const_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_mem_functor6 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6, class T_return, class T_obj, class T_obj2>
+inline bound_const_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>
+mem_fun(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) const)
+{ return bound_const_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_mem_functor7 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7, class T_return, class T_obj, class T_obj2>
+inline bound_const_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>
+mem_fun(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) const)
+{ return bound_const_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_mem_functor7 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7, class T_return, class T_obj, class T_obj2>
+inline bound_const_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>
+mem_fun(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) const)
+{ return bound_const_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_volatile_mem_functor0 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_obj2>
+inline bound_volatile_mem_functor0<T_return, T_obj>
+mem_fun(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)() volatile)
+{ return bound_volatile_mem_functor0<T_return, T_obj>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_volatile_mem_functor0 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_obj2>
+inline bound_volatile_mem_functor0<T_return, T_obj>
+mem_fun(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)() volatile)
+{ return bound_volatile_mem_functor0<T_return, T_obj>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_volatile_mem_functor1 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1, class T_return, class T_obj, class T_obj2>
+inline bound_volatile_mem_functor1<T_return, T_obj, T_arg1>
+mem_fun(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1) volatile)
+{ return bound_volatile_mem_functor1<T_return, T_obj, T_arg1>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_volatile_mem_functor1 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1, class T_return, class T_obj, class T_obj2>
+inline bound_volatile_mem_functor1<T_return, T_obj, T_arg1>
+mem_fun(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1) volatile)
+{ return bound_volatile_mem_functor1<T_return, T_obj, T_arg1>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_volatile_mem_functor2 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2, class T_return, class T_obj, class T_obj2>
+inline bound_volatile_mem_functor2<T_return, T_obj, T_arg1,T_arg2>
+mem_fun(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2) volatile)
+{ return bound_volatile_mem_functor2<T_return, T_obj, T_arg1,T_arg2>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_volatile_mem_functor2 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2, class T_return, class T_obj, class T_obj2>
+inline bound_volatile_mem_functor2<T_return, T_obj, T_arg1,T_arg2>
+mem_fun(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2) volatile)
+{ return bound_volatile_mem_functor2<T_return, T_obj, T_arg1,T_arg2>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_volatile_mem_functor3 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3, class T_return, class T_obj, class T_obj2>
+inline bound_volatile_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>
+mem_fun(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3) volatile)
+{ return bound_volatile_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_volatile_mem_functor3 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3, class T_return, class T_obj, class T_obj2>
+inline bound_volatile_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>
+mem_fun(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3) volatile)
+{ return bound_volatile_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_volatile_mem_functor4 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4, class T_return, class T_obj, class T_obj2>
+inline bound_volatile_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>
+mem_fun(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) volatile)
+{ return bound_volatile_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_volatile_mem_functor4 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4, class T_return, class T_obj, class T_obj2>
+inline bound_volatile_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>
+mem_fun(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) volatile)
+{ return bound_volatile_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_volatile_mem_functor5 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5, class T_return, class T_obj, class T_obj2>
+inline bound_volatile_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>
+mem_fun(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) volatile)
+{ return bound_volatile_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_volatile_mem_functor5 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5, class T_return, class T_obj, class T_obj2>
+inline bound_volatile_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>
+mem_fun(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) volatile)
+{ return bound_volatile_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_volatile_mem_functor6 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6, class T_return, class T_obj, class T_obj2>
+inline bound_volatile_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>
+mem_fun(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) volatile)
+{ return bound_volatile_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_volatile_mem_functor6 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6, class T_return, class T_obj, class T_obj2>
+inline bound_volatile_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>
+mem_fun(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) volatile)
+{ return bound_volatile_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_volatile_mem_functor7 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7, class T_return, class T_obj, class T_obj2>
+inline bound_volatile_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>
+mem_fun(/**/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) volatile)
+{ return bound_volatile_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_volatile_mem_functor7 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7, class T_return, class T_obj, class T_obj2>
+inline bound_volatile_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>
+mem_fun(/**/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) volatile)
+{ return bound_volatile_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_volatile_mem_functor0 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_obj2>
+inline bound_const_volatile_mem_functor0<T_return, T_obj>
+mem_fun(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)() const volatile)
+{ return bound_const_volatile_mem_functor0<T_return, T_obj>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_volatile_mem_functor0 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_return, class T_obj, class T_obj2>
+inline bound_const_volatile_mem_functor0<T_return, T_obj>
+mem_fun(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)() const volatile)
+{ return bound_const_volatile_mem_functor0<T_return, T_obj>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_volatile_mem_functor1 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1, class T_return, class T_obj, class T_obj2>
+inline bound_const_volatile_mem_functor1<T_return, T_obj, T_arg1>
+mem_fun(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1) const volatile)
+{ return bound_const_volatile_mem_functor1<T_return, T_obj, T_arg1>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_volatile_mem_functor1 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1, class T_return, class T_obj, class T_obj2>
+inline bound_const_volatile_mem_functor1<T_return, T_obj, T_arg1>
+mem_fun(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1) const volatile)
+{ return bound_const_volatile_mem_functor1<T_return, T_obj, T_arg1>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_volatile_mem_functor2 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2, class T_return, class T_obj, class T_obj2>
+inline bound_const_volatile_mem_functor2<T_return, T_obj, T_arg1,T_arg2>
+mem_fun(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2) const volatile)
+{ return bound_const_volatile_mem_functor2<T_return, T_obj, T_arg1,T_arg2>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_volatile_mem_functor2 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2, class T_return, class T_obj, class T_obj2>
+inline bound_const_volatile_mem_functor2<T_return, T_obj, T_arg1,T_arg2>
+mem_fun(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2) const volatile)
+{ return bound_const_volatile_mem_functor2<T_return, T_obj, T_arg1,T_arg2>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_volatile_mem_functor3 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3, class T_return, class T_obj, class T_obj2>
+inline bound_const_volatile_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>
+mem_fun(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3) const volatile)
+{ return bound_const_volatile_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_volatile_mem_functor3 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3, class T_return, class T_obj, class T_obj2>
+inline bound_const_volatile_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>
+mem_fun(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3) const volatile)
+{ return bound_const_volatile_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_volatile_mem_functor4 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4, class T_return, class T_obj, class T_obj2>
+inline bound_const_volatile_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>
+mem_fun(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) const volatile)
+{ return bound_const_volatile_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_volatile_mem_functor4 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4, class T_return, class T_obj, class T_obj2>
+inline bound_const_volatile_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>
+mem_fun(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) const volatile)
+{ return bound_const_volatile_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_volatile_mem_functor5 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5, class T_return, class T_obj, class T_obj2>
+inline bound_const_volatile_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>
+mem_fun(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) const volatile)
+{ return bound_const_volatile_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_volatile_mem_functor5 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5, class T_return, class T_obj, class T_obj2>
+inline bound_const_volatile_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>
+mem_fun(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) const volatile)
+{ return bound_const_volatile_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_volatile_mem_functor6 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6, class T_return, class T_obj, class T_obj2>
+inline bound_const_volatile_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>
+mem_fun(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) const volatile)
+{ return bound_const_volatile_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_volatile_mem_functor6 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6, class T_return, class T_obj, class T_obj2>
+inline bound_const_volatile_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>
+mem_fun(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) const volatile)
+{ return bound_const_volatile_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_volatile_mem_functor7 which encapsulates a method and an object instance.
+ * @param _A_obj Pointer to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7, class T_return, class T_obj, class T_obj2>
+inline bound_const_volatile_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>
+mem_fun(/*const*/ T_obj* _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) const volatile)
+{ return bound_const_volatile_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>(_A_obj, _A_func); }
+
+/** Creates a functor of type sigc::bound_const_volatile_mem_functor7 which encapsulates a method and an object instance.
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup mem_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7, class T_return, class T_obj, class T_obj2>
+inline bound_const_volatile_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>
+mem_fun(/*const*/ T_obj& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) const volatile)
+{ return bound_const_volatile_mem_functor7<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>(_A_obj, _A_func); }
+
+
+} /* namespace sigc */
+#endif /* _SIGC_FUNCTORS_MACROS_MEM_FUNHM4_ */
diff --git a/libs/sigc++2/sigc++/functors/ptr_fun.h b/libs/sigc++2/sigc++/functors/ptr_fun.h
new file mode 100644
index 0000000000..5ab6b5ab96
--- /dev/null
+++ b/libs/sigc++2/sigc++/functors/ptr_fun.h
@@ -0,0 +1,542 @@
+// -*- c++ -*-
+/* Do not edit! -- generated file */
+
+#ifndef _SIGC_FUNCTORS_MACROS_PTR_FUNHM4_
+#define _SIGC_FUNCTORS_MACROS_PTR_FUNHM4_
+#include <sigc++/type_traits.h>
+#include <sigc++/functors/functor_trait.h>
+
+namespace sigc {
+
+/** @defgroup ptr_fun ptr_fun()
+ * ptr_fun() is used to convert a pointer to a function to a functor.
+ * If the function pointer is to an overloaded type, you must specify
+ * the types using template arguments starting with the first argument.
+ * It is not necessary to supply the return type.
+ *
+ * @par Example:
+ * @code
+ * void foo(int) {}
+ * sigc::slot<void, int> sl = sigc::ptr_fun(&foo);
+ * @endcode
+ *
+ * Use ptr_fun#() if there is an abiguity as to the number of arguments.
+ *
+ * @par Example:
+ * @code
+ * void foo(int) {} // choose this one
+ * void foo(float) {}
+ * void foo(int, int) {}
+ * sigc::slot<void, long> sl = sigc::ptr_fun1<int>(&foo);
+ * @endcode
+ *
+ * ptr_fun() can also be used to convert a pointer to a static member
+ * function to a functor, like so:
+ *
+ * @par Example:
+ * @code
+ * struct foo
+ * {
+ * static void bar(int) {}
+ * };
+ * sigc::slot<void, int> sl = sigc::ptr_fun(&foo::bar);
+ * @endcode
+ *
+ * @ingroup functors
+ */
+
+/** pointer_functor0 wraps existing non-member functions with 0 argument(s).
+ * Use the convenience function ptr_fun() to create an instance of pointer_functor0.
+ *
+ * The following template arguments are used:
+ * - @e T_return The return type of operator()().
+ *
+ * @ingroup ptr_fun
+ */
+template <class T_return>
+class pointer_functor0 : public functor_base
+{
+ typedef T_return (*function_type)();
+protected:
+ function_type func_ptr_;
+public:
+ typedef T_return result_type;
+
+ /// Constructs an invalid functor.
+ pointer_functor0() {}
+
+ /** Constructs a pointer_functor0 object that wraps an existing function.
+ * @param _A_func Pointer to function that will be invoked from operator()().
+ */
+ explicit pointer_functor0(function_type _A_func): func_ptr_(_A_func) {}
+
+ /** Execute the wrapped function.
+ * @return The return value of the function invocation.
+ */
+ T_return operator()() const
+ { return func_ptr_(); }
+};
+
+/** pointer_functor1 wraps existing non-member functions with 1 argument(s).
+ * Use the convenience function ptr_fun() to create an instance of pointer_functor1.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ *
+ * @ingroup ptr_fun
+ */
+template <class T_arg1, class T_return>
+class pointer_functor1 : public functor_base
+{
+ typedef T_return (*function_type)(T_arg1);
+protected:
+ function_type func_ptr_;
+public:
+ typedef T_return result_type;
+
+ /// Constructs an invalid functor.
+ pointer_functor1() {}
+
+ /** Constructs a pointer_functor1 object that wraps an existing function.
+ * @param _A_func Pointer to function that will be invoked from operator()().
+ */
+ explicit pointer_functor1(function_type _A_func): func_ptr_(_A_func) {}
+
+ /** Execute the wrapped function.
+ * @param _A_a1 Argument to be passed on to the function.
+ * @return The return value of the function invocation.
+ */
+ T_return operator()(typename type_trait<T_arg1>::take _A_a1) const
+ { return func_ptr_(_A_a1); }
+};
+
+/** pointer_functor2 wraps existing non-member functions with 2 argument(s).
+ * Use the convenience function ptr_fun() to create an instance of pointer_functor2.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ *
+ * @ingroup ptr_fun
+ */
+template <class T_arg1,class T_arg2, class T_return>
+class pointer_functor2 : public functor_base
+{
+ typedef T_return (*function_type)(T_arg1,T_arg2);
+protected:
+ function_type func_ptr_;
+public:
+ typedef T_return result_type;
+
+ /// Constructs an invalid functor.
+ pointer_functor2() {}
+
+ /** Constructs a pointer_functor2 object that wraps an existing function.
+ * @param _A_func Pointer to function that will be invoked from operator()().
+ */
+ explicit pointer_functor2(function_type _A_func): func_ptr_(_A_func) {}
+
+ /** Execute the wrapped function.
+ * @param _A_a1 Argument to be passed on to the function.
+ * @param _A_a2 Argument to be passed on to the function.
+ * @return The return value of the function invocation.
+ */
+ T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2) const
+ { return func_ptr_(_A_a1,_A_a2); }
+};
+
+/** pointer_functor3 wraps existing non-member functions with 3 argument(s).
+ * Use the convenience function ptr_fun() to create an instance of pointer_functor3.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ * - @e T_arg3 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ *
+ * @ingroup ptr_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3, class T_return>
+class pointer_functor3 : public functor_base
+{
+ typedef T_return (*function_type)(T_arg1,T_arg2,T_arg3);
+protected:
+ function_type func_ptr_;
+public:
+ typedef T_return result_type;
+
+ /// Constructs an invalid functor.
+ pointer_functor3() {}
+
+ /** Constructs a pointer_functor3 object that wraps an existing function.
+ * @param _A_func Pointer to function that will be invoked from operator()().
+ */
+ explicit pointer_functor3(function_type _A_func): func_ptr_(_A_func) {}
+
+ /** Execute the wrapped function.
+ * @param _A_a1 Argument to be passed on to the function.
+ * @param _A_a2 Argument to be passed on to the function.
+ * @param _A_a3 Argument to be passed on to the function.
+ * @return The return value of the function invocation.
+ */
+ T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3) const
+ { return func_ptr_(_A_a1,_A_a2,_A_a3); }
+};
+
+/** pointer_functor4 wraps existing non-member functions with 4 argument(s).
+ * Use the convenience function ptr_fun() to create an instance of pointer_functor4.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ * - @e T_arg3 Argument type used in the definition of operator()().
+ * - @e T_arg4 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ *
+ * @ingroup ptr_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4, class T_return>
+class pointer_functor4 : public functor_base
+{
+ typedef T_return (*function_type)(T_arg1,T_arg2,T_arg3,T_arg4);
+protected:
+ function_type func_ptr_;
+public:
+ typedef T_return result_type;
+
+ /// Constructs an invalid functor.
+ pointer_functor4() {}
+
+ /** Constructs a pointer_functor4 object that wraps an existing function.
+ * @param _A_func Pointer to function that will be invoked from operator()().
+ */
+ explicit pointer_functor4(function_type _A_func): func_ptr_(_A_func) {}
+
+ /** Execute the wrapped function.
+ * @param _A_a1 Argument to be passed on to the function.
+ * @param _A_a2 Argument to be passed on to the function.
+ * @param _A_a3 Argument to be passed on to the function.
+ * @param _A_a4 Argument to be passed on to the function.
+ * @return The return value of the function invocation.
+ */
+ T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4) const
+ { return func_ptr_(_A_a1,_A_a2,_A_a3,_A_a4); }
+};
+
+/** pointer_functor5 wraps existing non-member functions with 5 argument(s).
+ * Use the convenience function ptr_fun() to create an instance of pointer_functor5.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ * - @e T_arg3 Argument type used in the definition of operator()().
+ * - @e T_arg4 Argument type used in the definition of operator()().
+ * - @e T_arg5 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ *
+ * @ingroup ptr_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5, class T_return>
+class pointer_functor5 : public functor_base
+{
+ typedef T_return (*function_type)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5);
+protected:
+ function_type func_ptr_;
+public:
+ typedef T_return result_type;
+
+ /// Constructs an invalid functor.
+ pointer_functor5() {}
+
+ /** Constructs a pointer_functor5 object that wraps an existing function.
+ * @param _A_func Pointer to function that will be invoked from operator()().
+ */
+ explicit pointer_functor5(function_type _A_func): func_ptr_(_A_func) {}
+
+ /** Execute the wrapped function.
+ * @param _A_a1 Argument to be passed on to the function.
+ * @param _A_a2 Argument to be passed on to the function.
+ * @param _A_a3 Argument to be passed on to the function.
+ * @param _A_a4 Argument to be passed on to the function.
+ * @param _A_a5 Argument to be passed on to the function.
+ * @return The return value of the function invocation.
+ */
+ T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5) const
+ { return func_ptr_(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5); }
+};
+
+/** pointer_functor6 wraps existing non-member functions with 6 argument(s).
+ * Use the convenience function ptr_fun() to create an instance of pointer_functor6.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ * - @e T_arg3 Argument type used in the definition of operator()().
+ * - @e T_arg4 Argument type used in the definition of operator()().
+ * - @e T_arg5 Argument type used in the definition of operator()().
+ * - @e T_arg6 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ *
+ * @ingroup ptr_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6, class T_return>
+class pointer_functor6 : public functor_base
+{
+ typedef T_return (*function_type)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6);
+protected:
+ function_type func_ptr_;
+public:
+ typedef T_return result_type;
+
+ /// Constructs an invalid functor.
+ pointer_functor6() {}
+
+ /** Constructs a pointer_functor6 object that wraps an existing function.
+ * @param _A_func Pointer to function that will be invoked from operator()().
+ */
+ explicit pointer_functor6(function_type _A_func): func_ptr_(_A_func) {}
+
+ /** Execute the wrapped function.
+ * @param _A_a1 Argument to be passed on to the function.
+ * @param _A_a2 Argument to be passed on to the function.
+ * @param _A_a3 Argument to be passed on to the function.
+ * @param _A_a4 Argument to be passed on to the function.
+ * @param _A_a5 Argument to be passed on to the function.
+ * @param _A_a6 Argument to be passed on to the function.
+ * @return The return value of the function invocation.
+ */
+ T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5,typename type_trait<T_arg6>::take _A_a6) const
+ { return func_ptr_(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6); }
+};
+
+/** pointer_functor7 wraps existing non-member functions with 7 argument(s).
+ * Use the convenience function ptr_fun() to create an instance of pointer_functor7.
+ *
+ * The following template arguments are used:
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ * - @e T_arg3 Argument type used in the definition of operator()().
+ * - @e T_arg4 Argument type used in the definition of operator()().
+ * - @e T_arg5 Argument type used in the definition of operator()().
+ * - @e T_arg6 Argument type used in the definition of operator()().
+ * - @e T_arg7 Argument type used in the definition of operator()().
+ * - @e T_return The return type of operator()().
+ *
+ * @ingroup ptr_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7, class T_return>
+class pointer_functor7 : public functor_base
+{
+ typedef T_return (*function_type)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7);
+protected:
+ function_type func_ptr_;
+public:
+ typedef T_return result_type;
+
+ /// Constructs an invalid functor.
+ pointer_functor7() {}
+
+ /** Constructs a pointer_functor7 object that wraps an existing function.
+ * @param _A_func Pointer to function that will be invoked from operator()().
+ */
+ explicit pointer_functor7(function_type _A_func): func_ptr_(_A_func) {}
+
+ /** Execute the wrapped function.
+ * @param _A_a1 Argument to be passed on to the function.
+ * @param _A_a2 Argument to be passed on to the function.
+ * @param _A_a3 Argument to be passed on to the function.
+ * @param _A_a4 Argument to be passed on to the function.
+ * @param _A_a5 Argument to be passed on to the function.
+ * @param _A_a6 Argument to be passed on to the function.
+ * @param _A_a7 Argument to be passed on to the function.
+ * @return The return value of the function invocation.
+ */
+ T_return operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5,typename type_trait<T_arg6>::take _A_a6,typename type_trait<T_arg7>::take _A_a7) const
+ { return func_ptr_(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7); }
+};
+
+
+// numbered ptr_fun
+/** Creates a functor of type sigc::pointer_functor0 which wraps an existing non-member function.
+ * @param _A_func Pointer to function that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup ptr_fun
+ */
+template <class T_return>
+inline pointer_functor0<T_return>
+ptr_fun0(T_return (*_A_func)())
+{ return pointer_functor0<T_return>(_A_func); }
+
+/** Creates a functor of type sigc::pointer_functor1 which wraps an existing non-member function.
+ * @param _A_func Pointer to function that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup ptr_fun
+ */
+template <class T_arg1, class T_return>
+inline pointer_functor1<T_arg1, T_return>
+ptr_fun1(T_return (*_A_func)(T_arg1))
+{ return pointer_functor1<T_arg1, T_return>(_A_func); }
+
+/** Creates a functor of type sigc::pointer_functor2 which wraps an existing non-member function.
+ * @param _A_func Pointer to function that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup ptr_fun
+ */
+template <class T_arg1,class T_arg2, class T_return>
+inline pointer_functor2<T_arg1,T_arg2, T_return>
+ptr_fun2(T_return (*_A_func)(T_arg1,T_arg2))
+{ return pointer_functor2<T_arg1,T_arg2, T_return>(_A_func); }
+
+/** Creates a functor of type sigc::pointer_functor3 which wraps an existing non-member function.
+ * @param _A_func Pointer to function that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup ptr_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3, class T_return>
+inline pointer_functor3<T_arg1,T_arg2,T_arg3, T_return>
+ptr_fun3(T_return (*_A_func)(T_arg1,T_arg2,T_arg3))
+{ return pointer_functor3<T_arg1,T_arg2,T_arg3, T_return>(_A_func); }
+
+/** Creates a functor of type sigc::pointer_functor4 which wraps an existing non-member function.
+ * @param _A_func Pointer to function that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup ptr_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4, class T_return>
+inline pointer_functor4<T_arg1,T_arg2,T_arg3,T_arg4, T_return>
+ptr_fun4(T_return (*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4))
+{ return pointer_functor4<T_arg1,T_arg2,T_arg3,T_arg4, T_return>(_A_func); }
+
+/** Creates a functor of type sigc::pointer_functor5 which wraps an existing non-member function.
+ * @param _A_func Pointer to function that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup ptr_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5, class T_return>
+inline pointer_functor5<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5, T_return>
+ptr_fun5(T_return (*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5))
+{ return pointer_functor5<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5, T_return>(_A_func); }
+
+/** Creates a functor of type sigc::pointer_functor6 which wraps an existing non-member function.
+ * @param _A_func Pointer to function that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup ptr_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6, class T_return>
+inline pointer_functor6<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6, T_return>
+ptr_fun6(T_return (*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6))
+{ return pointer_functor6<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6, T_return>(_A_func); }
+
+/** Creates a functor of type sigc::pointer_functor7 which wraps an existing non-member function.
+ * @param _A_func Pointer to function that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup ptr_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7, class T_return>
+inline pointer_functor7<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7, T_return>
+ptr_fun7(T_return (*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7))
+{ return pointer_functor7<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7, T_return>(_A_func); }
+
+
+// unnumbered ptr_fun
+/** Creates a functor of type sigc::pointer_functor0 which wraps an existing non-member function.
+ * @param _A_func Pointer to function that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup ptr_fun
+ */
+template <class T_return>
+inline pointer_functor0<T_return>
+ptr_fun(T_return (*_A_func)())
+{ return pointer_functor0<T_return>(_A_func); }
+
+/** Creates a functor of type sigc::pointer_functor1 which wraps an existing non-member function.
+ * @param _A_func Pointer to function that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup ptr_fun
+ */
+template <class T_arg1, class T_return>
+inline pointer_functor1<T_arg1, T_return>
+ptr_fun(T_return (*_A_func)(T_arg1))
+{ return pointer_functor1<T_arg1, T_return>(_A_func); }
+
+/** Creates a functor of type sigc::pointer_functor2 which wraps an existing non-member function.
+ * @param _A_func Pointer to function that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup ptr_fun
+ */
+template <class T_arg1,class T_arg2, class T_return>
+inline pointer_functor2<T_arg1,T_arg2, T_return>
+ptr_fun(T_return (*_A_func)(T_arg1,T_arg2))
+{ return pointer_functor2<T_arg1,T_arg2, T_return>(_A_func); }
+
+/** Creates a functor of type sigc::pointer_functor3 which wraps an existing non-member function.
+ * @param _A_func Pointer to function that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup ptr_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3, class T_return>
+inline pointer_functor3<T_arg1,T_arg2,T_arg3, T_return>
+ptr_fun(T_return (*_A_func)(T_arg1,T_arg2,T_arg3))
+{ return pointer_functor3<T_arg1,T_arg2,T_arg3, T_return>(_A_func); }
+
+/** Creates a functor of type sigc::pointer_functor4 which wraps an existing non-member function.
+ * @param _A_func Pointer to function that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup ptr_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4, class T_return>
+inline pointer_functor4<T_arg1,T_arg2,T_arg3,T_arg4, T_return>
+ptr_fun(T_return (*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4))
+{ return pointer_functor4<T_arg1,T_arg2,T_arg3,T_arg4, T_return>(_A_func); }
+
+/** Creates a functor of type sigc::pointer_functor5 which wraps an existing non-member function.
+ * @param _A_func Pointer to function that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup ptr_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5, class T_return>
+inline pointer_functor5<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5, T_return>
+ptr_fun(T_return (*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5))
+{ return pointer_functor5<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5, T_return>(_A_func); }
+
+/** Creates a functor of type sigc::pointer_functor6 which wraps an existing non-member function.
+ * @param _A_func Pointer to function that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup ptr_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6, class T_return>
+inline pointer_functor6<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6, T_return>
+ptr_fun(T_return (*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6))
+{ return pointer_functor6<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6, T_return>(_A_func); }
+
+/** Creates a functor of type sigc::pointer_functor7 which wraps an existing non-member function.
+ * @param _A_func Pointer to function that should be wrapped.
+ * @return Functor that executes @e _A_func on invokation.
+ *
+ * @ingroup ptr_fun
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7, class T_return>
+inline pointer_functor7<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7, T_return>
+ptr_fun(T_return (*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7))
+{ return pointer_functor7<T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7, T_return>(_A_func); }
+
+
+} /* namespace sigc */
+#endif /* _SIGC_FUNCTORS_MACROS_PTR_FUNHM4_ */
diff --git a/libs/sigc++2/sigc++/functors/slot.cc b/libs/sigc++2/sigc++/functors/slot.cc
new file mode 100644
index 0000000000..5b9c92e201
--- /dev/null
+++ b/libs/sigc++2/sigc++/functors/slot.cc
@@ -0,0 +1,25 @@
+// -*- c++ -*-
+/*
+ * Copyright 2002, The libsigc++ Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+#include <sigc++/functors/slot.h>
+
+namespace sigc {
+
+
+} /* namespace sigc */
diff --git a/libs/sigc++2/sigc++/functors/slot.h b/libs/sigc++2/sigc++/functors/slot.h
new file mode 100644
index 0000000000..51294fe4d8
--- /dev/null
+++ b/libs/sigc++2/sigc++/functors/slot.h
@@ -0,0 +1,1263 @@
+// -*- c++ -*-
+/* Do not edit! -- generated file */
+#ifndef _SIGC_FUNCTORS_MACROS_SLOTHM4_
+#define _SIGC_FUNCTORS_MACROS_SLOTHM4_
+#include <sigc++/trackable.h>
+#include <sigc++/visit_each.h>
+#include <sigc++/adaptors/adaptor_trait.h>
+#include <sigc++/functors/slot_base.h>
+
+namespace sigc {
+
+namespace internal {
+
+/** A typed slot_rep.
+ * A typed slot_rep holds a functor that can be invoked from
+ * slot::operator()(). visit_each() is used to visit the functor's
+ * targets that inherit trackable recursively and register the
+ * notification callback. Consequently the slot_rep object will be
+ * notified when some referred object is destroyed or overwritten.
+ */
+template <class T_functor>
+struct typed_slot_rep : public slot_rep
+{
+ typedef typed_slot_rep<T_functor> self;
+
+ /* Use an adaptor type so that arguments can be passed as const references
+ * through explicit template instantiation from slot_call#::call_it() */
+ typedef typename adaptor_trait<T_functor>::adaptor_type adaptor_type;
+
+ /** The functor contained by this slot_rep object. */
+ adaptor_type functor_;
+
+ /** Constructs an invalid typed slot_rep object.
+ * The notification callback is registered using visit_each().
+ * @param functor The functor contained by the new slot_rep object.
+ */
+ inline typed_slot_rep(const T_functor& functor)
+ : slot_rep(0, &destroy, &dup), functor_(functor)
+ { visit_each_type<trackable*>(slot_do_bind(this), functor_); }
+
+ inline typed_slot_rep(const typed_slot_rep& cl)
+ : slot_rep(cl.call_, &destroy, &dup), functor_(cl.functor_)
+ { visit_each_type<trackable*>(slot_do_bind(this), functor_); }
+
+ inline ~typed_slot_rep()
+ {
+ call_ = 0;
+ destroy_ = 0;
+ visit_each_type<trackable*>(slot_do_unbind(this), functor_);
+ }
+
+ /** Detaches the stored functor from the other referred trackables and destroys it.
+ * This does not destroy the base slot_rep object.
+ */
+ static void* destroy(void* data)
+ {
+ self* self_ = static_cast<self*>((slot_rep*)data);
+ self_->call_ = 0;
+ self_->destroy_ = 0;
+ visit_each_type<trackable*>(slot_do_unbind(self_), self_->functor_);
+ self_->functor_.~adaptor_type();
+ /* don't call disconnect() here: destroy() is either called
+ * a) from the parent itself (in which case disconnect() leads to a segfault) or
+ * b) from a parentless slot (in which case disconnect() does nothing)
+ */
+ return 0;
+ }
+
+ /** Makes a deep copy of the slot_rep object.
+ * Deep copy means that the notification callback of the new
+ * slot_rep object is registered in the referred trackables.
+ * @return A deep copy of the slot_rep object.
+ */
+ static void* dup(void* data)
+ {
+ slot_rep* rep_ = (slot_rep*)data;
+ return static_cast<slot_rep*>(new self(*static_cast<self*>(rep_)));
+ }
+};
+
+
+/** Abstracts functor execution.
+ * call_it() invokes a functor of type @e T_functor with a list of
+ * parameters whose types are given by the template arguments.
+ * address() forms a function pointer from call_it().
+ *
+ * The following template arguments are used:
+ * - @e T_functor The functor type.
+ * - @e T_return The return type of call_it().
+ *
+ */
+template<class T_functor, class T_return>
+struct slot_call0
+{
+ /** Invokes a functor of type @p T_functor.
+ * @param rep slot_rep object that holds a functor of type @p T_functor.
+ * @return The return values of the functor invocation.
+ */
+ static T_return call_it(slot_rep* rep)
+ {
+ typedef typed_slot_rep<T_functor> typed_slot;
+ typed_slot *typed_rep = static_cast<typed_slot*>(rep);
+ return (typed_rep->functor_)();
+ }
+
+ /** Forms a function pointer from call_it().
+ * @return A function pointer formed from call_it().
+ */
+ static hook address()
+ { return reinterpret_cast<hook>(&call_it); }
+};
+
+/** Abstracts functor execution.
+ * call_it() invokes a functor of type @e T_functor with a list of
+ * parameters whose types are given by the template arguments.
+ * address() forms a function pointer from call_it().
+ *
+ * The following template arguments are used:
+ * - @e T_functor The functor type.
+ * - @e T_return The return type of call_it().
+ * - @e T_arg1 Argument type used in the definition of call_it().
+ *
+ */
+template<class T_functor, class T_return, class T_arg1>
+struct slot_call1
+{
+ /** Invokes a functor of type @p T_functor.
+ * @param rep slot_rep object that holds a functor of type @p T_functor.
+ * @param _A_a1 Argument to be passed on to the functor.
+ * @return The return values of the functor invocation.
+ */
+ static T_return call_it(slot_rep* rep, typename type_trait<T_arg1>::take a_1)
+ {
+ typedef typed_slot_rep<T_functor> typed_slot;
+ typed_slot *typed_rep = static_cast<typed_slot*>(rep);
+ return (typed_rep->functor_).SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::take>
+ (a_1);
+ }
+
+ /** Forms a function pointer from call_it().
+ * @return A function pointer formed from call_it().
+ */
+ static hook address()
+ { return reinterpret_cast<hook>(&call_it); }
+};
+
+/** Abstracts functor execution.
+ * call_it() invokes a functor of type @e T_functor with a list of
+ * parameters whose types are given by the template arguments.
+ * address() forms a function pointer from call_it().
+ *
+ * The following template arguments are used:
+ * - @e T_functor The functor type.
+ * - @e T_return The return type of call_it().
+ * - @e T_arg1 Argument type used in the definition of call_it().
+ * - @e T_arg2 Argument type used in the definition of call_it().
+ *
+ */
+template<class T_functor, class T_return, class T_arg1,class T_arg2>
+struct slot_call2
+{
+ /** Invokes a functor of type @p T_functor.
+ * @param rep slot_rep object that holds a functor of type @p T_functor.
+ * @param _A_a1 Argument to be passed on to the functor.
+ * @param _A_a2 Argument to be passed on to the functor.
+ * @return The return values of the functor invocation.
+ */
+ static T_return call_it(slot_rep* rep, typename type_trait<T_arg1>::take a_1,typename type_trait<T_arg2>::take a_2)
+ {
+ typedef typed_slot_rep<T_functor> typed_slot;
+ typed_slot *typed_rep = static_cast<typed_slot*>(rep);
+ return (typed_rep->functor_).SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::take,typename type_trait<T_arg2>::take>
+ (a_1,a_2);
+ }
+
+ /** Forms a function pointer from call_it().
+ * @return A function pointer formed from call_it().
+ */
+ static hook address()
+ { return reinterpret_cast<hook>(&call_it); }
+};
+
+/** Abstracts functor execution.
+ * call_it() invokes a functor of type @e T_functor with a list of
+ * parameters whose types are given by the template arguments.
+ * address() forms a function pointer from call_it().
+ *
+ * The following template arguments are used:
+ * - @e T_functor The functor type.
+ * - @e T_return The return type of call_it().
+ * - @e T_arg1 Argument type used in the definition of call_it().
+ * - @e T_arg2 Argument type used in the definition of call_it().
+ * - @e T_arg3 Argument type used in the definition of call_it().
+ *
+ */
+template<class T_functor, class T_return, class T_arg1,class T_arg2,class T_arg3>
+struct slot_call3
+{
+ /** Invokes a functor of type @p T_functor.
+ * @param rep slot_rep object that holds a functor of type @p T_functor.
+ * @param _A_a1 Argument to be passed on to the functor.
+ * @param _A_a2 Argument to be passed on to the functor.
+ * @param _A_a3 Argument to be passed on to the functor.
+ * @return The return values of the functor invocation.
+ */
+ static T_return call_it(slot_rep* rep, typename type_trait<T_arg1>::take a_1,typename type_trait<T_arg2>::take a_2,typename type_trait<T_arg3>::take a_3)
+ {
+ typedef typed_slot_rep<T_functor> typed_slot;
+ typed_slot *typed_rep = static_cast<typed_slot*>(rep);
+ return (typed_rep->functor_).SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::take,typename type_trait<T_arg2>::take,typename type_trait<T_arg3>::take>
+ (a_1,a_2,a_3);
+ }
+
+ /** Forms a function pointer from call_it().
+ * @return A function pointer formed from call_it().
+ */
+ static hook address()
+ { return reinterpret_cast<hook>(&call_it); }
+};
+
+/** Abstracts functor execution.
+ * call_it() invokes a functor of type @e T_functor with a list of
+ * parameters whose types are given by the template arguments.
+ * address() forms a function pointer from call_it().
+ *
+ * The following template arguments are used:
+ * - @e T_functor The functor type.
+ * - @e T_return The return type of call_it().
+ * - @e T_arg1 Argument type used in the definition of call_it().
+ * - @e T_arg2 Argument type used in the definition of call_it().
+ * - @e T_arg3 Argument type used in the definition of call_it().
+ * - @e T_arg4 Argument type used in the definition of call_it().
+ *
+ */
+template<class T_functor, class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+struct slot_call4
+{
+ /** Invokes a functor of type @p T_functor.
+ * @param rep slot_rep object that holds a functor of type @p T_functor.
+ * @param _A_a1 Argument to be passed on to the functor.
+ * @param _A_a2 Argument to be passed on to the functor.
+ * @param _A_a3 Argument to be passed on to the functor.
+ * @param _A_a4 Argument to be passed on to the functor.
+ * @return The return values of the functor invocation.
+ */
+ static T_return call_it(slot_rep* rep, typename type_trait<T_arg1>::take a_1,typename type_trait<T_arg2>::take a_2,typename type_trait<T_arg3>::take a_3,typename type_trait<T_arg4>::take a_4)
+ {
+ typedef typed_slot_rep<T_functor> typed_slot;
+ typed_slot *typed_rep = static_cast<typed_slot*>(rep);
+ return (typed_rep->functor_).SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::take,typename type_trait<T_arg2>::take,typename type_trait<T_arg3>::take,typename type_trait<T_arg4>::take>
+ (a_1,a_2,a_3,a_4);
+ }
+
+ /** Forms a function pointer from call_it().
+ * @return A function pointer formed from call_it().
+ */
+ static hook address()
+ { return reinterpret_cast<hook>(&call_it); }
+};
+
+/** Abstracts functor execution.
+ * call_it() invokes a functor of type @e T_functor with a list of
+ * parameters whose types are given by the template arguments.
+ * address() forms a function pointer from call_it().
+ *
+ * The following template arguments are used:
+ * - @e T_functor The functor type.
+ * - @e T_return The return type of call_it().
+ * - @e T_arg1 Argument type used in the definition of call_it().
+ * - @e T_arg2 Argument type used in the definition of call_it().
+ * - @e T_arg3 Argument type used in the definition of call_it().
+ * - @e T_arg4 Argument type used in the definition of call_it().
+ * - @e T_arg5 Argument type used in the definition of call_it().
+ *
+ */
+template<class T_functor, class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+struct slot_call5
+{
+ /** Invokes a functor of type @p T_functor.
+ * @param rep slot_rep object that holds a functor of type @p T_functor.
+ * @param _A_a1 Argument to be passed on to the functor.
+ * @param _A_a2 Argument to be passed on to the functor.
+ * @param _A_a3 Argument to be passed on to the functor.
+ * @param _A_a4 Argument to be passed on to the functor.
+ * @param _A_a5 Argument to be passed on to the functor.
+ * @return The return values of the functor invocation.
+ */
+ static T_return call_it(slot_rep* rep, typename type_trait<T_arg1>::take a_1,typename type_trait<T_arg2>::take a_2,typename type_trait<T_arg3>::take a_3,typename type_trait<T_arg4>::take a_4,typename type_trait<T_arg5>::take a_5)
+ {
+ typedef typed_slot_rep<T_functor> typed_slot;
+ typed_slot *typed_rep = static_cast<typed_slot*>(rep);
+ return (typed_rep->functor_).SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::take,typename type_trait<T_arg2>::take,typename type_trait<T_arg3>::take,typename type_trait<T_arg4>::take,typename type_trait<T_arg5>::take>
+ (a_1,a_2,a_3,a_4,a_5);
+ }
+
+ /** Forms a function pointer from call_it().
+ * @return A function pointer formed from call_it().
+ */
+ static hook address()
+ { return reinterpret_cast<hook>(&call_it); }
+};
+
+/** Abstracts functor execution.
+ * call_it() invokes a functor of type @e T_functor with a list of
+ * parameters whose types are given by the template arguments.
+ * address() forms a function pointer from call_it().
+ *
+ * The following template arguments are used:
+ * - @e T_functor The functor type.
+ * - @e T_return The return type of call_it().
+ * - @e T_arg1 Argument type used in the definition of call_it().
+ * - @e T_arg2 Argument type used in the definition of call_it().
+ * - @e T_arg3 Argument type used in the definition of call_it().
+ * - @e T_arg4 Argument type used in the definition of call_it().
+ * - @e T_arg5 Argument type used in the definition of call_it().
+ * - @e T_arg6 Argument type used in the definition of call_it().
+ *
+ */
+template<class T_functor, class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+struct slot_call6
+{
+ /** Invokes a functor of type @p T_functor.
+ * @param rep slot_rep object that holds a functor of type @p T_functor.
+ * @param _A_a1 Argument to be passed on to the functor.
+ * @param _A_a2 Argument to be passed on to the functor.
+ * @param _A_a3 Argument to be passed on to the functor.
+ * @param _A_a4 Argument to be passed on to the functor.
+ * @param _A_a5 Argument to be passed on to the functor.
+ * @param _A_a6 Argument to be passed on to the functor.
+ * @return The return values of the functor invocation.
+ */
+ static T_return call_it(slot_rep* rep, typename type_trait<T_arg1>::take a_1,typename type_trait<T_arg2>::take a_2,typename type_trait<T_arg3>::take a_3,typename type_trait<T_arg4>::take a_4,typename type_trait<T_arg5>::take a_5,typename type_trait<T_arg6>::take a_6)
+ {
+ typedef typed_slot_rep<T_functor> typed_slot;
+ typed_slot *typed_rep = static_cast<typed_slot*>(rep);
+ return (typed_rep->functor_).SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::take,typename type_trait<T_arg2>::take,typename type_trait<T_arg3>::take,typename type_trait<T_arg4>::take,typename type_trait<T_arg5>::take,typename type_trait<T_arg6>::take>
+ (a_1,a_2,a_3,a_4,a_5,a_6);
+ }
+
+ /** Forms a function pointer from call_it().
+ * @return A function pointer formed from call_it().
+ */
+ static hook address()
+ { return reinterpret_cast<hook>(&call_it); }
+};
+
+/** Abstracts functor execution.
+ * call_it() invokes a functor of type @e T_functor with a list of
+ * parameters whose types are given by the template arguments.
+ * address() forms a function pointer from call_it().
+ *
+ * The following template arguments are used:
+ * - @e T_functor The functor type.
+ * - @e T_return The return type of call_it().
+ * - @e T_arg1 Argument type used in the definition of call_it().
+ * - @e T_arg2 Argument type used in the definition of call_it().
+ * - @e T_arg3 Argument type used in the definition of call_it().
+ * - @e T_arg4 Argument type used in the definition of call_it().
+ * - @e T_arg5 Argument type used in the definition of call_it().
+ * - @e T_arg6 Argument type used in the definition of call_it().
+ * - @e T_arg7 Argument type used in the definition of call_it().
+ *
+ */
+template<class T_functor, class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+struct slot_call7
+{
+ /** Invokes a functor of type @p T_functor.
+ * @param rep slot_rep object that holds a functor of type @p T_functor.
+ * @param _A_a1 Argument to be passed on to the functor.
+ * @param _A_a2 Argument to be passed on to the functor.
+ * @param _A_a3 Argument to be passed on to the functor.
+ * @param _A_a4 Argument to be passed on to the functor.
+ * @param _A_a5 Argument to be passed on to the functor.
+ * @param _A_a6 Argument to be passed on to the functor.
+ * @param _A_a7 Argument to be passed on to the functor.
+ * @return The return values of the functor invocation.
+ */
+ static T_return call_it(slot_rep* rep, typename type_trait<T_arg1>::take a_1,typename type_trait<T_arg2>::take a_2,typename type_trait<T_arg3>::take a_3,typename type_trait<T_arg4>::take a_4,typename type_trait<T_arg5>::take a_5,typename type_trait<T_arg6>::take a_6,typename type_trait<T_arg7>::take a_7)
+ {
+ typedef typed_slot_rep<T_functor> typed_slot;
+ typed_slot *typed_rep = static_cast<typed_slot*>(rep);
+ return (typed_rep->functor_).SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename type_trait<T_arg1>::take,typename type_trait<T_arg2>::take,typename type_trait<T_arg3>::take,typename type_trait<T_arg4>::take,typename type_trait<T_arg5>::take,typename type_trait<T_arg6>::take,typename type_trait<T_arg7>::take>
+ (a_1,a_2,a_3,a_4,a_5,a_6,a_7);
+ }
+
+ /** Forms a function pointer from call_it().
+ * @return A function pointer formed from call_it().
+ */
+ static hook address()
+ { return reinterpret_cast<hook>(&call_it); }
+};
+
+} /* namespace internal */
+
+
+/** Converts an arbitrary functor to a unified type which is opaque.
+ * sigc::slot itself is a functor or to be more precise a closure. It contains
+ * a single, arbitrary functor (or closure) that is executed in operator()().
+ *
+ * The template arguments determine the function signature of operator()():
+ * - @e T_return The return type of operator()().
+ *
+ * To use simply assign the slot to the desired functor. If the functor
+ * is not compatible with the parameter list defined with the template
+ * arguments compiler errors are triggered. When called the slot
+ * will invoke the functor with minimal copies.
+ * block() and unblock() can be used to block the functor's invocation
+ * from operator()() temporarily.
+ *
+ * You should use the more convenient unnumbered sigc::slot template.
+ *
+ * @ingroup slot
+ */
+/* TODO: Where put the following bit of information? I can't make any
+ * sense of the "because", by the way!
+ *
+ * Because slot is opaque, visit_each() will not visit its internal members.
+ */
+template <class T_return>
+class slot0
+ : public slot_base
+{
+public:
+ typedef T_return result_type;
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+private:
+ typedef internal::slot_rep rep_type;
+public:
+ typedef T_return (*call_type)(rep_type*);
+#endif
+
+ /** Invoke the contained functor unless slot is in blocking state.
+ * @return The return value of the functor invocation.
+ */
+ inline T_return operator()() const
+ {
+ if (!empty() && !blocked())
+ return (reinterpret_cast<call_type>(rep_->call_))(rep_);
+ return T_return();
+ }
+
+ inline slot0() {}
+
+ /** Constructs a slot from an arbitrary functor.
+ * @param _A_func The desirer functor the new slot should be assigned to.
+ */
+ template <class T_functor>
+ slot0(const T_functor& _A_func)
+ : slot_base(new internal::typed_slot_rep<T_functor>(_A_func))
+ { rep_->call_ = internal::slot_call0<T_functor, T_return>::address(); }
+
+ slot0(const slot0& src)
+ : slot_base(src) {}
+
+ /** Overrides this slot making a copy from another slot.
+ * @param src The slot from which to make a copy.
+ * @return @p this.
+ */
+ slot0& operator=(const slot0& src)
+ { slot_base::operator=(src); return *this; }
+};
+
+/** Converts an arbitrary functor to a unified type which is opaque.
+ * sigc::slot itself is a functor or to be more precise a closure. It contains
+ * a single, arbitrary functor (or closure) that is executed in operator()().
+ *
+ * The template arguments determine the function signature of operator()():
+ * - @e T_return The return type of operator()().
+ * - @e T_arg1 Argument type used in the definition of operator()(). The default @p nil means no argument.
+ *
+ * To use simply assign the slot to the desired functor. If the functor
+ * is not compatible with the parameter list defined with the template
+ * arguments compiler errors are triggered. When called the slot
+ * will invoke the functor with minimal copies.
+ * block() and unblock() can be used to block the functor's invocation
+ * from operator()() temporarily.
+ *
+ * You should use the more convenient unnumbered sigc::slot template.
+ *
+ * @ingroup slot
+ */
+/* TODO: Where put the following bit of information? I can't make any
+ * sense of the "because", by the way!
+ *
+ * Because slot is opaque, visit_each() will not visit its internal members.
+ */
+template <class T_return, class T_arg1>
+class slot1
+ : public slot_base
+{
+public:
+ typedef T_return result_type;
+ typedef typename type_trait<T_arg1>::take arg1_type_;
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+private:
+ typedef internal::slot_rep rep_type;
+public:
+ typedef T_return (*call_type)(rep_type*, arg1_type_);
+#endif
+
+ /** Invoke the contained functor unless slot is in blocking state.
+ * @param _A_a1 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ inline T_return operator()(arg1_type_ _A_a1) const
+ {
+ if (!empty() && !blocked())
+ return (reinterpret_cast<call_type>(rep_->call_))(rep_, _A_a1);
+ return T_return();
+ }
+
+ inline slot1() {}
+
+ /** Constructs a slot from an arbitrary functor.
+ * @param _A_func The desirer functor the new slot should be assigned to.
+ */
+ template <class T_functor>
+ slot1(const T_functor& _A_func)
+ : slot_base(new internal::typed_slot_rep<T_functor>(_A_func))
+ { rep_->call_ = internal::slot_call1<T_functor, T_return, T_arg1>::address(); }
+
+ slot1(const slot1& src)
+ : slot_base(src) {}
+
+ /** Overrides this slot making a copy from another slot.
+ * @param src The slot from which to make a copy.
+ * @return @p this.
+ */
+ slot1& operator=(const slot1& src)
+ { slot_base::operator=(src); return *this; }
+};
+
+/** Converts an arbitrary functor to a unified type which is opaque.
+ * sigc::slot itself is a functor or to be more precise a closure. It contains
+ * a single, arbitrary functor (or closure) that is executed in operator()().
+ *
+ * The template arguments determine the function signature of operator()():
+ * - @e T_return The return type of operator()().
+ * - @e T_arg1 Argument type used in the definition of operator()(). The default @p nil means no argument.
+ * - @e T_arg2 Argument type used in the definition of operator()(). The default @p nil means no argument.
+ *
+ * To use simply assign the slot to the desired functor. If the functor
+ * is not compatible with the parameter list defined with the template
+ * arguments compiler errors are triggered. When called the slot
+ * will invoke the functor with minimal copies.
+ * block() and unblock() can be used to block the functor's invocation
+ * from operator()() temporarily.
+ *
+ * You should use the more convenient unnumbered sigc::slot template.
+ *
+ * @ingroup slot
+ */
+/* TODO: Where put the following bit of information? I can't make any
+ * sense of the "because", by the way!
+ *
+ * Because slot is opaque, visit_each() will not visit its internal members.
+ */
+template <class T_return, class T_arg1,class T_arg2>
+class slot2
+ : public slot_base
+{
+public:
+ typedef T_return result_type;
+ typedef typename type_trait<T_arg1>::take arg1_type_;
+ typedef typename type_trait<T_arg2>::take arg2_type_;
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+private:
+ typedef internal::slot_rep rep_type;
+public:
+ typedef T_return (*call_type)(rep_type*, arg1_type_,arg2_type_);
+#endif
+
+ /** Invoke the contained functor unless slot is in blocking state.
+ * @param _A_a1 Argument to be passed on to the functor.
+ * @param _A_a2 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ inline T_return operator()(arg1_type_ _A_a1,arg2_type_ _A_a2) const
+ {
+ if (!empty() && !blocked())
+ return (reinterpret_cast<call_type>(rep_->call_))(rep_, _A_a1,_A_a2);
+ return T_return();
+ }
+
+ inline slot2() {}
+
+ /** Constructs a slot from an arbitrary functor.
+ * @param _A_func The desirer functor the new slot should be assigned to.
+ */
+ template <class T_functor>
+ slot2(const T_functor& _A_func)
+ : slot_base(new internal::typed_slot_rep<T_functor>(_A_func))
+ { rep_->call_ = internal::slot_call2<T_functor, T_return, T_arg1,T_arg2>::address(); }
+
+ slot2(const slot2& src)
+ : slot_base(src) {}
+
+ /** Overrides this slot making a copy from another slot.
+ * @param src The slot from which to make a copy.
+ * @return @p this.
+ */
+ slot2& operator=(const slot2& src)
+ { slot_base::operator=(src); return *this; }
+};
+
+/** Converts an arbitrary functor to a unified type which is opaque.
+ * sigc::slot itself is a functor or to be more precise a closure. It contains
+ * a single, arbitrary functor (or closure) that is executed in operator()().
+ *
+ * The template arguments determine the function signature of operator()():
+ * - @e T_return The return type of operator()().
+ * - @e T_arg1 Argument type used in the definition of operator()(). The default @p nil means no argument.
+ * - @e T_arg2 Argument type used in the definition of operator()(). The default @p nil means no argument.
+ * - @e T_arg3 Argument type used in the definition of operator()(). The default @p nil means no argument.
+ *
+ * To use simply assign the slot to the desired functor. If the functor
+ * is not compatible with the parameter list defined with the template
+ * arguments compiler errors are triggered. When called the slot
+ * will invoke the functor with minimal copies.
+ * block() and unblock() can be used to block the functor's invocation
+ * from operator()() temporarily.
+ *
+ * You should use the more convenient unnumbered sigc::slot template.
+ *
+ * @ingroup slot
+ */
+/* TODO: Where put the following bit of information? I can't make any
+ * sense of the "because", by the way!
+ *
+ * Because slot is opaque, visit_each() will not visit its internal members.
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3>
+class slot3
+ : public slot_base
+{
+public:
+ typedef T_return result_type;
+ typedef typename type_trait<T_arg1>::take arg1_type_;
+ typedef typename type_trait<T_arg2>::take arg2_type_;
+ typedef typename type_trait<T_arg3>::take arg3_type_;
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+private:
+ typedef internal::slot_rep rep_type;
+public:
+ typedef T_return (*call_type)(rep_type*, arg1_type_,arg2_type_,arg3_type_);
+#endif
+
+ /** Invoke the contained functor unless slot is in blocking state.
+ * @param _A_a1 Argument to be passed on to the functor.
+ * @param _A_a2 Argument to be passed on to the functor.
+ * @param _A_a3 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ inline T_return operator()(arg1_type_ _A_a1,arg2_type_ _A_a2,arg3_type_ _A_a3) const
+ {
+ if (!empty() && !blocked())
+ return (reinterpret_cast<call_type>(rep_->call_))(rep_, _A_a1,_A_a2,_A_a3);
+ return T_return();
+ }
+
+ inline slot3() {}
+
+ /** Constructs a slot from an arbitrary functor.
+ * @param _A_func The desirer functor the new slot should be assigned to.
+ */
+ template <class T_functor>
+ slot3(const T_functor& _A_func)
+ : slot_base(new internal::typed_slot_rep<T_functor>(_A_func))
+ { rep_->call_ = internal::slot_call3<T_functor, T_return, T_arg1,T_arg2,T_arg3>::address(); }
+
+ slot3(const slot3& src)
+ : slot_base(src) {}
+
+ /** Overrides this slot making a copy from another slot.
+ * @param src The slot from which to make a copy.
+ * @return @p this.
+ */
+ slot3& operator=(const slot3& src)
+ { slot_base::operator=(src); return *this; }
+};
+
+/** Converts an arbitrary functor to a unified type which is opaque.
+ * sigc::slot itself is a functor or to be more precise a closure. It contains
+ * a single, arbitrary functor (or closure) that is executed in operator()().
+ *
+ * The template arguments determine the function signature of operator()():
+ * - @e T_return The return type of operator()().
+ * - @e T_arg1 Argument type used in the definition of operator()(). The default @p nil means no argument.
+ * - @e T_arg2 Argument type used in the definition of operator()(). The default @p nil means no argument.
+ * - @e T_arg3 Argument type used in the definition of operator()(). The default @p nil means no argument.
+ * - @e T_arg4 Argument type used in the definition of operator()(). The default @p nil means no argument.
+ *
+ * To use simply assign the slot to the desired functor. If the functor
+ * is not compatible with the parameter list defined with the template
+ * arguments compiler errors are triggered. When called the slot
+ * will invoke the functor with minimal copies.
+ * block() and unblock() can be used to block the functor's invocation
+ * from operator()() temporarily.
+ *
+ * You should use the more convenient unnumbered sigc::slot template.
+ *
+ * @ingroup slot
+ */
+/* TODO: Where put the following bit of information? I can't make any
+ * sense of the "because", by the way!
+ *
+ * Because slot is opaque, visit_each() will not visit its internal members.
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+class slot4
+ : public slot_base
+{
+public:
+ typedef T_return result_type;
+ typedef typename type_trait<T_arg1>::take arg1_type_;
+ typedef typename type_trait<T_arg2>::take arg2_type_;
+ typedef typename type_trait<T_arg3>::take arg3_type_;
+ typedef typename type_trait<T_arg4>::take arg4_type_;
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+private:
+ typedef internal::slot_rep rep_type;
+public:
+ typedef T_return (*call_type)(rep_type*, arg1_type_,arg2_type_,arg3_type_,arg4_type_);
+#endif
+
+ /** Invoke the contained functor unless slot is in blocking state.
+ * @param _A_a1 Argument to be passed on to the functor.
+ * @param _A_a2 Argument to be passed on to the functor.
+ * @param _A_a3 Argument to be passed on to the functor.
+ * @param _A_a4 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ inline T_return operator()(arg1_type_ _A_a1,arg2_type_ _A_a2,arg3_type_ _A_a3,arg4_type_ _A_a4) const
+ {
+ if (!empty() && !blocked())
+ return (reinterpret_cast<call_type>(rep_->call_))(rep_, _A_a1,_A_a2,_A_a3,_A_a4);
+ return T_return();
+ }
+
+ inline slot4() {}
+
+ /** Constructs a slot from an arbitrary functor.
+ * @param _A_func The desirer functor the new slot should be assigned to.
+ */
+ template <class T_functor>
+ slot4(const T_functor& _A_func)
+ : slot_base(new internal::typed_slot_rep<T_functor>(_A_func))
+ { rep_->call_ = internal::slot_call4<T_functor, T_return, T_arg1,T_arg2,T_arg3,T_arg4>::address(); }
+
+ slot4(const slot4& src)
+ : slot_base(src) {}
+
+ /** Overrides this slot making a copy from another slot.
+ * @param src The slot from which to make a copy.
+ * @return @p this.
+ */
+ slot4& operator=(const slot4& src)
+ { slot_base::operator=(src); return *this; }
+};
+
+/** Converts an arbitrary functor to a unified type which is opaque.
+ * sigc::slot itself is a functor or to be more precise a closure. It contains
+ * a single, arbitrary functor (or closure) that is executed in operator()().
+ *
+ * The template arguments determine the function signature of operator()():
+ * - @e T_return The return type of operator()().
+ * - @e T_arg1 Argument type used in the definition of operator()(). The default @p nil means no argument.
+ * - @e T_arg2 Argument type used in the definition of operator()(). The default @p nil means no argument.
+ * - @e T_arg3 Argument type used in the definition of operator()(). The default @p nil means no argument.
+ * - @e T_arg4 Argument type used in the definition of operator()(). The default @p nil means no argument.
+ * - @e T_arg5 Argument type used in the definition of operator()(). The default @p nil means no argument.
+ *
+ * To use simply assign the slot to the desired functor. If the functor
+ * is not compatible with the parameter list defined with the template
+ * arguments compiler errors are triggered. When called the slot
+ * will invoke the functor with minimal copies.
+ * block() and unblock() can be used to block the functor's invocation
+ * from operator()() temporarily.
+ *
+ * You should use the more convenient unnumbered sigc::slot template.
+ *
+ * @ingroup slot
+ */
+/* TODO: Where put the following bit of information? I can't make any
+ * sense of the "because", by the way!
+ *
+ * Because slot is opaque, visit_each() will not visit its internal members.
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+class slot5
+ : public slot_base
+{
+public:
+ typedef T_return result_type;
+ typedef typename type_trait<T_arg1>::take arg1_type_;
+ typedef typename type_trait<T_arg2>::take arg2_type_;
+ typedef typename type_trait<T_arg3>::take arg3_type_;
+ typedef typename type_trait<T_arg4>::take arg4_type_;
+ typedef typename type_trait<T_arg5>::take arg5_type_;
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+private:
+ typedef internal::slot_rep rep_type;
+public:
+ typedef T_return (*call_type)(rep_type*, arg1_type_,arg2_type_,arg3_type_,arg4_type_,arg5_type_);
+#endif
+
+ /** Invoke the contained functor unless slot is in blocking state.
+ * @param _A_a1 Argument to be passed on to the functor.
+ * @param _A_a2 Argument to be passed on to the functor.
+ * @param _A_a3 Argument to be passed on to the functor.
+ * @param _A_a4 Argument to be passed on to the functor.
+ * @param _A_a5 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ inline T_return operator()(arg1_type_ _A_a1,arg2_type_ _A_a2,arg3_type_ _A_a3,arg4_type_ _A_a4,arg5_type_ _A_a5) const
+ {
+ if (!empty() && !blocked())
+ return (reinterpret_cast<call_type>(rep_->call_))(rep_, _A_a1,_A_a2,_A_a3,_A_a4,_A_a5);
+ return T_return();
+ }
+
+ inline slot5() {}
+
+ /** Constructs a slot from an arbitrary functor.
+ * @param _A_func The desirer functor the new slot should be assigned to.
+ */
+ template <class T_functor>
+ slot5(const T_functor& _A_func)
+ : slot_base(new internal::typed_slot_rep<T_functor>(_A_func))
+ { rep_->call_ = internal::slot_call5<T_functor, T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>::address(); }
+
+ slot5(const slot5& src)
+ : slot_base(src) {}
+
+ /** Overrides this slot making a copy from another slot.
+ * @param src The slot from which to make a copy.
+ * @return @p this.
+ */
+ slot5& operator=(const slot5& src)
+ { slot_base::operator=(src); return *this; }
+};
+
+/** Converts an arbitrary functor to a unified type which is opaque.
+ * sigc::slot itself is a functor or to be more precise a closure. It contains
+ * a single, arbitrary functor (or closure) that is executed in operator()().
+ *
+ * The template arguments determine the function signature of operator()():
+ * - @e T_return The return type of operator()().
+ * - @e T_arg1 Argument type used in the definition of operator()(). The default @p nil means no argument.
+ * - @e T_arg2 Argument type used in the definition of operator()(). The default @p nil means no argument.
+ * - @e T_arg3 Argument type used in the definition of operator()(). The default @p nil means no argument.
+ * - @e T_arg4 Argument type used in the definition of operator()(). The default @p nil means no argument.
+ * - @e T_arg5 Argument type used in the definition of operator()(). The default @p nil means no argument.
+ * - @e T_arg6 Argument type used in the definition of operator()(). The default @p nil means no argument.
+ *
+ * To use simply assign the slot to the desired functor. If the functor
+ * is not compatible with the parameter list defined with the template
+ * arguments compiler errors are triggered. When called the slot
+ * will invoke the functor with minimal copies.
+ * block() and unblock() can be used to block the functor's invocation
+ * from operator()() temporarily.
+ *
+ * You should use the more convenient unnumbered sigc::slot template.
+ *
+ * @ingroup slot
+ */
+/* TODO: Where put the following bit of information? I can't make any
+ * sense of the "because", by the way!
+ *
+ * Because slot is opaque, visit_each() will not visit its internal members.
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+class slot6
+ : public slot_base
+{
+public:
+ typedef T_return result_type;
+ typedef typename type_trait<T_arg1>::take arg1_type_;
+ typedef typename type_trait<T_arg2>::take arg2_type_;
+ typedef typename type_trait<T_arg3>::take arg3_type_;
+ typedef typename type_trait<T_arg4>::take arg4_type_;
+ typedef typename type_trait<T_arg5>::take arg5_type_;
+ typedef typename type_trait<T_arg6>::take arg6_type_;
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+private:
+ typedef internal::slot_rep rep_type;
+public:
+ typedef T_return (*call_type)(rep_type*, arg1_type_,arg2_type_,arg3_type_,arg4_type_,arg5_type_,arg6_type_);
+#endif
+
+ /** Invoke the contained functor unless slot is in blocking state.
+ * @param _A_a1 Argument to be passed on to the functor.
+ * @param _A_a2 Argument to be passed on to the functor.
+ * @param _A_a3 Argument to be passed on to the functor.
+ * @param _A_a4 Argument to be passed on to the functor.
+ * @param _A_a5 Argument to be passed on to the functor.
+ * @param _A_a6 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ inline T_return operator()(arg1_type_ _A_a1,arg2_type_ _A_a2,arg3_type_ _A_a3,arg4_type_ _A_a4,arg5_type_ _A_a5,arg6_type_ _A_a6) const
+ {
+ if (!empty() && !blocked())
+ return (reinterpret_cast<call_type>(rep_->call_))(rep_, _A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6);
+ return T_return();
+ }
+
+ inline slot6() {}
+
+ /** Constructs a slot from an arbitrary functor.
+ * @param _A_func The desirer functor the new slot should be assigned to.
+ */
+ template <class T_functor>
+ slot6(const T_functor& _A_func)
+ : slot_base(new internal::typed_slot_rep<T_functor>(_A_func))
+ { rep_->call_ = internal::slot_call6<T_functor, T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>::address(); }
+
+ slot6(const slot6& src)
+ : slot_base(src) {}
+
+ /** Overrides this slot making a copy from another slot.
+ * @param src The slot from which to make a copy.
+ * @return @p this.
+ */
+ slot6& operator=(const slot6& src)
+ { slot_base::operator=(src); return *this; }
+};
+
+/** Converts an arbitrary functor to a unified type which is opaque.
+ * sigc::slot itself is a functor or to be more precise a closure. It contains
+ * a single, arbitrary functor (or closure) that is executed in operator()().
+ *
+ * The template arguments determine the function signature of operator()():
+ * - @e T_return The return type of operator()().
+ * - @e T_arg1 Argument type used in the definition of operator()(). The default @p nil means no argument.
+ * - @e T_arg2 Argument type used in the definition of operator()(). The default @p nil means no argument.
+ * - @e T_arg3 Argument type used in the definition of operator()(). The default @p nil means no argument.
+ * - @e T_arg4 Argument type used in the definition of operator()(). The default @p nil means no argument.
+ * - @e T_arg5 Argument type used in the definition of operator()(). The default @p nil means no argument.
+ * - @e T_arg6 Argument type used in the definition of operator()(). The default @p nil means no argument.
+ * - @e T_arg7 Argument type used in the definition of operator()(). The default @p nil means no argument.
+ *
+ * To use simply assign the slot to the desired functor. If the functor
+ * is not compatible with the parameter list defined with the template
+ * arguments compiler errors are triggered. When called the slot
+ * will invoke the functor with minimal copies.
+ * block() and unblock() can be used to block the functor's invocation
+ * from operator()() temporarily.
+ *
+ * You should use the more convenient unnumbered sigc::slot template.
+ *
+ * @ingroup slot
+ */
+/* TODO: Where put the following bit of information? I can't make any
+ * sense of the "because", by the way!
+ *
+ * Because slot is opaque, visit_each() will not visit its internal members.
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+class slot7
+ : public slot_base
+{
+public:
+ typedef T_return result_type;
+ typedef typename type_trait<T_arg1>::take arg1_type_;
+ typedef typename type_trait<T_arg2>::take arg2_type_;
+ typedef typename type_trait<T_arg3>::take arg3_type_;
+ typedef typename type_trait<T_arg4>::take arg4_type_;
+ typedef typename type_trait<T_arg5>::take arg5_type_;
+ typedef typename type_trait<T_arg6>::take arg6_type_;
+ typedef typename type_trait<T_arg7>::take arg7_type_;
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+private:
+ typedef internal::slot_rep rep_type;
+public:
+ typedef T_return (*call_type)(rep_type*, arg1_type_,arg2_type_,arg3_type_,arg4_type_,arg5_type_,arg6_type_,arg7_type_);
+#endif
+
+ /** Invoke the contained functor unless slot is in blocking state.
+ * @param _A_a1 Argument to be passed on to the functor.
+ * @param _A_a2 Argument to be passed on to the functor.
+ * @param _A_a3 Argument to be passed on to the functor.
+ * @param _A_a4 Argument to be passed on to the functor.
+ * @param _A_a5 Argument to be passed on to the functor.
+ * @param _A_a6 Argument to be passed on to the functor.
+ * @param _A_a7 Argument to be passed on to the functor.
+ * @return The return value of the functor invocation.
+ */
+ inline T_return operator()(arg1_type_ _A_a1,arg2_type_ _A_a2,arg3_type_ _A_a3,arg4_type_ _A_a4,arg5_type_ _A_a5,arg6_type_ _A_a6,arg7_type_ _A_a7) const
+ {
+ if (!empty() && !blocked())
+ return (reinterpret_cast<call_type>(rep_->call_))(rep_, _A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7);
+ return T_return();
+ }
+
+ inline slot7() {}
+
+ /** Constructs a slot from an arbitrary functor.
+ * @param _A_func The desirer functor the new slot should be assigned to.
+ */
+ template <class T_functor>
+ slot7(const T_functor& _A_func)
+ : slot_base(new internal::typed_slot_rep<T_functor>(_A_func))
+ { rep_->call_ = internal::slot_call7<T_functor, T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>::address(); }
+
+ slot7(const slot7& src)
+ : slot_base(src) {}
+
+ /** Overrides this slot making a copy from another slot.
+ * @param src The slot from which to make a copy.
+ * @return @p this.
+ */
+ slot7& operator=(const slot7& src)
+ { slot_base::operator=(src); return *this; }
+};
+
+
+/** Convenience wrapper for the numbered sigc::slot# templates.
+ * Slots convert arbitrary functors to unified types which are opaque.
+ * sigc::slot itself is a functor or to be more precise a closure. It contains
+ * a single, arbitrary functor (or closure) that is executed in operator()().
+ *
+ * The template arguments determine the function signature of operator()():
+ * - @e T_return The return type of operator()().
+ * - @e T_arg1 Argument type used in the definition of operator()(). The default @p nil means no argument.
+ * - @e T_arg2 Argument type used in the definition of operator()(). The default @p nil means no argument.
+ * - @e T_arg3 Argument type used in the definition of operator()(). The default @p nil means no argument.
+ * - @e T_arg4 Argument type used in the definition of operator()(). The default @p nil means no argument.
+ * - @e T_arg5 Argument type used in the definition of operator()(). The default @p nil means no argument.
+ * - @e T_arg6 Argument type used in the definition of operator()(). The default @p nil means no argument.
+ * - @e T_arg7 Argument type used in the definition of operator()(). The default @p nil means no argument.
+ *
+ * To use simply assign the slot to the desired functor. If the functor
+ * is not compatible with the parameter list defined with the template
+ * arguments compiler errors are triggered. When called the slot
+ * will invoke the functor with minimal copies.
+ * block() and unblock() can be used to block the functor's invocation
+ * from operator()() temporarily.
+ *
+ * @par Example:
+ * @code
+ * void foo(int) {}
+ * sigc::slot<void, long> s = sigc::ptr_fun(&foo);
+ * s(19);
+ * @endcode
+ *
+ * @ingroup slot
+ */
+template <class T_return, class T_arg1 = nil,class T_arg2 = nil,class T_arg3 = nil,class T_arg4 = nil,class T_arg5 = nil,class T_arg6 = nil,class T_arg7 = nil>
+class slot
+ : public slot7<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>
+{
+public:
+ typedef slot7<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7> parent_type;
+
+ inline slot() {}
+
+ /** Constructs a slot from an arbitrary functor.
+ * @param _A_func The desirer functor the new slot should be assigned to.
+ */
+ template <class T_functor>
+ slot(const T_functor& _A_func)
+ : parent_type(_A_func) {}
+
+ slot(const slot& src)
+ : parent_type((const parent_type&)src) {}
+};
+
+
+/** Convenience wrapper for the numbered sigc::slot0 template.
+ * See the base class for useful methods.
+ * This is the template specialization of the unnumbered sigc::slot
+ * template for 0 argument(s).
+ */
+template <class T_return>
+class slot <T_return>
+ : public slot0<T_return>
+{
+public:
+ typedef slot0<T_return> parent_type;
+
+ inline slot() {}
+
+ /** Constructs a slot from an arbitrary functor.
+ * @param _A_func The desirer functor the new slot should be assigned to.
+ */
+ template <class T_functor>
+ slot(const T_functor& _A_func)
+ : parent_type(_A_func) {}
+
+ slot(const slot& src)
+ : parent_type((const parent_type&)src) {}
+};
+
+/** Convenience wrapper for the numbered sigc::slot1 template.
+ * See the base class for useful methods.
+ * This is the template specialization of the unnumbered sigc::slot
+ * template for 1 argument(s).
+ */
+template <class T_return, class T_arg1>
+class slot <T_return, T_arg1>
+ : public slot1<T_return, T_arg1>
+{
+public:
+ typedef slot1<T_return, T_arg1> parent_type;
+
+ inline slot() {}
+
+ /** Constructs a slot from an arbitrary functor.
+ * @param _A_func The desirer functor the new slot should be assigned to.
+ */
+ template <class T_functor>
+ slot(const T_functor& _A_func)
+ : parent_type(_A_func) {}
+
+ slot(const slot& src)
+ : parent_type((const parent_type&)src) {}
+};
+
+/** Convenience wrapper for the numbered sigc::slot2 template.
+ * See the base class for useful methods.
+ * This is the template specialization of the unnumbered sigc::slot
+ * template for 2 argument(s).
+ */
+template <class T_return, class T_arg1,class T_arg2>
+class slot <T_return, T_arg1,T_arg2>
+ : public slot2<T_return, T_arg1,T_arg2>
+{
+public:
+ typedef slot2<T_return, T_arg1,T_arg2> parent_type;
+
+ inline slot() {}
+
+ /** Constructs a slot from an arbitrary functor.
+ * @param _A_func The desirer functor the new slot should be assigned to.
+ */
+ template <class T_functor>
+ slot(const T_functor& _A_func)
+ : parent_type(_A_func) {}
+
+ slot(const slot& src)
+ : parent_type((const parent_type&)src) {}
+};
+
+/** Convenience wrapper for the numbered sigc::slot3 template.
+ * See the base class for useful methods.
+ * This is the template specialization of the unnumbered sigc::slot
+ * template for 3 argument(s).
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3>
+class slot <T_return, T_arg1,T_arg2,T_arg3>
+ : public slot3<T_return, T_arg1,T_arg2,T_arg3>
+{
+public:
+ typedef slot3<T_return, T_arg1,T_arg2,T_arg3> parent_type;
+
+ inline slot() {}
+
+ /** Constructs a slot from an arbitrary functor.
+ * @param _A_func The desirer functor the new slot should be assigned to.
+ */
+ template <class T_functor>
+ slot(const T_functor& _A_func)
+ : parent_type(_A_func) {}
+
+ slot(const slot& src)
+ : parent_type((const parent_type&)src) {}
+};
+
+/** Convenience wrapper for the numbered sigc::slot4 template.
+ * See the base class for useful methods.
+ * This is the template specialization of the unnumbered sigc::slot
+ * template for 4 argument(s).
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+class slot <T_return, T_arg1,T_arg2,T_arg3,T_arg4>
+ : public slot4<T_return, T_arg1,T_arg2,T_arg3,T_arg4>
+{
+public:
+ typedef slot4<T_return, T_arg1,T_arg2,T_arg3,T_arg4> parent_type;
+
+ inline slot() {}
+
+ /** Constructs a slot from an arbitrary functor.
+ * @param _A_func The desirer functor the new slot should be assigned to.
+ */
+ template <class T_functor>
+ slot(const T_functor& _A_func)
+ : parent_type(_A_func) {}
+
+ slot(const slot& src)
+ : parent_type((const parent_type&)src) {}
+};
+
+/** Convenience wrapper for the numbered sigc::slot5 template.
+ * See the base class for useful methods.
+ * This is the template specialization of the unnumbered sigc::slot
+ * template for 5 argument(s).
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+class slot <T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>
+ : public slot5<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>
+{
+public:
+ typedef slot5<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5> parent_type;
+
+ inline slot() {}
+
+ /** Constructs a slot from an arbitrary functor.
+ * @param _A_func The desirer functor the new slot should be assigned to.
+ */
+ template <class T_functor>
+ slot(const T_functor& _A_func)
+ : parent_type(_A_func) {}
+
+ slot(const slot& src)
+ : parent_type((const parent_type&)src) {}
+};
+
+/** Convenience wrapper for the numbered sigc::slot6 template.
+ * See the base class for useful methods.
+ * This is the template specialization of the unnumbered sigc::slot
+ * template for 6 argument(s).
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+class slot <T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>
+ : public slot6<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>
+{
+public:
+ typedef slot6<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6> parent_type;
+
+ inline slot() {}
+
+ /** Constructs a slot from an arbitrary functor.
+ * @param _A_func The desirer functor the new slot should be assigned to.
+ */
+ template <class T_functor>
+ slot(const T_functor& _A_func)
+ : parent_type(_A_func) {}
+
+ slot(const slot& src)
+ : parent_type((const parent_type&)src) {}
+};
+
+
+
+} /* namespace sigc */
+#endif /* _SIGC_FUNCTORS_MACROS_SLOTHM4_ */
diff --git a/libs/sigc++2/sigc++/functors/slot_base.cc b/libs/sigc++2/sigc++/functors/slot_base.cc
new file mode 100644
index 0000000000..bc0f173f22
--- /dev/null
+++ b/libs/sigc++2/sigc++/functors/slot_base.cc
@@ -0,0 +1,165 @@
+// -*- c++ -*-
+/*
+ * Copyright 2003, The libsigc++ Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+
+#include <sigc++/functors/slot_base.h>
+
+namespace sigc
+{
+
+namespace internal {
+
+// only MSVC needs this to guarantee that all new/delete are executed from the DLL module
+#ifdef SIGC_NEW_DELETE_IN_LIBRARY_ONLY
+void* slot_rep::operator new(size_t size_)
+{
+ return malloc(size_);
+}
+
+void slot_rep::operator delete(void* p)
+{
+ free(p);
+}
+#endif
+
+void slot_rep::disconnect()
+{
+ if (parent_)
+ {
+ call_ = 0; // Invalidate the slot.
+ // _Must_ be done here because parent_ might defer the actual
+ // destruction of the slot_rep and try to invoke it before that point.
+ void* data_ = parent_;
+ parent_ = 0; // Just a precaution.
+ (cleanup_)(data_); // Notify the parent (might lead to destruction of this!).
+ }
+}
+
+//static
+void* slot_rep::notify(void* data)
+{
+ slot_rep* self_ = (slot_rep*)data;
+ self_->call_ = 0; // Invalidate the slot.
+ self_->destroy(); // Detach the stored functor from the other referred trackables and destroy it.
+ self_->disconnect(); // Disconnect the slot (might lead to deletion of self_!).
+ return 0;
+}
+
+} // namespace internal
+
+slot_base::slot_base()
+: rep_(0),
+ blocked_(false)
+{}
+
+slot_base::slot_base(rep_type* rep)
+: rep_(rep),
+ blocked_(false)
+{}
+
+slot_base::slot_base(const slot_base& src)
+: rep_(0),
+ blocked_(src.blocked_)
+{
+ if (src.rep_)
+ rep_ = src.rep_->dup();
+}
+
+slot_base::~slot_base()
+{
+ if (rep_)
+ delete rep_;
+}
+
+slot_base::operator bool() const
+{
+ return rep_ != 0;
+}
+
+slot_base& slot_base::operator=(const slot_base& src)
+{
+ if (src.rep_ == rep_) return *this;
+
+ if (src.empty())
+ {
+ disconnect();
+ return *this;
+ }
+
+ internal::slot_rep* new_rep_ = src.rep_->dup();
+
+ if (rep_) // Silently exchange the slot_rep.
+ {
+ new_rep_->set_parent(rep_->parent_, rep_->cleanup_);
+ delete rep_;
+ }
+
+ rep_ = new_rep_;
+
+ return *this;
+}
+
+void slot_base::set_parent(void* parent, void* (*cleanup)(void*)) const
+{
+ if (rep_)
+ rep_->set_parent(parent, cleanup);
+}
+
+void slot_base::add_destroy_notify_callback(void* data, func_destroy_notify func) const
+{
+ if (rep_)
+ rep_->add_destroy_notify_callback(data, func);
+}
+
+void slot_base::remove_destroy_notify_callback(void* data) const
+{
+ if (rep_)
+ rep_->remove_destroy_notify_callback(data);
+}
+
+bool slot_base::block(bool should_block)
+{
+ bool old = blocked_;
+ blocked_ = should_block;
+ return old;
+}
+
+bool slot_base::unblock()
+{
+ return block(false);
+}
+
+void slot_base::disconnect()
+{
+ if (rep_)
+ rep_->disconnect();
+}
+
+
+/*bool slot_base::empty() const // having this function not inline is killing performance !!!
+{
+ if (rep_ && !rep_->call_)
+ {
+ delete rep_; // This is not strictly necessary here. I'm convinced that it is
+ rep_ = 0; // safe to wait for the destructor to delete the slot_rep. Martin.
+ }
+ return (rep_ == 0);
+}*/
+
+} //namespace sigc
diff --git a/libs/sigc++2/sigc++/functors/slot_base.h b/libs/sigc++2/sigc++/functors/slot_base.h
new file mode 100644
index 0000000000..bb2ed343f3
--- /dev/null
+++ b/libs/sigc++2/sigc++/functors/slot_base.h
@@ -0,0 +1,319 @@
+/*
+ * Copyright 2003, The libsigc++ Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+#ifndef _SIGC_SLOT_BASE_HPP_
+#define _SIGC_SLOT_BASE_HPP_
+
+#include <sigc++config.h>
+#include <sigc++/trackable.h>
+#include <sigc++/functors/functor_trait.h>
+
+namespace sigc
+{
+
+namespace internal {
+
+typedef void* (*hook)(void*);
+
+/** Internal representation of a slot.
+ * Derivations of this class can be considered as a link
+ * between a slot and the functor that the slot should
+ * execute in operator(). This link is needed because in
+ * libsigc++2 the slot doesn't necessarily have exactly the
+ * same function signature as the functor thus allowing for
+ * implicit conversions.
+ * The base class slot_rep serves the purpose to
+ * - form a common pointer type (slot_rep*),
+ * - offer the possibility to create duplicates (dup()),
+ * - offer a notification callback (notify()),
+ * - implement some of slot_base's interface that depends
+ * on the notification callback, i.e.
+ * -# the possibility to set a single parent with a callback
+ * (set_parent()) that is executed from notify(),
+ * -# a generic function pointer, call_, that is simply
+ * set to zero in notify() to invalidate the slot.
+ * slot_rep inherits trackable so that connection objects can
+ * refer to the slot and are notified when the slot is destroyed.
+ */
+struct SIGC_API slot_rep : public trackable
+{
+ /* NB: Instead of slot_rep we could inherit slot_base from trackable.
+ * However, a simple benchmark seems to indicate that this slows
+ * down dereferencing of slot list iterators. Martin. */
+
+ /// Callback that invokes the contained functor.
+ /* This can't be a virtual function since number of arguments
+ * must be flexible. We use function pointers to slot_call::call_it()
+ * instead. call_ is set to zero to indicate that the slot is invalid.
+ */
+ hook call_;
+
+ /// Callback that detaches the slot_rep object from referred trackables and destroys it.
+ /* This could be a replaced by a virtual dtor. However since this struct is
+ * crucual for the efficiency of the whole library we want to avoid this.
+ */
+ hook destroy_;
+
+ /** Callback that makes a deep copy of the slot_rep object.
+ * @return A deep copy of the slot_rep object.
+ */
+ hook dup_;
+
+ /** Callback of parent_. */
+ hook cleanup_;
+
+ /** Parent object whose callback cleanup_ is executed on notification. */
+ void* parent_;
+
+ inline slot_rep(hook call__, hook destroy__, hook dup__)
+ : call_(call__), destroy_(destroy__), dup_(dup__), cleanup_(0), parent_(0) {}
+
+ inline ~slot_rep()
+ { destroy(); }
+
+ // only MSVC needs this to guarantee that all new/delete are executed from the DLL module
+#ifdef SIGC_NEW_DELETE_IN_LIBRARY_ONLY
+ void* operator new(size_t size_);
+ void operator delete(void* p);
+#endif
+
+ /** Destroys the slot_rep object (but doesn't delete it).
+ */
+ inline void destroy()
+ { if (destroy_) (*destroy_)(this); }
+
+ /** Makes a deep copy of the slot_rep object.
+ * @return A deep copy of the slot_rep object.
+ */
+ inline slot_rep* dup() const
+ { return (slot_rep*)(*dup_)(const_cast<slot_rep*>(this)); }
+
+ /** Set the parent with a callback.
+ * slots have one parent exclusively.
+ * @param parent The new parent.
+ * @param cleanup The callback to execute from notify().
+ */
+ inline void set_parent(void* parent, hook cleanup)
+ {
+ parent_ = parent;
+ cleanup_ = cleanup;
+ }
+
+ /// Invalidates the slot and executes the parent's cleanup callback.
+ void disconnect();
+
+ /** Callback that invalidates the slot.
+ * This callback is registered in every object of a trackable
+ * inherited type that is referred by this slot_rep object.
+ * It is executed when the slot becomes invalid because of some
+ * referred object dying.
+ * @param data The slot_rep object that is becoming invalid (@p this).
+ */
+ static void* notify(void* data);
+};
+
+/** Functor used to add a dependency to a trackable.
+ * Consequently slot_rep::notify() gets executed when the
+ * trackable is destroyed or overwritten.
+ */
+struct SIGC_API slot_do_bind
+{
+ /** The slot_rep object trackables should notify on destruction. */
+ slot_rep* rep_;
+
+ /** Construct a slot_do_bind functor.
+ * @param rep The slot_rep object trackables should notify on destruction.
+ */
+ inline slot_do_bind(slot_rep* rep) : rep_(rep) {}
+
+ /** Adds a dependency to @p t.
+ * @param t The trackable object to add a callback to.
+ */
+ inline void operator()(const trackable* t) const
+ { t->add_destroy_notify_callback(rep_, &slot_rep::notify); }
+};
+
+/// Functor used to remove a dependency from a trackable.
+struct SIGC_API slot_do_unbind
+{
+ /** The slot_rep object trackables don't need to notify on destruction any more. */
+ slot_rep* rep_;
+
+ /** Construct a slot_do_unbind functor.
+ * @param rep The slot_rep object trackables don't need to notify on destruction any more.
+ */
+ inline slot_do_unbind(slot_rep* rep) : rep_(rep) {}
+
+ /** Removes a dependency from @p t.
+ * @param t The trackable object to remove the callback from.
+ */
+ inline void operator()(const trackable* t) const
+ { t->remove_destroy_notify_callback(rep_); }
+};
+
+} //namespace internal
+
+
+/** @defgroup slot Slots
+ * Slots are type-safe representations of callback methods and functions.
+ * A Slot can be constructed from any function, regardless of whether it is a global function,
+ * a member method, static, or virtual.
+ *
+ * Use the sigc::mem_fun() and sigc::ptr_fun() template functions to get a sigc::slot, like so:
+ *
+ * @code
+ * sigc::slot<void, int> sl = sigc::mem_fun(someobj,& SomeClass::somemethod);
+ * @endcode
+ *
+ * or
+ *
+ * @code
+ * sigc::slot<void, int> sl = sigc::ptr_fun(&somefunction);
+ * @endcode
+ *
+ * or
+ *
+ * @code
+ * m_Button.signal_clicked().connect( sigc::mem_fun(*this, &MyWindow::on_button_clicked) );
+ * @endcode
+ *
+ * The compiler will complain if SomeClass::somemethod, etc. have the wrong signature.
+ *
+ * You can also pass slots as method parameters where you might normally pass a function pointer.
+ *
+ * @ingroup functors
+ */
+
+/** Base type for slots.
+ * slot_base integrates most of the interface of the derived
+ * sigc::slot templates. slots
+ * can be connected to signals, be disconnected at some later point
+ * (disconnect()) and temporarily be blocked (block(), unblock()).
+ * The validity of a slot can be tested with empty().
+ *
+ * The internal representation of a sigc::internal::slot_rep derived
+ * type is built from slot_base's derivations. set_parent() is used to
+ * register a notification callback that is executed when the slot gets
+ * invalid. add_destroy_notify_callback() is used by connection objects
+ * to add a notification callback that is executed on destruction.
+ *
+ * @ingroup slot
+ */
+class SIGC_API slot_base : public functor_base
+{
+ typedef internal::slot_rep rep_type;
+
+public:
+ /// Constructs an empty slot.
+ slot_base();
+
+ /** Constructs a slot from an existing slot_rep object.
+ * @param rep The slot_rep object this slot should contain.
+ */
+ explicit slot_base(rep_type* rep);
+
+ /** Constructs a slot, copying an existing one.
+ * @param src The existing slot to copy.
+ */
+ slot_base(const slot_base& src);
+
+ ~slot_base();
+
+ /** Tests whether a slot is null, because the default constructor was used.
+ * Test a slot for null like so:
+ * @code
+ * if(slot)
+ * do_something()
+ * @endcode
+ */
+ operator bool() const;
+
+ /** Sets the parent of this slot.
+ * This function is used by signals to register a notification callback.
+ * This notification callback is executed when the slot becomes invalid
+ * because of some referred object dying.
+ * @param parent The new parent.
+ * @param cleanup The notification callback.
+ */
+ void set_parent(void* parent, void* (*cleanup)(void*)) const;
+
+ typedef trackable::func_destroy_notify func_destroy_notify;
+ /** Add a callback that is executed (notified) when the slot is detroyed.
+ * This function is used internally by connection objects.
+ * @param data Passed into func upon notification.
+ * @param func Callback executed upon destruction of the object.
+ */
+ void add_destroy_notify_callback(void* data, func_destroy_notify func) const;
+
+ /** Remove a callback previously installed with add_destroy_notify_callback().
+ * The callback is not executed.
+ * @param data Parameter passed into previous call to add_destroy_notify_callback().
+ */
+ void remove_destroy_notify_callback(void* data) const;
+
+ /** Returns whether the slot is invalid.
+ * @return @p true if the slot is invalid (empty).
+ */
+ inline bool empty() const
+ { return (!rep_ || !rep_->call_); }
+
+ /** Returns whether the slot is blocked.
+ * @return @p true if the slot is blocked.
+ */
+ inline bool blocked() const
+ { return blocked_; }
+
+ /** Sets the blocking state.
+ * If @e should_block is @p true then the blocking state is set.
+ * Subsequent calls to slot::operator()() don't invoke the functor
+ * contained by this slot until unblock() or block() with
+ * @e should_block = @p false is called.
+ * @param should_block Indicates whether the blocking state should be set or unset.
+ * @return @p true if the slot was in blocking state before.
+ */
+ bool block(bool should_block = true);
+
+ /** Unsets the blocking state.
+ * @return @p true if the slot was in blocking state before.
+ */
+ bool unblock();
+
+ /** Disconnects the slot.
+ * Invalidates the slot and notifies the parent.
+ */
+ void disconnect();
+
+protected:
+ /** Overrides this slot making a copy from another slot.
+ * @param src The slot from which to make a copy.
+ * @return @p this.
+ */
+ slot_base& operator=(const slot_base& src);
+
+public: // public to avoid template friend declarations
+ /** Typed slot_rep object that contains a functor. */
+ mutable rep_type *rep_;
+
+ /** Indicates whether the slot is blocked. */
+ bool blocked_;
+};
+
+} //namespace sigc
+
+#endif //_SIGC_SLOT_BASE_HPP_
+
diff --git a/libs/sigc++2/sigc++/hide.h b/libs/sigc++2/sigc++/hide.h
new file mode 100644
index 0000000000..c4852b7b42
--- /dev/null
+++ b/libs/sigc++2/sigc++/hide.h
@@ -0,0 +1,105 @@
+// -*- c++ -*-
+/* Do not edit! -- generated file */
+
+#ifndef _SIGC_MACROS_HIDEHM4_
+#define _SIGC_MACROS_HIDEHM4_
+
+#include <sigc++/slot.h>
+#include <sigc++/adaptors/hide.h>
+
+
+#ifndef LIBSIGC_DISABLE_DEPRECATED
+
+namespace SigC {
+
+template <class T_hidden1, class T_return>
+inline SigC::Slot1<T_return, T_hidden1>
+hide(const SigC::Slot0<T_return>& _A_slot)
+{ return ::sigc::hide_functor<0, SigC::Slot0<T_return> >
+ (_A_slot); }
+
+template <class T_hidden1, class T_return, class T_arg1>
+inline SigC::Slot2<T_return, T_arg1, T_hidden1>
+hide(const SigC::Slot1<T_return, T_arg1>& _A_slot)
+{ return ::sigc::hide_functor<0, SigC::Slot1<T_return, T_arg1> >
+ (_A_slot); }
+
+template <class T_hidden1, class T_return, class T_arg1,class T_arg2>
+inline SigC::Slot3<T_return, T_arg1,T_arg2, T_hidden1>
+hide(const SigC::Slot2<T_return, T_arg1,T_arg2>& _A_slot)
+{ return ::sigc::hide_functor<0, SigC::Slot2<T_return, T_arg1,T_arg2> >
+ (_A_slot); }
+
+template <class T_hidden1, class T_return, class T_arg1,class T_arg2,class T_arg3>
+inline SigC::Slot4<T_return, T_arg1,T_arg2,T_arg3, T_hidden1>
+hide(const SigC::Slot3<T_return, T_arg1,T_arg2,T_arg3>& _A_slot)
+{ return ::sigc::hide_functor<0, SigC::Slot3<T_return, T_arg1,T_arg2,T_arg3> >
+ (_A_slot); }
+
+template <class T_hidden1, class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+inline SigC::Slot5<T_return, T_arg1,T_arg2,T_arg3,T_arg4, T_hidden1>
+hide(const SigC::Slot4<T_return, T_arg1,T_arg2,T_arg3,T_arg4>& _A_slot)
+{ return ::sigc::hide_functor<0, SigC::Slot4<T_return, T_arg1,T_arg2,T_arg3,T_arg4> >
+ (_A_slot); }
+
+template <class T_hidden1, class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+inline SigC::Slot6<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5, T_hidden1>
+hide(const SigC::Slot5<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>& _A_slot)
+{ return ::sigc::hide_functor<0, SigC::Slot5<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5> >
+ (_A_slot); }
+
+template <class T_hidden1, class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+inline SigC::Slot7<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6, T_hidden1>
+hide(const SigC::Slot6<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>& _A_slot)
+{ return ::sigc::hide_functor<0, SigC::Slot6<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6> >
+ (_A_slot); }
+
+
+template <class T_hidden1,class T_hidden2, class T_return>
+inline SigC::Slot2<T_return, T_hidden1,T_hidden2>
+hide(const SigC::Slot0<T_return>& _A_slot)
+{ return ::sigc::hide<0>(
+ ::sigc::hide_functor<0, SigC::Slot0<T_return> >
+ (_A_slot)); }
+
+template <class T_hidden1,class T_hidden2, class T_return, class T_arg1>
+inline SigC::Slot3<T_return, T_arg1, T_hidden1,T_hidden2>
+hide(const SigC::Slot1<T_return, T_arg1>& _A_slot)
+{ return ::sigc::hide<0>(
+ ::sigc::hide_functor<0, SigC::Slot1<T_return, T_arg1> >
+ (_A_slot)); }
+
+template <class T_hidden1,class T_hidden2, class T_return, class T_arg1,class T_arg2>
+inline SigC::Slot4<T_return, T_arg1,T_arg2, T_hidden1,T_hidden2>
+hide(const SigC::Slot2<T_return, T_arg1,T_arg2>& _A_slot)
+{ return ::sigc::hide<0>(
+ ::sigc::hide_functor<0, SigC::Slot2<T_return, T_arg1,T_arg2> >
+ (_A_slot)); }
+
+template <class T_hidden1,class T_hidden2, class T_return, class T_arg1,class T_arg2,class T_arg3>
+inline SigC::Slot5<T_return, T_arg1,T_arg2,T_arg3, T_hidden1,T_hidden2>
+hide(const SigC::Slot3<T_return, T_arg1,T_arg2,T_arg3>& _A_slot)
+{ return ::sigc::hide<0>(
+ ::sigc::hide_functor<0, SigC::Slot3<T_return, T_arg1,T_arg2,T_arg3> >
+ (_A_slot)); }
+
+template <class T_hidden1,class T_hidden2, class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+inline SigC::Slot6<T_return, T_arg1,T_arg2,T_arg3,T_arg4, T_hidden1,T_hidden2>
+hide(const SigC::Slot4<T_return, T_arg1,T_arg2,T_arg3,T_arg4>& _A_slot)
+{ return ::sigc::hide<0>(
+ ::sigc::hide_functor<0, SigC::Slot4<T_return, T_arg1,T_arg2,T_arg3,T_arg4> >
+ (_A_slot)); }
+
+template <class T_hidden1,class T_hidden2, class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+inline SigC::Slot7<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5, T_hidden1,T_hidden2>
+hide(const SigC::Slot5<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>& _A_slot)
+{ return ::sigc::hide<0>(
+ ::sigc::hide_functor<0, SigC::Slot5<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5> >
+ (_A_slot)); }
+
+
+
+} /* namespace SigC */
+
+#endif /* LIBSIGC_DISABLE_DEPRECATED */
+#endif /* _SIGC_MACROS_HIDEHM4_ */
diff --git a/libs/sigc++2/sigc++/method_slot.h b/libs/sigc++2/sigc++/method_slot.h
new file mode 100644
index 0000000000..d92781633b
--- /dev/null
+++ b/libs/sigc++2/sigc++/method_slot.h
@@ -0,0 +1,387 @@
+// -*- c++ -*-
+/* Do not edit! -- generated file */
+
+
+#ifndef _SIGC_MACROS_METHOD_SLOTHM4_
+#define _SIGC_MACROS_METHOD_SLOTHM4_
+
+#include <sigc++/slot.h>
+#include <sigc++/functors/mem_fun.h>
+
+#ifndef LIBSIGC_DISABLE_DEPRECATED
+
+namespace SigC {
+
+/** Creates a functor of type Sigc::Slot1 that wraps a method.
+ *
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_obj>
+inline Slot1<T_return, T_obj&>
+slot(T_return (T_obj::*_A_func)() )
+{ return ::sigc::mem_functor0<T_return, T_obj>(_A_func); }
+
+/** Creates a functor of type Sigc::Slot2 that wraps a method.
+ *
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1, class T_obj>
+inline Slot2<T_return, T_obj&, T_arg1>
+slot(T_return (T_obj::*_A_func)(T_arg1) )
+{ return ::sigc::mem_functor1<T_return, T_obj, T_arg1>(_A_func); }
+
+/** Creates a functor of type Sigc::Slot3 that wraps a method.
+ *
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2, class T_obj>
+inline Slot3<T_return, T_obj&, T_arg1,T_arg2>
+slot(T_return (T_obj::*_A_func)(T_arg1,T_arg2) )
+{ return ::sigc::mem_functor2<T_return, T_obj, T_arg1,T_arg2>(_A_func); }
+
+/** Creates a functor of type Sigc::Slot4 that wraps a method.
+ *
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3, class T_obj>
+inline Slot4<T_return, T_obj&, T_arg1,T_arg2,T_arg3>
+slot(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3) )
+{ return ::sigc::mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>(_A_func); }
+
+/** Creates a functor of type Sigc::Slot5 that wraps a method.
+ *
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4, class T_obj>
+inline Slot5<T_return, T_obj&, T_arg1,T_arg2,T_arg3,T_arg4>
+slot(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) )
+{ return ::sigc::mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>(_A_func); }
+
+/** Creates a functor of type Sigc::Slot6 that wraps a method.
+ *
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5, class T_obj>
+inline Slot6<T_return, T_obj&, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>
+slot(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) )
+{ return ::sigc::mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>(_A_func); }
+
+/** Creates a functor of type Sigc::Slot7 that wraps a method.
+ *
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6, class T_obj>
+inline Slot7<T_return, T_obj&, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>
+slot(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) )
+{ return ::sigc::mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>(_A_func); }
+
+
+/** Creates a functor of type Sigc::Slot1 that wraps a const method.
+ *
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_obj>
+inline Slot1<T_return, T_obj&>
+slot(T_return (T_obj::*_A_func)() const)
+{ return ::sigc::const_mem_functor0<T_return, T_obj>(_A_func); }
+
+/** Creates a functor of type Sigc::Slot2 that wraps a const method.
+ *
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1, class T_obj>
+inline Slot2<T_return, T_obj&, T_arg1>
+slot(T_return (T_obj::*_A_func)(T_arg1) const)
+{ return ::sigc::const_mem_functor1<T_return, T_obj, T_arg1>(_A_func); }
+
+/** Creates a functor of type Sigc::Slot3 that wraps a const method.
+ *
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2, class T_obj>
+inline Slot3<T_return, T_obj&, T_arg1,T_arg2>
+slot(T_return (T_obj::*_A_func)(T_arg1,T_arg2) const)
+{ return ::sigc::const_mem_functor2<T_return, T_obj, T_arg1,T_arg2>(_A_func); }
+
+/** Creates a functor of type Sigc::Slot4 that wraps a const method.
+ *
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3, class T_obj>
+inline Slot4<T_return, T_obj&, T_arg1,T_arg2,T_arg3>
+slot(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3) const)
+{ return ::sigc::const_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>(_A_func); }
+
+/** Creates a functor of type Sigc::Slot5 that wraps a const method.
+ *
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4, class T_obj>
+inline Slot5<T_return, T_obj&, T_arg1,T_arg2,T_arg3,T_arg4>
+slot(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) const)
+{ return ::sigc::const_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>(_A_func); }
+
+/** Creates a functor of type Sigc::Slot6 that wraps a const method.
+ *
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5, class T_obj>
+inline Slot6<T_return, T_obj&, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>
+slot(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) const)
+{ return ::sigc::const_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>(_A_func); }
+
+/** Creates a functor of type Sigc::Slot7 that wraps a const method.
+ *
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6, class T_obj>
+inline Slot7<T_return, T_obj&, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>
+slot(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) const)
+{ return ::sigc::const_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>(_A_func); }
+
+
+/** Creates a functor of type Sigc::Slot1 that wraps a volatile method.
+ *
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_obj>
+inline Slot1<T_return, T_obj&>
+slot(T_return (T_obj::*_A_func)() volatile)
+{ return ::sigc::volatile_mem_functor0<T_return, T_obj>(_A_func); }
+
+/** Creates a functor of type Sigc::Slot2 that wraps a volatile method.
+ *
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1, class T_obj>
+inline Slot2<T_return, T_obj&, T_arg1>
+slot(T_return (T_obj::*_A_func)(T_arg1) volatile)
+{ return ::sigc::volatile_mem_functor1<T_return, T_obj, T_arg1>(_A_func); }
+
+/** Creates a functor of type Sigc::Slot3 that wraps a volatile method.
+ *
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2, class T_obj>
+inline Slot3<T_return, T_obj&, T_arg1,T_arg2>
+slot(T_return (T_obj::*_A_func)(T_arg1,T_arg2) volatile)
+{ return ::sigc::volatile_mem_functor2<T_return, T_obj, T_arg1,T_arg2>(_A_func); }
+
+/** Creates a functor of type Sigc::Slot4 that wraps a volatile method.
+ *
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3, class T_obj>
+inline Slot4<T_return, T_obj&, T_arg1,T_arg2,T_arg3>
+slot(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3) volatile)
+{ return ::sigc::volatile_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>(_A_func); }
+
+/** Creates a functor of type Sigc::Slot5 that wraps a volatile method.
+ *
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4, class T_obj>
+inline Slot5<T_return, T_obj&, T_arg1,T_arg2,T_arg3,T_arg4>
+slot(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) volatile)
+{ return ::sigc::volatile_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>(_A_func); }
+
+/** Creates a functor of type Sigc::Slot6 that wraps a volatile method.
+ *
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5, class T_obj>
+inline Slot6<T_return, T_obj&, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>
+slot(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) volatile)
+{ return ::sigc::volatile_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>(_A_func); }
+
+/** Creates a functor of type Sigc::Slot7 that wraps a volatile method.
+ *
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6, class T_obj>
+inline Slot7<T_return, T_obj&, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>
+slot(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) volatile)
+{ return ::sigc::volatile_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>(_A_func); }
+
+
+/** Creates a functor of type Sigc::Slot1 that wraps a const volatile method.
+ *
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_obj>
+inline Slot1<T_return, T_obj&>
+slot(T_return (T_obj::*_A_func)() const volatile)
+{ return ::sigc::const_volatile_mem_functor0<T_return, T_obj>(_A_func); }
+
+/** Creates a functor of type Sigc::Slot2 that wraps a const volatile method.
+ *
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1, class T_obj>
+inline Slot2<T_return, T_obj&, T_arg1>
+slot(T_return (T_obj::*_A_func)(T_arg1) const volatile)
+{ return ::sigc::const_volatile_mem_functor1<T_return, T_obj, T_arg1>(_A_func); }
+
+/** Creates a functor of type Sigc::Slot3 that wraps a const volatile method.
+ *
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2, class T_obj>
+inline Slot3<T_return, T_obj&, T_arg1,T_arg2>
+slot(T_return (T_obj::*_A_func)(T_arg1,T_arg2) const volatile)
+{ return ::sigc::const_volatile_mem_functor2<T_return, T_obj, T_arg1,T_arg2>(_A_func); }
+
+/** Creates a functor of type Sigc::Slot4 that wraps a const volatile method.
+ *
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3, class T_obj>
+inline Slot4<T_return, T_obj&, T_arg1,T_arg2,T_arg3>
+slot(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3) const volatile)
+{ return ::sigc::const_volatile_mem_functor3<T_return, T_obj, T_arg1,T_arg2,T_arg3>(_A_func); }
+
+/** Creates a functor of type Sigc::Slot5 that wraps a const volatile method.
+ *
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4, class T_obj>
+inline Slot5<T_return, T_obj&, T_arg1,T_arg2,T_arg3,T_arg4>
+slot(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) const volatile)
+{ return ::sigc::const_volatile_mem_functor4<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4>(_A_func); }
+
+/** Creates a functor of type Sigc::Slot6 that wraps a const volatile method.
+ *
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5, class T_obj>
+inline Slot6<T_return, T_obj&, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>
+slot(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) const volatile)
+{ return ::sigc::const_volatile_mem_functor5<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>(_A_func); }
+
+/** Creates a functor of type Sigc::Slot7 that wraps a const volatile method.
+ *
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6, class T_obj>
+inline Slot7<T_return, T_obj&, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>
+slot(T_return (T_obj::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) const volatile)
+{ return ::sigc::const_volatile_mem_functor6<T_return, T_obj, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>(_A_func); }
+
+
+
+}
+
+#endif
+#endif /* _SIGC_MACROS_METHOD_SLOTHM4_ */
diff --git a/libs/sigc++2/sigc++/object.h b/libs/sigc++2/sigc++/object.h
new file mode 100644
index 0000000000..0ddefa02b2
--- /dev/null
+++ b/libs/sigc++2/sigc++/object.h
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2002, The libsigc++ Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+#ifndef _SIGC_OBJECT_HPP_
+#define _SIGC_OBJECT_HPP_
+
+#include <sigc++/trackable.h>
+
+#ifndef LIBSIGC_DISABLE_DEPRECATED
+
+namespace SigC {
+
+// Object
+typedef ::sigc::trackable Object;
+
+}
+
+#endif /* LIBSIGC_DISABLE_DEPRECATED */
+
+#endif /* _SIGC_OBJECT_HPP_ */
diff --git a/libs/sigc++2/sigc++/object_slot.h b/libs/sigc++2/sigc++/object_slot.h
new file mode 100644
index 0000000000..e9d031ed50
--- /dev/null
+++ b/libs/sigc++2/sigc++/object_slot.h
@@ -0,0 +1,536 @@
+// -*- c++ -*-
+/* Do not edit! -- generated file */
+
+
+#ifndef _SIGC_MACROS_OBJECT_SLOTHM4_
+#define _SIGC_MACROS_OBJECT_SLOTHM4_
+
+#include <sigc++/slot.h>
+#include <sigc++/object.h>
+#include <sigc++/functors/mem_fun.h>
+
+#ifndef LIBSIGC_DISABLE_DEPRECATED
+
+namespace SigC {
+
+/** Creates a functor of type SigC::Slot0 that encapsulates a method and an object instance.
+ * @e _A_obj must be of a type that inherits from SigC::Object.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_obj1, class T_obj2>
+inline Slot0<T_return>
+slot( T_obj1& _A_obj, T_return (T_obj2::*_A_func)() )
+{ (void)dynamic_cast< Object&>(_A_obj); // trigger compiler error if T_obj1 does not derive from SigC::Object
+ return ::sigc::bound_mem_functor0<T_return, T_obj2>(_A_obj, _A_func); }
+
+/** Creates a functor of type SigC::Slot1 that encapsulates a method and an object instance.
+ * @e _A_obj must be of a type that inherits from SigC::Object.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1, class T_obj1, class T_obj2>
+inline Slot1<T_return, T_arg1>
+slot( T_obj1& _A_obj, T_return (T_obj2::*_A_func)(T_arg1) )
+{ (void)dynamic_cast< Object&>(_A_obj); // trigger compiler error if T_obj1 does not derive from SigC::Object
+ return ::sigc::bound_mem_functor1<T_return, T_obj2, T_arg1>(_A_obj, _A_func); }
+
+/** Creates a functor of type SigC::Slot2 that encapsulates a method and an object instance.
+ * @e _A_obj must be of a type that inherits from SigC::Object.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2, class T_obj1, class T_obj2>
+inline Slot2<T_return, T_arg1,T_arg2>
+slot( T_obj1& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2) )
+{ (void)dynamic_cast< Object&>(_A_obj); // trigger compiler error if T_obj1 does not derive from SigC::Object
+ return ::sigc::bound_mem_functor2<T_return, T_obj2, T_arg1,T_arg2>(_A_obj, _A_func); }
+
+/** Creates a functor of type SigC::Slot3 that encapsulates a method and an object instance.
+ * @e _A_obj must be of a type that inherits from SigC::Object.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3, class T_obj1, class T_obj2>
+inline Slot3<T_return, T_arg1,T_arg2,T_arg3>
+slot( T_obj1& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3) )
+{ (void)dynamic_cast< Object&>(_A_obj); // trigger compiler error if T_obj1 does not derive from SigC::Object
+ return ::sigc::bound_mem_functor3<T_return, T_obj2, T_arg1,T_arg2,T_arg3>(_A_obj, _A_func); }
+
+/** Creates a functor of type SigC::Slot4 that encapsulates a method and an object instance.
+ * @e _A_obj must be of a type that inherits from SigC::Object.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4, class T_obj1, class T_obj2>
+inline Slot4<T_return, T_arg1,T_arg2,T_arg3,T_arg4>
+slot( T_obj1& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) )
+{ (void)dynamic_cast< Object&>(_A_obj); // trigger compiler error if T_obj1 does not derive from SigC::Object
+ return ::sigc::bound_mem_functor4<T_return, T_obj2, T_arg1,T_arg2,T_arg3,T_arg4>(_A_obj, _A_func); }
+
+/** Creates a functor of type SigC::Slot5 that encapsulates a method and an object instance.
+ * @e _A_obj must be of a type that inherits from SigC::Object.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5, class T_obj1, class T_obj2>
+inline Slot5<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>
+slot( T_obj1& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) )
+{ (void)dynamic_cast< Object&>(_A_obj); // trigger compiler error if T_obj1 does not derive from SigC::Object
+ return ::sigc::bound_mem_functor5<T_return, T_obj2, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>(_A_obj, _A_func); }
+
+/** Creates a functor of type SigC::Slot6 that encapsulates a method and an object instance.
+ * @e _A_obj must be of a type that inherits from SigC::Object.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6, class T_obj1, class T_obj2>
+inline Slot6<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>
+slot( T_obj1& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) )
+{ (void)dynamic_cast< Object&>(_A_obj); // trigger compiler error if T_obj1 does not derive from SigC::Object
+ return ::sigc::bound_mem_functor6<T_return, T_obj2, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>(_A_obj, _A_func); }
+
+/** Creates a functor of type SigC::Slot7 that encapsulates a method and an object instance.
+ * @e _A_obj must be of a type that inherits from SigC::Object.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7, class T_obj1, class T_obj2>
+inline Slot7<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>
+slot( T_obj1& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) )
+{ (void)dynamic_cast< Object&>(_A_obj); // trigger compiler error if T_obj1 does not derive from SigC::Object
+ return ::sigc::bound_mem_functor7<T_return, T_obj2, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>(_A_obj, _A_func); }
+
+
+/** Creates a functor of type SigC::Slot0 that encapsulates a const method and an object instance.
+ * @e _A_obj must be of a type that inherits from SigC::Object.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_obj1, class T_obj2>
+inline Slot0<T_return>
+slot(const T_obj1& _A_obj, T_return (T_obj2::*_A_func)() const)
+{ (void)dynamic_cast<const Object&>(_A_obj); // trigger compiler error if T_obj1 does not derive from SigC::Object
+ return ::sigc::bound_const_mem_functor0<T_return, T_obj2>(_A_obj, _A_func); }
+
+/** Creates a functor of type SigC::Slot1 that encapsulates a const method and an object instance.
+ * @e _A_obj must be of a type that inherits from SigC::Object.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1, class T_obj1, class T_obj2>
+inline Slot1<T_return, T_arg1>
+slot(const T_obj1& _A_obj, T_return (T_obj2::*_A_func)(T_arg1) const)
+{ (void)dynamic_cast<const Object&>(_A_obj); // trigger compiler error if T_obj1 does not derive from SigC::Object
+ return ::sigc::bound_const_mem_functor1<T_return, T_obj2, T_arg1>(_A_obj, _A_func); }
+
+/** Creates a functor of type SigC::Slot2 that encapsulates a const method and an object instance.
+ * @e _A_obj must be of a type that inherits from SigC::Object.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2, class T_obj1, class T_obj2>
+inline Slot2<T_return, T_arg1,T_arg2>
+slot(const T_obj1& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2) const)
+{ (void)dynamic_cast<const Object&>(_A_obj); // trigger compiler error if T_obj1 does not derive from SigC::Object
+ return ::sigc::bound_const_mem_functor2<T_return, T_obj2, T_arg1,T_arg2>(_A_obj, _A_func); }
+
+/** Creates a functor of type SigC::Slot3 that encapsulates a const method and an object instance.
+ * @e _A_obj must be of a type that inherits from SigC::Object.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3, class T_obj1, class T_obj2>
+inline Slot3<T_return, T_arg1,T_arg2,T_arg3>
+slot(const T_obj1& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3) const)
+{ (void)dynamic_cast<const Object&>(_A_obj); // trigger compiler error if T_obj1 does not derive from SigC::Object
+ return ::sigc::bound_const_mem_functor3<T_return, T_obj2, T_arg1,T_arg2,T_arg3>(_A_obj, _A_func); }
+
+/** Creates a functor of type SigC::Slot4 that encapsulates a const method and an object instance.
+ * @e _A_obj must be of a type that inherits from SigC::Object.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4, class T_obj1, class T_obj2>
+inline Slot4<T_return, T_arg1,T_arg2,T_arg3,T_arg4>
+slot(const T_obj1& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) const)
+{ (void)dynamic_cast<const Object&>(_A_obj); // trigger compiler error if T_obj1 does not derive from SigC::Object
+ return ::sigc::bound_const_mem_functor4<T_return, T_obj2, T_arg1,T_arg2,T_arg3,T_arg4>(_A_obj, _A_func); }
+
+/** Creates a functor of type SigC::Slot5 that encapsulates a const method and an object instance.
+ * @e _A_obj must be of a type that inherits from SigC::Object.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5, class T_obj1, class T_obj2>
+inline Slot5<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>
+slot(const T_obj1& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) const)
+{ (void)dynamic_cast<const Object&>(_A_obj); // trigger compiler error if T_obj1 does not derive from SigC::Object
+ return ::sigc::bound_const_mem_functor5<T_return, T_obj2, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>(_A_obj, _A_func); }
+
+/** Creates a functor of type SigC::Slot6 that encapsulates a const method and an object instance.
+ * @e _A_obj must be of a type that inherits from SigC::Object.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6, class T_obj1, class T_obj2>
+inline Slot6<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>
+slot(const T_obj1& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) const)
+{ (void)dynamic_cast<const Object&>(_A_obj); // trigger compiler error if T_obj1 does not derive from SigC::Object
+ return ::sigc::bound_const_mem_functor6<T_return, T_obj2, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>(_A_obj, _A_func); }
+
+/** Creates a functor of type SigC::Slot7 that encapsulates a const method and an object instance.
+ * @e _A_obj must be of a type that inherits from SigC::Object.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7, class T_obj1, class T_obj2>
+inline Slot7<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>
+slot(const T_obj1& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) const)
+{ (void)dynamic_cast<const Object&>(_A_obj); // trigger compiler error if T_obj1 does not derive from SigC::Object
+ return ::sigc::bound_const_mem_functor7<T_return, T_obj2, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>(_A_obj, _A_func); }
+
+
+/** Creates a functor of type SigC::Slot0 that encapsulates a volatile method and an object instance.
+ * @e _A_obj must be of a type that inherits from SigC::Object.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_obj1, class T_obj2>
+inline Slot0<T_return>
+slot( T_obj1& _A_obj, T_return (T_obj2::*_A_func)() volatile)
+{ (void)dynamic_cast< Object&>(_A_obj); // trigger compiler error if T_obj1 does not derive from SigC::Object
+ return ::sigc::bound_volatile_mem_functor0<T_return, T_obj2>(_A_obj, _A_func); }
+
+/** Creates a functor of type SigC::Slot1 that encapsulates a volatile method and an object instance.
+ * @e _A_obj must be of a type that inherits from SigC::Object.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1, class T_obj1, class T_obj2>
+inline Slot1<T_return, T_arg1>
+slot( T_obj1& _A_obj, T_return (T_obj2::*_A_func)(T_arg1) volatile)
+{ (void)dynamic_cast< Object&>(_A_obj); // trigger compiler error if T_obj1 does not derive from SigC::Object
+ return ::sigc::bound_volatile_mem_functor1<T_return, T_obj2, T_arg1>(_A_obj, _A_func); }
+
+/** Creates a functor of type SigC::Slot2 that encapsulates a volatile method and an object instance.
+ * @e _A_obj must be of a type that inherits from SigC::Object.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2, class T_obj1, class T_obj2>
+inline Slot2<T_return, T_arg1,T_arg2>
+slot( T_obj1& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2) volatile)
+{ (void)dynamic_cast< Object&>(_A_obj); // trigger compiler error if T_obj1 does not derive from SigC::Object
+ return ::sigc::bound_volatile_mem_functor2<T_return, T_obj2, T_arg1,T_arg2>(_A_obj, _A_func); }
+
+/** Creates a functor of type SigC::Slot3 that encapsulates a volatile method and an object instance.
+ * @e _A_obj must be of a type that inherits from SigC::Object.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3, class T_obj1, class T_obj2>
+inline Slot3<T_return, T_arg1,T_arg2,T_arg3>
+slot( T_obj1& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3) volatile)
+{ (void)dynamic_cast< Object&>(_A_obj); // trigger compiler error if T_obj1 does not derive from SigC::Object
+ return ::sigc::bound_volatile_mem_functor3<T_return, T_obj2, T_arg1,T_arg2,T_arg3>(_A_obj, _A_func); }
+
+/** Creates a functor of type SigC::Slot4 that encapsulates a volatile method and an object instance.
+ * @e _A_obj must be of a type that inherits from SigC::Object.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4, class T_obj1, class T_obj2>
+inline Slot4<T_return, T_arg1,T_arg2,T_arg3,T_arg4>
+slot( T_obj1& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) volatile)
+{ (void)dynamic_cast< Object&>(_A_obj); // trigger compiler error if T_obj1 does not derive from SigC::Object
+ return ::sigc::bound_volatile_mem_functor4<T_return, T_obj2, T_arg1,T_arg2,T_arg3,T_arg4>(_A_obj, _A_func); }
+
+/** Creates a functor of type SigC::Slot5 that encapsulates a volatile method and an object instance.
+ * @e _A_obj must be of a type that inherits from SigC::Object.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5, class T_obj1, class T_obj2>
+inline Slot5<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>
+slot( T_obj1& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) volatile)
+{ (void)dynamic_cast< Object&>(_A_obj); // trigger compiler error if T_obj1 does not derive from SigC::Object
+ return ::sigc::bound_volatile_mem_functor5<T_return, T_obj2, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>(_A_obj, _A_func); }
+
+/** Creates a functor of type SigC::Slot6 that encapsulates a volatile method and an object instance.
+ * @e _A_obj must be of a type that inherits from SigC::Object.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6, class T_obj1, class T_obj2>
+inline Slot6<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>
+slot( T_obj1& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) volatile)
+{ (void)dynamic_cast< Object&>(_A_obj); // trigger compiler error if T_obj1 does not derive from SigC::Object
+ return ::sigc::bound_volatile_mem_functor6<T_return, T_obj2, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>(_A_obj, _A_func); }
+
+/** Creates a functor of type SigC::Slot7 that encapsulates a volatile method and an object instance.
+ * @e _A_obj must be of a type that inherits from SigC::Object.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7, class T_obj1, class T_obj2>
+inline Slot7<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>
+slot( T_obj1& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) volatile)
+{ (void)dynamic_cast< Object&>(_A_obj); // trigger compiler error if T_obj1 does not derive from SigC::Object
+ return ::sigc::bound_volatile_mem_functor7<T_return, T_obj2, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>(_A_obj, _A_func); }
+
+
+/** Creates a functor of type SigC::Slot0 that encapsulates a const volatile method and an object instance.
+ * @e _A_obj must be of a type that inherits from SigC::Object.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_obj1, class T_obj2>
+inline Slot0<T_return>
+slot(const T_obj1& _A_obj, T_return (T_obj2::*_A_func)() const volatile)
+{ (void)dynamic_cast<const Object&>(_A_obj); // trigger compiler error if T_obj1 does not derive from SigC::Object
+ return ::sigc::bound_const_volatile_mem_functor0<T_return, T_obj2>(_A_obj, _A_func); }
+
+/** Creates a functor of type SigC::Slot1 that encapsulates a const volatile method and an object instance.
+ * @e _A_obj must be of a type that inherits from SigC::Object.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1, class T_obj1, class T_obj2>
+inline Slot1<T_return, T_arg1>
+slot(const T_obj1& _A_obj, T_return (T_obj2::*_A_func)(T_arg1) const volatile)
+{ (void)dynamic_cast<const Object&>(_A_obj); // trigger compiler error if T_obj1 does not derive from SigC::Object
+ return ::sigc::bound_const_volatile_mem_functor1<T_return, T_obj2, T_arg1>(_A_obj, _A_func); }
+
+/** Creates a functor of type SigC::Slot2 that encapsulates a const volatile method and an object instance.
+ * @e _A_obj must be of a type that inherits from SigC::Object.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2, class T_obj1, class T_obj2>
+inline Slot2<T_return, T_arg1,T_arg2>
+slot(const T_obj1& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2) const volatile)
+{ (void)dynamic_cast<const Object&>(_A_obj); // trigger compiler error if T_obj1 does not derive from SigC::Object
+ return ::sigc::bound_const_volatile_mem_functor2<T_return, T_obj2, T_arg1,T_arg2>(_A_obj, _A_func); }
+
+/** Creates a functor of type SigC::Slot3 that encapsulates a const volatile method and an object instance.
+ * @e _A_obj must be of a type that inherits from SigC::Object.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3, class T_obj1, class T_obj2>
+inline Slot3<T_return, T_arg1,T_arg2,T_arg3>
+slot(const T_obj1& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3) const volatile)
+{ (void)dynamic_cast<const Object&>(_A_obj); // trigger compiler error if T_obj1 does not derive from SigC::Object
+ return ::sigc::bound_const_volatile_mem_functor3<T_return, T_obj2, T_arg1,T_arg2,T_arg3>(_A_obj, _A_func); }
+
+/** Creates a functor of type SigC::Slot4 that encapsulates a const volatile method and an object instance.
+ * @e _A_obj must be of a type that inherits from SigC::Object.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4, class T_obj1, class T_obj2>
+inline Slot4<T_return, T_arg1,T_arg2,T_arg3,T_arg4>
+slot(const T_obj1& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4) const volatile)
+{ (void)dynamic_cast<const Object&>(_A_obj); // trigger compiler error if T_obj1 does not derive from SigC::Object
+ return ::sigc::bound_const_volatile_mem_functor4<T_return, T_obj2, T_arg1,T_arg2,T_arg3,T_arg4>(_A_obj, _A_func); }
+
+/** Creates a functor of type SigC::Slot5 that encapsulates a const volatile method and an object instance.
+ * @e _A_obj must be of a type that inherits from SigC::Object.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5, class T_obj1, class T_obj2>
+inline Slot5<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>
+slot(const T_obj1& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5) const volatile)
+{ (void)dynamic_cast<const Object&>(_A_obj); // trigger compiler error if T_obj1 does not derive from SigC::Object
+ return ::sigc::bound_const_volatile_mem_functor5<T_return, T_obj2, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>(_A_obj, _A_func); }
+
+/** Creates a functor of type SigC::Slot6 that encapsulates a const volatile method and an object instance.
+ * @e _A_obj must be of a type that inherits from SigC::Object.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6, class T_obj1, class T_obj2>
+inline Slot6<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>
+slot(const T_obj1& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6) const volatile)
+{ (void)dynamic_cast<const Object&>(_A_obj); // trigger compiler error if T_obj1 does not derive from SigC::Object
+ return ::sigc::bound_const_volatile_mem_functor6<T_return, T_obj2, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>(_A_obj, _A_func); }
+
+/** Creates a functor of type SigC::Slot7 that encapsulates a const volatile method and an object instance.
+ * @e _A_obj must be of a type that inherits from SigC::Object.
+ *
+ * @param _A_obj Reference to object instance the functor should operate on.
+ * @param _A_func Pointer to method that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::mem_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7, class T_obj1, class T_obj2>
+inline Slot7<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>
+slot(const T_obj1& _A_obj, T_return (T_obj2::*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7) const volatile)
+{ (void)dynamic_cast<const Object&>(_A_obj); // trigger compiler error if T_obj1 does not derive from SigC::Object
+ return ::sigc::bound_const_volatile_mem_functor7<T_return, T_obj2, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>(_A_obj, _A_func); }
+
+
+
+}
+
+#endif
+#endif /* _SIGC_MACROS_OBJECT_SLOTHM4_ */
diff --git a/libs/sigc++2/sigc++/reference_wrapper.h b/libs/sigc++2/sigc++/reference_wrapper.h
new file mode 100644
index 0000000000..436e02f9bb
--- /dev/null
+++ b/libs/sigc++2/sigc++/reference_wrapper.h
@@ -0,0 +1,118 @@
+/*
+ * Copyright 2002, The libsigc++ Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+#ifndef _SIGC_REFERENCE_WRAPPER_H_
+#define _SIGC_REFERENCE_WRAPPER_H_
+
+namespace sigc {
+
+/** Reference wrapper.
+ * Use sigc::ref() to create a reference wrapper.
+ */
+template <class T_type>
+struct reference_wrapper
+{
+ explicit reference_wrapper(T_type& v)
+ : value_(v) {}
+
+ operator T_type& () const
+ { return value_; }
+
+ T_type& value_;
+};
+
+/** Const reference wrapper.
+ * Use sigc::ref() to create a const reference wrapper.
+ */
+template <class T_type>
+struct const_reference_wrapper
+{
+ explicit const_reference_wrapper(const T_type& v)
+ : value_(v) {}
+
+ operator const T_type& () const
+ { return value_; }
+
+ const T_type& value_;
+};
+
+/** Creates a reference wrapper.
+ * Passing an object throught sigc::ref() makes libsigc++ adaptors
+ * like, e.g., sigc::bind store references to the object instead of copies.
+ * If the object type inherits from sigc::trackable this will ensure
+ * automatic invalidation of the adaptors when the object is deleted
+ * or overwritten.
+ *
+ * @param v Reference to store.
+ * @return A reference wrapper.
+ */
+template <class T_type>
+reference_wrapper<T_type> ref(T_type& v)
+{ return reference_wrapper<T_type>(v); }
+
+/** Creates a const reference wrapper.
+ * Passing an object throught sigc::ref() makes libsigc++ adaptors
+ * like, e.g., sigc::bind store references to the object instead of copies.
+ * If the object type inherits from sigc::trackable this will ensure
+ * automatic invalidation of the adaptors when the object is deleted
+ * or overwritten.
+ *
+ * @param v Reference to store.
+ * @return A reference wrapper.
+ */
+template <class T_type>
+const_reference_wrapper<T_type> ref(const T_type& v)
+{ return const_reference_wrapper<T_type>(v); }
+
+template <class T_type>
+struct unwrap_reference
+{
+ typedef T_type type;
+};
+
+template <class T_type>
+struct unwrap_reference<reference_wrapper<T_type> >
+{
+ typedef T_type& type;
+};
+
+template <class T_type>
+struct unwrap_reference<const_reference_wrapper<T_type> >
+{
+ typedef const T_type& type;
+};
+
+template <class T_type>
+T_type& unwrap(T_type& v)
+{ return v; }
+
+template <class T_type>
+const T_type& unwrap(const T_type& v)
+{ return v; }
+
+template <class T_type>
+T_type& unwrap(const reference_wrapper<T_type>& v)
+{ return v; }
+
+template <class T_type>
+const T_type& unwrap(const const_reference_wrapper<T_type>& v)
+{ return v; }
+
+} /* namespace sigc */
+
+#endif /* _SIGC_REFERENCE_WRAPPER_H_ */
diff --git a/libs/sigc++2/sigc++/retype.h b/libs/sigc++2/sigc++/retype.h
new file mode 100644
index 0000000000..5df6622f84
--- /dev/null
+++ b/libs/sigc++2/sigc++/retype.h
@@ -0,0 +1,321 @@
+// -*- c++ -*-
+/* Do not edit! -- generated file */
+#ifndef _SIGC_MACROS_RETYPEHM4_
+#define _SIGC_MACROS_RETYPEHM4_
+#include <sigc++/adaptors/adaptor_trait.h>
+#include <sigc++/slot.h>
+
+#ifndef LIBSIGC_DISABLE_DEPRECATED
+
+namespace SigC {
+
+template <class T_functor, class T_return, class T_type1=::sigc::nil,class T_type2=::sigc::nil,class T_type3=::sigc::nil,class T_type4=::sigc::nil,class T_type5=::sigc::nil,class T_type6=::sigc::nil,class T_type7=::sigc::nil>
+struct retype_slot_functor
+ : public ::sigc::adapts<T_functor>
+{
+ template <class T_arg1=void,class T_arg2=void,class T_arg3=void,class T_arg4=void,class T_arg5=void,class T_arg6=void,class T_arg7=void>
+ struct deduce_result_type
+ { typedef T_return type; };
+ typedef T_return result_type;
+
+ T_return operator()();
+
+ template <class T_arg1>
+ inline T_return operator()(T_arg1 _A_a1)
+ { return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename ::sigc::type_trait<T_type1>::take>
+ ((T_type1)_A_a1));
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1>
+ inline T_return sun_forte_workaround(T_arg1 _A_a1)
+ { return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename ::sigc::type_trait<T_type1>::take>
+ ((T_type1)_A_a1));
+ }
+ #endif
+
+ template <class T_arg1,class T_arg2>
+ inline T_return operator()(T_arg1 _A_a1,T_arg2 _A_a2)
+ { return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename ::sigc::type_trait<T_type1>::take,typename ::sigc::type_trait<T_type2>::take>
+ ((T_type1)_A_a1,(T_type2)_A_a2));
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2>
+ inline T_return sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2)
+ { return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename ::sigc::type_trait<T_type1>::take,typename ::sigc::type_trait<T_type2>::take>
+ ((T_type1)_A_a1,(T_type2)_A_a2));
+ }
+ #endif
+
+ template <class T_arg1,class T_arg2,class T_arg3>
+ inline T_return operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3)
+ { return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename ::sigc::type_trait<T_type1>::take,typename ::sigc::type_trait<T_type2>::take,typename ::sigc::type_trait<T_type3>::take>
+ ((T_type1)_A_a1,(T_type2)_A_a2,(T_type3)_A_a3));
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3>
+ inline T_return sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3)
+ { return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename ::sigc::type_trait<T_type1>::take,typename ::sigc::type_trait<T_type2>::take,typename ::sigc::type_trait<T_type3>::take>
+ ((T_type1)_A_a1,(T_type2)_A_a2,(T_type3)_A_a3));
+ }
+ #endif
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ inline T_return operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4)
+ { return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename ::sigc::type_trait<T_type1>::take,typename ::sigc::type_trait<T_type2>::take,typename ::sigc::type_trait<T_type3>::take,typename ::sigc::type_trait<T_type4>::take>
+ ((T_type1)_A_a1,(T_type2)_A_a2,(T_type3)_A_a3,(T_type4)_A_a4));
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ inline T_return sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4)
+ { return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename ::sigc::type_trait<T_type1>::take,typename ::sigc::type_trait<T_type2>::take,typename ::sigc::type_trait<T_type3>::take,typename ::sigc::type_trait<T_type4>::take>
+ ((T_type1)_A_a1,(T_type2)_A_a2,(T_type3)_A_a3,(T_type4)_A_a4));
+ }
+ #endif
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ inline T_return operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5)
+ { return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename ::sigc::type_trait<T_type1>::take,typename ::sigc::type_trait<T_type2>::take,typename ::sigc::type_trait<T_type3>::take,typename ::sigc::type_trait<T_type4>::take,typename ::sigc::type_trait<T_type5>::take>
+ ((T_type1)_A_a1,(T_type2)_A_a2,(T_type3)_A_a3,(T_type4)_A_a4,(T_type5)_A_a5));
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ inline T_return sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5)
+ { return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename ::sigc::type_trait<T_type1>::take,typename ::sigc::type_trait<T_type2>::take,typename ::sigc::type_trait<T_type3>::take,typename ::sigc::type_trait<T_type4>::take,typename ::sigc::type_trait<T_type5>::take>
+ ((T_type1)_A_a1,(T_type2)_A_a2,(T_type3)_A_a3,(T_type4)_A_a4,(T_type5)_A_a5));
+ }
+ #endif
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ inline T_return operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6)
+ { return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename ::sigc::type_trait<T_type1>::take,typename ::sigc::type_trait<T_type2>::take,typename ::sigc::type_trait<T_type3>::take,typename ::sigc::type_trait<T_type4>::take,typename ::sigc::type_trait<T_type5>::take,typename ::sigc::type_trait<T_type6>::take>
+ ((T_type1)_A_a1,(T_type2)_A_a2,(T_type3)_A_a3,(T_type4)_A_a4,(T_type5)_A_a5,(T_type6)_A_a6));
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ inline T_return sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6)
+ { return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename ::sigc::type_trait<T_type1>::take,typename ::sigc::type_trait<T_type2>::take,typename ::sigc::type_trait<T_type3>::take,typename ::sigc::type_trait<T_type4>::take,typename ::sigc::type_trait<T_type5>::take,typename ::sigc::type_trait<T_type6>::take>
+ ((T_type1)_A_a1,(T_type2)_A_a2,(T_type3)_A_a3,(T_type4)_A_a4,(T_type5)_A_a5,(T_type6)_A_a6));
+ }
+ #endif
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ inline T_return operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6,T_arg7 _A_a7)
+ { return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename ::sigc::type_trait<T_type1>::take,typename ::sigc::type_trait<T_type2>::take,typename ::sigc::type_trait<T_type3>::take,typename ::sigc::type_trait<T_type4>::take,typename ::sigc::type_trait<T_type5>::take,typename ::sigc::type_trait<T_type6>::take,typename ::sigc::type_trait<T_type7>::take>
+ ((T_type1)_A_a1,(T_type2)_A_a2,(T_type3)_A_a3,(T_type4)_A_a4,(T_type5)_A_a5,(T_type6)_A_a6,(T_type7)_A_a7));
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ inline T_return sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6,T_arg7 _A_a7)
+ { return T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename ::sigc::type_trait<T_type1>::take,typename ::sigc::type_trait<T_type2>::take,typename ::sigc::type_trait<T_type3>::take,typename ::sigc::type_trait<T_type4>::take,typename ::sigc::type_trait<T_type5>::take,typename ::sigc::type_trait<T_type6>::take,typename ::sigc::type_trait<T_type7>::take>
+ ((T_type1)_A_a1,(T_type2)_A_a2,(T_type3)_A_a3,(T_type4)_A_a4,(T_type5)_A_a5,(T_type6)_A_a6,(T_type7)_A_a7));
+ }
+ #endif
+
+
+ retype_slot_functor(typename ::sigc::type_trait<T_functor>::take _A_functor)
+ : ::sigc::adapts<T_functor>(_A_functor)
+ {}
+};
+
+template <class T_functor, class T_return, class T_type1,class T_type2,class T_type3,class T_type4,class T_type5,class T_type6,class T_type7>
+T_return retype_slot_functor<T_functor, T_return, T_type1,T_type2,T_type3,T_type4,T_type5,T_type6,T_type7>::operator()()
+ { return T_return(this->functor_()); }
+
+
+// void specialization needed because of explicit cast to T_return
+template <class T_functor, class T_type1,class T_type2,class T_type3,class T_type4,class T_type5,class T_type6,class T_type7>
+struct retype_slot_functor<T_functor, void, T_type1,T_type2,T_type3,T_type4,T_type5,T_type6,T_type7>
+ : public ::sigc::adapts<T_functor>
+{
+ template <class T_arg1=void,class T_arg2=void,class T_arg3=void,class T_arg4=void,class T_arg5=void,class T_arg6=void,class T_arg7=void>
+ struct deduce_result_type
+ { typedef void type; };
+ typedef void result_type;
+
+ void operator()();
+
+ template <class T_arg1>
+ inline void operator()(T_arg1 _A_a1)
+ { T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename ::sigc::type_trait<T_type1>::take>
+ ((T_type1)_A_a1));
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1>
+ inline void sun_forte_workaround(T_arg1 _A_a1)
+ { T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename ::sigc::type_trait<T_type1>::take>
+ ((T_type1)_A_a1));
+ }
+ #endif
+
+ template <class T_arg1,class T_arg2>
+ inline void operator()(T_arg1 _A_a1,T_arg2 _A_a2)
+ { T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename ::sigc::type_trait<T_type1>::take,typename ::sigc::type_trait<T_type2>::take>
+ ((T_type1)_A_a1,(T_type2)_A_a2));
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2>
+ inline void sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2)
+ { T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename ::sigc::type_trait<T_type1>::take,typename ::sigc::type_trait<T_type2>::take>
+ ((T_type1)_A_a1,(T_type2)_A_a2));
+ }
+ #endif
+
+ template <class T_arg1,class T_arg2,class T_arg3>
+ inline void operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3)
+ { T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename ::sigc::type_trait<T_type1>::take,typename ::sigc::type_trait<T_type2>::take,typename ::sigc::type_trait<T_type3>::take>
+ ((T_type1)_A_a1,(T_type2)_A_a2,(T_type3)_A_a3));
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3>
+ inline void sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3)
+ { T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename ::sigc::type_trait<T_type1>::take,typename ::sigc::type_trait<T_type2>::take,typename ::sigc::type_trait<T_type3>::take>
+ ((T_type1)_A_a1,(T_type2)_A_a2,(T_type3)_A_a3));
+ }
+ #endif
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ inline void operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4)
+ { T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename ::sigc::type_trait<T_type1>::take,typename ::sigc::type_trait<T_type2>::take,typename ::sigc::type_trait<T_type3>::take,typename ::sigc::type_trait<T_type4>::take>
+ ((T_type1)_A_a1,(T_type2)_A_a2,(T_type3)_A_a3,(T_type4)_A_a4));
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+ inline void sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4)
+ { T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename ::sigc::type_trait<T_type1>::take,typename ::sigc::type_trait<T_type2>::take,typename ::sigc::type_trait<T_type3>::take,typename ::sigc::type_trait<T_type4>::take>
+ ((T_type1)_A_a1,(T_type2)_A_a2,(T_type3)_A_a3,(T_type4)_A_a4));
+ }
+ #endif
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ inline void operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5)
+ { T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename ::sigc::type_trait<T_type1>::take,typename ::sigc::type_trait<T_type2>::take,typename ::sigc::type_trait<T_type3>::take,typename ::sigc::type_trait<T_type4>::take,typename ::sigc::type_trait<T_type5>::take>
+ ((T_type1)_A_a1,(T_type2)_A_a2,(T_type3)_A_a3,(T_type4)_A_a4,(T_type5)_A_a5));
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+ inline void sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5)
+ { T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename ::sigc::type_trait<T_type1>::take,typename ::sigc::type_trait<T_type2>::take,typename ::sigc::type_trait<T_type3>::take,typename ::sigc::type_trait<T_type4>::take,typename ::sigc::type_trait<T_type5>::take>
+ ((T_type1)_A_a1,(T_type2)_A_a2,(T_type3)_A_a3,(T_type4)_A_a4,(T_type5)_A_a5));
+ }
+ #endif
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ inline void operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6)
+ { T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename ::sigc::type_trait<T_type1>::take,typename ::sigc::type_trait<T_type2>::take,typename ::sigc::type_trait<T_type3>::take,typename ::sigc::type_trait<T_type4>::take,typename ::sigc::type_trait<T_type5>::take,typename ::sigc::type_trait<T_type6>::take>
+ ((T_type1)_A_a1,(T_type2)_A_a2,(T_type3)_A_a3,(T_type4)_A_a4,(T_type5)_A_a5,(T_type6)_A_a6));
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+ inline void sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6)
+ { T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename ::sigc::type_trait<T_type1>::take,typename ::sigc::type_trait<T_type2>::take,typename ::sigc::type_trait<T_type3>::take,typename ::sigc::type_trait<T_type4>::take,typename ::sigc::type_trait<T_type5>::take,typename ::sigc::type_trait<T_type6>::take>
+ ((T_type1)_A_a1,(T_type2)_A_a2,(T_type3)_A_a3,(T_type4)_A_a4,(T_type5)_A_a5,(T_type6)_A_a6));
+ }
+ #endif
+
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ inline void operator()(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6,T_arg7 _A_a7)
+ { T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename ::sigc::type_trait<T_type1>::take,typename ::sigc::type_trait<T_type2>::take,typename ::sigc::type_trait<T_type3>::take,typename ::sigc::type_trait<T_type4>::take,typename ::sigc::type_trait<T_type5>::take,typename ::sigc::type_trait<T_type6>::take,typename ::sigc::type_trait<T_type7>::take>
+ ((T_type1)_A_a1,(T_type2)_A_a2,(T_type3)_A_a3,(T_type4)_A_a4,(T_type5)_A_a5,(T_type6)_A_a6,(T_type7)_A_a7));
+ }
+
+ #ifndef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+ inline void sun_forte_workaround(T_arg1 _A_a1,T_arg2 _A_a2,T_arg3 _A_a3,T_arg4 _A_a4,T_arg5 _A_a5,T_arg6 _A_a6,T_arg7 _A_a7)
+ { T_return(this->functor_.SIGC_WORKAROUND_OPERATOR_PARENTHESES<typename ::sigc::type_trait<T_type1>::take,typename ::sigc::type_trait<T_type2>::take,typename ::sigc::type_trait<T_type3>::take,typename ::sigc::type_trait<T_type4>::take,typename ::sigc::type_trait<T_type5>::take,typename ::sigc::type_trait<T_type6>::take,typename ::sigc::type_trait<T_type7>::take>
+ ((T_type1)_A_a1,(T_type2)_A_a2,(T_type3)_A_a3,(T_type4)_A_a4,(T_type5)_A_a5,(T_type6)_A_a6,(T_type7)_A_a7));
+ }
+ #endif
+
+
+ retype_slot_functor(typename ::sigc::type_trait<T_functor>::take _A_functor)
+ : ::sigc::adapts<T_functor>(_A_functor)
+ {}
+};
+
+template <class T_functor, class T_type1,class T_type2,class T_type3,class T_type4,class T_type5,class T_type6,class T_type7>
+void retype_slot_functor<T_functor, void, T_type1,T_type2,T_type3,T_type4,T_type5,T_type6,T_type7>::operator()()
+ { this->functor_(); }
+
+
+template <class T_action, class T_functor, class T_return, class T_type1,class T_type2,class T_type3,class T_type4,class T_type5,class T_type6,class T_type7>
+void visit_each(const T_action& _A_action,
+ const retype_slot_functor<T_functor, T_return, T_type1,T_type2,T_type3,T_type4,T_type5,T_type6,T_type7>& _A_target)
+{
+ visit_each(_A_action, _A_target.functor_);
+}
+
+
+template <class T_return, class T_ret>
+inline Slot0<T_return>
+retype(const Slot0<T_ret>& _A_slot)
+{ return Slot0<T_return>
+ (retype_slot_functor<Slot0<T_ret>, T_return>
+ (_A_slot)); }
+
+template <class T_return, class T_arg1, class T_ret, class T_type1>
+inline Slot1<T_return, T_arg1>
+retype(const Slot1<T_ret, T_type1>& _A_slot)
+{ return Slot1<T_return, T_arg1>
+ (retype_slot_functor<Slot1<T_ret, T_type1>, T_return, T_type1>
+ (_A_slot)); }
+
+template <class T_return, class T_arg1,class T_arg2, class T_ret, class T_type1,class T_type2>
+inline Slot2<T_return, T_arg1,T_arg2>
+retype(const Slot2<T_ret, T_type1,T_type2>& _A_slot)
+{ return Slot2<T_return, T_arg1,T_arg2>
+ (retype_slot_functor<Slot2<T_ret, T_type1, T_type2>, T_return, T_type1,T_type2>
+ (_A_slot)); }
+
+template <class T_return, class T_arg1,class T_arg2,class T_arg3, class T_ret, class T_type1,class T_type2,class T_type3>
+inline Slot3<T_return, T_arg1,T_arg2,T_arg3>
+retype(const Slot3<T_ret, T_type1,T_type2,T_type3>& _A_slot)
+{ return Slot3<T_return, T_arg1,T_arg2,T_arg3>
+ (retype_slot_functor<Slot3<T_ret, T_type1, T_type2, T_type3>, T_return, T_type1,T_type2,T_type3>
+ (_A_slot)); }
+
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4, class T_ret, class T_type1,class T_type2,class T_type3,class T_type4>
+inline Slot4<T_return, T_arg1,T_arg2,T_arg3,T_arg4>
+retype(const Slot4<T_ret, T_type1,T_type2,T_type3,T_type4>& _A_slot)
+{ return Slot4<T_return, T_arg1,T_arg2,T_arg3,T_arg4>
+ (retype_slot_functor<Slot4<T_ret, T_type1, T_type2, T_type3, T_type4>, T_return, T_type1,T_type2,T_type3,T_type4>
+ (_A_slot)); }
+
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5, class T_ret, class T_type1,class T_type2,class T_type3,class T_type4,class T_type5>
+inline Slot5<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>
+retype(const Slot5<T_ret, T_type1,T_type2,T_type3,T_type4,T_type5>& _A_slot)
+{ return Slot5<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>
+ (retype_slot_functor<Slot5<T_ret, T_type1, T_type2, T_type3, T_type4, T_type5>, T_return, T_type1,T_type2,T_type3,T_type4,T_type5>
+ (_A_slot)); }
+
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6, class T_ret, class T_type1,class T_type2,class T_type3,class T_type4,class T_type5,class T_type6>
+inline Slot6<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>
+retype(const Slot6<T_ret, T_type1,T_type2,T_type3,T_type4,T_type5,T_type6>& _A_slot)
+{ return Slot6<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>
+ (retype_slot_functor<Slot6<T_ret, T_type1, T_type2, T_type3, T_type4, T_type5, T_type6>, T_return, T_type1,T_type2,T_type3,T_type4,T_type5,T_type6>
+ (_A_slot)); }
+
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7, class T_ret, class T_type1,class T_type2,class T_type3,class T_type4,class T_type5,class T_type6,class T_type7>
+inline Slot7<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>
+retype(const Slot7<T_ret, T_type1,T_type2,T_type3,T_type4,T_type5,T_type6,T_type7>& _A_slot)
+{ return Slot7<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>
+ (retype_slot_functor<Slot7<T_ret, T_type1, T_type2, T_type3, T_type4, T_type5, T_type6, T_type7>, T_return, T_type1,T_type2,T_type3,T_type4,T_type5,T_type6,T_type7>
+ (_A_slot)); }
+
+
+} /* namespace SigC */
+
+#endif /* LIBSIGC_DISABLE_DEPRECATED */
+#endif /* _SIGC_MACROS_RETYPEHM4_ */
diff --git a/libs/sigc++2/sigc++/retype_return.h b/libs/sigc++2/sigc++/retype_return.h
new file mode 100644
index 0000000000..cc6c153394
--- /dev/null
+++ b/libs/sigc++2/sigc++/retype_return.h
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2002, The libsigc++ Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+#ifndef _SIGC_RETYPE_RETURN_HPP_
+#define _SIGC_RETYPE_RETURN_HPP_
+
+#include <sigc++/adaptors/retype_return.h>
+
+#ifndef LIBSIGC_DISABLE_DEPRECATED
+
+namespace SigC {
+
+using ::sigc::retype_return;
+using ::sigc::hide_return;
+
+}
+
+#endif /* LIBSIGC_DISABLE_DEPRECATED */
+
+#endif /* _SIGC_RETYPE_RETURN_HPP_ */
diff --git a/libs/sigc++2/sigc++/sigc++.h b/libs/sigc++2/sigc++/sigc++.h
new file mode 100644
index 0000000000..90a9e6dd17
--- /dev/null
+++ b/libs/sigc++2/sigc++/sigc++.h
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2003, The libsigc++ Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+
+#ifndef SIGCXX_SIGCXX_H
+#define SIGCXX_SIGCXX_H
+
+#include <sigc++/signal.h>
+#include <sigc++/connection.h>
+#include <sigc++/trackable.h>
+#include <sigc++/adaptors/adaptors.h>
+#include <sigc++/functors/functors.h>
+
+#endif /* SIGCXX_SIGCXX_H */
+
diff --git a/libs/sigc++2/sigc++/signal.cc b/libs/sigc++2/sigc++/signal.cc
new file mode 100644
index 0000000000..993eee4aca
--- /dev/null
+++ b/libs/sigc++2/sigc++/signal.cc
@@ -0,0 +1,25 @@
+// -*- c++ -*-
+/*
+ * Copyright 2002, The libsigc++ Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+#include <sigc++/signal.h>
+
+namespace sigc {
+
+
+} /* sigc */
diff --git a/libs/sigc++2/sigc++/signal.h b/libs/sigc++2/sigc++/signal.h
new file mode 100644
index 0000000000..a89112cf9e
--- /dev/null
+++ b/libs/sigc++2/sigc++/signal.h
@@ -0,0 +1,3188 @@
+// -*- c++ -*-
+/* Do not edit! -- generated file */
+
+#ifndef _SIGC_SIGNAL_H_
+#define _SIGC_SIGNAL_H_
+
+#include <list>
+#include <sigc++/signal_base.h>
+#include <sigc++/type_traits.h>
+#include <sigc++/trackable.h>
+#include <sigc++/functors/slot.h>
+#include <sigc++/functors/mem_fun.h>
+
+// TODO: This should have its own test.
+// I have just used this because there is a correlation between these two problems.
+#ifdef SIGC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+ //Compilers, such as SUN Forte C++, that do not allow this also often
+ //do not allow a typedef to have the same name as a class in the typedef's definition.
+ #define SIGC_TYPEDEF_REDEFINE_ALLOWED 1
+#endif
+
+namespace sigc {
+
+/** STL-style iterator for slot_list.
+ *
+ * @ingroup signal
+ */
+template <typename T_slot>
+struct slot_iterator
+{
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef std::bidirectional_iterator_tag iterator_category;
+
+ typedef T_slot slot_type;
+
+ typedef T_slot value_type;
+ typedef T_slot* pointer;
+ typedef T_slot& reference;
+
+ typedef typename internal::signal_impl::iterator_type iterator_type;
+
+ slot_iterator()
+ {}
+
+ explicit slot_iterator(const iterator_type& i)
+ : i_(i) {}
+
+ reference operator*() const
+ { return static_cast<reference>(*i_); }
+
+ pointer operator->() const
+ { return &(operator*()); }
+
+ slot_iterator& operator++()
+ {
+ ++i_;
+ return *this;
+ }
+
+ slot_iterator operator++(int)
+ {
+ slot_iterator __tmp(*this);
+ ++i_;
+ return __tmp;
+ }
+
+ slot_iterator& operator--()
+ {
+ --i_;
+ return *this;
+ }
+
+ slot_iterator& operator--(int)
+ {
+ slot_iterator __tmp(*this);
+ --i_;
+ return __tmp;
+ }
+
+ bool operator == (const slot_iterator& other) const
+ { return i_ == other.i_; }
+
+ bool operator != (const slot_iterator& other) const
+ { return i_ != other.i_; }
+
+ iterator_type i_;
+};
+
+/** STL-style const iterator for slot_list.
+ *
+ * @ingroup signal
+ */
+template <typename T_slot>
+struct slot_const_iterator
+{
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef std::bidirectional_iterator_tag iterator_category;
+
+ typedef T_slot slot_type;
+
+ typedef T_slot value_type;
+ typedef const T_slot* pointer;
+ typedef const T_slot& reference;
+
+ typedef typename internal::signal_impl::const_iterator_type iterator_type;
+
+ slot_const_iterator()
+ {}
+
+ explicit slot_const_iterator(const iterator_type& i)
+ : i_(i) {}
+
+ reference operator*() const
+ { return static_cast<reference>(*i_); }
+
+ pointer operator->() const
+ { return &(operator*()); }
+
+ slot_const_iterator& operator++()
+ {
+ ++i_;
+ return *this;
+ }
+
+ slot_const_iterator operator++(int)
+ {
+ slot_const_iterator __tmp(*this);
+ ++i_;
+ return __tmp;
+ }
+
+ slot_const_iterator& operator--()
+ {
+ --i_;
+ return *this;
+ }
+
+ slot_const_iterator& operator--(int)
+ {
+ slot_const_iterator __tmp(*this);
+ --i_;
+ return __tmp;
+ }
+
+ bool operator == (const slot_const_iterator& other) const
+ { return i_ == other.i_; }
+
+ bool operator != (const slot_const_iterator& other) const
+ { return i_ != other.i_; }
+
+ iterator_type i_;
+};
+
+/** STL-style list interface for sigc::signal#.
+ * slot_list can be used to iterate over the list of slots that
+ * is managed by a signal. Slots can be added or removed from
+ * the list while existing iterators stay valid. A slot_list
+ * object can be retrieved from the signal's slots() function.
+ *
+ * @ingroup signal
+ */
+template <class T_slot>
+struct slot_list
+{
+ typedef T_slot slot_type;
+
+ typedef slot_type& reference;
+ typedef const slot_type& const_reference;
+
+ typedef slot_iterator<slot_type> iterator;
+ typedef slot_const_iterator<slot_type> const_iterator;
+ typedef std::reverse_iterator<iterator> reverse_iterator;
+ typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
+
+ slot_list()
+ : list_(0) {}
+
+ explicit slot_list(internal::signal_impl* __list)
+ : list_(__list) {}
+
+ iterator begin()
+ { return iterator(list_->slots_.begin()); }
+
+ const_iterator begin() const
+ { return const_iterator(list_->slots_.begin()); }
+
+ iterator end()
+ { return iterator(list_->slots_.end()); }
+
+ const_iterator end() const
+ { return const_iterator(list_->slots_.end()); }
+
+ reverse_iterator rbegin()
+ { return reverse_iterator(end()); }
+
+ const_reverse_iterator rbegin() const
+ { return const_reverse_iterator(end()); }
+
+ reverse_iterator rend()
+ { return reverse_iterator(begin()); }
+
+ const_reverse_iterator rend() const
+ { return const_reverse_iterator(begin()); }
+
+ reference front()
+ { return *begin(); }
+
+ const_reference front() const
+ { return *begin(); }
+
+ reference back()
+ { return *(--end()); }
+
+ const_reference back() const
+ { return *(--end()); }
+
+ iterator insert(iterator i, const slot_type& slot_)
+ { return iterator(list_->insert(i.i_, static_cast<const slot_base&>(slot_))); }
+
+ void push_front(const slot_type& c)
+ { insert(begin(), c); }
+
+ void push_back(const slot_type& c)
+ { insert(end(), c); }
+
+ iterator erase(iterator i)
+ { return iterator(list_->erase(i.i_)); }
+
+ iterator erase(iterator first_, iterator last_)
+ {
+ while (first_ != last_)
+ first_ = erase(first_);
+ return last_;
+ }
+
+ void pop_front()
+ { erase(begin()); }
+
+ void pop_back()
+ {
+ iterator tmp_ = end();
+ erase(--tmp_);
+ }
+
+protected:
+ internal::signal_impl* list_;
+};
+
+
+namespace internal {
+
+/** Special iterator over sigc::internal::signal_impl's slot list that holds extra data.
+ * This iterators is for use in accumulators. operator*() executes
+ * the slot. The return value is buffered, so that in an expression
+ * like @code a = (*i) * (*i); @endcode the slot is executed only once.
+ */
+template <class T_emitter, class T_result = typename T_emitter::result_type>
+struct slot_iterator_buf
+{
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef std::bidirectional_iterator_tag iterator_category;
+
+ typedef T_emitter emitter_type;
+ typedef T_result result_type;
+ typedef typename T_emitter::slot_type slot_type;
+
+ typedef signal_impl::const_iterator_type iterator_type;
+
+ slot_iterator_buf()
+ : c_(0), invoked_(false) {}
+
+ slot_iterator_buf(const iterator_type& i, const emitter_type* c)
+ : i_(i), c_(c), invoked_(false) {}
+
+ result_type operator*() const
+ {
+ if (!i_->empty() && !i_->blocked() && !invoked_)
+ {
+ r_ = (*c_)(static_cast<const slot_type&>(*i_));
+ invoked_ = true;
+ }
+ return r_;
+ }
+
+ slot_iterator_buf& operator++()
+ {
+ ++i_;
+ invoked_ = false;
+ return *this;
+ }
+
+ slot_iterator_buf operator++(int)
+ {
+ slot_iterator_buf __tmp(*this);
+ ++i_;
+ invoked_ = false;
+ return __tmp;
+ }
+
+ slot_iterator_buf& operator--()
+ {
+ --i_;
+ invoked_ = false;
+ return *this;
+ }
+
+ slot_iterator_buf& operator--(int)
+ {
+ slot_iterator_buf __tmp(*this);
+ --i_;
+ invoked_ = false;
+ return __tmp;
+ }
+
+ bool operator == (const slot_iterator_buf& other) const
+ { return (!c_ || (i_ == other.i_)); } /* If '!c_' the iterators are empty.
+ * Unfortunately, empty stl iterators are not equal.
+ * We are forcing equality so that 'first==last'
+ * in the accumulator's emit function yields true. */
+
+ bool operator != (const slot_iterator_buf& other) const
+ { return (c_ && (i_ != other.i_)); }
+
+private:
+ iterator_type i_;
+ const emitter_type* c_;
+ mutable result_type r_;
+ mutable bool invoked_;
+};
+
+/** Template specialization of slot_iterator_buf for void return signals.
+ */
+template <class T_emitter>
+struct slot_iterator_buf<T_emitter, void>
+{
+ typedef size_t size_type;
+ typedef ptrdiff_t difference_type;
+ typedef std::bidirectional_iterator_tag iterator_category;
+
+ typedef T_emitter emitter_type;
+ typedef void result_type;
+ typedef typename T_emitter::slot_type slot_type;
+
+ typedef signal_impl::const_iterator_type iterator_type;
+
+ slot_iterator_buf()
+ : c_(0), invoked_(false) {}
+
+ slot_iterator_buf(const iterator_type& i, const emitter_type* c)
+ : i_(i), c_(c), invoked_(false) {}
+
+ void operator*() const
+ {
+ if (!i_->empty() && !i_->blocked() && !invoked_)
+ {
+ (*c_)(static_cast<const slot_type&>(*i_));
+ invoked_ = true;
+ }
+ }
+
+ slot_iterator_buf& operator++()
+ {
+ ++i_;
+ invoked_ = false;
+ return *this;
+ }
+
+ slot_iterator_buf operator++(int)
+ {
+ slot_iterator_buf __tmp(*this);
+ ++i_;
+ invoked_ = false;
+ return __tmp;
+ }
+
+ slot_iterator_buf& operator--()
+ {
+ --i_;
+ invoked_ = false;
+ return *this;
+ }
+
+ slot_iterator_buf& operator--(int)
+ {
+ slot_iterator_buf __tmp(*this);
+ --i_;
+ invoked_ = false;
+ return __tmp;
+ }
+
+ bool operator == (const slot_iterator_buf& other) const
+ { return i_ == other.i_; }
+
+ bool operator != (const slot_iterator_buf& other) const
+ { return i_ != other.i_; }
+
+private:
+ iterator_type i_;
+ const emitter_type* c_;
+ mutable bool invoked_;
+};
+
+/** Abstracts signal emission.
+ * This template implements the emit() function of signal0.
+ * Template specializations are available to optimize signal
+ * emission when no accumulator is used, i.e. the template
+ * argument @e T_accumulator is @p nil.
+ */
+template <class T_return, class T_accumulator>
+struct signal_emit0
+{
+ typedef signal_emit0<T_return, T_accumulator> self_type;
+ typedef typename T_accumulator::result_type result_type;
+ typedef slot<T_return> slot_type;
+ typedef internal::slot_iterator_buf<self_type> slot_iterator_buf_type;
+ typedef signal_impl::const_iterator_type iterator_type;
+
+ signal_emit0() {}
+
+ /** Invokes a slot.
+ * @param _A_slot Some slot to invoke.
+ * @return The slot's return value.
+ */
+ T_return operator()(const slot_type& _A_slot) const
+ { return (reinterpret_cast<typename slot_type::call_type>(_A_slot.rep_->call_))(_A_slot.rep_); }
+
+ /** Executes a list of slots using an accumulator of type @e T_accumulator.
+
+ * @return The accumulated return values of the slot invocations as processed by the accumulator.
+ */
+ static result_type emit(signal_impl* impl)
+ {
+ T_accumulator accumulator;
+
+ if (!impl)
+ return accumulator(slot_iterator_buf_type(), slot_iterator_buf_type());
+
+ signal_exec exec(impl);
+
+ self_type self ;
+ return accumulator(slot_iterator_buf_type(impl->slots_.begin(), &self),
+ slot_iterator_buf_type(impl->slots_.end(), &self));
+ }
+
+};
+
+/** Abstracts signal emission.
+ * This template specialization implements an optimized emit()
+ * function for the case that no accumulator is used.
+ */
+template <class T_return>
+struct signal_emit0<T_return, nil>
+{
+ typedef signal_emit0<T_return, nil > self_type;
+ typedef T_return result_type;
+ typedef slot<T_return> slot_type;
+ typedef signal_impl::const_iterator_type iterator_type;
+ typedef typename slot_type::call_type call_type;
+
+ /** Executes a list of slots using an accumulator of type @e T_accumulator.
+ * The return value of the last slot invoked is returned.
+ * @param first An iterator pointing to the first slot in the list.
+ * @param last An iterator pointing to the last slot in the list.
+ * @return The return value of the last slot invoked.
+ */
+ static result_type emit(signal_impl* impl)
+ {
+ if (!impl || impl->slots_.empty()) return T_return();
+ iterator_type it = impl->slots_.begin();
+ for (; it != impl->slots_.end(); ++it)
+ if (!it->empty() && !it->blocked()) break;
+ if (it == impl->slots_.end()) return T_return(); // note that 'T_return r_();' doesn't work => define 'r_' after this line and initialize as follows:
+
+ signal_exec exec(impl);
+
+ T_return r_ = (reinterpret_cast<call_type>(it->rep_->call_))(it->rep_);
+ for (++it; it != impl->slots_.end(); ++it)
+ {
+ if (it->empty() || it->blocked())
+ continue;
+ r_ = (reinterpret_cast<call_type>(it->rep_->call_))(it->rep_);
+ }
+ return r_;
+ }
+};
+
+/** Abstracts signal emission.
+ * This template specialization implements an optimized emit()
+ * function for the case that no accumulator is used and the
+ * return type is @p void.
+ */
+template <>
+struct signal_emit0<void, nil>
+{
+ typedef signal_emit0<void, nil> self_type;
+ typedef void result_type;
+ typedef slot<void> slot_type;
+ typedef signal_impl::const_iterator_type iterator_type;
+ typedef void (*call_type)(slot_rep*);
+
+ /** Executes a list of slots using an accumulator of type @e T_accumulator.
+ * @param first An iterator pointing to the first slot in the list.
+ * @param last An iterator pointing to the last slot in the list.
+ */
+ static result_type emit(signal_impl* impl)
+ {
+ if (!impl || impl->slots_.empty()) return;
+ signal_exec exec(impl);
+
+ for (iterator_type it = impl->slots_.begin(); it != impl->slots_.end(); ++it)
+ {
+ if (it->empty() || it->blocked())
+ continue;
+ (reinterpret_cast<call_type>(it->rep_->call_))(it->rep_);
+ }
+ }
+};
+
+/** Abstracts signal emission.
+ * This template implements the emit() function of signal1.
+ * Template specializations are available to optimize signal
+ * emission when no accumulator is used, i.e. the template
+ * argument @e T_accumulator is @p nil.
+ */
+template <class T_return, class T_arg1, class T_accumulator>
+struct signal_emit1
+{
+ typedef signal_emit1<T_return, T_arg1, T_accumulator> self_type;
+ typedef typename T_accumulator::result_type result_type;
+ typedef slot<T_return, T_arg1> slot_type;
+ typedef internal::slot_iterator_buf<self_type> slot_iterator_buf_type;
+ typedef signal_impl::const_iterator_type iterator_type;
+
+ /** Instantiates the class.
+ * The parameters are stored in member variables. operator()() passes
+ * the values on to some slot.
+ */
+ signal_emit1(typename type_trait<T_arg1>::take _A_a1)
+ : _A_a1_(_A_a1) {}
+
+
+ /** Invokes a slot using the buffered parameter values.
+ * @param _A_slot Some slot to invoke.
+ * @return The slot's return value.
+ */
+ T_return operator()(const slot_type& _A_slot) const
+ { return (reinterpret_cast<typename slot_type::call_type>(_A_slot.rep_->call_))(_A_slot.rep_, _A_a1_); }
+
+ /** Executes a list of slots using an accumulator of type @e T_accumulator.
+ * The arguments are buffered in a temporary instance of signal_emit1.
+
+ * @param _A_a1 Argument to be passed on to the slots.
+ * @return The accumulated return values of the slot invocations as processed by the accumulator.
+ */
+ static result_type emit(signal_impl* impl, typename type_trait<T_arg1>::take _A_a1)
+ {
+ T_accumulator accumulator;
+
+ if (!impl)
+ return accumulator(slot_iterator_buf_type(), slot_iterator_buf_type());
+
+ signal_exec exec(impl);
+
+ self_type self (_A_a1);
+ return accumulator(slot_iterator_buf_type(impl->slots_.begin(), &self),
+ slot_iterator_buf_type(impl->slots_.end(), &self));
+ }
+
+ typename type_trait<T_arg1>::take _A_a1_;
+};
+
+/** Abstracts signal emission.
+ * This template specialization implements an optimized emit()
+ * function for the case that no accumulator is used.
+ */
+template <class T_return, class T_arg1>
+struct signal_emit1<T_return, T_arg1, nil>
+{
+ typedef signal_emit1<T_return, T_arg1, nil > self_type;
+ typedef T_return result_type;
+ typedef slot<T_return, T_arg1> slot_type;
+ typedef signal_impl::const_iterator_type iterator_type;
+ typedef typename slot_type::call_type call_type;
+
+ /** Executes a list of slots using an accumulator of type @e T_accumulator.
+ * The arguments are passed directly on to the slots.
+ * The return value of the last slot invoked is returned.
+ * @param first An iterator pointing to the first slot in the list.
+ * @param last An iterator pointing to the last slot in the list.
+ * @param _A_a1 Argument to be passed on to the slots.
+ * @return The return value of the last slot invoked.
+ */
+ static result_type emit(signal_impl* impl, typename type_trait<T_arg1>::take _A_a1)
+ {
+ if (!impl || impl->slots_.empty()) return T_return();
+ iterator_type it = impl->slots_.begin();
+ for (; it != impl->slots_.end(); ++it)
+ if (!it->empty() && !it->blocked()) break;
+ if (it == impl->slots_.end()) return T_return(); // note that 'T_return r_();' doesn't work => define 'r_' after this line and initialize as follows:
+
+ signal_exec exec(impl);
+
+ T_return r_ = (reinterpret_cast<call_type>(it->rep_->call_))(it->rep_, _A_a1);
+ for (++it; it != impl->slots_.end(); ++it)
+ {
+ if (it->empty() || it->blocked())
+ continue;
+ r_ = (reinterpret_cast<call_type>(it->rep_->call_))(it->rep_, _A_a1);
+ }
+ return r_;
+ }
+};
+
+/** Abstracts signal emission.
+ * This template specialization implements an optimized emit()
+ * function for the case that no accumulator is used and the
+ * return type is @p void.
+ */
+template <class T_arg1>
+struct signal_emit1<void, T_arg1, nil>
+{
+ typedef signal_emit1<void, T_arg1, nil> self_type;
+ typedef void result_type;
+ typedef slot<void, T_arg1> slot_type;
+ typedef signal_impl::const_iterator_type iterator_type;
+ typedef typename slot_type::call_type call_type;
+
+ /** Executes a list of slots using an accumulator of type @e T_accumulator.
+ * The arguments are passed directly on to the slots.
+ * @param first An iterator pointing to the first slot in the list.
+ * @param last An iterator pointing to the last slot in the list.
+ * @param _A_a1 Argument to be passed on to the slots.
+ */
+ static result_type emit(signal_impl* impl, typename type_trait<T_arg1>::take _A_a1)
+ {
+ if (!impl || impl->slots_.empty()) return;
+ signal_exec exec(impl);
+
+ for (iterator_type it = impl->slots_.begin(); it != impl->slots_.end(); ++it)
+ {
+ if (it->empty() || it->blocked())
+ continue;
+ (reinterpret_cast<call_type>(it->rep_->call_))(it->rep_, _A_a1);
+ }
+ }
+};
+
+/** Abstracts signal emission.
+ * This template implements the emit() function of signal2.
+ * Template specializations are available to optimize signal
+ * emission when no accumulator is used, i.e. the template
+ * argument @e T_accumulator is @p nil.
+ */
+template <class T_return, class T_arg1,class T_arg2, class T_accumulator>
+struct signal_emit2
+{
+ typedef signal_emit2<T_return, T_arg1,T_arg2, T_accumulator> self_type;
+ typedef typename T_accumulator::result_type result_type;
+ typedef slot<T_return, T_arg1,T_arg2> slot_type;
+ typedef internal::slot_iterator_buf<self_type> slot_iterator_buf_type;
+ typedef signal_impl::const_iterator_type iterator_type;
+
+ /** Instantiates the class.
+ * The parameters are stored in member variables. operator()() passes
+ * the values on to some slot.
+ */
+ signal_emit2(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2)
+ : _A_a1_(_A_a1),_A_a2_(_A_a2) {}
+
+
+ /** Invokes a slot using the buffered parameter values.
+ * @param _A_slot Some slot to invoke.
+ * @return The slot's return value.
+ */
+ T_return operator()(const slot_type& _A_slot) const
+ { return (reinterpret_cast<typename slot_type::call_type>(_A_slot.rep_->call_))(_A_slot.rep_, _A_a1_,_A_a2_); }
+
+ /** Executes a list of slots using an accumulator of type @e T_accumulator.
+ * The arguments are buffered in a temporary instance of signal_emit2.
+
+ * @param _A_a1 Argument to be passed on to the slots.
+ * @param _A_a2 Argument to be passed on to the slots.
+ * @return The accumulated return values of the slot invocations as processed by the accumulator.
+ */
+ static result_type emit(signal_impl* impl, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2)
+ {
+ T_accumulator accumulator;
+
+ if (!impl)
+ return accumulator(slot_iterator_buf_type(), slot_iterator_buf_type());
+
+ signal_exec exec(impl);
+
+ self_type self (_A_a1,_A_a2);
+ return accumulator(slot_iterator_buf_type(impl->slots_.begin(), &self),
+ slot_iterator_buf_type(impl->slots_.end(), &self));
+ }
+
+ typename type_trait<T_arg1>::take _A_a1_;
+ typename type_trait<T_arg2>::take _A_a2_;
+};
+
+/** Abstracts signal emission.
+ * This template specialization implements an optimized emit()
+ * function for the case that no accumulator is used.
+ */
+template <class T_return, class T_arg1,class T_arg2>
+struct signal_emit2<T_return, T_arg1,T_arg2, nil>
+{
+ typedef signal_emit2<T_return, T_arg1,T_arg2, nil > self_type;
+ typedef T_return result_type;
+ typedef slot<T_return, T_arg1,T_arg2> slot_type;
+ typedef signal_impl::const_iterator_type iterator_type;
+ typedef typename slot_type::call_type call_type;
+
+ /** Executes a list of slots using an accumulator of type @e T_accumulator.
+ * The arguments are passed directly on to the slots.
+ * The return value of the last slot invoked is returned.
+ * @param first An iterator pointing to the first slot in the list.
+ * @param last An iterator pointing to the last slot in the list.
+ * @param _A_a1 Argument to be passed on to the slots.
+ * @param _A_a2 Argument to be passed on to the slots.
+ * @return The return value of the last slot invoked.
+ */
+ static result_type emit(signal_impl* impl, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2)
+ {
+ if (!impl || impl->slots_.empty()) return T_return();
+ iterator_type it = impl->slots_.begin();
+ for (; it != impl->slots_.end(); ++it)
+ if (!it->empty() && !it->blocked()) break;
+ if (it == impl->slots_.end()) return T_return(); // note that 'T_return r_();' doesn't work => define 'r_' after this line and initialize as follows:
+
+ signal_exec exec(impl);
+
+ T_return r_ = (reinterpret_cast<call_type>(it->rep_->call_))(it->rep_, _A_a1,_A_a2);
+ for (++it; it != impl->slots_.end(); ++it)
+ {
+ if (it->empty() || it->blocked())
+ continue;
+ r_ = (reinterpret_cast<call_type>(it->rep_->call_))(it->rep_, _A_a1,_A_a2);
+ }
+ return r_;
+ }
+};
+
+/** Abstracts signal emission.
+ * This template specialization implements an optimized emit()
+ * function for the case that no accumulator is used and the
+ * return type is @p void.
+ */
+template <class T_arg1,class T_arg2>
+struct signal_emit2<void, T_arg1,T_arg2, nil>
+{
+ typedef signal_emit2<void, T_arg1,T_arg2, nil> self_type;
+ typedef void result_type;
+ typedef slot<void, T_arg1,T_arg2> slot_type;
+ typedef signal_impl::const_iterator_type iterator_type;
+ typedef typename slot_type::call_type call_type;
+
+ /** Executes a list of slots using an accumulator of type @e T_accumulator.
+ * The arguments are passed directly on to the slots.
+ * @param first An iterator pointing to the first slot in the list.
+ * @param last An iterator pointing to the last slot in the list.
+ * @param _A_a1 Argument to be passed on to the slots.
+ * @param _A_a2 Argument to be passed on to the slots.
+ */
+ static result_type emit(signal_impl* impl, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2)
+ {
+ if (!impl || impl->slots_.empty()) return;
+ signal_exec exec(impl);
+
+ for (iterator_type it = impl->slots_.begin(); it != impl->slots_.end(); ++it)
+ {
+ if (it->empty() || it->blocked())
+ continue;
+ (reinterpret_cast<call_type>(it->rep_->call_))(it->rep_, _A_a1,_A_a2);
+ }
+ }
+};
+
+/** Abstracts signal emission.
+ * This template implements the emit() function of signal3.
+ * Template specializations are available to optimize signal
+ * emission when no accumulator is used, i.e. the template
+ * argument @e T_accumulator is @p nil.
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3, class T_accumulator>
+struct signal_emit3
+{
+ typedef signal_emit3<T_return, T_arg1,T_arg2,T_arg3, T_accumulator> self_type;
+ typedef typename T_accumulator::result_type result_type;
+ typedef slot<T_return, T_arg1,T_arg2,T_arg3> slot_type;
+ typedef internal::slot_iterator_buf<self_type> slot_iterator_buf_type;
+ typedef signal_impl::const_iterator_type iterator_type;
+
+ /** Instantiates the class.
+ * The parameters are stored in member variables. operator()() passes
+ * the values on to some slot.
+ */
+ signal_emit3(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3)
+ : _A_a1_(_A_a1),_A_a2_(_A_a2),_A_a3_(_A_a3) {}
+
+
+ /** Invokes a slot using the buffered parameter values.
+ * @param _A_slot Some slot to invoke.
+ * @return The slot's return value.
+ */
+ T_return operator()(const slot_type& _A_slot) const
+ { return (reinterpret_cast<typename slot_type::call_type>(_A_slot.rep_->call_))(_A_slot.rep_, _A_a1_,_A_a2_,_A_a3_); }
+
+ /** Executes a list of slots using an accumulator of type @e T_accumulator.
+ * The arguments are buffered in a temporary instance of signal_emit3.
+
+ * @param _A_a1 Argument to be passed on to the slots.
+ * @param _A_a2 Argument to be passed on to the slots.
+ * @param _A_a3 Argument to be passed on to the slots.
+ * @return The accumulated return values of the slot invocations as processed by the accumulator.
+ */
+ static result_type emit(signal_impl* impl, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3)
+ {
+ T_accumulator accumulator;
+
+ if (!impl)
+ return accumulator(slot_iterator_buf_type(), slot_iterator_buf_type());
+
+ signal_exec exec(impl);
+
+ self_type self (_A_a1,_A_a2,_A_a3);
+ return accumulator(slot_iterator_buf_type(impl->slots_.begin(), &self),
+ slot_iterator_buf_type(impl->slots_.end(), &self));
+ }
+
+ typename type_trait<T_arg1>::take _A_a1_;
+ typename type_trait<T_arg2>::take _A_a2_;
+ typename type_trait<T_arg3>::take _A_a3_;
+};
+
+/** Abstracts signal emission.
+ * This template specialization implements an optimized emit()
+ * function for the case that no accumulator is used.
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3>
+struct signal_emit3<T_return, T_arg1,T_arg2,T_arg3, nil>
+{
+ typedef signal_emit3<T_return, T_arg1,T_arg2,T_arg3, nil > self_type;
+ typedef T_return result_type;
+ typedef slot<T_return, T_arg1,T_arg2,T_arg3> slot_type;
+ typedef signal_impl::const_iterator_type iterator_type;
+ typedef typename slot_type::call_type call_type;
+
+ /** Executes a list of slots using an accumulator of type @e T_accumulator.
+ * The arguments are passed directly on to the slots.
+ * The return value of the last slot invoked is returned.
+ * @param first An iterator pointing to the first slot in the list.
+ * @param last An iterator pointing to the last slot in the list.
+ * @param _A_a1 Argument to be passed on to the slots.
+ * @param _A_a2 Argument to be passed on to the slots.
+ * @param _A_a3 Argument to be passed on to the slots.
+ * @return The return value of the last slot invoked.
+ */
+ static result_type emit(signal_impl* impl, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3)
+ {
+ if (!impl || impl->slots_.empty()) return T_return();
+ iterator_type it = impl->slots_.begin();
+ for (; it != impl->slots_.end(); ++it)
+ if (!it->empty() && !it->blocked()) break;
+ if (it == impl->slots_.end()) return T_return(); // note that 'T_return r_();' doesn't work => define 'r_' after this line and initialize as follows:
+
+ signal_exec exec(impl);
+
+ T_return r_ = (reinterpret_cast<call_type>(it->rep_->call_))(it->rep_, _A_a1,_A_a2,_A_a3);
+ for (++it; it != impl->slots_.end(); ++it)
+ {
+ if (it->empty() || it->blocked())
+ continue;
+ r_ = (reinterpret_cast<call_type>(it->rep_->call_))(it->rep_, _A_a1,_A_a2,_A_a3);
+ }
+ return r_;
+ }
+};
+
+/** Abstracts signal emission.
+ * This template specialization implements an optimized emit()
+ * function for the case that no accumulator is used and the
+ * return type is @p void.
+ */
+template <class T_arg1,class T_arg2,class T_arg3>
+struct signal_emit3<void, T_arg1,T_arg2,T_arg3, nil>
+{
+ typedef signal_emit3<void, T_arg1,T_arg2,T_arg3, nil> self_type;
+ typedef void result_type;
+ typedef slot<void, T_arg1,T_arg2,T_arg3> slot_type;
+ typedef signal_impl::const_iterator_type iterator_type;
+ typedef typename slot_type::call_type call_type;
+
+ /** Executes a list of slots using an accumulator of type @e T_accumulator.
+ * The arguments are passed directly on to the slots.
+ * @param first An iterator pointing to the first slot in the list.
+ * @param last An iterator pointing to the last slot in the list.
+ * @param _A_a1 Argument to be passed on to the slots.
+ * @param _A_a2 Argument to be passed on to the slots.
+ * @param _A_a3 Argument to be passed on to the slots.
+ */
+ static result_type emit(signal_impl* impl, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3)
+ {
+ if (!impl || impl->slots_.empty()) return;
+ signal_exec exec(impl);
+
+ for (iterator_type it = impl->slots_.begin(); it != impl->slots_.end(); ++it)
+ {
+ if (it->empty() || it->blocked())
+ continue;
+ (reinterpret_cast<call_type>(it->rep_->call_))(it->rep_, _A_a1,_A_a2,_A_a3);
+ }
+ }
+};
+
+/** Abstracts signal emission.
+ * This template implements the emit() function of signal4.
+ * Template specializations are available to optimize signal
+ * emission when no accumulator is used, i.e. the template
+ * argument @e T_accumulator is @p nil.
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4, class T_accumulator>
+struct signal_emit4
+{
+ typedef signal_emit4<T_return, T_arg1,T_arg2,T_arg3,T_arg4, T_accumulator> self_type;
+ typedef typename T_accumulator::result_type result_type;
+ typedef slot<T_return, T_arg1,T_arg2,T_arg3,T_arg4> slot_type;
+ typedef internal::slot_iterator_buf<self_type> slot_iterator_buf_type;
+ typedef signal_impl::const_iterator_type iterator_type;
+
+ /** Instantiates the class.
+ * The parameters are stored in member variables. operator()() passes
+ * the values on to some slot.
+ */
+ signal_emit4(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4)
+ : _A_a1_(_A_a1),_A_a2_(_A_a2),_A_a3_(_A_a3),_A_a4_(_A_a4) {}
+
+
+ /** Invokes a slot using the buffered parameter values.
+ * @param _A_slot Some slot to invoke.
+ * @return The slot's return value.
+ */
+ T_return operator()(const slot_type& _A_slot) const
+ { return (reinterpret_cast<typename slot_type::call_type>(_A_slot.rep_->call_))(_A_slot.rep_, _A_a1_,_A_a2_,_A_a3_,_A_a4_); }
+
+ /** Executes a list of slots using an accumulator of type @e T_accumulator.
+ * The arguments are buffered in a temporary instance of signal_emit4.
+
+ * @param _A_a1 Argument to be passed on to the slots.
+ * @param _A_a2 Argument to be passed on to the slots.
+ * @param _A_a3 Argument to be passed on to the slots.
+ * @param _A_a4 Argument to be passed on to the slots.
+ * @return The accumulated return values of the slot invocations as processed by the accumulator.
+ */
+ static result_type emit(signal_impl* impl, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4)
+ {
+ T_accumulator accumulator;
+
+ if (!impl)
+ return accumulator(slot_iterator_buf_type(), slot_iterator_buf_type());
+
+ signal_exec exec(impl);
+
+ self_type self (_A_a1,_A_a2,_A_a3,_A_a4);
+ return accumulator(slot_iterator_buf_type(impl->slots_.begin(), &self),
+ slot_iterator_buf_type(impl->slots_.end(), &self));
+ }
+
+ typename type_trait<T_arg1>::take _A_a1_;
+ typename type_trait<T_arg2>::take _A_a2_;
+ typename type_trait<T_arg3>::take _A_a3_;
+ typename type_trait<T_arg4>::take _A_a4_;
+};
+
+/** Abstracts signal emission.
+ * This template specialization implements an optimized emit()
+ * function for the case that no accumulator is used.
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+struct signal_emit4<T_return, T_arg1,T_arg2,T_arg3,T_arg4, nil>
+{
+ typedef signal_emit4<T_return, T_arg1,T_arg2,T_arg3,T_arg4, nil > self_type;
+ typedef T_return result_type;
+ typedef slot<T_return, T_arg1,T_arg2,T_arg3,T_arg4> slot_type;
+ typedef signal_impl::const_iterator_type iterator_type;
+ typedef typename slot_type::call_type call_type;
+
+ /** Executes a list of slots using an accumulator of type @e T_accumulator.
+ * The arguments are passed directly on to the slots.
+ * The return value of the last slot invoked is returned.
+ * @param first An iterator pointing to the first slot in the list.
+ * @param last An iterator pointing to the last slot in the list.
+ * @param _A_a1 Argument to be passed on to the slots.
+ * @param _A_a2 Argument to be passed on to the slots.
+ * @param _A_a3 Argument to be passed on to the slots.
+ * @param _A_a4 Argument to be passed on to the slots.
+ * @return The return value of the last slot invoked.
+ */
+ static result_type emit(signal_impl* impl, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4)
+ {
+ if (!impl || impl->slots_.empty()) return T_return();
+ iterator_type it = impl->slots_.begin();
+ for (; it != impl->slots_.end(); ++it)
+ if (!it->empty() && !it->blocked()) break;
+ if (it == impl->slots_.end()) return T_return(); // note that 'T_return r_();' doesn't work => define 'r_' after this line and initialize as follows:
+
+ signal_exec exec(impl);
+
+ T_return r_ = (reinterpret_cast<call_type>(it->rep_->call_))(it->rep_, _A_a1,_A_a2,_A_a3,_A_a4);
+ for (++it; it != impl->slots_.end(); ++it)
+ {
+ if (it->empty() || it->blocked())
+ continue;
+ r_ = (reinterpret_cast<call_type>(it->rep_->call_))(it->rep_, _A_a1,_A_a2,_A_a3,_A_a4);
+ }
+ return r_;
+ }
+};
+
+/** Abstracts signal emission.
+ * This template specialization implements an optimized emit()
+ * function for the case that no accumulator is used and the
+ * return type is @p void.
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+struct signal_emit4<void, T_arg1,T_arg2,T_arg3,T_arg4, nil>
+{
+ typedef signal_emit4<void, T_arg1,T_arg2,T_arg3,T_arg4, nil> self_type;
+ typedef void result_type;
+ typedef slot<void, T_arg1,T_arg2,T_arg3,T_arg4> slot_type;
+ typedef signal_impl::const_iterator_type iterator_type;
+ typedef typename slot_type::call_type call_type;
+
+ /** Executes a list of slots using an accumulator of type @e T_accumulator.
+ * The arguments are passed directly on to the slots.
+ * @param first An iterator pointing to the first slot in the list.
+ * @param last An iterator pointing to the last slot in the list.
+ * @param _A_a1 Argument to be passed on to the slots.
+ * @param _A_a2 Argument to be passed on to the slots.
+ * @param _A_a3 Argument to be passed on to the slots.
+ * @param _A_a4 Argument to be passed on to the slots.
+ */
+ static result_type emit(signal_impl* impl, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4)
+ {
+ if (!impl || impl->slots_.empty()) return;
+ signal_exec exec(impl);
+
+ for (iterator_type it = impl->slots_.begin(); it != impl->slots_.end(); ++it)
+ {
+ if (it->empty() || it->blocked())
+ continue;
+ (reinterpret_cast<call_type>(it->rep_->call_))(it->rep_, _A_a1,_A_a2,_A_a3,_A_a4);
+ }
+ }
+};
+
+/** Abstracts signal emission.
+ * This template implements the emit() function of signal5.
+ * Template specializations are available to optimize signal
+ * emission when no accumulator is used, i.e. the template
+ * argument @e T_accumulator is @p nil.
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5, class T_accumulator>
+struct signal_emit5
+{
+ typedef signal_emit5<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5, T_accumulator> self_type;
+ typedef typename T_accumulator::result_type result_type;
+ typedef slot<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5> slot_type;
+ typedef internal::slot_iterator_buf<self_type> slot_iterator_buf_type;
+ typedef signal_impl::const_iterator_type iterator_type;
+
+ /** Instantiates the class.
+ * The parameters are stored in member variables. operator()() passes
+ * the values on to some slot.
+ */
+ signal_emit5(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5)
+ : _A_a1_(_A_a1),_A_a2_(_A_a2),_A_a3_(_A_a3),_A_a4_(_A_a4),_A_a5_(_A_a5) {}
+
+
+ /** Invokes a slot using the buffered parameter values.
+ * @param _A_slot Some slot to invoke.
+ * @return The slot's return value.
+ */
+ T_return operator()(const slot_type& _A_slot) const
+ { return (reinterpret_cast<typename slot_type::call_type>(_A_slot.rep_->call_))(_A_slot.rep_, _A_a1_,_A_a2_,_A_a3_,_A_a4_,_A_a5_); }
+
+ /** Executes a list of slots using an accumulator of type @e T_accumulator.
+ * The arguments are buffered in a temporary instance of signal_emit5.
+
+ * @param _A_a1 Argument to be passed on to the slots.
+ * @param _A_a2 Argument to be passed on to the slots.
+ * @param _A_a3 Argument to be passed on to the slots.
+ * @param _A_a4 Argument to be passed on to the slots.
+ * @param _A_a5 Argument to be passed on to the slots.
+ * @return The accumulated return values of the slot invocations as processed by the accumulator.
+ */
+ static result_type emit(signal_impl* impl, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5)
+ {
+ T_accumulator accumulator;
+
+ if (!impl)
+ return accumulator(slot_iterator_buf_type(), slot_iterator_buf_type());
+
+ signal_exec exec(impl);
+
+ self_type self (_A_a1,_A_a2,_A_a3,_A_a4,_A_a5);
+ return accumulator(slot_iterator_buf_type(impl->slots_.begin(), &self),
+ slot_iterator_buf_type(impl->slots_.end(), &self));
+ }
+
+ typename type_trait<T_arg1>::take _A_a1_;
+ typename type_trait<T_arg2>::take _A_a2_;
+ typename type_trait<T_arg3>::take _A_a3_;
+ typename type_trait<T_arg4>::take _A_a4_;
+ typename type_trait<T_arg5>::take _A_a5_;
+};
+
+/** Abstracts signal emission.
+ * This template specialization implements an optimized emit()
+ * function for the case that no accumulator is used.
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+struct signal_emit5<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5, nil>
+{
+ typedef signal_emit5<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5, nil > self_type;
+ typedef T_return result_type;
+ typedef slot<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5> slot_type;
+ typedef signal_impl::const_iterator_type iterator_type;
+ typedef typename slot_type::call_type call_type;
+
+ /** Executes a list of slots using an accumulator of type @e T_accumulator.
+ * The arguments are passed directly on to the slots.
+ * The return value of the last slot invoked is returned.
+ * @param first An iterator pointing to the first slot in the list.
+ * @param last An iterator pointing to the last slot in the list.
+ * @param _A_a1 Argument to be passed on to the slots.
+ * @param _A_a2 Argument to be passed on to the slots.
+ * @param _A_a3 Argument to be passed on to the slots.
+ * @param _A_a4 Argument to be passed on to the slots.
+ * @param _A_a5 Argument to be passed on to the slots.
+ * @return The return value of the last slot invoked.
+ */
+ static result_type emit(signal_impl* impl, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5)
+ {
+ if (!impl || impl->slots_.empty()) return T_return();
+ iterator_type it = impl->slots_.begin();
+ for (; it != impl->slots_.end(); ++it)
+ if (!it->empty() && !it->blocked()) break;
+ if (it == impl->slots_.end()) return T_return(); // note that 'T_return r_();' doesn't work => define 'r_' after this line and initialize as follows:
+
+ signal_exec exec(impl);
+
+ T_return r_ = (reinterpret_cast<call_type>(it->rep_->call_))(it->rep_, _A_a1,_A_a2,_A_a3,_A_a4,_A_a5);
+ for (++it; it != impl->slots_.end(); ++it)
+ {
+ if (it->empty() || it->blocked())
+ continue;
+ r_ = (reinterpret_cast<call_type>(it->rep_->call_))(it->rep_, _A_a1,_A_a2,_A_a3,_A_a4,_A_a5);
+ }
+ return r_;
+ }
+};
+
+/** Abstracts signal emission.
+ * This template specialization implements an optimized emit()
+ * function for the case that no accumulator is used and the
+ * return type is @p void.
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+struct signal_emit5<void, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5, nil>
+{
+ typedef signal_emit5<void, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5, nil> self_type;
+ typedef void result_type;
+ typedef slot<void, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5> slot_type;
+ typedef signal_impl::const_iterator_type iterator_type;
+ typedef typename slot_type::call_type call_type;
+
+ /** Executes a list of slots using an accumulator of type @e T_accumulator.
+ * The arguments are passed directly on to the slots.
+ * @param first An iterator pointing to the first slot in the list.
+ * @param last An iterator pointing to the last slot in the list.
+ * @param _A_a1 Argument to be passed on to the slots.
+ * @param _A_a2 Argument to be passed on to the slots.
+ * @param _A_a3 Argument to be passed on to the slots.
+ * @param _A_a4 Argument to be passed on to the slots.
+ * @param _A_a5 Argument to be passed on to the slots.
+ */
+ static result_type emit(signal_impl* impl, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5)
+ {
+ if (!impl || impl->slots_.empty()) return;
+ signal_exec exec(impl);
+
+ for (iterator_type it = impl->slots_.begin(); it != impl->slots_.end(); ++it)
+ {
+ if (it->empty() || it->blocked())
+ continue;
+ (reinterpret_cast<call_type>(it->rep_->call_))(it->rep_, _A_a1,_A_a2,_A_a3,_A_a4,_A_a5);
+ }
+ }
+};
+
+/** Abstracts signal emission.
+ * This template implements the emit() function of signal6.
+ * Template specializations are available to optimize signal
+ * emission when no accumulator is used, i.e. the template
+ * argument @e T_accumulator is @p nil.
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6, class T_accumulator>
+struct signal_emit6
+{
+ typedef signal_emit6<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6, T_accumulator> self_type;
+ typedef typename T_accumulator::result_type result_type;
+ typedef slot<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6> slot_type;
+ typedef internal::slot_iterator_buf<self_type> slot_iterator_buf_type;
+ typedef signal_impl::const_iterator_type iterator_type;
+
+ /** Instantiates the class.
+ * The parameters are stored in member variables. operator()() passes
+ * the values on to some slot.
+ */
+ signal_emit6(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5,typename type_trait<T_arg6>::take _A_a6)
+ : _A_a1_(_A_a1),_A_a2_(_A_a2),_A_a3_(_A_a3),_A_a4_(_A_a4),_A_a5_(_A_a5),_A_a6_(_A_a6) {}
+
+
+ /** Invokes a slot using the buffered parameter values.
+ * @param _A_slot Some slot to invoke.
+ * @return The slot's return value.
+ */
+ T_return operator()(const slot_type& _A_slot) const
+ { return (reinterpret_cast<typename slot_type::call_type>(_A_slot.rep_->call_))(_A_slot.rep_, _A_a1_,_A_a2_,_A_a3_,_A_a4_,_A_a5_,_A_a6_); }
+
+ /** Executes a list of slots using an accumulator of type @e T_accumulator.
+ * The arguments are buffered in a temporary instance of signal_emit6.
+
+ * @param _A_a1 Argument to be passed on to the slots.
+ * @param _A_a2 Argument to be passed on to the slots.
+ * @param _A_a3 Argument to be passed on to the slots.
+ * @param _A_a4 Argument to be passed on to the slots.
+ * @param _A_a5 Argument to be passed on to the slots.
+ * @param _A_a6 Argument to be passed on to the slots.
+ * @return The accumulated return values of the slot invocations as processed by the accumulator.
+ */
+ static result_type emit(signal_impl* impl, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5,typename type_trait<T_arg6>::take _A_a6)
+ {
+ T_accumulator accumulator;
+
+ if (!impl)
+ return accumulator(slot_iterator_buf_type(), slot_iterator_buf_type());
+
+ signal_exec exec(impl);
+
+ self_type self (_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6);
+ return accumulator(slot_iterator_buf_type(impl->slots_.begin(), &self),
+ slot_iterator_buf_type(impl->slots_.end(), &self));
+ }
+
+ typename type_trait<T_arg1>::take _A_a1_;
+ typename type_trait<T_arg2>::take _A_a2_;
+ typename type_trait<T_arg3>::take _A_a3_;
+ typename type_trait<T_arg4>::take _A_a4_;
+ typename type_trait<T_arg5>::take _A_a5_;
+ typename type_trait<T_arg6>::take _A_a6_;
+};
+
+/** Abstracts signal emission.
+ * This template specialization implements an optimized emit()
+ * function for the case that no accumulator is used.
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+struct signal_emit6<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6, nil>
+{
+ typedef signal_emit6<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6, nil > self_type;
+ typedef T_return result_type;
+ typedef slot<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6> slot_type;
+ typedef signal_impl::const_iterator_type iterator_type;
+ typedef typename slot_type::call_type call_type;
+
+ /** Executes a list of slots using an accumulator of type @e T_accumulator.
+ * The arguments are passed directly on to the slots.
+ * The return value of the last slot invoked is returned.
+ * @param first An iterator pointing to the first slot in the list.
+ * @param last An iterator pointing to the last slot in the list.
+ * @param _A_a1 Argument to be passed on to the slots.
+ * @param _A_a2 Argument to be passed on to the slots.
+ * @param _A_a3 Argument to be passed on to the slots.
+ * @param _A_a4 Argument to be passed on to the slots.
+ * @param _A_a5 Argument to be passed on to the slots.
+ * @param _A_a6 Argument to be passed on to the slots.
+ * @return The return value of the last slot invoked.
+ */
+ static result_type emit(signal_impl* impl, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5,typename type_trait<T_arg6>::take _A_a6)
+ {
+ if (!impl || impl->slots_.empty()) return T_return();
+ iterator_type it = impl->slots_.begin();
+ for (; it != impl->slots_.end(); ++it)
+ if (!it->empty() && !it->blocked()) break;
+ if (it == impl->slots_.end()) return T_return(); // note that 'T_return r_();' doesn't work => define 'r_' after this line and initialize as follows:
+
+ signal_exec exec(impl);
+
+ T_return r_ = (reinterpret_cast<call_type>(it->rep_->call_))(it->rep_, _A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6);
+ for (++it; it != impl->slots_.end(); ++it)
+ {
+ if (it->empty() || it->blocked())
+ continue;
+ r_ = (reinterpret_cast<call_type>(it->rep_->call_))(it->rep_, _A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6);
+ }
+ return r_;
+ }
+};
+
+/** Abstracts signal emission.
+ * This template specialization implements an optimized emit()
+ * function for the case that no accumulator is used and the
+ * return type is @p void.
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+struct signal_emit6<void, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6, nil>
+{
+ typedef signal_emit6<void, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6, nil> self_type;
+ typedef void result_type;
+ typedef slot<void, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6> slot_type;
+ typedef signal_impl::const_iterator_type iterator_type;
+ typedef typename slot_type::call_type call_type;
+
+ /** Executes a list of slots using an accumulator of type @e T_accumulator.
+ * The arguments are passed directly on to the slots.
+ * @param first An iterator pointing to the first slot in the list.
+ * @param last An iterator pointing to the last slot in the list.
+ * @param _A_a1 Argument to be passed on to the slots.
+ * @param _A_a2 Argument to be passed on to the slots.
+ * @param _A_a3 Argument to be passed on to the slots.
+ * @param _A_a4 Argument to be passed on to the slots.
+ * @param _A_a5 Argument to be passed on to the slots.
+ * @param _A_a6 Argument to be passed on to the slots.
+ */
+ static result_type emit(signal_impl* impl, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5,typename type_trait<T_arg6>::take _A_a6)
+ {
+ if (!impl || impl->slots_.empty()) return;
+ signal_exec exec(impl);
+
+ for (iterator_type it = impl->slots_.begin(); it != impl->slots_.end(); ++it)
+ {
+ if (it->empty() || it->blocked())
+ continue;
+ (reinterpret_cast<call_type>(it->rep_->call_))(it->rep_, _A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6);
+ }
+ }
+};
+
+/** Abstracts signal emission.
+ * This template implements the emit() function of signal7.
+ * Template specializations are available to optimize signal
+ * emission when no accumulator is used, i.e. the template
+ * argument @e T_accumulator is @p nil.
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7, class T_accumulator>
+struct signal_emit7
+{
+ typedef signal_emit7<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7, T_accumulator> self_type;
+ typedef typename T_accumulator::result_type result_type;
+ typedef slot<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7> slot_type;
+ typedef internal::slot_iterator_buf<self_type> slot_iterator_buf_type;
+ typedef signal_impl::const_iterator_type iterator_type;
+
+ /** Instantiates the class.
+ * The parameters are stored in member variables. operator()() passes
+ * the values on to some slot.
+ */
+ signal_emit7(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5,typename type_trait<T_arg6>::take _A_a6,typename type_trait<T_arg7>::take _A_a7)
+ : _A_a1_(_A_a1),_A_a2_(_A_a2),_A_a3_(_A_a3),_A_a4_(_A_a4),_A_a5_(_A_a5),_A_a6_(_A_a6),_A_a7_(_A_a7) {}
+
+
+ /** Invokes a slot using the buffered parameter values.
+ * @param _A_slot Some slot to invoke.
+ * @return The slot's return value.
+ */
+ T_return operator()(const slot_type& _A_slot) const
+ { return (reinterpret_cast<typename slot_type::call_type>(_A_slot.rep_->call_))(_A_slot.rep_, _A_a1_,_A_a2_,_A_a3_,_A_a4_,_A_a5_,_A_a6_,_A_a7_); }
+
+ /** Executes a list of slots using an accumulator of type @e T_accumulator.
+ * The arguments are buffered in a temporary instance of signal_emit7.
+
+ * @param _A_a1 Argument to be passed on to the slots.
+ * @param _A_a2 Argument to be passed on to the slots.
+ * @param _A_a3 Argument to be passed on to the slots.
+ * @param _A_a4 Argument to be passed on to the slots.
+ * @param _A_a5 Argument to be passed on to the slots.
+ * @param _A_a6 Argument to be passed on to the slots.
+ * @param _A_a7 Argument to be passed on to the slots.
+ * @return The accumulated return values of the slot invocations as processed by the accumulator.
+ */
+ static result_type emit(signal_impl* impl, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5,typename type_trait<T_arg6>::take _A_a6,typename type_trait<T_arg7>::take _A_a7)
+ {
+ T_accumulator accumulator;
+
+ if (!impl)
+ return accumulator(slot_iterator_buf_type(), slot_iterator_buf_type());
+
+ signal_exec exec(impl);
+
+ self_type self (_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7);
+ return accumulator(slot_iterator_buf_type(impl->slots_.begin(), &self),
+ slot_iterator_buf_type(impl->slots_.end(), &self));
+ }
+
+ typename type_trait<T_arg1>::take _A_a1_;
+ typename type_trait<T_arg2>::take _A_a2_;
+ typename type_trait<T_arg3>::take _A_a3_;
+ typename type_trait<T_arg4>::take _A_a4_;
+ typename type_trait<T_arg5>::take _A_a5_;
+ typename type_trait<T_arg6>::take _A_a6_;
+ typename type_trait<T_arg7>::take _A_a7_;
+};
+
+/** Abstracts signal emission.
+ * This template specialization implements an optimized emit()
+ * function for the case that no accumulator is used.
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+struct signal_emit7<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7, nil>
+{
+ typedef signal_emit7<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7, nil > self_type;
+ typedef T_return result_type;
+ typedef slot<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7> slot_type;
+ typedef signal_impl::const_iterator_type iterator_type;
+ typedef typename slot_type::call_type call_type;
+
+ /** Executes a list of slots using an accumulator of type @e T_accumulator.
+ * The arguments are passed directly on to the slots.
+ * The return value of the last slot invoked is returned.
+ * @param first An iterator pointing to the first slot in the list.
+ * @param last An iterator pointing to the last slot in the list.
+ * @param _A_a1 Argument to be passed on to the slots.
+ * @param _A_a2 Argument to be passed on to the slots.
+ * @param _A_a3 Argument to be passed on to the slots.
+ * @param _A_a4 Argument to be passed on to the slots.
+ * @param _A_a5 Argument to be passed on to the slots.
+ * @param _A_a6 Argument to be passed on to the slots.
+ * @param _A_a7 Argument to be passed on to the slots.
+ * @return The return value of the last slot invoked.
+ */
+ static result_type emit(signal_impl* impl, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5,typename type_trait<T_arg6>::take _A_a6,typename type_trait<T_arg7>::take _A_a7)
+ {
+ if (!impl || impl->slots_.empty()) return T_return();
+ iterator_type it = impl->slots_.begin();
+ for (; it != impl->slots_.end(); ++it)
+ if (!it->empty() && !it->blocked()) break;
+ if (it == impl->slots_.end()) return T_return(); // note that 'T_return r_();' doesn't work => define 'r_' after this line and initialize as follows:
+
+ signal_exec exec(impl);
+
+ T_return r_ = (reinterpret_cast<call_type>(it->rep_->call_))(it->rep_, _A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7);
+ for (++it; it != impl->slots_.end(); ++it)
+ {
+ if (it->empty() || it->blocked())
+ continue;
+ r_ = (reinterpret_cast<call_type>(it->rep_->call_))(it->rep_, _A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7);
+ }
+ return r_;
+ }
+};
+
+/** Abstracts signal emission.
+ * This template specialization implements an optimized emit()
+ * function for the case that no accumulator is used and the
+ * return type is @p void.
+ */
+template <class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+struct signal_emit7<void, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7, nil>
+{
+ typedef signal_emit7<void, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7, nil> self_type;
+ typedef void result_type;
+ typedef slot<void, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7> slot_type;
+ typedef signal_impl::const_iterator_type iterator_type;
+ typedef typename slot_type::call_type call_type;
+
+ /** Executes a list of slots using an accumulator of type @e T_accumulator.
+ * The arguments are passed directly on to the slots.
+ * @param first An iterator pointing to the first slot in the list.
+ * @param last An iterator pointing to the last slot in the list.
+ * @param _A_a1 Argument to be passed on to the slots.
+ * @param _A_a2 Argument to be passed on to the slots.
+ * @param _A_a3 Argument to be passed on to the slots.
+ * @param _A_a4 Argument to be passed on to the slots.
+ * @param _A_a5 Argument to be passed on to the slots.
+ * @param _A_a6 Argument to be passed on to the slots.
+ * @param _A_a7 Argument to be passed on to the slots.
+ */
+ static result_type emit(signal_impl* impl, typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5,typename type_trait<T_arg6>::take _A_a6,typename type_trait<T_arg7>::take _A_a7)
+ {
+ if (!impl || impl->slots_.empty()) return;
+ signal_exec exec(impl);
+
+ for (iterator_type it = impl->slots_.begin(); it != impl->slots_.end(); ++it)
+ {
+ if (it->empty() || it->blocked())
+ continue;
+ (reinterpret_cast<call_type>(it->rep_->call_))(it->rep_, _A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7);
+ }
+ }
+};
+
+
+} /* namespace internal */
+
+/** Signal declaration.
+ * signal0 can be used to connect() slots that are invoked
+ * during subsequent calls to emit(). Any functor or slot
+ * can be passed into connect(). It is converted into a slot
+ * implicitely.
+ *
+ * If you want to connect one signal to another, use make_slot()
+ * to retrieve a functor that emits the signal when invoked.
+ *
+ * Be careful if you directly pass one signal into the connect()
+ * method of another: a shallow copy of the signal is made and
+ * the signal's slots are not disconnected until both the signal
+ * and its clone are destroyed which is probably not what you want!
+ *
+ * An STL-style list interface for the signal's list of slots
+ * can be retrieved with slots(). This interface supports
+ * iteration, insertion and removal of slots.
+ *
+ * The following template arguments are used:
+ * - @e T_return The desired return type for the emit() function (may be overridden by the accumulator).
+ * - @e T_accumulator The accumulator type used for emission. The default @p nil means that no accumulator should be used, i.e. signal emission returns the return value of the last slot invoked.
+ *
+ * You should use the more convenient unnumbered sigc::signal template.
+ *
+ * @ingroup signal
+ */
+template <class T_return, class T_accumulator=nil>
+class signal0
+ : public signal_base
+{
+public:
+ typedef internal::signal_emit0<T_return, T_accumulator> emitter_type;
+ typedef typename emitter_type::result_type result_type;
+ typedef slot<T_return> slot_type;
+ typedef slot_list<slot_type> slot_list_type;
+ typedef typename slot_list_type::iterator iterator;
+ typedef typename slot_list_type::const_iterator const_iterator;
+ typedef typename slot_list_type::reverse_iterator reverse_iterator;
+ typedef typename slot_list_type::const_reverse_iterator const_reverse_iterator;
+
+#ifdef SIGC_TYPEDEF_REDEFINE_ALLOWED
+ /** This typedef is only for backwards-compatibility.
+ * It is not available when using the SUN Forte compiler.
+ * @deprecated slot_list_type;
+ */
+ typedef slot_list_type slot_list;
+#endif
+
+ /** Add a slot to the list of slots.
+ * Any functor or slot may be passed into connect().
+ * It will be converted into a slot implicitely.
+ * The returned iterator may be stored for disconnection
+ * of the slot at some later point. It stays valid until
+ * the slot is removed from the list of slots. The iterator
+ * can also be implicitely converted into a sigc::connection object
+ * that may be used safely beyond the life time of the slot.
+ * @param slot_ The slot to add to the list of slots.
+ * @return An iterator pointing to the new slot in the list.
+ */
+ iterator connect(const slot_type& slot_)
+ { return iterator(signal_base::connect(static_cast<const slot_base&>(slot_))); }
+
+ /** Triggers the emission of the signal.
+ * During signal emission all slots that have been connected
+ * to the signal are invoked unless they are manually set into
+ * a blocking state. The parameters are passed on to the slots.
+ * If @e T_accumulated is not @p nil, an accumulator of this type
+ * is used to process the return values of the slot invocations.
+ * Otherwise, the return value of the last slot invoked is returned.
+ * @return The accumulated return values of the slot invocations.
+ */
+ result_type emit() const
+ { return emitter_type::emit(impl_); }
+
+ /** Triggers the emission of the signal (see emit()). */
+ result_type operator()() const
+ { return emit(); }
+
+ /** Creates a functor that calls emit() on this signal.
+ * @code
+ * sigc::mem_fun(mysignal, &sigc::signal0::emit)
+ * @endcode
+ * yields the same result.
+ * @return A functor that calls emit() on this signal.
+ */
+ bound_const_mem_functor0<result_type, signal0> make_slot() const
+ { return bound_const_mem_functor0<result_type, signal0>(this, &signal0::emit); }
+
+ /** Creates an STL-style interface for the signal's list of slots.
+ * This interface supports iteration, insertion and removal of slots.
+ * @return An STL-style interface for the signal's list of slots.
+ */
+ slot_list_type slots()
+ { return slot_list_type(impl()); }
+
+ /** Creates an STL-style interface for the signal's list of slots.
+ * This interface supports iteration, insertion and removal of slots.
+ * @return An STL-style interface for the signal's list of slots.
+ */
+ const slot_list_type slots() const
+ { return slot_list_type(const_cast<signal0*>(this)->impl()); }
+
+ signal0() {}
+
+ signal0(const signal0& src)
+ : signal_base(src) {}
+};
+
+/** Signal declaration.
+ * signal1 can be used to connect() slots that are invoked
+ * during subsequent calls to emit(). Any functor or slot
+ * can be passed into connect(). It is converted into a slot
+ * implicitely.
+ *
+ * If you want to connect one signal to another, use make_slot()
+ * to retrieve a functor that emits the signal when invoked.
+ *
+ * Be careful if you directly pass one signal into the connect()
+ * method of another: a shallow copy of the signal is made and
+ * the signal's slots are not disconnected until both the signal
+ * and its clone are destroyed which is probably not what you want!
+ *
+ * An STL-style list interface for the signal's list of slots
+ * can be retrieved with slots(). This interface supports
+ * iteration, insertion and removal of slots.
+ *
+ * The following template arguments are used:
+ * - @e T_return The desired return type for the emit() function (may be overridden by the accumulator).
+ * - @e T_arg1 Argument type used in the definition of emit().
+ * - @e T_accumulator The accumulator type used for emission. The default @p nil means that no accumulator should be used, i.e. signal emission returns the return value of the last slot invoked.
+ *
+ * You should use the more convenient unnumbered sigc::signal template.
+ *
+ * @ingroup signal
+ */
+template <class T_return, class T_arg1, class T_accumulator=nil>
+class signal1
+ : public signal_base
+{
+public:
+ typedef internal::signal_emit1<T_return, T_arg1, T_accumulator> emitter_type;
+ typedef typename emitter_type::result_type result_type;
+ typedef slot<T_return, T_arg1> slot_type;
+ typedef slot_list<slot_type> slot_list_type;
+ typedef typename slot_list_type::iterator iterator;
+ typedef typename slot_list_type::const_iterator const_iterator;
+ typedef typename slot_list_type::reverse_iterator reverse_iterator;
+ typedef typename slot_list_type::const_reverse_iterator const_reverse_iterator;
+
+#ifdef SIGC_TYPEDEF_REDEFINE_ALLOWED
+ /** This typedef is only for backwards-compatibility.
+ * It is not available when using the SUN Forte compiler.
+ * @deprecated slot_list_type;
+ */
+ typedef slot_list_type slot_list;
+#endif
+
+ /** Add a slot to the list of slots.
+ * Any functor or slot may be passed into connect().
+ * It will be converted into a slot implicitely.
+ * The returned iterator may be stored for disconnection
+ * of the slot at some later point. It stays valid until
+ * the slot is removed from the list of slots. The iterator
+ * can also be implicitely converted into a sigc::connection object
+ * that may be used safely beyond the life time of the slot.
+ * @param slot_ The slot to add to the list of slots.
+ * @return An iterator pointing to the new slot in the list.
+ */
+ iterator connect(const slot_type& slot_)
+ { return iterator(signal_base::connect(static_cast<const slot_base&>(slot_))); }
+
+ /** Triggers the emission of the signal.
+ * During signal emission all slots that have been connected
+ * to the signal are invoked unless they are manually set into
+ * a blocking state. The parameters are passed on to the slots.
+ * If @e T_accumulated is not @p nil, an accumulator of this type
+ * is used to process the return values of the slot invocations.
+ * Otherwise, the return value of the last slot invoked is returned.
+ * @param _A_a1 Argument to be passed on to the slots.
+ * @return The accumulated return values of the slot invocations.
+ */
+ result_type emit(typename type_trait<T_arg1>::take _A_a1) const
+ { return emitter_type::emit(impl_, _A_a1); }
+
+ /** Triggers the emission of the signal (see emit()). */
+ result_type operator()(typename type_trait<T_arg1>::take _A_a1) const
+ { return emit(_A_a1); }
+
+ /** Creates a functor that calls emit() on this signal.
+ * @code
+ * sigc::mem_fun(mysignal, &sigc::signal1::emit)
+ * @endcode
+ * yields the same result.
+ * @return A functor that calls emit() on this signal.
+ */
+ bound_const_mem_functor1<result_type, signal1, typename type_trait<T_arg1>::take> make_slot() const
+ { return bound_const_mem_functor1<result_type, signal1, typename type_trait<T_arg1>::take>(this, &signal1::emit); }
+
+ /** Creates an STL-style interface for the signal's list of slots.
+ * This interface supports iteration, insertion and removal of slots.
+ * @return An STL-style interface for the signal's list of slots.
+ */
+ slot_list_type slots()
+ { return slot_list_type(impl()); }
+
+ /** Creates an STL-style interface for the signal's list of slots.
+ * This interface supports iteration, insertion and removal of slots.
+ * @return An STL-style interface for the signal's list of slots.
+ */
+ const slot_list_type slots() const
+ { return slot_list_type(const_cast<signal1*>(this)->impl()); }
+
+ signal1() {}
+
+ signal1(const signal1& src)
+ : signal_base(src) {}
+};
+
+/** Signal declaration.
+ * signal2 can be used to connect() slots that are invoked
+ * during subsequent calls to emit(). Any functor or slot
+ * can be passed into connect(). It is converted into a slot
+ * implicitely.
+ *
+ * If you want to connect one signal to another, use make_slot()
+ * to retrieve a functor that emits the signal when invoked.
+ *
+ * Be careful if you directly pass one signal into the connect()
+ * method of another: a shallow copy of the signal is made and
+ * the signal's slots are not disconnected until both the signal
+ * and its clone are destroyed which is probably not what you want!
+ *
+ * An STL-style list interface for the signal's list of slots
+ * can be retrieved with slots(). This interface supports
+ * iteration, insertion and removal of slots.
+ *
+ * The following template arguments are used:
+ * - @e T_return The desired return type for the emit() function (may be overridden by the accumulator).
+ * - @e T_arg1 Argument type used in the definition of emit().
+ * - @e T_arg2 Argument type used in the definition of emit().
+ * - @e T_accumulator The accumulator type used for emission. The default @p nil means that no accumulator should be used, i.e. signal emission returns the return value of the last slot invoked.
+ *
+ * You should use the more convenient unnumbered sigc::signal template.
+ *
+ * @ingroup signal
+ */
+template <class T_return, class T_arg1,class T_arg2, class T_accumulator=nil>
+class signal2
+ : public signal_base
+{
+public:
+ typedef internal::signal_emit2<T_return, T_arg1,T_arg2, T_accumulator> emitter_type;
+ typedef typename emitter_type::result_type result_type;
+ typedef slot<T_return, T_arg1,T_arg2> slot_type;
+ typedef slot_list<slot_type> slot_list_type;
+ typedef typename slot_list_type::iterator iterator;
+ typedef typename slot_list_type::const_iterator const_iterator;
+ typedef typename slot_list_type::reverse_iterator reverse_iterator;
+ typedef typename slot_list_type::const_reverse_iterator const_reverse_iterator;
+
+#ifdef SIGC_TYPEDEF_REDEFINE_ALLOWED
+ /** This typedef is only for backwards-compatibility.
+ * It is not available when using the SUN Forte compiler.
+ * @deprecated slot_list_type;
+ */
+ typedef slot_list_type slot_list;
+#endif
+
+ /** Add a slot to the list of slots.
+ * Any functor or slot may be passed into connect().
+ * It will be converted into a slot implicitely.
+ * The returned iterator may be stored for disconnection
+ * of the slot at some later point. It stays valid until
+ * the slot is removed from the list of slots. The iterator
+ * can also be implicitely converted into a sigc::connection object
+ * that may be used safely beyond the life time of the slot.
+ * @param slot_ The slot to add to the list of slots.
+ * @return An iterator pointing to the new slot in the list.
+ */
+ iterator connect(const slot_type& slot_)
+ { return iterator(signal_base::connect(static_cast<const slot_base&>(slot_))); }
+
+ /** Triggers the emission of the signal.
+ * During signal emission all slots that have been connected
+ * to the signal are invoked unless they are manually set into
+ * a blocking state. The parameters are passed on to the slots.
+ * If @e T_accumulated is not @p nil, an accumulator of this type
+ * is used to process the return values of the slot invocations.
+ * Otherwise, the return value of the last slot invoked is returned.
+ * @param _A_a1 Argument to be passed on to the slots.
+ * @param _A_a2 Argument to be passed on to the slots.
+ * @return The accumulated return values of the slot invocations.
+ */
+ result_type emit(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2) const
+ { return emitter_type::emit(impl_, _A_a1,_A_a2); }
+
+ /** Triggers the emission of the signal (see emit()). */
+ result_type operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2) const
+ { return emit(_A_a1,_A_a2); }
+
+ /** Creates a functor that calls emit() on this signal.
+ * @code
+ * sigc::mem_fun(mysignal, &sigc::signal2::emit)
+ * @endcode
+ * yields the same result.
+ * @return A functor that calls emit() on this signal.
+ */
+ bound_const_mem_functor2<result_type, signal2, typename type_trait<T_arg1>::take,typename type_trait<T_arg2>::take> make_slot() const
+ { return bound_const_mem_functor2<result_type, signal2, typename type_trait<T_arg1>::take,typename type_trait<T_arg2>::take>(this, &signal2::emit); }
+
+ /** Creates an STL-style interface for the signal's list of slots.
+ * This interface supports iteration, insertion and removal of slots.
+ * @return An STL-style interface for the signal's list of slots.
+ */
+ slot_list_type slots()
+ { return slot_list_type(impl()); }
+
+ /** Creates an STL-style interface for the signal's list of slots.
+ * This interface supports iteration, insertion and removal of slots.
+ * @return An STL-style interface for the signal's list of slots.
+ */
+ const slot_list_type slots() const
+ { return slot_list_type(const_cast<signal2*>(this)->impl()); }
+
+ signal2() {}
+
+ signal2(const signal2& src)
+ : signal_base(src) {}
+};
+
+/** Signal declaration.
+ * signal3 can be used to connect() slots that are invoked
+ * during subsequent calls to emit(). Any functor or slot
+ * can be passed into connect(). It is converted into a slot
+ * implicitely.
+ *
+ * If you want to connect one signal to another, use make_slot()
+ * to retrieve a functor that emits the signal when invoked.
+ *
+ * Be careful if you directly pass one signal into the connect()
+ * method of another: a shallow copy of the signal is made and
+ * the signal's slots are not disconnected until both the signal
+ * and its clone are destroyed which is probably not what you want!
+ *
+ * An STL-style list interface for the signal's list of slots
+ * can be retrieved with slots(). This interface supports
+ * iteration, insertion and removal of slots.
+ *
+ * The following template arguments are used:
+ * - @e T_return The desired return type for the emit() function (may be overridden by the accumulator).
+ * - @e T_arg1 Argument type used in the definition of emit().
+ * - @e T_arg2 Argument type used in the definition of emit().
+ * - @e T_arg3 Argument type used in the definition of emit().
+ * - @e T_accumulator The accumulator type used for emission. The default @p nil means that no accumulator should be used, i.e. signal emission returns the return value of the last slot invoked.
+ *
+ * You should use the more convenient unnumbered sigc::signal template.
+ *
+ * @ingroup signal
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3, class T_accumulator=nil>
+class signal3
+ : public signal_base
+{
+public:
+ typedef internal::signal_emit3<T_return, T_arg1,T_arg2,T_arg3, T_accumulator> emitter_type;
+ typedef typename emitter_type::result_type result_type;
+ typedef slot<T_return, T_arg1,T_arg2,T_arg3> slot_type;
+ typedef slot_list<slot_type> slot_list_type;
+ typedef typename slot_list_type::iterator iterator;
+ typedef typename slot_list_type::const_iterator const_iterator;
+ typedef typename slot_list_type::reverse_iterator reverse_iterator;
+ typedef typename slot_list_type::const_reverse_iterator const_reverse_iterator;
+
+#ifdef SIGC_TYPEDEF_REDEFINE_ALLOWED
+ /** This typedef is only for backwards-compatibility.
+ * It is not available when using the SUN Forte compiler.
+ * @deprecated slot_list_type;
+ */
+ typedef slot_list_type slot_list;
+#endif
+
+ /** Add a slot to the list of slots.
+ * Any functor or slot may be passed into connect().
+ * It will be converted into a slot implicitely.
+ * The returned iterator may be stored for disconnection
+ * of the slot at some later point. It stays valid until
+ * the slot is removed from the list of slots. The iterator
+ * can also be implicitely converted into a sigc::connection object
+ * that may be used safely beyond the life time of the slot.
+ * @param slot_ The slot to add to the list of slots.
+ * @return An iterator pointing to the new slot in the list.
+ */
+ iterator connect(const slot_type& slot_)
+ { return iterator(signal_base::connect(static_cast<const slot_base&>(slot_))); }
+
+ /** Triggers the emission of the signal.
+ * During signal emission all slots that have been connected
+ * to the signal are invoked unless they are manually set into
+ * a blocking state. The parameters are passed on to the slots.
+ * If @e T_accumulated is not @p nil, an accumulator of this type
+ * is used to process the return values of the slot invocations.
+ * Otherwise, the return value of the last slot invoked is returned.
+ * @param _A_a1 Argument to be passed on to the slots.
+ * @param _A_a2 Argument to be passed on to the slots.
+ * @param _A_a3 Argument to be passed on to the slots.
+ * @return The accumulated return values of the slot invocations.
+ */
+ result_type emit(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3) const
+ { return emitter_type::emit(impl_, _A_a1,_A_a2,_A_a3); }
+
+ /** Triggers the emission of the signal (see emit()). */
+ result_type operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3) const
+ { return emit(_A_a1,_A_a2,_A_a3); }
+
+ /** Creates a functor that calls emit() on this signal.
+ * @code
+ * sigc::mem_fun(mysignal, &sigc::signal3::emit)
+ * @endcode
+ * yields the same result.
+ * @return A functor that calls emit() on this signal.
+ */
+ bound_const_mem_functor3<result_type, signal3, typename type_trait<T_arg1>::take,typename type_trait<T_arg2>::take,typename type_trait<T_arg3>::take> make_slot() const
+ { return bound_const_mem_functor3<result_type, signal3, typename type_trait<T_arg1>::take,typename type_trait<T_arg2>::take,typename type_trait<T_arg3>::take>(this, &signal3::emit); }
+
+ /** Creates an STL-style interface for the signal's list of slots.
+ * This interface supports iteration, insertion and removal of slots.
+ * @return An STL-style interface for the signal's list of slots.
+ */
+ slot_list_type slots()
+ { return slot_list_type(impl()); }
+
+ /** Creates an STL-style interface for the signal's list of slots.
+ * This interface supports iteration, insertion and removal of slots.
+ * @return An STL-style interface for the signal's list of slots.
+ */
+ const slot_list_type slots() const
+ { return slot_list_type(const_cast<signal3*>(this)->impl()); }
+
+ signal3() {}
+
+ signal3(const signal3& src)
+ : signal_base(src) {}
+};
+
+/** Signal declaration.
+ * signal4 can be used to connect() slots that are invoked
+ * during subsequent calls to emit(). Any functor or slot
+ * can be passed into connect(). It is converted into a slot
+ * implicitely.
+ *
+ * If you want to connect one signal to another, use make_slot()
+ * to retrieve a functor that emits the signal when invoked.
+ *
+ * Be careful if you directly pass one signal into the connect()
+ * method of another: a shallow copy of the signal is made and
+ * the signal's slots are not disconnected until both the signal
+ * and its clone are destroyed which is probably not what you want!
+ *
+ * An STL-style list interface for the signal's list of slots
+ * can be retrieved with slots(). This interface supports
+ * iteration, insertion and removal of slots.
+ *
+ * The following template arguments are used:
+ * - @e T_return The desired return type for the emit() function (may be overridden by the accumulator).
+ * - @e T_arg1 Argument type used in the definition of emit().
+ * - @e T_arg2 Argument type used in the definition of emit().
+ * - @e T_arg3 Argument type used in the definition of emit().
+ * - @e T_arg4 Argument type used in the definition of emit().
+ * - @e T_accumulator The accumulator type used for emission. The default @p nil means that no accumulator should be used, i.e. signal emission returns the return value of the last slot invoked.
+ *
+ * You should use the more convenient unnumbered sigc::signal template.
+ *
+ * @ingroup signal
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4, class T_accumulator=nil>
+class signal4
+ : public signal_base
+{
+public:
+ typedef internal::signal_emit4<T_return, T_arg1,T_arg2,T_arg3,T_arg4, T_accumulator> emitter_type;
+ typedef typename emitter_type::result_type result_type;
+ typedef slot<T_return, T_arg1,T_arg2,T_arg3,T_arg4> slot_type;
+ typedef slot_list<slot_type> slot_list_type;
+ typedef typename slot_list_type::iterator iterator;
+ typedef typename slot_list_type::const_iterator const_iterator;
+ typedef typename slot_list_type::reverse_iterator reverse_iterator;
+ typedef typename slot_list_type::const_reverse_iterator const_reverse_iterator;
+
+#ifdef SIGC_TYPEDEF_REDEFINE_ALLOWED
+ /** This typedef is only for backwards-compatibility.
+ * It is not available when using the SUN Forte compiler.
+ * @deprecated slot_list_type;
+ */
+ typedef slot_list_type slot_list;
+#endif
+
+ /** Add a slot to the list of slots.
+ * Any functor or slot may be passed into connect().
+ * It will be converted into a slot implicitely.
+ * The returned iterator may be stored for disconnection
+ * of the slot at some later point. It stays valid until
+ * the slot is removed from the list of slots. The iterator
+ * can also be implicitely converted into a sigc::connection object
+ * that may be used safely beyond the life time of the slot.
+ * @param slot_ The slot to add to the list of slots.
+ * @return An iterator pointing to the new slot in the list.
+ */
+ iterator connect(const slot_type& slot_)
+ { return iterator(signal_base::connect(static_cast<const slot_base&>(slot_))); }
+
+ /** Triggers the emission of the signal.
+ * During signal emission all slots that have been connected
+ * to the signal are invoked unless they are manually set into
+ * a blocking state. The parameters are passed on to the slots.
+ * If @e T_accumulated is not @p nil, an accumulator of this type
+ * is used to process the return values of the slot invocations.
+ * Otherwise, the return value of the last slot invoked is returned.
+ * @param _A_a1 Argument to be passed on to the slots.
+ * @param _A_a2 Argument to be passed on to the slots.
+ * @param _A_a3 Argument to be passed on to the slots.
+ * @param _A_a4 Argument to be passed on to the slots.
+ * @return The accumulated return values of the slot invocations.
+ */
+ result_type emit(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4) const
+ { return emitter_type::emit(impl_, _A_a1,_A_a2,_A_a3,_A_a4); }
+
+ /** Triggers the emission of the signal (see emit()). */
+ result_type operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4) const
+ { return emit(_A_a1,_A_a2,_A_a3,_A_a4); }
+
+ /** Creates a functor that calls emit() on this signal.
+ * @code
+ * sigc::mem_fun(mysignal, &sigc::signal4::emit)
+ * @endcode
+ * yields the same result.
+ * @return A functor that calls emit() on this signal.
+ */
+ bound_const_mem_functor4<result_type, signal4, typename type_trait<T_arg1>::take,typename type_trait<T_arg2>::take,typename type_trait<T_arg3>::take,typename type_trait<T_arg4>::take> make_slot() const
+ { return bound_const_mem_functor4<result_type, signal4, typename type_trait<T_arg1>::take,typename type_trait<T_arg2>::take,typename type_trait<T_arg3>::take,typename type_trait<T_arg4>::take>(this, &signal4::emit); }
+
+ /** Creates an STL-style interface for the signal's list of slots.
+ * This interface supports iteration, insertion and removal of slots.
+ * @return An STL-style interface for the signal's list of slots.
+ */
+ slot_list_type slots()
+ { return slot_list_type(impl()); }
+
+ /** Creates an STL-style interface for the signal's list of slots.
+ * This interface supports iteration, insertion and removal of slots.
+ * @return An STL-style interface for the signal's list of slots.
+ */
+ const slot_list_type slots() const
+ { return slot_list_type(const_cast<signal4*>(this)->impl()); }
+
+ signal4() {}
+
+ signal4(const signal4& src)
+ : signal_base(src) {}
+};
+
+/** Signal declaration.
+ * signal5 can be used to connect() slots that are invoked
+ * during subsequent calls to emit(). Any functor or slot
+ * can be passed into connect(). It is converted into a slot
+ * implicitely.
+ *
+ * If you want to connect one signal to another, use make_slot()
+ * to retrieve a functor that emits the signal when invoked.
+ *
+ * Be careful if you directly pass one signal into the connect()
+ * method of another: a shallow copy of the signal is made and
+ * the signal's slots are not disconnected until both the signal
+ * and its clone are destroyed which is probably not what you want!
+ *
+ * An STL-style list interface for the signal's list of slots
+ * can be retrieved with slots(). This interface supports
+ * iteration, insertion and removal of slots.
+ *
+ * The following template arguments are used:
+ * - @e T_return The desired return type for the emit() function (may be overridden by the accumulator).
+ * - @e T_arg1 Argument type used in the definition of emit().
+ * - @e T_arg2 Argument type used in the definition of emit().
+ * - @e T_arg3 Argument type used in the definition of emit().
+ * - @e T_arg4 Argument type used in the definition of emit().
+ * - @e T_arg5 Argument type used in the definition of emit().
+ * - @e T_accumulator The accumulator type used for emission. The default @p nil means that no accumulator should be used, i.e. signal emission returns the return value of the last slot invoked.
+ *
+ * You should use the more convenient unnumbered sigc::signal template.
+ *
+ * @ingroup signal
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5, class T_accumulator=nil>
+class signal5
+ : public signal_base
+{
+public:
+ typedef internal::signal_emit5<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5, T_accumulator> emitter_type;
+ typedef typename emitter_type::result_type result_type;
+ typedef slot<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5> slot_type;
+ typedef slot_list<slot_type> slot_list_type;
+ typedef typename slot_list_type::iterator iterator;
+ typedef typename slot_list_type::const_iterator const_iterator;
+ typedef typename slot_list_type::reverse_iterator reverse_iterator;
+ typedef typename slot_list_type::const_reverse_iterator const_reverse_iterator;
+
+#ifdef SIGC_TYPEDEF_REDEFINE_ALLOWED
+ /** This typedef is only for backwards-compatibility.
+ * It is not available when using the SUN Forte compiler.
+ * @deprecated slot_list_type;
+ */
+ typedef slot_list_type slot_list;
+#endif
+
+ /** Add a slot to the list of slots.
+ * Any functor or slot may be passed into connect().
+ * It will be converted into a slot implicitely.
+ * The returned iterator may be stored for disconnection
+ * of the slot at some later point. It stays valid until
+ * the slot is removed from the list of slots. The iterator
+ * can also be implicitely converted into a sigc::connection object
+ * that may be used safely beyond the life time of the slot.
+ * @param slot_ The slot to add to the list of slots.
+ * @return An iterator pointing to the new slot in the list.
+ */
+ iterator connect(const slot_type& slot_)
+ { return iterator(signal_base::connect(static_cast<const slot_base&>(slot_))); }
+
+ /** Triggers the emission of the signal.
+ * During signal emission all slots that have been connected
+ * to the signal are invoked unless they are manually set into
+ * a blocking state. The parameters are passed on to the slots.
+ * If @e T_accumulated is not @p nil, an accumulator of this type
+ * is used to process the return values of the slot invocations.
+ * Otherwise, the return value of the last slot invoked is returned.
+ * @param _A_a1 Argument to be passed on to the slots.
+ * @param _A_a2 Argument to be passed on to the slots.
+ * @param _A_a3 Argument to be passed on to the slots.
+ * @param _A_a4 Argument to be passed on to the slots.
+ * @param _A_a5 Argument to be passed on to the slots.
+ * @return The accumulated return values of the slot invocations.
+ */
+ result_type emit(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5) const
+ { return emitter_type::emit(impl_, _A_a1,_A_a2,_A_a3,_A_a4,_A_a5); }
+
+ /** Triggers the emission of the signal (see emit()). */
+ result_type operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5) const
+ { return emit(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5); }
+
+ /** Creates a functor that calls emit() on this signal.
+ * @code
+ * sigc::mem_fun(mysignal, &sigc::signal5::emit)
+ * @endcode
+ * yields the same result.
+ * @return A functor that calls emit() on this signal.
+ */
+ bound_const_mem_functor5<result_type, signal5, typename type_trait<T_arg1>::take,typename type_trait<T_arg2>::take,typename type_trait<T_arg3>::take,typename type_trait<T_arg4>::take,typename type_trait<T_arg5>::take> make_slot() const
+ { return bound_const_mem_functor5<result_type, signal5, typename type_trait<T_arg1>::take,typename type_trait<T_arg2>::take,typename type_trait<T_arg3>::take,typename type_trait<T_arg4>::take,typename type_trait<T_arg5>::take>(this, &signal5::emit); }
+
+ /** Creates an STL-style interface for the signal's list of slots.
+ * This interface supports iteration, insertion and removal of slots.
+ * @return An STL-style interface for the signal's list of slots.
+ */
+ slot_list_type slots()
+ { return slot_list_type(impl()); }
+
+ /** Creates an STL-style interface for the signal's list of slots.
+ * This interface supports iteration, insertion and removal of slots.
+ * @return An STL-style interface for the signal's list of slots.
+ */
+ const slot_list_type slots() const
+ { return slot_list_type(const_cast<signal5*>(this)->impl()); }
+
+ signal5() {}
+
+ signal5(const signal5& src)
+ : signal_base(src) {}
+};
+
+/** Signal declaration.
+ * signal6 can be used to connect() slots that are invoked
+ * during subsequent calls to emit(). Any functor or slot
+ * can be passed into connect(). It is converted into a slot
+ * implicitely.
+ *
+ * If you want to connect one signal to another, use make_slot()
+ * to retrieve a functor that emits the signal when invoked.
+ *
+ * Be careful if you directly pass one signal into the connect()
+ * method of another: a shallow copy of the signal is made and
+ * the signal's slots are not disconnected until both the signal
+ * and its clone are destroyed which is probably not what you want!
+ *
+ * An STL-style list interface for the signal's list of slots
+ * can be retrieved with slots(). This interface supports
+ * iteration, insertion and removal of slots.
+ *
+ * The following template arguments are used:
+ * - @e T_return The desired return type for the emit() function (may be overridden by the accumulator).
+ * - @e T_arg1 Argument type used in the definition of emit().
+ * - @e T_arg2 Argument type used in the definition of emit().
+ * - @e T_arg3 Argument type used in the definition of emit().
+ * - @e T_arg4 Argument type used in the definition of emit().
+ * - @e T_arg5 Argument type used in the definition of emit().
+ * - @e T_arg6 Argument type used in the definition of emit().
+ * - @e T_accumulator The accumulator type used for emission. The default @p nil means that no accumulator should be used, i.e. signal emission returns the return value of the last slot invoked.
+ *
+ * You should use the more convenient unnumbered sigc::signal template.
+ *
+ * @ingroup signal
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6, class T_accumulator=nil>
+class signal6
+ : public signal_base
+{
+public:
+ typedef internal::signal_emit6<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6, T_accumulator> emitter_type;
+ typedef typename emitter_type::result_type result_type;
+ typedef slot<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6> slot_type;
+ typedef slot_list<slot_type> slot_list_type;
+ typedef typename slot_list_type::iterator iterator;
+ typedef typename slot_list_type::const_iterator const_iterator;
+ typedef typename slot_list_type::reverse_iterator reverse_iterator;
+ typedef typename slot_list_type::const_reverse_iterator const_reverse_iterator;
+
+#ifdef SIGC_TYPEDEF_REDEFINE_ALLOWED
+ /** This typedef is only for backwards-compatibility.
+ * It is not available when using the SUN Forte compiler.
+ * @deprecated slot_list_type;
+ */
+ typedef slot_list_type slot_list;
+#endif
+
+ /** Add a slot to the list of slots.
+ * Any functor or slot may be passed into connect().
+ * It will be converted into a slot implicitely.
+ * The returned iterator may be stored for disconnection
+ * of the slot at some later point. It stays valid until
+ * the slot is removed from the list of slots. The iterator
+ * can also be implicitely converted into a sigc::connection object
+ * that may be used safely beyond the life time of the slot.
+ * @param slot_ The slot to add to the list of slots.
+ * @return An iterator pointing to the new slot in the list.
+ */
+ iterator connect(const slot_type& slot_)
+ { return iterator(signal_base::connect(static_cast<const slot_base&>(slot_))); }
+
+ /** Triggers the emission of the signal.
+ * During signal emission all slots that have been connected
+ * to the signal are invoked unless they are manually set into
+ * a blocking state. The parameters are passed on to the slots.
+ * If @e T_accumulated is not @p nil, an accumulator of this type
+ * is used to process the return values of the slot invocations.
+ * Otherwise, the return value of the last slot invoked is returned.
+ * @param _A_a1 Argument to be passed on to the slots.
+ * @param _A_a2 Argument to be passed on to the slots.
+ * @param _A_a3 Argument to be passed on to the slots.
+ * @param _A_a4 Argument to be passed on to the slots.
+ * @param _A_a5 Argument to be passed on to the slots.
+ * @param _A_a6 Argument to be passed on to the slots.
+ * @return The accumulated return values of the slot invocations.
+ */
+ result_type emit(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5,typename type_trait<T_arg6>::take _A_a6) const
+ { return emitter_type::emit(impl_, _A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6); }
+
+ /** Triggers the emission of the signal (see emit()). */
+ result_type operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5,typename type_trait<T_arg6>::take _A_a6) const
+ { return emit(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6); }
+
+ /** Creates a functor that calls emit() on this signal.
+ * @code
+ * sigc::mem_fun(mysignal, &sigc::signal6::emit)
+ * @endcode
+ * yields the same result.
+ * @return A functor that calls emit() on this signal.
+ */
+ bound_const_mem_functor6<result_type, signal6, typename type_trait<T_arg1>::take,typename type_trait<T_arg2>::take,typename type_trait<T_arg3>::take,typename type_trait<T_arg4>::take,typename type_trait<T_arg5>::take,typename type_trait<T_arg6>::take> make_slot() const
+ { return bound_const_mem_functor6<result_type, signal6, typename type_trait<T_arg1>::take,typename type_trait<T_arg2>::take,typename type_trait<T_arg3>::take,typename type_trait<T_arg4>::take,typename type_trait<T_arg5>::take,typename type_trait<T_arg6>::take>(this, &signal6::emit); }
+
+ /** Creates an STL-style interface for the signal's list of slots.
+ * This interface supports iteration, insertion and removal of slots.
+ * @return An STL-style interface for the signal's list of slots.
+ */
+ slot_list_type slots()
+ { return slot_list_type(impl()); }
+
+ /** Creates an STL-style interface for the signal's list of slots.
+ * This interface supports iteration, insertion and removal of slots.
+ * @return An STL-style interface for the signal's list of slots.
+ */
+ const slot_list_type slots() const
+ { return slot_list_type(const_cast<signal6*>(this)->impl()); }
+
+ signal6() {}
+
+ signal6(const signal6& src)
+ : signal_base(src) {}
+};
+
+/** Signal declaration.
+ * signal7 can be used to connect() slots that are invoked
+ * during subsequent calls to emit(). Any functor or slot
+ * can be passed into connect(). It is converted into a slot
+ * implicitely.
+ *
+ * If you want to connect one signal to another, use make_slot()
+ * to retrieve a functor that emits the signal when invoked.
+ *
+ * Be careful if you directly pass one signal into the connect()
+ * method of another: a shallow copy of the signal is made and
+ * the signal's slots are not disconnected until both the signal
+ * and its clone are destroyed which is probably not what you want!
+ *
+ * An STL-style list interface for the signal's list of slots
+ * can be retrieved with slots(). This interface supports
+ * iteration, insertion and removal of slots.
+ *
+ * The following template arguments are used:
+ * - @e T_return The desired return type for the emit() function (may be overridden by the accumulator).
+ * - @e T_arg1 Argument type used in the definition of emit().
+ * - @e T_arg2 Argument type used in the definition of emit().
+ * - @e T_arg3 Argument type used in the definition of emit().
+ * - @e T_arg4 Argument type used in the definition of emit().
+ * - @e T_arg5 Argument type used in the definition of emit().
+ * - @e T_arg6 Argument type used in the definition of emit().
+ * - @e T_arg7 Argument type used in the definition of emit().
+ * - @e T_accumulator The accumulator type used for emission. The default @p nil means that no accumulator should be used, i.e. signal emission returns the return value of the last slot invoked.
+ *
+ * You should use the more convenient unnumbered sigc::signal template.
+ *
+ * @ingroup signal
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7, class T_accumulator=nil>
+class signal7
+ : public signal_base
+{
+public:
+ typedef internal::signal_emit7<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7, T_accumulator> emitter_type;
+ typedef typename emitter_type::result_type result_type;
+ typedef slot<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7> slot_type;
+ typedef slot_list<slot_type> slot_list_type;
+ typedef typename slot_list_type::iterator iterator;
+ typedef typename slot_list_type::const_iterator const_iterator;
+ typedef typename slot_list_type::reverse_iterator reverse_iterator;
+ typedef typename slot_list_type::const_reverse_iterator const_reverse_iterator;
+
+#ifdef SIGC_TYPEDEF_REDEFINE_ALLOWED
+ /** This typedef is only for backwards-compatibility.
+ * It is not available when using the SUN Forte compiler.
+ * @deprecated slot_list_type;
+ */
+ typedef slot_list_type slot_list;
+#endif
+
+ /** Add a slot to the list of slots.
+ * Any functor or slot may be passed into connect().
+ * It will be converted into a slot implicitely.
+ * The returned iterator may be stored for disconnection
+ * of the slot at some later point. It stays valid until
+ * the slot is removed from the list of slots. The iterator
+ * can also be implicitely converted into a sigc::connection object
+ * that may be used safely beyond the life time of the slot.
+ * @param slot_ The slot to add to the list of slots.
+ * @return An iterator pointing to the new slot in the list.
+ */
+ iterator connect(const slot_type& slot_)
+ { return iterator(signal_base::connect(static_cast<const slot_base&>(slot_))); }
+
+ /** Triggers the emission of the signal.
+ * During signal emission all slots that have been connected
+ * to the signal are invoked unless they are manually set into
+ * a blocking state. The parameters are passed on to the slots.
+ * If @e T_accumulated is not @p nil, an accumulator of this type
+ * is used to process the return values of the slot invocations.
+ * Otherwise, the return value of the last slot invoked is returned.
+ * @param _A_a1 Argument to be passed on to the slots.
+ * @param _A_a2 Argument to be passed on to the slots.
+ * @param _A_a3 Argument to be passed on to the slots.
+ * @param _A_a4 Argument to be passed on to the slots.
+ * @param _A_a5 Argument to be passed on to the slots.
+ * @param _A_a6 Argument to be passed on to the slots.
+ * @param _A_a7 Argument to be passed on to the slots.
+ * @return The accumulated return values of the slot invocations.
+ */
+ result_type emit(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5,typename type_trait<T_arg6>::take _A_a6,typename type_trait<T_arg7>::take _A_a7) const
+ { return emitter_type::emit(impl_, _A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7); }
+
+ /** Triggers the emission of the signal (see emit()). */
+ result_type operator()(typename type_trait<T_arg1>::take _A_a1,typename type_trait<T_arg2>::take _A_a2,typename type_trait<T_arg3>::take _A_a3,typename type_trait<T_arg4>::take _A_a4,typename type_trait<T_arg5>::take _A_a5,typename type_trait<T_arg6>::take _A_a6,typename type_trait<T_arg7>::take _A_a7) const
+ { return emit(_A_a1,_A_a2,_A_a3,_A_a4,_A_a5,_A_a6,_A_a7); }
+
+ /** Creates a functor that calls emit() on this signal.
+ * @code
+ * sigc::mem_fun(mysignal, &sigc::signal7::emit)
+ * @endcode
+ * yields the same result.
+ * @return A functor that calls emit() on this signal.
+ */
+ bound_const_mem_functor7<result_type, signal7, typename type_trait<T_arg1>::take,typename type_trait<T_arg2>::take,typename type_trait<T_arg3>::take,typename type_trait<T_arg4>::take,typename type_trait<T_arg5>::take,typename type_trait<T_arg6>::take,typename type_trait<T_arg7>::take> make_slot() const
+ { return bound_const_mem_functor7<result_type, signal7, typename type_trait<T_arg1>::take,typename type_trait<T_arg2>::take,typename type_trait<T_arg3>::take,typename type_trait<T_arg4>::take,typename type_trait<T_arg5>::take,typename type_trait<T_arg6>::take,typename type_trait<T_arg7>::take>(this, &signal7::emit); }
+
+ /** Creates an STL-style interface for the signal's list of slots.
+ * This interface supports iteration, insertion and removal of slots.
+ * @return An STL-style interface for the signal's list of slots.
+ */
+ slot_list_type slots()
+ { return slot_list_type(impl()); }
+
+ /** Creates an STL-style interface for the signal's list of slots.
+ * This interface supports iteration, insertion and removal of slots.
+ * @return An STL-style interface for the signal's list of slots.
+ */
+ const slot_list_type slots() const
+ { return slot_list_type(const_cast<signal7*>(this)->impl()); }
+
+ signal7() {}
+
+ signal7(const signal7& src)
+ : signal_base(src) {}
+};
+
+
+
+/** Convenience wrapper for the numbered sigc::signal# templates.
+ * signal can be used to connect() slots that are invoked
+ * during subsequent calls to emit(). Any functor or slot
+ * can be passed into connect(). It is converted into a slot
+ * implicitly.
+ *
+ * If you want to connect one signal to another, use make_slot()
+ * to retrieve a functor that emits the signal when invoked.
+ *
+ * Be careful if you directly pass one signal into the connect()
+ * method of another: a shallow copy of the signal is made and
+ * the signal's slots are not disconnected until both the signal
+ * and its clone are destroyed which is probably not what you want!
+ *
+ * An STL-style list interface for the signal's list of slots
+ * can be retrieved with slots(). This interface supports
+ * iteration, insertion and removal of slots.
+ *
+ * The template arguments determine the function signature of
+ * the emit() function:
+ * - @e T_return The desired return type of the emit() function.
+ * - @e T_arg1 Argument type used in the definition of emit(). The default @p nil means no argument.
+ * - @e T_arg2 Argument type used in the definition of emit(). The default @p nil means no argument.
+ * - @e T_arg3 Argument type used in the definition of emit(). The default @p nil means no argument.
+ * - @e T_arg4 Argument type used in the definition of emit(). The default @p nil means no argument.
+ * - @e T_arg5 Argument type used in the definition of emit(). The default @p nil means no argument.
+ * - @e T_arg6 Argument type used in the definition of emit(). The default @p nil means no argument.
+ * - @e T_arg7 Argument type used in the definition of emit(). The default @p nil means no argument.
+ *
+ * To specify an accumulator type the nested class signal::accumulated can be used.
+ *
+ * @par Example:
+ * @code
+ * void foo(int) {}
+ * sigc::signal<void, long> sig;
+ * sig.connect(sigc::ptr_fun(&foo));
+ * sig.emit(19);
+ * @endcode
+ *
+ * @ingroup signal
+ */
+template <class T_return, class T_arg1 = nil,class T_arg2 = nil,class T_arg3 = nil,class T_arg4 = nil,class T_arg5 = nil,class T_arg6 = nil,class T_arg7 = nil>
+class signal
+ : public signal7<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7, nil>
+{
+public:
+ /** Convenience wrapper for the numbered sigc::signal# templates.
+ * Like sigc::signal but the additional template parameter @e T_accumulator
+ * defines the accumulator type that should be used.
+ *
+ * An accumulator is a functor that uses a pair of special iterators
+ * to step through a list of slots and calculate a return value
+ * from the results of the slot invokations. The iterators' operator*()
+ * executes the slot. The return value is buffered, so that in an expression
+ * like @code a = (*i) * (*i); @endcode the slot is executed only once.
+ * The accumulator must define its return value as @p result_type.
+ *
+ * @par Example 1:
+ * This accumulator calculates the arithmetic mean value:
+ * @code
+ * struct arithmetic_mean_accumulator
+ * {
+ * typedef double result_type;
+ * template<typename T_iterator>
+ * result_type operator()(T_iterator first, T_iterator last) const
+ * {
+ * result_type value_ = 0;
+ * int n_ = 0;
+ * for (; first != last; ++first, ++n_)
+ * value_ += *first;
+ * return value_ / n_;
+ * }
+ * };
+ * @endcode
+ *
+ * @par Example 2:
+ * This accumulator stops signal emission when a slot returns zero:
+ * @code
+ * struct interruptable_accumulator
+ * {
+ * typedef bool result_type;
+ * template<typename T_iterator>
+ * result_type operator()(T_iterator first, T_iterator last) const
+ * {
+ * for (; first != last; ++first, ++n_)
+ * if (!*first) return false;
+ * return true;
+ * }
+ * };
+ * @endcode
+ *
+ * @ingroup signal
+ */
+ template <class T_accumulator>
+ class accumulated
+ : public signal7<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7, T_accumulator>
+ {
+ public:
+ accumulated() {}
+ accumulated(const accumulated& src)
+ : signal7<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7, T_accumulator>(src) {}
+ };
+
+ signal() {}
+ signal(const signal& src)
+ : signal7<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7, nil>(src) {}
+};
+
+
+/** Convenience wrapper for the numbered sigc::signal0 template.
+ * See the base class for useful methods.
+ * This is the template specialization of the unnumbered sigc::signal
+ * template for 0 argument(s).
+ */
+template <class T_return>
+class signal <T_return>
+ : public signal0<T_return, nil>
+{
+public:
+
+ /** Convenience wrapper for the numbered sigc::signal0 template.
+ * Like sigc::signal but the additional template parameter @e T_accumulator
+ * defines the accumulator type that should be used.
+ */
+ template <class T_accumulator>
+ class accumulated
+ : public signal0<T_return, T_accumulator>
+ {
+ public:
+ accumulated() {}
+ accumulated(const accumulated& src)
+ : signal0<T_return, T_accumulator>(src) {}
+ };
+
+ signal() {}
+ signal(const signal& src)
+ : signal0<T_return, nil>(src) {}
+};
+
+/** Convenience wrapper for the numbered sigc::signal1 template.
+ * See the base class for useful methods.
+ * This is the template specialization of the unnumbered sigc::signal
+ * template for 1 argument(s).
+ */
+template <class T_return, class T_arg1>
+class signal <T_return, T_arg1>
+ : public signal1<T_return, T_arg1, nil>
+{
+public:
+
+ /** Convenience wrapper for the numbered sigc::signal1 template.
+ * Like sigc::signal but the additional template parameter @e T_accumulator
+ * defines the accumulator type that should be used.
+ */
+ template <class T_accumulator>
+ class accumulated
+ : public signal1<T_return, T_arg1, T_accumulator>
+ {
+ public:
+ accumulated() {}
+ accumulated(const accumulated& src)
+ : signal1<T_return, T_arg1, T_accumulator>(src) {}
+ };
+
+ signal() {}
+ signal(const signal& src)
+ : signal1<T_return, T_arg1, nil>(src) {}
+};
+
+/** Convenience wrapper for the numbered sigc::signal2 template.
+ * See the base class for useful methods.
+ * This is the template specialization of the unnumbered sigc::signal
+ * template for 2 argument(s).
+ */
+template <class T_return, class T_arg1,class T_arg2>
+class signal <T_return, T_arg1,T_arg2>
+ : public signal2<T_return, T_arg1,T_arg2, nil>
+{
+public:
+
+ /** Convenience wrapper for the numbered sigc::signal2 template.
+ * Like sigc::signal but the additional template parameter @e T_accumulator
+ * defines the accumulator type that should be used.
+ */
+ template <class T_accumulator>
+ class accumulated
+ : public signal2<T_return, T_arg1,T_arg2, T_accumulator>
+ {
+ public:
+ accumulated() {}
+ accumulated(const accumulated& src)
+ : signal2<T_return, T_arg1,T_arg2, T_accumulator>(src) {}
+ };
+
+ signal() {}
+ signal(const signal& src)
+ : signal2<T_return, T_arg1,T_arg2, nil>(src) {}
+};
+
+/** Convenience wrapper for the numbered sigc::signal3 template.
+ * See the base class for useful methods.
+ * This is the template specialization of the unnumbered sigc::signal
+ * template for 3 argument(s).
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3>
+class signal <T_return, T_arg1,T_arg2,T_arg3>
+ : public signal3<T_return, T_arg1,T_arg2,T_arg3, nil>
+{
+public:
+
+ /** Convenience wrapper for the numbered sigc::signal3 template.
+ * Like sigc::signal but the additional template parameter @e T_accumulator
+ * defines the accumulator type that should be used.
+ */
+ template <class T_accumulator>
+ class accumulated
+ : public signal3<T_return, T_arg1,T_arg2,T_arg3, T_accumulator>
+ {
+ public:
+ accumulated() {}
+ accumulated(const accumulated& src)
+ : signal3<T_return, T_arg1,T_arg2,T_arg3, T_accumulator>(src) {}
+ };
+
+ signal() {}
+ signal(const signal& src)
+ : signal3<T_return, T_arg1,T_arg2,T_arg3, nil>(src) {}
+};
+
+/** Convenience wrapper for the numbered sigc::signal4 template.
+ * See the base class for useful methods.
+ * This is the template specialization of the unnumbered sigc::signal
+ * template for 4 argument(s).
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+class signal <T_return, T_arg1,T_arg2,T_arg3,T_arg4>
+ : public signal4<T_return, T_arg1,T_arg2,T_arg3,T_arg4, nil>
+{
+public:
+
+ /** Convenience wrapper for the numbered sigc::signal4 template.
+ * Like sigc::signal but the additional template parameter @e T_accumulator
+ * defines the accumulator type that should be used.
+ */
+ template <class T_accumulator>
+ class accumulated
+ : public signal4<T_return, T_arg1,T_arg2,T_arg3,T_arg4, T_accumulator>
+ {
+ public:
+ accumulated() {}
+ accumulated(const accumulated& src)
+ : signal4<T_return, T_arg1,T_arg2,T_arg3,T_arg4, T_accumulator>(src) {}
+ };
+
+ signal() {}
+ signal(const signal& src)
+ : signal4<T_return, T_arg1,T_arg2,T_arg3,T_arg4, nil>(src) {}
+};
+
+/** Convenience wrapper for the numbered sigc::signal5 template.
+ * See the base class for useful methods.
+ * This is the template specialization of the unnumbered sigc::signal
+ * template for 5 argument(s).
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+class signal <T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>
+ : public signal5<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5, nil>
+{
+public:
+
+ /** Convenience wrapper for the numbered sigc::signal5 template.
+ * Like sigc::signal but the additional template parameter @e T_accumulator
+ * defines the accumulator type that should be used.
+ */
+ template <class T_accumulator>
+ class accumulated
+ : public signal5<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5, T_accumulator>
+ {
+ public:
+ accumulated() {}
+ accumulated(const accumulated& src)
+ : signal5<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5, T_accumulator>(src) {}
+ };
+
+ signal() {}
+ signal(const signal& src)
+ : signal5<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5, nil>(src) {}
+};
+
+/** Convenience wrapper for the numbered sigc::signal6 template.
+ * See the base class for useful methods.
+ * This is the template specialization of the unnumbered sigc::signal
+ * template for 6 argument(s).
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+class signal <T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>
+ : public signal6<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6, nil>
+{
+public:
+
+ /** Convenience wrapper for the numbered sigc::signal6 template.
+ * Like sigc::signal but the additional template parameter @e T_accumulator
+ * defines the accumulator type that should be used.
+ */
+ template <class T_accumulator>
+ class accumulated
+ : public signal6<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6, T_accumulator>
+ {
+ public:
+ accumulated() {}
+ accumulated(const accumulated& src)
+ : signal6<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6, T_accumulator>(src) {}
+ };
+
+ signal() {}
+ signal(const signal& src)
+ : signal6<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6, nil>(src) {}
+};
+
+
+
+} /* namespace sigc */
+
+
+#ifndef LIBSIGC_DISABLE_DEPRECATED
+
+namespace SigC {
+
+// SignalN
+/** Signal declaration.
+ * Signal0 can be used to connect() slots that are invoked
+ * during subsequent calls to emit(). Any functor or slot
+ * can be passed into connect(). It is converted into a slot
+ * implicitely.
+ *
+ * If you want to connect one signal to another, use slot()
+ * to retrieve a functor that emits the signal when invoked.
+ *
+ * Be careful if you directly pass one signal into the connect()
+ * method of another: a shallow copy of the signal is made and
+ * the signal's slots are not disconnected until both the signal
+ * and its clone are destroyed which is probably not what you want!
+ *
+ * An STL-style list interface for the signal's list of slots
+ * can be retrieved with slots(). This interface supports
+ * iteration, insertion and removal of slots.
+ *
+ * The following template arguments are used:
+ * - @e T_return The desired return type for the emit() function (may be overridden by the accumulator).
+ * - @e T_accumulator The accumulator type used for emission. The default @p nil means that no accumulator should be used. Signal emission returns the return value of the last slot invoked.
+ *
+ * @deprecated Use the unnumbered template sigc::signal instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_accumulator=::sigc::nil>
+class Signal0
+ : public ::sigc::signal0<T_return, T_accumulator>
+{
+public:
+ typedef ::sigc::signal0<T_return, T_accumulator> parent_type;
+ typedef typename parent_type::result_type result_type;
+ typedef typename parent_type::slot_type slot_type;
+
+ Signal0() {}
+ Signal0(const Signal0& src)
+ : ::sigc::signal0<T_return, T_accumulator>(src) {}
+
+ /** Creates a functor that calls emit() on this signal.
+ * @code
+ * sigc::mem_fun(mysignal, &sigc::signal0::emit)
+ * @endcode
+ * yields the same result.
+ * @return A functor that calls emit() on this signal.
+ */
+ slot_type slot() const
+ { return ::sigc::bound_const_mem_functor0<result_type, parent_type>(this, &parent_type::emit); }
+};
+
+/** Signal declaration.
+ * Signal1 can be used to connect() slots that are invoked
+ * during subsequent calls to emit(). Any functor or slot
+ * can be passed into connect(). It is converted into a slot
+ * implicitely.
+ *
+ * If you want to connect one signal to another, use slot()
+ * to retrieve a functor that emits the signal when invoked.
+ *
+ * Be careful if you directly pass one signal into the connect()
+ * method of another: a shallow copy of the signal is made and
+ * the signal's slots are not disconnected until both the signal
+ * and its clone are destroyed which is probably not what you want!
+ *
+ * An STL-style list interface for the signal's list of slots
+ * can be retrieved with slots(). This interface supports
+ * iteration, insertion and removal of slots.
+ *
+ * The following template arguments are used:
+ * - @e T_return The desired return type for the emit() function (may be overridden by the accumulator).
+ * - @e T_arg1 Argument type used in the definition of emit().
+ * - @e T_accumulator The accumulator type used for emission. The default @p nil means that no accumulator should be used. Signal emission returns the return value of the last slot invoked.
+ *
+ * @deprecated Use the unnumbered template sigc::signal instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1, class T_accumulator=::sigc::nil>
+class Signal1
+ : public ::sigc::signal1<T_return, T_arg1, T_accumulator>
+{
+public:
+ typedef ::sigc::signal1<T_return, T_arg1, T_accumulator> parent_type;
+ typedef typename parent_type::result_type result_type;
+ typedef typename parent_type::slot_type slot_type;
+
+ Signal1() {}
+ Signal1(const Signal1& src)
+ : ::sigc::signal1<T_return, T_arg1, T_accumulator>(src) {}
+
+ /** Creates a functor that calls emit() on this signal.
+ * @code
+ * sigc::mem_fun(mysignal, &sigc::signal1::emit)
+ * @endcode
+ * yields the same result.
+ * @return A functor that calls emit() on this signal.
+ */
+ slot_type slot() const
+ { return ::sigc::bound_const_mem_functor1<result_type, parent_type, typename ::sigc::type_trait<T_arg1>::take>(this, &parent_type::emit); }
+};
+
+/** Signal declaration.
+ * Signal2 can be used to connect() slots that are invoked
+ * during subsequent calls to emit(). Any functor or slot
+ * can be passed into connect(). It is converted into a slot
+ * implicitely.
+ *
+ * If you want to connect one signal to another, use slot()
+ * to retrieve a functor that emits the signal when invoked.
+ *
+ * Be careful if you directly pass one signal into the connect()
+ * method of another: a shallow copy of the signal is made and
+ * the signal's slots are not disconnected until both the signal
+ * and its clone are destroyed which is probably not what you want!
+ *
+ * An STL-style list interface for the signal's list of slots
+ * can be retrieved with slots(). This interface supports
+ * iteration, insertion and removal of slots.
+ *
+ * The following template arguments are used:
+ * - @e T_return The desired return type for the emit() function (may be overridden by the accumulator).
+ * - @e T_arg1 Argument type used in the definition of emit().
+ * - @e T_arg2 Argument type used in the definition of emit().
+ * - @e T_accumulator The accumulator type used for emission. The default @p nil means that no accumulator should be used. Signal emission returns the return value of the last slot invoked.
+ *
+ * @deprecated Use the unnumbered template sigc::signal instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2, class T_accumulator=::sigc::nil>
+class Signal2
+ : public ::sigc::signal2<T_return, T_arg1,T_arg2, T_accumulator>
+{
+public:
+ typedef ::sigc::signal2<T_return, T_arg1,T_arg2, T_accumulator> parent_type;
+ typedef typename parent_type::result_type result_type;
+ typedef typename parent_type::slot_type slot_type;
+
+ Signal2() {}
+ Signal2(const Signal2& src)
+ : ::sigc::signal2<T_return, T_arg1,T_arg2, T_accumulator>(src) {}
+
+ /** Creates a functor that calls emit() on this signal.
+ * @code
+ * sigc::mem_fun(mysignal, &sigc::signal2::emit)
+ * @endcode
+ * yields the same result.
+ * @return A functor that calls emit() on this signal.
+ */
+ slot_type slot() const
+ { return ::sigc::bound_const_mem_functor2<result_type, parent_type, typename ::sigc::type_trait<T_arg1>::take,typename ::sigc::type_trait<T_arg2>::take>(this, &parent_type::emit); }
+};
+
+/** Signal declaration.
+ * Signal3 can be used to connect() slots that are invoked
+ * during subsequent calls to emit(). Any functor or slot
+ * can be passed into connect(). It is converted into a slot
+ * implicitely.
+ *
+ * If you want to connect one signal to another, use slot()
+ * to retrieve a functor that emits the signal when invoked.
+ *
+ * Be careful if you directly pass one signal into the connect()
+ * method of another: a shallow copy of the signal is made and
+ * the signal's slots are not disconnected until both the signal
+ * and its clone are destroyed which is probably not what you want!
+ *
+ * An STL-style list interface for the signal's list of slots
+ * can be retrieved with slots(). This interface supports
+ * iteration, insertion and removal of slots.
+ *
+ * The following template arguments are used:
+ * - @e T_return The desired return type for the emit() function (may be overridden by the accumulator).
+ * - @e T_arg1 Argument type used in the definition of emit().
+ * - @e T_arg2 Argument type used in the definition of emit().
+ * - @e T_arg3 Argument type used in the definition of emit().
+ * - @e T_accumulator The accumulator type used for emission. The default @p nil means that no accumulator should be used. Signal emission returns the return value of the last slot invoked.
+ *
+ * @deprecated Use the unnumbered template sigc::signal instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3, class T_accumulator=::sigc::nil>
+class Signal3
+ : public ::sigc::signal3<T_return, T_arg1,T_arg2,T_arg3, T_accumulator>
+{
+public:
+ typedef ::sigc::signal3<T_return, T_arg1,T_arg2,T_arg3, T_accumulator> parent_type;
+ typedef typename parent_type::result_type result_type;
+ typedef typename parent_type::slot_type slot_type;
+
+ Signal3() {}
+ Signal3(const Signal3& src)
+ : ::sigc::signal3<T_return, T_arg1,T_arg2,T_arg3, T_accumulator>(src) {}
+
+ /** Creates a functor that calls emit() on this signal.
+ * @code
+ * sigc::mem_fun(mysignal, &sigc::signal3::emit)
+ * @endcode
+ * yields the same result.
+ * @return A functor that calls emit() on this signal.
+ */
+ slot_type slot() const
+ { return ::sigc::bound_const_mem_functor3<result_type, parent_type, typename ::sigc::type_trait<T_arg1>::take,typename ::sigc::type_trait<T_arg2>::take,typename ::sigc::type_trait<T_arg3>::take>(this, &parent_type::emit); }
+};
+
+/** Signal declaration.
+ * Signal4 can be used to connect() slots that are invoked
+ * during subsequent calls to emit(). Any functor or slot
+ * can be passed into connect(). It is converted into a slot
+ * implicitely.
+ *
+ * If you want to connect one signal to another, use slot()
+ * to retrieve a functor that emits the signal when invoked.
+ *
+ * Be careful if you directly pass one signal into the connect()
+ * method of another: a shallow copy of the signal is made and
+ * the signal's slots are not disconnected until both the signal
+ * and its clone are destroyed which is probably not what you want!
+ *
+ * An STL-style list interface for the signal's list of slots
+ * can be retrieved with slots(). This interface supports
+ * iteration, insertion and removal of slots.
+ *
+ * The following template arguments are used:
+ * - @e T_return The desired return type for the emit() function (may be overridden by the accumulator).
+ * - @e T_arg1 Argument type used in the definition of emit().
+ * - @e T_arg2 Argument type used in the definition of emit().
+ * - @e T_arg3 Argument type used in the definition of emit().
+ * - @e T_arg4 Argument type used in the definition of emit().
+ * - @e T_accumulator The accumulator type used for emission. The default @p nil means that no accumulator should be used. Signal emission returns the return value of the last slot invoked.
+ *
+ * @deprecated Use the unnumbered template sigc::signal instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4, class T_accumulator=::sigc::nil>
+class Signal4
+ : public ::sigc::signal4<T_return, T_arg1,T_arg2,T_arg3,T_arg4, T_accumulator>
+{
+public:
+ typedef ::sigc::signal4<T_return, T_arg1,T_arg2,T_arg3,T_arg4, T_accumulator> parent_type;
+ typedef typename parent_type::result_type result_type;
+ typedef typename parent_type::slot_type slot_type;
+
+ Signal4() {}
+ Signal4(const Signal4& src)
+ : ::sigc::signal4<T_return, T_arg1,T_arg2,T_arg3,T_arg4, T_accumulator>(src) {}
+
+ /** Creates a functor that calls emit() on this signal.
+ * @code
+ * sigc::mem_fun(mysignal, &sigc::signal4::emit)
+ * @endcode
+ * yields the same result.
+ * @return A functor that calls emit() on this signal.
+ */
+ slot_type slot() const
+ { return ::sigc::bound_const_mem_functor4<result_type, parent_type, typename ::sigc::type_trait<T_arg1>::take,typename ::sigc::type_trait<T_arg2>::take,typename ::sigc::type_trait<T_arg3>::take,typename ::sigc::type_trait<T_arg4>::take>(this, &parent_type::emit); }
+};
+
+/** Signal declaration.
+ * Signal5 can be used to connect() slots that are invoked
+ * during subsequent calls to emit(). Any functor or slot
+ * can be passed into connect(). It is converted into a slot
+ * implicitely.
+ *
+ * If you want to connect one signal to another, use slot()
+ * to retrieve a functor that emits the signal when invoked.
+ *
+ * Be careful if you directly pass one signal into the connect()
+ * method of another: a shallow copy of the signal is made and
+ * the signal's slots are not disconnected until both the signal
+ * and its clone are destroyed which is probably not what you want!
+ *
+ * An STL-style list interface for the signal's list of slots
+ * can be retrieved with slots(). This interface supports
+ * iteration, insertion and removal of slots.
+ *
+ * The following template arguments are used:
+ * - @e T_return The desired return type for the emit() function (may be overridden by the accumulator).
+ * - @e T_arg1 Argument type used in the definition of emit().
+ * - @e T_arg2 Argument type used in the definition of emit().
+ * - @e T_arg3 Argument type used in the definition of emit().
+ * - @e T_arg4 Argument type used in the definition of emit().
+ * - @e T_arg5 Argument type used in the definition of emit().
+ * - @e T_accumulator The accumulator type used for emission. The default @p nil means that no accumulator should be used. Signal emission returns the return value of the last slot invoked.
+ *
+ * @deprecated Use the unnumbered template sigc::signal instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5, class T_accumulator=::sigc::nil>
+class Signal5
+ : public ::sigc::signal5<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5, T_accumulator>
+{
+public:
+ typedef ::sigc::signal5<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5, T_accumulator> parent_type;
+ typedef typename parent_type::result_type result_type;
+ typedef typename parent_type::slot_type slot_type;
+
+ Signal5() {}
+ Signal5(const Signal5& src)
+ : ::sigc::signal5<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5, T_accumulator>(src) {}
+
+ /** Creates a functor that calls emit() on this signal.
+ * @code
+ * sigc::mem_fun(mysignal, &sigc::signal5::emit)
+ * @endcode
+ * yields the same result.
+ * @return A functor that calls emit() on this signal.
+ */
+ slot_type slot() const
+ { return ::sigc::bound_const_mem_functor5<result_type, parent_type, typename ::sigc::type_trait<T_arg1>::take,typename ::sigc::type_trait<T_arg2>::take,typename ::sigc::type_trait<T_arg3>::take,typename ::sigc::type_trait<T_arg4>::take,typename ::sigc::type_trait<T_arg5>::take>(this, &parent_type::emit); }
+};
+
+/** Signal declaration.
+ * Signal6 can be used to connect() slots that are invoked
+ * during subsequent calls to emit(). Any functor or slot
+ * can be passed into connect(). It is converted into a slot
+ * implicitely.
+ *
+ * If you want to connect one signal to another, use slot()
+ * to retrieve a functor that emits the signal when invoked.
+ *
+ * Be careful if you directly pass one signal into the connect()
+ * method of another: a shallow copy of the signal is made and
+ * the signal's slots are not disconnected until both the signal
+ * and its clone are destroyed which is probably not what you want!
+ *
+ * An STL-style list interface for the signal's list of slots
+ * can be retrieved with slots(). This interface supports
+ * iteration, insertion and removal of slots.
+ *
+ * The following template arguments are used:
+ * - @e T_return The desired return type for the emit() function (may be overridden by the accumulator).
+ * - @e T_arg1 Argument type used in the definition of emit().
+ * - @e T_arg2 Argument type used in the definition of emit().
+ * - @e T_arg3 Argument type used in the definition of emit().
+ * - @e T_arg4 Argument type used in the definition of emit().
+ * - @e T_arg5 Argument type used in the definition of emit().
+ * - @e T_arg6 Argument type used in the definition of emit().
+ * - @e T_accumulator The accumulator type used for emission. The default @p nil means that no accumulator should be used. Signal emission returns the return value of the last slot invoked.
+ *
+ * @deprecated Use the unnumbered template sigc::signal instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6, class T_accumulator=::sigc::nil>
+class Signal6
+ : public ::sigc::signal6<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6, T_accumulator>
+{
+public:
+ typedef ::sigc::signal6<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6, T_accumulator> parent_type;
+ typedef typename parent_type::result_type result_type;
+ typedef typename parent_type::slot_type slot_type;
+
+ Signal6() {}
+ Signal6(const Signal6& src)
+ : ::sigc::signal6<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6, T_accumulator>(src) {}
+
+ /** Creates a functor that calls emit() on this signal.
+ * @code
+ * sigc::mem_fun(mysignal, &sigc::signal6::emit)
+ * @endcode
+ * yields the same result.
+ * @return A functor that calls emit() on this signal.
+ */
+ slot_type slot() const
+ { return ::sigc::bound_const_mem_functor6<result_type, parent_type, typename ::sigc::type_trait<T_arg1>::take,typename ::sigc::type_trait<T_arg2>::take,typename ::sigc::type_trait<T_arg3>::take,typename ::sigc::type_trait<T_arg4>::take,typename ::sigc::type_trait<T_arg5>::take,typename ::sigc::type_trait<T_arg6>::take>(this, &parent_type::emit); }
+};
+
+/** Signal declaration.
+ * Signal7 can be used to connect() slots that are invoked
+ * during subsequent calls to emit(). Any functor or slot
+ * can be passed into connect(). It is converted into a slot
+ * implicitely.
+ *
+ * If you want to connect one signal to another, use slot()
+ * to retrieve a functor that emits the signal when invoked.
+ *
+ * Be careful if you directly pass one signal into the connect()
+ * method of another: a shallow copy of the signal is made and
+ * the signal's slots are not disconnected until both the signal
+ * and its clone are destroyed which is probably not what you want!
+ *
+ * An STL-style list interface for the signal's list of slots
+ * can be retrieved with slots(). This interface supports
+ * iteration, insertion and removal of slots.
+ *
+ * The following template arguments are used:
+ * - @e T_return The desired return type for the emit() function (may be overridden by the accumulator).
+ * - @e T_arg1 Argument type used in the definition of emit().
+ * - @e T_arg2 Argument type used in the definition of emit().
+ * - @e T_arg3 Argument type used in the definition of emit().
+ * - @e T_arg4 Argument type used in the definition of emit().
+ * - @e T_arg5 Argument type used in the definition of emit().
+ * - @e T_arg6 Argument type used in the definition of emit().
+ * - @e T_arg7 Argument type used in the definition of emit().
+ * - @e T_accumulator The accumulator type used for emission. The default @p nil means that no accumulator should be used. Signal emission returns the return value of the last slot invoked.
+ *
+ * @deprecated Use the unnumbered template sigc::signal instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7, class T_accumulator=::sigc::nil>
+class Signal7
+ : public ::sigc::signal7<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7, T_accumulator>
+{
+public:
+ typedef ::sigc::signal7<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7, T_accumulator> parent_type;
+ typedef typename parent_type::result_type result_type;
+ typedef typename parent_type::slot_type slot_type;
+
+ Signal7() {}
+ Signal7(const Signal7& src)
+ : ::sigc::signal7<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7, T_accumulator>(src) {}
+
+ /** Creates a functor that calls emit() on this signal.
+ * @code
+ * sigc::mem_fun(mysignal, &sigc::signal7::emit)
+ * @endcode
+ * yields the same result.
+ * @return A functor that calls emit() on this signal.
+ */
+ slot_type slot() const
+ { return ::sigc::bound_const_mem_functor7<result_type, parent_type, typename ::sigc::type_trait<T_arg1>::take,typename ::sigc::type_trait<T_arg2>::take,typename ::sigc::type_trait<T_arg3>::take,typename ::sigc::type_trait<T_arg4>::take,typename ::sigc::type_trait<T_arg5>::take,typename ::sigc::type_trait<T_arg6>::take,typename ::sigc::type_trait<T_arg7>::take>(this, &parent_type::emit); }
+};
+
+
+}
+
+#endif /* LIBSIGC_DISABLE_DEPRECATED */
+
+#endif /* _SIGC_SIGNAL_H_ */
diff --git a/libs/sigc++2/sigc++/signal_base.cc b/libs/sigc++2/sigc++/signal_base.cc
new file mode 100644
index 0000000000..568cf061c8
--- /dev/null
+++ b/libs/sigc++2/sigc++/signal_base.cc
@@ -0,0 +1,151 @@
+// -*- c++ -*-
+/*
+ * Copyright 2003, The libsigc++ Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+#include <sigc++/signal_base.h>
+
+namespace sigc {
+namespace internal {
+
+signal_impl::signal_impl()
+: ref_count_(0), exec_count_(0), deferred_(0)
+{}
+
+// only MSVC needs this to guarantee that all new/delete are executed from the DLL module
+#ifdef SIGC_NEW_DELETE_IN_LIBRARY_ONLY
+void* signal_impl::operator new(size_t size_)
+{
+ return malloc(size_);
+}
+
+void signal_impl::operator delete(void* p)
+{
+ free(p);
+}
+#endif
+
+void signal_impl::clear()
+{
+ slots_.clear();
+}
+
+signal_impl::size_type signal_impl::size() const
+{
+ return slots_.size();
+}
+
+signal_impl::iterator_type signal_impl::connect(const slot_base& slot_)
+{
+ return insert(slots_.end(), slot_);
+}
+
+signal_impl::iterator_type signal_impl::erase(iterator_type i)
+{
+ return slots_.erase(i);
+}
+
+signal_impl::iterator_type signal_impl::insert(signal_impl::iterator_type i, const slot_base& slot_)
+{
+ iterator_type temp = slots_.insert(i, slot_);
+ temp->set_parent(this, &notify);
+ return temp;
+}
+
+void signal_impl::sweep()
+{
+ iterator_type i = slots_.begin();
+ while (i != slots_.end())
+ if ((*i).empty())
+ i = slots_.erase(i);
+ else
+ ++i;
+}
+
+void* signal_impl::notify(void* d)
+{
+ signal_impl* self = (signal_impl*)d;
+ if (self->exec_count_ == 0)
+ self->sweep();
+ else // This is occuring during signal emission.
+ self->deferred_ = true; // => sweep() will be called from ~signal_exec().
+ return 0; // This is safer because we don't have to care about our iterators in emit().
+}
+
+} /* namespace internal */
+
+signal_base::signal_base()
+: impl_(0)
+{}
+
+signal_base::signal_base(const signal_base& src)
+: trackable(),
+ impl_(src.impl())
+{
+ impl_->reference();
+}
+
+signal_base::~signal_base()
+{
+ if (impl_)
+ impl_->unreference();
+}
+
+void signal_base::clear()
+{
+ if (impl_)
+ impl_->clear();
+}
+
+signal_base::size_type signal_base::size() const
+{
+ return (impl_ ? impl_->size() : 0);
+}
+
+signal_base::iterator_type signal_base::connect(const slot_base& slot_)
+{
+ return impl()->connect(slot_);
+}
+
+signal_base::iterator_type signal_base::insert(iterator_type i, const slot_base& slot_)
+{
+ return impl()->insert(i, slot_);
+}
+
+signal_base::iterator_type signal_base::erase(iterator_type i)
+{
+ return impl()->erase(i);
+}
+
+signal_base& signal_base::operator = (const signal_base& src)
+{
+ if (impl_) impl_->unreference();
+ impl_ = src.impl();
+ impl_->reference();
+ return *this;
+}
+
+internal::signal_impl* signal_base::impl() const
+{
+ if (!impl_) {
+ impl_ = new internal::signal_impl;
+ impl_->reference(); // start with a reference count of 1
+ }
+ return impl_;
+}
+
+} /* sigc */
diff --git a/libs/sigc++2/sigc++/signal_base.h b/libs/sigc++2/sigc++/signal_base.h
new file mode 100644
index 0000000000..3af33d3e99
--- /dev/null
+++ b/libs/sigc++2/sigc++/signal_base.h
@@ -0,0 +1,261 @@
+// -*- c++ -*-
+/*
+ * Copyright 2002, The libsigc++ Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+
+#ifndef _SIGC_SIGNAL_BASE_H_
+#define _SIGC_SIGNAL_BASE_H_
+
+#include <list>
+#include <sigc++config.h>
+#include <sigc++/type_traits.h>
+#include <sigc++/trackable.h>
+#include <sigc++/functors/slot.h>
+#include <sigc++/functors/mem_fun.h>
+
+namespace sigc
+{
+
+namespace internal
+{
+
+/** Implementation of the signal interface.
+ * signal_impl manages a list of slots. When a slot becomes
+ * invalid (because some referred object dies), notify() is executed.
+ * notify() either calls sweep() directly or defers the execution of
+ * sweep() when the signal is being emitted. sweep() removes all
+ * invalid slot from the list.
+ */
+struct SIGC_API signal_impl
+{
+ typedef size_t size_type;
+ typedef std::list<slot_base>::iterator iterator_type;
+ typedef std::list<slot_base>::const_iterator const_iterator_type;
+
+ signal_impl();
+
+ // only MSVC needs this to guarantee that all new/delete are executed from the DLL module
+#ifdef SIGC_NEW_DELETE_IN_LIBRARY_ONLY
+ void* operator new(size_t size_);
+ void operator delete(void* p);
+#endif
+
+ /// Increments the reference counter.
+ inline void reference()
+ { ++ref_count_; }
+
+ /// Increments the reference and execution counter.
+ inline void reference_exec()
+ { ++ref_count_; ++exec_count_; }
+
+ /** Decrements the reference counter.
+ * The object is deleted when the reference counter reaches zero.
+ */
+ inline void unreference()
+ { if (!(--ref_count_)) delete this; }
+
+ /** Decrements the reference and execution counter.
+ * Invokes sweep() if the execution counter reaches zero and the
+ * removal of one or more slots has been deferred.
+ */
+ inline void unreference_exec()
+ {
+ if (!(--ref_count_)) delete this;
+ else if (!(--exec_count_) && deferred_) sweep();
+ }
+
+ /** Returns whether the list of slots is empty.
+ * @return @p true if the list of slots is empty.
+ */
+ inline bool empty() const
+ { return slots_.empty(); }
+
+ /// Empties the list of slots.
+ void clear();
+
+ /** Returns the number of slots in the list.
+ * @return The number of slots in the list.
+ */
+ size_type size() const;
+
+ /** Adds a slot at the bottom of the list of slots.
+ * @param slot_ The slot to add to the list of slots.
+ * @return An iterator pointing to the new slot in the list.
+ */
+ iterator_type connect(const slot_base& slot_);
+
+ /** Adds a slot at the given position into the list of slots.
+ * @param i An iterator indicating the position where @p slot_ should be inserted.
+ * @param slot_ The slot to add to the list of slots.
+ * @return An iterator pointing to the new slot in the list.
+ */
+ iterator_type insert(iterator_type i, const slot_base& slot_);
+
+ /** Removes the slot at the given position from the list of slots.
+ * @param i An iterator pointing to the slot to be removed.
+ * @return An iterator pointing to the slot in the list after the one removed.
+ */
+ iterator_type erase(iterator_type i);
+
+ /// Removes invalid slots from the list of slots.
+ void sweep();
+
+ /** Callback that is executed when some slot becomes invalid.
+ * This callback is registered in every slot when inserted into
+ * the list of slots. It is executed when a slot becomes invalid
+ * because of some referred object being destroyed.
+ * It either calls sweep() directly or defers the execution of
+ * sweep() when the signal is being emitted.
+ * @param d The signal object (@p this).
+ */
+ static void* notify(void* d);
+
+ /** Reference counter.
+ * The object is destroyed when @em ref_count_ reaches zero.
+ */
+ short ref_count_;
+
+ /** Execution counter.
+ * Indicates whether the signal is being emitted.
+ */
+ short exec_count_;
+
+ /// Indicates whether the execution of sweep() is being deferred.
+ bool deferred_;
+
+ /// The list of slots.
+ std::list<slot_base> slots_;
+};
+
+/// Exception safe sweeper for cleaning up invalid slots on the slot list.
+struct SIGC_API signal_exec
+{
+ /// The parent sigc::signal_impl object.
+ signal_impl* sig_;
+
+ /** Increments the reference and execution counter of the parent sigc::signal_impl object.
+ * @param sig The parent sigc::signal_impl object.
+ */
+ inline signal_exec(const signal_impl* sig)
+ : sig_(const_cast<signal_impl*>(sig) )
+ { sig_->reference_exec(); }
+
+ /// Decrements the reference and execution counter of the parent sigc::signal_impl object.
+ inline ~signal_exec()
+ { sig_->unreference_exec(); }
+};
+
+} /* namespace internal */
+
+
+/** @defgroup signal Signals
+ * Use sigc::signal::connect() with sigc::mem_fun() and sigc::ptr_fun() to connect a method or function with a signal.
+ *
+ * @code
+ * signal_clicked.connect( sigc::mem_fun(*this, &MyWindow::on_clicked) );
+ * @endcode
+ *
+ * When the signal is emitted your method will be called.
+ *
+ * signal::connect() returns a connection, which you can later use to disconnect your method.
+ * If the type of your object inherits from sigc::trackable the method is disconnected
+ * automatically when your object is destroyed.
+ *
+ * When signals are copied they share the underlying information,
+ * so you can have a protected/private sigc::signal member and a public accessor method.
+ *
+ * signal and slot objects provide the core functionality of this
+ * library. A slot is a container for an arbitrary functor.
+ * A signal is a list of slots that are executed on emission.
+ * For compile time type safety a list of template arguments
+ * must be provided for the signal template that determines the
+ * parameter list for emission. Functors and closures are converted
+ * into slots implicitely on connection, triggering compiler errors
+ * if the given functor or closure cannot be invoked with the
+ * parameter list of the signal to connect to.
+ */
+
+/** Base class for the sigc::signal# templates.
+ * signal_base integrates most of the interface of the derived sigc::signal#
+ * templates. The implementation, however, resides in sigc::internal::signal_impl.
+ * A sigc::internal::signal_impl object is dynamically allocated from signal_base
+ * when first connecting a slot to the signal. This ensures that empty signals
+ * don't waste memory.
+ *
+ * @ingroup signal
+ */
+struct SIGC_API signal_base : public trackable
+{
+ typedef size_t size_type;
+
+ signal_base();
+
+ signal_base(const signal_base& src);
+
+ ~signal_base();
+
+ signal_base& operator = (const signal_base& src);
+
+ /** Returns whether the list of slots is empty.
+ * @return @p true if the list of slots is empty.
+ */
+ inline bool empty() const
+ { return (!impl_ || impl_->empty()); }
+
+ /// Empties the list of slots.
+ void clear();
+
+ /** Returns the number of slots in the list.
+ * @return The number of slots in the list.
+ */
+ size_type size() const;
+
+protected:
+ typedef internal::signal_impl::iterator_type iterator_type;
+
+ /** Adds a slot at the bottom of the list of slots.
+ * @param slot_ The slot to add to the list of slots.
+ * @return An iterator pointing to the new slot in the list.
+ */
+ iterator_type connect(const slot_base& slot_);
+
+ /** Adds a slot at the given position into the list of slots.
+ * @param i An iterator indicating the position where @e slot_ should be inserted.
+ * @param slot_ The slot to add to the list of slots.
+ * @return An iterator pointing to the new slot in the list.
+ */
+ iterator_type insert(iterator_type i, const slot_base& slot_);
+
+ /** Removes the slot at the given position from the list of slots.
+ * @param i An iterator pointing to the slot to be removed.
+ * @return An iterator pointing to the slot in the list after the one removed.
+ */
+ iterator_type erase(iterator_type i);
+
+ /** Returns the signal_impl object encapsulating the list of slots.
+ * @return The signal_impl object encapsulating the list of slots.
+ */
+ internal::signal_impl* impl() const;
+
+ /// The signal_impl object encapsulating the slot list.
+ mutable internal::signal_impl* impl_;
+};
+
+} //namespace sigc
+
+#endif /* _SIGC_SIGNAL_BASE_H_ */
diff --git a/libs/sigc++2/sigc++/slot.h b/libs/sigc++2/sigc++/slot.h
new file mode 100644
index 0000000000..f7fbe3cd2e
--- /dev/null
+++ b/libs/sigc++2/sigc++/slot.h
@@ -0,0 +1,614 @@
+// -*- c++ -*-
+/* Do not edit! -- generated file */
+
+
+#ifndef _SIGC_MACROS_SLOTHM4_
+#define _SIGC_MACROS_SLOTHM4_
+
+#include <sigc++/functors/slot.h>
+
+#ifndef LIBSIGC_DISABLE_DEPRECATED
+
+namespace SigC {
+
+// SlotN
+/** Converts an arbitrary functor to a unified type which is opaque.
+ * Slot0 itself is a functor or to be more precise a closure. It contains
+ * a single, arbitrary functor (or closure) that is executed in operator()().
+ *
+ * The template arguments determine the function signature of operator()():
+ * - @e T_return The return type of operator()().
+ *
+ * To use simply assign the slot to the desired functor. If the functor
+ * is not compatible with the parameter list defined with the template
+ * arguments compiler errors are triggered. When called the slot
+ * will invoke the functor with minimal copies.
+ * block() and unblock() can be used to block the functor's invocation
+ * from operator()() temporarily.
+ *
+ * @par Example:
+ * @code
+ * #include <sigc++/slot.h>
+ * void foo(int) {}
+ * SigC::Slot1<void, long> s = SigC::slot(&foo);
+ * s(19);
+ * @endcode
+ *
+ * @deprecated Use the unnumbered template sigc::slot instead.
+ * @ingroup compat
+ */
+template <class T_return>
+class Slot0
+ : public ::sigc::slot<T_return>
+{
+public:
+ typedef ::sigc::slot<T_return> parent_type;
+
+ /// Constructs an empty slot.
+ Slot0() {}
+
+ /** Constructs a slot from an arbitrary functor.
+ * @param _A_func The desired functor the new slot should be assigned to.
+ */
+ template <class T_functor>
+ Slot0(const T_functor& _A_func)
+ : ::sigc::slot<T_return>(_A_func) {}
+
+ /** Constructs a slot, copying an existing one.
+ * @param src The existing slot to copy.
+ */
+ Slot0(const parent_type& src)
+ : parent_type(src) {}
+
+ /** Overrides this slot making a copy from another slot.
+ * @param src The slot from which to make a copy.
+ * @return @p this.
+ */
+ Slot0& operator=(const parent_type& src)
+ { parent_type::operator=(src); return *this; }
+};
+
+/** Converts an arbitrary functor to a unified type which is opaque.
+ * Slot1 itself is a functor or to be more precise a closure. It contains
+ * a single, arbitrary functor (or closure) that is executed in operator()().
+ *
+ * The template arguments determine the function signature of operator()():
+ * - @e T_return The return type of operator()().
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ *
+ * To use simply assign the slot to the desired functor. If the functor
+ * is not compatible with the parameter list defined with the template
+ * arguments compiler errors are triggered. When called the slot
+ * will invoke the functor with minimal copies.
+ * block() and unblock() can be used to block the functor's invocation
+ * from operator()() temporarily.
+ *
+ * @par Example:
+ * @code
+ * #include <sigc++/slot.h>
+ * void foo(int) {}
+ * SigC::Slot1<void, long> s = SigC::slot(&foo);
+ * s(19);
+ * @endcode
+ *
+ * @deprecated Use the unnumbered template sigc::slot instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1>
+class Slot1
+ : public ::sigc::slot<T_return, T_arg1>
+{
+public:
+ typedef ::sigc::slot<T_return, T_arg1> parent_type;
+
+ /// Constructs an empty slot.
+ Slot1() {}
+
+ /** Constructs a slot from an arbitrary functor.
+ * @param _A_func The desired functor the new slot should be assigned to.
+ */
+ template <class T_functor>
+ Slot1(const T_functor& _A_func)
+ : ::sigc::slot<T_return, T_arg1>(_A_func) {}
+
+ /** Constructs a slot, copying an existing one.
+ * @param src The existing slot to copy.
+ */
+ Slot1(const parent_type& src)
+ : parent_type(src) {}
+
+ /** Overrides this slot making a copy from another slot.
+ * @param src The slot from which to make a copy.
+ * @return @p this.
+ */
+ Slot1& operator=(const parent_type& src)
+ { parent_type::operator=(src); return *this; }
+};
+
+/** Converts an arbitrary functor to a unified type which is opaque.
+ * Slot2 itself is a functor or to be more precise a closure. It contains
+ * a single, arbitrary functor (or closure) that is executed in operator()().
+ *
+ * The template arguments determine the function signature of operator()():
+ * - @e T_return The return type of operator()().
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ *
+ * To use simply assign the slot to the desired functor. If the functor
+ * is not compatible with the parameter list defined with the template
+ * arguments compiler errors are triggered. When called the slot
+ * will invoke the functor with minimal copies.
+ * block() and unblock() can be used to block the functor's invocation
+ * from operator()() temporarily.
+ *
+ * @par Example:
+ * @code
+ * #include <sigc++/slot.h>
+ * void foo(int) {}
+ * SigC::Slot1<void, long> s = SigC::slot(&foo);
+ * s(19);
+ * @endcode
+ *
+ * @deprecated Use the unnumbered template sigc::slot instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2>
+class Slot2
+ : public ::sigc::slot<T_return, T_arg1,T_arg2>
+{
+public:
+ typedef ::sigc::slot<T_return, T_arg1,T_arg2> parent_type;
+
+ /// Constructs an empty slot.
+ Slot2() {}
+
+ /** Constructs a slot from an arbitrary functor.
+ * @param _A_func The desired functor the new slot should be assigned to.
+ */
+ template <class T_functor>
+ Slot2(const T_functor& _A_func)
+ : ::sigc::slot<T_return, T_arg1,T_arg2>(_A_func) {}
+
+ /** Constructs a slot, copying an existing one.
+ * @param src The existing slot to copy.
+ */
+ Slot2(const parent_type& src)
+ : parent_type(src) {}
+
+ /** Overrides this slot making a copy from another slot.
+ * @param src The slot from which to make a copy.
+ * @return @p this.
+ */
+ Slot2& operator=(const parent_type& src)
+ { parent_type::operator=(src); return *this; }
+};
+
+/** Converts an arbitrary functor to a unified type which is opaque.
+ * Slot3 itself is a functor or to be more precise a closure. It contains
+ * a single, arbitrary functor (or closure) that is executed in operator()().
+ *
+ * The template arguments determine the function signature of operator()():
+ * - @e T_return The return type of operator()().
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ * - @e T_arg3 Argument type used in the definition of operator()().
+ *
+ * To use simply assign the slot to the desired functor. If the functor
+ * is not compatible with the parameter list defined with the template
+ * arguments compiler errors are triggered. When called the slot
+ * will invoke the functor with minimal copies.
+ * block() and unblock() can be used to block the functor's invocation
+ * from operator()() temporarily.
+ *
+ * @par Example:
+ * @code
+ * #include <sigc++/slot.h>
+ * void foo(int) {}
+ * SigC::Slot1<void, long> s = SigC::slot(&foo);
+ * s(19);
+ * @endcode
+ *
+ * @deprecated Use the unnumbered template sigc::slot instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3>
+class Slot3
+ : public ::sigc::slot<T_return, T_arg1,T_arg2,T_arg3>
+{
+public:
+ typedef ::sigc::slot<T_return, T_arg1,T_arg2,T_arg3> parent_type;
+
+ /// Constructs an empty slot.
+ Slot3() {}
+
+ /** Constructs a slot from an arbitrary functor.
+ * @param _A_func The desired functor the new slot should be assigned to.
+ */
+ template <class T_functor>
+ Slot3(const T_functor& _A_func)
+ : ::sigc::slot<T_return, T_arg1,T_arg2,T_arg3>(_A_func) {}
+
+ /** Constructs a slot, copying an existing one.
+ * @param src The existing slot to copy.
+ */
+ Slot3(const parent_type& src)
+ : parent_type(src) {}
+
+ /** Overrides this slot making a copy from another slot.
+ * @param src The slot from which to make a copy.
+ * @return @p this.
+ */
+ Slot3& operator=(const parent_type& src)
+ { parent_type::operator=(src); return *this; }
+};
+
+/** Converts an arbitrary functor to a unified type which is opaque.
+ * Slot4 itself is a functor or to be more precise a closure. It contains
+ * a single, arbitrary functor (or closure) that is executed in operator()().
+ *
+ * The template arguments determine the function signature of operator()():
+ * - @e T_return The return type of operator()().
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ * - @e T_arg3 Argument type used in the definition of operator()().
+ * - @e T_arg4 Argument type used in the definition of operator()().
+ *
+ * To use simply assign the slot to the desired functor. If the functor
+ * is not compatible with the parameter list defined with the template
+ * arguments compiler errors are triggered. When called the slot
+ * will invoke the functor with minimal copies.
+ * block() and unblock() can be used to block the functor's invocation
+ * from operator()() temporarily.
+ *
+ * @par Example:
+ * @code
+ * #include <sigc++/slot.h>
+ * void foo(int) {}
+ * SigC::Slot1<void, long> s = SigC::slot(&foo);
+ * s(19);
+ * @endcode
+ *
+ * @deprecated Use the unnumbered template sigc::slot instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+class Slot4
+ : public ::sigc::slot<T_return, T_arg1,T_arg2,T_arg3,T_arg4>
+{
+public:
+ typedef ::sigc::slot<T_return, T_arg1,T_arg2,T_arg3,T_arg4> parent_type;
+
+ /// Constructs an empty slot.
+ Slot4() {}
+
+ /** Constructs a slot from an arbitrary functor.
+ * @param _A_func The desired functor the new slot should be assigned to.
+ */
+ template <class T_functor>
+ Slot4(const T_functor& _A_func)
+ : ::sigc::slot<T_return, T_arg1,T_arg2,T_arg3,T_arg4>(_A_func) {}
+
+ /** Constructs a slot, copying an existing one.
+ * @param src The existing slot to copy.
+ */
+ Slot4(const parent_type& src)
+ : parent_type(src) {}
+
+ /** Overrides this slot making a copy from another slot.
+ * @param src The slot from which to make a copy.
+ * @return @p this.
+ */
+ Slot4& operator=(const parent_type& src)
+ { parent_type::operator=(src); return *this; }
+};
+
+/** Converts an arbitrary functor to a unified type which is opaque.
+ * Slot5 itself is a functor or to be more precise a closure. It contains
+ * a single, arbitrary functor (or closure) that is executed in operator()().
+ *
+ * The template arguments determine the function signature of operator()():
+ * - @e T_return The return type of operator()().
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ * - @e T_arg3 Argument type used in the definition of operator()().
+ * - @e T_arg4 Argument type used in the definition of operator()().
+ * - @e T_arg5 Argument type used in the definition of operator()().
+ *
+ * To use simply assign the slot to the desired functor. If the functor
+ * is not compatible with the parameter list defined with the template
+ * arguments compiler errors are triggered. When called the slot
+ * will invoke the functor with minimal copies.
+ * block() and unblock() can be used to block the functor's invocation
+ * from operator()() temporarily.
+ *
+ * @par Example:
+ * @code
+ * #include <sigc++/slot.h>
+ * void foo(int) {}
+ * SigC::Slot1<void, long> s = SigC::slot(&foo);
+ * s(19);
+ * @endcode
+ *
+ * @deprecated Use the unnumbered template sigc::slot instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+class Slot5
+ : public ::sigc::slot<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>
+{
+public:
+ typedef ::sigc::slot<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5> parent_type;
+
+ /// Constructs an empty slot.
+ Slot5() {}
+
+ /** Constructs a slot from an arbitrary functor.
+ * @param _A_func The desired functor the new slot should be assigned to.
+ */
+ template <class T_functor>
+ Slot5(const T_functor& _A_func)
+ : ::sigc::slot<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>(_A_func) {}
+
+ /** Constructs a slot, copying an existing one.
+ * @param src The existing slot to copy.
+ */
+ Slot5(const parent_type& src)
+ : parent_type(src) {}
+
+ /** Overrides this slot making a copy from another slot.
+ * @param src The slot from which to make a copy.
+ * @return @p this.
+ */
+ Slot5& operator=(const parent_type& src)
+ { parent_type::operator=(src); return *this; }
+};
+
+/** Converts an arbitrary functor to a unified type which is opaque.
+ * Slot6 itself is a functor or to be more precise a closure. It contains
+ * a single, arbitrary functor (or closure) that is executed in operator()().
+ *
+ * The template arguments determine the function signature of operator()():
+ * - @e T_return The return type of operator()().
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ * - @e T_arg3 Argument type used in the definition of operator()().
+ * - @e T_arg4 Argument type used in the definition of operator()().
+ * - @e T_arg5 Argument type used in the definition of operator()().
+ * - @e T_arg6 Argument type used in the definition of operator()().
+ *
+ * To use simply assign the slot to the desired functor. If the functor
+ * is not compatible with the parameter list defined with the template
+ * arguments compiler errors are triggered. When called the slot
+ * will invoke the functor with minimal copies.
+ * block() and unblock() can be used to block the functor's invocation
+ * from operator()() temporarily.
+ *
+ * @par Example:
+ * @code
+ * #include <sigc++/slot.h>
+ * void foo(int) {}
+ * SigC::Slot1<void, long> s = SigC::slot(&foo);
+ * s(19);
+ * @endcode
+ *
+ * @deprecated Use the unnumbered template sigc::slot instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+class Slot6
+ : public ::sigc::slot<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>
+{
+public:
+ typedef ::sigc::slot<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6> parent_type;
+
+ /// Constructs an empty slot.
+ Slot6() {}
+
+ /** Constructs a slot from an arbitrary functor.
+ * @param _A_func The desired functor the new slot should be assigned to.
+ */
+ template <class T_functor>
+ Slot6(const T_functor& _A_func)
+ : ::sigc::slot<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>(_A_func) {}
+
+ /** Constructs a slot, copying an existing one.
+ * @param src The existing slot to copy.
+ */
+ Slot6(const parent_type& src)
+ : parent_type(src) {}
+
+ /** Overrides this slot making a copy from another slot.
+ * @param src The slot from which to make a copy.
+ * @return @p this.
+ */
+ Slot6& operator=(const parent_type& src)
+ { parent_type::operator=(src); return *this; }
+};
+
+/** Converts an arbitrary functor to a unified type which is opaque.
+ * Slot7 itself is a functor or to be more precise a closure. It contains
+ * a single, arbitrary functor (or closure) that is executed in operator()().
+ *
+ * The template arguments determine the function signature of operator()():
+ * - @e T_return The return type of operator()().
+ * - @e T_arg1 Argument type used in the definition of operator()().
+ * - @e T_arg2 Argument type used in the definition of operator()().
+ * - @e T_arg3 Argument type used in the definition of operator()().
+ * - @e T_arg4 Argument type used in the definition of operator()().
+ * - @e T_arg5 Argument type used in the definition of operator()().
+ * - @e T_arg6 Argument type used in the definition of operator()().
+ * - @e T_arg7 Argument type used in the definition of operator()().
+ *
+ * To use simply assign the slot to the desired functor. If the functor
+ * is not compatible with the parameter list defined with the template
+ * arguments compiler errors are triggered. When called the slot
+ * will invoke the functor with minimal copies.
+ * block() and unblock() can be used to block the functor's invocation
+ * from operator()() temporarily.
+ *
+ * @par Example:
+ * @code
+ * #include <sigc++/slot.h>
+ * void foo(int) {}
+ * SigC::Slot1<void, long> s = SigC::slot(&foo);
+ * s(19);
+ * @endcode
+ *
+ * @deprecated Use the unnumbered template sigc::slot instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+class Slot7
+ : public ::sigc::slot<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>
+{
+public:
+ typedef ::sigc::slot<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7> parent_type;
+
+ /// Constructs an empty slot.
+ Slot7() {}
+
+ /** Constructs a slot from an arbitrary functor.
+ * @param _A_func The desired functor the new slot should be assigned to.
+ */
+ template <class T_functor>
+ Slot7(const T_functor& _A_func)
+ : ::sigc::slot<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>(_A_func) {}
+
+ /** Constructs a slot, copying an existing one.
+ * @param src The existing slot to copy.
+ */
+ Slot7(const parent_type& src)
+ : parent_type(src) {}
+
+ /** Overrides this slot making a copy from another slot.
+ * @param src The slot from which to make a copy.
+ * @return @p this.
+ */
+ Slot7& operator=(const parent_type& src)
+ { parent_type::operator=(src); return *this; }
+};
+
+
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+/* gcc 3.2 reports a strange conflict between SigC::slot() and sigc::slot<>
+ * when "using namespace SigC" and later using a slot(obj,func) overload
+ * without the prefix "SigC::". Probably a compiler bug. I will investigate.
+ *
+ * This ugly hack avoids the error:
+ */
+// #define slot(...) make_slot(__VA_ARGS__) /* only works for gcc */
+#endif
+
+
+// slot()
+/** Creates a functor of type SigC::Slot0 that wraps an existing non-member function.
+ *
+ * @param _A_func Pointer to function that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::ptr_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return>
+inline Slot0<T_return>
+slot(T_return (*_A_func)())
+{ return Slot0<T_return>(_A_func); }
+
+/** Creates a functor of type SigC::Slot1 that wraps an existing non-member function.
+ *
+ * @param _A_func Pointer to function that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::ptr_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1>
+inline Slot1<T_return, T_arg1>
+slot(T_return (*_A_func)(T_arg1))
+{ return Slot1<T_return, T_arg1>(_A_func); }
+
+/** Creates a functor of type SigC::Slot2 that wraps an existing non-member function.
+ *
+ * @param _A_func Pointer to function that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::ptr_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2>
+inline Slot2<T_return, T_arg1,T_arg2>
+slot(T_return (*_A_func)(T_arg1,T_arg2))
+{ return Slot2<T_return, T_arg1,T_arg2>(_A_func); }
+
+/** Creates a functor of type SigC::Slot3 that wraps an existing non-member function.
+ *
+ * @param _A_func Pointer to function that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::ptr_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3>
+inline Slot3<T_return, T_arg1,T_arg2,T_arg3>
+slot(T_return (*_A_func)(T_arg1,T_arg2,T_arg3))
+{ return Slot3<T_return, T_arg1,T_arg2,T_arg3>(_A_func); }
+
+/** Creates a functor of type SigC::Slot4 that wraps an existing non-member function.
+ *
+ * @param _A_func Pointer to function that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::ptr_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4>
+inline Slot4<T_return, T_arg1,T_arg2,T_arg3,T_arg4>
+slot(T_return (*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4))
+{ return Slot4<T_return, T_arg1,T_arg2,T_arg3,T_arg4>(_A_func); }
+
+/** Creates a functor of type SigC::Slot5 that wraps an existing non-member function.
+ *
+ * @param _A_func Pointer to function that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::ptr_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5>
+inline Slot5<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>
+slot(T_return (*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5))
+{ return Slot5<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5>(_A_func); }
+
+/** Creates a functor of type SigC::Slot6 that wraps an existing non-member function.
+ *
+ * @param _A_func Pointer to function that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::ptr_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6>
+inline Slot6<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>
+slot(T_return (*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6))
+{ return Slot6<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6>(_A_func); }
+
+/** Creates a functor of type SigC::Slot7 that wraps an existing non-member function.
+ *
+ * @param _A_func Pointer to function that should be wrapped.
+ * @return Functor that executes _A_func on invokation.
+ *
+ * @deprecated Use sigc::ptr_fun() instead.
+ * @ingroup compat
+ */
+template <class T_return, class T_arg1,class T_arg2,class T_arg3,class T_arg4,class T_arg5,class T_arg6,class T_arg7>
+inline Slot7<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>
+slot(T_return (*_A_func)(T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7))
+{ return Slot7<T_return, T_arg1,T_arg2,T_arg3,T_arg4,T_arg5,T_arg6,T_arg7>(_A_func); }
+
+
+
+}
+
+#endif
+#endif /* _SIGC_MACROS_SLOTHM4_ */
diff --git a/libs/sigc++2/sigc++/trackable.cc b/libs/sigc++2/sigc++/trackable.cc
new file mode 100644
index 0000000000..46e2592ffb
--- /dev/null
+++ b/libs/sigc++2/sigc++/trackable.cc
@@ -0,0 +1,124 @@
+// -*- c++ -*-
+/*
+ * Copyright 2002, The libsigc++ Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+
+#include <sigc++/trackable.h>
+#include <iostream>
+using namespace std;
+
+namespace sigc
+{
+
+trackable::trackable()
+: callback_list_(0)
+{}
+
+/* Don't copy the notification list.
+ The objects watching src don't need to be notified when the new object dies. */
+trackable::trackable(const trackable& /*src*/)
+: callback_list_(0)
+{}
+
+trackable& trackable::operator=(const trackable& src)
+{
+ if(this != &src)
+ notify_callbacks(); //Make sure that we have finished with existing stuff before replacing it.
+
+ return *this;
+}
+
+trackable::~trackable()
+{
+ notify_callbacks();
+}
+
+void trackable::add_destroy_notify_callback(void* data, func_destroy_notify func) const
+{
+ callback_list()->add_callback(data, func);
+}
+
+void trackable::remove_destroy_notify_callback(void* data) const
+{
+ callback_list()->remove_callback(data);
+}
+
+void trackable::notify_callbacks()
+{
+ if (callback_list_)
+ delete callback_list_; //This invokes all of the callbacks.
+
+ callback_list_ = 0;
+}
+
+internal::trackable_callback_list* trackable::callback_list() const
+{
+ if (!callback_list_)
+ callback_list_ = new internal::trackable_callback_list;
+
+ return callback_list_;
+}
+
+
+namespace internal
+{
+
+trackable_callback_list::~trackable_callback_list()
+{
+ clearing_ = true;
+
+ for (callback_list::iterator i = callbacks_.begin(); i != callbacks_.end(); ++i)
+ (*i).func_((*i).data_);
+}
+
+void trackable_callback_list::add_callback(void* data, func_destroy_notify func)
+{
+ if (!clearing_) // TODO: Is it okay to silently ignore attempts to add dependencies when the list is being cleared?
+ // I'd consider this a serious application bug, since the app is likely to segfault.
+ // But then, how should we handle it? Throw an exception? Martin.
+ callbacks_.push_back(trackable_callback(data, func));
+}
+
+void trackable_callback_list::clear()
+{
+ clearing_ = true;
+
+ for (callback_list::iterator i = callbacks_.begin(); i != callbacks_.end(); ++i)
+ (*i).func_((*i).data_);
+
+ callbacks_.clear();
+
+ clearing_ = false;
+}
+
+void trackable_callback_list::remove_callback(void* data)
+{
+ if (clearing_) return; // No circular notices
+
+ for (callback_list::iterator i = callbacks_.begin(); i != callbacks_.end(); ++i)
+ if ((*i).data_ == data)
+ {
+ callbacks_.erase(i);
+ return;
+ }
+}
+
+} /* namespace internal */
+
+
+} /* namespace sigc */
diff --git a/libs/sigc++2/sigc++/trackable.h b/libs/sigc++2/sigc++/trackable.h
new file mode 100644
index 0000000000..4563738dd6
--- /dev/null
+++ b/libs/sigc++2/sigc++/trackable.h
@@ -0,0 +1,148 @@
+/*
+ * Copyright 2002, The libsigc++ Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+#ifndef _SIGC_TRACKABLE_HPP_
+#define _SIGC_TRACKABLE_HPP_
+#include <list>
+#include <sigc++config.h>
+
+namespace sigc {
+
+namespace internal {
+
+typedef void* (*func_destroy_notify) (void* data);
+
+/** Destroy notification callback.
+ * A destroy notification callback consists of a data pointer and a
+ * function pointer. The function is executed from the owning callback
+ * list (of type sigc::internal::trackable_callback_list) when its parent
+ * object (of type sigc::trackable) is destroyed or overwritten.
+ */
+struct SIGC_API trackable_callback
+{
+ void* data_;
+ func_destroy_notify func_;
+ trackable_callback(void* data, func_destroy_notify func)
+ : data_(data), func_(func) {}
+};
+
+/** Callback list.
+ * A callback list holds an STL list of callbacks of type
+ * trackable_callback. Callbacks are added and removed with
+ * add_callback(), remove_callback() and clear(). The callbacks
+ * are invoked from clear() and from the destructor.
+ */
+struct SIGC_API trackable_callback_list
+{
+ /** Add a callback function.
+ * @param data Data that will be sent as a parameter to teh callback function.
+ * @param func The callback function.
+ *
+ */
+ void add_callback(void* data, func_destroy_notify func);
+
+ /** Remove the callback which has this data associated with it.
+ * @param data The data that was given as a parameter to add_callback().
+ */
+ void remove_callback(void* data);
+
+ /** This invokes all of the callback functions.
+ */
+ void clear();
+
+ trackable_callback_list()
+ : clearing_(false) {}
+
+ /** This invokes all of the callback functions.
+ */
+ ~trackable_callback_list();
+
+private:
+ typedef std::list<trackable_callback> callback_list;
+ callback_list callbacks_;
+ bool clearing_;
+};
+
+} /* namespace internal */
+
+
+/** Base class for objects with auto-disconnection.
+ * trackable must be inherited when objects shall automatically
+ * invalidate slots referring to them on destruction.
+ * A slot built from a member function of a trackable derived
+ * type installs a callback that is invoked when the trackable object
+ * is destroyed or overwritten.
+ *
+ * add_destroy_notify_callback() and remove_destroy_notify_callback()
+ * can be used to manually install and remove callbacks when
+ * notification of the object dying is needed.
+ *
+ * notify_callbacks() invokes and removes all previously installed
+ * callbacks and can therefore be used to disconnect from all signals.
+ *
+ * Note that there is no virtual destructor. Don't use @p trackable*
+ * as pointer type for managing your data or the destructors of
+ * your derived types won't be called when deleting your objects.
+ *
+ * @ingroup signal
+ */
+struct SIGC_API trackable
+{
+ trackable();
+
+ trackable(const trackable& src);
+
+ trackable& operator=(const trackable& src);
+
+ ~trackable();
+
+ /*virtual ~trackable() {} */ /* we would need a virtual dtor for users
+ who insist on using "trackable*" as
+ pointer type for their own derived objects */
+
+
+ typedef internal::func_destroy_notify func_destroy_notify;
+
+ /** Add a callback that is executed (notified) when the trackable object is detroyed.
+ * @param data Passed into func upon notification.
+ * @param func Callback executed upon destruction of the object.
+ */
+ void add_destroy_notify_callback(void* data, func_destroy_notify func) const;
+
+ /** Remove a callback previously installed with add_destroy_notify_callback().
+ * The callback is not executed.
+ * @param data Parameter passed into previous call to add_destroy_notify_callback().
+ */
+ void remove_destroy_notify_callback(void* data) const;
+
+ /// Execute and remove all previously installed callbacks.
+ void notify_callbacks();
+
+#ifndef DOXYGEN_SHOULD_SKIP_THIS
+private:
+ /* The callbacks are held in a list of type trackable_callback_list.
+ * This list is allocated dynamically when the first callback is added.
+ */
+ internal::trackable_callback_list* callback_list() const;
+ mutable internal::trackable_callback_list* callback_list_;
+#endif
+};
+
+} /* namespace sigc */
+
+#endif /* _SIGC_TRACKABLE_HPP_ */
diff --git a/libs/sigc++2/sigc++/type_traits.h b/libs/sigc++2/sigc++/type_traits.h
new file mode 100644
index 0000000000..c6d6dbbc81
--- /dev/null
+++ b/libs/sigc++2/sigc++/type_traits.h
@@ -0,0 +1,121 @@
+/*
+ * Copyright 2002, The libsigc++ Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+#ifndef _SIGC_TYPE_TRAIT_H_
+#define _SIGC_TYPE_TRAIT_H_
+
+#include <sigc++/reference_wrapper.h>
+
+namespace sigc {
+
+template <class T_type>
+struct type_trait
+{
+ typedef T_type type;
+ typedef T_type& pass;
+ typedef const T_type& take;
+ typedef T_type* pointer;
+};
+
+template <class T_type, int N>
+struct type_trait<T_type[N]>
+{
+ typedef T_type* type;
+ typedef T_type*& pass;
+ typedef const T_type*& take;
+ typedef T_type** pointer;
+};
+
+template <class T_type>
+struct type_trait<T_type&>
+{
+ typedef T_type type;
+ typedef T_type& pass;
+ typedef T_type& take;
+ typedef T_type* pointer;
+};
+
+template <class T_type>
+struct type_trait<const T_type&>
+{
+ typedef const T_type type;
+ typedef const T_type& pass;
+ typedef const T_type& take;
+ typedef const T_type* pointer;
+};
+
+template <class T_type>
+struct type_trait<reference_wrapper<T_type> >
+{
+ typedef T_type type;
+ typedef T_type& pass;
+ typedef T_type& take;
+ typedef T_type* pointer;
+};
+
+template <class T_type>
+struct type_trait<const_reference_wrapper<T_type> >
+{
+ typedef T_type type;
+ typedef T_type& pass;
+ typedef const T_type& take;
+ typedef T_type* pointer;
+};
+
+template<>
+struct type_trait<void>
+{
+ typedef void type;
+ typedef void pass;
+ typedef void take;
+ typedef void* pointer;
+};
+
+
+/** From Esa Pulkkin:
+ * Compile-time determination of base-class relationship in C++
+ * (adapted to match the syntax of boost's type_traits library).
+ */
+template <class T_base, class T_derived>
+struct is_base_and_derived
+{
+private:
+ struct big {
+ char memory[64];
+ };
+
+ struct test {
+ static big is_base_class_(...);
+ static char is_base_class_(typename type_trait<T_base>::pointer);
+ };
+
+public:
+ static const bool value =
+ sizeof(test::is_base_class_((typename type_trait<T_derived>::pointer)0)) ==
+ sizeof(char);
+};
+
+template <class T_base>
+struct is_base_and_derived<T_base, T_base>
+{
+ static const bool value = true;
+};
+
+} /* namespace sigc */
+
+#endif /* _SIGC_TYPE_TRAIT_H_ */
diff --git a/libs/sigc++2/sigc++/visit_each.h b/libs/sigc++2/sigc++/visit_each.h
new file mode 100644
index 0000000000..7b7978531f
--- /dev/null
+++ b/libs/sigc++2/sigc++/visit_each.h
@@ -0,0 +1,128 @@
+// -*- c++ -*-
+/*
+ * Copyright 2002, The libsigc++ Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+#ifndef _SIGC_VISIT_EACH_HPP_
+#define _SIGC_VISIT_EACH_HPP_
+
+#include <sigc++/type_traits.h>
+
+namespace sigc {
+
+namespace internal {
+
+/// Helper struct for visit_each_type().
+template <class T_target, class T_action>
+struct limit_derived_target
+{
+ typedef limit_derived_target<T_target, T_action> T_self;
+
+ template <bool I_derived, class T_type> struct with_type;
+
+ template <class T_type> struct with_type<false,T_type>
+ { static void execute_(const T_type&, const T_self&) {} };
+
+ template <class T_type> struct with_type<true,T_type>
+ { static void execute_(const T_type& _A_type, const T_self& _A_action)
+ { _A_action.action_(_A_type); }
+ };
+
+ template <class T_type>
+ void operator()(const T_type& _A_type) const
+ { with_type<is_base_and_derived<T_target,T_type>::value,T_type>::execute_(_A_type,*this); }
+
+ limit_derived_target(const T_action& _A_action): action_(_A_action) {}
+
+ T_action action_;
+};
+
+/// Helper struct for visit_each_type().
+template <class T_target, class T_action>
+struct limit_derived_target<T_target*, T_action>
+{
+ typedef limit_derived_target<T_target*, T_action> T_self;
+
+ template <bool I_derived, class T_type> struct with_type;
+
+ template <class T_type> struct with_type<false,T_type>
+ { static void execute_(const T_type&, const T_self&) {} };
+
+ template <class T_type> struct with_type<true,T_type>
+ { static void execute_(const T_type& _A_type, const T_self& _A_action)
+ { _A_action.action_(&_A_type); }
+ };
+
+ template <class T_type>
+ void operator()(const T_type& _A_type) const
+ { with_type<is_base_and_derived<T_target,T_type>::value,T_type>::execute_(_A_type,*this); }
+
+ limit_derived_target(const T_action& _A_action): action_(_A_action) {}
+
+ T_action action_;
+};
+
+} /* namespace internal */
+
+
+/** This function performs a functor on each of the targets of a functor.
+ * All unknown types just call @e _A_action on them.
+ * Add overloads that specialize the @e T_functor argument for your own
+ * functor types, so that subobjects get visited. This is needed to enable
+ * auto-disconnection support for your functor types.
+ *
+ * @par Example:
+ * @code
+ * struct some_functor
+ * {
+ * void operator()() {}
+ * some_possibly_sigc_trackable_derived_type some_data_member;
+ * some_other_functor_type some_other_functor;
+ * }
+ *
+ * namespace sigc
+ * {
+ * template <class T_action>
+ * void visit_each(const T_action& _A_action,
+ * const some_functor& _A_target)
+ * {
+ * visit_each(_A_action, _A_target.some_data_member);
+ * visit_each(_A_action, _A_target.some_other_functor);
+ * }
+ * }
+ * @endcode
+ *
+ * @ingroup functors
+ */
+template <class T_action, class T_functor>
+void visit_each(const T_action& _A_action, const T_functor& _A_functor)
+{ _A_action(_A_functor); }
+
+/** This function performs a functor on each of the targets
+ * of a functor limited to a restricted type.
+ *
+ * @ingroup functors
+ */
+template <class T_type, class T_action, class T_functor>
+void visit_each_type(const T_action& _A_action, const T_functor& _A_functor)
+{
+ internal::limit_derived_target<T_type,T_action> limited_action(_A_action);
+ visit_each(limited_action,_A_functor);
+}
+
+} /* namespace sigc */
+#endif
diff --git a/libs/sigc++2/sigc++config.h.in b/libs/sigc++2/sigc++config.h.in
new file mode 100644
index 0000000000..357873fae6
--- /dev/null
+++ b/libs/sigc++2/sigc++config.h.in
@@ -0,0 +1,10 @@
+/* sigc++config.h.in. (Generated manually.) */
+
+/* configure checks */
+#undef SIGC_GCC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+#undef SIGC_MSVC_TEMPLATE_SPECIALIZATION_OPERATOR_OVERLOAD
+
+/* platform specific macros */
+// #define LIBSIGC_DISABLE_DEPRECATED
+// #define SIGC_NEW_DELETE_IN_LIBRARY_ONLY // only defined for MSVC to keep ABI compatibility
+#define SIGC_API
diff --git a/templates/.cvsignore b/templates/.cvsignore
new file mode 100644
index 0000000000..3dda72986f
--- /dev/null
+++ b/templates/.cvsignore
@@ -0,0 +1,2 @@
+Makefile.in
+Makefile
diff --git a/templates/16 Tracks.template b/templates/16 Tracks.template
new file mode 100644
index 0000000000..50d21cdd24
--- /dev/null
+++ b/templates/16 Tracks.template
@@ -0,0 +1,260 @@
+<?xml version="1.0"?>
+<Session version="0.821.0">
+ <Options>
+ <recording-plugins val="no"/>
+ <slave type="none"/>
+ <send-midi-timecode val="no"/>
+ <send-midi-machine-control val="no"/>
+ <input-auto-connect val="1"/>
+ <output-auto-connect val="2"/>
+ <max-level val="0"/>
+ <min-level val="0"/>
+ <meter-hold val="10.000000"/>
+ <long-over-length val="10"/>
+ <short-over-length val="2"/>
+ <shuttle-speed-factor val="1.000000"/>
+ <shuttle-speed-threshold val="5.000000"/>
+ <rf-speed val="2.000000"/>
+ <smpte-frames-per-second val="30.000000"/>
+ <edit-mode val="slide"/>
+ <auto-play val="no"/>
+ <auto-input val="no"/>
+ <seamless-loop val="no"/>
+ <punch-in val="no"/>
+ <punch-out val="no"/>
+ <all-safe val="no"/>
+ <auto-return val="no"/>
+ <mmc-control val="no"/>
+ <recording-plugins val="no"/>
+ <auto-crossfade val="no"/>
+ <audible-click val="no"/>
+ <align-style val="existing"/>
+ </Options>
+ <Sources/>
+ <Regions/>
+ <DiskStreams>
+ <DiskStream channels="2" playlist="Audio 1.1" speed="1.000000" name="Audio 1" id="1088698381595945"/>
+ <DiskStream channels="2" playlist="Audio 2.1" speed="1.000000" name="Audio 2" id="1088698381722129"/>
+ <DiskStream channels="2" playlist="Audio 3.1" speed="1.000000" name="Audio 3" id="1088698419793849"/>
+ <DiskStream channels="2" playlist="Audio 4.1" speed="1.000000" name="Audio 4" id="1088698419943526"/>
+ <DiskStream channels="2" playlist="Audio 5.1" speed="1.000000" name="Audio 5" id="1088698450528071"/>
+ <DiskStream channels="2" playlist="Audio 6.1" speed="1.000000" name="Audio 6" id="1088698450754348"/>
+ <DiskStream channels="2" playlist="Audio 7.1" speed="1.000000" name="Audio 7" id="1088698450937150"/>
+ <DiskStream channels="2" playlist="Audio 8.1" speed="1.000000" name="Audio 8" id="1088698451167172"/>
+ <DiskStream channels="2" playlist="Audio 9.1" speed="1.000000" name="Audio 9" id="1088698483525991"/>
+ <DiskStream channels="2" playlist="Audio 10.1" speed="1.000000" name="Audio 10" id="1088698483801345"/>
+ <DiskStream channels="2" playlist="Audio 11.1" speed="1.000000" name="Audio 11" id="1088698484086727"/>
+ <DiskStream channels="2" playlist="Audio 12.1" speed="1.000000" name="Audio 12" id="1088698484325738"/>
+ <DiskStream channels="2" playlist="Audio 13.1" speed="1.000000" name="Audio 13" id="1088698484576054"/>
+ <DiskStream channels="2" playlist="Audio 14.1" speed="1.000000" name="Audio 14" id="1088698484839332"/>
+ <DiskStream channels="2" playlist="Audio 15.1" speed="1.000000" name="Audio 15" id="1088698485116518"/>
+ <DiskStream channels="2" playlist="Audio 16.1" speed="1.000000" name="Audio 16" id="1088698485412133"/>
+ </DiskStreams>
+ <Locations>
+ <Location name="end" start="14400000" end="14400000" flags="33"/>
+ <Location name="Loop" start="0" end="14400000" flags="12"/>
+ <Location name="Punch" start="0" end="14400000" flags="10"/>
+ </Locations>
+ <Connections/>
+ <Routes>
+ <Route flags="0x2" muted="no" soloed="no" phase-invert="no" mute-affects-pre-fader="yes" mute-affects-post-fader="yes" mute-affects-control-outs="yes" mute-affects-main-outs="yes" order-keys="editor=0:signal=0">
+ <IO name="master" id="1088698373992392" inputs="{ardour:Audio 16/out 1,ardour:Audio 15/out 1,ardour:Audio 14/out 1,ardour:Audio 13/out 1,ardour:Audio 12/out 1,ardour:Audio 11/out 1,ardour:Audio 10/out 1,ardour:Audio 9/out 1,ardour:Audio 8/out 1,ardour:Audio 7/out 1,ardour:Audio 6/out 1,ardour:Audio 5/out 1,ardour:Audio 4/out 1,ardour:Audio 3/out 1,ardour:Audio 2/out 1,ardour:Audio 1/out 1}{ardour:Audio 16/out 2,ardour:Audio 15/out 2,ardour:Audio 14/out 2,ardour:Audio 13/out 2,ardour:Audio 12/out 2,ardour:Audio 11/out 2,ardour:Audio 10/out 2,ardour:Audio 9/out 2,ardour:Audio 8/out 2,ardour:Audio 7/out 2,ardour:Audio 6/out 2,ardour:Audio 5/out 2,ardour:Audio 4/out 2,ardour:Audio 3/out 2,ardour:Audio 2/out 2,ardour:Audio 1/out 2}" outputs="{alsa_pcm:playback_1}{alsa_pcm:playback_2}" gain="1" iolimits="-1,2,-1,2" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0">
+ <StreamPanner x="0.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ <StreamPanner x="1.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ </Panner>
+ </IO>
+ <extra>
+ <GUI color="3746:15634:28532" track_height="normal" strip_width="wide" shown_mixer="yes" shown_editor="yes"/>
+ </extra>
+ </Route>
+ <Route muted="no" soloed="no" phase-invert="no" mute-affects-pre-fader="yes" mute-affects-post-fader="yes" mute-affects-control-outs="yes" mute-affects-main-outs="yes" order-keys="editor=1:signal=1" diskstream-id="1088698381595945">
+ <IO name="Audio 1" id="1088698381595877" inputs="{alsa_pcm:capture_1}{alsa_pcm:capture_2}" outputs="{ardour:master/in 1}{ardour:master/in 2}" gain="1" iolimits="1,-1,-1,-1" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0">
+ <StreamPanner x="0.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ <StreamPanner x="1.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ </Panner>
+ </IO>
+ <extra>
+ <GUI color="25329:39287:16285" strip_width="wide" track_height="normal" shown_mixer="yes" shown_editor="yes"/>
+ </extra>
+ </Route>
+ <Route muted="no" soloed="no" phase-invert="no" mute-affects-pre-fader="yes" mute-affects-post-fader="yes" mute-affects-control-outs="yes" mute-affects-main-outs="yes" order-keys="editor=2:signal=2" diskstream-id="1088698381722129">
+ <IO name="Audio 2" id="1088698381722065" inputs="{alsa_pcm:capture_2}{alsa_pcm:capture_1}" outputs="{ardour:master/in 1}{ardour:master/in 2}" gain="1" iolimits="1,-1,-1,-1" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0">
+ <StreamPanner x="0.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ <StreamPanner x="1.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ </Panner>
+ </IO>
+ <extra>
+ <GUI color="6057:31092:43721" strip_width="wide" track_height="normal" shown_mixer="yes" shown_editor="yes"/>
+ </extra>
+ </Route>
+ <Route muted="no" soloed="no" phase-invert="no" mute-affects-pre-fader="yes" mute-affects-post-fader="yes" mute-affects-control-outs="yes" mute-affects-main-outs="yes" order-keys="editor=3:signal=3" diskstream-id="1088698419793849">
+ <IO name="Audio 3" id="1088698419793786" inputs="{alsa_pcm:capture_1}{alsa_pcm:capture_2}" outputs="{ardour:master/in 1}{ardour:master/in 2}" gain="1" iolimits="1,-1,-1,-1" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0">
+ <StreamPanner x="0.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ <StreamPanner x="1.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ </Panner>
+ </IO>
+ <extra>
+ <GUI color="21964:7276:28849" strip_width="wide" track_height="normal" shown_mixer="yes" shown_editor="yes"/>
+ </extra>
+ </Route>
+ <Route muted="no" soloed="no" phase-invert="no" mute-affects-pre-fader="yes" mute-affects-post-fader="yes" mute-affects-control-outs="yes" mute-affects-main-outs="yes" order-keys="editor=4:signal=4" diskstream-id="1088698419943526">
+ <IO name="Audio 4" id="1088698419943460" inputs="{alsa_pcm:capture_2}{alsa_pcm:capture_1}" outputs="{ardour:master/in 1}{ardour:master/in 2}" gain="1" iolimits="1,-1,-1,-1" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0">
+ <StreamPanner x="0.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ <StreamPanner x="1.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ </Panner>
+ </IO>
+ <extra>
+ <GUI color="46694:21380:28653" track_height="normal" strip_width="wide" shown_mixer="yes" shown_editor="yes"/>
+ </extra>
+ </Route>
+ <Route muted="no" soloed="no" phase-invert="no" mute-affects-pre-fader="yes" mute-affects-post-fader="yes" mute-affects-control-outs="yes" mute-affects-main-outs="yes" order-keys="editor=5:signal=5" diskstream-id="1088698450528071">
+ <IO name="Audio 5" id="1088698450528006" inputs="{alsa_pcm:capture_1}{alsa_pcm:capture_2}" outputs="{ardour:master/in 1}{ardour:master/in 2}" gain="1" iolimits="1,-1,-1,-1" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0">
+ <StreamPanner x="0.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ <StreamPanner x="1.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ </Panner>
+ </IO>
+ <extra>
+ <GUI color="29643:15912:24582" track_height="normal" strip_width="wide" shown_mixer="yes" shown_editor="yes"/>
+ </extra>
+ </Route>
+ <Route muted="no" soloed="no" phase-invert="no" mute-affects-pre-fader="yes" mute-affects-post-fader="yes" mute-affects-control-outs="yes" mute-affects-main-outs="yes" order-keys="editor=6:signal=6" diskstream-id="1088698450754348">
+ <IO name="Audio 6" id="1088698450754242" inputs="{alsa_pcm:capture_2}{alsa_pcm:capture_1}" outputs="{ardour:master/in 1}{ardour:master/in 2}" gain="1" iolimits="1,-1,-1,-1" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0">
+ <StreamPanner x="0.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ <StreamPanner x="1.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ </Panner>
+ </IO>
+ <extra>
+ <GUI color="32959:22941:32677" strip_width="wide" track_height="normal" shown_mixer="yes" shown_editor="yes"/>
+ </extra>
+ </Route>
+ <Route muted="no" soloed="no" phase-invert="no" mute-affects-pre-fader="yes" mute-affects-post-fader="yes" mute-affects-control-outs="yes" mute-affects-main-outs="yes" order-keys="editor=7:signal=7" diskstream-id="1088698450937150">
+ <IO name="Audio 7" id="1088698450937083" inputs="{alsa_pcm:capture_1}{alsa_pcm:capture_2}" outputs="{ardour:master/in 1}{ardour:master/in 2}" gain="1" iolimits="1,-1,-1,-1" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0">
+ <StreamPanner x="0.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ <StreamPanner x="1.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ </Panner>
+ </IO>
+ <extra>
+ <GUI color="44734:28458:19344" strip_width="wide" track_height="normal" shown_mixer="yes" shown_editor="yes"/>
+ </extra>
+ </Route>
+ <Route muted="no" soloed="no" phase-invert="no" mute-affects-pre-fader="yes" mute-affects-post-fader="yes" mute-affects-control-outs="yes" mute-affects-main-outs="yes" order-keys="editor=8:signal=8" diskstream-id="1088698451167172">
+ <IO name="Audio 8" id="1088698451167106" inputs="{alsa_pcm:capture_2}{alsa_pcm:capture_1}" outputs="{ardour:master/in 1}{ardour:master/in 2}" gain="1" iolimits="1,-1,-1,-1" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0">
+ <StreamPanner x="0.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ <StreamPanner x="1.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ </Panner>
+ </IO>
+ <extra>
+ <GUI color="21903:23957:19369" strip_width="wide" track_height="normal" shown_mixer="yes" shown_editor="yes"/>
+ </extra>
+ </Route>
+ <Route muted="no" soloed="no" phase-invert="no" mute-affects-pre-fader="yes" mute-affects-post-fader="yes" mute-affects-control-outs="yes" mute-affects-main-outs="yes" order-keys="editor=9:signal=9" diskstream-id="1088698483525991">
+ <IO name="Audio 9" id="1088698483525928" inputs="{alsa_pcm:capture_1}{alsa_pcm:capture_2}" outputs="{ardour:master/in 1}{ardour:master/in 2}" gain="1" iolimits="1,-1,-1,-1" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0">
+ <StreamPanner x="0.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ <StreamPanner x="1.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ </Panner>
+ </IO>
+ <extra>
+ <GUI color="33035:25949:38549" strip_width="wide" track_height="normal" shown_mixer="yes" shown_editor="yes"/>
+ </extra>
+ </Route>
+ <Route muted="no" soloed="no" phase-invert="no" mute-affects-pre-fader="yes" mute-affects-post-fader="yes" mute-affects-control-outs="yes" mute-affects-main-outs="yes" order-keys="editor=10:signal=10" diskstream-id="1088698483801345">
+ <IO name="Audio 10" id="1088698483801234" inputs="{alsa_pcm:capture_2}{alsa_pcm:capture_1}" outputs="{ardour:master/in 1}{ardour:master/in 2}" gain="1" iolimits="1,-1,-1,-1" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0">
+ <StreamPanner x="0.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ <StreamPanner x="1.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ </Panner>
+ </IO>
+ <extra>
+ <GUI color="2516:42834:42296" strip_width="wide" track_height="normal" shown_mixer="yes" shown_editor="yes"/>
+ </extra>
+ </Route>
+ <Route muted="no" soloed="no" phase-invert="no" mute-affects-pre-fader="yes" mute-affects-post-fader="yes" mute-affects-control-outs="yes" mute-affects-main-outs="yes" order-keys="editor=11:signal=11" diskstream-id="1088698484086727">
+ <IO name="Audio 11" id="1088698484086663" inputs="{alsa_pcm:capture_1}{alsa_pcm:capture_2}" outputs="{ardour:master/in 1}{ardour:master/in 2}" gain="1" iolimits="1,-1,-1,-1" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0">
+ <StreamPanner x="0.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ <StreamPanner x="1.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ </Panner>
+ </IO>
+ <extra>
+ <GUI color="6503:47471:19625" strip_width="wide" track_height="normal" shown_mixer="yes" shown_editor="yes"/>
+ </extra>
+ </Route>
+ <Route muted="no" soloed="no" phase-invert="no" mute-affects-pre-fader="yes" mute-affects-post-fader="yes" mute-affects-control-outs="yes" mute-affects-main-outs="yes" order-keys="editor=12:signal=12" diskstream-id="1088698484325738">
+ <IO name="Audio 12" id="1088698484325672" inputs="{alsa_pcm:capture_2}{alsa_pcm:capture_1}" outputs="{ardour:master/in 1}{ardour:master/in 2}" gain="1" iolimits="1,-1,-1,-1" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0">
+ <StreamPanner x="0.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ <StreamPanner x="1.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ </Panner>
+ </IO>
+ <extra>
+ <GUI color="45790:43192:14035" strip_width="wide" track_height="normal" shown_mixer="yes" shown_editor="yes"/>
+ </extra>
+ </Route>
+ <Route muted="no" soloed="no" phase-invert="no" mute-affects-pre-fader="yes" mute-affects-post-fader="yes" mute-affects-control-outs="yes" mute-affects-main-outs="yes" order-keys="editor=13:signal=13" diskstream-id="1088698484576054">
+ <IO name="Audio 13" id="1088698484575978" inputs="{alsa_pcm:capture_1}{alsa_pcm:capture_2}" outputs="{ardour:master/in 1}{ardour:master/in 2}" gain="1" iolimits="1,-1,-1,-1" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0">
+ <StreamPanner x="0.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ <StreamPanner x="1.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ </Panner>
+ </IO>
+ <extra>
+ <GUI color="17234:12393:35999" strip_width="wide" track_height="normal" shown_mixer="yes" shown_editor="yes"/>
+ </extra>
+ </Route>
+ <Route muted="no" soloed="no" phase-invert="no" mute-affects-pre-fader="yes" mute-affects-post-fader="yes" mute-affects-control-outs="yes" mute-affects-main-outs="yes" order-keys="editor=14:signal=14" diskstream-id="1088698484839332">
+ <IO name="Audio 14" id="1088698484839137" inputs="{alsa_pcm:capture_2}{alsa_pcm:capture_1}" outputs="{ardour:master/in 1}{ardour:master/in 2}" gain="1" iolimits="1,-1,-1,-1" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0">
+ <StreamPanner x="0.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ <StreamPanner x="1.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ </Panner>
+ </IO>
+ <extra>
+ <GUI color="12863:41046:23045" strip_width="wide" track_height="normal" shown_mixer="yes" shown_editor="yes"/>
+ </extra>
+ </Route>
+ <Route muted="no" soloed="no" phase-invert="no" mute-affects-pre-fader="yes" mute-affects-post-fader="yes" mute-affects-control-outs="yes" mute-affects-main-outs="yes" order-keys="editor=15:signal=15" diskstream-id="1088698485116518">
+ <IO name="Audio 15" id="1088698485116451" inputs="{alsa_pcm:capture_1}{alsa_pcm:capture_2}" outputs="{ardour:master/in 1}{ardour:master/in 2}" gain="1" iolimits="1,-1,-1,-1" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0">
+ <StreamPanner x="0.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ <StreamPanner x="1.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ </Panner>
+ </IO>
+ <extra>
+ <GUI color="34243:17628:4689" strip_width="wide" track_height="normal" shown_mixer="yes" shown_editor="yes"/>
+ </extra>
+ </Route>
+ <Route muted="no" soloed="no" phase-invert="no" mute-affects-pre-fader="yes" mute-affects-post-fader="yes" mute-affects-control-outs="yes" mute-affects-main-outs="yes" order-keys="editor=16:signal=16" diskstream-id="1088698485412133">
+ <IO name="Audio 16" id="1088698485412068" inputs="{alsa_pcm:capture_2}{alsa_pcm:capture_1}" outputs="{ardour:master/in 1}{ardour:master/in 2}" gain="1" iolimits="1,-1,-1,-1" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0">
+ <StreamPanner x="0.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ <StreamPanner x="1.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ </Panner>
+ </IO>
+ <extra>
+ <GUI color="2155:38658:37648" strip_width="wide" shown_mixer="yes" track_height="normal" shown_editor="yes"/>
+ </extra>
+ </Route>
+ </Routes>
+ <EditGroups/>
+ <MixGroups/>
+ <Playlists/>
+ <Click>
+ <IO name="click" id="1088698373994975" inputs="" outputs="{alsa_pcm:playback_1}" gain="1" iolimits="0,0,-1,-1" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0" automation="t1-pan-click.automation"/>
+ </IO>
+ </Click>
+ <TempoMap>
+ <Tempo start="1|1|0" beats-per-minute="120.000000" movable="no"/>
+ <Meter start="1|1|0" note-type="4.000000" beats-per-bar="4.000000" movable="no"/>
+ </TempoMap>
+</Session>
diff --git a/templates/2 Track.template b/templates/2 Track.template
new file mode 100644
index 0000000000..11f35d7183
--- /dev/null
+++ b/templates/2 Track.template
@@ -0,0 +1,92 @@
+<?xml version="1.0"?>
+<Session version="0.821.0">
+ <Options>
+ <recording-plugins val="no"/>
+ <slave type="none"/>
+ <send-midi-timecode val="no"/>
+ <send-midi-machine-control val="no"/>
+ <input-auto-connect val="1"/>
+ <output-auto-connect val="2"/>
+ <max-level val="0"/>
+ <min-level val="0"/>
+ <meter-hold val="10.000000"/>
+ <long-over-length val="10"/>
+ <short-over-length val="2"/>
+ <shuttle-speed-factor val="1.000000"/>
+ <shuttle-speed-threshold val="5.000000"/>
+ <rf-speed val="2.000000"/>
+ <smpte-frames-per-second val="30.000000"/>
+ <edit-mode val="slide"/>
+ <auto-play val="no"/>
+ <auto-input val="no"/>
+ <seamless-loop val="no"/>
+ <punch-in val="no"/>
+ <punch-out val="no"/>
+ <all-safe val="no"/>
+ <auto-return val="no"/>
+ <mmc-control val="no"/>
+ <recording-plugins val="no"/>
+ <auto-crossfade val="no"/>
+ <audible-click val="no"/>
+ <align-style val="existing"/>
+ </Options>
+ <Sources/>
+ <Regions/>
+ <DiskStreams>
+ <DiskStream channels="2" playlist="Audio 1.1" speed="1.000000" name="Audio 1" id="1088698381595945"/>
+ <DiskStream channels="2" playlist="Audio 2.1" speed="1.000000" name="Audio 2" id="1088698381722129"/>
+ </DiskStreams>
+ <Locations>
+ <Location name="end" start="14400000" end="14400000" flags="33"/>
+ <Location name="Loop" start="0" end="14400000" flags="12"/>
+ <Location name="Punch" start="0" end="14400000" flags="10"/>
+ </Locations>
+ <Connections/>
+ <Routes>
+ <Route flags="0x2" muted="no" soloed="no" phase-invert="no" mute-affects-pre-fader="yes" mute-affects-post-fader="yes" mute-affects-control-outs="yes" mute-affects-main-outs="yes" order-keys="editor=0:signal=0">
+ <IO name="master" id="1088698373992392" inputs="{ardour:Audio 2/out 1,ardour:Audio 1/out 1}{ardour:Audio 2/out 2,ardour:Audio 1/out 2}" outputs="{alsa_pcm:playback_1}{alsa_pcm:playback_2}" gain="1" iolimits="-1,2,-1,2" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0">
+ <StreamPanner x="0.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ <StreamPanner x="1.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ </Panner>
+ </IO>
+ <extra>
+ <GUI color="3746:15634:28532" track_height="normal" strip_width="wide" shown_mixer="yes" shown_editor="yes"/>
+ </extra>
+ </Route>
+ <Route muted="no" soloed="no" phase-invert="no" mute-affects-pre-fader="yes" mute-affects-post-fader="yes" mute-affects-control-outs="yes" mute-affects-main-outs="yes" order-keys="editor=1:signal=1" diskstream-id="1088698381595945">
+ <IO name="Audio 1" id="1088698381595877" inputs="{alsa_pcm:capture_1}{alsa_pcm:capture_2}" outputs="{ardour:master/in 1}{ardour:master/in 2}" gain="1" iolimits="1,-1,-1,-1" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0">
+ <StreamPanner x="0.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ <StreamPanner x="1.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ </Panner>
+ </IO>
+ <extra>
+ <GUI color="25329:39287:16285" strip_width="wide" track_height="normal" shown_mixer="yes" shown_editor="yes"/>
+ </extra>
+ </Route>
+ <Route muted="no" soloed="no" phase-invert="no" mute-affects-pre-fader="yes" mute-affects-post-fader="yes" mute-affects-control-outs="yes" mute-affects-main-outs="yes" order-keys="editor=2:signal=2" diskstream-id="1088698381722129">
+ <IO name="Audio 2" id="1088698381722065" inputs="{alsa_pcm:capture_2}{alsa_pcm:capture_1}" outputs="{ardour:master/in 1}{ardour:master/in 2}" gain="1" iolimits="1,-1,-1,-1" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0">
+ <StreamPanner x="0.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ <StreamPanner x="1.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ </Panner>
+ </IO>
+ <extra>
+ <GUI color="6057:31092:43721" strip_width="wide" shown_mixer="yes" track_height="normal" shown_editor="yes"/>
+ </extra>
+ </Route>
+ </Routes>
+ <EditGroups/>
+ <MixGroups/>
+ <Playlists/>
+ <Click>
+ <IO name="click" id="1088698373994975" inputs="" outputs="{alsa_pcm:playback_1}" gain="1" iolimits="0,0,-1,-1" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0" automation="t1-pan-click.automation"/>
+ </IO>
+ </Click>
+ <TempoMap>
+ <Tempo start="1|1|0" beats-per-minute="120.000000" movable="no"/>
+ <Meter start="1|1|0" note-type="4.000000" beats-per-bar="4.000000" movable="no"/>
+ </TempoMap>
+</Session>
diff --git a/templates/32 Tracks.template b/templates/32 Tracks.template
new file mode 100644
index 0000000000..dfedeaa7e9
--- /dev/null
+++ b/templates/32 Tracks.template
@@ -0,0 +1,356 @@
+<?xml version="1.0"?>
+<Session version="0.821.0">
+ <Options>
+ <recording-plugins val="no"/>
+ <slave type="none"/>
+ <send-midi-timecode val="no"/>
+ <send-midi-machine-control val="no"/>
+ <input-auto-connect val="1"/>
+ <output-auto-connect val="2"/>
+ <max-level val="0"/>
+ <min-level val="0"/>
+ <meter-hold val="10.000000"/>
+ <long-over-length val="10"/>
+ <short-over-length val="2"/>
+ <shuttle-speed-factor val="1.000000"/>
+ <shuttle-speed-threshold val="5.000000"/>
+ <rf-speed val="2.000000"/>
+ <smpte-frames-per-second val="30.000000"/>
+ <edit-mode val="slide"/>
+ <auto-play val="no"/>
+ <auto-input val="no"/>
+ <seamless-loop val="no"/>
+ <punch-in val="no"/>
+ <punch-out val="no"/>
+ <all-safe val="no"/>
+ <auto-return val="no"/>
+ <mmc-control val="no"/>
+ <recording-plugins val="no"/>
+ <auto-crossfade val="no"/>
+ <audible-click val="no"/>
+ <align-style val="existing"/>
+ </Options>
+ <Sources/>
+ <Regions/>
+ <DiskStreams>
+ <DiskStream channels="2" playlist="Audio 1.1" speed="1.000000" name="Audio 1" id="1088698381595945"/>
+ <DiskStream channels="2" playlist="Audio 2.1" speed="1.000000" name="Audio 2" id="1088698381722129"/>
+ <DiskStream channels="2" playlist="Audio 3.1" speed="1.000000" name="Audio 3" id="1088698419793849"/>
+ <DiskStream channels="2" playlist="Audio 4.1" speed="1.000000" name="Audio 4" id="1088698419943526"/>
+ <DiskStream channels="2" playlist="Audio 5.1" speed="1.000000" name="Audio 5" id="1088698450528071"/>
+ <DiskStream channels="2" playlist="Audio 6.1" speed="1.000000" name="Audio 6" id="1088698450754348"/>
+ <DiskStream channels="2" playlist="Audio 7.1" speed="1.000000" name="Audio 7" id="1088698450937150"/>
+ <DiskStream channels="2" playlist="Audio 8.1" speed="1.000000" name="Audio 8" id="1088698451167172"/>
+ <DiskStream channels="2" playlist="Audio 9.1" speed="1.000000" name="Audio 9" id="1088698483525991"/>
+ <DiskStream channels="2" playlist="Audio 10.1" speed="1.000000" name="Audio 10" id="1088698483801345"/>
+ <DiskStream channels="2" playlist="Audio 11.1" speed="1.000000" name="Audio 11" id="1088698484086727"/>
+ <DiskStream channels="2" playlist="Audio 12.1" speed="1.000000" name="Audio 12" id="1088698484325738"/>
+ <DiskStream channels="2" playlist="Audio 13.1" speed="1.000000" name="Audio 13" id="1088698484576054"/>
+ <DiskStream channels="2" playlist="Audio 14.1" speed="1.000000" name="Audio 14" id="1088698484839332"/>
+ <DiskStream channels="2" playlist="Audio 15.1" speed="1.000000" name="Audio 15" id="1088698485116518"/>
+ <DiskStream channels="2" playlist="Audio 16.1" speed="1.000000" name="Audio 16" id="1088698485412133"/>
+ <DiskStream channels="2" playlist="Audio 17.1" speed="1.000000" name="Audio 17" id="1088698520418087"/>
+ <DiskStream channels="2" playlist="Audio 18.1" speed="1.000000" name="Audio 18" id="1088698520803734"/>
+ <DiskStream channels="2" playlist="Audio 19.1" speed="1.000000" name="Audio 19" id="1088698521138071"/>
+ <DiskStream channels="2" playlist="Audio 20.1" speed="1.000000" name="Audio 20" id="1088698521481727"/>
+ <DiskStream channels="2" playlist="Audio 21.1" speed="1.000000" name="Audio 21" id="1088698521848332"/>
+ <DiskStream channels="2" playlist="Audio 22.1" speed="1.000000" name="Audio 22" id="1088698522224190"/>
+ <DiskStream channels="2" playlist="Audio 23.1" speed="1.000000" name="Audio 23" id="1088698522620517"/>
+ <DiskStream channels="2" playlist="Audio 24.1" speed="1.000000" name="Audio 24" id="1088698523020752"/>
+ </DiskStreams>
+ <Locations>
+ <Location name="end" start="14400000" end="14400000" flags="33"/>
+ <Location name="Loop" start="0" end="14400000" flags="12"/>
+ <Location name="Punch" start="0" end="14400000" flags="10"/>
+ </Locations>
+ <Connections/>
+ <Routes>
+ <Route flags="0x2" muted="no" soloed="no" phase-invert="no" mute-affects-pre-fader="yes" mute-affects-post-fader="yes" mute-affects-control-outs="yes" mute-affects-main-outs="yes" order-keys="editor=0:signal=0">
+ <IO name="master" id="1088698373992392" inputs="{ardour:Audio 24/out 1,ardour:Audio 23/out 1,ardour:Audio 22/out 1,ardour:Audio 21/out 1,ardour:Audio 20/out 1,ardour:Audio 19/out 1,ardour:Audio 18/out 1,ardour:Audio 17/out 1,ardour:Audio 16/out 1,ardour:Audio 15/out 1,ardour:Audio 14/out 1,ardour:Audio 13/out 1,ardour:Audio 12/out 1,ardour:Audio 11/out 1,ardour:Audio 10/out 1,ardour:Audio 9/out 1,ardour:Audio 8/out 1,ardour:Audio 7/out 1,ardour:Audio 6/out 1,ardour:Audio 5/out 1,ardour:Audio 4/out 1,ardour:Audio 3/out 1,ardour:Audio 2/out 1,ardour:Audio 1/out 1}{ardour:Audio 24/out 2,ardour:Audio 23/out 2,ardour:Audio 22/out 2,ardour:Audio 21/out 2,ardour:Audio 20/out 2,ardour:Audio 19/out 2,ardour:Audio 18/out 2,ardour:Audio 17/out 2,ardour:Audio 16/out 2,ardour:Audio 15/out 2,ardour:Audio 14/out 2,ardour:Audio 13/out 2,ardour:Audio 12/out 2,ardour:Audio 11/out 2,ardour:Audio 10/out 2,ardour:Audio 9/out 2,ardour:Audio 8/out 2,ardour:Audio 7/out 2,ardour:Audio 6/out 2,ardour:Audio 5/out 2,ardour:Audio 4/out 2,ardour:Audio 3/out 2,ardour:Audio 2/out 2,ardour:Audio 1/out 2}" outputs="{alsa_pcm:playback_1}{alsa_pcm:playback_2}" gain="1" iolimits="-1,2,-1,2" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0">
+ <StreamPanner x="0.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ <StreamPanner x="1.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ </Panner>
+ </IO>
+ <extra>
+ <GUI color="3746:15634:28532" track_height="normal" strip_width="wide" shown_mixer="yes" shown_editor="yes"/>
+ </extra>
+ </Route>
+ <Route muted="no" soloed="no" phase-invert="no" mute-affects-pre-fader="yes" mute-affects-post-fader="yes" mute-affects-control-outs="yes" mute-affects-main-outs="yes" order-keys="editor=1:signal=1" diskstream-id="1088698381595945">
+ <IO name="Audio 1" id="1088698381595877" inputs="{alsa_pcm:capture_1}{alsa_pcm:capture_2}" outputs="{ardour:master/in 1}{ardour:master/in 2}" gain="1" iolimits="1,-1,-1,-1" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0">
+ <StreamPanner x="0.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ <StreamPanner x="1.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ </Panner>
+ </IO>
+ <extra>
+ <GUI color="25329:39287:16285" strip_width="wide" track_height="normal" shown_mixer="yes" shown_editor="yes"/>
+ </extra>
+ </Route>
+ <Route muted="no" soloed="no" phase-invert="no" mute-affects-pre-fader="yes" mute-affects-post-fader="yes" mute-affects-control-outs="yes" mute-affects-main-outs="yes" order-keys="editor=2:signal=2" diskstream-id="1088698381722129">
+ <IO name="Audio 2" id="1088698381722065" inputs="{alsa_pcm:capture_2}{alsa_pcm:capture_1}" outputs="{ardour:master/in 1}{ardour:master/in 2}" gain="1" iolimits="1,-1,-1,-1" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0">
+ <StreamPanner x="0.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ <StreamPanner x="1.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ </Panner>
+ </IO>
+ <extra>
+ <GUI color="6057:31092:43721" strip_width="wide" track_height="normal" shown_mixer="yes" shown_editor="yes"/>
+ </extra>
+ </Route>
+ <Route muted="no" soloed="no" phase-invert="no" mute-affects-pre-fader="yes" mute-affects-post-fader="yes" mute-affects-control-outs="yes" mute-affects-main-outs="yes" order-keys="editor=3:signal=3" diskstream-id="1088698419793849">
+ <IO name="Audio 3" id="1088698419793786" inputs="{alsa_pcm:capture_1}{alsa_pcm:capture_2}" outputs="{ardour:master/in 1}{ardour:master/in 2}" gain="1" iolimits="1,-1,-1,-1" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0">
+ <StreamPanner x="0.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ <StreamPanner x="1.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ </Panner>
+ </IO>
+ <extra>
+ <GUI color="21964:7276:28849" strip_width="wide" track_height="normal" shown_mixer="yes" shown_editor="yes"/>
+ </extra>
+ </Route>
+ <Route muted="no" soloed="no" phase-invert="no" mute-affects-pre-fader="yes" mute-affects-post-fader="yes" mute-affects-control-outs="yes" mute-affects-main-outs="yes" order-keys="editor=4:signal=4" diskstream-id="1088698419943526">
+ <IO name="Audio 4" id="1088698419943460" inputs="{alsa_pcm:capture_2}{alsa_pcm:capture_1}" outputs="{ardour:master/in 1}{ardour:master/in 2}" gain="1" iolimits="1,-1,-1,-1" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0">
+ <StreamPanner x="0.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ <StreamPanner x="1.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ </Panner>
+ </IO>
+ <extra>
+ <GUI color="46694:21380:28653" track_height="normal" strip_width="wide" shown_mixer="yes" shown_editor="yes"/>
+ </extra>
+ </Route>
+ <Route muted="no" soloed="no" phase-invert="no" mute-affects-pre-fader="yes" mute-affects-post-fader="yes" mute-affects-control-outs="yes" mute-affects-main-outs="yes" order-keys="editor=5:signal=5" diskstream-id="1088698450528071">
+ <IO name="Audio 5" id="1088698450528006" inputs="{alsa_pcm:capture_1}{alsa_pcm:capture_2}" outputs="{ardour:master/in 1}{ardour:master/in 2}" gain="1" iolimits="1,-1,-1,-1" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0">
+ <StreamPanner x="0.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ <StreamPanner x="1.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ </Panner>
+ </IO>
+ <extra>
+ <GUI color="29643:15912:24582" track_height="normal" strip_width="wide" shown_mixer="yes" shown_editor="yes"/>
+ </extra>
+ </Route>
+ <Route muted="no" soloed="no" phase-invert="no" mute-affects-pre-fader="yes" mute-affects-post-fader="yes" mute-affects-control-outs="yes" mute-affects-main-outs="yes" order-keys="editor=6:signal=6" diskstream-id="1088698450754348">
+ <IO name="Audio 6" id="1088698450754242" inputs="{alsa_pcm:capture_2}{alsa_pcm:capture_1}" outputs="{ardour:master/in 1}{ardour:master/in 2}" gain="1" iolimits="1,-1,-1,-1" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0">
+ <StreamPanner x="0.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ <StreamPanner x="1.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ </Panner>
+ </IO>
+ <extra>
+ <GUI color="32959:22941:32677" strip_width="wide" track_height="normal" shown_mixer="yes" shown_editor="yes"/>
+ </extra>
+ </Route>
+ <Route muted="no" soloed="no" phase-invert="no" mute-affects-pre-fader="yes" mute-affects-post-fader="yes" mute-affects-control-outs="yes" mute-affects-main-outs="yes" order-keys="editor=7:signal=7" diskstream-id="1088698450937150">
+ <IO name="Audio 7" id="1088698450937083" inputs="{alsa_pcm:capture_1}{alsa_pcm:capture_2}" outputs="{ardour:master/in 1}{ardour:master/in 2}" gain="1" iolimits="1,-1,-1,-1" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0">
+ <StreamPanner x="0.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ <StreamPanner x="1.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ </Panner>
+ </IO>
+ <extra>
+ <GUI color="44734:28458:19344" strip_width="wide" track_height="normal" shown_mixer="yes" shown_editor="yes"/>
+ </extra>
+ </Route>
+ <Route muted="no" soloed="no" phase-invert="no" mute-affects-pre-fader="yes" mute-affects-post-fader="yes" mute-affects-control-outs="yes" mute-affects-main-outs="yes" order-keys="editor=8:signal=8" diskstream-id="1088698451167172">
+ <IO name="Audio 8" id="1088698451167106" inputs="{alsa_pcm:capture_2}{alsa_pcm:capture_1}" outputs="{ardour:master/in 1}{ardour:master/in 2}" gain="1" iolimits="1,-1,-1,-1" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0">
+ <StreamPanner x="0.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ <StreamPanner x="1.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ </Panner>
+ </IO>
+ <extra>
+ <GUI color="21903:23957:19369" strip_width="wide" track_height="normal" shown_mixer="yes" shown_editor="yes"/>
+ </extra>
+ </Route>
+ <Route muted="no" soloed="no" phase-invert="no" mute-affects-pre-fader="yes" mute-affects-post-fader="yes" mute-affects-control-outs="yes" mute-affects-main-outs="yes" order-keys="editor=9:signal=9" diskstream-id="1088698483525991">
+ <IO name="Audio 9" id="1088698483525928" inputs="{alsa_pcm:capture_1}{alsa_pcm:capture_2}" outputs="{ardour:master/in 1}{ardour:master/in 2}" gain="1" iolimits="1,-1,-1,-1" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0">
+ <StreamPanner x="0.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ <StreamPanner x="1.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ </Panner>
+ </IO>
+ <extra>
+ <GUI color="33035:25949:38549" strip_width="wide" track_height="normal" shown_mixer="yes" shown_editor="yes"/>
+ </extra>
+ </Route>
+ <Route muted="no" soloed="no" phase-invert="no" mute-affects-pre-fader="yes" mute-affects-post-fader="yes" mute-affects-control-outs="yes" mute-affects-main-outs="yes" order-keys="editor=10:signal=10" diskstream-id="1088698483801345">
+ <IO name="Audio 10" id="1088698483801234" inputs="{alsa_pcm:capture_2}{alsa_pcm:capture_1}" outputs="{ardour:master/in 1}{ardour:master/in 2}" gain="1" iolimits="1,-1,-1,-1" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0">
+ <StreamPanner x="0.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ <StreamPanner x="1.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ </Panner>
+ </IO>
+ <extra>
+ <GUI color="2516:42834:42296" strip_width="wide" track_height="normal" shown_mixer="yes" shown_editor="yes"/>
+ </extra>
+ </Route>
+ <Route muted="no" soloed="no" phase-invert="no" mute-affects-pre-fader="yes" mute-affects-post-fader="yes" mute-affects-control-outs="yes" mute-affects-main-outs="yes" order-keys="editor=11:signal=11" diskstream-id="1088698484086727">
+ <IO name="Audio 11" id="1088698484086663" inputs="{alsa_pcm:capture_1}{alsa_pcm:capture_2}" outputs="{ardour:master/in 1}{ardour:master/in 2}" gain="1" iolimits="1,-1,-1,-1" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0">
+ <StreamPanner x="0.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ <StreamPanner x="1.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ </Panner>
+ </IO>
+ <extra>
+ <GUI color="6503:47471:19625" strip_width="wide" track_height="normal" shown_mixer="yes" shown_editor="yes"/>
+ </extra>
+ </Route>
+ <Route muted="no" soloed="no" phase-invert="no" mute-affects-pre-fader="yes" mute-affects-post-fader="yes" mute-affects-control-outs="yes" mute-affects-main-outs="yes" order-keys="editor=12:signal=12" diskstream-id="1088698484325738">
+ <IO name="Audio 12" id="1088698484325672" inputs="{alsa_pcm:capture_2}{alsa_pcm:capture_1}" outputs="{ardour:master/in 1}{ardour:master/in 2}" gain="1" iolimits="1,-1,-1,-1" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0">
+ <StreamPanner x="0.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ <StreamPanner x="1.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ </Panner>
+ </IO>
+ <extra>
+ <GUI color="45790:43192:14035" strip_width="wide" track_height="normal" shown_mixer="yes" shown_editor="yes"/>
+ </extra>
+ </Route>
+ <Route muted="no" soloed="no" phase-invert="no" mute-affects-pre-fader="yes" mute-affects-post-fader="yes" mute-affects-control-outs="yes" mute-affects-main-outs="yes" order-keys="editor=13:signal=13" diskstream-id="1088698484576054">
+ <IO name="Audio 13" id="1088698484575978" inputs="{alsa_pcm:capture_1}{alsa_pcm:capture_2}" outputs="{ardour:master/in 1}{ardour:master/in 2}" gain="1" iolimits="1,-1,-1,-1" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0">
+ <StreamPanner x="0.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ <StreamPanner x="1.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ </Panner>
+ </IO>
+ <extra>
+ <GUI color="17234:12393:35999" strip_width="wide" track_height="normal" shown_mixer="yes" shown_editor="yes"/>
+ </extra>
+ </Route>
+ <Route muted="no" soloed="no" phase-invert="no" mute-affects-pre-fader="yes" mute-affects-post-fader="yes" mute-affects-control-outs="yes" mute-affects-main-outs="yes" order-keys="editor=14:signal=14" diskstream-id="1088698484839332">
+ <IO name="Audio 14" id="1088698484839137" inputs="{alsa_pcm:capture_2}{alsa_pcm:capture_1}" outputs="{ardour:master/in 1}{ardour:master/in 2}" gain="1" iolimits="1,-1,-1,-1" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0">
+ <StreamPanner x="0.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ <StreamPanner x="1.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ </Panner>
+ </IO>
+ <extra>
+ <GUI color="12863:41046:23045" strip_width="wide" track_height="normal" shown_mixer="yes" shown_editor="yes"/>
+ </extra>
+ </Route>
+ <Route muted="no" soloed="no" phase-invert="no" mute-affects-pre-fader="yes" mute-affects-post-fader="yes" mute-affects-control-outs="yes" mute-affects-main-outs="yes" order-keys="editor=15:signal=15" diskstream-id="1088698485116518">
+ <IO name="Audio 15" id="1088698485116451" inputs="{alsa_pcm:capture_1}{alsa_pcm:capture_2}" outputs="{ardour:master/in 1}{ardour:master/in 2}" gain="1" iolimits="1,-1,-1,-1" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0">
+ <StreamPanner x="0.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ <StreamPanner x="1.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ </Panner>
+ </IO>
+ <extra>
+ <GUI color="34243:17628:4689" strip_width="wide" track_height="normal" shown_mixer="yes" shown_editor="yes"/>
+ </extra>
+ </Route>
+ <Route muted="no" soloed="no" phase-invert="no" mute-affects-pre-fader="yes" mute-affects-post-fader="yes" mute-affects-control-outs="yes" mute-affects-main-outs="yes" order-keys="editor=16:signal=16" diskstream-id="1088698485412133">
+ <IO name="Audio 16" id="1088698485412068" inputs="{alsa_pcm:capture_2}{alsa_pcm:capture_1}" outputs="{ardour:master/in 1}{ardour:master/in 2}" gain="1" iolimits="1,-1,-1,-1" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0">
+ <StreamPanner x="0.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ <StreamPanner x="1.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ </Panner>
+ </IO>
+ <extra>
+ <GUI color="2155:38658:37648" strip_width="wide" track_height="normal" shown_mixer="yes" shown_editor="yes"/>
+ </extra>
+ </Route>
+ <Route muted="no" soloed="no" phase-invert="no" mute-affects-pre-fader="yes" mute-affects-post-fader="yes" mute-affects-control-outs="yes" mute-affects-main-outs="yes" order-keys="editor=17:signal=17" diskstream-id="1088698520418087">
+ <IO name="Audio 17" id="1088698520418023" inputs="{alsa_pcm:capture_1}{alsa_pcm:capture_2}" outputs="{ardour:master/in 1}{ardour:master/in 2}" gain="1" iolimits="1,-1,-1,-1" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0">
+ <StreamPanner x="0.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ <StreamPanner x="1.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ </Panner>
+ </IO>
+ <extra>
+ <GUI color="13448:46354:22734" strip_width="wide" track_height="normal" shown_mixer="yes" shown_editor="yes"/>
+ </extra>
+ </Route>
+ <Route muted="no" soloed="no" phase-invert="no" mute-affects-pre-fader="yes" mute-affects-post-fader="yes" mute-affects-control-outs="yes" mute-affects-main-outs="yes" order-keys="editor=18:signal=18" diskstream-id="1088698520803734">
+ <IO name="Audio 18" id="1088698520803668" inputs="{alsa_pcm:capture_2}{alsa_pcm:capture_1}" outputs="{ardour:master/in 1}{ardour:master/in 2}" gain="1" iolimits="1,-1,-1,-1" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0">
+ <StreamPanner x="0.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ <StreamPanner x="1.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ </Panner>
+ </IO>
+ <extra>
+ <GUI color="30258:17723:44638" strip_width="wide" track_height="normal" shown_mixer="yes" shown_editor="yes"/>
+ </extra>
+ </Route>
+ <Route muted="no" soloed="no" phase-invert="no" mute-affects-pre-fader="yes" mute-affects-post-fader="yes" mute-affects-control-outs="yes" mute-affects-main-outs="yes" order-keys="editor=19:signal=19" diskstream-id="1088698521138071">
+ <IO name="Audio 19" id="1088698521138004" inputs="{alsa_pcm:capture_1}{alsa_pcm:capture_2}" outputs="{ardour:master/in 1}{ardour:master/in 2}" gain="1" iolimits="1,-1,-1,-1" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0">
+ <StreamPanner x="0.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ <StreamPanner x="1.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ </Panner>
+ </IO>
+ <extra>
+ <GUI color="6216:8272:18025" strip_width="wide" track_height="normal" shown_mixer="yes" shown_editor="yes"/>
+ </extra>
+ </Route>
+ <Route muted="no" soloed="no" phase-invert="no" mute-affects-pre-fader="yes" mute-affects-post-fader="yes" mute-affects-control-outs="yes" mute-affects-main-outs="yes" order-keys="editor=20:signal=20" diskstream-id="1088698521481727">
+ <IO name="Audio 20" id="1088698521481661" inputs="{alsa_pcm:capture_2}{alsa_pcm:capture_1}" outputs="{ardour:master/in 1}{ardour:master/in 2}" gain="1" iolimits="1,-1,-1,-1" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0">
+ <StreamPanner x="0.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ <StreamPanner x="1.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ </Panner>
+ </IO>
+ <extra>
+ <GUI color="32165:38920:20541" strip_width="wide" track_height="normal" shown_mixer="yes" shown_editor="yes"/>
+ </extra>
+ </Route>
+ <Route muted="no" soloed="no" phase-invert="no" mute-affects-pre-fader="yes" mute-affects-post-fader="yes" mute-affects-control-outs="yes" mute-affects-main-outs="yes" order-keys="editor=21:signal=21" diskstream-id="1088698521848332">
+ <IO name="Audio 21" id="1088698521848267" inputs="{alsa_pcm:capture_1}{alsa_pcm:capture_2}" outputs="{ardour:master/in 1}{ardour:master/in 2}" gain="1" iolimits="1,-1,-1,-1" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0">
+ <StreamPanner x="0.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ <StreamPanner x="1.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ </Panner>
+ </IO>
+ <extra>
+ <GUI color="15351:46898:27044" strip_width="wide" track_height="normal" shown_mixer="yes" shown_editor="yes"/>
+ </extra>
+ </Route>
+ <Route muted="no" soloed="no" phase-invert="no" mute-affects-pre-fader="yes" mute-affects-post-fader="yes" mute-affects-control-outs="yes" mute-affects-main-outs="yes" order-keys="editor=22:signal=22" diskstream-id="1088698522224190">
+ <IO name="Audio 22" id="1088698522224124" inputs="{alsa_pcm:capture_2}{alsa_pcm:capture_1}" outputs="{ardour:master/in 1}{ardour:master/in 2}" gain="1" iolimits="1,-1,-1,-1" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0">
+ <StreamPanner x="0.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ <StreamPanner x="1.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ </Panner>
+ </IO>
+ <extra>
+ <GUI color="14822:1285:13186" strip_width="wide" track_height="normal" shown_mixer="yes" shown_editor="yes"/>
+ </extra>
+ </Route>
+ <Route muted="no" soloed="no" phase-invert="no" mute-affects-pre-fader="yes" mute-affects-post-fader="yes" mute-affects-control-outs="yes" mute-affects-main-outs="yes" order-keys="editor=23:signal=23" diskstream-id="1088698522620517">
+ <IO name="Audio 23" id="1088698522620452" inputs="{alsa_pcm:capture_1}{alsa_pcm:capture_2}" outputs="{ardour:master/in 1}{ardour:master/in 2}" gain="1" iolimits="1,-1,-1,-1" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0">
+ <StreamPanner x="0.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ <StreamPanner x="1.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ </Panner>
+ </IO>
+ <extra>
+ <GUI color="46366:37284:30421" strip_width="wide" track_height="normal" shown_mixer="yes" shown_editor="yes"/>
+ </extra>
+ </Route>
+ <Route muted="no" soloed="no" phase-invert="no" mute-affects-pre-fader="yes" mute-affects-post-fader="yes" mute-affects-control-outs="yes" mute-affects-main-outs="yes" order-keys="editor=24:signal=24" diskstream-id="1088698523020752">
+ <IO name="Audio 24" id="1088698523020686" inputs="{alsa_pcm:capture_2}{alsa_pcm:capture_1}" outputs="{ardour:master/in 1}{ardour:master/in 2}" gain="1" iolimits="1,-1,-1,-1" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0">
+ <StreamPanner x="0.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ <StreamPanner x="1.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ </Panner>
+ </IO>
+ <extra>
+ <GUI color="10759:12329:43284" strip_width="wide" shown_mixer="yes" track_height="normal" shown_editor="yes"/>
+ </extra>
+ </Route>
+ </Routes>
+ <EditGroups/>
+ <MixGroups/>
+ <Playlists/>
+ <Click>
+ <IO name="click" id="1088698373994975" inputs="" outputs="{alsa_pcm:playback_1}" gain="1" iolimits="0,0,-1,-1" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0" automation="t1-pan-click.automation"/>
+ </IO>
+ </Click>
+ <TempoMap>
+ <Tempo start="1|1|0" beats-per-minute="120.000000" movable="no"/>
+ <Meter start="1|1|0" note-type="4.000000" beats-per-bar="4.000000" movable="no"/>
+ </TempoMap>
+</Session>
diff --git a/templates/4 Tracks.template b/templates/4 Tracks.template
new file mode 100644
index 0000000000..692c0403e4
--- /dev/null
+++ b/templates/4 Tracks.template
@@ -0,0 +1,116 @@
+<?xml version="1.0"?>
+<Session version="0.821.0">
+ <Options>
+ <recording-plugins val="no"/>
+ <slave type="none"/>
+ <send-midi-timecode val="no"/>
+ <send-midi-machine-control val="no"/>
+ <input-auto-connect val="1"/>
+ <output-auto-connect val="2"/>
+ <max-level val="0"/>
+ <min-level val="0"/>
+ <meter-hold val="10.000000"/>
+ <long-over-length val="10"/>
+ <short-over-length val="2"/>
+ <shuttle-speed-factor val="1.000000"/>
+ <shuttle-speed-threshold val="5.000000"/>
+ <rf-speed val="2.000000"/>
+ <smpte-frames-per-second val="30.000000"/>
+ <edit-mode val="slide"/>
+ <auto-play val="no"/>
+ <auto-input val="no"/>
+ <seamless-loop val="no"/>
+ <punch-in val="no"/>
+ <punch-out val="no"/>
+ <all-safe val="no"/>
+ <auto-return val="no"/>
+ <mmc-control val="no"/>
+ <recording-plugins val="no"/>
+ <auto-crossfade val="no"/>
+ <audible-click val="no"/>
+ <align-style val="existing"/>
+ </Options>
+ <Sources/>
+ <Regions/>
+ <DiskStreams>
+ <DiskStream channels="2" playlist="Audio 1.1" speed="1.000000" name="Audio 1" id="1088698381595945"/>
+ <DiskStream channels="2" playlist="Audio 2.1" speed="1.000000" name="Audio 2" id="1088698381722129"/>
+ <DiskStream channels="2" playlist="Audio 3.1" speed="1.000000" name="Audio 3" id="1088698419793849"/>
+ <DiskStream channels="2" playlist="Audio 4.1" speed="1.000000" name="Audio 4" id="1088698419943526"/>
+ </DiskStreams>
+ <Locations>
+ <Location name="end" start="14400000" end="14400000" flags="33"/>
+ <Location name="Loop" start="0" end="14400000" flags="12"/>
+ <Location name="Punch" start="0" end="14400000" flags="10"/>
+ </Locations>
+ <Connections/>
+ <Routes>
+ <Route flags="0x2" muted="no" soloed="no" phase-invert="no" mute-affects-pre-fader="yes" mute-affects-post-fader="yes" mute-affects-control-outs="yes" mute-affects-main-outs="yes" order-keys="editor=0:signal=0">
+ <IO name="master" id="1088698373992392" inputs="{ardour:Audio 4/out 1,ardour:Audio 3/out 1,ardour:Audio 2/out 1,ardour:Audio 1/out 1}{ardour:Audio 4/out 2,ardour:Audio 3/out 2,ardour:Audio 2/out 2,ardour:Audio 1/out 2}" outputs="{alsa_pcm:playback_1}{alsa_pcm:playback_2}" gain="1" iolimits="-1,2,-1,2" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0">
+ <StreamPanner x="0.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ <StreamPanner x="1.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ </Panner>
+ </IO>
+ <extra>
+ <GUI color="3746:15634:28532" track_height="normal" strip_width="wide" shown_mixer="yes" shown_editor="yes"/>
+ </extra>
+ </Route>
+ <Route muted="no" soloed="no" phase-invert="no" mute-affects-pre-fader="yes" mute-affects-post-fader="yes" mute-affects-control-outs="yes" mute-affects-main-outs="yes" order-keys="editor=1:signal=1" diskstream-id="1088698381595945">
+ <IO name="Audio 1" id="1088698381595877" inputs="{alsa_pcm:capture_1}{alsa_pcm:capture_2}" outputs="{ardour:master/in 1}{ardour:master/in 2}" gain="1" iolimits="1,-1,-1,-1" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0">
+ <StreamPanner x="0.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ <StreamPanner x="1.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ </Panner>
+ </IO>
+ <extra>
+ <GUI color="25329:39287:16285" strip_width="wide" track_height="normal" shown_mixer="yes" shown_editor="yes"/>
+ </extra>
+ </Route>
+ <Route muted="no" soloed="no" phase-invert="no" mute-affects-pre-fader="yes" mute-affects-post-fader="yes" mute-affects-control-outs="yes" mute-affects-main-outs="yes" order-keys="editor=2:signal=2" diskstream-id="1088698381722129">
+ <IO name="Audio 2" id="1088698381722065" inputs="{alsa_pcm:capture_2}{alsa_pcm:capture_1}" outputs="{ardour:master/in 1}{ardour:master/in 2}" gain="1" iolimits="1,-1,-1,-1" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0">
+ <StreamPanner x="0.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ <StreamPanner x="1.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ </Panner>
+ </IO>
+ <extra>
+ <GUI color="6057:31092:43721" strip_width="wide" track_height="normal" shown_mixer="yes" shown_editor="yes"/>
+ </extra>
+ </Route>
+ <Route muted="no" soloed="no" phase-invert="no" mute-affects-pre-fader="yes" mute-affects-post-fader="yes" mute-affects-control-outs="yes" mute-affects-main-outs="yes" order-keys="editor=3:signal=3" diskstream-id="1088698419793849">
+ <IO name="Audio 3" id="1088698419793786" inputs="{alsa_pcm:capture_1}{alsa_pcm:capture_2}" outputs="{ardour:master/in 1}{ardour:master/in 2}" gain="1" iolimits="1,-1,-1,-1" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0">
+ <StreamPanner x="0.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ <StreamPanner x="1.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ </Panner>
+ </IO>
+ <extra>
+ <GUI color="21964:7276:28849" strip_width="wide" track_height="normal" shown_mixer="yes" shown_editor="yes"/>
+ </extra>
+ </Route>
+ <Route muted="no" soloed="no" phase-invert="no" mute-affects-pre-fader="yes" mute-affects-post-fader="yes" mute-affects-control-outs="yes" mute-affects-main-outs="yes" order-keys="editor=4:signal=4" diskstream-id="1088698419943526">
+ <IO name="Audio 4" id="1088698419943460" inputs="{alsa_pcm:capture_2}{alsa_pcm:capture_1}" outputs="{ardour:master/in 1}{ardour:master/in 2}" gain="1" iolimits="1,-1,-1,-1" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0">
+ <StreamPanner x="0.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ <StreamPanner x="1.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ </Panner>
+ </IO>
+ <extra>
+ <GUI color="46694:21380:28653" shown_mixer="yes" track_height="normal" shown_editor="yes" strip_width="wide"/>
+ </extra>
+ </Route>
+ </Routes>
+ <EditGroups/>
+ <MixGroups/>
+ <Playlists/>
+ <Click>
+ <IO name="click" id="1088698373994975" inputs="" outputs="{alsa_pcm:playback_1}" gain="1" iolimits="0,0,-1,-1" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0" automation="t1-pan-click.automation"/>
+ </IO>
+ </Click>
+ <TempoMap>
+ <Tempo start="1|1|0" beats-per-minute="120.000000" movable="no"/>
+ <Meter start="1|1|0" note-type="4.000000" beats-per-bar="4.000000" movable="no"/>
+ </TempoMap>
+</Session>
diff --git a/templates/8 Tracks.template b/templates/8 Tracks.template
new file mode 100644
index 0000000000..5c1ddb827a
--- /dev/null
+++ b/templates/8 Tracks.template
@@ -0,0 +1,164 @@
+<?xml version="1.0"?>
+<Session version="0.821.0">
+ <Options>
+ <recording-plugins val="no"/>
+ <slave type="none"/>
+ <send-midi-timecode val="no"/>
+ <send-midi-machine-control val="no"/>
+ <input-auto-connect val="1"/>
+ <output-auto-connect val="2"/>
+ <max-level val="0"/>
+ <min-level val="0"/>
+ <meter-hold val="10.000000"/>
+ <long-over-length val="10"/>
+ <short-over-length val="2"/>
+ <shuttle-speed-factor val="1.000000"/>
+ <shuttle-speed-threshold val="5.000000"/>
+ <rf-speed val="2.000000"/>
+ <smpte-frames-per-second val="30.000000"/>
+ <edit-mode val="slide"/>
+ <auto-play val="no"/>
+ <auto-input val="no"/>
+ <seamless-loop val="no"/>
+ <punch-in val="no"/>
+ <punch-out val="no"/>
+ <all-safe val="no"/>
+ <auto-return val="no"/>
+ <mmc-control val="no"/>
+ <recording-plugins val="no"/>
+ <auto-crossfade val="no"/>
+ <audible-click val="no"/>
+ <align-style val="existing"/>
+ </Options>
+ <Sources/>
+ <Regions/>
+ <DiskStreams>
+ <DiskStream channels="2" playlist="Audio 1.1" speed="1.000000" name="Audio 1" id="1088698381595945"/>
+ <DiskStream channels="2" playlist="Audio 2.1" speed="1.000000" name="Audio 2" id="1088698381722129"/>
+ <DiskStream channels="2" playlist="Audio 3.1" speed="1.000000" name="Audio 3" id="1088698419793849"/>
+ <DiskStream channels="2" playlist="Audio 4.1" speed="1.000000" name="Audio 4" id="1088698419943526"/>
+ <DiskStream channels="2" playlist="Audio 5.1" speed="1.000000" name="Audio 5" id="1088698450528071"/>
+ <DiskStream channels="2" playlist="Audio 6.1" speed="1.000000" name="Audio 6" id="1088698450754348"/>
+ <DiskStream channels="2" playlist="Audio 7.1" speed="1.000000" name="Audio 7" id="1088698450937150"/>
+ <DiskStream channels="2" playlist="Audio 8.1" speed="1.000000" name="Audio 8" id="1088698451167172"/>
+ </DiskStreams>
+ <Locations>
+ <Location name="end" start="14400000" end="14400000" flags="33"/>
+ <Location name="Loop" start="0" end="14400000" flags="12"/>
+ <Location name="Punch" start="0" end="14400000" flags="10"/>
+ </Locations>
+ <Connections/>
+ <Routes>
+ <Route flags="0x2" muted="no" soloed="no" phase-invert="no" mute-affects-pre-fader="yes" mute-affects-post-fader="yes" mute-affects-control-outs="yes" mute-affects-main-outs="yes" order-keys="editor=0:signal=0">
+ <IO name="master" id="1088698373992392" inputs="{ardour:Audio 8/out 1,ardour:Audio 7/out 1,ardour:Audio 6/out 1,ardour:Audio 5/out 1,ardour:Audio 4/out 1,ardour:Audio 3/out 1,ardour:Audio 2/out 1,ardour:Audio 1/out 1}{ardour:Audio 8/out 2,ardour:Audio 7/out 2,ardour:Audio 6/out 2,ardour:Audio 5/out 2,ardour:Audio 4/out 2,ardour:Audio 3/out 2,ardour:Audio 2/out 2,ardour:Audio 1/out 2}" outputs="{alsa_pcm:playback_1}{alsa_pcm:playback_2}" gain="1" iolimits="-1,2,-1,2" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0">
+ <StreamPanner x="0.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ <StreamPanner x="1.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ </Panner>
+ </IO>
+ <extra>
+ <GUI color="3746:15634:28532" track_height="normal" strip_width="wide" shown_mixer="yes" shown_editor="yes"/>
+ </extra>
+ </Route>
+ <Route muted="no" soloed="no" phase-invert="no" mute-affects-pre-fader="yes" mute-affects-post-fader="yes" mute-affects-control-outs="yes" mute-affects-main-outs="yes" order-keys="editor=1:signal=1" diskstream-id="1088698381595945">
+ <IO name="Audio 1" id="1088698381595877" inputs="{alsa_pcm:capture_1}{alsa_pcm:capture_2}" outputs="{ardour:master/in 1}{ardour:master/in 2}" gain="1" iolimits="1,-1,-1,-1" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0">
+ <StreamPanner x="0.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ <StreamPanner x="1.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ </Panner>
+ </IO>
+ <extra>
+ <GUI color="25329:39287:16285" strip_width="wide" track_height="normal" shown_mixer="yes" shown_editor="yes"/>
+ </extra>
+ </Route>
+ <Route muted="no" soloed="no" phase-invert="no" mute-affects-pre-fader="yes" mute-affects-post-fader="yes" mute-affects-control-outs="yes" mute-affects-main-outs="yes" order-keys="editor=2:signal=2" diskstream-id="1088698381722129">
+ <IO name="Audio 2" id="1088698381722065" inputs="{alsa_pcm:capture_2}{alsa_pcm:capture_1}" outputs="{ardour:master/in 1}{ardour:master/in 2}" gain="1" iolimits="1,-1,-1,-1" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0">
+ <StreamPanner x="0.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ <StreamPanner x="1.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ </Panner>
+ </IO>
+ <extra>
+ <GUI color="6057:31092:43721" strip_width="wide" track_height="normal" shown_mixer="yes" shown_editor="yes"/>
+ </extra>
+ </Route>
+ <Route muted="no" soloed="no" phase-invert="no" mute-affects-pre-fader="yes" mute-affects-post-fader="yes" mute-affects-control-outs="yes" mute-affects-main-outs="yes" order-keys="editor=3:signal=3" diskstream-id="1088698419793849">
+ <IO name="Audio 3" id="1088698419793786" inputs="{alsa_pcm:capture_1}{alsa_pcm:capture_2}" outputs="{ardour:master/in 1}{ardour:master/in 2}" gain="1" iolimits="1,-1,-1,-1" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0">
+ <StreamPanner x="0.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ <StreamPanner x="1.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ </Panner>
+ </IO>
+ <extra>
+ <GUI color="21964:7276:28849" strip_width="wide" track_height="normal" shown_mixer="yes" shown_editor="yes"/>
+ </extra>
+ </Route>
+ <Route muted="no" soloed="no" phase-invert="no" mute-affects-pre-fader="yes" mute-affects-post-fader="yes" mute-affects-control-outs="yes" mute-affects-main-outs="yes" order-keys="editor=4:signal=4" diskstream-id="1088698419943526">
+ <IO name="Audio 4" id="1088698419943460" inputs="{alsa_pcm:capture_2}{alsa_pcm:capture_1}" outputs="{ardour:master/in 1}{ardour:master/in 2}" gain="1" iolimits="1,-1,-1,-1" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0">
+ <StreamPanner x="0.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ <StreamPanner x="1.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ </Panner>
+ </IO>
+ <extra>
+ <GUI color="46694:21380:28653" track_height="normal" strip_width="wide" shown_mixer="yes" shown_editor="yes"/>
+ </extra>
+ </Route>
+ <Route muted="no" soloed="no" phase-invert="no" mute-affects-pre-fader="yes" mute-affects-post-fader="yes" mute-affects-control-outs="yes" mute-affects-main-outs="yes" order-keys="editor=5:signal=5" diskstream-id="1088698450528071">
+ <IO name="Audio 5" id="1088698450528006" inputs="{alsa_pcm:capture_1}{alsa_pcm:capture_2}" outputs="{ardour:master/in 1}{ardour:master/in 2}" gain="1" iolimits="1,-1,-1,-1" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0">
+ <StreamPanner x="0.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ <StreamPanner x="1.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ </Panner>
+ </IO>
+ <extra>
+ <GUI color="29643:15912:24582" track_height="normal" shown_mixer="yes" shown_editor="yes" strip_width="wide"/>
+ </extra>
+ </Route>
+ <Route muted="no" soloed="no" phase-invert="no" mute-affects-pre-fader="yes" mute-affects-post-fader="yes" mute-affects-control-outs="yes" mute-affects-main-outs="yes" order-keys="editor=6:signal=6" diskstream-id="1088698450754348">
+ <IO name="Audio 6" id="1088698450754242" inputs="{alsa_pcm:capture_2}{alsa_pcm:capture_1}" outputs="{ardour:master/in 1}{ardour:master/in 2}" gain="1" iolimits="1,-1,-1,-1" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0">
+ <StreamPanner x="0.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ <StreamPanner x="1.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ </Panner>
+ </IO>
+ <extra>
+ <GUI color="32959:22941:32677" strip_width="wide" track_height="normal" shown_mixer="yes" shown_editor="yes"/>
+ </extra>
+ </Route>
+ <Route muted="no" soloed="no" phase-invert="no" mute-affects-pre-fader="yes" mute-affects-post-fader="yes" mute-affects-control-outs="yes" mute-affects-main-outs="yes" order-keys="editor=7:signal=7" diskstream-id="1088698450937150">
+ <IO name="Audio 7" id="1088698450937083" inputs="{alsa_pcm:capture_1}{alsa_pcm:capture_2}" outputs="{ardour:master/in 1}{ardour:master/in 2}" gain="1" iolimits="1,-1,-1,-1" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0">
+ <StreamPanner x="0.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ <StreamPanner x="1.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ </Panner>
+ </IO>
+ <extra>
+ <GUI color="44734:28458:19344" strip_width="wide" track_height="normal" shown_mixer="yes" shown_editor="yes"/>
+ </extra>
+ </Route>
+ <Route muted="no" soloed="no" phase-invert="no" mute-affects-pre-fader="yes" mute-affects-post-fader="yes" mute-affects-control-outs="yes" mute-affects-main-outs="yes" order-keys="editor=8:signal=8" diskstream-id="1088698451167172">
+ <IO name="Audio 8" id="1088698451167106" inputs="{alsa_pcm:capture_2}{alsa_pcm:capture_1}" outputs="{ardour:master/in 1}{ardour:master/in 2}" gain="1" iolimits="1,-1,-1,-1" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0">
+ <StreamPanner x="0.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ <StreamPanner x="1.000000" type="Equal Power Stereo" automation-state="0x0" automation-style="0x1" bypassed="no" muted="no"/>
+ </Panner>
+ </IO>
+ <extra>
+ <GUI color="21903:23957:19369" strip_width="wide" shown_mixer="yes" track_height="normal" shown_editor="yes"/>
+ </extra>
+ </Route>
+ </Routes>
+ <EditGroups/>
+ <MixGroups/>
+ <Playlists/>
+ <Click>
+ <IO name="click" id="1088698373994975" inputs="" outputs="{alsa_pcm:playback_1}" gain="1" iolimits="0,0,-1,-1" automation-state="0x0" automation-style="0x1">
+ <Panner linked="no" link_direction="0" automation="t1-pan-click.automation"/>
+ </IO>
+ </Click>
+ <TempoMap>
+ <Tempo start="1|1|0" beats-per-minute="120.000000" movable="no"/>
+ <Meter start="1|1|0" note-type="4.000000" beats-per-bar="4.000000" movable="no"/>
+ </TempoMap>
+</Session>
diff --git a/templates/SConscript b/templates/SConscript
new file mode 100644
index 0000000000..4269a1b988
--- /dev/null
+++ b/templates/SConscript
@@ -0,0 +1,9 @@
+# -*- python -*-
+
+import os
+import glob
+template_files = glob.glob('*.template')
+
+Import('env install_prefix')
+env.Alias('install', env.Install(os.path.join(install_prefix, 'share/ardour/templates'), template_files))
+env.Alias('tarball', env.Distribute (env['DISTTREE'], [ 'SConscript' ] + template_files))
diff --git a/tools/.cvsignore b/tools/.cvsignore
new file mode 100644
index 0000000000..4149fafb53
--- /dev/null
+++ b/tools/.cvsignore
@@ -0,0 +1,3 @@
+ard_i18n
+Makefile.in
+Makefile
diff --git a/tools/bug_tool/.cvsignore b/tools/bug_tool/.cvsignore
new file mode 100644
index 0000000000..c53e20660e
--- /dev/null
+++ b/tools/bug_tool/.cvsignore
@@ -0,0 +1,3 @@
+*.pyc
+Makefile.in
+Makefile
diff --git a/tools/bug_tool/ClientCookie/.cvsignore b/tools/bug_tool/ClientCookie/.cvsignore
new file mode 100644
index 0000000000..c53e20660e
--- /dev/null
+++ b/tools/bug_tool/ClientCookie/.cvsignore
@@ -0,0 +1,3 @@
+*.pyc
+Makefile.in
+Makefile
diff --git a/tools/bug_tool/ClientCookie/_ClientCookie.py b/tools/bug_tool/ClientCookie/_ClientCookie.py
new file mode 100644
index 0000000000..307fa22afb
--- /dev/null
+++ b/tools/bug_tool/ClientCookie/_ClientCookie.py
@@ -0,0 +1,1833 @@
+"""HTTP cookie handling for web clients, plus some other stuff.
+
+This module originally developed from my port of Gisle Aas' Perl module
+HTTP::Cookies, from the libwww-perl library.
+
+Docstrings, comments and debug strings in this code refer to the
+attributes of the HTTP cookie system as cookie-attributes, to distinguish
+them clearly from Python attributes.
+
+Comments to John J Lee <jjl@pobox.com>.
+
+
+Copyright 2002-2003 John J Lee <jjl@pobox.com>
+Copyright 1997-1999 Gisle Aas (original libwww-perl code)
+Copyright 2002-2003 Johnny Lee (original MSIE Perl code)
+
+This code is free software; you can redistribute it and/or modify it under
+the terms of the BSD License (see the file COPYING included with the
+distribution).
+
+"""
+
+VERSION = "0.4.9"
+
+
+# Public health warning: anyone who thought 'cookies are simple, aren't they?',
+# run away now :-(
+
+import sys, re, urlparse, string, copy, time, struct
+try:
+ import threading
+ _threading = threading; del threading
+except ImportError:
+ import dummy_threading
+ _threading = dummy_threading; del dummy_threading
+import httplib # only for the default HTTP port
+
+MISSING_FILENAME_TEXT = ("a filename was not supplied (nor was the CookieJar "
+ "instance initialised with one)")
+DEFAULT_HTTP_PORT = str(httplib.HTTP_PORT)
+
+try: True
+except NameError:
+ True = 1
+ False = 0
+
+try: StopIteration
+except NameError:
+ class StopIteration(Exception): pass
+
+import ClientCookie
+from _HeadersUtil import split_header_words, join_header_words, \
+ parse_ns_headers
+from _Util import startswith, endswith, iso2time, time2isoz
+from _Debug import debug
+
+try: bool
+except NameError:
+ def bool(expr):
+ if expr: return True
+ else: return False
+
+try: issubclass(Exception, (Exception,))
+except TypeError:
+ real_issubclass = issubclass
+ from _Util import compat_issubclass
+ issubclass = compat_issubclass
+ del compat_issubclass
+
+SPACE_DICT = {}
+for c in string.whitespace:
+ SPACE_DICT[c] = None
+del c
+def isspace(string):
+ for c in string:
+ if not SPACE_DICT.has_key(c): return False
+ return True
+
+def getheaders(msg, name):
+ """Get all values for a header.
+
+ This returns a list of values for headers given more than once; each
+ value in the result list is stripped in the same way as the result of
+ getheader(). If the header is not given, return an empty list.
+ """
+ result = []
+ current = ''
+ have_header = 0
+ for s in msg.getallmatchingheaders(name):
+ if isspace(s[0]):
+ if current:
+ current = "%s\n %s" % (current, string.strip(s))
+ else:
+ current = string.strip(s)
+ else:
+ if have_header:
+ result.append(current)
+ current = string.strip(s[string.find(s, ":") + 1:])
+ have_header = 1
+ if have_header:
+ result.append(current)
+ return result
+
+def reraise_unmasked_exceptions(unmasked=()):
+ # There are a few catch-all except: statements in this module, for
+ # catching input that's bad in unexpected ways.
+ # This function re-raises some exceptions we don't want to trap.
+ if ClientCookie.CLIENTCOOKIE_DEBUG:
+ raise
+ unmasked = unmasked + (KeyboardInterrupt, SystemExit)
+ etype = sys.exc_info()[0]
+ if issubclass(etype, unmasked):
+ raise
+
+
+IPV4_RE = re.compile(r"\.\d+$")
+def is_HDN(text):
+ """Return True if text is a host domain name."""
+ # XXX
+ # This may well be wrong. Which RFC is HDN defined in, if any (for
+ # the purposes of RFC 2965)?
+ # For the current implementation, what about IPv6? Remember to look
+ # at other uses of IPV4_RE also, if change this.
+ if IPV4_RE.search(text):
+ return False
+ if text == "":
+ return False
+ if text[0] == "." or text[-1] == ".":
+ return False
+ return True
+
+def domain_match(A, B):
+ """Return True if domain A domain-matches domain B, according to RFC 2965.
+
+ A and B may be host domain names or IP addresses.
+
+ RFC 2965, section 1:
+
+ Host names can be specified either as an IP address or a HDN string.
+ Sometimes we compare one host name with another. (Such comparisons SHALL
+ be case-insensitive.) Host A's name domain-matches host B's if
+
+ * their host name strings string-compare equal; or
+
+ * A is a HDN string and has the form NB, where N is a non-empty
+ name string, B has the form .B', and B' is a HDN string. (So,
+ x.y.com domain-matches .Y.com but not Y.com.)
+
+ Note that domain-match is not a commutative operation: a.b.c.com
+ domain-matches .c.com, but not the reverse.
+
+ """
+ # Note that, if A or B are IP addresses, the only relevant part of the
+ # definition of the domain-match algorithm is the direct string-compare.
+ A = string.lower(A)
+ B = string.lower(B)
+ if A == B:
+ return True
+ if not is_HDN(A):
+ return False
+ i = string.rfind(A, B)
+ if i == -1 or i == 0:
+ # A does not have form NB, or N is the empty string
+ return False
+ if not startswith(B, "."):
+ return False
+ if not is_HDN(B[1:]):
+ return False
+ return True
+
+def liberal_is_HDN(text):
+ """Return True if text is a sort-of-like a host domain name.
+
+ For accepting/blocking domains.
+
+ """
+ if IPV4_RE.search(text):
+ return False
+ return True
+
+def user_domain_match(A, B):
+ """For blocking/accepting domains.
+
+ A and B may be host domain names or IP addresses.
+
+ """
+ A = string.lower(A)
+ B = string.lower(B)
+ if not (liberal_is_HDN(A) and liberal_is_HDN(B)):
+ if A == B:
+ # equal IP addresses
+ return True
+ return False
+ initial_dot = startswith(B, ".")
+ if initial_dot and endswith(A, B):
+ return True
+ if not initial_dot and A == B:
+ return True
+ return False
+
+cut_port_re = re.compile(r":\d+$")
+def request_host(request):
+ """Return request-host, as defined by RFC 2965.
+
+ Variation from RFC: returned value is lowercased, for convenient
+ comparison.
+
+ """
+ url = request.get_full_url()
+ host = urlparse.urlparse(url)[1]
+ if host == "":
+ host = request.headers.get("Host", "")
+
+ # remove port, if present
+ host = cut_port_re.sub("", host, 1)
+ return string.lower(host)
+
+def eff_request_host(request):
+ """Return a tuple (request-host, effective request-host name).
+
+ As defined by RFC 2965, except both are lowercased.
+
+ """
+ erhn = req_host = request_host(request)
+ if string.find(req_host, ".") == -1 and not IPV4_RE.search(req_host):
+ erhn = req_host + ".local"
+ return req_host, erhn
+
+def request_path(request):
+ """request-URI, as defined by RFC 2965."""
+ url = request.get_full_url()
+ #scheme, netloc, path, parameters, query, frag = urlparse.urlparse(url)
+ req_path = normalize_path(string.join(urlparse.urlparse(url)[2:], ""))
+ if not startswith(req_path, "/"):
+ # fix bad RFC 2396 absoluteURI
+ req_path = "/"+req_path
+ return req_path
+
+def request_port(request):
+ # ATM (Python 2.3) request.port is always None, and unused by urllib2
+ port = request.port
+ host = request.get_host()
+ if port is None:
+ i = string.find(host, ':')
+ if i >= 0:
+ port = host[i+1:]
+ try:
+ int(port)
+ except ValueError:
+ debug("nonnumeric port: '%s'" % port)
+ return None
+ else:
+ port = DEFAULT_HTTP_PORT
+ return port
+
+def unescape_path_fn(match):
+ x = string.upper(match.group(1))
+ if x == "2F" or x == "25":
+ return "%%%s" % (x,)
+ else:
+ # string.atoi deprecated in 2.0, but 1.5.2 int function won't do
+ # radix conversion
+ return struct.pack("B", string.atoi(x, 16))
+def normalize_path_fn(match):
+ return "%%%02X" % ord(match.group(1))
+
+unescape_re = re.compile(r"%([0-9a-fA-F][0-9a-fA-F])")
+normalize_re = re.compile(r"([\0-\x20\x7f-\xff])")
+def normalize_path(path):
+ """Normalise URI path so that plain string compare can be used.
+
+ >>> normalize_path("%19\xd3%Fb%2F%25%26")
+ '%19%D3%FB%2F%25&'
+ >>>
+
+ In normalised form, all non-printable characters are %-escaped, and all
+ printable characters are given literally (not escaped). All remaining
+ %-escaped characters are capitalised. %25 and %2F are special-cased,
+ because they represent the printable characters"%" and "/", which are used
+ as escape and URI path separator characters respectively.
+
+ """
+ path = unescape_re.sub(unescape_path_fn, path)
+ path = normalize_re.sub(normalize_path_fn, path)
+ return path
+
+def reach(h):
+ """Return reach of host h, as defined by RFC 2965, section 1.
+
+ The reach R of a host name H is defined as follows:
+
+ * If
+
+ - H is the host domain name of a host; and,
+
+ - H has the form A.B; and
+
+ - A has no embedded (that is, interior) dots; and
+
+ - B has at least one embedded dot, or B is the string "local".
+ then the reach of H is .B.
+
+ * Otherwise, the reach of H is H.
+
+ >>> reach("www.acme.com")
+ '.acme.com'
+ >>> reach("acme.com")
+ 'acme.com'
+ >>> reach("acme.local")
+ '.local'
+
+ """
+ i = string.find(h, ".")
+ if i >= 0:
+ #a = h[:i] # this line is only here to show what a is
+ b = h[i+1:]
+ i = string.find(b, ".")
+ if is_HDN(h) and (i >= 0 or b == "local"):
+ return "."+b
+ return h
+
+def is_third_party(request):
+ """
+
+ RFC 2965, section 3.3.6:
+
+ An unverifiable transaction is to a third-party host if its request-
+ host U does not domain-match the reach R of the request-host O in the
+ origin transaction.
+
+ """
+ req_host = string.lower(request_host(request))
+ # the origin request's request-host was stuffed into request by
+ # _urllib2_support.AbstractHTTPHandler
+ if not domain_match(req_host, reach(request.origin_req_host)):
+ return True
+ else:
+ return False
+
+
+class Cookie:
+ """HTTP Cookie.
+
+ This class represents both Netscape and RFC 2965 cookies.
+
+ This is deliberately a very simple class. It just holds attributes. It's
+ possible to construct Cookie instances that don't comply with the cookie
+ standards. CookieJar.make_cookies is the factory function for Cookie
+ objects -- it deals with cookie parsing, supplying defaults, and
+ normalising to the representation used in this class. CookiePolicy is
+ responsible for checking them to see whether they should be accepted from
+ and returned to the server.
+
+ version: integer;
+ name: string (may be None);
+ value: string;
+ port: string; None indicates no attribute was supplied (eg. "Port", rather
+ than eg. "Port=80"); otherwise, a port string (eg. "80") or a port list
+ string (eg. "80,8080")
+ port_specified: boolean; true if a value was supplied with the Port
+ cookie-attribute
+ domain: string;
+ domain_specified: boolean; true if Domain was explicitly set
+ domain_initial_dot: boolean; true if Domain as set in HTTP header by server
+ started with a dot (yes, this really is necessary!)
+ path: string;
+ path_specified: boolean; true if Path was explicitly set
+ secure: boolean; true if should only be returned over secure connection
+ expires: integer; seconds since epoch (RFC 2965 cookies should calculate
+ this value from the Max-Age attribute)
+ discard: boolean, true if this is a session cookie; (if no expires value,
+ this should be true)
+ comment: string;
+ comment_url: string;
+ rest: mapping of other attributes
+
+ Note that the port may be present in the headers, but unspecified ("Port"
+ rather than"Port=80", for example); if this is the case, port is None.
+
+ """
+
+ def __init__(self, version, name, value,
+ port, port_specified,
+ domain, domain_specified, domain_initial_dot,
+ path, path_specified,
+ secure,
+ expires,
+ discard,
+ comment,
+ comment_url,
+ rest):
+
+ if version is not None: version = int(version)
+ if expires is not None: expires = int(expires)
+ if port is None and port_specified is True:
+ raise ValueError("if port is None, port_specified must be false")
+
+ self.version = version
+ self.name = name
+ self.value = value
+ self.port = port
+ self.port_specified = port_specified
+ # normalise case, as per RFC 2965 section 3.3.3
+ self.domain = string.lower(domain)
+ self.domain_specified = domain_specified
+ # Sigh. We need to know whether the domain given in the
+ # cookie-attribute had an initial dot, in order to follow RFC 2965
+ # (as clarified in draft errata). Needed for the returned $Domain
+ # value.
+ self.domain_initial_dot = domain_initial_dot
+ self.path = path
+ self.path_specified = path_specified
+ self.secure = secure
+ self.expires = expires
+ self.discard = discard
+ self.comment = comment
+ self.comment_url = comment_url
+
+ self.rest = copy.copy(rest)
+
+ def is_expired(self, now=None):
+ if now is None: now = time.time()
+ if (self.expires is not None) and (self.expires <= now):
+ return True
+ return False
+
+ def __str__(self):
+ if self.port is None: p = ""
+ else: p = ":"+self.port
+ limit = self.domain + p + self.path
+ if self.name is not None:
+ namevalue = "%s=%s" % (self.name, self.value)
+ else:
+ namevalue = self.value
+ return "<Cookie %s for %s>" % (namevalue, limit)
+
+ def __repr__(self):
+ args = []
+ for name in ["version", "name", "value",
+ "port", "port_specified",
+ "domain", "domain_specified", "domain_initial_dot",
+ "path", "path_specified",
+ "secure", "expires", "discard", "comment", "comment_url"]:
+ attr = getattr(self, name)
+ args.append("%s=%s" % (name, attr))
+ args.append(repr(self.rest))
+ return "Cookie(%s)" % string.join(args, ", ")
+
+
+class CookiePolicy:
+ """Defines which cookies get accepted from and returned to server.
+
+ The subclass DefaultCookiePolicy defines the standard rules for Netscape
+ and RFC 2965 cookies -- override that if you want a customised policy.
+
+ As well as implementing set_ok and return_ok, implementations of this
+ interface must also supply the following attributes, indicating which
+ protocols should be used, and how. These can be read and set at any time,
+ though whether that makes complete sense from the protocol point of view is
+ doubtful.
+
+ Public attributes:
+
+ netscape: implement netscape protocol
+ rfc2965: implement RFC 2965 protocol
+ hide_cookie2: don't add Cookie2 header to requests (the presence of
+ this header indicates to the server that we understand RFC 2965
+ cookies)
+
+ """
+ def set_ok(self, cookie, request, unverifiable):
+ """Return true if (and only if) cookie should be accepted from server.
+
+ Currently, pre-expired cookies never get this far -- the CookieJar
+ class deletes such cookies itself.
+
+ cookie: ClientCookie.Cookie object
+ request: object implementing the interface defined by
+ CookieJar.extract_cookies.__doc__
+ unverifiable: flag indicating whether the transaction is unverifiable,
+ as defined by RFC 2965
+
+ """
+ raise NotImplementedError()
+
+ def return_ok(self, cookie, request, unverifiable):
+ """Return true if (and only if) cookie should be returned to server.
+
+ cookie: ClientCookie.Cookie object
+ request: object implementing the interface defined by
+ CookieJar.add_cookie_header.__doc__
+ unverifiable: flag indicating whether the transaction is unverifiable,
+ as defined by RFC 2965
+
+ """
+ raise NotImplementedError()
+
+ def domain_return_ok(self, domain, request, unverifiable):
+ """Return false if cookies should not be returned, given cookie domain.
+
+ This is here as an optimization, to remove the need for checking every
+ cookie with a particular domain (which may involve reading many files).
+ The default implementations of domain_return_ok and path_return_ok
+ (return True) leave all the work to return_ok.
+
+ If domain_return_ok returns true for the cookie domain, path_return_ok
+ is called for the cookie path. Otherwise, path_return_ok and return_ok
+ are never called for that cookie domain. If path_return_ok returns
+ true, return_ok is called with the Cookie object itself for a full
+ check. Otherwise, return_ok is never called for that cookie path.
+
+ Note that domain_return_ok is called for every *cookie* domain, not
+ just for the *request* domain. For example, the function might be
+ called with both ".acme.com" and "www.acme.com" if the request domain is
+ "www.acme.com". The same goes for path_return_ok.
+
+ For argument documentation, see the docstring for return_ok.
+
+ """
+ return True
+
+ def path_return_ok(self, path, request, unverifiable):
+ """Return false if cookies should not be returned, given cookie path.
+
+ See the docstring for domain_return_ok.
+
+ """
+ return True
+
+
+class DefaultCookiePolicy(CookiePolicy):
+ """Implements the standard rules for accepting and returning cookies.
+
+ Both RFC 2965 and Netscape cookies are covered.
+
+ The easiest way to provide your own policy is to override this class and
+ call its methods in your overriden implementations before adding your own
+ additional checks.
+
+ import ClientCookie
+ class MyCookiePolicy(ClientCookie.DefaultCookiePolicy):
+ def set_ok(self, cookie, request, unverifiable):
+ if not ClientCookie.DefaultCookiePolicy.set_ok(
+ self, cookie, request, unverifiable):
+ return False
+ if i_dont_want_to_store_this_cookie():
+ return False
+ return True
+
+ In addition to the features required to implement the CookiePolicy
+ interface, this class allows you to block and allow domains from setting
+ and receiving cookies. There are also some strictness switches that allow
+ you to tighten up the rather loose Netscape protocol rules a little bit (at
+ the cost of blocking some benign cookies).
+
+ A domain blacklist and whitelist is provided (both off by default). Only
+ domains not in the blacklist and present in the whitelist (if the whitelist
+ is active) participate in cookie setting and returning. Use the
+ blocked_domains constructor argument, and blocked_domains and
+ set_blocked_domains methods (and the corresponding argument and methods for
+ allowed_domains). If you set a whitelist, you can turn it off again by
+ setting it to None.
+
+ Domains in block or allow lists that do not start with a dot must
+ string-compare equal. For example, "acme.com" matches a blacklist entry of
+ "acme.com", but "www.acme.com" does not. Domains that do start with a dot
+ are matched by more specific domains too. For example, both "www.acme.com"
+ and "www.munitions.acme.com" match ".acme.com" (but "acme.com" itself does
+ not). IP addresses are an exception, and must match exactly. For example,
+ if blocked_domains contains "192.168.1.2" and ".168.1.2" 192.168.1.2 is
+ blocked, but 193.168.1.2 is not.
+
+ Additional Public Attributes:
+
+ General strictness switches
+
+ strict_domain: don't allow sites to set two-component domains with
+ country-code top-level domains like .co.uk, .gov.uk, .co.nz. etc.
+ This is far from perfect and isn't guaranteed to work!
+
+ RFC 2965 protocol strictness switches
+
+ strict_rfc2965_unverifiable: follow RFC 2965 rules on unverifiable
+ transactions (usually, an unverifiable transaction is one resulting from
+ a redirect or an image hosted on another site); if this is false, cookies
+ are NEVER blocked on the basis of verifiability
+
+ Netscape protocol strictness switches
+
+ strict_ns_unverifiable: apply RFC 2965 rules on unverifiable transactions
+ even to Netscape cookies
+ strict_ns_domain: flags indicating how strict to be with domain-matching
+ rules for Netscape cookies:
+ DomainStrictNoDots: when setting cookies, host prefix must not contain a
+ dot (eg. www.foo.bar.com can't set a cookie for .bar.com, because
+ www.foo contains a dot)
+ DomainStrictNonDomain: cookies that did not explicitly specify a Domain
+ cookie-attribute can only be returned to a domain that string-compares
+ equal to the domain that set the cookie (eg. rockets.acme.com won't
+ be returned cookies from acme.com that had no Domain cookie-attribute)
+ DomainRFC2965Match: when setting cookies, require a full RFC 2965
+ domain-match
+ DomainLiberal and DomainStrict are the most useful combinations of the
+ above flags, for convenience
+ strict_ns_set_initial_dollar: ignore cookies in Set-Cookie: headers that
+ have names starting with '$'
+ strict_ns_set_path: don't allow setting cookies whose path doesn't
+ path-match request URI
+
+ """
+
+ DomainStrictNoDots = 1
+ DomainStrictNonDomain = 2
+ DomainRFC2965Match = 4
+
+ DomainLiberal = 0
+ DomainStrict = DomainStrictNoDots|DomainStrictNonDomain
+
+ def __init__(self,
+ blocked_domains=None, allowed_domains=None,
+ netscape=True, rfc2965=True,
+ hide_cookie2=False,
+ strict_domain=False,
+ strict_rfc2965_unverifiable=True,
+ strict_ns_unverifiable=False,
+ strict_ns_domain=DomainLiberal,
+ strict_ns_set_initial_dollar=False,
+ strict_ns_set_path=False):
+ """
+ blocked_domains: sequence of domain names that we never accept cookies
+ from, nor return cookies to
+ allowed_domains: if not None, this is a sequence of the only domains
+ for which we accept and return cookies
+
+ For other arguments, see CookiePolicy.__doc__ and
+ DefaultCookiePolicy.__doc__..
+
+ """
+ self.netscape = netscape
+ self.rfc2965 = rfc2965
+ self.hide_cookie2 = hide_cookie2
+ self.strict_domain = strict_domain
+ self.strict_rfc2965_unverifiable = strict_rfc2965_unverifiable
+ self.strict_ns_unverifiable = strict_ns_unverifiable
+ self.strict_ns_domain = strict_ns_domain
+ self.strict_ns_set_initial_dollar = strict_ns_set_initial_dollar
+ self.strict_ns_set_path = strict_ns_set_path
+
+ if blocked_domains is not None:
+ self._blocked_domains = tuple(blocked_domains)
+ else:
+ self._blocked_domains = ()
+
+ if allowed_domains is not None:
+ allowed_domains = tuple(allowed_domains)
+ self._allowed_domains = allowed_domains
+
+ def blocked_domains(self):
+ """Return the sequence of blocked domains (as a tuple)."""
+ return self._blocked_domains
+ def set_blocked_domains(self, blocked_domains):
+ """Set the sequence of blocked domains."""
+ self._blocked_domains = tuple(blocked_domains)
+
+ def is_blocked(self, domain):
+ for blocked_domain in self._blocked_domains:
+ if user_domain_match(domain, blocked_domain):
+ return True
+ return False
+
+ def allowed_domains(self):
+ """Return None, or the sequence of allowed domains (as a tuple)."""
+ return self._allowed_domains
+ def set_allowed_domains(self, allowed_domains):
+ """Set the sequence of allowed domains, or None."""
+ if allowed_domains is not None:
+ allowed_domains = tuple(allowed_domains)
+ self._allowed_domains = allowed_domains
+
+ def is_not_allowed(self, domain):
+ if self._allowed_domains is None:
+ return False
+ for allowed_domain in self._allowed_domains:
+ if user_domain_match(domain, allowed_domain):
+ return False
+ return True
+
+ def set_ok(self, cookie, request, unverifiable):
+ """
+ If you override set_ok, be sure to call this method. If it returns
+ false, so should your subclass (assuming your subclass wants to be more
+ strict about which cookies to accept).
+
+ """
+ debug(" - checking cookie %s=%s" % (cookie.name, cookie.value))
+
+ assert cookie.value is not None
+
+ for n in "version", "verifiability", "name", "path", "domain", "port":
+ fn_name = "set_ok_"+n
+ fn = getattr(self, fn_name)
+ if not fn(cookie, request, unverifiable):
+ return False
+ return True
+
+ def set_ok_version(self, cookie, request, unverifiable):
+ if cookie.version is None:
+ # Version is always set to 0 by parse_ns_headers if it's a Netscape
+ # cookie, so this must be an invalid RFC 2965 cookie.
+ debug(" Set-Cookie2 without version attribute (%s=%s)" %
+ (cookie.name, cookie.value))
+ return False
+ if cookie.version > 0 and not self.rfc2965:
+ debug(" RFC 2965 cookies are switched off")
+ return False
+ elif cookie.version == 0 and not self.netscape:
+ debug(" Netscape cookies are switched off")
+ return False
+ return True
+
+ def set_ok_verifiability(self, cookie, request, unverifiable):
+ if unverifiable and is_third_party(request):
+ if cookie.version > 0 and self.strict_rfc2965_unverifiable:
+ debug(" third-party RFC 2965 cookie during unverifiable "
+ "transaction")
+ return False
+ elif cookie.version == 0 and self.strict_ns_unverifiable:
+ debug(" third-party Netscape cookie during unverifiable "
+ "transaction")
+ return False
+ return True
+
+ def set_ok_name(self, cookie, request, unverifiable):
+ # Try and stop servers setting V0 cookies designed to hack other
+ # servers that know both V0 and V1 protocols.
+ if (cookie.version == 0 and self.strict_ns_set_initial_dollar and
+ (cookie.name is not None) and startswith(cookie.name, "$")):
+ debug(" illegal name (starts with '$'): '%s'" % cookie.name)
+ return False
+ return True
+
+ def set_ok_path(self, cookie, request, unverifiable):
+ if cookie.path_specified:
+ req_path = request_path(request)
+ if ((cookie.version > 0 or
+ (cookie.version == 0 and self.strict_ns_set_path)) and
+ not startswith(req_path, cookie.path)):
+ debug(" path attribute %s is not a prefix of request "
+ "path %s" % (cookie.path, req_path))
+ return False
+ return True
+
+ def set_ok_domain(self, cookie, request, unverifiable):
+ if self.is_blocked(cookie.domain):
+ debug(" domain %s is in user block-list" % cookie.domain)
+ return False
+ if self.is_not_allowed(cookie.domain):
+ debug(" domain %s is not in user allow-list" % cookie.domain)
+ return False
+ if cookie.domain_specified:
+ req_host, erhn = eff_request_host(request)
+ domain = cookie.domain
+ if self.strict_domain and (string.count(domain, ".") >= 2):
+ i = string.rfind(domain, ".")
+ j = string.rfind(domain, ".", 0, i)
+ if j == 0: # domain like .foo.bar
+ tld = domain[i+1:]
+ sld = domain[j+1:i]
+ if (string.lower(sld) in [
+ "co", "ac",
+ "com", "edu", "org", "net", "gov", "mil", "int"] and
+ len(tld) == 2):
+ # domain like .co.uk
+ debug(" country-code second level domain %s" %
+ domain)
+ return False
+ if startswith(domain, "."):
+ undotted_domain = domain[1:]
+ else:
+ undotted_domain = domain
+ embedded_dots = (string.find(undotted_domain, ".") >= 0)
+ if not embedded_dots and domain != ".local":
+ debug(" non-local domain %s contains no embedded dot" %
+ domain)
+ return False
+ if cookie.version == 0:
+ if (not endswith(erhn, domain) and
+ (not startswith(erhn, ".") and
+ not endswith("."+erhn, domain))):
+ debug(" effective request-host %s (even with added "
+ "initial dot) does not end end with %s" %
+ (erhn, domain))
+ return False
+ if (cookie.version > 0 or
+ (self.strict_ns_domain & self.DomainRFC2965Match)):
+ if not domain_match(erhn, domain):
+ debug(" effective request-host %s does not domain-match "
+ "%s" % (erhn, domain))
+ return False
+ if (cookie.version > 0 or
+ (self.strict_ns_domain & self.DomainStrictNoDots)):
+ host_prefix = req_host[:-len(domain)]
+ if (string.find(host_prefix, ".") >= 0 and
+ not IPV4_RE.search(req_host)):
+ debug(" host prefix %s for domain %s contains a dot" %
+ (host_prefix, domain))
+ return False
+ return True
+
+ def set_ok_port(self, cookie, request, unverifiable):
+ if cookie.port_specified:
+ req_port = request_port(request)
+ if req_port is None:
+ req_port = "80"
+ else:
+ req_port = str(req_port)
+ for p in string.split(cookie.port, ","):
+ try:
+ int(p)
+ except ValueError:
+ debug(" bad port %s (not numeric)" % p)
+ return False
+ if p == req_port:
+ break
+ else:
+ debug(" request port (%s) not found in %s" %
+ (req_port, cookie.port))
+ return False
+ return True
+
+ def return_ok(self, cookie, request, unverifiable):
+ """
+ If you override return_ok, be sure to call this method. If it returns
+ false, so should your subclass.
+
+ """
+ # Path has already been checked by path_return_ok, and domain blocking
+ # done by domain_return_ok.
+ debug(" - checking cookie %s=%s" % (cookie.name, cookie.value))
+
+ for n in "version", "verifiability", "secure", "expires", "port", "domain":
+ fn_name = "return_ok_"+n
+ fn = getattr(self, fn_name)
+ if not fn(cookie, request, unverifiable):
+ return False
+ return True
+
+ def return_ok_version(self, cookie, request, unverifiable):
+ if cookie.version > 0 and not self.rfc2965:
+ debug(" RFC 2965 cookies are switched off")
+ return False
+ elif cookie.version == 0 and not self.netscape:
+ debug(" Netscape cookies are switched off")
+ return False
+ return True
+
+ def return_ok_verifiability(self, cookie, request, unverifiable):
+ if unverifiable and is_third_party(request):
+ if cookie.version > 0 and self.strict_rfc2965_unverifiable:
+ debug(" third-party RFC 2965 cookie during unverifiable "
+ "transaction")
+ return False
+ elif cookie.version == 0 and self.strict_ns_unverifiable:
+ debug(" third-party Netscape cookie during unverifiable "
+ "transaction")
+ return False
+ return True
+
+ def return_ok_secure(self, cookie, request, unverifiable):
+ if cookie.secure and request.get_type() != "https":
+ debug(" secure cookie with non-secure request")
+ return False
+ return True
+
+ def return_ok_expires(self, cookie, request, unverifiable):
+ if cookie.is_expired(self._now):
+ debug(" cookie expired")
+ return False
+ return True
+
+ def return_ok_port(self, cookie, request, unverifiable):
+ if cookie.port:
+ req_port = request_port(request)
+ if req_port is None:
+ req_port = "80"
+ for p in string.split(cookie.port, ","):
+ if p == req_port:
+ break
+ else:
+ debug(" request port %s does not match cookie port %s" %
+ (req_port, cookie.port))
+ return False
+ return True
+
+ def return_ok_domain(self, cookie, request, unverifiable):
+ req_host, erhn = eff_request_host(request)
+ domain = cookie.domain
+
+ # strict check of non-domain cookies: Mozilla does this, MSIE5 doesn't
+ if (cookie.version == 0 and
+ (self.strict_ns_domain & self.DomainStrictNonDomain) and
+ not cookie.domain_specified and domain != erhn):
+ debug(" cookie with unspecified domain does not string-compare "
+ "equal to request domain")
+ return False
+
+ if cookie.version > 0 and not domain_match(erhn, domain):
+ debug(" effective request-host name %s does not domain-match "
+ "RFC 2965 cookie domain %s" % (erhn, domain))
+ return False
+ if cookie.version == 0 and not endswith("."+req_host, domain):
+ debug(" request-host %s does not match Netscape cookie domain "
+ "%s" % (req_host, domain))
+ return False
+ return True
+
+ def domain_return_ok(self, domain, request, unverifiable):
+ if self.is_blocked(domain):
+ debug(" domain %s is in user block-list" % domain)
+ return False
+ if self.is_not_allowed(domain):
+ debug(" domain %s is not in user allow-list" % domain)
+ return False
+ return True
+
+ def path_return_ok(self, path, request, unverifiable):
+ debug("- checking cookie path=%s" % path)
+ req_path = request_path(request)
+ if not startswith(req_path, path):
+ debug(" %s does not path-match %s" % (req_path, path))
+ return False
+ return True
+
+
+def lwp_cookie_str(cookie):
+ """Return string representation of Cookie in an the LWP cookie file format.
+
+ Actually, the format is slightly extended from that used by LWP's
+ (libwww-perl's) HTTP::Cookies, to avoid losing some RFC 2965
+ information not recorded by LWP.
+
+ Used by the CookieJar base class for saving cookies to a file.
+
+ """
+ h = [(cookie.name, cookie.value),
+ ("path", cookie.path),
+ ("domain", cookie.domain)]
+ if cookie.port is not None: h.append(("port", cookie.port))
+ if cookie.path_specified: h.append(("path_spec", None))
+ if cookie.port_specified: h.append(("port_spec", None))
+ if cookie.domain_initial_dot: h.append(("domain_dot", None))
+ if cookie.secure: h.append(("secure", None))
+ if cookie.expires: h.append(("expires",
+ time2isoz(float(cookie.expires))))
+ if cookie.discard: h.append(("discard", None))
+ if cookie.comment: h.append(("comment", cookie.comment))
+ if cookie.comment_url: h.append(("commenturl", cookie.comment_url))
+
+ keys = cookie.rest.keys()
+ keys.sort()
+ for k in keys:
+ h.append((k, str(cookie.rest[k])))
+
+ h.append(("version", str(cookie.version)))
+
+ return join_header_words([h])
+
+def vals_sorted_by_key(adict):
+ keys = adict.keys()
+ keys.sort()
+ return map(adict.get, keys)
+
+class MappingIterator:
+ """Iterates over nested mapping, depth-first, in sorted order by key."""
+ def __init__(self, mapping):
+ self._s = [(vals_sorted_by_key(mapping), 0, None)] # LIFO stack
+
+ def __iter__(self): return self
+
+ def next(self):
+ # this is hairy because of lack of generators
+ while 1:
+ try:
+ vals, i, prev_item = self._s.pop()
+ except IndexError:
+ raise StopIteration()
+ if i < len(vals):
+ item = vals[i]
+ i = i + 1
+ self._s.append((vals, i, prev_item))
+ try:
+ item.items
+ except AttributeError:
+ # non-mapping
+ break
+ else:
+ # mapping
+ self._s.append((vals_sorted_by_key(item), 0, item))
+ continue
+ return item
+
+
+# Used as second parameter to dict.get method, to distinguish absent
+# dict key from one with a None value.
+class Absent: pass
+
+class CookieJar:
+ """Collection of HTTP cookies.
+
+ The major methods are extract_cookies and add_cookie_header; these are all
+ you are likely to need. In fact, you probably don't even need to know
+ about this class: use the cookie-aware extensions to the urllib2 callables
+ provided by this module: urlopen in particular (and perhaps also
+ build_opener, install_opener, HTTPCookieProcessor, HTTPRefererProcessor,
+ HTTPRefreshHandler, HTTPEquivProcessor, SeekableProcessor, etc.).
+
+ CookieJar supports the iterator protocol. Iteration also works in 1.5.2:
+
+ for cookie in cookiejar:
+ # do something with cookie
+
+ Methods:
+
+ CookieJar(filename=None, delayload=False, policy=None)
+ add_cookie_header(request, unverifiable=False)
+ extract_cookies(response, request, unverifiable=False)
+ make_cookies(response, request)
+ set_cookie_if_ok(cookie, request, unverifiable=False)
+ set_cookie(cookie)
+ save(filename=None, ignore_discard=False, ignore_expires=False)
+ load(filename=None, ignore_discard=False, ignore_expires=False)
+ revert(filename=None, ignore_discard=False, ignore_expires=False)
+ clear(domain=None, path=None, key=None)
+ clear_session_cookies()
+ clear_expired_cookies()
+ as_string(skip_discard=False) (str(cookies) also works)
+
+
+ Public attributes
+
+ filename: filename for loading and saving cookies
+ policy: CookiePolicy object
+
+ Public readable attributes
+
+ delayload: request that cookies are lazily loaded from disk; this is only
+ a hint since this only affects performance, not behaviour (unless the
+ cookies on disk are changing); a CookieJar object may ignore it (in fact,
+ only MSIECookieJar lazily loads cookies at the moment)
+ cookies: a three-level dictionary [domain][path][key] containing Cookie
+ instances; you almost certainly don't need to use this
+
+ """
+
+ non_word_re = re.compile(r"\W")
+ quote_re = re.compile(r"([\"\\])")
+ strict_domain_re = re.compile(r"\.?[^.]*")
+ domain_re = re.compile(r"[^.]*")
+ dots_re = re.compile(r"^\.+")
+
+ magic_re = r"^\#LWP-Cookies-(\d+\.\d+)"
+
+ def __init__(self, filename=None, delayload=False, policy=None):
+ """
+ See CookieJar.__doc__ for argument documentation.
+
+ Cookies are NOT loaded from the named file until either the load or
+ revert method is called.
+
+ """
+ self.filename = filename
+ self.delayload = delayload
+
+ if policy is None:
+ policy = DefaultCookiePolicy()
+ self.policy = policy
+
+ self._cookies_lock = _threading.RLock()
+ self.cookies = {}
+
+ # for __getitem__ iteration in pre-2.2 Pythons
+ self._prev_getitem_index = 0
+
+ def _cookies_for_domain(self, domain, request, unverifiable):
+ """Return a list of cookies to be returned to server."""
+ debug("Checking %s for cookies to return" % domain)
+ if not self.policy.domain_return_ok(domain, request, unverifiable):
+ return []
+
+ cookies_by_path = self.cookies.get(domain)
+ if cookies_by_path is None:
+ return []
+
+ cookies = []
+ for path in cookies_by_path.keys():
+ if not self.policy.path_return_ok(path, request, unverifiable):
+ continue
+ for name, cookie in cookies_by_path[path].items():
+ if not self.policy.return_ok(cookie, request, unverifiable):
+ debug(" not returning cookie")
+ continue
+ debug(" it's a match")
+ cookies.append(cookie)
+
+ return cookies
+
+ def _cookie_attrs(self, cookies):
+ """Return a list of cookie-attributes to be returned to server.
+
+ like ['foo="bar"; $Path="/"', ...]
+
+ The $Version attribute is also added when appropriate (currently only
+ once per request).
+
+ """
+ # add cookies in order of most specific (ie. longest) path first
+ def decreasing_size(a, b): return cmp(len(b.path), len(a.path))
+ cookies.sort(decreasing_size)
+
+ version_set = False
+
+ attrs = []
+ for cookie in cookies:
+ # set version of Cookie header
+ # XXX
+ # What should it be if multiple matching Set-Cookie headers have
+ # different versions themselves?
+ # Answer: there is no answer; was supposed to be settled by
+ # RFC 2965 errata, but that may never appear...
+ version = cookie.version
+ if not version_set:
+ version_set = True
+ if version > 0:
+ attrs.append("$Version=%s" % version)
+
+ # quote cookie value if necessary
+ # (not for Netscape protocol, which already has any quotes
+ # intact, due to the poorly-specified Netscape Cookie: syntax)
+ if self.non_word_re.search(cookie.value) and version > 0:
+ value = self.quote_re.sub(r"\\\1", cookie.value)
+ else:
+ value = cookie.value
+
+ # add cookie-attributes to be returned in Cookie header
+ if cookie.name is None:
+ attrs.append(value)
+ else:
+ attrs.append("%s=%s" % (cookie.name, value))
+ if version > 0:
+ if cookie.path_specified:
+ attrs.append('$Path="%s"' % cookie.path)
+ if startswith(cookie.domain, "."):
+ domain = cookie.domain
+ if (not cookie.domain_initial_dot and
+ startswith(domain, ".")):
+ domain = domain[1:]
+ attrs.append('$Domain="%s"' % domain)
+ if cookie.port is not None:
+ p = "$Port"
+ if cookie.port_specified:
+ p = p + ('="%s"' % cookie.port)
+ attrs.append(p)
+
+ return attrs
+
+ def add_cookie_header(self, request, unverifiable=False):
+ """Add correct Cookie: header to request (urllib2.Request object).
+
+ The Cookie2 header is also added unless policy.hide_cookie2 is true.
+
+ The request object (usually a urllib2.Request instance) must support
+ the methods get_full_url, get_host, get_type and add_header, as
+ documented by urllib2, and the attributes headers (a mapping containing
+ the request's HTTP headers) and port (the port number).
+
+ If unverifiable is true, it will be assumed that the transaction is
+ unverifiable as defined by RFC 2965, and appropriate action will be
+ taken.
+
+ """
+ debug("add_cookie_header")
+ self._cookies_lock.acquire()
+
+ self.policy._now = self._now = int(time.time())
+
+ req_host, erhn = eff_request_host(request)
+ strict_non_domain = \
+ self.policy.strict_ns_domain & self.policy.DomainStrictNonDomain
+
+ cookies = []
+
+ domain = erhn
+ # First check origin server effective host name for an exact match.
+ cookies.extend(self._cookies_for_domain(domain, request, unverifiable))
+ # Then, start with effective request-host with initial dot prepended
+ # (for Netscape cookies with explicitly-set Domain cookie-attributes)
+ # -- eg. .foo.bar.baz.com and check all possible derived domain strings
+ # (.bar.baz.com, bar.baz.com, .baz.com) for cookies.
+ # This isn't too finicky about which domains to check, because we have
+ # to cover both V0 and V1 cookies, and policy.return_ok will check the
+ # domain in any case.
+ if not IPV4_RE.search(req_host):
+ # IP addresses must string-compare equal in order to domain-match
+ # (IP address case will have been checked above as erhn == req_host
+ # in that case).
+ if domain != ".local":
+ domain = "."+domain
+ while string.find(domain, ".") >= 0:
+ cookies.extend(self._cookies_for_domain(
+ domain, request, unverifiable))
+ if strict_non_domain:
+ domain = self.strict_domain_re.sub("", domain, 1)
+ else:
+ # strip either initial dot only, or initial component only
+ # .www.foo.com --> www.foo.com
+ # www.foo.com --> .foo.com
+ if startswith(domain, "."):
+ domain = domain[1:]
+ # we've already done the erhn
+ if domain == erhn:
+ domain = self.domain_re.sub("", domain, 1)
+ else:
+ domain = self.domain_re.sub("", domain, 1)
+
+ attrs = self._cookie_attrs(cookies)
+ if attrs:
+ request.add_header("Cookie", string.join(attrs, "; "))
+
+ # if necessary, advertise that we know RFC 2965
+ if self.policy.rfc2965 and not self.policy.hide_cookie2:
+ for cookie in cookies:
+ if cookie.version != 1:
+ request.add_header("Cookie2", '$Version="1"')
+ break
+
+ self._cookies_lock.release()
+
+ self.clear_expired_cookies()
+
+ def _normalized_cookie_tuples(self, attrs_set):
+ """Return list of tuples containing normalised cookie information.
+
+ attrs_set is the list of lists of key,value pairs extracted from
+ the Set-Cookie or Set-Cookie2 headers.
+
+ Tuples are name, value, standard, rest, where name and value are the
+ cookie name and value, standard is a dictionary containing the standard
+ cookie-attributes (discard, secure, version, expires or max-age,
+ domain, path and port) and rest is a dictionary containing the rest of
+ the cookie-attributes.
+
+ """
+ cookie_tuples = []
+
+ boolean_attrs = "discard", "secure"
+ value_attrs = ("version",
+ "expires", "max-age",
+ "domain", "path", "port",
+ "comment", "commenturl")
+
+ for cookie_attrs in attrs_set:
+ name, value = cookie_attrs[0]
+
+ # Build dictionary of standard cookie-attributes (standard) and
+ # dictionary of other cookie-attributes (rest).
+
+ # Note: expiry time is normalised to seconds since epoch. V0
+ # cookies should have the Expires cookie-attribute, and V1 cookies
+ # should have Max-Age, but since V1 includes RFC 2109 cookies (and
+ # since V0 cookies may be a mish-mash of Netscape and RFC 2109), we
+ # accept either (but prefer Max-Age).
+ max_age_set = False
+
+ bad_cookie = False
+
+ standard = {}
+ rest = {}
+ for k, v in cookie_attrs[1:]:
+ lc = string.lower(k)
+ # don't lose case distinction for unknown fields
+ if lc in value_attrs or lc in boolean_attrs:
+ k = lc
+ if k in boolean_attrs and v is None:
+ # boolean cookie-attribute is present, but has no value
+ # (like "discard", rather than "port=80")
+ v = True
+ if standard.has_key(k):
+ # only first value is significant
+ continue
+ if k == "domain":
+ if v is None:
+ debug(" missing value for domain attribute")
+ bad_cookie = True
+ break
+ # RFC 2965 section 3.3.3
+ v = string.lower(v)
+ if k == "expires":
+ if max_age_set:
+ # Prefer max-age to expires (like Mozilla)
+ continue
+ if v is None:
+ debug(" missing or invalid value for expires "
+ "attribute: treating as session cookie")
+ continue
+ if k == "max-age":
+ max_age_set = True
+ try:
+ v = int(v)
+ except ValueError:
+ debug(" missing or invalid (non-numeric) value for "
+ "max-age attribute")
+ bad_cookie = True
+ break
+ # convert RFC 2965 Max-Age to seconds since epoch
+ # XXX Strictly you're supposed to follow RFC 2616
+ # age-calculation rules. Remember that zero Max-Age is a
+ # is a request to discard (old and new) cookie, though.
+ k = "expires"
+ v = self._now + v
+ if (k in value_attrs) or (k in boolean_attrs):
+ if (v is None and
+ k not in ["port", "comment", "commenturl"]):
+ debug(" missing value for %s attribute" % k)
+ bad_cookie = True
+ break
+ standard[k] = v
+ else:
+ rest[k] = v
+
+ if bad_cookie:
+ continue
+
+ cookie_tuples.append((name, value, standard, rest))
+
+ return cookie_tuples
+
+ def _cookie_from_cookie_tuple(self, tup, request):
+ # standard is dict of standard cookie-attributes, rest is dict of the
+ # rest of them
+ name, value, standard, rest = tup
+
+ domain = standard.get("domain", Absent)
+ path = standard.get("path", Absent)
+ port = standard.get("port", Absent)
+ expires = standard.get("expires", Absent)
+
+ # set the easy defaults
+ version = standard.get("version", None)
+ if version is not None: version = int(version)
+ secure = standard.get("secure", False)
+ # (discard is also set if expires is Absent)
+ discard = standard.get("discard", False)
+ comment = standard.get("comment", None)
+ comment_url = standard.get("commenturl", None)
+
+ # set default path
+ if path is not Absent and path != "":
+ path_specified = True
+ path = normalize_path(path)
+ else:
+ path_specified = False
+ path = request_path(request)
+ i = string.rfind(path, "/")
+ if i != -1:
+ if version == 0:
+ # Netscape spec parts company from reality here
+ path = path[:i]
+ else:
+ path = path[:i+1]
+ if len(path) == 0: path = "/"
+
+ # set default domain
+ domain_specified = domain is not Absent
+ # but first we have to remember whether it starts with a dot
+ domain_initial_dot = False
+ if domain_specified:
+ domain_initial_dot = bool(startswith(domain, "."))
+ if domain is Absent:
+ req_host, erhn = eff_request_host(request)
+ domain = erhn
+ elif not startswith(domain, "."):
+ domain = "."+domain
+
+ # set default port
+ port_specified = False
+ if port is not Absent:
+ if port is None:
+ # Port attr present, but has no value: default to request port.
+ # Cookie should then only be sent back on that port.
+ port = request_port(request)
+ else:
+ port_specified = True
+ port = re.sub(r"\s+", "", port)
+ else:
+ # No port attr present. Cookie can be sent back on any port.
+ port = None
+
+ # set default expires and discard
+ if expires is Absent:
+ expires = None
+ discard = True
+ elif expires <= self._now:
+ # Expiry date in past is request to delete cookie. This can't be
+ # in DefaultCookiePolicy, because can't delete cookies there.
+ try:
+ del self.cookies[domain][path][name]
+ except KeyError:
+ pass
+ else:
+ debug("Expiring cookie, domain='%s', path='%s', name='%s'" %
+ (domain, path, name))
+ return None
+
+ return Cookie(version,
+ name, value,
+ port, port_specified,
+ domain, domain_specified, domain_initial_dot,
+ path, path_specified,
+ secure,
+ expires,
+ discard,
+ comment,
+ comment_url,
+ rest)
+
+ def _cookies_from_attrs_set(self, attrs_set, request):
+ cookie_tuples = self._normalized_cookie_tuples(attrs_set)
+ cookies = []
+ for tup in cookie_tuples:
+ cookie = self._cookie_from_cookie_tuple(tup, request)
+ if cookie: cookies.append(cookie)
+ return cookies
+
+ def make_cookies(self, response, request):
+ """Return sequence of Cookie objects extracted from response object.
+
+ See extract_cookies.__doc__ for the interfaces required of the
+ response and request arguments.
+
+ """
+ # get cookie-attributes for RFC 2965 and Netscape protocols
+ headers = response.info()
+ rfc2965_hdrs = getheaders(headers, "Set-Cookie2")
+ ns_hdrs = getheaders(headers, "Set-Cookie")
+
+ rfc2965 = self.policy.rfc2965
+ netscape = self.policy.netscape
+
+ if ((not rfc2965_hdrs and not ns_hdrs) or
+ (not ns_hdrs and not rfc2965) or
+ (not rfc2965_hdrs and not netscape) or
+ (not netscape and not rfc2965)):
+ return [] # no relevant cookie headers: quick exit
+
+ try:
+ cookies = self._cookies_from_attrs_set(
+ split_header_words(rfc2965_hdrs), request)
+ except:
+ reraise_unmasked_exceptions()
+ cookies = []
+
+ if ns_hdrs and netscape:
+ try:
+ ns_cookies = self._cookies_from_attrs_set(
+ parse_ns_headers(ns_hdrs), request)
+ except:
+ reraise_unmasked_exceptions()
+ ns_cookies = []
+
+ # Look for Netscape cookies (from Set-Cookie headers) that match
+ # corresponding RFC 2965 cookies (from Set-Cookie2 headers).
+ # For each match, keep the RFC 2965 cookie and ignore the Netscape
+ # cookie (RFC 2965 section 9.1). Actually, RFC 2109 cookies are
+ # bundled in with the Netscape cookies for this purpose, which is
+ # reasonable behaviour.
+ if rfc2965:
+ lookup = {}
+ for cookie in cookies:
+ lookup[(cookie.domain, cookie.path, cookie.name)] = None
+
+ def no_matching_rfc2965(ns_cookie, lookup=lookup):
+ key = ns_cookie.domain, ns_cookie.path, ns_cookie.name
+ return not lookup.has_key(key)
+ ns_cookies = filter(no_matching_rfc2965, ns_cookies)
+
+ if ns_cookies:
+ cookies.extend(ns_cookies)
+
+ return cookies
+
+ def set_cookie_if_ok(self, cookie, request, unverifiable=False):
+ """Set a cookie if policy says it's OK to do so.
+
+ cookie: ClientCookie.Cookie instance
+ request: see extract_cookies.__doc__ for the required interface
+ unverifiable: see extract_cookies.__doc__
+
+ """
+ self._cookies_lock.acquire()
+ self.policy._now = self._now = int(time.time())
+
+ if self.policy.set_ok(cookie, request, unverifiable):
+ self.set_cookie(cookie)
+
+ self._cookies_lock.release()
+
+ def set_cookie(self, cookie):
+ """Set a cookie, without checking whether or not it should be set.
+
+ cookie: ClientCookie.Cookie instance
+ """
+ c = self.cookies
+ self._cookies_lock.acquire()
+ try:
+ if not c.has_key(cookie.domain): c[cookie.domain] = {}
+ c2 = c[cookie.domain]
+ if not c2.has_key(cookie.path): c2[cookie.path] = {}
+ c3 = c2[cookie.path]
+ c3[cookie.name] = cookie
+ finally:
+ self._cookies_lock.release()
+
+ def extract_cookies(self, response, request, unverifiable=False):
+ """Extract cookies from response, where allowable given the request.
+
+ Look for allowable Set-Cookie: and Set-Cookie2: headers in the response
+ object passed as argument. Any of these headers that are found are
+ used to update the state of the object (subject to the policy.set_ok
+ method's approval).
+
+ The response object (usually be the result of a call to
+ ClientCookie.urlopen, or similar) should support an info method, which
+ returns a mimetools.Message object (in fact, the 'mimetools.Message
+ object' may be any object that provides a getallmatchingheaders
+ method).
+
+ The request object (usually a urllib2.Request instance) must support
+ the methods get_full_url and get_host, as documented by urllib2, and
+ the attributes headers (a mapping containing the request's HTTP
+ headers) and port (the port number). The request is used to set
+ default values for cookie-attributes as well as for checking that the
+ cookie is OK to be set.
+
+ If unverifiable is true, it will be assumed that the transaction is
+ unverifiable as defined by RFC 2965, and appropriate action will be
+ taken.
+
+ """
+ debug("extract_cookies: %s" % response.info())
+ self._cookies_lock.acquire()
+ self.policy._now = self._now = int(time.time())
+
+ for cookie in self.make_cookies(response, request):
+ if self.policy.set_ok(cookie, request, unverifiable):
+ debug(" setting cookie: "+str(cookie))
+ self.set_cookie(cookie)
+ self._cookies_lock.release()
+
+ def save(self, filename=None, ignore_discard=False, ignore_expires=False):
+ """Save cookies to a file.
+
+ filename: name of file in which to save cookies
+ ignore_discard: save even cookies set to be discarded
+ ignore_expires: save even cookies that have expired
+
+ The file is overwritten if it already exists, thus wiping all its
+ cookies. Saved cookies can be restored later using the load or revert
+ methods. If filename is not specified, self.filename is used; if
+ self.filename is None, ValueError is raised.
+
+ The CookieJar base class saves a sequence of "Set-Cookie3" lines.
+ "Set-Cookie3" is the format used by the libwww-perl libary, not known
+ to be compatible with any browser. The MozillaCookieJar subclass can
+ be used to save in a format compatible with the Netscape/Mozilla
+ browsers.
+
+ """
+ if filename is None:
+ if self.filename is not None: filename = self.filename
+ else: raise ValueError(MISSING_FILENAME_TEXT)
+
+ f = open(filename, "w")
+ try:
+ # There really isn't an LWP Cookies 2.0 format, but this indicates
+ # that there is extra information in here (domain_dot and
+ # port_spec) while still being compatible with libwww-perl, I hope.
+ f.write("#LWP-Cookies-2.0\n")
+ f.write(self.as_lwp_str(not ignore_discard, not ignore_expires))
+ finally:
+ f.close()
+
+ def load(self, filename=None, ignore_discard=False, ignore_expires=False):
+ """Load cookies from a file.
+
+ Old cookies are kept unless overwritten by newly loaded ones.
+
+ Cookies in the file will be loaded even if they have expired or are
+ marked to be discarded.
+
+ If filename is not specified, self.filename is used; if self.filename
+ is None, ValueError is raised. The named file must be in the format
+ understood by the class, or IOError will be raised. This format will
+ be identical to that written by the save method, unless the load format
+ is not sufficiently well understood (as is the case for MSIECookieJar).
+
+ Note for subclassers: overridden versions of this method should not
+ alter the object's state other than by calling self.set_cookie.
+
+ """
+ if filename is None:
+ if self.filename is not None: filename = self.filename
+ else: raise ValueError(MISSING_FILENAME_TEXT)
+
+ f = open(filename)
+ try:
+ self._really_load(f, filename, ignore_discard, ignore_expires)
+ finally:
+ f.close()
+
+ def _really_load(self, f, filename, ignore_discard, ignore_expires):
+ magic = f.readline()
+ if not re.search(self.magic_re, magic):
+ msg = "%s does not seem to contain cookies" % filename
+ raise IOError(msg)
+
+ now = time.time()
+
+ header = "Set-Cookie3:"
+ boolean_attrs = ("port_spec", "path_spec", "domain_dot",
+ "secure", "discard")
+ value_attrs = ("version",
+ "port", "path", "domain",
+ "expires",
+ "comment", "commenturl")
+
+ try:
+ while 1:
+ line = f.readline()
+ if line == "": break
+ if not startswith(line, header):
+ continue
+ line = string.strip(line[len(header):])
+
+ for data in split_header_words([line]):
+ name, value = data[0]
+ # name and value are an exception here, since a plain "foo"
+ # (with no "=", unlike "bar=foo") means a cookie with no
+ # name and value "foo". With all other cookie-attributes,
+ # the situation is reversed: "foo" means an attribute named
+ # "foo" with no value!
+ if value is None:
+ name, value = value, name
+ standard = {}
+ rest = {}
+ for k in boolean_attrs:
+ standard[k] = False
+ for k, v in data[1:]:
+ if k is not None:
+ lc = string.lower(k)
+ else:
+ lc = None
+ # don't lose case distinction for unknown fields
+ if (lc in value_attrs) or (lc in boolean_attrs):
+ k = lc
+ if k in boolean_attrs:
+ if v is None: v = True
+ standard[k] = v
+ elif k in value_attrs:
+ standard[k] = v
+ else:
+ rest[k] = v
+
+ h = standard.get
+ expires = h("expires")
+ discard = h("discard")
+ if expires is not None:
+ expires = iso2time(expires)
+ if expires is None:
+ discard = True
+ domain = h("domain")
+ domain_specified = startswith(domain, ".")
+ c = Cookie(h("version"), name, value,
+ h("port"), h("port_spec"),
+ domain, domain_specified, h("domain_dot"),
+ h("path"), h("path_spec"),
+ h("secure"),
+ expires,
+ discard,
+ h("comment"),
+ h("commenturl"),
+ rest)
+ if not ignore_discard and c.discard:
+ continue
+ if not ignore_expires and c.is_expired(now):
+ continue
+ self.set_cookie(c)
+ except:
+ reraise_unmasked_exceptions((IOError,))
+ raise IOError("invalid Set-Cookie3 format file %s" % filename)
+
+ def revert(self, filename=None,
+ ignore_discard=False, ignore_expires=False):
+ """Clear all cookies and reload cookies from a saved file.
+
+ Raises IOError if reversion is not successful; the object's state will
+ not be altered if this happens.
+
+ """
+ if filename is None:
+ if self.filename is not None: filename = self.filename
+ else: raise ValueError(MISSING_FILENAME_TEXT)
+
+ self._cookies_lock.acquire()
+
+ old_state = copy.deepcopy(self.cookies)
+ self.cookies = {}
+ try:
+ self.load(filename, ignore_discard, ignore_expires)
+ except IOError:
+ self.cookies = old_state
+ raise
+
+ self._cookies_lock.release()
+
+ def clear(self, domain=None, path=None, name=None):
+ """Clear some cookies.
+
+ Invoking this method without arguments will clear all cookies. If
+ given a single argument, only cookies belonging to that domain will be
+ removed. If given two arguments, cookies belonging to the specified
+ path within that domain are removed. If given three arguments, then
+ the cookie with the specified name, path and domain is removed.
+
+ Raises KeyError if no matching cookie exists.
+
+ """
+ if name is not None:
+ if (domain is None) or (path is None):
+ raise ValueError(
+ "domain and path must be given to remove a cookie by name")
+ del self.cookies[domain][path][name]
+ elif path is not None:
+ if domain is None:
+ raise ValueError(
+ "domain must be given to remove cookies by path")
+ del self.cookies[domain][path]
+ elif domain is not None:
+ del self.cookies[domain]
+ else:
+ self.cookies = {}
+
+ def clear_session_cookies(self):
+ """Discard all session cookies.
+
+ Discards all cookies held by object which had either no Max-Age or
+ Expires cookie-attribute or an explicit Discard cookie-attribute, or
+ which otherwise have ended up with a true discard attribute. For
+ interactive browsers, the end of a session usually corresponds to
+ closing the browser window.
+
+ Note that the save method won't save session cookies anyway, unless you
+ ask otherwise by passing a true ignore_discard argument.
+
+ """
+ self._cookies_lock.acquire()
+ for cookie in self:
+ if cookie.discard:
+ del self.cookies[cookie.domain][cookie.path][cookie.name]
+ self._cookies_lock.release()
+
+ def clear_expired_cookies(self):
+ """Discard all expired cookies.
+
+ You probably don't need to call this method: expired cookies are never
+ sent back to the server (provided you're using DefaultCookiePolicy),
+ this method is called by CookieJar itself every so often, and the save
+ method won't save expired cookies anyway (unless you ask otherwise by
+ passing a true ignore_expires argument).
+
+ """
+ self._cookies_lock.acquire()
+ now = time.time()
+ for cookie in self:
+ if cookie.is_expired(now):
+ del self.cookies[cookie.domain][cookie.path][cookie.name]
+ self._cookies_lock.release()
+
+ def __getitem__(self, i):
+ if i == 0:
+ self._getitem_iterator = self.__iter__()
+ elif self._prev_getitem_index != i-1: raise IndexError(
+ "CookieJar.__getitem__ only supports sequential iteration")
+ self._prev_getitem_index = i
+ try:
+ return self._getitem_iterator.next()
+ except StopIteration:
+ raise IndexError()
+
+ def __iter__(self):
+ return MappingIterator(self.cookies)
+
+ def __len__(self):
+ """Return number of contained cookies."""
+ i = 0
+ for cookie in self: i = i + 1
+ return i
+
+ def __repr__(self):
+ r = []
+ for cookie in self: r.append(repr(cookie))
+ return "<%s[%s]>" % (self.__class__, string.join(r, ", "))
+
+ def __str__(self):
+ r = []
+ for cookie in self: r.append(str(cookie))
+ return "<%s[%s]>" % (self.__class__, string.join(r, ", "))
+
+ def as_lwp_str(self, skip_discard=False, skip_expired=False):
+ """Return cookies as a string of "\n"-separated "Set-Cookie3" headers.
+
+ If skip_discard is true, it will not return lines for cookies with the
+ Discard cookie-attribute.
+
+ """
+ now = time.time()
+ r = []
+ for cookie in self:
+ if skip_discard and cookie.discard:
+ continue
+ if skip_expired and cookie.is_expired(now):
+ continue
+ r.append("Set-Cookie3: %s" % lwp_cookie_str(cookie))
+ return string.join(r+[""], "\n")
diff --git a/tools/bug_tool/ClientCookie/_Debug.py b/tools/bug_tool/ClientCookie/_Debug.py
new file mode 100644
index 0000000000..17f050e252
--- /dev/null
+++ b/tools/bug_tool/ClientCookie/_Debug.py
@@ -0,0 +1,9 @@
+import ClientCookie
+
+def debug(text):
+ if ClientCookie.CLIENTCOOKIE_DEBUG: _debug(text)
+
+def _debug(text, *args):
+ if args:
+ text = text % args
+ ClientCookie.DEBUG_STREAM.write(text+"\n")
diff --git a/tools/bug_tool/ClientCookie/_HeadersUtil.py b/tools/bug_tool/ClientCookie/_HeadersUtil.py
new file mode 100644
index 0000000000..da7852c4e0
--- /dev/null
+++ b/tools/bug_tool/ClientCookie/_HeadersUtil.py
@@ -0,0 +1,224 @@
+"""HTTP header value parsing utility functions.
+
+from ClientCookie._HeadersUtil import split_header_words
+values = split_header_words(h.headers["Content-Type"])
+
+This module provides a few functions that help parsing and construction of
+valid HTTP header values.
+
+
+Copyright 1997-1998, Gisle Aas
+Copyright 2002-2003, John J. Lee
+
+This code is free software; you can redistribute it and/or modify it under
+the terms of the BSD License (see the file COPYING included with the
+distribution).
+
+"""
+
+import re, string
+from types import StringType
+try:
+ from types import UnicodeType
+ STRING_TYPES = StringType, UnicodeType
+except:
+ STRING_TYPES = StringType,
+
+from _Util import startswith, endswith, http2time
+
+try: True
+except NameError:
+ True = 1
+ False = 0
+
+def unmatched(match):
+ """Return unmatched part of re.Match object."""
+ start, end = match.span(0)
+ return match.string[:start]+match.string[end:]
+
+# XXX I really can't see what this =* was for (came from LWP, I guess)
+#token_re = re.compile(r"^\s*(=*[^\s=;,]+)")
+token_re = re.compile(r"^\s*([^=\s;,]+)")
+quoted_value_re = re.compile(r"^\s*=\s*\"([^\"\\]*(?:\\.[^\"\\]*)*)\"")
+value_re = re.compile(r"^\s*=\s*([^\s;,]*)")
+escape_re = re.compile(r"\\(.)")
+def split_header_words(header_values):
+ r"""Parse header values into a list of lists containing key,value pairs.
+
+ The function knows how to deal with ",", ";" and "=" as well as quoted
+ values after "=". A list of space separated tokens are parsed as if they
+ were separated by ";".
+
+ If the header_values passed as argument contains multiple values, then they
+ are treated as if they were a single value separated by comma ",".
+
+ This means that this function is useful for parsing header fields that
+ follow this syntax (BNF as from the HTTP/1.1 specification, but we relax
+ the requirement for tokens).
+
+ headers = #header
+ header = (token | parameter) *( [";"] (token | parameter))
+
+ token = 1*<any CHAR except CTLs or separators>
+ separators = "(" | ")" | "<" | ">" | "@"
+ | "," | ";" | ":" | "\" | <">
+ | "/" | "[" | "]" | "?" | "="
+ | "{" | "}" | SP | HT
+
+ quoted-string = ( <"> *(qdtext | quoted-pair ) <"> )
+ qdtext = <any TEXT except <">>
+ quoted-pair = "\" CHAR
+
+ parameter = attribute "=" value
+ attribute = token
+ value = token | quoted-string
+
+ Each header is represented by a list of key/value pairs. The value for a
+ simple token (not part of a parameter) is None. Syntactically incorrect
+ headers will not necessarily be parsed as you would want.
+
+ This is easier to describe with some examples:
+
+ >>> split_header_words(['foo="bar"; port="80,81"; discard, bar=baz'])
+ [[('foo', 'bar'), ('port', '80,81'), ('discard', None)], [('bar', 'baz')]]
+ >>> split_header_words(['text/html; charset="iso-8859-1"'])
+ [[('text/html', None), ('charset', 'iso-8859-1')]]
+ >>> split_header_words([r'Basic realm="\"foo\bar\""'])
+ [[('Basic', None), ('realm', '"foobar"')]]
+
+ """
+ assert type(header_values) not in STRING_TYPES
+ result = []
+ for text in header_values:
+ orig_text = text
+ pairs = []
+ while text:
+ m = token_re.search(text)
+ if m:
+ text = unmatched(m)
+ name = m.group(1)
+ m = quoted_value_re.search(text)
+ if m: # quoted value
+ text = unmatched(m)
+ value = m.group(1)
+ value = escape_re.sub(r"\1", value)
+ else:
+ m = value_re.search(text)
+ if m: # unquoted value
+ text = unmatched(m)
+ value = m.group(1)
+ value = string.rstrip(value)
+ else:
+ # no value, a lone token
+ value = None
+ pairs.append((name, value))
+ elif startswith(string.lstrip(text), ","):
+ # concatenated headers, as per RFC 2616 section 4.2
+ text = string.lstrip(text)[1:]
+ if pairs: result.append(pairs)
+ pairs = []
+ else:
+ # skip junk
+ non_junk, nr_junk_chars = re.subn("^[=\s;]*", "", text)
+ assert nr_junk_chars > 0, (
+ "split_header_words bug: '%s', '%s', %s" %
+ (orig_text, text, pairs))
+ text = non_junk
+ if pairs: result.append(pairs)
+ return result
+
+join_escape_re = re.compile(r"([\"\\])")
+def join_header_words(lists):
+ """Do the inverse of the conversion done by split_header_words.
+
+ Takes a list of lists of (key, value) pairs and produces a single header
+ value. Attribute values are quoted if needed.
+
+ >>> join_header_words([[("text/plain", None), ("charset", "iso-8859/1")]])
+ 'text/plain; charset="iso-8859/1"'
+ >>> join_header_words([[("text/plain", None)], [("charset", "iso-8859/1")]])
+ 'text/plain, charset="iso-8859/1"'
+
+ """
+ headers = []
+ for pairs in lists:
+ attr = []
+ for k, v in pairs:
+ if v is not None:
+ if not re.search(r"^\w+$", v):
+ v = join_escape_re.sub(r"\\\1", v) # escape " and \
+ v = '"%s"' % v
+ if k is None: # Netscape cookies may have no name
+ k = v
+ else:
+ k = "%s=%s" % (k, v)
+ attr.append(k)
+ if attr: headers.append(string.join(attr, "; "))
+ return string.join(headers, ", ")
+
+def parse_ns_headers(ns_headers):
+ """Ad-hoc parser for Netscape protocol cookie-attributes.
+
+ The old Netscape cookie format for Set-Cookie can for instance contain
+ an unquoted "," in the expires field, so we have to use this ad-hoc
+ parser instead of split_header_words.
+
+ XXX This may not make the best possible effort to parse all the crap
+ that Netscape Cookie headers contain. Ronald Tschalar's HTTPClient
+ parser is probably better, so could do worse than following that if
+ this ever gives any trouble.
+
+ Currently, this is also used for parsing RFC 2109 cookies.
+
+ """
+ known_attrs = ("expires", "domain", "path", "secure",
+ # RFC 2109 attrs (may turn up in Netscape cookies, too)
+ "port", "max-age")
+
+ result = []
+ for ns_header in ns_headers:
+ pairs = []
+ version_set = False
+ for param in re.split(r";\s*", ns_header):
+ param = string.rstrip(param)
+ if param == "": continue
+ if "=" not in param:
+ if string.lower(param) in known_attrs:
+ k, v = param, None
+ else:
+ # cookie with missing name
+ k, v = None, param
+ else:
+ k, v = re.split(r"\s*=\s*", param, 1)
+ k = string.lstrip(k)
+ if k is not None:
+ lc = string.lower(k)
+ if lc in known_attrs:
+ k = lc
+ if k == "version":
+ # This is an RFC 2109 cookie. Will be treated as RFC 2965
+ # cookie in rest of code.
+ # Probably it should be parsed with split_header_words, but
+ # that's too much hassle.
+ version_set = True
+ if k == "expires":
+ # convert expires date to seconds since epoch
+ if startswith(v, '"'): v = v[1:]
+ if endswith(v, '"'): v = v[:-1]
+ v = http2time(v) # None if invalid
+ pairs.append((k, v))
+
+ if pairs:
+ if not version_set:
+ pairs.append(("version", "0"))
+ result.append(pairs)
+
+ return result
+
+
+def _test():
+ import doctest, _HeadersUtil
+ return doctest.testmod(_HeadersUtil)
+
+if __name__ == "__main__":
+ _test()
diff --git a/tools/bug_tool/ClientCookie/_MSIECookieJar.py b/tools/bug_tool/ClientCookie/_MSIECookieJar.py
new file mode 100644
index 0000000000..5c2d3fcf24
--- /dev/null
+++ b/tools/bug_tool/ClientCookie/_MSIECookieJar.py
@@ -0,0 +1,377 @@
+"""Mozilla / Netscape cookie loading / saving.
+
+Copyright 1997-1999 Gisle Aas (libwww-perl)
+Copyright 2002-2003 Johnny Lee <typo_pl@hotmail.com> (MSIE Perl code)
+Copyright 2002-2003 John J Lee <jjl@pobox.com> (The Python port)
+
+This code is free software; you can redistribute it and/or modify it under
+the terms of the BSD License (see the file COPYING included with the
+distribution).
+
+"""
+
+import os, re, string, time, struct
+if os.name == "nt":
+ import _winreg
+
+from _ClientCookie import CookieJar, Cookie, MISSING_FILENAME_TEXT
+from _Util import startswith
+from _Debug import debug
+
+try: True
+except NameError:
+ True = 1
+ False = 0
+
+
+def regload(path, leaf):
+ key = _winreg.OpenKey(_winreg.HKEY_CURRENT_USER, path, 0, _winreg.KEY_ALL_ACCESS)
+ try:
+ value = _winreg.QueryValueEx(key, leaf)[0]
+ except WindowsError:
+ value = None
+ return value
+
+WIN32_EPOCH = 0x019db1ded53e8000L # 1970 Jan 01 00:00:00 in Win32 FILETIME
+
+def epoch_time_offset_from_win32_filetime(filetime):
+ """Convert from win32 filetime to seconds-since-epoch value.
+
+ MSIE stores create and expire times as Win32 FILETIME, which is 64
+ bits of 100 nanosecond intervals since Jan 01 1601.
+
+ Cookies code expects time in 32-bit value expressed in seconds since
+ the epoch (Jan 01 1970).
+
+ """
+ if filetime < WIN32_EPOCH:
+ raise ValueError("filetime (%d) is before epoch (%d)" %
+ (filetime, WIN32_EPOCH))
+
+ return divmod((filetime - WIN32_EPOCH), 10000000L)[0]
+
+def binary_to_char(c): return "%02X" % ord(c)
+def binary_to_str(d): return string.join(map(binary_to_char, list(d)), "")
+
+class MSIECookieJar(CookieJar):
+ """
+ This class differs from CookieJar only in the format it uses to load cookies
+ from a file.
+
+ MSIECookieJar can read the cookie files of Microsoft Internet Explorer
+ (MSIE) for Windows, versions 5 and 6, on Windows NT and XP respectively.
+ Other configurations may also work, but are untested. Saving cookies in
+ MSIE format is NOT supported. If you save cookies, they'll be in the usual
+ Set-Cookie3 format, which you can read back in using an instance of the
+ plain old CookieJar class. Don't save using the same filename that you
+ loaded cookies from, because you may succeed in clobbering your MSIE
+ cookies index file!
+
+ You should be able to have LWP share Internet Explorer's cookies like
+ this (note you need to supply a username to load_from_registry if you're on
+ Windows 9x):
+
+ cookies = MSIECookieJar(delayload=1)
+ # find cookies index file in registry and load cookies from it
+ cookies.load_from_registry()
+ opener = ClientCookie.build_opener(ClientCookie.HTTPHandler(cookies))
+ response = opener.open("http://foo.bar.com/")
+
+ Iterating over a delayloaded MSIECookieJar instance will not cause any
+ cookies to be read from disk. To force reading of all cookies from disk,
+ call read_all_cookies. Note that the following methods iterate over self:
+ clear_temporary_cookies, clear_expired_cookies, __len__, __repr__, __str__
+ and as_string.
+
+ Additional methods:
+
+ load_from_registry(ignore_discard=False, ignore_expires=False,
+ username=None)
+ load_cookie_data(filename, ignore_discard=False, ignore_expires=False)
+ read_all_cookies()
+
+ """
+ magic_re = re.compile(r"Client UrlCache MMF Ver \d\.\d.*")
+ padding = "\x0d\xf0\xad\x0b"
+
+ msie_domain_re = re.compile(r"^([^/]+)(/.*)$")
+ cookie_re = re.compile("Cookie\:.+\@([\x21-\xFF]+).*?"
+ "(.+\@[\x21-\xFF]+\.txt)")
+
+ # path under HKEY_CURRENT_USER from which to get location of index.dat
+ reg_path = r"software\microsoft\windows" \
+ r"\currentversion\explorer\shell folders"
+ reg_key = "Cookies"
+
+ def __init__(self, *args, **kwargs):
+ apply(CookieJar.__init__, (self, args, kwargs))
+ self._delayload_domains = {}
+
+ def set_cookie(self, cookie):
+ if self.delayload:
+ self._delayload_domain(cookie.domain)
+ CookieJar.set_cookie(self, cookie)
+
+ def _cookies_for_domain(self, domain, request, unverifiable):
+ debug("Checking %s for cookies to return" % domain)
+ if not self.policy.domain_return_ok(domain, request, unverifiable):
+ return []
+
+ if self.delayload:
+ self._delayload_domain(domain)
+
+ return CookieJar._cookies_for_domain(
+ self, domain, request, unverifiable)
+
+ def read_all_cookies(self):
+ """Eagerly read in all cookies."""
+ if self.delayload:
+ for domain in self._delayload_domains.keys():
+ self._delayload_domain(domain)
+
+ def _delayload_domain(self, domain):
+ # if necessary, lazily load cookies for this domain
+ delayload_info = self._delayload_domains.get(domain)
+ if delayload_info is not None:
+ cookie_file, ignore_discard, ignore_expires = delayload_info
+ try:
+ self.load_cookie_data(cookie_file,
+ ignore_discard, ignore_expires)
+ except IOError:
+ debug("error reading cookie file, skipping: %s" % cookie_file)
+ else:
+ del self._delayload_domains[domain]
+
+ def _load_cookies_from_file(self, filename):
+ cookies = []
+
+ cookies_fh = open(filename)
+
+ try:
+ while 1:
+ key = cookies_fh.readline()
+ if key == "": break
+
+ rl = cookies_fh.readline
+ def getlong(rl=rl): return long(rl().rstrip())
+ def getstr(rl=rl): return rl().rstrip()
+
+ key = key.rstrip()
+ value = getstr()
+ domain_path = getstr()
+ flags = getlong() # 0x2000 bit is for secure I think
+ lo_expire = getlong()
+ hi_expire = getlong()
+ lo_create = getlong()
+ hi_create = getlong()
+ sep = getstr()
+
+ if "" in (key, value, domain_path, flags, hi_expire, lo_expire,
+ hi_create, lo_create, sep) or (sep != "*"):
+ break
+
+ m = self.msie_domain_re.search(domain_path)
+ if m:
+ domain = m.group(1)
+ path = m.group(2)
+
+ cookies.append({"KEY": key, "VALUE": value, "DOMAIN": domain,
+ "PATH": path, "FLAGS": flags, "HIXP": hi_expire,
+ "LOXP": lo_expire, "HICREATE": hi_create,
+ "LOCREATE": lo_create})
+ finally:
+ cookies_fh.close()
+
+ return cookies
+
+ def load_cookie_data(self, filename,
+ ignore_discard=False, ignore_expires=False):
+ """Load cookies from file containing actual cookie data.
+
+ Old cookies are kept unless overwritten by newly loaded ones.
+
+ You should not call this method if the delayload attribute is set.
+
+ I think each of these files contain all cookies for one user, domain,
+ and path.
+
+ filename: file containing cookies -- usually found in a file like
+ C:\WINNT\Profiles\joe\Cookies\joe@blah[1].txt
+
+ """
+ now = int(time.time())
+
+ cookie_data = self._load_cookies_from_file(filename)
+
+ for cookie in cookie_data:
+ flags = cookie["FLAGS"]
+ secure = ((flags & 0x2000) != 0)
+ filetime = (cookie["HIXP"] << 32) + cookie["LOXP"]
+ expires = epoch_time_offset_from_win32_filetime(filetime)
+ if expires < now:
+ discard = True
+ else:
+ discard = False
+ domain = cookie["DOMAIN"]
+ initial_dot = startswith(domain, ".")
+ if initial_dot:
+ domain_specified = True
+ else:
+ # MSIE 5 does not record whether the domain cookie-attribute
+ # was specified.
+ # Assuming it wasn't is conservative, because with strict
+ # domain matching this will match less frequently; with regular
+ # Netscape tail-matching, this will match at exactly the same
+ # times that domain_specified = True would. It also means we
+ # don't have to prepend a dot to achieve consistency with our
+ # own & Mozilla's domain-munging scheme.
+ domain_specified = False
+
+ # assume path_specified is false
+ # XXX is there other stuff in here? -- eg. comment, commentURL?
+ c = Cookie(0,
+ cookie["KEY"], cookie["VALUE"],
+ None, False,
+ domain, domain_specified, initial_dot,
+ cookie["PATH"], False,
+ secure,
+ expires,
+ discard,
+ None,
+ None,
+ {"flags": flags})
+ if not ignore_discard and c.discard:
+ continue
+ if not ignore_expires and c.is_expired(now):
+ continue
+ self.set_cookie(c)
+
+ def load_from_registry(self, ignore_discard=False, ignore_expires=False,
+ username=None):
+ """
+ username: only required on win9x
+
+ """
+ cookies_dir = regload(self.reg_path, self.reg_key)
+ filename = os.path.normpath(os.path.join(cookies_dir, "INDEX.DAT"))
+ self.load(filename, ignore_discard, ignore_expires, username)
+
+ def load(self, filename, ignore_discard=False, ignore_expires=False,
+ username=None):
+ """Load cookies from an MSIE 'index.dat' cookies index file.
+
+ filename: full path to cookie index file
+ username: only required on win9x
+
+ """
+ if filename is None:
+ if self.filename is not None: filename = self.filename
+ else: raise ValueError(MISSING_FILENAME_TEXT)
+
+ index = open(filename, "rb")
+
+ try:
+ self._really_load(index, filename, ignore_discard, ignore_expires,
+ username)
+ finally:
+ index.close()
+
+ def _really_load(self, index, filename, ignore_discard, ignore_expires,
+ username):
+ now = int(time.time())
+
+ if username is None:
+ username = string.lower(os.environ['USERNAME'])
+
+ cookie_dir = os.path.dirname(filename)
+
+ data = index.read(256)
+ if len(data) != 256:
+ raise IOError("%s file is too short" % filename)
+
+ # Cookies' index.dat file starts with 32 bytes of signature
+ # followed by an offset to the first record, stored as a little-
+ # endian DWORD.
+ sig, size, data = data[:32], data[32:36], data[36:]
+ size = struct.unpack("<L", size)[0]
+
+ # check that sig is valid
+ if not self.magic_re.match(sig) or size != 0x4000:
+ raise IOError("%s ['%s' %s] does not seem to contain cookies" %
+ (str(filename), sig, size))
+
+ # skip to start of first record
+ index.seek(size, 0)
+
+ sector = 128 # size of sector in bytes
+
+ while 1:
+ data = ""
+
+ # Cookies are usually in two contiguous sectors, so read in two
+ # sectors and adjust if not a Cookie.
+ to_read = 2 * sector
+ d = index.read(to_read)
+ if len(d) != to_read:
+ break
+ data = data + d
+
+ # Each record starts with a 4-byte signature and a count
+ # (little-endian DWORD) of sectors for the record.
+ sig, size, data = data[:4], data[4:8], data[8:]
+ size = struct.unpack("<L", size)[0]
+
+ to_read = (size - 2) * sector
+
+## from urllib import quote
+## print "data", quote(data)
+## print "sig", quote(sig)
+## print "size in sectors", size
+## print "size in bytes", size*sector
+## print "size in units of 16 bytes", (size*sector) / 16
+## print "size to read in bytes", to_read
+## print
+
+ if sig != "URL ":
+ assert (sig in ("HASH", "LEAK",
+ self.padding, "\x00\x00\x00\x00"),
+ "unrecognized MSIE index.dat record: %s" %
+ binary_to_str(sig))
+ if sig == "\x00\x00\x00\x00":
+ # assume we've got all the cookies, and stop
+ break
+ if sig == self.padding:
+ continue
+ # skip the rest of this record
+ assert to_read >= 0
+ if size != 2:
+ assert to_read != 0
+ index.seek(to_read, 1)
+ continue
+
+ # read in rest of record if necessary
+ if size > 2:
+ more_data = index.read(to_read)
+ if len(more_data) != to_read: break
+ data = data + more_data
+
+ cookie_re = ("Cookie\:%s\@([\x21-\xFF]+).*?" % username +
+ "(%s\@[\x21-\xFF]+\.txt)" % username)
+ m = re.search(cookie_re, data, re.I)
+ if m:
+ cookie_file = os.path.join(cookie_dir, m.group(2))
+ if not self.delayload:
+ try:
+ self.load_cookie_data(cookie_file,
+ ignore_discard, ignore_expires)
+ except IOError:
+ debug("error reading cookie file, skipping: %s" %
+ cookie_file)
+ else:
+ domain = m.group(1)
+ i = domain.find("/")
+ if i != -1:
+ domain = domain[:i]
+
+ self._delayload_domains[domain] = (
+ cookie_file, ignore_discard, ignore_expires)
diff --git a/tools/bug_tool/ClientCookie/_MozillaCookieJar.py b/tools/bug_tool/ClientCookie/_MozillaCookieJar.py
new file mode 100644
index 0000000000..13239c3c54
--- /dev/null
+++ b/tools/bug_tool/ClientCookie/_MozillaCookieJar.py
@@ -0,0 +1,171 @@
+"""Mozilla / Netscape cookie loading / saving.
+
+Copyright 1997-1999 Gisle Aas (libwww-perl)
+Copyright 2002-2003 John J Lee <jjl@pobox.com> (The Python port)
+
+This code is free software; you can redistribute it and/or modify it under
+the terms of the BSD License (see the file COPYING included with the
+distribution).
+
+"""
+
+import sys, re, string, time
+
+import ClientCookie
+from _ClientCookie import CookieJar, Cookie, MISSING_FILENAME_TEXT
+from _Util import startswith, endswith
+from _Debug import debug
+
+try: True
+except NameError:
+ True = 1
+ False = 0
+
+try: issubclass(Exception(), (Exception,))
+except TypeError:
+ real_issubclass = issubclass
+ from _Util import compat_issubclass
+ issubclass = compat_issubclass
+ del compat_issubclass
+
+
+class MozillaCookieJar(CookieJar):
+ """
+
+ WARNING: you may want to backup your browser's cookies file if you use
+ this class to save cookies. I *think* it works, but there have been
+ bugs in the past!
+
+ This class differs from CookieJar only in the format it uses to save and
+ load cookies to and from a file. This class uses the Netscape/Mozilla
+ `cookies.txt' format.
+
+ Don't expect cookies saved while the browser is running to be noticed by
+ the browser (in fact, Mozilla on unix will overwrite your saved cookies if
+ you change them on disk while it's running; on Windows, you probably can't
+ save at all while the browser is running).
+
+ Note that the Netscape/Mozilla format will downgrade RFC2965 cookies to
+ Netscape cookies on saving.
+
+ In particular, the cookie version and port number information is lost,
+ together with information about whether or not Path, Port and Discard were
+ specified by the Set-Cookie2 (or Set-Cookie) header, and whether or not the
+ domain as set in the HTTP header started with a dot (yes, I'm aware some
+ domains in Netscape files start with a dot and some don't -- trust me, you
+ really don't want to know any more about this).
+
+ Note that though Mozilla and Netscape use the same format, they use
+ slightly different headers. The class saves cookies using the Netscape
+ header by default (Mozilla can cope with that).
+
+ """
+ magic_re = "#( Netscape)? HTTP Cookie File"
+ header = """\
+ # Netscape HTTP Cookie File
+ # http://www.netscape.com/newsref/std/cookie_spec.html
+ # This is a generated file! Do not edit.
+
+"""
+
+ def _really_load(self, f, filename, ignore_discard, ignore_expires):
+ now = time.time()
+
+ magic = f.readline()
+ if not re.search(self.magic_re, magic):
+ f.close()
+ raise IOError(
+ "%s does not look like a Netscape format cookies file" %
+ filename)
+
+ try:
+ while 1:
+ line = f.readline()
+ if line == "": break
+
+ # last field may be absent, so keep any trailing tab
+ if endswith(line, "\n"): line = line[:-1]
+
+ # skip comments and blank lines XXX what is $ for?
+ if (startswith(string.strip(line), "#") or
+ startswith(string.strip(line), "$") or
+ string.strip(line) == ""):
+ continue
+
+ domain, domain_specified, path, secure, expires, name, value = \
+ string.split(line, "\t")
+ secure = (secure == "TRUE")
+ domain_specified = (domain_specified == "TRUE")
+ if name == "": name = None
+
+ initial_dot = startswith(domain, ".")
+ assert domain_specified == initial_dot
+
+ discard = False
+ if expires == "":
+ expires = None
+ discard = True
+
+ # assume path_specified is false
+ c = Cookie(0, name, value,
+ None, False,
+ domain, domain_specified, initial_dot,
+ path, False,
+ secure,
+ expires,
+ discard,
+ None,
+ None,
+ {})
+ if not ignore_discard and c.discard:
+ continue
+ if not ignore_expires and c.is_expired(now):
+ continue
+ self.set_cookie(c)
+
+ except:
+ unmasked = (KeyboardInterrupt, SystemExit)
+ if ClientCookie.CLIENTCOOKIE_DEBUG:
+ unmasked = (Exception,)
+ etype = sys.exc_info()[0]
+ if issubclass(etype, IOError) or \
+ issubclass(etype, unmasked):
+ raise
+ raise IOError("invalid Netscape format file %s: %s" %
+ (filename, line))
+
+ def save(self, filename=None, ignore_discard=False, ignore_expires=False):
+ if filename is None:
+ if self.filename is not None: filename = self.filename
+ else: raise ValueError(MISSING_FILENAME_TEXT)
+
+ f = open(filename, "w")
+ try:
+ f.write(self.header)
+ now = time.time()
+ debug("Saving Netscape cookies.txt file")
+ for cookie in self:
+ if not ignore_discard and cookie.discard:
+ debug(" Not saving %s: marked for discard" % cookie.name)
+ continue
+ if not ignore_expires and cookie.is_expired(now):
+ debug(" Not saving %s: expired" % cookie.name)
+ continue
+ if cookie.secure: secure = "TRUE"
+ else: secure = "FALSE"
+ if startswith(cookie.domain, "."): initial_dot = "TRUE"
+ else: initial_dot = "FALSE"
+ if cookie.expires is not None:
+ expires = str(cookie.expires)
+ else:
+ expires = ""
+ if cookie.name is not None:
+ name = cookie.name
+ else:
+ name = ""
+ f.write(
+ string.join([cookie.domain, initial_dot, cookie.path,
+ secure, expires, name, cookie.value], "\t")+
+ "\n")
+ finally:
+ f.close()
diff --git a/tools/bug_tool/ClientCookie/_Util.py b/tools/bug_tool/ClientCookie/_Util.py
new file mode 100644
index 0000000000..f4c4e37ccf
--- /dev/null
+++ b/tools/bug_tool/ClientCookie/_Util.py
@@ -0,0 +1,459 @@
+"""Python backwards-compat., date/time routines, seekable file object wrapper.
+
+ Copyright 2002-2003 John J Lee <jjl@pobox.com>
+
+This code is free software; you can redistribute it and/or modify it under
+the terms of the BSD License (see the file COPYING included with the
+distribution).
+
+"""
+
+try: True
+except NameError:
+ True = 1
+ False = 0
+
+import re, string, time
+from types import TupleType
+from StringIO import StringIO
+
+try:
+ from exceptions import StopIteration
+except ImportError:
+ from ClientCookie._ClientCookie import StopIteration
+
+def startswith(string, initial):
+ if len(initial) > len(string): return False
+ return string[:len(initial)] == initial
+
+def endswith(string, final):
+ if len(final) > len(string): return False
+ return string[-len(final):] == final
+
+def compat_issubclass(obj, tuple_or_class):
+ # for 2.1 and below
+ if type(tuple_or_class) == TupleType:
+ for klass in tuple_or_class:
+ if issubclass(obj, klass):
+ return True
+ return False
+ return issubclass(obj, tuple_or_class)
+
+def isstringlike(x):
+ try: x+""
+ except: return False
+ else: return True
+
+
+try:
+ from calendar import timegm
+ timegm((2045, 1, 1, 22, 23, 32)) # overflows in 2.1
+except:
+ # Number of days per month (except for February in leap years)
+ mdays = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
+
+ # Return 1 for leap years, 0 for non-leap years
+ def isleap(year):
+ return year % 4 == 0 and (year % 100 <> 0 or year % 400 == 0)
+
+ # Return number of leap years in range [y1, y2)
+ # Assume y1 <= y2 and no funny (non-leap century) years
+ def leapdays(y1, y2):
+ return (y2+3)/4 - (y1+3)/4
+
+ EPOCH = 1970
+ def timegm(tuple):
+ """Unrelated but handy function to calculate Unix timestamp from GMT."""
+ year, month, day, hour, minute, second = tuple[:6]
+ assert year >= EPOCH
+ assert 1 <= month <= 12
+ days = 365*(year-EPOCH) + leapdays(EPOCH, year)
+ for i in range(1, month):
+ days = days + mdays[i]
+ if month > 2 and isleap(year):
+ days = days + 1
+ days = days + day - 1
+ hours = days*24 + hour
+ minutes = hours*60 + minute
+ seconds = minutes*60L + second
+ return seconds
+
+
+# Date/time conversion routines for formats used by the HTTP protocol.
+
+EPOCH = 1970
+def my_timegm(tt):
+ year, month, mday, hour, min, sec = tt[:6]
+ if ((year >= EPOCH) and (1 <= month <= 12) and (1 <= mday <= 31) and
+ (0 <= hour <= 24) and (0 <= min <= 59) and (0 <= sec <= 61)):
+ return timegm(tt)
+ else:
+ return None
+
+days = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]
+months = ["Jan", "Feb", "Mar", "Apr", "May", "Jun",
+ "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
+months_lower = []
+for month in months: months_lower.append(string.lower(month))
+
+
+def time2isoz(t=None):
+ """Return a string representing time in seconds since epoch, t.
+
+ If the function is called without an argument, it will use the current
+ time.
+
+ The format of the returned string is like "YYYY-MM-DD hh:mm:ssZ",
+ representing Universal Time (UTC, aka GMT). An example of this format is:
+
+ 1994-11-24 08:49:37Z
+
+ """
+ if t is None: t = time.time()
+ year, mon, mday, hour, min, sec = time.gmtime(t)[:6]
+ return "%04d-%02d-%02d %02d:%02d:%02dZ" % (
+ year, mon, mday, hour, min, sec)
+
+def time2netscape(t=None):
+ """Return a string representing time in seconds since epoch, t.
+
+ If the function is called without an argument, it will use the current
+ time.
+
+ The format of the returned string is like this:
+
+ Wdy, DD-Mon-YYYY HH:MM:SS GMT
+
+ """
+ if t is None: t = time.time()
+ year, mon, mday, hour, min, sec, wday = time.gmtime(t)[:7]
+ return "%s %02d-%s-%04d %02d:%02d:%02d GMT" % (
+ days[wday], mday, months[mon-1], year, hour, min, sec)
+
+
+UTC_ZONES = {"GMT": None, "UTC": None, "UT": None, "Z": None}
+
+timezone_re = re.compile(r"^([-+])?(\d\d?):?(\d\d)?$")
+def offset_from_tz_string(tz):
+ offset = None
+ if UTC_ZONES.has_key(tz):
+ offset = 0
+ else:
+ m = timezone_re.search(tz)
+ if m:
+ offset = 3600 * int(m.group(2))
+ if m.group(3):
+ offset = offset + 60 * int(m.group(3))
+ if m.group(1) == '-':
+ offset = -offset
+ return offset
+
+def _str2time(day, mon, yr, hr, min, sec, tz):
+ # translate month name to number
+ # month numbers start with 1 (January)
+ try:
+ mon = months_lower.index(string.lower(mon))+1
+ except ValueError:
+ # maybe it's already a number
+ try:
+ imon = int(mon)
+ except ValueError:
+ return None
+ if 1 <= imon <= 12:
+ mon = imon
+ else:
+ return None
+
+ # make sure clock elements are defined
+ if hr is None: hr = 0
+ if min is None: min = 0
+ if sec is None: sec = 0
+
+ yr = int(yr)
+ day = int(day)
+ hr = int(hr)
+ min = int(min)
+ sec = int(sec)
+
+ if yr < 1000:
+ # find "obvious" year
+ cur_yr = time.localtime(time.time())[0]
+ m = cur_yr % 100
+ tmp = yr
+ yr = yr + cur_yr - m
+ m = m - tmp
+ if abs(m) > 50:
+ if m > 0: yr = yr + 100
+ else: yr = yr - 100
+
+ # convert UTC time tuple to seconds since epoch (not timezone-adjusted)
+ t = my_timegm((yr, mon, day, hr, min, sec, tz))
+
+ if t is not None:
+ # adjust time using timezone string, to get absolute time since epoch
+ if tz is None:
+ tz = "UTC"
+ tz = string.upper(tz)
+ offset = offset_from_tz_string(tz)
+ if offset is None:
+ return None
+ t = t - offset
+
+ return t
+
+
+strict_re = re.compile(r"^[SMTWF][a-z][a-z], (\d\d) ([JFMASOND][a-z][a-z]) (\d\d\d\d) (\d\d):(\d\d):(\d\d) GMT$")
+wkday_re = re.compile(
+ r"^(?:Sun|Mon|Tue|Wed|Thu|Fri|Sat)[a-z]*,?\s*", re.I)
+loose_http_re = re.compile(
+ r"""^
+ (\d\d?) # day
+ (?:\s+|[-\/])
+ (\w+) # month
+ (?:\s+|[-\/])
+ (\d+) # year
+ (?:
+ (?:\s+|:) # separator before clock
+ (\d\d?):(\d\d) # hour:min
+ (?::(\d\d))? # optional seconds
+ )? # optional clock
+ \s*
+ ([-+]?\d{2,4}|(?![APap][Mm]\b)[A-Za-z]+)? # timezone
+ \s*
+ (?:\(\w+\))? # ASCII representation of timezone in parens.
+ \s*$""", re.X)
+def http2time(text):
+ """Returns time in seconds since epoch of time represented by a string.
+
+ Return value is an integer.
+
+ None is returned if the format of str is unrecognized, the time is outside
+ the representable range, or the timezone string is not recognized. The
+ time formats recognized are the same as for parse_date. If the string
+ contains no timezone, UTC is assumed.
+
+ The timezone in the string may be numerical (like "-0800" or "+0100") or a
+ string timezone (like "UTC", "GMT", "BST" or "EST"). Currently, only the
+ timezone strings equivalent to UTC (zero offset) are known to the function.
+
+ The function loosely parses the following formats:
+
+ Wed, 09 Feb 1994 22:23:32 GMT -- HTTP format
+ Tuesday, 08-Feb-94 14:15:29 GMT -- old rfc850 HTTP format
+ Tuesday, 08-Feb-1994 14:15:29 GMT -- broken rfc850 HTTP format
+ 09 Feb 1994 22:23:32 GMT -- HTTP format (no weekday)
+ 08-Feb-94 14:15:29 GMT -- rfc850 format (no weekday)
+ 08-Feb-1994 14:15:29 GMT -- broken rfc850 format (no weekday)
+
+ The parser ignores leading and trailing whitespace. The time may be
+ absent.
+
+ If the year is given with only 2 digits, then parse_date will select the
+ century that makes the year closest to the current date.
+
+ """
+ # fast exit for strictly conforming string
+ m = strict_re.search(text)
+ if m:
+ g = m.groups()
+ mon = months_lower.index(string.lower(g[1])) + 1
+ tt = (int(g[2]), mon, int(g[0]),
+ int(g[3]), int(g[4]), float(g[5]))
+ return my_timegm(tt)
+
+ # No, we need some messy parsing...
+
+ # clean up
+ text = string.lstrip(text)
+ text = wkday_re.sub("", text, 1) # Useless weekday
+
+ # tz is time zone specifier string
+ day, mon, yr, hr, min, sec, tz = [None]*7
+
+ # loose regexp parse
+ m = loose_http_re.search(text)
+ if m is not None:
+ day, mon, yr, hr, min, sec, tz = m.groups()
+ else:
+ return None # bad format
+
+ return _str2time(day, mon, yr, hr, min, sec, tz)
+
+
+iso_re = re.compile(
+ """^
+ (\d{4}) # year
+ [-\/]?
+ (\d\d?) # numerical month
+ [-\/]?
+ (\d\d?) # day
+ (?:
+ (?:\s+|[-:Tt]) # separator before clock
+ (\d\d?):?(\d\d) # hour:min
+ (?::?(\d\d(?:\.\d*)?))? # optional seconds (and fractional)
+ )? # optional clock
+ \s*
+ ([-+]?\d\d?:?(:?\d\d)?
+ |Z|z)? # timezone (Z is "zero meridian", i.e. GMT)
+ \s*$""", re.X)
+def iso2time(text):
+ """
+ As for httpstr2time, but parses the ISO 8601 formats:
+
+ 1994-02-03 14:15:29 -0100 -- ISO 8601 format
+ 1994-02-03 14:15:29 -- zone is optional
+ 1994-02-03 -- only date
+ 1994-02-03T14:15:29 -- Use T as separator
+ 19940203T141529Z -- ISO 8601 compact format
+ 19940203 -- only date
+
+ """
+ # clean up
+ text = string.lstrip(text)
+
+ # tz is time zone specifier string
+ day, mon, yr, hr, min, sec, tz = [None]*7
+
+ # loose regexp parse
+ m = iso_re.search(text)
+ if m is not None:
+ # XXX there's an extra bit of the timezone I'm ignoring here: is
+ # this the right thing to do?
+ yr, mon, day, hr, min, sec, tz, _ = m.groups()
+ else:
+ return None # bad format
+
+ return _str2time(day, mon, yr, hr, min, sec, tz)
+
+
+
+# XXX Andrew Dalke kindly sent me a similar class in response to my request on
+# comp.lang.python, which I then proceeded to lose. I wrote this class
+# instead, but I think he's released his code publicly since, could pinch the
+# tests from it, at least...
+class seek_wrapper:
+ """Adds a seek method to a file object.
+
+ This is only designed for seeking on readonly file-like objects.
+
+ Wrapped file-like object must have a read method. The readline method is
+ only supported if that method is present on the wrapped object. The
+ readlines method is always supported. xreadlines and iteration are
+ supported only for Python 2.2 and above.
+
+ Public attribute: wrapped (the wrapped file object).
+
+ WARNING: All other attributes of the wrapped object (ie. those that are not
+ one of wrapped, read, readline, readlines, xreadlines, __iter__ and next)
+ are passed through unaltered, which may or may not make sense for your
+ particular file object.
+
+ """
+ # General strategy is to check that cache is full enough, then delegate
+ # everything to the cache (self._cache, which is a StringIO.StringIO
+ # instance. Seems to be some cStringIO.StringIO problem on 1.5.2 -- I
+ # get a StringOobject, with no readlines method.
+
+ # Invariant: the end of the cache is always at the same place as the
+ # end of the wrapped file:
+ # self.wrapped.tell() == len(self._cache.getvalue())
+
+ def __init__(self, wrapped):
+ self.wrapped = wrapped
+ self.__have_readline = hasattr(self.wrapped, "readline")
+ self.__cache = StringIO()
+
+ def __getattr__(self, name): return getattr(self.wrapped, name)
+
+ def seek(self, offset, whence=0):
+ # make sure we have read all data up to the point we are seeking to
+ pos = self.__cache.tell()
+ if whence == 0: # absolute
+ to_read = offset - pos
+ elif whence == 1: # relative to current position
+ to_read = offset
+ elif whence == 2: # relative to end of *wrapped* file
+ # since we don't know yet where the end of that file is, we must
+ # read everything
+ to_read = None
+ if to_read >= 0 or to_read is None:
+ if to_read is None:
+ self.__cache.write(self.wrapped.read())
+ else:
+ self.__cache.write(self.wrapped.read(to_read))
+ self.__cache.seek(pos)
+
+ return self.__cache.seek(offset, whence)
+
+ def read(self, size=-1):
+ pos = self.__cache.tell()
+
+ self.__cache.seek(pos)
+
+ end = len(self.__cache.getvalue())
+ available = end - pos
+
+ # enough data already cached?
+ if size <= available and size != -1:
+ return self.__cache.read(size)
+
+ # no, so read sufficient data from wrapped file and cache it
+ to_read = size - available
+ assert to_read > 0 or size == -1
+ self.__cache.seek(0, 2)
+ if size == -1:
+ self.__cache.write(self.wrapped.read())
+ else:
+ self.__cache.write(self.wrapped.read(to_read))
+ self.__cache.seek(pos)
+
+ return self.__cache.read(size)
+
+ def readline(self, size=-1):
+ if not self.__have_readline:
+ raise NotImplementedError("no readline method on wrapped object")
+
+ # line we're about to read might not be complete in the cache, so
+ # read another line first
+ pos = self.__cache.tell()
+ self.__cache.seek(0, 2)
+ self.__cache.write(self.wrapped.readline())
+ self.__cache.seek(pos)
+
+ data = self.__cache.readline()
+ if size != -1:
+ r = data[:size]
+ self.__cache.seek(pos+size)
+ else:
+ r = data
+ return r
+
+ def readlines(self, sizehint=-1):
+ pos = self.__cache.tell()
+ self.__cache.seek(0, 2)
+ self.__cache.write(self.wrapped.read())
+ self.__cache.seek(pos)
+ try:
+ return self.__cache.readlines(sizehint)
+ except TypeError: # 1.5.2 hack
+ return self.__cache.readlines()
+
+ def __iter__(self): return self
+ def next(self):
+ line = self.readline()
+ if line == "": raise StopIteration
+ return line
+
+ xreadlines = __iter__
+
+ def __repr__(self):
+ return ("<%s at %s whose wrapped object = %s>" %
+ (self.__class__.__name__, `id(self)`, `self.wrapped`))
+
+ def close(self):
+ self.read = None
+ self.readline = None
+ self.readlines = None
+ self.seek = None
+ if self.wrapped: self.wrapped.close()
+ self.wrapped = None
diff --git a/tools/bug_tool/ClientCookie/__init__.py b/tools/bug_tool/ClientCookie/__init__.py
new file mode 100644
index 0000000000..a5d9c95f4b
--- /dev/null
+++ b/tools/bug_tool/ClientCookie/__init__.py
@@ -0,0 +1,49 @@
+# Import names so that they can be imported directly from the package, like
+# this:
+#from ClientCookie import <whatever>
+
+try: True
+except NameError:
+ True = 1
+ False = 0
+
+import sys
+
+# don't edit these here: do eg.
+# import ClientCookie; ClientCookie.HTTP_DEBUG = 1
+DEBUG_STREAM = sys.stderr
+CLIENTCOOKIE_DEBUG = False
+REDIRECT_DEBUG = False
+HTTP_DEBUG = False
+
+from _ClientCookie import VERSION, __doc__, \
+ CookieJar, Cookie, \
+ CookiePolicy, DefaultCookiePolicy, \
+ lwp_cookie_str
+from _MozillaCookieJar import MozillaCookieJar
+from _MSIECookieJar import MSIECookieJar
+try:
+ from urllib2 import AbstractHTTPHandler
+except ImportError:
+ pass
+else:
+ from ClientCookie._urllib2_support import \
+ HTTPHandler, build_opener, install_opener, urlopen, \
+ HTTPRedirectHandler
+ from ClientCookie._urllib2_support import \
+ OpenerDirector, BaseProcessor, \
+ HTTPRequestUpgradeProcessor, \
+ HTTPEquivProcessor, SeekableProcessor, HTTPCookieProcessor, \
+ HTTPRefererProcessor, HTTPStandardHeadersProcessor, \
+ HTTPRefreshProcessor, HTTPErrorProcessor, \
+ HTTPResponseDebugProcessor
+
+ import httplib
+ if hasattr(httplib, 'HTTPS'):
+ from ClientCookie._urllib2_support import HTTPSHandler
+ del AbstractHTTPHandler, httplib
+from _Util import http2time
+str2time = http2time
+del http2time
+
+del sys
diff --git a/tools/bug_tool/ClientCookie/_urllib2_support.py b/tools/bug_tool/ClientCookie/_urllib2_support.py
new file mode 100644
index 0000000000..d767d08b25
--- /dev/null
+++ b/tools/bug_tool/ClientCookie/_urllib2_support.py
@@ -0,0 +1,713 @@
+"""Integration with Python standard library module urllib2.
+
+Also includes a redirection bugfix, support for parsing HTML HEAD blocks for
+the META HTTP-EQUIV tag contents, and following Refresh header redirects.
+
+Copyright 2002-2003 John J Lee <jjl@pobox.com>
+
+This code is free software; you can redistribute it and/or modify it under
+the terms of the BSD License (see the file COPYING included with the
+distribution).
+
+"""
+
+import copy, time
+
+import ClientCookie
+from _ClientCookie import CookieJar, request_host
+from _Util import isstringlike
+from _Debug import _debug
+
+try: True
+except NameError:
+ True = 1
+ False = 0
+
+CHUNK = 1024 # size of chunks fed to HTML HEAD parser, in bytes
+
+try:
+ from urllib2 import AbstractHTTPHandler
+except ImportError:
+ pass
+else:
+ import urlparse, urllib2, urllib, httplib, htmllib, formatter, string
+ from urllib2 import URLError, HTTPError
+ import types, string, socket
+ from cStringIO import StringIO
+ from _Util import seek_wrapper
+ try:
+ import threading
+ _threading = threading; del threading
+ except ImportError:
+ import dummy_threading
+ _threading = dummy_threading; del dummy_threading
+
+ # This fixes a bug in urllib2 as of Python 2.1.3 and 2.2.2
+ # (http://www.python.org/sf/549151)
+ # 2.2.3 is broken here (my fault!), 2.3 is fixed.
+ class HTTPRedirectHandler(urllib2.BaseHandler):
+ # maximum number of redirections before assuming we're in a loop
+ max_redirections = 10
+
+ # Implementation notes:
+
+ # To avoid the server sending us into an infinite loop, the request
+ # object needs to track what URLs we have already seen. Do this by
+ # adding a handler-specific attribute to the Request object. The value
+ # of the dict is used to count the number of times the same url has
+ # been visited. This is needed because this isn't necessarily a loop:
+ # there is more than one way to redirect (Refresh, 302, 303, 307).
+
+ # Another handler-specific Request attribute, original_url, is used to
+ # remember the URL of the original request so that it is possible to
+ # decide whether or not RFC 2965 cookies should be turned on during
+ # redirect.
+
+ # Always unhandled redirection codes:
+ # 300 Multiple Choices: should not handle this here.
+ # 304 Not Modified: no need to handle here: only of interest to caches
+ # that do conditional GETs
+ # 305 Use Proxy: probably not worth dealing with here
+ # 306 Unused: what was this for in the previous versions of protocol??
+
+ def redirect_request(self, newurl, req, fp, code, msg, headers):
+ """Return a Request or None in response to a redirect.
+
+ This is called by the http_error_30x methods when a redirection
+ response is received. If a redirection should take place, return a
+ new Request to allow http_error_30x to perform the redirect;
+ otherwise, return None to indicate that an HTTPError should be
+ raised.
+
+ """
+ if code in (301, 302, 303) or (code == 307 and not req.has_data()):
+ # Strictly (according to RFC 2616), 301 or 302 in response to
+ # a POST MUST NOT cause a redirection without confirmation
+ # from the user (of urllib2, in this case). In practice,
+ # essentially all clients do redirect in this case, so we do
+ # the same.
+ return Request(newurl, headers=req.headers)
+ else:
+ raise HTTPError(req.get_full_url(), code, msg, headers, fp)
+
+ def http_error_302(self, req, fp, code, msg, headers):
+ if headers.has_key('location'):
+ newurl = headers['location']
+ elif headers.has_key('uri'):
+ newurl = headers['uri']
+ else:
+ return
+ newurl = urlparse.urljoin(req.get_full_url(), newurl)
+
+ # XXX Probably want to forget about the state of the current
+ # request, although that might interact poorly with other
+ # handlers that also use handler-specific request attributes
+ new = self.redirect_request(newurl, req, fp, code, msg, headers)
+ if new is None:
+ return
+
+ # remember where we started from
+ if hasattr(req, "original_url"):
+ new.original_url = req.original_url
+ else:
+ new.original_url = req.get_full_url()
+
+ # loop detection
+ # .error_302_dict[(url, code)] is number of times url
+ # previously visited as a result of a redirection with this
+ # code (error_30x_dict would be a better name).
+ new.origin_req_host = req.origin_req_host
+ if not hasattr(req, 'error_302_dict'):
+ new.error_302_dict = req.error_302_dict = {(newurl, code): 1}
+ else:
+ ed = new.error_302_dict = req.error_302_dict
+ nr_visits = ed.get((newurl, code), 0)
+ # Refreshes generate fake 302s, so we can hit the same URL as
+ # a result of the same redirection code twice without
+ # necessarily being in a loop! So, allow two visits to each
+ # URL as a result of each redirection code.
+ if len(ed) < self.max_redirections and nr_visits < 2:
+ ed[(newurl, code)] = nr_visits + 1
+ else:
+ raise HTTPError(req.get_full_url(), code,
+ self.inf_msg + msg, headers, fp)
+
+ if ClientCookie.REDIRECT_DEBUG:
+ _debug("redirecting to %s", newurl)
+
+ # Don't close the fp until we are sure that we won't use it
+ # with HTTPError.
+ fp.read()
+ fp.close()
+
+ return self.parent.open(new)
+
+ http_error_301 = http_error_303 = http_error_307 = http_error_302
+
+ inf_msg = "The HTTP server returned a redirect error that would " \
+ "lead to an infinite loop.\n" \
+ "The last 30x error message was:\n"
+
+
+ class Request(urllib2.Request):
+ def __init__(self, url, data=None, headers={}):
+ urllib2.Request.__init__(self, url, data, headers)
+ self.unredirected_hdrs = {}
+
+ def add_unredirected_header(self, key, val):
+ # these headers do not persist from one request to the next in a chain
+ # of requests
+ self.unredirected_hdrs[string.capitalize(key)] = val
+
+ def has_key(self, header_name):
+ if (self.headers.has_key(header_name) or
+ self.unredirected_hdrs.has_key(header_name)):
+ return True
+ return False
+
+ def get(self, header_name, failobj=None):
+ if self.headers.has_key(header_name):
+ return self.headers[header_name]
+ if self.unredirected_headers.has_key(header_name):
+ return self.unredirected_headers[header_name]
+ return failobj
+
+
+ class BaseProcessor:
+ processor_order = 500
+
+ def add_parent(self, parent):
+ self.parent = parent
+ def close(self):
+ self.parent = None
+ def __lt__(self, other):
+ if not hasattr(other, "processor_order"):
+ return True
+ return self.processor_order < other.processor_order
+
+ class HTTPRequestUpgradeProcessor(BaseProcessor):
+ # upgrade Request to class with support for headers that don't get
+ # redirected
+ processor_order = 0 # before anything else
+
+ def http_request(self, request):
+ if not hasattr(request, "add_unredirected_header"):
+ request = Request(request._Request__original, request.data,
+ request.headers)
+ return request
+
+ https_request = http_request
+
+ class HTTPEquivProcessor(BaseProcessor):
+ """Append META HTTP-EQUIV headers to regular HTTP headers."""
+ def http_response(self, request, response):
+ if not hasattr(response, "seek"):
+ response = seek_wrapper(response)
+ # grab HTTP-EQUIV headers and add them to the true HTTP headers
+ headers = response.info()
+ for hdr, val in parse_head(response):
+ headers[hdr] = val
+ response.seek(0)
+ return response
+
+ https_response = http_response
+
+ # XXX ATM this only takes notice of http responses -- probably
+ # should be independent of protocol scheme (http, ftp, etc.)
+ class SeekableProcessor(BaseProcessor):
+ """Make responses seekable."""
+
+ def http_response(self, request, response):
+ if not hasattr(response, "seek"):
+ return seek_wrapper(response)
+ return response
+
+ https_response = http_response
+
+ # XXX if this gets added to urllib2, unverifiable would end up as an
+ # attribute on Request.
+ class HTTPCookieProcessor(BaseProcessor):
+ """Handle HTTP cookies."""
+ def __init__(self, cookies=None):
+ if cookies is None:
+ cookies = CookieJar()
+ self.cookies = cookies
+
+ def _unverifiable(self, request):
+ if hasattr(request, "error_302_dict") and request.error_302_dict:
+ redirect = True
+ else:
+ redirect = False
+ if (redirect or
+ (hasattr(request, "unverifiable") and request.unverifiable)):
+ unverifiable = True
+ else:
+ unverifiable = False
+ return unverifiable
+
+ def http_request(self, request):
+ unverifiable = self._unverifiable(request)
+ if not unverifiable:
+ # Stuff request-host of this origin transaction into Request
+ # object, because we need to know it to know whether cookies
+ # should be in operation during derived requests (redirects,
+ # specifically -- including refreshes).
+ request.origin_req_host = request_host(request)
+ self.cookies.add_cookie_header(request, unverifiable)
+ return request
+
+ def http_response(self, request, response):
+ unverifiable = self._unverifiable(request)
+ self.cookies.extract_cookies(response, request, unverifiable)
+ return response
+
+ https_request = http_request
+ https_response = http_response
+
+ class HTTPRefererProcessor(BaseProcessor):
+ """Add Referer header to requests.
+
+ This only makes sense if you use each RefererProcessor for a single
+ chain of requests only (so, for example, if you use a single
+ HTTPRefererProcessor to fetch a series of URLs extracted from a single
+ page, this will break).
+
+ """
+ def __init__(self):
+ self.referer = None
+
+ def http_request(self, request):
+ if ((self.referer is not None) and
+ not request.has_key("Referer")):
+ request.add_unredirected_header("Referer", self.referer)
+ return request
+
+ def http_response(self, request, response):
+ self.referer = response.geturl()
+ return response
+
+ https_request = http_request
+ https_response = http_response
+
+ class HTTPStandardHeadersProcessor(BaseProcessor):
+ def http_request(self, request):
+ host = request.get_host()
+ if not host:
+ raise URLError('no host given')
+
+ if request.has_data(): # POST
+ data = request.get_data()
+ if not request.has_key('Content-type'):
+ request.add_unredirected_header(
+ 'Content-type',
+ 'application/x-www-form-urlencoded')
+ if not request.has_key('Content-length'):
+ request.add_unredirected_header(
+ 'Content-length', '%d' % len(data))
+
+ scheme, sel = urllib.splittype(request.get_selector())
+ sel_host, sel_path = urllib.splithost(sel)
+ if not request.has_key('Host'):
+ request.add_unredirected_header('Host', sel_host or host)
+ for name, value in self.parent.addheaders:
+ name = string.capitalize(name)
+ if not request.has_key(name):
+ request.add_unredirected_header(name, value)
+
+ return request
+
+ https_request = http_request
+
+ class HTTPResponseDebugProcessor(BaseProcessor):
+ processor_order = 900 # before redirections, after everything else
+
+ def http_response(self, request, response):
+ if not hasattr(response, "seek"):
+ response = seek_wrapper(response)
+ _debug(response.read())
+ _debug("*****************************************************")
+ response.seek(0)
+ return response
+
+ https_response = http_response
+
+ class HTTPRefreshProcessor(BaseProcessor):
+ """Perform HTTP Refresh redirections.
+
+ Note that if a non-200 HTTP code has occurred (for example, a 30x
+ redirect), this processor will do nothing.
+
+ By default, only zero-time Refresh headers are redirected. Use the
+ max_time constructor argument to allow Refresh with longer pauses.
+ Use the honor_time argument to control whether the requested pause
+ is honoured (with a time.sleep()) or skipped in favour of immediate
+ redirection.
+
+ """
+ processor_order = 1000
+
+ def __init__(self, max_time=0, honor_time=True):
+ self.max_time = max_time
+ self.honor_time = honor_time
+
+ def http_response(self, request, response):
+ code, msg, hdrs = response.code, response.msg, response.info()
+
+ if code == 200 and hdrs.has_key("refresh"):
+ refresh = hdrs["refresh"]
+ i = string.find(refresh, ";")
+ if i != -1:
+ pause, newurl_spec = refresh[:i], refresh[i+1:]
+ i = string.find(newurl_spec, "=")
+ if i != -1:
+ pause = int(pause)
+ if pause <= self.max_time:
+ if pause != 0 and self.honor_time:
+ time.sleep(pause)
+ newurl = newurl_spec[i+1:]
+ # fake a 302 response
+ hdrs["location"] = newurl
+ response = self.parent.error(
+ 'http', request, response, 302, msg, hdrs)
+
+ return response
+
+ https_response = http_response
+
+ class HTTPErrorProcessor(BaseProcessor):
+ """Process non-200 HTTP error responses.
+
+ This just passes the job on to the Handler.<proto>_error_<code>
+ methods, via the OpenerDirector.error method.
+
+ """
+ processor_order = 1000
+
+ def http_response(self, request, response):
+ code, msg, hdrs = response.code, response.msg, response.info()
+
+ if code != 200:
+ response = self.parent.error(
+ 'http', request, response, code, msg, hdrs)
+
+ return response
+
+ https_response = http_response
+
+
+ class OpenerDirector(urllib2.OpenerDirector):
+ # XXX might be useful to have remove_processor, too (say you want to
+ # set a new RefererProcessor, but keep the old CookieProcessor --
+ # could always just create everything anew, though (using old
+ # CookieJar object to create CookieProcessor)
+ def __init__(self):
+ urllib2.OpenerDirector.__init__(self)
+ #self.processors = []
+ self.process_response = {}
+ self.process_request = {}
+
+ def add_handler(self, handler):
+ # XXX
+ # tidy me
+ # the same handler could be added twice without detection
+ added = 0
+ for meth in dir(handler.__class__):
+ if meth[-5:] == '_open':
+ protocol = meth[:-5]
+ if self.handle_open.has_key(protocol):
+ self.handle_open[protocol].append(handler)
+ self.handle_open[protocol].sort()
+ else:
+ self.handle_open[protocol] = [handler]
+ added = 1
+ continue
+ i = string.find(meth, '_')
+ j = string.find(meth[i+1:], '_') + i + 1
+ if j != -1 and meth[i+1:j] == 'error':
+ proto = meth[:i]
+ kind = meth[j+1:]
+ try:
+ kind = int(kind)
+ except ValueError:
+ pass
+ dict = self.handle_error.get(proto, {})
+ if dict.has_key(kind):
+ dict[kind].append(handler)
+ dict[kind].sort()
+ else:
+ dict[kind] = [handler]
+ self.handle_error[proto] = dict
+ added = 1
+ continue
+ if meth[-9:] == "_response":
+ protocol = meth[:-9]
+ if self.process_response.has_key(protocol):
+ self.process_response[protocol].append(handler)
+ self.process_response[protocol].sort()
+ else:
+ self.process_response[protocol] = [handler]
+ added = True
+ continue
+ elif meth[-8:] == "_request":
+ protocol = meth[:-8]
+ if self.process_request.has_key(protocol):
+ self.process_request[protocol].append(handler)
+ self.process_request[protocol].sort()
+ else:
+ self.process_request[protocol] = [handler]
+ added = True
+ continue
+ if added:
+ self.handlers.append(handler)
+ self.handlers.sort()
+ handler.add_parent(self)
+
+## def add_processor(self, processor):
+## added = False
+## for meth in dir(processor):
+## if meth[-9:] == "_response":
+## protocol = meth[:-9]
+## if self.process_response.has_key(protocol):
+## self.process_response[protocol].append(processor)
+## self.process_response[protocol].sort()
+## else:
+## self.process_response[protocol] = [processor]
+## added = True
+## continue
+## elif meth[-8:] == "_request":
+## protocol = meth[:-8]
+## if self.process_request.has_key(protocol):
+## self.process_request[protocol].append(processor)
+## self.process_request[protocol].sort()
+## else:
+## self.process_request[protocol] = [processor]
+## added = True
+## continue
+## if added:
+## self.processors.append(processor)
+## # XXX base class sorts .handlers, but I have no idea why
+## #self.processors.sort()
+## processor.add_parent(self)
+
+ def _request(self, url_or_req, data):
+ if isstringlike(url_or_req):
+ req = Request(url_or_req, data)
+ else:
+ # already a urllib2.Request instance
+ req = url_or_req
+ if data is not None:
+ req.add_data(data)
+ return req
+
+ def open(self, fullurl, data=None):
+ req = self._request(fullurl, data)
+ type = req.get_type()
+
+ # pre-process request
+ # XXX should we allow a Processor to change the type (URL
+ # scheme) of the request?
+ meth_name = type+"_request"
+ for processor in self.process_request.get(type, []):
+ meth = getattr(processor, meth_name)
+ req = meth(req)
+
+ response = urllib2.OpenerDirector.open(self, req, data)
+
+ # post-process response
+ meth_name = type+"_response"
+ for processor in self.process_response.get(type, []):
+ meth = getattr(processor, meth_name)
+ response = meth(req, response)
+
+ return response
+
+## def close(self):
+## urllib2.OpenerDirector.close(self)
+## for processor in self.processors:
+## processor.close()
+## self.processors = []
+
+
+ # Note the absence of redirect and header-adding code here
+ # (AbstractHTTPHandler), and the lack of other clutter that would be
+ # here without Processors.
+ class AbstractHTTPHandler(urllib2.BaseHandler):
+ def do_open(self, http_class, req):
+ host = req.get_host()
+ if not host:
+ raise URLError('no host given')
+
+ h = http_class(host) # will parse host:port
+ if ClientCookie.HTTP_DEBUG:
+ h.set_debuglevel(1)
+
+ if req.has_data():
+ h.putrequest('POST', req.get_selector())
+ else:
+ h.putrequest('GET', req.get_selector())
+
+ for k, v in req.headers.items():
+ h.putheader(k, v)
+ for k, v in req.unredirected_hdrs.items():
+ h.putheader(k, v)
+
+ # httplib will attempt to connect() here. be prepared
+ # to convert a socket error to a URLError.
+ try:
+ h.endheaders()
+ except socket.error, err:
+ raise URLError(err)
+ if req.has_data():
+ h.send(req.get_data())
+
+ code, msg, hdrs = h.getreply()
+ fp = h.getfile()
+
+ response = urllib.addinfourl(fp, hdrs, req.get_full_url())
+ response.code = code
+ response.msg = msg
+
+ return response
+
+
+ # XXX would self.reset() work, instead of raising this exception?
+ class EndOfHeadError(Exception): pass
+ class HeadParser(htmllib.HTMLParser):
+ # only these elements are allowed in or before HEAD of document
+ head_elems = ("html", "head",
+ "title", "base",
+ "script", "style", "meta", "link", "object")
+ def __init__(self):
+ htmllib.HTMLParser.__init__(self, formatter.NullFormatter())
+ self.http_equiv = []
+
+ def start_meta(self, attrs):
+ http_equiv = content = None
+ for key, value in attrs:
+ if key == "http-equiv":
+ http_equiv = value
+ elif key == "content":
+ content = value
+ if http_equiv is not None:
+ self.http_equiv.append((http_equiv, content))
+
+ def handle_starttag(self, tag, method, attrs):
+ if tag in self.head_elems:
+ method(attrs)
+ else:
+ raise EndOfHeadError()
+
+ def handle_endtag(self, tag, method):
+ if tag in self.head_elems:
+ method()
+ else:
+ raise EndOfHeadError()
+
+ def end_head(self):
+ raise EndOfHeadError()
+
+ def parse_head(file):
+ """Return a list of key, value pairs."""
+ hp = HeadParser()
+ while 1:
+ data = file.read(CHUNK)
+ try:
+ hp.feed(data)
+ except EndOfHeadError:
+ break
+ if len(data) != CHUNK:
+ # this should only happen if there is no HTML body, or if
+ # CHUNK is big
+ break
+ return hp.http_equiv
+
+
+ class HTTPHandler(AbstractHTTPHandler):
+ def http_open(self, req):
+ return self.do_open(httplib.HTTP, req)
+
+ if hasattr(httplib, 'HTTPS'):
+ class HTTPSHandler(AbstractHTTPHandler):
+ def https_open(self, req):
+ return self.do_open(httplib.HTTPS, req)
+
+
+ def build_opener(*handlers):
+ """Create an opener object from a list of handlers and processors.
+
+ The opener will use several default handlers and processors, including
+ support for HTTP and FTP. If there is a ProxyHandler, it must be at the
+ front of the list of handlers. (Yuck. This is fixed in 2.3.)
+
+ If any of the handlers passed as arguments are subclasses of the
+ default handlers, the default handlers will not be used.
+ """
+ opener = OpenerDirector()
+ default_classes = [
+ # handlers
+ urllib2.ProxyHandler,
+ urllib2.UnknownHandler,
+ HTTPHandler, # from this module (derived from new AbstractHTTPHandler)
+ urllib2.HTTPDefaultErrorHandler,
+ HTTPRedirectHandler, # from this module (bugfixed)
+ urllib2.FTPHandler,
+ urllib2.FileHandler,
+ # processors
+ HTTPRequestUpgradeProcessor,
+ #HTTPEquivProcessor,
+ #SeekableProcessor,
+ HTTPCookieProcessor,
+ #HTTPRefererProcessor,
+ HTTPStandardHeadersProcessor,
+ #HTTPRefreshProcessor,
+ HTTPErrorProcessor
+ ]
+ if hasattr(httplib, 'HTTPS'):
+ default_classes.append(HTTPSHandler)
+ skip = []
+ for klass in default_classes:
+ for check in handlers:
+ if type(check) == types.ClassType:
+ if issubclass(check, klass):
+ skip.append(klass)
+ elif type(check) == types.InstanceType:
+ if isinstance(check, klass):
+ skip.append(klass)
+ for klass in skip:
+ default_classes.remove(klass)
+
+ to_add = []
+ for klass in default_classes:
+ to_add.append(klass())
+ for h in handlers:
+ if type(h) == types.ClassType:
+ h = h()
+ to_add.append(h)
+
+ for instance in to_add:
+ opener.add_handler(instance)
+## # yuck
+## if hasattr(instance, "processor_order"):
+## opener.add_processor(instance)
+## else:
+## opener.add_handler(instance)
+
+ return opener
+
+
+ _opener = None
+ urlopen_lock = _threading.Lock()
+ def urlopen(url, data=None):
+ global _opener
+ if _opener is None:
+ urlopen_lock.acquire()
+ try:
+ if _opener is None:
+ _opener = build_opener()
+ finally:
+ urlopen_lock.release()
+ return _opener.open(url, data)
+
+ def install_opener(opener):
+ global _opener
+ _opener = opener
diff --git a/tools/bug_tool/ClientForm.py b/tools/bug_tool/ClientForm.py
new file mode 100644
index 0000000000..c42f65b313
--- /dev/null
+++ b/tools/bug_tool/ClientForm.py
@@ -0,0 +1,2699 @@
+"""HTML form handling for web clients.
+
+ClientForm is a Python module for handling HTML forms on the client
+side, useful for parsing HTML forms, filling them in and returning the
+completed forms to the server. It has developed from a port of Gisle
+Aas' Perl module HTML::Form, from the libwww-perl library, but the
+interface is not the same.
+
+The most useful docstring is the one for HTMLForm.
+
+RFC 1866: HTML 2.0
+RFC 1867: Form-based File Upload in HTML
+RFC 2388: Returning Values from Forms: multipart/form-data
+HTML 3.2 Specification, W3C Recommendation 14 January 1997 (for ISINDEX)
+HTML 4.01 Specification, W3C Recommendation 24 December 1999
+
+
+Copyright 2002-2003 John J. Lee <jjl@pobox.com>
+Copyright 1998-2000 Gisle Aas.
+
+This code is free software; you can redistribute it and/or modify it
+under the terms of the BSD License (see the file COPYING included with
+the distribution).
+
+"""
+
+# XXX
+# Treat unknown controls as text controls? (this was a recent LWP
+# HTML::Form change) I guess this is INPUT with no TYPE? Check LWP
+# source and browser behaviour.
+# Support for list item ids. How to handle missing ids? (How do I deal
+# with duplicate OPTION labels ATM? Can't remember...)
+# Arrange things so can automatically PyPI-register with categories
+# without messing up 1.5.2 compatibility.
+# Tests need work.
+# Test single and multiple file upload some more on the web.
+# Does file upload work when name is missing? Sourceforge tracker form
+# doesn't like it. Check standards, and test with Apache. Test binary
+# upload with Apache.
+# Add label support for CHECKBOX and RADIO.
+# Better docs.
+# Deal with character sets properly. Not sure what the issues are here.
+# I don't *think* any encoding of control names, filenames or data is
+# necessary -- HTML spec. doesn't require it, and Mozilla Firebird 0.6
+# doesn't seem to do it.
+# Add charset parameter to Content-type headers? How to find value??
+# Get rid of MapBase, AList and MimeWriter.
+# I'm not going to fix this unless somebody tells me what real servers
+# that want this encoding actually expect: If enctype is
+# application/x-www-form-urlencoded and there's a FILE control present.
+# Strictly, it should be 'name=data' (see HTML 4.01 spec., section
+# 17.13.2), but I send "name=" ATM. What about multiple file upload??
+# Get rid of the two type-switches (for kind and click*).
+# Remove single-selection code: can be special case of multi-selection,
+# with a few variations, I think.
+# Factor out multiple-selection list code? May not be easy. Maybe like
+# this:
+
+# ListControl
+# ^
+# | MultipleListControlMixin
+# | ^
+# SelectControl /
+# ^ /
+# \ /
+# MultiSelectControl
+
+
+# Plan
+# ----
+# Maybe a 0.2.x, cleaned up a bit and with id support for list items?
+# Not sure it's worth it, really.
+# Remove toggle methods.
+# Replace by_label with choice between value / id / label /
+# element contents (see discussion with Gisle about labels on
+# libwww-perl list).
+# ...what else?
+# Work on DOMForm.
+# XForms? Don't know if there's a need here.
+
+
+try: True
+except NameError:
+ True = 1
+ False = 0
+
+try: bool
+except NameError:
+ def bool(expr):
+ if expr: return True
+ else: return False
+
+import sys, urllib, urllib2, types, string, mimetools, copy
+from urlparse import urljoin
+from cStringIO import StringIO
+try:
+ import UnicodeType
+except ImportError:
+ UNICODE = False
+else:
+ UNICODE = True
+
+VERSION = "0.1.13"
+
+CHUNK = 1024 # size of chunks fed to parser, in bytes
+
+# This version of urlencode is from my Python 1.5.2 back-port of the
+# Python 2.1 CVS maintenance branch of urllib. It will accept a sequence
+# of pairs instead of a mapping -- the 2.0 version only accepts a mapping.
+def urlencode(query,doseq=False,):
+ """Encode a sequence of two-element tuples or dictionary into a URL query \
+string.
+
+ If any values in the query arg are sequences and doseq is true, each
+ sequence element is converted to a separate parameter.
+
+ If the query arg is a sequence of two-element tuples, the order of the
+ parameters in the output will match the order of parameters in the
+ input.
+ """
+
+ if hasattr(query,"items"):
+ # mapping objects
+ query = query.items()
+ else:
+ # it's a bother at times that strings and string-like objects are
+ # sequences...
+ try:
+ # non-sequence items should not work with len()
+ x = len(query)
+ # non-empty strings will fail this
+ if len(query) and type(query[0]) != types.TupleType:
+ raise TypeError()
+ # zero-length sequences of all types will get here and succeed,
+ # but that's a minor nit - since the original implementation
+ # allowed empty dicts that type of behavior probably should be
+ # preserved for consistency
+ except TypeError:
+ ty,va,tb = sys.exc_info()
+ raise TypeError("not a valid non-string sequence or mapping "
+ "object", tb)
+
+ l = []
+ if not doseq:
+ # preserve old behavior
+ for k, v in query:
+ k = urllib.quote_plus(str(k))
+ v = urllib.quote_plus(str(v))
+ l.append(k + '=' + v)
+ else:
+ for k, v in query:
+ k = urllib.quote_plus(str(k))
+ if type(v) == types.StringType:
+ v = urllib.quote_plus(v)
+ l.append(k + '=' + v)
+ elif UNICODE and type(v) == types.UnicodeType:
+ # is there a reasonable way to convert to ASCII?
+ # encode generates a string, but "replace" or "ignore"
+ # lose information and "strict" can raise UnicodeError
+ v = urllib.quote_plus(v.encode("ASCII","replace"))
+ l.append(k + '=' + v)
+ else:
+ try:
+ # is this a sufficient test for sequence-ness?
+ x = len(v)
+ except TypeError:
+ # not a sequence
+ v = urllib.quote_plus(str(v))
+ l.append(k + '=' + v)
+ else:
+ # loop over the sequence
+ for elt in v:
+ l.append(k + '=' + urllib.quote_plus(str(elt)))
+ return string.join(l, '&')
+
+def startswith(string, initial):
+ if len(initial) > len(string): return False
+ return string[:len(initial)] == initial
+
+def issequence(x):
+ try:
+ x[0]
+ except (TypeError, KeyError):
+ return False
+ except IndexError:
+ pass
+ return True
+
+def isstringlike(x):
+ try: x+""
+ except: return False
+ else: return True
+
+
+# XXX don't really want to drag this along (MapBase, AList, MimeWriter)
+
+class MapBase:
+ """Mapping designed to be easily derived from.
+
+ Subclass it and override __init__, __setitem__, __getitem__, __delitem__
+ and keys. Nothing else should need to be overridden, unlike UserDict.
+ This significantly simplifies dictionary-like classes.
+
+ Also different from UserDict in that it has a redonly flag, and can be
+ updated (and initialised) with a sequence of pairs (key, value).
+
+ """
+ def __init__(self, init=None):
+ self._data = {}
+ self.readonly = False
+ if init is not None: self.update(init)
+
+ def __getitem__(self, key):
+ return self._data[key]
+
+ def __setitem__(self, key, item):
+ if not self.readonly:
+ self._data[key] = item
+ else:
+ raise TypeError("object doesn't support item assignment")
+
+ def __delitem__(self, key):
+ if not self.readonly:
+ del self._data[key]
+ else:
+ raise TypeError("object doesn't support item deletion")
+
+ def keys(self):
+ return self._data.keys()
+
+ # now the internal workings, there should be no need to override these:
+
+ def clear(self):
+ for k in self.keys():
+ del self[k]
+
+ def __repr__(self):
+ rep = []
+ for k, v in self.items():
+ rep.append("%s: %s" % (repr(k), repr(v)))
+ return self.__class__.__name__+"{"+(string.join(rep, ", "))+"}"
+
+ def copy(self):
+ return copy.copy(self)
+
+ def __cmp__(self, dict):
+ # note: return value is *not* boolean
+ for k, v in self.items():
+ if not (dict.has_key(k) and dict[k] == v):
+ return 1 # different
+ return 0 # the same
+
+ def __len__(self):
+ return len(self.keys())
+
+ def values(self):
+ r = []
+ for k in self.keys():
+ r.append(self[k])
+ return r
+
+ def items(self):
+ keys = self.keys()
+ vals = self.values()
+ r = []
+ for i in len(self):
+ r.append((keys[i], vals[i]))
+ return r
+
+ def has_key(self, key):
+ return key in self.keys()
+
+ def update(self, map):
+ if issequence(map) and not isstringlike(map):
+ items = map
+ else:
+ items = map.items()
+ for tup in items:
+ if not isinstance(tup, TupleType):
+ raise TypeError(
+ "MapBase.update requires a map or a sequence of pairs")
+ k, v = tup
+ self[k] = v
+
+ def get(self, key, failobj=None):
+ if key in self.keys():
+ return self[key]
+ else:
+ return failobj
+
+ def setdefault(self, key, failobj=None):
+ if not self.has_key(key):
+ self[key] = failobj
+ return self[key]
+
+
+class AList(MapBase):
+ """Read-only ordered mapping."""
+ def __init__(self, seq=[]):
+ self.readonly = True
+ self._inverted = False
+ self._data = list(seq[:])
+ self._keys = []
+ self._values = []
+ for key, value in seq:
+ self._keys.append(key)
+ self._values.append(value)
+
+ def set_inverted(self, inverted):
+ if (inverted and not self._inverted) or (
+ not inverted and self._inverted):
+ self._keys, self._values = self._values, self._keys
+ if inverted: self._inverted = True
+ else: self._inverted = False
+
+ def __getitem__(self, key):
+ try:
+ i = self._keys.index(key)
+ except ValueError:
+ raise KeyError(key)
+ return self._values[i]
+
+ def __delitem__(self, key):
+ try:
+ i = self._keys.index[key]
+ except ValueError:
+ raise KeyError(key)
+ del self._values[i]
+
+ def keys(self): return list(self._keys[:])
+ def values(self): return list(self._values[:])
+ def items(self):
+ data = self._data[:]
+ if not self._inverted:
+ return data
+ else:
+ newdata = []
+ for k, v in data:
+ newdata.append((v, k))
+ return newdata
+
+
+# This cut-n-pasted MimeWriter from standard library is here so can add
+# to HTTP headers rather than message body when appropriate. It also uses
+# \r\n in place of \n. This is nasty.
+class MimeWriter:
+
+ """Generic MIME writer.
+
+ Methods:
+
+ __init__()
+ addheader()
+ flushheaders()
+ startbody()
+ startmultipartbody()
+ nextpart()
+ lastpart()
+
+ A MIME writer is much more primitive than a MIME parser. It
+ doesn't seek around on the output file, and it doesn't use large
+ amounts of buffer space, so you have to write the parts in the
+ order they should occur on the output file. It does buffer the
+ headers you add, allowing you to rearrange their order.
+
+ General usage is:
+
+ f = <open the output file>
+ w = MimeWriter(f)
+ ...call w.addheader(key, value) 0 or more times...
+
+ followed by either:
+
+ f = w.startbody(content_type)
+ ...call f.write(data) for body data...
+
+ or:
+
+ w.startmultipartbody(subtype)
+ for each part:
+ subwriter = w.nextpart()
+ ...use the subwriter's methods to create the subpart...
+ w.lastpart()
+
+ The subwriter is another MimeWriter instance, and should be
+ treated in the same way as the toplevel MimeWriter. This way,
+ writing recursive body parts is easy.
+
+ Warning: don't forget to call lastpart()!
+
+ XXX There should be more state so calls made in the wrong order
+ are detected.
+
+ Some special cases:
+
+ - startbody() just returns the file passed to the constructor;
+ but don't use this knowledge, as it may be changed.
+
+ - startmultipartbody() actually returns a file as well;
+ this can be used to write the initial 'if you can read this your
+ mailer is not MIME-aware' message.
+
+ - If you call flushheaders(), the headers accumulated so far are
+ written out (and forgotten); this is useful if you don't need a
+ body part at all, e.g. for a subpart of type message/rfc822
+ that's (mis)used to store some header-like information.
+
+ - Passing a keyword argument 'prefix=<flag>' to addheader(),
+ start*body() affects where the header is inserted; 0 means
+ append at the end, 1 means insert at the start; default is
+ append for addheader(), but insert for start*body(), which use
+ it to determine where the Content-type header goes.
+
+ """
+
+ def __init__(self, fp, http_hdrs=None):
+ self._http_hdrs = http_hdrs
+ self._fp = fp
+ self._headers = []
+ self._boundary = []
+ self._first_part = True
+
+ def addheader(self, key, value, prefix=0,
+ add_to_http_hdrs=0):
+ """
+ prefix is ignored if add_to_http_hdrs is true.
+ """
+ lines = string.split(value, "\r\n")
+ while lines and not lines[-1]: del lines[-1]
+ while lines and not lines[0]: del lines[0]
+ if add_to_http_hdrs:
+ value = string.join(lines, "")
+ self._http_hdrs.append((key, value))
+ else:
+ for i in range(1, len(lines)):
+ lines[i] = " " + string.strip(lines[i])
+ value = string.join(lines, "\r\n") + "\r\n"
+ line = key + ": " + value
+ if prefix:
+ self._headers.insert(0, line)
+ else:
+ self._headers.append(line)
+
+ def flushheaders(self):
+ self._fp.writelines(self._headers)
+ self._headers = []
+
+ def startbody(self, ctype=None, plist=[], prefix=1,
+ add_to_http_hdrs=0, content_type=1):
+ """
+ prefix is ignored if add_to_http_hdrs is true.
+ """
+ if content_type and ctype:
+ for name, value in plist:
+ ctype = ctype + ';\r\n %s=\"%s\"' % (name, value)
+ self.addheader("Content-type", ctype, prefix=prefix,
+ add_to_http_hdrs=add_to_http_hdrs)
+ self.flushheaders()
+ if not add_to_http_hdrs: self._fp.write("\r\n")
+ self._first_part = True
+ return self._fp
+
+ def startmultipartbody(self, subtype, boundary=None, plist=[], prefix=1,
+ add_to_http_hdrs=0, content_type=1):
+ boundary = boundary or mimetools.choose_boundary()
+ self._boundary.append(boundary)
+ return self.startbody("multipart/" + subtype,
+ [("boundary", boundary)] + plist,
+ prefix=prefix,
+ add_to_http_hdrs=add_to_http_hdrs,
+ content_type=content_type)
+
+ def nextpart(self):
+ boundary = self._boundary[-1]
+ if self._first_part:
+ self._first_part = False
+ else:
+ self._fp.write("\r\n")
+ self._fp.write("--" + boundary + "\r\n")
+ return self.__class__(self._fp)
+
+ def lastpart(self):
+ if self._first_part:
+ self.nextpart()
+ boundary = self._boundary.pop()
+ self._fp.write("\r\n--" + boundary + "--\r\n")
+
+
+class ControlNotFoundError(ValueError): pass
+class ItemNotFoundError(ValueError): pass
+class ItemCountError(ValueError): pass
+
+class ParseError(Exception): pass
+
+
+def ParseResponse(response, select_default=False, ignore_errors=False):
+ """Parse HTTP response and return a list of HTMLForm instances.
+
+ The return value of urllib2.urlopen can be conveniently passed to this
+ function as the response parameter.
+
+ ClientForm.ParseError is raised on parse errors.
+
+ response: file-like object (supporting read() method) with a method
+ geturl(), returning the base URI of the HTTP response
+ select_default: for multiple-selection SELECT controls and RADIO controls,
+ pick the first item as the default if none are selected in the HTML
+ ignore_errors: don't raise ParseError, and carry on regardless if the
+ parser gets confused
+
+ Pass a true value for select_default if you want the behaviour specified by
+ RFC 1866 (the HTML 2.0 standard), which is to select the first item in a
+ RADIO or multiple-selection SELECT control if none were selected in the
+ HTML. Most browsers (including Microsoft Internet Explorer (IE) and
+ Netscape Navigator) instead leave all items unselected in these cases. The
+ W3C HTML 4.0 standard leaves this behaviour undefined in the case of
+ multiple-selection SELECT controls, but insists that at least one RADIO
+ button should be checked at all times, in contradiction to browser
+ behaviour.
+
+ Precisely what ignore_errors does isn't well-defined yet, so don't rely too
+ much on the current behaviour -- if you want robustness, you're better off
+ fixing the HTML before passing it to this function.
+
+ """
+ return ParseFile(response, response.geturl(), select_default)
+
+def ParseFile(file, base_uri, select_default=False, ignore_errors=False):
+ """Parse HTML and return a list of HTMLForm instances.
+
+ ClientForm.ParseError is raised on parse errors.
+
+ file: file-like object (supporting read() method) containing HTML with zero
+ or more forms to be parsed
+ base_uri: the base URI of the document
+
+ For the other arguments and further details, see ParseResponse.__doc__.
+
+ """
+ fp = _FORM_PARSER_CLASS(ignore_errors)
+ while 1:
+ data = file.read(CHUNK)
+ fp.feed(data)
+ if len(data) != CHUNK: break
+ forms = []
+ for (name, action, method, enctype), attrs, controls in fp.forms:
+ if action is None:
+ action = base_uri
+ else:
+ action = urljoin(base_uri, action)
+ form = HTMLForm(action, method, enctype, name, attrs)
+ for type, name, attr in controls:
+ form.new_control(type, name, attr, select_default=select_default)
+ forms.append(form)
+ for form in forms:
+ form.fixup()
+ return forms
+
+
+class _AbstractFormParser:
+ """forms attribute contains HTMLForm instances on completion."""
+ # pinched (and modified) from Moshe Zadka
+ def __init__(self, ignore_errors, entitydefs=None):
+ if entitydefs is not None:
+ self.entitydefs = entitydefs
+ self._ignore_errors = ignore_errors
+ self.forms = []
+ self._current_form = None
+ self._select = None
+ self._optgroup = None
+ self._option = None
+ self._textarea = None
+
+ def error(self, error):
+ if not self._ignore_errors: raise error
+
+ def start_form(self, attrs):
+ if self._current_form is not None:
+ self.error(ParseError("nested FORMs"))
+ name = None
+ action = None
+ enctype = "application/x-www-form-urlencoded"
+ method = "GET"
+ d = {}
+ for key, value in attrs:
+ if key == "name":
+ name = value
+ elif key == "action":
+ action = value
+ elif key == "method":
+ method = string.upper(value)
+ elif key == "enctype":
+ enctype = string.lower(value)
+ else:
+ d[key] = value
+ controls = []
+ self._current_form = (name, action, method, enctype), d, controls
+
+ def end_form(self):
+ if self._current_form is None:
+ self.error(ParseError("end of FORM before start"))
+ self.forms.append(self._current_form)
+ self._current_form = None
+
+ def start_select(self, attrs):
+ if self._current_form is None:
+ self.error(ParseError("start of SELECT before start of FORM"))
+ if self._select is not None:
+ self.error(ParseError("nested SELECTs"))
+ if self._textarea is not None:
+ self.error(ParseError("SELECT inside TEXTAREA"))
+ d = {}
+ for key, val in attrs:
+ d[key] = val
+
+ self._select = d
+
+ self._append_select_control({"__select": d})
+
+ def end_select(self):
+ if self._current_form is None:
+ self.error(ParseError("end of SELECT before start of FORM"))
+ if self._select is None:
+ self.error(ParseError("end of SELECT before start"))
+
+ if self._option is not None:
+ self._end_option()
+
+ self._select = None
+
+ def start_optgroup(self, attrs):
+ if self._select is None:
+ self.error(ParseError("OPTGROUP outside of SELECT"))
+ d = {}
+ for key, val in attrs:
+ d[key] = val
+
+ self._optgroup = d
+
+ def end_optgroup(self):
+ if self._optgroup is None:
+ self.error(ParseError("end of OPTGROUP before start"))
+ self._optgroup = None
+
+ def _start_option(self, attrs):
+ if self._select is None:
+ self.error(ParseError("OPTION outside of SELECT"))
+ if self._option is not None:
+ self._end_option()
+
+ d = {}
+ for key, val in attrs:
+ d[key] = val
+
+ self._option = {}
+ self._option.update(d)
+ if (self._optgroup and self._optgroup.has_key("disabled") and
+ not self._option.has_key("disabled")):
+ self._option["disabled"] = None
+
+ def _end_option(self):
+ if self._option is None:
+ self.error(ParseError("end of OPTION before start"))
+
+ contents = string.strip(self._option.get("contents", ""))
+ #contents = string.strip(self._option["contents"])
+ self._option["contents"] = contents
+ if not self._option.has_key("value"):
+ self._option["value"] = contents
+ if not self._option.has_key("label"):
+ self._option["label"] = contents
+ # stuff dict of SELECT HTML attrs into a special private key
+ # (gets deleted again later)
+ self._option["__select"] = self._select
+ self._append_select_control(self._option)
+ self._option = None
+
+ def _append_select_control(self, attrs):
+ controls = self._current_form[2]
+ name = self._select.get("name")
+ controls.append(("select", name, attrs))
+
+## def do_option(self, attrs):
+## if self._select is None:
+## self.error(ParseError("OPTION outside of SELECT"))
+## d = {}
+## for key, val in attrs:
+## d[key] = val
+
+## self._option = {}
+## self._option.update(d)
+## if (self._optgroup and self._optgroup.has_key("disabled") and
+## not self._option.has_key("disabled")):
+## self._option["disabled"] = None
+
+ def start_textarea(self, attrs):
+ if self._current_form is None:
+ self.error(ParseError("start of TEXTAREA before start of FORM"))
+ if self._textarea is not None:
+ self.error(ParseError("nested TEXTAREAs"))
+ if self._select is not None:
+ self.error(ParseError("TEXTAREA inside SELECT"))
+ d = {}
+ for key, val in attrs:
+ d[key] = val
+
+ self._textarea = d
+
+ def end_textarea(self):
+ if self._current_form is None:
+ self.error(ParseError("end of TEXTAREA before start of FORM"))
+ if self._textarea is None:
+ self.error(ParseError("end of TEXTAREA before start"))
+ controls = self._current_form[2]
+ name = self._textarea.get("name")
+ controls.append(("textarea", name, self._textarea))
+ self._textarea = None
+
+ def handle_data(self, data):
+ if self._option is not None:
+ # self._option is a dictionary of the OPTION element's HTML
+ # attributes, but it has two special keys, one of which is the
+ # special "contents" key contains text between OPTION tags (the
+ # other is the "__select" key: see the end_option method)
+ map = self._option
+ key = "contents"
+ elif self._textarea is not None:
+ map = self._textarea
+ key = "value"
+ else:
+ return
+
+ if not map.has_key(key):
+ map[key] = data
+ else:
+ map[key] = map[key] + data
+
+## def handle_data(self, data):
+## if self._option is not None:
+## contents = string.strip(data)
+## controls = self._current_form[2]
+## if not self._option.has_key("value"):
+## self._option["value"] = contents
+## if not self._option.has_key("label"):
+## self._option["label"] = contents
+## # self._option is a dictionary of the OPTION element's HTML
+## # attributes, but it has two special keys:
+## # 1. special "contents" key contains text between OPTION tags
+## self._option["contents"] = contents
+## # 2. stuff dict of SELECT HTML attrs into a special private key
+## # (gets deleted again later)
+## self._option["__select"] = self._select
+## self._append_select_control(self._option)
+## self._option = None
+## elif self._textarea is not None:
+## #self._textarea["value"] = data
+## if self._textarea.get("value") is None:
+## self._textarea["value"] = data
+## else:
+## self._textarea["value"] = self._textarea["value"] + data
+
+ def do_button(self, attrs):
+ if self._current_form is None:
+ self.error(ParseError("start of BUTTON before start of FORM"))
+ d = {}
+ d["type"] = "submit" # default
+ for key, val in attrs:
+ d[key] = val
+ controls = self._current_form[2]
+
+ type = d["type"]
+ name = d.get("name")
+ # we don't want to lose information, so use a type string that
+ # doesn't clash with INPUT TYPE={SUBMIT,RESET,BUTTON}
+ # eg. type for BUTTON/RESET is "resetbutton"
+ # (type for INPUT/RESET is "reset")
+ type = type+"button"
+ controls.append((type, name, d))
+
+ def do_input(self, attrs):
+ if self._current_form is None:
+ self.error(ParseError("start of INPUT before start of FORM"))
+ d = {}
+ d["type"] = "text" # default
+ for key, val in attrs:
+ d[key] = val
+ controls = self._current_form[2]
+
+ type = d["type"]
+ name = d.get("name")
+ controls.append((type, name, d))
+
+ def do_isindex(self, attrs):
+ if self._current_form is None:
+ self.error(ParseError("start of ISINDEX before start of FORM"))
+ d = {}
+ for key, val in attrs:
+ d[key] = val
+ controls = self._current_form[2]
+
+ # isindex doesn't have type or name HTML attributes
+ controls.append(("isindex", None, d))
+
+# use HTMLParser if we have it (it does XHTML), htmllib otherwise
+try:
+ import HTMLParser
+except ImportError:
+ import htmllib, formatter
+ class _FormParser(_AbstractFormParser, htmllib.HTMLParser):
+ # This is still here for compatibility with Python 1.5.2.
+ # It doesn't do the right thing with XHTML.
+ def __init__(self, ignore_errors, entitydefs=None):
+ htmllib.HTMLParser.__init__(self, formatter.NullFormatter())
+ _AbstractFormParser.__init__(self, ignore_errors, entitydefs)
+
+ def do_option(self, attrs):
+ _AbstractFormParser._start_option(self, attrs)
+
+ _FORM_PARSER_CLASS = _FormParser
+else:
+ class _XHTMLCompatibleFormParser(_AbstractFormParser, HTMLParser.HTMLParser):
+ # thanks to Michael Howitz for this!
+ def __init__(self, ignore_errors, entitydefs=None):
+ HTMLParser.HTMLParser.__init__(self)
+ _AbstractFormParser.__init__(self, ignore_errors, entitydefs)
+
+ def start_option(self, attrs):
+ _AbstractFormParser._start_option(self, attrs)
+
+ def end_option(self):
+ _AbstractFormParser._end_option(self)
+
+ def handle_starttag(self, tag, attrs):
+ try:
+ method = getattr(self, 'start_' + tag)
+ except AttributeError:
+ try:
+ method = getattr(self, 'do_' + tag)
+ except AttributeError:
+ pass # unknown tag
+ else:
+ method(attrs)
+ else:
+ method(attrs)
+
+ def handle_endtag(self, tag):
+ try:
+ method = getattr(self, 'end_' + tag)
+ except AttributeError:
+ pass # unknown tag
+ else:
+ method()
+
+ # handle_charref, handle_entityref and default entitydefs are taken
+ # from sgmllib
+ def handle_charref(self, name):
+ try:
+ n = int(name)
+ except ValueError:
+ self.unknown_charref(name)
+ return
+ if not 0 <= n <= 255:
+ self.unknown_charref(name)
+ return
+ self.handle_data(chr(n))
+
+ # Definition of entities -- derived classes may override
+ entitydefs = \
+ {'lt': '<', 'gt': '>', 'amp': '&', 'quot': '"', 'apos': '\''}
+
+ def handle_entityref(self, name):
+ table = self.entitydefs
+ if name in table:
+ self.handle_data(table[name])
+ else:
+ self.unknown_entityref(name)
+ return
+
+ # These methods would have passed through the ref intact if I'd thought
+ # of it earlier, but since the old parser silently swallows unknown
+ # refs, so does this new parser.
+ def unknown_entityref(self, ref): pass
+ def unknown_charref(self, ref): pass
+
+ _FORM_PARSER_CLASS = _XHTMLCompatibleFormParser
+
+
+class Control:
+ """An HTML form control.
+
+ An HTMLForm contains a sequence of Controls. HTMLForm delegates lots of
+ things to Control objects, and most of Control's methods are, in effect,
+ documented by the HTMLForm docstrings.
+
+ The Controls in an HTMLForm can be got at via the HTMLForm.find_control
+ method or the HTMLForm.controls attribute.
+
+ Control instances are usually constructed using the ParseFile /
+ ParseResponse functions, so you can probably ignore the rest of this
+ paragraph. A Control is only properly initialised after the fixup method
+ has been called. In fact, this is only strictly necessary for ListControl
+ instances. This is necessary because ListControls are built up from
+ ListControls each containing only a single item, and their initial value(s)
+ can only be known after the sequence is complete.
+
+ The types and values that are acceptable for assignment to the value
+ attribute are defined by subclasses.
+
+ If the disabled attribute is true, this represents the state typically
+ represented by browsers by `greying out' a control. If the disabled
+ attribute is true, the Control will raise AttributeError if an attempt is
+ made to change its value. In addition, the control will not be considered
+ `successful' as defined by the W3C HTML 4 standard -- ie. it will
+ contribute no data to the return value of the HTMLForm.click* methods. To
+ enable a control, set the disabled attribute to a false value.
+
+ If the readonly attribute is true, the Control will raise AttributeError if
+ an attempt is made to change its value. To make a control writable, set
+ the readonly attribute to a false value.
+
+ All controls have the disabled and readonly attributes, not only those that
+ may have the HTML attributes of the same names.
+
+ On assignment to the value attribute, the following exceptions are raised:
+ TypeError, AttributeError (if the value attribute should not be assigned
+ to, because the control is disabled, for example) and ValueError.
+
+ If the name or value attributes are None, or the value is an empty list, or
+ if the control is disabled, the control is not successful.
+
+ Public attributes:
+
+ type: string describing type of control (see the keys of the
+ HTMLForm.type2class dictionary for the allowable values) (readonly)
+ name: name of control (readonly)
+ value: current value of control (subclasses may allow a single value, a
+ sequence of values, or either)
+ disabled: disabled state
+ readonly: readonly state
+ id: value of id HTML attribute
+
+ """
+ def __init__(self, type, name, attrs):
+ """
+ type: string describing type of control (see the keys of the
+ HTMLForm.type2class dictionary for the allowable values)
+ name: control name
+ attrs: HTML attributes of control's HTML element
+
+ """
+ raise NotImplementedError()
+
+ def add_to_form(self, form):
+ form.controls.append(self)
+
+ def fixup(self):
+ pass
+
+ def __getattr__(self, name): raise NotImplementedError()
+ def __setattr__(self, name, value): raise NotImplementedError()
+
+ def pairs(self):
+ """Return list of (key, value) pairs suitable for passing to urlencode.
+ """
+ raise NotImplementedError()
+
+ def _write_mime_data(self, mw):
+ """Write data for this control to a MimeWriter."""
+ # called by HTMLForm
+ for name, value in self.pairs():
+ mw2 = mw.nextpart()
+ mw2.addheader("Content-disposition",
+ 'form-data; name="%s"' % name, 1)
+ f = mw2.startbody(prefix=0)
+ f.write(value)
+
+ def __str__(self):
+ raise NotImplementedError()
+
+
+#---------------------------------------------------
+class ScalarControl(Control):
+ """Control whose value is not restricted to one of a prescribed set.
+
+ Some ScalarControls don't accept any value attribute. Otherwise, takes a
+ single value, which must be string-like.
+
+ Additional read-only public attribute:
+
+ attrs: dictionary mapping the names of original HTML attributes of the
+ control to their values
+
+ """
+ def __init__(self, type, name, attrs):
+ self.__dict__["type"] = string.lower(type)
+ self.__dict__["name"] = name
+ self._value = attrs.get("value")
+ self.disabled = attrs.has_key("disabled")
+ self.readonly = attrs.has_key("readonly")
+ self.id = attrs.get("id")
+
+ self.attrs = attrs.copy()
+
+ self._clicked = False
+
+ def __getattr__(self, name):
+ if name == "value":
+ return self.__dict__["_value"]
+ else:
+ raise AttributeError("%s instance has no attribute '%s'" %
+ (self.__class__.__name__, name))
+
+ def __setattr__(self, name, value):
+ if name == "value":
+ if not isstringlike(value):
+ raise TypeError("must assign a string")
+ elif self.readonly:
+ raise AttributeError("control '%s' is readonly" % self.name)
+ elif self.disabled:
+ raise AttributeError("control '%s' is disabled" % self.name)
+ self.__dict__["_value"] = value
+ elif name in ("name", "type"):
+ raise AttributeError("%s attribute is readonly" % name)
+ else:
+ self.__dict__[name] = value
+
+ def pairs(self):
+ name = self.name
+ value = self.value
+ if name is None or value is None or self.disabled:
+ return []
+ return [(name, value)]
+
+ def __str__(self):
+ name = self.name
+ value = self.value
+ if name is None: name = "<None>"
+ if value is None: value = "<None>"
+
+ infos = []
+ if self.disabled: infos.append("disabled")
+ if self.readonly: infos.append("readonly")
+ info = string.join(infos, ", ")
+ if info: info = " (%s)" % info
+
+ return "<%s(%s=%s)%s>" % (self.__class__.__name__, name, value, info)
+
+
+#---------------------------------------------------
+class TextControl(ScalarControl):
+ """Textual input control.
+
+ Covers:
+
+ INPUT/TEXT
+ INPUT/PASSWORD
+ INPUT/FILE
+ INPUT/HIDDEN
+ TEXTAREA
+
+ """
+ def __init__(self, type, name, attrs):
+ ScalarControl.__init__(self, type, name, attrs)
+ if self.type == "hidden": self.readonly = True
+ if self._value is None:
+ self._value = ""
+
+
+#---------------------------------------------------
+class FileControl(ScalarControl):
+ """File upload with INPUT TYPE=FILE.
+
+ The value attribute of a FileControl is always None.
+
+ Additional public method: add_file
+
+ """
+ def __init__(self, type, name, attrs):
+ ScalarControl.__init__(self, type, name, attrs)
+ self._value = None
+ self._upload_data = []
+
+ def __setattr__(self, name, value):
+ if name in ("value", "name", "type"):
+ raise AttributeError("%s attribute is readonly" % name)
+ else:
+ self.__dict__[name] = value
+
+ def add_file(self, file_object, content_type=None, filename=None):
+ if not hasattr(file_object, "read"):
+ raise TypeError("file-like object must have read method")
+ if content_type is not None and not isstringlike(content_type):
+ raise TypeError("content type must be None or string-like")
+ if filename is not None and not isstringlike(filename):
+ raise TypeError("filename must be None or string-like")
+ if content_type is None:
+ content_type = "application/octet-stream"
+ self._upload_data.append((file_object, content_type, filename))
+
+ def pairs(self):
+ # XXX should it be successful even if unnamed?
+ if self.name is None or self.disabled:
+ return []
+ return [(self.name, "")]
+
+ def _write_mime_data(self, mw):
+ # called by HTMLForm
+ if len(self._upload_data) == 1:
+ # single file
+ file_object, content_type, filename = self._upload_data[0]
+ mw2 = mw.nextpart()
+ fn_part = filename and ('; filename="%s"' % filename) or ''
+ disp = 'form-data; name="%s"%s' % (self.name, fn_part)
+ mw2.addheader("Content-disposition", disp, prefix=1)
+ fh = mw2.startbody(content_type, prefix=0)
+ fh.write(file_object.read())
+ elif len(self._upload_data) != 0:
+ # multiple files
+ mw2 = mw.nextpart()
+ disp = 'form-data; name="%s"' % self.name
+ mw2.addheader("Content-disposition", disp, prefix=1)
+ fh = mw2.startmultipartbody("mixed", prefix=0)
+ for file_object, content_type, filename in self._upload_data:
+ mw3 = mw2.nextpart()
+ fn_part = filename and ('; filename="%s"' % filename) or ''
+ disp = 'file%s' % fn_part
+ mw3.addheader("Content-disposition", disp, prefix=1)
+ fh2 = mw3.startbody(content_type, prefix=0)
+ fh2.write(file_object.read())
+ mw2.lastpart()
+
+ def __str__(self):
+ name = self.name
+ if name is None: name = "<None>"
+
+ if not self._upload_data:
+ value = "<No files added>"
+ else:
+ value = []
+ for file, ctype, filename in self._upload_data:
+ if filename is None:
+ value.append("<Unnamed file>")
+ else:
+ value.append(filename)
+ value = string.join(value, ", ")
+
+ info = []
+ if self.disabled: info.append("disabled")
+ if self.readonly: info.append("readonly")
+ info = string.join(info, ", ")
+ if info: info = " (%s)" % info
+
+ return "<%s(%s=%s)%s>" % (self.__class__.__name__, name, value, info)
+
+
+#---------------------------------------------------
+class IsindexControl(ScalarControl):
+ """ISINDEX control.
+
+ ISINDEX is the odd-one-out of HTML form controls. In fact, it isn't really
+ part of regular HTML forms at all, and predates it. You're only allowed
+ one ISINDEX per HTML document. ISINDEX and regular form submission are
+ mutually exclusive -- either submit a form, or the ISINDEX.
+
+ Having said this, since ISINDEX controls may appear in forms (which is
+ probably bad HTML), ParseFile / ParseResponse will include them in the
+ HTMLForm instances it returns. You can set the ISINDEX's value, as with
+ any other control (but note that ISINDEX controls have no name, so you'll
+ need to use the type argument of set_value!). When you submit the form,
+ the ISINDEX will not be successful (ie., no data will get returned to the
+ server as a result of its presence), unless you click on the ISINDEX
+ control, in which case the ISINDEX gets submitted instead of the form:
+
+ form.set_value("my isindex value", type="isindex")
+ urllib2.urlopen(form.click(type="isindex"))
+
+ ISINDEX elements outside of FORMs are ignored. If you want to submit one
+ by hand, do it like so:
+
+ url = urlparse.urljoin(page_uri, "?"+urllib.quote_plus("my isindex value"))
+ result = urllib2.urlopen(url)
+
+ """
+ def __init__(self, type, name, attrs):
+ ScalarControl.__init__(self, type, name, attrs)
+ if self._value is None:
+ self._value = ""
+
+ def pairs(self):
+ return []
+
+ def _click(self, form, coord, return_type):
+ # Relative URL for ISINDEX submission: instead of "foo=bar+baz",
+ # want "bar+baz".
+ # This doesn't seem to be specified in HTML 4.01 spec. (ISINDEX is
+ # deprecated in 4.01, but it should still say how to submit it).
+ # Submission of ISINDEX is explained in the HTML 3.2 spec, though.
+ url = urljoin(form.action, "?"+urllib.quote_plus(self.value))
+ req_data = url, None, []
+
+ if return_type == "pairs":
+ return []
+ elif return_type == "request_data":
+ return req_data
+ else:
+ return urllib2.Request(url)
+
+ def __str__(self):
+ value = self.value
+ if value is None: value = "<None>"
+
+ infos = []
+ if self.disabled: infos.append("disabled")
+ if self.readonly: infos.append("readonly")
+ info = string.join(infos, ", ")
+ if info: info = " (%s)" % info
+
+ return "<%s(%s)%s>" % (self.__class__.__name__, value, info)
+
+
+#---------------------------------------------------
+class IgnoreControl(ScalarControl):
+ """Control that we're not interested in.
+
+ Covers:
+
+ INPUT/RESET
+ BUTTON/RESET
+ INPUT/BUTTON
+ BUTTON/BUTTON
+
+ These controls are always unsuccessful, in the terminology of HTML 4 (ie.
+ they never require any information to be returned to the server).
+
+ BUTTON/BUTTON is used to generate events for script embedded in HTML.
+
+ The value attribute of IgnoreControl is always None.
+
+ """
+ def __init__(self, type, name, attrs):
+ ScalarControl.__init__(self, type, name, attrs)
+ self._value = None
+
+ def __setattr__(self, name, value):
+ if name == "value":
+ raise AttributeError(
+ "control '%s' is ignored, hence read-only" % self.name)
+ elif name in ("name", "type"):
+ raise AttributeError("%s attribute is readonly" % name)
+ else:
+ self.__dict__[name] = value
+
+
+#---------------------------------------------------
+class ListControl(Control):
+ """Control representing a sequence of items.
+
+ The value attribute of a ListControl represents the selected list items in
+ the control.
+
+ ListControl implements both list controls that take a single value and
+ those that take multiple values.
+
+ ListControls accept sequence values only. Some controls only accept
+ sequences of length 0 or 1 (RADIO, and single-selection SELECT).
+ In those cases, ItemCountError is raised if len(sequence) > 1. CHECKBOXes
+ and multiple-selection SELECTs (those having the "multiple" HTML attribute)
+ accept sequences of any length.
+
+ Note the following mistake:
+
+ control.value = some_value
+ assert control.value == some_value # not necessarily true
+
+ The reason for this is that the value attribute always gives the list items
+ in the order they were listed in the HTML.
+
+ ListControl items can also be referred to by their labels instead of names.
+ Use the by_label argument, and the set_value_by_label, get_value_by_label
+ methods.
+
+ XXX RadioControl and CheckboxControl don't implement by_label yet.
+
+ Note that, rather confusingly, though SELECT controls are represented in
+ HTML by SELECT elements (which contain OPTION elements, representing
+ individual list items), CHECKBOXes and RADIOs are not represented by *any*
+ element. Instead, those controls are represented by a collection of INPUT
+ elements. For example, this is a SELECT control, named "control1":
+
+ <select name="control1">
+ <option>foo</option>
+ <option value="1">bar</option>
+ </select>
+
+ and this is a CHECKBOX control, named "control2":
+
+ <input type="checkbox" name="control2" value="foo" id="cbe1">
+ <input type="checkbox" name="control2" value="bar" id="cbe2">
+
+ The id attribute of a CHECKBOX or RADIO ListControl is always that of its
+ first element (for example, "cbe1" above).
+
+
+ Additional read-only public attribute: multiple.
+
+
+ ListControls are built up by the parser from their component items by
+ creating one ListControl per item, consolidating them into a single master
+ ListControl held by the HTMLForm:
+
+ -User calls form.new_control(...)
+ -Form creates Control, and calls control.add_to_form(self).
+ -Control looks for a Control with the same name and type in the form, and
+ if it finds one, merges itself with that control by calling
+ control.merge_control(self). The first Control added to the form, of a
+ particular name and type, is the only one that survives in the form.
+ -Form calls control.fixup for all its controls. ListControls in the form
+ know they can now safely pick their default values.
+
+ To create a ListControl without an HTMLForm, use:
+
+ control.merge_control(new_control)
+
+ """
+ def __init__(self, type, name, attrs={}, select_default=False,
+ called_as_base_class=False):
+ """
+ select_default: for RADIO and multiple-selection SELECT controls, pick
+ the first item as the default if no 'selected' HTML attribute is
+ present
+
+ """
+ if not called_as_base_class:
+ raise NotImplementedError()
+
+ self.__dict__["type"] = string.lower(type)
+ self.__dict__["name"] = name
+ self._value = attrs.get("value")
+ self.disabled = False
+ self.readonly = False
+ self.id = attrs.get("id")
+
+ self._attrs = attrs.copy()
+ # As Controls are merged in with .merge_control(), self._attrs will
+ # refer to each Control in turn -- always the most recently merged
+ # control. Each merged-in Control instance corresponds to a single
+ # list item: see ListControl.__doc__.
+ if attrs:
+ self._attrs_list = [self._attrs] # extended by .merge_control()
+ self._disabled_list = [self._attrs.has_key("disabled")] # ditto
+ else:
+ self._attrs_list = [] # extended by .merge_control()
+ self._disabled_list = [] # ditto
+
+ self._select_default = select_default
+ self._clicked = False
+ # Some list controls can have their default set only after all items
+ # are known. If so, self._value_is_set is false, and the self.fixup
+ # method, called after all items have been added, sets the default.
+ self._value_is_set = False
+
+ def _value_from_label(self, label):
+ raise NotImplementedError("control '%s' does not yet support "
+ "by_label" % self.name)
+
+ def toggle(self, name, by_label=False):
+ return self._set_selected_state(name, 2, by_label)
+ def set(self, selected, name, by_label=False):
+ action = int(bool(selected))
+ return self._set_selected_state(name, action, by_label)
+
+ def _set_selected_state(self, name, action, by_label):
+ """
+ name: item name
+ action:
+ 0: clear
+ 1: set
+ 2: toggle
+
+ """
+ if not isstringlike(name):
+ raise TypeError("item name must be string-like")
+ if self.disabled:
+ raise AttributeError("control '%s' is disabled" % self.name)
+ if self.readonly:
+ raise AttributeError("control '%s' is readonly" % self.name)
+ if by_label:
+ name = self._value_from_label(name)
+ try:
+ i = self._menu.index(name)
+ except ValueError:
+ raise ItemNotFoundError("no item named '%s'" % name)
+
+ if self.multiple:
+ if action == 2:
+ action = not self._selected[i]
+ if action and self._disabled_list[i]:
+ raise AttributeError("item '%s' is disabled" % name)
+ self._selected[i] = bool(action)
+ else:
+ if action == 2:
+ if self._selected == name:
+ action = 0
+ else:
+ action = 1
+ if action == 0 and self._selected == name:
+ self._selected = None
+ elif action == 1:
+ if self._disabled_list[i]:
+ raise AttributeError("item '%s' is disabled" % name)
+ self._selected = name
+
+ def toggle_single(self, by_label=False):
+ self._set_single_selected_state(2, by_label)
+ def set_single(self, selected, by_label=False):
+ action = int(bool(selected))
+ self._set_single_selected_state(action, by_label)
+
+ def _set_single_selected_state(self, action, by_label):
+ if len(self._menu) != 1:
+ raise ItemCountError("'%s' is not a single-item control" %
+ self.name)
+
+ name = self._menu[0]
+ if by_label:
+ name = self._value_from_label(name)
+ self._set_selected_state(name, action, by_label)
+
+ def get_item_disabled(self, name, by_label=False):
+ """Get disabled state of named list item in a ListControl."""
+ if by_label:
+ name = self._value_from_label(name)
+ try:
+ i = self._menu.index(name)
+ except ValueError:
+ raise ItemNotFoundError()
+ else:
+ return self._disabled_list[i]
+
+ def set_item_disabled(self, disabled, name, by_label=False):
+ """Set disabled state of named list item in a ListControl.
+
+ disabled: boolean disabled state
+
+ """
+ if by_label:
+ name = self._value_from_label(name)
+ try:
+ i = self._menu.index(name)
+ except ValueError:
+ raise ItemNotFoundError()
+ else:
+ self._disabled_list[i] = bool(disabled)
+
+ def set_all_items_disabled(self, disabled):
+ """Set disabled state of all list items in a ListControl.
+
+ disabled: boolean disabled state
+
+ """
+ for i in range(len(self._disabled_list)):
+ self._disabled_list[i] = bool(disabled)
+
+ def get_item_attrs(self, name, by_label=False):
+ """Return dictionary of HTML attributes for a single ListControl item.
+
+ The HTML element types that describe list items are: OPTION for SELECT
+ controls, INPUT for the rest. These elements have HTML attributes that
+ you may occasionally want to know about -- for example, the "alt" HTML
+ attribute gives a text string describing the item (graphical browsers
+ usually display this as a tooltip).
+
+ The returned dictionary maps HTML attribute names to values. The names
+ and values are taken from the original HTML.
+
+ Note that for SELECT controls, the returned dictionary contains a
+ special key "contents" -- see SelectControl.__doc__.
+
+ """
+ if by_label:
+ name = self._value_from_label(name)
+ try:
+ i = self._menu.index(name)
+ except ValueError:
+ raise ItemNotFoundError()
+ return self._attrs_list[i]
+
+ def add_to_form(self, form):
+ try:
+ control = form.find_control(self.name, self.type)
+ except ControlNotFoundError:
+ Control.add_to_form(self, form)
+ else:
+ control.merge_control(self)
+
+ def merge_control(self, control):
+ assert bool(control.multiple) == bool(self.multiple)
+ assert isinstance(control, self.__class__)
+ self._menu.extend(control._menu)
+ self._attrs_list.extend(control._attrs_list)
+ self._disabled_list.extend(control._disabled_list)
+ if control.multiple:
+ self._selected.extend(control._selected)
+ else:
+ if control._value_is_set:
+ self._selected = control._selected
+ if control._value_is_set:
+ self._value_is_set = True
+
+ def fixup(self):
+ """
+ ListControls are built up from component list items (which are also
+ ListControls) during parsing. This method should be called after all
+ items have been added. See ListControl.__doc__ for the reason this is
+ required.
+
+ """
+ # Need to set default selection where no item was indicated as being
+ # selected by the HTML:
+
+ # CHECKBOX:
+ # Nothing should be selected.
+ # SELECT/single, SELECT/multiple and RADIO:
+ # RFC 1866 (HTML 2.0): says first item should be selected.
+ # W3C HTML 4.01 Specification: says that client behaviour is
+ # undefined in this case. For RADIO, exactly one must be selected,
+ # though which one is undefined.
+ # Both Netscape and Microsoft Internet Explorer (IE) choose first
+ # item for SELECT/single. However, both IE5 and Mozilla (both 1.0
+ # and Firebird 0.6) leave all items unselected for RADIO and
+ # SELECT/multiple.
+
+ # Since both Netscape and IE all choose the first item for
+ # SELECT/single, we do the same. OTOH, both Netscape and IE
+ # leave SELECT/multiple with nothing selected, in violation of RFC 1866
+ # (but not in violation of the W3C HTML 4 standard); the same is true
+ # of RADIO (which *is* in violation of the HTML 4 standard). We follow
+ # RFC 1866 if the select_default attribute is set, and Netscape and IE
+ # otherwise. RFC 1866 and HTML 4 are always violated insofar as you
+ # can deselect all items in a RadioControl.
+
+ raise NotImplementedError()
+
+ def __getattr__(self, name):
+ if name == "value":
+ menu = self._menu
+ if self.multiple:
+ values = []
+ for i in range(len(menu)):
+ if self._selected[i]: values.append(menu[i])
+ return values
+ else:
+ if self._selected is None: return []
+ else: return [self._selected]
+ else:
+ raise AttributeError("%s instance has no attribute '%s'" %
+ (self.__class__.__name__, name))
+
+ def __setattr__(self, name, value):
+ if name == "value":
+ if self.disabled:
+ raise AttributeError("control '%s' is disabled" % self.name)
+ if self.readonly:
+ raise AttributeError("control '%s' is readonly" % self.name)
+ self._set_value(value)
+ elif name in ("name", "type", "multiple"):
+ raise AttributeError("%s attribute is readonly" % name)
+ else:
+ self.__dict__[name] = value
+
+ def _set_value(self, value):
+ if self.multiple:
+ self._multiple_set_value(value)
+ else:
+ self._single_set_value(value)
+
+ def _single_set_value(self, value):
+ if value is None or isstringlike(value):
+ raise TypeError("ListControl, must set a sequence")
+ nr = len(value)
+ if not (0 <= nr <= 1):
+ raise ItemCountError("single selection list, must set sequence of "
+ "length 0 or 1")
+
+ if nr == 0:
+ self._selected = None
+ else:
+ value = value[0]
+ try:
+ i = self._menu.index(value)
+ except ValueError:
+ raise ItemNotFoundError("no item named '%s'" %
+ repr(value))
+ if self._disabled_list[i]:
+ raise AttributeError("item '%s' is disabled" % value)
+ self._selected = value
+
+ def _multiple_set_value(self, value):
+ if value is None or isstringlike(value):
+ raise TypeError("ListControl, must set a sequence")
+
+ selected = [False]*len(self._selected)
+ menu = self._menu
+ disabled_list = self._disabled_list
+
+ for v in value:
+ found = False
+ for i in range(len(menu)):
+ item_name = menu[i]
+ if v == item_name:
+ if disabled_list[i]:
+ raise AttributeError("item '%s' is disabled" % value)
+ selected[i] = True
+ found = True
+ break
+ if not found:
+ raise ItemNotFoundError("no item named '%s'" % repr(v))
+ self._selected = selected
+
+ def set_value_by_label(self, value):
+ raise NotImplementedError("control '%s' does not yet support "
+ "by_label" % self.name)
+ def get_value_by_label(self):
+ raise NotImplementedError("control '%s' does not yet support "
+ "by_label" % self.name)
+
+ def possible_items(self, by_label=False):
+ if by_label:
+ raise NotImplementedError(
+ "control '%s' does not yet support by_label" % self.name)
+ return copy.copy(self._menu)
+
+ def pairs(self):
+ if self.disabled:
+ return []
+
+ if not self.multiple:
+ name = self.name
+ value = self._selected
+ if name is None or value is None:
+ return []
+ return [(name, value)]
+ else:
+ control_name = self.name # usually the name HTML attribute
+ pairs = []
+ for i in range(len(self._menu)):
+ item_name = self._menu[i] # usually the value HTML attribute
+ if self._selected[i]:
+ pairs.append((control_name, item_name))
+ return pairs
+
+ def _item_str(self, i):
+ item_name = self._menu[i]
+ if self.multiple:
+ if self._selected[i]:
+ item_name = "*"+item_name
+ else:
+ if self._selected == item_name:
+ item_name = "*"+item_name
+ if self._disabled_list[i]:
+ item_name = "(%s)" % item_name
+ return item_name
+
+ def __str__(self):
+ name = self.name
+ if name is None: name = "<None>"
+
+ display = []
+ for i in range(len(self._menu)):
+ s = self._item_str(i)
+ display.append(s)
+
+ infos = []
+ if self.disabled: infos.append("disabled")
+ if self.readonly: infos.append("readonly")
+ info = string.join(infos, ", ")
+ if info: info = " (%s)" % info
+
+ return "<%s(%s=[%s])%s>" % (self.__class__.__name__,
+ name, string.join(display, ", "), info)
+
+
+class RadioControl(ListControl):
+ """
+ Covers:
+
+ INPUT/RADIO
+
+ """
+ def __init__(self, type, name, attrs, select_default=False):
+ ListControl.__init__(self, type, name, attrs, select_default,
+ called_as_base_class=True)
+ self.__dict__["multiple"] = False
+ value = attrs.get("value", "on")
+ self._menu = [value]
+ checked = attrs.has_key("checked")
+ if checked:
+ self._value_is_set = True
+ self._selected = value
+ else:
+ self._selected = None
+
+ def fixup(self):
+ if not self._value_is_set:
+ # no item explicitly selected
+ assert self._selected is None
+ if self._select_default:
+ self._selected = self._menu[0]
+ self._value_is_set = True
+
+
+class CheckboxControl(ListControl):
+ """
+ Covers:
+
+ INPUT/CHECKBOX
+
+ """
+ def __init__(self, type, name, attrs, select_default=False):
+ ListControl.__init__(self, type, name, attrs, select_default,
+ called_as_base_class=True)
+ self.__dict__["multiple"] = True
+ value = attrs.get("value", "on")
+ self._menu = [value]
+ checked = attrs.has_key("checked")
+ self._selected = [checked]
+ self._value_is_set = True
+
+ def fixup(self):
+ # If no items were explicitly checked in HTML, that's how we must
+ # leave it, so we have nothing to do here.
+ assert self._value_is_set
+
+
+class SelectControl(ListControl):
+ """
+ Covers:
+
+ SELECT (and OPTION)
+
+ SELECT control values and labels are subject to some messy defaulting
+ rules. For example, if the HTML repreentation of the control is:
+
+ <SELECT name=year>
+ <OPTION value=0 label="2002">current year</OPTION>
+ <OPTION value=1>2001</OPTION>
+ <OPTION>2000</OPTION>
+ </SELECT>
+
+ The items, in order, have labels "2002", "2001" and "2000", whereas their
+ values are "0", "1" and "2000" respectively. Note that the value of the
+ last OPTION in this example defaults to its contents, as specified by RFC
+ 1866, as do the labels of the second and third OPTIONs.
+
+ The purpose of these methods is that the OPTION labels are sometimes much
+ more meaningful, than are the OPTION values, which can make for more
+ maintainable code.
+
+ Additional read-only public attribute: attrs
+
+ The attrs attribute is a dictionary of the original HTML attributes of the
+ SELECT element. Other ListControls do not have this attribute, because in
+ other cases the control as a whole does not correspond to any single HTML
+ element. The get_item_attrs method may be used as usual to get at the
+ HTML attributes of the HTML elements corresponding to individual list items
+ (for SELECT controls, these are OPTION elements).
+
+ Another special case is that the attributes dictionaries returned by
+ get_item_attrs have a special key "contents" which does not correspond to
+ any real HTML attribute, but rather contains the contents of the OPTION
+ element:
+
+ <OPTION>this bit</OPTION>
+
+ """
+ # HTML attributes here are treated slightly from other list controls:
+ # -The SELECT HTML attributes dictionary is stuffed into the OPTION
+ # HTML attributes dictionary under the "__select" key.
+ # -The content of each OPTION element is stored under the special
+ # "contents" key of the dictionary.
+ # After all this, the dictionary is passed to the SelectControl constructor
+ # as the attrs argument, as usual. However:
+ # -The first SelectControl constructed when building up a SELECT control
+ # has a constructor attrs argument containing only the __select key -- so
+ # this SelectControl represents an empty SELECT control.
+ # -Subsequent SelectControls have both OPTION HTML-attribute in attrs and
+ # the __select dictionary containing the SELECT HTML-attributes.
+ def __init__(self, type, name, attrs, select_default=False):
+ # fish out the SELECT HTML attributes from the OPTION HTML attributes
+ # dictionary
+ self.attrs = attrs["__select"].copy()
+ attrs = attrs.copy()
+ del attrs["__select"]
+
+ ListControl.__init__(self, type, name, attrs, select_default,
+ called_as_base_class=True)
+
+ self._label_map = None
+ self.disabled = self.attrs.has_key("disabled")
+ self.id = self.attrs.get("id")
+
+ self._menu = []
+ self._selected = []
+ self._value_is_set = False
+ if self.attrs.has_key("multiple"):
+ self.__dict__["multiple"] = True
+ self._selected = []
+ else:
+ self.__dict__["multiple"] = False
+ self._selected = None
+
+ if attrs: # OPTION item data was provided
+ value = attrs["value"]
+ self._menu.append(value)
+ selected = attrs.has_key("selected")
+ if selected:
+ self._value_is_set = True
+ if self.attrs.has_key("multiple"):
+ self._selected.append(selected)
+ elif selected:
+ self._selected = value
+
+ def _build_select_label_map(self):
+ """Return an ordered mapping of labels to values.
+
+ For example, if the HTML repreentation of the control is as given in
+ SelectControl.__doc__, this function will return a mapping like:
+
+ {"2002": "0", "2001": "1", "2000": "2000"}
+
+ """
+ alist = []
+ for val in self._menu:
+ attrs = self.get_item_attrs(val)
+ alist.append((attrs["label"], val))
+ return AList(alist)
+
+ def _value_from_label(self, label):
+ try:
+ return self._label_map[label]
+ except KeyError:
+ raise ItemNotFoundError("no item has label '%s'" % label)
+
+ def fixup(self):
+ if not self._value_is_set:
+ # No item explicitly selected.
+ if len(self._menu) > 0:
+ if self.multiple:
+ if self._select_default:
+ self._selected[0] = True
+ else:
+ assert self._selected is None
+ self._selected = self._menu[0]
+ self._value_is_set = True
+ self._label_map = self._build_select_label_map()
+
+ def possible_items(self, by_label=False):
+ if not by_label:
+ return copy.copy(self._menu)
+ else:
+ self._label_map.set_inverted(True)
+ try:
+ r = map(lambda v, self=self: self._label_map[v], self._menu)
+ finally:
+ self._label_map.set_inverted(False)
+ return r
+
+ def set_value_by_label(self, value):
+ if isstringlike(value):
+ raise TypeError("ListControl, must set a sequence, not a string")
+ if self.disabled:
+ raise AttributeError("control '%s' is disabled" % self.name)
+ if self.readonly:
+ raise AttributeError("control '%s' is readonly" % self.name)
+
+ try:
+ value = map(lambda v, self=self: self._label_map[v], value)
+ except KeyError, e:
+ raise ItemNotFoundError("no item has label '%s'" % e.args[0])
+ self._set_value(value)
+
+ def get_value_by_label(self):
+ menu = self._menu
+ self._label_map.set_inverted(True)
+ try:
+ if self.multiple:
+ values = []
+ for i in range(len(menu)):
+ if self._selected[i]:
+ values.append(self._label_map[menu[i]])
+ return values
+ else:
+ return [self._label_map[self._selected]]
+ finally:
+ self._label_map.set_inverted(False)
+
+
+#---------------------------------------------------
+class SubmitControl(ScalarControl):
+ """
+ Covers:
+
+ INPUT/SUBMIT
+ BUTTON/SUBMIT
+
+ """
+ def __init__(self, type, name, attrs):
+ ScalarControl.__init__(self, type, name, attrs)
+ # IE5 defaults SUBMIT value to "Submit Query"; Firebird 0.6 leaves it
+ # blank, Konqueror 3.1 defaults to "Submit". HTML spec. doesn't seem
+ # to define this.
+ if self.value is None: self.value = ""
+ self.readonly = True
+
+ def _click(self, form, coord, return_type):
+ self._clicked = coord
+ r = form._switch_click(return_type)
+ self._clicked = False
+ return r
+
+ def pairs(self):
+ if not self._clicked:
+ return []
+ return ScalarControl.pairs(self)
+
+
+#---------------------------------------------------
+class ImageControl(SubmitControl):
+ """
+ Covers:
+
+ INPUT/IMAGE
+
+ The value attribute of an ImageControl is always None. Coordinates are
+ specified using one of the HTMLForm.click* methods.
+
+ """
+ def __init__(self, type, name, attrs):
+ ScalarControl.__init__(self, type, name, attrs)
+ self.__dict__["value"] = None
+
+ def __setattr__(self, name, value):
+ if name in ("value", "name", "type"):
+ raise AttributeError("%s attribute is readonly" % name)
+ else:
+ self.__dict__[name] = value
+
+ def pairs(self):
+ clicked = self._clicked
+ if self.disabled or not clicked:
+ return []
+ name = self.name
+ if name is None: return []
+ return [("%s.x" % name, str(clicked[0])),
+ ("%s.y" % name, str(clicked[1]))]
+
+
+# aliases, just to make str(control) and str(form) clearer
+class PasswordControl(TextControl): pass
+class HiddenControl(TextControl): pass
+class TextareaControl(TextControl): pass
+class SubmitButtonControl(SubmitControl): pass
+
+
+def is_listcontrol(control): return isinstance(control, ListControl)
+
+
+class HTMLForm:
+ """Represents a single HTML <form> ... </form> element.
+
+ A form consists of a sequence of controls that usually have names, and
+ which can take on various values. The values of the various types of
+ controls represent variously: text, zero-, one- or many-of-many choices,
+ and files to be uploaded.
+
+ Forms can be filled in with data to be returned to the server, and then
+ submitted, using the click method to generate a request object suitable for
+ passing to urllib2.urlopen (or the click_request_data or click_pairs
+ methods if you're not using urllib2).
+
+ import ClientForm
+ forms = ClientForm.ParseFile(html, base_uri)
+ form = forms[0]
+
+ form["query"] = "Python"
+ form.set("lots", "nr_results")
+
+ response = urllib2.urlopen(form.click())
+
+ Usually, HTMLForm instances are not created directly. Instead, the
+ ParseFile or ParseResponse factory functions are used. If you do construct
+ HTMLForm objects yourself, however, note that an HTMLForm instance is only
+ properly initialised after the fixup method has been called (ParseFile and
+ ParseResponse do this for you). See ListControl.__doc__ for the reason
+ this is required.
+
+ Indexing a form (form["control_name"]) returns the named Control's value
+ attribute. Assignment to a form index (form["control_name"] = something)
+ is equivalent to assignment to the named Control's value attribute. If you
+ need to be more specific than just supplying the control's name, use the
+ set_value and get_value methods.
+
+ ListControl values are lists of item names. The list item's name is the
+ value of the corresponding HTML element's "value" attribute.
+
+ Example:
+
+ <INPUT type="CHECKBOX" name="cheeses" value="leicester"></INPUT>
+ <INPUT type="CHECKBOX" name="cheeses" value="cheddar"></INPUT>
+
+ defines a CHECKBOX control with name "cheeses" which has two items, named
+ "leicester" and "cheddar".
+
+ Another example:
+
+ <SELECT name="more_cheeses">
+ <OPTION>1</OPTION>
+ <OPTION value="2" label="CHEDDAR">cheddar</OPTION>
+ </SELECT>
+
+ defines a SELECT control with name "more_cheeses" which has two items,
+ named "1" and "2".
+
+ To set, clear or toggle individual list items, use the set and toggle
+ methods. To set the whole value, do as for any other control:use indexing
+ or the set_/get_value methods.
+
+ Example:
+
+ # select *only* the item named "cheddar"
+ form["cheeses"] = ["cheddar"]
+ # select "cheddar", leave other items unaffected
+ form.set("cheddar", "cheeses")
+
+ Some controls (RADIO and SELECT without the multiple attribute) can only
+ have zero or one items selected at a time. Some controls (CHECKBOX and
+ SELECT with the multiple attribute) can have multiple items selected at a
+ time. To set the whole value of a multiple-selection ListControl, assign a
+ sequence to a form index:
+
+ form["cheeses"] = ["cheddar", "leicester"]
+
+ To check whether a control has an item, or whether an item is selected,
+ respectively:
+
+ "cheddar" in form.possible_items("cheeses")
+ "cheddar" in form["cheeses"] # (or "cheddar" in form.get_value("cheeses"))
+
+ Note that some items may be disabled (see below).
+
+ Note the following mistake:
+
+ form[control_name] = control_value
+ assert form[control_name] == control_value # not necessarily true
+
+ The reason for this is that form[control_name] always gives the list items
+ in the order they were listed in the HTML.
+
+ List items (hence list values, too) can be referred to in terms of list
+ item labels rather than list item names. Currently, this is only possible
+ for SELECT controls (this is a bug). To use this feature, use the by_label
+ arguments to the various HTMLForm methods. Note that it is *item* names
+ (hence ListControl values also), not *control* names, that can be referred
+ to by label.
+
+ The question of default values of OPTION contents, labels and values is
+ somewhat complicated: see SelectControl.__doc__ and
+ ListControl.get_item_attrs.__doc__ if you think you need to know.
+
+ Controls can be disabled or readonly. In either case, the control's value
+ cannot be changed until you clear those flags (using the methods on
+ HTMLForm). Disabled is the state typically represented by browsers by
+ `greying out' a control. Disabled controls are not `successful' -- they
+ don't cause data to get returned to the server. Readonly controls usually
+ appear in browsers as read-only text boxes. Readonly controls are
+ successful. List items can also be disabled. Attempts to select disabled
+ items (with form[name] = value, or using the ListControl.set method, for
+ example) fail. Attempts to clear disabled items are allowed.
+
+ If a lot of controls are readonly, it can be useful to do this:
+
+ form.set_all_readonly(False)
+
+ When you want to do several things with a single control, or want to do
+ less common things, like changing which controls and items are disabled,
+ you can get at a particular control:
+
+ control = form.find_control("cheeses")
+ control.set_item_disabled(False, "gruyere")
+ control.set("gruyere")
+
+ Most methods on HTMLForm just delegate to the contained controls, so see
+ the docstrings of the various Control classes for further documentation.
+ Most of these delegating methods take name, type, kind, id and nr arguments
+ to specify the control to be operated on: see
+ HTMLForm.find_control.__doc__.
+
+ ControlNotFoundError (subclass of ValueError) is raised if the specified
+ control can't be found. This includes occasions where a non-ListControl
+ is found, but the method (set, for example) requires a ListControl.
+ ItemNotFoundError (subclass of ValueError) is raised if a list item can't
+ be found. ItemCountError (subclass of ValueError) is raised if an attempt
+ is made to select more than one item and the control doesn't allow that, or
+ set/get_single are called and the control contains more than one item.
+ AttributeError is raised if a control or item is readonly or disabled and
+ an attempt is made to alter its value.
+
+ XXX CheckBoxControl and RadioControl don't yet support item access by label
+
+ Security note: Remember that any passwords you store in HTMLForm instances
+ will be saved to disk in the clear if you pickle them (directly or
+ indirectly). The simplest solution to this is to avoid pickling HTMLForm
+ objects. You could also pickle before filling in any password, or just set
+ the password to "" before pickling.
+
+
+ Public attributes:
+
+ action: full (absolute URI) form action
+ method: "GET" or "POST"
+ enctype: form transfer encoding MIME type
+ name: name of form (None if no name was specified)
+ attrs: dictionary mapping original HTML form attributes to their values
+
+ controls: list of Control instances; do not alter this list
+ (instead, call form.new_control to make a Control and add it to the
+ form, or control.add_to_form if you already have a Control instance)
+
+
+
+ Methods for form filling:
+ -------------------------
+
+ Most of the these methods have very similar arguments. See
+ HTMLForm.find_control.__doc__ for details of the name, type, kind and nr
+ arguments. See above for a description of by_label.
+
+ def find_control(self,
+ name=None, type=None, kind=None, id=None, predicate=None,
+ nr=None)
+
+ get_value(name=None, type=None, kind=None, id=None, nr=None,
+ by_label=False)
+ set_value(value,
+ name=None, type=None, kind=None, id=None, nr=None,
+ by_label=False)
+
+ set_all_readonly(readonly)
+
+
+ Methods applying only to ListControls:
+
+ possible_items(name=None, type=None, kind=None, id=None, nr=None,
+ by_label=False)
+
+ set(selected, item_name,
+ name=None, type=None, kind=None, id=None, nr=None,
+ by_label=False)
+ toggle(item_name,
+ name=None, type=None, id=None, nr=None,
+ by_label=False)
+
+ set_single(selected,
+ name=None, type=None, kind=None, id=None, nr=None,
+ by_label=False)
+ toggle_single(name=None, type=None, kind=None, id=None, nr=None,
+ by_label=False)
+
+
+ Method applying only to FileControls:
+
+ add_file(file_object,
+ content_type="application/octet-stream", filename=None,
+ name=None, id=None, nr=None)
+
+
+ Methods applying only to clickable controls:
+
+ click(name=None, type=None, id=None, nr=0, coord=(1,1))
+ click_request_data(name=None, type=None, id=None, nr=0, coord=(1,1))
+ click_pairs(name=None, type=None, id=None, nr=0, coord=(1,1))
+
+ """
+
+ type2class = {
+ "text": TextControl,
+ "password": PasswordControl,
+ "hidden": HiddenControl,
+ "textarea": TextareaControl,
+
+ "isindex": IsindexControl,
+
+ "file": FileControl,
+
+ "button": IgnoreControl,
+ "buttonbutton": IgnoreControl,
+ "reset": IgnoreControl,
+ "resetbutton": IgnoreControl,
+
+ "submit": SubmitControl,
+ "submitbutton": SubmitButtonControl,
+ "image": ImageControl,
+
+ "radio": RadioControl,
+ "checkbox": CheckboxControl,
+ "select": SelectControl,
+ }
+
+#---------------------------------------------------
+# Initialisation. Use ParseResponse / ParseFile instead.
+
+ def __init__(self, action, method="GET",
+ enctype="application/x-www-form-urlencoded",
+ name=None, attrs=None):
+ """
+ In the usual case, use ParseResponse (or ParseFile) to create new
+ HTMLForm objects.
+
+ action: full (absolute URI) form action
+ method: "GET" or "POST"
+ enctype: form transfer encoding MIME type
+ name: name of form
+ attrs: dictionary mapping original HTML form attributes to their values
+
+ """
+ self.action = action
+ self.method = method
+ self.enctype = enctype
+ self.name = name
+ if attrs is not None:
+ self.attrs = attrs.copy()
+ else:
+ self.attrs = {}
+ self.controls = []
+
+ def new_control(self, type, name, attrs,
+ ignore_unknown=False, select_default=False):
+ """Adds a new control to the form.
+
+ This is usually called by ParseFile and ParseResponse. Don't call it
+ youself unless you're building your own Control instances.
+
+ Note that controls representing lists of items are built up from
+ controls holding only a single list item. See ListControl.__doc__ for
+ further information.
+
+ type: type of control (see Control.__doc__ for a list)
+ attrs: HTML attributes of control
+ ignore_unknown: if true, use a dummy Control instance for controls of
+ unknown type; otherwise, raise ValueError
+ select_default: for RADIO and multiple-selection SELECT controls, pick
+ the first item as the default if no 'selected' HTML attribute is
+ present (this defaulting happens when the HTMLForm.fixup method is
+ called)
+
+ """
+ type = string.lower(type)
+ klass = self.type2class.get(type)
+ if klass is None:
+ if ignore_unknown:
+ klass = IgnoreControl
+ else:
+ raise ValueError("Unknown control type '%s'" % type)
+
+ a = attrs.copy()
+ if issubclass(klass, ListControl):
+ control = klass(type, name, a, select_default)
+ else:
+ control = klass(type, name, a)
+ control.add_to_form(self)
+
+ def fixup(self):
+ """Normalise form after all controls have been added.
+
+ This is usually called by ParseFile and ParseResponse. Don't call it
+ youself unless you're building your own Control instances.
+
+ This method should only be called once, after all controls have been
+ added to the form.
+
+ """
+ for control in self.controls:
+ control.fixup()
+
+#---------------------------------------------------
+ def __str__(self):
+ header = "%s %s %s" % (self.method, self.action, self.enctype)
+ rep = [header]
+ for control in self.controls:
+ rep.append(" %s" % str(control))
+ return "<%s>" % string.join(rep, "\n")
+
+#---------------------------------------------------
+# Form-filling methods.
+
+ def __getitem__(self, name):
+ return self.find_control(name).value
+ def __setitem__(self, name, value):
+ control = self.find_control(name)
+ try:
+ control.value = value
+ except AttributeError, e:
+ raise ValueError(str(e))
+
+ def get_value(self,
+ name=None, type=None, kind=None, id=None, nr=None,
+ by_label=False):
+ """Return value of control.
+
+ If only name and value arguments are supplied, equivalent to
+
+ form[name]
+
+ """
+ c = self.find_control(name, type, kind, id, nr=nr)
+ if by_label:
+ try:
+ meth = c.get_value_by_label
+ except AttributeError:
+ raise NotImplementedError(
+ "control '%s' does not yet support by_label" % c.name)
+ else:
+ return meth()
+ else:
+ return c.value
+ def set_value(self, value,
+ name=None, type=None, kind=None, id=None, nr=None,
+ by_label=False):
+ """Set value of control.
+
+ If only name and value arguments are supplied, equivalent to
+
+ form[name] = value
+
+ """
+ c = self.find_control(name, type, kind, id, nr=nr)
+ if by_label:
+ try:
+ meth = c.set_value_by_label
+ except AttributeError:
+ raise NotImplementedError(
+ "control '%s' does not yet support by_label" % c.name)
+ else:
+ meth(value)
+ else:
+ c.value = value
+
+ def set_all_readonly(self, readonly):
+ for control in self.controls:
+ control.readonly = bool(readonly)
+
+
+#---------------------------------------------------
+# Form-filling methods applying only to ListControls.
+
+ def possible_items(self,
+ name=None, type=None, kind=None, id=None, nr=None,
+ by_label=False):
+ """Return a list of all values that the specified control can take."""
+ c = self._find_list_control(name, type, kind, id, nr)
+ return c.possible_items(by_label)
+
+ def set(self, selected, item_name,
+ name=None, type=None, kind=None, id=None, nr=None,
+ by_label=False):
+ """Select / deselect named list item.
+
+ selected: boolean selected state
+
+ """
+ self._find_list_control(name, type, kind, id, nr).set(
+ selected, item_name, by_label)
+ def toggle(self, item_name,
+ name=None, type=None, kind=None, id=None, nr=None,
+ by_label=False):
+ """Toggle selected state of named list item."""
+ self._find_list_control(name, type, kind, id, nr).toggle(
+ item_name, by_label)
+
+ def set_single(self, selected,
+ name=None, type=None, kind=None, id=None, nr=None,
+ by_label=False):
+ """Select / deselect list item in a control having only one item.
+
+ If the control has multiple list items, ItemCountError is raised.
+
+ This is just a convenience method, so you don't need to know the item's
+ name -- the item name in these single-item controls is usually
+ something meaningless like "1" or "on".
+
+ For example, if a checkbox has a single item named "on", the following
+ two calls are equivalent:
+
+ control.toggle("on")
+ control.toggle_single()
+
+ """
+ self._find_list_control(name, type, kind, id, nr).set_single(
+ selected, by_label)
+ def toggle_single(self, name=None, type=None, kind=None, id=None, nr=None,
+ by_label=False):
+ """Toggle selected state of list item in control having only one item.
+
+ The rest is as for HTMLForm.set_single.__doc__.
+
+ """
+ self._find_list_control(name, type, kind, id, nr).toggle_single(
+ by_label)
+
+#---------------------------------------------------
+# Form-filling method applying only to FileControls.
+
+ def add_file(self, file_object, content_type=None, filename=None,
+ name=None, id=None, nr=None):
+ """Add a file to be uploaded.
+
+ file_object: file-like object (with read method) from which to read
+ data to upload
+ content_type: MIME content type of data to upload
+ filename: filename to pass to server
+
+ If filename is None, no filename is sent to the server.
+
+ If content_type is None, the content type is guessed based on the
+ filename and the data from read from the file object.
+
+ XXX
+ At the moment, guessed content type is always application/octet-stream.
+ Use sndhdr, imghdr modules. Should also try to guess HTML, XML, and
+ plain text.
+
+ """
+ self.find_control(name, "file", id=id, nr=nr).add_file(
+ file_object, content_type, filename)
+
+#---------------------------------------------------
+# Form submission methods, applying only to clickable controls.
+
+ def click(self, name=None, type=None, id=None, nr=0, coord=(1,1)):
+ """Return request that would result from clicking on a control.
+
+ The request object is a urllib2.Request instance, which you can pass to
+ urllib2.urlopen (or ClientCookie.urlopen).
+
+ Only some control types (INPUT/SUBMIT & BUTTON/SUBMIT buttons and
+ IMAGEs) can be clicked.
+
+ Will click on the first clickable control, subject to the name, type
+ and nr arguments (as for find_control). If no name, type, id or number
+ is specified and there are no clickable controls, a request will be
+ returned for the form in its current, un-clicked, state.
+
+ IndexError is raised if any of name, type, id or nr is specified but no
+ matching control is found. ValueError is raised if the HTMLForm has an
+ enctype attribute that is not recognised.
+
+ You can optionally specify a coordinate to click at, which only makes a
+ difference if you clicked on an image.
+
+ """
+ return self._click(name, type, id, nr, coord, "request")
+
+ def click_request_data(self,
+ name=None, type=None, id=None, nr=0, coord=(1,1)):
+ """As for click method, but return a tuple (url, data, headers).
+
+ You can use this data to send a request to the server. This is useful
+ if you're using httplib or urllib rather than urllib2. Otherwise, use
+ the click method.
+
+ # Untested. Have to subclass to add headers, I think -- so use urllib2
+ # instead!
+ import urllib
+ url, data, hdrs = form.click_request_data()
+ r = urllib.urlopen(url, data)
+
+ # Untested. I don't know of any reason to use httplib -- you can get
+ # just as much control with urllib2.
+ import httplib, urlparse
+ url, data, hdrs = form.click_request_data()
+ tup = urlparse(url)
+ host, path = tup[1], urlparse.urlunparse((None, None)+tup[2:])
+ conn = httplib.HTTPConnection(host)
+ if data:
+ httplib.request("POST", path, data, hdrs)
+ else:
+ httplib.request("GET", path, headers=hdrs)
+ r = conn.getresponse()
+
+ """
+ return self._click(name, type, id, nr, coord, "request_data")
+
+ def click_pairs(self, name=None, type=None, id=None, nr=0, coord=(1,1)):
+ """As for click_request_data, but returns a list of (key, value) pairs.
+
+ You can use this list as an argument to ClientForm.urlencode. This is
+ usually only useful if you're using httplib or urllib rather than
+ urllib2 or ClientCookie. It may also be useful if you want to manually
+ tweak the keys and/or values, but this should not be necessary.
+ Otherwise, use the click method.
+
+ Note that this method is only useful for forms of MIME type
+ x-www-form-urlencoded. In particular, it does not return the
+ information required for file upload. If you need file upload and are
+ not using urllib2, use click_request_data.
+
+ Also note that Python 2.0's urllib.urlencode is slightly broken: it
+ only accepts a mapping, not a sequence of pairs, as an argument. This
+ messes up any ordering in the argument. Use ClientForm.urlencode
+ instead.
+
+ """
+ return self._click(name, type, id, nr, coord, "pairs")
+
+#---------------------------------------------------
+
+ def find_control(self,
+ name=None, type=None, kind=None, id=None, predicate=None,
+ nr=None):
+ """Locate some specific control within the form.
+
+ At least one of the name, type, kind, predicate and nr arguments must
+ be supplied. If no matching control is found, ControlNotFoundError is
+ raised.
+
+ If name is specified, then the control must have the indicated name.
+
+ If type is specified then the control must have the specified type (in
+ addition to the types possible for <input> HTML tags: "text",
+ "password", "hidden", "submit", "image", "button", "radio", "checkbox",
+ "file" we also have "reset", "buttonbutton", "submitbutton",
+ "resetbutton", "textarea", "select" and "isindex").
+
+ If kind is specified, then the control must fall into the specified
+ group, each of which satisfies a particular interface. The types are
+ "text", "list", "multilist", "singlelist", "clickable" and "file".
+
+ If id is specified, then the control must have the indicated id.
+
+ If predicate is specified, then the control must match that function.
+ The predicate function is passed the control as its single argument,
+ and should return a boolean value indicating whether the control
+ matched.
+
+ nr, if supplied, is the sequence number of the control (where 0 is the
+ first). Note that control 0 is the first control matching all the
+ other arguments (if supplied); it is not necessarily the first control
+ in the form.
+
+ """
+ if ((name is None) and (type is None) and (kind is None) and
+ (id is None) and (predicate is None) and (nr is None)):
+ raise ValueError(
+ "at least one argument must be supplied to specify control")
+ if nr is None: nr = 0
+
+ return self._find_control(name, type, kind, id, predicate, nr)
+
+#---------------------------------------------------
+# Private methods.
+
+ def _find_list_control(self,
+ name=None, type=None, kind=None, id=None, nr=None):
+ if ((name is None) and (type is None) and (kind is None) and
+ (id is None) and (nr is None)):
+ raise ValueError(
+ "at least one argument must be supplied to specify control")
+ if nr is None: nr = 0
+
+ return self._find_control(name, type, kind, id, is_listcontrol, nr)
+
+ def _find_control(self, name, type, kind, id, predicate, nr):
+ if (name is not None) and not isstringlike(name):
+ raise TypeError("control name must be string-like")
+ if (type is not None) and not isstringlike(type):
+ raise TypeError("control type must be string-like")
+ if (kind is not None) and not isstringlike(kind):
+ raise TypeError("control kind must be string-like")
+ if (id is not None) and not isstringlike(id):
+ raise TypeError("control id must be string-like")
+ if (predicate is not None) and not callable(predicate):
+ raise TypeError("control predicate must be callable")
+ if nr < 0: raise ValueError("control number must be a positive "
+ "integer")
+
+ orig_nr = nr
+
+ for control in self.controls:
+ if name is not None and name != control.name:
+ continue
+ if type is not None and type != control.type:
+ continue
+ if (kind is not None and
+ not self._is_control_in_kind(control, kind)):
+ continue
+ if id is not None and id != control.id:
+ continue
+ if predicate and not predicate(control):
+ continue
+ if nr:
+ nr = nr - 1
+ continue
+ return control
+
+ description = []
+ if name is not None: description.append("name '%s'" % name)
+ if type is not None: description.append("type '%s'" % type)
+ if kind is not None: description.append("kind '%s'" % kind)
+ if id is not None: description.append("id '%s'" % id)
+ if predicate is not None:
+ description.append("matching predicate %s" % predicate)
+ if orig_nr: description.append("nr %d" % orig_nr)
+ description = string.join(description, ", ")
+ raise ControlNotFoundError("no control with "+description)
+
+ def _is_control_in_kind(self, control, kind):
+ # XXX not OO
+ if kind == "list":
+ return isinstance(control, ListControl)
+ elif kind == "multilist":
+ return bool(isinstance(control, ListControl) and control.multiple)
+ elif kind == "singlelist":
+ return bool(isinstance(control, ListControl) and
+ not control.multiple)
+ elif kind == "file":
+ return isinstance(control, FileControl)
+ elif kind == "text":
+ return isinstance(control, TextControl)
+ elif kind == "clickable":
+ return (isinstance(control, SubmitControl) or
+ isinstance(control, IsindexControl))
+ else:
+ raise ValueError("no such control kind '%s'" % kind)
+
+ def _click(self, name, type, id, nr, coord, return_type):
+ try:
+ control = self._find_control(name, type, "clickable", id, None, nr)
+ except ControlNotFoundError:
+ if ((name is not None) or (type is not None) or (id is not None) or
+ (nr != 0)):
+ raise
+ # no clickable controls, but no control was explicitly requested,
+ # so return state without clicking any control
+ return self._switch_click(return_type)
+ else:
+ return control._click(self, coord, return_type)
+
+ def _pairs(self):
+ """Return sequence of (key, value) pairs suitable for urlencoding."""
+ pairs = []
+ for control in self.controls:
+ pairs.extend(control.pairs())
+ return pairs
+
+ def _request_data(self):
+ """Return a tuple (url, data, headers)."""
+ method = string.upper(self.method)
+ if method == "GET":
+ if self.enctype != "application/x-www-form-urlencoded":
+ raise ValueError(
+ "unknown GET form encoding type '%s'" % self.enctype)
+ uri = "%s?%s" % (self.action, urlencode(self._pairs()))
+ return uri, None, []
+ elif method == "POST":
+ if self.enctype == "application/x-www-form-urlencoded":
+ return (self.action, urlencode(self._pairs()),
+ [("Content-type", self.enctype)])
+ elif self.enctype == "multipart/form-data":
+ data = StringIO()
+ http_hdrs = []
+ mw = MimeWriter(data, http_hdrs)
+ f = mw.startmultipartbody("form-data", add_to_http_hdrs=True,
+ prefix=0)
+ for control in self.controls:
+ control._write_mime_data(mw)
+ mw.lastpart()
+ return self.action, data.getvalue(), http_hdrs
+ else:
+ raise ValueError(
+ "unknown POST form encoding type '%s'" % self.enctype)
+ else:
+ raise ValueError("Unknown method '%s'" % method)
+
+ def _switch_click(self, return_type):
+ # This is called by HTMLForm and clickable Controls to hide switching
+ # on return_type.
+ # XXX
+ # not OO
+ # duplicated in IsindexControl._click
+ if return_type == "pairs":
+ return self._pairs()
+ elif return_type == "request_data":
+ return self._request_data()
+ else:
+ req_data = self._request_data()
+ req = urllib2.Request(req_data[0], req_data[1])
+ for key, val in req_data[2]:
+ req.add_header(key, val)
+ return req
diff --git a/tools/bug_tool/ardour_bugs b/tools/bug_tool/ardour_bugs
new file mode 100755
index 0000000000..c855c21513
--- /dev/null
+++ b/tools/bug_tool/ardour_bugs
@@ -0,0 +1,349 @@
+#! /usr/bin/python
+
+# By Taybin Rutkin
+#
+# TODO
+# look along $PATH to find binary.
+# Use ardour binary to get version info
+# hide file information from reporters
+
+# standard
+import os
+import Queue
+import re
+import shutil
+import string
+import sys
+import tempfile
+import threading
+import warnings
+
+# probably installed
+import pygtk
+pygtk.require("2.0")
+import gtk, gnome.ui
+
+# we provide ClientForm and ClientCookie in $prefix/share/ardour/
+sys.path.append('/usr/local/share/ardour/')
+sys.path.append('/opt/local/share/ardour/')
+sys.path.append('/opt/share/ardour/')
+sys.path.append('/usr/share/ardour/')
+
+# probably not installed
+import ClientForm
+import ClientCookie
+
+warnings.filterwarnings('ignore', message="tempnam is a potential security risk to your program")
+g_name = os.tempnam('/tmp', 'bugrp')
+os.mkdir(g_name)
+
+class NoBlock(threading.Thread):
+ def __init__(self, data, queue):
+ threading.Thread.__init__(self)
+ self.data = data
+ self.queue = queue
+
+ def zip(self):
+ self.queue.put('zipping')
+ os.system('tar cvfz ' + g_name + '.tar.gz ' + g_name + ' > /dev/null')
+
+ def login(self):
+ self.queue.put('logging in')
+ response = ClientCookie.urlopen('http://ardour.org/mantis/login.php?username=bug_tool&password=bug_tool')
+ print response
+ response.close()
+
+ def get_form(self):
+ self.queue.put('forming data')
+ response = ClientCookie.urlopen('http://ardour.org/mantis/bug_report_page.php')
+ print response
+ forms = ClientForm.ParseResponse(response)
+ self.form = forms[2]
+
+ def upload(self):
+ self.queue.put('uploading')
+ self.form.add_file(open(g_name+'.tar.gz'), 'application/x-gzip', 'system-info.tar.gz')
+ self.form['description'] = self.data['long']
+ self.form['summary'] = self.data['short']
+ self.form['custom_field_3'] = self.data['email']
+ self.form['custom_field_4'] = self.data['name']
+ request = self.form.click()
+ response2 = ClientCookie.urlopen(request)
+ response2.close()
+
+ def run(self):
+ print "1"
+ self.zip()
+ print "2"
+ self.login()
+ print "3"
+ self.get_form()
+ print "4"
+ self.upload()
+ print "5"
+ self.queue.put('done')
+
+class ProgressWin(object):
+ def __init__(self, parent_window, no_block, queue):
+ self.no_block = no_block
+ self.queue = queue
+
+ self.win = gtk.Window()
+ self.win.set_type_hint('dialog')
+ self.win.set_title('Progress')
+ self.win.set_resizable(False)
+ self.win.set_transient_for(parent_window)
+
+ vbox = gtk.VBox()
+ self.text = gtk.Label('')
+ self.progress = gtk.ProgressBar()
+ self.progress.set_pulse_step(0.25)
+
+ vbox.pack_start(self.text)
+ vbox.pack_start(self.progress)
+ self.win.add(vbox)
+
+ self.win.show_all()
+
+ gtk.timeout_add(100, self.check)
+
+ def check(self):
+ try:
+ text = self.queue.get_nowait()
+ print text
+ if text == 'done':
+ gtk.main_quit()
+ self.text.set_text(text)
+ except Queue.Empty:
+ pass
+
+ self.progress.pulse()
+ return True
+
+class ReportWin(object):
+ def start_page(self):
+ start = gnome.ui.DruidPageEdge(gnome.ui.EDGE_START)
+ start.set_text(
+"""So, you want to report a bug in ardour. Excellent.
+
+This program will help you to submit a bug report that will be useful to the programmers.
+
+We are collecting this information so that we don't have to ask you to research very detailed aspects of your system configuration. The information this tool collects is stored in the Ardour bug tracking system, and is not used for any other purpose. We will not intentionally sell or disclose the information to any parties besides those authorized to view it on the Ardour bug tracking system.
+""")
+ start.connect('cancel', lambda w, d: gtk.main_quit())
+ self.druid.append_page(start)
+
+ def end_page_finish(self, page, data):
+ print "page_finish"
+ if self.first_time:
+ self.first_time = False
+ self.druid.set_buttons_sensitive(False, False, False, False)
+ print "build queue"
+ self.queue = Queue.Queue(0)
+ print "build no_block"
+ self.no_block = NoBlock(self.data, self.queue)
+ print "build progress window"
+ self.progress = ProgressWin(self.win, self.no_block, self.queue)
+ print "start no block"
+ self.no_block.start()
+ print "exit end_page_finish"
+
+ def end_page(self):
+ end = gnome.ui.DruidPageEdge(gnome.ui.EDGE_FINISH)
+ end.set_text(
+"""Thank you for helping Ardour.
+
+When you click the "Apply" button, we will connect to the web and upload the information.
+
+Please let the Bug Tool finish. It will exit on its own.""")
+ end.connect('cancel', lambda w, d: gtk.main_quit())
+ end.connect('finish', self.end_page_finish)
+ self.druid.append_page(end)
+
+ def build_tools_page_next(self, page, data):
+ if self.tools_radio.get_active():
+ os.system("g++ --version >> " +g_name+"/build-tools")
+ os.system("pkg-config --version >> " +g_name+"/build-tools")
+ os.system("autoconf --version >> " +g_name+"/build-tools")
+ os.system("automake --version >> " +g_name+"/build-tools")
+ os.system("aclocal --version >> " +g_name+"/build-tools")
+ os.system("libtool --version >> " +g_name+"/build-tools")
+ os.system("gettext --version >> " +g_name+"/build-tools")
+ os.system("autopoint --version >> " +g_name+"/build-tools")
+
+ def build_tools_page(self):
+ tools = gnome.ui.DruidPageStandard()
+ self.tools_radio = gtk.RadioButton(None, "Yes")
+ radio_btn2 = gtk.RadioButton(self.tools_radio, "No")
+ radio_btn2.set_active(True)
+ tools.append_item("Are you using a version of Ardour that you compiled yourself?", self.tools_radio, "")
+ tools.append_item("", radio_btn2, "")
+ tools.connect('cancel', lambda w, d: gtk.main_quit())
+ tools.connect('next', self.build_tools_page_next)
+ self.druid.append_page(tools)
+
+ def binary_page_next(self, page, data):
+ path = self.binary_path.get_text()
+ if len(path) > 0 and os.path.exists(path):
+ os.system("ldd "+path+" > "+g_name+"/linker-info")
+
+ def binary_page(self):
+ binary = gnome.ui.DruidPageStandard()
+ self.binary_path = gtk.Entry()
+ binary.append_item("Where is Ardour's binary located?", self.binary_path, "")
+ binary.connect('cancel', lambda w, d: gtk.main_quit())
+ binary.connect('next', self.binary_page_next)
+ self.druid.append_page(binary)
+
+ def versions_page_next(self, page, data):
+ os.system('echo "gtk-ardour version: '+self.gtkardour_version.get_text()+'" >>'+g_name+'/ardour-version')
+ os.system('echo "libardour version: '+self.libardour_version.get_text()+'" >>'+g_name+'/ardour-version')
+
+ def versions_page(self):
+ versions = gnome.ui.DruidPageStandard()
+ self.gtkardour_version = gtk.Entry()
+ self.libardour_version = gtk.Entry()
+ versions.append_item("What is gtk-ardour's version?", self.gtkardour_version, "")
+ versions.append_item("What is libardour's version?", self.libardour_version, "")
+ versions.connect('cancel', lambda w, d: gtk.main_quit())
+ versions.connect('next', self.versions_page_next)
+ self.druid.append_page(versions)
+
+ def session_check_toggled(self, data):
+ self.session_path.set_sensitive(self.session_check.get_active())
+
+ def sessions_page_next(self, page, data):
+ session = self.session_path.get_text()
+ if self.session_check.get_active() and session > 0:
+ if os.path.exists(session) and os.path.isfile(session):
+ shutil.copy(session, g_name)
+
+ def sessions_page(self):
+ sessions = gnome.ui.DruidPageStandard()
+ self.session_check = gtk.CheckButton("Yes")
+ self.session_check.set_active(True)
+ self.session_path = gtk.Entry()
+ sessions.append_item("Is the problem one you've noticed while trying to run Ardour?", self.session_check, "")
+ sessions.append_item("What is the session file you've been using?", self.session_path, "")
+ self.session_check.connect('toggled', self.session_check_toggled)
+ sessions.connect('cancel', lambda w, d:gtk.main_quit())
+ sessions.connect('next', self.sessions_page_next)
+ self.druid.append_page(sessions)
+
+ def description_page_next(self, page, data):
+ self.data['short'] = self.short_description.get_text()
+ buffer = self.long_description.get_buffer()
+ self.data['long'] = buffer.get_text(buffer.get_start_iter(), buffer.get_end_iter())
+
+ def description_page(self):
+ description = gnome.ui.DruidPageStandard()
+ self.long_description = gtk.TextView()
+ self.short_description = gtk.Entry()
+ self.long_description.set_size_request(-1, 70)
+ description.append_item(
+"""OK, we've collected the system information. Now its time for you
+to explain the problem.
+
+Please note: you do not need to include any information about versions
+of any software - that has been taken care of.
+
+If you are reporting an operational problem, please carefully describe
+the actions you took, any messages that you noticed, and in as much
+detail as possible describe what went wrong.""", self.long_description, "")
+ description.append_item("Please give a one line summary of your problem", self.short_description, "")
+ description.connect('cancel', lambda w, d:gtk.main_quit())
+ description.connect('next', self.description_page_next)
+ self.druid.append_page(description)
+
+ def info_page_next(self, page, data):
+ self.data['name'] = self.name.get_text()
+ self.data['email'] = self.email.get_text()
+
+ def info_page(self):
+ info = gnome.ui.DruidPageStandard()
+ self.name = gtk.Entry()
+ self.email = gtk.Entry()
+ info.append_item("Name", self.name, "Optional")
+ info.append_item("Email", self.email, "")
+ info.connect('cancel', lambda w, d:gtk.main_quit())
+ info.connect('next', self.info_page_next)
+ self.druid.append_page(info)
+
+ def __init__(self):
+ self.first_time = True
+
+ self.win = gtk.Window()
+ self.win.set_title("Ardour Bug Tool")
+ self.win.connect('destroy', lambda w: gtk.main_quit())
+
+ self.druid = gnome.ui.Druid()
+
+ self.start_page()
+ self.build_tools_page()
+ self.binary_page()
+ self.versions_page()
+ self.sessions_page()
+ self.description_page()
+ self.info_page()
+ self.end_page()
+
+ self.win.add(self.druid)
+ self.win.show_all()
+
+ self.data = {}
+
+def main(*args):
+ os.mkdir(g_name+"/proc/")
+ proclist = ['asound', 'cpuinfo', 'devices', 'dma', 'filesystems', 'irq', 'isapnp', 'meminfo', 'modules', 'mounts', 'partition', 'pci', 'slabinfo', 'sysvipc/shm', 'version']
+ for item in proclist:
+ if os.path.exists('/proc/'+item):
+ try:
+ if os.path.isdir('/proc/'+item):
+ shutil.copytree('/proc/'+item, g_name+'/proc/'+item)
+ else:
+ shutil.copy('/proc/'+item, g_name+'/proc/')
+ except shutil.Error:
+ pass #should this be reported?
+ else:
+ f = open(g_name+'/proc/'+item, 'w')
+ f.write(item+' missing in /proc')
+ f.close
+
+ liblist = ['asound', 'c', 'gdbm', 'gdk', 'gmodule', 'gtk', 'intl', 'jack', 'm', 'pthreads', 'sndfile', 'X11', 'Xext']
+ for lib in liblist:
+ for libdir in ['/lib/', '/usr/lib/', '/usr/X11R6/lib/', '/usr/local/lib/', '/opt/lib/']:
+ if os.path.exists(libdir+"lib"+lib+".so"):
+ os.system('echo "'+lib+ ' is `ls -l '+libdir+'lib'+lib+'.so`" >> '+g_name+'/libraries')
+
+ if os.path.exists('/proc/sys/kernel/lowlatency'):
+ shutil.copy('/proc/sys/kernel/lowlatency', g_name+'/lowlatency-status')
+ else:
+ f = open(g_name+'/lowlatency-status', 'w')
+ f.write('-1')
+ f.close()
+
+ scsi = re.compile(r'sd[a-z][0-9]')
+ if scsi.search(open('/proc/mounts').read()):
+ shutil.copytree('/proc/scsi', g_name+'/scsi')
+
+ ide = re.compile(r'hd[a-z][0-9]')
+ if ide.search(open('/proc/mounts').read()):
+ pass
+
+ os.system("xmodmap >" +g_name+"/xmodmap")
+ os.system("/sbin/lspci -vv >" +g_name+"/lspci.out")
+
+ if os.path.exists(os.path.expandvars('$HOME')+'/.ardour/ardour.rc'):
+ shutil.copy(os.path.expandvars('$HOME')+'/.ardour/ardour.rc', g_name+'/ardour.rc')
+
+ bug_win = ReportWin()
+
+ gtk.main()
+
+if __name__ == '__main__':
+ main()
+
+shutil.rmtree(g_name)
+if os.path.exists(g_name+'.tar.gz'):
+ os.remove(g_name+'.tar.gz')
+
diff --git a/tools/config.guess b/tools/config.guess
new file mode 100755
index 0000000000..78f6b92cd3
--- /dev/null
+++ b/tools/config.guess
@@ -0,0 +1,1409 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+
+timestamp='2003-01-10'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Originally written by Per Bothner <per@bothner.com>.
+# Please send patches to <config-patches@gnu.org>. Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub. If it succeeds, it prints the system name on stdout, and
+# exits with 0. Otherwise, it exits with 1.
+#
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit build system type.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit 0 ;;
+ --version | -v )
+ echo "$version" ; exit 0 ;;
+ --help | --h* | -h )
+ echo "$usage"; exit 0 ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help" >&2
+ exit 1 ;;
+ * )
+ break ;;
+ esac
+done
+
+if test $# != 0; then
+ echo "$me: too many arguments$help" >&2
+ exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,) echo "int x;" > $dummy.c ;
+ for c in cc gcc c89 c99 ; do
+ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+ CC_FOR_BUILD="$c"; break ;
+ fi ;
+ done ;
+ if test x"$CC_FOR_BUILD" = x ; then
+ CC_FOR_BUILD=no_compiler_found ;
+ fi
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+esac ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+ PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ *:NetBSD:*:*)
+ # NetBSD (nbsd) targets should (where applicable) match one or
+ # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
+ # switched to ELF, *-*-netbsd* would select the old
+ # object file format. This provides both forward
+ # compatibility and a consistent mechanism for selecting the
+ # object file format.
+ #
+ # Note: NetBSD doesn't particularly care about the vendor
+ # portion of the name. We always set it to "unknown".
+ sysctl="sysctl -n hw.machine_arch"
+ UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+ /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+ case "${UNAME_MACHINE_ARCH}" in
+ armeb) machine=armeb-unknown ;;
+ arm*) machine=arm-unknown ;;
+ sh3el) machine=shl-unknown ;;
+ sh3eb) machine=sh-unknown ;;
+ *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ esac
+ # The Operating System including object format, if it has switched
+ # to ELF recently, or will in the future.
+ case "${UNAME_MACHINE_ARCH}" in
+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ eval $set_cc_for_build
+ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep __ELF__ >/dev/null
+ then
+ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+ # Return netbsd for either. FIX?
+ os=netbsd
+ else
+ os=netbsdelf
+ fi
+ ;;
+ *)
+ os=netbsd
+ ;;
+ esac
+ # The OS release
+ # Debian GNU/NetBSD machines have a different userland, and
+ # thus, need a distinct triplet. However, they do not need
+ # kernel version information, so it can be replaced with a
+ # suitable tag, in the style of linux-gnu.
+ case "${UNAME_VERSION}" in
+ Debian*)
+ release='-gnu'
+ ;;
+ *)
+ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ ;;
+ esac
+ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+ # contains redundant information, the shorter form:
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ echo "${machine}-${os}${release}"
+ exit 0 ;;
+ amiga:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ arc:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ hp300:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mac68k:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ macppc:OpenBSD:*:*)
+ echo powerpc-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mvme68k:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mvme88k:OpenBSD:*:*)
+ echo m88k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ mvmeppc:OpenBSD:*:*)
+ echo powerpc-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ pmax:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ sgi:OpenBSD:*:*)
+ echo mipseb-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ sun3:OpenBSD:*:*)
+ echo m68k-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ wgrisc:OpenBSD:*:*)
+ echo mipsel-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ *:OpenBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
+ exit 0 ;;
+ *:MicroBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-microbsd${UNAME_RELEASE}
+ exit 0 ;;
+ alpha:OSF1:*:*)
+ if test $UNAME_RELEASE = "V4.0"; then
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ fi
+ # A Vn.n version is a released version.
+ # A Tn.n version is a released field test version.
+ # A Xn.n version is an unreleased experimental baselevel.
+ # 1.2 uses "1.2" for uname -r.
+ eval $set_cc_for_build
+ cat <<EOF >$dummy.s
+ .data
+\$Lformat:
+ .byte 37,100,45,37,120,10,0 # "%d-%x\n"
+
+ .text
+ .globl main
+ .align 4
+ .ent main
+main:
+ .frame \$30,16,\$26,0
+ ldgp \$29,0(\$27)
+ .prologue 1
+ .long 0x47e03d80 # implver \$0
+ lda \$2,-1
+ .long 0x47e20c21 # amask \$2,\$1
+ lda \$16,\$Lformat
+ mov \$0,\$17
+ not \$1,\$18
+ jsr \$26,printf
+ ldgp \$29,0(\$26)
+ mov 0,\$16
+ jsr \$26,exit
+ .end main
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.s 2>/dev/null
+ if test "$?" = 0 ; then
+ case `$dummy` in
+ 0-0)
+ UNAME_MACHINE="alpha"
+ ;;
+ 1-0)
+ UNAME_MACHINE="alphaev5"
+ ;;
+ 1-1)
+ UNAME_MACHINE="alphaev56"
+ ;;
+ 1-101)
+ UNAME_MACHINE="alphapca56"
+ ;;
+ 2-303)
+ UNAME_MACHINE="alphaev6"
+ ;;
+ 2-307)
+ UNAME_MACHINE="alphaev67"
+ ;;
+ 2-1307)
+ UNAME_MACHINE="alphaev68"
+ ;;
+ 3-1307)
+ UNAME_MACHINE="alphaev7"
+ ;;
+ esac
+ fi
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ exit 0 ;;
+ Alpha\ *:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # Should we change UNAME_MACHINE based on the output of uname instead
+ # of the specific Alpha model?
+ echo alpha-pc-interix
+ exit 0 ;;
+ 21064:Windows_NT:50:3)
+ echo alpha-dec-winnt3.5
+ exit 0 ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ echo m68k-unknown-sysv4
+ exit 0;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-amigaos
+ exit 0 ;;
+ *:[Mm]orph[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-morphos
+ exit 0 ;;
+ *:OS/390:*:*)
+ echo i370-ibm-openedition
+ exit 0 ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+ exit 0;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+ echo hppa1.1-hitachi-hiuxmpp
+ exit 0;;
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ if test "`(/bin/universe) 2>/dev/null`" = att ; then
+ echo pyramid-pyramid-sysv3
+ else
+ echo pyramid-pyramid-bsd
+ fi
+ exit 0 ;;
+ NILE*:*:*:dcosx)
+ echo pyramid-pyramid-svr4
+ exit 0 ;;
+ DRS?6000:UNIX_SV:4.2*:7*)
+ case `/usr/bin/uname -p` in
+ sparc) echo sparc-icl-nx7 && exit 0 ;;
+ esac ;;
+ sun4H:SunOS:5.*:*)
+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ i86pc:SunOS:5.*:*)
+ echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ sun4*:SunOS:6*:*)
+ # According to config.sub, this is the proper way to canonicalize
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+ # it's likely to be more like Solaris than SunOS4.
+ echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ sun4*:SunOS:*:*)
+ case "`/usr/bin/arch -k`" in
+ Series*|S4*)
+ UNAME_RELEASE=`uname -v`
+ ;;
+ esac
+ # Japanese Language versions have a version number like `4.1.3-JL'.
+ echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+ exit 0 ;;
+ sun3*:SunOS:*:*)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ exit 0 ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+ case "`/bin/arch`" in
+ sun3)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ ;;
+ sun4)
+ echo sparc-sun-sunos${UNAME_RELEASE}
+ ;;
+ esac
+ exit 0 ;;
+ aushp:SunOS:*:*)
+ echo sparc-auspex-sunos${UNAME_RELEASE}
+ exit 0 ;;
+ # The situation for MiNT is a little confusing. The machine name
+ # can be virtually everything (everything which is not
+ # "atarist" or "atariste" at least should have a processor
+ # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
+ # to the lowercase version "mint" (or "freemint"). Finally
+ # the system name "TOS" denotes a system which is actually not
+ # MiNT. But MiNT is downward compatible to TOS, so this should
+ # be no problem.
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit 0 ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit 0 ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit 0 ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit 0 ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit 0 ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit 0 ;;
+ powerpc:machten:*:*)
+ echo powerpc-apple-machten${UNAME_RELEASE}
+ exit 0 ;;
+ RISC*:Mach:*:*)
+ echo mips-dec-mach_bsd4.3
+ exit 0 ;;
+ RISC*:ULTRIX:*:*)
+ echo mips-dec-ultrix${UNAME_RELEASE}
+ exit 0 ;;
+ VAX*:ULTRIX*:*:*)
+ echo vax-dec-ultrix${UNAME_RELEASE}
+ exit 0 ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ echo clipper-intergraph-clix${UNAME_RELEASE}
+ exit 0 ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h> /* for printf() prototype */
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+ #if defined (host_mips) && defined (MIPSEB)
+ #if defined (SYSTYPE_SYSV)
+ printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_SVR4)
+ printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+ printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+ #endif
+ #endif
+ exit (-1);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c \
+ && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
+ && exit 0
+ echo mips-mips-riscos${UNAME_RELEASE}
+ exit 0 ;;
+ Motorola:PowerMAX_OS:*:*)
+ echo powerpc-motorola-powermax
+ exit 0 ;;
+ Motorola:*:4.3:PL8-*)
+ echo powerpc-harris-powermax
+ exit 0 ;;
+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+ echo powerpc-harris-powermax
+ exit 0 ;;
+ Night_Hawk:Power_UNIX:*:*)
+ echo powerpc-harris-powerunix
+ exit 0 ;;
+ m88k:CX/UX:7*:*)
+ echo m88k-harris-cxux7
+ exit 0 ;;
+ m88k:*:4*:R4*)
+ echo m88k-motorola-sysv4
+ exit 0 ;;
+ m88k:*:3*:R3*)
+ echo m88k-motorola-sysv3
+ exit 0 ;;
+ AViiON:dgux:*:*)
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+ then
+ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+ [ ${TARGET_BINARY_INTERFACE}x = x ]
+ then
+ echo m88k-dg-dgux${UNAME_RELEASE}
+ else
+ echo m88k-dg-dguxbcs${UNAME_RELEASE}
+ fi
+ else
+ echo i586-dg-dgux${UNAME_RELEASE}
+ fi
+ exit 0 ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+ exit 0 ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ echo m88k-motorola-sysv3
+ exit 0 ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ echo m88k-tektronix-sysv3
+ exit 0 ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ echo m68k-tektronix-bsd
+ exit 0 ;;
+ *:IRIX*:*:*)
+ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+ exit 0 ;;
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i*86:AIX:*:*)
+ echo i386-ibm-aix
+ exit 0 ;;
+ ia64:AIX:*:*)
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+ exit 0 ;;
+ *:AIX:2:3)
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <sys/systemcfg.h>
+
+ main()
+ {
+ if (!__power_pc())
+ exit(1);
+ puts("powerpc-ibm-aix3.2.5");
+ exit(0);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
+ echo rs6000-ibm-aix3.2.5
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ echo rs6000-ibm-aix3.2.4
+ else
+ echo rs6000-ibm-aix3.2
+ fi
+ exit 0 ;;
+ *:AIX:*:[45])
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+ else
+ IBM_ARCH=powerpc
+ fi
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ exit 0 ;;
+ *:AIX:*:*)
+ echo rs6000-ibm-aix
+ exit 0 ;;
+ ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ echo romp-ibm-bsd4.4
+ exit 0 ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
+ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+ exit 0 ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ echo rs6000-bull-bosx
+ exit 0 ;;
+ DPX/2?00:B.O.S.:*:*)
+ echo m68k-bull-sysv3
+ exit 0 ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ echo m68k-hp-bsd
+ exit 0 ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ echo m68k-hp-bsd4.4
+ exit 0 ;;
+ 9000/[34678]??:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ case "${UNAME_MACHINE}" in
+ 9000/31? ) HP_ARCH=m68000 ;;
+ 9000/[34]?? ) HP_ARCH=m68k ;;
+ 9000/[678][0-9][0-9])
+ if [ -x /usr/bin/getconf ]; then
+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+ case "${sc_cpu_version}" in
+ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+ 532) # CPU_PA_RISC2_0
+ case "${sc_kernel_bits}" in
+ 32) HP_ARCH="hppa2.0n" ;;
+ 64) HP_ARCH="hppa2.0w" ;;
+ '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
+ esac ;;
+ esac
+ fi
+ if [ "${HP_ARCH}" = "" ]; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+
+ #define _HPUX_SOURCE
+ #include <stdlib.h>
+ #include <unistd.h>
+
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
+
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
+EOF
+ (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ test -z "$HP_ARCH" && HP_ARCH=hppa
+ fi ;;
+ esac
+ if [ ${HP_ARCH} = "hppa2.0w" ]
+ then
+ # avoid double evaluation of $set_cc_for_build
+ test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
+ then
+ HP_ARCH="hppa2.0w"
+ else
+ HP_ARCH="hppa64"
+ fi
+ fi
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ exit 0 ;;
+ ia64:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux${HPUX_REV}
+ exit 0 ;;
+ 3050*:HI-UX:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <unistd.h>
+ int
+ main ()
+ {
+ long cpu = sysconf (_SC_CPU_VERSION);
+ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
+ results, however. */
+ if (CPU_IS_PA_RISC (cpu))
+ {
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+ default: puts ("hppa-hitachi-hiuxwe2"); break;
+ }
+ }
+ else if (CPU_IS_HP_MC68K (cpu))
+ puts ("m68k-hitachi-hiuxwe2");
+ else puts ("unknown-hitachi-hiuxwe2");
+ exit (0);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
+ echo unknown-hitachi-hiuxwe2
+ exit 0 ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ echo hppa1.1-hp-bsd
+ exit 0 ;;
+ 9000/8??:4.3bsd:*:*)
+ echo hppa1.0-hp-bsd
+ exit 0 ;;
+ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+ echo hppa1.0-hp-mpeix
+ exit 0 ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ echo hppa1.1-hp-osf
+ exit 0 ;;
+ hp8??:OSF1:*:*)
+ echo hppa1.0-hp-osf
+ exit 0 ;;
+ i*86:OSF1:*:*)
+ if [ -x /usr/sbin/sysversion ] ; then
+ echo ${UNAME_MACHINE}-unknown-osf1mk
+ else
+ echo ${UNAME_MACHINE}-unknown-osf1
+ fi
+ exit 0 ;;
+ parisc*:Lites*:*:*)
+ echo hppa1.1-hp-lites
+ exit 0 ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+ exit 0 ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit 0 ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+ exit 0 ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+ exit 0 ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+ exit 0 ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
+ CRAY*[A-Z]90:*:*:*)
+ echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+ -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
+ CRAY*TS:*:*:*)
+ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
+ CRAY*T3E:*:*:*)
+ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
+ CRAY*SV1:*:*:*)
+ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
+ *:UNICOS/mp:*:*)
+ echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit 0 ;;
+ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+ FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit 0 ;;
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ exit 0 ;;
+ sparc*:BSD/OS:*:*)
+ echo sparc-unknown-bsdi${UNAME_RELEASE}
+ exit 0 ;;
+ *:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ exit 0 ;;
+ *:FreeBSD:*:*)
+ # Determine whether the default compiler uses glibc.
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <features.h>
+ #if __GLIBC__ >= 2
+ LIBC=gnu
+ #else
+ LIBC=
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
+ exit 0 ;;
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+ exit 0 ;;
+ i*:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit 0 ;;
+ i*:PW*:*)
+ echo ${UNAME_MACHINE}-pc-pw32
+ exit 0 ;;
+ x86:Interix*:3*)
+ echo i586-pc-interix3
+ exit 0 ;;
+ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+ echo i${UNAME_MACHINE}-pc-mks
+ exit 0 ;;
+ i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+ # UNAME_MACHINE based on the output of uname instead of i386?
+ echo i586-pc-interix
+ exit 0 ;;
+ i*:UWIN*:*)
+ echo ${UNAME_MACHINE}-pc-uwin
+ exit 0 ;;
+ p*:CYGWIN*:*)
+ echo powerpcle-unknown-cygwin
+ exit 0 ;;
+ prep*:SunOS:5.*:*)
+ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit 0 ;;
+ *:GNU:*:*)
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ exit 0 ;;
+ i*86:Minix:*:*)
+ echo ${UNAME_MACHINE}-pc-minix
+ exit 0 ;;
+ arm*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
+ ia64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
+ m68*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
+ mips:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef mips
+ #undef mipsel
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=mipsel
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=mips
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
+ test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
+ ;;
+ mips64:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef mips64
+ #undef mips64el
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=mips64el
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=mips64
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
+ test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
+ ;;
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-gnu
+ exit 0 ;;
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-gnu
+ exit 0 ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+ EV56) UNAME_MACHINE=alphaev56 ;;
+ PCA56) UNAME_MACHINE=alphapca56 ;;
+ PCA57) UNAME_MACHINE=alphapca56 ;;
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
+ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ exit 0 ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+ PA7*) echo hppa1.1-unknown-linux-gnu ;;
+ PA8*) echo hppa2.0-unknown-linux-gnu ;;
+ *) echo hppa-unknown-linux-gnu ;;
+ esac
+ exit 0 ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-gnu
+ exit 0 ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ echo ${UNAME_MACHINE}-ibm-linux
+ exit 0 ;;
+ sh*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit 0 ;;
+ x86_64:Linux:*:*)
+ echo x86_64-unknown-linux-gnu
+ exit 0 ;;
+ i*86:Linux:*:*)
+ # The BFD linker knows what the default object file format is, so
+ # first see if it will tell us. cd to the root directory to prevent
+ # problems with other programs or directories called `ld' in the path.
+ # Set LC_ALL=C to ensure ld outputs messages in English.
+ ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
+ | sed -ne '/supported targets:/!d
+ s/[ ][ ]*/ /g
+ s/.*supported targets: *//
+ s/ .*//
+ p'`
+ case "$ld_supported_targets" in
+ elf32-i386)
+ TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+ ;;
+ a.out-i386-linux)
+ echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+ exit 0 ;;
+ coff-i386)
+ echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+ exit 0 ;;
+ "")
+ # Either a pre-BFD a.out linker (linux-gnuoldld) or
+ # one that does not give us useful --help.
+ echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+ exit 0 ;;
+ esac
+ # Determine whether the default compiler is a.out or elf
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <features.h>
+ #ifdef __ELF__
+ # ifdef __GLIBC__
+ # if __GLIBC__ >= 2
+ LIBC=gnu
+ # else
+ LIBC=gnulibc1
+ # endif
+ # else
+ LIBC=gnulibc1
+ # endif
+ #else
+ #ifdef __INTEL_COMPILER
+ LIBC=gnu
+ #else
+ LIBC=gnuaout
+ #endif
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
+ test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0
+ test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
+ ;;
+ i*86:DYNIX/ptx:4*:*)
+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+ # earlier versions are messed up and put the nodename in both
+ # sysname and nodename.
+ echo i386-sequent-sysv4
+ exit 0 ;;
+ i*86:UNIX_SV:4.2MP:2.*)
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
+ # I just have to hope. -- rms.
+ # Use sysv4.2uw... so that sysv4* matches it.
+ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+ exit 0 ;;
+ i*86:OS/2:*:*)
+ # If we were able to find `uname', then EMX Unix compatibility
+ # is probably installed.
+ echo ${UNAME_MACHINE}-pc-os2-emx
+ exit 0 ;;
+ i*86:XTS-300:*:STOP)
+ echo ${UNAME_MACHINE}-unknown-stop
+ exit 0 ;;
+ i*86:atheos:*:*)
+ echo ${UNAME_MACHINE}-unknown-atheos
+ exit 0 ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ i*86:*DOS:*:*)
+ echo ${UNAME_MACHINE}-pc-msdosdjgpp
+ exit 0 ;;
+ i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+ UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+ echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+ else
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+ fi
+ exit 0 ;;
+ i*86:*:5:[78]*)
+ case `/bin/uname -X | grep "^Machine"` in
+ *486*) UNAME_MACHINE=i486 ;;
+ *Pentium) UNAME_MACHINE=i586 ;;
+ *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+ esac
+ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+ exit 0 ;;
+ i*86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+ echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+ elif /bin/uname -X 2>/dev/null >/dev/null ; then
+ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=i586
+ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+ && UNAME_MACHINE=i686
+ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+ && UNAME_MACHINE=i686
+ echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ else
+ echo ${UNAME_MACHINE}-pc-sysv32
+ fi
+ exit 0 ;;
+ pc:*:*:*)
+ # Left here for compatibility:
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i386.
+ echo i386-pc-msdosdjgpp
+ exit 0 ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+ exit 0 ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+ exit 0 ;;
+ i860:*:4.*:*) # i860-SVR4
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ else # Add other i860-SVR4 vendors below as they are discovered.
+ echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ fi
+ exit 0 ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ echo m68010-convergent-sysv
+ exit 0 ;;
+ mc68k:UNIX:SYSTEM5:3.51m)
+ echo m68k-convergent-sysv
+ exit 0 ;;
+ M680?0:D-NIX:5.3:*)
+ echo m68k-diab-dnix
+ exit 0 ;;
+ M68*:*:R3V[567]*:*)
+ test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
+ 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0)
+ OS_REL=''
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && echo i486-ncr-sysv4.3${OS_REL} && exit 0
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && echo i486-ncr-sysv4 && exit 0 ;;
+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+ echo m68k-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ mc68030:UNIX_System_V:4.*:*)
+ echo m68k-atari-sysv4
+ exit 0 ;;
+ TSUNAMI:LynxOS:2.*:*)
+ echo sparc-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ rs6000:LynxOS:2.*:*)
+ echo rs6000-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+ echo powerpc-unknown-lynxos${UNAME_RELEASE}
+ exit 0 ;;
+ SM[BE]S:UNIX_SV:*:*)
+ echo mips-dde-sysv${UNAME_RELEASE}
+ exit 0 ;;
+ RM*:ReliantUNIX-*:*:*)
+ echo mips-sni-sysv4
+ exit 0 ;;
+ RM*:SINIX-*:*:*)
+ echo mips-sni-sysv4
+ exit 0 ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ echo ${UNAME_MACHINE}-sni-sysv4
+ else
+ echo ns32k-sni-sysv
+ fi
+ exit 0 ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
+ echo i586-unisys-sysv4
+ exit 0 ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes <hewes@openmarket.com>.
+ # How about differentiating between stratus architectures? -djm
+ echo hppa1.1-stratus-sysv4
+ exit 0 ;;
+ *:*:*:FTX*)
+ # From seanf@swdc.stratus.com.
+ echo i860-stratus-sysv4
+ exit 0 ;;
+ *:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo hppa1.1-stratus-vos
+ exit 0 ;;
+ mc68*:A/UX:*:*)
+ echo m68k-apple-aux${UNAME_RELEASE}
+ exit 0 ;;
+ news*:NEWS-OS:6*:*)
+ echo mips-sony-newsos6
+ exit 0 ;;
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ if [ -d /usr/nec ]; then
+ echo mips-nec-sysv${UNAME_RELEASE}
+ else
+ echo mips-unknown-sysv${UNAME_RELEASE}
+ fi
+ exit 0 ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+ exit 0 ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ echo powerpc-apple-beos
+ exit 0 ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+ exit 0 ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit 0 ;;
+ SX-5:SUPER-UX:*:*)
+ echo sx5-nec-superux${UNAME_RELEASE}
+ exit 0 ;;
+ SX-6:SUPER-UX:*:*)
+ echo sx6-nec-superux${UNAME_RELEASE}
+ exit 0 ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ exit 0 ;;
+ *:Rhapsody:*:*)
+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+ exit 0 ;;
+ *:Darwin:*:*)
+ case `uname -p` in
+ *86) UNAME_PROCESSOR=i686 ;;
+ powerpc) UNAME_PROCESSOR=powerpc ;;
+ esac
+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+ exit 0 ;;
+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
+ UNAME_PROCESSOR=`uname -p`
+ if test "$UNAME_PROCESSOR" = "x86"; then
+ UNAME_PROCESSOR=i386
+ UNAME_MACHINE=pc
+ fi
+ echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+ exit 0 ;;
+ *:QNX:*:4*)
+ echo i386-pc-qnx
+ exit 0 ;;
+ NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)
+ echo nsr-tandem-nsk${UNAME_RELEASE}
+ exit 0 ;;
+ *:NonStop-UX:*:*)
+ echo mips-compaq-nonstopux
+ exit 0 ;;
+ BS2000:POSIX*:*:*)
+ echo bs2000-siemens-sysv
+ exit 0 ;;
+ DS/*:UNIX_System_V:*:*)
+ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+ exit 0 ;;
+ *:Plan9:*:*)
+ # "uname -m" is not consistent, so use $cputype instead. 386
+ # is converted to i386 for consistency with other x86
+ # operating systems.
+ if test "$cputype" = "386"; then
+ UNAME_MACHINE=i386
+ else
+ UNAME_MACHINE="$cputype"
+ fi
+ echo ${UNAME_MACHINE}-unknown-plan9
+ exit 0 ;;
+ *:TOPS-10:*:*)
+ echo pdp10-unknown-tops10
+ exit 0 ;;
+ *:TENEX:*:*)
+ echo pdp10-unknown-tenex
+ exit 0 ;;
+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+ echo pdp10-dec-tops20
+ exit 0 ;;
+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+ echo pdp10-xkl-tops20
+ exit 0 ;;
+ *:TOPS-20:*:*)
+ echo pdp10-unknown-tops20
+ exit 0 ;;
+ *:ITS:*:*)
+ echo pdp10-unknown-its
+ exit 0 ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
+ I don't know.... */
+ printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+ printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+ "4"
+#else
+ ""
+#endif
+ ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+ printf ("arm-acorn-riscix"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+ printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+ int version;
+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+ if (version < 4)
+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+ else
+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+ exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+ printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+ printf ("ns32k-encore-mach\n"); exit (0);
+#else
+ printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+ printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+ printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+ printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+ struct utsname un;
+
+ uname(&un);
+
+ if (strncmp(un.version, "V2", 2) == 0) {
+ printf ("i386-sequent-ptx2\n"); exit (0);
+ }
+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+ printf ("i386-sequent-ptx1\n"); exit (0);
+ }
+ printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+# include <sys/param.h>
+# if defined (BSD)
+# if BSD == 43
+ printf ("vax-dec-bsd4.3\n"); exit (0);
+# else
+# if BSD == 199006
+ printf ("vax-dec-bsd4.3reno\n"); exit (0);
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# endif
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# else
+ printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+ printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+ exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+ case `getsysinfo -f cpu_type` in
+ c1*)
+ echo c1-convex-bsd
+ exit 0 ;;
+ c2*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit 0 ;;
+ c34*)
+ echo c34-convex-bsd
+ exit 0 ;;
+ c38*)
+ echo c38-convex-bsd
+ exit 0 ;;
+ c4*)
+ echo c4-convex-bsd
+ exit 0 ;;
+ esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+ ftp://ftp.gnu.org/pub/gnu/config/
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo = `(hostinfo) 2>/dev/null`
+/bin/universe = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/tools/jacktest.c b/tools/jacktest.c
new file mode 100644
index 0000000000..a0b97400b7
--- /dev/null
+++ b/tools/jacktest.c
@@ -0,0 +1,205 @@
+#include <stdio.h>
+#include <errno.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <jack/jack.h>
+
+jack_port_t *input_port;
+jack_port_t *output_port;
+jack_client_t *client;
+int loopsize = 25000;
+int xrun_occured = 0;
+int consecutive_xruns = 0;
+float first_xrun = 0.0f;
+float last_load = 0.0f;
+int at_loop = 0;
+int at_loop_size;
+char *thechunk;
+int chunksize = 1024 * 1024 * 10;
+
+void
+fooey (jack_nframes_t n)
+{
+ volatile int x;
+ thechunk[random()%chunksize] = n;
+}
+
+int
+process (jack_nframes_t nframes, void *arg)
+{
+ jack_default_audio_sample_t *in, *out;
+ int i;
+
+ in = jack_port_get_buffer (input_port, nframes);
+ out = jack_port_get_buffer (output_port, nframes);
+
+ memcpy (out, in, sizeof (jack_default_audio_sample_t) * nframes);
+
+ for (i = 0; i < loopsize; ++i) {
+ fooey (nframes);
+ }
+
+ last_load = jack_cpu_load (client);
+
+ if ((at_loop += nframes) >= at_loop_size) {
+ if (last_load < 25.0f) {
+ loopsize *= 2;
+ } else if (last_load < 50.0f) {
+ loopsize = (int) (1.5 * loopsize);
+ } else if (last_load < 90.0f) {
+ loopsize += (int) (0.10 * loopsize);
+ } else if (last_load < 95.0f) {
+ loopsize += (int) (0.05 * loopsize);
+ } else {
+ loopsize += (int) (0.001 * loopsize);
+ }
+ at_loop = 0;
+ printf ("loopsize = %d\n", loopsize);
+ }
+
+ if (xrun_occured) {
+ if (consecutive_xruns == 0) {
+ first_xrun = last_load;
+ }
+ consecutive_xruns++;
+ }
+
+ xrun_occured = 0;
+
+ if (consecutive_xruns >= 10) {
+ fprintf (stderr, "Stopping with load = %f (first xrun at %f)\n", last_load, first_xrun);
+ exit (0);
+ }
+
+ return 0;
+}
+
+/**
+ * JACK calls this shutdown_callback if the server ever shuts down or
+ * decides to disconnect the client.
+ */
+void
+jack_shutdown (void *arg)
+{
+ fprintf (stderr, "shutdown with load = %f\n", last_load);
+ exit (1);
+}
+
+int
+jack_xrun (void *arg)
+{
+ fprintf (stderr, "xrun occured with loop size = %d\n", loopsize);
+ xrun_occured = 1;
+ return 0;
+}
+
+int
+main (int argc, char *argv[])
+{
+ const char **ports;
+ const char *client_name;
+ const char *server_name = NULL;
+ jack_options_t options = JackNullOption;
+ jack_status_t status;
+
+ client_name = "jacktester";
+ if (argc > 1) {
+ chunksize = atoi (argv[1]);
+ printf ("using chunksize of %d\n", chunksize);
+ }
+
+ /* open a client connection to the JACK server */
+
+ client = jack_client_open (client_name, options, &status, server_name);
+ if (client == NULL) {
+ fprintf (stderr, "jack_client_open() failed, status = 0x%x\n",
+ status);
+ if (status & JackServerFailed) {
+ fprintf (stderr, "Unable to connect to JACK server\n");
+ }
+ exit (1);
+ }
+ if (status & JackServerStarted) {
+ fprintf (stderr, "JACK server started\n");
+ }
+ if (status & JackNameNotUnique) {
+ client_name = jack_get_client_name(client);
+ fprintf (stderr, "unique name `%s' assigned\n", client_name);
+ }
+
+ /* tell the JACK server to call `process()' whenever
+ there is work to be done.
+ */
+
+ jack_set_process_callback (client, process, 0);
+ jack_set_xrun_callback (client, jack_xrun, 0);
+ jack_on_shutdown (client, jack_shutdown, 0);
+
+ /* create two ports */
+
+ input_port = jack_port_register (client, "input",
+ JACK_DEFAULT_AUDIO_TYPE,
+ JackPortIsInput, 0);
+ output_port = jack_port_register (client, "output",
+ JACK_DEFAULT_AUDIO_TYPE,
+ JackPortIsOutput, 0);
+
+ if ((input_port == NULL) || (output_port == NULL)) {
+ fprintf(stderr, "no more JACK ports available\n");
+ exit (1);
+ }
+
+ at_loop_size = jack_get_sample_rate (client) * 2;
+ if ((thechunk = (char *) malloc (chunksize)) == NULL) {
+ fprintf (stderr, "cannot allocate chunk\n");
+ exit (1);
+ }
+
+ /* Tell the JACK server that we are ready to roll. Our
+ * process() callback will start running now. */
+
+ if (jack_activate (client)) {
+ fprintf (stderr, "cannot activate client");
+ exit (1);
+ }
+
+ /* connect the ports. Note: you can't do this before the
+ client is activated, because we can't allow connections to
+ be made to clients that aren't running.
+ */
+
+ ports = jack_get_ports (client, NULL, NULL,
+ JackPortIsPhysical|JackPortIsOutput);
+ if (ports == NULL) {
+ fprintf(stderr, "no physical capture ports\n");
+ exit (1);
+ }
+
+ if (jack_connect (client, ports[0], jack_port_name (input_port))) {
+ fprintf (stderr, "cannot connect input ports\n");
+ }
+
+ free (ports);
+
+ ports = jack_get_ports (client, NULL, NULL,
+ JackPortIsPhysical|JackPortIsInput);
+ if (ports == NULL) {
+ fprintf(stderr, "no physical playback ports\n");
+ exit (1);
+ }
+
+ if (jack_connect (client, jack_port_name (output_port), ports[0])) {
+ fprintf (stderr, "cannot connect output ports\n");
+ }
+
+ free (ports);
+
+ while (1) {
+ sleep (1);
+ }
+
+ jack_client_close (client);
+ exit (0);
+}